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 > > ── [ 930.51ms - 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 > > ── [ 440.34ms - 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 > > ── [ 293.16ms - 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:11 v #644 > 00:00:11 v #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 27199 } 00:00:11 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! @jgrund Stand with Ukraine! https://standwithukraine.com.ua/ Parsing test.fsproj... Project and references (1 source files) parsed in 2353ms Started Fable compilation... Fable compilation finished in 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 rustix v0.38.42 Compiling libm v0.2.11 Compiling wait-timeout v0.2.0 Compiling quick-error v1.2.3 Compiling bit-vec v0.6.3 Compiling bit-set v0.5.3 Compiling rand_xorshift v0.3.0 Compiling unarray v0.1.4 Compiling memchr v2.7.4 Compiling nom v7.1.3 Compiling fable_library_rust v0.1.0 (/home/runner/work/polyglot/polyglot/lib/rust/fable/fable_modules/fable-library-rust) Compiling zerocopy-derive v0.7.35 Compiling tempfile v3.14.0 Compiling zerocopy v0.7.35 Compiling rusty-fork v0.3.0 Compiling thiserror-impl v1.0.69 Compiling ppv-lite86 v0.2.20 Compiling rand_chacha v0.3.1 Compiling rand v0.8.5 Compiling thiserror v1.0.69 Compiling proptest v1.5.0 Compiling spiral_temp_test v0.0.1 (/home/runner/work/polyglot/polyglot/apps/spiral/temp/test) Finished `release` profile [optimized] target(s) in 10.88s
run release tests with output enabled¶
In [ ]:
{ cargo test --release -- --show-output } | Invoke-Block
Compiling bitflags v2.6.0 Compiling zerocopy v0.7.35 Compiling linux-raw-sys v0.4.14 Compiling once_cell v1.20.2 Compiling fastrand v2.3.0 Compiling wait-timeout v0.2.0 Compiling quick-error v1.2.3 Compiling rustix v0.38.42 Compiling fnv v1.0.7 Compiling bit-vec v0.6.3 Compiling num-traits v0.2.19 Compiling bit-set v0.5.3 Compiling ppv-lite86 v0.2.20 Compiling rand_xorshift v0.3.0 Compiling memchr v2.7.4 Compiling rand_chacha v0.3.1 Compiling rand v0.8.5 Compiling minimal-lexical v0.2.1 Compiling lazy_static v1.5.0 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 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-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=StringLiteral("$#]S&=>{=") input=Integer(7504526683709968231) input=Integer(-2357243895798222529) input=StringLiteral("6bb@+") input=Comment("2_T $oz$%_\"Un:|^ p(H?'_Ns?N\"%W?") input=StringLiteral("$ee9K}lNl8/?&'8lz9*Pc);Kk") input=Identifier("p9KY6No35yPS0aVbA08Dy3X0j23V") input=Comment("u``'*56Y:/0<U@%R6Tt}=r:") input=Integer(-3456822743893759828) input=Identifier("RctQU") input=Operator("/") input=Operator(")") input=Integer(7523598668495565549) input=Comment(">cU=!FR{?ql\\E.q_") input=Integer(8794197653911658758) input=Comment(":zTY<f&rg1**6/^<e2<\"%3") input=Operator(")") input=Identifier("f2839lYO0yT4VgwSxh2f9BFS06gT") input=StringLiteral("6#.{'']Y8d,=o~^*F&=L$") input=Identifier("iBqpg8qtfQzl2") input=Comment("<mU") input=Identifier("GwLCG3I8V8g1Gue3oUIOe") input=Identifier("OKzy1a9ll8o7UNwoHjmj") input=Comment(".8<U$W,&A<`") input=StringLiteral("=>=?^Y]Wae[/|T@Zt.") input=Comment("2TQO\"&y}t?CUs'@{'") input=StringLiteral("/e#]<S:") input=Comment("=4=K") input=Operator("/") input=Integer(6347685694174505875) input=Operator("*") input=Integer(-7704820632040158632) input=Identifier("WYa") input=Operator("+") input=Identifier("vEDbdG42ZB0mGlUgSCBCLX") input=Comment("QX$u^eZ&j=x+S%{EXd.p6$DgyJ") input=Integer(-7932520969832915387) input=Comment("GIN\"Enuo_dx`W:7@c&/x") input=StringLiteral("-&i0j@h?L*wA+gBk:E8f+*") input=Operator("=") input=Identifier("z") input=Operator("*") input=Comment("4?tt^?zSpNK4mU;{") input=Comment("Q$,~$o%") input=StringLiteral("ag4&*(<P@iz{7NB") input=Operator("(") input=Integer(-7662655315115777647) input=Integer(8083828430336549114) input=Identifier("DG9I5jof3mUDPHkzba") input=Identifier("TWv6aTH1mkNaL9713t8X2mom3p") input=Comment("L'V/Usd}HA\\tlEo<`k_") input=Operator("+") input=StringLiteral("!x/4|*kU") input=Operator("/") input=Comment("y") input=Integer(1881153759417450739) input=Integer(7031734250364973413) input=Operator("+") input=Identifier("Q990AEHUHI8O38dTX9OSo20PgD2c5J3") input=Identifier("c64UdNuCmibPK4OinMEQ4QsK") input=Operator("+") input=Integer(6937364793604576710) input=Operator("*") input=Integer(2996081334108289868) input=Comment("V=!0/0Uf%_l'z") input=Identifier("l4kBDVUNx15ts23okX5RWzV637") input=Integer(7479768320768498088) input=Comment("R*Dv:@6\"Z4ZX!'<[}\"S<a/w") input=Identifier("Ymg") input=Operator("/") input=Integer(-7009135762195314686) input=Operator("-") input=Integer(2744462713123964317) input=StringLiteral("~XS!.@y.z'z:R?") input=Operator("+") input=Comment("J=e:tx.\\Y<?uwk\\X{) <-k6v^1(fL-") input=Comment("U-") input=Operator(")") input=Integer(8479257926997759202) input=Comment("4}\"") input=Comment("'lL?\\%=3<v:_J&8'zG<I|1]") input=Comment("a}={/T#py:/`{GV1O%") input=Comment("jGYskm`O") input=StringLiteral(".%C^'&(k33cD*:M*Rp") input=Identifier("Mg") input=Identifier("J5BLLp4GTfoGF3LqWqcVl") input=Identifier("CqxS00wn0") input=Comment("$q\\R?ZJ'p2( 1v_m\"\"/'ft2.2") input=Operator(")") input=Integer(3253539622732739889) input=Operator(")") input=Comment("I@:\"%@ogX&%N?`@#`!'h`[=-\"L.JG'") input=Integer(2722264489423118106) input=Comment("V3{}:?J%iGc|{\"6?AA,&u:&") input=StringLiteral("D)xk*`w.0=)8%p#O") input=Comment("'=G.L\"4>`\\%n:K") input=StringLiteral("|i$*d&%") input=Identifier("k50Df822c") input=Operator("-") input=Integer(-5108499370592246714) input=StringLiteral("5X1*Q45/d@:%.O") input=Integer(-5449134763892492215) input=Identifier("E7Tvw01fh61AWY1ul2") input=Integer(-3831313511678777380) input=Comment("") input=Comment(".>?o") input=StringLiteral("$$=:-$J'<9") input=Operator(")") input=Integer(-8735996622080021288) input=Integer(2789139489327584823) input=Integer(6272827257633682989) input=Comment("OWb\"XRNt") input=Comment("_Edk={4f=%aj.IK'*Q=u]&C^") input=Integer(-6482697610330827501) input=Integer(7851692168909734724) input=Integer(-2643452087639764344) input=Identifier("ALwrYNcuPUWGTg34F2A0DTKRE3") input=StringLiteral("K$X/Vd*Hg#") input=Operator("/") input=Integer(-1666044871496323802) input=Identifier("PHHp0OWmV2l3") input=Operator("=") input=StringLiteral(":{<yi<Ad%KK") input=Identifier("g8fGJZuom") input=Identifier("xBnra6fyBNjrnKE17vJD9x6O68PjjrI3") input=Operator("+") input=Identifier("GztJzlyy3XmU") input=Operator("(") input=StringLiteral("Ym/k1!uE*OK") input=Operator("(") input=Integer(717287800103539033) input=Operator("*") input=Identifier("vyzmdEa7JmcFJmk54UBLt4dpx55uL6m") input=Integer(7094927182356464639) input=Identifier("qD39DP73Y5B6d4fjUiRIqF7HSeOnj2UQ") input=Comment("?=sS.=x#FA/%/qaE&\"e?Sdi=gq/'.j`") input=Identifier("yFLJ8") input=Comment(">\\*B") input=Integer(2452819075445915235) input=Comment("=\"7HYXh/I&\\=8-/&wcGW)G*X='y\"?E!)") input=Operator("/") input=Comment("nXE=O[%bKD&}'\"[z~~p/`o$|Zz1&.") input=Comment(")W'w<{I") input=Identifier("NplyYNIBrcke5i8eQUb3R9E6HpC6H") input=StringLiteral("bN,%6z-k80@kBb/jJ=#t;gPB") input=Operator("-") input=Operator("*") input=Integer(-3908065397424326650) input=Integer(7225102305464578790) input=Operator("*") input=StringLiteral(".~'5@//o,%}H&)$`<<d`Vm%3d5X") input=Comment(".$K<b.JhJBMR8p\\ -:m$h") input=Operator(")") input=Comment("%{c{gf@.'P&:$ZM5)bo\"p$vj=M<;h'") input=Operator(")") input=Operator("*") input=StringLiteral("b'.qQrT:z$pex1/4{M") input=Identifier("i3E17WiB7M7bBxDL6R94Asnx4") input=StringLiteral("^Z") input=Operator("-") input=Integer(6500882618678787989) input=Integer(-8976579722309968202) input=Operator("*") input=StringLiteral("@C:$%c?$bRgkck=`qH'?.M&d'<K$") input=Comment("|{\"?p*b{") input=StringLiteral(")/'^ azZ#'p%<M(Z*`>g") input=Comment("<p{V\"?_.Z}[huGtA`=UPq..<`.nL'") input=Operator("+") input=StringLiteral(":?]yq<$//7<&#&Xa^W`G3%Ms") input=Comment("x['&lEo.3F4A]1*m") input=Operator("/") input=Integer(-2439220996797259049) input=Integer(-3343355374626406732) input=Operator(")") input=Operator("(") input=Integer(1872997855101726120) input=StringLiteral("`k%:Q?c^H<-M*?Wvr.a9`+") input=Comment("kaX/@i2") input=Comment("Rtm") input=StringLiteral("C=W?==Bm6t*?&$O?01A%|oYdY2R#t") input=Integer(3858517120219507646) input=StringLiteral("_/.:R:{9snS=.$O-$Awur`*J") input=StringLiteral("$EDO{&FS#lAu.GI$ay=v4*=n3$A)Vo") input=Operator("*") input=Operator("(") input=Comment("9\\R$t&4z%*\"_'>3z$:Q'") input=Identifier("vReKW7ej72JL0f88SU6D00xJ") input=Integer(-6193242783521445581) input=Comment("zem/S:iy!'") input=Comment("`*]PP\\e%ztp^") input=Identifier("ihTc") input=Integer(-2321078436121651085) input=Identifier("Cd9") input=Operator("/") input=Comment("h]s*6(]?2i'}.VG,P/I") input=Comment("\"/v/?]*\\wW$>.U\".1{%<<l`StV'T8{A") input=Operator("-") input=Identifier("KIynUU") input=Identifier("IJGIWUCs0dB3163e0q0l") input=Comment("NGB$\"7/$Y&|V;5_[") input=Identifier("QYygZIIT21b1VOZKX12Lp") input=Identifier("GMVX9HSdXs") input=Integer(-2528100875361198905) input=Comment("V*0") input=Integer(-3268920995022896473) input=Comment("4B84$wywW") input=Integer(-3825646294768767553) input=Operator("(") input=Comment("M??$ZC`&=o.``%me") input=Identifier("gsaioOqHSQ4I7HXkJ94JUcQ10K9") input=Identifier("p2U08HT5o44y089EIYbn6EfW14") input=StringLiteral("!`~M") input=Comment("'/t)\"%'V6H#N|f5]h&{q") input=Identifier("itHHz82Zfa6gMqqQTJ7HSOQTS5") input=Comment("U`N}';>rD`S\\xIG<Rq9sF'rw`KG") input=Integer(-7979496245418932585) input=Operator("-") input=Integer(7894324052237565817) input=Integer(6474655979631201589) input=Identifier("C") input=Integer(-4461672546055088003) input=Operator("(") input=Identifier("Rd243pM5QC9x5dzaZ4X7ub1b9Rv") input=Operator("(") input=Comment("?a$DB=<,q#,?%p6yX*$J<0\";q<") input=Comment("h*p'rP.I{m$#\\\"\"}l+:'.c[") input=StringLiteral(".Hp4`A(") input=StringLiteral("S1'HJZ3q>iT%j?a*RA") input=Identifier("lYI4W00dcGqAu9ctQez30D7080rds") input=Integer(3537474703353192112) input=Comment("+\\D2Zp$/\"dH.S.`nr*8_hu2:s") input=Identifier("rHK66JlJdQ") input=StringLiteral("]/TcQ~@'yYU&KlssP~w") input=Comment("]%{V1B`O{Y?\"C>WF,#h") input=Comment("-X2") input=Operator("*") input=Operator(")") input=Integer(-7287465190251161363) input=Operator("=") input=Comment("\"{L<%+U7J9s_Nad") input=Identifier("g") input=Comment("H['Lh7xJ/3,+w$+<%]%e),\"&?\\IQ?<") input=Operator("=") input=Integer(7163531581928784267) input=StringLiteral("9w%{Z'tFo") input=StringLiteral("p<A/md::i<D>_J.0&Y;-uom|KO") input=Operator("*") input=Operator("=") input=Integer(3882525919004800940) input=Identifier("d06ls1cz6t1g34vfS3k7KylC") input=Identifier("sgXe89FS9V7DI5ke2Q1EfnA6") input=Integer(8570124230957665449) input=Identifier("C2") input=StringLiteral("`D.$;i=B/H#&?~yb&Q5:&Pzf/x") input=Identifier("XP87") input=StringLiteral("8Qo?uE':`'.;g8D`4QPG]Z") 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