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 [ ]:
{ . ../../../../apps/spiral/dist/Supervisor$(_exe) --execute-command "../../../../deps/spiral/workspace/target/release/spiral$(_exe) dib --path test.dib --retries 3" } | Invoke-Block
00:00:00 v #1 networking.test_port_open / { port = 13806; ex = System.AggregateException: One or more errors occurred. (Connection refused) } 00:00:00 d #1 runtime.execute_with_options_async / { file_name = ../../../../deps/spiral/workspace/target/release/spiral; arguments = US5_0 "dib --path test.dib --retries 3"; options = { command = ../../../../deps/spiral/workspace/target/release/spiral dib --path test.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:00 v #2 > 00:00:00 d #1 spiral.main / { args = Array(MutCell(["dib", "--path", "test.dib", "--retries", "3"])) } 00:00:00 v #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 } } 00:00:01 v #4 > > 00:00:01 v #5 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:01 v #6 > > │ # test (Polyglot) 00:00:04 v #7 > > 00:00:04 v #8 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:04 v #9 > > //// test 00:00:04 v #10 > > 00:00:04 v #11 > > open testing 00:00:08 v #12 > > 00:00:08 v #13 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:08 v #14 > > //// test 00:00:08 v #15 > > //// print_code 00:00:08 v #16 > > 00:00:08 v #17 > > inl jp = [[ "J"; "P" ]] 00:00:08 v #18 > > inl tf = [[ "T"; "F" ]] 00:00:08 v #19 > > inl sn = [[ "S"; "N" ]] 00:00:08 v #20 > > inl ie = [[ "I"; "E" ]] 00:00:08 v #21 > > 00:00:08 v #22 > > (ie, ([[]] : _ string)) 00:00:08 v #23 > > ||> listm.foldBack fun ie' acc => 00:00:08 v #24 > > inl ssnn acc' jp' = 00:00:08 v #25 > > (sn, acc') 00:00:08 v #26 > > ||> listm.foldBack fun sn' acc' => 00:00:08 v #27 > > inl c' ie' sn' tf' jp' = 00:00:08 v #28 > > $'$"{!ie'}{!sn'}{!tf'}{!jp'}"' 00:00:08 v #29 > > 00:00:08 v #30 > > if listm.length acc' % 4i32 = 2 then 00:00:08 v #31 > > (tf, acc') 00:00:08 v #32 > > ||> listm.foldBack fun tf' acc'' => 00:00:08 v #33 > > c' ie' sn' tf' jp' :: acc'' 00:00:08 v #34 > > else 00:00:08 v #35 > > (acc', tf) 00:00:08 v #36 > > ||> listm.fold fun acc'' tf' => 00:00:08 v #37 > > c' ie' sn' tf' jp' :: acc'' 00:00:08 v #38 > > if acc = [[]] then 00:00:08 v #39 > > (acc, jp) 00:00:08 v #40 > > ||> listm.fold fun acc' jp' => 00:00:08 v #41 > > ssnn acc' jp' 00:00:08 v #42 > > else 00:00:08 v #43 > > (jp, acc) 00:00:08 v #44 > > ||> listm.foldBack fun jp' acc' => 00:00:08 v #45 > > ssnn acc' jp' 00:00:08 v #46 > > |> listm'.box 00:00:08 v #47 > > |> listm'.to_array' 00:00:08 v #48 > > |> _assert_eq' ;[[ 00:00:08 v #49 > > "ISTJ"; "ISFJ"; "INFJ"; "INTJ" 00:00:08 v #50 > > "ISTP"; "ISFP"; "INFP"; "INTP" 00:00:08 v #51 > > "ESTP"; "ESFP"; "ENFP"; "ENTP" 00:00:08 v #52 > > "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ" 00:00:08 v #53 > > ]] 00:00:09 v #54 > > 00:00:09 v #55 > > ── [ 980.39ms - stdout ] ─────────────────────────────────────────────────────── 00:00:09 v #56 > > │ let rec method1 (v0 : bool) : bool = 00:00:09 v #57 > > │ v0 00:00:09 v #58 > > │ and closure0 (v0 : string) () : unit = 00:00:09 v #59 > > │ let v1 : (string -> unit) = System.Console.WriteLine 00:00:09 v #60 > > │ v1 v0 00:00:09 v #61 > > │ and method0 () : unit = 00:00:09 v #62 > > │ let v0 : string = "E" 00:00:09 v #63 > > │ let v1 : string = "N" 00:00:09 v #64 > > │ let v2 : string = "T" 00:00:09 v #65 > > │ let v3 : string = "J" 00:00:09 v #66 > > │ let v4 : string = $"{v0}{v1}{v2}{v3}" 00:00:09 v #67 > > │ let v5 : string = "F" 00:00:09 v #68 > > │ let v6 : string = $"{v0}{v1}{v5}{v3}" 00:00:09 v #69 > > │ let v7 : string = "S" 00:00:09 v #70 > > │ let v8 : string = $"{v0}{v7}{v5}{v3}" 00:00:09 v #71 > > │ let v9 : string = $"{v0}{v7}{v2}{v3}" 00:00:09 v #72 > > │ let v10 : string = "P" 00:00:09 v #73 > > │ let v11 : string = $"{v0}{v1}{v2}{v10}" 00:00:09 v #74 > > │ let v12 : string = $"{v0}{v1}{v5}{v10}" 00:00:09 v #75 > > │ let v13 : string = $"{v0}{v7}{v5}{v10}" 00:00:09 v #76 > > │ let v14 : string = $"{v0}{v7}{v2}{v10}" 00:00:09 v #77 > > │ let v15 : string = "I" 00:00:09 v #78 > > │ let v16 : string = $"{v15}{v1}{v2}{v10}" 00:00:09 v #79 > > │ let v17 : string = $"{v15}{v1}{v5}{v10}" 00:00:09 v #80 > > │ let v18 : string = $"{v15}{v7}{v5}{v10}" 00:00:09 v #81 > > │ let v19 : string = $"{v15}{v7}{v2}{v10}" 00:00:09 v #82 > > │ let v20 : string = $"{v15}{v1}{v2}{v3}" 00:00:09 v #83 > > │ let v21 : string = $"{v15}{v1}{v5}{v3}" 00:00:09 v #84 > > │ let v22 : string = $"{v15}{v7}{v5}{v3}" 00:00:09 v #85 > > │ let v23 : string = $"{v15}{v7}{v2}{v3}" 00:00:09 v #86 > > │ let v24 : string list = [] 00:00:09 v #87 > > │ let v25 : string list = v4 :: v24 00:00:09 v #88 > > │ let v28 : string list = v6 :: v25 00:00:09 v #89 > > │ let v31 : string list = v8 :: v28 00:00:09 v #90 > > │ let v34 : string list = v9 :: v31 00:00:09 v #91 > > │ let v37 : string list = v11 :: v34 00:00:09 v #92 > > │ let v40 : string list = v12 :: v37 00:00:09 v #93 > > │ let v43 : string list = v13 :: v40 00:00:09 v #94 > > │ let v46 : string list = v14 :: v43 00:00:09 v #95 > > │ let v49 : string list = v16 :: v46 00:00:09 v #96 > > │ let v52 : string list = v17 :: v49 00:00:09 v #97 > > │ let v55 : string list = v18 :: v52 00:00:09 v #98 > > │ let v58 : string list = v19 :: v55 00:00:09 v #99 > > │ let v61 : string list = v20 :: v58 00:00:09 v #100 > > │ let v64 : string list = v21 :: v61 00:00:09 v #101 > > │ let v67 : string list = v22 :: v64 00:00:09 v #102 > > │ let v70 : string list = v23 :: v67 00:00:09 v #103 > > │ let v73 : (string list -> (string [])) = List.toArray 00:00:09 v #104 > > │ let v74 : (string []) = v73 v70 00:00:09 v #105 > > │ let v77 : string = "ISTJ" 00:00:09 v #106 > > │ let v78 : string = "ISFJ" 00:00:09 v #107 > > │ let v79 : string = "INFJ" 00:00:09 v #108 > > │ let v80 : string = "INTJ" 00:00:09 v #109 > > │ let v81 : string = "ISTP" 00:00:09 v #110 > > │ let v82 : string = "ISFP" 00:00:09 v #111 > > │ let v83 : string = "INFP" 00:00:09 v #112 > > │ let v84 : string = "INTP" 00:00:09 v #113 > > │ let v85 : string = "ESTP" 00:00:09 v #114 > > │ let v86 : string = "ESFP" 00:00:09 v #115 > > │ let v87 : string = "ENFP" 00:00:09 v #116 > > │ let v88 : string = "ENTP" 00:00:09 v #117 > > │ let v89 : string = "ESTJ" 00:00:09 v #118 > > │ let v90 : string = "ESFJ" 00:00:09 v #119 > > │ let v91 : string = "ENFJ" 00:00:09 v #120 > > │ let v92 : string = "ENTJ" 00:00:09 v #121 > > │ let v93 : (string []) = [|v77; v78; v79; v80; v81; v82; 00:00:09 v #122 > > v83; v84; v85; v86; v87; v88; v89; v90; v91; v92|] 00:00:09 v #123 > > │ let v94 : bool = v74 = v93 00:00:09 v #124 > > │ let v98 : bool = 00:00:09 v #125 > > │ if v94 then 00:00:09 v #126 > > │ true 00:00:09 v #127 > > │ else 00:00:09 v #128 > > │ method1(v94) 00:00:09 v #129 > > │ let v99 : string = "__assert_eq'" 00:00:09 v #130 > > │ let v100 : string = $"{v99} / actual: %A{v74} / expected: 00:00:09 v #131 > > %A{v93}" 00:00:09 v #132 > > │ let v103 : unit = () 00:00:09 v #133 > > │ let v104 : (unit -> unit) = closure0(v100) 00:00:09 v #134 > > │ let v105 : unit = (fun () -> v104 (); v103) () 00:00:09 v #135 > > │ let v107 : bool = v98 = false 00:00:09 v #136 > > │ if v107 then 00:00:09 v #137 > > │ failwith<unit> v100 00:00:09 v #138 > > │ method0() 00:00:09 v #139 > > │ 00:00:09 v #140 > > │ __assert_eq' / actual: [|"ISTJ"; "ISFJ"; "INFJ"; "INTJ"; 00:00:09 v #141 > > "ISTP"; "ISFP"; "INFP"; "INTP"; "ESTP"; "ESFP"; 00:00:09 v #142 > > │ "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|] 00:00:09 v #143 > > expected: [|"ISTJ"; "ISFJ"; "INFJ"; "INTJ"; "ISTP"; "ISFP"; "INFP"; "INTP"; 00:00:09 v #144 > > "ESTP"; "ESFP"; 00:00:09 v #145 > > │ "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|] 00:00:09 v #146 > > │ 00:00:09 v #147 > > 00:00:09 v #148 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:09 v #149 > > //// test 00:00:09 v #150 > > //// print_code 00:00:09 v #151 > > 00:00:09 v #152 > > inl i_e = 00:00:09 v #153 > > listm'.replicate 8i32 "I" ++ listm'.replicate 8i32 "E" 00:00:09 v #154 > > inl s_n = 00:00:09 v #155 > > [[ "S"; "S"; "N"; "N" ]] 00:00:09 v #156 > > |> listm'.replicate 4i32 00:00:09 v #157 > > |> listm'.collect id 00:00:09 v #158 > > inl t_f = 00:00:09 v #159 > > [[ "T"; "F"; "F"; "T" ]] 00:00:09 v #160 > > |> listm'.replicate 4i32 00:00:09 v #161 > > |> listm'.collect id 00:00:09 v #162 > > inl j_p = 00:00:09 v #163 > > [[ "J"; "J"; "J"; "J" ]] 00:00:09 v #164 > > ++ [[ "P"; "P"; "P"; "P" ]] 00:00:09 v #165 > > ++ [[ "P"; "P"; "P"; "P" ]] 00:00:09 v #166 > > ++ [[ "J"; "J"; "J"; "J" ]] 00:00:09 v #167 > > inl mbti = 00:00:09 v #168 > > listm'.map4 (fun a b c d => $'$"{!a}{!b}{!c}{!d}"') i_e s_n t_f j_p 00:00:09 v #169 > > 00:00:09 v #170 > > mbti 00:00:09 v #171 > > |> listm'.box 00:00:09 v #172 > > |> listm'.to_array' 00:00:09 v #173 > > |> _assert_eq' ;[[ 00:00:09 v #174 > > "ISTJ"; "ISFJ"; "INFJ"; "INTJ" 00:00:09 v #175 > > "ISTP"; "ISFP"; "INFP"; "INTP" 00:00:09 v #176 > > "ESTP"; "ESFP"; "ENFP"; "ENTP" 00:00:09 v #177 > > "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ" 00:00:09 v #178 > > ]] 00:00:09 v #179 > > 00:00:09 v #180 > > ── [ 289.49ms - stdout ] ─────────────────────────────────────────────────────── 00:00:09 v #181 > > │ let rec method1 (v0 : bool) : bool = 00:00:09 v #182 > > │ v0 00:00:09 v #183 > > │ and closure0 (v0 : string) () : unit = 00:00:09 v #184 > > │ let v1 : (string -> unit) = System.Console.WriteLine 00:00:09 v #185 > > │ v1 v0 00:00:09 v #186 > > │ and method0 () : unit = 00:00:09 v #187 > > │ let v0 : string = "I" 00:00:09 v #188 > > │ let v1 : string = "S" 00:00:09 v #189 > > │ let v2 : string = "T" 00:00:09 v #190 > > │ let v3 : string = "J" 00:00:09 v #191 > > │ let v4 : string = $"{v0}{v1}{v2}{v3}" 00:00:09 v #192 > > │ let v5 : string = "F" 00:00:09 v #193 > > │ let v6 : string = $"{v0}{v1}{v5}{v3}" 00:00:09 v #194 > > │ let v7 : string = "N" 00:00:09 v #195 > > │ let v8 : string = $"{v0}{v7}{v5}{v3}" 00:00:09 v #196 > > │ let v9 : string = $"{v0}{v7}{v2}{v3}" 00:00:09 v #197 > > │ let v10 : string = "P" 00:00:09 v #198 > > │ let v11 : string = $"{v0}{v1}{v2}{v10}" 00:00:09 v #199 > > │ let v12 : string = $"{v0}{v1}{v5}{v10}" 00:00:09 v #200 > > │ let v13 : string = $"{v0}{v7}{v5}{v10}" 00:00:09 v #201 > > │ let v14 : string = $"{v0}{v7}{v2}{v10}" 00:00:09 v #202 > > │ let v15 : string = "E" 00:00:09 v #203 > > │ let v16 : string = $"{v15}{v1}{v2}{v10}" 00:00:09 v #204 > > │ let v17 : string = $"{v15}{v1}{v5}{v10}" 00:00:09 v #205 > > │ let v18 : string = $"{v15}{v7}{v5}{v10}" 00:00:09 v #206 > > │ let v19 : string = $"{v15}{v7}{v2}{v10}" 00:00:09 v #207 > > │ let v20 : string = $"{v15}{v1}{v2}{v3}" 00:00:09 v #208 > > │ let v21 : string = $"{v15}{v1}{v5}{v3}" 00:00:09 v #209 > > │ let v22 : string = $"{v15}{v7}{v5}{v3}" 00:00:09 v #210 > > │ let v23 : string = $"{v15}{v7}{v2}{v3}" 00:00:09 v #211 > > │ let v24 : string list = [] 00:00:09 v #212 > > │ let v25 : string list = v23 :: v24 00:00:09 v #213 > > │ let v28 : string list = v22 :: v25 00:00:09 v #214 > > │ let v31 : string list = v21 :: v28 00:00:09 v #215 > > │ let v34 : string list = v20 :: v31 00:00:09 v #216 > > │ let v37 : string list = v19 :: v34 00:00:09 v #217 > > │ let v40 : string list = v18 :: v37 00:00:09 v #218 > > │ let v43 : string list = v17 :: v40 00:00:09 v #219 > > │ let v46 : string list = v16 :: v43 00:00:09 v #220 > > │ let v49 : string list = v14 :: v46 00:00:09 v #221 > > │ let v52 : string list = v13 :: v49 00:00:09 v #222 > > │ let v55 : string list = v12 :: v52 00:00:09 v #223 > > │ let v58 : string list = v11 :: v55 00:00:09 v #224 > > │ let v61 : string list = v9 :: v58 00:00:09 v #225 > > │ let v64 : string list = v8 :: v61 00:00:09 v #226 > > │ let v67 : string list = v6 :: v64 00:00:09 v #227 > > │ let v70 : string list = v4 :: v67 00:00:09 v #228 > > │ let v73 : (string list -> (string [])) = List.toArray 00:00:09 v #229 > > │ let v74 : (string []) = v73 v70 00:00:09 v #230 > > │ let v77 : string = "ISTJ" 00:00:09 v #231 > > │ let v78 : string = "ISFJ" 00:00:09 v #232 > > │ let v79 : string = "INFJ" 00:00:09 v #233 > > │ let v80 : string = "INTJ" 00:00:09 v #234 > > │ let v81 : string = "ISTP" 00:00:09 v #235 > > │ let v82 : string = "ISFP" 00:00:09 v #236 > > │ let v83 : string = "INFP" 00:00:09 v #237 > > │ let v84 : string = "INTP" 00:00:09 v #238 > > │ let v85 : string = "ESTP" 00:00:09 v #239 > > │ let v86 : string = "ESFP" 00:00:09 v #240 > > │ let v87 : string = "ENFP" 00:00:09 v #241 > > │ let v88 : string = "ENTP" 00:00:09 v #242 > > │ let v89 : string = "ESTJ" 00:00:09 v #243 > > │ let v90 : string = "ESFJ" 00:00:09 v #244 > > │ let v91 : string = "ENFJ" 00:00:09 v #245 > > │ let v92 : string = "ENTJ" 00:00:09 v #246 > > │ let v93 : (string []) = [|v77; v78; v79; v80; v81; v82; 00:00:09 v #247 > > v83; v84; v85; v86; v87; v88; v89; v90; v91; v92|] 00:00:09 v #248 > > │ let v94 : bool = v74 = v93 00:00:09 v #249 > > │ let v98 : bool = 00:00:09 v #250 > > │ if v94 then 00:00:09 v #251 > > │ true 00:00:09 v #252 > > │ else 00:00:09 v #253 > > │ method1(v94) 00:00:09 v #254 > > │ let v99 : string = "__assert_eq'" 00:00:09 v #255 > > │ let v100 : string = $"{v99} / actual: %A{v74} / expected: 00:00:09 v #256 > > %A{v93}" 00:00:09 v #257 > > │ let v103 : unit = () 00:00:09 v #258 > > │ let v104 : (unit -> unit) = closure0(v100) 00:00:09 v #259 > > │ let v105 : unit = (fun () -> v104 (); v103) () 00:00:09 v #260 > > │ let v107 : bool = v98 = false 00:00:09 v #261 > > │ if v107 then 00:00:09 v #262 > > │ failwith<unit> v100 00:00:09 v #263 > > │ method0() 00:00:09 v #264 > > │ 00:00:09 v #265 > > │ __assert_eq' / actual: [|"ISTJ"; "ISFJ"; "INFJ"; "INTJ"; 00:00:09 v #266 > > "ISTP"; "ISFP"; "INFP"; "INTP"; "ESTP"; "ESFP"; 00:00:09 v #267 > > │ "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|] 00:00:09 v #268 > > expected: [|"ISTJ"; "ISFJ"; "INFJ"; "INTJ"; "ISTP"; "ISFP"; "INFP"; "INTP"; 00:00:09 v #269 > > "ESTP"; "ESFP"; 00:00:09 v #270 > > │ "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|] 00:00:09 v #271 > > │ 00:00:09 v #272 > > 00:00:09 v #273 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:09 v #274 > > //// test 00:00:09 v #275 > > //// print_code 00:00:09 v #276 > > 00:00:09 v #277 > > fun i => 00:00:09 v #278 > > inl i_e = 00:00:09 v #279 > > if i < 8 00:00:09 v #280 > > then "I" 00:00:09 v #281 > > else "E" 00:00:09 v #282 > > inl s_n = 00:00:09 v #283 > > inl group = (i / 2) % 2 00:00:09 v #284 > > if group = 0 00:00:09 v #285 > > then "S" 00:00:09 v #286 > > else "N" 00:00:09 v #287 > > inl t_f = 00:00:09 v #288 > > match i % 4 with 00:00:09 v #289 > > | 0 => "T" 00:00:09 v #290 > > | 1 => "F" 00:00:09 v #291 > > | 2 => "F" 00:00:09 v #292 > > | _ => "T" 00:00:09 v #293 > > inl j_p = 00:00:09 v #294 > > if i < 4 00:00:09 v #295 > > then "J" 00:00:09 v #296 > > elif i < 12 00:00:09 v #297 > > then "P" 00:00:09 v #298 > > else "J" 00:00:09 v #299 > > $'$"{!i_e}{!s_n}{!t_f}{!j_p}"' 00:00:09 v #300 > > |> listm.init 16i32 00:00:09 v #301 > > |> listm'.box 00:00:09 v #302 > > |> listm'.to_array' 00:00:09 v #303 > > |> _assert_eq' ;[[ 00:00:09 v #304 > > "ISTJ"; "ISFJ"; "INFJ"; "INTJ" 00:00:09 v #305 > > "ISTP"; "ISFP"; "INFP"; "INTP" 00:00:09 v #306 > > "ESTP"; "ESFP"; "ENFP"; "ENTP" 00:00:09 v #307 > > "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ" 00:00:09 v #308 > > ]] 00:00:09 v #309 > > 00:00:09 v #310 > > ── [ 381.36ms - stdout ] ─────────────────────────────────────────────────────── 00:00:09 v #311 > > │ let rec method1 (v0 : bool) : bool = 00:00:09 v #312 > > │ v0 00:00:09 v #313 > > │ and closure0 (v0 : string) () : unit = 00:00:09 v #314 > > │ let v1 : (string -> unit) = System.Console.WriteLine 00:00:09 v #315 > > │ v1 v0 00:00:09 v #316 > > │ and method0 () : unit = 00:00:09 v #317 > > │ let v0 : string = "I" 00:00:09 v #318 > > │ let v1 : string = "S" 00:00:09 v #319 > > │ let v2 : string = "T" 00:00:09 v #320 > > │ let v3 : string = "J" 00:00:09 v #321 > > │ let v4 : string = $"{v0}{v1}{v2}{v3}" 00:00:09 v #322 > > │ let v5 : string = "F" 00:00:09 v #323 > > │ let v6 : string = $"{v0}{v1}{v5}{v3}" 00:00:09 v #324 > > │ let v7 : string = "N" 00:00:09 v #325 > > │ let v8 : string = $"{v0}{v7}{v5}{v3}" 00:00:09 v #326 > > │ let v9 : string = $"{v0}{v7}{v2}{v3}" 00:00:09 v #327 > > │ let v10 : string = "P" 00:00:09 v #328 > > │ let v11 : string = $"{v0}{v1}{v2}{v10}" 00:00:09 v #329 > > │ let v12 : string = $"{v0}{v1}{v5}{v10}" 00:00:09 v #330 > > │ let v13 : string = $"{v0}{v7}{v5}{v10}" 00:00:09 v #331 > > │ let v14 : string = $"{v0}{v7}{v2}{v10}" 00:00:09 v #332 > > │ let v15 : string = "E" 00:00:09 v #333 > > │ let v16 : string = $"{v15}{v1}{v2}{v10}" 00:00:09 v #334 > > │ let v17 : string = $"{v15}{v1}{v5}{v10}" 00:00:09 v #335 > > │ let v18 : string = $"{v15}{v7}{v5}{v10}" 00:00:09 v #336 > > │ let v19 : string = $"{v15}{v7}{v2}{v10}" 00:00:09 v #337 > > │ let v20 : string = $"{v15}{v1}{v2}{v3}" 00:00:09 v #338 > > │ let v21 : string = $"{v15}{v1}{v5}{v3}" 00:00:09 v #339 > > │ let v22 : string = $"{v15}{v7}{v5}{v3}" 00:00:09 v #340 > > │ let v23 : string = $"{v15}{v7}{v2}{v3}" 00:00:09 v #341 > > │ let v24 : string list = [] 00:00:09 v #342 > > │ let v25 : string list = v23 :: v24 00:00:09 v #343 > > │ let v28 : string list = v22 :: v25 00:00:09 v #344 > > │ let v31 : string list = v21 :: v28 00:00:09 v #345 > > │ let v34 : string list = v20 :: v31 00:00:09 v #346 > > │ let v37 : string list = v19 :: v34 00:00:09 v #347 > > │ let v40 : string list = v18 :: v37 00:00:09 v #348 > > │ let v43 : string list = v17 :: v40 00:00:09 v #349 > > │ let v46 : string list = v16 :: v43 00:00:09 v #350 > > │ let v49 : string list = v14 :: v46 00:00:09 v #351 > > │ let v52 : string list = v13 :: v49 00:00:09 v #352 > > │ let v55 : string list = v12 :: v52 00:00:09 v #353 > > │ let v58 : string list = v11 :: v55 00:00:09 v #354 > > │ let v61 : string list = v9 :: v58 00:00:09 v #355 > > │ let v64 : string list = v8 :: v61 00:00:09 v #356 > > │ let v67 : string list = v6 :: v64 00:00:09 v #357 > > │ let v70 : string list = v4 :: v67 00:00:09 v #358 > > │ let v73 : (string list -> (string [])) = List.toArray 00:00:09 v #359 > > │ let v74 : (string []) = v73 v70 00:00:09 v #360 > > │ let v77 : string = "ISTJ" 00:00:09 v #361 > > │ let v78 : string = "ISFJ" 00:00:09 v #362 > > │ let v79 : string = "INFJ" 00:00:09 v #363 > > │ let v80 : string = "INTJ" 00:00:09 v #364 > > │ let v81 : string = "ISTP" 00:00:09 v #365 > > │ let v82 : string = "ISFP" 00:00:09 v #366 > > │ let v83 : string = "INFP" 00:00:09 v #367 > > │ let v84 : string = "INTP" 00:00:09 v #368 > > │ let v85 : string = "ESTP" 00:00:09 v #369 > > │ let v86 : string = "ESFP" 00:00:09 v #370 > > │ let v87 : string = "ENFP" 00:00:09 v #371 > > │ let v88 : string = "ENTP" 00:00:09 v #372 > > │ let v89 : string = "ESTJ" 00:00:09 v #373 > > │ let v90 : string = "ESFJ" 00:00:09 v #374 > > │ let v91 : string = "ENFJ" 00:00:09 v #375 > > │ let v92 : string = "ENTJ" 00:00:09 v #376 > > │ let v93 : (string []) = [|v77; v78; v79; v80; v81; v82; 00:00:09 v #377 > > v83; v84; v85; v86; v87; v88; v89; v90; v91; v92|] 00:00:09 v #378 > > │ let v94 : bool = v74 = v93 00:00:09 v #379 > > │ let v98 : bool = 00:00:09 v #380 > > │ if v94 then 00:00:09 v #381 > > │ true 00:00:09 v #382 > > │ else 00:00:09 v #383 > > │ method1(v94) 00:00:09 v #384 > > │ let v99 : string = "__assert_eq'" 00:00:09 v #385 > > │ let v100 : string = $"{v99} / actual: %A{v74} / expected: 00:00:09 v #386 > > %A{v93}" 00:00:09 v #387 > > │ let v103 : unit = () 00:00:09 v #388 > > │ let v104 : (unit -> unit) = closure0(v100) 00:00:09 v #389 > > │ let v105 : unit = (fun () -> v104 (); v103) () 00:00:09 v #390 > > │ let v107 : bool = v98 = false 00:00:09 v #391 > > │ if v107 then 00:00:09 v #392 > > │ failwith<unit> v100 00:00:09 v #393 > > │ method0() 00:00:09 v #394 > > │ 00:00:09 v #395 > > │ __assert_eq' / actual: [|"ISTJ"; "ISFJ"; "INFJ"; "INTJ"; 00:00:09 v #396 > > "ISTP"; "ISFP"; "INFP"; "INTP"; "ESTP"; "ESFP"; 00:00:09 v #397 > > │ "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|] 00:00:09 v #398 > > expected: [|"ISTJ"; "ISFJ"; "INFJ"; "INTJ"; "ISTP"; "ISFP"; "INFP"; "INTP"; 00:00:09 v #399 > > "ESTP"; "ESFP"; 00:00:09 v #400 > > │ "ENFP"; "ENTP"; "ESTJ"; "ESFJ"; "ENFJ"; "ENTJ"|] 00:00:09 v #401 > > │ 00:00:10 v #402 > > 00:00:10 v #403 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:10 v #404 > > type PhonologicalFeature = 00:00:10 v #405 > > | VowelFeature of 00:00:10 v #406 > > height: Height 00:00:10 v #407 > > * backness: Backness 00:00:10 v #408 > > * roundedness: Roundedness 00:00:10 v #409 > > * tone: Option<Tone> 00:00:10 v #410 > > * stress: Option<Stress> 00:00:10 v #411 > > * length: Option<Length> 00:00:10 v #412 > > | ConsonantFeature of 00:00:10 v #413 > > place: PlaceOfArticulation 00:00:10 v #414 > > * manner: MannerOfArticulation 00:00:10 v #415 > > * voicing: Voicing 00:00:10 v #416 > > * length: Option<Length> 00:00:10 v #417 > > | VowelHarmonyFeature 00:00:10 v #418 > > | PitchAccentFeature 00:00:10 v #419 > > 00:00:10 v #420 > > and Stress = Primary | Secondary 00:00:10 v #421 > > and Length = Long | Short | HalfLong 00:00:10 v #422 > > 00:00:10 v #423 > > and Height = 00:00:10 v #424 > > | High | NearHigh | HighMid 00:00:10 v #425 > > | Mid | LowMid | NearLow 00:00:10 v #426 > > | Low 00:00:10 v #427 > > 00:00:10 v #428 > > and Backness = Front | Central | Back 00:00:10 v #429 > > 00:00:10 v #430 > > and Roundedness = Rounded | Unrounded 00:00:10 v #431 > > 00:00:10 v #432 > > and PlaceOfArticulation = 00:00:10 v #433 > > | Bilabial | Labiodental | Dental 00:00:10 v #434 > > | Alveolar | Postalveolar | Retroflex 00:00:10 v #435 > > | Palatal | Velar | Uvular 00:00:10 v #436 > > | Pharyngeal | Epiglottal | Glottal 00:00:10 v #437 > > 00:00:10 v #438 > > and MannerOfArticulation = 00:00:10 v #439 > > | Plosive | Nasal | Trill 00:00:10 v #440 > > | TapOrFlap | Fricative | LateralFricative 00:00:10 v #441 > > | Approximant | LateralApproximant 00:00:10 v #442 > > 00:00:10 v #443 > > and Voicing = Voiced | Voiceless 00:00:10 v #444 > > 00:00:10 v #445 > > and SecondaryArticulation = 00:00:10 v #446 > > | Labialization | Palatalization | Velarization 00:00:10 v #447 > > | Pharyngealization | Aspiration 00:00:10 v #448 > > 00:00:10 v #449 > > and Tone = 00:00:10 v #450 > > | LevelTone of int 00:00:10 v #451 > > | ContourTone of int list 00:00:10 v #452 > > 00:00:10 v #453 > > and MorphologicalFeature = 00:00:10 v #454 > > | RootFeature of string 00:00:10 v #455 > > | AffixFeature of AffixType * string 00:00:10 v #456 > > | IncorporationFeature of string * MorphologicalFeature 00:00:10 v #457 > > | NonConcatenativePattern of string * string 00:00:10 v #458 > > | AgglutinativeAffixFeature of AgglutinativeAffixType * string 00:00:10 v #459 > > | HonorificFeature of HonorificType * string 00:00:10 v #460 > > 00:00:10 v #461 > > and AgglutinativeAffixType = Suffix | Prefix 00:00:10 v #462 > > 00:00:10 v #463 > > and HonorificType = VerbHonorific | NounHonorific 00:00:10 v #464 > > 00:00:10 v #465 > > and AffixType = 00:00:10 v #466 > > | Prefix | Suffix | Infix 00:00:10 v #467 > > | Circumfix 00:00:10 v #468 > > 00:00:10 v #469 > > type SyntacticFeature = 00:00:10 v #470 > > | WordFeature of MorphologicalFeature list * LexicalCategory 00:00:10 v #471 > > | PhraseFeature of PhraseType * SyntacticFeature list 00:00:10 v #472 > > | GrammaticalRelation of GrammaticalRelationType * SyntacticFeature list 00:00:10 v #473 > > | SOVOrderFeature 00:00:10 v #474 > > | TopicCommentFeature 00:00:10 v #475 > > 00:00:10 v #476 > > and GrammaticalRelationType = 00:00:10 v #477 > > | Ergative | Absolutive | Nominative 00:00:10 v #478 > > | Accusative 00:00:10 v #479 > > 00:00:10 v #480 > > and LexicalCategory = 00:00:10 v #481 > > | Noun | Verb | Adjective 00:00:10 v #482 > > | Adverb | Pronoun | Preposition 00:00:10 v #483 > > | Conjunction | Determiner | Interjection 00:00:10 v #484 > > 00:00:10 v #485 > > and PhraseType = 00:00:10 v #486 > > | NP | VP | AP 00:00:10 v #487 > > | PP | CP 00:00:10 v #488 > > 00:00:10 v #489 > > and SemanticFeature = 00:00:10 v #490 > > | Meaning of string 00:00:10 v #491 > > | SemanticRole of SemanticRoleType * SemanticFeature 00:00:10 v #492 > > 00:00:10 v #493 > > and SemanticRoleType = 00:00:10 v #494 > > | Agent | Patient | Instrument 00:00:10 v #495 > > | Location | Time | Cause 00:00:10 v #496 > > 00:00:10 v #497 > > and PragmaticFeature = 00:00:10 v #498 > > | UseContext of string 00:00:10 v #499 > > | PolitenessLevel of Politeness 00:00:10 v #500 > > | SpeechAct of SpeechActType 00:00:10 v #501 > > | SpeechLevel of SpeechLevelType 00:00:10 v #502 > > 00:00:10 v #503 > > and Politeness = Formal | Informal | Neutral 00:00:10 v #504 > > 00:00:10 v #505 > > and SpeechActType = 00:00:10 v #506 > > | Assertive | Directive | Commissive 00:00:10 v #507 > > | Expressive | Declarative 00:00:10 v #508 > > 00:00:10 v #509 > > and SpeechLevelType = 00:00:10 v #510 > > | FormalHigh | FormalLow | InformalHigh 00:00:10 v #511 > > | InformalLow | Neutral 00:00:10 v #512 > > 00:00:10 v #513 > > type LinguisticFeature = 00:00:10 v #514 > > | Phonological of PhonologicalFeature 00:00:10 v #515 > > | Morphological of MorphologicalFeature 00:00:10 v #516 > > | Syntactic of SyntacticFeature 00:00:10 v #517 > > | Semantic of SemanticFeature 00:00:10 v #518 > > | Pragmatic of PragmaticFeature 00:00:10 v #519 > > 00:00:10 v #520 > > type LanguageConstruct = 00:00:10 v #521 > > | LanguageElement of LinguisticFeature 00:00:10 v #522 > > | LanguageStructure of LanguageConstruct list 00:00:10 v #523 > > | TranslationElement of TranslationFeature 00:00:10 v #524 > > 00:00:10 v #525 > > and TranslationFeature = 00:00:10 v #526 > > | LinkedPhonological of PhonologicalFeature * PhonologicalFeature 00:00:10 v #527 > > | LinkedMorphological of MorphologicalFeature * MorphologicalFeature 00:00:10 v #528 > > | LinkedSyntactic of SyntacticFeature * SyntacticFeature 00:00:10 v #529 > > | LinkedSemantic of SemanticFeature * SemanticFeature 00:00:10 v #530 > > 00:00:10 v #531 > > type Discourse = DiscourseUnit of LanguageConstruct list 00:00:10 v #532 > > 00:00:10 v #533 > > type LanguageModel = 00:00:10 v #534 > > | Model of discourse: Discourse 00:00:11 v #535 > > 00:00:11 v #536 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:11 v #537 > > let testEnglish = 00:00:11 v #538 > > Model( 00:00:11 v #539 > > DiscourseUnit [[ 00:00:11 v #540 > > LanguageElement (Phonological (ConsonantFeature (Alveolar, Nasal, 00:00:11 v #541 > > Voiced, Some(HalfLong)))); 00:00:11 v #542 > > LanguageElement (Phonological (VowelFeature (High, Front, Unrounded, 00:00:11 v #543 > > Some(LevelTone 1), Some(Primary), Some(Short)))); 00:00:11 v #544 > > LanguageElement (Phonological (VowelFeature (Low, Front, Unrounded, 00:00:11 v #545 > > Some(LevelTone 2), Some(Secondary), Some(Long)))); 00:00:11 v #546 > > LanguageElement (Phonological (ConsonantFeature (Velar, Plosive, 00:00:11 v #547 > > Voiceless, Some(HalfLong)))); 00:00:11 v #548 > > LanguageElement (Morphological (RootFeature "I")); 00:00:11 v #549 > > LanguageElement (Morphological (RootFeature "see")); 00:00:11 v #550 > > LanguageElement (Morphological (RootFeature "a")); 00:00:11 v #551 > > LanguageElement (Morphological (RootFeature "cat")); 00:00:11 v #552 > > LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 00:00:11 v #553 > > ([[RootFeature "I"]], Pronoun)]]))); 00:00:11 v #554 > > LanguageElement (Syntactic (PhraseFeature (VP, [[WordFeature 00:00:11 v #555 > > ([[RootFeature "see"]], Verb)]]))); 00:00:11 v #556 > > LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 00:00:11 v #557 > > ([[RootFeature "a"; RootFeature "cat"]], Noun)]]))); 00:00:11 v #558 > > LanguageElement (Semantic (Meaning "Perception act of a feline by 00:00:11 v #559 > > the speaker")); 00:00:11 v #560 > > LanguageElement (Pragmatic (UseContext "Statement of an action being 00:00:11 v #561 > > observed")) 00:00:11 v #562 > > ]] 00:00:11 v #563 > > ) 00:00:11 v #564 > > 00:00:11 v #565 > > let testPortuguese = 00:00:11 v #566 > > Model( 00:00:11 v #567 > > DiscourseUnit [[ 00:00:11 v #568 > > LanguageElement (Phonological (VowelFeature (High, Front, Unrounded, 00:00:11 v #569 > > Some(LevelTone 1), Some(Primary), Some(Short)))); 00:00:11 v #570 > > LanguageElement (Phonological (VowelFeature (Low, Front, Unrounded, 00:00:11 v #571 > > Some(LevelTone 2), Some(Secondary), Some(Long)))); 00:00:11 v #572 > > LanguageElement (Phonological (VowelFeature (Mid, Back, Rounded, 00:00:11 v #573 > > Some(LevelTone 3), Some(Primary), Some(Short)))); 00:00:11 v #574 > > LanguageElement (Phonological (ConsonantFeature (Velar, Plosive, 00:00:11 v #575 > > Voiceless, Some(HalfLong)))); 00:00:11 v #576 > > LanguageElement (Morphological (RootFeature "Eu")); 00:00:11 v #577 > > LanguageElement (Morphological (RootFeature "ver" |> ignore; 00:00:11 v #578 > > AffixFeature (Suffix, "o"))); 00:00:11 v #579 > > LanguageElement (Morphological (RootFeature "um")); 00:00:11 v #580 > > LanguageElement (Morphological (RootFeature "gato")); 00:00:11 v #581 > > LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 00:00:11 v #582 > > ([[RootFeature "Eu"]], Pronoun)]]))); 00:00:11 v #583 > > LanguageElement (Syntactic (PhraseFeature (VP, [[WordFeature 00:00:11 v #584 > > ([[RootFeature "vejo"]], Verb)]]))); 00:00:11 v #585 > > LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 00:00:11 v #586 > > ([[RootFeature "um"; RootFeature "gato"]], Noun)]]))); 00:00:11 v #587 > > LanguageElement (Semantic (Meaning "Ação de percepção de um felino 00:00:11 v #588 > > pelo falante")); 00:00:11 v #589 > > LanguageElement (Pragmatic (UseContext "Declaração de uma ação sendo 00:00:11 v #590 > > observada")) 00:00:11 v #591 > > ]] 00:00:11 v #592 > > ) 00:00:11 v #593 > > 00:00:11 v #594 > > let testKorean = 00:00:11 v #595 > > Model( 00:00:11 v #596 > > DiscourseUnit [[ 00:00:11 v #597 > > LanguageElement (Phonological (ConsonantFeature (Alveolar, Nasal, 00:00:11 v #598 > > Voiced, Some(Short)))); 00:00:11 v #599 > > LanguageElement (Phonological (VowelFeature (High, Back, Rounded, 00:00:11 v #600 > > None, None, Some(Short)))); 00:00:11 v #601 > > LanguageElement (Phonological (VowelFeature (Mid, Front, Unrounded, 00:00:11 v #602 > > None, None, Some(Long)))); 00:00:11 v #603 > > LanguageElement (Phonological (ConsonantFeature (Bilabial, Plosive, 00:00:11 v #604 > > Voiceless, Some(Short)))); 00:00:11 v #605 > > LanguageElement (Morphological (RootFeature "나")); 00:00:11 v #606 > > LanguageElement (Morphological (RootFeature "보다")); 00:00:11 v #607 > > LanguageElement (Morphological (AffixFeature (Suffix, "아"))); 00:00:11 v #608 > > LanguageElement (Morphological (RootFeature "고양이")); 00:00:11 v #609 > > LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 00:00:11 v #610 > > ([[RootFeature "나"]], Pronoun)]]))); 00:00:11 v #611 > > LanguageElement (Syntactic (PhraseFeature (VP, [[WordFeature 00:00:11 v #612 > > ([[RootFeature "보다"; AffixFeature (Suffix, "아")]], Verb)]]))); 00:00:11 v #613 > > LanguageElement (Syntactic (PhraseFeature (NP, [[WordFeature 00:00:11 v #614 > > ([[RootFeature "고양이"]], Noun)]]))); 00:00:11 v #615 > > LanguageElement (Semantic (Meaning "화자에 의한 고양이의 관찰 00:00:11 v #616 > > 행위")); 00:00:11 v #617 > > LanguageElement (Pragmatic (UseContext "관찰되고 있는 행동의 진술")) 00:00:11 v #618 > > ]] 00:00:11 v #619 > > ) 00:00:11 v #620 > > 00:00:11 v #621 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:11 v #622 > > │ ## main 00:00:11 v #623 > > 00:00:11 v #624 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:11 v #625 > > inl main (_args : array_base string) = 00:00:11 v #626 > > 0i32 00:00:11 v #627 > > 00:00:11 v #628 > > inl main () = 00:00:11 v #629 > > $'let main args = !main args' : () 00:00:11 v #630 > > 00:00:11 v #631 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:11 v #632 > > inl app () = 00:00:11 v #633 > > "test" |> console.write_line 00:00:11 v #634 > > 0i32 00:00:11 v #635 > > 00:00:11 v #636 > > inl main () = 00:00:11 v #637 > > print_static "<test>" 00:00:11 v #638 > > 00:00:11 v #639 > > app 00:00:11 v #640 > > |> dyn 00:00:11 v #641 > > |> ignore 00:00:11 v #642 > > 00:00:11 v #643 > > print_static "</test>" 00:00:12 v #644 > 00:00:11 v #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 27199 } 00:00:12 v #645 > 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 } } 00:00:12 v #646 > 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 #647 > 00:00:12 v #6 ! /opt/hostedtoolcache/Python/3.12.8/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 #648 > 00:00:12 v #7 ! validate(nb) 00:00:13 v #649 > 00:00:12 v #8 ! /opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/nbconvert/filters/highlight.py:71: UserWarning: IPython3 lexer unavailable, falling back on Python 3 00:00:13 v #650 > 00:00:12 v #9 ! return _pygments_highlight( 00:00:13 v #651 > 00:00:12 v #10 ! [NbConvertApp] Writing 332732 bytes to /home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.dib.html 00:00:13 v #652 > 00:00:12 v #11 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 914 } 00:00:13 v #653 > 00:00:12 d #12 spiral.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 914 } 00:00:13 v #654 > 00:00:12 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 #655 > 00:00:13 v #14 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:00:13 v #656 > 00:00:13 d #15 spiral.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:00:13 v #657 > 00:00:13 d #16 spiral.run / dib / { exit_code = 0; result_length = 28172 } 00:00:13 d #658 runtime.execute_with_options_async / { exit_code = 0; output_length = 32177 } 00:00:13 d #1 main / executeCommand / exitCode: 0 / command: ../../../../deps/spiral/workspace/target/release/spiral dib --path test.dib --retries 3
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
00:00:00 v #1 networking.test_port_open / { port = 13806; ex = System.AggregateException: One or more errors occurred. (Connection refused) } 00:00:00 v #2 networking.test_port_open / { port = 13806; ex = System.AggregateException: One or more errors occurred. (Connection refused) } 00:00:00 d #1 Supervisor.buildFile / takeWhileInclusive / path: test.spi / errors: [] / typeErrorCount: 0 / retry: 0 / outputContent: 00:00:00 d #2 Supervisor.buildFile / AsyncSeq.scan / path: test.spi / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / outputContent: 00:00:00 d #3 Supervisor.buildFile / takeWhileInclusive / path: test.spi / errors: [] / typeErrorCount: 0 / retry: 0 / outputContent: 00:00:00 v #4 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # test (Polyglot)\n\n/// ## main\ninl main (_args : array_base string) =...t\u003E\u0022\n","uri":"file:///home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.spi"}} / result: 00:00:00 v #5 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///home/runner/work/polyglot/polyglot/apps/spiral/temp/test/test.spi"}} / result: 00:00:00 d #6 Supervisor.buildFile / AsyncSeq.scan / path: test.spi / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / outputContent: let rec closure1 () () : unit = let v0 : (string -> unit) = System.Console.WriteLine let v1 : string = "test" v0 v1 and closure0 () () : int32 = let v0 : unit = () let v1 : (unit -> unit) = closure1() let v2 : unit = (fun () -> v1 (); v0) () 0 let v0 : (unit -> int32) = closure0() () 00:00:00 d #7 Supervisor.buildFile / takeWhileInclusive / path: test.spi / errors: [] / typeErrorCount: 0 / retry: 0 / outputContent: let rec closure1 () () : unit = let v0 : (string -> unit) = System.Console.WriteLine let v1 : string = "test" v0 v1 and closure0 () () : int32 = let v0 : unit = () let v1 : (unit -> unit) = closure1() let v2 : unit = (fun () -> v1 (); v0) () 0 let v0 : (unit -> int32) = closure0() () 00:00:00 d #8 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
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! @jwosty Stand with Ukraine! https://standwithukraine.com.ua/ Parsing test.fsproj... Project and references (1 source files) parsed in 2387ms Started Fable compilation... Fable compilation finished in 1127ms ./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
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 bit-vec v0.6.3 Compiling quick-error v1.2.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 rusty-fork v0.3.0 Compiling zerocopy v0.7.35 Compiling thiserror-impl v1.0.69 Compiling ppv-lite86 v0.2.20 Compiling rand_chacha v0.3.1 Compiling thiserror v1.0.69 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 11.11s
run release tests with output enabled¶
In [ ]:
{ cargo test --release -- --show-output } | Invoke-Block
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 quick-error v1.2.3 Compiling rustix v0.38.42 Compiling bit-vec v0.6.3 Compiling fnv v1.0.7 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 lazy_static v1.5.0 Compiling minimal-lexical v0.2.1 Compiling rand_chacha v0.3.1 Compiling rand v0.8.5 Compiling unarray v0.1.4 Compiling memchr v2.7.4 Compiling fable_library_rust v0.1.0 (/home/runner/work/polyglot/polyglot/lib/rust/fable/fable_modules/fable-library-rust) Compiling thiserror v1.0.69 Compiling nom v7.1.3 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.49s Running unittests main.rs (/home/runner/work/polyglot/polyglot/workspace/target/release/deps/spiral_temp_test-87f487a4cc8a01e4) 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=Comment("$^G\\{") input=StringLiteral("<::vSK?O}&@S~0F:](M5*%wN:tA") input=Operator("-") input=Identifier("ldpERjC30") input=Integer(1947299992506408981) input=Integer(-8032676483445232239) input=Comment("Q*UO{*'{?I:EX:n<gAsB`>*{O!") input=Identifier("fl7II9") input=Identifier("Hj0z7XrQ9yImcGlsZkkENbDT3iCF") input=Integer(-8035904755705811608) input=Operator("/") input=Integer(-2434766463086851749) input=Integer(-316147892470765129) input=Integer(4595713205383900708) input=Comment("^F#-W\\U?U`]@mk*4!*{pN") input=Identifier("mqNrIWvjpz42bsKF1w9jz82nh") input=StringLiteral("=/&*r*?AQi<%(l:Q$I.") input=StringLiteral("T$j6/_.") input=Comment("@+<%DGl") input=Operator(")") input=StringLiteral("62s$K+:g") input=StringLiteral("FbM@<4:6:A*Tgh~UP") input=Operator("/") input=StringLiteral("'$h^^J<<65[o") input=Comment("wm/M{|/&jD>Mtp&m]N?2Qvv:c]9/TrL") input=Comment("LS?,mb@.?^'") input=Identifier("M1BcCJP") input=Comment("=_:^ly\\?&[Q%/F]./n;@e::[H!BW?=&[") input=StringLiteral("I]>k'C_@F") input=StringLiteral("g?uNwAY05%<%=u?/") input=Comment("X%O}5%#$n<:^zn$an+p/aC&z^i?349,8") input=Operator("/") input=StringLiteral("@${i'/oF") input=Comment("&@\"K<x5c%]%E,`{T-c<?D\"=3/A") input=Integer(6482510285938993544) input=Identifier("G1o2Rs1FV3U6GrUJVs3") input=Comment("._$IM<$57uK734;5=u*'$3cU") input=Identifier("x21kb") input=Operator("=") input=StringLiteral("/F&el>jcNv%R.{t?I)f.&`Ej") input=Comment("v2.`s^j*//N``;\"") input=Operator("*") input=Operator("/") input=Operator("(") input=StringLiteral("B{oxo3+?4M+5%BNd=*e0t*") input=Integer(-7526891632462053287) input=StringLiteral("Sc?$4@eB[<U*{'XVfB") input=StringLiteral("G{VS.]*%W'fK?lHXum") input=Integer(-7128524883158555653) input=Comment(".{66[@U%Y6gL&.<Q&cIS{:") input=Identifier("I8") input=Identifier("Rrs0if7bt8") input=Operator("/") input=StringLiteral("|$I)") input=Comment("`*3;Jng#\\1.%C\\,c\\|\"']'WB") input=Integer(599646373263720733) input=Integer(-3205225023442762064) input=StringLiteral("?LA^~Q!*g&wRzq<.p(C;(>Y:") input=Operator("-") input=Identifier("Pv5b7Bb5ruTM6yhTPF6o7tIW0Y5G") input=Operator("/") input=Operator("/") input=Comment("$<&34/K?{Q`4L.O?k\\[*. =i") input=StringLiteral("4ND'l/I`Id.1%E:3).Y7*UhP4r/:") input=Comment("c &z.G:%emW&hyl5cgE@@") input=Integer(-5413164739117561733) input=Integer(7021445175565434744) input=Operator("-") input=Integer(-8153917311095233719) input=Operator("/") input=Identifier("XxA2hZI6U2P") input=Identifier("yk03e8IS6BKNOan9nk9bQsU6") input=Comment("f?='fy`'$*/.l`{CO?O<`") input=StringLiteral("{W") input=Operator("(") input=Operator("/") input=StringLiteral("vR-m&&<Qmr/n97_<Vi`9M") input=Identifier("Ua3QqMXrkK") input=Operator("-") input=Integer(2554116399884818122) input=StringLiteral("J/(w|&td2%pO+Tjq.(*BR*/>") input=Integer(1105718407796571662) input=Comment("x$s=1m*AW%l0?'") input=Integer(-7576605980448135475) input=Integer(4562554380173887892) input=StringLiteral("%mG") input=Operator("-") input=Comment("+rM'q\\hhunh0:a>RmGJ&0K`#'H=") input=Integer(-7039810283534093229) input=Operator(")") input=Comment("Bvy7#P\"?L'") input=Identifier("Z53koK9LG1uAwq94zf32BJgbi") input=Identifier("BJvX3AN0VtIqxSAQLC") input=Comment("# `0$5oXx)f%%UI$\\`DB9tre%#P=\\CH") input=StringLiteral("E46/<@3L/<=:G'") input=StringLiteral("=I':o{+Ri_`y.?") input=Operator("/") input=Integer(-3045090155257288269) input=Operator("*") input=Identifier("WN6Uy3yo4DR") input=Operator("*") input=Integer(5806888632637096118) input=Comment(".x*#B=NO7E") input=Integer(3272137317195537015) input=Integer(3707094223518345740) input=Operator("(") input=Operator("+") input=StringLiteral("/~WS*X_Wcq=hgq'd)#6^~I.66@") input=Identifier("aSj0nD1TT96") input=Integer(3928284579871151787) input=Operator("(") input=StringLiteral("G/(") input=Comment("0+CQ?\\\"Z\\P;;.y\\$X#Qq$=") input=Operator(")") input=Operator("/") input=Comment("w=") input=StringLiteral("31kg:akH5UGfjQC$E`//p") input=Identifier("xzNOjdZli76fuRM0JhpSCCIuU1VNy50qc") input=StringLiteral("=b<==") input=Operator("/") input=Identifier("YDt1gcTwlRpT") input=Operator("(") input=Identifier("tZA1sjR1GS2X1JZtuj864S") input=Identifier("P5ZjAZXenbJri9hK80l1ZJc9") input=StringLiteral("=") input=Identifier("dyb6fSBt6zlkkF6Tb4JjRbFi47lwRd") input=Operator("=") input=Integer(6446571970790728129) input=Identifier("WOYAa0x2rAyG7g8efv822KC7zpE698b") input=Comment("iRX%u") input=Integer(-3036624985295285086) input=Identifier("dFD7v3KcebXrY37z") input=Identifier("pc3Zq2W") input=Identifier("JBBHSm09Por8hYh3O") input=StringLiteral("EtK$.F>CI7u/E{zJtDAF'i@L``2?") input=Comment(" '\"T+>?|/:u*exl$$U*2/!Z{|p3:**") input=Integer(-7711120098066052661) input=Integer(1491466662836610938) input=StringLiteral("") input=Comment("=,3Y8yZfzM5`qB?'") input=Comment("M$.d: !/nlD") input=Identifier("E") input=Integer(-336605803073136200) input=Operator("/") input=Identifier("X36bJJNc3uPkp9xSrQBkUkzgC9cRwO07") input=Integer(3298988441036513400) input=StringLiteral("<C|$4f`=Ci%A{|CT$B>L`.:h") input=Operator("-") input=Operator("/") input=Comment("1{\\/<K\"Km>g%") input=Comment(":&nU~m/'K\"eh:YV:1X\"N,0p7/N$9$F|") input=Integer(422259185976601730) input=StringLiteral("_f~1z`2{K") input=Integer(3742109620342707616) input=Identifier("Z1x") input=Integer(6915319677569502773) input=StringLiteral(":'") input=Identifier("B5T9jKHI2158y") input=Identifier("pp82vmy0K8sHFAEmbypLvrXjs") input=StringLiteral("( t>k&") input=Integer(-6792640296577403429) input=Integer(4627910971870065218) input=StringLiteral("") input=StringLiteral("6$") input=Integer(-3335262579163585675) input=Identifier("rs6a72UX4VpWE6HL7h5") input=Integer(3521486607704496855) input=Operator("(") input=Integer(-34857843521567354) input=StringLiteral("&^-F&{") input=Comment("UI,O") input=Operator("=") input=Integer(-3013234105284896171) input=Integer(8243650245512455584) input=StringLiteral("X<O?q2$}U#L|Orn*;c*`Ff<I!") input=Integer(-4959284679532896562) input=Comment(",/IK&T") input=Integer(-4079795653558230785) input=Operator("-") input=Comment(".dO8h$*Ejwb{") input=StringLiteral("WG={X>") input=Integer(-9131456484976559269) input=Operator("*") input=Identifier("n9r82UuntDaG899") input=Operator("=") input=Integer(-1878336160954153665) input=Operator(")") input=StringLiteral(".") input=Integer(-740868658535390243) input=StringLiteral("SWa7*S;an$U$'N%") input=Comment("ETh*]^\\\"8U\\;A:qpP@V/6<{P@") input=Operator("(") input=StringLiteral("m|5") input=Comment("6L.@qjbpiTLA+k'?o'i5\"&(M*q") input=StringLiteral("%W@?`/lV:*'.3.dOzz>.e:o Cm,w") input=Identifier("zqXKGU") input=StringLiteral("1F&{{:q$t7ME@88[.D==") input=Integer(-3575310021264874914) input=Comment(")?dN j0t=b{") input=Integer(-5753448516841766291) input=Comment("") input=Integer(5617129197448738810) input=Identifier("ai2NNPd3ziWDwm6Wd2dUqUdhS5C72l1") input=Identifier("gfF6x7Bw06bOYhT90K") input=Integer(5541733897664154872) input=Comment("@.u-Z+%>") input=Identifier("pX09nDIGzP1") input=StringLiteral("PpA*Rb%(A=I/#2") input=StringLiteral("U.2,<;%$`5/B0f%+p #e~{w$") input=Operator("+") input=Identifier("D2d994c") input=Comment("SulUY$6dt?|n6:]%`x*:/W%+x>Xo7GO}") input=StringLiteral("*)Cd|J[`%.5%_E+S?&r&{?W-:") input=Comment("wEPf##") input=StringLiteral("?=*kb [F=Ms0d:") input=Operator("=") input=StringLiteral("v7C@)%wD$cwgkkzO5RdL-9/5t&/=/_") input=Operator("*") input=Operator(")") input=Integer(-2780370319892525042) input=Comment("H|5i/y,d[\\?*<?=X/'eAfk+nr3Ac3p}/") input=StringLiteral("7A*rE#") input=Identifier("j56RTWI2Yn5igLo65X75YxoyoyX9") input=Integer(4618053259640058758) input=Identifier("B35XE") input=Integer(-8916102798870864609) input=Integer(-2462898160966955440) input=Identifier("Uw3y15xt9W3y176gp0") input=StringLiteral(".2jb&&k'O</s&Nv`G40R={Y1") input=Operator("+") input=Comment("M2{,9''?.&.$6`B") input=Comment("%_3E/zD?ef'") input=Integer(7560575764046092295) input=Comment("eB}&\"=5(=Z$de'{Ls;\"&\\MI%9") input=Operator("/") input=Integer(4970320218451260447) input=Identifier("FNphj3JgdDb77Qmp6K7nyJJadH6l4wJ") input=Operator("-") input=StringLiteral("+s}?8]),.M%F/&t%io{ZG[go<") input=Integer(6191030106670768099) input=Integer(3108566842924814220) input=Comment(".H$") input=Identifier("tLRg6sS") input=StringLiteral("T{r<V:$:(T.wLH<b") input=Integer(9005641579682232657) input=Identifier("Rw987EC5") input=Identifier("a1Hz") input=Integer(8765913080012862092) input=Integer(5340260473067891002) input=Operator("*") input=StringLiteral("NO$=?=<Q&'M_3=1") input=Identifier("QagI") input=Integer(-7826491724294850586) input=Operator("*") input=StringLiteral("%{y&<G$B=h-4&3`") input=StringLiteral("@%:;{H^'OAj{") 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.08s
execute the binary in release mode¶
In [ ]:
{ . $ScriptDir/../../../../workspace/target/release/spiral_temp_test$(_exe) } | Invoke-Block
app=test