From b789e0916f9ec7a354fde1a5abd36eca6feb6e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=94=84=EB=A6=AC=EB=A7=88?= Date: Mon, 20 May 2024 08:20:16 -0400 Subject: [PATCH] tests --- apps/spiral/builder/spiral_builder.dib.html | 108 +- apps/spiral/builder/spiral_builder.dib.ipynb | 108 +- apps/spiral/builder/spiral_builder.fsx | 2387 +- apps/spiral/builder/spiral_builder.rs | 2591 +- apps/spiral/temp/test/build.dib.html | 1438 +- apps/spiral/temp/test/build.dib.ipynb | 1434 +- lib/fsharp/common.py | 4 +- lib/math/math.dib.html | 8 +- lib/math/math.dib.ipynb | 8 +- lib/math/math.fsx | 244 +- lib/math/math.rs | 60 +- lib/spiral/am'.dib | 39 +- lib/spiral/am'.dib.html | 178 +- lib/spiral/am'.dib.ipynb | 91 +- lib/spiral/am'.spi | 19 +- lib/spiral/async_.py | 4 +- lib/spiral/build.ps1 | 2 +- lib/spiral/common.fsx | 4 + lib/spiral/common.py | 70 +- lib/spiral/crypto.dib.html | 14 +- lib/spiral/crypto.dib.ipynb | 14 +- lib/spiral/crypto.fsx | 28 +- lib/spiral/crypto.py | 8 +- lib/spiral/date_time.fsx | 4 + lib/spiral/date_time.py | 64 +- lib/spiral/file_system.fsx | 4 + lib/spiral/file_system.py | 216 +- lib/spiral/iter.dib | 100 + lib/spiral/iter.spi | 23 + lib/spiral/networking.fsx | 4 + lib/spiral/networking.py | 98 +- lib/spiral/optionm'.dib.html | 72 +- lib/spiral/optionm'.dib.ipynb | 52 +- lib/spiral/package.spiproj | 2 +- lib/spiral/resultm.dib | 17 +- lib/spiral/resultm.dib.html | 116 +- lib/spiral/resultm.dib.ipynb | 34 +- lib/spiral/resultm.spi | 8 +- lib/spiral/runtime.dib | 196 +- lib/spiral/runtime.dib.html | 659 +- lib/spiral/runtime.dib.ipynb | 363 +- lib/spiral/runtime.fsx | 28 +- lib/spiral/runtime.py | 110 +- lib/spiral/runtime.spi | 176 +- lib/spiral/rust.dib | 84 +- lib/spiral/rust.dib.html | 161 +- lib/spiral/rust.dib.ipynb | 139 +- lib/spiral/rust.spi | 65 +- lib/spiral/sm.fsx | 4 + lib/spiral/sm.py | 188 +- lib/spiral/state_core.spi | 2 +- lib/spiral/stream.dib | 11 +- lib/spiral/stream.dib.html | 132 +- lib/spiral/stream.dib.ipynb | 26 +- lib/spiral/stream.spi | 6 +- lib/spiral/threading.dib | 54 +- lib/spiral/threading.dib.html | 138 +- lib/spiral/threading.dib.ipynb | 128 +- lib/spiral/threading.fsx | 12 + lib/spiral/threading.spi | 29 +- lib/spiral/threading_.py | 16 +- lib/spiral/trace.fsx | 4 + lib/spiral/trace.py | 4 +- scripts/build.dib.html | 91758 ++++++++--------- scripts/build.dib.ipynb | 91758 ++++++++--------- workspace/Cargo.lock | 120 +- 66 files changed, 96975 insertions(+), 99071 deletions(-) create mode 100644 lib/spiral/iter.dib diff --git a/apps/spiral/builder/spiral_builder.dib.html b/apps/spiral/builder/spiral_builder.dib.html index 12f7abcd..fbb86216 100644 --- a/apps/spiral/builder/spiral_builder.dib.html +++ b/apps/spiral/builder/spiral_builder.dib.html @@ -8171,13 +8171,13 @@

run

diff --git a/apps/spiral/builder/spiral_builder.dib.ipynb b/apps/spiral/builder/spiral_builder.dib.ipynb index d0bdd479..3fcfa860 100644 --- a/apps/spiral/builder/spiral_builder.dib.ipynb +++ b/apps/spiral/builder/spiral_builder.dib.ipynb @@ -601,13 +601,13 @@ { "data": { "text/plain": [ - "00:00:00 \u001B[90mverbose\u001B[39m #1 file_system.create_directory / dir: C:\\Users\\i574n\\AppData\\Local\\Temp\\!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a\\20240517-2045-5199-1555-000000897579\n", - "00:00:00 \u001B[94m debug\u001B[39m #2 runtime.execute_with_options / file_name: dotnet / arguments: [\"repl\", \"--exit-after-run\", \"--run\", \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a/20240517-2045-5199-1555-000000897579/test.dib\", \"--output-path\", \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a/20240517-2045-5199-1555-000000897579/test.dib.ipynb\"] / options: (None, \"dotnet repl --exit-after-run --run \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a/20240517-2045-5199-1555-000000897579/test.dib\" --output-path \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a/20240517-2045-5199-1555-000000897579/test.dib.ipynb\"\", Array(MutCell([(\"AUTOMATION\", \"True\")])), None, None, false, None)\n", + "00:00:00 \u001B[90mverbose\u001B[39m #1 file_system.create_directory / dir: C:\\Users\\i574n\\AppData\\Local\\Temp\\!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23\\20240519-2253-0385-6225-000000201a9d\n", + "00:00:00 \u001B[94m debug\u001B[39m #2 runtime.execute_with_options / file_name: dotnet / arguments: [\"repl\", \"--exit-after-run\", \"--run\", \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23/20240519-2253-0385-6225-000000201a9d/test.dib\", \"--output-path\", \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23/20240519-2253-0385-6225-000000201a9d/test.dib.ipynb\"] / options: (None, \"dotnet repl --exit-after-run --run \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23/20240519-2253-0385-6225-000000201a9d/test.dib\" --output-path \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23/20240519-2253-0385-6225-000000201a9d/test.dib.ipynb\"\", Array(MutCell([(\"AUTOMATION\", \"True\")])), None, None, false, None)\n", "> \n", - "> �� fsharp ����������������������������������������������������������������������\n", + "> ── fsharp ──────────────────────────────────────────────────────────────────────\n", "> 3 - 6\n", "> \n", - "> �� fsharp - import �������������������������������������������������������������\n", + "> ── fsharp - import ─────────────────────────────────────────────────────────────\n", "> #r \n", "> \"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A\n", "> spNetCore.Html.Abstractions.dll\"\n", @@ -625,7 +625,7 @@ "> open System.Text\n", "> open Microsoft.DotNet.Interactive.Formatting\n", "> \n", - "> �� fsharp - import �������������������������������������������������������������\n", + "> ── fsharp - import ─────────────────────────────────────────────────────────────\n", "> #r \n", "> \"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D\n", "> otNet.Interactive.FSharp.dll\"\n", @@ -635,60 +635,60 @@ "> otNet.Interactive.dll\"\n", "> open type Microsoft.DotNet.Interactive.Kernel\n", "> \n", - "> �� fsharp - import �������������������������������������������������������������\n", + "> ── fsharp - import ─────────────────────────────────────────────────────────────\n", "> Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer \"%120A\" x)\n", "> \n", - "> �� fsharp - import �������������������������������������������������������������\n", + "> ── fsharp - import ─────────────────────────────────────────────────────────────\n", "> Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: \n", "> TextWriter)->fprintfn writer \"%120A\" x)\n", "> \n", - "> ?�[ 23.13s - return value ]����������������������������������������������������?\n", - "> �
-3                                           �\n",
-       "> � 
�\n", - "> ?������������������������������������������������������������������������������?\n", - "00:00:39 \u001B[90mverbose\u001B[39m #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 4316\n", - "00:00:39 \u001B[94m debug\u001B[39m #4 runtime.execute_with_options / file_name: jupyter / arguments: [\"nbconvert\", \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a/20240517-2045-5199-1555-000000897579/test.dib.ipynb\", \"--to\", \"html\", \"--HTMLExporter.theme=dark\"] / options: (None, \"jupyter nbconvert \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a/20240517-2045-5199-1555-000000897579/test.dib.ipynb\" --to html --HTMLExporter.theme=dark\", Array(MutCell([])), None, None, true, None)\n", - "00:01:02 \u001B[90mverbose\u001B[39m #5 ! [NbConvertApp] Converting notebook c:/Users/i574n/AppData/Local/Temp/!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a/20240517-2045-5199-1555-000000897579/test.dib.ipynb to html\n", - "00:01:02 \u001B[90mverbose\u001B[39m #6 ! C:\\Users\\i574n\\scoop\\apps\\python\\current\\Lib\\site-packages\\nbformat\\__init__.py:93: MissingIDFieldWarning: Code 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.\n", - "00:01:02 \u001B[90mverbose\u001B[39m #7 ! validate(nb)\n", - "00:01:02 \u001B[90mverbose\u001B[39m #8 ! [NbConvertApp] Writing 271490 bytes to c:\\Users\\i574n\\AppData\\Local\\Temp\\!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a\\20240517-2045-5199-1555-000000897579\\test.dib.html\n", - "00:01:02 \u001B[90mverbose\u001B[39m #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 879\n", - "00:01:02 \u001B[94m debug\u001B[39m #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 879\n", - "00:01:02 \u001B[94m debug\u001B[39m #11 runtime.execute_with_options / file_name: pwsh / arguments: [\"-c\", \"$counter = 1; $path = 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a/20240517-2045-5199-1555-000000897579/test.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\\\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path\"] / options: (None, \"pwsh -c \"$counter = 1; $path = 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_10f201ef70e7beff1a58f3cba80838e17fa749ce72bff8900c215ecd4064ef1a/20240517-2045-5199-1555-000000897579/test.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path\"\", Array(MutCell([])), None, None, true, None)\n", - "00:01:07 \u001B[90mverbose\u001B[39m #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0\n", - "00:01:07 \u001B[94m debug\u001B[39m #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0\n", - "00:01:21 \u001B[94m debug\u001B[39m #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 5254\n" + "> ╭─[ 4.77s - return value ]─────────────────────────────────────────────────────╮\n", + "> │
-3                                           │\n",
+       "> │ 
│\n", + "> ╰──────────────────────────────────────────────────────────────────────────────╯\n", + "00:00:06 \u001B[90mverbose\u001B[39m #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 4316\n", + "00:00:06 \u001B[94m debug\u001B[39m #4 runtime.execute_with_options / file_name: jupyter / arguments: [\"nbconvert\", \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23/20240519-2253-0385-6225-000000201a9d/test.dib.ipynb\", \"--to\", \"html\", \"--HTMLExporter.theme=dark\"] / options: (None, \"jupyter nbconvert \"c:/Users/i574n/AppData/Local/Temp/!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23/20240519-2253-0385-6225-000000201a9d/test.dib.ipynb\" --to html --HTMLExporter.theme=dark\", Array(MutCell([])), None, None, true, None)\n", + "00:00:10 \u001B[90mverbose\u001B[39m #5 ! [NbConvertApp] Converting notebook c:/Users/i574n/AppData/Local/Temp/!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23/20240519-2253-0385-6225-000000201a9d/test.dib.ipynb to html\n", + "00:00:10 \u001B[90mverbose\u001B[39m #6 ! C:\\Users\\i574n\\scoop\\apps\\python\\current\\Lib\\site-packages\\nbformat\\__init__.py:93: MissingIDFieldWarning: Code 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.\n", + "00:00:10 \u001B[90mverbose\u001B[39m #7 ! validate(nb)\n", + "00:00:10 \u001B[90mverbose\u001B[39m #8 ! [NbConvertApp] Writing 271490 bytes to c:\\Users\\i574n\\AppData\\Local\\Temp\\!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23\\20240519-2253-0385-6225-000000201a9d\\test.dib.html\n", + "00:00:10 \u001B[90mverbose\u001B[39m #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 879\n", + "00:00:10 \u001B[94m debug\u001B[39m #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 879\n", + "00:00:10 \u001B[94m debug\u001B[39m #11 runtime.execute_with_options / file_name: pwsh / arguments: [\"-c\", \"$counter = 1; $path = 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23/20240519-2253-0385-6225-000000201a9d/test.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\\\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path\"] / options: (None, \"pwsh -c \"$counter = 1; $path = 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_cd8003137eda9f6d89e4b19c0d502e24e0464248b9ff10d179be8263fa6bab23/20240519-2253-0385-6225-000000201a9d/test.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path\"\", Array(MutCell([])), None, None, true, None)\n", + "00:00:11 \u001B[90mverbose\u001B[39m #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0\n", + "00:00:11 \u001B[94m debug\u001B[39m #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0\n", + "00:00:11 \u001B[94m debug\u001B[39m #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 5254\n" ] }, "metadata": {}, diff --git a/apps/spiral/builder/spiral_builder.fsx b/apps/spiral/builder/spiral_builder.fsx index 1837826f..1c0c6eb9 100644 --- a/apps/spiral/builder/spiral_builder.fsx +++ b/apps/spiral/builder/spiral_builder.fsx @@ -39,6 +39,10 @@ type async_walkdir_WalkDir = class end #endif type core_any_Any = class end #if FABLE_COMPILER +[] +#endif +type core_ops_Try<'T> = class end +#if FABLE_COMPILER [")>] #endif type Func0<'T> = class end @@ -319,18 +323,6 @@ type std_process_Output = class end #endif type std_process_Stdio = class end #if FABLE_COMPILER -[")>] -#endif -type std_sync_mpsc_Receiver<'T> = class end -#if FABLE_COMPILER -[")>] -#endif -type std_sync_mpsc_SendError<'T> = class end -#if FABLE_COMPILER -[")>] -#endif -type std_sync_mpsc_Sender<'T> = class end -#if FABLE_COMPILER [] #endif type Slice<'T> = class end @@ -398,6 +390,18 @@ type std_sync_MutexGuard<'T> = class end [")>] #endif type std_sync_PoisonError<'T> = class end +#if FABLE_COMPILER +[")>] +#endif +type std_sync_mpsc_Receiver<'T> = class end +#if FABLE_COMPILER +[")>] +#endif +type std_sync_mpsc_SendError<'T> = class end +#if FABLE_COMPILER +[")>] +#endif +type std_sync_mpsc_Sender<'T> = class end module State = let mutable trace_state = None type IPathJoin = abstract join: [] paths: string[] -> string #if FABLE_COMPILER @@ -475,9 +479,7 @@ and [] US15 = and [] US16 = | US16_0 of f0_0 : System.Threading.CancellationToken | US16_1 -let rec method1 (v0 : std_string_String) : std_string_String = - v0 -and method0 () : clap_Command = +let rec method0 () : clap_Command = let v0 : string = "command" let v1 : string = "r#\"" + v0 + "\"#" let v2 : Ref> = Fable.Core.RustInterop.emitRustExpr () v1 @@ -517,177 +519,176 @@ and method0 () : clap_Command = let v36 : Ref = Fable.Core.RustInterop.emitRustExpr v34 v35 let v37 : string = "String::from($0)" let v38 : std_string_String = Fable.Core.RustInterop.emitRustExpr v36 v37 - let v39 : std_string_String = method1(v38) - let v40 : string = "Box::new(v39)" - let v41 : Box = Fable.Core.RustInterop.emitRustExpr () v40 - let v42 : string = "Box::leak($0)" - let v43 : Ref>> = Fable.Core.RustInterop.emitRustExpr v41 v42 - let v44 : string = "clap::builder::PossibleValue::new(&**$0)" - let v45 : clap_builder_PossibleValue = Fable.Core.RustInterop.emitRustExpr v43 v44 - let v46 : string = "true; $0 }).collect::>()" - let v47 : bool = Fable.Core.RustInterop.emitRustExpr v45 v46 - let v48 : string = "_result" - let v49 : Vec = Fable.Core.RustInterop.emitRustExpr () v48 - let v50 : string = "clap::builder::PossibleValuesParser::new($0).into()" - let v51 : clap_builder_ValueParser = Fable.Core.RustInterop.emitRustExpr v49 v50 - let v52 : string = "$0.value_parser($1)" - let v53 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v15, v51) v52 - let v54 : string = "clap::Command::arg($0, $1)" - let v55 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v4, v53) v54 - let v56 : string = "clap::Command::subcommand_required($0, true)" - let v57 : clap_Command = Fable.Core.RustInterop.emitRustExpr v55 v56 - let v58 : string = "fsharp" - let v59 : string = "r#\"" + v58 + "\"#" - let v60 : Ref> = Fable.Core.RustInterop.emitRustExpr () v59 - let v61 : string = "clap::Command::new($0)" - let v62 : clap_Command = Fable.Core.RustInterop.emitRustExpr v60 v61 - let v63 : string = "path" - let v64 : string = "r#\"" + v63 + "\"#" - let v65 : Ref> = Fable.Core.RustInterop.emitRustExpr () v64 - let v66 : string = "clap::Arg::new($0)" - let v67 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v65 v66 - let v68 : string = "$0.short($1)" - let v69 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v67, 'p') v68 - let v70 : string = "r#\"" + v63 + "\"#" - let v71 : Ref> = Fable.Core.RustInterop.emitRustExpr () v70 - let v72 : string = "$0.long($1)" - let v73 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v69, v71) v72 - let v74 : string = "$0.required($1)" - let v75 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v73, true) v74 - let v76 : string = "clap::Command::arg($0, $1)" - let v77 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v62, v75) v76 - let v78 : string = "package-dir" - let v79 : string = "r#\"" + v78 + "\"#" - let v80 : Ref> = Fable.Core.RustInterop.emitRustExpr () v79 - let v81 : string = "clap::Arg::new($0)" - let v82 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v80 v81 - let v83 : string = "$0.short($1)" - let v84 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v82, 'd') v83 - let v85 : string = "r#\"" + v78 + "\"#" - let v86 : Ref> = Fable.Core.RustInterop.emitRustExpr () v85 - let v87 : string = "$0.long($1)" - let v88 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v84, v86) v87 - let v89 : string = "$0.required($1)" - let v90 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v88, true) v89 - let v91 : string = "clap::Command::arg($0, $1)" - let v92 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v77, v90) v91 - let v93 : string = "args" - let v94 : string = "r#\"" + v93 + "\"#" - let v95 : Ref> = Fable.Core.RustInterop.emitRustExpr () v94 - let v96 : string = "clap::Arg::new($0)" - let v97 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v95 v96 - let v98 : string = "$0.short($1)" - let v99 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v97, 'a') v98 - let v100 : string = "r#\"" + v93 + "\"#" - let v101 : Ref> = Fable.Core.RustInterop.emitRustExpr () v100 - let v102 : string = "$0.long($1)" - let v103 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v99, v101) v102 - let v104 : string = "clap::Command::arg($0, $1)" - let v105 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v92, v103) v104 - let v106 : string = "clap::Command::subcommand($0, v105)" - let v107 : clap_Command = Fable.Core.RustInterop.emitRustExpr v57 v106 - let v108 : string = "rust" - let v109 : string = "r#\"" + v108 + "\"#" - let v110 : Ref> = Fable.Core.RustInterop.emitRustExpr () v109 - let v111 : string = "clap::Command::new($0)" - let v112 : clap_Command = Fable.Core.RustInterop.emitRustExpr v110 v111 - let v113 : string = "NAME" - let v114 : string = "r#\"" + v113 + "\"#" - let v115 : Ref> = Fable.Core.RustInterop.emitRustExpr () v114 - let v116 : string = "VERSION" - let v117 : string = "r#\"" + v116 + "\"#" - let v118 : Ref> = Fable.Core.RustInterop.emitRustExpr () v117 - let v119 : (Ref> []) = [|v115; v118|] - let v120 : unativeint = unativeint 1 - let v121 : unativeint = unativeint 0 - let v122 : bool = v121 = v121 - let v127 : clap_builder_ValueRange = - if v122 then - let v123 : string = "clap::builder::ValueRange::new(v120..)" - let v124 : clap_builder_ValueRange = Fable.Core.RustInterop.emitRustExpr () v123 - v124 + let v39 : string = "Box::new($0)" + let v40 : Box = Fable.Core.RustInterop.emitRustExpr v38 v39 + let v41 : string = "Box::leak($0)" + let v42 : Ref>> = Fable.Core.RustInterop.emitRustExpr v40 v41 + let v43 : string = "clap::builder::PossibleValue::new(&**$0)" + let v44 : clap_builder_PossibleValue = Fable.Core.RustInterop.emitRustExpr v42 v43 + let v45 : string = "true; $0 }).collect::>()" + let v46 : bool = Fable.Core.RustInterop.emitRustExpr v44 v45 + let v47 : string = "_result" + let v48 : Vec = Fable.Core.RustInterop.emitRustExpr () v47 + let v49 : string = "clap::builder::PossibleValuesParser::new($0).into()" + let v50 : clap_builder_ValueParser = Fable.Core.RustInterop.emitRustExpr v48 v49 + let v51 : string = "$0.value_parser($1)" + let v52 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v15, v50) v51 + let v53 : string = "clap::Command::arg($0, $1)" + let v54 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v4, v52) v53 + let v55 : string = "clap::Command::subcommand_required($0, true)" + let v56 : clap_Command = Fable.Core.RustInterop.emitRustExpr v54 v55 + let v57 : string = "fsharp" + let v58 : string = "r#\"" + v57 + "\"#" + let v59 : Ref> = Fable.Core.RustInterop.emitRustExpr () v58 + let v60 : string = "clap::Command::new($0)" + let v61 : clap_Command = Fable.Core.RustInterop.emitRustExpr v59 v60 + let v62 : string = "path" + let v63 : string = "r#\"" + v62 + "\"#" + let v64 : Ref> = Fable.Core.RustInterop.emitRustExpr () v63 + let v65 : string = "clap::Arg::new($0)" + let v66 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v64 v65 + let v67 : string = "$0.short($1)" + let v68 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v66, 'p') v67 + let v69 : string = "r#\"" + v62 + "\"#" + let v70 : Ref> = Fable.Core.RustInterop.emitRustExpr () v69 + let v71 : string = "$0.long($1)" + let v72 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v68, v70) v71 + let v73 : string = "$0.required($1)" + let v74 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v72, true) v73 + let v75 : string = "clap::Command::arg($0, $1)" + let v76 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v61, v74) v75 + let v77 : string = "package-dir" + let v78 : string = "r#\"" + v77 + "\"#" + let v79 : Ref> = Fable.Core.RustInterop.emitRustExpr () v78 + let v80 : string = "clap::Arg::new($0)" + let v81 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v79 v80 + let v82 : string = "$0.short($1)" + let v83 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v81, 'd') v82 + let v84 : string = "r#\"" + v77 + "\"#" + let v85 : Ref> = Fable.Core.RustInterop.emitRustExpr () v84 + let v86 : string = "$0.long($1)" + let v87 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v83, v85) v86 + let v88 : string = "$0.required($1)" + let v89 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v87, true) v88 + let v90 : string = "clap::Command::arg($0, $1)" + let v91 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v76, v89) v90 + let v92 : string = "args" + let v93 : string = "r#\"" + v92 + "\"#" + let v94 : Ref> = Fable.Core.RustInterop.emitRustExpr () v93 + let v95 : string = "clap::Arg::new($0)" + let v96 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v94 v95 + let v97 : string = "$0.short($1)" + let v98 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v96, 'a') v97 + let v99 : string = "r#\"" + v92 + "\"#" + let v100 : Ref> = Fable.Core.RustInterop.emitRustExpr () v99 + let v101 : string = "$0.long($1)" + let v102 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v98, v100) v101 + let v103 : string = "clap::Command::arg($0, $1)" + let v104 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v91, v102) v103 + let v105 : string = "clap::Command::subcommand($0, v104)" + let v106 : clap_Command = Fable.Core.RustInterop.emitRustExpr v56 v105 + let v107 : string = "rust" + let v108 : string = "r#\"" + v107 + "\"#" + let v109 : Ref> = Fable.Core.RustInterop.emitRustExpr () v108 + let v110 : string = "clap::Command::new($0)" + let v111 : clap_Command = Fable.Core.RustInterop.emitRustExpr v109 v110 + let v112 : string = "NAME" + let v113 : string = "r#\"" + v112 + "\"#" + let v114 : Ref> = Fable.Core.RustInterop.emitRustExpr () v113 + let v115 : string = "VERSION" + let v116 : string = "r#\"" + v115 + "\"#" + let v117 : Ref> = Fable.Core.RustInterop.emitRustExpr () v116 + let v118 : (Ref> []) = [|v114; v117|] + let v119 : unativeint = unativeint 1 + let v120 : unativeint = unativeint 0 + let v121 : bool = v120 = v120 + let v126 : clap_builder_ValueRange = + if v121 then + let v122 : string = "clap::builder::ValueRange::new(v119..)" + let v123 : clap_builder_ValueRange = Fable.Core.RustInterop.emitRustExpr () v122 + v123 else - let v125 : string = "clap::builder::ValueRange::new(v120..v121)" - let v126 : clap_builder_ValueRange = Fable.Core.RustInterop.emitRustExpr () v125 - v126 - let v128 : string = "deps" - let v129 : string = "r#\"" + v128 + "\"#" - let v130 : Ref> = Fable.Core.RustInterop.emitRustExpr () v129 - let v131 : string = "clap::Arg::new($0)" - let v132 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v130 v131 - let v133 : string = "$0.short($1)" - let v134 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v132, 'd') v133 - let v135 : string = "r#\"" + v128 + "\"#" - let v136 : Ref> = Fable.Core.RustInterop.emitRustExpr () v135 - let v137 : string = "$0.long($1)" - let v138 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v134, v136) v137 - let v139 : string = "$0.to_vec()" - let v140 : Vec>> = Fable.Core.RustInterop.emitRustExpr v119 v139 - let v141 : string = "$0.value_names($1)" - let v142 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v138, v140) v141 - let v143 : string = "$0.num_args($1)" - let v144 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v142, v127) v143 - let v145 : string = "clap::ArgAction::Append" - let v146 : clap_ArgAction = Fable.Core.RustInterop.emitRustExpr () v145 - let v147 : string = "$0.action($1)" - let v148 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v144, v146) v147 - let v149 : string = "clap::Command::arg($0, $1)" - let v150 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v112, v148) v149 - let v151 : string = "clap::Command::subcommand($0, v150)" - let v152 : clap_Command = Fable.Core.RustInterop.emitRustExpr v107 v151 - let v153 : string = "dib" - let v154 : string = "r#\"" + v153 + "\"#" - let v155 : Ref> = Fable.Core.RustInterop.emitRustExpr () v154 - let v156 : string = "clap::Command::new($0)" - let v157 : clap_Command = Fable.Core.RustInterop.emitRustExpr v155 v156 - let v158 : string = "r#\"" + v63 + "\"#" - let v159 : Ref> = Fable.Core.RustInterop.emitRustExpr () v158 - let v160 : string = "clap::Arg::new($0)" - let v161 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v159 v160 - let v162 : string = "$0.short($1)" - let v163 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v161, 'p') v162 - let v164 : string = "r#\"" + v63 + "\"#" - let v165 : Ref> = Fable.Core.RustInterop.emitRustExpr () v164 - let v166 : string = "$0.long($1)" - let v167 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v163, v165) v166 - let v168 : string = "$0.required($1)" - let v169 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v167, true) v168 - let v170 : string = "clap::Command::arg($0, $1)" - let v171 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v157, v169) v170 - let v172 : string = "u8" - let v173 : string = "clap::value_parser!(" + v172 + ").into()" - let v174 : clap_builder_ValueParser = Fable.Core.RustInterop.emitRustExpr () v173 - let v175 : string = "retries" - let v176 : string = "r#\"" + v175 + "\"#" - let v177 : Ref> = Fable.Core.RustInterop.emitRustExpr () v176 - let v178 : string = "clap::Arg::new($0)" - let v179 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v177 v178 - let v180 : string = "$0.short($1)" - let v181 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v179, 'r') v180 - let v182 : string = "r#\"" + v175 + "\"#" - let v183 : Ref> = Fable.Core.RustInterop.emitRustExpr () v182 - let v184 : string = "$0.long($1)" - let v185 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v181, v183) v184 - let v186 : string = "$0.value_parser($1)" - let v187 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v185, v174) v186 - let v188 : string = "clap::Command::arg($0, $1)" - let v189 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v171, v187) v188 - let v190 : string = "working_directory" - let v191 : string = "r#\"" + v190 + "\"#" - let v192 : Ref> = Fable.Core.RustInterop.emitRustExpr () v191 - let v193 : string = "clap::Arg::new($0)" - let v194 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v192 v193 - let v195 : string = "$0.short($1)" - let v196 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v194, 'w') v195 - let v197 : string = "r#\"" + v190 + "\"#" - let v198 : Ref> = Fable.Core.RustInterop.emitRustExpr () v197 - let v199 : string = "$0.long($1)" - let v200 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v196, v198) v199 - let v201 : string = "clap::Command::arg($0, $1)" - let v202 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v189, v200) v201 - let v203 : string = "clap::Command::subcommand($0, v202)" - let v204 : clap_Command = Fable.Core.RustInterop.emitRustExpr v152 v203 - v204 + let v124 : string = "clap::builder::ValueRange::new(v119..v120)" + let v125 : clap_builder_ValueRange = Fable.Core.RustInterop.emitRustExpr () v124 + v125 + let v127 : string = "deps" + let v128 : string = "r#\"" + v127 + "\"#" + let v129 : Ref> = Fable.Core.RustInterop.emitRustExpr () v128 + let v130 : string = "clap::Arg::new($0)" + let v131 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v129 v130 + let v132 : string = "$0.short($1)" + let v133 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v131, 'd') v132 + let v134 : string = "r#\"" + v127 + "\"#" + let v135 : Ref> = Fable.Core.RustInterop.emitRustExpr () v134 + let v136 : string = "$0.long($1)" + let v137 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v133, v135) v136 + let v138 : string = "$0.to_vec()" + let v139 : Vec>> = Fable.Core.RustInterop.emitRustExpr v118 v138 + let v140 : string = "$0.value_names($1)" + let v141 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v137, v139) v140 + let v142 : string = "$0.num_args($1)" + let v143 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v141, v126) v142 + let v144 : string = "clap::ArgAction::Append" + let v145 : clap_ArgAction = Fable.Core.RustInterop.emitRustExpr () v144 + let v146 : string = "$0.action($1)" + let v147 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v143, v145) v146 + let v148 : string = "clap::Command::arg($0, $1)" + let v149 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v111, v147) v148 + let v150 : string = "clap::Command::subcommand($0, v149)" + let v151 : clap_Command = Fable.Core.RustInterop.emitRustExpr v106 v150 + let v152 : string = "dib" + let v153 : string = "r#\"" + v152 + "\"#" + let v154 : Ref> = Fable.Core.RustInterop.emitRustExpr () v153 + let v155 : string = "clap::Command::new($0)" + let v156 : clap_Command = Fable.Core.RustInterop.emitRustExpr v154 v155 + let v157 : string = "r#\"" + v62 + "\"#" + let v158 : Ref> = Fable.Core.RustInterop.emitRustExpr () v157 + let v159 : string = "clap::Arg::new($0)" + let v160 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v158 v159 + let v161 : string = "$0.short($1)" + let v162 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v160, 'p') v161 + let v163 : string = "r#\"" + v62 + "\"#" + let v164 : Ref> = Fable.Core.RustInterop.emitRustExpr () v163 + let v165 : string = "$0.long($1)" + let v166 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v162, v164) v165 + let v167 : string = "$0.required($1)" + let v168 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v166, true) v167 + let v169 : string = "clap::Command::arg($0, $1)" + let v170 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v156, v168) v169 + let v171 : string = "u8" + let v172 : string = "clap::value_parser!(" + v171 + ").into()" + let v173 : clap_builder_ValueParser = Fable.Core.RustInterop.emitRustExpr () v172 + let v174 : string = "retries" + let v175 : string = "r#\"" + v174 + "\"#" + let v176 : Ref> = Fable.Core.RustInterop.emitRustExpr () v175 + let v177 : string = "clap::Arg::new($0)" + let v178 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v176 v177 + let v179 : string = "$0.short($1)" + let v180 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v178, 'r') v179 + let v181 : string = "r#\"" + v174 + "\"#" + let v182 : Ref> = Fable.Core.RustInterop.emitRustExpr () v181 + let v183 : string = "$0.long($1)" + let v184 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v180, v182) v183 + let v185 : string = "$0.value_parser($1)" + let v186 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v184, v173) v185 + let v187 : string = "clap::Command::arg($0, $1)" + let v188 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v170, v186) v187 + let v189 : string = "working_directory" + let v190 : string = "r#\"" + v189 + "\"#" + let v191 : Ref> = Fable.Core.RustInterop.emitRustExpr () v190 + let v192 : string = "clap::Arg::new($0)" + let v193 : clap_Arg = Fable.Core.RustInterop.emitRustExpr v191 v192 + let v194 : string = "$0.short($1)" + let v195 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v193, 'w') v194 + let v196 : string = "r#\"" + v189 + "\"#" + let v197 : Ref> = Fable.Core.RustInterop.emitRustExpr () v196 + let v198 : string = "$0.long($1)" + let v199 : clap_Arg = Fable.Core.RustInterop.emitRustExpr struct (v195, v197) v198 + let v200 : string = "clap::Command::arg($0, $1)" + let v201 : clap_Command = Fable.Core.RustInterop.emitRustExpr struct (v188, v199) v200 + let v202 : string = "clap::Command::subcommand($0, v201)" + let v203 : clap_Command = Fable.Core.RustInterop.emitRustExpr v151 v202 + v203 and closure0 () () : unit = let v0 : string = "true; () //" let v1 : bool = Fable.Core.RustInterop.emitRustExpr () v0 @@ -704,10 +705,10 @@ and closure0 () () : unit = () and closure3 () (v0 : string) : unit = () -and method2 () : string = +and method1 () : string = let v0 : string = "" v0 -and method3 () : string = +and method2 () : string = let v0 : string = "AUTOMATION" v0 and closure2 () (v0 : US0) : struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3) = @@ -741,7 +742,7 @@ and closure2 () (v0 : US0) : struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3) = let v18 : bool = Fable.Core.RustInterop.emitRustExpr v16 v17 let v19 : string = "_result" let v20 : Result = Fable.Core.RustInterop.emitRustExpr () v19 - let v21 : string = method2() + let v21 : string = method1() let v22 : string = "$0.unwrap_or($1)" let v23 : string = Fable.Core.RustInterop.emitRustExpr struct (v20, v21) v22 v23 @@ -763,7 +764,7 @@ and closure2 () (v0 : US0) : struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3) = v27 #endif #else - let v28 : string = method3() + let v28 : string = method2() let v29 : (string -> string) = System.Environment.GetEnvironmentVariable let v30 : string = v29 v28 v30 @@ -824,7 +825,7 @@ and closure2 () (v0 : US0) : struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3) = let v59 : bool = Fable.Core.RustInterop.emitRustExpr v57 v58 let v60 : string = "_result" let v61 : Result = Fable.Core.RustInterop.emitRustExpr () v60 - let v62 : string = method2() + let v62 : string = method1() let v63 : string = "$0.unwrap_or($1)" let v64 : string = Fable.Core.RustInterop.emitRustExpr struct (v61, v62) v63 v64 @@ -846,7 +847,7 @@ and closure2 () (v0 : US0) : struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3) = v68 #endif #else - let v69 : string = method3() + let v69 : string = method2() let v70 : (string -> string) = System.Environment.GetEnvironmentVariable let v71 : string = v70 v69 v71 @@ -875,7 +876,7 @@ and closure2 () (v0 : US0) : struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3) = |> fun x -> _v6 <- Some x let v86 : int64 option = _v6.Value struct (v2, v1, v3, v86, v5) -and method4 () : string = +and method3 () : string = let v0 : string = "trace-level" v0 and closure4 () () : string = @@ -888,7 +889,7 @@ and closure5 (v0 : (string [])) () : string = let v1 : (unit -> string) = closure6() let v2 : string = $"args: {v0} / {v1 ()}" v2 -and method6 () : string = +and method5 () : string = let v0 : string = "" v0 and closure7 (v0 : US0, v1 : (unit -> string), v2 : (unit -> string)) () : string = @@ -944,19 +945,19 @@ and closure7 (v0 : US0, v1 : (unit -> string), v2 : (unit -> string)) () : strin v36 #endif #if FABLE_COMPILER_RUST && WASM - let v37 : string = method6() + let v37 : string = method5() v37 #endif #if FABLE_COMPILER_RUST && CONTRACT - let v38 : string = method6() + let v38 : string = method5() v38 #endif #if FABLE_COMPILER_TYPESCRIPT - let v39 : string = method6() + let v39 : string = method5() v39 #endif #if FABLE_COMPILER_PYTHON - let v40 : string = method6() + let v40 : string = method5() v40 #endif #else @@ -1147,7 +1148,7 @@ and closure7 (v0 : US0, v1 : (unit -> string), v2 : (unit -> string)) () : strin let v158 : (char []) = [|' '; '/'|] let v159 : string = v157.TrimEnd v158 v159 -and method7 (v0 : US0, v1 : (unit -> string)) : unit = +and method6 (v0 : US0, v1 : (unit -> string)) : unit = let v2 : (US0 -> struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3)) = closure2() let v3 : US0 = US0_0 if State.trace_state.IsNone then State.trace_state <- v2 v3 |> Some @@ -1207,23 +1208,23 @@ and method7 (v0 : US0, v1 : (unit -> string)) : unit = _v25.Value let v29 : (string -> unit) = v8.l0 v29 v24 -and method5 (v0 : US0, v1 : (unit -> string), v2 : (unit -> string)) : unit = +and method4 (v0 : US0, v1 : (unit -> string), v2 : (unit -> string)) : unit = let v3 : (unit -> string) = closure7(v0, v1, v2) - method7(v0, v3) + method6(v0, v3) and closure8 () (v0 : Ref) : std_string_String = let v1 : string = "String::from($0)" let v2 : std_string_String = Fable.Core.RustInterop.emitRustExpr v0 v1 v2 -and method9 () : string = +and method8 () : string = let v0 : string = "path" v0 -and method10 () : string = +and method9 () : string = let v0 : string = "package-dir" v0 -and method11 () : string = +and method10 () : string = let v0 : string = "args" v0 -and method13 (v0 : int32, v1 : Mut4) : bool = +and method12 (v0 : int32, v1 : Mut4) : bool = let v2 : int32 = v1.l0 let v3 : bool = v2 < v0 v3 @@ -1231,16 +1232,16 @@ and closure10 (v0 : char) (v1 : UH1) : UH1 = UH1_1(v0, v1) and closure9 () (v0 : char) : (UH1 -> UH1) = closure10(v0) -and method14 () : (char -> (UH1 -> UH1)) = +and method13 () : (char -> (UH1 -> UH1)) = closure9() -and method17 (v0 : UH0, v1 : UH0) : UH0 = +and method16 (v0 : UH0, v1 : UH0) : UH0 = match v0 with | UH0_1(v2, v3) -> (* Cons *) - let v4 : UH0 = method17(v3, v1) + let v4 : UH0 = method16(v3, v1) UH0_1(v2, v4) | UH0_0 -> (* Nil *) v1 -and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) = +and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) = match v3 with | US5_2(v51, v52) -> (* Escaped *) match v2 with @@ -1248,12 +1249,12 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) let v55 : bool = '\\' = v53 if v55 then let v56 : US5 = US5_1(v53) - method15(v0, v1, v54, v3, v56) + method14(v0, v1, v54, v3, v56) else let v59 : bool = '`' = v53 if v59 then let v60 : US5 = US5_1(v53) - method15(v0, v1, v54, v3, v60) + method14(v0, v1, v54, v3, v60) else let v63 : bool = 0uy = v51 if v63 then @@ -1263,25 +1264,25 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) if v65 then let v66 : string = $"{v0}{v52}\"" let v67 : US5 = US5_2(v51, v52) - method15(v66, v1, v54, v3, v67) + method14(v66, v1, v54, v3, v67) else let v70 : bool = ' ' = v53 if v70 then let v71 : string = $"{v0} " - method16(v71, v1, v54, v3) + method15(v71, v1, v54, v3) else let v74 : bool = 1uy = v51 if v74 then let v75 : bool = v3 <> v3 if v75 then let v76 : string = $"{v0}\{v53}" - method16(v76, v1, v54, v3) + method15(v76, v1, v54, v3) else let v79 : string = $"{v0}{v53}" - method16(v79, v1, v54, v3) + method15(v79, v1, v54, v3) else let v84 : string = $"{v0}{v53}" - method16(v84, v1, v54, v3) + method15(v84, v1, v54, v3) else let v93 : bool = '`' = v52 if v93 then @@ -1289,73 +1290,73 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) if v94 then let v95 : string = $"{v0}{v52}\"" let v96 : US5 = US5_2(v51, v52) - method15(v95, v1, v54, v3, v96) + method14(v95, v1, v54, v3, v96) else let v99 : bool = ' ' = v53 if v99 then let v100 : string = $"{v0} " - method16(v100, v1, v54, v3) + method15(v100, v1, v54, v3) else let v103 : bool = 1uy = v51 if v103 then let v104 : bool = v3 <> v3 if v104 then let v105 : string = $"{v0}\{v53}" - method16(v105, v1, v54, v3) + method15(v105, v1, v54, v3) else let v108 : string = $"{v0}{v53}" - method16(v108, v1, v54, v3) + method15(v108, v1, v54, v3) else let v113 : string = $"{v0}{v53}" - method16(v113, v1, v54, v3) + method15(v113, v1, v54, v3) else let v122 : bool = '"' = v53 if v122 then let v123 : string = $"{v0}{v52}\"" let v124 : US5 = US5_2(v51, v52) - method15(v123, v1, v54, v3, v124) + method14(v123, v1, v54, v3, v124) else let v127 : bool = ' ' = v53 if v127 then let v128 : string = $"{v0} " - method16(v128, v1, v54, v3) + method15(v128, v1, v54, v3) else let v131 : bool = 1uy = v51 if v131 then let v132 : bool = v3 <> v3 if v132 then let v133 : string = $"{v0}\{v53}" - method16(v133, v1, v54, v3) + method15(v133, v1, v54, v3) else let v136 : string = $"{v0}{v53}" - method16(v136, v1, v54, v3) + method15(v136, v1, v54, v3) else let v141 : string = $"{v0}{v53}" - method16(v141, v1, v54, v3) + method15(v141, v1, v54, v3) else let v154 : bool = '"' = v53 if v154 then let v155 : string = $"{v0}{v52}\"" let v156 : US5 = US5_2(v51, v52) - method15(v155, v1, v54, v3, v156) + method14(v155, v1, v54, v3, v156) else let v159 : bool = ' ' = v53 if v159 then let v160 : string = $"{v0} " - method16(v160, v1, v54, v3) + method15(v160, v1, v54, v3) else let v163 : bool = 1uy = v51 if v163 then let v164 : bool = v3 <> v3 if v164 then let v165 : string = $"{v0}\{v53}" - method16(v165, v1, v54, v3) + method15(v165, v1, v54, v3) else let v168 : string = $"{v0}{v53}" - method16(v168, v1, v54, v3) + method15(v168, v1, v54, v3) else let v173 : string = $"{v0}{v53}" - method16(v173, v1, v54, v3) + method15(v173, v1, v54, v3) | _ -> let v188 : bool = 0uy = v51 if v188 then @@ -1370,7 +1371,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v193 : UH0 = UH0_0 let v194 : UH0 = UH0_1(v0, v193) - method17(v1, v194) + method16(v1, v194) struct (v196, v0) else let v198 : bool = v0 = "" @@ -1380,7 +1381,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v199 : UH0 = UH0_0 let v200 : UH0 = UH0_1(v0, v199) - method17(v1, v200) + method16(v1, v200) struct (v202, v0) else let v205 : bool = '`' = v52 @@ -1394,7 +1395,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v209 : UH0 = UH0_0 let v210 : UH0 = UH0_1(v0, v209) - method17(v1, v210) + method16(v1, v210) struct (v212, v0) else let v214 : bool = v0 = "" @@ -1404,7 +1405,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v215 : UH0 = UH0_0 let v216 : UH0 = UH0_1(v0, v215) - method17(v1, v216) + method16(v1, v216) struct (v218, v0) else let v221 : bool = 1uy = v51 @@ -1416,7 +1417,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v224 : UH0 = UH0_0 let v225 : UH0 = UH0_1(v0, v224) - method17(v1, v225) + method16(v1, v225) struct (v227, v0) else let v229 : bool = v0 = "" @@ -1426,7 +1427,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v230 : UH0 = UH0_0 let v231 : UH0 = UH0_1(v0, v230) - method17(v1, v231) + method16(v1, v231) struct (v233, v0) else let v240 : bool = 1uy = v51 @@ -1438,7 +1439,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v243 : UH0 = UH0_0 let v244 : UH0 = UH0_1(v0, v243) - method17(v1, v244) + method16(v1, v244) struct (v246, v0) else let v248 : bool = v0 = "" @@ -1448,7 +1449,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v249 : UH0 = UH0_0 let v250 : UH0 = UH0_1(v0, v249) - method17(v1, v250) + method16(v1, v250) struct (v252, v0) | US5_1(v259) -> (* Quoted *) let v260 : bool = '"' = v259 @@ -1458,7 +1459,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) let v263 : bool = '"' = v261 if v263 then let v264 : US5 = US5_0 - method15(v0, v1, v262, v3, v264) + method14(v0, v1, v262, v3, v264) else let v267 : bool = '\\' = v259 if v267 then @@ -1466,21 +1467,21 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) if v268 then let v269 : uint8 = 0uy let v270 : US5 = US5_2(v269, v261) - method15(v0, v1, v262, v3, v270) + method14(v0, v1, v262, v3, v270) else let v273 : bool = '`' = v261 if v273 then let v274 : uint8 = 0uy let v275 : US5 = US5_2(v274, v261) - method15(v0, v1, v262, v3, v275) + method14(v0, v1, v262, v3, v275) else let v278 : bool = ' ' = v261 if v278 then let v279 : string = $"{v0} " - method16(v279, v1, v262, v3) + method15(v279, v1, v262, v3) else let v282 : string = $"{v0}{v261}" - method16(v282, v1, v262, v3) + method15(v282, v1, v262, v3) else let v291 : bool = '`' = v259 if v291 then @@ -1488,41 +1489,41 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) if v292 then let v293 : uint8 = 0uy let v294 : US5 = US5_2(v293, v261) - method15(v0, v1, v262, v3, v294) + method14(v0, v1, v262, v3, v294) else let v297 : bool = '`' = v261 if v297 then let v298 : uint8 = 0uy let v299 : US5 = US5_2(v298, v261) - method15(v0, v1, v262, v3, v299) + method14(v0, v1, v262, v3, v299) else let v302 : bool = ' ' = v261 if v302 then let v303 : string = $"{v0} " - method16(v303, v1, v262, v3) + method15(v303, v1, v262, v3) else let v306 : string = $"{v0}{v261}" - method16(v306, v1, v262, v3) + method15(v306, v1, v262, v3) else let v315 : bool = '\\' = v261 if v315 then let v316 : uint8 = 0uy let v317 : US5 = US5_2(v316, v261) - method15(v0, v1, v262, v3, v317) + method14(v0, v1, v262, v3, v317) else let v320 : bool = '`' = v261 if v320 then let v321 : uint8 = 0uy let v322 : US5 = US5_2(v321, v261) - method15(v0, v1, v262, v3, v322) + method14(v0, v1, v262, v3, v322) else let v325 : bool = ' ' = v261 if v325 then let v326 : string = $"{v0} " - method16(v326, v1, v262, v3) + method15(v326, v1, v262, v3) else let v329 : string = $"{v0}{v261}" - method16(v329, v1, v262, v3) + method15(v329, v1, v262, v3) | _ -> let v344 : bool = '\\' = v259 if v344 then @@ -1533,7 +1534,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v347 : UH0 = UH0_0 let v348 : UH0 = UH0_1(v0, v347) - method17(v1, v348) + method16(v1, v348) struct (v350, v0) else let v351 : bool = '`' = v259 @@ -1545,7 +1546,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v354 : UH0 = UH0_0 let v355 : UH0 = UH0_1(v0, v354) - method17(v1, v355) + method16(v1, v355) struct (v357, v0) else let v359 : bool = v0 = "" @@ -1555,7 +1556,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v360 : UH0 = UH0_0 let v361 : UH0 = UH0_1(v0, v360) - method17(v1, v361) + method16(v1, v361) struct (v363, v0) else let v370 : bool = '\\' = v259 @@ -1577,32 +1578,32 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) let v379 : string = $"{v0}{v259}\"" let v380 : char = '"' let v381 : US5 = US5_1(v380) - method15(v379, v1, v372, v3, v381) + method14(v379, v1, v372, v3, v381) else let v384 : string = $"{v0}{v259}\"" let v385 : char = '"' let v386 : US5 = US5_1(v385) - method15(v384, v1, v372, v3, v386) + method14(v384, v1, v372, v3, v386) else let v391 : bool = '\\' = v371 if v391 then let v392 : uint8 = 0uy let v393 : US5 = US5_2(v392, v371) - method15(v0, v1, v372, v3, v393) + method14(v0, v1, v372, v3, v393) else let v396 : bool = '`' = v371 if v396 then let v397 : uint8 = 0uy let v398 : US5 = US5_2(v397, v371) - method15(v0, v1, v372, v3, v398) + method14(v0, v1, v372, v3, v398) else let v401 : bool = ' ' = v371 if v401 then let v402 : string = $"{v0} " - method16(v402, v1, v372, v3) + method15(v402, v1, v372, v3) else let v405 : string = $"{v0}{v371}" - method16(v405, v1, v372, v3) + method15(v405, v1, v372, v3) | _ -> let v417 : bool = v0 = "" let v421 : UH0 = @@ -1611,7 +1612,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v418 : UH0 = UH0_0 let v419 : UH0 = UH0_1(v0, v418) - method17(v1, v419) + method16(v1, v419) struct (v421, v0) else let v424 : bool = '`' = v259 @@ -1633,32 +1634,32 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) let v433 : string = $"{v0}{v259}\"" let v434 : char = '"' let v435 : US5 = US5_1(v434) - method15(v433, v1, v426, v3, v435) + method14(v433, v1, v426, v3, v435) else let v438 : string = $"{v0}{v259}\"" let v439 : char = '"' let v440 : US5 = US5_1(v439) - method15(v438, v1, v426, v3, v440) + method14(v438, v1, v426, v3, v440) else let v445 : bool = '\\' = v425 if v445 then let v446 : uint8 = 0uy let v447 : US5 = US5_2(v446, v425) - method15(v0, v1, v426, v3, v447) + method14(v0, v1, v426, v3, v447) else let v450 : bool = '`' = v425 if v450 then let v451 : uint8 = 0uy let v452 : US5 = US5_2(v451, v425) - method15(v0, v1, v426, v3, v452) + method14(v0, v1, v426, v3, v452) else let v455 : bool = ' ' = v425 if v455 then let v456 : string = $"{v0} " - method16(v456, v1, v426, v3) + method15(v456, v1, v426, v3) else let v459 : string = $"{v0}{v425}" - method16(v459, v1, v426, v3) + method15(v459, v1, v426, v3) | _ -> let v471 : bool = v0 = "" let v475 : UH0 = @@ -1667,7 +1668,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v472 : UH0 = UH0_0 let v473 : UH0 = UH0_1(v0, v472) - method17(v1, v473) + method16(v1, v473) struct (v475, v0) else match v2 with @@ -1676,30 +1677,30 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) if v480 then let v481 : uint8 = 0uy let v482 : US5 = US5_2(v481, v478) - method15(v0, v1, v479, v3, v482) + method14(v0, v1, v479, v3, v482) else let v485 : bool = '`' = v478 if v485 then let v486 : uint8 = 0uy let v487 : US5 = US5_2(v486, v478) - method15(v0, v1, v479, v3, v487) + method14(v0, v1, v479, v3, v487) else let v490 : bool = '"' = v478 if v490 then let v491 : UH0 = UH0_0 let v492 : UH0 = UH0_1(v0, v491) - let v493 : UH0 = method17(v1, v492) + let v493 : UH0 = method16(v1, v492) let v494 : string = "" let v495 : US5 = US5_0 - method15(v494, v493, v479, v3, v495) + method14(v494, v493, v479, v3, v495) else let v498 : bool = ' ' = v478 if v498 then let v499 : string = $"{v0} " - method16(v499, v1, v479, v3) + method15(v499, v1, v479, v3) else let v502 : string = $"{v0}{v478}" - method16(v502, v1, v479, v3) + method15(v502, v1, v479, v3) | _ -> let v514 : bool = v0 = "" let v518 : UH0 = @@ -1708,7 +1709,7 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v515 : UH0 = UH0_0 let v516 : UH0 = UH0_1(v0, v515) - method17(v1, v516) + method16(v1, v516) struct (v518, v0) | US5_0 -> (* Start *) match v2 with @@ -1718,19 +1719,19 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) let v7 : string = "" let v8 : char = '"' let v9 : US5 = US5_1(v8) - method15(v7, v1, v5, v3, v9) + method14(v7, v1, v5, v3, v9) else let v12 : bool = '\\' = v4 if v12 then let v13 : uint8 = 0uy let v14 : US5 = US5_2(v13, v4) - method15(v0, v1, v5, v3, v14) + method14(v0, v1, v5, v3, v14) else let v17 : bool = '`' = v4 if v17 then let v18 : uint8 = 0uy let v19 : US5 = US5_2(v18, v4) - method15(v0, v1, v5, v3, v19) + method14(v0, v1, v5, v3, v19) else let v22 : bool = ' ' = v4 if v22 then @@ -1741,12 +1742,12 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v25 : UH0 = UH0_0 let v26 : UH0 = UH0_1(v0, v25) - method17(v1, v26) + method16(v1, v26) let v29 : string = "" - method16(v29, v28, v5, v3) + method15(v29, v28, v5, v3) else let v32 : string = $"{v0}{v4}" - method16(v32, v1, v5, v3) + method15(v32, v1, v5, v3) | _ -> let v44 : bool = v0 = "" let v48 : UH0 = @@ -1755,9 +1756,9 @@ and method16 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5) : struct (UH0 * string) else let v45 : UH0 = UH0_0 let v46 : UH0 = UH0_1(v0, v45) - method17(v1, v46) + method16(v1, v46) struct (v48, v0) -and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 * string) = +and method14 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 * string) = match v4 with | US5_2(v52, v53) -> (* Escaped *) match v2 with @@ -1765,18 +1766,18 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v56 : bool = '\\' = v54 if v56 then let v57 : US5 = US5_1(v54) - method15(v0, v1, v55, v4, v57) + method14(v0, v1, v55, v4, v57) else let v60 : bool = '`' = v54 if v60 then let v61 : US5 = US5_1(v54) - method15(v0, v1, v55, v4, v61) + method14(v0, v1, v55, v4, v61) else match v3 with | US5_0 -> (* Start *) let v64 : bool = '"' = v54 if v64 then - method16(v0, v1, v55, v4) + method15(v0, v1, v55, v4) else let v67 : bool = 0uy = v52 if v67 then @@ -1785,76 +1786,76 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v69 : bool = ' ' = v54 if v69 then let v70 : string = $"{v0} " - method16(v70, v1, v55, v4) + method15(v70, v1, v55, v4) else let v73 : bool = 1uy = v52 if v73 then let v74 : bool = v3 <> v4 if v74 then let v75 : string = $"{v0}\{v54}" - method15(v75, v1, v55, v4, v3) + method14(v75, v1, v55, v4, v3) else let v78 : string = $"{v0}{v54}" - method16(v78, v1, v55, v4) + method15(v78, v1, v55, v4) else let v83 : string = $"{v0}{v54}" - method16(v83, v1, v55, v4) + method15(v83, v1, v55, v4) else let v90 : bool = '`' = v53 if v90 then let v91 : bool = ' ' = v54 if v91 then let v92 : string = $"{v0} " - method16(v92, v1, v55, v4) + method15(v92, v1, v55, v4) else let v95 : bool = 1uy = v52 if v95 then let v96 : bool = v3 <> v4 if v96 then let v97 : string = $"{v0}\{v54}" - method15(v97, v1, v55, v4, v3) + method14(v97, v1, v55, v4, v3) else let v100 : string = $"{v0}{v54}" - method16(v100, v1, v55, v4) + method15(v100, v1, v55, v4) else let v105 : string = $"{v0}{v54}" - method16(v105, v1, v55, v4) + method15(v105, v1, v55, v4) else let v112 : bool = ' ' = v54 if v112 then let v113 : string = $"{v0} " - method16(v113, v1, v55, v4) + method15(v113, v1, v55, v4) else let v116 : bool = 1uy = v52 if v116 then let v117 : bool = v3 <> v4 if v117 then let v118 : string = $"{v0}\{v54}" - method15(v118, v1, v55, v4, v3) + method14(v118, v1, v55, v4, v3) else let v121 : string = $"{v0}{v54}" - method16(v121, v1, v55, v4) + method15(v121, v1, v55, v4) else let v126 : string = $"{v0}{v54}" - method16(v126, v1, v55, v4) + method15(v126, v1, v55, v4) else let v137 : bool = ' ' = v54 if v137 then let v138 : string = $"{v0} " - method16(v138, v1, v55, v4) + method15(v138, v1, v55, v4) else let v141 : bool = 1uy = v52 if v141 then let v142 : bool = v3 <> v4 if v142 then let v143 : string = $"{v0}\{v54}" - method15(v143, v1, v55, v4, v3) + method14(v143, v1, v55, v4, v3) else let v146 : string = $"{v0}{v54}" - method16(v146, v1, v55, v4) + method15(v146, v1, v55, v4) else let v151 : string = $"{v0}{v54}" - method16(v151, v1, v55, v4) + method15(v151, v1, v55, v4) | _ -> let v162 : bool = 0uy = v52 if v162 then @@ -1867,55 +1868,55 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v166 : string = $"{v0}{v53}{v54}" let v167 : char = '"' let v168 : US5 = US5_1(v167) - method15(v166, v1, v55, v4, v168) + method14(v166, v1, v55, v4, v168) else let v171 : bool = '"' = v54 if v171 then let v172 : string = $"{v0}{v53}\"" let v173 : US5 = US5_2(v52, v53) - method15(v172, v1, v55, v4, v173) + method14(v172, v1, v55, v4, v173) else let v176 : bool = ' ' = v54 if v176 then let v177 : string = $"{v0} " - method16(v177, v1, v55, v4) + method15(v177, v1, v55, v4) else let v180 : bool = 1uy = v52 if v180 then let v181 : bool = v3 <> v4 if v181 then let v182 : string = $"{v0}\{v54}" - method15(v182, v1, v55, v4, v3) + method14(v182, v1, v55, v4, v3) else let v185 : string = $"{v0}{v54}" - method16(v185, v1, v55, v4) + method15(v185, v1, v55, v4) else let v190 : string = $"{v0}{v54}" - method16(v190, v1, v55, v4) + method15(v190, v1, v55, v4) | _ -> let v201 : bool = '"' = v54 if v201 then let v202 : string = $"{v0}{v53}\"" let v203 : US5 = US5_2(v52, v53) - method15(v202, v1, v55, v4, v203) + method14(v202, v1, v55, v4, v203) else let v206 : bool = ' ' = v54 if v206 then let v207 : string = $"{v0} " - method16(v207, v1, v55, v4) + method15(v207, v1, v55, v4) else let v210 : bool = 1uy = v52 if v210 then let v211 : bool = v3 <> v4 if v211 then let v212 : string = $"{v0}\{v54}" - method15(v212, v1, v55, v4, v3) + method14(v212, v1, v55, v4, v3) else let v215 : string = $"{v0}{v54}" - method16(v215, v1, v55, v4) + method15(v215, v1, v55, v4) else let v220 : string = $"{v0}{v54}" - method16(v220, v1, v55, v4) + method15(v220, v1, v55, v4) else let v231 : bool = '`' = v53 if v231 then @@ -1926,103 +1927,103 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v234 : string = $"{v0}{v53}{v54}" let v235 : char = '"' let v236 : US5 = US5_1(v235) - method15(v234, v1, v55, v4, v236) + method14(v234, v1, v55, v4, v236) else let v239 : bool = '"' = v54 if v239 then let v240 : string = $"{v0}{v53}\"" let v241 : US5 = US5_2(v52, v53) - method15(v240, v1, v55, v4, v241) + method14(v240, v1, v55, v4, v241) else let v244 : bool = ' ' = v54 if v244 then let v245 : string = $"{v0} " - method16(v245, v1, v55, v4) + method15(v245, v1, v55, v4) else let v248 : bool = 1uy = v52 if v248 then let v249 : bool = v3 <> v4 if v249 then let v250 : string = $"{v0}\{v54}" - method15(v250, v1, v55, v4, v3) + method14(v250, v1, v55, v4, v3) else let v253 : string = $"{v0}{v54}" - method16(v253, v1, v55, v4) + method15(v253, v1, v55, v4) else let v258 : string = $"{v0}{v54}" - method16(v258, v1, v55, v4) + method15(v258, v1, v55, v4) | _ -> let v269 : bool = '"' = v54 if v269 then let v270 : string = $"{v0}{v53}\"" let v271 : US5 = US5_2(v52, v53) - method15(v270, v1, v55, v4, v271) + method14(v270, v1, v55, v4, v271) else let v274 : bool = ' ' = v54 if v274 then let v275 : string = $"{v0} " - method16(v275, v1, v55, v4) + method15(v275, v1, v55, v4) else let v278 : bool = 1uy = v52 if v278 then let v279 : bool = v3 <> v4 if v279 then let v280 : string = $"{v0}\{v54}" - method15(v280, v1, v55, v4, v3) + method14(v280, v1, v55, v4, v3) else let v283 : string = $"{v0}{v54}" - method16(v283, v1, v55, v4) + method15(v283, v1, v55, v4) else let v288 : string = $"{v0}{v54}" - method16(v288, v1, v55, v4) + method15(v288, v1, v55, v4) else let v299 : bool = '"' = v54 if v299 then let v300 : string = $"{v0}{v53}\"" let v301 : US5 = US5_2(v52, v53) - method15(v300, v1, v55, v4, v301) + method14(v300, v1, v55, v4, v301) else let v304 : bool = ' ' = v54 if v304 then let v305 : string = $"{v0} " - method16(v305, v1, v55, v4) + method15(v305, v1, v55, v4) else let v308 : bool = 1uy = v52 if v308 then let v309 : bool = v3 <> v4 if v309 then let v310 : string = $"{v0}\{v54}" - method15(v310, v1, v55, v4, v3) + method14(v310, v1, v55, v4, v3) else let v313 : string = $"{v0}{v54}" - method16(v313, v1, v55, v4) + method15(v313, v1, v55, v4) else let v318 : string = $"{v0}{v54}" - method16(v318, v1, v55, v4) + method15(v318, v1, v55, v4) else let v331 : bool = '"' = v54 if v331 then let v332 : string = $"{v0}{v53}\"" let v333 : US5 = US5_2(v52, v53) - method15(v332, v1, v55, v4, v333) + method14(v332, v1, v55, v4, v333) else let v336 : bool = ' ' = v54 if v336 then let v337 : string = $"{v0} " - method16(v337, v1, v55, v4) + method15(v337, v1, v55, v4) else let v340 : bool = 1uy = v52 if v340 then let v341 : bool = v3 <> v4 if v341 then let v342 : string = $"{v0}\{v54}" - method15(v342, v1, v55, v4, v3) + method14(v342, v1, v55, v4, v3) else let v345 : string = $"{v0}{v54}" - method16(v345, v1, v55, v4) + method15(v345, v1, v55, v4) else let v350 : string = $"{v0}{v54}" - method16(v350, v1, v55, v4) + method15(v350, v1, v55, v4) | _ -> match v3 with | US5_0 -> (* Start *) @@ -2039,7 +2040,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v372 : UH0 = UH0_0 let v373 : UH0 = UH0_1(v0, v372) - method17(v1, v373) + method16(v1, v373) struct (v375, v0) else let v377 : bool = v0 = "" @@ -2049,7 +2050,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v378 : UH0 = UH0_0 let v379 : UH0 = UH0_1(v0, v378) - method17(v1, v379) + method16(v1, v379) struct (v381, v0) else let v384 : bool = '`' = v53 @@ -2063,7 +2064,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v388 : UH0 = UH0_0 let v389 : UH0 = UH0_1(v0, v388) - method17(v1, v389) + method16(v1, v389) struct (v391, v0) else let v393 : bool = v0 = "" @@ -2073,7 +2074,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v394 : UH0 = UH0_0 let v395 : UH0 = UH0_1(v0, v394) - method17(v1, v395) + method16(v1, v395) struct (v397, v0) else let v400 : bool = 1uy = v52 @@ -2085,7 +2086,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v403 : UH0 = UH0_0 let v404 : UH0 = UH0_1(v0, v403) - method17(v1, v404) + method16(v1, v404) struct (v406, v0) else let v408 : bool = v0 = "" @@ -2095,7 +2096,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v409 : UH0 = UH0_0 let v410 : UH0 = UH0_1(v0, v409) - method17(v1, v410) + method16(v1, v410) struct (v412, v0) else let v419 : bool = 1uy = v52 @@ -2107,7 +2108,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v422 : UH0 = UH0_0 let v423 : UH0 = UH0_1(v0, v422) - method17(v1, v423) + method16(v1, v423) struct (v425, v0) else let v427 : bool = v0 = "" @@ -2117,7 +2118,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v428 : UH0 = UH0_0 let v429 : UH0 = UH0_1(v0, v428) - method17(v1, v429) + method16(v1, v429) struct (v431, v0) | _ -> let v436 : bool = 0uy = v52 @@ -2137,7 +2138,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v443 : UH0 = UH0_0 let v444 : UH0 = UH0_1(v0, v443) - method17(v1, v444) + method16(v1, v444) struct (v446, v0) else let v448 : bool = v0 = "" @@ -2147,7 +2148,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v449 : UH0 = UH0_0 let v450 : UH0 = UH0_1(v0, v449) - method17(v1, v450) + method16(v1, v450) struct (v452, v0) else let v455 : bool = 1uy = v52 @@ -2159,7 +2160,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v458 : UH0 = UH0_0 let v459 : UH0 = UH0_1(v0, v458) - method17(v1, v459) + method16(v1, v459) struct (v461, v0) else let v463 : bool = v0 = "" @@ -2169,7 +2170,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v464 : UH0 = UH0_0 let v465 : UH0 = UH0_1(v0, v464) - method17(v1, v465) + method16(v1, v465) struct (v467, v0) | _ -> let v472 : bool = 1uy = v52 @@ -2181,7 +2182,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v475 : UH0 = UH0_0 let v476 : UH0 = UH0_1(v0, v475) - method17(v1, v476) + method16(v1, v476) struct (v478, v0) else let v480 : bool = v0 = "" @@ -2191,7 +2192,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v481 : UH0 = UH0_0 let v482 : UH0 = UH0_1(v0, v481) - method17(v1, v482) + method16(v1, v482) struct (v484, v0) else let v489 : bool = '`' = v53 @@ -2209,7 +2210,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v495 : UH0 = UH0_0 let v496 : UH0 = UH0_1(v0, v495) - method17(v1, v496) + method16(v1, v496) struct (v498, v0) else let v500 : bool = v0 = "" @@ -2219,7 +2220,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v501 : UH0 = UH0_0 let v502 : UH0 = UH0_1(v0, v501) - method17(v1, v502) + method16(v1, v502) struct (v504, v0) else let v507 : bool = 1uy = v52 @@ -2231,7 +2232,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v510 : UH0 = UH0_0 let v511 : UH0 = UH0_1(v0, v510) - method17(v1, v511) + method16(v1, v511) struct (v513, v0) else let v515 : bool = v0 = "" @@ -2241,7 +2242,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v516 : UH0 = UH0_0 let v517 : UH0 = UH0_1(v0, v516) - method17(v1, v517) + method16(v1, v517) struct (v519, v0) | _ -> let v524 : bool = 1uy = v52 @@ -2253,7 +2254,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v527 : UH0 = UH0_0 let v528 : UH0 = UH0_1(v0, v527) - method17(v1, v528) + method16(v1, v528) struct (v530, v0) else let v532 : bool = v0 = "" @@ -2263,7 +2264,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v533 : UH0 = UH0_0 let v534 : UH0 = UH0_1(v0, v533) - method17(v1, v534) + method16(v1, v534) struct (v536, v0) else let v541 : bool = 1uy = v52 @@ -2275,7 +2276,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v544 : UH0 = UH0_0 let v545 : UH0 = UH0_1(v0, v544) - method17(v1, v545) + method16(v1, v545) struct (v547, v0) else let v549 : bool = v0 = "" @@ -2285,7 +2286,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v550 : UH0 = UH0_0 let v551 : UH0 = UH0_1(v0, v550) - method17(v1, v551) + method16(v1, v551) struct (v553, v0) else let v560 : bool = 1uy = v52 @@ -2297,7 +2298,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v563 : UH0 = UH0_0 let v564 : UH0 = UH0_1(v0, v563) - method17(v1, v564) + method16(v1, v564) struct (v566, v0) else let v568 : bool = v0 = "" @@ -2307,7 +2308,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v569 : UH0 = UH0_0 let v570 : UH0 = UH0_1(v0, v569) - method17(v1, v570) + method16(v1, v570) struct (v572, v0) | US5_1(v581) -> (* Quoted *) let v582 : bool = '"' = v581 @@ -2319,7 +2320,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v586 : bool = '"' = v584 if v586 then let v587 : US5 = US5_0 - method15(v0, v1, v585, v4, v587) + method14(v0, v1, v585, v4, v587) else let v590 : bool = '\\' = v581 if v590 then @@ -2327,21 +2328,21 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 if v591 then let v592 : uint8 = 0uy let v593 : US5 = US5_2(v592, v584) - method15(v0, v1, v585, v4, v593) + method14(v0, v1, v585, v4, v593) else let v596 : bool = '`' = v584 if v596 then let v597 : uint8 = 0uy let v598 : US5 = US5_2(v597, v584) - method15(v0, v1, v585, v4, v598) + method14(v0, v1, v585, v4, v598) else let v601 : bool = ' ' = v584 if v601 then let v602 : string = $"{v0} " - method16(v602, v1, v585, v4) + method15(v602, v1, v585, v4) else let v605 : string = $"{v0}{v584}" - method16(v605, v1, v585, v4) + method15(v605, v1, v585, v4) else let v614 : bool = '`' = v581 if v614 then @@ -2349,41 +2350,41 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 if v615 then let v616 : uint8 = 0uy let v617 : US5 = US5_2(v616, v584) - method15(v0, v1, v585, v4, v617) + method14(v0, v1, v585, v4, v617) else let v620 : bool = '`' = v584 if v620 then let v621 : uint8 = 0uy let v622 : US5 = US5_2(v621, v584) - method15(v0, v1, v585, v4, v622) + method14(v0, v1, v585, v4, v622) else let v625 : bool = ' ' = v584 if v625 then let v626 : string = $"{v0} " - method16(v626, v1, v585, v4) + method15(v626, v1, v585, v4) else let v629 : string = $"{v0}{v584}" - method16(v629, v1, v585, v4) + method15(v629, v1, v585, v4) else let v638 : bool = '\\' = v584 if v638 then let v639 : uint8 = 0uy let v640 : US5 = US5_2(v639, v584) - method15(v0, v1, v585, v4, v640) + method14(v0, v1, v585, v4, v640) else let v643 : bool = '`' = v584 if v643 then let v644 : uint8 = 0uy let v645 : US5 = US5_2(v644, v584) - method15(v0, v1, v585, v4, v645) + method14(v0, v1, v585, v4, v645) else let v648 : bool = ' ' = v584 if v648 then let v649 : string = $"{v0} " - method16(v649, v1, v585, v4) + method15(v649, v1, v585, v4) else let v652 : string = $"{v0}{v584}" - method16(v652, v1, v585, v4) + method15(v652, v1, v585, v4) | _ -> let v667 : bool = '\\' = v581 if v667 then @@ -2394,7 +2395,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v670 : UH0 = UH0_0 let v671 : UH0 = UH0_1(v0, v670) - method17(v1, v671) + method16(v1, v671) struct (v673, v0) else let v674 : bool = '`' = v581 @@ -2406,7 +2407,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v677 : UH0 = UH0_0 let v678 : UH0 = UH0_1(v0, v677) - method17(v1, v678) + method16(v1, v678) struct (v680, v0) else let v682 : bool = v0 = "" @@ -2416,7 +2417,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v683 : UH0 = UH0_0 let v684 : UH0 = UH0_1(v0, v683) - method17(v1, v684) + method16(v1, v684) struct (v686, v0) | _ -> let v693 : bool = '\\' = v581 @@ -2438,22 +2439,22 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v702 : string = $"{v0}{v581}\"" let v703 : char = '"' let v704 : US5 = US5_1(v703) - method15(v702, v1, v695, v4, v704) + method14(v702, v1, v695, v4, v704) else let v707 : US5 = US5_0 - method15(v0, v1, v695, v4, v707) + method14(v0, v1, v695, v4, v707) else let v712 : bool = '\\' = v694 if v712 then let v713 : uint8 = 1uy let v714 : US5 = US5_2(v713, v694) - method15(v0, v1, v695, v4, v714) + method14(v0, v1, v695, v4, v714) else let v717 : bool = '`' = v694 if v717 then let v718 : uint8 = 1uy let v719 : US5 = US5_2(v718, v694) - method15(v0, v1, v695, v4, v719) + method14(v0, v1, v695, v4, v719) else match v3 with | US5_2(v722, v723) -> (* Escaped *) @@ -2462,26 +2463,26 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v725 : bool = ' ' = v694 if v725 then let v726 : string = $"{v0} " - method16(v726, v1, v695, v4) + method15(v726, v1, v695, v4) else let v729 : string = $"{v0}{v694}" - method16(v729, v1, v695, v4) + method15(v729, v1, v695, v4) else let v734 : bool = ' ' = v694 if v734 then let v735 : string = $"{v0} " - method16(v735, v1, v695, v4) + method15(v735, v1, v695, v4) else let v738 : string = $"{v0}{v694}" - method16(v738, v1, v695, v4) + method15(v738, v1, v695, v4) | _ -> let v745 : bool = ' ' = v694 if v745 then let v746 : string = $"{v0} " - method16(v746, v1, v695, v4) + method15(v746, v1, v695, v4) else let v749 : string = $"{v0}{v694}" - method16(v749, v1, v695, v4) + method15(v749, v1, v695, v4) | _ -> match v3 with | US5_2(v762, v763) -> (* Escaped *) @@ -2494,7 +2495,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v767 : UH0 = UH0_0 let v768 : UH0 = UH0_1(v0, v767) - method17(v1, v768) + method16(v1, v768) struct (v770, v0) else let v772 : bool = v0 = "" @@ -2504,7 +2505,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v773 : UH0 = UH0_0 let v774 : UH0 = UH0_1(v0, v773) - method17(v1, v774) + method16(v1, v774) struct (v776, v0) | _ -> let v780 : bool = v0 = "" @@ -2514,7 +2515,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v781 : UH0 = UH0_0 let v782 : UH0 = UH0_1(v0, v781) - method17(v1, v782) + method16(v1, v782) struct (v784, v0) else let v789 : bool = '`' = v581 @@ -2536,22 +2537,22 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v798 : string = $"{v0}{v581}\"" let v799 : char = '"' let v800 : US5 = US5_1(v799) - method15(v798, v1, v791, v4, v800) + method14(v798, v1, v791, v4, v800) else let v803 : US5 = US5_0 - method15(v0, v1, v791, v4, v803) + method14(v0, v1, v791, v4, v803) else let v808 : bool = '\\' = v790 if v808 then let v809 : uint8 = 1uy let v810 : US5 = US5_2(v809, v790) - method15(v0, v1, v791, v4, v810) + method14(v0, v1, v791, v4, v810) else let v813 : bool = '`' = v790 if v813 then let v814 : uint8 = 1uy let v815 : US5 = US5_2(v814, v790) - method15(v0, v1, v791, v4, v815) + method14(v0, v1, v791, v4, v815) else match v3 with | US5_2(v818, v819) -> (* Escaped *) @@ -2560,26 +2561,26 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v821 : bool = ' ' = v790 if v821 then let v822 : string = $"{v0} " - method16(v822, v1, v791, v4) + method15(v822, v1, v791, v4) else let v825 : string = $"{v0}{v790}" - method16(v825, v1, v791, v4) + method15(v825, v1, v791, v4) else let v830 : bool = ' ' = v790 if v830 then let v831 : string = $"{v0} " - method16(v831, v1, v791, v4) + method15(v831, v1, v791, v4) else let v834 : string = $"{v0}{v790}" - method16(v834, v1, v791, v4) + method15(v834, v1, v791, v4) | _ -> let v841 : bool = ' ' = v790 if v841 then let v842 : string = $"{v0} " - method16(v842, v1, v791, v4) + method15(v842, v1, v791, v4) else let v845 : string = $"{v0}{v790}" - method16(v845, v1, v791, v4) + method15(v845, v1, v791, v4) | _ -> match v3 with | US5_2(v858, v859) -> (* Escaped *) @@ -2592,7 +2593,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v863 : UH0 = UH0_0 let v864 : UH0 = UH0_1(v0, v863) - method17(v1, v864) + method16(v1, v864) struct (v866, v0) else let v868 : bool = v0 = "" @@ -2602,7 +2603,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v869 : UH0 = UH0_0 let v870 : UH0 = UH0_1(v0, v869) - method17(v1, v870) + method16(v1, v870) struct (v872, v0) | _ -> let v876 : bool = v0 = "" @@ -2612,7 +2613,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v877 : UH0 = UH0_0 let v878 : UH0 = UH0_1(v0, v877) - method17(v1, v878) + method16(v1, v878) struct (v880, v0) else match v2 with @@ -2621,13 +2622,13 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 if v887 then let v888 : uint8 = 1uy let v889 : US5 = US5_2(v888, v885) - method15(v0, v1, v886, v4, v889) + method14(v0, v1, v886, v4, v889) else let v892 : bool = '`' = v885 if v892 then let v893 : uint8 = 1uy let v894 : US5 = US5_2(v893, v885) - method15(v0, v1, v886, v4, v894) + method14(v0, v1, v886, v4, v894) else match v3 with | US5_2(v897, v898) -> (* Escaped *) @@ -2638,49 +2639,49 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v901 : string = $"{v0}" let v902 : char = '"' let v903 : US5 = US5_1(v902) - method15(v901, v1, v886, v4, v903) + method14(v901, v1, v886, v4, v903) else let v906 : bool = ' ' = v885 if v906 then let v907 : string = $"{v0} " - method16(v907, v1, v886, v4) + method15(v907, v1, v886, v4) else let v910 : string = $"{v0}{v885}" - method16(v910, v1, v886, v4) + method15(v910, v1, v886, v4) else let v917 : bool = '"' = v885 if v917 then let v918 : UH0 = UH0_0 let v919 : UH0 = UH0_1(v0, v918) - let v920 : UH0 = method17(v1, v919) + let v920 : UH0 = method16(v1, v919) let v921 : string = "" let v922 : US5 = US5_0 - method15(v921, v920, v886, v4, v922) + method14(v921, v920, v886, v4, v922) else let v925 : bool = ' ' = v885 if v925 then let v926 : string = $"{v0} " - method16(v926, v1, v886, v4) + method15(v926, v1, v886, v4) else let v929 : string = $"{v0}{v885}" - method16(v929, v1, v886, v4) + method15(v929, v1, v886, v4) | _ -> let v938 : bool = '"' = v885 if v938 then let v939 : UH0 = UH0_0 let v940 : UH0 = UH0_1(v0, v939) - let v941 : UH0 = method17(v1, v940) + let v941 : UH0 = method16(v1, v940) let v942 : string = "" let v943 : US5 = US5_0 - method15(v942, v941, v886, v4, v943) + method14(v942, v941, v886, v4, v943) else let v946 : bool = ' ' = v885 if v946 then let v947 : string = $"{v0} " - method16(v947, v1, v886, v4) + method15(v947, v1, v886, v4) else let v950 : string = $"{v0}{v885}" - method16(v950, v1, v886, v4) + method15(v950, v1, v886, v4) | _ -> match v3 with | US5_2(v963, v964) -> (* Escaped *) @@ -2693,7 +2694,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v968 : UH0 = UH0_0 let v969 : UH0 = UH0_1(v0, v968) - method17(v1, v969) + method16(v1, v969) struct (v971, v0) else let v973 : bool = v0 = "" @@ -2703,7 +2704,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v974 : UH0 = UH0_0 let v975 : UH0 = UH0_1(v0, v974) - method17(v1, v975) + method16(v1, v975) struct (v977, v0) | _ -> let v981 : bool = v0 = "" @@ -2713,7 +2714,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v982 : UH0 = UH0_0 let v983 : UH0 = UH0_1(v0, v982) - method17(v1, v983) + method16(v1, v983) struct (v985, v0) else let v996 : bool = '\\' = v581 @@ -2735,17 +2736,17 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v1005 : string = $"{v0}{v581}\"" let v1006 : char = '"' let v1007 : US5 = US5_1(v1006) - method15(v1005, v1, v998, v4, v1007) + method14(v1005, v1, v998, v4, v1007) else match v3 with | US5_1(v1010) -> (* Quoted *) let v1011 : string = $"{v0}{v581}\"" let v1012 : char = '"' let v1013 : US5 = US5_1(v1012) - method15(v1011, v1, v998, v4, v1013) + method14(v1011, v1, v998, v4, v1013) | _ -> let v1016 : US5 = US5_0 - method15(v0, v1, v998, v4, v1016) + method14(v0, v1, v998, v4, v1016) else match v3 with | US5_1(v1023) -> (* Quoted *) @@ -2753,33 +2754,33 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 if v1024 then let v1025 : uint8 = 0uy let v1026 : US5 = US5_2(v1025, v997) - method15(v0, v1, v998, v4, v1026) + method14(v0, v1, v998, v4, v1026) else let v1029 : bool = '`' = v997 if v1029 then let v1030 : uint8 = 0uy let v1031 : US5 = US5_2(v1030, v997) - method15(v0, v1, v998, v4, v1031) + method14(v0, v1, v998, v4, v1031) else let v1034 : bool = ' ' = v997 if v1034 then let v1035 : string = $"{v0} " - method16(v1035, v1, v998, v4) + method15(v1035, v1, v998, v4) else let v1038 : string = $"{v0}{v997}" - method16(v1038, v1, v998, v4) + method15(v1038, v1, v998, v4) | _ -> let v1047 : bool = '\\' = v997 if v1047 then let v1048 : uint8 = 1uy let v1049 : US5 = US5_2(v1048, v997) - method15(v0, v1, v998, v4, v1049) + method14(v0, v1, v998, v4, v1049) else let v1052 : bool = '`' = v997 if v1052 then let v1053 : uint8 = 1uy let v1054 : US5 = US5_2(v1053, v997) - method15(v0, v1, v998, v4, v1054) + method14(v0, v1, v998, v4, v1054) else match v3 with | US5_2(v1057, v1058) -> (* Escaped *) @@ -2788,26 +2789,26 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v1060 : bool = ' ' = v997 if v1060 then let v1061 : string = $"{v0} " - method16(v1061, v1, v998, v4) + method15(v1061, v1, v998, v4) else let v1064 : string = $"{v0}{v997}" - method16(v1064, v1, v998, v4) + method15(v1064, v1, v998, v4) else let v1069 : bool = ' ' = v997 if v1069 then let v1070 : string = $"{v0} " - method16(v1070, v1, v998, v4) + method15(v1070, v1, v998, v4) else let v1073 : string = $"{v0}{v997}" - method16(v1073, v1, v998, v4) + method15(v1073, v1, v998, v4) | _ -> let v1080 : bool = ' ' = v997 if v1080 then let v1081 : string = $"{v0} " - method16(v1081, v1, v998, v4) + method15(v1081, v1, v998, v4) else let v1084 : string = $"{v0}{v997}" - method16(v1084, v1, v998, v4) + method15(v1084, v1, v998, v4) | _ -> match v3 with | US5_2(v1106, v1107) -> (* Escaped *) @@ -2820,7 +2821,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1111 : UH0 = UH0_0 let v1112 : UH0 = UH0_1(v0, v1111) - method17(v1, v1112) + method16(v1, v1112) struct (v1114, v0) else let v1116 : bool = v0 = "" @@ -2830,7 +2831,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1117 : UH0 = UH0_0 let v1118 : UH0 = UH0_1(v0, v1117) - method17(v1, v1118) + method16(v1, v1118) struct (v1120, v0) | US5_1(v1099) -> (* Quoted *) let v1101 : bool = v0 = "" @@ -2840,7 +2841,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1102 : UH0 = UH0_0 let v1103 : UH0 = UH0_1(v0, v1102) - method17(v1, v1103) + method16(v1, v1103) struct (v1105, v0) | _ -> let v1124 : bool = v0 = "" @@ -2850,7 +2851,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1125 : UH0 = UH0_0 let v1126 : UH0 = UH0_1(v0, v1125) - method17(v1, v1126) + method16(v1, v1126) struct (v1128, v0) else let v1135 : bool = '`' = v581 @@ -2872,17 +2873,17 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v1144 : string = $"{v0}{v581}\"" let v1145 : char = '"' let v1146 : US5 = US5_1(v1145) - method15(v1144, v1, v1137, v4, v1146) + method14(v1144, v1, v1137, v4, v1146) else match v3 with | US5_1(v1149) -> (* Quoted *) let v1150 : string = $"{v0}{v581}\"" let v1151 : char = '"' let v1152 : US5 = US5_1(v1151) - method15(v1150, v1, v1137, v4, v1152) + method14(v1150, v1, v1137, v4, v1152) | _ -> let v1155 : US5 = US5_0 - method15(v0, v1, v1137, v4, v1155) + method14(v0, v1, v1137, v4, v1155) else match v3 with | US5_1(v1162) -> (* Quoted *) @@ -2890,33 +2891,33 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 if v1163 then let v1164 : uint8 = 0uy let v1165 : US5 = US5_2(v1164, v1136) - method15(v0, v1, v1137, v4, v1165) + method14(v0, v1, v1137, v4, v1165) else let v1168 : bool = '`' = v1136 if v1168 then let v1169 : uint8 = 0uy let v1170 : US5 = US5_2(v1169, v1136) - method15(v0, v1, v1137, v4, v1170) + method14(v0, v1, v1137, v4, v1170) else let v1173 : bool = ' ' = v1136 if v1173 then let v1174 : string = $"{v0} " - method16(v1174, v1, v1137, v4) + method15(v1174, v1, v1137, v4) else let v1177 : string = $"{v0}{v1136}" - method16(v1177, v1, v1137, v4) + method15(v1177, v1, v1137, v4) | _ -> let v1186 : bool = '\\' = v1136 if v1186 then let v1187 : uint8 = 1uy let v1188 : US5 = US5_2(v1187, v1136) - method15(v0, v1, v1137, v4, v1188) + method14(v0, v1, v1137, v4, v1188) else let v1191 : bool = '`' = v1136 if v1191 then let v1192 : uint8 = 1uy let v1193 : US5 = US5_2(v1192, v1136) - method15(v0, v1, v1137, v4, v1193) + method14(v0, v1, v1137, v4, v1193) else match v3 with | US5_2(v1196, v1197) -> (* Escaped *) @@ -2925,26 +2926,26 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v1199 : bool = ' ' = v1136 if v1199 then let v1200 : string = $"{v0} " - method16(v1200, v1, v1137, v4) + method15(v1200, v1, v1137, v4) else let v1203 : string = $"{v0}{v1136}" - method16(v1203, v1, v1137, v4) + method15(v1203, v1, v1137, v4) else let v1208 : bool = ' ' = v1136 if v1208 then let v1209 : string = $"{v0} " - method16(v1209, v1, v1137, v4) + method15(v1209, v1, v1137, v4) else let v1212 : string = $"{v0}{v1136}" - method16(v1212, v1, v1137, v4) + method15(v1212, v1, v1137, v4) | _ -> let v1219 : bool = ' ' = v1136 if v1219 then let v1220 : string = $"{v0} " - method16(v1220, v1, v1137, v4) + method15(v1220, v1, v1137, v4) else let v1223 : string = $"{v0}{v1136}" - method16(v1223, v1, v1137, v4) + method15(v1223, v1, v1137, v4) | _ -> match v3 with | US5_2(v1245, v1246) -> (* Escaped *) @@ -2957,7 +2958,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1250 : UH0 = UH0_0 let v1251 : UH0 = UH0_1(v0, v1250) - method17(v1, v1251) + method16(v1, v1251) struct (v1253, v0) else let v1255 : bool = v0 = "" @@ -2967,7 +2968,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1256 : UH0 = UH0_0 let v1257 : UH0 = UH0_1(v0, v1256) - method17(v1, v1257) + method16(v1, v1257) struct (v1259, v0) | US5_1(v1238) -> (* Quoted *) let v1240 : bool = v0 = "" @@ -2977,7 +2978,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1241 : UH0 = UH0_0 let v1242 : UH0 = UH0_1(v0, v1241) - method17(v1, v1242) + method16(v1, v1242) struct (v1244, v0) | _ -> let v1263 : bool = v0 = "" @@ -2987,7 +2988,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1264 : UH0 = UH0_0 let v1265 : UH0 = UH0_1(v0, v1264) - method17(v1, v1265) + method16(v1, v1265) struct (v1267, v0) else match v3 with @@ -2998,30 +2999,30 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 if v1277 then let v1278 : uint8 = 0uy let v1279 : US5 = US5_2(v1278, v1275) - method15(v0, v1, v1276, v4, v1279) + method14(v0, v1, v1276, v4, v1279) else let v1282 : bool = '`' = v1275 if v1282 then let v1283 : uint8 = 0uy let v1284 : US5 = US5_2(v1283, v1275) - method15(v0, v1, v1276, v4, v1284) + method14(v0, v1, v1276, v4, v1284) else let v1287 : bool = '"' = v1275 if v1287 then let v1288 : UH0 = UH0_0 let v1289 : UH0 = UH0_1(v0, v1288) - let v1290 : UH0 = method17(v1, v1289) + let v1290 : UH0 = method16(v1, v1289) let v1291 : string = "" let v1292 : US5 = US5_0 - method15(v1291, v1290, v1276, v4, v1292) + method14(v1291, v1290, v1276, v4, v1292) else let v1295 : bool = ' ' = v1275 if v1295 then let v1296 : string = $"{v0} " - method16(v1296, v1, v1276, v4) + method15(v1296, v1, v1276, v4) else let v1299 : string = $"{v0}{v1275}" - method16(v1299, v1, v1276, v4) + method15(v1299, v1, v1276, v4) | _ -> let v1311 : bool = v0 = "" let v1315 : UH0 = @@ -3030,7 +3031,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1312 : UH0 = UH0_0 let v1313 : UH0 = UH0_1(v0, v1312) - method17(v1, v1313) + method16(v1, v1313) struct (v1315, v0) | _ -> match v2 with @@ -3039,13 +3040,13 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 if v1320 then let v1321 : uint8 = 1uy let v1322 : US5 = US5_2(v1321, v1318) - method15(v0, v1, v1319, v4, v1322) + method14(v0, v1, v1319, v4, v1322) else let v1325 : bool = '`' = v1318 if v1325 then let v1326 : uint8 = 1uy let v1327 : US5 = US5_2(v1326, v1318) - method15(v0, v1, v1319, v4, v1327) + method14(v0, v1, v1319, v4, v1327) else match v3 with | US5_2(v1330, v1331) -> (* Escaped *) @@ -3056,49 +3057,49 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v1334 : string = $"{v0}" let v1335 : char = '"' let v1336 : US5 = US5_1(v1335) - method15(v1334, v1, v1319, v4, v1336) + method14(v1334, v1, v1319, v4, v1336) else let v1339 : bool = ' ' = v1318 if v1339 then let v1340 : string = $"{v0} " - method16(v1340, v1, v1319, v4) + method15(v1340, v1, v1319, v4) else let v1343 : string = $"{v0}{v1318}" - method16(v1343, v1, v1319, v4) + method15(v1343, v1, v1319, v4) else let v1350 : bool = '"' = v1318 if v1350 then let v1351 : UH0 = UH0_0 let v1352 : UH0 = UH0_1(v0, v1351) - let v1353 : UH0 = method17(v1, v1352) + let v1353 : UH0 = method16(v1, v1352) let v1354 : string = "" let v1355 : US5 = US5_0 - method15(v1354, v1353, v1319, v4, v1355) + method14(v1354, v1353, v1319, v4, v1355) else let v1358 : bool = ' ' = v1318 if v1358 then let v1359 : string = $"{v0} " - method16(v1359, v1, v1319, v4) + method15(v1359, v1, v1319, v4) else let v1362 : string = $"{v0}{v1318}" - method16(v1362, v1, v1319, v4) + method15(v1362, v1, v1319, v4) | _ -> let v1371 : bool = '"' = v1318 if v1371 then let v1372 : UH0 = UH0_0 let v1373 : UH0 = UH0_1(v0, v1372) - let v1374 : UH0 = method17(v1, v1373) + let v1374 : UH0 = method16(v1, v1373) let v1375 : string = "" let v1376 : US5 = US5_0 - method15(v1375, v1374, v1319, v4, v1376) + method14(v1375, v1374, v1319, v4, v1376) else let v1379 : bool = ' ' = v1318 if v1379 then let v1380 : string = $"{v0} " - method16(v1380, v1, v1319, v4) + method15(v1380, v1, v1319, v4) else let v1383 : string = $"{v0}{v1318}" - method16(v1383, v1, v1319, v4) + method15(v1383, v1, v1319, v4) | _ -> match v3 with | US5_2(v1396, v1397) -> (* Escaped *) @@ -3111,7 +3112,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1401 : UH0 = UH0_0 let v1402 : UH0 = UH0_1(v0, v1401) - method17(v1, v1402) + method16(v1, v1402) struct (v1404, v0) else let v1406 : bool = v0 = "" @@ -3121,7 +3122,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1407 : UH0 = UH0_0 let v1408 : UH0 = UH0_1(v0, v1407) - method17(v1, v1408) + method16(v1, v1408) struct (v1410, v0) | _ -> let v1414 : bool = v0 = "" @@ -3131,7 +3132,7 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v1415 : UH0 = UH0_0 let v1416 : UH0 = UH0_1(v0, v1415) - method17(v1, v1416) + method16(v1, v1416) struct (v1418, v0) | US5_0 -> (* Start *) match v2 with @@ -3141,19 +3142,19 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 let v8 : string = "" let v9 : char = '"' let v10 : US5 = US5_1(v9) - method15(v8, v1, v6, v4, v10) + method14(v8, v1, v6, v4, v10) else let v13 : bool = '\\' = v5 if v13 then let v14 : uint8 = 0uy let v15 : US5 = US5_2(v14, v5) - method15(v0, v1, v6, v4, v15) + method14(v0, v1, v6, v4, v15) else let v18 : bool = '`' = v5 if v18 then let v19 : uint8 = 0uy let v20 : US5 = US5_2(v19, v5) - method15(v0, v1, v6, v4, v20) + method14(v0, v1, v6, v4, v20) else let v23 : bool = ' ' = v5 if v23 then @@ -3164,12 +3165,12 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v26 : UH0 = UH0_0 let v27 : UH0 = UH0_1(v0, v26) - method17(v1, v27) + method16(v1, v27) let v30 : string = "" - method16(v30, v29, v6, v4) + method15(v30, v29, v6, v4) else let v33 : string = $"{v0}{v5}" - method16(v33, v1, v6, v4) + method15(v33, v1, v6, v4) | _ -> let v45 : bool = v0 = "" let v49 : UH0 = @@ -3178,17 +3179,17 @@ and method15 (v0 : string, v1 : UH0, v2 : UH1, v3 : US5, v4 : US5) : struct (UH0 else let v46 : UH0 = UH0_0 let v47 : UH0 = UH0_1(v0, v46) - method17(v1, v47) + method16(v1, v47) struct (v49, v0) -and method18 (v0 : UH0, v1 : string list) : string list = +and method17 (v0 : UH0, v1 : string list) : string list = match v0 with | UH0_1(v2, v3) -> (* Cons *) - let v4 : string list = method18(v3, v1) + let v4 : string list = method17(v3, v1) let v5 : string list = v2 :: v4 v5 | UH0_0 -> (* Nil *) v1 -and method12 (v0 : string) : (string []) = +and method11 (v0 : string) : (string []) = let v1 : UH0 = UH0_0 let v2 : string = "" let mutable _v0 = None @@ -3226,7 +3227,7 @@ and method12 (v0 : string) : (string []) = let v15 : int32 = v14.Length let v16 : (char []) = Array.zeroCreate (v15) let v17 : Mut4 = {l0 = 0} : Mut4 - while method13(v15, v17) do + while method12(v15, v17) do let v19 : int32 = v17.l0 let v20 : char = v14.[int v19] v16.[int v19] <- v20 @@ -3236,20 +3237,20 @@ and method12 (v0 : string) : (string []) = let v22 : ((char []) -> char list) = Array.toList let v23 : char list = v22 v16 let v24 : ((char -> (UH1 -> UH1)) -> (char list -> (UH1 -> UH1))) = List.foldBack - let v25 : (char -> (UH1 -> UH1)) = method14() + let v25 : (char -> (UH1 -> UH1)) = method13() let v26 : (char list -> (UH1 -> UH1)) = v24 v25 let v27 : (UH1 -> UH1) = v26 v23 let v28 : UH1 = UH1_0 let v29 : UH1 = v27 v28 let v30 : US5 = US5_0 let v31 : US5 = US5_0 - let struct (v32 : UH0, v33 : string) = method15(v2, v1, v29, v31, v30) + let struct (v32 : UH0, v33 : string) = method14(v2, v1, v29, v31, v30) let v34 : string list = [] - let v35 : string list = method18(v32, v34) + let v35 : string list = method17(v32, v34) let v36 : (string list -> (string [])) = List.toArray let v37 : (string []) = v36 v35 v37 -and method19 (v0 : string) : string = +and method18 (v0 : string) : string = v0 and closure11 () (v0 : serde_json_Error) : std_string_String = let v1 : bool = true @@ -3287,17 +3288,17 @@ and closure11 () (v0 : serde_json_Error) : std_string_String = |> fun x -> _v1 <- Some x let v11 : std_string_String = _v1.Value v11 -and method20 () : (serde_json_Error -> std_string_String) = +and method19 () : (serde_json_Error -> std_string_String) = closure11() -and method21 (v0 : std_string_String) : std_string_String = +and method20 (v0 : std_string_String) : std_string_String = v0 -and method22 (v0 : string) : string = +and method21 (v0 : string) : string = v0 -and method24 (v0 : string) : string = +and method23 (v0 : string) : string = v0 -and method25 (v0 : string) : string = +and method24 (v0 : string) : string = v0 -and method23 (v0 : string, v1 : string) : string = +and method22 (v0 : string, v1 : string) : string = let v2 : bool = true let mutable _v2 : string option = None @@ -3367,8 +3368,8 @@ and method23 (v0 : string, v1 : string) : string = #if FABLE_COMPILER_TYPESCRIPT let v32 : string = "path" let v33 : IPathJoin = Fable.Core.JsInterop.importAll v32 - let v34 : string = method24(v0) - let v35 : string = method25(v1) + let v34 : string = method23(v0) + let v35 : string = method24(v1) let v36 : string = "v33.join(v34, v35)" let v37 : string = Fable.Core.JsInterop.emitJsExpr () v36 v37 @@ -3384,39 +3385,39 @@ and method23 (v0 : string, v1 : string) : string = |> fun x -> _v2 <- Some x let v40 : string = _v2.Value v40 -and method26 (v0 : string) : string = +and method25 (v0 : string) : string = v0 -and method27 () : string = +and method26 () : string = let v0 : string = "" v0 -and method28 () : string = +and method27 () : string = let v0 : string = "^\\\\\\\\\\?\\\\" v0 -and method29 () : string = +and method28 () : string = let v0 : string = "" v0 -and method30 (v0 : int32, v1 : Mut5) : bool = +and method29 (v0 : int32, v1 : Mut5) : bool = let v2 : int32 = v1.l0 let v3 : bool = v2 < v0 v3 -and method31 (v0 : string) : string = +and method30 (v0 : string) : string = v0 -and method32 (v0 : string) : string = +and method31 (v0 : string) : string = v0 -and method33 () : string = +and method32 () : string = let v0 : string = "\n" v0 -and method34 () : string = +and method33 () : string = let v0 : string = "deps" v0 -and method36 (v0 : string) : string = +and method35 (v0 : string) : string = let v1 : bool = true let mutable _v1 : string option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v2 : string = method22(v0) + let v2 : string = method21(v0) let v3 : string = "&*$0" let v4 : Ref = Fable.Core.RustInterop.emitRustExpr v2 v3 let v5 : string = "String::from($0)" @@ -3501,22 +3502,22 @@ and method36 (v0 : string) : string = #endif |> fun x -> _v12 <- Some x let v38 : string = _v12.Value - let v39 : string = method23(v38, v2) + let v39 : string = method22(v38, v2) let v40 : bool = true let mutable _v40 : string option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v41 : string = method26(v39) - let v42 : string = method27() + let v41 : string = method25(v39) + let v42 : string = method26() let v43 : bool = true let mutable _v43 : Result option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v44 : string = method28() + let v44 : string = method27() let v45 : string = $"regex::Regex::new(&$0)" let v46 : Result = Fable.Core.RustInterop.emitRustExpr v44 v45 v46 @@ -3570,7 +3571,7 @@ and method36 (v0 : string) : string = v64 #endif #else - let v65 : string = method29() + let v65 : string = method28() let v66 : string = "^\\\\\\\\\\?\\\\" let v67 : string = System.Text.RegularExpressions.Regex.Replace (v39, v66, v65) v67 @@ -3585,7 +3586,7 @@ and method36 (v0 : string) : string = let v74 : (string []) = [||] let v75 : int32 = v73.Length let v76 : Mut5 = {l0 = 0; l1 = 0; l2 = v74} : Mut5 - while method30(v75, v76) do + while method29(v75, v76) do let v78 : int32 = v76.l0 let v79 : int32 = -v78 let v80 : int32 = v79 + v75 @@ -3614,7 +3615,7 @@ and method36 (v0 : string) : string = let v95 : int32 = v93 + v94 let v96 : (string []) = Array.zeroCreate (v95) let v97 : Mut4 = {l0 = 0} : Mut4 - while method13(v95, v97) do + while method12(v95, v97) do let v99 : int32 = v97.l0 let v100 : bool = v99 < v93 let v104 : string = @@ -3637,7 +3638,7 @@ and method36 (v0 : string) : string = let v109 : int32 = v107 + v108 let v110 : (string []) = Array.zeroCreate (v109) let v111 : Mut4 = {l0 = 0} : Mut4 - while method13(v109, v111) do + while method12(v109, v111) do let v113 : int32 = v111.l0 let v114 : bool = v113 < v107 let v118 : string = @@ -3697,7 +3698,7 @@ and method36 (v0 : string) : string = let v141 : char = _v133.Value let v142 : (char -> string) = _.ToString() let v143 : string = v142 v141 - let v144 : string = method31(v143) + let v144 : string = method30(v143) let v145 : (string -> (string seq -> string)) = String.concat let v146 : (string seq -> string) = v145 v144 v146 v132 @@ -3764,7 +3765,7 @@ and method36 (v0 : string) : string = v171 #endif #else - let v172 : string = method32(v0) + let v172 : string = method31(v0) let v173 : (string -> string) = System.IO.Path.GetFullPath let v174 : string = v173 v172 v174 @@ -3777,15 +3778,15 @@ and method36 (v0 : string) : string = #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v177 : string = method26(v175) - let v178 : string = method27() + let v177 : string = method25(v175) + let v178 : string = method26() let v179 : bool = true let mutable _v179 : Result option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v180 : string = method28() + let v180 : string = method27() let v181 : string = $"regex::Regex::new(&$0)" let v182 : Result = Fable.Core.RustInterop.emitRustExpr v180 v181 v182 @@ -3839,7 +3840,7 @@ and method36 (v0 : string) : string = v200 #endif #else - let v201 : string = method29() + let v201 : string = method28() let v202 : string = "^\\\\\\\\\\?\\\\" let v203 : string = System.Text.RegularExpressions.Regex.Replace (v175, v202, v201) v203 @@ -3851,7 +3852,7 @@ and method36 (v0 : string) : string = let v207 : string = "/" let v208 : string = v205.Replace (v206, v207) v208 -and method35 (v0 : string) : string = +and method34 (v0 : string) : string = let v1 : bool = true let mutable _v1 : string option = None @@ -3925,24 +3926,24 @@ and method35 (v0 : string) : string = #endif |> fun x -> _v1 <- Some x let v27 : string = _v1.Value - let v28 : string = method23(v27, v0) - method36(v28) + let v28 : string = method22(v27, v0) + method35(v28) and closure12 () (v0 : std_string_String) : string = let v1 : string = "fable_library_rust::String_::fromString($0)" let v2 : string = Fable.Core.RustInterop.emitRustExpr v0 v1 - method35(v2) -and method37 () : string = + method34(v2) +and method36 () : string = let v0 : string = "retries" v0 -and method38 () : string = +and method37 () : string = let v0 : string = "working_directory" v0 -and method41 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) : string = +and method40 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) : string = v1 -and method42 () : struct (string * string) = +and method41 () : struct (string * string) = let v0 : string = "" struct (v0, v0) -and method43 (v0 : string, v1 : string, v2 : UH1, v3 : US7) : struct (string * string) = +and method42 (v0 : string, v1 : string, v2 : UH1, v3 : US7) : struct (string * string) = match v2 with | UH1_1(v4, v5) -> (* Cons *) let v6 : bool = '"' = v4 @@ -3951,35 +3952,35 @@ and method43 (v0 : string, v1 : string, v2 : UH1, v3 : US7) : struct (string * s if v8 then let v9 : US8 = US8_0 let v10 : US7 = US7_1(v9) - method43(v0, v1, v5, v10) + method42(v0, v1, v5, v10) else match v3 with | US7_2 -> (* Arguments *) let v38 : string = $"{v0}{v4}" let v39 : US7 = US7_2 - method43(v38, v1, v5, v39) + method42(v38, v1, v5, v39) | US7_1(v13) -> (* Path *) match v13 with | US8_0 -> (* Quoted *) let v14 : US8 = US8_1 let v15 : US7 = US7_1(v14) - method43(v0, v1, v5, v15) + method42(v0, v1, v5, v15) | _ -> let v18 : bool = ' ' = v4 if v18 then let v19 : US7 = US7_2 - method43(v0, v1, v5, v19) + method42(v0, v1, v5, v19) else let v22 : string = $"{v1}{v4}" - method43(v0, v22, v5, v3) + method42(v0, v22, v5, v3) | US7_0 -> (* Start *) let v29 : bool = ' ' = v4 if v29 then let v30 : US7 = US7_2 - method43(v0, v1, v5, v30) + method42(v0, v1, v5, v30) else let v33 : string = $"{v1}{v4}" - method43(v0, v33, v5, v3) + method42(v0, v33, v5, v3) else let v50 : bool = ''' = v4 if v50 then @@ -3987,41 +3988,41 @@ and method43 (v0 : string, v1 : string, v2 : UH1, v3 : US7) : struct (string * s if v52 then let v53 : US8 = US8_0 let v54 : US7 = US7_1(v53) - method43(v0, v1, v5, v54) + method42(v0, v1, v5, v54) else match v3 with | US7_2 -> (* Arguments *) let v82 : string = $"{v0}{v4}" let v83 : US7 = US7_2 - method43(v82, v1, v5, v83) + method42(v82, v1, v5, v83) | US7_1(v57) -> (* Path *) match v57 with | US8_0 -> (* Quoted *) let v58 : US8 = US8_1 let v59 : US7 = US7_1(v58) - method43(v0, v1, v5, v59) + method42(v0, v1, v5, v59) | _ -> let v62 : bool = ' ' = v4 if v62 then let v63 : US7 = US7_2 - method43(v0, v1, v5, v63) + method42(v0, v1, v5, v63) else let v66 : string = $"{v1}{v4}" - method43(v0, v66, v5, v3) + method42(v0, v66, v5, v3) | US7_0 -> (* Start *) let v73 : bool = ' ' = v4 if v73 then let v74 : US7 = US7_2 - method43(v0, v1, v5, v74) + method42(v0, v1, v5, v74) else let v77 : string = $"{v1}{v4}" - method43(v0, v77, v5, v3) + method42(v0, v77, v5, v3) else match v3 with | US7_2 -> (* Arguments *) let v126 : string = $"{v0}{v4}" let v127 : US7 = US7_2 - method43(v126, v1, v5, v127) + method42(v126, v1, v5, v127) | US7_1(v94) -> (* Path *) match v94 with | US8_0 -> (* Quoted *) @@ -4030,26 +4031,26 @@ and method43 (v0 : string, v1 : string, v2 : UH1, v3 : US7) : struct (string * s let v96 : string = $"{v1} " let v97 : US8 = US8_0 let v98 : US7 = US7_1(v97) - method43(v0, v96, v5, v98) + method42(v0, v96, v5, v98) else let v101 : string = $"{v1}{v4}" - method43(v0, v101, v5, v3) + method42(v0, v101, v5, v3) | _ -> let v106 : bool = ' ' = v4 if v106 then let v107 : US7 = US7_2 - method43(v0, v1, v5, v107) + method42(v0, v1, v5, v107) else let v110 : string = $"{v1}{v4}" - method43(v0, v110, v5, v3) + method42(v0, v110, v5, v3) | US7_0 -> (* Start *) let v117 : bool = ' ' = v4 if v117 then let v118 : US7 = US7_2 - method43(v0, v1, v5, v118) + method42(v0, v1, v5, v118) else let v121 : string = $"{v1}{v4}" - method43(v0, v121, v5, v3) + method42(v0, v121, v5, v3) | _ -> match v3 with | US7_2 -> (* Arguments *) @@ -4117,12 +4118,16 @@ and closure15 () (v0 : std_io_Error) : std_string_String = |> fun x -> _v1 <- Some x let v11 : std_string_String = _v1.Value v11 -and method44 () : (std_io_Error -> std_string_String) = +and method43 () : (std_io_Error -> std_string_String) = closure15() and closure16 () (v0 : std_sync_Arc>) : US9 = US9_0(v0) +and method44 () : (std_sync_Arc> -> US9) = + closure16() and closure17 () (v0 : std_string_String) : US9 = US9_1(v0) +and method45 () : (std_string_String -> US9) = + closure17() and closure18 () () : string = let v0 : string = $"runtime.execute_with_options / child error" v0 @@ -4130,248 +4135,95 @@ and closure19 (v0 : std_string_String) () : string = let v1 : (unit -> string) = closure6() let v2 : string = $"error: {v0} / {v1 ()}" v2 -and method45 (v0 : std_sync_Arc>) : std_sync_Arc> = - v0 -and closure21 () (v0 : std_string_String) : US11 = +and closure20 () (v0 : std_string_String) : US11 = US11_0(v0) -and closure22 () (v0 : std_string_String) : US11 = +and method46 () : (std_string_String -> US11) = + closure20() +and closure21 () (v0 : std_string_String) : US11 = US11_1(v0) -and closure23 () () : string = +and method47 () : (std_string_String -> US11) = + closure21() +and closure22 () () : string = let v0 : string = $"runtime.stdio_line" v0 -and closure24 (v0 : std_string_String) () : string = +and closure23 (v0 : std_string_String) () : string = let v1 : (unit -> string) = closure6() let v2 : string = $"e: {v0} / {v1 ()}" v2 -and closure25 (v0 : string) () : string = +and closure24 (v0 : string) () : string = v0 -and method46 (v0 : std_sync_Arc>>) : std_sync_Arc>> = - v0 -and closure20 (v0 : bool, v1 : std_sync_Arc>>) (v2 : Result) : unit = - let v3 : bool = true - let mutable _v3 : unit option = None - -#if FABLE_COMPILER || WASM || CONTRACT - -#if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v4 : (std_io_Error -> std_string_String) = method44() - let v5 : string = "$0.map_err(|x| $1(x))" - let v6 : Result = Fable.Core.RustInterop.emitRustExpr struct (v2, v4) v5 - let v7 : (std_string_String -> US11) = closure21() - let v8 : (std_string_String -> US11) = closure22() - let v9 : US11 = match v6 with Ok x -> v7 x | Error x -> v8 x - let v41 : std_string_String = - match v9 with - | US11_1(v31) -> (* Error *) - let v32 : US0 = US0_4 - let v33 : (unit -> string) = closure23() - let v34 : (unit -> string) = closure24(v31) - method5(v32, v33, v34) - let v35 : string = $"\u001b[4;7m{v31}\u001b[0m" - let v36 : string = "&*$0" - let v37 : Ref = Fable.Core.RustInterop.emitRustExpr v35 v36 - let v38 : string = "String::from($0)" - let v39 : std_string_String = Fable.Core.RustInterop.emitRustExpr v37 v38 - v39 - | US11_0(v10) -> (* Ok *) - let v11 : string = "fable_library_rust::String_::fromString($0)" - let v12 : string = Fable.Core.RustInterop.emitRustExpr v10 v11 - let v13 : string = "encoding_rs::UTF_8" - let v14 : Ref = Fable.Core.RustInterop.emitRustExpr () v13 - let v15 : string = "$0.encode(&*$1).0" - let v16 : std_borrow_Cow> = Fable.Core.RustInterop.emitRustExpr struct (v14, v12) v15 - let v17 : string = "$0.as_ref()" - let v18 : Ref> = Fable.Core.RustInterop.emitRustExpr v16 v17 - let v19 : string = "std::str::from_utf8(v18)" - let v20 : Result, std_str_Utf8Error> = Fable.Core.RustInterop.emitRustExpr () v19 - let v21 : string = "$0.unwrap()" - let v22 : Ref = Fable.Core.RustInterop.emitRustExpr v20 v21 - let v23 : string = "String::from($0)" - let v24 : std_string_String = Fable.Core.RustInterop.emitRustExpr v22 v23 - let v25 : string = "fable_library_rust::String_::fromString($0)" - let v26 : string = Fable.Core.RustInterop.emitRustExpr v24 v25 - let v27 : string = $"> {v26}" - if v0 then - let v28 : US0 = US0_0 - let v29 : (unit -> string) = closure25(v27) - let v30 : (unit -> string) = closure6() - method5(v28, v29, v30) - else - System.Console.WriteLine v27 - () - v24 - let v42 : std_sync_Arc>> = method46(v1) - let v43 : string = "v42.lock()" - let v44 : Result>, std_sync_PoisonError>>> = Fable.Core.RustInterop.emitRustExpr () v43 - let v45 : string = "$0.unwrap()" - let v46 : std_sync_MutexGuard> = Fable.Core.RustInterop.emitRustExpr v44 v45 - let v47 : string = "&$0" - let v48 : Ref> = Fable.Core.RustInterop.emitRustExpr v46 v47 - let v49 : string = "$0.send($1)" - let v50 : Result> = Fable.Core.RustInterop.emitRustExpr struct (v48, v41) v49 - let v51 : string = "$0.unwrap()" - Fable.Core.RustInterop.emitRustExpr v50 v51 - () - #endif -#if FABLE_COMPILER_RUST && WASM - null |> unbox - () - #endif -#if FABLE_COMPILER_RUST && CONTRACT - null |> unbox - () - #endif -#if FABLE_COMPILER_TYPESCRIPT - null |> unbox - () - #endif -#if FABLE_COMPILER_PYTHON - null |> unbox - () - #endif -#else - null |> unbox - () - #endif - |> fun x -> _v3 <- Some x - _v3.Value - () -and method47 () : bool = - true -and closure26 (v0 : bool, v1 : std_sync_Arc>>) (v2 : Result) : unit = - let v3 : bool = true - let mutable _v3 : unit option = None +and closure25 () (v0 : std_sync_mpsc_SendError) : std_string_String = + let v1 : bool = true + let mutable _v1 : std_string_String option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v4 : (std_io_Error -> std_string_String) = method44() - let v5 : string = "$0.map_err(|x| $1(x))" - let v6 : Result = Fable.Core.RustInterop.emitRustExpr struct (v2, v4) v5 - let v7 : (std_string_String -> US11) = closure21() - let v8 : (std_string_String -> US11) = closure22() - let v9 : US11 = match v6 with Ok x -> v7 x | Error x -> v8 x - let v46 : std_string_String = - match v9 with - | US11_1(v36) -> (* Error *) - let v37 : US0 = US0_4 - let v38 : (unit -> string) = closure23() - let v39 : (unit -> string) = closure24(v36) - method5(v37, v38, v39) - let v40 : string = $"\u001b[4;7m{v36}\u001b[0m" - let v41 : string = "&*$0" - let v42 : Ref = Fable.Core.RustInterop.emitRustExpr v40 v41 - let v43 : string = "String::from($0)" - let v44 : std_string_String = Fable.Core.RustInterop.emitRustExpr v42 v43 - v44 - | US11_0(v10) -> (* Ok *) - let v11 : string = "fable_library_rust::String_::fromString($0)" - let v12 : string = Fable.Core.RustInterop.emitRustExpr v10 v11 - let v13 : string = "encoding_rs::UTF_8" - let v14 : Ref = Fable.Core.RustInterop.emitRustExpr () v13 - let v15 : string = "$0.encode(&*$1).0" - let v16 : std_borrow_Cow> = Fable.Core.RustInterop.emitRustExpr struct (v14, v12) v15 - let v17 : string = "$0.as_ref()" - let v18 : Ref> = Fable.Core.RustInterop.emitRustExpr v16 v17 - let v19 : string = "std::str::from_utf8(v18)" - let v20 : Result, std_str_Utf8Error> = Fable.Core.RustInterop.emitRustExpr () v19 - let v21 : string = "$0.unwrap()" - let v22 : Ref = Fable.Core.RustInterop.emitRustExpr v20 v21 - let v23 : string = "String::from($0)" - let v24 : std_string_String = Fable.Core.RustInterop.emitRustExpr v22 v23 - let v25 : string = "fable_library_rust::String_::fromString($0)" - let v26 : string = Fable.Core.RustInterop.emitRustExpr v24 v25 - let v27 : string = $"! {v26}" - if v0 then - let v28 : US0 = US0_0 - let v29 : (unit -> string) = closure25(v27) - let v30 : (unit -> string) = closure6() - method5(v28, v29, v30) - else - System.Console.WriteLine v27 - () - let v31 : string = $"\u001b[4;7m{v24}\u001b[0m" - let v32 : string = "&*$0" - let v33 : Ref = Fable.Core.RustInterop.emitRustExpr v31 v32 - let v34 : string = "String::from($0)" - let v35 : std_string_String = Fable.Core.RustInterop.emitRustExpr v33 v34 - v35 - let v47 : std_sync_Arc>> = method46(v1) - let v48 : string = "v47.lock()" - let v49 : Result>, std_sync_PoisonError>>> = Fable.Core.RustInterop.emitRustExpr () v48 - let v50 : string = "$0.unwrap()" - let v51 : std_sync_MutexGuard> = Fable.Core.RustInterop.emitRustExpr v49 v50 - let v52 : string = "&$0" - let v53 : Ref> = Fable.Core.RustInterop.emitRustExpr v51 v52 - let v54 : string = "$0.send($1)" - let v55 : Result> = Fable.Core.RustInterop.emitRustExpr struct (v53, v46) v54 - let v56 : string = "$0.unwrap()" - Fable.Core.RustInterop.emitRustExpr v55 v56 - () + let v2 : string = "format!(\"{}\", $0)" + let v3 : std_string_String = Fable.Core.RustInterop.emitRustExpr v0 v2 + v3 #endif #if FABLE_COMPILER_RUST && WASM - null |> unbox - () + let v4 : string = "format!(\"{}\", $0)" + let v5 : std_string_String = Fable.Core.RustInterop.emitRustExpr v0 v4 + v5 #endif #if FABLE_COMPILER_RUST && CONTRACT - null |> unbox - () + let v6 : string = "format!(\"{}\", $0)" + let v7 : std_string_String = Fable.Core.RustInterop.emitRustExpr v0 v6 + v7 #endif #if FABLE_COMPILER_TYPESCRIPT - null |> unbox - () + let v8 : std_string_String = null |> unbox + v8 #endif #if FABLE_COMPILER_PYTHON - null |> unbox - () + let v9 : std_string_String = null |> unbox + v9 #endif #else - null |> unbox - () + let v10 : std_string_String = null |> unbox + v10 #endif - |> fun x -> _v3 <- Some x - _v3.Value - () -and method48 (v0 : std_sync_Arc>) : std_sync_Arc> = - v0 -and method49 (v0 : std_sync_Arc>) : std_sync_Arc> = + |> fun x -> _v1 <- Some x + let v11 : std_string_String = _v1.Value + v11 +and method48 () : (std_sync_mpsc_SendError -> std_string_String) = + closure25() +and method49 (v0 : Result) : Result = v0 and method50 (v0 : std_sync_MutexGuard) : std_sync_MutexGuard = v0 -and method51 (v0 : std_sync_Arc>) : std_sync_Arc> = - v0 -and method52 (v0 : std_thread_JoinHandle) : std_thread_JoinHandle = +and method51 (v0 : std_thread_JoinHandle>) : std_thread_JoinHandle> = v0 -and closure27 () (v0 : std_process_Output) : US14 = +and closure26 () (v0 : std_process_Output) : US14 = US14_0(v0) -and closure28 () (v0 : std_string_String) : US14 = +and closure27 () (v0 : std_string_String) : US14 = US14_1(v0) -and closure29 () () : string = +and closure28 () () : string = let v0 : string = $"runtime.execute_with_options / output error" v0 -and closure30 (v0 : std_string_String) () : string = +and closure29 (v0 : std_string_String) () : string = let v1 : (unit -> string) = closure6() let v2 : string = $"error: {v0} / {v1 ()}" v2 -and method53 (v0 : std_sync_Arc>>>) : std_sync_Arc>>> = - v0 -and closure31 () () : string = +and closure30 () () : string = let v0 : string = $"runtime.execute_with_options / result" v0 -and closure32 (v0 : int32, v1 : string) () : string = +and closure31 (v0 : int32, v1 : string) () : string = let v2 : (unit -> string) = closure6() let v3 : string = $"exit_code: {v0} / std_trace.Length: {v1.Length} / {v2 ()}" v3 -and method54 (v0 : (int32 * string)) : (int32 * string) = +and method52 (v0 : (int32 * string)) : (int32 * string) = v0 -and closure33 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) () : string = +and closure32 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) () : string = let v7 : string = $"execute_with_options_async / options: %A{struct (v0, v1, v2, v3, v4, v5, v6)}" v7 -and method56 () : (unit -> string) = +and method54 () : (unit -> string) = closure6() -and closure35 (v0 : string) () : string = +and closure34 (v0 : string) () : string = v0 -and closure34 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option, v7 : System.Diagnostics.Process, v8 : System.Collections.Concurrent.ConcurrentStack) (v9 : System.Diagnostics.DataReceivedEventArgs) : unit = +and closure33 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option, v7 : System.Diagnostics.Process, v8 : System.Collections.Concurrent.ConcurrentStack) (v9 : System.Diagnostics.DataReceivedEventArgs) : unit = let v10 : bool = true let mutable _v10 : Async option = None @@ -4433,9 +4285,9 @@ and closure34 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v30 : string = $"> {v17}" if v5 then let v31 : US0 = US0_0 - let v32 : (unit -> string) = closure35(v30) + let v32 : (unit -> string) = closure34(v30) let v33 : (unit -> string) = closure6() - method5(v31, v32, v33) + method4(v31, v32, v33) else System.Console.WriteLine v30 () @@ -4483,7 +4335,7 @@ and closure34 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : |> fun x -> _v39 <- Some x _v39.Value () -and closure36 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option, v7 : System.Diagnostics.Process, v8 : System.Collections.Concurrent.ConcurrentStack) (v9 : System.Diagnostics.DataReceivedEventArgs) : unit = +and closure35 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option, v7 : System.Diagnostics.Process, v8 : System.Collections.Concurrent.ConcurrentStack) (v9 : System.Diagnostics.DataReceivedEventArgs) : unit = let v10 : bool = true let mutable _v10 : Async option = None @@ -4545,9 +4397,9 @@ and closure36 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v30 : string = $"! {v17}" if v5 then let v31 : US0 = US0_0 - let v32 : (unit -> string) = closure35(v30) + let v32 : (unit -> string) = closure34(v30) let v33 : (unit -> string) = closure6() - method5(v31, v32, v33) + method4(v31, v32, v33) else System.Console.WriteLine v30 () @@ -4596,7 +4448,7 @@ and closure36 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : |> fun x -> _v40 <- Some x _v40.Value () -and closure37 (v0 : System.Diagnostics.Process) () : unit = +and closure36 (v0 : System.Diagnostics.Process) () : unit = let v1 : bool = true let mutable _v1 : bool option = None @@ -4663,13 +4515,13 @@ and closure37 (v0 : System.Diagnostics.Process) () : unit = |> fun x -> _v10 <- Some x _v10.Value () -and closure38 (v0 : System.Threading.Tasks.TaskCanceledException) () : string = +and closure37 (v0 : System.Threading.Tasks.TaskCanceledException) () : string = let v1 : string = $"execute_with_options_async / WaitForExitAsync / ex: %A{v0}" v1 -and closure39 (v0 : int32, v1 : string) () : string = +and closure38 (v0 : int32, v1 : string) () : string = let v2 : string = $"execute_with_options_async / exit_code: {v0} / output.Length: {v1.Length}" v2 -and method55 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) : Async = +and method53 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) : Async = let v7 : bool = true let mutable _v7 : Async option = None @@ -4725,11 +4577,11 @@ and method55 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v19 : Async option = None let mutable _v19 = v19 async { - let struct (v20 : string, v21 : string) = method42() + let struct (v20 : string, v21 : string) = method41() let v22 : int32 = v1.Length let v23 : (char []) = Array.zeroCreate (v22) let v24 : Mut4 = {l0 = 0} : Mut4 - while method13(v22, v24) do + while method12(v22, v24) do let v26 : int32 = v24.l0 let v27 : char = v1.[int v26] v23.[int v26] <- v27 @@ -4739,13 +4591,13 @@ and method55 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v29 : ((char []) -> char list) = Array.toList let v30 : char list = v29 v23 let v31 : ((char -> (UH1 -> UH1)) -> (char list -> (UH1 -> UH1))) = List.foldBack - let v32 : (char -> (UH1 -> UH1)) = method14() + let v32 : (char -> (UH1 -> UH1)) = method13() let v33 : (char list -> (UH1 -> UH1)) = v31 v32 let v34 : (UH1 -> UH1) = v33 v30 let v35 : UH1 = UH1_0 let v36 : UH1 = v34 v35 let v37 : US7 = US7_0 - let struct (v38 : string, v39 : string) = method43(v21, v20, v36, v37) + let struct (v38 : string, v39 : string) = method42(v21, v20, v36, v37) let v40 : US3 option = None let _v40 = ref v40 match v6 with @@ -4770,14 +4622,14 @@ and method55 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : | US3_0(v46) -> (* Some *) v46 let v50 : US0 = US0_1 - let v51 : (unit -> string) = closure33(v0, v1, v2, v3, v4, v5, v6) - let v52 : (unit -> string) = method56() - method5(v50, v51, v52) + let v51 : (unit -> string) = closure32(v0, v1, v2, v3, v4, v5, v6) + let v52 : (unit -> string) = method54() + method4(v50, v51, v52) let v53 : System.Text.Encoding = System.Text.Encoding.UTF8 let v54 : System.Diagnostics.ProcessStartInfo = System.Diagnostics.ProcessStartInfo (Arguments = v39, StandardOutputEncoding = v53, WorkingDirectory = v49, FileName = v38, CreateNoWindow = true, RedirectStandardError = true, RedirectStandardOutput = true, UseShellExecute = false) let v55 : int32 = v2.Length let v56 : Mut4 = {l0 = 0} : Mut4 - while method13(v55, v56) do + while method12(v55, v56) do let v58 : int32 = v56.l0 let struct (v59 : string, v60 : string) = v2.[int v58] v54.EnvironmentVariables.[v59] <- v60 @@ -4789,9 +4641,9 @@ and method55 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v63 : System.Diagnostics.Process = v62 let v64 : (unit -> System.Collections.Concurrent.ConcurrentStack) = System.Collections.Concurrent.ConcurrentStack let v65 : System.Collections.Concurrent.ConcurrentStack = v64 () - let v66 : (System.Diagnostics.DataReceivedEventArgs -> unit) = closure34(v0, v1, v2, v3, v4, v5, v6, v63, v65) + let v66 : (System.Diagnostics.DataReceivedEventArgs -> unit) = closure33(v0, v1, v2, v3, v4, v5, v6, v63, v65) v63.OutputDataReceived.Add v66 - let v67 : (System.Diagnostics.DataReceivedEventArgs -> unit) = closure36(v0, v1, v2, v3, v4, v5, v6, v63, v65) + let v67 : (System.Diagnostics.DataReceivedEventArgs -> unit) = closure35(v0, v1, v2, v3, v4, v5, v6, v63, v65) v63.ErrorDataReceived.Add v67 let v68 : (unit -> bool) = v63.Start let v69 : bool = v68 () @@ -4904,7 +4756,7 @@ and method55 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let! v106 = v106 let v107 : System.Threading.CancellationToken = v106 let v108 : ((unit -> unit) -> System.Threading.CancellationTokenRegistration) = v107.Register - let v109 : (unit -> unit) = closure37(v63) + let v109 : (unit -> unit) = closure36(v63) let v110 : System.Threading.CancellationTokenRegistration = v108 v109 use v110 = v110 let v111 : System.Threading.CancellationTokenRegistration = v110 @@ -5011,9 +4863,9 @@ and method55 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : v139 v138 let v140 : System.Threading.Tasks.TaskCanceledException = v130 |> unbox let v141 : US0 = US0_3 - let v142 : (unit -> string) = closure38(v140) - let v143 : (unit -> string) = method56() - method5(v141, v142, v143) + let v142 : (unit -> string) = closure37(v140) + let v143 : (unit -> string) = method54() + method4(v141, v142, v143) return -2147483648 (* *) @@ -5028,14 +4880,14 @@ and method55 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v146 : int32 = v145 let v147 : (System.Collections.Concurrent.ConcurrentStack -> string seq) = Seq.rev let v148 : string seq = v147 v65 - let v149 : string = method33() + let v149 : string = method32() let v150 : (string -> (string seq -> string)) = String.concat let v151 : (string seq -> string) = v150 v149 let v152 : string = v151 v148 let v153 : US0 = US0_1 - let v154 : (unit -> string) = closure39(v146, v152) - let v155 : (unit -> string) = method56() - method5(v153, v154, v155) + let v154 : (unit -> string) = closure38(v146, v152) + let v155 : (unit -> string) = method54() + method4(v153, v154, v155) return struct (v146, v152) } |> fun x -> _v19 <- Some x @@ -5049,19 +4901,19 @@ and method55 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : |> fun x -> _v7 <- Some x let v158 : Async = _v7.Value v158 -and method40 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) : struct (int32 * string) = +and method39 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) : struct (int32 * string) = let v7 : bool = true let mutable _v7 : struct (int32 * string) option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v8 : string = method41(v0, v1, v2, v3, v4, v5, v6) - let struct (v9 : string, v10 : string) = method42() + let v8 : string = method40(v0, v1, v2, v3, v4, v5, v6) + let struct (v9 : string, v10 : string) = method41() let v11 : int32 = v8.Length let v12 : (char []) = Array.zeroCreate (v11) let v13 : Mut4 = {l0 = 0} : Mut4 - while method13(v11, v13) do + while method12(v11, v13) do let v15 : int32 = v13.l0 let v16 : char = v8.[int v15] v12.[int v15] <- v16 @@ -5071,14 +4923,14 @@ and method40 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v18 : ((char []) -> char list) = Array.toList let v19 : char list = v18 v12 let v20 : ((char -> (UH1 -> UH1)) -> (char list -> (UH1 -> UH1))) = List.foldBack - let v21 : (char -> (UH1 -> UH1)) = method14() + let v21 : (char -> (UH1 -> UH1)) = method13() let v22 : (char list -> (UH1 -> UH1)) = v20 v21 let v23 : (UH1 -> UH1) = v22 v19 let v24 : UH1 = UH1_0 let v25 : UH1 = v23 v24 let v26 : US7 = US7_0 - let struct (v27 : string, v28 : string) = method43(v10, v9, v25, v26) - let v29 : (string []) = method12(v28) + let struct (v27 : string, v28 : string) = method42(v10, v9, v25, v26) + let v29 : (string []) = method11(v28) let v30 : string = "$0.to_vec()" let v31 : Vec = Fable.Core.RustInterop.emitRustExpr v29 v30 let v32 : string = "true; let _result = v31.into_iter().map(|x| { //" @@ -5096,7 +4948,7 @@ and method40 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v44 : US0 = US0_1 let v45 : (unit -> string) = closure13() let v46 : (unit -> string) = closure14(v0, v1, v2, v3, v4, v5, v6, v27, v43) - method5(v44, v45, v46) + method4(v44, v45, v46) let v47 : string = "let __result = Box::pin(async move { //" Fable.Core.RustInterop.emitRustExpr () v47 let v48 : bool = true @@ -5169,7 +5021,7 @@ and method40 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : v94 let v96 : string = "std::process::Command::spawn($0)" let v97 : Result = Fable.Core.RustInterop.emitRustExpr v95 v96 - let v98 : (std_io_Error -> std_string_String) = method44() + let v98 : (std_io_Error -> std_string_String) = method43() let v99 : string = "$0.map_err(|x| $1(x))" let v100 : Result = Fable.Core.RustInterop.emitRustExpr struct (v97, v98) v99 let v101 : string = "true; let _result = $0.map(|x| { //" @@ -5185,20 +5037,20 @@ and method40 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v111 : bool = Fable.Core.RustInterop.emitRustExpr v109 v110 let v112 : string = "_result" let v113 : Result>, std_string_String> = Fable.Core.RustInterop.emitRustExpr () v112 - let v114 : string = "match v113 { Ok(x) => $0(x), Err(e) => $1(e) }" - let v115 : (std_sync_Arc> -> US9) = closure16() - let v116 : (std_string_String -> US9) = closure17() - let v117 : US9 = Fable.Core.RustInterop.emitRustExpr struct (v115, v116) v114 - let struct (v316 : int32, v317 : US2, v318 : US10) = + let v114 : (std_sync_Arc> -> US9) = method44() + let v115 : (std_string_String -> US9) = method45() + let v116 : string = "match v113 { Ok(x) => $0(x), Err(e) => $1(e) }" + let v117 : US9 = Fable.Core.RustInterop.emitRustExpr struct (v114, v115) v116 + let struct (v443 : int32, v444 : US2, v445 : US10) = match v117 with - | US9_1(v307) -> (* Error *) - let v308 : US0 = US0_4 - let v309 : (unit -> string) = closure18() - let v310 : (unit -> string) = closure19(v307) - method5(v308, v309, v310) - let v311 : US2 = US2_0(v307) - let v312 : US10 = US10_1 - struct (-1, v311, v312) + | US9_1(v434) -> (* Error *) + let v435 : US0 = US0_4 + let v436 : (unit -> string) = closure18() + let v437 : (unit -> string) = closure19(v434) + method4(v435, v436, v437) + let v438 : US2 = US2_0(v434) + let v439 : US10 = US10_1 + struct (-1, v438, v439) | US9_0(v118) -> (* Ok *) let v119 : string = "$0.lock().unwrap().as_mut().unwrap().stdout.take().unwrap()" let v120 : std_process_ChildStdout = Fable.Core.RustInterop.emitRustExpr v118 v119 @@ -5206,366 +5058,511 @@ and method40 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v122 : std_process_ChildStderr = Fable.Core.RustInterop.emitRustExpr v118 v121 let v123 : string = "$0.lock().unwrap().as_mut().unwrap().stdin.take().unwrap()" let v124 : std_process_ChildStdin = Fable.Core.RustInterop.emitRustExpr v118 v123 - let v125 : std_process_ChildStdout option = Some v120 - let v126 : string = "std::sync::Mutex::new($0)" - let v127 : std_sync_Mutex = Fable.Core.RustInterop.emitRustExpr v125 v126 - let v128 : string = "std::sync::Arc::new($0)" - let v129 : std_sync_Arc> = Fable.Core.RustInterop.emitRustExpr v127 v128 - let v130 : std_process_ChildStderr option = Some v122 - let v131 : string = "std::sync::Mutex::new($0)" - let v132 : std_sync_Mutex = Fable.Core.RustInterop.emitRustExpr v130 v131 - let v133 : string = "std::sync::Arc::new($0)" - let v134 : std_sync_Arc> = Fable.Core.RustInterop.emitRustExpr v132 v133 - let v135 : std_process_ChildStdin option = Some v124 - let v136 : string = "std::sync::Mutex::new($0)" - let v137 : std_sync_Mutex = Fable.Core.RustInterop.emitRustExpr v135 v136 - let v138 : string = "std::sync::Arc::new($0)" - let v139 : std_sync_Arc> = Fable.Core.RustInterop.emitRustExpr v137 v138 - let v140 : string = "{ let (sender, receiver) = std::sync::mpsc::channel(); (sender, std::sync::Arc::new(receiver)) }" - let struct (v141 : std_sync_mpsc_Sender, v142 : std_sync_Arc>) = Fable.Core.RustInterop.emitRustExpr () v140 - let v143 : std_sync_Arc> = method45(v142) - let v144 : string = "true; let v143 = v143" - let v145 : bool = Fable.Core.RustInterop.emitRustExpr v143 v144 - let v146 : string = "std::sync::Mutex::new($0)" - let v147 : std_sync_Mutex> = Fable.Core.RustInterop.emitRustExpr v141 v146 - let v148 : string = "std::sync::Arc::new($0)" - let v149 : std_sync_Arc>> = Fable.Core.RustInterop.emitRustExpr v147 v148 - let v150 : string = "v149.clone()" - let v151 : std_sync_Arc>> = Fable.Core.RustInterop.emitRustExpr () v150 - let v152 : string = "v149.clone()" - let v153 : std_sync_Arc>> = Fable.Core.RustInterop.emitRustExpr () v152 - let v154 : string = "std::sync::Mutex::new($0)" - let v155 : std_sync_Mutex>> = Fable.Core.RustInterop.emitRustExpr v143 v154 - let v156 : string = "std::sync::Arc::new($0)" - let v157 : std_sync_Arc>>> = Fable.Core.RustInterop.emitRustExpr v155 v156 - let v158 : string = "let __result = std::thread::spawn(move || { //" - Fable.Core.RustInterop.emitRustExpr () v158 - let v159 : string = "v129.lock().unwrap().take().unwrap()" - let v160 : std_process_ChildStdout = Fable.Core.RustInterop.emitRustExpr () v159 - let v161 : string = "encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build(v160)" - let v162 : encoding_rs_io_DecodeReaderBytes> = Fable.Core.RustInterop.emitRustExpr () v161 - let v163 : string = "std::io::BufReader::new(v162)" - let v164 : std_io_BufReader>> = Fable.Core.RustInterop.emitRustExpr () v163 - let v165 : string = "std::sync::Mutex::new($0)" - let v166 : std_sync_Mutex>>> = Fable.Core.RustInterop.emitRustExpr v164 v165 - let v167 : string = "std::sync::Arc::new($0)" - let v168 : std_sync_Arc>>>> = Fable.Core.RustInterop.emitRustExpr v166 v167 - let v169 : string = "true; for line in std::io::BufRead::lines(std::io::Read::by_ref(&mut *$0.lock().unwrap())).collect::>() { $1(line) }" - let v170 : (Result -> unit) = closure20(v5, v151) - let v171 : bool = Fable.Core.RustInterop.emitRustExpr struct (v168, v170) v169 - let v172 : bool = method47() - let v173 : string = "v172 }})" - Fable.Core.RustInterop.emitRustExpr () v173 - let v174 : string = "{ //" - Fable.Core.RustInterop.emitRustExpr () v174 - let v175 : string = "__result" - let v176 : std_thread_JoinHandle = Fable.Core.RustInterop.emitRustExpr () v175 - let v177 : string = "let __result = std::thread::spawn(move || { //" - Fable.Core.RustInterop.emitRustExpr () v177 - let v178 : string = "v134.lock().unwrap().take().unwrap()" - let v179 : std_process_ChildStderr = Fable.Core.RustInterop.emitRustExpr () v178 - let v180 : string = "encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build(v179)" - let v181 : encoding_rs_io_DecodeReaderBytes> = Fable.Core.RustInterop.emitRustExpr () v180 - let v182 : string = "std::io::BufReader::new(v181)" - let v183 : std_io_BufReader>> = Fable.Core.RustInterop.emitRustExpr () v182 - let v184 : string = "std::sync::Mutex::new($0)" - let v185 : std_sync_Mutex>>> = Fable.Core.RustInterop.emitRustExpr v183 v184 - let v186 : string = "std::sync::Arc::new($0)" - let v187 : std_sync_Arc>>>> = Fable.Core.RustInterop.emitRustExpr v185 v186 - let v188 : string = "true; for line in std::io::BufRead::lines(std::io::Read::by_ref(&mut *$0.lock().unwrap())).collect::>() { $1(line) }" - let v189 : (Result -> unit) = closure26(v5, v149) - let v190 : bool = Fable.Core.RustInterop.emitRustExpr struct (v187, v189) v188 - let v191 : bool = method47() - let v192 : string = "v191 }})" - Fable.Core.RustInterop.emitRustExpr () v192 - let v193 : string = "{ //" - Fable.Core.RustInterop.emitRustExpr () v193 - let v194 : string = "__result" - let v195 : std_thread_JoinHandle = Fable.Core.RustInterop.emitRustExpr () v194 - let v196 : US12 option = None - let _v196 = ref v196 + let v125 : string = "std::sync::Mutex::new($0)" + let v126 : std_sync_Mutex = Fable.Core.RustInterop.emitRustExpr v120 v125 + let v127 : string = "std::sync::Arc::new($0)" + let v128 : std_sync_Arc> = Fable.Core.RustInterop.emitRustExpr v126 v127 + let v129 : string = "std::sync::Mutex::new($0)" + let v130 : std_sync_Mutex = Fable.Core.RustInterop.emitRustExpr v122 v129 + let v131 : string = "std::sync::Arc::new($0)" + let v132 : std_sync_Arc> = Fable.Core.RustInterop.emitRustExpr v130 v131 + let v133 : std_process_ChildStdin option = Some v124 + let v134 : string = "std::sync::Mutex::new($0)" + let v135 : std_sync_Mutex = Fable.Core.RustInterop.emitRustExpr v133 v134 + let v136 : string = "std::sync::Arc::new($0)" + let v137 : std_sync_Arc> = Fable.Core.RustInterop.emitRustExpr v135 v136 + let v138 : string = "{ let (sender, receiver) = std::sync::mpsc::channel(); (sender, std::sync::Arc::new(receiver)) }" + let struct (v139 : std_sync_mpsc_Sender, v140 : std_sync_Arc>) = Fable.Core.RustInterop.emitRustExpr () v138 + let v141 : string = "std::sync::Mutex::new($0)" + let v142 : std_sync_Mutex> = Fable.Core.RustInterop.emitRustExpr v139 v141 + let v143 : string = "std::sync::Arc::new($0)" + let v144 : std_sync_Arc>> = Fable.Core.RustInterop.emitRustExpr v142 v143 + let v145 : string = "std::sync::Mutex::new($0)" + let v146 : std_sync_Mutex> = Fable.Core.RustInterop.emitRustExpr v139 v145 + let v147 : string = "std::sync::Arc::new($0)" + let v148 : std_sync_Arc>> = Fable.Core.RustInterop.emitRustExpr v146 v147 + let v149 : string = "std::sync::Mutex::new($0)" + let v150 : std_sync_Mutex>> = Fable.Core.RustInterop.emitRustExpr v140 v149 + let v151 : string = "std::sync::Arc::new($0)" + let v152 : std_sync_Arc>>> = Fable.Core.RustInterop.emitRustExpr v150 v151 + let v153 : string = "true; let __result = std::thread::spawn(move || { //" + let v154 : bool = Fable.Core.RustInterop.emitRustExpr () v153 + let v155 : string = "$0.lock()" + let v156 : Result, std_sync_PoisonError>> = Fable.Core.RustInterop.emitRustExpr v128 v155 + let v157 : string = "$0.unwrap()" + let v158 : std_sync_MutexGuard = Fable.Core.RustInterop.emitRustExpr v156 v157 + let v159 : string = "true; let mut v158 = v158" + let v160 : bool = Fable.Core.RustInterop.emitRustExpr () v159 + let v161 : string = "&mut $0" + let v162 : Ref> = Fable.Core.RustInterop.emitRustExpr v158 v161 + let v163 : string = "encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build($0)" + let v164 : encoding_rs_io_DecodeReaderBytes>, Vec> = Fable.Core.RustInterop.emitRustExpr v162 v163 + let v165 : string = "std::io::BufReader::new(v164)" + let v166 : std_io_BufReader>, Vec>> = Fable.Core.RustInterop.emitRustExpr () v165 + let v167 : string = "std::io::BufRead::lines(v166)" + let v168 : std_io_Lines>, Vec>>> = Fable.Core.RustInterop.emitRustExpr () v167 + let v169 : string = "true; let mut v168 = v168; let _result = v168.try_for_each(|x| { //" + let v170 : bool = Fable.Core.RustInterop.emitRustExpr () v169 + let v171 : string = "x" + let v172 : Result = Fable.Core.RustInterop.emitRustExpr () v171 + let v173 : string = "$0.clone()" + let v174 : std_sync_Arc>> = Fable.Core.RustInterop.emitRustExpr v144 v173 + let v175 : (std_io_Error -> std_string_String) = method43() + let v176 : string = "$0.map_err(|x| $1(x))" + let v177 : Result = Fable.Core.RustInterop.emitRustExpr struct (v172, v175) v176 + let v178 : (std_string_String -> US11) = method46() + let v179 : (std_string_String -> US11) = method47() + let v180 : string = "match v177 { Ok(x) => $0(x), Err(e) => $1(e) }" + let v181 : US11 = Fable.Core.RustInterop.emitRustExpr struct (v178, v179) v180 + let v213 : std_string_String = + match v181 with + | US11_1(v203) -> (* Error *) + let v204 : US0 = US0_4 + let v205 : (unit -> string) = closure22() + let v206 : (unit -> string) = closure23(v203) + method4(v204, v205, v206) + let v207 : string = $"\u001b[4;7m{v203}\u001b[0m" + let v208 : string = "&*$0" + let v209 : Ref = Fable.Core.RustInterop.emitRustExpr v207 v208 + let v210 : string = "String::from($0)" + let v211 : std_string_String = Fable.Core.RustInterop.emitRustExpr v209 v210 + v211 + | US11_0(v182) -> (* Ok *) + let v183 : string = "fable_library_rust::String_::fromString($0)" + let v184 : string = Fable.Core.RustInterop.emitRustExpr v182 v183 + let v185 : string = "encoding_rs::UTF_8" + let v186 : Ref = Fable.Core.RustInterop.emitRustExpr () v185 + let v187 : string = "$0.encode(&*$1).0" + let v188 : std_borrow_Cow> = Fable.Core.RustInterop.emitRustExpr struct (v186, v184) v187 + let v189 : string = "$0.as_ref()" + let v190 : Ref> = Fable.Core.RustInterop.emitRustExpr v188 v189 + let v191 : string = "std::str::from_utf8(v190)" + let v192 : Result, std_str_Utf8Error> = Fable.Core.RustInterop.emitRustExpr () v191 + let v193 : string = "$0.unwrap()" + let v194 : Ref = Fable.Core.RustInterop.emitRustExpr v192 v193 + let v195 : string = "String::from($0)" + let v196 : std_string_String = Fable.Core.RustInterop.emitRustExpr v194 v195 + let v197 : string = "fable_library_rust::String_::fromString($0)" + let v198 : string = Fable.Core.RustInterop.emitRustExpr v196 v197 + let v199 : string = $"> {v198}" + if v5 then + let v200 : US0 = US0_0 + let v201 : (unit -> string) = closure24(v199) + let v202 : (unit -> string) = closure6() + method4(v200, v201, v202) + else + System.Console.WriteLine v199 + () + v196 + let v214 : string = "$0.lock()" + let v215 : Result>, std_sync_PoisonError>>> = Fable.Core.RustInterop.emitRustExpr v174 v214 + let v216 : string = "$0.unwrap()" + let v217 : std_sync_MutexGuard> = Fable.Core.RustInterop.emitRustExpr v215 v216 + let v218 : string = "&$0" + let v219 : Ref> = Fable.Core.RustInterop.emitRustExpr v217 v218 + let v220 : string = "$0.send($1)" + let v221 : Result> = Fable.Core.RustInterop.emitRustExpr struct (v219, v213) v220 + let v222 : (std_sync_mpsc_SendError -> std_string_String) = method48() + let v223 : string = "$0.map_err(|x| $1(x))" + let v224 : Result = Fable.Core.RustInterop.emitRustExpr struct (v221, v222) v223 + let v225 : string = "$0" + let v226 : core_ops_Try = Fable.Core.RustInterop.emitRustExpr v224 v225 + let v227 : string = "true; $0 }); //" + let v228 : bool = Fable.Core.RustInterop.emitRustExpr v226 v227 + let v229 : string = "_result" + let v230 : Result = Fable.Core.RustInterop.emitRustExpr () v229 + let v231 : Result = method49(v230) + let v232 : string = "" + let v233 : string = "}" + let v234 : string = v232 + v233 + let v235 : string = "v231 " + v234 + "); " + v232 + " //" + Fable.Core.RustInterop.emitRustExpr () v235 + let v236 : string = "__result" + let v237 : std_thread_JoinHandle> = Fable.Core.RustInterop.emitRustExpr () v236 + let v238 : string = "true; let __result = std::thread::spawn(move || { //" + let v239 : bool = Fable.Core.RustInterop.emitRustExpr () v238 + let v240 : string = "$0.lock()" + let v241 : Result, std_sync_PoisonError>> = Fable.Core.RustInterop.emitRustExpr v132 v240 + let v242 : string = "$0.unwrap()" + let v243 : std_sync_MutexGuard = Fable.Core.RustInterop.emitRustExpr v241 v242 + let v244 : string = "true; let mut v243 = v243" + let v245 : bool = Fable.Core.RustInterop.emitRustExpr () v244 + let v246 : string = "&mut $0" + let v247 : Ref> = Fable.Core.RustInterop.emitRustExpr v243 v246 + let v248 : string = "encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build($0)" + let v249 : encoding_rs_io_DecodeReaderBytes>, Vec> = Fable.Core.RustInterop.emitRustExpr v247 v248 + let v250 : string = "std::io::BufReader::new(v249)" + let v251 : std_io_BufReader>, Vec>> = Fable.Core.RustInterop.emitRustExpr () v250 + let v252 : string = "std::io::BufRead::lines(v251)" + let v253 : std_io_Lines>, Vec>>> = Fable.Core.RustInterop.emitRustExpr () v252 + let v254 : string = "true; let mut v253 = v253; let _result = v253.try_for_each(|x| { //" + let v255 : bool = Fable.Core.RustInterop.emitRustExpr () v254 + let v256 : string = "x" + let v257 : Result = Fable.Core.RustInterop.emitRustExpr () v256 + let v258 : string = "$0.clone()" + let v259 : std_sync_Arc>> = Fable.Core.RustInterop.emitRustExpr v148 v258 + let v260 : (std_io_Error -> std_string_String) = method43() + let v261 : string = "$0.map_err(|x| $1(x))" + let v262 : Result = Fable.Core.RustInterop.emitRustExpr struct (v257, v260) v261 + let v263 : (std_string_String -> US11) = method46() + let v264 : (std_string_String -> US11) = method47() + let v265 : string = "match v262 { Ok(x) => $0(x), Err(e) => $1(e) }" + let v266 : US11 = Fable.Core.RustInterop.emitRustExpr struct (v263, v264) v265 + let v303 : std_string_String = + match v266 with + | US11_1(v293) -> (* Error *) + let v294 : US0 = US0_4 + let v295 : (unit -> string) = closure22() + let v296 : (unit -> string) = closure23(v293) + method4(v294, v295, v296) + let v297 : string = $"\u001b[4;7m{v293}\u001b[0m" + let v298 : string = "&*$0" + let v299 : Ref = Fable.Core.RustInterop.emitRustExpr v297 v298 + let v300 : string = "String::from($0)" + let v301 : std_string_String = Fable.Core.RustInterop.emitRustExpr v299 v300 + v301 + | US11_0(v267) -> (* Ok *) + let v268 : string = "fable_library_rust::String_::fromString($0)" + let v269 : string = Fable.Core.RustInterop.emitRustExpr v267 v268 + let v270 : string = "encoding_rs::UTF_8" + let v271 : Ref = Fable.Core.RustInterop.emitRustExpr () v270 + let v272 : string = "$0.encode(&*$1).0" + let v273 : std_borrow_Cow> = Fable.Core.RustInterop.emitRustExpr struct (v271, v269) v272 + let v274 : string = "$0.as_ref()" + let v275 : Ref> = Fable.Core.RustInterop.emitRustExpr v273 v274 + let v276 : string = "std::str::from_utf8(v275)" + let v277 : Result, std_str_Utf8Error> = Fable.Core.RustInterop.emitRustExpr () v276 + let v278 : string = "$0.unwrap()" + let v279 : Ref = Fable.Core.RustInterop.emitRustExpr v277 v278 + let v280 : string = "String::from($0)" + let v281 : std_string_String = Fable.Core.RustInterop.emitRustExpr v279 v280 + let v282 : string = "fable_library_rust::String_::fromString($0)" + let v283 : string = Fable.Core.RustInterop.emitRustExpr v281 v282 + let v284 : string = $"! {v283}" + if v5 then + let v285 : US0 = US0_0 + let v286 : (unit -> string) = closure24(v284) + let v287 : (unit -> string) = closure6() + method4(v285, v286, v287) + else + System.Console.WriteLine v284 + () + let v288 : string = $"\u001b[4;7m{v281}\u001b[0m" + let v289 : string = "&*$0" + let v290 : Ref = Fable.Core.RustInterop.emitRustExpr v288 v289 + let v291 : string = "String::from($0)" + let v292 : std_string_String = Fable.Core.RustInterop.emitRustExpr v290 v291 + v292 + let v304 : string = "$0.lock()" + let v305 : Result>, std_sync_PoisonError>>> = Fable.Core.RustInterop.emitRustExpr v259 v304 + let v306 : string = "$0.unwrap()" + let v307 : std_sync_MutexGuard> = Fable.Core.RustInterop.emitRustExpr v305 v306 + let v308 : string = "&$0" + let v309 : Ref> = Fable.Core.RustInterop.emitRustExpr v307 v308 + let v310 : string = "$0.send($1)" + let v311 : Result> = Fable.Core.RustInterop.emitRustExpr struct (v309, v303) v310 + let v312 : (std_sync_mpsc_SendError -> std_string_String) = method48() + let v313 : string = "$0.map_err(|x| $1(x))" + let v314 : Result = Fable.Core.RustInterop.emitRustExpr struct (v311, v312) v313 + let v315 : string = "$0" + let v316 : core_ops_Try = Fable.Core.RustInterop.emitRustExpr v314 v315 + let v317 : string = "true; $0 }); //" + let v318 : bool = Fable.Core.RustInterop.emitRustExpr v316 v317 + let v319 : string = "_result" + let v320 : Result = Fable.Core.RustInterop.emitRustExpr () v319 + let v321 : Result = method49(v320) + let v322 : string = v232 + v233 + let v323 : string = "v321 " + v322 + "); " + v232 + " //" + Fable.Core.RustInterop.emitRustExpr () v323 + let v324 : string = "__result" + let v325 : std_thread_JoinHandle> = Fable.Core.RustInterop.emitRustExpr () v324 + let v326 : US12 option = None + let _v326 = ref v326 match v4 with | Some x -> ( (fun () -> (fun () -> - let v197 : (std_sync_Arc> -> unit) = x - let v198 : US12 = US12_0(v197) - v198 + let v327 : (std_sync_Arc> -> unit) = x + let v328 : US12 = US12_0(v327) + v328 ) |> fun x -> x () |> Some ) () ) | None -> None - |> fun x -> _v196.Value <- x - let v199 : US12 option = _v196.Value - let v200 : US12 = US12_1 - let v201 : US12 = v199 |> Option.defaultValue v200 - match v201 with + |> fun x -> _v326.Value <- x + let v329 : US12 option = _v326.Value + let v330 : US12 = US12_1 + let v331 : US12 = v329 |> Option.defaultValue v330 + match v331 with | US12_1 -> (* None *) () - | US12_0(v202) -> (* Some *) - let v203 : std_sync_Arc> = method48(v139) - let v204 : string = "v203.lock()" - let v205 : Result, std_sync_PoisonError>> = Fable.Core.RustInterop.emitRustExpr () v204 - let v206 : string = "$0.unwrap()" - let v207 : std_sync_MutexGuard = Fable.Core.RustInterop.emitRustExpr v205 v206 - let v208 : string = "true; let mut v207 = v207" - let v209 : bool = Fable.Core.RustInterop.emitRustExpr () v208 - let v210 : string = "&mut $0" - let v211 : Ref> = Fable.Core.RustInterop.emitRustExpr v207 v210 - let v212 : string = "Option::take($0)" - let v213 : std_process_ChildStdin option = Fable.Core.RustInterop.emitRustExpr v211 v212 - let v214 : string = "true; let _result = v213.map(|x| { //" - let v215 : bool = Fable.Core.RustInterop.emitRustExpr () v214 - let v216 : string = "x" - let v217 : std_process_ChildStdin = Fable.Core.RustInterop.emitRustExpr () v216 - let v218 : string = "std::sync::Mutex::new($0)" - let v219 : std_sync_Mutex = Fable.Core.RustInterop.emitRustExpr v217 v218 - let v220 : string = "std::sync::Arc::new($0)" - let v221 : std_sync_Arc> = Fable.Core.RustInterop.emitRustExpr v219 v220 - let v222 : string = "true; $0 })" - let v223 : bool = Fable.Core.RustInterop.emitRustExpr v221 v222 - let v224 : string = "_result" - let v225 : std_sync_Arc> option = Fable.Core.RustInterop.emitRustExpr () v224 - let v226 : US13 option = None - let _v226 = ref v226 - match v225 with + | US12_0(v332) -> (* Some *) + let v333 : string = "$0.lock()" + let v334 : Result, std_sync_PoisonError>> = Fable.Core.RustInterop.emitRustExpr v137 v333 + let v335 : string = "$0.unwrap()" + let v336 : std_sync_MutexGuard = Fable.Core.RustInterop.emitRustExpr v334 v335 + let v337 : string = "true; let mut v336 = v336" + let v338 : bool = Fable.Core.RustInterop.emitRustExpr () v337 + let v339 : string = "&mut $0" + let v340 : Ref> = Fable.Core.RustInterop.emitRustExpr v336 v339 + let v341 : string = "Option::take($0)" + let v342 : std_process_ChildStdin option = Fable.Core.RustInterop.emitRustExpr v340 v341 + let v343 : string = "true; let _result = v342.map(|x| { //" + let v344 : bool = Fable.Core.RustInterop.emitRustExpr () v343 + let v345 : string = "x" + let v346 : std_process_ChildStdin = Fable.Core.RustInterop.emitRustExpr () v345 + let v347 : string = "std::sync::Mutex::new($0)" + let v348 : std_sync_Mutex = Fable.Core.RustInterop.emitRustExpr v346 v347 + let v349 : string = "std::sync::Arc::new($0)" + let v350 : std_sync_Arc> = Fable.Core.RustInterop.emitRustExpr v348 v349 + let v351 : string = "true; $0 })" + let v352 : bool = Fable.Core.RustInterop.emitRustExpr v350 v351 + let v353 : string = "_result" + let v354 : std_sync_Arc> option = Fable.Core.RustInterop.emitRustExpr () v353 + let v355 : US13 option = None + let _v355 = ref v355 + match v354 with | Some x -> ( (fun () -> (fun () -> - let v227 : std_sync_Arc> = x - let v228 : US13 = US13_0(v227) - v228 + let v356 : std_sync_Arc> = x + let v357 : US13 = US13_0(v356) + v357 ) |> fun x -> x () |> Some ) () ) | None -> None - |> fun x -> _v226.Value <- x - let v229 : US13 option = _v226.Value - let v230 : US13 = US13_1 - let v231 : US13 = v229 |> Option.defaultValue v230 - match v231 with + |> fun x -> _v355.Value <- x + let v358 : US13 option = _v355.Value + let v359 : US13 = US13_1 + let v360 : US13 = v358 |> Option.defaultValue v359 + match v360 with | US13_1 -> (* None *) () - | US13_0(v232) -> (* Some *) - v202 v232 - let v233 : std_sync_Arc> = method49(v232) - let v234 : string = "v233.lock()" - let v235 : Result, std_sync_PoisonError>> = Fable.Core.RustInterop.emitRustExpr () v234 - let v236 : string = "$0.unwrap()" - let v237 : std_sync_MutexGuard = Fable.Core.RustInterop.emitRustExpr v235 v236 - let v238 : std_sync_MutexGuard = method50(v237) - let v239 : string = "true; let mut v238 = v238" - let v240 : bool = Fable.Core.RustInterop.emitRustExpr () v239 - let v241 : string = "true; std::io::Write::flush(&mut *$0).unwrap()" - let v242 : bool = Fable.Core.RustInterop.emitRustExpr v238 v241 + | US13_0(v361) -> (* Some *) + v332 v361 + let v362 : string = "$0.lock()" + let v363 : Result, std_sync_PoisonError>> = Fable.Core.RustInterop.emitRustExpr v361 v362 + let v364 : string = "$0.unwrap()" + let v365 : std_sync_MutexGuard = Fable.Core.RustInterop.emitRustExpr v363 v364 + let v366 : std_sync_MutexGuard = method50(v365) + let v367 : string = "true; let mut v366 = v366" + let v368 : bool = Fable.Core.RustInterop.emitRustExpr () v367 + let v369 : string = "true; std::io::Write::flush(&mut *$0).unwrap()" + let v370 : bool = Fable.Core.RustInterop.emitRustExpr v366 v369 () - let v243 : std_sync_Arc> = method51(v118) - let v244 : string = "v243.lock()" - let v245 : Result, std_sync_PoisonError>> = Fable.Core.RustInterop.emitRustExpr () v244 - let v246 : string = "$0.unwrap()" - let v247 : std_sync_MutexGuard = Fable.Core.RustInterop.emitRustExpr v245 v246 - let v248 : string = "true; let mut v247 = v247" - let v249 : bool = Fable.Core.RustInterop.emitRustExpr () v248 - let v250 : string = "&mut $0" - let v251 : Ref> = Fable.Core.RustInterop.emitRustExpr v247 v250 - let v252 : string = "Option::take($0)" - let v253 : std_process_Child option = Fable.Core.RustInterop.emitRustExpr v251 v252 - let v254 : string = "$0.unwrap()" - let v255 : std_process_Child = Fable.Core.RustInterop.emitRustExpr v253 v254 - let v256 : string = "$0.wait_with_output()" - let v257 : Result = Fable.Core.RustInterop.emitRustExpr v255 v256 - let v258 : (std_io_Error -> std_string_String) = method44() - let v259 : string = "$0.map_err(|x| $1(x))" - let v260 : Result = Fable.Core.RustInterop.emitRustExpr struct (v257, v258) v259 - let v261 : std_thread_JoinHandle = method52(v176) - let v262 : string = "v261" - let v263 : string = "" - let v264 : string = v262 + v263 - let v265 : string = v264 + v263 - let v266 : std_thread_JoinHandle = method52(v195) - let v267 : string = "v266" - let v268 : string = "," - let v269 : string = v267 + v268 - let v270 : string = v269 + v265 - let v271 : string = "vec![" + v270 + "]" - let v272 : Vec> = Fable.Core.RustInterop.emitRustExpr () v271 - let v273 : string = "true; v272.into_iter().for_each(|x| { //" - let v274 : bool = Fable.Core.RustInterop.emitRustExpr () v273 - let v275 : string = "x" - let v276 : std_thread_JoinHandle = Fable.Core.RustInterop.emitRustExpr () v275 - let v277 : string = "std::thread::JoinHandle::join($0)" - let v278 : Result>>>>>>> = Fable.Core.RustInterop.emitRustExpr v276 v277 - let v279 : string = "$0.unwrap()" - let v280 : bool = Fable.Core.RustInterop.emitRustExpr v278 v279 - let v281 : string = "true; () })" - let v282 : bool = Fable.Core.RustInterop.emitRustExpr () v281 - let v283 : (std_process_Output -> US14) = closure27() - let v284 : (std_string_String -> US14) = closure28() - let v285 : US14 = match v260 with Ok x -> v283 x | Error x -> v284 x - match v285 with - | US14_1(v295) -> (* Error *) - let v296 : US0 = US0_4 - let v297 : (unit -> string) = closure29() - let v298 : (unit -> string) = closure30(v295) - method5(v296, v297, v298) - let v299 : US2 = US2_0(v295) - let v300 : US10 = US10_1 - struct (-2, v299, v300) - | US14_0(v286) -> (* Ok *) - let v287 : string = "$0.status" - let v288 : std_process_ExitStatus = Fable.Core.RustInterop.emitRustExpr v286 v287 - let v289 : string = "$0.code()" - let v290 : int32 option = Fable.Core.RustInterop.emitRustExpr v288 v289 - let v291 : string = "$0.unwrap()" - let v292 : int32 = Fable.Core.RustInterop.emitRustExpr v290 v291 - let v293 : US2 = US2_1 - let v294 : US10 = US10_0(v157) - struct (v292, v293, v294) - let v323 : std_sync_Arc>>> option = - match v318 with + let v371 : string = "$0.lock()" + let v372 : Result, std_sync_PoisonError>> = Fable.Core.RustInterop.emitRustExpr v118 v371 + let v373 : string = "$0.unwrap()" + let v374 : std_sync_MutexGuard = Fable.Core.RustInterop.emitRustExpr v372 v373 + let v375 : string = "true; let mut v374 = v374" + let v376 : bool = Fable.Core.RustInterop.emitRustExpr () v375 + let v377 : string = "&mut $0" + let v378 : Ref> = Fable.Core.RustInterop.emitRustExpr v374 v377 + let v379 : string = "Option::take($0)" + let v380 : std_process_Child option = Fable.Core.RustInterop.emitRustExpr v378 v379 + let v381 : string = "$0.unwrap()" + let v382 : std_process_Child = Fable.Core.RustInterop.emitRustExpr v380 v381 + let v383 : string = "$0.wait_with_output()" + let v384 : Result = Fable.Core.RustInterop.emitRustExpr v382 v383 + let v385 : (std_io_Error -> std_string_String) = method43() + let v386 : string = "$0.map_err(|x| $1(x))" + let v387 : Result = Fable.Core.RustInterop.emitRustExpr struct (v384, v385) v386 + let v388 : std_thread_JoinHandle> = method51(v325) + let v389 : string = "v388" + let v390 : string = v389 + v232 + let v391 : string = v390 + v232 + let v392 : std_thread_JoinHandle> = method51(v237) + let v393 : string = "v392" + let v394 : string = "," + let v395 : string = v393 + v394 + let v396 : string = v395 + v391 + let v397 : string = "vec![" + v396 + "]" + let v398 : Vec>> = Fable.Core.RustInterop.emitRustExpr () v397 + let v399 : string = "true; v398.into_iter().for_each(|x| { //" + let v400 : bool = Fable.Core.RustInterop.emitRustExpr () v399 + let v401 : string = "x" + let v402 : std_thread_JoinHandle> = Fable.Core.RustInterop.emitRustExpr () v401 + let v403 : string = "std::thread::JoinHandle::join($0)" + let v404 : Result, Box>>>>>>> = Fable.Core.RustInterop.emitRustExpr v402 v403 + let v405 : string = "$0.unwrap()" + let v406 : Result = Fable.Core.RustInterop.emitRustExpr v404 v405 + let v407 : string = "$0.unwrap()" + Fable.Core.RustInterop.emitRustExpr v406 v407 + let v408 : string = "true; () }}); { //" + let v409 : bool = Fable.Core.RustInterop.emitRustExpr () v408 + let v410 : (std_process_Output -> US14) = closure26() + let v411 : (std_string_String -> US14) = closure27() + let v412 : US14 = match v387 with Ok x -> v410 x | Error x -> v411 x + match v412 with + | US14_1(v422) -> (* Error *) + let v423 : US0 = US0_4 + let v424 : (unit -> string) = closure28() + let v425 : (unit -> string) = closure29(v422) + method4(v423, v424, v425) + let v426 : US2 = US2_0(v422) + let v427 : US10 = US10_1 + struct (-2, v426, v427) + | US14_0(v413) -> (* Ok *) + let v414 : string = "$0.status" + let v415 : std_process_ExitStatus = Fable.Core.RustInterop.emitRustExpr v413 v414 + let v416 : string = "$0.code()" + let v417 : int32 option = Fable.Core.RustInterop.emitRustExpr v415 v416 + let v418 : string = "$0.unwrap()" + let v419 : int32 = Fable.Core.RustInterop.emitRustExpr v417 v418 + let v420 : US2 = US2_1 + let v421 : US10 = US10_0(v152) + struct (v419, v420, v421) + let v450 : std_sync_Arc>>> option = + match v445 with | US10_1 -> (* None *) - let v321 : std_sync_Arc>>> option = None - v321 - | US10_0(v319) -> (* Some *) - let v320 : std_sync_Arc>>> option = Some v319 - v320 - let v324 : string = "true; let _result = v323.map(|x| { //" - let v325 : bool = Fable.Core.RustInterop.emitRustExpr () v324 - let v326 : string = "x" - let v327 : std_sync_Arc>>> = Fable.Core.RustInterop.emitRustExpr () v326 - let v328 : std_sync_Arc>>> = method53(v327) - let v329 : string = "v328.lock()" - let v330 : Result>>, std_sync_PoisonError>>>> = Fable.Core.RustInterop.emitRustExpr () v329 - let v331 : string = "$0.unwrap()" - let v332 : std_sync_MutexGuard>> = Fable.Core.RustInterop.emitRustExpr v330 v331 - let v333 : string = "v332.iter()" - let v334 : _ = Fable.Core.RustInterop.emitRustExpr () v333 - let v335 : string = "v334.collect::>()" - let v336 : Vec = Fable.Core.RustInterop.emitRustExpr () v335 - let v337 : string = "true; let _result = v336.into_iter().map(|x| { //" - let v338 : bool = Fable.Core.RustInterop.emitRustExpr () v337 - let v339 : string = "x" - let v340 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v339 - let v341 : string = "fable_library_rust::String_::fromString($0)" - let v342 : string = Fable.Core.RustInterop.emitRustExpr v340 v341 - let v343 : string = "true; $0 }).collect::>()" - let v344 : bool = Fable.Core.RustInterop.emitRustExpr v342 v343 - let v345 : string = "_result" - let v346 : Vec = Fable.Core.RustInterop.emitRustExpr () v345 - let v347 : string = "fable_library_rust::NativeArray_::array_from($0)" - let v348 : (string []) = Fable.Core.RustInterop.emitRustExpr v346 v347 - let v349 : ((string []) -> string seq) = Seq.ofArray - let v350 : string seq = v349 v348 - let v351 : string = method33() - let v352 : (string -> (string seq -> string)) = String.concat - let v353 : (string seq -> string) = v352 v351 - let v354 : string = v353 v350 - let v355 : string = "true; $0 })" - let v356 : bool = Fable.Core.RustInterop.emitRustExpr v354 v355 - let v357 : string = "_result" - let v358 : string option = Fable.Core.RustInterop.emitRustExpr () v357 - let v365 : US3 = - match v317 with + let v448 : std_sync_Arc>>> option = None + v448 + | US10_0(v446) -> (* Some *) + let v447 : std_sync_Arc>>> option = Some v446 + v447 + let v451 : string = "true; let _result = v450.map(|x| { //" + let v452 : bool = Fable.Core.RustInterop.emitRustExpr () v451 + let v453 : string = "x" + let v454 : std_sync_Arc>>> = Fable.Core.RustInterop.emitRustExpr () v453 + let v455 : string = "$0.lock()" + let v456 : Result>>, std_sync_PoisonError>>>> = Fable.Core.RustInterop.emitRustExpr v454 v455 + let v457 : string = "$0.unwrap()" + let v458 : std_sync_MutexGuard>> = Fable.Core.RustInterop.emitRustExpr v456 v457 + let v459 : string = "v458.iter()" + let v460 : _ = Fable.Core.RustInterop.emitRustExpr () v459 + let v461 : string = "v460.collect::>()" + let v462 : Vec = Fable.Core.RustInterop.emitRustExpr () v461 + let v463 : string = "true; let _result = v462.into_iter().map(|x| { //" + let v464 : bool = Fable.Core.RustInterop.emitRustExpr () v463 + let v465 : string = "x" + let v466 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v465 + let v467 : string = "fable_library_rust::String_::fromString($0)" + let v468 : string = Fable.Core.RustInterop.emitRustExpr v466 v467 + let v469 : string = "true; $0 }).collect::>()" + let v470 : bool = Fable.Core.RustInterop.emitRustExpr v468 v469 + let v471 : string = "_result" + let v472 : Vec = Fable.Core.RustInterop.emitRustExpr () v471 + let v473 : string = "fable_library_rust::NativeArray_::array_from($0)" + let v474 : (string []) = Fable.Core.RustInterop.emitRustExpr v472 v473 + let v475 : ((string []) -> string seq) = Seq.ofArray + let v476 : string seq = v475 v474 + let v477 : string = method32() + let v478 : (string -> (string seq -> string)) = String.concat + let v479 : (string seq -> string) = v478 v477 + let v480 : string = v479 v476 + let v481 : string = "true; $0 })" + let v482 : bool = Fable.Core.RustInterop.emitRustExpr v480 v481 + let v483 : string = "_result" + let v484 : string option = Fable.Core.RustInterop.emitRustExpr () v483 + let v491 : US3 = + match v444 with | US2_1 -> (* None *) US3_1 - | US2_0(v359) -> (* Some *) - let v360 : string = "fable_library_rust::String_::fromString($0)" - let v361 : string = Fable.Core.RustInterop.emitRustExpr v359 v360 - US3_0(v361) - let v369 : string = - match v365 with + | US2_0(v485) -> (* Some *) + let v486 : string = "fable_library_rust::String_::fromString($0)" + let v487 : string = Fable.Core.RustInterop.emitRustExpr v485 v486 + US3_0(v487) + let v495 : string = + match v491 with | US3_1 -> (* None *) - let v367 : string = "" - v367 - | US3_0(v366) -> (* Some *) - v366 - let v370 : string = v358 |> Option.defaultValue v369 - let v371 : US0 = US0_0 - let v372 : (unit -> string) = closure31() - let v373 : (unit -> string) = closure32(v316, v370) - method5(v371, v372, v373) - let v374 : (int32 * string) = v316, v370 - v374 + let v493 : string = "" + v493 + | US3_0(v492) -> (* Some *) + v492 + let v496 : string = v484 |> Option.defaultValue v495 + let v497 : US0 = US0_0 + let v498 : (unit -> string) = closure30() + let v499 : (unit -> string) = closure31(v443, v496) + method4(v497, v498, v499) + let v500 : (int32 * string) = v443, v496 + v500 ) |> fun x -> x () ) () ) |> fun x -> _v48 <- Some x - let v375 : (int32 * string) = _v48.Value - let v376 : (int32 * string) = method54(v375) - let v377 : string = "v376 }}})" - Fable.Core.RustInterop.emitRustExpr () v377 - let v378 : string = "{{ //" - Fable.Core.RustInterop.emitRustExpr () v378 - let v379 : string = "__result" - let v380 : std_pin_Pin>>> = Fable.Core.RustInterop.emitRustExpr () v379 - let v381 : string = "futures_lite::future::block_on($0)" - let v382 : (int32 * string) = Fable.Core.RustInterop.emitRustExpr v380 v381 - let (a, b) = v382 - let v383 : int32 = a - let v384 : string = b - struct (v383, v384) + let v501 : (int32 * string) = _v48.Value + let v502 : (int32 * string) = method52(v501) + let v503 : string = "" + let v504 : string = "}" + let v505 : string = v503 + v504 + let v506 : string = v505 + v504 + let v507 : string = v506 + v504 + let v508 : string = "{" + let v509 : string = v503 + v508 + let v510 : string = v509 + v508 + let v511 : string = "v502 " + v507 + "); " + v510 + " //" + Fable.Core.RustInterop.emitRustExpr () v511 + let v512 : string = "__result" + let v513 : std_pin_Pin>>> = Fable.Core.RustInterop.emitRustExpr () v512 + let v514 : string = "futures_lite::future::block_on($0)" + let v515 : (int32 * string) = Fable.Core.RustInterop.emitRustExpr v513 v514 + let (a, b) = v515 + let v516 : int32 = a + let v517 : string = b + struct (v516, v517) #endif #if FABLE_COMPILER_RUST && WASM - let struct (v385 : int32, v386 : string) = null |> unbox - struct (v385, v386) + let struct (v518 : int32, v519 : string) = null |> unbox + struct (v518, v519) #endif #if FABLE_COMPILER_RUST && CONTRACT - let struct (v387 : int32, v388 : string) = null |> unbox - struct (v387, v388) + let struct (v520 : int32, v521 : string) = null |> unbox + struct (v520, v521) #endif #if FABLE_COMPILER_TYPESCRIPT - let struct (v389 : int32, v390 : string) = null |> unbox - struct (v389, v390) + let struct (v522 : int32, v523 : string) = null |> unbox + struct (v522, v523) #endif #if FABLE_COMPILER_PYTHON - let struct (v391 : int32, v392 : string) = null |> unbox - struct (v391, v392) + let struct (v524 : int32, v525 : string) = null |> unbox + struct (v524, v525) #endif #else - let v393 : Async = method55(v0, v1, v2, v3, v4, v5, v6) - let v394 : bool = true - let mutable _v394 : struct (int32 * string) option = None + let v526 : Async = method53(v0, v1, v2, v3, v4, v5, v6) + let v527 : bool = true + let mutable _v527 : struct (int32 * string) option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let struct (v395 : int32, v396 : string) = null |> unbox - struct (v395, v396) + let struct (v528 : int32, v529 : string) = null |> unbox + struct (v528, v529) #endif #if FABLE_COMPILER_RUST && WASM - let struct (v397 : int32, v398 : string) = null |> unbox - struct (v397, v398) + let struct (v530 : int32, v531 : string) = null |> unbox + struct (v530, v531) #endif #if FABLE_COMPILER_RUST && CONTRACT - let struct (v399 : int32, v400 : string) = null |> unbox - struct (v399, v400) + let struct (v532 : int32, v533 : string) = null |> unbox + struct (v532, v533) #endif #if FABLE_COMPILER_TYPESCRIPT - let struct (v401 : int32, v402 : string) = null |> unbox - struct (v401, v402) + let struct (v534 : int32, v535 : string) = null |> unbox + struct (v534, v535) #endif #if FABLE_COMPILER_PYTHON - let struct (v403 : int32, v404 : string) = null |> unbox - struct (v403, v404) + let struct (v536 : int32, v537 : string) = null |> unbox + struct (v536, v537) #endif #else - let v405 : (Async -> struct (int32 * string)) = Async.RunSynchronously - let struct (v406 : int32, v407 : string) = v405 v393 - struct (v406, v407) + let v538 : (Async -> struct (int32 * string)) = Async.RunSynchronously + let struct (v539 : int32, v540 : string) = v538 v526 + struct (v539, v540) #endif - |> fun x -> _v394 <- Some x - let struct (v408 : int32, v409 : string) = _v394.Value - struct (v408, v409) + |> fun x -> _v527 <- Some x + let struct (v541 : int32, v542 : string) = _v527.Value + struct (v541, v542) #endif |> fun x -> _v7 <- Some x - let struct (v410 : int32, v411 : string) = _v7.Value - struct (v410, v411) -and closure40 () () : string = + let struct (v543 : int32, v544 : string) = _v7.Value + struct (v543, v544) +and closure39 () () : string = let v0 : string = "spiral_builder.run / repl error" v0 -and closure41 (v0 : uint8, v1 : uint8, v2 : string, v3 : int32) () : string = +and closure40 (v0 : uint8, v1 : uint8, v2 : string, v3 : int32) () : string = let v4 : (unit -> string) = closure6() let v5 : string = $"exit_code: {v3} / retry: {v1}/{v0} / repl_result: {v2} / {v4 ()}" v5 -and method39 (v0 : string option, v1 : uint8, v2 : string, v3 : uint8) : struct (int32 * string) = +and method38 (v0 : string option, v1 : uint8, v2 : string, v3 : uint8) : struct (int32 * string) = let v4 : System.Threading.CancellationToken option = None let v5 : (struct (string * string) []) = [||] let v6 : (struct (bool * string * int32) -> Async) option = None @@ -5576,7 +5573,7 @@ and method39 (v0 : string option, v1 : uint8, v2 : string, v3 : uint8) : struct let v11 : string = "True" let v12 : (struct (string * string) []) = [|struct (v10, v11)|] let v13 : bool = false - let struct (v14 : int32, v15 : string) = method40(v4, v9, v12, v6, v7, v13, v0) + let struct (v14 : int32, v15 : string) = method39(v4, v9, v12, v6, v7, v13, v0) let v16 : bool = v14 = 0 let v18 : bool = if v16 then @@ -5588,42 +5585,42 @@ and method39 (v0 : string option, v1 : uint8, v2 : string, v3 : uint8) : struct struct (v14, v15) else let v19 : US0 = US0_1 - let v20 : (unit -> string) = closure40() - let v21 : (unit -> string) = closure41(v1, v3, v15, v14) - method5(v19, v20, v21) + let v20 : (unit -> string) = closure39() + let v21 : (unit -> string) = closure40(v1, v3, v15, v14) + method4(v19, v20, v21) let v22 : uint8 = v3 + 1uy - method39(v0, v1, v2, v22) -and closure42 () () : string = + method38(v0, v1, v2, v22) +and closure41 () () : string = let v0 : string = "spiral_builder.run / dib / jupyter nbconvert" v0 -and closure43 (v0 : string, v1 : int32) () : string = +and closure42 (v0 : string, v1 : int32) () : string = let v2 : (unit -> string) = closure6() let v3 : string = $"exit_code: {v1} / jupyter_result.Length: {v0.Length} / {v2 ()}" v3 -and closure44 () () : string = +and closure43 () () : string = let v0 : string = "spiral_builder.run / dib / html cell ids" v0 -and closure45 (v0 : string, v1 : int32) () : string = +and closure44 (v0 : string, v1 : int32) () : string = let v2 : (unit -> string) = closure6() let v3 : string = $"exit_code: {v1} / pwsh_replace_html_result.Length: {v0.Length} / {v2 ()}" v3 -and method57 (v0 : string) : string = +and method55 (v0 : string) : string = v0 -and closure46 () () : string = +and closure45 () () : string = let v0 : string = "spiral_builder.run / dib" v0 -and closure47 (v0 : string, v1 : int32) () : string = +and closure46 (v0 : string, v1 : int32) () : string = let v2 : (unit -> string) = closure6() let v3 : string = $"exit_code: {v1} / result.Length: {v0.Length} / {v2 ()}" v3 -and closure48 () () : string = +and closure47 () () : string = let v0 : string = "spiral_builder.run" v0 -and closure49 (v0 : std_string_String) () : string = +and closure48 (v0 : std_string_String) () : string = let v1 : (unit -> string) = closure6() let v2 : string = $"subcommand: {v0} / {v1 ()}" v2 -and closure50 () struct (v0 : string, v1 : string) : (std_string_String * std_string_String) = +and closure49 () struct (v0 : string, v1 : string) : (std_string_String * std_string_String) = let v2 : string = "&*$0" let v3 : Ref = Fable.Core.RustInterop.emitRustExpr v0 v2 let v4 : string = "String::from($0)" @@ -5634,7 +5631,7 @@ and closure50 () struct (v0 : string, v1 : string) : (std_string_String * std_st let v9 : std_string_String = Fable.Core.RustInterop.emitRustExpr v7 v8 let v10 : (std_string_String * std_string_String) = v5, v9 v10 -and closure51 () (v0 : serde_json_Error) : string = +and closure50 () (v0 : serde_json_Error) : string = let v1 : bool = true let mutable _v1 : std_string_String option = None @@ -5672,11 +5669,11 @@ and closure51 () (v0 : serde_json_Error) : string = let v12 : string = "fable_library_rust::String_::fromString($0)" let v13 : string = Fable.Core.RustInterop.emitRustExpr v11 v12 v13 -and method58 () : (serde_json_Error -> string) = - closure51() -and method59 (v0 : Result) : Result = +and method56 () : (serde_json_Error -> string) = + closure50() +and method57 (v0 : Result) : Result = v0 -and method8 (v0 : clap_ArgMatches) : std_pin_Pin>>>> = +and method7 (v0 : clap_ArgMatches) : std_pin_Pin>>>> = let v1 : string = "let __result = Box::pin(async move { //" Fable.Core.RustInterop.emitRustExpr () v1 let v2 : string = "clap::ArgMatches::subcommand(Box::leak(Box::new($0))).map(|(a, b)| ($1(a), b.clone()))" @@ -5705,7 +5702,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin = Fable.Core.RustInterop.emitRustExpr v18 v19 let v21 : string = "clap::ArgMatches::get_one(&$0, v20).cloned()" @@ -5734,7 +5731,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin = Fable.Core.RustInterop.emitRustExpr v35 v36 let v38 : string = "clap::ArgMatches::get_one(&$0, v37).cloned()" @@ -5763,7 +5760,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin = Fable.Core.RustInterop.emitRustExpr v52 v53 let v55 : string = "clap::ArgMatches::get_one(&$0, v54).cloned()" @@ -5800,7 +5797,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin (* Some *) let v71 : clap_Command = method0() let v72 : string = $"_ {v70}" - let v73 : (string []) = method12(v72) + let v73 : (string []) = method11(v72) let v74 : string = "$0.to_vec()" let v75 : Vec = Fable.Core.RustInterop.emitRustExpr v73 v74 let v76 : string = "true; let _result = v75.into_iter().map(|x| { //" @@ -5817,18 +5814,18 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin = Fable.Core.RustInterop.emitRustExpr () v86 let v88 : string = "clap::Command::get_matches_from($0, v87)" let v89 : clap_ArgMatches = Fable.Core.RustInterop.emitRustExpr v71 v88 - let v90 : std_pin_Pin>>>> = method8(v89) + let v90 : std_pin_Pin>>>> = method7(v89) let v91 : string = "futures_lite::future::block_on($0)" let v92 : Result = Fable.Core.RustInterop.emitRustExpr v90 v91 let v93 : string = "$0.unwrap()" let v94 : string = Fable.Core.RustInterop.emitRustExpr v92 v93 v94 - let v98 : string = method19(v97) + let v98 : string = method18(v97) let v99 : string = "&*$0" let v100 : Ref = Fable.Core.RustInterop.emitRustExpr v98 v99 let v101 : string = "serde_json::from_str(&v100)" let v102 : Result, serde_json_Error> = Fable.Core.RustInterop.emitRustExpr () v101 - let v103 : (serde_json_Error -> std_string_String) = method20() + let v103 : (serde_json_Error -> std_string_String) = method19() let v104 : string = "$0.map_err(|x| $1(x))" let v105 : Result, std_string_String> = Fable.Core.RustInterop.emitRustExpr struct (v102, v103) v104 let v106 : string = "$0.unwrap()" @@ -5838,19 +5835,19 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin = Fable.Core.RustInterop.emitRustExpr v109 v108 let v111 : string = "String::from($0)" let v112 : std_string_String = Fable.Core.RustInterop.emitRustExpr v110 v111 - let v113 : std_string_String = method21(v112) + let v113 : std_string_String = method20(v112) let v114 : string = "std::collections::HashMap::get(&v107, &v113).map(|x| x).cloned()" let v115 : std_string_String option = Fable.Core.RustInterop.emitRustExpr () v114 let v116 : string = "$0.unwrap()" let v117 : std_string_String = Fable.Core.RustInterop.emitRustExpr v115 v116 let v118 : string = "fable_library_rust::String_::fromString($0)" let v119 : string = Fable.Core.RustInterop.emitRustExpr v117 v118 - let v120 : string = method19(v119) + let v120 : string = method18(v119) let v121 : string = "&*$0" let v122 : Ref = Fable.Core.RustInterop.emitRustExpr v120 v121 let v123 : string = "serde_json::from_str(&v122)" let v124 : Result, serde_json_Error> = Fable.Core.RustInterop.emitRustExpr () v123 - let v125 : (serde_json_Error -> std_string_String) = method20() + let v125 : (serde_json_Error -> std_string_String) = method19() let v126 : string = "$0.map_err(|x| $1(x))" let v127 : Result, std_string_String> = Fable.Core.RustInterop.emitRustExpr struct (v124, v125) v126 let v128 : string = "$0.unwrap()" @@ -5861,7 +5858,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin = Fable.Core.RustInterop.emitRustExpr v131 v132 let v134 : string = "String::from($0)" @@ -5946,22 +5943,22 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin fun x -> _v141 <- Some x let v167 : string = _v141.Value - let v168 : string = method23(v167, v131) + let v168 : string = method22(v167, v131) let v169 : bool = true let mutable _v169 : string option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v170 : string = method26(v168) - let v171 : string = method27() + let v170 : string = method25(v168) + let v171 : string = method26() let v172 : bool = true let mutable _v172 : Result option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v173 : string = method28() + let v173 : string = method27() let v174 : string = $"regex::Regex::new(&$0)" let v175 : Result = Fable.Core.RustInterop.emitRustExpr v173 v174 v175 @@ -6015,7 +6012,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin (v224) let v226 : Mut4 = {l0 = 0} : Mut4 - while method13(v224, v226) do + while method12(v224, v226) do let v228 : int32 = v226.l0 let v229 : bool = v228 < v222 let v233 : string = @@ -6082,7 +6079,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin (v238) let v240 : Mut4 = {l0 = 0} : Mut4 - while method13(v238, v240) do + while method12(v238, v240) do let v242 : int32 = v240.l0 let v243 : bool = v242 < v236 let v247 : string = @@ -6142,7 +6139,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin string) = _.ToString() let v272 : string = v271 v270 - let v273 : string = method31(v272) + let v273 : string = method30(v272) let v274 : (string -> (string seq -> string)) = String.concat let v275 : (string seq -> string) = v274 v273 v275 v261 @@ -6209,7 +6206,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin string) = System.IO.Path.GetFullPath let v303 : string = v302 v301 v303 @@ -6222,7 +6219,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin = Fable.Core.RustInterop.emitRustExpr v306 v307 let v309 : string = "String::from($0)" @@ -6307,22 +6304,22 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin fun x -> _v316 <- Some x let v342 : string = _v316.Value - let v343 : string = method23(v342, v306) + let v343 : string = method22(v342, v306) let v344 : bool = true let mutable _v344 : string option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v345 : string = method26(v343) - let v346 : string = method27() + let v345 : string = method25(v343) + let v346 : string = method26() let v347 : bool = true let mutable _v347 : Result option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let v348 : string = method28() + let v348 : string = method27() let v349 : string = $"regex::Regex::new(&$0)" let v350 : Result = Fable.Core.RustInterop.emitRustExpr v348 v349 v350 @@ -6376,7 +6373,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin (v399) let v401 : Mut4 = {l0 = 0} : Mut4 - while method13(v399, v401) do + while method12(v399, v401) do let v403 : int32 = v401.l0 let v404 : bool = v403 < v397 let v408 : string = @@ -6443,7 +6440,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin (v413) let v415 : Mut4 = {l0 = 0} : Mut4 - while method13(v413, v415) do + while method12(v413, v415) do let v417 : int32 = v415.l0 let v418 : bool = v417 < v411 let v422 : string = @@ -6503,7 +6500,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin string) = _.ToString() let v447 : string = v446 v445 - let v448 : string = method31(v447) + let v448 : string = method30(v447) let v449 : (string -> (string seq -> string)) = String.concat let v450 : (string seq -> string) = v449 v448 v450 v436 @@ -6570,7 +6567,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin string) = System.IO.Path.GetFullPath let v478 : string = v477 v476 v478 @@ -6649,7 +6646,7 @@ and method8 (v0 : clap_ArgMatches) : std_pin_Pin (string seq -> string)) = String.concat let v527 : (string seq -> string) = v526 v525 let v528 : string = v527 v524 @@ -6683,7 +6680,7 @@ inline_colorization = "~0.1" let v535 : string = Fable.Core.RustInterop.emitRustExpr v12 v534 let v537 : bool = v535 = "rust" if v537 then - let v538 : string = method34() + let v538 : string = method33() let v539 : string = "&*$0" let v540 : Ref = Fable.Core.RustInterop.emitRustExpr v538 v539 let v541 : string = "clap::ArgMatches::get_many(&$0, v540).map(|x| x.cloned().into_iter().collect())" @@ -6726,7 +6723,7 @@ inline_colorization = "~0.1" let v564 : string = Fable.Core.RustInterop.emitRustExpr v12 v563 let v566 : bool = v564 = "dib" if v566 then - let v567 : string = method9() + let v567 : string = method8() let v568 : string = "&*$0" let v569 : Ref = Fable.Core.RustInterop.emitRustExpr v567 v568 let v570 : string = "clap::ArgMatches::get_one(&$0, v569).cloned()" @@ -6735,19 +6732,19 @@ inline_colorization = "~0.1" let v573 : string option = v571 |> Option.map v572 let v574 : string = "$0.unwrap()" let v575 : string = Fable.Core.RustInterop.emitRustExpr v573 v574 - let v576 : string = method37() + let v576 : string = method36() let v577 : string = "&*$0" let v578 : Ref = Fable.Core.RustInterop.emitRustExpr v576 v577 let v579 : string = "clap::ArgMatches::get_one(&$0, v578).cloned()" let v580 : uint8 option = Fable.Core.RustInterop.emitRustExpr v13 v579 let v581 : uint8 = v580 |> Option.defaultValue 1uy - let v582 : string = method38() + let v582 : string = method37() let v583 : string = "&*$0" let v584 : Ref = Fable.Core.RustInterop.emitRustExpr v582 v583 let v585 : string = "clap::ArgMatches::get_one(&$0, v584).cloned()" let v586 : string option = Fable.Core.RustInterop.emitRustExpr v13 v585 let v587 : uint8 = 1uy - let struct (v588 : int32, v589 : string) = method39(v586, v581, v575, v587) + let struct (v588 : int32, v589 : string) = method38(v586, v581, v575, v587) let v590 : bool = v588 <> 0 let struct (v687 : int32, v688 : string) = if v590 then @@ -6760,11 +6757,11 @@ inline_colorization = "~0.1" let v595 : string option = None let v596 : string = $"jupyter nbconvert \"{v575}.ipynb\" --to html --HTMLExporter.theme=dark" let v597 : bool = true - let struct (v598 : int32, v599 : string) = method40(v591, v596, v592, v593, v594, v597, v595) + let struct (v598 : int32, v599 : string) = method39(v591, v596, v592, v593, v594, v597, v595) let v600 : US0 = US0_1 - let v601 : (unit -> string) = closure42() - let v602 : (unit -> string) = closure43(v599, v598) - method5(v600, v601, v602) + let v601 : (unit -> string) = closure41() + let v602 : (unit -> string) = closure42(v599, v598) + method4(v600, v601, v602) let v603 : bool = v598 <> 0 if v603 then let v604 : string = $"repl_result: {v589} @@ -6782,11 +6779,11 @@ jupyter_result: {v599}" let v612 : string option = None let v613 : string = $"pwsh -c \"$counter = 1; $path = '{v607}.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{{8}}', {{ $_.Groups[1].Value + $counter++ }} | Set-Content $path\"" let v614 : bool = true - let struct (v615 : int32, v616 : string) = method40(v608, v613, v609, v610, v611, v614, v612) + let struct (v615 : int32, v616 : string) = method39(v608, v613, v609, v610, v611, v614, v612) let v617 : US0 = US0_1 - let v618 : (unit -> string) = closure44() - let v619 : (unit -> string) = closure45(v616, v615) - method5(v617, v618, v619) + let v618 : (unit -> string) = closure43() + let v619 : (unit -> string) = closure44(v616, v615) + method4(v617, v618, v619) let v620 : string = $"{v575}.html" let v621 : bool = true let mutable _v621 : string option = None @@ -6889,7 +6886,7 @@ jupyter_result: {v599}" () #endif #else - let v651 : string = method57(v647) + let v651 : string = method55(v647) System.IO.File.WriteAllText (v648, v651) () #endif @@ -6997,7 +6994,7 @@ jupyter_result: {v599}" () #endif #else - let v683 : string = method57(v679) + let v683 : string = method55(v679) System.IO.File.WriteAllText (v680, v683) () #endif @@ -7010,9 +7007,9 @@ jupyter_result: {v599} pwsh_replace_html_result: {v616}" struct (v615, v684) let v689 : US0 = US0_1 - let v690 : (unit -> string) = closure46() - let v691 : (unit -> string) = closure47(v688, v687) - method5(v689, v690, v691) + let v690 : (unit -> string) = closure45() + let v691 : (unit -> string) = closure46(v688, v687) + method4(v689, v690, v691) let v692 : bool = v687 <> 0 if v692 then let v693 : (unit -> string) = closure6() @@ -7022,22 +7019,22 @@ pwsh_replace_html_result: {v616}" [|struct (v695, v688)|] else let v697 : US0 = US0_1 - let v698 : (unit -> string) = closure48() - let v699 : (unit -> string) = closure49(v12) - method5(v697, v698, v699) + let v698 : (unit -> string) = closure47() + let v699 : (unit -> string) = closure48(v12) + method4(v697, v698, v699) [||] | _ -> [||] let v706 : string = "$0.to_vec()" let v707 : Vec = Fable.Core.RustInterop.emitRustExpr v705 v706 let v708 : string = "$0.into_iter().map(|x| $1(x.clone())).collect::>()" - let v709 : (struct (string * string) -> (std_string_String * std_string_String)) = closure50() + let v709 : (struct (string * string) -> (std_string_String * std_string_String)) = closure49() let v710 : Vec<(std_string_String * std_string_String)> = Fable.Core.RustInterop.emitRustExpr struct (v707, v709) v708 let v711 : string = "std::collections::BTreeMap::from_iter(v710.iter().map(|x| x.as_ref()).map(|&(ref k, ref v)| (k.clone(), v.clone())))" let v712 : std_collections_BTreeMap = Fable.Core.RustInterop.emitRustExpr () v711 let v713 : string = "serde_json::to_string(&v712)" let v714 : Result = Fable.Core.RustInterop.emitRustExpr () v713 - let v715 : (serde_json_Error -> string) = method58() + let v715 : (serde_json_Error -> string) = method56() let v716 : string = "$0.map_err(|x| $1(x))" let v717 : Result = Fable.Core.RustInterop.emitRustExpr struct (v714, v715) v716 let v718 : string = "true; let _result = $0.map(|x| { //" @@ -7050,14 +7047,20 @@ pwsh_replace_html_result: {v616}" let v725 : bool = Fable.Core.RustInterop.emitRustExpr v723 v724 let v726 : string = "_result" let v727 : Result = Fable.Core.RustInterop.emitRustExpr () v726 - let v728 : Result = method59(v727) - let v729 : string = "v728 }}})" - Fable.Core.RustInterop.emitRustExpr () v729 - let v730 : string = "{{ //" - Fable.Core.RustInterop.emitRustExpr () v730 - let v731 : string = "__result" - let v732 : std_pin_Pin>>>> = Fable.Core.RustInterop.emitRustExpr () v731 - v732 + let v728 : Result = method57(v727) + let v729 : string = "" + let v730 : string = "}" + let v731 : string = v729 + v730 + let v732 : string = v731 + v730 + let v733 : string = v732 + v730 + let v734 : string = "{" + let v735 : string = v729 + v734 + let v736 : string = v735 + v734 + let v737 : string = "v728 " + v733 + "); " + v736 + " //" + Fable.Core.RustInterop.emitRustExpr () v737 + let v738 : string = "__result" + let v739 : std_pin_Pin>>>> = Fable.Core.RustInterop.emitRustExpr () v738 + v739 and closure1 () (v0 : (string [])) : int32 = let v1 : (US0 -> struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3)) = closure2() let v2 : US0 = US0_0 @@ -7066,7 +7069,7 @@ and closure1 () (v0 : (string [])) : int32 = let v8 : clap_Command = method0() let v9 : string = "clap::Command::get_matches($0)" let v10 : clap_ArgMatches = Fable.Core.RustInterop.emitRustExpr v8 v9 - let v11 : string = method4() + let v11 : string = method3() let v12 : string = "&*$0" let v13 : Ref = Fable.Core.RustInterop.emitRustExpr v11 v12 let v14 : string = "clap::ArgMatches::get_one(&$0, v13).cloned()" @@ -7127,8 +7130,8 @@ and closure1 () (v0 : (string [])) : int32 = let v47 : US0 = US0_1 let v48 : (unit -> string) = closure4() let v49 : (unit -> string) = closure5(v0) - method5(v47, v48, v49) - let v50 : std_pin_Pin>>>> = method8(v10) + method4(v47, v48, v49) + let v50 : std_pin_Pin>>>> = method7(v10) let v51 : string = "futures_lite::future::block_on($0)" let v52 : Result = Fable.Core.RustInterop.emitRustExpr v50 v51 let v53 : string = "$0.unwrap()" diff --git a/apps/spiral/builder/spiral_builder.rs b/apps/spiral/builder/spiral_builder.rs index 8f3fc2f6..854ba1b7 100644 --- a/apps/spiral/builder/spiral_builder.rs +++ b/apps/spiral/builder/spiral_builder.rs @@ -715,9 +715,6 @@ mod module_7e2cd9e0 { write!(f, "{}", core::any::type_name::()) } } - pub fn method1(v0_1: std::string::String) -> std::string::String { - v0_1 - } pub fn method0() -> clap::Command { let v1_1: string = string("r#\"command\"#"); let v2: &'static str = r#"command"#; @@ -744,110 +741,110 @@ mod module_7e2cd9e0 { //; let v34: string = x; let v36: &str = &*v34; - let v39: std::string::String = Spiral_builder::method1(String::from(v36)); - let v41: Box = Box::new(v39); - let v43: &'static mut std::string::String = Box::leak(v41); - let v45: clap::builder::PossibleValue = - clap::builder::PossibleValue::new(&**v43); - let v47: bool = true; - v45 + let v38: std::string::String = String::from(v36); + let v40: Box = Box::new(v38); + let v42: &'static mut std::string::String = Box::leak(v40); + let v44: clap::builder::PossibleValue = + clap::builder::PossibleValue::new(&**v42); + let v46: bool = true; + v44 }) .collect::>(); - let v49: Vec = _result; - let v51: clap::builder::ValueParser = - clap::builder::PossibleValuesParser::new(v49).into(); - let v53: clap::Arg = v15.value_parser(v51); - let v55: clap::Command = clap::Command::arg(v4, v53); - let v57: clap::Command = clap::Command::subcommand_required(v55, true); - let v59: string = string("r#\"fsharp\"#"); - let v60: &'static str = r#"fsharp"#; - let v62: clap::Command = clap::Command::new(v60); - let v64: string = string("r#\"path\"#"); - let v65: &'static str = r#"path"#; - let v67: clap::Arg = clap::Arg::new(v65); - let v69: clap::Arg = v67.short('p'); - let v70: string = string("r#\"path\"#"); - let v71: &'static str = r#"path"#; - let v73: clap::Arg = v69.long(v71); - let v75: clap::Arg = v73.required(true); - let v77: clap::Command = clap::Command::arg(v62, v75); - let v79: string = string("r#\"package-dir\"#"); - let v80: &'static str = r#"package-dir"#; - let v82: clap::Arg = clap::Arg::new(v80); - let v84: clap::Arg = v82.short('d'); - let v85: string = string("r#\"package-dir\"#"); - let v86: &'static str = r#"package-dir"#; - let v88: clap::Arg = v84.long(v86); - let v90: clap::Arg = v88.required(true); - let v92: clap::Command = clap::Command::arg(v77, v90); - let v94: string = string("r#\"args\"#"); - let v95: &'static str = r#"args"#; - let v97: clap::Arg = clap::Arg::new(v95); - let v99: clap::Arg = v97.short('a'); - let v100: string = string("r#\"args\"#"); - let v101: &'static str = r#"args"#; - let v103: clap::Arg = v99.long(v101); - let v105: clap::Command = clap::Command::arg(v92, v103); - let v107: clap::Command = clap::Command::subcommand(v57, v105); - let v109: string = string("r#\"rust\"#"); - let v110: &'static str = r#"rust"#; - let v112: clap::Command = clap::Command::new(v110); - let v114: string = string("r#\"NAME\"#"); - let v117: string = string("r#\"VERSION\"#"); - let v119: Array<&'static str> = new_array(&[r#"NAME"#, r#"VERSION"#]); - let v120: usize = 1_i32 as usize; - let v121: usize = 0_i32 as usize; - let v127: clap::builder::ValueRange = if v121 == v121 { - clap::builder::ValueRange::new(v120..) + let v48: Vec = _result; + let v50: clap::builder::ValueParser = + clap::builder::PossibleValuesParser::new(v48).into(); + let v52: clap::Arg = v15.value_parser(v50); + let v54: clap::Command = clap::Command::arg(v4, v52); + let v56: clap::Command = clap::Command::subcommand_required(v54, true); + let v58: string = string("r#\"fsharp\"#"); + let v59: &'static str = r#"fsharp"#; + let v61: clap::Command = clap::Command::new(v59); + let v63: string = string("r#\"path\"#"); + let v64: &'static str = r#"path"#; + let v66: clap::Arg = clap::Arg::new(v64); + let v68: clap::Arg = v66.short('p'); + let v69: string = string("r#\"path\"#"); + let v70: &'static str = r#"path"#; + let v72: clap::Arg = v68.long(v70); + let v74: clap::Arg = v72.required(true); + let v76: clap::Command = clap::Command::arg(v61, v74); + let v78: string = string("r#\"package-dir\"#"); + let v79: &'static str = r#"package-dir"#; + let v81: clap::Arg = clap::Arg::new(v79); + let v83: clap::Arg = v81.short('d'); + let v84: string = string("r#\"package-dir\"#"); + let v85: &'static str = r#"package-dir"#; + let v87: clap::Arg = v83.long(v85); + let v89: clap::Arg = v87.required(true); + let v91: clap::Command = clap::Command::arg(v76, v89); + let v93: string = string("r#\"args\"#"); + let v94: &'static str = r#"args"#; + let v96: clap::Arg = clap::Arg::new(v94); + let v98: clap::Arg = v96.short('a'); + let v99: string = string("r#\"args\"#"); + let v100: &'static str = r#"args"#; + let v102: clap::Arg = v98.long(v100); + let v104: clap::Command = clap::Command::arg(v91, v102); + let v106: clap::Command = clap::Command::subcommand(v56, v104); + let v108: string = string("r#\"rust\"#"); + let v109: &'static str = r#"rust"#; + let v111: clap::Command = clap::Command::new(v109); + let v113: string = string("r#\"NAME\"#"); + let v116: string = string("r#\"VERSION\"#"); + let v118: Array<&'static str> = new_array(&[r#"NAME"#, r#"VERSION"#]); + let v119: usize = 1_i32 as usize; + let v120: usize = 0_i32 as usize; + let v126: clap::builder::ValueRange = if v120 == v120 { + clap::builder::ValueRange::new(v119..) } else { - clap::builder::ValueRange::new(v120..v121) + clap::builder::ValueRange::new(v119..v120) }; - let v129: string = string("r#\"deps\"#"); - let v130: &'static str = r#"deps"#; - let v132: clap::Arg = clap::Arg::new(v130); - let v134: clap::Arg = v132.short('d'); - let v135: string = string("r#\"deps\"#"); - let v136: &'static str = r#"deps"#; - let v138: clap::Arg = v134.long(v136); - let v140: Vec<&'static str> = v119.to_vec(); - let v142: clap::Arg = v138.value_names(v140); - let v144: clap::Arg = v142.num_args(v127); - let v146: clap::ArgAction = clap::ArgAction::Append; - let v148: clap::Arg = v144.action(v146); - let v150: clap::Command = clap::Command::arg(v112, v148); - let v152: clap::Command = clap::Command::subcommand(v107, v150); - let v154: string = string("r#\"dib\"#"); - let v155: &'static str = r#"dib"#; - let v157: clap::Command = clap::Command::new(v155); - let v158: string = string("r#\"path\"#"); - let v159: &'static str = r#"path"#; - let v161: clap::Arg = clap::Arg::new(v159); - let v163: clap::Arg = v161.short('p'); - let v164: string = string("r#\"path\"#"); - let v165: &'static str = r#"path"#; - let v167: clap::Arg = v163.long(v165); - let v169: clap::Arg = v167.required(true); - let v171: clap::Command = clap::Command::arg(v157, v169); - let v173: string = string("clap::value_parser!(u8).into()"); - let v174: clap::builder::ValueParser = clap::value_parser!(u8).into(); - let v176: string = string("r#\"retries\"#"); - let v177: &'static str = r#"retries"#; - let v179: clap::Arg = clap::Arg::new(v177); - let v181: clap::Arg = v179.short('r'); - let v182: string = string("r#\"retries\"#"); - let v183: &'static str = r#"retries"#; - let v185: clap::Arg = v181.long(v183); - let v187: clap::Arg = v185.value_parser(v174); - let v189: clap::Command = clap::Command::arg(v171, v187); - let v191: string = string("r#\"working_directory\"#"); - let v192: &'static str = r#"working_directory"#; - let v194: clap::Arg = clap::Arg::new(v192); - let v196: clap::Arg = v194.short('w'); - let v197: string = string("r#\"working_directory\"#"); - let v198: &'static str = r#"working_directory"#; - let v200: clap::Arg = v196.long(v198); - let v202: clap::Command = clap::Command::arg(v189, v200); - clap::Command::subcommand(v152, v202) + let v128: string = string("r#\"deps\"#"); + let v129: &'static str = r#"deps"#; + let v131: clap::Arg = clap::Arg::new(v129); + let v133: clap::Arg = v131.short('d'); + let v134: string = string("r#\"deps\"#"); + let v135: &'static str = r#"deps"#; + let v137: clap::Arg = v133.long(v135); + let v139: Vec<&'static str> = v118.to_vec(); + let v141: clap::Arg = v137.value_names(v139); + let v143: clap::Arg = v141.num_args(v126); + let v145: clap::ArgAction = clap::ArgAction::Append; + let v147: clap::Arg = v143.action(v145); + let v149: clap::Command = clap::Command::arg(v111, v147); + let v151: clap::Command = clap::Command::subcommand(v106, v149); + let v153: string = string("r#\"dib\"#"); + let v154: &'static str = r#"dib"#; + let v156: clap::Command = clap::Command::new(v154); + let v157: string = string("r#\"path\"#"); + let v158: &'static str = r#"path"#; + let v160: clap::Arg = clap::Arg::new(v158); + let v162: clap::Arg = v160.short('p'); + let v163: string = string("r#\"path\"#"); + let v164: &'static str = r#"path"#; + let v166: clap::Arg = v162.long(v164); + let v168: clap::Arg = v166.required(true); + let v170: clap::Command = clap::Command::arg(v156, v168); + let v172: string = string("clap::value_parser!(u8).into()"); + let v173: clap::builder::ValueParser = clap::value_parser!(u8).into(); + let v175: string = string("r#\"retries\"#"); + let v176: &'static str = r#"retries"#; + let v178: clap::Arg = clap::Arg::new(v176); + let v180: clap::Arg = v178.short('r'); + let v181: string = string("r#\"retries\"#"); + let v182: &'static str = r#"retries"#; + let v184: clap::Arg = v180.long(v182); + let v186: clap::Arg = v184.value_parser(v173); + let v188: clap::Command = clap::Command::arg(v170, v186); + let v190: string = string("r#\"working_directory\"#"); + let v191: &'static str = r#"working_directory"#; + let v193: clap::Arg = clap::Arg::new(v191); + let v195: clap::Arg = v193.short('w'); + let v196: string = string("r#\"working_directory\"#"); + let v197: &'static str = r#"working_directory"#; + let v199: clap::Arg = v195.long(v197); + let v201: clap::Command = clap::Command::arg(v188, v199); + clap::Command::subcommand(v151, v201) } pub fn closure0(unitVar: (), unitVar_1: ()) { let v1_1: bool = true; @@ -869,10 +866,10 @@ mod module_7e2cd9e0 { pub fn closure3(unitVar: (), v0_1: string) { (); } - pub fn method2() -> string { + pub fn method1() -> string { string("") } - pub fn method3() -> string { + pub fn method2() -> string { string("AUTOMATION") } pub fn closure2( @@ -910,7 +907,7 @@ mod module_7e2cd9e0 { v16 }); let v20: Result = _result; - let v21: string = Spiral_builder::method2(); + let v21: string = Spiral_builder::method1(); { let x: string = v20.unwrap_or(v21); _v7.set(Some(x)) @@ -937,7 +934,7 @@ mod module_7e2cd9e0 { (v2, v1_1, v3, getValue(_v6.get().clone()), v5) } } - pub fn method4() -> string { + pub fn method3() -> string { string("trace-level") } pub fn closure4(unitVar: (), unitVar_1: ()) -> string { @@ -949,7 +946,7 @@ mod module_7e2cd9e0 { pub fn closure5(v0_1: Array, unitVar: ()) -> string { sprintf!("args: {} / {}", v0_1, Spiral_builder::closure6((), ())) } - pub fn method6() -> string { + pub fn method5() -> string { string("") } pub fn closure7( @@ -1067,7 +1064,7 @@ mod module_7e2cd9e0 { } } } - pub fn method7(v0_1: Spiral_builder::US0, v1_1: Func0) { + pub fn method6(v0_1: Spiral_builder::US0, v1_1: Func0) { fn v2( v: Spiral_builder::US0, ) -> ( @@ -1140,8 +1137,8 @@ mod module_7e2cd9e0 { } } } - pub fn method5(v0_1: Spiral_builder::US0, v1_1: Func0, v2: Func0) { - Spiral_builder::method7( + pub fn method4(v0_1: Spiral_builder::US0, v1_1: Func0, v2: Func0) { + Spiral_builder::method6( v0_1.clone(), Func0::new({ let v0_1 = v0_1.clone(); @@ -1154,16 +1151,16 @@ mod module_7e2cd9e0 { pub fn closure8(unitVar: (), v0_1: &str) -> std::string::String { String::from(v0_1) } - pub fn method9() -> string { + pub fn method8() -> string { string("path") } - pub fn method10() -> string { + pub fn method9() -> string { string("package-dir") } - pub fn method11() -> string { + pub fn method10() -> string { string("args") } - pub fn method13(v0_1: i32, v1_1: LrcPtr) -> bool { + pub fn method12(v0_1: i32, v1_1: LrcPtr) -> bool { v1_1.l0.get().clone() < v0_1 } pub fn closure10( @@ -1181,11 +1178,11 @@ mod module_7e2cd9e0 { move |v: LrcPtr| Spiral_builder::closure10(v0_1, v) }) } - pub fn method14( + pub fn method13( ) -> Func1, LrcPtr>> { Func1::new(move |v: char| Spiral_builder::closure9((), v)) } - pub fn method17( + pub fn method16( v0_1: LrcPtr, v1_1: LrcPtr, ) -> LrcPtr { @@ -1197,7 +1194,7 @@ mod module_7e2cd9e0 { Spiral_builder::UH0::UH0_1(x, _) => x.clone(), _ => unreachable!(), }, - Spiral_builder::method17( + Spiral_builder::method16( match v0_1.as_ref() { Spiral_builder::UH0::UH0_1(_, x) => x.clone(), _ => unreachable!(), @@ -1208,7 +1205,7 @@ mod module_7e2cd9e0 { } } } - pub fn method16( + pub fn method15( v0_1: string, v1_1: LrcPtr, v2: LrcPtr, @@ -1218,8 +1215,8 @@ mod module_7e2cd9e0 { let v1_1: MutCell> = MutCell::new(v1_1.clone()); let v2: MutCell> = MutCell::new(v2.clone()); let v3: MutCell = MutCell::new(v3.clone()); - '_method16: loop { - break '_method16 (match &v3.get().clone() { + '_method15: loop { + break '_method15 (match &v3.get().clone() { Spiral_builder::US5::US5_1(v3_1_0) => { let v259: char = v3_1_0.clone(); if '\"' == v259 { @@ -1236,7 +1233,7 @@ mod module_7e2cd9e0 { _ => unreachable!(), }; if '\"' == v261 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v262.clone(), @@ -1246,7 +1243,7 @@ mod module_7e2cd9e0 { } else { if '\\' == v259 { if '\\' == v261 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v262.clone(), @@ -1255,7 +1252,7 @@ mod module_7e2cd9e0 { ) } else { if '`' == v261 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v262.clone(), @@ -1276,7 +1273,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!("{}{}", v0_1.get().clone(), v261); @@ -1290,14 +1287,14 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } } else { if '`' == v259 { if '\\' == v261 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v262.clone(), @@ -1306,7 +1303,7 @@ mod module_7e2cd9e0 { ) } else { if '`' == v261 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v262.clone(), @@ -1327,7 +1324,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!( "{}{}", @@ -1344,13 +1341,13 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } } else { if '\\' == v261 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v262.clone(), @@ -1359,7 +1356,7 @@ mod module_7e2cd9e0 { ) } else { if '`' == v261 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v262.clone(), @@ -1380,7 +1377,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!( "{}{}", @@ -1397,7 +1394,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } @@ -1410,7 +1407,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -1426,7 +1423,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -1441,7 +1438,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -1477,7 +1474,7 @@ mod module_7e2cd9e0 { } else { false } { - Spiral_builder::method15( + Spiral_builder::method14( sprintf!("{}{}\"", v0_1.get().clone(), v259), v1_1.get().clone(), v372.clone(), @@ -1485,7 +1482,7 @@ mod module_7e2cd9e0 { Spiral_builder::US5::US5_1('\"'), ) } else { - Spiral_builder::method15( + Spiral_builder::method14( sprintf!("{}{}\"", v0_1.get().clone(), v259), v1_1.get().clone(), v372.clone(), @@ -1495,7 +1492,7 @@ mod module_7e2cd9e0 { } } else { if '\\' == v371 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v372.clone(), @@ -1504,7 +1501,7 @@ mod module_7e2cd9e0 { ) } else { if '`' == v371 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v372.clone(), @@ -1524,7 +1521,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!("{}{}", v0_1.get().clone(), v371); @@ -1538,7 +1535,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } @@ -1548,7 +1545,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -1582,7 +1579,7 @@ mod module_7e2cd9e0 { } else { false } { - Spiral_builder::method15( + Spiral_builder::method14( sprintf!("{}{}\"", v0_1.get().clone(), v259), v1_1.get().clone(), v426.clone(), @@ -1590,7 +1587,7 @@ mod module_7e2cd9e0 { Spiral_builder::US5::US5_1('\"'), ) } else { - Spiral_builder::method15( + Spiral_builder::method14( sprintf!("{}{}\"", v0_1.get().clone(), v259), v1_1.get().clone(), v426.clone(), @@ -1600,7 +1597,7 @@ mod module_7e2cd9e0 { } } else { if '\\' == v425 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v426.clone(), @@ -1609,7 +1606,7 @@ mod module_7e2cd9e0 { ) } else { if '`' == v425 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v426.clone(), @@ -1630,7 +1627,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!( "{}{}", @@ -1647,7 +1644,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } @@ -1657,7 +1654,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -1682,7 +1679,7 @@ mod module_7e2cd9e0 { _ => unreachable!(), }; if '\\' == v478 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v479.clone(), @@ -1691,7 +1688,7 @@ mod module_7e2cd9e0 { ) } else { if '`' == v478 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v479.clone(), @@ -1700,9 +1697,9 @@ mod module_7e2cd9e0 { ) } else { if '\"' == v478 { - Spiral_builder::method15( + Spiral_builder::method14( string(""), - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -1731,7 +1728,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!( "{}{}", @@ -1748,7 +1745,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } @@ -1758,7 +1755,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -1786,7 +1783,7 @@ mod module_7e2cd9e0 { _ => unreachable!(), }; if '\"' == v4 { - Spiral_builder::method15( + Spiral_builder::method14( string(""), v1_1.get().clone(), v5.clone(), @@ -1795,7 +1792,7 @@ mod module_7e2cd9e0 { ) } else { if '\\' == v4 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v5.clone(), @@ -1804,7 +1801,7 @@ mod module_7e2cd9e0 { ) } else { if '`' == v4 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v5.clone(), @@ -1818,7 +1815,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -1832,7 +1829,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!("{}{}", v0_1.get().clone(), v4); @@ -1844,7 +1841,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } @@ -1854,7 +1851,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -1887,7 +1884,7 @@ mod module_7e2cd9e0 { _ => unreachable!(), }; if '\\' == v53 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v54.clone(), @@ -1896,7 +1893,7 @@ mod module_7e2cd9e0 { ) } else { if '`' == v53 { - Spiral_builder::method15( + Spiral_builder::method14( v0_1.get().clone(), v1_1.get().clone(), v54.clone(), @@ -1907,7 +1904,7 @@ mod module_7e2cd9e0 { if 0_u8 == v51 { if '\\' == v52 { if '\"' == v53 { - Spiral_builder::method15( + Spiral_builder::method14( sprintf!("{}{}\"", v0_1.get().clone(), v52), v1_1.get().clone(), v54.clone(), @@ -1928,7 +1925,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { if 1_u8 == v51 { if !(v3.get().clone() == v3.get().clone()) { @@ -1949,7 +1946,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!( "{}{}", @@ -1968,7 +1965,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } else { let v0_1_temp: string = sprintf!( @@ -1986,14 +1983,14 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } } else { if '`' == v52 { if '\"' == v53 { - Spiral_builder::method15( + Spiral_builder::method14( sprintf!("{}{}\"", v0_1.get().clone(), v52), v1_1.get().clone(), v54.clone(), @@ -2014,7 +2011,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { if 1_u8 == v51 { if !(v3.get().clone() @@ -2037,7 +2034,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!( "{}{}", @@ -2056,7 +2053,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } else { let v0_1_temp: string = sprintf!( @@ -2076,13 +2073,13 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } } else { if '\"' == v53 { - Spiral_builder::method15( + Spiral_builder::method14( sprintf!("{}{}\"", v0_1.get().clone(), v52), v1_1.get().clone(), v54.clone(), @@ -2103,7 +2100,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { if 1_u8 == v51 { if !(v3.get().clone() @@ -2126,7 +2123,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!( "{}{}", @@ -2145,7 +2142,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } else { let v0_1_temp: string = sprintf!( @@ -2165,7 +2162,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } @@ -2173,7 +2170,7 @@ mod module_7e2cd9e0 { } } else { if '\"' == v53 { - Spiral_builder::method15( + Spiral_builder::method14( sprintf!("{}{}\"", v0_1.get().clone(), v52), v1_1.get().clone(), v54.clone(), @@ -2193,7 +2190,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { if 1_u8 == v51 { if !(v3.get().clone() == v3.get().clone()) { @@ -2212,7 +2209,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } else { let v0_1_temp: string = sprintf!( "{}{}", @@ -2229,7 +2226,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } else { let v0_1_temp: string = @@ -2244,7 +2241,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method16; + continue '_method15; } } } @@ -2259,7 +2256,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2274,7 +2271,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2292,7 +2289,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2307,7 +2304,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2324,7 +2321,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2339,7 +2336,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2358,7 +2355,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2373,7 +2370,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2390,7 +2387,7 @@ mod module_7e2cd9e0 { }); } } - pub fn method15( + pub fn method14( v0_1: string, v1_1: LrcPtr, v2: LrcPtr, @@ -2402,8 +2399,8 @@ mod module_7e2cd9e0 { let v2: MutCell> = MutCell::new(v2.clone()); let v3: MutCell = MutCell::new(v3.clone()); let v4: MutCell = MutCell::new(v4.clone()); - '_method15: loop { - break '_method15 (match &v4.get().clone() { + '_method14: loop { + break '_method14 (match &v4.get().clone() { Spiral_builder::US5::US5_1(v4_1_0) => { let v581: char = v4_1_0.clone(); if '\"' == v581 { @@ -2433,7 +2430,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '\\' == v581 { if '\\' == v584 { @@ -2450,7 +2447,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v584 { let v0_1_temp: string = v0_1.get().clone(); @@ -2467,17 +2464,17 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v584 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v585.clone(), v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -2507,7 +2504,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v584 { let v0_1_temp: string = v0_1.get().clone(); @@ -2524,17 +2521,17 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v584 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v585, v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -2563,7 +2560,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v584 { let v0_1_temp: string = v0_1.get().clone(); @@ -2580,17 +2577,17 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v584 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v585.clone(), v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -2612,7 +2609,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2628,7 +2625,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2643,7 +2640,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2693,7 +2690,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: LrcPtr = @@ -2708,7 +2705,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } } else { if '\\' == v694 { @@ -2725,7 +2722,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v694 { let v0_1_temp: string = v0_1.get().clone(); @@ -2742,7 +2739,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if let Spiral_builder::US5::US5_2( v3_2_0, @@ -2759,7 +2756,7 @@ mod module_7e2cd9e0 { } { if ' ' == v694 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -2769,7 +2766,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -2782,7 +2779,7 @@ mod module_7e2cd9e0 { } } else { if ' ' == v694 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -2792,7 +2789,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -2806,14 +2803,14 @@ mod module_7e2cd9e0 { } } else { if ' ' == v694 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v695.clone(), v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -2842,7 +2839,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -2861,7 +2858,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -2881,7 +2878,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -2934,7 +2931,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: LrcPtr = @@ -2950,7 +2947,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } } else { if '\\' == v790 { @@ -2968,7 +2965,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v790 { let v0_1_temp: string = v0_1.get().clone(); @@ -2985,7 +2982,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if let Spiral_builder::US5::US5_2( v3_2_0, @@ -3002,7 +2999,7 @@ mod module_7e2cd9e0 { } { if ' ' == v790 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3012,7 +3009,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3025,7 +3022,7 @@ mod module_7e2cd9e0 { } } else { if ' ' == v790 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3035,7 +3032,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3049,7 +3046,7 @@ mod module_7e2cd9e0 { } } else { if ' ' == v790 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3059,7 +3056,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3090,7 +3087,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -3101,7 +3098,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -3113,7 +3110,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -3156,7 +3153,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v885 { let v0_1_temp: string = v0_1.get().clone(); @@ -3173,7 +3170,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if let Spiral_builder::US5::US5_2( v3_2_0, @@ -3211,10 +3208,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v885 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3224,7 +3221,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3241,7 +3238,7 @@ mod module_7e2cd9e0 { let v0_1_temp: string = string(""); let v1_1_temp: LrcPtr = - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))); let v2_temp: LrcPtr< @@ -3256,10 +3253,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v885 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3269,7 +3266,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3287,7 +3284,7 @@ mod module_7e2cd9e0 { let v0_1_temp: string = string(""); let v1_1_temp: LrcPtr = - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))); let v2_temp: LrcPtr< @@ -3302,10 +3299,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v885 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3315,7 +3312,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3346,7 +3343,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -3357,7 +3354,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -3369,7 +3366,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -3424,7 +3421,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if let Spiral_builder::US5::US5_1(v3_1_0) = &v3.get().clone() @@ -3443,7 +3440,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: LrcPtr = @@ -3458,7 +3455,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } } } else { @@ -3479,7 +3476,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v997 { let v0_1_temp: string = v0_1.get().clone(); @@ -3496,17 +3493,17 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v997 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v998.clone(), v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3534,7 +3531,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v997 { let v0_1_temp: string = v0_1.get().clone(); @@ -3551,7 +3548,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if let Spiral_builder::US5::US5_2( v3_2_0, @@ -3568,7 +3565,7 @@ mod module_7e2cd9e0 { } { if ' ' == v997 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3578,7 +3575,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3591,7 +3588,7 @@ mod module_7e2cd9e0 { } } else { if ' ' == v997 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3601,7 +3598,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3615,14 +3612,14 @@ mod module_7e2cd9e0 { } } else { if ' ' == v997 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v998.clone(), v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3651,7 +3648,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -3670,7 +3667,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -3690,7 +3687,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -3704,7 +3701,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -3753,7 +3750,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if let Spiral_builder::US5::US5_1(v3_1_0) = &v3.get().clone() @@ -3776,7 +3773,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: LrcPtr = @@ -3792,7 +3789,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } } } else { @@ -3814,7 +3811,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v1136 { let v0_1_temp: string = v0_1.get().clone(); @@ -3831,17 +3828,17 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v1136 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v1137.clone(), v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3870,7 +3867,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v1136 { let v0_1_temp: string = v0_1.get().clone(); @@ -3887,7 +3884,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if let Spiral_builder::US5::US5_2( v3_2_0, @@ -3904,7 +3901,7 @@ mod module_7e2cd9e0 { } { if ' ' == v1136 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3914,7 +3911,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3927,7 +3924,7 @@ mod module_7e2cd9e0 { } } else { if ' ' == v1136 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3937,7 +3934,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3951,7 +3948,7 @@ mod module_7e2cd9e0 { } } else { if ' ' == v1136 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -3961,7 +3958,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -3992,7 +3989,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -4003,7 +4000,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -4015,7 +4012,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -4029,7 +4026,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -4069,7 +4066,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v1275 { let v0_1_temp: string = v0_1.get().clone(); @@ -4086,13 +4083,13 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '\"' == v1275 { let v0_1_temp: string = string(""); let v1_1_temp: LrcPtr = - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))); let v2_temp: LrcPtr = @@ -4106,17 +4103,17 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v1275 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v1276.clone(), v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4135,7 +4132,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -4173,7 +4170,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v1318 { let v0_1_temp: string = v0_1.get().clone(); @@ -4190,7 +4187,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if let Spiral_builder::US5::US5_2( v3_2_0, @@ -4228,10 +4225,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v1318 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -4241,7 +4238,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4258,7 +4255,7 @@ mod module_7e2cd9e0 { let v0_1_temp: string = string(""); let v1_1_temp: LrcPtr = - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))); let v2_temp: LrcPtr< @@ -4273,10 +4270,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v1318 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -4286,7 +4283,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4304,7 +4301,7 @@ mod module_7e2cd9e0 { let v0_1_temp: string = string(""); let v1_1_temp: LrcPtr = - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))); let v2_temp: LrcPtr< @@ -4319,10 +4316,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v1318 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -4332,7 +4329,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4363,7 +4360,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -4374,7 +4371,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -4386,7 +4383,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -4430,7 +4427,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '\\' == v5 { let v0_1_temp: string = v0_1.get().clone(); @@ -4444,7 +4441,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v5 { let v0_1_temp: string = v0_1.get().clone(); @@ -4459,15 +4456,15 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v5 { - Spiral_builder::method16( + Spiral_builder::method15( string(""), if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -4479,7 +4476,7 @@ mod module_7e2cd9e0 { v4.get().clone(), ) } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{}{}", v0_1.get().clone(), v5), v1_1.get().clone(), v6.clone(), @@ -4494,7 +4491,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -4537,7 +4534,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '`' == v54 { let v0_1_temp: string = v0_1.get().clone(); @@ -4551,11 +4548,11 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if let Spiral_builder::US5::US5_0 = &v3.get().clone() { if '\"' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( v0_1.get().clone(), v1_1.get().clone(), v55.clone(), @@ -4565,7 +4562,7 @@ mod module_7e2cd9e0 { if 0_u8 == v52 { if '\\' == v53 { if ' ' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v55.clone(), @@ -4596,9 +4593,9 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4610,7 +4607,7 @@ mod module_7e2cd9e0 { ) } } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4625,7 +4622,7 @@ mod module_7e2cd9e0 { } else { if '`' == v53 { if ' ' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v55.clone(), @@ -4658,9 +4655,9 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4672,7 +4669,7 @@ mod module_7e2cd9e0 { ) } } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4686,7 +4683,7 @@ mod module_7e2cd9e0 { } } else { if ' ' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v55.clone(), @@ -4719,9 +4716,9 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4733,7 +4730,7 @@ mod module_7e2cd9e0 { ) } } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4749,7 +4746,7 @@ mod module_7e2cd9e0 { } } else { if ' ' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v55.clone(), @@ -4778,9 +4775,9 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4792,7 +4789,7 @@ mod module_7e2cd9e0 { ) } } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4839,7 +4836,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '\"' == v54 { let v0_1_temp: string = sprintf!( @@ -4864,10 +4861,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -4903,9 +4900,9 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4917,7 +4914,7 @@ mod module_7e2cd9e0 { ) } } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -4951,10 +4948,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v55.clone(), @@ -4987,9 +4984,9 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -5001,7 +4998,7 @@ mod module_7e2cd9e0 { ) } } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -5049,7 +5046,7 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if '\"' == v54 { let v0_1_temp: string = sprintf!( @@ -5074,10 +5071,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -5113,9 +5110,9 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get() @@ -5128,7 +5125,7 @@ mod module_7e2cd9e0 { ) } } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -5166,10 +5163,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{} ", v0_1.get().clone() @@ -5205,9 +5202,9 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -5219,7 +5216,7 @@ mod module_7e2cd9e0 { ) } } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -5253,10 +5250,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v55.clone(), @@ -5289,9 +5286,9 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -5303,7 +5300,7 @@ mod module_7e2cd9e0 { ) } } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -5334,10 +5331,10 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { if ' ' == v54 { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!("{} ", v0_1.get().clone()), v1_1.get().clone(), v55.clone(), @@ -5366,9 +5363,9 @@ mod module_7e2cd9e0 { v2.set(v2_temp); v3.set(v3_temp); v4.set(v4_temp); - continue '_method15; + continue '_method14; } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -5380,7 +5377,7 @@ mod module_7e2cd9e0 { ) } } else { - Spiral_builder::method16( + Spiral_builder::method15( sprintf!( "{}{}", v0_1.get().clone(), @@ -5406,7 +5403,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -5421,7 +5418,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -5439,7 +5436,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -5458,7 +5455,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -5479,7 +5476,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -5498,7 +5495,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -5521,7 +5518,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -5536,7 +5533,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -5565,7 +5562,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -5576,7 +5573,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -5589,7 +5586,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -5600,7 +5597,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -5614,7 +5611,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -5633,7 +5630,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -5665,7 +5662,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -5676,7 +5673,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -5689,7 +5686,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -5700,7 +5697,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -5714,7 +5711,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -5725,7 +5722,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17(v1_1.get().clone(), + Spiral_builder::method16(v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1(v0_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_0)))) }, @@ -5739,7 +5736,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -5758,7 +5755,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new( Spiral_builder::UH0::UH0_1( @@ -5781,7 +5778,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -5796,7 +5793,7 @@ mod module_7e2cd9e0 { if v0_1.get().clone() == string("") { v1_1.get().clone() } else { - Spiral_builder::method17( + Spiral_builder::method16( v1_1.get().clone(), LrcPtr::new(Spiral_builder::UH0::UH0_1( v0_1.get().clone(), @@ -5814,7 +5811,7 @@ mod module_7e2cd9e0 { }); } } - pub fn method18(v0_1: LrcPtr, v1_1: List) -> List { + pub fn method17(v0_1: LrcPtr, v1_1: List) -> List { match v0_1.as_ref() { Spiral_builder::UH0::UH0_0 => v1_1.clone(), Spiral_builder::UH0::UH0_1(v0_1_1_0, v0_1_1_1) => cons( @@ -5822,7 +5819,7 @@ mod module_7e2cd9e0 { Spiral_builder::UH0::UH0_1(x, _) => x.clone(), _ => unreachable!(), }, - Spiral_builder::method18( + Spiral_builder::method17( match v0_1.as_ref() { Spiral_builder::UH0::UH0_1(_, x) => x.clone(), _ => unreachable!(), @@ -5832,7 +5829,7 @@ mod module_7e2cd9e0 { ), } } - pub fn method12(v0_1: string) -> Array { + pub fn method11(v0_1: string) -> Array { let _v0: MutCell>> = MutCell::new(None::>); _v0.set(Some(Some(v0_1))); { @@ -5867,7 +5864,7 @@ mod module_7e2cd9e0 { let v17: LrcPtr = LrcPtr::new(Spiral_builder::Mut4 { l0: MutCell::new(0_i32), }); - while Spiral_builder::method13(v15, v17.clone()) { + while Spiral_builder::method12(v15, v17.clone()) { let v19: i32 = v17.l0.get().clone(); let v20: char = getCharAt(v14.clone(), v19); v16.get_mut()[v19 as usize] = v20; @@ -5879,13 +5876,13 @@ mod module_7e2cd9e0 { } { let v23: List = ofArray(v16.clone()); - toArray(Spiral_builder::method18( - (Spiral_builder::method15( + toArray(Spiral_builder::method17( + (Spiral_builder::method14( string(""), LrcPtr::new(Spiral_builder::UH0::UH0_0), foldBack( Func2::new(move |b0: char, b1: LrcPtr| { - (Spiral_builder::method14())(b0)(b1) + (Spiral_builder::method13())(b0)(b1) }), v23, LrcPtr::new(Spiral_builder::UH1::UH1_0), @@ -5901,7 +5898,7 @@ mod module_7e2cd9e0 { } } } - pub fn method19(v0_1: string) -> string { + pub fn method18(v0_1: string) -> string { v0_1 } pub fn closure11(unitVar: (), v0_1: serde_json::Error) -> std::string::String { @@ -5913,22 +5910,22 @@ mod module_7e2cd9e0 { } getValue(_v1.get().clone()) } - pub fn method20() -> Func1 { + pub fn method19() -> Func1 { Func1::new(move |v: serde_json::Error| Spiral_builder::closure11((), v)) } - pub fn method21(v0_1: std::string::String) -> std::string::String { + pub fn method20(v0_1: std::string::String) -> std::string::String { v0_1 } - pub fn method22(v0_1: string) -> string { + pub fn method21(v0_1: string) -> string { v0_1 } - pub fn method24(v0_1: string) -> string { + pub fn method23(v0_1: string) -> string { v0_1 } - pub fn method25(v0_1: string) -> string { + pub fn method24(v0_1: string) -> string { v0_1 } - pub fn method23(v0_1: string, v1_1: string) -> string { + pub fn method22(v0_1: string, v1_1: string) -> string { let _v2: MutCell> = MutCell::new(None::); let v4: &str = &*v0_1; let v6: std::string::String = String::from(v4); @@ -5952,36 +5949,36 @@ mod module_7e2cd9e0 { getValue(_v2.get().clone()) } } - pub fn method26(v0_1: string) -> string { + pub fn method25(v0_1: string) -> string { v0_1 } - pub fn method27() -> string { + pub fn method26() -> string { string("") } - pub fn method28() -> string { + pub fn method27() -> string { string("^\\\\\\\\\\?\\\\") } - pub fn method29() -> string { + pub fn method28() -> string { string("") } - pub fn method30(v0_1: i32, v1_1: LrcPtr) -> bool { + pub fn method29(v0_1: i32, v1_1: LrcPtr) -> bool { v1_1.l0.get().clone() < v0_1 } - pub fn method31(v0_1: string) -> string { + pub fn method30(v0_1: string) -> string { v0_1 } - pub fn method32(v0_1: string) -> string { + pub fn method31(v0_1: string) -> string { v0_1 } - pub fn method33() -> string { + pub fn method32() -> string { string("\n") } - pub fn method34() -> string { + pub fn method33() -> string { string("deps") } - pub fn method36(v0_1: string) -> string { + pub fn method35(v0_1: string) -> string { let _v1: MutCell> = MutCell::new(None::); - let v2: string = Spiral_builder::method22(v0_1); + let v2: string = Spiral_builder::method21(v0_1); let v4: &str = &*v2.clone(); let v6: std::string::String = String::from(v4); let v8: std::path::PathBuf = std::path::PathBuf::from(v6); @@ -6006,14 +6003,14 @@ mod module_7e2cd9e0 { { let v38: string = getValue(_v12.get().clone()); let _v40: MutCell> = MutCell::new(None::); - let v41: string = Spiral_builder::method26(Spiral_builder::method23( + let v41: string = Spiral_builder::method25(Spiral_builder::method22( v38.clone(), v2.clone(), )); - let v42: string = Spiral_builder::method27(); + let v42: string = Spiral_builder::method26(); let _v43: MutCell>> = MutCell::new(None::>); - let v44: string = Spiral_builder::method28(); + let v44: string = Spiral_builder::method27(); { let x_2: Result = regex::Regex::new(&v44); @@ -6052,7 +6049,7 @@ mod module_7e2cd9e0 { l1: MutCell::new(0_i32), l2: MutCell::new(new_empty::()), }); - while Spiral_builder::method30(v75, v76.clone()) { + while Spiral_builder::method29(v75, v76.clone()) { let v78: i32 = v76.l0.get().clone(); let v81: i32 = v78.wrapping_neg() + v75 - 1_i32; let matchValue: i32 = v76.l1.get().clone(); @@ -6082,7 +6079,7 @@ mod module_7e2cd9e0 { LrcPtr::new(Spiral_builder::Mut4 { l0: MutCell::new(0_i32), }); - while Spiral_builder::method13( + while Spiral_builder::method12( v95, v97.clone(), ) { @@ -6111,7 +6108,7 @@ mod module_7e2cd9e0 { LrcPtr::new(Spiral_builder::Mut4 { l0: MutCell::new(0_i32), }); - while Spiral_builder::method13( + while Spiral_builder::method12( v109, v111.clone(), ) { @@ -6169,7 +6166,7 @@ mod module_7e2cd9e0 { _v133.set(Some(x_4)) } join( - Spiral_builder::method31(ofChar(getValue( + Spiral_builder::method30(ofChar(getValue( _v133.get().clone(), ))), toArray_1(v132), @@ -6199,11 +6196,11 @@ mod module_7e2cd9e0 { } { let _v176: MutCell> = MutCell::new(None::); - let v177: string = Spiral_builder::method26(getValue(_v1.get().clone())); - let v178: string = Spiral_builder::method27(); + let v177: string = Spiral_builder::method25(getValue(_v1.get().clone())); + let v178: string = Spiral_builder::method26(); let _v179: MutCell>> = MutCell::new(None::>); - let v180: string = Spiral_builder::method28(); + let v180: string = Spiral_builder::method27(); { let x_7: Result = regex::Regex::new(&v180); _v179.set(Some(x_7)) @@ -6232,7 +6229,7 @@ mod module_7e2cd9e0 { } } } - pub fn method35(v0_1: string) -> string { + pub fn method34(v0_1: string) -> string { let _v1: MutCell> = MutCell::new(None::); let v3: Result = std::env::current_dir(); let v5: std::path::PathBuf = v3.unwrap(); @@ -6249,22 +6246,22 @@ mod module_7e2cd9e0 { let x_1: string = fable_library_rust::String_::fromString(v18); _v1.set(Some(x_1)) } - Spiral_builder::method36(Spiral_builder::method23( + Spiral_builder::method35(Spiral_builder::method22( getValue(_v1.get().clone()), v0_1, )) } } pub fn closure12(unitVar: (), v0_1: std::string::String) -> string { - Spiral_builder::method35(fable_library_rust::String_::fromString(v0_1)) + Spiral_builder::method34(fable_library_rust::String_::fromString(v0_1)) } - pub fn method37() -> string { + pub fn method36() -> string { string("retries") } - pub fn method38() -> string { + pub fn method37() -> string { string("working_directory") } - pub fn method41( + pub fn method40( v0_1: Option, v1_1: string, v2: Array<(string, string)>, @@ -6275,10 +6272,10 @@ mod module_7e2cd9e0 { ) -> string { v1_1 } - pub fn method42() -> (string, string) { + pub fn method41() -> (string, string) { (string(""), string("")) } - pub fn method43( + pub fn method42( v0_1: string, v1_1: string, v2: LrcPtr, @@ -6288,8 +6285,8 @@ mod module_7e2cd9e0 { let v1_1: MutCell = MutCell::new(v1_1.clone()); let v2: MutCell> = MutCell::new(v2.clone()); let v3: MutCell = MutCell::new(v3.clone()); - '_method43: loop { - break '_method43 (if let Spiral_builder::UH1::UH1_1(v2_1_0, v2_1_1) = + '_method42: loop { + break '_method42 (if let Spiral_builder::UH1::UH1_1(v2_1_0, v2_1_1) = v2.get().clone().as_ref() { let v5: LrcPtr = match v2.get().clone().as_ref() { @@ -6311,7 +6308,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { match &v3.get().clone() { Spiral_builder::US7::US7_1(v3_1_0) => { @@ -6325,7 +6322,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { if ' ' == v4 { let v0_1_temp: string = v0_1.get().clone(); @@ -6337,7 +6334,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: string = @@ -6348,7 +6345,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } } } @@ -6363,7 +6360,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: string = @@ -6374,7 +6371,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } } _ => { @@ -6387,7 +6384,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } } } @@ -6403,7 +6400,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { match &v3.get().clone() { Spiral_builder::US7::US7_1(v3_1_0) => { @@ -6419,7 +6416,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { if ' ' == v4 { let v0_1_temp: string = v0_1.get().clone(); @@ -6432,7 +6429,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: string = @@ -6444,7 +6441,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } } } @@ -6459,7 +6456,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: string = @@ -6470,7 +6467,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } } _ => { @@ -6484,7 +6481,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } } } @@ -6505,7 +6502,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: string = @@ -6516,7 +6513,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } } else { if ' ' == v4 { @@ -6529,7 +6526,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: string = @@ -6540,7 +6537,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } } } @@ -6555,7 +6552,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } else { let v0_1_temp: string = v0_1.get().clone(); let v1_1_temp: string = @@ -6566,7 +6563,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } } _ => { @@ -6579,7 +6576,7 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method43; + continue '_method42; } } } @@ -6643,7 +6640,7 @@ mod module_7e2cd9e0 { } getValue(_v1.get().clone()) } - pub fn method44() -> Func1 { + pub fn method43() -> Func1 { Func1::new(move |v: std::io::Error| Spiral_builder::closure15((), v)) } pub fn closure16( @@ -6652,202 +6649,67 @@ mod module_7e2cd9e0 { ) -> Spiral_builder::US9 { Spiral_builder::US9::US9_0(v0_1) } + pub fn method44( + ) -> Func1>>, Spiral_builder::US9> + { + Func1::new( + move |v: std::sync::Arc>>| { + Spiral_builder::closure16((), v) + }, + ) + } pub fn closure17(unitVar: (), v0_1: std::string::String) -> Spiral_builder::US9 { Spiral_builder::US9::US9_1(v0_1) } + pub fn method45() -> Func1 { + Func1::new(move |v: std::string::String| Spiral_builder::closure17((), v)) + } pub fn closure18(unitVar: (), unitVar_1: ()) -> string { string("runtime.execute_with_options / child error") } pub fn closure19(v0_1: std::string::String, unitVar: ()) -> string { sprintf!("error: {} / {}", v0_1, Spiral_builder::closure6((), ())) } - pub fn method45( - v0_1: std::sync::Arc>, - ) -> std::sync::Arc> { - v0_1 - } - pub fn closure21(unitVar: (), v0_1: std::string::String) -> Spiral_builder::US11 { + pub fn closure20(unitVar: (), v0_1: std::string::String) -> Spiral_builder::US11 { Spiral_builder::US11::US11_0(v0_1) } - pub fn closure22(unitVar: (), v0_1: std::string::String) -> Spiral_builder::US11 { + pub fn method46() -> Func1 { + Func1::new(move |v: std::string::String| Spiral_builder::closure20((), v)) + } + pub fn closure21(unitVar: (), v0_1: std::string::String) -> Spiral_builder::US11 { Spiral_builder::US11::US11_1(v0_1) } - pub fn closure23(unitVar: (), unitVar_1: ()) -> string { + pub fn method47() -> Func1 { + Func1::new(move |v: std::string::String| Spiral_builder::closure21((), v)) + } + pub fn closure22(unitVar: (), unitVar_1: ()) -> string { string("runtime.stdio_line") } - pub fn closure24(v0_1: std::string::String, unitVar: ()) -> string { + pub fn closure23(v0_1: std::string::String, unitVar: ()) -> string { sprintf!("e: {} / {}", v0_1, Spiral_builder::closure6((), ())) } - pub fn closure25(v0_1: string, unitVar: ()) -> string { + pub fn closure24(v0_1: string, unitVar: ()) -> string { v0_1 } - pub fn method46( - v0_1: std::sync::Arc>>, - ) -> std::sync::Arc>> - { - v0_1 - } - pub fn closure20( - v0_1: bool, - v1_1: std::sync::Arc>>, - v2: Result, - ) { - let _v3: MutCell> = MutCell::new(None::<()>); - let v4 = Spiral_builder::method44(); - let v6: Result = v2.map_err(|x| v4(x)); - let v9: Spiral_builder::US11 = match &v6 { - Err(v6_1_0) => Spiral_builder::closure22((), v6_1_0.clone()), - Ok(v6_0_0) => Spiral_builder::closure21((), v6_0_0.clone()), - }; - let v41: std::string::String = match &v9 { - Spiral_builder::US11::US11_0(v9_0_0) => { - let v12: string = fable_library_rust::String_::fromString(v9_0_0.clone()); - let v14: &encoding_rs::Encoding = encoding_rs::UTF_8; - let v16: std::borrow::Cow<[u8]> = v14.encode(&*v12).0; - let v18: &[u8] = v16.as_ref(); - let v20: Result<&str, std::str::Utf8Error> = std::str::from_utf8(v18); - let v22: &str = v20.unwrap(); - let v24: std::string::String = String::from(v22); - let v27: string = - sprintf!("> {}", fable_library_rust::String_::fromString(v24.clone())); - if v0_1 { - Spiral_builder::method5( - Spiral_builder::US0::US0_0, - Func0::new({ - let v27 = v27.clone(); - move || Spiral_builder::closure25(v27.clone(), ()) - }), - Func0::new(move || Spiral_builder::closure6((), ())), - ) - } else { - printfn!("{0}", v27.clone()); - () - } - v24 - } - Spiral_builder::US11::US11_1(v9_1_0) => { - let v31: std::string::String = v9_1_0.clone(); - Spiral_builder::method5( - Spiral_builder::US0::US0_4, - Func0::new(move || Spiral_builder::closure23((), ())), - Func0::new({ - let v31 = v31.clone(); - move || Spiral_builder::closure24(v31.clone(), ()) - }), - ); - { - let v35: string = sprintf!("\u{001b}[4;7m{}\u{001b}[0m", v31.clone()); - let v37: &str = &*v35; - String::from(v37) - } - } - }; - let v42: std::sync::Arc< - std::sync::Mutex>, - > = Spiral_builder::method46(v1_1); - let v44: Result< - std::sync::MutexGuard>, - std::sync::PoisonError< - std::sync::MutexGuard>, - >, - > = v42.lock(); - let v46: std::sync::MutexGuard> = - v44.unwrap(); - let v48: &std::sync::mpsc::Sender = &v46; - let v50: Result<(), std::sync::mpsc::SendError> = v48.send(v41); - v50.unwrap(); - _v3.set(Some(())); - getValue(_v3.get().clone()); - () - } - pub fn method47() -> bool { - true - } - pub fn closure26( - v0_1: bool, - v1_1: std::sync::Arc>>, - v2: Result, - ) { - let _v3: MutCell> = MutCell::new(None::<()>); - let v4 = Spiral_builder::method44(); - let v6: Result = v2.map_err(|x| v4(x)); - let v9: Spiral_builder::US11 = match &v6 { - Err(v6_1_0) => Spiral_builder::closure22((), v6_1_0.clone()), - Ok(v6_0_0) => Spiral_builder::closure21((), v6_0_0.clone()), - }; - let v46: std::string::String = match &v9 { - Spiral_builder::US11::US11_0(v9_0_0) => { - let v12: string = fable_library_rust::String_::fromString(v9_0_0.clone()); - let v14: &encoding_rs::Encoding = encoding_rs::UTF_8; - let v16: std::borrow::Cow<[u8]> = v14.encode(&*v12).0; - let v18: &[u8] = v16.as_ref(); - let v20: Result<&str, std::str::Utf8Error> = std::str::from_utf8(v18); - let v22: &str = v20.unwrap(); - let v24: std::string::String = String::from(v22); - let v27: string = - sprintf!("! {}", fable_library_rust::String_::fromString(v24.clone())); - if v0_1 { - Spiral_builder::method5( - Spiral_builder::US0::US0_0, - Func0::new({ - let v27 = v27.clone(); - move || Spiral_builder::closure25(v27.clone(), ()) - }), - Func0::new(move || Spiral_builder::closure6((), ())), - ) - } else { - printfn!("{0}", v27.clone()); - () - } - { - let v31: string = sprintf!("\u{001b}[4;7m{}\u{001b}[0m", v24); - let v33: &str = &*v31; - String::from(v33) - } - } - Spiral_builder::US11::US11_1(v9_1_0) => { - let v36: std::string::String = v9_1_0.clone(); - Spiral_builder::method5( - Spiral_builder::US0::US0_4, - Func0::new(move || Spiral_builder::closure23((), ())), - Func0::new({ - let v36 = v36.clone(); - move || Spiral_builder::closure24(v36.clone(), ()) - }), - ); - { - let v40: string = sprintf!("\u{001b}[4;7m{}\u{001b}[0m", v36.clone()); - let v42: &str = &*v40; - String::from(v42) - } - } - }; - let v47: std::sync::Arc< - std::sync::Mutex>, - > = Spiral_builder::method46(v1_1); - let v49: Result< - std::sync::MutexGuard>, - std::sync::PoisonError< - std::sync::MutexGuard>, - >, - > = v47.lock(); - let v51: std::sync::MutexGuard> = - v49.unwrap(); - let v53: &std::sync::mpsc::Sender = &v51; - let v55: Result<(), std::sync::mpsc::SendError> = v53.send(v46); - v55.unwrap(); - _v3.set(Some(())); - getValue(_v3.get().clone()); - () + pub fn closure25( + unitVar: (), + v0_1: std::sync::mpsc::SendError, + ) -> std::string::String { + let _v1: MutCell> = + MutCell::new(None::); + { + let x: std::string::String = format!("{}", v0_1); + _v1.set(Some(x)) + } + getValue(_v1.get().clone()) } pub fn method48( - v0_1: std::sync::Arc>>, - ) -> std::sync::Arc>> { - v0_1 + ) -> Func1, std::string::String> { + Func1::new(move |v: std::sync::mpsc::SendError| { + Spiral_builder::closure25((), v) + }) } - pub fn method49( - v0_1: std::sync::Arc>, - ) -> std::sync::Arc> { + pub fn method49(v0_1: Result<(), std::string::String>) -> Result<(), std::string::String> { v0_1 } pub fn method50( @@ -6856,38 +6718,26 @@ mod module_7e2cd9e0 { v0_1 } pub fn method51( - v0_1: std::sync::Arc>>, - ) -> std::sync::Arc>> { + v0_1: std::thread::JoinHandle>, + ) -> std::thread::JoinHandle> { v0_1 } - pub fn method52(v0_1: std::thread::JoinHandle) -> std::thread::JoinHandle { - v0_1 - } - pub fn closure27(unitVar: (), v0_1: std::process::Output) -> Spiral_builder::US14 { + pub fn closure26(unitVar: (), v0_1: std::process::Output) -> Spiral_builder::US14 { Spiral_builder::US14::US14_0(v0_1) } - pub fn closure28(unitVar: (), v0_1: std::string::String) -> Spiral_builder::US14 { + pub fn closure27(unitVar: (), v0_1: std::string::String) -> Spiral_builder::US14 { Spiral_builder::US14::US14_1(v0_1) } - pub fn closure29(unitVar: (), unitVar_1: ()) -> string { + pub fn closure28(unitVar: (), unitVar_1: ()) -> string { string("runtime.execute_with_options / output error") } - pub fn closure30(v0_1: std::string::String, unitVar: ()) -> string { + pub fn closure29(v0_1: std::string::String, unitVar: ()) -> string { sprintf!("error: {} / {}", v0_1, Spiral_builder::closure6((), ())) } - pub fn method53( - v0_1: std::sync::Arc< - std::sync::Mutex>>, - >, - ) -> std::sync::Arc< - std::sync::Mutex>>, - > { - v0_1 - } - pub fn closure31(unitVar: (), unitVar_1: ()) -> string { + pub fn closure30(unitVar: (), unitVar_1: ()) -> string { string("runtime.execute_with_options / result") } - pub fn closure32(v0_1: i32, v1_1: string, unitVar: ()) -> string { + pub fn closure31(v0_1: i32, v1_1: string, unitVar: ()) -> string { sprintf!( "exit_code: {} / std_trace.Length: {} / {}", v0_1, @@ -6895,10 +6745,10 @@ mod module_7e2cd9e0 { Spiral_builder::closure6((), ()) ) } - pub fn method54(v0_: i32, v0__1: string) -> LrcPtr<(i32, string)> { + pub fn method52(v0_: i32, v0__1: string) -> LrcPtr<(i32, string)> { LrcPtr::new((v0_, v0__1)) } - pub fn closure33( + pub fn closure32( v0_1: Option, v1_1: string, v2: Array<(string, string)>, @@ -6913,13 +6763,13 @@ mod module_7e2cd9e0 { (v0_1, v1_1, v2, v3, v4, v5, v6) ) } - pub fn method56() -> Func0 { + pub fn method54() -> Func0 { Func0::new(move || Spiral_builder::closure6((), ())) } - pub fn closure35(v0_1: string, unitVar: ()) -> string { + pub fn closure34(v0_1: string, unitVar: ()) -> string { v0_1 } - pub fn closure34( + pub fn closure33( v0_1: Option, v1_1: string, v2: Array<(string, string)>, @@ -6945,7 +6795,7 @@ mod module_7e2cd9e0 { () } } - pub fn closure36( + pub fn closure35( v0_1: Option, v1_1: string, v2: Array<(string, string)>, @@ -6971,7 +6821,7 @@ mod module_7e2cd9e0 { () } } - pub fn closure37(v0_1: (), unitVar: ()) { + pub fn closure36(v0_1: (), unitVar: ()) { let _v1: MutCell> = MutCell::new(None::); { let x: bool = unbox::(&defaultOf()); @@ -6985,20 +6835,20 @@ mod module_7e2cd9e0 { () } } - pub fn closure38(v0_1: LrcPtr, unitVar: ()) -> string { + pub fn closure37(v0_1: LrcPtr, unitVar: ()) -> string { sprintf!( "execute_with_options_async / WaitForExitAsync / ex: {:?}", v0_1 ) } - pub fn closure39(v0_1: i32, v1_1: string, unitVar: ()) -> string { + pub fn closure38(v0_1: i32, v1_1: string, unitVar: ()) -> string { sprintf!( "execute_with_options_async / exit_code: {} / output.Length: {}", v0_1, length(v1_1) ) } - pub fn method55( + pub fn method53( v0_1: Option, v1_1: string, v2: Array<(string, string)>, @@ -7015,7 +6865,7 @@ mod module_7e2cd9e0 { } getValue(_v7.get().clone()) } - pub fn method40( + pub fn method39( v0_1: Option, v1_1: string, v2: Array<(string, string)>, @@ -7025,7 +6875,7 @@ mod module_7e2cd9e0 { v6: Option, ) -> (i32, string) { let _v7: MutCell> = MutCell::new(None::<(i32, string)>); - let v8: string = Spiral_builder::method41( + let v8: string = Spiral_builder::method40( v0_1.clone(), v1_1.clone(), v2.clone(), @@ -7034,13 +6884,13 @@ mod module_7e2cd9e0 { v5, v6.clone(), ); - let patternInput: (string, string) = Spiral_builder::method42(); + let patternInput: (string, string) = Spiral_builder::method41(); let v11: i32 = length(v8.clone()); let v12: Array = new_init(&'\u{0000}', v11); let v13: LrcPtr = LrcPtr::new(Spiral_builder::Mut4 { l0: MutCell::new(0_i32), }); - while Spiral_builder::method13(v11, v13.clone()) { + while Spiral_builder::method12(v11, v13.clone()) { let v15: i32 = v13.l0.get().clone(); let v16: char = getCharAt(v8.clone(), v15); v12.get_mut()[v15 as usize] = v16; @@ -7052,12 +6902,12 @@ mod module_7e2cd9e0 { } { let v19: List = ofArray(v12.clone()); - let patternInput_1: (string, string) = Spiral_builder::method43( + let patternInput_1: (string, string) = Spiral_builder::method42( patternInput.1.clone(), patternInput.0.clone(), foldBack( Func2::new(move |b0: char, b1: LrcPtr| { - (Spiral_builder::method14())(b0)(b1) + (Spiral_builder::method13())(b0)(b1) }), v19, LrcPtr::new(Spiral_builder::UH1::UH1_0), @@ -7065,7 +6915,7 @@ mod module_7e2cd9e0 { Spiral_builder::US7::US7_0, ); let v27: string = patternInput_1.0.clone(); - let v29: Array = Spiral_builder::method12(patternInput_1.1.clone()); + let v29: Array = Spiral_builder::method11(patternInput_1.1.clone()); let v31: Vec = v29.to_vec(); let v33: bool = true; let _result = v31 @@ -7080,7 +6930,7 @@ mod module_7e2cd9e0 { }) .collect::>(); let v43: Vec = _result; - Spiral_builder::method5( + Spiral_builder::method4( Spiral_builder::US0::US0_1, Func0::new(move || Spiral_builder::closure13((), ())), Func0::new({ @@ -7205,7 +7055,7 @@ mod module_7e2cd9e0 { }; let v97: Result = std::process::Command::spawn(v95); - let v98 = Spiral_builder::method44(); + let v98 = Spiral_builder::method43(); let v100: Result = v97.map_err(|x| v98(x)); let v102: bool = true; @@ -7227,21 +7077,11 @@ mod module_7e2cd9e0 { >, std::string::String, > = _result; + let v114 = Spiral_builder::method44(); + let v115 = Spiral_builder::method45(); let v117: Spiral_builder::US9 = match v113 { - Ok(x) => Func1::new( - move |v: std::sync::Arc< - std::sync::Mutex>, - >| { - Spiral_builder::closure16((), v) - }, - )( - x - ), - Err(e) => { - Func1::new(move |v_1: std::string::String| { - Spiral_builder::closure17((), v_1) - })(e) - } + Ok(x) => v114(x), + Err(e) => v115(e), }; let patternInput_4: ( i32, @@ -7279,30 +7119,26 @@ mod module_7e2cd9e0 { .stdin .take() .unwrap(); - let v127: std::sync::Mutex< - Option, - > = std::sync::Mutex::new(Some(v120)); - let v129: std::sync::Arc< - std::sync::Mutex< - Option, - >, - > = std::sync::Arc::new(v127); - let v132: std::sync::Mutex< - Option, - > = std::sync::Mutex::new(Some(v122)); - let v134: std::sync::Arc< - std::sync::Mutex< - Option, - >, - > = std::sync::Arc::new(v132); - let v137: std::sync::Mutex< + let v126: std::sync::Mutex< + std::process::ChildStdout, + > = std::sync::Mutex::new(v120); + let v128: std::sync::Arc< + std::sync::Mutex, + > = std::sync::Arc::new(v126); + let v130: std::sync::Mutex< + std::process::ChildStderr, + > = std::sync::Mutex::new(v122); + let v132: std::sync::Arc< + std::sync::Mutex, + > = std::sync::Arc::new(v130); + let v135: std::sync::Mutex< Option, > = std::sync::Mutex::new(Some(v124)); - let v139: std::sync::Arc< + let v137: std::sync::Arc< std::sync::Mutex< Option, >, - > = std::sync::Arc::new(v137); + > = std::sync::Arc::new(v135); let patternInput_3: ( std::sync::mpsc::Sender, std::sync::Arc< @@ -7315,45 +7151,37 @@ mod module_7e2cd9e0 { std::sync::mpsc::channel(); (sender, std::sync::Arc::new(receiver)) }; - let v143: std::sync::Arc< - std::sync::mpsc::Receiver, - > = Spiral_builder::method45( - patternInput_3.1.clone(), - ); - let v145: bool = true; - let v143 = v143; - let v147: std::sync::Mutex< + let v139: std::sync::mpsc::Sender< + std::string::String, + > = patternInput_3.0.clone(); + let v142: std::sync::Mutex< std::sync::mpsc::Sender, - > = std::sync::Mutex::new(patternInput_3.0.clone()); - let v149: std::sync::Arc< + > = std::sync::Mutex::new(v139.clone()); + let v144: std::sync::Arc< std::sync::Mutex< std::sync::mpsc::Sender< std::string::String, >, >, - > = std::sync::Arc::new(v147); - let v151: std::sync::Arc< - std::sync::Mutex< - std::sync::mpsc::Sender< - std::string::String, - >, - >, - > = v149.clone(); - let v153: std::sync::Arc< + > = std::sync::Arc::new(v142); + let v146: std::sync::Mutex< + std::sync::mpsc::Sender, + > = std::sync::Mutex::new(v139); + let v148: std::sync::Arc< std::sync::Mutex< std::sync::mpsc::Sender< std::string::String, >, >, - > = v149.clone(); - let v155: std::sync::Mutex< + > = std::sync::Arc::new(v146); + let v150: std::sync::Mutex< std::sync::Arc< std::sync::mpsc::Receiver< std::string::String, >, >, - > = std::sync::Mutex::new(v143); - let v157: std::sync::Arc< + > = std::sync::Mutex::new(patternInput_3.1.clone()); + let v152: std::sync::Arc< std::sync::Mutex< std::sync::Arc< std::sync::mpsc::Receiver< @@ -7361,415 +7189,666 @@ mod module_7e2cd9e0 { >, >, >, - > = std::sync::Arc::new(v155); + > = std::sync::Arc::new(v150); + let v154: bool = true; let __result = std::thread::spawn(move || { //; - { - let v160: std::process::ChildStdout = - v129.lock().unwrap().take().unwrap(); - let v162: - encoding_rs_io::DecodeReaderBytes> = - encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build(v160); - let v164: std::io::BufReader< - encoding_rs_io::DecodeReaderBytes< + let v156: Result< + std::sync::MutexGuard< + std::process::ChildStdout, + >, + std::sync::PoisonError< + std::sync::MutexGuard< std::process::ChildStdout, + >, + >, + > = v128.lock(); + let v158: std::sync::MutexGuard< + std::process::ChildStdout, + > = v156.unwrap(); + let v160: bool = true; + let mut v158 = v158; + let v162: &mut std::process::ChildStdout = + &mut v158; + let v164: + encoding_rs_io::DecodeReaderBytes<&mut std::process::ChildStdout, Vec> = + encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build(v162); + let v166: std::io::BufReader< + encoding_rs_io::DecodeReaderBytes< + &mut std::process::ChildStdout, + Vec, + >, + > = std::io::BufReader::new(v164); + let v168: std::io::Lines< + std::io::BufReader< + encoding_rs_io::DecodeReaderBytes< + &mut std::process::ChildStdout, + Vec, + >, + >, + > = std::io::BufRead::lines(v166); + let v170: bool = true; + let mut v168 = v168; + let _result = v168.try_for_each(|x| { //; + let v172: + Result = + x; + let v174: + std::sync::Arc>> = + v144.clone(); + let v175 = + Spiral_builder::method43(); + let v177: + Result = + v172.map_err(|x| v175(x)); + let v178 = + Spiral_builder::method46(); + let v179 = + Spiral_builder::method47(); + let v181: + Spiral_builder::US11 = + match v177 { Ok(x) => v178(x), Err(e) => v179(e) }; + let v213: + std::string::String = + match &v181 + { + Spiral_builder::US11::US11_0(v181_0_0) + => + { + let v184: + string = + fable_library_rust::String_::fromString(v181_0_0.clone()); + let v186: + &encoding_rs::Encoding = + encoding_rs::UTF_8; + let v188: + std::borrow::Cow<[u8]> = + v186.encode(&*v184).0; + let v190: + &[u8] = + v188.as_ref(); + let v192: + Result<&str, + std::str::Utf8Error> = + std::str::from_utf8(v190); + let v194: + &str = + v192.unwrap(); + let v196: + std::string::String = + String::from(v194); + let v199: + string = + sprintf!("> {}", + fable_library_rust::String_::fromString(v196.clone())); + if v5 + { + Spiral_builder::method4(Spiral_builder::US0::US0_0, + Func0::new({ + let v199 + = + v199.clone(); + move + || + Spiral_builder::closure24(v199.clone(), + ()) + }), + Func0::new(move + || + Spiral_builder::closure6((), + ()))) + } else { + printfn!("{0}", + v199.clone()); + () + } + v196 + } + Spiral_builder::US11::US11_1(v181_1_0) + => + { + let v203: + std::string::String = + v181_1_0.clone(); + Spiral_builder::method4(Spiral_builder::US0::US0_4, + Func0::new(move + || + Spiral_builder::closure22((), + ())), + Func0::new({ + let v203 + = + v203.clone(); + move + || + Spiral_builder::closure23(v203.clone(), + ()) + })); + { + let v207: + string = + sprintf!("\u{001b}[4;7m{}\u{001b}[0m", + v203.clone()); + let v209: + &str = + &*v207; + String::from(v209) + } + } + }; + let v215: + Result>, + std::sync::PoisonError>>> = + v174.lock(); + let v217: + std::sync::MutexGuard> = + v215.unwrap(); + let v219: + &std::sync::mpsc::Sender = + &v217; + let v221: + Result<(), + std::sync::mpsc::SendError> = + v219.send(v213); + let v222 = + Spiral_builder::method48(); + let v224: + Result<(), + std::string::String> = + v221.map_err(|x| v222(x)); + let v226: + _ = + v224; + let v228: + bool = + true; v226 }); //; + let v231: Result<(), std::string::String> = + Spiral_builder::method49(_result); + let v235: string = string("v231 }); //"); + v231 + }); //; + { + let v237: std::thread::JoinHandle< + Result<(), std::string::String>, + > = __result; + let v239: bool = true; + let __result = std::thread::spawn(move || { + //; + let v241: Result< + std::sync::MutexGuard< + std::process::ChildStderr, + >, + std::sync::PoisonError< + std::sync::MutexGuard< + std::process::ChildStderr, + >, + >, + > = v132.lock(); + let v243: std::sync::MutexGuard< + std::process::ChildStderr, + > = v241.unwrap(); + let v245: bool = true; + let mut v243 = v243; + let v247: &mut std::process::ChildStderr = + &mut v243; + let v249: + encoding_rs_io::DecodeReaderBytes<&mut std::process::ChildStderr, Vec> = + encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build(v247); + let v251: std::io::BufReader< + encoding_rs_io::DecodeReaderBytes< + &mut std::process::ChildStderr, Vec, >, - > = std::io::BufReader::new(v162); - let v166: std::sync::Mutex< + > = std::io::BufReader::new(v249); + let v253: std::io::Lines< std::io::BufReader< encoding_rs_io::DecodeReaderBytes< - std::process::ChildStdout, + &mut std::process::ChildStderr, Vec, >, >, - > = std::sync::Mutex::new(v164); - let v168: - std::sync::Arc>>>> = - std::sync::Arc::new(v166); - let v169: - string = - string("true; for line in std::io::BufRead::lines(std::io::Read::by_ref(&mut *$0.lock().unwrap())).collect::>() { $1(line) }"); - let v171: bool = true; - for line in std::io::BufRead::lines( - std::io::Read::by_ref( - &mut *v168.lock().unwrap(), - ), - ) - .collect::>() - { - Func1::new({ - let v151 = v151.clone(); - move - |v_2: - Result| - Spiral_builder::closure20(v5, - v151.clone(), - v_2) - })( - line - ) - } - let v172: bool = Spiral_builder::method47(); - v172 - } - }); - { - //; + > = std::io::BufRead::lines(v251); + let v255: bool = true; + let mut v253 = v253; + let _result = v253.try_for_each(|x| { //; + let v257: + Result = + x; + let v259: + std::sync::Arc>> = + v148.clone(); + let v260 = + Spiral_builder::method43(); + let v262: + Result = + v257.map_err(|x| v260(x)); + let v263 = + Spiral_builder::method46(); + let v264 = + Spiral_builder::method47(); + let v266: + Spiral_builder::US11 = + match v262 { Ok(x) => v263(x), Err(e) => v264(e) }; + let v303: + std::string::String = + match &v266 + { + Spiral_builder::US11::US11_0(v266_0_0) + => + { + let v269: + string = + fable_library_rust::String_::fromString(v266_0_0.clone()); + let v271: + &encoding_rs::Encoding = + encoding_rs::UTF_8; + let v273: + std::borrow::Cow<[u8]> = + v271.encode(&*v269).0; + let v275: + &[u8] = + v273.as_ref(); + let v277: + Result<&str, + std::str::Utf8Error> = + std::str::from_utf8(v275); + let v279: + &str = + v277.unwrap(); + let v281: + std::string::String = + String::from(v279); + let v284: + string = + sprintf!("! {}", + fable_library_rust::String_::fromString(v281.clone())); + if v5 + { + Spiral_builder::method4(Spiral_builder::US0::US0_0, + Func0::new({ + let v284 + = + v284.clone(); + move + || + Spiral_builder::closure24(v284.clone(), + ()) + }), + Func0::new(move + || + Spiral_builder::closure6((), + ()))) + } else { + printfn!("{0}", + v284.clone()); + () + } + { + let v288: + string = + sprintf!("\u{001b}[4;7m{}\u{001b}[0m", + v281); + let v290: + &str = + &*v288; + String::from(v290) + } + } + Spiral_builder::US11::US11_1(v266_1_0) + => + { + let v293: + std::string::String = + v266_1_0.clone(); + Spiral_builder::method4(Spiral_builder::US0::US0_4, + Func0::new(move + || + Spiral_builder::closure22((), + ())), + Func0::new({ + let v293 + = + v293.clone(); + move + || + Spiral_builder::closure23(v293.clone(), + ()) + })); + { + let v297: + string = + sprintf!("\u{001b}[4;7m{}\u{001b}[0m", + v293.clone()); + let v299: + &str = + &*v297; + String::from(v299) + } + } + }; + let v305: + Result>, + std::sync::PoisonError>>> = + v259.lock(); + let v307: + std::sync::MutexGuard> = + v305.unwrap(); + let v309: + &std::sync::mpsc::Sender = + &v307; + let v311: + Result<(), + std::sync::mpsc::SendError> = + v309.send(v303); + let v312 = + Spiral_builder::method48(); + let v314: + Result<(), + std::string::String> = + v311.map_err(|x| v312(x)); + let v316: + _ = + v314; + let v318: + bool = + true; v316 }); //; + let v321: Result<(), std::string::String> = + Spiral_builder::method49(_result); + let v323: string = string("v321 }); //"); + v321 + }); //; { - let v176: std::thread::JoinHandle = - __result; - let __result = std::thread::spawn( - move || { - //; - { - let v179: - std::process::ChildStderr = - v134.lock().unwrap().take().unwrap(); - let v181: - encoding_rs_io::DecodeReaderBytes> = - encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build(v179); - let v183: - std::io::BufReader>> = - std::io::BufReader::new(v181); - let v185: - std::sync::Mutex>>> = - std::sync::Mutex::new(v183); - let v187: - std::sync::Arc>>>> = - std::sync::Arc::new(v185); - let v188: - string = - string("true; for line in std::io::BufRead::lines(std::io::Read::by_ref(&mut *$0.lock().unwrap())).collect::>() { $1(line) }"); - let v190: bool = true; - for line in - std::io::BufRead::lines( - std::io::Read::by_ref( - &mut *v187 - .lock() - .unwrap(), - ), - ) - .collect::>() - { - Func1::new({ - let v149 = v149.clone(); - move - |v_3: - Result| - Spiral_builder::closure26(v5, - v149.clone(), - v_3) - })( - line - ) + let v325: std::thread::JoinHandle< + Result<(), std::string::String>, + > = __result; + let _v326: LrcPtr< + MutCell>, + > = refCell(None::); + { + let x_5: Option = + match &v4 { + None => { + None:: } - let v191: bool = - Spiral_builder::method47(); - v191 - } - }, - ); + Some(v4_0_0) => { + let x_3 = v4_0_0.clone(); + Some((Func0::new({ + let x_3 = x_3.clone(); + move || { + Spiral_builder::US12::US12_0(x_3.clone()) + } + }))( + )) + } + }; + _v326.set(x_5) + } { - //; - { - let v195: std::thread::JoinHandle< - bool, - > = __result; - let _v196: LrcPtr< - MutCell< - Option< - Spiral_builder::US12, - >, - >, - > = refCell( - None::, + let v331: Spiral_builder::US12 = + defaultValue( + Spiral_builder::US12::US12_1, + _v326.get().clone(), ); - { - let x_5: Option< - Spiral_builder::US12, - > = match &v4 { - None => None::< - Spiral_builder::US12, - >, - Some(v4_0_0) => { - let x_3 = - v4_0_0.clone(); - Some((Func0::new({ - let x_3 = - x_3.clone(); - move || { - Spiral_builder::US12::US12_0(x_3.clone()) - } - }))( - )) - } - }; - _v196.set(x_5) - } - { - let v201: - Spiral_builder::US12 = - defaultValue(Spiral_builder::US12::US12_1, - _v196.get().clone()); - match &v201 - { - Spiral_builder::US12::US12_0(v201_0_0) - => - { - let v203: - std::sync::Arc>> = - Spiral_builder::method48(v139); - let v205: - Result>, - std::sync::PoisonError>>> = - v203.lock(); - let v207: - std::sync::MutexGuard> = - v205.unwrap(); - let v209: - bool = - true; let mut v207 = v207; - let v211: - &mut Option = - &mut v207; - let v213: - Option = - Option::take(v211); - let v215: - bool = - true; let _result = v213.map(|x| { //; - let v217: - std::process::ChildStdin = - x; - let v219: - std::sync::Mutex = - std::sync::Mutex::new(v217); - let v221: - std::sync::Arc> = - std::sync::Arc::new(v219); - let v223: - bool = - true; v221 }); - let v225: - Option>> = - _result; - let _v226: - LrcPtr>> = - refCell(None::); + match &v331 { + Spiral_builder::US12::US12_0( + v331_0_0, + ) => { + let v334: + Result>, + std::sync::PoisonError>>> = + v137.lock(); + let v336: + std::sync::MutexGuard> = + v334.unwrap(); + let v338: bool = true; + let mut v336 = v336; + let v340: &mut Option< + std::process::ChildStdin, + > = &mut v336; + let v342: Option< + std::process::ChildStdin, + > = Option::take(v340); + let v344: bool = true; + let _result = v342.map(|x| { //; + let v346: + std::process::ChildStdin = + x; + let v348: + std::sync::Mutex = + std::sync::Mutex::new(v346); + let v350: + std::sync::Arc> = + std::sync::Arc::new(v348); + let v352: + bool = + true; v350 }); + let v354: + Option>> = + _result; + let _v355: + LrcPtr>> = + refCell(None::); + { + let x_8: + Option = + match &v354 + { + None + => + None::, + Some(v354_0_0) + => + { + let x_6: + std::sync::Arc> = + v354_0_0.clone(); + Some((Func0::new({ + let x_6 + = + x_6.clone(); + move + || + Spiral_builder::US13::US13_0(x_6.clone()) + }))()) + } + }; + _v355.set(x_8) + } + { + let v360: + Spiral_builder::US13 = + defaultValue(Spiral_builder::US13::US13_1, + _v355.get().clone()); + match &v360 + { + Spiral_builder::US13::US13_0(v360_0_0) + => { - let x_8: - Option = - match &v225 + let v361: + std::sync::Arc> = + match &v360 { - None + Spiral_builder::US13::US13_0(x) => - None::, - Some(v225_0_0) + x.clone(), + _ => - { - let x_6: - std::sync::Arc> = - v225_0_0.clone(); - Some((Func0::new({ - let x_6 - = - x_6.clone(); - move - || - Spiral_builder::US13::US13_0(x_6.clone()) - }))()) - } + unreachable!(), }; - _v226.set(x_8) - } - { - let v231: - Spiral_builder::US13 = - defaultValue(Spiral_builder::US13::US13_1, - _v226.get().clone()); - match &v231 - { - Spiral_builder::US13::US13_0(v231_0_0) - => - { - let v232: - std::sync::Arc> = - match &v231 - { - Spiral_builder::US13::US13_0(x) - => - x.clone(), - _ - => - unreachable!(), - }; - (match &v201 - { - Spiral_builder::US12::US12_0(x) - => - x.clone(), - _ - => - unreachable!(), - })(v232.clone()); - { - let v233: - std::sync::Arc> = - Spiral_builder::method49(v232); - let v235: - Result, - std::sync::PoisonError>> = - v233.lock(); - let v238: - std::sync::MutexGuard = - Spiral_builder::method50(v235.unwrap()); - let v240: - bool = - true; let mut v238 = v238; - let v242: - bool = - true; std::io::Write::flush(&mut *v238).unwrap(); - () - } - } - _ - => - (), + (match &v331 + { + Spiral_builder::US12::US12_0(x) + => + x.clone(), + _ + => + unreachable!(), + })(v361.clone()); + { + let v363: + Result, + std::sync::PoisonError>> = + v361.lock(); + let v366: + std::sync::MutexGuard = + Spiral_builder::method50(v363.unwrap()); + let v368: + bool = + true; let mut v366 = v366; + let v370: + bool = + true; std::io::Write::flush(&mut *v366).unwrap(); + () } } + _ + => + (), } - _ - => - (), - } - { - let v243: - std::sync::Arc>> = - Spiral_builder::method51(v118); - let v245: - Result>, - std::sync::PoisonError>>> = - v243.lock(); - let v247: - std::sync::MutexGuard> = - v245.unwrap(); - let v249: bool = true; - let mut v247 = v247; - let v251: &mut Option< - std::process::Child, - > = &mut v247; - let v253: Option< - std::process::Child, - > = Option::take(v251); - let v255: - std::process::Child = - v253.unwrap(); - let v257: Result< - std::process::Output, - std::io::Error, - > = v255.wait_with_output(); - let v258 = - Spiral_builder::method44(); - let v260: Result< - std::process::Output, - std::string::String, - > = v257 - .map_err(|x| v258(x)); - let v261: - std::thread::JoinHandle = - Spiral_builder::method52(v176); - let v265: string = - string("v261"); - let v266: - std::thread::JoinHandle = - Spiral_builder::method52(v195); - let v271: string = append( - append( - string("vec!["), - append( - string("v266,"), - v265, - ), - ), - string("]"), - ); - let v272: Vec< - std::thread::JoinHandle< - bool, + } + } + _ => (), + } + { + let v372: Result< + std::sync::MutexGuard< + Option, + >, + std::sync::PoisonError< + std::sync::MutexGuard< + Option< + std::process::Child, >, - > = vec![v266, v261]; - let v274: bool = true; - v272.into_iter().for_each(|x| { //; - let v276: - std::thread::JoinHandle = - x; - let v278: - Result> = - std::thread::JoinHandle::join(v276); - let v280: - bool = - v278.unwrap(); - let v282: - bool = - true; () }); - let v285: - Spiral_builder::US14 = - match &v260 - { - Err(v260_1_0) - => - Spiral_builder::closure28((), - v260_1_0.clone()), - Ok(v260_0_0) - => - Spiral_builder::closure27((), - v260_0_0.clone()), - }; - match &v285 + >, + >, + > = v118.lock(); + let v374: std::sync::MutexGuard< + Option, + > = v372.unwrap(); + let v376: bool = true; + let mut v374 = v374; + let v378: &mut Option< + std::process::Child, + > = &mut v374; + let v380: Option< + std::process::Child, + > = Option::take(v378); + let v382: std::process::Child = + v380.unwrap(); + let v384: Result< + std::process::Output, + std::io::Error, + > = v382.wait_with_output(); + let v385 = + Spiral_builder::method43(); + let v387: Result< + std::process::Output, + std::string::String, + > = v384.map_err(|x| v385(x)); + let v388: std::thread::JoinHandle< + Result<(), std::string::String>, + > = Spiral_builder::method51(v325); + let v391: string = string("v388"); + let v392: std::thread::JoinHandle< + Result<(), std::string::String>, + > = Spiral_builder::method51(v237); + let v397: string = append( + append( + string("vec!["), + append( + string("v392,"), + v391, + ), + ), + string("]"), + ); + let v398: Vec< + std::thread::JoinHandle< + Result< + (), + std::string::String, + >, + >, + > = vec![v392, v388]; + let v400: bool = true; + v398.into_iter().for_each(|x| { //; + let v402: + std::thread::JoinHandle> = + x; + let v404: + Result, + Box> = + std::thread::JoinHandle::join(v402); + let v406: + Result<(), + std::string::String> = + v404.unwrap(); + v406.unwrap(); + { + let v409: + bool = + true; () }}); + { + //; + let v412: + Spiral_builder::US14 = + match &v387 { - Spiral_builder::US14::US14_0(v285_0_0) + Err(v387_1_0) => - { - let v288: - std::process::ExitStatus = - v285_0_0.clone().status; - let v290: - Option = - v288.code(); - (v290.unwrap(), - Spiral_builder::US2::US2_1, - Spiral_builder::US10::US10_0(v157)) - } - Spiral_builder::US14::US14_1(v285_1_0) + Spiral_builder::closure27((), + v387_1_0.clone()), + Ok(v387_0_0) => - { - let v295: - std::string::String = - v285_1_0.clone(); - Spiral_builder::method5(Spiral_builder::US0::US0_4, - Func0::new(move + Spiral_builder::closure26((), + v387_0_0.clone()), + }; + match &v412 + { + Spiral_builder::US14::US14_0(v412_0_0) + => + { + let v415: + std::process::ExitStatus = + v412_0_0.clone().status; + let v417: + Option = + v415.code(); + (v417.unwrap(), + Spiral_builder::US2::US2_1, + Spiral_builder::US10::US10_0(v152)) + } + Spiral_builder::US14::US14_1(v412_1_0) + => + { + let v422: + std::string::String = + v412_1_0.clone(); + Spiral_builder::method4(Spiral_builder::US0::US0_4, + Func0::new(move + || + Spiral_builder::closure28((), + ())), + Func0::new({ + let v422 + = + v422.clone(); + move || - Spiral_builder::closure29((), - ())), - Func0::new({ - let v295 - = - v295.clone(); - move - || - Spiral_builder::closure30(v295.clone(), - ()) - })); - (-2_i32, - Spiral_builder::US2::US2_0(v295.clone()), - Spiral_builder::US10::US10_1) - } + Spiral_builder::closure29(v422.clone(), + ()) + })); + (-2_i32, + Spiral_builder::US2::US2_0(v422.clone()), + Spiral_builder::US10::US10_1) } - } + } } } } @@ -7777,17 +7856,17 @@ mod module_7e2cd9e0 { } } Spiral_builder::US9::US9_1(v117_1_0) => { - let v307: std::string::String = v117_1_0.clone(); - Spiral_builder::method5( + let v434: std::string::String = v117_1_0.clone(); + Spiral_builder::method4( Spiral_builder::US0::US0_4, Func0::new(move || { Spiral_builder::closure18((), ()) }), Func0::new({ - let v307 = v307.clone(); + let v434 = v434.clone(); move || { Spiral_builder::closure19( - v307.clone(), + v434.clone(), (), ) } @@ -7795,15 +7874,15 @@ mod module_7e2cd9e0 { ); ( -1_i32, - Spiral_builder::US2::US2_0(v307.clone()), + Spiral_builder::US2::US2_0(v434.clone()), Spiral_builder::US10::US10_1, ) } }; - let v318: Spiral_builder::US10 = patternInput_4.2.clone(); - let v317: Spiral_builder::US2 = patternInput_4.1.clone(); - let v316: i32 = patternInput_4.0.clone(); - let v323: Option< + let v445: Spiral_builder::US10 = patternInput_4.2.clone(); + let v444: Spiral_builder::US2 = patternInput_4.1.clone(); + let v443: i32 = patternInput_4.0.clone(); + let v450: Option< std::sync::Arc< std::sync::Mutex< std::sync::Arc< @@ -7813,9 +7892,9 @@ mod module_7e2cd9e0 { >, >, >, - > = match &v318 { - Spiral_builder::US10::US10_0(v318_0_0) => { - Some(match &v318 { + > = match &v445 { + Spiral_builder::US10::US10_0(v445_0_0) => { + Some(match &v445 { Spiral_builder::US10::US10_0(x) => x.clone(), _ => unreachable!(), }) @@ -7834,10 +7913,10 @@ mod module_7e2cd9e0 { > } }; - let v325: bool = true; - let _result = v323.map(|x| { + let v452: bool = true; + let _result = v450.map(|x| { //; - let v328: std::sync::Arc< + let v454: std::sync::Arc< std::sync::Mutex< std::sync::Arc< std::sync::mpsc::Receiver< @@ -7845,8 +7924,8 @@ mod module_7e2cd9e0 { >, >, >, - > = Spiral_builder::method53(x); - let v330: Result< + > = x; + let v456: Result< std::sync::MutexGuard< std::sync::Arc< std::sync::mpsc::Receiver< @@ -7863,44 +7942,44 @@ mod module_7e2cd9e0 { >, >, >, - > = v328.lock(); - let v332: std::sync::MutexGuard< + > = v454.lock(); + let v458: std::sync::MutexGuard< std::sync::Arc< std::sync::mpsc::Receiver, >, - > = v330.unwrap(); - let v334 = v332.iter(); - let v336: Vec = - v334.collect::>(); - let v338: bool = true; - let _result = v336 + > = v456.unwrap(); + let v460 = v458.iter(); + let v462: Vec = + v460.collect::>(); + let v464: bool = true; + let _result = v462 .into_iter() .map(|x| { //; - let v340: std::string::String = x; - let v342: string = + let v466: std::string::String = x; + let v468: string = fable_library_rust::String_::fromString( - v340, + v466, ); - let v344: bool = true; - v342 + let v470: bool = true; + v468 }) .collect::>(); - let v346: Vec = _result; - let v350: LrcPtr> = ofArray_1( - fable_library_rust::NativeArray_::array_from(v346), + let v472: Vec = _result; + let v476: LrcPtr> = ofArray_1( + fable_library_rust::NativeArray_::array_from(v472), ); - let v354: string = - join(Spiral_builder::method33(), toArray_1(v350)); - let v356: bool = true; - v354 + let v480: string = + join(Spiral_builder::method32(), toArray_1(v476)); + let v482: bool = true; + v480 }); - let v358: Option = _result; - let v365: Spiral_builder::US3 = match &v317 { - Spiral_builder::US2::US2_0(v317_0_0) => { + let v484: Option = _result; + let v491: Spiral_builder::US3 = match &v444 { + Spiral_builder::US2::US2_0(v444_0_0) => { Spiral_builder::US3::US3_0( fable_library_rust::String_::fromString( - match &v317 { + match &v444 { Spiral_builder::US2::US2_0(x) => { x.clone() } @@ -7911,43 +7990,44 @@ mod module_7e2cd9e0 { } _ => Spiral_builder::US3::US3_1, }; - let v370: string = defaultValue( - match &v365 { - Spiral_builder::US3::US3_0(v365_0_0) => match &v365 + let v496: string = defaultValue( + match &v491 { + Spiral_builder::US3::US3_0(v491_0_0) => match &v491 { Spiral_builder::US3::US3_0(x) => x.clone(), _ => unreachable!(), }, _ => string(""), }, - v358, + v484, ); - Spiral_builder::method5( + Spiral_builder::method4( Spiral_builder::US0::US0_0, - Func0::new(move || Spiral_builder::closure31((), ())), + Func0::new(move || Spiral_builder::closure30((), ())), Func0::new({ - let v316 = v316.clone(); - let v370 = v370.clone(); + let v443 = v443.clone(); + let v496 = v496.clone(); move || { - Spiral_builder::closure32( - v316, - v370.clone(), + Spiral_builder::closure31( + v443, + v496.clone(), (), ) } }), ); - LrcPtr::new((v316, v370.clone())) + LrcPtr::new((v443, v496.clone())) } } }))(); _v48.set(Some(x_12)) } { - let v375: LrcPtr<(i32, string)> = getValue(_v48.get().clone()); - let v376: LrcPtr<(i32, string)> = - Spiral_builder::method54(v375.0.clone(), v375.1.clone()); - v376 + let v501: LrcPtr<(i32, string)> = getValue(_v48.get().clone()); + let v502: LrcPtr<(i32, string)> = + Spiral_builder::method52(v501.0.clone(), v501.1.clone()); + let v511: string = string("v502 }}}); {{ //"); + v502 } } }); @@ -7955,11 +8035,11 @@ mod module_7e2cd9e0 { { //; { - let v380: std::pin::Pin< + let v513: std::pin::Pin< Box>>, > = __result; - let v382: LrcPtr<(i32, string)> = futures_lite::future::block_on(v380); - _v7.set(Some((v382.0.clone(), v382.1.clone()))); + let v515: LrcPtr<(i32, string)> = futures_lite::future::block_on(v513); + _v7.set(Some((v515.0.clone(), v515.1.clone()))); { let patternInput_5: (i32, string) = getValue(_v7.get().clone()); (patternInput_5.0.clone(), patternInput_5.1.clone()) @@ -7969,10 +8049,10 @@ mod module_7e2cd9e0 { } } } - pub fn closure40(unitVar: (), unitVar_1: ()) -> string { + pub fn closure39(unitVar: (), unitVar_1: ()) -> string { string("spiral_builder.run / repl error") } - pub fn closure41(v0_1: u8, v1_1: u8, v2: string, v3: i32, unitVar: ()) -> string { + pub fn closure40(v0_1: u8, v1_1: u8, v2: string, v3: i32, unitVar: ()) -> string { sprintf!( "exit_code: {} / retry: {}/{} / repl_result: {} / {}", v3, @@ -7982,14 +8062,14 @@ mod module_7e2cd9e0 { Spiral_builder::closure6((), ()) ) } - pub fn method39(v0_1: Option, v1_1: u8, v2: string, v3: u8) -> (i32, string) { + pub fn method38(v0_1: Option, v1_1: u8, v2: string, v3: u8) -> (i32, string) { let v0_1: MutCell> = MutCell::new(v0_1.clone()); let v1_1: MutCell = MutCell::new(v1_1); let v2: MutCell = MutCell::new(v2.clone()); let v3: MutCell = MutCell::new(v3); - '_method39: loop { - break '_method39 ({ - let patternInput: (i32, string) = Spiral_builder::method40( + '_method38: loop { + break '_method38 ({ + let patternInput: (i32, string) = Spiral_builder::method39( None::, sprintf!( "dotnet repl --exit-after-run --run \"{}\" --output-path \"{}.ipynb\"", @@ -8011,16 +8091,16 @@ mod module_7e2cd9e0 { } { (v14, v15.clone()) } else { - Spiral_builder::method5( + Spiral_builder::method4( Spiral_builder::US0::US0_1, - Func0::new(move || Spiral_builder::closure40((), ())), + Func0::new(move || Spiral_builder::closure39((), ())), Func0::new({ let v14 = v14.clone(); let v15 = v15.clone(); let v1_1 = v1_1.clone(); let v3 = v3.clone(); move || { - Spiral_builder::closure41( + Spiral_builder::closure40( v1_1.get().clone(), v3.get().clone(), v15.clone(), @@ -8039,16 +8119,16 @@ mod module_7e2cd9e0 { v1_1.set(v1_1_temp); v2.set(v2_temp); v3.set(v3_temp); - continue '_method39; + continue '_method38; } } }); } } - pub fn closure42(unitVar: (), unitVar_1: ()) -> string { + pub fn closure41(unitVar: (), unitVar_1: ()) -> string { string("spiral_builder.run / dib / jupyter nbconvert") } - pub fn closure43(v0_1: string, v1_1: i32, unitVar: ()) -> string { + pub fn closure42(v0_1: string, v1_1: i32, unitVar: ()) -> string { sprintf!( "exit_code: {} / jupyter_result.Length: {} / {}", v1_1, @@ -8056,10 +8136,10 @@ mod module_7e2cd9e0 { Spiral_builder::closure6((), ()) ) } - pub fn closure44(unitVar: (), unitVar_1: ()) -> string { + pub fn closure43(unitVar: (), unitVar_1: ()) -> string { string("spiral_builder.run / dib / html cell ids") } - pub fn closure45(v0_1: string, v1_1: i32, unitVar: ()) -> string { + pub fn closure44(v0_1: string, v1_1: i32, unitVar: ()) -> string { sprintf!( "exit_code: {} / pwsh_replace_html_result.Length: {} / {}", v1_1, @@ -8067,13 +8147,13 @@ mod module_7e2cd9e0 { Spiral_builder::closure6((), ()) ) } - pub fn method57(v0_1: string) -> string { + pub fn method55(v0_1: string) -> string { v0_1 } - pub fn closure46(unitVar: (), unitVar_1: ()) -> string { + pub fn closure45(unitVar: (), unitVar_1: ()) -> string { string("spiral_builder.run / dib") } - pub fn closure47(v0_1: string, v1_1: i32, unitVar: ()) -> string { + pub fn closure46(v0_1: string, v1_1: i32, unitVar: ()) -> string { sprintf!( "exit_code: {} / result.Length: {} / {}", v1_1, @@ -8081,17 +8161,17 @@ mod module_7e2cd9e0 { Spiral_builder::closure6((), ()) ) } - pub fn closure48(unitVar: (), unitVar_1: ()) -> string { + pub fn closure47(unitVar: (), unitVar_1: ()) -> string { string("spiral_builder.run") } - pub fn closure49(v0_1: std::string::String, unitVar: ()) -> string { + pub fn closure48(v0_1: std::string::String, unitVar: ()) -> string { sprintf!( "subcommand: {} / {}", v0_1, Spiral_builder::closure6((), ()) ) } - pub fn closure50( + pub fn closure49( unitVar: (), _arg: (string, string), ) -> LrcPtr<(std::string::String, std::string::String)> { @@ -8100,7 +8180,7 @@ mod module_7e2cd9e0 { let v7: &str = &*_arg.1.clone(); LrcPtr::new((v5, String::from(v7))) } - pub fn closure51(unitVar: (), v0_1: serde_json::Error) -> string { + pub fn closure50(unitVar: (), v0_1: serde_json::Error) -> string { let _v1: MutCell> = MutCell::new(None::); { @@ -8112,13 +8192,13 @@ mod module_7e2cd9e0 { fable_library_rust::String_::fromString(v11) } } - pub fn method58() -> Func1 { - Func1::new(move |v: serde_json::Error| Spiral_builder::closure51((), v)) + pub fn method56() -> Func1 { + Func1::new(move |v: serde_json::Error| Spiral_builder::closure50((), v)) } - pub fn method59(v0_1: Result) -> Result { + pub fn method57(v0_1: Result) -> Result { v0_1 } - pub fn method8( + pub fn method7( v0_1: clap::ArgMatches, ) -> std::pin::Pin>>> { let __result = Box::pin(async move { @@ -8165,7 +8245,7 @@ mod module_7e2cd9e0 { if fable_library_rust::String_::fromString(v12.clone()) == string("fsharp") { - let v18: string = Spiral_builder::method9(); + let v18: string = Spiral_builder::method8(); let v20: &str = &*v18; let v22: Option = clap::ArgMatches::get_one(&v13.clone(), v20).cloned(); @@ -8197,7 +8277,7 @@ mod module_7e2cd9e0 { _ => panic!("{}", string("Option does not have a value."),), }; let v34: string = fable_library_rust::String_::fromString(v32); - let v35: string = Spiral_builder::method10(); + let v35: string = Spiral_builder::method9(); let v37: &str = &*v35; let v39: Option = clap::ArgMatches::get_one(&v13.clone(), v37).cloned(); @@ -8234,7 +8314,7 @@ mod module_7e2cd9e0 { }; let v51: string = fable_library_rust::String_::fromString(v49); - let v52: string = Spiral_builder::method11(); + let v52: string = Spiral_builder::method10(); let v54: &str = &*v52; let v56: Option = clap::ArgMatches::get_one(&v13.clone(), v54).cloned(); @@ -8277,12 +8357,12 @@ mod module_7e2cd9e0 { _ => Spiral_builder::US3::US3_1, }; let v98: string = - Spiral_builder::method19(match &v69 { + Spiral_builder::method18(match &v69 { Spiral_builder::US3::US3_0(v69_0_0) => { let v71: clap::Command = Spiral_builder::method0(); let v73: Array = - Spiral_builder::method12(sprintf!( + Spiral_builder::method11(sprintf!( "_ {}", match &v69 { Spiral_builder::US3::US3_0( @@ -8312,7 +8392,7 @@ mod module_7e2cd9e0 { Output = Result, >, >, - > = Spiral_builder::method8( + > = Spiral_builder::method7( clap::Command::get_matches_from( v71, v87, ), @@ -8331,7 +8411,7 @@ mod module_7e2cd9e0 { >, serde_json::Error, > = serde_json::from_str(&v100); - let v103 = Spiral_builder::method20(); + let v103 = Spiral_builder::method19(); let v105: Result< std::collections::HashMap< std::string::String, @@ -8345,13 +8425,13 @@ mod module_7e2cd9e0 { > = v105.unwrap(); let v110: &str = &*string("deps"); let v113: std::string::String = - Spiral_builder::method21(String::from(v110)); + Spiral_builder::method20(String::from(v110)); let v115: Option = std::collections::HashMap::get(&v107, &v113) .map(|x| x) .cloned(); let v117: std::string::String = v115.unwrap(); - let v120: string = Spiral_builder::method19( + let v120: string = Spiral_builder::method18( fable_library_rust::String_::fromString(v117), ); let v122: &str = &*v120; @@ -8359,7 +8439,7 @@ mod module_7e2cd9e0 { Vec, serde_json::Error, > = serde_json::from_str(&v122); - let v125 = Spiral_builder::method20(); + let v125 = Spiral_builder::method19(); let v127: Result< Vec, std::string::String, @@ -8367,7 +8447,7 @@ mod module_7e2cd9e0 { let v129: Vec = v127.unwrap(); let _v130: MutCell> = MutCell::new(None::); - let v131: string = Spiral_builder::method22(v34); + let v131: string = Spiral_builder::method21(v34); let v133: &str = &*v131.clone(); let v135: std::string::String = String::from(v133); let v137: std::path::PathBuf = @@ -8405,14 +8485,14 @@ mod module_7e2cd9e0 { let _v169: MutCell> = MutCell::new(None::); let v170: string = - Spiral_builder::method26( - Spiral_builder::method23( + Spiral_builder::method25( + Spiral_builder::method22( v167.clone(), v131.clone(), ), ); let v171: string = - Spiral_builder::method27(); + Spiral_builder::method26(); let _v172: MutCell< Option< Result< @@ -8429,7 +8509,7 @@ mod module_7e2cd9e0 { >, ); let v173: string = - Spiral_builder::method28(); + Spiral_builder::method27(); { let x_14: Result< regex::Regex, @@ -8496,7 +8576,7 @@ mod module_7e2cd9e0 { ), }, ); - while Spiral_builder::method30( + while Spiral_builder::method29( v204, v205.clone(), ) { @@ -8557,7 +8637,7 @@ mod module_7e2cd9e0 { LrcPtr = LrcPtr::new(Spiral_builder::Mut4{l0: MutCell::new(0_i32),}); - while Spiral_builder::method13(v224, + while Spiral_builder::method12(v224, v226.clone()) { let v228: @@ -8615,7 +8695,7 @@ mod module_7e2cd9e0 { LrcPtr = LrcPtr::new(Spiral_builder::Mut4{l0: MutCell::new(0_i32),}); - while Spiral_builder::method13(v238, + while Spiral_builder::method12(v238, v240.clone()) { let v242: @@ -8718,7 +8798,7 @@ mod module_7e2cd9e0 { std::path::MAIN_SEPARATOR; _v262.set(Some(x_16)) } - join(Spiral_builder::method31(ofChar(getValue(_v262.get().clone()))), + join(Spiral_builder::method30(ofChar(getValue(_v262.get().clone()))), toArray_1(v261)) } } @@ -8754,7 +8834,7 @@ mod module_7e2cd9e0 { let v304: string = getValue(_v130.get().clone()); let _v305: MutCell> = MutCell::new(None::); - let v306: string = Spiral_builder::method22(v51); + let v306: string = Spiral_builder::method21(v51); let v308: &str = &*v306.clone(); let v310: std::string::String = String::from(v308); let v312: std::path::PathBuf = @@ -8796,14 +8876,14 @@ mod module_7e2cd9e0 { let _v344: MutCell> = MutCell::new(None::); let v345: string = - Spiral_builder::method26( - Spiral_builder::method23( + Spiral_builder::method25( + Spiral_builder::method22( v342.clone(), v306.clone(), ), ); let v346: string = - Spiral_builder::method27(); + Spiral_builder::method26(); let _v347: MutCell< Option< Result< @@ -8820,7 +8900,7 @@ mod module_7e2cd9e0 { >, ); let v348: string = - Spiral_builder::method28(); + Spiral_builder::method27(); { let x_21: Result< regex::Regex, @@ -8887,7 +8967,7 @@ mod module_7e2cd9e0 { }, ); while - Spiral_builder::method30( + Spiral_builder::method29( v379, v380.clone(), ) @@ -8961,7 +9041,7 @@ mod module_7e2cd9e0 { LrcPtr = LrcPtr::new(Spiral_builder::Mut4{l0: MutCell::new(0_i32),}); - while Spiral_builder::method13(v399, + while Spiral_builder::method12(v399, v401.clone()) { let v403: @@ -9019,7 +9099,7 @@ mod module_7e2cd9e0 { LrcPtr = LrcPtr::new(Spiral_builder::Mut4{l0: MutCell::new(0_i32),}); - while Spiral_builder::method13(v413, + while Spiral_builder::method12(v413, v415.clone()) { let v417: @@ -9130,7 +9210,7 @@ mod module_7e2cd9e0 { _v437 .set(Some(x_23)) } - join(Spiral_builder::method31(ofChar(getValue(_v437.get().clone()))), + join(Spiral_builder::method30(ofChar(getValue(_v437.get().clone()))), toArray_1(v436)) } } @@ -9242,7 +9322,7 @@ mod module_7e2cd9e0 { new_array(&[(string("cargo_toml_content"), sprintf!("[package]\nname = \"spiral_builder_{}\"\nversion = \"0.0.1\"\nedition = \"2021\"\n\n[dependencies]\nfable_library_rust = {{ workspace = true }}\ninline_colorization = {{ workspace = true }}\n{}\n\n[[bin]]\nname = \"spiral_builder_{}\"\npath = \"spiral_eval.rs\" ", v507.clone(), - join(Spiral_builder::method33(), + join(Spiral_builder::method32(), toArray_1(v524)), v507)), (string("workspace_cargo_toml_content"), @@ -9257,7 +9337,7 @@ mod module_7e2cd9e0 { if fable_library_rust::String_::fromString(v12.clone()) == string("rust") { - let v538: string = Spiral_builder::method34(); + let v538: string = Spiral_builder::method33(); let v540: &str = &*v538; let v542: Option> = clap::ArgMatches::get_many(&v13.clone(), v540) @@ -9305,7 +9385,7 @@ mod module_7e2cd9e0 { if fable_library_rust::String_::fromString(v12.clone()) == string("dib") { - let v567: string = Spiral_builder::method9(); + let v567: string = Spiral_builder::method8(); let v569: &str = &*v567; let v573: Option = map_1( Func1::new(move |v_1: std::string::String| { @@ -9314,16 +9394,16 @@ mod module_7e2cd9e0 { clap::ArgMatches::get_one(&v13.clone(), v569).cloned(), ); let v575: string = v573.unwrap(); - let v576: string = Spiral_builder::method37(); + let v576: string = Spiral_builder::method36(); let v578: &str = &*v576; let v581: u8 = defaultValue( 1_u8, clap::ArgMatches::get_one(&v13.clone(), v578).cloned(), ); - let v582: string = Spiral_builder::method38(); + let v582: string = Spiral_builder::method37(); let v584: &str = &*v582; let patternInput_6: (i32, string) = - Spiral_builder::method39( + Spiral_builder::method38( clap::ArgMatches::get_one(&v13, v584).cloned(), v581, v575.clone(), @@ -9336,7 +9416,7 @@ mod module_7e2cd9e0 { } else { let patternInput_7: (i32, string) = - Spiral_builder::method40(None::, + Spiral_builder::method39(None::, sprintf!("jupyter nbconvert \"{}.ipynb\" --to html --HTMLExporter.theme=dark", v575.clone()), new_empty::<(string, @@ -9351,16 +9431,16 @@ mod module_7e2cd9e0 { None::); let v599: string = patternInput_7.1.clone(); let v598: i32 = patternInput_7.0.clone(); - Spiral_builder::method5( + Spiral_builder::method4( Spiral_builder::US0::US0_1, Func0::new(move || { - Spiral_builder::closure42((), ()) + Spiral_builder::closure41((), ()) }), Func0::new({ let v598 = v598.clone(); let v599 = v599.clone(); move || { - Spiral_builder::closure43( + Spiral_builder::closure42( v599.clone(), v598, (), @@ -9380,7 +9460,7 @@ mod module_7e2cd9e0 { } else { let patternInput_8: (i32, string) = - Spiral_builder::method40(None::, + Spiral_builder::method39(None::, sprintf!("pwsh -c \"$counter = 1; $path = \'{}.html\'; (Get-Content $path -Raw) -replace \'(id=\\\"cell-id=)[a-fA-F0-9]{{8}}\', {{ $_.Groups[1].Value + $counter++ }} | Set-Content $path\"", replace(v575.clone(), string("\'"), @@ -9397,16 +9477,16 @@ mod module_7e2cd9e0 { None::); let v616: string = patternInput_8.1.clone(); let v615: i32 = patternInput_8.0.clone(); - Spiral_builder::method5( + Spiral_builder::method4( Spiral_builder::US0::US0_1, Func0::new(move || { - Spiral_builder::closure44((), ()) + Spiral_builder::closure43((), ()) }), Func0::new({ let v615 = v615.clone(); let v616 = v616.clone(); move || { - Spiral_builder::closure45( + Spiral_builder::closure44( v616.clone(), v615, (), @@ -9525,14 +9605,14 @@ mod module_7e2cd9e0 { }; let v688: string = patternInput_9.1.clone(); let v687: i32 = patternInput_9.0.clone(); - Spiral_builder::method5( + Spiral_builder::method4( Spiral_builder::US0::US0_1, - Func0::new(move || Spiral_builder::closure46((), ())), + Func0::new(move || Spiral_builder::closure45((), ())), Func0::new({ let v687 = v687.clone(); let v688 = v688.clone(); move || { - Spiral_builder::closure47( + Spiral_builder::closure46( v688.clone(), v687, (), @@ -9547,12 +9627,12 @@ mod module_7e2cd9e0 { } new_array(&[(string("stdio"), v688.clone())]) } else { - Spiral_builder::method5( + Spiral_builder::method4( Spiral_builder::US0::US0_1, - Func0::new(move || Spiral_builder::closure48((), ())), + Func0::new(move || Spiral_builder::closure47((), ())), Func0::new({ let v12 = v12.clone(); - move || Spiral_builder::closure49(v12.clone(), ()) + move || Spiral_builder::closure48(v12.clone(), ()) }), ); new_empty::<(string, string)>() @@ -9567,7 +9647,7 @@ mod module_7e2cd9e0 { .into_iter() .map(|x| { Func1::new(move |arg10_0040_9: (string, string)| { - Spiral_builder::closure50((), arg10_0040_9) + Spiral_builder::closure49((), arg10_0040_9) })(x.clone()) }) .collect::>(); @@ -9583,7 +9663,7 @@ mod module_7e2cd9e0 { ); let v714: Result = serde_json::to_string(&v712); - let v715 = Spiral_builder::method58(); + let v715 = Spiral_builder::method56(); let v717: Result = v714.map_err(|x| v715(x)); let v719: bool = true; let _result = v717.map(|x| { @@ -9593,7 +9673,8 @@ mod module_7e2cd9e0 { let v725: bool = true; v723 }); - let v728: Result = Spiral_builder::method59(_result); + let v728: Result = Spiral_builder::method57(_result); + let v737: string = string("v728 }}}); {{ //"); v728 } } @@ -9619,7 +9700,7 @@ mod module_7e2cd9e0 { .clone(); let v8: clap::Command = Spiral_builder::method0(); let v10: clap::ArgMatches = clap::Command::get_matches(v8); - let v11: string = Spiral_builder::method4(); + let v11: string = Spiral_builder::method3(); let v13: &str = &*v11; let v15: Option = clap::ArgMatches::get_one(&v10.clone(), v13).cloned(); @@ -9685,7 +9766,7 @@ mod module_7e2cd9e0 { } _ => (), } - Spiral_builder::method5( + Spiral_builder::method4( Spiral_builder::US0::US0_1, Func0::new(move || Spiral_builder::closure4((), ())), Func0::new({ @@ -9696,7 +9777,7 @@ mod module_7e2cd9e0 { { let v50: std::pin::Pin< Box>>, - > = Spiral_builder::method8(v10); + > = Spiral_builder::method7(v10); let v52: Result = futures_lite::future::block_on(v50); let v54: string = v52.unwrap(); if if let Spiral_builder::US0::US0_2 = &v5.l0.get().clone() { diff --git a/apps/spiral/temp/test/build.dib.html b/apps/spiral/temp/test/build.dib.html index 17f4e33a..42fc38f1 100644 --- a/apps/spiral/temp/test/build.dib.html +++ b/apps/spiral/temp/test/build.dib.html @@ -7651,7 +7651,7 @@

run notebook with ret @@ -8251,28 +8249,16 @@

compile project wit @@ -8892,6 +8892,34 @@

vec_map'

+ + + + - - - - - - - - - - - - - - - - - - - - - - - - @@ -7746,6 +7746,32 @@

unwrap'

+ + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -8310,7 +8338,7 @@

rc_try_unwrap diff --git a/lib/spiral/resultm.dib.ipynb b/lib/spiral/resultm.dib.ipynb index 031c7f75..4b54695b 100644 --- a/lib/spiral/resultm.dib.ipynb +++ b/lib/spiral/resultm.dib.ipynb @@ -191,6 +191,30 @@ " !\\\\(x, $'\"$0?\"')" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## to_try" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "dotnet_interactive": { + "language": "spiral" + }, + "polyglot_notebook": { + "kernelName": "spiral" + } + }, + "outputs": [], + "source": [ + "inl to_try forall t u. (x : result' t u) : rust.try t =\n", + " !\\\\(x, $'\"$0\"')" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -292,7 +316,9 @@ "source": [ "inl unbox' forall t u. (x : result' t u) : result t u =\n", " inl ok x : result t u = Ok x\n", + " inl ok = join ok\n", " inl error x : result t u = Error x\n", + " inl error = join error\n", " real\n", " typecase t with\n", " | () =>\n", @@ -703,7 +729,7 @@ "outputs": [], "source": [ "inl rc_try_unwrap forall t. (x : rust.rc t) : result' t (rust.rc t) =\n", - " !\\($'\"std::rc::Rc::try_unwrap(!x)\"')" + " !\\\\(x, $'\"std::rc::Rc::try_unwrap($0)\"')" ] }, { @@ -721,7 +747,7 @@ { "data": { "text/plain": [ - "assert_eq / actual: US0_0 / expected: US0_0\n" + "assert_eq / actual: US0_0(true) / expected: US0_0(true)\n" ] }, "metadata": {}, @@ -733,10 +759,10 @@ "///! rust\n", "\n", "types ()\n", - "rust.new_rc ()\n", + "rust.new_rc true\n", "|> rc_try_unwrap\n", "|> unbox\n", - "|> _assert_eq (Ok ())" + "|> _assert_eq (Ok true)" ] } ], diff --git a/lib/spiral/resultm.spi b/lib/spiral/resultm.spi index 4ce33f6a..58b4445f 100644 --- a/lib/spiral/resultm.spi +++ b/lib/spiral/resultm.spi @@ -31,6 +31,10 @@ inl flatten forall t u. (x : result (result t u) u) : result t u = inl try' forall t u. (x : result' t u) : t = !\\(x, $'"$0?"') +/// ## to_try +inl to_try forall t u. (x : result' t u) : rust.try t = + !\\(x, $'"$0"') + /// ## unwrap' inl unwrap' forall t u. (x : result' t u) : t = !\\(x, $'"$0.unwrap()"') @@ -53,7 +57,9 @@ inl unbox forall t u. (x : result' t u) : result t u = /// ## unbox' inl unbox' forall t u. (x : result' t u) : result t u = inl ok x : result t u = Ok x + inl ok = join ok inl error x : result t u = Error x + inl error = join error real typecase t with | () => @@ -144,4 +150,4 @@ inl transpose forall t u. (x : optionm'.option' (result' t u)) : result' (option /// ## rc_try_unwrap inl rc_try_unwrap forall t. (x : rust.rc t) : result' t (rust.rc t) = - !\($'"std::rc::Rc::try_unwrap(!x)"') + !\\(x, $'"std::rc::Rc::try_unwrap($0)"') diff --git a/lib/spiral/runtime.dib b/lib/spiral/runtime.dib index 258b06b9..2afcc4fc 100644 --- a/lib/spiral/runtime.dib +++ b/lib/spiral/runtime.dib @@ -40,9 +40,6 @@ inl types () = global "#if FABLE_COMPILER\n[]\n#endif\ntype std_process_ExitStatus = class end" global "#if FABLE_COMPILER\n[]\n#endif\ntype std_process_Output = class end" global "#if FABLE_COMPILER\n[]\n#endif\ntype std_process_Stdio = class end" - global "#if FABLE_COMPILER\n[\")>]\n#endif\ntype std_sync_mpsc_Receiver<'T> = class end" - global "#if FABLE_COMPILER\n[\")>]\n#endif\ntype std_sync_mpsc_SendError<'T> = class end" - global "#if FABLE_COMPILER\n[\")>]\n#endif\ntype std_sync_mpsc_Sender<'T> = class end" #!spiral @@ -157,22 +154,6 @@ inl process_exit_status_code (status : process_exit_status) : optionm'.option' i #!markdown -## channel_receiver - -#!spiral - -nominal channel_receiver t = $'std_sync_mpsc_Receiver<`t>' - -#!markdown - -## channel_sender - -#!spiral - -nominal channel_sender t = $'std_sync_mpsc_Sender<`t>' - -#!markdown - ## os_platform #!spiral @@ -871,79 +852,60 @@ inl child_wait_with_output #!markdown -## send_error - -#!spiral - -nominal send_error t = $"std_sync_mpsc_SendError<`t>" - -#!markdown - -## channel_send - -#!spiral - -inl channel_send forall t. (line : t) (sender : rust.ref' (channel_sender t)) : resultm.result' () (send_error sm'.std_string) = - !\\((sender, line), $'"$0.send($1)"') - -#!markdown - ## stdio_line #!spiral inl stdio_line - (stdout : bool) + (stdio : result () ()) (trace' : bool) - (channel_sender : threading.arc (threading.mutex (channel_sender sm'.std_string))) + (channel_sender : threading.arc (threading.mutex (threading.channel_sender sm'.std_string))) (line : resultm.result' sm'.std_string stream.io_error) + : resultm.result' () sm'.std_string = - run_target function - | Rust (Native) => fun () => - inl highlight text = - $'$"\\u001b[4;7m{!text}\\u001b[0m"' + inl highlight text = + $'$"\\u001b[4;7m{!text}\\u001b[0m"' + inl line = + match + line + |> resultm.map_error' sm'.format' + |> resultm.unbox' + with + | Ok line => inl line = - match - line - |> resultm.map_error' sm'.format' - |> resultm.unbox - with - | Ok line => - inl line = - line - |> sm'.from_std_string - // |> sm'.as_bytes - // |> am'.slice_to_vec - |> sm'.encoding_encode' (sm'.encoding_utf8' ()) - |> rust.cow_as_ref - |> sm'.str_from_utf8 - // |> sm'.utf8_decode - |> resultm.unwrap' - |> sm'.ref_to_std_string - // String::from_utf8_lossy(line.as_bytes()).into() - inl line_log = line |> sm'.from_std_string - inl text = - if stdout - then $'$"> {!line_log}"' - else $'$"\! {!line_log}"' - if trace' - then trace Verbose (fun () => text) _locals - else text |> console.write_line - if stdout - then line - else line |> highlight |> sm'.to_std_string - | Error e => - trace Critical - fun () => $'$"runtime.stdio_line"' - fun () => $'$"e: {!e} / {!_locals ()}"' - e |> highlight |> sm'.to_std_string - channel_sender - |> threading.arc_mutex_lock - |> resultm.unwrap' - |> threading.mutex_guard_ref - |> channel_send line - |> resultm.unwrap' - | _ => fun () => null () + line + |> sm'.from_std_string + // |> sm'.as_bytes + // |> am'.slice_to_vec + |> sm'.encoding_encode' (sm'.encoding_utf8' ()) + |> rust.cow_as_ref + |> sm'.str_from_utf8 + // |> sm'.utf8_decode + |> resultm.unwrap' + |> sm'.ref_to_std_string + // String::from_utf8_lossy(line.as_bytes()).into() + inl line_log = line |> sm'.from_std_string + inl text = + match stdio with + | Ok () => $'$"> {!line_log}"' + | Error () => $'$"\! {!line_log}"' + if trace' + then trace Verbose (fun () => text) _locals + else text |> console.write_line + match stdio with + | Ok () => line + | Error () => line |> highlight |> sm'.to_std_string + | Error e => + trace Critical + fun () => $'$"runtime.stdio_line"' + fun () => $'$"e: {!e} / {!_locals ()}"' + e |> highlight |> sm'.to_std_string + channel_sender + |> threading.arc_mutex_lock + |> resultm.unwrap' + |> threading.mutex_guard_ref + |> threading.channel_send line + |> resultm.map_error' sm'.format' #!markdown @@ -1036,47 +998,45 @@ let execute_with_options (options : execution_options) : i32 * string = !\\(child, $'"$0.lock().unwrap().as_mut().unwrap().stderr.take().unwrap()"') inl stdin : process_child_stdin = !\\(child, $'"$0.lock().unwrap().as_mut().unwrap().stdin.take().unwrap()"') - inl stdout = stdout |> optionm'.some' |> threading.new_arc_mutex - inl stderr = stderr |> optionm'.some' |> threading.new_arc_mutex + inl stdout = stdout |> threading.new_arc_mutex + inl stderr = stderr |> threading.new_arc_mutex inl stdin = stdin |> optionm'.some' |> threading.new_arc_mutex - - inl channel_sender, channel_receiver : channel_sender sm'.std_string * threading.arc (channel_receiver sm'.std_string) = - !\($'"{ let (sender, receiver) = std::sync::mpsc::channel(); (sender, std::sync::Arc::new(receiver)) }"') - inl channel_receiver = join channel_receiver - (!\\(channel_receiver, $'"true; let !channel_receiver = !channel_receiver"') : bool) |> ignore - - inl channel_sender = channel_sender |> threading.new_arc_mutex - inl channel_sender' = channel_sender |> rust.clone - inl channel_sender'' = channel_sender |> rust.clone + inl channel_sender, channel_receiver = threading.new_channel () + inl channel_sender'' = channel_sender |> threading.new_arc_mutex + inl channel_sender' = channel_sender |> threading.new_arc_mutex inl channel_receiver' = channel_receiver |> threading.new_arc_mutex inl stdout_handle = fun () => - inl stdout' : process_child_stdout = - !\($'"!stdout.lock().unwrap().take().unwrap()"') - inl stdout_lines = - stdout' - |> stream.decode_reader_bytes_build - |> stream.new_buf_reader - |> threading.new_arc_mutex - inl stdio_line' = stdio_line true options.trace channel_sender' - (!\\((stdout_lines, stdio_line'), $'"true; for line in std::io::BufRead::lines(std::io::Read::by_ref(&mut *$0.lock().unwrap())).collect::>() { $1(line) }"') : bool) |> ignore - true - |> threading.spawn (2i32, 1i32) 1i32 + stdout + |> threading.arc_mutex_lock + |> resultm.unwrap' + |> threading.mutex_guard_ref_mut + |> stream.decode_reader_bytes_build + |> stream.new_buf_reader + |> stream.buf_read_lines + |> iter.try_for_each fun lines => + inl channel_sender'' = channel_sender'' |> rust.clone + lines + |> stdio_line (Ok ()) options.trace channel_sender'' + |> resultm.to_try + |> threading.spawn (1, 0) 1 inl stderr_handle = fun () => - inl stderr' : process_child_stderr = - !\($'"!stderr.lock().unwrap().take().unwrap()"') - inl stderr_lines = - stderr' - |> stream.decode_reader_bytes_build - |> stream.new_buf_reader - |> threading.new_arc_mutex - inl stdio_line' = stdio_line false options.trace channel_sender - (!\\((stderr_lines, stdio_line'), $'"true; for line in std::io::BufRead::lines(std::io::Read::by_ref(&mut *$0.lock().unwrap())).collect::>() { $1(line) }"') : bool) |> ignore - true - |> threading.spawn (2i32, 1i32) 1i32 + stderr + |> threading.arc_mutex_lock + |> resultm.unwrap' + |> threading.mutex_guard_ref_mut + |> stream.decode_reader_bytes_build + |> stream.new_buf_reader + |> stream.buf_read_lines + |> iter.try_for_each fun lines => + inl channel_sender' = channel_sender' |> rust.clone + lines + |> stdio_line (Error ()) options.trace channel_sender' + |> resultm.to_try + |> threading.spawn (1, 0) 1 match options.stdin |> optionm'.unbox with | Some stdin' => @@ -1107,9 +1067,9 @@ let execute_with_options (options : execution_options) : i32 * string = |> child_wait_with_output |> resultm.map_error' sm'.format' - [ stderr_handle; stdout_handle ] + [ stdout_handle; stderr_handle ] |> am'.new_vec - |> am'.vec_for_each' (threading.join' >> resultm.unwrap' >> ignore) + |> am'.vec_for_each' (threading.join' >> resultm.unwrap' >> resultm.unwrap') match output |> resultm.unbox with | Ok output => diff --git a/lib/spiral/runtime.dib.html b/lib/spiral/runtime.dib.html index ab3544e6..62f920da 100644 --- a/lib/spiral/runtime.dib.html +++ b/lib/spiral/runtime.dib.html @@ -7602,9 +7602,6 @@

types

global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"std::process::ExitStatus\")>]\n#endif\ntype std_process_ExitStatus = class end" global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"std::process::Output\")>]\n#endif\ntype std_process_Output = class end" global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"std::process::Stdio\")>]\n#endif\ntype std_process_Stdio = class end" - global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"std::sync::mpsc::Receiver<$0>\")>]\n#endif\ntype std_sync_mpsc_Receiver<'T> = class end" - global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"std::sync::mpsc::SendError<$0>\")>]\n#endif\ntype std_sync_mpsc_SendError<'T> = class end" - global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"std::sync::mpsc::Sender<$0>\")>]\n#endif\ntype std_sync_mpsc_Sender<'T> = class end" @@ -7695,6 +7692,9 @@

process_child_stderr
nominal process_child_stderr = $"std_process_ChildStderr"
+
+inl process_child_stderr (child : rust.ref' (rust.mut' process_child)) : rust.ref' (rust.mut' (optionm'.option' process_child_stderr)) =
+    !\\(child, $'"&mut $0.stderr"')
 
@@ -7720,6 +7720,9 @@

process_child_stdout
nominal process_child_stdout = $"std_process_ChildStdout"
+
+inl process_child_stdout (child : rust.ref' (rust.mut' process_child)) : rust.ref' (rust.mut' (optionm'.option' process_child_stdout)) =
+    !\\(child, $'"&mut $0.stdout"')
 
@@ -7745,6 +7748,9 @@

process_child_stdin
nominal process_child_stdin = $"std_process_ChildStdin"
+
+inl process_child_stdin (child : rust.ref' (rust.mut' process_child)) : rust.ref' (rust.mut' (optionm'.option' process_child_stdin)) =
+    !\\(child, $'"&mut $0.stdin"')
 
@@ -7909,61 +7915,11 @@

process_exit_status_code - - - - - - - - - - - - - - - - - - - - - @@ -7640,9 +7643,9 @@

spawn

+ + + + + + + @@ -31064,2538 +30787,2518 @@ 00:00:01 debug #4 run_with_timeout_async / timeout: 100 00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805 00:00:01 debug #5 run_with_timeout_async / timeout: 100 +00:00:01 debug #6 run_with_timeout_async / timeout: 100 00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result: 00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0 00:00:02 verbose #6 > Server bound to: http://localhost:13805 00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path Perf.dib --retries 3", + "../../workspace/target/release/spiral_builder.exe dib --path Perf.dib --retries 3", [||], None, None, true, None) 00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Perf.dib", "--retries", "3"]) 00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/perf/Perf.dib", "--output-path", "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/perf/Perf.dib" --output-path "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:00:46 verbose #10 > 00:00:45 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/897b61c33c39e5cfb2584c99efeb25607f4e7c0f8b2a28d7dbb19ca1b3ae2224/main.spi -00:01:12 verbose #11 > 00:01:11 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7284c97b2666e031bb4c38a4e09bf70c75f7b6688fae613234c84c9837071d00/main.spi -00:01:13 verbose #12 > 00:01:12 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3ca6c5a1d086b452e36399a5a386c6fbbddc0dde249983cd8b661822a0c6dcf8/main.spi -00:01:47 verbose #13 > -00:01:47 verbose #14 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #15 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #16 > │ ## Perf (Polyglot) │ -00:01:47 verbose #17 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #18 > -00:01:47 verbose #19 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #20 > #!import ../../lib/fsharp/Notebooks.dib -00:01:47 verbose #21 > #!import ../../lib/fsharp/Testing.dib -00:01:47 verbose #22 > -00:01:47 verbose #23 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #24 > #r -00:01:47 verbose #25 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A -00:01:47 verbose #26 > spNetCore.Html.Abstractions.dll" -00:01:47 verbose #27 > #r -00:01:47 verbose #28 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:47 verbose #29 > otNet.Interactive.dll" -00:01:47 verbose #30 > #r -00:01:47 verbose #31 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:47 verbose #32 > otNet.Interactive.FSharp.dll" -00:01:47 verbose #33 > #r -00:01:47 verbose #34 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:47 verbose #35 > otNet.Interactive.Formatting.dll" -00:01:47 verbose #36 > open System -00:01:47 verbose #37 > open System.IO -00:01:47 verbose #38 > open System.Text -00:01:47 verbose #39 > open Microsoft.DotNet.Interactive.Formatting -00:01:47 verbose #40 > -00:01:47 verbose #41 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #42 > #r -00:01:47 verbose #43 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:47 verbose #44 > otNet.Interactive.FSharp.dll" -00:01:47 verbose #45 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers -00:01:47 verbose #46 > #r -00:01:47 verbose #47 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:47 verbose #48 > otNet.Interactive.dll" -00:01:47 verbose #49 > open type Microsoft.DotNet.Interactive.Kernel -00:01:47 verbose #50 > -00:01:47 verbose #51 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #52 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) -00:01:47 verbose #53 > -00:01:47 verbose #54 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #55 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: -00:01:47 verbose #56 > TextWriter)->fprintfn writer "%120A" x) -00:01:47 verbose #57 > -00:01:47 verbose #58 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #59 > //// test -00:01:47 verbose #60 > -00:01:47 verbose #61 > Formatter.ListExpansionLimit <- 100 -00:01:47 verbose #62 > -00:01:47 verbose #63 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #64 > #if FABLE_COMPILER -00:01:47 verbose #65 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] -00:01:47 verbose #66 > #endif -00:01:47 verbose #67 > type std_env_VarError = class end -00:01:47 verbose #68 > #if FABLE_COMPILER -00:01:47 verbose #69 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:01:47 verbose #70 > #endif -00:01:47 verbose #71 > type Any = class end -00:01:47 verbose #72 > #if FABLE_COMPILER -00:01:47 verbose #73 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:01:47 verbose #74 > #endif -00:01:47 verbose #75 > type Func0<'T> = class end -00:01:47 verbose #76 > #if FABLE_COMPILER -00:01:47 verbose #77 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:01:47 verbose #78 > #endif -00:01:47 verbose #79 > type Func0<'T, 'U> = class end -00:01:47 verbose #80 > #if FABLE_COMPILER -00:01:47 verbose #81 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:01:47 verbose #82 > #endif -00:01:47 verbose #83 > type Box<'T> = class end -00:01:47 verbose #84 > #if FABLE_COMPILER -00:01:47 verbose #85 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:01:47 verbose #86 > #endif -00:01:47 verbose #87 > type Dyn<'T> = class end -00:01:47 verbose #88 > #if FABLE_COMPILER -00:01:47 verbose #89 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] -00:01:47 verbose #90 > #endif -00:01:47 verbose #91 > type Send<'T> = class end -00:01:47 verbose #92 > #if FABLE_COMPILER -00:01:47 verbose #93 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] -00:01:47 verbose #94 > #endif -00:01:47 verbose #95 > type Fn<'T> = class end -00:01:47 verbose #96 > #if FABLE_COMPILER -00:01:47 verbose #97 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] -00:01:47 verbose #98 > #endif -00:01:47 verbose #99 > type FnUnit = class end -00:01:47 verbose #100 > #if FABLE_COMPILER -00:01:47 verbose #101 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] -00:01:47 verbose #102 > #endif -00:01:47 verbose #103 > type FnOnce<'T> = class end -00:01:47 verbose #104 > #if FABLE_COMPILER -00:01:47 verbose #105 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] -00:01:47 verbose #106 > #endif -00:01:47 verbose #107 > type ActionFn<'T> = class end -00:01:47 verbose #108 > #if FABLE_COMPILER -00:01:47 verbose #109 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] -00:01:47 verbose #110 > #endif -00:01:47 verbose #111 > type ActionFn2<'T, 'U> = class end -00:01:47 verbose #112 > #if FABLE_COMPILER -00:01:47 verbose #113 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] -00:01:47 verbose #114 > #endif -00:01:47 verbose #115 > type Impl<'T> = class end -00:01:47 verbose #116 > #if FABLE_COMPILER -00:01:47 verbose #117 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] -00:01:47 verbose #118 > #endif -00:01:47 verbose #119 > type Mut<'T> = class end -00:01:47 verbose #120 > #if FABLE_COMPILER -00:01:47 verbose #121 > [[<Fable.Core.Erase; Fable.Co... -00:01:47 verbose #122 > -00:01:47 verbose #123 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #124 > #if FABLE_COMPILER -00:01:47 verbose #125 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:01:47 verbose #126 > #endif -00:01:47 verbose #127 > type Any = class end -00:01:47 verbose #128 > #if FABLE_COMPILER -00:01:47 verbose #129 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:01:47 verbose #130 > #endif -00:01:47 verbose #131 > type Func0<'T> = class end -00:01:47 verbose #132 > #if FABLE_COMPILER -00:01:47 verbose #133 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:01:47 verbose #134 > #endif -00:01:47 verbose #135 > type Func0<'T, 'U> = class end -00:01:47 verbose #136 > #if FABLE_COMPILER -00:01:47 verbose #137 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:01:47 verbose #138 > #endif -00:01:47 verbose #139 > type Box<'T> = class end -00:01:47 verbose #140 > #if FABLE_COMPILER -00:01:47 verbose #141 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:01:47 verbose #142 > #endif -00:01:47 verbose #143 > type Dyn<'T> = class end -00:01:47 verbose #144 > #if FABLE_COMPILER -00:01:47 verbose #145 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] -00:01:47 verbose #146 > #endif -00:01:47 verbose #147 > type Send<'T> = class end -00:01:47 verbose #148 > #if FABLE_COMPILER -00:01:47 verbose #149 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] -00:01:47 verbose #150 > #endif -00:01:47 verbose #151 > type Fn<'T> = class end -00:01:47 verbose #152 > #if FABLE_COMPILER -00:01:47 verbose #153 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] -00:01:47 verbose #154 > #endif -00:01:47 verbose #155 > type FnUnit = class end -00:01:47 verbose #156 > #if FABLE_COMPILER -00:01:47 verbose #157 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] -00:01:47 verbose #158 > #endif -00:01:47 verbose #159 > type FnOnce<'T> = class end -00:01:47 verbose #160 > #if FABLE_COMPILER -00:01:47 verbose #161 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] -00:01:47 verbose #162 > #endif -00:01:47 verbose #163 > type ActionFn<'T> = class end -00:01:47 verbose #164 > #if FABLE_COMPILER -00:01:47 verbose #165 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] -00:01:47 verbose #166 > #endif -00:01:47 verbose #167 > type ActionFn2<'T, 'U> = class end -00:01:47 verbose #168 > #if FABLE_COMPILER -00:01:47 verbose #169 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] -00:01:47 verbose #170 > #endif -00:01:47 verbose #171 > type Impl<'T> = class end -00:01:47 verbose #172 > #if FABLE_COMPILER -00:01:47 verbose #173 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] -00:01:47 verbose #174 > #endif -00:01:47 verbose #175 > type Mut<'T> = class end -00:01:47 verbose #176 > #if FABLE_COMPILER -00:01:47 verbose #177 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]] -00:01:47 verbose #178 > #endif -00:01:47 verbose #179 > type Ref<'T> = class end -00:01:47 verbose #180 > #if FABLE_COMPILER -00:01:47 verbose #181 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]... -00:01:47 verbose #182 > -00:01:47 verbose #183 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #184 > #if FABLE_COMPILER -00:01:47 verbose #185 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] -00:01:47 verbose #186 > #endif -00:01:47 verbose #187 > type std_future_Future<'T> = class end -00:01:47 verbose #188 > #if FABLE_COMPILER -00:01:47 verbose #189 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] -00:01:47 verbose #190 > #endif -00:01:47 verbose #191 > type futures_future_TryJoinAll<'T> = class end -00:01:47 verbose #192 > #if FABLE_COMPILER -00:01:47 verbose #193 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] -00:01:47 verbose #194 > #endif -00:01:47 verbose #195 > type rayon_vec_IntoIter<'T> = class end -00:01:47 verbose #196 > #if FABLE_COMPILER -00:01:47 verbose #197 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] -00:01:47 verbose #198 > #endif -00:01:47 verbose #199 > type rayon_iter_Map<'T> = class end -00:01:47 verbose #200 > #if FABLE_COMPILER -00:01:47 verbose #201 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] -00:01:47 verbose #202 > #endif -00:01:47 verbose #203 > type futures_lite_stream_StreamExt = class end -00:01:47 verbose #204 > let rec closure0 () (v0 : System.Threading.CancellationToken) : -00:01:47 verbose #205 > Async<System.Threading.CancellationToken> = -00:01:47 verbose #206 > let v1 : bool = true -00:01:47 verbose #207 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None -00:01:47 verbose #208 > -00:01:47 verbose #209 > #if FABLE_COMPILER || WASM || CONTRACT -00:01:47 verbose #210 > -00:01:47 verbose #211 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT -00:01:47 verbose #212 > let v2 : Async<System.Threading.CancellationToken> = null |> -00:01:47 verbose #213 > unbox<Async<System.Threading.CancellationToken>> -00:01:47 verbose #214 > v2 -00:01:47 verbose #215 > #endif -00:01:47 verbose #216 > #if FABLE_COMPILER_RUST && WASM -00:01:47 verbose #217 > let v3 : Async<System.Threading.CancellationToken> = null |> -00:01:47 verbose #218 > unbox<Async<System.Threading.CancellationToken>> -00:01:47 verbose #219 > v3 -00:01:47 verbose #220 > #endif -00:01:47 verbose #221 > #if FABLE_COMPILER_RUST && CONTRACT -00:01:47 verbose #222 > let v4 : Async<System.Threading.CancellationToken> = null |> -00:01:47 verbose #223 > unbox<Async<System.Threading.CancellationToken>> -00:01:47 verbose #224 > v4 -00:01:47 verbose #225 > #endif -00:01:47 verbose #226 > #if FABLE_COMPILER_TYPESCRIPT -00:01:47 verbose #227 > le... -00:01:47 verbose #228 > -00:01:47 verbose #229 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #230 > #if FABLE_COMPILER -00:01:47 verbose #231 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] -00:01:47 verbose #232 > #endif -00:01:47 verbose #233 > type std_thread_JoinHandle<'T> = class end -00:01:47 verbose #234 > #if FABLE_COMPILER -00:01:47 verbose #235 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] -00:01:47 verbose #236 > #endif -00:01:47 verbose #237 > type std_sync_Arc<'T> = class end -00:01:47 verbose #238 > #if FABLE_COMPILER -00:01:47 verbose #239 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] -00:01:47 verbose #240 > #endif -00:01:47 verbose #241 > type std_sync_Mutex<'T> = class end -00:01:47 verbose #242 > #if FABLE_COMPILER -00:01:47 verbose #243 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] -00:01:47 verbose #244 > #endif -00:01:47 verbose #245 > type std_sync_MutexGuard<'T> = class end -00:01:47 verbose #246 > #if FABLE_COMPILER -00:01:47 verbose #247 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] -00:01:47 verbose #248 > #endif -00:01:47 verbose #249 > type std_sync_PoisonError<'T> = class end -00:01:47 verbose #250 > type Disposable (f : unit -> unit) = interface System.IDisposable with member -00:01:47 verbose #251 > _.Dispose () = f () -00:01:47 verbose #252 > type [[<Struct>]] US0 = -00:01:47 verbose #253 > | US0_0 of f0_0 : System.Threading.CancellationToken -00:01:47 verbose #254 > | US0_1 -00:01:47 verbose #255 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = -00:01:47 verbose #256 > let v1 : bool = true -00:01:47 verbose #257 > let mutable _v1 : unit option = None -00:01:47 verbose #258 > -00:01:47 verbose #259 > #if FABLE_COMPILER || WASM || CONTRACT -00:01:47 verbose #260 > -00:01:47 verbose #261 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT -00:01:47 verbose #262 > null |> unbox<unit> -00:01:47 verbose #263 > () -00:01:47 verbose #264 > #endif -00:01:47 verbose #265 > #if FABLE_COMPILER_RUST && WASM -00:01:47 verbose #266 > null |> unbox<unit> -00:01:47 verbose #267 > () -00:01:47 verbose #268 > #endif -00:01:47 verbose #269 > #if FABLE_COMPILER_RUST && CONTRACT -00:01:47 verbose #270 > null |> unbox<unit> -00:01:47 verbose #271 > () -00:01:47 verbose #272 > #endif -00:01:47 verbose #273 > #if FABLE_COMPILER_TYPESCRIPT -00:01:47 verbose #274 > null |> unbox<unit> -00:01:47 verbose #275 > () -00:01:47 verbose #276 > #endif -00:01:47 verbose #277 > #if FABLE_COMPILER_PYTHON -00:01:47 verbose #278 > null |> unbox<unit> -00:01:47 verbose #279 > () -00:01:47 verbose #280 > #endif -00:01:47 verbose #281 > #else -00:01:47 verbose #282 > let v2 : (unit -> unit) = v0.Cancel -00:01:47 verbose #283 > v2 () -00:01:47 verbose #284 > () -00:01:47 verbose #285 > #endif -00:01:47 verbose #286 > |>... -00:01:47 verbose #287 > -00:01:47 verbose #288 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #289 > #if FABLE_COMPILER -00:01:47 verbose #290 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] -00:01:47 verbose #291 > #endif -00:01:47 verbose #292 > type reqwest_Error = class end -00:01:47 verbose #293 > #if FABLE_COMPILER -00:01:47 verbose #294 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] -00:01:47 verbose #295 > #endif -00:01:47 verbose #296 > type reqwest_RequestBuilder = class end -00:01:47 verbose #297 > #if FABLE_COMPILER -00:01:47 verbose #298 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] -00:01:47 verbose #299 > #endif -00:01:47 verbose #300 > type reqwest_Response = class end -00:01:47 verbose #301 > #if FABLE_COMPILER -00:01:47 verbose #302 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] -00:01:47 verbose #303 > #endif -00:01:47 verbose #304 > type std_env_VarError = class end -00:01:47 verbose #305 > #if FABLE_COMPILER -00:01:47 verbose #306 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:01:47 verbose #307 > #endif -00:01:47 verbose #308 > type Any = class end -00:01:47 verbose #309 > #if FABLE_COMPILER -00:01:47 verbose #310 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:01:47 verbose #311 > #endif -00:01:47 verbose #312 > type Func0<'T> = class end -00:01:47 verbose #313 > #if FABLE_COMPILER -00:01:47 verbose #314 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:01:47 verbose #315 > #endif -00:01:47 verbose #316 > type Func0<'T, 'U> = class end -00:01:47 verbose #317 > #if FABLE_COMPILER -00:01:47 verbose #318 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:01:47 verbose #319 > #endif -00:01:47 verbose #320 > type Box<'T> = class end -00:01:47 verbose #321 > #if FABLE_COMPILER -00:01:47 verbose #322 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:01:47 verbose #323 > #endif -00:01:47 verbose #324 > type Dyn<'T> = class end -00:01:47 verbose #325 > #if FABLE_COMPILER -00:01:47 verbose #326 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] -00:01:47 verbose #327 > #endif -00:01:47 verbose #328 > type Send<'T> = class end -00:01:47 verbose #329 > #if FABLE_COMPILER -00:01:47 verbose #330 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] -00:01:47 verbose #331 > #endif -00:01:47 verbose #332 > type Fn<'T> = class end -00:01:47 verbose #333 > #if FABLE_COMPILER -00:01:47 verbose #334 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] -00:01:47 verbose #335 > #endif -00:01:47 verbose #336 > type FnUnit = class end -00:01:47 verbose #337 > #if FABLE_COMPILER -00:01:47 verbose #338 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] -00:01:47 verbose #339 > #endif -00:01:47 verbose #340 > type FnOnce<'T> = class end -00:01:47 verbose #341 > #if FABLE_COMPILER -00:01:47 verbose #342 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] -00:01:47 verbose #343 > #endif -00:01:47 verbose #344 > type ActionF... -00:01:47 verbose #345 > -00:01:47 verbose #346 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #347 > #if FABLE_COMPILER -00:01:47 verbose #348 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] -00:01:47 verbose #349 > #endif -00:01:47 verbose #350 > type clap_Arg = class end -00:01:47 verbose #351 > #if FABLE_COMPILER -00:01:47 verbose #352 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] -00:01:47 verbose #353 > #endif -00:01:47 verbose #354 > type clap_ArgAction = class end -00:01:47 verbose #355 > #if FABLE_COMPILER -00:01:47 verbose #356 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] -00:01:47 verbose #357 > #endif -00:01:47 verbose #358 > type clap_Command = class end -00:01:47 verbose #359 > #if FABLE_COMPILER -00:01:47 verbose #360 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] -00:01:47 verbose #361 > #endif -00:01:47 verbose #362 > type clap_ArgMatches = class end -00:01:47 verbose #363 > #if FABLE_COMPILER -00:01:47 verbose #364 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] -00:01:47 verbose #365 > #endif -00:01:47 verbose #366 > type clap_builder_ValueRange = class end -00:01:47 verbose #367 > #if FABLE_COMPILER -00:01:47 verbose #368 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] -00:01:47 verbose #369 > #endif -00:01:47 verbose #370 > type clap_builder_ValueParser = class end -00:01:47 verbose #371 > #if FABLE_COMPILER -00:01:47 verbose #372 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] -00:01:47 verbose #373 > #endif -00:01:47 verbose #374 > type clap_builder_PossibleValue = class end -00:01:47 verbose #375 > #if FABLE_COMPILER -00:01:47 verbose #376 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] -00:01:47 verbose #377 > #endif -00:01:47 verbose #378 > type std_process_Child = class end -00:01:47 verbose #379 > #if FABLE_COMPILER -00:01:47 verbose #380 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] -00:01:47 verbose #381 > #endif -00:01:47 verbose #382 > type std_process_ChildStderr = class end -00:01:47 verbose #383 > #if FABLE_COMPILER -00:01:47 verbose #384 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] -00:01:47 verbose #385 > #endif -00:01:47 verbose #386 > type std_process_ChildStdout = class end -00:01:47 verbose #387 > #if FABLE_COMPILER -00:01:47 verbose #388 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] -00:01:47 verbose #389 > #endif -00:01:47 verbose #390 > type std_process_ChildStdin = class end -00:01:47 verbose #391 > #if FABLE_COMPILER -00:01:47 verbose #392 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] -00:01:47 verbose #393 > #endif -00:01:47 verbose #394 > type std_process_Command = class ... -00:01:47 verbose #395 > -00:01:47 verbose #396 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #397 > #if FABLE_COMPILER -00:01:47 verbose #398 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] -00:01:47 verbose #399 > #endif -00:01:47 verbose #400 > type std_fs_File = class end -00:01:47 verbose #401 > #if FABLE_COMPILER -00:01:47 verbose #402 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] -00:01:47 verbose #403 > #endif -00:01:47 verbose #404 > type std_fs_FileType = class end -00:01:47 verbose #405 > #if FABLE_COMPILER -00:01:47 verbose #406 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] -00:01:47 verbose #407 > #endif -00:01:47 verbose #408 > type std_path_Display = class end -00:01:47 verbose #409 > #if FABLE_COMPILER -00:01:47 verbose #410 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] -00:01:47 verbose #411 > #endif -00:01:47 verbose #412 > type std_path_Path = class end -00:01:47 verbose #413 > #if FABLE_COMPILER -00:01:47 verbose #414 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] -00:01:47 verbose #415 > #endif -00:01:47 verbose #416 > type std_path_PathBuf = class end -00:01:47 verbose #417 > #if FABLE_COMPILER -00:01:47 verbose #418 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] -00:01:47 verbose #419 > #endif -00:01:47 verbose #420 > type async_walkdir_DirEntry = class end -00:01:47 verbose #421 > #if FABLE_COMPILER -00:01:47 verbose #422 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] -00:01:47 verbose #423 > #endif -00:01:47 verbose #424 > type async_walkdir_Filtering = class end -00:01:47 verbose #425 > #if FABLE_COMPILER -00:01:47 verbose #426 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] -00:01:47 verbose #427 > #endif -00:01:47 verbose #428 > type async_walkdir_WalkDir = class end -00:01:47 verbose #429 > #if FABLE_COMPILER -00:01:47 verbose #430 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:01:47 verbose #431 > #endif -00:01:47 verbose #432 > type Any = class end -00:01:47 verbose #433 > #if FABLE_COMPILER -00:01:47 verbose #434 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:01:47 verbose #435 > #endif -00:01:47 verbose #436 > type Func0<'T> = class end -00:01:47 verbose #437 > #if FABLE_COMPILER -00:01:47 verbose #438 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:01:47 verbose #439 > #endif -00:01:47 verbose #440 > type Func0<'T, 'U> = class end -00:01:47 verbose #441 > #if FABLE_COMPILER -00:01:47 verbose #442 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:01:47 verbose #443 > #endif -00:01:47 verbose #444 > type Box<'T> = class end -00:01:47 verbose #445 > #if FABLE_COMPILER -00:01:47 verbose #446 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:01:47 verbose #447 > #endif -00:01:47 verbose #448 > type Dyn<'T> = class end -00:01:47 verbose #449 > #if FABLE_COMPILER -00:01:47 verbose #450 > [[... -00:01:47 verbose #451 > -00:01:47 verbose #452 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #453 > module SpiralTrace = -00:01:47 verbose #454 > let trace x = -00:01:47 verbose #455 > #if !INTERACTIVE -00:01:47 verbose #456 > Trace.trace x -00:01:47 verbose #457 > #else -00:01:47 verbose #458 > trace x -00:01:47 verbose #459 > #endif -00:01:47 verbose #460 > -00:01:47 verbose #461 > type TraceLevel = -00:01:47 verbose #462 > #if !INTERACTIVE -00:01:47 verbose #463 > Trace.US0 -00:01:47 verbose #464 > #else -00:01:47 verbose #465 > US0 -00:01:47 verbose #466 > #endif -00:01:47 verbose #467 > -00:01:47 verbose #468 > module SpiralCrypto = -00:01:47 verbose #469 > let hash_text x = -00:01:47 verbose #470 > #if !INTERACTIVE -00:01:47 verbose #471 > Crypto.hash_text x -00:01:47 verbose #472 > #else -00:01:47 verbose #473 > hash_text x -00:01:47 verbose #474 > #endif -00:01:47 verbose #475 > -00:01:47 verbose #476 > #if !FABLE_COMPILER && !WASM && !CONTRACT -00:01:47 verbose #477 > -00:01:47 verbose #478 > module SpiralAsync = -00:01:47 verbose #479 > let merge_cancellation_token_with_default_async x = -00:01:47 verbose #480 > #if !INTERACTIVE -00:01:47 verbose #481 > Async_.merge_cancellation_token_with_default_async x -00:01:47 verbose #482 > #else -00:01:47 verbose #483 > merge_cancellation_token_with_default_async x -00:01:47 verbose #484 > #endif -00:01:47 verbose #485 > -00:01:47 verbose #486 > module SpiralThreading = -00:01:47 verbose #487 > let new_disposable_token x = -00:01:47 verbose #488 > #if !INTERACTIVE -00:01:47 verbose #489 > Threading.new_disposable_token x -00:01:47 verbose #490 > #else -00:01:47 verbose #491 > new_disposable_token x -00:01:47 verbose #492 > #endif -00:01:47 verbose #493 > -00:01:47 verbose #494 > module SpiralNetworking = -00:01:47 verbose #495 > let test_port_open x = -00:01:47 verbose #496 > #if !INTERACTIVE -00:01:47 verbose #497 > Networking.test_port_open x -00:01:47 verbose #498 > #else -00:01:47 verbose #499 > test_port_open x -00:01:47 verbose #500 > #endif -00:01:47 verbose #501 > -00:01:47 verbose #502 > let test_port_open_timeout x = -00:01:47 verbose #503 > #if !INTERACTIVE -00:01:47 verbose #504 > Networking.test_port_open_timeout x -00:01:47 verbose #505 > #else -00:01:47 verbose #506 > test_port_open_timeout x -00:01:47 verbose #507 > #endif -00:01:47 verbose #508 > -00:01:47 verbose #509 > let wait_for_port_access x = -00:01:47 verbose #510 > #if !INTERACTIVE -00:01:47 verbose #511 > Networking.wait_for_port_access x -00:01:47 verbose #512 > #else -00:01:47 verbose #513 > wait_for_port_access x -00:01:47 verbose #514 > #endif -00:01:47 verbose #515 > -00:01:47 verbose #516 > let get_available_port x = -00:01:47 verbose #517 > #if !INTERACTIVE -00:01:47 verbose #518 > Networking.get_available_port x -00:01:47 verbose #519 > #else -00:01:47 verbose #520 > get_available_port x -00:01:47 verbose #521 > #endif -00:01:47 verbose #522 > -00:01:47 verbose #523 > module SpiralRuntime = -00:01:47 verbose #524 > let get_executable_suffix () = -00:01:47 verbose #525 > #if !INTERACTIVE -00:01:47 verbose #526 > Runtime.get_executable_suffix () -00:01:47 verbose #527 > #else -00:01:47 verbose #528 > get_executable_suffix () -00:01:47 verbose #529 > #endif -00:01:47 verbose #530 > -00:01:47 verbose #531 > let is_windows () = -00:01:47 verbose #532 > #if !INTERACTIVE -00:01:47 verbose #533 > ... -00:01:47 verbose #534 > -00:01:47 verbose #535 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #536 > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" -00:01:47 verbose #537 > -00:01:47 verbose #538 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #539 > //// test -00:01:47 verbose #540 > -00:01:47 verbose #541 > type AssertExceptionFormatter (ex) = -00:01:47 verbose #542 > member _.Text = -00:01:47 verbose #543 > ex.ToString() -00:01:47 verbose #544 > .Replace("32m", "<span style=\"color: green;\">") -00:01:47 verbose #545 > .Replace("36m", "</span>") -00:01:47 verbose #546 > .Replace("31m", "<span style=\"color: red;\">") -00:01:47 verbose #547 > .Replace("\n", "<br/>\n") -00:01:47 verbose #548 > -00:01:47 verbose #549 > -00:01:47 verbose #550 > Formatter.Register<AssertExceptionFormatter> ((fun (x : -00:01:47 verbose #551 > AssertExceptionFormatter) -> x.Text), "text/html") -00:01:47 verbose #552 > -00:01:47 verbose #553 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #554 > //// test -00:01:47 verbose #555 > -00:01:47 verbose #556 > let inline __expect fn log expected actual = -00:01:47 verbose #557 > if log then printfn $"{actual.ToDisplayString ()}" -00:01:47 verbose #558 > try -00:01:47 verbose #559 > "Testing.__expect" |> fn actual expected -00:01:47 verbose #560 > with :? Expecto.AssertException as ex -> -00:01:47 verbose #561 > AssertExceptionFormatter(ex).Display () |> ignore -00:01:47 verbose #562 > failwith (ex.GetType().FullName) -00:01:47 verbose #563 > -00:01:47 verbose #564 > let inline __contains log expected actual = __expect Expecto.Expect.contains log -00:01:47 verbose #565 > expected actual -00:01:47 verbose #566 > let inline _contains expected actual = __contains true expected actual -00:01:47 verbose #567 > -00:01:47 verbose #568 > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log -00:01:47 verbose #569 > expected actual -00:01:47 verbose #570 > let inline _assertEqual expected actual = __assertEqual true expected actual -00:01:47 verbose #571 > -00:01:47 verbose #572 > let inline __isGreaterThan log expected actual = __expect -00:01:47 verbose #573 > Expecto.Expect.isGreaterThan log expected actual -00:01:47 verbose #574 > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual -00:01:47 verbose #575 > -00:01:47 verbose #576 > let inline __isGreaterThanOrEqual log expected actual = __expect -00:01:47 verbose #577 > Expecto.Expect.isGreaterThanOrEqual log expected actual -00:01:47 verbose #578 > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true -00:01:47 verbose #579 > expected actual -00:01:47 verbose #580 > -00:01:47 verbose #581 > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan -00:01:47 verbose #582 > log expected actual -00:01:47 verbose #583 > let inline _isLessThan expected actual = __isLessThan true expected actual -00:01:47 verbose #584 > -00:01:47 verbose #585 > let inline __isLessThanOrEqual log expected actual = __expect -00:01:47 verbose #586 > Expecto.Expect.isLessThanOrEqual log expected actual -00:01:47 verbose #587 > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true -00:01:47 verbose #588 > expected actual -00:01:47 verbose #589 > -00:01:47 verbose #590 > let inline __sequenceEqual log expected actual = __expe... -00:01:47 verbose #591 > -00:01:47 verbose #592 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #593 > //// test -00:01:47 verbose #594 > -00:01:47 verbose #595 > let inline __isBetween log a b actual = -00:01:47 verbose #596 > let inline isBetween actual (a, b) _ = -00:01:47 verbose #597 > __isGreaterThanOrEqual log a actual -00:01:47 verbose #598 > __isLessThanOrEqual log b actual -00:01:47 verbose #599 > __expect isBetween log (a, b) actual -00:01:47 verbose #600 > let inline _isBetween a b actual = __isBetween true a b actual -00:01:47 verbose #601 > -00:01:47 verbose #602 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #603 > //// test -00:01:47 verbose #604 > -00:01:47 verbose #605 > open testing -00:01:47 verbose #606 > open benchmark -00:01:47 verbose #607 > -00:01:47 verbose #608 > ── spiral - import ───────────────────────────────────────────────────────────── -00:01:47 verbose #609 > #r -00:01:47 verbose #610 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:47 verbose #611 > otNet.Interactive.Spiral.dll" -00:01:47 verbose #612 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:01:47 verbose #613 > #r -00:01:47 verbose #614 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:47 verbose #615 > otNet.Interactive.dll" -00:01:47 verbose #616 > open type Microsoft.DotNet.Interactive.Kernel -00:01:47 verbose #617 > -00:01:47 verbose #618 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #619 > #if !INTERACTIVE -00:01:47 verbose #620 > open Lib -00:01:47 verbose #621 > #endif -00:01:47 verbose #622 > -00:01:47 verbose #623 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #624 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #625 > │ ## TestCaseResult │ -00:01:47 verbose #626 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #627 > -00:01:47 verbose #628 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #629 > type TestCaseResult = -00:01:47 verbose #630 > { -00:01:47 verbose #631 > Input: string -00:01:47 verbose #632 > Expected: string -00:01:47 verbose #633 > Result: string -00:01:47 verbose #634 > TimeList: int64 list -00:01:47 verbose #635 > } -00:01:47 verbose #636 > -00:01:47 verbose #637 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #638 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #639 > │ ## run │ -00:01:47 verbose #640 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #641 > -00:01:47 verbose #642 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #643 > let run count (solutions: (string * ('TInput -> 'TExpected)) list) (input, -00:01:47 verbose #644 > expected) = -00:01:47 verbose #645 > let inputStr = -00:01:47 verbose #646 > match box input with -00:01:47 verbose #647 > | :? System.Collections.ICollection as input -> -00:01:47 verbose #648 > System.Linq.Enumerable.Cast<obj> input -00:01:47 verbose #649 > |> Seq.map string -00:01:47 verbose #650 > |> SpiralSm.concat "," -00:01:47 verbose #651 > | _ -> input.ToString () -00:01:47 verbose #652 > -00:01:47 verbose #653 > printfn "" -00:01:47 verbose #654 > printfn $"Solution: {inputStr} " -00:01:47 verbose #655 > -00:01:47 verbose #656 > let performanceInvoke (fn: unit -> 'T) = -00:01:47 verbose #657 > GC.Collect () -00:01:47 verbose #658 > let stopwatch = System.Diagnostics.Stopwatch () -00:01:47 verbose #659 > stopwatch.Start () -00:01:47 verbose #660 > let time1 = stopwatch.ElapsedMilliseconds -00:01:47 verbose #661 > -00:01:47 verbose #662 > let result = -00:01:47 verbose #663 > [[| 0 .. count |]] -00:01:47 verbose #664 > |> Array.Parallel.map (fun _ -> -00:01:47 verbose #665 > fn () -00:01:47 verbose #666 > ) -00:01:47 verbose #667 > |> Array.last -00:01:47 verbose #668 > -00:01:47 verbose #669 > let time2 = stopwatch.ElapsedMilliseconds - time1 -00:01:47 verbose #670 > -00:01:47 verbose #671 > result, time2 -00:01:47 verbose #672 > -00:01:47 verbose #673 > let resultsWithTime = -00:01:47 verbose #674 > solutions -00:01:47 verbose #675 > |> List.mapi (fun i (testName, solution) -> -00:01:47 verbose #676 > let result, time = performanceInvoke (fun () -> solution input) -00:01:47 verbose #677 > printfn $"Test case %d{i + 1}. %s{testName}. Time: %A{time} " -00:01:47 verbose #678 > result, time -00:01:47 verbose #679 > ) -00:01:47 verbose #680 > -00:01:47 verbose #681 > -00:01:47 verbose #682 > match resultsWithTime |> List.map fst with -00:01:47 verbose #683 > | ([[]] | [[ _ ]]) -> () -00:01:47 verbose #684 > | (head :: tail) when tail |> List.forall ((=) head) -> () -00:01:47 verbose #685 > | results -> failwithf $"Challenge error: %A{results}" -00:01:47 verbose #686 > -00:01:47 verbose #687 > { -00:01:47 verbose #688 > Input = inputStr -00:01:47 verbose #689 > Expected = expected.ToString () -00:01:47 verbose #690 > Result = resultsWithTime |> Seq.map fst |> Seq.head |> _.ToString() -00:01:47 verbose #691 > TimeList = resultsWithTime |> List.map snd -00:01:47 verbose #692 > } -00:01:47 verbose #693 > -00:01:47 verbose #694 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #695 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #696 > │ ## runAll │ -00:01:47 verbose #697 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #698 > -00:01:47 verbose #699 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #700 > let runAll testName count (solutions: (string * ('TInput -> 'TExpected)) list) -00:01:47 verbose #701 > testCases = -00:01:47 verbose #702 > printfn "" -00:01:47 verbose #703 > printfn "" -00:01:47 verbose #704 > printfn $"Test: {testName}" -00:01:47 verbose #705 > testCases -00:01:47 verbose #706 > |> Seq.map (run count solutions) -00:01:47 verbose #707 > |> Seq.toList -00:01:47 verbose #708 > -00:01:47 verbose #709 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #710 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #711 > │ ## sortResultList │ -00:01:47 verbose #712 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #713 > -00:01:47 verbose #714 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #715 > let sortResultList resultList = -00:01:47 verbose #716 > let table = -00:01:47 verbose #717 > let rows = -00:01:47 verbose #718 > resultList -00:01:47 verbose #719 > |> List.map (fun result -> -00:01:47 verbose #720 > let best = -00:01:47 verbose #721 > result.TimeList -00:01:47 verbose #722 > |> List.mapi (fun i time -> -00:01:47 verbose #723 > i + 1, time -00:01:47 verbose #724 > ) -00:01:47 verbose #725 > |> List.sortBy snd -00:01:47 verbose #726 > |> List.head -00:01:47 verbose #727 > |> _.ToString() -00:01:47 verbose #728 > let row = -00:01:47 verbose #729 > [[ -00:01:47 verbose #730 > result.Input -00:01:47 verbose #731 > result.Expected -00:01:47 verbose #732 > result.Result -00:01:47 verbose #733 > best -00:01:47 verbose #734 > ]] -00:01:47 verbose #735 > let color = -00:01:47 verbose #736 > match result.Expected = result.Result with -00:01:47 verbose #737 > | true -> Some ConsoleColor.DarkGreen -00:01:47 verbose #738 > | false -> Some ConsoleColor.DarkRed -00:01:47 verbose #739 > row, color -00:01:47 verbose #740 > ) -00:01:47 verbose #741 > let header = -00:01:47 verbose #742 > [[ -00:01:47 verbose #743 > [[ -00:01:47 verbose #744 > "Input" -00:01:47 verbose #745 > "Expected" -00:01:47 verbose #746 > "Result" -00:01:47 verbose #747 > "Best" -00:01:47 verbose #748 > ]] -00:01:47 verbose #749 > [[ -00:01:47 verbose #750 > "---" -00:01:47 verbose #751 > "---" -00:01:47 verbose #752 > "---" -00:01:47 verbose #753 > "---" -00:01:47 verbose #754 > ]] -00:01:47 verbose #755 > ]] -00:01:47 verbose #756 > |> List.map (fun row -> row, None) -00:01:47 verbose #757 > header @ rows -00:01:47 verbose #758 > -00:01:47 verbose #759 > let formattedTable = -00:01:47 verbose #760 > let lengthMap = -00:01:47 verbose #761 > table -00:01:47 verbose #762 > |> List.map fst -00:01:47 verbose #763 > |> List.transpose -00:01:47 verbose #764 > |> List.map (fun column -> -00:01:47 verbose #765 > column -00:01:47 verbose #766 > |> List.map String.length -00:01:47 verbose #767 > |> List.sortDescending -00:01:47 verbose #768 > |> List.tryHead -00:01:47 verbose #769 > |> Option.defaultValue 0 -00:01:47 verbose #770 > ) -00:01:47 verbose #771 > |> List.indexed -00:01:47 verbose #772 > |> Map.ofList -00:01:47 verbose #773 > table -00:01:47 verbose #774 > |> List.map (fun (row, color) -> -00:01:47 verbose #775 > let newRow = -00:01:47 verbose #776 > row -00:01:47 verbose #777 > |> List.mapi (fun i cell -> -00:01:47 verbose #778 > cell.PadRight lengthMap.[[i]] -00:01:47 verbose #779 > ) -00:01:47 verbose #780 > newRow, color -00:01:47 verbose #781 > ) -00:01:47 verbose #782 > -00:01:47 verbose #783 > printfn "" -00:01:47 verbose #784 > formattedTable -00:01:47 verbose #785 > |> List.iter (fun (row, color) -> -00:01:47 verbose #786 > match color with -00:01:47 verbose #787 > | Some color -> Console.ForegroundColor <- color -00:01:47 verbose #788 > | None -> Console.ResetColor () -00:01:47 verbose #789 > -00:01:47 verbose #790 > printfn "%s" (String.Join ("\t| ", row)) -00:01:47 verbose #791 > -00:01:47 verbose #792 > Console.ResetColor () -00:01:47 verbose #793 > ) -00:01:47 verbose #794 > -00:01:47 verbose #795 > let averages = -00:01:47 verbose #796 > resultList -00:01:47 verbose #797 > |> List.map (fun result -> result.TimeList |> List.map float) -00:01:47 verbose #798 > |> List.transpose -00:01:47 verbose #799 > |> List.map List.average -00:01:47 verbose #800 > |> List.map int64 -00:01:47 verbose #801 > |> List.indexed -00:01:47 verbose #802 > -00:01:47 verbose #803 > printfn "" -00:01:47 verbose #804 > printfn "Average Ranking " -00:01:47 verbose #805 > averages -00:01:47 verbose #806 > |> List.sortBy snd -00:01:47 verbose #807 > |> List.iter (fun (i, avg) -> -00:01:47 verbose #808 > printfn $"Test case %d{i + 1}. Average Time: %A{avg} " -00:01:47 verbose #809 > ) -00:01:47 verbose #810 > -00:01:47 verbose #811 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #812 > let mutable _count = -00:01:47 verbose #813 > if ("CI" |> System.Environment.GetEnvironmentVariable |> fun x -> $"%A{x}") -00:01:47 verbose #814 > <> "<null>" -00:01:47 verbose #815 > then 2000000 -00:01:47 verbose #816 > else 2000 -00:01:47 verbose #817 > -00:01:47 verbose #818 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #819 > inl is_fast () = -00:01:47 verbose #820 > false -00:01:47 verbose #821 > -00:01:47 verbose #822 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #823 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #824 > │ ## empty3Tests │ -00:01:47 verbose #825 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #826 > -00:01:47 verbose #827 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #828 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #829 > │ Test: Empty3 │ -00:01:47 verbose #830 > │ │ -00:01:47 verbose #831 > │ Solution: (a, a) │ -00:01:47 verbose #832 > │ Test case 1. A. Time: 91L │ -00:01:47 verbose #833 > │ │ -00:01:47 verbose #834 > │ Solution: (a, a) │ -00:01:47 verbose #835 > │ Test case 1. A. Time: 56L │ -00:01:47 verbose #836 > │ │ -00:01:47 verbose #837 > │ Input | Expected | Result | Best │ -00:01:47 verbose #838 > │ --- | --- | --- | --- │ -00:01:47 verbose #839 > │ (a, a) | a | a | (1, 91) │ -00:01:47 verbose #840 > │ (a, a) | a | a | (1, 56) │ -00:01:47 verbose #841 > │ │ -00:01:47 verbose #842 > │ Averages │ -00:01:47 verbose #843 > │ Test case 1. Average Time: 73L │ -00:01:47 verbose #844 > │ │ -00:01:47 verbose #845 > │ Ranking │ -00:01:47 verbose #846 > │ Test case 1. Average Time: 73L │ -00:01:47 verbose #847 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #848 > -00:01:47 verbose #849 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #850 > //// test -00:01:47 verbose #851 > -00:01:47 verbose #852 > let solutions = [[ -00:01:47 verbose #853 > "A", -00:01:47 verbose #854 > fun (a, _b) -> -00:01:47 verbose #855 > a -00:01:47 verbose #856 > ]] -00:01:47 verbose #857 > let testCases = seq { -00:01:47 verbose #858 > ("a", "a"), "a" -00:01:47 verbose #859 > ("a", "a"), "a" -00:01:47 verbose #860 > } -00:01:47 verbose #861 > let rec empty3Tests = runAll (nameof empty3Tests) _count solutions testCases -00:01:47 verbose #862 > empty3Tests -00:01:47 verbose #863 > |> sortResultList -00:01:47 verbose #864 > -00:01:47 verbose #865 > ╭─[ 469.58ms - stdout ]────────────────────────────────────────────────────────╮ -00:01:47 verbose #866 > │ │ -00:01:47 verbose #867 > │ │ -00:01:47 verbose #868 > │ Test: empty3Tests │ -00:01:47 verbose #869 > │ │ -00:01:47 verbose #870 > │ Solution: (a, a) │ -00:01:47 verbose #871 > │ Test case 1. A. Time: 1L │ -00:01:47 verbose #872 > │ │ -00:01:47 verbose #873 > │ Solution: (a, a) │ -00:01:47 verbose #874 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #875 > │ │ -00:01:47 verbose #876 > │ Input | Expected | Result | Best │ -00:01:47 verbose #877 > │ --- | --- | --- | --- │ -00:01:47 verbose #878 > │ (a, a) | a | a | (1, 1) │ -00:01:47 verbose #879 > │ (a, a) | a | a | (1, 0) │ -00:01:47 verbose #880 > │ │ -00:01:47 verbose #881 > │ Average Ranking │ -00:01:47 verbose #882 > │ Test case 1. Average Time: 0L │ -00:01:47 verbose #883 > │ │ -00:01:47 verbose #884 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #885 > -00:01:47 verbose #886 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #887 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #888 > │ ## empty2Tests │ -00:01:47 verbose #889 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #890 > -00:01:47 verbose #891 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #892 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #893 > │ Test: Empty2 │ -00:01:47 verbose #894 > │ │ -00:01:47 verbose #895 > │ Solution: (a, a) │ -00:01:47 verbose #896 > │ Test case 1. A. Time: 59L │ -00:01:47 verbose #897 > │ │ -00:01:47 verbose #898 > │ Solution: (a, a) │ -00:01:47 verbose #899 > │ Test case 1. A. Time: 53L │ -00:01:47 verbose #900 > │ │ -00:01:47 verbose #901 > │ Input | Expected | Result | Best │ -00:01:47 verbose #902 > │ --- | --- | --- | --- │ -00:01:47 verbose #903 > │ (a, a) | a | a | (1, 59) │ -00:01:47 verbose #904 > │ (a, a) | a | a | (1, 53) │ -00:01:47 verbose #905 > │ │ -00:01:47 verbose #906 > │ Averages │ -00:01:47 verbose #907 > │ Test case 1. Average Time: 56L │ -00:01:47 verbose #908 > │ │ -00:01:47 verbose #909 > │ Ranking │ -00:01:47 verbose #910 > │ Test case 1. Average Time: 56L │ -00:01:47 verbose #911 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #912 > -00:01:47 verbose #913 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #914 > //// test -00:01:47 verbose #915 > -00:01:47 verbose #916 > let solutions = [[ -00:01:47 verbose #917 > "A", -00:01:47 verbose #918 > fun (a, _b) -> -00:01:47 verbose #919 > a -00:01:47 verbose #920 > ]] -00:01:47 verbose #921 > let testCases = seq { -00:01:47 verbose #922 > ("a", "a"), "a" -00:01:47 verbose #923 > ("a", "a"), "a" -00:01:47 verbose #924 > } -00:01:47 verbose #925 > let rec empty2Tests = runAll (nameof empty2Tests) _count solutions testCases -00:01:47 verbose #926 > empty2Tests -00:01:47 verbose #927 > |> sortResultList -00:01:47 verbose #928 > -00:01:47 verbose #929 > ╭─[ 420.73ms - stdout ]────────────────────────────────────────────────────────╮ -00:01:47 verbose #930 > │ │ -00:01:47 verbose #931 > │ │ -00:01:47 verbose #932 > │ Test: empty2Tests │ -00:01:47 verbose #933 > │ │ -00:01:47 verbose #934 > │ Solution: (a, a) │ -00:01:47 verbose #935 > │ Test case 1. A. Time: 3L │ -00:01:47 verbose #936 > │ │ -00:01:47 verbose #937 > │ Solution: (a, a) │ -00:01:47 verbose #938 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #939 > │ │ -00:01:47 verbose #940 > │ Input | Expected | Result | Best │ -00:01:47 verbose #941 > │ --- | --- | --- | --- │ -00:01:47 verbose #942 > │ (a, a) | a | a | (1, 3) │ -00:01:47 verbose #943 > │ (a, a) | a | a | (1, 0) │ -00:01:47 verbose #944 > │ │ -00:01:47 verbose #945 > │ Average Ranking │ -00:01:47 verbose #946 > │ Test case 1. Average Time: 1L │ -00:01:47 verbose #947 > │ │ -00:01:47 verbose #948 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #949 > -00:01:47 verbose #950 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #951 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #952 > │ ## emptyTests │ -00:01:47 verbose #953 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #954 > -00:01:47 verbose #955 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #956 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #957 > │ Test: Empty │ -00:01:47 verbose #958 > │ │ -00:01:47 verbose #959 > │ Solution: 0 │ -00:01:47 verbose #960 > │ Test case 1. A. Time: 61L │ -00:01:47 verbose #961 > │ │ -00:01:47 verbose #962 > │ Solution: 2 │ -00:01:47 verbose #963 > │ Test case 1. A. Time: 62L │ -00:01:47 verbose #964 > │ │ -00:01:47 verbose #965 > │ Solution: 5 │ -00:01:47 verbose #966 > │ Test case 1. A. Time: 70L │ -00:01:47 verbose #967 > │ │ -00:01:47 verbose #968 > │ Input | Expected | Result | Best │ -00:01:47 verbose #969 > │ --- | --- | --- | --- │ -00:01:47 verbose #970 > │ 0 | 0 | 0 | (1, 61) │ -00:01:47 verbose #971 > │ 2 | 2 | 2 | (1, 62) │ -00:01:47 verbose #972 > │ 5 | 5 | 5 | (1, 70) │ -00:01:47 verbose #973 > │ │ -00:01:47 verbose #974 > │ Averages │ -00:01:47 verbose #975 > │ Test case 1. Average Time: 64L │ -00:01:47 verbose #976 > │ │ -00:01:47 verbose #977 > │ Ranking │ -00:01:47 verbose #978 > │ Test case 1. Average Time: 64L │ -00:01:47 verbose #979 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #980 > -00:01:47 verbose #981 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #982 > //// test -00:01:47 verbose #983 > -00:01:47 verbose #984 > let solutions = [[ -00:01:47 verbose #985 > "A", -00:01:47 verbose #986 > fun n -> -00:01:47 verbose #987 > n + 0 -00:01:47 verbose #988 > ]] -00:01:47 verbose #989 > let testCases = seq { -00:01:47 verbose #990 > 0, 0 -00:01:47 verbose #991 > 2, 2 -00:01:47 verbose #992 > 5, 5 -00:01:47 verbose #993 > } -00:01:47 verbose #994 > let rec emptyTests = runAll (nameof emptyTests) _count solutions testCases -00:01:47 verbose #995 > emptyTests -00:01:47 verbose #996 > |> sortResultList -00:01:47 verbose #997 > -00:01:47 verbose #998 > ╭─[ 643.14ms - stdout ]────────────────────────────────────────────────────────╮ -00:01:47 verbose #999 > │ │ -00:01:47 verbose #1000 > │ │ -00:01:47 verbose #1001 > │ Test: emptyTests │ -00:01:47 verbose #1002 > │ │ -00:01:47 verbose #1003 > │ Solution: 0 │ -00:01:47 verbose #1004 > │ Test case 1. A. Time: 3L │ -00:01:47 verbose #1005 > │ │ -00:01:47 verbose #1006 > │ Solution: 2 │ -00:01:47 verbose #1007 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #1008 > │ │ -00:01:47 verbose #1009 > │ Solution: 5 │ -00:01:47 verbose #1010 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #1011 > │ │ -00:01:47 verbose #1012 > │ Input | Expected | Result | Best │ -00:01:47 verbose #1013 > │ --- | --- | --- | --- │ -00:01:47 verbose #1014 > │ 0 | 0 | 0 | (1, 3) │ -00:01:47 verbose #1015 > │ 2 | 2 | 2 | (1, 0) │ -00:01:47 verbose #1016 > │ 5 | 5 | 5 | (1, 0) │ -00:01:47 verbose #1017 > │ │ -00:01:47 verbose #1018 > │ Average Ranking │ -00:01:47 verbose #1019 > │ Test case 1. Average Time: 1L │ -00:01:47 verbose #1020 > │ │ -00:01:47 verbose #1021 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #1022 > -00:01:47 verbose #1023 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #1024 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #1025 > │ ## uniqueLettersTests │ -00:01:47 verbose #1026 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #1027 > -00:01:47 verbose #1028 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #1029 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #1030 > │ Test: UniqueLetters │ -00:01:47 verbose #1031 > │ │ -00:01:47 verbose #1032 > │ Solution: abc │ -00:01:47 verbose #1033 > │ Test case 1. A. Time: 1512L │ -00:01:47 verbose #1034 > │ Test case 2. B. Time: 1947L │ -00:01:47 verbose #1035 > │ Test case 3. C. Time: 2023L │ -00:01:47 verbose #1036 > │ Test case 4. D. Time: 1358L │ -00:01:47 verbose #1037 > │ Test case 5. E. Time: 1321L │ -00:01:47 verbose #1038 > │ Test case 6. F. Time: 1346L │ -00:01:47 verbose #1039 > │ Test case 7. G. Time: 1304L │ -00:01:47 verbose #1040 > │ Test case 8. H. Time: 1383L │ -00:01:47 verbose #1041 > │ Test case 9. I. Time: 1495L │ -00:01:47 verbose #1042 > │ Test case 10. J. Time: 1245L │ -00:01:47 verbose #1043 > │ Test case 11. K. Time: 1219L │ -00:01:47 verbose #1044 > │ │ -00:01:47 verbose #1045 > │ Solution: accabb │ -00:01:47 verbose #1046 > │ Test case 1. A. Time: 1648L │ -00:01:47 verbose #1047 > │ Test case 2. B. Time: 2061L │ -00:01:47 verbose #1048 > │ Test case 3. C. Time: 2413L │ -00:01:47 verbose #1049 > │ Test case 4. D. Time: 1561L │ -00:01:47 verbose #1050 > │ Test case 5. E. Time: 1593L │ -00:01:47 verbose #1051 > │ Test case 6. F. Time: 1518L │ -00:01:47 verbose #1052 > │ Test case 7. G. Time: 1415L │ -00:01:47 verbose #1053 > │ Test case 8. H. Time: 1510L │ -00:01:47 verbose #1054 > │ Test case 9. I. Time: 1445L │ -00:01:47 verbose #1055 > │ Test case 10. J. Time: 1636L │ -00:01:47 verbose #1056 > │ Test case 11. K. Time: 1317L │ -00:01:47 verbose #1057 > │ │ -00:01:47 verbose #1058 > │ Solution: pprrqqpp │ -00:01:47 verbose #1059 > │ Test case 1. A. Time: 2255L │ -00:01:47 verbose #1060 > │ Test case 2. B. Time: 2408L │ -00:01:47 verbose #1061 > │ Test case 3. C. Time: 2393L │ -00:01:47 verbose #1062 > │ Test case 4. D. Time: 1675L │ -00:01:47 verbose #1063 > │ Test case 5. E. Time: 1911L │ -00:01:47 verbose #1064 > │ Test case 6. F. Time: 2126L │ -00:01:47 verbose #1065 > │ Test case 7. G. Time: 1504L │ -00:01:47 verbose #1066 > │ Test case 8. H. Time: 1715L │ -00:01:47 verbose #1067 > │ Test case 9. I. Time: 1537L │ -00:01:47 verbose #1068 > │ Test case 10. J. Time: 1522L │ -00:01:47 verbose #1069 > │ Test case 11. K. Time: 1322L │ -00:01:47 verbose #1070 > │ │ -00:01:47 verbose #1071 > │ Solution: │ -00:01:47 verbose #1072 > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ -00:01:47 verbose #1073 > │ bbb │ -00:01:47 verbose #1074 > │ Test case 1. A. Time: 13073L │ -00:01:47 verbose #1075 > │ Test case 2. B. Time: 11519L │ -00:01:47 verbose #1076 > │ Test case 3. C. Time: 8373L │ -00:01:47 verbose #1077 > │ Test case 4. D. Time: 5860L │ -00:01:47 verbose #1078 > │ Test case 5. E. Time: 6490L │ -00:01:47 verbose #1079 > │ Test case 6. F. Time: 6325L │ -00:01:47 verbose #1080 > │ Test case 7. G. Time: 5799L │ -00:01:47 verbose #1081 > │ Test case 8. H. Time: 7099L │ -00:01:47 verbose #1082 > │ Test case 9. I. Time: 6133L │ -00:01:47 verbose #1083 > │ Test case 10. J. Time: 5993L │ -00:01:47 verbose #1084 > │ Test case 11. K. Time: 2040L │ -00:01:47 verbose #1085 > │ │ -00:01:47 verbose #1086 > │ Input │ -00:01:47 verbose #1087 > │ | Expected | Result | Best │ -00:01:47 verbose #1088 > │ --- │ -00:01:47 verbose #1089 > │ │ -00:01:47 verbose #1090 > │ | --- | --- | --- │ -00:01:47 verbose #1091 > │ abc │ -00:01:47 verbose #1092 > │ │ -00:01:47 verbose #1093 > │ | abc | abc | (11, 1219) │ -00:01:47 verbose #1094 > │ accabb │ -00:01:47 verbose #1095 > │ | acb | acb | (11, 1317) │ -00:01:47 verbose #1096 > │ pprrqqpp │ -00:01:47 verbose #1097 > │ | prq | prq | (11, 1322) │ -00:01:47 verbose #1098 > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ -00:01:47 verbose #1099 > │ bbb | acb | acb | (11, 2040) │ -00:01:47 verbose #1100 > │ │ -00:01:47 verbose #1101 > │ Averages │ -00:01:47 verbose #1102 > │ Test case 1. Average Time: 4622L │ -00:01:47 verbose #1103 > │ Test case 2. Average Time: 4483L │ -00:01:47 verbose #1104 > │ Test case 3. Average Time: 3800L │ -00:01:47 verbose #1105 > │ Test case 4. Average Time: 2613L │ -00:01:47 verbose #1106 > │ Test case 5. Average Time: 2828L │ -00:01:47 verbose #1107 > │ Test case 6. Average Time: 2828L │ -00:01:47 verbose #1108 > │ Test case 7. Average Time: 2505L │ -00:01:47 verbose #1109 > │ Test case 8. Average Time: 2926L │ -00:01:47 verbose #1110 > │ Test case 9. Average Time: 2652L │ -00:01:47 verbose #1111 > │ Test case 10. Average Time: 2599L │ -00:01:47 verbose #1112 > │ Test case 11. Average Time: 1474L │ -00:01:47 verbose #1113 > │ │ -00:01:47 verbose #1114 > │ Ranking │ -00:01:47 verbose #1115 > │ Test case 1. Average Time: 4622L │ -00:01:47 verbose #1116 > │ Test case 2. Average Time: 4483L │ -00:01:47 verbose #1117 > │ Test case 3. Average Time: 3800L │ -00:01:47 verbose #1118 > │ Test case 8. Average Time: 2926L │ -00:01:47 verbose #1119 > │ Test case 5. Average Time: 2828L │ -00:01:47 verbose #1120 > │ Test case 6. Average Time: 2828L │ -00:01:47 verbose #1121 > │ Test case 9. Average Time: 2652L │ -00:01:47 verbose #1122 > │ Test case 4. Average Time: 2613L │ -00:01:47 verbose #1123 > │ Test case 10. Average Time: 2599L │ -00:01:47 verbose #1124 > │ Test case 7. Average Time: 2505L │ -00:01:47 verbose #1125 > │ Test case 11. Average Time: 1474L │ -00:01:47 verbose #1126 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #1127 > -00:01:47 verbose #1128 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #1129 > //// test -00:01:47 verbose #1130 > -00:01:47 verbose #1131 > let solutions = [[ -00:01:47 verbose #1132 > "A", -00:01:47 verbose #1133 > fun input -> -00:01:47 verbose #1134 > input -00:01:47 verbose #1135 > |> Seq.toList -00:01:47 verbose #1136 > |> List.fold (fun acc x -> if List.contains x acc then acc else acc @ [[ -00:01:47 verbose #1137 > x ]]) [[]] -00:01:47 verbose #1138 > |> Seq.toArray -00:01:47 verbose #1139 > |> String -00:01:47 verbose #1140 > -00:01:47 verbose #1141 > "B", -00:01:47 verbose #1142 > fun input -> -00:01:47 verbose #1143 > input -00:01:47 verbose #1144 > |> Seq.rev -00:01:47 verbose #1145 > |> fun list -> Seq.foldBack (fun x acc -> if List.contains x acc then -00:01:47 verbose #1146 > acc else x :: acc) list [[]] -00:01:47 verbose #1147 > |> Seq.rev -00:01:47 verbose #1148 > |> Seq.toArray -00:01:47 verbose #1149 > |> String -00:01:47 verbose #1150 > -00:01:47 verbose #1151 > "C", -00:01:47 verbose #1152 > fun input -> -00:01:47 verbose #1153 > input -00:01:47 verbose #1154 > |> Seq.rev -00:01:47 verbose #1155 > |> fun list -> Seq.foldBack (fun x (set, acc) -> if Set.contains x set -00:01:47 verbose #1156 > then set, acc else set.Add x, x :: acc) list (Set.empty, [[]]) -00:01:47 verbose #1157 > |> snd -00:01:47 verbose #1158 > |> Seq.rev -00:01:47 verbose #1159 > |> Seq.toArray -00:01:47 verbose #1160 > |> String -00:01:47 verbose #1161 > -00:01:47 verbose #1162 > "D", -00:01:47 verbose #1163 > fun input -> -00:01:47 verbose #1164 > input -00:01:47 verbose #1165 > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc -00:01:47 verbose #1166 > else set.Add x, Array.append acc [[| x |]]) (Set.empty, [[||]]) -00:01:47 verbose #1167 > |> snd -00:01:47 verbose #1168 > |> String -00:01:47 verbose #1169 > -00:01:47 verbose #1170 > "E", -00:01:47 verbose #1171 > fun input -> -00:01:47 verbose #1172 > input -00:01:47 verbose #1173 > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc -00:01:47 verbose #1174 > else set.Add x, x :: acc) (Set.empty, [[]]) -00:01:47 verbose #1175 > |> snd -00:01:47 verbose #1176 > |> List.rev -00:01:47 verbose #1177 > |> List.toArray -00:01:47 verbose #1178 > |> String -00:01:47 verbose #1179 > -00:01:47 verbose #1180 > "F", -00:01:47 verbose #1181 > fun input -> -00:01:47 verbose #1182 > input -00:01:47 verbose #1183 > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc -00:01:47 verbose #1184 > else set.Add x, acc @ [[ x ]]) (Set.empty, [[]]) -00:01:47 verbose #1185 > |> snd -00:01:47 verbose #1186 > |> List.toArray -00:01:47 verbose #1187 > |> String -00:01:47 verbose #1188 > -00:01:47 verbose #1189 > "G", -00:01:47 verbose #1190 > fun input -> -00:01:47 verbose #1191 > input -00:01:47 verbose #1192 > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc -00:01:47 verbose #1193 > else set.Add x, x :: acc) (Set.empty, [[]]) -00:01:47 verbose #1194 > |> snd -00:01:47 verbose #1195 > |> List.toArray -00:01:47 verbose #1196 > |> Array.rev -00:01:47 verbose #1197 > |> String -00:01:47 verbose #1198 > -00:01:47 verbose #1199 > "H", -00:01:47 verbose #1200 > fun input -> -00:01:47 verbose #1201 > input -00:01:47 verbose #1202 > |> Seq.toList -00:01:47 verbose #1203 > |> fun list -> -00:01:47 verbose #1204 > let rec loop set = function -00:01:47 verbose #1205 > | head :: tail when Set.contains head set -> loop set tail -00:01:47 verbose #1206 > | head :: tail -> (loop (set.Add head) tail) @ [[ head ]] -00:01:47 verbose #1207 > | [[]] -> [[]] -00:01:47 verbose #1208 > loop Set.empty list -00:01:47 verbose #1209 > |> List.rev -00:01:47 verbose #1210 > |> List.toArray -00:01:47 verbose #1211 > |> String -00:01:47 verbose #1212 > -00:01:47 verbose #1213 > "I", -00:01:47 verbose #1214 > fun input -> -00:01:47 verbose #1215 > input -00:01:47 verbose #1216 > |> Seq.toList -00:01:47 verbose #1217 > |> fun list -> -00:01:47 verbose #1218 > let rec loop set = function -00:01:47 verbose #1219 > | head :: tail when Set.contains head set -> loop set tail -00:01:47 verbose #1220 > | head :: tail -> loop (set.Add head) tail |> Array.append [[| -00:01:47 verbose #1221 > head |]] -00:01:47 verbose #1222 > | [[]] -> [[||]] -00:01:47 verbose #1223 > loop Set.empty list -00:01:47 verbose #1224 > |> String -00:01:47 verbose #1225 > -00:01:47 verbose #1226 > "J", -00:01:47 verbose #1227 > fun input -> -00:01:47 verbose #1228 > input -00:01:47 verbose #1229 > |> Seq.toList -00:01:47 verbose #1230 > |> fun list -> -00:01:47 verbose #1231 > let rec loop set = function -00:01:47 verbose #1232 > | head :: tail when Set.contains head set -> loop set tail -00:01:47 verbose #1233 > | head :: tail -> head :: loop (set.Add head) tail -00:01:47 verbose #1234 > | [[]] -> [[]] -00:01:47 verbose #1235 > loop Set.empty list -00:01:47 verbose #1236 > |> List.toArray -00:01:47 verbose #1237 > |> String -00:01:47 verbose #1238 > -00:01:47 verbose #1239 > "K", -00:01:47 verbose #1240 > fun input -> -00:01:47 verbose #1241 > input -00:01:47 verbose #1242 > |> Seq.distinct -00:01:47 verbose #1243 > |> Seq.toArray -00:01:47 verbose #1244 > |> String -00:01:47 verbose #1245 > ]] -00:01:47 verbose #1246 > let testCases = seq { -00:01:47 verbose #1247 > "abc", "abc" -00:01:47 verbose #1248 > "accabb", "acb" -00:01:47 verbose #1249 > "pprrqqpp", "prq" -00:01:47 verbose #1250 > -00:01:47 verbose #1251 > "aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbbbbb -00:01:47 verbose #1252 > ", "acb" -00:01:47 verbose #1253 > } -00:01:47 verbose #1254 > let rec uniqueLettersTests = runAll (nameof uniqueLettersTests) _count solutions -00:01:47 verbose #1255 > testCases -00:01:47 verbose #1256 > uniqueLettersTests -00:01:47 verbose #1257 > |> sortResultList -00:01:47 verbose #1258 > -00:01:47 verbose #1259 > ╭─[ 9.69s - stdout ]───────────────────────────────────────────────────────────╮ -00:01:47 verbose #1260 > │ │ -00:01:47 verbose #1261 > │ │ -00:01:47 verbose #1262 > │ Test: uniqueLettersTests │ -00:01:47 verbose #1263 > │ │ -00:01:47 verbose #1264 > │ Solution: abc │ -00:01:47 verbose #1265 > │ Test case 1. A. Time: 4L │ -00:01:47 verbose #1266 > │ Test case 2. B. Time: 4L │ -00:01:47 verbose #1267 > │ Test case 3. C. Time: 4L │ -00:01:47 verbose #1268 > │ Test case 4. D. Time: 2L │ -00:01:47 verbose #1269 > │ Test case 5. E. Time: 2L │ -00:01:47 verbose #1270 > │ Test case 6. F. Time: 1L │ -00:01:47 verbose #1271 > │ Test case 7. G. Time: 2L │ -00:01:47 verbose #1272 > │ Test case 8. H. Time: 2L │ -00:01:47 verbose #1273 > │ Test case 9. I. Time: 2L │ -00:01:47 verbose #1274 > │ Test case 10. J. Time: 1L │ -00:01:47 verbose #1275 > │ Test case 11. K. Time: 3L │ -00:01:47 verbose #1276 > │ │ -00:01:47 verbose #1277 > │ Solution: accabb │ -00:01:47 verbose #1278 > │ Test case 1. A. Time: 1L │ -00:01:47 verbose #1279 > │ Test case 2. B. Time: 1L │ -00:01:47 verbose #1280 > │ Test case 3. C. Time: 1L │ -00:01:47 verbose #1281 > │ Test case 4. D. Time: 1L │ -00:01:47 verbose #1282 > │ Test case 5. E. Time: 1L │ -00:01:47 verbose #1283 > │ Test case 6. F. Time: 1L │ -00:01:47 verbose #1284 > │ Test case 7. G. Time: 1L │ -00:01:47 verbose #1285 > │ Test case 8. H. Time: 1L │ -00:01:47 verbose #1286 > │ Test case 9. I. Time: 0L │ -00:01:47 verbose #1287 > │ Test case 10. J. Time: 1L │ -00:01:47 verbose #1288 > │ Test case 11. K. Time: 1L │ -00:01:47 verbose #1289 > │ │ -00:01:47 verbose #1290 > │ Solution: pprrqqpp │ -00:01:47 verbose #1291 > │ Test case 1. A. Time: 1L │ -00:01:47 verbose #1292 > │ Test case 2. B. Time: 1L │ -00:01:47 verbose #1293 > │ Test case 3. C. Time: 1L │ -00:01:47 verbose #1294 > │ Test case 4. D. Time: 1L │ -00:01:47 verbose #1295 > │ Test case 5. E. Time: 1L │ -00:01:47 verbose #1296 > │ Test case 6. F. Time: 1L │ -00:01:47 verbose #1297 > │ Test case 7. G. Time: 1L │ -00:01:47 verbose #1298 > │ Test case 8. H. Time: 1L │ -00:01:47 verbose #1299 > │ Test case 9. I. Time: 0L │ -00:01:47 verbose #1300 > │ Test case 10. J. Time: 1L │ -00:01:47 verbose #1301 > │ Test case 11. K. Time: 0L │ -00:01:47 verbose #1302 > │ │ -00:01:47 verbose #1303 > │ Solution: │ -00:01:47 verbose #1304 > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ -00:01:47 verbose #1305 > │ bbb │ -00:01:47 verbose #1306 > │ Test case 1. A. Time: 18L │ -00:01:47 verbose #1307 > │ Test case 2. B. Time: 9L │ -00:01:47 verbose #1308 > │ Test case 3. C. Time: 13L │ -00:01:47 verbose #1309 > │ Test case 4. D. Time: 8L │ -00:01:47 verbose #1310 > │ Test case 5. E. Time: 9L │ -00:01:47 verbose #1311 > │ Test case 6. F. Time: 11L │ -00:01:47 verbose #1312 > │ Test case 7. G. Time: 8L │ -00:01:47 verbose #1313 > │ Test case 8. H. Time: 9L │ -00:01:47 verbose #1314 > │ Test case 9. I. Time: 7L │ -00:01:47 verbose #1315 > │ Test case 10. J. Time: 8L │ -00:01:47 verbose #1316 > │ Test case 11. K. Time: 3L │ -00:01:47 verbose #1317 > │ │ -00:01:47 verbose #1318 > │ Input │ -00:01:47 verbose #1319 > │ | Expected | Result | Best │ -00:01:47 verbose #1320 > │ --- │ -00:01:47 verbose #1321 > │ | --- | --- | --- │ -00:01:47 verbose #1322 > │ abc │ -00:01:47 verbose #1323 > │ | abc | abc | (6, 1) │ -00:01:47 verbose #1324 > │ accabb │ -00:01:47 verbose #1325 > │ | acb | acb | (9, 0) │ -00:01:47 verbose #1326 > │ pprrqqpp │ -00:01:47 verbose #1327 > │ | prq | prq | (9, 0) │ -00:01:47 verbose #1328 > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ -00:01:47 verbose #1329 > │ bbb | acb | acb | (11, 3) │ -00:01:47 verbose #1330 > │ │ -00:01:47 verbose #1331 > │ Average Ranking │ -00:01:47 verbose #1332 > │ Test case 11. Average Time: 1L │ -00:01:47 verbose #1333 > │ Test case 9. Average Time: 2L │ -00:01:47 verbose #1334 > │ Test case 10. Average Time: 2L │ -00:01:47 verbose #1335 > │ Test case 2. Average Time: 3L │ -00:01:47 verbose #1336 > │ Test case 4. Average Time: 3L │ -00:01:47 verbose #1337 > │ Test case 5. Average Time: 3L │ -00:01:47 verbose #1338 > │ Test case 6. Average Time: 3L │ -00:01:47 verbose #1339 > │ Test case 7. Average Time: 3L │ -00:01:47 verbose #1340 > │ Test case 8. Average Time: 3L │ -00:01:47 verbose #1341 > │ Test case 3. Average Time: 4L │ -00:01:47 verbose #1342 > │ Test case 1. Average Time: 6L │ -00:01:47 verbose #1343 > │ │ -00:01:47 verbose #1344 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #1345 > -00:01:47 verbose #1346 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #1347 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #1348 > │ ## rotateStringsTests │ -00:01:47 verbose #1349 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #1350 > -00:01:47 verbose #1351 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #1352 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #1353 > │ https://www.hackerrank.com/challenges/rotate-string/forum │ -00:01:47 verbose #1354 > │ │ -00:01:47 verbose #1355 > │ Test: RotateStrings │ -00:01:47 verbose #1356 > │ │ -00:01:47 verbose #1357 > │ Solution: abc │ -00:01:47 verbose #1358 > │ Test case 1. A. Time: 1842L │ -00:01:47 verbose #1359 > │ Test case 2. B. Time: 1846L │ -00:01:47 verbose #1360 > │ Test case 3. C. Time: 1936L │ -00:01:47 verbose #1361 > │ Test case 4. CA. Time: 2224L │ -00:01:47 verbose #1362 > │ Test case 5. CB. Time: 2329L │ -00:01:47 verbose #1363 > │ Test case 6. D. Time: 2474L │ -00:01:47 verbose #1364 > │ Test case 7. E. Time: 1664L │ -00:01:47 verbose #1365 > │ Test case 8. F. Time: 1517L │ -00:01:47 verbose #1366 > │ Test case 9. FA. Time: 1651L │ -00:01:47 verbose #1367 > │ Test case 10. FB. Time: 3764L │ -00:01:47 verbose #1368 > │ Test case 11. FC. Time: 5415L │ -00:01:47 verbose #1369 > │ │ -00:01:47 verbose #1370 > │ Solution: abcde │ -00:01:47 verbose #1371 > │ Test case 1. A. Time: 3356L │ -00:01:47 verbose #1372 > │ Test case 2. B. Time: 2592L │ -00:01:47 verbose #1373 > │ Test case 3. C. Time: 2346L │ -00:01:47 verbose #1374 > │ Test case 4. CA. Time: 2997L │ -00:01:47 verbose #1375 > │ Test case 5. CB. Time: 3061L │ -00:01:47 verbose #1376 > │ Test case 6. D. Time: 4051L │ -00:01:47 verbose #1377 > │ Test case 7. E. Time: 1905L │ -00:01:47 verbose #1378 > │ Test case 8. F. Time: 1771L │ -00:01:47 verbose #1379 > │ Test case 9. FA. Time: 2175L │ -00:01:47 verbose #1380 > │ Test case 10. FB. Time: 3275L │ -00:01:47 verbose #1381 > │ Test case 11. FC. Time: 5266L │ -00:01:47 verbose #1382 > │ │ -00:01:47 verbose #1383 > │ Solution: abcdefghi │ -00:01:47 verbose #1384 > │ Test case 1. A. Time: 4492L │ -00:01:47 verbose #1385 > │ Test case 2. B. Time: 3526L │ -00:01:47 verbose #1386 > │ Test case 3. C. Time: 3583L │ -00:01:47 verbose #1387 > │ Test case 4. CA. Time: 3711L │ -00:01:47 verbose #1388 > │ Test case 5. CB. Time: 4783L │ -00:01:47 verbose #1389 > │ Test case 6. D. Time: 7557L │ -00:01:47 verbose #1390 > │ Test case 7. E. Time: 3452L │ -00:01:47 verbose #1391 > │ Test case 8. F. Time: 3050L │ -00:01:47 verbose #1392 > │ Test case 9. FA. Time: 3275L │ -00:01:47 verbose #1393 > │ Test case 10. FB. Time: 4635L │ -00:01:47 verbose #1394 > │ Test case 11. FC. Time: 5616L │ -00:01:47 verbose #1395 > │ │ -00:01:47 verbose #1396 > │ Solution: abab │ -00:01:47 verbose #1397 > │ Test case 1. A. Time: 2093L │ -00:01:47 verbose #1398 > │ Test case 2. B. Time: 1843L │ -00:01:47 verbose #1399 > │ Test case 3. C. Time: 1746L │ -00:01:47 verbose #1400 > │ Test case 4. CA. Time: 2085L │ -00:01:47 verbose #1401 > │ Test case 5. CB. Time: 2139L │ -00:01:47 verbose #1402 > │ Test case 6. D. Time: 2095L │ -00:01:47 verbose #1403 > │ Test case 7. E. Time: 1723L │ -00:01:47 verbose #1404 > │ Test case 8. F. Time: 1558L │ -00:01:47 verbose #1405 > │ Test case 9. FA. Time: 1620L │ -00:01:47 verbose #1406 > │ Test case 10. FB. Time: 2319L │ -00:01:47 verbose #1407 > │ Test case 11. FC. Time: 3918L │ -00:01:47 verbose #1408 > │ │ -00:01:47 verbose #1409 > │ Solution: aa │ -00:01:47 verbose #1410 > │ Test case 1. A. Time: 1107L │ -00:01:47 verbose #1411 > │ Test case 2. B. Time: 1241L │ -00:01:47 verbose #1412 > │ Test case 3. C. Time: 1183L │ -00:01:47 verbose #1413 > │ Test case 4. CA. Time: 1563L │ -00:01:47 verbose #1414 > │ Test case 5. CB. Time: 1525L │ -00:01:47 verbose #1415 > │ Test case 6. D. Time: 1591L │ -00:01:47 verbose #1416 > │ Test case 7. E. Time: 1327L │ -00:01:47 verbose #1417 > │ Test case 8. F. Time: 1151L │ -00:01:47 verbose #1418 > │ Test case 9. FA. Time: 1180L │ -00:01:47 verbose #1419 > │ Test case 10. FB. Time: 1733L │ -00:01:47 verbose #1420 > │ Test case 11. FC. Time: 2817L │ -00:01:47 verbose #1421 > │ │ -00:01:47 verbose #1422 > │ Solution: z │ -00:01:47 verbose #1423 > │ Test case 1. A. Time: 816L │ -00:01:47 verbose #1424 > │ Test case 2. B. Time: 745L │ -00:01:47 verbose #1425 > │ Test case 3. C. Time: 928L │ -00:01:47 verbose #1426 > │ Test case 4. CA. Time: 1375L │ -00:01:47 verbose #1427 > │ Test case 5. CB. Time: 1029L │ -00:01:47 verbose #1428 > │ Test case 6. D. Time: 852L │ -00:01:47 verbose #1429 > │ Test case 7. E. Time: 712L │ -00:01:47 verbose #1430 > │ Test case 8. F. Time: 263L │ -00:01:47 verbose #1431 > │ Test case 9. FA. Time: 232L │ -00:01:47 verbose #1432 > │ Test case 10. FB. Time: 773L │ -00:01:47 verbose #1433 > │ Test case 11. FC. Time: 1789L │ -00:01:47 verbose #1434 > │ │ -00:01:47 verbose #1435 > │ Input | Expected │ -00:01:47 verbose #1436 > │ │ -00:01:47 verbose #1437 > │ | Result │ -00:01:47 verbose #1438 > │ │ -00:01:47 verbose #1439 > │ | Best │ -00:01:47 verbose #1440 > │ --- | --- │ -00:01:47 verbose #1441 > │ │ -00:01:47 verbose #1442 > │ | --- │ -00:01:47 verbose #1443 > │ │ -00:01:47 verbose #1444 > │ | --- │ -00:01:47 verbose #1445 > │ abc | bca cab abc │ -00:01:47 verbose #1446 > │ │ -00:01:47 verbose #1447 > │ | bca cab abc │ -00:01:47 verbose #1448 > │ │ -00:01:47 verbose #1449 > │ | (8, 1517) │ -00:01:47 verbose #1450 > │ abcde | bcdea cdeab deabc eabcd abcde │ -00:01:47 verbose #1451 > │ | bcdea cdeab deabc eabcd abcde │ -00:01:47 verbose #1452 > │ | (8, 1771) │ -00:01:47 verbose #1453 > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde │ -00:01:47 verbose #1454 > │ ghiabcdef hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab │ -00:01:47 verbose #1455 > │ defghiabc efghiabcd fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi │ -00:01:47 verbose #1456 > │ | (8, 3050) │ -00:01:47 verbose #1457 > │ abab | baba abab baba abab │ -00:01:47 verbose #1458 > │ │ -00:01:47 verbose #1459 > │ | baba abab baba abab │ -00:01:47 verbose #1460 > │ │ -00:01:47 verbose #1461 > │ | (8, 1558) │ -00:01:47 verbose #1462 > │ aa | aa aa │ -00:01:47 verbose #1463 > │ │ -00:01:47 verbose #1464 > │ | aa aa │ -00:01:47 verbose #1465 > │ │ -00:01:47 verbose #1466 > │ | (1, 1107) │ -00:01:47 verbose #1467 > │ z | z │ -00:01:47 verbose #1468 > │ │ -00:01:47 verbose #1469 > │ | z │ -00:01:47 verbose #1470 > │ │ -00:01:47 verbose #1471 > │ | (9, 232) │ -00:01:47 verbose #1472 > │ │ -00:01:47 verbose #1473 > │ Averages │ -00:01:47 verbose #1474 > │ Test case 1. Average Time: 2284L │ -00:01:47 verbose #1475 > │ Test case 2. Average Time: 1965L │ -00:01:47 verbose #1476 > │ Test case 3. Average Time: 1953L │ -00:01:47 verbose #1477 > │ Test case 4. Average Time: 2325L │ -00:01:47 verbose #1478 > │ Test case 5. Average Time: 2477L │ -00:01:47 verbose #1479 > │ Test case 6. Average Time: 3103L │ -00:01:47 verbose #1480 > │ Test case 7. Average Time: 1797L │ -00:01:47 verbose #1481 > │ Test case 8. Average Time: 1551L │ -00:01:47 verbose #1482 > │ Test case 9. Average Time: 1688L │ -00:01:47 verbose #1483 > │ Test case 10. Average Time: 2749L │ -00:01:47 verbose #1484 > │ Test case 11. Average Time: 4136L │ -00:01:47 verbose #1485 > │ │ -00:01:47 verbose #1486 > │ Ranking │ -00:01:47 verbose #1487 > │ Test case 11. Average Time: 4136L │ -00:01:47 verbose #1488 > │ Test case 6. Average Time: 3103L │ -00:01:47 verbose #1489 > │ Test case 10. Average Time: 2749L │ -00:01:47 verbose #1490 > │ Test case 5. Average Time: 2477L │ -00:01:47 verbose #1491 > │ Test case 4. Average Time: 2325L │ -00:01:47 verbose #1492 > │ Test case 1. Average Time: 2284L │ -00:01:47 verbose #1493 > │ Test case 2. Average Time: 1965L │ -00:01:47 verbose #1494 > │ Test case 3. Average Time: 1953L │ -00:01:47 verbose #1495 > │ Test case 7. Average Time: 1797L │ -00:01:47 verbose #1496 > │ Test case 9. Average Time: 1688L │ -00:01:47 verbose #1497 > │ Test case 8. Average Time: 1551L │ -00:01:47 verbose #1498 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #1499 > -00:01:47 verbose #1500 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #1501 > //// test -00:01:47 verbose #1502 > -00:01:47 verbose #1503 > let solutions = [[ -00:01:47 verbose #1504 > "A", -00:01:47 verbose #1505 > fun (input: string) -> -00:01:47 verbose #1506 > let resultList = -00:01:47 verbose #1507 > List.fold (fun acc x -> -00:01:47 verbose #1508 > let rotate (text: string) (letter: string) = (text |> -00:01:47 verbose #1509 > SpiralSm.slice 1 (input.Length - 1)) + letter -00:01:47 verbose #1510 > [[ rotate (if acc.IsEmpty then input else acc.Head) (string x) -00:01:47 verbose #1511 > ]] @ acc -00:01:47 verbose #1512 > ) [[]] (Seq.toList input) -00:01:47 verbose #1513 > -00:01:47 verbose #1514 > (resultList, "") -00:01:47 verbose #1515 > ||> List.foldBack (fun acc x -> x + acc + " ") -00:01:47 verbose #1516 > |> _.TrimEnd() -00:01:47 verbose #1517 > -00:01:47 verbose #1518 > "B", -00:01:47 verbose #1519 > fun input -> -00:01:47 verbose #1520 > input -00:01:47 verbose #1521 > |> Seq.toList -00:01:47 verbose #1522 > |> List.fold (fun (acc: string list) letter -> -00:01:47 verbose #1523 > let last = -00:01:47 verbose #1524 > if acc.IsEmpty -00:01:47 verbose #1525 > then input -00:01:47 verbose #1526 > else acc.Head -00:01:47 verbose #1527 > -00:01:47 verbose #1528 > let item = last.[[1 .. input.Length - 1]] + string letter -00:01:47 verbose #1529 > -00:01:47 verbose #1530 > item :: acc -00:01:47 verbose #1531 > ) [[]] -00:01:47 verbose #1532 > |> List.rev -00:01:47 verbose #1533 > |> SpiralSm.concat " " -00:01:47 verbose #1534 > -00:01:47 verbose #1535 > "C", -00:01:47 verbose #1536 > fun input -> -00:01:47 verbose #1537 > input -00:01:47 verbose #1538 > |> Seq.toList -00:01:47 verbose #1539 > |> List.fold (fun (acc: string list) letter -> acc.Head.[[ 1 .. -00:01:47 verbose #1540 > input.Length - 1 ]] + string letter :: acc) [[ input ]] -00:01:47 verbose #1541 > |> List.rev -00:01:47 verbose #1542 > |> List.skip 1 -00:01:47 verbose #1543 > |> SpiralSm.concat " " -00:01:47 verbose #1544 > -00:01:47 verbose #1545 > "CA", -00:01:47 verbose #1546 > fun input -> -00:01:47 verbose #1547 > input -00:01:47 verbose #1548 > |> Seq.fold (fun (acc: string list) letter -> acc.Head.[[ 1 .. -00:01:47 verbose #1549 > input.Length - 1 ]] + string letter :: acc) [[ input ]] -00:01:47 verbose #1550 > |> Seq.rev -00:01:47 verbose #1551 > |> Seq.skip 1 -00:01:47 verbose #1552 > |> SpiralSm.concat " " -00:01:47 verbose #1553 > -00:01:47 verbose #1554 > "CB", -00:01:47 verbose #1555 > fun input -> -00:01:47 verbose #1556 > input -00:01:47 verbose #1557 > |> Seq.toArray -00:01:47 verbose #1558 > |> Array.fold (fun (acc: string[[]]) letter -> acc |> Array.append [[| -00:01:47 verbose #1559 > acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter |]]) [[| input |]] -00:01:47 verbose #1560 > |> Array.rev -00:01:47 verbose #1561 > |> Array.skip 1 -00:01:47 verbose #1562 > |> SpiralSm.concat " " -00:01:47 verbose #1563 > -00:01:47 verbose #1564 > "D", -00:01:47 verbose #1565 > fun input -> -00:01:47 verbose #1566 > input -00:01:47 verbose #1567 > |> Seq.toList -00:01:47 verbose #1568 > |> fun list -> -00:01:47 verbose #1569 > let rec loop (acc: char list list) = function -00:01:47 verbose #1570 > | _ when acc.Length = list.Length -> acc -00:01:47 verbose #1571 > | head :: tail -> -00:01:47 verbose #1572 > let item = tail @ [[ head ]] -00:01:47 verbose #1573 > loop (item :: acc) item -00:01:47 verbose #1574 > | [[]] -> [[]] -00:01:47 verbose #1575 > loop [[]] list -00:01:47 verbose #1576 > |> List.rev -00:01:47 verbose #1577 > |> List.map (List.toArray >> String) -00:01:47 verbose #1578 > |> SpiralSm.concat " " -00:01:47 verbose #1579 > -00:01:47 verbose #1580 > "E", -00:01:47 verbose #1581 > fun input -> -00:01:47 verbose #1582 > input -00:01:47 verbose #1583 > |> Seq.toList -00:01:47 verbose #1584 > |> fun list -> -00:01:47 verbose #1585 > let rec loop (last: string) = function -00:01:47 verbose #1586 > | head :: tail -> -00:01:47 verbose #1587 > let item = last.[[1 .. input.Length - 1]] + string head -00:01:47 verbose #1588 > item :: loop item tail -00:01:47 verbose #1589 > | [[]] -> [[]] -00:01:47 verbose #1590 > loop input list -00:01:47 verbose #1591 > |> SpiralSm.concat " " -00:01:47 verbose #1592 > -00:01:47 verbose #1593 > "F", -00:01:47 verbose #1594 > fun input -> -00:01:47 verbose #1595 > Array.singleton 0 -00:01:47 verbose #1596 > |> Array.append [[| 1 .. input.Length - 1 |]] -00:01:47 verbose #1597 > |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) -00:01:47 verbose #1598 > |> SpiralSm.concat " " -00:01:47 verbose #1599 > -00:01:47 verbose #1600 > "FA", -00:01:47 verbose #1601 > fun input -> -00:01:47 verbose #1602 > List.singleton 0 -00:01:47 verbose #1603 > |> List.append [[ 1 .. input.Length - 1 ]] -00:01:47 verbose #1604 > |> List.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) -00:01:47 verbose #1605 > |> SpiralSm.concat " " -00:01:47 verbose #1606 > -00:01:47 verbose #1607 > "FB", -00:01:47 verbose #1608 > fun input -> -00:01:47 verbose #1609 > Seq.singleton 0 -00:01:47 verbose #1610 > |> Seq.append (seq { 1 .. input.Length - 1 }) -00:01:47 verbose #1611 > |> Seq.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) -00:01:47 verbose #1612 > |> SpiralSm.concat " " -00:01:47 verbose #1613 > -00:01:47 verbose #1614 > "FC", -00:01:47 verbose #1615 > fun input -> -00:01:47 verbose #1616 > Array.singleton 0 -00:01:47 verbose #1617 > |> Array.append [[| 1 .. input.Length - 1 |]] -00:01:47 verbose #1618 > |> Array.Parallel.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) -00:01:47 verbose #1619 > |> SpiralSm.concat " " -00:01:47 verbose #1620 > ]] -00:01:47 verbose #1621 > let testCases = seq { -00:01:47 verbose #1622 > "abc", "bca cab abc" -00:01:47 verbose #1623 > "abcde", "bcdea cdeab deabc eabcd abcde" -00:01:47 verbose #1624 > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef -00:01:47 verbose #1625 > hiabcdefg iabcdefgh abcdefghi" -00:01:47 verbose #1626 > "abab", "baba abab baba abab" -00:01:47 verbose #1627 > "aa", "aa aa" -00:01:47 verbose #1628 > "z", "z" -00:01:47 verbose #1629 > } -00:01:47 verbose #1630 > let rec rotateStringsTests = runAll (nameof rotateStringsTests) _count solutions -00:01:47 verbose #1631 > testCases -00:01:47 verbose #1632 > rotateStringsTests -00:01:47 verbose #1633 > |> sortResultList -00:01:47 verbose #1634 > -00:01:47 verbose #1635 > ╭─[ 13.36s - stdout ]──────────────────────────────────────────────────────────╮ -00:01:47 verbose #1636 > │ │ -00:01:47 verbose #1637 > │ │ -00:01:47 verbose #1638 > │ Test: rotateStringsTests │ -00:01:47 verbose #1639 > │ │ -00:01:47 verbose #1640 > │ Solution: abc │ -00:01:47 verbose #1641 > │ Test case 1. A. Time: 3L │ -00:01:47 verbose #1642 > │ Test case 2. B. Time: 1L │ -00:01:47 verbose #1643 > │ Test case 3. C. Time: 2L │ -00:01:47 verbose #1644 > │ Test case 4. CA. Time: 3L │ -00:01:47 verbose #1645 > │ Test case 5. CB. Time: 2L │ -00:01:47 verbose #1646 > │ Test case 6. D. Time: 2L │ -00:01:47 verbose #1647 > │ Test case 7. E. Time: 1L │ -00:01:47 verbose #1648 > │ Test case 8. F. Time: 2L │ -00:01:47 verbose #1649 > │ Test case 9. FA. Time: 2L │ -00:01:47 verbose #1650 > │ Test case 10. FB. Time: 8L │ -00:01:47 verbose #1651 > │ Test case 11. FC. Time: 8L │ -00:01:47 verbose #1652 > │ │ -00:01:47 verbose #1653 > │ Solution: abcde │ -00:01:47 verbose #1654 > │ Test case 1. A. Time: 3L │ -00:01:47 verbose #1655 > │ Test case 2. B. Time: 1L │ -00:01:47 verbose #1656 > │ Test case 3. C. Time: 1L │ -00:01:47 verbose #1657 > │ Test case 4. CA. Time: 1L │ -00:01:47 verbose #1658 > │ Test case 5. CB. Time: 1L │ -00:01:47 verbose #1659 > │ Test case 6. D. Time: 3L │ -00:01:47 verbose #1660 > │ Test case 7. E. Time: 1L │ -00:01:47 verbose #1661 > │ Test case 8. F. Time: 1L │ -00:01:47 verbose #1662 > │ Test case 9. FA. Time: 1L │ -00:01:47 verbose #1663 > │ Test case 10. FB. Time: 3L │ -00:01:47 verbose #1664 > │ Test case 11. FC. Time: 4L │ -00:01:47 verbose #1665 > │ │ -00:01:47 verbose #1666 > │ Solution: abcdefghi │ -00:01:47 verbose #1667 > │ Test case 1. A. Time: 5L │ -00:01:47 verbose #1668 > │ Test case 2. B. Time: 1L │ -00:01:47 verbose #1669 > │ Test case 3. C. Time: 3L │ -00:01:47 verbose #1670 > │ Test case 4. CA. Time: 2L │ -00:01:47 verbose #1671 > │ Test case 5. CB. Time: 3L │ -00:01:47 verbose #1672 > │ Test case 6. D. Time: 8L │ -00:01:47 verbose #1673 > │ Test case 7. E. Time: 3L │ -00:01:47 verbose #1674 > │ Test case 8. F. Time: 0L │ -00:01:47 verbose #1675 > │ Test case 9. FA. Time: 3L │ -00:01:47 verbose #1676 > │ Test case 10. FB. Time: 2L │ -00:01:47 verbose #1677 > │ Test case 11. FC. Time: 8L │ -00:01:47 verbose #1678 > │ │ -00:01:47 verbose #1679 > │ Solution: abab │ -00:01:47 verbose #1680 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #1681 > │ Test case 2. B. Time: 0L │ -00:01:47 verbose #1682 > │ Test case 3. C. Time: 1L │ -00:01:47 verbose #1683 > │ Test case 4. CA. Time: 1L │ -00:01:47 verbose #1684 > │ Test case 5. CB. Time: 1L │ -00:01:47 verbose #1685 > │ Test case 6. D. Time: 1L │ -00:01:47 verbose #1686 > │ Test case 7. E. Time: 1L │ -00:01:47 verbose #1687 > │ Test case 8. F. Time: 0L │ -00:01:47 verbose #1688 > │ Test case 9. FA. Time: 1L │ -00:01:47 verbose #1689 > │ Test case 10. FB. Time: 1L │ -00:01:47 verbose #1690 > │ Test case 11. FC. Time: 3L │ -00:01:47 verbose #1691 > │ │ -00:01:47 verbose #1692 > │ Solution: aa │ -00:01:47 verbose #1693 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #1694 > │ Test case 2. B. Time: 0L │ -00:01:47 verbose #1695 > │ Test case 3. C. Time: 0L │ -00:01:47 verbose #1696 > │ Test case 4. CA. Time: 0L │ -00:01:47 verbose #1697 > │ Test case 5. CB. Time: 0L │ -00:01:47 verbose #1698 > │ Test case 6. D. Time: 0L │ -00:01:47 verbose #1699 > │ Test case 7. E. Time: 0L │ -00:01:47 verbose #1700 > │ Test case 8. F. Time: 0L │ -00:01:47 verbose #1701 > │ Test case 9. FA. Time: 0L │ -00:01:47 verbose #1702 > │ Test case 10. FB. Time: 0L │ -00:01:47 verbose #1703 > │ Test case 11. FC. Time: 4L │ -00:01:47 verbose #1704 > │ │ -00:01:47 verbose #1705 > │ Solution: z │ -00:01:47 verbose #1706 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #1707 > │ Test case 2. B. Time: 0L │ -00:01:47 verbose #1708 > │ Test case 3. C. Time: 0L │ -00:01:47 verbose #1709 > │ Test case 4. CA. Time: 0L │ -00:01:47 verbose #1710 > │ Test case 5. CB. Time: 0L │ -00:01:47 verbose #1711 > │ Test case 6. D. Time: 0L │ -00:01:47 verbose #1712 > │ Test case 7. E. Time: 0L │ -00:01:47 verbose #1713 > │ Test case 8. F. Time: 0L │ -00:01:47 verbose #1714 > │ Test case 9. FA. Time: 0L │ -00:01:47 verbose #1715 > │ Test case 10. FB. Time: 1L │ -00:01:47 verbose #1716 > │ Test case 11. FC. Time: 4L │ -00:01:47 verbose #1717 > │ │ -00:01:47 verbose #1718 > │ Input | Expected │ -00:01:47 verbose #1719 > │ │ -00:01:47 verbose #1720 > │ | Result │ -00:01:47 verbose #1721 > │ │ -00:01:47 verbose #1722 > │ | Best │ -00:01:47 verbose #1723 > │ --- | --- │ -00:01:47 verbose #1724 > │ │ -00:01:47 verbose #1725 > │ | --- │ -00:01:47 verbose #1726 > │ │ -00:01:47 verbose #1727 > │ | --- │ -00:01:47 verbose #1728 > │ abc | bca cab abc │ -00:01:47 verbose #1729 > │ │ -00:01:47 verbose #1730 > │ | bca cab abc │ -00:01:47 verbose #1731 > │ │ -00:01:47 verbose #1732 > │ | (2, 1) │ -00:01:47 verbose #1733 > │ abcde | bcdea cdeab deabc eabcd abcde │ -00:01:47 verbose #1734 > │ | bcdea cdeab deabc eabcd abcde │ -00:01:47 verbose #1735 > │ | (2, 1) │ -00:01:47 verbose #1736 > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │ -00:01:47 verbose #1737 > │ hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd │ -00:01:47 verbose #1738 > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi | (8, 0) │ -00:01:47 verbose #1739 > │ abab | baba abab baba abab │ -00:01:47 verbose #1740 > │ | baba abab baba abab │ -00:01:47 verbose #1741 > │ | (1, 0) │ -00:01:47 verbose #1742 > │ aa | aa aa │ -00:01:47 verbose #1743 > │ │ -00:01:47 verbose #1744 > │ | aa aa │ -00:01:47 verbose #1745 > │ │ -00:01:47 verbose #1746 > │ | (1, 0) │ -00:01:47 verbose #1747 > │ z | z │ -00:01:47 verbose #1748 > │ │ -00:01:47 verbose #1749 > │ | z │ -00:01:47 verbose #1750 > │ │ -00:01:47 verbose #1751 > │ | (1, 0) │ -00:01:47 verbose #1752 > │ │ -00:01:47 verbose #1753 > │ Average Ranking │ -00:01:47 verbose #1754 > │ Test case 2. Average Time: 0L │ -00:01:47 verbose #1755 > │ Test case 8. Average Time: 0L │ -00:01:47 verbose #1756 > │ Test case 1. Average Time: 1L │ -00:01:47 verbose #1757 > │ Test case 3. Average Time: 1L │ -00:01:47 verbose #1758 > │ Test case 4. Average Time: 1L │ -00:01:47 verbose #1759 > │ Test case 5. Average Time: 1L │ -00:01:47 verbose #1760 > │ Test case 7. Average Time: 1L │ -00:01:47 verbose #1761 > │ Test case 9. Average Time: 1L │ -00:01:47 verbose #1762 > │ Test case 6. Average Time: 2L │ -00:01:47 verbose #1763 > │ Test case 10. Average Time: 2L │ -00:01:47 verbose #1764 > │ Test case 11. Average Time: 5L │ -00:01:47 verbose #1765 > │ │ -00:01:47 verbose #1766 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #1767 > -00:01:47 verbose #1768 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #1769 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #1770 > │ ## rotate_strings_tests │ -00:01:47 verbose #1771 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #1772 > -00:01:47 verbose #1773 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #1774 > //// test -00:01:47 verbose #1775 > //// timeout=60000 -00:01:47 verbose #1776 > -00:01:47 verbose #1777 > inl get_solutions () = -00:01:47 verbose #1778 > [[ -00:01:47 verbose #1779 > // "A", -00:01:47 verbose #1780 > // fun (input : string) => -00:01:47 verbose #1781 > // let resultList = -00:01:47 verbose #1782 > // List.fold (fun acc x => -00:01:47 verbose #1783 > // let rotate (text : string) (letter : string) = -00:01:47 verbose #1784 > text.Substring (1, input.Length - 1) + letter -00:01:47 verbose #1785 > // [[ rotate (if acc.IsEmpty then input else acc.Head) -00:01:47 verbose #1786 > (string x) ]] ++ acc -00:01:47 verbose #1787 > // ) [[]] (Seq.toList input) -00:01:47 verbose #1788 > -00:01:47 verbose #1789 > // List.foldBack (fun acc x => x + acc + " ") resultList "" -00:01:47 verbose #1790 > // |> fun x => x.TrimEnd () -00:01:47 verbose #1791 > -00:01:47 verbose #1792 > // "B", -00:01:47 verbose #1793 > // fun input => -00:01:47 verbose #1794 > // input -00:01:47 verbose #1795 > // |> Seq.toList -00:01:47 verbose #1796 > // |> List.fold (fun (acc : string list) letter => -00:01:47 verbose #1797 > // let last = -00:01:47 verbose #1798 > // if acc.IsEmpty -00:01:47 verbose #1799 > // then input -00:01:47 verbose #1800 > // else acc.Head -00:01:47 verbose #1801 > -00:01:47 verbose #1802 > // let item = last.[[1 .. input.Length - 1]] + string letter -00:01:47 verbose #1803 > -00:01:47 verbose #1804 > // item :: acc -00:01:47 verbose #1805 > // ) [[]] -00:01:47 verbose #1806 > // |> List.rev -00:01:47 verbose #1807 > // |> SpiralSm.concat " " -00:01:47 verbose #1808 > -00:01:47 verbose #1809 > // "C", -00:01:47 verbose #1810 > // fun input => -00:01:47 verbose #1811 > // input -00:01:47 verbose #1812 > // |> Seq.toList -00:01:47 verbose #1813 > // |> List.fold (fun (acc : list string) letter => acc.Head.[[ 1 .. -00:01:47 verbose #1814 > input.Length - 1 ]] + string letter :: acc) [[ input ]] -00:01:47 verbose #1815 > // |> List.rev -00:01:47 verbose #1816 > // |> List.skip 1 -00:01:47 verbose #1817 > // |> SpiralSm.concat " " -00:01:47 verbose #1818 > -00:01:47 verbose #1819 > // "CA", -00:01:47 verbose #1820 > // fun input => -00:01:47 verbose #1821 > // input -00:01:47 verbose #1822 > // |> Seq.fold (fun (acc : list string) letter => acc.Head.[[ 1 .. -00:01:47 verbose #1823 > input.Length - 1 ]] + string letter :: acc) [[ input ]] -00:01:47 verbose #1824 > // |> Seq.rev -00:01:47 verbose #1825 > // |> Seq.skip 1 -00:01:47 verbose #1826 > // |> SpiralSm.concat " " -00:01:47 verbose #1827 > -00:01:47 verbose #1828 > // "CB", -00:01:47 verbose #1829 > // fun input => -00:01:47 verbose #1830 > // input -00:01:47 verbose #1831 > // |> Seq.toArray -00:01:47 verbose #1832 > // |> Array.fold (fun (acc : a _ string) letter => acc |> -00:01:47 verbose #1833 > Array.append (a ;[[ acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter ]])) -00:01:47 verbose #1834 > (a ;[[ input ]]) -00:01:47 verbose #1835 > // |> Array.rev -00:01:47 verbose #1836 > // |> Array.skip 1 -00:01:47 verbose #1837 > // |> SpiralSm.concat " " -00:01:47 verbose #1838 > -00:01:47 verbose #1839 > // "D", -00:01:47 verbose #1840 > // fun input => -00:01:47 verbose #1841 > // input -00:01:47 verbose #1842 > // |> Seq.toList -00:01:47 verbose #1843 > // |> fun list => -00:01:47 verbose #1844 > // let rec loop (acc : list (list char)) = function -00:01:47 verbose #1845 > // | _ when acc.Length = list.Length => acc -00:01:47 verbose #1846 > // | head :: tail => -00:01:47 verbose #1847 > // let item = tail ++ [[ head ]] -00:01:47 verbose #1848 > // loop (item :: acc) item -00:01:47 verbose #1849 > // | [[]] => [[]] -00:01:47 verbose #1850 > // loop [[]] list -00:01:47 verbose #1851 > // |> List.rev -00:01:47 verbose #1852 > // |> List.map (List.toArray >> String) -00:01:47 verbose #1853 > // |> SpiralSm.concat " " -00:01:47 verbose #1854 > -00:01:47 verbose #1855 > // "E", -00:01:47 verbose #1856 > // fun input => -00:01:47 verbose #1857 > // input -00:01:47 verbose #1858 > // |> Seq.toList -00:01:47 verbose #1859 > // |> fun list => -00:01:47 verbose #1860 > // let rec loop (last : string) = function -00:01:47 verbose #1861 > // | head :: tail => -00:01:47 verbose #1862 > // let item = last.[[1 .. input.Length - 1]] + string -00:01:47 verbose #1863 > head -00:01:47 verbose #1864 > // item :: loop item tail -00:01:47 verbose #1865 > // | [[]] => [[]] -00:01:47 verbose #1866 > // loop input list -00:01:47 verbose #1867 > // |> SpiralSm.concat " " -00:01:47 verbose #1868 > -00:01:47 verbose #1869 > "F", -00:01:47 verbose #1870 > fun input => -00:01:47 verbose #1871 > // Array.singleton 0 -00:01:47 verbose #1872 > // |> Array.append [[| 1 .. input.Length - 1 |]] -00:01:47 verbose #1873 > // |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) -00:01:47 verbose #1874 > // |> SpiralSm.concat " " -00:01:47 verbose #1875 > inl input_length = input |> sm.length -00:01:47 verbose #1876 > am.singleton 0i32 -00:01:47 verbose #1877 > |> am.append (am'.init_series 1 (input_length - 1) 1) -00:01:47 verbose #1878 > |> am.map (fun i => -00:01:47 verbose #1879 > inl a = input |> sm'.slice i (input_length - 1) -00:01:47 verbose #1880 > inl b = input |> sm'.slice 0 (i - 1) -00:01:47 verbose #1881 > $"!a + !b" : string -00:01:47 verbose #1882 > ) -00:01:47 verbose #1883 > |> seq.of_array -00:01:47 verbose #1884 > |> sm'.concat " " -00:01:47 verbose #1885 > -00:01:47 verbose #1886 > "FA", -00:01:47 verbose #1887 > fun input => -00:01:47 verbose #1888 > // List.singleton 0 -00:01:47 verbose #1889 > // |> List.append [[ 1 .. input.Length - 1 ]] -00:01:47 verbose #1890 > // // |> List.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]]) -00:01:47 verbose #1891 > // |> SpiralSm.concat " " -00:01:47 verbose #1892 > inl input_length = input |> sm.length -00:01:47 verbose #1893 > listm.singleton 0i32 -00:01:47 verbose #1894 > |> listm.append (listm'.init_series 1 (input_length - 1) 1) -00:01:47 verbose #1895 > |> listm.map (fun i => -00:01:47 verbose #1896 > inl a = input |> sm'.slice i (input_length - 1) -00:01:47 verbose #1897 > inl b = if i = 0 then "" else input |> sm'.slice 0 (i - 1) -00:01:47 verbose #1898 > $"!a + !b" : string -00:01:47 verbose #1899 > ) -00:01:47 verbose #1900 > |> listm.toArray -00:01:47 verbose #1901 > |> fun x => x : a i32 _ -00:01:47 verbose #1902 > |> seq.of_array -00:01:47 verbose #1903 > |> sm'.concat " " -00:01:47 verbose #1904 > -00:01:47 verbose #1905 > // "FB", -00:01:47 verbose #1906 > // fun input => -00:01:47 verbose #1907 > // Seq.singleton 0 -00:01:47 verbose #1908 > // // |> Seq.append (seq { 1 .. input.Length - 1 }) -00:01:47 verbose #1909 > // // |> Seq.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]]) -00:01:47 verbose #1910 > // |> SpiralSm.concat " " -00:01:47 verbose #1911 > -00:01:47 verbose #1912 > // "FC", -00:01:47 verbose #1913 > // fun input => -00:01:47 verbose #1914 > // Array.singleton 0 -00:01:47 verbose #1915 > // |> Array.append (a ;[[ 1 .. input.Length - 1 ]]) -00:01:47 verbose #1916 > //// |> Array.Parallel.map (fun i => input.[[ i .. ]] + input.[[ .. i -00:01:47 verbose #1917 > - 1 ]]) -00:01:47 verbose #1918 > // |> SpiralSm.concat " " -00:01:47 verbose #1919 > ]] -00:01:47 verbose #1920 > -00:01:47 verbose #1921 > inl rec rotate_strings_tests () = -00:01:47 verbose #1922 > inl test_cases = [[ -00:01:47 verbose #1923 > "abc", "bca cab abc" -00:01:47 verbose #1924 > "abcde", "bcdea cdeab deabc eabcd abcde" -00:01:47 verbose #1925 > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde -00:01:47 verbose #1926 > ghiabcdef hiabcdefg iabcdefgh abcdefghi" -00:01:47 verbose #1927 > "abab", "baba abab baba abab" -00:01:47 verbose #1928 > "aa", "aa aa" -00:01:47 verbose #1929 > "z", "z" -00:01:47 verbose #1930 > ]] -00:01:47 verbose #1931 > -00:01:47 verbose #1932 > inl solutions = get_solutions () -00:01:47 verbose #1933 > -00:01:47 verbose #1934 > // inl is_fast () = true -00:01:47 verbose #1935 > -00:01:47 verbose #1936 > inl count = -00:01:47 verbose #1937 > if is_fast () -00:01:47 verbose #1938 > then 1000i32 -00:01:47 verbose #1939 > else 2000000i32 -00:01:47 verbose #1940 > -00:01:47 verbose #1941 > run_all (nameof rotate_strings_tests) count solutions test_cases -00:01:47 verbose #1942 > |> sort_result_list -00:01:47 verbose #1943 > -00:01:47 verbose #1944 > rotate_strings_tests () -00:01:47 verbose #1945 > -00:01:47 verbose #1946 > ╭─[ 26.82s - stdout ]──────────────────────────────────────────────────────────╮ -00:01:47 verbose #1947 > │ │ -00:01:47 verbose #1948 > │ │ -00:01:47 verbose #1949 > │ Test: v0 │ -00:01:47 verbose #1950 > │ │ -00:01:47 verbose #1951 > │ Solution: "abc" │ -00:01:47 verbose #1952 > │ Test case 1. F. Time: 1074 │ -00:01:47 verbose #1953 > │ Test case 2. FA. Time: 1148 │ -00:01:47 verbose #1954 > │ │ -00:01:47 verbose #1955 > │ Solution: "abcde" │ -00:01:47 verbose #1956 > │ Test case 1. F. Time: 1183 │ -00:01:47 verbose #1957 > │ Test case 2. FA. Time: 1437 │ -00:01:47 verbose #1958 > │ │ -00:01:47 verbose #1959 > │ Solution: "abcdefghi" │ -00:01:47 verbose #1960 > │ Test case 1. F. Time: 2158 │ -00:01:47 verbose #1961 > │ Test case 2. FA. Time: 2176 │ -00:01:47 verbose #1962 > │ │ -00:01:47 verbose #1963 > │ Solution: "abab" │ -00:01:47 verbose #1964 > │ Test case 1. F. Time: 1106 │ -00:01:47 verbose #1965 > │ Test case 2. FA. Time: 1375 │ -00:01:47 verbose #1966 > │ │ -00:01:47 verbose #1967 > │ Solution: "aa" │ -00:01:47 verbose #1968 > │ Test case 1. F. Time: 843 │ -00:01:47 verbose #1969 > │ Test case 2. FA. Time: 775 │ -00:01:47 verbose #1970 > │ │ -00:01:47 verbose #1971 > │ Solution: "z" │ -00:01:47 verbose #1972 > │ Test case 1. F. Time: 180 │ -00:01:47 verbose #1973 > │ Test case 2. FA. Time: 177 │ -00:01:47 verbose #1974 > │ │ -00:01:47 verbose #1975 > │ Input | Expected │ -00:01:47 verbose #1976 > │ │ -00:01:47 verbose #1977 > │ | Result │ -00:01:47 verbose #1978 > │ │ -00:01:47 verbose #1979 > │ | Best │ -00:01:47 verbose #1980 > │ --- | --- │ -00:01:47 verbose #1981 > │ │ -00:01:47 verbose #1982 > │ | --- │ -00:01:47 verbose #1983 > │ │ -00:01:47 verbose #1984 > │ | --- │ -00:01:47 verbose #1985 > │ "abc" | "bca cab abc" │ -00:01:47 verbose #1986 > │ │ -00:01:47 verbose #1987 > │ | "bca cab abc" │ -00:01:47 verbose #1988 > │ │ -00:01:47 verbose #1989 > │ | struct (1L, 1074L) │ -00:01:47 verbose #1990 > │ "abcde" | "bcdea cdeab deabc eabcd abcde" │ -00:01:47 verbose #1991 > │ | "bcdea cdeab deabc eabcd abcde" │ -00:01:47 verbose #1992 > │ | struct (1L, 1183L) │ -00:01:47 verbose #1993 > │ "abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │ -00:01:47 verbose #1994 > │ hiabcdefg iabcdefgh abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd │ -00:01:47 verbose #1995 > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi" | struct (1L, 2158L) │ -00:01:47 verbose #1996 > │ "abab" | "baba abab baba abab" │ -00:01:47 verbose #1997 > │ | "baba abab baba abab" │ -00:01:47 verbose #1998 > │ | struct (1L, 1106L) │ -00:01:47 verbose #1999 > │ "aa" | "aa aa" │ -00:01:47 verbose #2000 > │ │ -00:01:47 verbose #2001 > │ | "aa aa" │ -00:01:47 verbose #2002 > │ │ -00:01:47 verbose #2003 > │ | struct (2L, 775L) │ -00:01:47 verbose #2004 > │ "z" | "z" │ -00:01:47 verbose #2005 > │ │ -00:01:47 verbose #2006 > │ | "z" │ -00:01:47 verbose #2007 > │ │ -00:01:47 verbose #2008 > │ | struct (2L, 177L) │ -00:01:47 verbose #2009 > │ │ -00:01:47 verbose #2010 > │ Average Ranking │ -00:01:47 verbose #2011 > │ Test case 1. Average Time: 1090L │ -00:01:47 verbose #2012 > │ Test case 2. Average Time: 1181L │ -00:01:47 verbose #2013 > │ │ -00:01:47 verbose #2014 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #2015 > -00:01:47 verbose #2016 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #2017 > //// test -00:01:47 verbose #2018 > -00:01:47 verbose #2019 > // rotate_strings_tests () -00:01:47 verbose #2020 > () -00:01:47 verbose #2021 > -00:01:47 verbose #2022 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #2023 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #2024 > │ ## binary_search_tests │ -00:01:47 verbose #2025 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #2026 > -00:01:47 verbose #2027 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #2028 > //// test -00:01:47 verbose #2029 > //// timeout=90000 -00:01:47 verbose #2030 > -00:01:47 verbose #2031 > inl binary_search_semi_open_1 arr target left right = -00:01:47 verbose #2032 > inl rec body left right = -00:01:47 verbose #2033 > if left >= right -00:01:47 verbose #2034 > then None -00:01:47 verbose #2035 > else -00:01:47 verbose #2036 > inl mid = (left + right) / 2 -00:01:47 verbose #2037 > inl item = index arr mid -00:01:47 verbose #2038 > if item = target -00:01:47 verbose #2039 > then Some mid -00:01:47 verbose #2040 > elif item < target -00:01:47 verbose #2041 > then loop (mid + 1) right -00:01:47 verbose #2042 > else loop left mid -00:01:47 verbose #2043 > and inl loop left right = -00:01:47 verbose #2044 > if var_is right |> not -00:01:47 verbose #2045 > then body left right -00:01:47 verbose #2046 > else -00:01:47 verbose #2047 > inl left = dyn left -00:01:47 verbose #2048 > join body left right -00:01:47 verbose #2049 > loop left right -00:01:47 verbose #2050 > -00:01:47 verbose #2051 > inl binary_search_closed_1 arr target left right = -00:01:47 verbose #2052 > inl rec body left right = -00:01:47 verbose #2053 > if left > right -00:01:47 verbose #2054 > then None -00:01:47 verbose #2055 > else -00:01:47 verbose #2056 > inl mid = (left + right) / 2 -00:01:47 verbose #2057 > inl item = index arr mid -00:01:47 verbose #2058 > if item = target -00:01:47 verbose #2059 > then Some mid -00:01:47 verbose #2060 > elif item < target -00:01:47 verbose #2061 > then loop (mid + 1) right -00:01:47 verbose #2062 > else loop left (mid - 1) -00:01:47 verbose #2063 > and inl loop left right = -00:01:47 verbose #2064 > if var_is right |> not -00:01:47 verbose #2065 > then body left right -00:01:47 verbose #2066 > else -00:01:47 verbose #2067 > inl left = dyn left -00:01:47 verbose #2068 > join body left right -00:01:47 verbose #2069 > loop left right -00:01:47 verbose #2070 > -00:01:47 verbose #2071 > inl binary_search_semi_open_2 arr target left right = -00:01:47 verbose #2072 > let rec body left right = -00:01:47 verbose #2073 > if left >= right -00:01:47 verbose #2074 > then None -00:01:47 verbose #2075 > else -00:01:47 verbose #2076 > inl mid = (left + right) / 2 -00:01:47 verbose #2077 > inl item = index arr mid -00:01:47 verbose #2078 > if item = target -00:01:47 verbose #2079 > then Some mid -00:01:47 verbose #2080 > elif item < target -00:01:47 verbose #2081 > then loop (mid + 1) right -00:01:47 verbose #2082 > else loop left mid -00:01:47 verbose #2083 > and inl loop left right = body left right -00:01:47 verbose #2084 > loop left right -00:01:47 verbose #2085 > -00:01:47 verbose #2086 > inl binary_search_closed_2 arr target left right = -00:01:47 verbose #2087 > let rec body left right = -00:01:47 verbose #2088 > if left > right -00:01:47 verbose #2089 > then None -00:01:47 verbose #2090 > else -00:01:47 verbose #2091 > inl mid = (left + right) / 2 -00:01:47 verbose #2092 > inl item = index arr mid -00:01:47 verbose #2093 > if item = target -00:01:47 verbose #2094 > then Some mid -00:01:47 verbose #2095 > elif item < target -00:01:47 verbose #2096 > then loop (mid + 1) right -00:01:47 verbose #2097 > else loop left (mid - 1) -00:01:47 verbose #2098 > and inl loop left right = body left right -00:01:47 verbose #2099 > loop left right -00:01:47 verbose #2100 > -00:01:47 verbose #2101 > inl get_solutions () = -00:01:47 verbose #2102 > [[ -00:01:47 verbose #2103 > "semi_open_1", -00:01:47 verbose #2104 > fun (arr, (target, len)) => -00:01:47 verbose #2105 > binary_search_semi_open_1 arr target 0 len -00:01:47 verbose #2106 > -00:01:47 verbose #2107 > "closed_1", -00:01:47 verbose #2108 > fun (arr, (target, len)) => -00:01:47 verbose #2109 > binary_search_closed_1 arr target 0 (len - 1) -00:01:47 verbose #2110 > -00:01:47 verbose #2111 > "semi_open_2", -00:01:47 verbose #2112 > fun (arr, (target, len)) => -00:01:47 verbose #2113 > binary_search_semi_open_2 arr target 0 len -00:01:47 verbose #2114 > -00:01:47 verbose #2115 > "closed_2", -00:01:47 verbose #2116 > fun (arr, (target, len)) => -00:01:47 verbose #2117 > binary_search_closed_2 arr target 0 (len - 1) -00:01:47 verbose #2118 > ]] -00:01:47 verbose #2119 > -00:01:47 verbose #2120 > inl rec binary_search_tests () = -00:01:47 verbose #2121 > inl arr_with_len target len arr = -00:01:47 verbose #2122 > arr, (target, (len |> optionm'.default_with fun () => length arr)) -00:01:47 verbose #2123 > -00:01:47 verbose #2124 > inl test_cases = [[ -00:01:47 verbose #2125 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 None), (Some 3i32) -00:01:47 verbose #2126 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 None), (Some 0i32) -00:01:47 verbose #2127 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 None), (Some 6i32) -00:01:47 verbose #2128 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 None), None -00:01:47 verbose #2129 > ((am'.init_series 1i32 100 1) |> arr_with_len 60 None), (Some 59) -00:01:47 verbose #2130 > -00:01:47 verbose #2131 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 (Some 7)), (Some -00:01:47 verbose #2132 > 3i32) -00:01:47 verbose #2133 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 (Some 7)), (Some -00:01:47 verbose #2134 > 0i32) -00:01:47 verbose #2135 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 (Some 7)), (Some -00:01:47 verbose #2136 > 6i32) -00:01:47 verbose #2137 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 (Some 7)), None -00:01:47 verbose #2138 > ((am'.init_series 1i32 100 1) |> arr_with_len 60 (Some 100)), (Some 59) -00:01:47 verbose #2139 > ]] -00:01:47 verbose #2140 > -00:01:47 verbose #2141 > inl solutions = get_solutions () -00:01:47 verbose #2142 > -00:01:47 verbose #2143 > // inl is_fast () = true -00:01:47 verbose #2144 > -00:01:47 verbose #2145 > inl count = -00:01:47 verbose #2146 > if is_fast () -00:01:47 verbose #2147 > then 1000i32 -00:01:47 verbose #2148 > else 8000000i32 -00:01:47 verbose #2149 > -00:01:47 verbose #2150 > run_all (nameof binary_search_tests) count solutions test_cases -00:01:47 verbose #2151 > |> sort_result_list -00:01:47 verbose #2152 > -00:01:47 verbose #2153 > -00:01:47 verbose #2154 > let main () = -00:01:47 verbose #2155 > binary_search_tests () -00:01:47 verbose #2156 > -00:01:47 verbose #2157 > ╭─[ 32.69s - stdout ]──────────────────────────────────────────────────────────╮ -00:01:47 verbose #2158 > │ │ -00:01:47 verbose #2159 > │ │ -00:01:47 verbose #2160 > │ Test: v25 │ -00:01:47 verbose #2161 > │ │ -00:01:47 verbose #2162 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │ -00:01:47 verbose #2163 > │ Test case 1. semi_open_1. Time: 575 │ -00:01:47 verbose #2164 > │ Test case 2. closed_1. Time: 583 │ -00:01:47 verbose #2165 > │ Test case 3. semi_open_2. Time: 473 │ -00:01:47 verbose #2166 > │ Test case 4. closed_2. Time: 439 │ -00:01:47 verbose #2167 > │ │ -00:01:47 verbose #2168 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │ -00:01:47 verbose #2169 > │ Test case 1. semi_open_1. Time: 428 │ -00:01:47 verbose #2170 > │ Test case 2. closed_1. Time: 406 │ -00:01:47 verbose #2171 > │ Test case 3. semi_open_2. Time: 412 │ -00:01:47 verbose #2172 > │ Test case 4. closed_2. Time: 400 │ -00:01:47 verbose #2173 > │ │ -00:01:47 verbose #2174 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │ -00:01:47 verbose #2175 > │ Test case 1. semi_open_1. Time: 542 │ -00:01:47 verbose #2176 > │ Test case 2. closed_1. Time: 423 │ -00:01:47 verbose #2177 > │ Test case 3. semi_open_2. Time: 422 │ -00:01:47 verbose #2178 > │ Test case 4. closed_2. Time: 426 │ -00:01:47 verbose #2179 > │ │ -00:01:47 verbose #2180 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │ -00:01:47 verbose #2181 > │ Test case 1. semi_open_1. Time: 429 │ -00:01:47 verbose #2182 > │ Test case 2. closed_1. Time: 437 │ -00:01:47 verbose #2183 > │ Test case 3. semi_open_2. Time: 443 │ -00:01:47 verbose #2184 > │ Test case 4. closed_2. Time: 462 │ -00:01:47 verbose #2185 > │ │ -00:01:47 verbose #2186 > │ Solution: struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; │ -00:01:47 verbose #2187 > │ 17; 18; 19; 20; │ -00:01:47 verbose #2188 > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │ -00:01:47 verbose #2189 > │ 37; 38; │ -00:01:47 verbose #2190 > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │ -00:01:47 verbose #2191 > │ 55; 56; │ -00:01:47 verbose #2192 > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │ -00:01:47 verbose #2193 > │ 73; 74; │ -00:01:47 verbose #2194 > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │ -00:01:47 verbose #2195 > │ 91; 92; │ -00:01:47 verbose #2196 > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) │ -00:01:47 verbose #2197 > │ Test case 1. semi_open_1. Time: 439 │ -00:01:47 verbose #2198 > │ Test case 2. closed_1. Time: 446 │ -00:01:47 verbose #2199 > │ Test case 3. semi_open_2. Time: 435 │ -00:01:47 verbose #2200 > │ Test case 4. closed_2. Time: 437 │ -00:01:47 verbose #2201 > │ │ -00:01:47 verbose #2202 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │ -00:01:47 verbose #2203 > │ Test case 1. semi_open_1. Time: 406 │ -00:01:47 verbose #2204 > │ Test case 2. closed_1. Time: 401 │ -00:01:47 verbose #2205 > │ Test case 3. semi_open_2. Time: 409 │ -00:01:47 verbose #2206 > │ Test case 4. closed_2. Time: 416 │ -00:01:47 verbose #2207 > │ │ -00:01:47 verbose #2208 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │ -00:01:47 verbose #2209 > │ Test case 1. semi_open_1. Time: 424 │ -00:01:47 verbose #2210 > │ Test case 2. closed_1. Time: 424 │ -00:01:47 verbose #2211 > │ Test case 3. semi_open_2. Time: 437 │ -00:01:47 verbose #2212 > │ Test case 4. closed_2. Time: 432 │ -00:01:47 verbose #2213 > │ │ -00:01:47 verbose #2214 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │ -00:01:47 verbose #2215 > │ Test case 1. semi_open_1. Time: 426 │ -00:01:47 verbose #2216 > │ Test case 2. closed_1. Time: 436 │ -00:01:47 verbose #2217 > │ Test case 3. semi_open_2. Time: 420 │ -00:01:47 verbose #2218 > │ Test case 4. closed_2. Time: 421 │ -00:01:47 verbose #2219 > │ │ -00:01:47 verbose #2220 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │ -00:01:47 verbose #2221 > │ Test case 1. semi_open_1. Time: 431 │ -00:01:47 verbose #2222 > │ Test case 2. closed_1. Time: 416 │ -00:01:47 verbose #2223 > │ Test case 3. semi_open_2. Time: 427 │ -00:01:47 verbose #2224 > │ Test case 4. closed_2. Time: 426 │ -00:01:47 verbose #2225 > │ │ -00:01:47 verbose #2226 > │ Solution: struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; │ -00:01:47 verbose #2227 > │ 17; 18; 19; 20; │ -00:01:47 verbose #2228 > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │ -00:01:47 verbose #2229 > │ 37; 38; │ -00:01:47 verbose #2230 > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │ -00:01:47 verbose #2231 > │ 55; 56; │ -00:01:47 verbose #2232 > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │ -00:01:47 verbose #2233 > │ 73; 74; │ -00:01:47 verbose #2234 > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │ -00:01:47 verbose #2235 > │ 91; 92; │ -00:01:47 verbose #2236 > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) │ -00:01:47 verbose #2237 > │ Test case 1. semi_open_1. Time: 424 │ -00:01:47 verbose #2238 > │ Test case 2. closed_1. Time: 436 │ -00:01:47 verbose #2239 > │ Test case 3. semi_open_2. Time: 451 │ -00:01:47 verbose #2240 > │ Test case 4. closed_2. Time: 422 │ -00:01:47 verbose #2241 > │ │ -00:01:47 verbose #2242 > │ Input │ -00:01:47 verbose #2243 > │ │ -00:01:47 verbose #2244 > │ │ -00:01:47 verbose #2245 > │ │ -00:01:47 verbose #2246 > │ | Expected | Result | Best │ -00:01:47 verbose #2247 > │ --- │ -00:01:47 verbose #2248 > │ │ -00:01:47 verbose #2249 > │ │ -00:01:47 verbose #2250 > │ │ -00:01:47 verbose #2251 > │ | --- | --- | --- │ -00:01:47 verbose #2252 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │ -00:01:47 verbose #2253 > │ │ -00:01:47 verbose #2254 > │ │ -00:01:47 verbose #2255 > │ │ -00:01:47 verbose #2256 > │ | US0_0 3 | US0_0 3 | struct (4L, 439L) │ -00:01:47 verbose #2257 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │ -00:01:47 verbose #2258 > │ │ -00:01:47 verbose #2259 > │ │ -00:01:47 verbose #2260 > │ │ -00:01:47 verbose #2261 > │ | US0_0 0 | US0_0 0 | struct (4L, 400L) │ -00:01:47 verbose #2262 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │ -00:01:47 verbose #2263 > │ │ -00:01:47 verbose #2264 > │ │ -00:01:47 verbose #2265 > │ │ -00:01:47 verbose #2266 > │ | US0_0 6 | US0_0 6 | struct (3L, 422L) │ -00:01:47 verbose #2267 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │ -00:01:47 verbose #2268 > │ │ -00:01:47 verbose #2269 > │ │ -00:01:47 verbose #2270 > │ │ -00:01:47 verbose #2271 > │ | US0_1 | US0_1 | struct (1L, 429L) │ -00:01:47 verbose #2272 > │ struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; │ -00:01:47 verbose #2273 > │ 20; │ -00:01:47 verbose #2274 > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │ -00:01:47 verbose #2275 > │ 37; 38; │ -00:01:47 verbose #2276 > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │ -00:01:47 verbose #2277 > │ 55; 56; │ -00:01:47 verbose #2278 > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │ -00:01:47 verbose #2279 > │ 73; 74; │ -00:01:47 verbose #2280 > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │ -00:01:47 verbose #2281 > │ 91; 92; │ -00:01:47 verbose #2282 > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) | US0_0 59 | US0_0 59 | │ -00:01:47 verbose #2283 > │ struct (3L, 435L) │ -00:01:47 verbose #2284 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │ -00:01:47 verbose #2285 > │ │ -00:01:47 verbose #2286 > │ │ -00:01:47 verbose #2287 > │ │ -00:01:47 verbose #2288 > │ | US0_0 3 | US0_0 3 | struct (2L, 401L) │ -00:01:47 verbose #2289 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │ -00:01:47 verbose #2290 > │ │ -00:01:47 verbose #2291 > │ │ -00:01:47 verbose #2292 > │ │ -00:01:47 verbose #2293 > │ | US0_0 0 | US0_0 0 | struct (1L, 424L) │ -00:01:47 verbose #2294 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │ -00:01:47 verbose #2295 > │ │ -00:01:47 verbose #2296 > │ │ -00:01:47 verbose #2297 > │ │ -00:01:47 verbose #2298 > │ | US0_0 6 | US0_0 6 | struct (3L, 420L) │ -00:01:47 verbose #2299 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │ -00:01:47 verbose #2300 > │ │ -00:01:47 verbose #2301 > │ │ -00:01:47 verbose #2302 > │ │ -00:01:47 verbose #2303 > │ | US0_1 | US0_1 | struct (2L, 416L) │ -00:01:47 verbose #2304 > │ struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; │ -00:01:47 verbose #2305 > │ 20; │ -00:01:47 verbose #2306 > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │ -00:01:47 verbose #2307 > │ 37; 38; │ -00:01:47 verbose #2308 > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │ -00:01:47 verbose #2309 > │ 55; 56; │ -00:01:47 verbose #2310 > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │ -00:01:47 verbose #2311 > │ 73; 74; │ -00:01:47 verbose #2312 > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │ -00:01:47 verbose #2313 > │ 91; 92; │ -00:01:47 verbose #2314 > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) | US0_0 59 | US0_0 59 | │ -00:01:47 verbose #2315 > │ struct (4L, 422L) │ -00:01:47 verbose #2316 > │ │ -00:01:47 verbose #2317 > │ Average Ranking │ -00:01:47 verbose #2318 > │ Test case 4. Average Time: 428L │ -00:01:47 verbose #2319 > │ Test case 3. Average Time: 432L │ -00:01:47 verbose #2320 > │ Test case 2. Average Time: 440L │ -00:01:47 verbose #2321 > │ Test case 1. Average Time: 452L │ -00:01:47 verbose #2322 > │ │ -00:01:47 verbose #2323 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #2324 > -00:01:47 verbose #2325 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #2326 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #2327 > │ ## returnLettersWithOddCountTests │ -00:01:47 verbose #2328 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #2329 > -00:01:47 verbose #2330 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #2331 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #2332 > │ Test: ReturnLettersWithOddCount │ -00:01:47 verbose #2333 > │ │ -00:01:47 verbose #2334 > │ Solution: 1 │ -00:01:47 verbose #2335 > │ Test case 1. A. Time: 645L │ -00:01:47 verbose #2336 > │ │ -00:01:47 verbose #2337 > │ Solution: 2 │ -00:01:47 verbose #2338 > │ Test case 1. A. Time: 663L │ -00:01:47 verbose #2339 > │ │ -00:01:47 verbose #2340 > │ Solution: 3 │ -00:01:47 verbose #2341 > │ Test case 1. A. Time: 680L │ -00:01:47 verbose #2342 > │ │ -00:01:47 verbose #2343 > │ Solution: 9 │ -00:01:47 verbose #2344 > │ Test case 1. A. Time: 730L │ -00:01:47 verbose #2345 > │ │ -00:01:47 verbose #2346 > │ Solution: 10 │ -00:01:47 verbose #2347 > │ Test case 1. A. Time: 815L │ -00:01:47 verbose #2348 > │ │ -00:01:47 verbose #2349 > │ Input | Expected | Result | Best │ -00:01:47 verbose #2350 > │ --- | --- | --- | --- │ -00:01:47 verbose #2351 > │ 1 | a | a | (1, 645) │ -00:01:47 verbose #2352 > │ 2 | ba | ba | (1, 663) │ -00:01:47 verbose #2353 > │ 3 | aaa | aaa | (1, 680) │ -00:01:47 verbose #2354 > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 730) │ -00:01:47 verbose #2355 > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 815) │ -00:01:47 verbose #2356 > │ │ -00:01:47 verbose #2357 > │ Averages │ -00:01:47 verbose #2358 > │ Test case 1. Average Time: 706L │ -00:01:47 verbose #2359 > │ │ -00:01:47 verbose #2360 > │ Ranking │ -00:01:47 verbose #2361 > │ Test case 1. Average Time: 706L │ -00:01:47 verbose #2362 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #2363 > -00:01:47 verbose #2364 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #2365 > //// test -00:01:47 verbose #2366 > -00:01:47 verbose #2367 > let solutions = [[ -00:01:47 verbose #2368 > "A", -00:01:47 verbose #2369 > fun n -> -00:01:47 verbose #2370 > let mutable _builder = StringBuilder (new string('a', n)) -00:01:47 verbose #2371 > if n % 2 = 0 then -00:01:47 verbose #2372 > _builder.[[0]] <- 'b' -00:01:47 verbose #2373 > -00:01:47 verbose #2374 > _builder.ToString () -00:01:47 verbose #2375 > ]] -00:01:47 verbose #2376 > let testCases = seq { -00:01:47 verbose #2377 > 1, "a" -00:01:47 verbose #2378 > 2, "ba" -00:01:47 verbose #2379 > 3, "aaa" -00:01:47 verbose #2380 > 9, "aaaaaaaaa" -00:01:47 verbose #2381 > 10, "baaaaaaaaa" -00:01:47 verbose #2382 > } -00:01:47 verbose #2383 > let rec returnLettersWithOddCountTests = -00:01:47 verbose #2384 > runAll (nameof returnLettersWithOddCountTests) _count solutions testCases -00:01:47 verbose #2385 > returnLettersWithOddCountTests -00:01:47 verbose #2386 > |> sortResultList -00:01:47 verbose #2387 > -00:01:47 verbose #2388 > ╭─[ 1.14s - stdout ]───────────────────────────────────────────────────────────╮ -00:01:47 verbose #2389 > │ │ -00:01:47 verbose #2390 > │ │ -00:01:47 verbose #2391 > │ Test: returnLettersWithOddCountTests │ -00:01:47 verbose #2392 > │ │ -00:01:47 verbose #2393 > │ Solution: 1 │ -00:01:47 verbose #2394 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #2395 > │ │ -00:01:47 verbose #2396 > │ Solution: 2 │ -00:01:47 verbose #2397 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #2398 > │ │ -00:01:47 verbose #2399 > │ Solution: 3 │ -00:01:47 verbose #2400 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #2401 > │ │ -00:01:47 verbose #2402 > │ Solution: 9 │ -00:01:47 verbose #2403 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #2404 > │ │ -00:01:47 verbose #2405 > │ Solution: 10 │ -00:01:47 verbose #2406 > │ Test case 1. A. Time: 2L │ -00:01:47 verbose #2407 > │ │ -00:01:47 verbose #2408 > │ Input | Expected | Result | Best │ -00:01:47 verbose #2409 > │ --- | --- | --- | --- │ -00:01:47 verbose #2410 > │ 1 | a | a | (1, 0) │ -00:01:47 verbose #2411 > │ 2 | ba | ba | (1, 0) │ -00:01:47 verbose #2412 > │ 3 | aaa | aaa | (1, 0) │ -00:01:47 verbose #2413 > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 0) │ -00:01:47 verbose #2414 > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 2) │ -00:01:47 verbose #2415 > │ │ -00:01:47 verbose #2416 > │ Average Ranking │ -00:01:47 verbose #2417 > │ Test case 1. Average Time: 0L │ -00:01:47 verbose #2418 > │ │ -00:01:47 verbose #2419 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #2420 > -00:01:47 verbose #2421 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #2422 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #2423 > │ ## hasAnyPairCloseToEachotherTests │ -00:01:47 verbose #2424 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #2425 > -00:01:47 verbose #2426 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:47 verbose #2427 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:47 verbose #2428 > │ Test: HasAnyPairCloseToEachother │ -00:01:47 verbose #2429 > │ │ -00:01:47 verbose #2430 > │ Solution: 0 │ -00:01:47 verbose #2431 > │ Test case 1. A. Time: 137L │ -00:01:47 verbose #2432 > │ │ -00:01:47 verbose #2433 > │ Solution: 1,2 │ -00:01:47 verbose #2434 > │ Test case 1. A. Time: 186L │ -00:01:47 verbose #2435 > │ │ -00:01:47 verbose #2436 > │ Solution: 3,5 │ -00:01:47 verbose #2437 > │ Test case 1. A. Time: 206L │ -00:01:47 verbose #2438 > │ │ -00:01:47 verbose #2439 > │ Solution: 3,4,6 │ -00:01:47 verbose #2440 > │ Test case 1. A. Time: 149L │ -00:01:47 verbose #2441 > │ │ -00:01:47 verbose #2442 > │ Solution: 2,4,6 │ -00:01:47 verbose #2443 > │ Test case 1. A. Time: 150L │ -00:01:47 verbose #2444 > │ │ -00:01:47 verbose #2445 > │ Input | Expected | Result | Best │ -00:01:47 verbose #2446 > │ --- | --- | --- | --- │ -00:01:47 verbose #2447 > │ 0 | False | False | (1, 137) │ -00:01:47 verbose #2448 > │ 1,2 | True | True | (1, 186) │ -00:01:47 verbose #2449 > │ 3,5 | False | False | (1, 206) │ -00:01:47 verbose #2450 > │ 3,4,6 | True | True | (1, 149) │ -00:01:47 verbose #2451 > │ 2,4,6 | False | False | (1, 150) │ -00:01:47 verbose #2452 > │ │ -00:01:47 verbose #2453 > │ Averages │ -00:01:47 verbose #2454 > │ Test case 1. Average Time: 165L │ -00:01:47 verbose #2455 > │ │ -00:01:47 verbose #2456 > │ Ranking │ -00:01:47 verbose #2457 > │ Test case 1. Average Time: 165L │ -00:01:47 verbose #2458 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #2459 > -00:01:47 verbose #2460 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:01:47 verbose #2461 > //// test -00:01:47 verbose #2462 > -00:01:47 verbose #2463 > let solutions = [[ -00:01:47 verbose #2464 > "A", -00:01:47 verbose #2465 > fun (a: int[[]]) -> -00:01:47 verbose #2466 > let indices = System.Linq.Enumerable.Range(0, a.Length) |> -00:01:47 verbose #2467 > System.Linq.Enumerable.ToArray -00:01:47 verbose #2468 > System.Array.Sort (a, indices) -00:01:47 verbose #2469 > -00:01:47 verbose #2470 > indices -00:01:47 verbose #2471 > |> Array.take (a.Length - 1) -00:01:47 verbose #2472 > |> Array.exists (fun i -> a.[[i + 1]] - a.[[i]] = 1) -00:01:47 verbose #2473 > ]] -00:01:47 verbose #2474 > let testCases = seq { -00:01:47 verbose #2475 > [[| 0 |]], false -00:01:47 verbose #2476 > [[| 1; 2 |]], true -00:01:47 verbose #2477 > [[| 3; 5 |]], false -00:01:47 verbose #2478 > [[| 3; 4; 6 |]], true -00:01:47 verbose #2479 > [[| 2; 4; 6 |]], false -00:01:47 verbose #2480 > } -00:01:47 verbose #2481 > let rec hasAnyPairCloseToEachotherTests = -00:01:47 verbose #2482 > runAll (nameof hasAnyPairCloseToEachotherTests) _count solutions testCases -00:01:47 verbose #2483 > hasAnyPairCloseToEachotherTests -00:01:47 verbose #2484 > |> sortResultList -00:01:47 verbose #2485 > -00:01:47 verbose #2486 > ╭─[ 1.04s - stdout ]───────────────────────────────────────────────────────────╮ -00:01:47 verbose #2487 > │ │ -00:01:47 verbose #2488 > │ │ -00:01:47 verbose #2489 > │ Test: hasAnyPairCloseToEachotherTests │ -00:01:47 verbose #2490 > │ │ -00:01:47 verbose #2491 > │ Solution: 0 │ -00:01:47 verbose #2492 > │ Test case 1. A. Time: 2L │ -00:01:47 verbose #2493 > │ │ -00:01:47 verbose #2494 > │ Solution: 1,2 │ -00:01:47 verbose #2495 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #2496 > │ │ -00:01:47 verbose #2497 > │ Solution: 3,5 │ -00:01:47 verbose #2498 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #2499 > │ │ -00:01:47 verbose #2500 > │ Solution: 3,4,6 │ -00:01:47 verbose #2501 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #2502 > │ │ -00:01:47 verbose #2503 > │ Solution: 2,4,6 │ -00:01:47 verbose #2504 > │ Test case 1. A. Time: 0L │ -00:01:47 verbose #2505 > │ │ -00:01:47 verbose #2506 > │ Input | Expected | Result | Best │ -00:01:47 verbose #2507 > │ --- | --- | --- | --- │ -00:01:47 verbose #2508 > │ 0 | False | False | (1, 2) │ -00:01:47 verbose #2509 > │ 1,2 | True | True | (1, 0) │ -00:01:47 verbose #2510 > │ 3,5 | False | False | (1, 0) │ -00:01:47 verbose #2511 > │ 3,4,6 | True | True | (1, 0) │ -00:01:47 verbose #2512 > │ 2,4,6 | False | False | (1, 0) │ -00:01:47 verbose #2513 > │ │ -00:01:47 verbose #2514 > │ Average Ranking │ -00:01:47 verbose #2515 > │ Test case 1. Average Time: 0L │ -00:01:47 verbose #2516 > │ │ -00:01:47 verbose #2517 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:47 verbose #2518 > 00:01:45 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 124798 -00:01:47 verbose #2519 > 00:01:45 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:01:52 verbose #2520 > 00:01:50 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/perf/Perf.dib.ipynb to html\e[0m -00:01:52 verbose #2521 > 00:01:50 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:01:52 verbose #2522 > 00:01:50 verbose #7 \e[4;7m validate(nb)\e[0m -00:01:52 verbose #2523 > 00:01:50 verbose #8 \e[4;7m[NbConvertApp] Writing 445286 bytes to c:\home\git\polyglot\apps\perf\Perf.dib.html\e[0m -00:01:52 verbose #2524 > 00:01:50 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 597 -00:01:52 verbose #2525 > 00:01:50 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 597 -00:01:52 verbose #2526 > 00:01:50 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/perf/Perf.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/perf/Perf.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:01:53 verbose #2527 > 00:01:51 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:01:53 verbose #2528 > 00:01:51 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:01:53 verbose #2529 > 00:01:51 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 125454 -00:01:53 debug #2530 execute_with_options_async / exit_code: 0 / output.Length: 127739 -00:01:53 debug #3 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path Perf.dib --retries 3 -00:01:53 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False -00:01:53 debug #7 run_with_timeout_async / timeout: 100 +00:00:06 verbose #10 > > +00:00:06 verbose #11 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:06 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:06 verbose #13 > > │ ## Perf (Polyglot) │ +00:00:06 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:06 verbose #15 > > +00:00:06 verbose #16 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:06 verbose #17 > > #!import ../../lib/fsharp/Notebooks.dib +00:00:06 verbose #18 > > #!import ../../lib/fsharp/Testing.dib +00:00:06 verbose #19 > > +00:00:06 verbose #20 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:06 verbose #21 > > #r +00:00:06 verbose #22 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A +00:00:06 verbose #23 > > spNetCore.Html.Abstractions.dll" +00:00:06 verbose #24 > > #r +00:00:06 verbose #25 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:06 verbose #26 > > otNet.Interactive.dll" +00:00:06 verbose #27 > > #r +00:00:06 verbose #28 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:06 verbose #29 > > otNet.Interactive.FSharp.dll" +00:00:06 verbose #30 > > #r +00:00:06 verbose #31 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:06 verbose #32 > > otNet.Interactive.Formatting.dll" +00:00:06 verbose #33 > > open System +00:00:06 verbose #34 > > open System.IO +00:00:06 verbose #35 > > open System.Text +00:00:06 verbose #36 > > open Microsoft.DotNet.Interactive.Formatting +00:00:10 verbose #37 > > +00:00:10 verbose #38 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:10 verbose #39 > > #r +00:00:10 verbose #40 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:10 verbose #41 > > otNet.Interactive.FSharp.dll" +00:00:10 verbose #42 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers +00:00:10 verbose #43 > > #r +00:00:10 verbose #44 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:10 verbose #45 > > otNet.Interactive.dll" +00:00:10 verbose #46 > > open type Microsoft.DotNet.Interactive.Kernel +00:00:11 verbose #47 > > +00:00:11 verbose #48 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:11 verbose #49 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) +00:00:11 verbose #50 > > +00:00:11 verbose #51 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:11 verbose #52 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: +00:00:11 verbose #53 > > TextWriter)->fprintfn writer "%120A" x) +00:00:11 verbose #54 > > +00:00:11 verbose #55 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:11 verbose #56 > > //// test +00:00:11 verbose #57 > > +00:00:11 verbose #58 > > Formatter.ListExpansionLimit <- 100 +00:00:12 verbose #59 > > +00:00:12 verbose #60 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:12 verbose #61 > > #if FABLE_COMPILER +00:00:12 verbose #62 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] +00:00:12 verbose #63 > > #endif +00:00:12 verbose #64 > > type std_env_VarError = class end +00:00:12 verbose #65 > > #if FABLE_COMPILER +00:00:12 verbose #66 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:00:12 verbose #67 > > #endif +00:00:12 verbose #68 > > type core_any_Any = class end +00:00:12 verbose #69 > > #if FABLE_COMPILER +00:00:12 verbose #70 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:00:12 verbose #71 > > #endif +00:00:12 verbose #72 > > type core_ops_Try<'T> = class end +00:00:12 verbose #73 > > #if FABLE_COMPILER +00:00:12 verbose #74 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:00:12 verbose #75 > > #endif +00:00:12 verbose #76 > > type Func0<'T> = class end +00:00:12 verbose #77 > > #if FABLE_COMPILER +00:00:12 verbose #78 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:00:12 verbose #79 > > #endif +00:00:12 verbose #80 > > type Func0<'T, 'U> = class end +00:00:12 verbose #81 > > #if FABLE_COMPILER +00:00:12 verbose #82 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:00:12 verbose #83 > > #endif +00:00:12 verbose #84 > > type Box<'T> = class end +00:00:12 verbose #85 > > #if FABLE_COMPILER +00:00:12 verbose #86 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] +00:00:12 verbose #87 > > #endif +00:00:12 verbose #88 > > type Dyn<'T> = class end +00:00:12 verbose #89 > > #if FABLE_COMPILER +00:00:12 verbose #90 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] +00:00:12 verbose #91 > > #endif +00:00:12 verbose #92 > > type Send<'T> = class end +00:00:12 verbose #93 > > #if FABLE_COMPILER +00:00:12 verbose #94 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] +00:00:12 verbose #95 > > #endif +00:00:12 verbose #96 > > type Fn<'T> = class end +00:00:12 verbose #97 > > #if FABLE_COMPILER +00:00:12 verbose #98 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] +00:00:12 verbose #99 > > #endif +00:00:12 verbose #100 > > type FnUnit = class end +00:00:12 verbose #101 > > #if FABLE_COMPILER +00:00:12 verbose #102 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] +00:00:12 verbose #103 > > #endif +00:00:12 verbose #104 > > type FnOnce<'T> = class end +00:00:12 verbose #105 > > #if FABLE_COMPILER +00:00:12 verbose #106 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] +00:00:12 verbose #107 > > #endif +00:00:12 verbose #108 > > type ActionFn<'T> = class end +00:00:12 verbose #109 > > #if FABLE_COMPILER +00:00:12 verbose #110 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] +00:00:12 verbose #111 > > #endif +00:00:12 verbose #112 > > type ActionFn2<'T, 'U> = class end +00:00:12 verbose #113 > > #if FABLE_COMPILER +00:00:12 verbose #114 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] +00:00:12 verbose #115 > > #endif +00:00:12 verbose #116 > > type Impl<'T> = class end +00:00:12 verbose #117 > > #if FABLE_COMPILER +00:00:12 verbose #118 > > [[<Fable... +00:00:13 verbose #119 > > +00:00:13 verbose #120 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:13 verbose #121 > > #if FABLE_COMPILER +00:00:13 verbose #122 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:00:13 verbose #123 > > #endif +00:00:13 verbose #124 > > type core_any_Any = class end +00:00:13 verbose #125 > > #if FABLE_COMPILER +00:00:13 verbose #126 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:00:13 verbose #127 > > #endif +00:00:13 verbose #128 > > type core_ops_Try<'T> = class end +00:00:13 verbose #129 > > #if FABLE_COMPILER +00:00:13 verbose #130 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:00:13 verbose #131 > > #endif +00:00:13 verbose #132 > > type Func0<'T> = class end +00:00:13 verbose #133 > > #if FABLE_COMPILER +00:00:13 verbose #134 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:00:13 verbose #135 > > #endif +00:00:13 verbose #136 > > type Func0<'T, 'U> = class end +00:00:13 verbose #137 > > #if FABLE_COMPILER +00:00:13 verbose #138 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:00:13 verbose #139 > > #endif +00:00:13 verbose #140 > > type Box<'T> = class end +00:00:13 verbose #141 > > #if FABLE_COMPILER +00:00:13 verbose #142 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] +00:00:13 verbose #143 > > #endif +00:00:13 verbose #144 > > type Dyn<'T> = class end +00:00:13 verbose #145 > > #if FABLE_COMPILER +00:00:13 verbose #146 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] +00:00:13 verbose #147 > > #endif +00:00:13 verbose #148 > > type Send<'T> = class end +00:00:13 verbose #149 > > #if FABLE_COMPILER +00:00:13 verbose #150 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] +00:00:13 verbose #151 > > #endif +00:00:13 verbose #152 > > type Fn<'T> = class end +00:00:13 verbose #153 > > #if FABLE_COMPILER +00:00:13 verbose #154 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] +00:00:13 verbose #155 > > #endif +00:00:13 verbose #156 > > type FnUnit = class end +00:00:13 verbose #157 > > #if FABLE_COMPILER +00:00:13 verbose #158 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] +00:00:13 verbose #159 > > #endif +00:00:13 verbose #160 > > type FnOnce<'T> = class end +00:00:13 verbose #161 > > #if FABLE_COMPILER +00:00:13 verbose #162 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] +00:00:13 verbose #163 > > #endif +00:00:13 verbose #164 > > type ActionFn<'T> = class end +00:00:13 verbose #165 > > #if FABLE_COMPILER +00:00:13 verbose #166 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] +00:00:13 verbose #167 > > #endif +00:00:13 verbose #168 > > type ActionFn2<'T, 'U> = class end +00:00:13 verbose #169 > > #if FABLE_COMPILER +00:00:13 verbose #170 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] +00:00:13 verbose #171 > > #endif +00:00:13 verbose #172 > > type Impl<'T> = class end +00:00:13 verbose #173 > > #if FABLE_COMPILER +00:00:13 verbose #174 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] +00:00:13 verbose #175 > > #endif +00:00:13 verbose #176 > > type Mut<'T> = class end +00:00:13 verbose #177 > > #if FABLE_COMPILER +00:00:13 verbose #178 > > [[<Fable.Core.Erase; Fable.Co... +00:00:15 verbose #179 > > +00:00:15 verbose #180 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:15 verbose #181 > > #if FABLE_COMPILER +00:00:15 verbose #182 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]] +00:00:15 verbose #183 > > #endif +00:00:15 verbose #184 > > type async_std_task_JoinHandle<'T> = class end +00:00:15 verbose #185 > > #if FABLE_COMPILER +00:00:15 verbose #186 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] +00:00:15 verbose #187 > > #endif +00:00:15 verbose #188 > > type std_future_Future<'T> = class end +00:00:15 verbose #189 > > #if FABLE_COMPILER +00:00:15 verbose #190 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] +00:00:15 verbose #191 > > #endif +00:00:15 verbose #192 > > type rayon_vec_IntoIter<'T> = class end +00:00:15 verbose #193 > > #if FABLE_COMPILER +00:00:15 verbose #194 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] +00:00:15 verbose #195 > > #endif +00:00:15 verbose #196 > > type rayon_iter_Map<'T> = class end +00:00:15 verbose #197 > > #if FABLE_COMPILER +00:00:15 verbose #198 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] +00:00:15 verbose #199 > > #endif +00:00:15 verbose #200 > > type futures_lite_stream_StreamExt = class end +00:00:15 verbose #201 > > #if FABLE_COMPILER +00:00:15 verbose #202 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] +00:00:15 verbose #203 > > #endif +00:00:15 verbose #204 > > type futures_future_TryJoinAll<'T> = class end +00:00:15 verbose #205 > > #if FABLE_COMPILER +00:00:15 verbose #206 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]] +00:00:15 verbose #207 > > #endif +00:00:15 verbose #208 > > type futures_future_Fuse<'T> = class end +00:00:15 verbose #209 > > #if FABLE_COMPILER +00:00:15 verbose #210 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]] +00:00:15 verbose #211 > > #endif +00:00:15 verbose #212 > > type futures_future_JoinAll<'T> = class end +00:00:15 verbose #213 > > let rec closure0 () (v0 : System.Threading.CancellationToken) : +00:00:15 verbose #214 > > Async<System.Threading.CancellationToken> = +00:00:15 verbose #215 > > let v1 : bool = true +00:00:15 verbose #216 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None +00:00:15 verbose #217 > > +00:00:15 verbose #218 > > #if FABLE_COMPILER || WASM || CONTRACT +00:00:15 verbose #219 > > +00:00:15 verbose #220 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT +00:00:15 verbose #221 > > let v2 : Async<System.Threading.CancellationToken> = null |> +00:00:15 verbose #222 > > unbox<Async<System... +00:00:15 verbose #223 > > +00:00:15 verbose #224 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:15 verbose #225 > > #if FABLE_COMPILER +00:00:15 verbose #226 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] +00:00:15 verbose #227 > > #endif +00:00:15 verbose #228 > > type std_thread_JoinHandle<'T> = class end +00:00:15 verbose #229 > > #if FABLE_COMPILER +00:00:15 verbose #230 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] +00:00:15 verbose #231 > > #endif +00:00:15 verbose #232 > > type std_sync_Arc<'T> = class end +00:00:15 verbose #233 > > #if FABLE_COMPILER +00:00:15 verbose #234 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] +00:00:15 verbose #235 > > #endif +00:00:15 verbose #236 > > type std_sync_Mutex<'T> = class end +00:00:15 verbose #237 > > #if FABLE_COMPILER +00:00:15 verbose #238 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] +00:00:15 verbose #239 > > #endif +00:00:15 verbose #240 > > type std_sync_MutexGuard<'T> = class end +00:00:15 verbose #241 > > #if FABLE_COMPILER +00:00:15 verbose #242 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] +00:00:15 verbose #243 > > #endif +00:00:15 verbose #244 > > type std_sync_PoisonError<'T> = class end +00:00:15 verbose #245 > > #if FABLE_COMPILER +00:00:15 verbose #246 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]] +00:00:15 verbose #247 > > #endif +00:00:15 verbose #248 > > type std_sync_mpsc_Receiver<'T> = class end +00:00:15 verbose #249 > > #if FABLE_COMPILER +00:00:15 verbose #250 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]] +00:00:15 verbose #251 > > #endif +00:00:15 verbose #252 > > type std_sync_mpsc_SendError<'T> = class end +00:00:15 verbose #253 > > #if FABLE_COMPILER +00:00:15 verbose #254 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]] +00:00:15 verbose #255 > > #endif +00:00:15 verbose #256 > > type std_sync_mpsc_Sender<'T> = class end +00:00:15 verbose #257 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member +00:00:15 verbose #258 > > _.Dispose () = f () +00:00:15 verbose #259 > > type [[<Struct>]] US0 = +00:00:15 verbose #260 > > | US0_0 of f0_0 : System.Threading.CancellationToken +00:00:15 verbose #261 > > | US0_1 +00:00:15 verbose #262 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = +00:00:15 verbose #263 > > let v1 : bool = true +00:00:15 verbose #264 > > let mutable _v1 : unit option = None +00:00:15 verbose #265 > > +00:00:15 verbose #266 > > #if FABLE_COMPILER || WASM || CONTRACT +00:00:15 verbose #267 > > +00:00:15 verbose #268 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT... +00:00:15 verbose #269 > > +00:00:15 verbose #270 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:15 verbose #271 > > #if FABLE_COMPILER +00:00:15 verbose #272 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] +00:00:15 verbose #273 > > #endif +00:00:15 verbose #274 > > type reqwest_Error = class end +00:00:15 verbose #275 > > #if FABLE_COMPILER +00:00:15 verbose #276 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] +00:00:15 verbose #277 > > #endif +00:00:15 verbose #278 > > type reqwest_RequestBuilder = class end +00:00:15 verbose #279 > > #if FABLE_COMPILER +00:00:15 verbose #280 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] +00:00:15 verbose #281 > > #endif +00:00:15 verbose #282 > > type reqwest_Response = class end +00:00:15 verbose #283 > > #if FABLE_COMPILER +00:00:15 verbose #284 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] +00:00:15 verbose #285 > > #endif +00:00:15 verbose #286 > > type std_env_VarError = class end +00:00:15 verbose #287 > > #if FABLE_COMPILER +00:00:15 verbose #288 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:00:15 verbose #289 > > #endif +00:00:15 verbose #290 > > type core_any_Any = class end +00:00:15 verbose #291 > > #if FABLE_COMPILER +00:00:15 verbose #292 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:00:15 verbose #293 > > #endif +00:00:15 verbose #294 > > type core_ops_Try<'T> = class end +00:00:15 verbose #295 > > #if FABLE_COMPILER +00:00:15 verbose #296 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:00:15 verbose #297 > > #endif +00:00:15 verbose #298 > > type Func0<'T> = class end +00:00:15 verbose #299 > > #if FABLE_COMPILER +00:00:15 verbose #300 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:00:15 verbose #301 > > #endif +00:00:15 verbose #302 > > type Func0<'T, 'U> = class end +00:00:15 verbose #303 > > #if FABLE_COMPILER +00:00:15 verbose #304 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:00:15 verbose #305 > > #endif +00:00:15 verbose #306 > > type Box<'T> = class end +00:00:15 verbose #307 > > #if FABLE_COMPILER +00:00:15 verbose #308 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] +00:00:15 verbose #309 > > #endif +00:00:15 verbose #310 > > type Dyn<'T> = class end +00:00:15 verbose #311 > > #if FABLE_COMPILER +00:00:15 verbose #312 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] +00:00:15 verbose #313 > > #endif +00:00:15 verbose #314 > > type Send<'T> = class end +00:00:15 verbose #315 > > #if FABLE_COMPILER +00:00:15 verbose #316 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] +00:00:15 verbose #317 > > #endif +00:00:15 verbose #318 > > type Fn<'T> = class end +00:00:15 verbose #319 > > #if FABLE_COMPILER +00:00:15 verbose #320 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] +00:00:15 verbose #321 > > #endif +00:00:15 verbose #322 > > type FnUnit = class end +00:00:15 verbose #323 > > #if FABLE_COMPILER +00:00:15 verbose #324 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] +00:00:15 verbose #325 > > #... +00:00:17 verbose #326 > > +00:00:17 verbose #327 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:17 verbose #328 > > #if FABLE_COMPILER +00:00:17 verbose #329 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] +00:00:17 verbose #330 > > #endif +00:00:17 verbose #331 > > type clap_Arg = class end +00:00:17 verbose #332 > > #if FABLE_COMPILER +00:00:17 verbose #333 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] +00:00:17 verbose #334 > > #endif +00:00:17 verbose #335 > > type clap_ArgAction = class end +00:00:17 verbose #336 > > #if FABLE_COMPILER +00:00:17 verbose #337 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] +00:00:17 verbose #338 > > #endif +00:00:17 verbose #339 > > type clap_Command = class end +00:00:17 verbose #340 > > #if FABLE_COMPILER +00:00:17 verbose #341 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] +00:00:17 verbose #342 > > #endif +00:00:17 verbose #343 > > type clap_ArgMatches = class end +00:00:17 verbose #344 > > #if FABLE_COMPILER +00:00:17 verbose #345 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] +00:00:17 verbose #346 > > #endif +00:00:17 verbose #347 > > type clap_builder_ValueRange = class end +00:00:17 verbose #348 > > #if FABLE_COMPILER +00:00:17 verbose #349 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] +00:00:17 verbose #350 > > #endif +00:00:17 verbose #351 > > type clap_builder_ValueParser = class end +00:00:17 verbose #352 > > #if FABLE_COMPILER +00:00:17 verbose #353 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] +00:00:17 verbose #354 > > #endif +00:00:17 verbose #355 > > type clap_builder_PossibleValue = class end +00:00:17 verbose #356 > > #if FABLE_COMPILER +00:00:17 verbose #357 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] +00:00:17 verbose #358 > > #endif +00:00:17 verbose #359 > > type std_process_Child = class end +00:00:17 verbose #360 > > #if FABLE_COMPILER +00:00:17 verbose #361 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] +00:00:17 verbose #362 > > #endif +00:00:17 verbose #363 > > type std_process_ChildStderr = class end +00:00:17 verbose #364 > > #if FABLE_COMPILER +00:00:17 verbose #365 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] +00:00:17 verbose #366 > > #endif +00:00:17 verbose #367 > > type std_process_ChildStdout = class end +00:00:17 verbose #368 > > #if FABLE_COMPILER +00:00:17 verbose #369 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] +00:00:17 verbose #370 > > #endif +00:00:17 verbose #371 > > type std_process_ChildStdin = class end +00:00:17 verbose #372 > > #if FABLE_COMPILER +00:00:17 verbose #373 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] +00:00:17 verbose #374 > > #endif +00:00:17 verbose #375 > > type std_process_Command = class ... +00:00:19 verbose #376 > > +00:00:19 verbose #377 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:19 verbose #378 > > #if FABLE_COMPILER +00:00:19 verbose #379 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] +00:00:19 verbose #380 > > #endif +00:00:19 verbose #381 > > type std_fs_File = class end +00:00:19 verbose #382 > > #if FABLE_COMPILER +00:00:19 verbose #383 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] +00:00:19 verbose #384 > > #endif +00:00:19 verbose #385 > > type std_fs_FileType = class end +00:00:19 verbose #386 > > #if FABLE_COMPILER +00:00:19 verbose #387 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] +00:00:19 verbose #388 > > #endif +00:00:19 verbose #389 > > type std_path_Display = class end +00:00:19 verbose #390 > > #if FABLE_COMPILER +00:00:19 verbose #391 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] +00:00:19 verbose #392 > > #endif +00:00:19 verbose #393 > > type std_path_Path = class end +00:00:19 verbose #394 > > #if FABLE_COMPILER +00:00:19 verbose #395 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] +00:00:19 verbose #396 > > #endif +00:00:19 verbose #397 > > type std_path_PathBuf = class end +00:00:19 verbose #398 > > #if FABLE_COMPILER +00:00:19 verbose #399 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] +00:00:19 verbose #400 > > #endif +00:00:19 verbose #401 > > type async_walkdir_DirEntry = class end +00:00:19 verbose #402 > > #if FABLE_COMPILER +00:00:19 verbose #403 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] +00:00:19 verbose #404 > > #endif +00:00:19 verbose #405 > > type async_walkdir_Filtering = class end +00:00:19 verbose #406 > > #if FABLE_COMPILER +00:00:19 verbose #407 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] +00:00:19 verbose #408 > > #endif +00:00:19 verbose #409 > > type async_walkdir_WalkDir = class end +00:00:19 verbose #410 > > #if FABLE_COMPILER +00:00:19 verbose #411 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:00:19 verbose #412 > > #endif +00:00:19 verbose #413 > > type core_any_Any = class end +00:00:19 verbose #414 > > #if FABLE_COMPILER +00:00:19 verbose #415 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:00:19 verbose #416 > > #endif +00:00:19 verbose #417 > > type core_ops_Try<'T> = class end +00:00:19 verbose #418 > > #if FABLE_COMPILER +00:00:19 verbose #419 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:00:19 verbose #420 > > #endif +00:00:19 verbose #421 > > type Func0<'T> = class end +00:00:19 verbose #422 > > #if FABLE_COMPILER +00:00:19 verbose #423 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:00:19 verbose #424 > > #endif +00:00:19 verbose #425 > > type Func0<'T, 'U> = class end +00:00:19 verbose #426 > > #if FABLE_COMPILER +00:00:19 verbose #427 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:00:19 verbose #428 > > #endif +00:00:19 verbose #429 > > type Box<'T> = clas... +00:00:22 verbose #430 > > +00:00:22 verbose #431 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #432 > > module SpiralTrace = +00:00:22 verbose #433 > > let trace x = +00:00:22 verbose #434 > > #if !INTERACTIVE +00:00:22 verbose #435 > > Trace.trace x +00:00:22 verbose #436 > > #else +00:00:22 verbose #437 > > trace x +00:00:22 verbose #438 > > #endif +00:00:22 verbose #439 > > +00:00:22 verbose #440 > > type TraceLevel = +00:00:22 verbose #441 > > #if !INTERACTIVE +00:00:22 verbose #442 > > Trace.US0 +00:00:22 verbose #443 > > #else +00:00:22 verbose #444 > > US0 +00:00:22 verbose #445 > > #endif +00:00:22 verbose #446 > > +00:00:22 verbose #447 > > module SpiralCrypto = +00:00:22 verbose #448 > > let hash_text x = +00:00:22 verbose #449 > > #if !INTERACTIVE +00:00:22 verbose #450 > > Crypto.hash_text x +00:00:22 verbose #451 > > #else +00:00:22 verbose #452 > > hash_text x +00:00:22 verbose #453 > > #endif +00:00:22 verbose #454 > > +00:00:22 verbose #455 > > #if !FABLE_COMPILER && !WASM && !CONTRACT +00:00:22 verbose #456 > > +00:00:22 verbose #457 > > module SpiralAsync = +00:00:22 verbose #458 > > let merge_cancellation_token_with_default_async x = +00:00:22 verbose #459 > > #if !INTERACTIVE +00:00:22 verbose #460 > > Async_.merge_cancellation_token_with_default_async x +00:00:22 verbose #461 > > #else +00:00:22 verbose #462 > > merge_cancellation_token_with_default_async x +00:00:22 verbose #463 > > #endif +00:00:22 verbose #464 > > +00:00:22 verbose #465 > > module SpiralThreading = +00:00:22 verbose #466 > > let new_disposable_token x = +00:00:22 verbose #467 > > #if !INTERACTIVE +00:00:22 verbose #468 > > Threading.new_disposable_token x +00:00:22 verbose #469 > > #else +00:00:22 verbose #470 > > new_disposable_token x +00:00:22 verbose #471 > > #endif +00:00:22 verbose #472 > > +00:00:22 verbose #473 > > module SpiralNetworking = +00:00:22 verbose #474 > > let test_port_open x = +00:00:22 verbose #475 > > #if !INTERACTIVE +00:00:22 verbose #476 > > Networking.test_port_open x +00:00:22 verbose #477 > > #else +00:00:22 verbose #478 > > test_port_open x +00:00:22 verbose #479 > > #endif +00:00:22 verbose #480 > > +00:00:22 verbose #481 > > let test_port_open_timeout x = +00:00:22 verbose #482 > > #if !INTERACTIVE +00:00:22 verbose #483 > > Networking.test_port_open_timeout x +00:00:22 verbose #484 > > #else +00:00:22 verbose #485 > > test_port_open_timeout x +00:00:22 verbose #486 > > #endif +00:00:22 verbose #487 > > +00:00:22 verbose #488 > > let wait_for_port_access x = +00:00:22 verbose #489 > > #if !INTERACTIVE +00:00:22 verbose #490 > > Networking.wait_for_port_access x +00:00:22 verbose #491 > > #else +00:00:22 verbose #492 > > wait_for_port_access x +00:00:22 verbose #493 > > #endif +00:00:22 verbose #494 > > +00:00:22 verbose #495 > > let get_available_port x = +00:00:22 verbose #496 > > #if !INTERACTIVE +00:00:22 verbose #497 > > Networking.get_available_port x +00:00:22 verbose #498 > > #else +00:00:22 verbose #499 > > get_available_port x +00:00:22 verbose #500 > > #endif +00:00:22 verbose #501 > > +00:00:22 verbose #502 > > module SpiralRuntime = +00:00:22 verbose #503 > > let get_executable_suffix () = +00:00:22 verbose #504 > > #if !INTERACTIVE +00:00:22 verbose #505 > > Runtime.get_executable_suffix () +00:00:22 verbose #506 > > #else +00:00:22 verbose #507 > > get_executable_suffix () +00:00:22 verbose #508 > > #endif +00:00:22 verbose #509 > > +00:00:22 verbose #510 > > let is_windows () = +00:00:22 verbose #511 > > #if !INTERACTIVE +00:00:22 verbose #512 > > ... +00:00:22 verbose #513 > > +00:00:22 verbose #514 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #515 > > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" +00:00:22 verbose #516 > > +00:00:22 verbose #517 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #518 > > //// test +00:00:22 verbose #519 > > +00:00:22 verbose #520 > > type AssertExceptionFormatter (ex) = +00:00:22 verbose #521 > > member _.Text = +00:00:22 verbose #522 > > ex.ToString() +00:00:22 verbose #523 > > .Replace("32m", "<span style=\"color: green;\">") +00:00:22 verbose #524 > > .Replace("36m", "</span>") +00:00:22 verbose #525 > > .Replace("31m", "<span style=\"color: red;\">") +00:00:22 verbose #526 > > .Replace("\n", "<br/>\n") +00:00:22 verbose #527 > > +00:00:22 verbose #528 > > +00:00:22 verbose #529 > > Formatter.Register<AssertExceptionFormatter> ((fun (x : +00:00:22 verbose #530 > > AssertExceptionFormatter) -> x.Text), "text/html") +00:00:22 verbose #531 > > +00:00:22 verbose #532 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #533 > > //// test +00:00:22 verbose #534 > > +00:00:22 verbose #535 > > let inline __expect fn log expected actual = +00:00:22 verbose #536 > > if log then printfn $"{actual.ToDisplayString ()}" +00:00:22 verbose #537 > > try +00:00:22 verbose #538 > > "Testing.__expect" |> fn actual expected +00:00:22 verbose #539 > > with :? Expecto.AssertException as ex -> +00:00:22 verbose #540 > > AssertExceptionFormatter(ex).Display () |> ignore +00:00:22 verbose #541 > > failwith (ex.GetType().FullName) +00:00:22 verbose #542 > > +00:00:22 verbose #543 > > let inline __contains log expected actual = __expect Expecto.Expect.contains log +00:00:22 verbose #544 > > expected actual +00:00:22 verbose #545 > > let inline _contains expected actual = __contains true expected actual +00:00:22 verbose #546 > > +00:00:22 verbose #547 > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log +00:00:22 verbose #548 > > expected actual +00:00:22 verbose #549 > > let inline _assertEqual expected actual = __assertEqual true expected actual +00:00:22 verbose #550 > > +00:00:22 verbose #551 > > let inline __isGreaterThan log expected actual = __expect +00:00:22 verbose #552 > > Expecto.Expect.isGreaterThan log expected actual +00:00:22 verbose #553 > > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual +00:00:22 verbose #554 > > +00:00:22 verbose #555 > > let inline __isGreaterThanOrEqual log expected actual = __expect +00:00:22 verbose #556 > > Expecto.Expect.isGreaterThanOrEqual log expected actual +00:00:22 verbose #557 > > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true +00:00:22 verbose #558 > > expected actual +00:00:22 verbose #559 > > +00:00:22 verbose #560 > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan +00:00:22 verbose #561 > > log expected actual +00:00:22 verbose #562 > > let inline _isLessThan expected actual = __isLessThan true expected actual +00:00:22 verbose #563 > > +00:00:22 verbose #564 > > let inline __isLessThanOrEqual log expected actual = __expect +00:00:22 verbose #565 > > Expecto.Expect.isLessThanOrEqual log expected actual +00:00:22 verbose #566 > > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true +00:00:22 verbose #567 > > expected actual +00:00:22 verbose #568 > > +00:00:22 verbose #569 > > let inline __sequenceEqual log expected actual = __expe... +00:00:23 verbose #570 > > +00:00:23 verbose #571 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:23 verbose #572 > > //// test +00:00:23 verbose #573 > > +00:00:23 verbose #574 > > let inline __isBetween log a b actual = +00:00:23 verbose #575 > > let inline isBetween actual (a, b) _ = +00:00:23 verbose #576 > > __isGreaterThanOrEqual log a actual +00:00:23 verbose #577 > > __isLessThanOrEqual log b actual +00:00:23 verbose #578 > > __expect isBetween log (a, b) actual +00:00:23 verbose #579 > > let inline _isBetween a b actual = __isBetween true a b actual +00:00:23 verbose #580 > > +00:00:23 verbose #581 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #582 > > //// test +00:00:23 verbose #583 > > +00:00:23 verbose #584 > > open testing +00:00:23 verbose #585 > > open benchmark +00:00:23 verbose #586 > > +00:00:23 verbose #587 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:00:23 verbose #588 > > #r +00:00:23 verbose #589 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:23 verbose #590 > > otNet.Interactive.Spiral.dll" +00:00:23 verbose #591 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:00:23 verbose #592 > > #r +00:00:23 verbose #593 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:23 verbose #594 > > otNet.Interactive.dll" +00:00:23 verbose #595 > > open type Microsoft.DotNet.Interactive.Kernel +00:00:25 verbose #596 > > +00:00:25 verbose #597 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #598 > > #if !INTERACTIVE +00:00:25 verbose #599 > > open Lib +00:00:25 verbose #600 > > #endif +00:00:25 verbose #601 > > +00:00:25 verbose #602 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:25 verbose #603 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:25 verbose #604 > > │ ## TestCaseResult │ +00:00:25 verbose #605 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #606 > > +00:00:25 verbose #607 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #608 > > type TestCaseResult = +00:00:25 verbose #609 > > { +00:00:25 verbose #610 > > Input: string +00:00:25 verbose #611 > > Expected: string +00:00:25 verbose #612 > > Result: string +00:00:25 verbose #613 > > TimeList: int64 list +00:00:25 verbose #614 > > } +00:00:25 verbose #615 > > +00:00:25 verbose #616 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:25 verbose #617 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:25 verbose #618 > > │ ## run │ +00:00:25 verbose #619 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #620 > > +00:00:25 verbose #621 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #622 > > let run count (solutions: (string * ('TInput -> 'TExpected)) list) (input, +00:00:25 verbose #623 > > expected) = +00:00:25 verbose #624 > > let inputStr = +00:00:25 verbose #625 > > match box input with +00:00:25 verbose #626 > > | :? System.Collections.ICollection as input -> +00:00:25 verbose #627 > > System.Linq.Enumerable.Cast<obj> input +00:00:25 verbose #628 > > |> Seq.map string +00:00:25 verbose #629 > > |> SpiralSm.concat "," +00:00:25 verbose #630 > > | _ -> input.ToString () +00:00:25 verbose #631 > > +00:00:25 verbose #632 > > printfn "" +00:00:25 verbose #633 > > printfn $"Solution: {inputStr} " +00:00:25 verbose #634 > > +00:00:25 verbose #635 > > let performanceInvoke (fn: unit -> 'T) = +00:00:25 verbose #636 > > GC.Collect () +00:00:25 verbose #637 > > let stopwatch = System.Diagnostics.Stopwatch () +00:00:25 verbose #638 > > stopwatch.Start () +00:00:25 verbose #639 > > let time1 = stopwatch.ElapsedMilliseconds +00:00:25 verbose #640 > > +00:00:25 verbose #641 > > let result = +00:00:25 verbose #642 > > [[| 0 .. count |]] +00:00:25 verbose #643 > > |> Array.Parallel.map (fun _ -> +00:00:25 verbose #644 > > fn () +00:00:25 verbose #645 > > ) +00:00:25 verbose #646 > > |> Array.last +00:00:25 verbose #647 > > +00:00:25 verbose #648 > > let time2 = stopwatch.ElapsedMilliseconds - time1 +00:00:25 verbose #649 > > +00:00:25 verbose #650 > > result, time2 +00:00:25 verbose #651 > > +00:00:25 verbose #652 > > let resultsWithTime = +00:00:25 verbose #653 > > solutions +00:00:25 verbose #654 > > |> List.mapi (fun i (testName, solution) -> +00:00:25 verbose #655 > > let result, time = performanceInvoke (fun () -> solution input) +00:00:25 verbose #656 > > printfn $"Test case %d{i + 1}. %s{testName}. Time: %A{time} " +00:00:25 verbose #657 > > result, time +00:00:25 verbose #658 > > ) +00:00:25 verbose #659 > > +00:00:25 verbose #660 > > +00:00:25 verbose #661 > > match resultsWithTime |> List.map fst with +00:00:25 verbose #662 > > | ([[]] | [[ _ ]]) -> () +00:00:25 verbose #663 > > | (head :: tail) when tail |> List.forall ((=) head) -> () +00:00:25 verbose #664 > > | results -> failwithf $"Challenge error: %A{results}" +00:00:25 verbose #665 > > +00:00:25 verbose #666 > > { +00:00:25 verbose #667 > > Input = inputStr +00:00:25 verbose #668 > > Expected = expected.ToString () +00:00:25 verbose #669 > > Result = resultsWithTime |> Seq.map fst |> Seq.head |> _.ToString() +00:00:25 verbose #670 > > TimeList = resultsWithTime |> List.map snd +00:00:25 verbose #671 > > } +00:00:25 verbose #672 > > +00:00:25 verbose #673 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:25 verbose #674 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:25 verbose #675 > > │ ## runAll │ +00:00:25 verbose #676 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #677 > > +00:00:25 verbose #678 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #679 > > let runAll testName count (solutions: (string * ('TInput -> 'TExpected)) list) +00:00:25 verbose #680 > > testCases = +00:00:25 verbose #681 > > printfn "" +00:00:25 verbose #682 > > printfn "" +00:00:25 verbose #683 > > printfn $"Test: {testName}" +00:00:25 verbose #684 > > testCases +00:00:25 verbose #685 > > |> Seq.map (run count solutions) +00:00:25 verbose #686 > > |> Seq.toList +00:00:25 verbose #687 > > +00:00:25 verbose #688 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:25 verbose #689 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:25 verbose #690 > > │ ## sortResultList │ +00:00:25 verbose #691 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #692 > > +00:00:25 verbose #693 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #694 > > let sortResultList resultList = +00:00:25 verbose #695 > > let table = +00:00:25 verbose #696 > > let rows = +00:00:25 verbose #697 > > resultList +00:00:25 verbose #698 > > |> List.map (fun result -> +00:00:25 verbose #699 > > let best = +00:00:25 verbose #700 > > result.TimeList +00:00:25 verbose #701 > > |> List.mapi (fun i time -> +00:00:25 verbose #702 > > i + 1, time +00:00:25 verbose #703 > > ) +00:00:25 verbose #704 > > |> List.sortBy snd +00:00:25 verbose #705 > > |> List.head +00:00:25 verbose #706 > > |> _.ToString() +00:00:25 verbose #707 > > let row = +00:00:25 verbose #708 > > [[ +00:00:25 verbose #709 > > result.Input +00:00:25 verbose #710 > > result.Expected +00:00:25 verbose #711 > > result.Result +00:00:25 verbose #712 > > best +00:00:25 verbose #713 > > ]] +00:00:25 verbose #714 > > let color = +00:00:25 verbose #715 > > match result.Expected = result.Result with +00:00:25 verbose #716 > > | true -> Some ConsoleColor.DarkGreen +00:00:25 verbose #717 > > | false -> Some ConsoleColor.DarkRed +00:00:25 verbose #718 > > row, color +00:00:25 verbose #719 > > ) +00:00:25 verbose #720 > > let header = +00:00:25 verbose #721 > > [[ +00:00:25 verbose #722 > > [[ +00:00:25 verbose #723 > > "Input" +00:00:25 verbose #724 > > "Expected" +00:00:25 verbose #725 > > "Result" +00:00:25 verbose #726 > > "Best" +00:00:25 verbose #727 > > ]] +00:00:25 verbose #728 > > [[ +00:00:25 verbose #729 > > "---" +00:00:25 verbose #730 > > "---" +00:00:25 verbose #731 > > "---" +00:00:25 verbose #732 > > "---" +00:00:25 verbose #733 > > ]] +00:00:25 verbose #734 > > ]] +00:00:25 verbose #735 > > |> List.map (fun row -> row, None) +00:00:25 verbose #736 > > header @ rows +00:00:25 verbose #737 > > +00:00:25 verbose #738 > > let formattedTable = +00:00:25 verbose #739 > > let lengthMap = +00:00:25 verbose #740 > > table +00:00:25 verbose #741 > > |> List.map fst +00:00:25 verbose #742 > > |> List.transpose +00:00:25 verbose #743 > > |> List.map (fun column -> +00:00:25 verbose #744 > > column +00:00:25 verbose #745 > > |> List.map String.length +00:00:25 verbose #746 > > |> List.sortDescending +00:00:25 verbose #747 > > |> List.tryHead +00:00:25 verbose #748 > > |> Option.defaultValue 0 +00:00:25 verbose #749 > > ) +00:00:25 verbose #750 > > |> List.indexed +00:00:25 verbose #751 > > |> Map.ofList +00:00:25 verbose #752 > > table +00:00:25 verbose #753 > > |> List.map (fun (row, color) -> +00:00:25 verbose #754 > > let newRow = +00:00:25 verbose #755 > > row +00:00:25 verbose #756 > > |> List.mapi (fun i cell -> +00:00:25 verbose #757 > > cell.PadRight lengthMap.[[i]] +00:00:25 verbose #758 > > ) +00:00:25 verbose #759 > > newRow, color +00:00:25 verbose #760 > > ) +00:00:25 verbose #761 > > +00:00:25 verbose #762 > > printfn "" +00:00:25 verbose #763 > > formattedTable +00:00:25 verbose #764 > > |> List.iter (fun (row, color) -> +00:00:25 verbose #765 > > match color with +00:00:25 verbose #766 > > | Some color -> Console.ForegroundColor <- color +00:00:25 verbose #767 > > | None -> Console.ResetColor () +00:00:25 verbose #768 > > +00:00:25 verbose #769 > > printfn "%s" (String.Join ("\t| ", row)) +00:00:25 verbose #770 > > +00:00:25 verbose #771 > > Console.ResetColor () +00:00:25 verbose #772 > > ) +00:00:25 verbose #773 > > +00:00:25 verbose #774 > > let averages = +00:00:25 verbose #775 > > resultList +00:00:25 verbose #776 > > |> List.map (fun result -> result.TimeList |> List.map float) +00:00:25 verbose #777 > > |> List.transpose +00:00:25 verbose #778 > > |> List.map List.average +00:00:25 verbose #779 > > |> List.map int64 +00:00:25 verbose #780 > > |> List.indexed +00:00:25 verbose #781 > > +00:00:25 verbose #782 > > printfn "" +00:00:25 verbose #783 > > printfn "Average Ranking " +00:00:25 verbose #784 > > averages +00:00:25 verbose #785 > > |> List.sortBy snd +00:00:25 verbose #786 > > |> List.iter (fun (i, avg) -> +00:00:25 verbose #787 > > printfn $"Test case %d{i + 1}. Average Time: %A{avg} " +00:00:25 verbose #788 > > ) +00:00:25 verbose #789 > > +00:00:25 verbose #790 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #791 > > let mutable _count = +00:00:25 verbose #792 > > if ("CI" |> System.Environment.GetEnvironmentVariable |> fun x -> $"%A{x}") +00:00:25 verbose #793 > > <> "<null>" +00:00:25 verbose #794 > > then 2000000 +00:00:25 verbose #795 > > else 2000 +00:00:25 verbose #796 > > +00:00:25 verbose #797 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #798 > > inl is_fast () = +00:00:25 verbose #799 > > false +00:00:25 verbose #800 > > +00:00:25 verbose #801 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:25 verbose #802 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:25 verbose #803 > > │ ## empty3Tests │ +00:00:25 verbose #804 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #805 > > +00:00:25 verbose #806 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:25 verbose #807 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:25 verbose #808 > > │ Test: Empty3 │ +00:00:25 verbose #809 > > │ │ +00:00:25 verbose #810 > > │ Solution: (a, a) │ +00:00:25 verbose #811 > > │ Test case 1. A. Time: 91L │ +00:00:25 verbose #812 > > │ │ +00:00:25 verbose #813 > > │ Solution: (a, a) │ +00:00:25 verbose #814 > > │ Test case 1. A. Time: 56L │ +00:00:25 verbose #815 > > │ │ +00:00:25 verbose #816 > > │ Input | Expected | Result | Best │ +00:00:25 verbose #817 > > │ --- | --- | --- | --- │ +00:00:25 verbose #818 > > │ (a, a) | a | a | (1, 91) │ +00:00:25 verbose #819 > > │ (a, a) | a | a | (1, 56) │ +00:00:25 verbose #820 > > │ │ +00:00:25 verbose #821 > > │ Averages │ +00:00:25 verbose #822 > > │ Test case 1. Average Time: 73L │ +00:00:25 verbose #823 > > │ │ +00:00:25 verbose #824 > > │ Ranking │ +00:00:25 verbose #825 > > │ Test case 1. Average Time: 73L │ +00:00:25 verbose #826 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #827 > > +00:00:25 verbose #828 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #829 > > //// test +00:00:25 verbose #830 > > +00:00:25 verbose #831 > > let solutions = [[ +00:00:25 verbose #832 > > "A", +00:00:25 verbose #833 > > fun (a, _b) -> +00:00:25 verbose #834 > > a +00:00:25 verbose #835 > > ]] +00:00:25 verbose #836 > > let testCases = seq { +00:00:25 verbose #837 > > ("a", "a"), "a" +00:00:25 verbose #838 > > ("a", "a"), "a" +00:00:25 verbose #839 > > } +00:00:25 verbose #840 > > let rec empty3Tests = runAll (nameof empty3Tests) _count solutions testCases +00:00:25 verbose #841 > > empty3Tests +00:00:25 verbose #842 > > |> sortResultList +00:00:26 verbose #843 > > +00:00:26 verbose #844 > > ╭─[ 682.90ms - stdout ]────────────────────────────────────────────────────────╮ +00:00:26 verbose #845 > > │ │ +00:00:26 verbose #846 > > │ │ +00:00:26 verbose #847 > > │ Test: empty3Tests │ +00:00:26 verbose #848 > > │ │ +00:00:26 verbose #849 > > │ Solution: (a, a) │ +00:00:26 verbose #850 > > │ Test case 1. A. Time: 2L │ +00:00:26 verbose #851 > > │ │ +00:00:26 verbose #852 > > │ Solution: (a, a) │ +00:00:26 verbose #853 > > │ Test case 1. A. Time: 0L │ +00:00:26 verbose #854 > > │ │ +00:00:26 verbose #855 > > │ Input | Expected | Result | Best │ +00:00:26 verbose #856 > > │ --- | --- | --- | --- │ +00:00:26 verbose #857 > > │ (a, a) | a | a | (1, 2) │ +00:00:26 verbose #858 > > │ (a, a) | a | a | (1, 0) │ +00:00:26 verbose #859 > > │ │ +00:00:26 verbose #860 > > │ Average Ranking │ +00:00:26 verbose #861 > > │ Test case 1. Average Time: 1L │ +00:00:26 verbose #862 > > │ │ +00:00:26 verbose #863 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:26 verbose #864 > > +00:00:26 verbose #865 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:26 verbose #866 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:26 verbose #867 > > │ ## empty2Tests │ +00:00:26 verbose #868 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:26 verbose #869 > > +00:00:26 verbose #870 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:26 verbose #871 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:26 verbose #872 > > │ Test: Empty2 │ +00:00:26 verbose #873 > > │ │ +00:00:26 verbose #874 > > │ Solution: (a, a) │ +00:00:26 verbose #875 > > │ Test case 1. A. Time: 59L │ +00:00:26 verbose #876 > > │ │ +00:00:26 verbose #877 > > │ Solution: (a, a) │ +00:00:26 verbose #878 > > │ Test case 1. A. Time: 53L │ +00:00:26 verbose #879 > > │ │ +00:00:26 verbose #880 > > │ Input | Expected | Result | Best │ +00:00:26 verbose #881 > > │ --- | --- | --- | --- │ +00:00:26 verbose #882 > > │ (a, a) | a | a | (1, 59) │ +00:00:26 verbose #883 > > │ (a, a) | a | a | (1, 53) │ +00:00:26 verbose #884 > > │ │ +00:00:26 verbose #885 > > │ Averages │ +00:00:26 verbose #886 > > │ Test case 1. Average Time: 56L │ +00:00:26 verbose #887 > > │ │ +00:00:26 verbose #888 > > │ Ranking │ +00:00:26 verbose #889 > > │ Test case 1. Average Time: 56L │ +00:00:26 verbose #890 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:26 verbose #891 > > +00:00:26 verbose #892 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:26 verbose #893 > > //// test +00:00:26 verbose #894 > > +00:00:26 verbose #895 > > let solutions = [[ +00:00:26 verbose #896 > > "A", +00:00:26 verbose #897 > > fun (a, _b) -> +00:00:26 verbose #898 > > a +00:00:26 verbose #899 > > ]] +00:00:26 verbose #900 > > let testCases = seq { +00:00:26 verbose #901 > > ("a", "a"), "a" +00:00:26 verbose #902 > > ("a", "a"), "a" +00:00:26 verbose #903 > > } +00:00:26 verbose #904 > > let rec empty2Tests = runAll (nameof empty2Tests) _count solutions testCases +00:00:26 verbose #905 > > empty2Tests +00:00:26 verbose #906 > > |> sortResultList +00:00:27 verbose #907 > > +00:00:27 verbose #908 > > ╭─[ 582.10ms - stdout ]────────────────────────────────────────────────────────╮ +00:00:27 verbose #909 > > │ │ +00:00:27 verbose #910 > > │ │ +00:00:27 verbose #911 > > │ Test: empty2Tests │ +00:00:27 verbose #912 > > │ │ +00:00:27 verbose #913 > > │ Solution: (a, a) │ +00:00:27 verbose #914 > > │ Test case 1. A. Time: 1L │ +00:00:27 verbose #915 > > │ │ +00:00:27 verbose #916 > > │ Solution: (a, a) │ +00:00:27 verbose #917 > > │ Test case 1. A. Time: 0L │ +00:00:27 verbose #918 > > │ │ +00:00:27 verbose #919 > > │ Input | Expected | Result | Best │ +00:00:27 verbose #920 > > │ --- | --- | --- | --- │ +00:00:27 verbose #921 > > │ (a, a) | a | a | (1, 1) │ +00:00:27 verbose #922 > > │ (a, a) | a | a | (1, 0) │ +00:00:27 verbose #923 > > │ │ +00:00:27 verbose #924 > > │ Average Ranking │ +00:00:27 verbose #925 > > │ Test case 1. Average Time: 0L │ +00:00:27 verbose #926 > > │ │ +00:00:27 verbose #927 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:27 verbose #928 > > +00:00:27 verbose #929 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:27 verbose #930 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:27 verbose #931 > > │ ## emptyTests │ +00:00:27 verbose #932 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:27 verbose #933 > > +00:00:27 verbose #934 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:27 verbose #935 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:27 verbose #936 > > │ Test: Empty │ +00:00:27 verbose #937 > > │ │ +00:00:27 verbose #938 > > │ Solution: 0 │ +00:00:27 verbose #939 > > │ Test case 1. A. Time: 61L │ +00:00:27 verbose #940 > > │ │ +00:00:27 verbose #941 > > │ Solution: 2 │ +00:00:27 verbose #942 > > │ Test case 1. A. Time: 62L │ +00:00:27 verbose #943 > > │ │ +00:00:27 verbose #944 > > │ Solution: 5 │ +00:00:27 verbose #945 > > │ Test case 1. A. Time: 70L │ +00:00:27 verbose #946 > > │ │ +00:00:27 verbose #947 > > │ Input | Expected | Result | Best │ +00:00:27 verbose #948 > > │ --- | --- | --- | --- │ +00:00:27 verbose #949 > > │ 0 | 0 | 0 | (1, 61) │ +00:00:27 verbose #950 > > │ 2 | 2 | 2 | (1, 62) │ +00:00:27 verbose #951 > > │ 5 | 5 | 5 | (1, 70) │ +00:00:27 verbose #952 > > │ │ +00:00:27 verbose #953 > > │ Averages │ +00:00:27 verbose #954 > > │ Test case 1. Average Time: 64L │ +00:00:27 verbose #955 > > │ │ +00:00:27 verbose #956 > > │ Ranking │ +00:00:27 verbose #957 > > │ Test case 1. Average Time: 64L │ +00:00:27 verbose #958 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:27 verbose #959 > > +00:00:27 verbose #960 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:27 verbose #961 > > //// test +00:00:27 verbose #962 > > +00:00:27 verbose #963 > > let solutions = [[ +00:00:27 verbose #964 > > "A", +00:00:27 verbose #965 > > fun n -> +00:00:27 verbose #966 > > n + 0 +00:00:27 verbose #967 > > ]] +00:00:27 verbose #968 > > let testCases = seq { +00:00:27 verbose #969 > > 0, 0 +00:00:27 verbose #970 > > 2, 2 +00:00:27 verbose #971 > > 5, 5 +00:00:27 verbose #972 > > } +00:00:27 verbose #973 > > let rec emptyTests = runAll (nameof emptyTests) _count solutions testCases +00:00:27 verbose #974 > > emptyTests +00:00:27 verbose #975 > > |> sortResultList +00:00:27 verbose #976 > > +00:00:27 verbose #977 > > ╭─[ 719.55ms - stdout ]────────────────────────────────────────────────────────╮ +00:00:27 verbose #978 > > │ │ +00:00:27 verbose #979 > > │ │ +00:00:27 verbose #980 > > │ Test: emptyTests │ +00:00:27 verbose #981 > > │ │ +00:00:27 verbose #982 > > │ Solution: 0 │ +00:00:27 verbose #983 > > │ Test case 1. A. Time: 3L │ +00:00:27 verbose #984 > > │ │ +00:00:27 verbose #985 > > │ Solution: 2 │ +00:00:27 verbose #986 > > │ Test case 1. A. Time: 0L │ +00:00:27 verbose #987 > > │ │ +00:00:27 verbose #988 > > │ Solution: 5 │ +00:00:27 verbose #989 > > │ Test case 1. A. Time: 0L │ +00:00:27 verbose #990 > > │ │ +00:00:27 verbose #991 > > │ Input | Expected | Result | Best │ +00:00:27 verbose #992 > > │ --- | --- | --- | --- │ +00:00:27 verbose #993 > > │ 0 | 0 | 0 | (1, 3) │ +00:00:27 verbose #994 > > │ 2 | 2 | 2 | (1, 0) │ +00:00:27 verbose #995 > > │ 5 | 5 | 5 | (1, 0) │ +00:00:27 verbose #996 > > │ │ +00:00:27 verbose #997 > > │ Average Ranking │ +00:00:27 verbose #998 > > │ Test case 1. Average Time: 1L │ +00:00:27 verbose #999 > > │ │ +00:00:27 verbose #1000 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:27 verbose #1001 > > +00:00:27 verbose #1002 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:27 verbose #1003 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:27 verbose #1004 > > │ ## uniqueLettersTests │ +00:00:27 verbose #1005 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:27 verbose #1006 > > +00:00:27 verbose #1007 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:27 verbose #1008 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:27 verbose #1009 > > │ Test: UniqueLetters │ +00:00:27 verbose #1010 > > │ │ +00:00:27 verbose #1011 > > │ Solution: abc │ +00:00:27 verbose #1012 > > │ Test case 1. A. Time: 1512L │ +00:00:27 verbose #1013 > > │ Test case 2. B. Time: 1947L │ +00:00:27 verbose #1014 > > │ Test case 3. C. Time: 2023L │ +00:00:27 verbose #1015 > > │ Test case 4. D. Time: 1358L │ +00:00:27 verbose #1016 > > │ Test case 5. E. Time: 1321L │ +00:00:27 verbose #1017 > > │ Test case 6. F. Time: 1346L │ +00:00:27 verbose #1018 > > │ Test case 7. G. Time: 1304L │ +00:00:27 verbose #1019 > > │ Test case 8. H. Time: 1383L │ +00:00:27 verbose #1020 > > │ Test case 9. I. Time: 1495L │ +00:00:27 verbose #1021 > > │ Test case 10. J. Time: 1245L │ +00:00:27 verbose #1022 > > │ Test case 11. K. Time: 1219L │ +00:00:27 verbose #1023 > > │ │ +00:00:27 verbose #1024 > > │ Solution: accabb │ +00:00:27 verbose #1025 > > │ Test case 1. A. Time: 1648L │ +00:00:27 verbose #1026 > > │ Test case 2. B. Time: 2061L │ +00:00:27 verbose #1027 > > │ Test case 3. C. Time: 2413L │ +00:00:27 verbose #1028 > > │ Test case 4. D. Time: 1561L │ +00:00:27 verbose #1029 > > │ Test case 5. E. Time: 1593L │ +00:00:27 verbose #1030 > > │ Test case 6. F. Time: 1518L │ +00:00:27 verbose #1031 > > │ Test case 7. G. Time: 1415L │ +00:00:27 verbose #1032 > > │ Test case 8. H. Time: 1510L │ +00:00:27 verbose #1033 > > │ Test case 9. I. Time: 1445L │ +00:00:27 verbose #1034 > > │ Test case 10. J. Time: 1636L │ +00:00:27 verbose #1035 > > │ Test case 11. K. Time: 1317L │ +00:00:27 verbose #1036 > > │ │ +00:00:27 verbose #1037 > > │ Solution: pprrqqpp │ +00:00:27 verbose #1038 > > │ Test case 1. A. Time: 2255L │ +00:00:27 verbose #1039 > > │ Test case 2. B. Time: 2408L │ +00:00:27 verbose #1040 > > │ Test case 3. C. Time: 2393L │ +00:00:27 verbose #1041 > > │ Test case 4. D. Time: 1675L │ +00:00:27 verbose #1042 > > │ Test case 5. E. Time: 1911L │ +00:00:27 verbose #1043 > > │ Test case 6. F. Time: 2126L │ +00:00:27 verbose #1044 > > │ Test case 7. G. Time: 1504L │ +00:00:27 verbose #1045 > > │ Test case 8. H. Time: 1715L │ +00:00:27 verbose #1046 > > │ Test case 9. I. Time: 1537L │ +00:00:27 verbose #1047 > > │ Test case 10. J. Time: 1522L │ +00:00:27 verbose #1048 > > │ Test case 11. K. Time: 1322L │ +00:00:27 verbose #1049 > > │ │ +00:00:27 verbose #1050 > > │ Solution: │ +00:00:27 verbose #1051 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ +00:00:27 verbose #1052 > > │ bbb │ +00:00:27 verbose #1053 > > │ Test case 1. A. Time: 13073L │ +00:00:27 verbose #1054 > > │ Test case 2. B. Time: 11519L │ +00:00:27 verbose #1055 > > │ Test case 3. C. Time: 8373L │ +00:00:27 verbose #1056 > > │ Test case 4. D. Time: 5860L │ +00:00:27 verbose #1057 > > │ Test case 5. E. Time: 6490L │ +00:00:27 verbose #1058 > > │ Test case 6. F. Time: 6325L │ +00:00:27 verbose #1059 > > │ Test case 7. G. Time: 5799L │ +00:00:27 verbose #1060 > > │ Test case 8. H. Time: 7099L │ +00:00:27 verbose #1061 > > │ Test case 9. I. Time: 6133L │ +00:00:27 verbose #1062 > > │ Test case 10. J. Time: 5993L │ +00:00:27 verbose #1063 > > │ Test case 11. K. Time: 2040L │ +00:00:27 verbose #1064 > > │ │ +00:00:27 verbose #1065 > > │ Input │ +00:00:27 verbose #1066 > > │ | Expected | Result | Best │ +00:00:27 verbose #1067 > > │ --- │ +00:00:27 verbose #1068 > > │ │ +00:00:27 verbose #1069 > > │ | --- | --- | --- │ +00:00:27 verbose #1070 > > │ abc │ +00:00:27 verbose #1071 > > │ │ +00:00:27 verbose #1072 > > │ | abc | abc | (11, 1219) │ +00:00:27 verbose #1073 > > │ accabb │ +00:00:27 verbose #1074 > > │ | acb | acb | (11, 1317) │ +00:00:27 verbose #1075 > > │ pprrqqpp │ +00:00:27 verbose #1076 > > │ | prq | prq | (11, 1322) │ +00:00:27 verbose #1077 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ +00:00:27 verbose #1078 > > │ bbb | acb | acb | (11, 2040) │ +00:00:27 verbose #1079 > > │ │ +00:00:27 verbose #1080 > > │ Averages │ +00:00:27 verbose #1081 > > │ Test case 1. Average Time: 4622L │ +00:00:27 verbose #1082 > > │ Test case 2. Average Time: 4483L │ +00:00:27 verbose #1083 > > │ Test case 3. Average Time: 3800L │ +00:00:27 verbose #1084 > > │ Test case 4. Average Time: 2613L │ +00:00:27 verbose #1085 > > │ Test case 5. Average Time: 2828L │ +00:00:27 verbose #1086 > > │ Test case 6. Average Time: 2828L │ +00:00:27 verbose #1087 > > │ Test case 7. Average Time: 2505L │ +00:00:27 verbose #1088 > > │ Test case 8. Average Time: 2926L │ +00:00:27 verbose #1089 > > │ Test case 9. Average Time: 2652L │ +00:00:27 verbose #1090 > > │ Test case 10. Average Time: 2599L │ +00:00:27 verbose #1091 > > │ Test case 11. Average Time: 1474L │ +00:00:27 verbose #1092 > > │ │ +00:00:27 verbose #1093 > > │ Ranking │ +00:00:27 verbose #1094 > > │ Test case 1. Average Time: 4622L │ +00:00:27 verbose #1095 > > │ Test case 2. Average Time: 4483L │ +00:00:27 verbose #1096 > > │ Test case 3. Average Time: 3800L │ +00:00:27 verbose #1097 > > │ Test case 8. Average Time: 2926L │ +00:00:27 verbose #1098 > > │ Test case 5. Average Time: 2828L │ +00:00:27 verbose #1099 > > │ Test case 6. Average Time: 2828L │ +00:00:27 verbose #1100 > > │ Test case 9. Average Time: 2652L │ +00:00:27 verbose #1101 > > │ Test case 4. Average Time: 2613L │ +00:00:27 verbose #1102 > > │ Test case 10. Average Time: 2599L │ +00:00:27 verbose #1103 > > │ Test case 7. Average Time: 2505L │ +00:00:27 verbose #1104 > > │ Test case 11. Average Time: 1474L │ +00:00:27 verbose #1105 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:27 verbose #1106 > > +00:00:27 verbose #1107 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:27 verbose #1108 > > //// test +00:00:27 verbose #1109 > > +00:00:27 verbose #1110 > > let solutions = [[ +00:00:27 verbose #1111 > > "A", +00:00:27 verbose #1112 > > fun input -> +00:00:27 verbose #1113 > > input +00:00:27 verbose #1114 > > |> Seq.toList +00:00:27 verbose #1115 > > |> List.fold (fun acc x -> if List.contains x acc then acc else acc @ [[ +00:00:27 verbose #1116 > > x ]]) [[]] +00:00:27 verbose #1117 > > |> Seq.toArray +00:00:27 verbose #1118 > > |> String +00:00:27 verbose #1119 > > +00:00:27 verbose #1120 > > "B", +00:00:27 verbose #1121 > > fun input -> +00:00:27 verbose #1122 > > input +00:00:27 verbose #1123 > > |> Seq.rev +00:00:27 verbose #1124 > > |> fun list -> Seq.foldBack (fun x acc -> if List.contains x acc then +00:00:27 verbose #1125 > > acc else x :: acc) list [[]] +00:00:27 verbose #1126 > > |> Seq.rev +00:00:27 verbose #1127 > > |> Seq.toArray +00:00:27 verbose #1128 > > |> String +00:00:27 verbose #1129 > > +00:00:27 verbose #1130 > > "C", +00:00:27 verbose #1131 > > fun input -> +00:00:27 verbose #1132 > > input +00:00:27 verbose #1133 > > |> Seq.rev +00:00:27 verbose #1134 > > |> fun list -> Seq.foldBack (fun x (set, acc) -> if Set.contains x set +00:00:27 verbose #1135 > > then set, acc else set.Add x, x :: acc) list (Set.empty, [[]]) +00:00:27 verbose #1136 > > |> snd +00:00:27 verbose #1137 > > |> Seq.rev +00:00:27 verbose #1138 > > |> Seq.toArray +00:00:27 verbose #1139 > > |> String +00:00:27 verbose #1140 > > +00:00:27 verbose #1141 > > "D", +00:00:27 verbose #1142 > > fun input -> +00:00:27 verbose #1143 > > input +00:00:27 verbose #1144 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc +00:00:27 verbose #1145 > > else set.Add x, Array.append acc [[| x |]]) (Set.empty, [[||]]) +00:00:27 verbose #1146 > > |> snd +00:00:27 verbose #1147 > > |> String +00:00:27 verbose #1148 > > +00:00:27 verbose #1149 > > "E", +00:00:27 verbose #1150 > > fun input -> +00:00:27 verbose #1151 > > input +00:00:27 verbose #1152 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc +00:00:27 verbose #1153 > > else set.Add x, x :: acc) (Set.empty, [[]]) +00:00:27 verbose #1154 > > |> snd +00:00:27 verbose #1155 > > |> List.rev +00:00:27 verbose #1156 > > |> List.toArray +00:00:27 verbose #1157 > > |> String +00:00:27 verbose #1158 > > +00:00:27 verbose #1159 > > "F", +00:00:27 verbose #1160 > > fun input -> +00:00:27 verbose #1161 > > input +00:00:27 verbose #1162 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc +00:00:27 verbose #1163 > > else set.Add x, acc @ [[ x ]]) (Set.empty, [[]]) +00:00:27 verbose #1164 > > |> snd +00:00:27 verbose #1165 > > |> List.toArray +00:00:27 verbose #1166 > > |> String +00:00:27 verbose #1167 > > +00:00:27 verbose #1168 > > "G", +00:00:27 verbose #1169 > > fun input -> +00:00:27 verbose #1170 > > input +00:00:27 verbose #1171 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc +00:00:27 verbose #1172 > > else set.Add x, x :: acc) (Set.empty, [[]]) +00:00:27 verbose #1173 > > |> snd +00:00:27 verbose #1174 > > |> List.toArray +00:00:27 verbose #1175 > > |> Array.rev +00:00:27 verbose #1176 > > |> String +00:00:27 verbose #1177 > > +00:00:27 verbose #1178 > > "H", +00:00:27 verbose #1179 > > fun input -> +00:00:27 verbose #1180 > > input +00:00:27 verbose #1181 > > |> Seq.toList +00:00:27 verbose #1182 > > |> fun list -> +00:00:27 verbose #1183 > > let rec loop set = function +00:00:27 verbose #1184 > > | head :: tail when Set.contains head set -> loop set tail +00:00:27 verbose #1185 > > | head :: tail -> (loop (set.Add head) tail) @ [[ head ]] +00:00:27 verbose #1186 > > | [[]] -> [[]] +00:00:27 verbose #1187 > > loop Set.empty list +00:00:27 verbose #1188 > > |> List.rev +00:00:27 verbose #1189 > > |> List.toArray +00:00:27 verbose #1190 > > |> String +00:00:27 verbose #1191 > > +00:00:27 verbose #1192 > > "I", +00:00:27 verbose #1193 > > fun input -> +00:00:27 verbose #1194 > > input +00:00:27 verbose #1195 > > |> Seq.toList +00:00:27 verbose #1196 > > |> fun list -> +00:00:27 verbose #1197 > > let rec loop set = function +00:00:27 verbose #1198 > > | head :: tail when Set.contains head set -> loop set tail +00:00:27 verbose #1199 > > | head :: tail -> loop (set.Add head) tail |> Array.append [[| +00:00:27 verbose #1200 > > head |]] +00:00:27 verbose #1201 > > | [[]] -> [[||]] +00:00:27 verbose #1202 > > loop Set.empty list +00:00:27 verbose #1203 > > |> String +00:00:27 verbose #1204 > > +00:00:27 verbose #1205 > > "J", +00:00:27 verbose #1206 > > fun input -> +00:00:27 verbose #1207 > > input +00:00:27 verbose #1208 > > |> Seq.toList +00:00:27 verbose #1209 > > |> fun list -> +00:00:27 verbose #1210 > > let rec loop set = function +00:00:27 verbose #1211 > > | head :: tail when Set.contains head set -> loop set tail +00:00:27 verbose #1212 > > | head :: tail -> head :: loop (set.Add head) tail +00:00:27 verbose #1213 > > | [[]] -> [[]] +00:00:27 verbose #1214 > > loop Set.empty list +00:00:27 verbose #1215 > > |> List.toArray +00:00:27 verbose #1216 > > |> String +00:00:27 verbose #1217 > > +00:00:27 verbose #1218 > > "K", +00:00:27 verbose #1219 > > fun input -> +00:00:27 verbose #1220 > > input +00:00:27 verbose #1221 > > |> Seq.distinct +00:00:27 verbose #1222 > > |> Seq.toArray +00:00:27 verbose #1223 > > |> String +00:00:27 verbose #1224 > > ]] +00:00:27 verbose #1225 > > let testCases = seq { +00:00:27 verbose #1226 > > "abc", "abc" +00:00:27 verbose #1227 > > "accabb", "acb" +00:00:27 verbose #1228 > > "pprrqqpp", "prq" +00:00:27 verbose #1229 > > +00:00:27 verbose #1230 > > "aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbbbbb +00:00:27 verbose #1231 > > ", "acb" +00:00:27 verbose #1232 > > } +00:00:27 verbose #1233 > > let rec uniqueLettersTests = runAll (nameof uniqueLettersTests) _count solutions +00:00:27 verbose #1234 > > testCases +00:00:27 verbose #1235 > > uniqueLettersTests +00:00:27 verbose #1236 > > |> sortResultList +00:00:38 verbose #1237 > > +00:00:38 verbose #1238 > > ╭─[ 10.59s - stdout ]──────────────────────────────────────────────────────────╮ +00:00:38 verbose #1239 > > │ │ +00:00:38 verbose #1240 > > │ │ +00:00:38 verbose #1241 > > │ Test: uniqueLettersTests │ +00:00:38 verbose #1242 > > │ │ +00:00:38 verbose #1243 > > │ Solution: abc │ +00:00:38 verbose #1244 > > │ Test case 1. A. Time: 5L │ +00:00:38 verbose #1245 > > │ Test case 2. B. Time: 6L │ +00:00:38 verbose #1246 > > │ Test case 3. C. Time: 5L │ +00:00:38 verbose #1247 > > │ Test case 4. D. Time: 2L │ +00:00:38 verbose #1248 > > │ Test case 5. E. Time: 2L │ +00:00:38 verbose #1249 > > │ Test case 6. F. Time: 2L │ +00:00:38 verbose #1250 > > │ Test case 7. G. Time: 2L │ +00:00:38 verbose #1251 > > │ Test case 8. H. Time: 2L │ +00:00:38 verbose #1252 > > │ Test case 9. I. Time: 2L │ +00:00:38 verbose #1253 > > │ Test case 10. J. Time: 1L │ +00:00:38 verbose #1254 > > │ Test case 11. K. Time: 3L │ +00:00:38 verbose #1255 > > │ │ +00:00:38 verbose #1256 > > │ Solution: accabb │ +00:00:38 verbose #1257 > > │ Test case 1. A. Time: 1L │ +00:00:38 verbose #1258 > > │ Test case 2. B. Time: 1L │ +00:00:38 verbose #1259 > > │ Test case 3. C. Time: 2L │ +00:00:38 verbose #1260 > > │ Test case 4. D. Time: 1L │ +00:00:38 verbose #1261 > > │ Test case 5. E. Time: 1L │ +00:00:38 verbose #1262 > > │ Test case 6. F. Time: 1L │ +00:00:38 verbose #1263 > > │ Test case 7. G. Time: 1L │ +00:00:38 verbose #1264 > > │ Test case 8. H. Time: 1L │ +00:00:38 verbose #1265 > > │ Test case 9. I. Time: 1L │ +00:00:38 verbose #1266 > > │ Test case 10. J. Time: 1L │ +00:00:38 verbose #1267 > > │ Test case 11. K. Time: 1L │ +00:00:38 verbose #1268 > > │ │ +00:00:38 verbose #1269 > > │ Solution: pprrqqpp │ +00:00:38 verbose #1270 > > │ Test case 1. A. Time: 1L │ +00:00:38 verbose #1271 > > │ Test case 2. B. Time: 1L │ +00:00:38 verbose #1272 > > │ Test case 3. C. Time: 2L │ +00:00:38 verbose #1273 > > │ Test case 4. D. Time: 1L │ +00:00:38 verbose #1274 > > │ Test case 5. E. Time: 1L │ +00:00:38 verbose #1275 > > │ Test case 6. F. Time: 1L │ +00:00:38 verbose #1276 > > │ Test case 7. G. Time: 1L │ +00:00:38 verbose #1277 > > │ Test case 8. H. Time: 1L │ +00:00:38 verbose #1278 > > │ Test case 9. I. Time: 0L │ +00:00:38 verbose #1279 > > │ Test case 10. J. Time: 1L │ +00:00:38 verbose #1280 > > │ Test case 11. K. Time: 0L │ +00:00:38 verbose #1281 > > │ │ +00:00:38 verbose #1282 > > │ Solution: │ +00:00:38 verbose #1283 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ +00:00:38 verbose #1284 > > │ bbb │ +00:00:38 verbose #1285 > > │ Test case 1. A. Time: 13L │ +00:00:38 verbose #1286 > > │ Test case 2. B. Time: 10L │ +00:00:38 verbose #1287 > > │ Test case 3. C. Time: 13L │ +00:00:38 verbose #1288 > > │ Test case 4. D. Time: 9L │ +00:00:38 verbose #1289 > > │ Test case 5. E. Time: 9L │ +00:00:38 verbose #1290 > > │ Test case 6. F. Time: 9L │ +00:00:38 verbose #1291 > > │ Test case 7. G. Time: 14L │ +00:00:38 verbose #1292 > > │ Test case 8. H. Time: 9L │ +00:00:38 verbose #1293 > > │ Test case 9. I. Time: 7L │ +00:00:38 verbose #1294 > > │ Test case 10. J. Time: 7L │ +00:00:38 verbose #1295 > > │ Test case 11. K. Time: 3L │ +00:00:38 verbose #1296 > > │ │ +00:00:38 verbose #1297 > > │ Input │ +00:00:38 verbose #1298 > > │ | Expected | Result | Best │ +00:00:38 verbose #1299 > > │ --- │ +00:00:38 verbose #1300 > > │ | --- | --- | --- │ +00:00:38 verbose #1301 > > │ abc │ +00:00:38 verbose #1302 > > │ | abc | abc | (10, 1) │ +00:00:38 verbose #1303 > > │ accabb │ +00:00:38 verbose #1304 > > │ | acb | acb | (1, 1) │ +00:00:38 verbose #1305 > > │ pprrqqpp │ +00:00:38 verbose #1306 > > │ | prq | prq | (9, 0) │ +00:00:38 verbose #1307 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ +00:00:38 verbose #1308 > > │ bbb | acb | acb | (11, 3) │ +00:00:38 verbose #1309 > > │ │ +00:00:38 verbose #1310 > > │ Average Ranking │ +00:00:38 verbose #1311 > > │ Test case 11. Average Time: 1L │ +00:00:38 verbose #1312 > > │ Test case 9. Average Time: 2L │ +00:00:38 verbose #1313 > > │ Test case 10. Average Time: 2L │ +00:00:38 verbose #1314 > > │ Test case 4. Average Time: 3L │ +00:00:38 verbose #1315 > > │ Test case 5. Average Time: 3L │ +00:00:38 verbose #1316 > > │ Test case 6. Average Time: 3L │ +00:00:38 verbose #1317 > > │ Test case 8. Average Time: 3L │ +00:00:38 verbose #1318 > > │ Test case 2. Average Time: 4L │ +00:00:38 verbose #1319 > > │ Test case 7. Average Time: 4L │ +00:00:38 verbose #1320 > > │ Test case 1. Average Time: 5L │ +00:00:38 verbose #1321 > > │ Test case 3. Average Time: 5L │ +00:00:38 verbose #1322 > > │ │ +00:00:38 verbose #1323 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1324 > > +00:00:38 verbose #1325 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1326 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1327 > > │ ## rotateStringsTests │ +00:00:38 verbose #1328 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1329 > > +00:00:38 verbose #1330 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1331 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1332 > > │ https://www.hackerrank.com/challenges/rotate-string/forum │ +00:00:38 verbose #1333 > > │ │ +00:00:38 verbose #1334 > > │ Test: RotateStrings │ +00:00:38 verbose #1335 > > │ │ +00:00:38 verbose #1336 > > │ Solution: abc │ +00:00:38 verbose #1337 > > │ Test case 1. A. Time: 1842L │ +00:00:38 verbose #1338 > > │ Test case 2. B. Time: 1846L │ +00:00:38 verbose #1339 > > │ Test case 3. C. Time: 1936L │ +00:00:38 verbose #1340 > > │ Test case 4. CA. Time: 2224L │ +00:00:38 verbose #1341 > > │ Test case 5. CB. Time: 2329L │ +00:00:38 verbose #1342 > > │ Test case 6. D. Time: 2474L │ +00:00:38 verbose #1343 > > │ Test case 7. E. Time: 1664L │ +00:00:38 verbose #1344 > > │ Test case 8. F. Time: 1517L │ +00:00:38 verbose #1345 > > │ Test case 9. FA. Time: 1651L │ +00:00:38 verbose #1346 > > │ Test case 10. FB. Time: 3764L │ +00:00:38 verbose #1347 > > │ Test case 11. FC. Time: 5415L │ +00:00:38 verbose #1348 > > │ │ +00:00:38 verbose #1349 > > │ Solution: abcde │ +00:00:38 verbose #1350 > > │ Test case 1. A. Time: 3356L │ +00:00:38 verbose #1351 > > │ Test case 2. B. Time: 2592L │ +00:00:38 verbose #1352 > > │ Test case 3. C. Time: 2346L │ +00:00:38 verbose #1353 > > │ Test case 4. CA. Time: 2997L │ +00:00:38 verbose #1354 > > │ Test case 5. CB. Time: 3061L │ +00:00:38 verbose #1355 > > │ Test case 6. D. Time: 4051L │ +00:00:38 verbose #1356 > > │ Test case 7. E. Time: 1905L │ +00:00:38 verbose #1357 > > │ Test case 8. F. Time: 1771L │ +00:00:38 verbose #1358 > > │ Test case 9. FA. Time: 2175L │ +00:00:38 verbose #1359 > > │ Test case 10. FB. Time: 3275L │ +00:00:38 verbose #1360 > > │ Test case 11. FC. Time: 5266L │ +00:00:38 verbose #1361 > > │ │ +00:00:38 verbose #1362 > > │ Solution: abcdefghi │ +00:00:38 verbose #1363 > > │ Test case 1. A. Time: 4492L │ +00:00:38 verbose #1364 > > │ Test case 2. B. Time: 3526L │ +00:00:38 verbose #1365 > > │ Test case 3. C. Time: 3583L │ +00:00:38 verbose #1366 > > │ Test case 4. CA. Time: 3711L │ +00:00:38 verbose #1367 > > │ Test case 5. CB. Time: 4783L │ +00:00:38 verbose #1368 > > │ Test case 6. D. Time: 7557L │ +00:00:38 verbose #1369 > > │ Test case 7. E. Time: 3452L │ +00:00:38 verbose #1370 > > │ Test case 8. F. Time: 3050L │ +00:00:38 verbose #1371 > > │ Test case 9. FA. Time: 3275L │ +00:00:38 verbose #1372 > > │ Test case 10. FB. Time: 4635L │ +00:00:38 verbose #1373 > > │ Test case 11. FC. Time: 5616L │ +00:00:38 verbose #1374 > > │ │ +00:00:38 verbose #1375 > > │ Solution: abab │ +00:00:38 verbose #1376 > > │ Test case 1. A. Time: 2093L │ +00:00:38 verbose #1377 > > │ Test case 2. B. Time: 1843L │ +00:00:38 verbose #1378 > > │ Test case 3. C. Time: 1746L │ +00:00:38 verbose #1379 > > │ Test case 4. CA. Time: 2085L │ +00:00:38 verbose #1380 > > │ Test case 5. CB. Time: 2139L │ +00:00:38 verbose #1381 > > │ Test case 6. D. Time: 2095L │ +00:00:38 verbose #1382 > > │ Test case 7. E. Time: 1723L │ +00:00:38 verbose #1383 > > │ Test case 8. F. Time: 1558L │ +00:00:38 verbose #1384 > > │ Test case 9. FA. Time: 1620L │ +00:00:38 verbose #1385 > > │ Test case 10. FB. Time: 2319L │ +00:00:38 verbose #1386 > > │ Test case 11. FC. Time: 3918L │ +00:00:38 verbose #1387 > > │ │ +00:00:38 verbose #1388 > > │ Solution: aa │ +00:00:38 verbose #1389 > > │ Test case 1. A. Time: 1107L │ +00:00:38 verbose #1390 > > │ Test case 2. B. Time: 1241L │ +00:00:38 verbose #1391 > > │ Test case 3. C. Time: 1183L │ +00:00:38 verbose #1392 > > │ Test case 4. CA. Time: 1563L │ +00:00:38 verbose #1393 > > │ Test case 5. CB. Time: 1525L │ +00:00:38 verbose #1394 > > │ Test case 6. D. Time: 1591L │ +00:00:38 verbose #1395 > > │ Test case 7. E. Time: 1327L │ +00:00:38 verbose #1396 > > │ Test case 8. F. Time: 1151L │ +00:00:38 verbose #1397 > > │ Test case 9. FA. Time: 1180L │ +00:00:38 verbose #1398 > > │ Test case 10. FB. Time: 1733L │ +00:00:38 verbose #1399 > > │ Test case 11. FC. Time: 2817L │ +00:00:38 verbose #1400 > > │ │ +00:00:38 verbose #1401 > > │ Solution: z │ +00:00:38 verbose #1402 > > │ Test case 1. A. Time: 816L │ +00:00:38 verbose #1403 > > │ Test case 2. B. Time: 745L │ +00:00:38 verbose #1404 > > │ Test case 3. C. Time: 928L │ +00:00:38 verbose #1405 > > │ Test case 4. CA. Time: 1375L │ +00:00:38 verbose #1406 > > │ Test case 5. CB. Time: 1029L │ +00:00:38 verbose #1407 > > │ Test case 6. D. Time: 852L │ +00:00:38 verbose #1408 > > │ Test case 7. E. Time: 712L │ +00:00:38 verbose #1409 > > │ Test case 8. F. Time: 263L │ +00:00:38 verbose #1410 > > │ Test case 9. FA. Time: 232L │ +00:00:38 verbose #1411 > > │ Test case 10. FB. Time: 773L │ +00:00:38 verbose #1412 > > │ Test case 11. FC. Time: 1789L │ +00:00:38 verbose #1413 > > │ │ +00:00:38 verbose #1414 > > │ Input | Expected │ +00:00:38 verbose #1415 > > │ │ +00:00:38 verbose #1416 > > │ | Result │ +00:00:38 verbose #1417 > > │ │ +00:00:38 verbose #1418 > > │ | Best │ +00:00:38 verbose #1419 > > │ --- | --- │ +00:00:38 verbose #1420 > > │ │ +00:00:38 verbose #1421 > > │ | --- │ +00:00:38 verbose #1422 > > │ │ +00:00:38 verbose #1423 > > │ | --- │ +00:00:38 verbose #1424 > > │ abc | bca cab abc │ +00:00:38 verbose #1425 > > │ │ +00:00:38 verbose #1426 > > │ | bca cab abc │ +00:00:38 verbose #1427 > > │ │ +00:00:38 verbose #1428 > > │ | (8, 1517) │ +00:00:38 verbose #1429 > > │ abcde | bcdea cdeab deabc eabcd abcde │ +00:00:38 verbose #1430 > > │ | bcdea cdeab deabc eabcd abcde │ +00:00:38 verbose #1431 > > │ | (8, 1771) │ +00:00:38 verbose #1432 > > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde │ +00:00:38 verbose #1433 > > │ ghiabcdef hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab │ +00:00:38 verbose #1434 > > │ defghiabc efghiabcd fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi │ +00:00:38 verbose #1435 > > │ | (8, 3050) │ +00:00:38 verbose #1436 > > │ abab | baba abab baba abab │ +00:00:38 verbose #1437 > > │ │ +00:00:38 verbose #1438 > > │ | baba abab baba abab │ +00:00:38 verbose #1439 > > │ │ +00:00:38 verbose #1440 > > │ | (8, 1558) │ +00:00:38 verbose #1441 > > │ aa | aa aa │ +00:00:38 verbose #1442 > > │ │ +00:00:38 verbose #1443 > > │ | aa aa │ +00:00:38 verbose #1444 > > │ │ +00:00:38 verbose #1445 > > │ | (1, 1107) │ +00:00:38 verbose #1446 > > │ z | z │ +00:00:38 verbose #1447 > > │ │ +00:00:38 verbose #1448 > > │ | z │ +00:00:38 verbose #1449 > > │ │ +00:00:38 verbose #1450 > > │ | (9, 232) │ +00:00:38 verbose #1451 > > │ │ +00:00:38 verbose #1452 > > │ Averages │ +00:00:38 verbose #1453 > > │ Test case 1. Average Time: 2284L │ +00:00:38 verbose #1454 > > │ Test case 2. Average Time: 1965L │ +00:00:38 verbose #1455 > > │ Test case 3. Average Time: 1953L │ +00:00:38 verbose #1456 > > │ Test case 4. Average Time: 2325L │ +00:00:38 verbose #1457 > > │ Test case 5. Average Time: 2477L │ +00:00:38 verbose #1458 > > │ Test case 6. Average Time: 3103L │ +00:00:38 verbose #1459 > > │ Test case 7. Average Time: 1797L │ +00:00:38 verbose #1460 > > │ Test case 8. Average Time: 1551L │ +00:00:38 verbose #1461 > > │ Test case 9. Average Time: 1688L │ +00:00:38 verbose #1462 > > │ Test case 10. Average Time: 2749L │ +00:00:38 verbose #1463 > > │ Test case 11. Average Time: 4136L │ +00:00:38 verbose #1464 > > │ │ +00:00:38 verbose #1465 > > │ Ranking │ +00:00:38 verbose #1466 > > │ Test case 11. Average Time: 4136L │ +00:00:38 verbose #1467 > > │ Test case 6. Average Time: 3103L │ +00:00:38 verbose #1468 > > │ Test case 10. Average Time: 2749L │ +00:00:38 verbose #1469 > > │ Test case 5. Average Time: 2477L │ +00:00:38 verbose #1470 > > │ Test case 4. Average Time: 2325L │ +00:00:38 verbose #1471 > > │ Test case 1. Average Time: 2284L │ +00:00:38 verbose #1472 > > │ Test case 2. Average Time: 1965L │ +00:00:38 verbose #1473 > > │ Test case 3. Average Time: 1953L │ +00:00:38 verbose #1474 > > │ Test case 7. Average Time: 1797L │ +00:00:38 verbose #1475 > > │ Test case 9. Average Time: 1688L │ +00:00:38 verbose #1476 > > │ Test case 8. Average Time: 1551L │ +00:00:38 verbose #1477 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1478 > > +00:00:38 verbose #1479 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1480 > > //// test +00:00:38 verbose #1481 > > +00:00:38 verbose #1482 > > let solutions = [[ +00:00:38 verbose #1483 > > "A", +00:00:38 verbose #1484 > > fun (input: string) -> +00:00:38 verbose #1485 > > let resultList = +00:00:38 verbose #1486 > > List.fold (fun acc x -> +00:00:38 verbose #1487 > > let rotate (text: string) (letter: string) = (text |> +00:00:38 verbose #1488 > > SpiralSm.slice 1 (input.Length - 1)) + letter +00:00:38 verbose #1489 > > [[ rotate (if acc.IsEmpty then input else acc.Head) (string x) +00:00:38 verbose #1490 > > ]] @ acc +00:00:38 verbose #1491 > > ) [[]] (Seq.toList input) +00:00:38 verbose #1492 > > +00:00:38 verbose #1493 > > (resultList, "") +00:00:38 verbose #1494 > > ||> List.foldBack (fun acc x -> x + acc + " ") +00:00:38 verbose #1495 > > |> _.TrimEnd() +00:00:38 verbose #1496 > > +00:00:38 verbose #1497 > > "B", +00:00:38 verbose #1498 > > fun input -> +00:00:38 verbose #1499 > > input +00:00:38 verbose #1500 > > |> Seq.toList +00:00:38 verbose #1501 > > |> List.fold (fun (acc: string list) letter -> +00:00:38 verbose #1502 > > let last = +00:00:38 verbose #1503 > > if acc.IsEmpty +00:00:38 verbose #1504 > > then input +00:00:38 verbose #1505 > > else acc.Head +00:00:38 verbose #1506 > > +00:00:38 verbose #1507 > > let item = last.[[1 .. input.Length - 1]] + string letter +00:00:38 verbose #1508 > > +00:00:38 verbose #1509 > > item :: acc +00:00:38 verbose #1510 > > ) [[]] +00:00:38 verbose #1511 > > |> List.rev +00:00:38 verbose #1512 > > |> SpiralSm.concat " " +00:00:38 verbose #1513 > > +00:00:38 verbose #1514 > > "C", +00:00:38 verbose #1515 > > fun input -> +00:00:38 verbose #1516 > > input +00:00:38 verbose #1517 > > |> Seq.toList +00:00:38 verbose #1518 > > |> List.fold (fun (acc: string list) letter -> acc.Head.[[ 1 .. +00:00:38 verbose #1519 > > input.Length - 1 ]] + string letter :: acc) [[ input ]] +00:00:38 verbose #1520 > > |> List.rev +00:00:38 verbose #1521 > > |> List.skip 1 +00:00:38 verbose #1522 > > |> SpiralSm.concat " " +00:00:38 verbose #1523 > > +00:00:38 verbose #1524 > > "CA", +00:00:38 verbose #1525 > > fun input -> +00:00:38 verbose #1526 > > input +00:00:38 verbose #1527 > > |> Seq.fold (fun (acc: string list) letter -> acc.Head.[[ 1 .. +00:00:38 verbose #1528 > > input.Length - 1 ]] + string letter :: acc) [[ input ]] +00:00:38 verbose #1529 > > |> Seq.rev +00:00:38 verbose #1530 > > |> Seq.skip 1 +00:00:38 verbose #1531 > > |> SpiralSm.concat " " +00:00:38 verbose #1532 > > +00:00:38 verbose #1533 > > "CB", +00:00:38 verbose #1534 > > fun input -> +00:00:38 verbose #1535 > > input +00:00:38 verbose #1536 > > |> Seq.toArray +00:00:38 verbose #1537 > > |> Array.fold (fun (acc: string[[]]) letter -> acc |> Array.append [[| +00:00:38 verbose #1538 > > acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter |]]) [[| input |]] +00:00:38 verbose #1539 > > |> Array.rev +00:00:38 verbose #1540 > > |> Array.skip 1 +00:00:38 verbose #1541 > > |> SpiralSm.concat " " +00:00:38 verbose #1542 > > +00:00:38 verbose #1543 > > "D", +00:00:38 verbose #1544 > > fun input -> +00:00:38 verbose #1545 > > input +00:00:38 verbose #1546 > > |> Seq.toList +00:00:38 verbose #1547 > > |> fun list -> +00:00:38 verbose #1548 > > let rec loop (acc: char list list) = function +00:00:38 verbose #1549 > > | _ when acc.Length = list.Length -> acc +00:00:38 verbose #1550 > > | head :: tail -> +00:00:38 verbose #1551 > > let item = tail @ [[ head ]] +00:00:38 verbose #1552 > > loop (item :: acc) item +00:00:38 verbose #1553 > > | [[]] -> [[]] +00:00:38 verbose #1554 > > loop [[]] list +00:00:38 verbose #1555 > > |> List.rev +00:00:38 verbose #1556 > > |> List.map (List.toArray >> String) +00:00:38 verbose #1557 > > |> SpiralSm.concat " " +00:00:38 verbose #1558 > > +00:00:38 verbose #1559 > > "E", +00:00:38 verbose #1560 > > fun input -> +00:00:38 verbose #1561 > > input +00:00:38 verbose #1562 > > |> Seq.toList +00:00:38 verbose #1563 > > |> fun list -> +00:00:38 verbose #1564 > > let rec loop (last: string) = function +00:00:38 verbose #1565 > > | head :: tail -> +00:00:38 verbose #1566 > > let item = last.[[1 .. input.Length - 1]] + string head +00:00:38 verbose #1567 > > item :: loop item tail +00:00:38 verbose #1568 > > | [[]] -> [[]] +00:00:38 verbose #1569 > > loop input list +00:00:38 verbose #1570 > > |> SpiralSm.concat " " +00:00:38 verbose #1571 > > +00:00:38 verbose #1572 > > "F", +00:00:38 verbose #1573 > > fun input -> +00:00:38 verbose #1574 > > Array.singleton 0 +00:00:38 verbose #1575 > > |> Array.append [[| 1 .. input.Length - 1 |]] +00:00:38 verbose #1576 > > |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) +00:00:38 verbose #1577 > > |> SpiralSm.concat " " +00:00:38 verbose #1578 > > +00:00:38 verbose #1579 > > "FA", +00:00:38 verbose #1580 > > fun input -> +00:00:38 verbose #1581 > > List.singleton 0 +00:00:38 verbose #1582 > > |> List.append [[ 1 .. input.Length - 1 ]] +00:00:38 verbose #1583 > > |> List.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) +00:00:38 verbose #1584 > > |> SpiralSm.concat " " +00:00:38 verbose #1585 > > +00:00:38 verbose #1586 > > "FB", +00:00:38 verbose #1587 > > fun input -> +00:00:38 verbose #1588 > > Seq.singleton 0 +00:00:38 verbose #1589 > > |> Seq.append (seq { 1 .. input.Length - 1 }) +00:00:38 verbose #1590 > > |> Seq.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) +00:00:38 verbose #1591 > > |> SpiralSm.concat " " +00:00:38 verbose #1592 > > +00:00:38 verbose #1593 > > "FC", +00:00:38 verbose #1594 > > fun input -> +00:00:38 verbose #1595 > > Array.singleton 0 +00:00:38 verbose #1596 > > |> Array.append [[| 1 .. input.Length - 1 |]] +00:00:38 verbose #1597 > > |> Array.Parallel.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) +00:00:38 verbose #1598 > > |> SpiralSm.concat " " +00:00:38 verbose #1599 > > ]] +00:00:38 verbose #1600 > > let testCases = seq { +00:00:38 verbose #1601 > > "abc", "bca cab abc" +00:00:38 verbose #1602 > > "abcde", "bcdea cdeab deabc eabcd abcde" +00:00:38 verbose #1603 > > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef +00:00:38 verbose #1604 > > hiabcdefg iabcdefgh abcdefghi" +00:00:38 verbose #1605 > > "abab", "baba abab baba abab" +00:00:38 verbose #1606 > > "aa", "aa aa" +00:00:38 verbose #1607 > > "z", "z" +00:00:38 verbose #1608 > > } +00:00:38 verbose #1609 > > let rec rotateStringsTests = runAll (nameof rotateStringsTests) _count solutions +00:00:38 verbose #1610 > > testCases +00:00:38 verbose #1611 > > rotateStringsTests +00:00:38 verbose #1612 > > |> sortResultList +00:00:53 verbose #1613 > > +00:00:53 verbose #1614 > > ╭─[ 14.95s - stdout ]──────────────────────────────────────────────────────────╮ +00:00:53 verbose #1615 > > │ │ +00:00:53 verbose #1616 > > │ │ +00:00:53 verbose #1617 > > │ Test: rotateStringsTests │ +00:00:53 verbose #1618 > > │ │ +00:00:53 verbose #1619 > > │ Solution: abc │ +00:00:53 verbose #1620 > > │ Test case 1. A. Time: 3L │ +00:00:53 verbose #1621 > > │ Test case 2. B. Time: 2L │ +00:00:53 verbose #1622 > > │ Test case 3. C. Time: 2L │ +00:00:53 verbose #1623 > > │ Test case 4. CA. Time: 4L │ +00:00:53 verbose #1624 > > │ Test case 5. CB. Time: 3L │ +00:00:53 verbose #1625 > > │ Test case 6. D. Time: 2L │ +00:00:53 verbose #1626 > > │ Test case 7. E. Time: 2L │ +00:00:53 verbose #1627 > > │ Test case 8. F. Time: 3L │ +00:00:53 verbose #1628 > > │ Test case 9. FA. Time: 3L │ +00:00:53 verbose #1629 > > │ Test case 10. FB. Time: 9L │ +00:00:53 verbose #1630 > > │ Test case 11. FC. Time: 9L │ +00:00:53 verbose #1631 > > │ │ +00:00:53 verbose #1632 > > │ Solution: abcde │ +00:00:53 verbose #1633 > > │ Test case 1. A. Time: 3L │ +00:00:53 verbose #1634 > > │ Test case 2. B. Time: 1L │ +00:00:53 verbose #1635 > > │ Test case 3. C. Time: 1L │ +00:00:53 verbose #1636 > > │ Test case 4. CA. Time: 2L │ +00:00:53 verbose #1637 > > │ Test case 5. CB. Time: 1L │ +00:00:53 verbose #1638 > > │ Test case 6. D. Time: 4L │ +00:00:53 verbose #1639 > > │ Test case 7. E. Time: 1L │ +00:00:53 verbose #1640 > > │ Test case 8. F. Time: 0L │ +00:00:53 verbose #1641 > > │ Test case 9. FA. Time: 1L │ +00:00:53 verbose #1642 > > │ Test case 10. FB. Time: 4L │ +00:00:53 verbose #1643 > > │ Test case 11. FC. Time: 5L │ +00:00:53 verbose #1644 > > │ │ +00:00:53 verbose #1645 > > │ Solution: abcdefghi │ +00:00:53 verbose #1646 > > │ Test case 1. A. Time: 6L │ +00:00:53 verbose #1647 > > │ Test case 2. B. Time: 2L │ +00:00:53 verbose #1648 > > │ Test case 3. C. Time: 3L │ +00:00:53 verbose #1649 > > │ Test case 4. CA. Time: 3L │ +00:00:53 verbose #1650 > > │ Test case 5. CB. Time: 4L │ +00:00:53 verbose #1651 > > │ Test case 6. D. Time: 7L │ +00:00:53 verbose #1652 > > │ Test case 7. E. Time: 3L │ +00:00:53 verbose #1653 > > │ Test case 8. F. Time: 0L │ +00:00:53 verbose #1654 > > │ Test case 9. FA. Time: 4L │ +00:00:53 verbose #1655 > > │ Test case 10. FB. Time: 3L │ +00:00:53 verbose #1656 > > │ Test case 11. FC. Time: 6L │ +00:00:53 verbose #1657 > > │ │ +00:00:53 verbose #1658 > > │ Solution: abab │ +00:00:53 verbose #1659 > > │ Test case 1. A. Time: 0L │ +00:00:53 verbose #1660 > > │ Test case 2. B. Time: 1L │ +00:00:53 verbose #1661 > > │ Test case 3. C. Time: 1L │ +00:00:53 verbose #1662 > > │ Test case 4. CA. Time: 1L │ +00:00:53 verbose #1663 > > │ Test case 5. CB. Time: 1L │ +00:00:53 verbose #1664 > > │ Test case 6. D. Time: 1L │ +00:00:53 verbose #1665 > > │ Test case 7. E. Time: 1L │ +00:00:53 verbose #1666 > > │ Test case 8. F. Time: 0L │ +00:00:53 verbose #1667 > > │ Test case 9. FA. Time: 1L │ +00:00:53 verbose #1668 > > │ Test case 10. FB. Time: 1L │ +00:00:53 verbose #1669 > > │ Test case 11. FC. Time: 7L │ +00:00:53 verbose #1670 > > │ │ +00:00:53 verbose #1671 > > │ Solution: aa │ +00:00:53 verbose #1672 > > │ Test case 1. A. Time: 1L │ +00:00:53 verbose #1673 > > │ Test case 2. B. Time: 0L │ +00:00:53 verbose #1674 > > │ Test case 3. C. Time: 0L │ +00:00:53 verbose #1675 > > │ Test case 4. CA. Time: 1L │ +00:00:53 verbose #1676 > > │ Test case 5. CB. Time: 1L │ +00:00:53 verbose #1677 > > │ Test case 6. D. Time: 1L │ +00:00:53 verbose #1678 > > │ Test case 7. E. Time: 0L │ +00:00:53 verbose #1679 > > │ Test case 8. F. Time: 0L │ +00:00:53 verbose #1680 > > │ Test case 9. FA. Time: 0L │ +00:00:53 verbose #1681 > > │ Test case 10. FB. Time: 0L │ +00:00:53 verbose #1682 > > │ Test case 11. FC. Time: 4L │ +00:00:53 verbose #1683 > > │ │ +00:00:53 verbose #1684 > > │ Solution: z │ +00:00:53 verbose #1685 > > │ Test case 1. A. Time: 0L │ +00:00:53 verbose #1686 > > │ Test case 2. B. Time: 0L │ +00:00:53 verbose #1687 > > │ Test case 3. C. Time: 0L │ +00:00:53 verbose #1688 > > │ Test case 4. CA. Time: 0L │ +00:00:53 verbose #1689 > > │ Test case 5. CB. Time: 0L │ +00:00:53 verbose #1690 > > │ Test case 6. D. Time: 0L │ +00:00:53 verbose #1691 > > │ Test case 7. E. Time: 0L │ +00:00:53 verbose #1692 > > │ Test case 8. F. Time: 0L │ +00:00:53 verbose #1693 > > │ Test case 9. FA. Time: 0L │ +00:00:53 verbose #1694 > > │ Test case 10. FB. Time: 0L │ +00:00:53 verbose #1695 > > │ Test case 11. FC. Time: 4L │ +00:00:53 verbose #1696 > > │ │ +00:00:53 verbose #1697 > > │ Input | Expected │ +00:00:53 verbose #1698 > > │ │ +00:00:53 verbose #1699 > > │ | Result │ +00:00:53 verbose #1700 > > │ │ +00:00:53 verbose #1701 > > │ | Best │ +00:00:53 verbose #1702 > > │ --- | --- │ +00:00:53 verbose #1703 > > │ │ +00:00:53 verbose #1704 > > │ | --- │ +00:00:53 verbose #1705 > > │ │ +00:00:53 verbose #1706 > > │ | --- │ +00:00:53 verbose #1707 > > │ abc | bca cab abc │ +00:00:53 verbose #1708 > > │ │ +00:00:53 verbose #1709 > > │ | bca cab abc │ +00:00:53 verbose #1710 > > │ │ +00:00:53 verbose #1711 > > │ | (2, 2) │ +00:00:53 verbose #1712 > > │ abcde | bcdea cdeab deabc eabcd abcde │ +00:00:53 verbose #1713 > > │ | bcdea cdeab deabc eabcd abcde │ +00:00:53 verbose #1714 > > │ | (8, 0) │ +00:00:53 verbose #1715 > > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │ +00:00:53 verbose #1716 > > │ hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd │ +00:00:53 verbose #1717 > > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi | (8, 0) │ +00:00:53 verbose #1718 > > │ abab | baba abab baba abab │ +00:00:53 verbose #1719 > > │ | baba abab baba abab │ +00:00:53 verbose #1720 > > │ | (1, 0) │ +00:00:53 verbose #1721 > > │ aa | aa aa │ +00:00:53 verbose #1722 > > │ │ +00:00:53 verbose #1723 > > │ | aa aa │ +00:00:53 verbose #1724 > > │ │ +00:00:53 verbose #1725 > > │ | (2, 0) │ +00:00:53 verbose #1726 > > │ z | z │ +00:00:53 verbose #1727 > > │ │ +00:00:53 verbose #1728 > > │ | z │ +00:00:53 verbose #1729 > > │ │ +00:00:53 verbose #1730 > > │ | (1, 0) │ +00:00:53 verbose #1731 > > │ │ +00:00:53 verbose #1732 > > │ Average Ranking │ +00:00:53 verbose #1733 > > │ Test case 8. Average Time: 0L │ +00:00:53 verbose #1734 > > │ Test case 2. Average Time: 1L │ +00:00:53 verbose #1735 > > │ Test case 3. Average Time: 1L │ +00:00:53 verbose #1736 > > │ Test case 4. Average Time: 1L │ +00:00:53 verbose #1737 > > │ Test case 5. Average Time: 1L │ +00:00:53 verbose #1738 > > │ Test case 7. Average Time: 1L │ +00:00:53 verbose #1739 > > │ Test case 9. Average Time: 1L │ +00:00:53 verbose #1740 > > │ Test case 1. Average Time: 2L │ +00:00:53 verbose #1741 > > │ Test case 6. Average Time: 2L │ +00:00:53 verbose #1742 > > │ Test case 10. Average Time: 2L │ +00:00:53 verbose #1743 > > │ Test case 11. Average Time: 5L │ +00:00:53 verbose #1744 > > │ │ +00:00:53 verbose #1745 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:53 verbose #1746 > > +00:00:53 verbose #1747 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:53 verbose #1748 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:53 verbose #1749 > > │ ## rotate_strings_tests │ +00:00:53 verbose #1750 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:53 verbose #1751 > > +00:00:53 verbose #1752 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:53 verbose #1753 > > //// test +00:00:53 verbose #1754 > > //// timeout=60000 +00:00:53 verbose #1755 > > +00:00:53 verbose #1756 > > inl get_solutions () = +00:00:53 verbose #1757 > > [[ +00:00:53 verbose #1758 > > // "A", +00:00:53 verbose #1759 > > // fun (input : string) => +00:00:53 verbose #1760 > > // let resultList = +00:00:53 verbose #1761 > > // List.fold (fun acc x => +00:00:53 verbose #1762 > > // let rotate (text : string) (letter : string) = +00:00:53 verbose #1763 > > text.Substring (1, input.Length - 1) + letter +00:00:53 verbose #1764 > > // [[ rotate (if acc.IsEmpty then input else acc.Head) +00:00:53 verbose #1765 > > (string x) ]] ++ acc +00:00:53 verbose #1766 > > // ) [[]] (Seq.toList input) +00:00:53 verbose #1767 > > +00:00:53 verbose #1768 > > // List.foldBack (fun acc x => x + acc + " ") resultList "" +00:00:53 verbose #1769 > > // |> fun x => x.TrimEnd () +00:00:53 verbose #1770 > > +00:00:53 verbose #1771 > > // "B", +00:00:53 verbose #1772 > > // fun input => +00:00:53 verbose #1773 > > // input +00:00:53 verbose #1774 > > // |> Seq.toList +00:00:53 verbose #1775 > > // |> List.fold (fun (acc : string list) letter => +00:00:53 verbose #1776 > > // let last = +00:00:53 verbose #1777 > > // if acc.IsEmpty +00:00:53 verbose #1778 > > // then input +00:00:53 verbose #1779 > > // else acc.Head +00:00:53 verbose #1780 > > +00:00:53 verbose #1781 > > // let item = last.[[1 .. input.Length - 1]] + string letter +00:00:53 verbose #1782 > > +00:00:53 verbose #1783 > > // item :: acc +00:00:53 verbose #1784 > > // ) [[]] +00:00:53 verbose #1785 > > // |> List.rev +00:00:53 verbose #1786 > > // |> SpiralSm.concat " " +00:00:53 verbose #1787 > > +00:00:53 verbose #1788 > > // "C", +00:00:53 verbose #1789 > > // fun input => +00:00:53 verbose #1790 > > // input +00:00:53 verbose #1791 > > // |> Seq.toList +00:00:53 verbose #1792 > > // |> List.fold (fun (acc : list string) letter => acc.Head.[[ 1 .. +00:00:53 verbose #1793 > > input.Length - 1 ]] + string letter :: acc) [[ input ]] +00:00:53 verbose #1794 > > // |> List.rev +00:00:53 verbose #1795 > > // |> List.skip 1 +00:00:53 verbose #1796 > > // |> SpiralSm.concat " " +00:00:53 verbose #1797 > > +00:00:53 verbose #1798 > > // "CA", +00:00:53 verbose #1799 > > // fun input => +00:00:53 verbose #1800 > > // input +00:00:53 verbose #1801 > > // |> Seq.fold (fun (acc : list string) letter => acc.Head.[[ 1 .. +00:00:53 verbose #1802 > > input.Length - 1 ]] + string letter :: acc) [[ input ]] +00:00:53 verbose #1803 > > // |> Seq.rev +00:00:53 verbose #1804 > > // |> Seq.skip 1 +00:00:53 verbose #1805 > > // |> SpiralSm.concat " " +00:00:53 verbose #1806 > > +00:00:53 verbose #1807 > > // "CB", +00:00:53 verbose #1808 > > // fun input => +00:00:53 verbose #1809 > > // input +00:00:53 verbose #1810 > > // |> Seq.toArray +00:00:53 verbose #1811 > > // |> Array.fold (fun (acc : a _ string) letter => acc |> +00:00:53 verbose #1812 > > Array.append (a ;[[ acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter ]])) +00:00:53 verbose #1813 > > (a ;[[ input ]]) +00:00:53 verbose #1814 > > // |> Array.rev +00:00:53 verbose #1815 > > // |> Array.skip 1 +00:00:53 verbose #1816 > > // |> SpiralSm.concat " " +00:00:53 verbose #1817 > > +00:00:53 verbose #1818 > > // "D", +00:00:53 verbose #1819 > > // fun input => +00:00:53 verbose #1820 > > // input +00:00:53 verbose #1821 > > // |> Seq.toList +00:00:53 verbose #1822 > > // |> fun list => +00:00:53 verbose #1823 > > // let rec loop (acc : list (list char)) = function +00:00:53 verbose #1824 > > // | _ when acc.Length = list.Length => acc +00:00:53 verbose #1825 > > // | head :: tail => +00:00:53 verbose #1826 > > // let item = tail ++ [[ head ]] +00:00:53 verbose #1827 > > // loop (item :: acc) item +00:00:53 verbose #1828 > > // | [[]] => [[]] +00:00:53 verbose #1829 > > // loop [[]] list +00:00:53 verbose #1830 > > // |> List.rev +00:00:53 verbose #1831 > > // |> List.map (List.toArray >> String) +00:00:53 verbose #1832 > > // |> SpiralSm.concat " " +00:00:53 verbose #1833 > > +00:00:53 verbose #1834 > > // "E", +00:00:53 verbose #1835 > > // fun input => +00:00:53 verbose #1836 > > // input +00:00:53 verbose #1837 > > // |> Seq.toList +00:00:53 verbose #1838 > > // |> fun list => +00:00:53 verbose #1839 > > // let rec loop (last : string) = function +00:00:53 verbose #1840 > > // | head :: tail => +00:00:53 verbose #1841 > > // let item = last.[[1 .. input.Length - 1]] + string +00:00:53 verbose #1842 > > head +00:00:53 verbose #1843 > > // item :: loop item tail +00:00:53 verbose #1844 > > // | [[]] => [[]] +00:00:53 verbose #1845 > > // loop input list +00:00:53 verbose #1846 > > // |> SpiralSm.concat " " +00:00:53 verbose #1847 > > +00:00:53 verbose #1848 > > "F", +00:00:53 verbose #1849 > > fun input => +00:00:53 verbose #1850 > > // Array.singleton 0 +00:00:53 verbose #1851 > > // |> Array.append [[| 1 .. input.Length - 1 |]] +00:00:53 verbose #1852 > > // |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) +00:00:53 verbose #1853 > > // |> SpiralSm.concat " " +00:00:53 verbose #1854 > > inl input_length = input |> sm.length +00:00:53 verbose #1855 > > am.singleton 0i32 +00:00:53 verbose #1856 > > |> am.append (am'.init_series 1 (input_length - 1) 1) +00:00:53 verbose #1857 > > |> am.map (fun i => +00:00:53 verbose #1858 > > inl a = input |> sm'.slice i (input_length - 1) +00:00:53 verbose #1859 > > inl b = input |> sm'.slice 0 (i - 1) +00:00:53 verbose #1860 > > $"!a + !b" : string +00:00:53 verbose #1861 > > ) +00:00:53 verbose #1862 > > |> seq.of_array +00:00:53 verbose #1863 > > |> sm'.concat " " +00:00:53 verbose #1864 > > +00:00:53 verbose #1865 > > "FA", +00:00:53 verbose #1866 > > fun input => +00:00:53 verbose #1867 > > // List.singleton 0 +00:00:53 verbose #1868 > > // |> List.append [[ 1 .. input.Length - 1 ]] +00:00:53 verbose #1869 > > // // |> List.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]]) +00:00:53 verbose #1870 > > // |> SpiralSm.concat " " +00:00:53 verbose #1871 > > inl input_length = input |> sm.length +00:00:53 verbose #1872 > > listm.singleton 0i32 +00:00:53 verbose #1873 > > |> listm.append (listm'.init_series 1 (input_length - 1) 1) +00:00:53 verbose #1874 > > |> listm.map (fun i => +00:00:53 verbose #1875 > > inl a = input |> sm'.slice i (input_length - 1) +00:00:53 verbose #1876 > > inl b = if i = 0 then "" else input |> sm'.slice 0 (i - 1) +00:00:53 verbose #1877 > > $"!a + !b" : string +00:00:53 verbose #1878 > > ) +00:00:53 verbose #1879 > > |> listm.toArray +00:00:53 verbose #1880 > > |> fun x => x : a i32 _ +00:00:53 verbose #1881 > > |> seq.of_array +00:00:53 verbose #1882 > > |> sm'.concat " " +00:00:53 verbose #1883 > > +00:00:53 verbose #1884 > > // "FB", +00:00:53 verbose #1885 > > // fun input => +00:00:53 verbose #1886 > > // Seq.singleton 0 +00:00:53 verbose #1887 > > // // |> Seq.append (seq { 1 .. input.Length - 1 }) +00:00:53 verbose #1888 > > // // |> Seq.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]]) +00:00:53 verbose #1889 > > // |> SpiralSm.concat " " +00:00:53 verbose #1890 > > +00:00:53 verbose #1891 > > // "FC", +00:00:53 verbose #1892 > > // fun input => +00:00:53 verbose #1893 > > // Array.singleton 0 +00:00:53 verbose #1894 > > // |> Array.append (a ;[[ 1 .. input.Length - 1 ]]) +00:00:53 verbose #1895 > > //// |> Array.Parallel.map (fun i => input.[[ i .. ]] + input.[[ .. i +00:00:53 verbose #1896 > > - 1 ]]) +00:00:53 verbose #1897 > > // |> SpiralSm.concat " " +00:00:53 verbose #1898 > > ]] +00:00:53 verbose #1899 > > +00:00:53 verbose #1900 > > inl rec rotate_strings_tests () = +00:00:53 verbose #1901 > > inl test_cases = [[ +00:00:53 verbose #1902 > > "abc", "bca cab abc" +00:00:53 verbose #1903 > > "abcde", "bcdea cdeab deabc eabcd abcde" +00:00:53 verbose #1904 > > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde +00:00:53 verbose #1905 > > ghiabcdef hiabcdefg iabcdefgh abcdefghi" +00:00:53 verbose #1906 > > "abab", "baba abab baba abab" +00:00:53 verbose #1907 > > "aa", "aa aa" +00:00:53 verbose #1908 > > "z", "z" +00:00:53 verbose #1909 > > ]] +00:00:53 verbose #1910 > > +00:00:53 verbose #1911 > > inl solutions = get_solutions () +00:00:53 verbose #1912 > > +00:00:53 verbose #1913 > > // inl is_fast () = true +00:00:53 verbose #1914 > > +00:00:53 verbose #1915 > > inl count = +00:00:53 verbose #1916 > > if is_fast () +00:00:53 verbose #1917 > > then 1000i32 +00:00:53 verbose #1918 > > else 2000000i32 +00:00:53 verbose #1919 > > +00:00:53 verbose #1920 > > run_all (nameof rotate_strings_tests) count solutions test_cases +00:00:53 verbose #1921 > > |> sort_result_list +00:00:53 verbose #1922 > > +00:00:53 verbose #1923 > > rotate_strings_tests () +00:01:20 verbose #1924 > > +00:01:20 verbose #1925 > > ╭─[ 27.59s - stdout ]──────────────────────────────────────────────────────────╮ +00:01:20 verbose #1926 > > │ │ +00:01:20 verbose #1927 > > │ │ +00:01:20 verbose #1928 > > │ Test: v0 │ +00:01:20 verbose #1929 > > │ │ +00:01:20 verbose #1930 > > │ Solution: "abc" │ +00:01:20 verbose #1931 > > │ Test case 1. F. Time: 1413 │ +00:01:20 verbose #1932 > > │ Test case 2. FA. Time: 1599 │ +00:01:20 verbose #1933 > > │ │ +00:01:20 verbose #1934 > > │ Solution: "abcde" │ +00:01:20 verbose #1935 > > │ Test case 1. F. Time: 1621 │ +00:01:20 verbose #1936 > > │ Test case 2. FA. Time: 2153 │ +00:01:20 verbose #1937 > > │ │ +00:01:20 verbose #1938 > > │ Solution: "abcdefghi" │ +00:01:20 verbose #1939 > > │ Test case 1. F. Time: 2303 │ +00:01:20 verbose #1940 > > │ Test case 2. FA. Time: 2712 │ +00:01:20 verbose #1941 > > │ │ +00:01:20 verbose #1942 > > │ Solution: "abab" │ +00:01:20 verbose #1943 > > │ Test case 1. F. Time: 1397 │ +00:01:20 verbose #1944 > > │ Test case 2. FA. Time: 1416 │ +00:01:20 verbose #1945 > > │ │ +00:01:20 verbose #1946 > > │ Solution: "aa" │ +00:01:20 verbose #1947 > > │ Test case 1. F. Time: 1035 │ +00:01:20 verbose #1948 > > │ Test case 2. FA. Time: 1016 │ +00:01:20 verbose #1949 > > │ │ +00:01:20 verbose #1950 > > │ Solution: "z" │ +00:01:20 verbose #1951 > > │ Test case 1. F. Time: 264 │ +00:01:20 verbose #1952 > > │ Test case 2. FA. Time: 204 │ +00:01:20 verbose #1953 > > │ │ +00:01:20 verbose #1954 > > │ Input | Expected │ +00:01:20 verbose #1955 > > │ │ +00:01:20 verbose #1956 > > │ | Result │ +00:01:20 verbose #1957 > > │ │ +00:01:20 verbose #1958 > > │ | Best │ +00:01:20 verbose #1959 > > │ --- | --- │ +00:01:20 verbose #1960 > > │ │ +00:01:20 verbose #1961 > > │ | --- │ +00:01:20 verbose #1962 > > │ │ +00:01:20 verbose #1963 > > │ | --- │ +00:01:20 verbose #1964 > > │ "abc" | "bca cab abc" │ +00:01:20 verbose #1965 > > │ │ +00:01:20 verbose #1966 > > │ | "bca cab abc" │ +00:01:20 verbose #1967 > > │ │ +00:01:20 verbose #1968 > > │ | struct (1L, 1413L) │ +00:01:20 verbose #1969 > > │ "abcde" | "bcdea cdeab deabc eabcd abcde" │ +00:01:20 verbose #1970 > > │ | "bcdea cdeab deabc eabcd abcde" │ +00:01:20 verbose #1971 > > │ | struct (1L, 1621L) │ +00:01:20 verbose #1972 > > │ "abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │ +00:01:20 verbose #1973 > > │ hiabcdefg iabcdefgh abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd │ +00:01:20 verbose #1974 > > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi" | struct (1L, 2303L) │ +00:01:20 verbose #1975 > > │ "abab" | "baba abab baba abab" │ +00:01:20 verbose #1976 > > │ | "baba abab baba abab" │ +00:01:20 verbose #1977 > > │ | struct (1L, 1397L) │ +00:01:20 verbose #1978 > > │ "aa" | "aa aa" │ +00:01:20 verbose #1979 > > │ │ +00:01:20 verbose #1980 > > │ | "aa aa" │ +00:01:20 verbose #1981 > > │ │ +00:01:20 verbose #1982 > > │ | struct (2L, 1016L) │ +00:01:20 verbose #1983 > > │ "z" | "z" │ +00:01:20 verbose #1984 > > │ │ +00:01:20 verbose #1985 > > │ | "z" │ +00:01:20 verbose #1986 > > │ │ +00:01:20 verbose #1987 > > │ | struct (2L, 204L) │ +00:01:20 verbose #1988 > > │ │ +00:01:20 verbose #1989 > > │ Average Ranking │ +00:01:20 verbose #1990 > > │ Test case 1. Average Time: 1338L │ +00:01:20 verbose #1991 > > │ Test case 2. Average Time: 1516L │ +00:01:20 verbose #1992 > > │ │ +00:01:20 verbose #1993 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:20 verbose #1994 > > +00:01:20 verbose #1995 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:20 verbose #1996 > > //// test +00:01:20 verbose #1997 > > +00:01:20 verbose #1998 > > // rotate_strings_tests () +00:01:20 verbose #1999 > > () +00:01:20 verbose #2000 > > +00:01:20 verbose #2001 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:20 verbose #2002 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:20 verbose #2003 > > │ ## binary_search_tests │ +00:01:20 verbose #2004 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:20 verbose #2005 > > +00:01:20 verbose #2006 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:20 verbose #2007 > > //// test +00:01:20 verbose #2008 > > //// timeout=90000 +00:01:20 verbose #2009 > > +00:01:20 verbose #2010 > > inl binary_search_semi_open_1 arr target left right = +00:01:20 verbose #2011 > > inl rec body left right = +00:01:20 verbose #2012 > > if left >= right +00:01:20 verbose #2013 > > then None +00:01:20 verbose #2014 > > else +00:01:20 verbose #2015 > > inl mid = (left + right) / 2 +00:01:20 verbose #2016 > > inl item = index arr mid +00:01:20 verbose #2017 > > if item = target +00:01:20 verbose #2018 > > then Some mid +00:01:20 verbose #2019 > > elif item < target +00:01:20 verbose #2020 > > then loop (mid + 1) right +00:01:20 verbose #2021 > > else loop left mid +00:01:20 verbose #2022 > > and inl loop left right = +00:01:20 verbose #2023 > > if var_is right |> not +00:01:20 verbose #2024 > > then body left right +00:01:20 verbose #2025 > > else +00:01:20 verbose #2026 > > inl left = dyn left +00:01:20 verbose #2027 > > join body left right +00:01:20 verbose #2028 > > loop left right +00:01:20 verbose #2029 > > +00:01:20 verbose #2030 > > inl binary_search_closed_1 arr target left right = +00:01:20 verbose #2031 > > inl rec body left right = +00:01:20 verbose #2032 > > if left > right +00:01:20 verbose #2033 > > then None +00:01:20 verbose #2034 > > else +00:01:20 verbose #2035 > > inl mid = (left + right) / 2 +00:01:20 verbose #2036 > > inl item = index arr mid +00:01:20 verbose #2037 > > if item = target +00:01:20 verbose #2038 > > then Some mid +00:01:20 verbose #2039 > > elif item < target +00:01:20 verbose #2040 > > then loop (mid + 1) right +00:01:20 verbose #2041 > > else loop left (mid - 1) +00:01:20 verbose #2042 > > and inl loop left right = +00:01:20 verbose #2043 > > if var_is right |> not +00:01:20 verbose #2044 > > then body left right +00:01:20 verbose #2045 > > else +00:01:20 verbose #2046 > > inl left = dyn left +00:01:20 verbose #2047 > > join body left right +00:01:20 verbose #2048 > > loop left right +00:01:20 verbose #2049 > > +00:01:20 verbose #2050 > > inl binary_search_semi_open_2 arr target left right = +00:01:20 verbose #2051 > > let rec body left right = +00:01:20 verbose #2052 > > if left >= right +00:01:20 verbose #2053 > > then None +00:01:20 verbose #2054 > > else +00:01:20 verbose #2055 > > inl mid = (left + right) / 2 +00:01:20 verbose #2056 > > inl item = index arr mid +00:01:20 verbose #2057 > > if item = target +00:01:20 verbose #2058 > > then Some mid +00:01:20 verbose #2059 > > elif item < target +00:01:20 verbose #2060 > > then loop (mid + 1) right +00:01:20 verbose #2061 > > else loop left mid +00:01:20 verbose #2062 > > and inl loop left right = body left right +00:01:20 verbose #2063 > > loop left right +00:01:20 verbose #2064 > > +00:01:20 verbose #2065 > > inl binary_search_closed_2 arr target left right = +00:01:20 verbose #2066 > > let rec body left right = +00:01:20 verbose #2067 > > if left > right +00:01:20 verbose #2068 > > then None +00:01:20 verbose #2069 > > else +00:01:20 verbose #2070 > > inl mid = (left + right) / 2 +00:01:20 verbose #2071 > > inl item = index arr mid +00:01:20 verbose #2072 > > if item = target +00:01:20 verbose #2073 > > then Some mid +00:01:20 verbose #2074 > > elif item < target +00:01:20 verbose #2075 > > then loop (mid + 1) right +00:01:20 verbose #2076 > > else loop left (mid - 1) +00:01:20 verbose #2077 > > and inl loop left right = body left right +00:01:20 verbose #2078 > > loop left right +00:01:20 verbose #2079 > > +00:01:20 verbose #2080 > > inl get_solutions () = +00:01:20 verbose #2081 > > [[ +00:01:20 verbose #2082 > > "semi_open_1", +00:01:20 verbose #2083 > > fun (arr, (target, len)) => +00:01:20 verbose #2084 > > binary_search_semi_open_1 arr target 0 len +00:01:20 verbose #2085 > > +00:01:20 verbose #2086 > > "closed_1", +00:01:20 verbose #2087 > > fun (arr, (target, len)) => +00:01:20 verbose #2088 > > binary_search_closed_1 arr target 0 (len - 1) +00:01:20 verbose #2089 > > +00:01:20 verbose #2090 > > "semi_open_2", +00:01:20 verbose #2091 > > fun (arr, (target, len)) => +00:01:20 verbose #2092 > > binary_search_semi_open_2 arr target 0 len +00:01:20 verbose #2093 > > +00:01:20 verbose #2094 > > "closed_2", +00:01:20 verbose #2095 > > fun (arr, (target, len)) => +00:01:20 verbose #2096 > > binary_search_closed_2 arr target 0 (len - 1) +00:01:20 verbose #2097 > > ]] +00:01:20 verbose #2098 > > +00:01:20 verbose #2099 > > inl rec binary_search_tests () = +00:01:20 verbose #2100 > > inl arr_with_len target len arr = +00:01:20 verbose #2101 > > arr, (target, (len |> optionm'.default_with fun () => length arr)) +00:01:20 verbose #2102 > > +00:01:20 verbose #2103 > > inl test_cases = [[ +00:01:20 verbose #2104 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 None), (Some 3i32) +00:01:20 verbose #2105 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 None), (Some 0i32) +00:01:20 verbose #2106 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 None), (Some 6i32) +00:01:20 verbose #2107 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 None), None +00:01:20 verbose #2108 > > ((am'.init_series 1i32 100 1) |> arr_with_len 60 None), (Some 59) +00:01:20 verbose #2109 > > +00:01:20 verbose #2110 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 (Some 7)), (Some +00:01:20 verbose #2111 > > 3i32) +00:01:20 verbose #2112 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 (Some 7)), (Some +00:01:20 verbose #2113 > > 0i32) +00:01:20 verbose #2114 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 (Some 7)), (Some +00:01:20 verbose #2115 > > 6i32) +00:01:20 verbose #2116 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 (Some 7)), None +00:01:20 verbose #2117 > > ((am'.init_series 1i32 100 1) |> arr_with_len 60 (Some 100)), (Some 59) +00:01:20 verbose #2118 > > ]] +00:01:20 verbose #2119 > > +00:01:20 verbose #2120 > > inl solutions = get_solutions () +00:01:20 verbose #2121 > > +00:01:20 verbose #2122 > > // inl is_fast () = true +00:01:20 verbose #2123 > > +00:01:20 verbose #2124 > > inl count = +00:01:20 verbose #2125 > > if is_fast () +00:01:20 verbose #2126 > > then 1000i32 +00:01:20 verbose #2127 > > else 8000000i32 +00:01:20 verbose #2128 > > +00:01:20 verbose #2129 > > run_all (nameof binary_search_tests) count solutions test_cases +00:01:20 verbose #2130 > > |> sort_result_list +00:01:20 verbose #2131 > > +00:01:20 verbose #2132 > > +00:01:20 verbose #2133 > > let main () = +00:01:20 verbose #2134 > > binary_search_tests () +00:01:57 verbose #2135 > > +00:01:57 verbose #2136 > > ╭─[ 36.08s - stdout ]──────────────────────────────────────────────────────────╮ +00:01:57 verbose #2137 > > │ │ +00:01:57 verbose #2138 > > │ │ +00:01:57 verbose #2139 > > │ Test: v25 │ +00:01:57 verbose #2140 > > │ │ +00:01:57 verbose #2141 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │ +00:01:57 verbose #2142 > > │ Test case 1. semi_open_1. Time: 544 │ +00:01:57 verbose #2143 > > │ Test case 2. closed_1. Time: 525 │ +00:01:57 verbose #2144 > > │ Test case 3. semi_open_2. Time: 584 │ +00:01:57 verbose #2145 > > │ Test case 4. closed_2. Time: 484 │ +00:01:57 verbose #2146 > > │ │ +00:01:57 verbose #2147 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │ +00:01:57 verbose #2148 > > │ Test case 1. semi_open_1. Time: 427 │ +00:01:57 verbose #2149 > > │ Test case 2. closed_1. Time: 458 │ +00:01:57 verbose #2150 > > │ Test case 3. semi_open_2. Time: 462 │ +00:01:57 verbose #2151 > > │ Test case 4. closed_2. Time: 472 │ +00:01:57 verbose #2152 > > │ │ +00:01:57 verbose #2153 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │ +00:01:57 verbose #2154 > > │ Test case 1. semi_open_1. Time: 453 │ +00:01:57 verbose #2155 > > │ Test case 2. closed_1. Time: 461 │ +00:01:57 verbose #2156 > > │ Test case 3. semi_open_2. Time: 480 │ +00:01:57 verbose #2157 > > │ Test case 4. closed_2. Time: 487 │ +00:01:57 verbose #2158 > > │ │ +00:01:57 verbose #2159 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │ +00:01:57 verbose #2160 > > │ Test case 1. semi_open_1. Time: 501 │ +00:01:57 verbose #2161 > > │ Test case 2. closed_1. Time: 575 │ +00:01:57 verbose #2162 > > │ Test case 3. semi_open_2. Time: 552 │ +00:01:57 verbose #2163 > > │ Test case 4. closed_2. Time: 522 │ +00:01:57 verbose #2164 > > │ │ +00:01:57 verbose #2165 > > │ Solution: struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; │ +00:01:57 verbose #2166 > > │ 17; 18; 19; 20; │ +00:01:57 verbose #2167 > > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │ +00:01:57 verbose #2168 > > │ 37; 38; │ +00:01:57 verbose #2169 > > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │ +00:01:57 verbose #2170 > > │ 55; 56; │ +00:01:57 verbose #2171 > > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │ +00:01:57 verbose #2172 > > │ 73; 74; │ +00:01:57 verbose #2173 > > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │ +00:01:57 verbose #2174 > > │ 91; 92; │ +00:01:57 verbose #2175 > > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) │ +00:01:57 verbose #2176 > > │ Test case 1. semi_open_1. Time: 519 │ +00:01:57 verbose #2177 > > │ Test case 2. closed_1. Time: 498 │ +00:01:57 verbose #2178 > > │ Test case 3. semi_open_2. Time: 538 │ +00:01:57 verbose #2179 > > │ Test case 4. closed_2. Time: 554 │ +00:01:57 verbose #2180 > > │ │ +00:01:57 verbose #2181 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │ +00:01:57 verbose #2182 > > │ Test case 1. semi_open_1. Time: 549 │ +00:01:57 verbose #2183 > > │ Test case 2. closed_1. Time: 527 │ +00:01:57 verbose #2184 > > │ Test case 3. semi_open_2. Time: 505 │ +00:01:57 verbose #2185 > > │ Test case 4. closed_2. Time: 474 │ +00:01:57 verbose #2186 > > │ │ +00:01:57 verbose #2187 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │ +00:01:57 verbose #2188 > > │ Test case 1. semi_open_1. Time: 511 │ +00:01:57 verbose #2189 > > │ Test case 2. closed_1. Time: 491 │ +00:01:57 verbose #2190 > > │ Test case 3. semi_open_2. Time: 483 │ +00:01:57 verbose #2191 > > │ Test case 4. closed_2. Time: 476 │ +00:01:57 verbose #2192 > > │ │ +00:01:57 verbose #2193 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │ +00:01:57 verbose #2194 > > │ Test case 1. semi_open_1. Time: 510 │ +00:01:57 verbose #2195 > > │ Test case 2. closed_1. Time: 511 │ +00:01:57 verbose #2196 > > │ Test case 3. semi_open_2. Time: 479 │ +00:01:57 verbose #2197 > > │ Test case 4. closed_2. Time: 542 │ +00:01:57 verbose #2198 > > │ │ +00:01:57 verbose #2199 > > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │ +00:01:57 verbose #2200 > > │ Test case 1. semi_open_1. Time: 499 │ +00:01:57 verbose #2201 > > │ Test case 2. closed_1. Time: 487 │ +00:01:57 verbose #2202 > > │ Test case 3. semi_open_2. Time: 470 │ +00:01:57 verbose #2203 > > │ Test case 4. closed_2. Time: 472 │ +00:01:57 verbose #2204 > > │ │ +00:01:57 verbose #2205 > > │ Solution: struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; │ +00:01:57 verbose #2206 > > │ 17; 18; 19; 20; │ +00:01:57 verbose #2207 > > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │ +00:01:57 verbose #2208 > > │ 37; 38; │ +00:01:57 verbose #2209 > > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │ +00:01:57 verbose #2210 > > │ 55; 56; │ +00:01:57 verbose #2211 > > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │ +00:01:57 verbose #2212 > > │ 73; 74; │ +00:01:57 verbose #2213 > > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │ +00:01:57 verbose #2214 > > │ 91; 92; │ +00:01:57 verbose #2215 > > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) │ +00:01:57 verbose #2216 > > │ Test case 1. semi_open_1. Time: 491 │ +00:01:57 verbose #2217 > > │ Test case 2. closed_1. Time: 500 │ +00:01:57 verbose #2218 > > │ Test case 3. semi_open_2. Time: 493 │ +00:01:57 verbose #2219 > > │ Test case 4. closed_2. Time: 484 │ +00:01:57 verbose #2220 > > │ │ +00:01:57 verbose #2221 > > │ Input │ +00:01:57 verbose #2222 > > │ │ +00:01:57 verbose #2223 > > │ │ +00:01:57 verbose #2224 > > │ │ +00:01:57 verbose #2225 > > │ | Expected | Result | Best │ +00:01:57 verbose #2226 > > │ --- │ +00:01:57 verbose #2227 > > │ │ +00:01:57 verbose #2228 > > │ │ +00:01:57 verbose #2229 > > │ │ +00:01:57 verbose #2230 > > │ | --- | --- | --- │ +00:01:57 verbose #2231 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │ +00:01:57 verbose #2232 > > │ │ +00:01:57 verbose #2233 > > │ │ +00:01:57 verbose #2234 > > │ │ +00:01:57 verbose #2235 > > │ | US0_0 3 | US0_0 3 | struct (4L, 484L) │ +00:01:57 verbose #2236 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │ +00:01:57 verbose #2237 > > │ │ +00:01:57 verbose #2238 > > │ │ +00:01:57 verbose #2239 > > │ │ +00:01:57 verbose #2240 > > │ | US0_0 0 | US0_0 0 | struct (1L, 427L) │ +00:01:57 verbose #2241 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │ +00:01:57 verbose #2242 > > │ │ +00:01:57 verbose #2243 > > │ │ +00:01:57 verbose #2244 > > │ │ +00:01:57 verbose #2245 > > │ | US0_0 6 | US0_0 6 | struct (1L, 453L) │ +00:01:57 verbose #2246 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │ +00:01:57 verbose #2247 > > │ │ +00:01:57 verbose #2248 > > │ │ +00:01:57 verbose #2249 > > │ │ +00:01:57 verbose #2250 > > │ | US0_1 | US0_1 | struct (1L, 501L) │ +00:01:57 verbose #2251 > > │ struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; │ +00:01:57 verbose #2252 > > │ 20; │ +00:01:57 verbose #2253 > > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │ +00:01:57 verbose #2254 > > │ 37; 38; │ +00:01:57 verbose #2255 > > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │ +00:01:57 verbose #2256 > > │ 55; 56; │ +00:01:57 verbose #2257 > > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │ +00:01:57 verbose #2258 > > │ 73; 74; │ +00:01:57 verbose #2259 > > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │ +00:01:57 verbose #2260 > > │ 91; 92; │ +00:01:57 verbose #2261 > > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) | US0_0 59 | US0_0 59 | │ +00:01:57 verbose #2262 > > │ struct (2L, 498L) │ +00:01:57 verbose #2263 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │ +00:01:57 verbose #2264 > > │ │ +00:01:57 verbose #2265 > > │ │ +00:01:57 verbose #2266 > > │ │ +00:01:57 verbose #2267 > > │ | US0_0 3 | US0_0 3 | struct (4L, 474L) │ +00:01:57 verbose #2268 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │ +00:01:57 verbose #2269 > > │ │ +00:01:57 verbose #2270 > > │ │ +00:01:57 verbose #2271 > > │ │ +00:01:57 verbose #2272 > > │ | US0_0 0 | US0_0 0 | struct (4L, 476L) │ +00:01:57 verbose #2273 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │ +00:01:57 verbose #2274 > > │ │ +00:01:57 verbose #2275 > > │ │ +00:01:57 verbose #2276 > > │ │ +00:01:57 verbose #2277 > > │ | US0_0 6 | US0_0 6 | struct (3L, 479L) │ +00:01:57 verbose #2278 > > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │ +00:01:57 verbose #2279 > > │ │ +00:01:57 verbose #2280 > > │ │ +00:01:57 verbose #2281 > > │ │ +00:01:57 verbose #2282 > > │ | US0_1 | US0_1 | struct (3L, 470L) │ +00:01:57 verbose #2283 > > │ struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; │ +00:01:57 verbose #2284 > > │ 20; │ +00:01:57 verbose #2285 > > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │ +00:01:57 verbose #2286 > > │ 37; 38; │ +00:01:57 verbose #2287 > > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │ +00:01:57 verbose #2288 > > │ 55; 56; │ +00:01:57 verbose #2289 > > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │ +00:01:57 verbose #2290 > > │ 73; 74; │ +00:01:57 verbose #2291 > > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │ +00:01:57 verbose #2292 > > │ 91; 92; │ +00:01:57 verbose #2293 > > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) | US0_0 59 | US0_0 59 | │ +00:01:57 verbose #2294 > > │ struct (4L, 484L) │ +00:01:57 verbose #2295 > > │ │ +00:01:57 verbose #2296 > > │ Average Ranking │ +00:01:57 verbose #2297 > > │ Test case 4. Average Time: 496L │ +00:01:57 verbose #2298 > > │ Test case 1. Average Time: 500L │ +00:01:57 verbose #2299 > > │ Test case 2. Average Time: 503L │ +00:01:57 verbose #2300 > > │ Test case 3. Average Time: 504L │ +00:01:57 verbose #2301 > > │ │ +00:01:57 verbose #2302 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:57 verbose #2303 > > +00:01:57 verbose #2304 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:57 verbose #2305 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:57 verbose #2306 > > │ ## returnLettersWithOddCountTests │ +00:01:57 verbose #2307 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:57 verbose #2308 > > +00:01:57 verbose #2309 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:57 verbose #2310 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:57 verbose #2311 > > │ Test: ReturnLettersWithOddCount │ +00:01:57 verbose #2312 > > │ │ +00:01:57 verbose #2313 > > │ Solution: 1 │ +00:01:57 verbose #2314 > > │ Test case 1. A. Time: 645L │ +00:01:57 verbose #2315 > > │ │ +00:01:57 verbose #2316 > > │ Solution: 2 │ +00:01:57 verbose #2317 > > │ Test case 1. A. Time: 663L │ +00:01:57 verbose #2318 > > │ │ +00:01:57 verbose #2319 > > │ Solution: 3 │ +00:01:57 verbose #2320 > > │ Test case 1. A. Time: 680L │ +00:01:57 verbose #2321 > > │ │ +00:01:57 verbose #2322 > > │ Solution: 9 │ +00:01:57 verbose #2323 > > │ Test case 1. A. Time: 730L │ +00:01:57 verbose #2324 > > │ │ +00:01:57 verbose #2325 > > │ Solution: 10 │ +00:01:57 verbose #2326 > > │ Test case 1. A. Time: 815L │ +00:01:57 verbose #2327 > > │ │ +00:01:57 verbose #2328 > > │ Input | Expected | Result | Best │ +00:01:57 verbose #2329 > > │ --- | --- | --- | --- │ +00:01:57 verbose #2330 > > │ 1 | a | a | (1, 645) │ +00:01:57 verbose #2331 > > │ 2 | ba | ba | (1, 663) │ +00:01:57 verbose #2332 > > │ 3 | aaa | aaa | (1, 680) │ +00:01:57 verbose #2333 > > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 730) │ +00:01:57 verbose #2334 > > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 815) │ +00:01:57 verbose #2335 > > │ │ +00:01:57 verbose #2336 > > │ Averages │ +00:01:57 verbose #2337 > > │ Test case 1. Average Time: 706L │ +00:01:57 verbose #2338 > > │ │ +00:01:57 verbose #2339 > > │ Ranking │ +00:01:57 verbose #2340 > > │ Test case 1. Average Time: 706L │ +00:01:57 verbose #2341 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:57 verbose #2342 > > +00:01:57 verbose #2343 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:01:57 verbose #2344 > > //// test +00:01:57 verbose #2345 > > +00:01:57 verbose #2346 > > let solutions = [[ +00:01:57 verbose #2347 > > "A", +00:01:57 verbose #2348 > > fun n -> +00:01:57 verbose #2349 > > let mutable _builder = StringBuilder (new string('a', n)) +00:01:57 verbose #2350 > > if n % 2 = 0 then +00:01:57 verbose #2351 > > _builder.[[0]] <- 'b' +00:01:57 verbose #2352 > > +00:01:57 verbose #2353 > > _builder.ToString () +00:01:57 verbose #2354 > > ]] +00:01:57 verbose #2355 > > let testCases = seq { +00:01:57 verbose #2356 > > 1, "a" +00:01:57 verbose #2357 > > 2, "ba" +00:01:57 verbose #2358 > > 3, "aaa" +00:01:57 verbose #2359 > > 9, "aaaaaaaaa" +00:01:57 verbose #2360 > > 10, "baaaaaaaaa" +00:01:57 verbose #2361 > > } +00:01:57 verbose #2362 > > let rec returnLettersWithOddCountTests = +00:01:57 verbose #2363 > > runAll (nameof returnLettersWithOddCountTests) _count solutions testCases +00:01:57 verbose #2364 > > returnLettersWithOddCountTests +00:01:57 verbose #2365 > > |> sortResultList +00:01:58 verbose #2366 > > +00:01:58 verbose #2367 > > ╭─[ 1.24s - stdout ]───────────────────────────────────────────────────────────╮ +00:01:58 verbose #2368 > > │ │ +00:01:58 verbose #2369 > > │ │ +00:01:58 verbose #2370 > > │ Test: returnLettersWithOddCountTests │ +00:01:58 verbose #2371 > > │ │ +00:01:58 verbose #2372 > > │ Solution: 1 │ +00:01:58 verbose #2373 > > │ Test case 1. A. Time: 1L │ +00:01:58 verbose #2374 > > │ │ +00:01:58 verbose #2375 > > │ Solution: 2 │ +00:01:58 verbose #2376 > > │ Test case 1. A. Time: 0L │ +00:01:58 verbose #2377 > > │ │ +00:01:58 verbose #2378 > > │ Solution: 3 │ +00:01:58 verbose #2379 > > │ Test case 1. A. Time: 0L │ +00:01:58 verbose #2380 > > │ │ +00:01:58 verbose #2381 > > │ Solution: 9 │ +00:01:58 verbose #2382 > > │ Test case 1. A. Time: 0L │ +00:01:58 verbose #2383 > > │ │ +00:01:58 verbose #2384 > > │ Solution: 10 │ +00:01:58 verbose #2385 > > │ Test case 1. A. Time: 3L │ +00:01:58 verbose #2386 > > │ │ +00:01:58 verbose #2387 > > │ Input | Expected | Result | Best │ +00:01:58 verbose #2388 > > │ --- | --- | --- | --- │ +00:01:58 verbose #2389 > > │ 1 | a | a | (1, 1) │ +00:01:58 verbose #2390 > > │ 2 | ba | ba | (1, 0) │ +00:01:58 verbose #2391 > > │ 3 | aaa | aaa | (1, 0) │ +00:01:58 verbose #2392 > > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 0) │ +00:01:58 verbose #2393 > > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 3) │ +00:01:58 verbose #2394 > > │ │ +00:01:58 verbose #2395 > > │ Average Ranking │ +00:01:58 verbose #2396 > > │ Test case 1. Average Time: 0L │ +00:01:58 verbose #2397 > > │ │ +00:01:58 verbose #2398 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:58 verbose #2399 > > +00:01:58 verbose #2400 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:58 verbose #2401 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:58 verbose #2402 > > │ ## hasAnyPairCloseToEachotherTests │ +00:01:58 verbose #2403 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:58 verbose #2404 > > +00:01:58 verbose #2405 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:58 verbose #2406 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:58 verbose #2407 > > │ Test: HasAnyPairCloseToEachother │ +00:01:58 verbose #2408 > > │ │ +00:01:58 verbose #2409 > > │ Solution: 0 │ +00:01:58 verbose #2410 > > │ Test case 1. A. Time: 137L │ +00:01:58 verbose #2411 > > │ │ +00:01:58 verbose #2412 > > │ Solution: 1,2 │ +00:01:58 verbose #2413 > > │ Test case 1. A. Time: 186L │ +00:01:58 verbose #2414 > > │ │ +00:01:58 verbose #2415 > > │ Solution: 3,5 │ +00:01:58 verbose #2416 > > │ Test case 1. A. Time: 206L │ +00:01:58 verbose #2417 > > │ │ +00:01:58 verbose #2418 > > │ Solution: 3,4,6 │ +00:01:58 verbose #2419 > > │ Test case 1. A. Time: 149L │ +00:01:58 verbose #2420 > > │ │ +00:01:58 verbose #2421 > > │ Solution: 2,4,6 │ +00:01:58 verbose #2422 > > │ Test case 1. A. Time: 150L │ +00:01:58 verbose #2423 > > │ │ +00:01:58 verbose #2424 > > │ Input | Expected | Result | Best │ +00:01:58 verbose #2425 > > │ --- | --- | --- | --- │ +00:01:58 verbose #2426 > > │ 0 | False | False | (1, 137) │ +00:01:58 verbose #2427 > > │ 1,2 | True | True | (1, 186) │ +00:01:58 verbose #2428 > > │ 3,5 | False | False | (1, 206) │ +00:01:58 verbose #2429 > > │ 3,4,6 | True | True | (1, 149) │ +00:01:58 verbose #2430 > > │ 2,4,6 | False | False | (1, 150) │ +00:01:58 verbose #2431 > > │ │ +00:01:58 verbose #2432 > > │ Averages │ +00:01:58 verbose #2433 > > │ Test case 1. Average Time: 165L │ +00:01:58 verbose #2434 > > │ │ +00:01:58 verbose #2435 > > │ Ranking │ +00:01:58 verbose #2436 > > │ Test case 1. Average Time: 165L │ +00:01:58 verbose #2437 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:58 verbose #2438 > > +00:01:58 verbose #2439 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:01:58 verbose #2440 > > //// test +00:01:58 verbose #2441 > > +00:01:58 verbose #2442 > > let solutions = [[ +00:01:58 verbose #2443 > > "A", +00:01:58 verbose #2444 > > fun (a: int[[]]) -> +00:01:58 verbose #2445 > > let indices = System.Linq.Enumerable.Range(0, a.Length) |> +00:01:58 verbose #2446 > > System.Linq.Enumerable.ToArray +00:01:58 verbose #2447 > > System.Array.Sort (a, indices) +00:01:58 verbose #2448 > > +00:01:58 verbose #2449 > > indices +00:01:58 verbose #2450 > > |> Array.take (a.Length - 1) +00:01:58 verbose #2451 > > |> Array.exists (fun i -> a.[[i + 1]] - a.[[i]] = 1) +00:01:58 verbose #2452 > > ]] +00:01:58 verbose #2453 > > let testCases = seq { +00:01:58 verbose #2454 > > [[| 0 |]], false +00:01:58 verbose #2455 > > [[| 1; 2 |]], true +00:01:58 verbose #2456 > > [[| 3; 5 |]], false +00:01:58 verbose #2457 > > [[| 3; 4; 6 |]], true +00:01:58 verbose #2458 > > [[| 2; 4; 6 |]], false +00:01:58 verbose #2459 > > } +00:01:58 verbose #2460 > > let rec hasAnyPairCloseToEachotherTests = +00:01:58 verbose #2461 > > runAll (nameof hasAnyPairCloseToEachotherTests) _count solutions testCases +00:01:58 verbose #2462 > > hasAnyPairCloseToEachotherTests +00:01:58 verbose #2463 > > |> sortResultList +00:01:59 verbose #2464 > > +00:01:59 verbose #2465 > > ╭─[ 1.22s - stdout ]───────────────────────────────────────────────────────────╮ +00:01:59 verbose #2466 > > │ │ +00:01:59 verbose #2467 > > │ │ +00:01:59 verbose #2468 > > │ Test: hasAnyPairCloseToEachotherTests │ +00:01:59 verbose #2469 > > │ │ +00:01:59 verbose #2470 > > │ Solution: 0 │ +00:01:59 verbose #2471 > > │ Test case 1. A. Time: 2L │ +00:01:59 verbose #2472 > > │ │ +00:01:59 verbose #2473 > > │ Solution: 1,2 │ +00:01:59 verbose #2474 > > │ Test case 1. A. Time: 0L │ +00:01:59 verbose #2475 > > │ │ +00:01:59 verbose #2476 > > │ Solution: 3,5 │ +00:01:59 verbose #2477 > > │ Test case 1. A. Time: 0L │ +00:01:59 verbose #2478 > > │ │ +00:01:59 verbose #2479 > > │ Solution: 3,4,6 │ +00:01:59 verbose #2480 > > │ Test case 1. A. Time: 0L │ +00:01:59 verbose #2481 > > │ │ +00:01:59 verbose #2482 > > │ Solution: 2,4,6 │ +00:01:59 verbose #2483 > > │ Test case 1. A. Time: 0L │ +00:01:59 verbose #2484 > > │ │ +00:01:59 verbose #2485 > > │ Input | Expected | Result | Best │ +00:01:59 verbose #2486 > > │ --- | --- | --- | --- │ +00:01:59 verbose #2487 > > │ 0 | False | False | (1, 2) │ +00:01:59 verbose #2488 > > │ 1,2 | True | True | (1, 0) │ +00:01:59 verbose #2489 > > │ 3,5 | False | False | (1, 0) │ +00:01:59 verbose #2490 > > │ 3,4,6 | True | True | (1, 0) │ +00:01:59 verbose #2491 > > │ 2,4,6 | False | False | (1, 0) │ +00:01:59 verbose #2492 > > │ │ +00:01:59 verbose #2493 > > │ Average Ranking │ +00:01:59 verbose #2494 > > │ Test case 1. Average Time: 0L │ +00:01:59 verbose #2495 > > │ │ +00:01:59 verbose #2496 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:59 verbose #2497 > 00:01:57 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 124806 +00:01:59 verbose #2498 > 00:01:57 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:02:02 verbose #2499 > 00:02:00 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/perf/Perf.dib.ipynb to html +00:02:02 verbose #2500 > 00:02:00 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:02:02 verbose #2501 > 00:02:00 verbose #7 ! validate(nb) +00:02:05 verbose #2502 > 00:02:02 verbose #8 ! [NbConvertApp] Writing 445289 bytes to c:\home\git\polyglot\apps\perf\Perf.dib.html +00:02:05 verbose #2503 > 00:02:02 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 637 +00:02:05 verbose #2504 > 00:02:02 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 637 +00:02:05 verbose #2505 > 00:02:02 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/perf/Perf.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/perf/Perf.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:02:06 verbose #2506 > 00:02:03 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:02:06 verbose #2507 > 00:02:03 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:02:06 verbose #2508 > 00:02:04 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 125502 +00:02:06 debug #2509 execute_with_options_async / exit_code: 0 / output.Length: 132681 +00:02:06 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Perf.dib --retries 3 +00:02:06 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False +00:02:07 debug #8 run_with_timeout_async / timeout: 100 00:00:00 debug #1 writeDibCode / output: Fs / path: Perf.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Perf.dib @@ -33634,1307 +33337,1290 @@ 00:00:01 debug #2 run_with_timeout_async / timeout: 100 00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True 00:00:01 debug #4 run_with_timeout_async / timeout: 100 -00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805 00:00:01 debug #5 run_with_timeout_async / timeout: 100 +00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805 +00:00:01 debug #6 run_with_timeout_async / timeout: 100 00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result: 00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0 00:00:02 verbose #6 > Server bound to: http://localhost:13805 00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path DirTreeHtml.dib", + "../../workspace/target/release/spiral_builder.exe dib --path DirTreeHtml.dib", [||], None, None, true, None) 00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "DirTreeHtml.dib"]) 00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib", "--output-path", "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib" --output-path "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:00:21 verbose #10 > -00:00:21 verbose #11 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:21 verbose #12 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:21 verbose #13 > │ # DirTreeHtml (Polyglot) │ -00:00:21 verbose #14 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:21 verbose #15 > -00:00:21 verbose #16 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #17 > #r -00:00:21 verbose #18 > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan -00:00:21 verbose #19 > dard2.1/FSharp.Control.AsyncSeq.dll" -00:00:21 verbose #20 > #r -00:00:21 verbose #21 > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. -00:00:21 verbose #22 > 0/System.Reactive.dll" -00:00:21 verbose #23 > #r -00:00:21 verbose #24 > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib -00:00:21 verbose #25 > netstandard2.0/System.Reactive.Linq.dll" -00:00:21 verbose #26 > #r -00:00:21 verbose #27 > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" -00:00:21 verbose #28 > #r -00:00:21 verbose #29 > @"../../../../../../../.nuget/packages/falco.markup/1.1.1/lib/netstandard2.0/Fal -00:00:21 verbose #30 > co.Markup.dll" -00:00:21 verbose #31 > -00:00:21 verbose #32 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #33 > #r -00:00:21 verbose #34 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A -00:00:21 verbose #35 > spNetCore.Html.Abstractions.dll" -00:00:21 verbose #36 > #r -00:00:21 verbose #37 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:00:21 verbose #38 > otNet.Interactive.dll" -00:00:21 verbose #39 > #r -00:00:21 verbose #40 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:00:21 verbose #41 > otNet.Interactive.FSharp.dll" -00:00:21 verbose #42 > #r -00:00:21 verbose #43 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:00:21 verbose #44 > otNet.Interactive.Formatting.dll" -00:00:21 verbose #45 > open System -00:00:21 verbose #46 > open System.IO -00:00:21 verbose #47 > open System.Text -00:00:21 verbose #48 > open Microsoft.DotNet.Interactive.Formatting -00:00:21 verbose #49 > -00:00:21 verbose #50 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #51 > #r -00:00:21 verbose #52 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:00:21 verbose #53 > otNet.Interactive.FSharp.dll" -00:00:21 verbose #54 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers -00:00:21 verbose #55 > #r -00:00:21 verbose #56 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:00:21 verbose #57 > otNet.Interactive.dll" -00:00:21 verbose #58 > open type Microsoft.DotNet.Interactive.Kernel -00:00:21 verbose #59 > -00:00:21 verbose #60 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #61 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) -00:00:21 verbose #62 > -00:00:21 verbose #63 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #64 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: -00:00:21 verbose #65 > TextWriter)->fprintfn writer "%120A" x) -00:00:21 verbose #66 > -00:00:21 verbose #67 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #68 > #!import ../../lib/fsharp/Notebooks.dib -00:00:21 verbose #69 > #!import ../../lib/fsharp/Testing.dib -00:00:21 verbose #70 > -00:00:21 verbose #71 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #72 > //// test -00:00:21 verbose #73 > -00:00:21 verbose #74 > Formatter.ListExpansionLimit <- 100 -00:00:21 verbose #75 > -00:00:21 verbose #76 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #77 > #if FABLE_COMPILER -00:00:21 verbose #78 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] -00:00:21 verbose #79 > #endif -00:00:21 verbose #80 > type std_env_VarError = class end -00:00:21 verbose #81 > #if FABLE_COMPILER -00:00:21 verbose #82 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:00:21 verbose #83 > #endif -00:00:21 verbose #84 > type Any = class end -00:00:21 verbose #85 > #if FABLE_COMPILER -00:00:21 verbose #86 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:00:21 verbose #87 > #endif -00:00:21 verbose #88 > type Func0<'T> = class end -00:00:21 verbose #89 > #if FABLE_COMPILER -00:00:21 verbose #90 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:00:21 verbose #91 > #endif -00:00:21 verbose #92 > type Func0<'T, 'U> = class end -00:00:21 verbose #93 > #if FABLE_COMPILER -00:00:21 verbose #94 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:00:21 verbose #95 > #endif -00:00:21 verbose #96 > type Box<'T> = class end -00:00:21 verbose #97 > #if FABLE_COMPILER -00:00:21 verbose #98 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:00:21 verbose #99 > #endif -00:00:21 verbose #100 > type Dyn<'T> = class end -00:00:21 verbose #101 > #if FABLE_COMPILER -00:00:21 verbose #102 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] -00:00:21 verbose #103 > #endif -00:00:21 verbose #104 > type Send<'T> = class end -00:00:21 verbose #105 > #if FABLE_COMPILER -00:00:21 verbose #106 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] -00:00:21 verbose #107 > #endif -00:00:21 verbose #108 > type Fn<'T> = class end -00:00:21 verbose #109 > #if FABLE_COMPILER -00:00:21 verbose #110 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] -00:00:21 verbose #111 > #endif -00:00:21 verbose #112 > type FnUnit = class end -00:00:21 verbose #113 > #if FABLE_COMPILER -00:00:21 verbose #114 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] -00:00:21 verbose #115 > #endif -00:00:21 verbose #116 > type FnOnce<'T> = class end -00:00:21 verbose #117 > #if FABLE_COMPILER -00:00:21 verbose #118 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] -00:00:21 verbose #119 > #endif -00:00:21 verbose #120 > type ActionFn<'T> = class end -00:00:21 verbose #121 > #if FABLE_COMPILER -00:00:21 verbose #122 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] -00:00:21 verbose #123 > #endif -00:00:21 verbose #124 > type ActionFn2<'T, 'U> = class end -00:00:21 verbose #125 > #if FABLE_COMPILER -00:00:21 verbose #126 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] -00:00:21 verbose #127 > #endif -00:00:21 verbose #128 > type Impl<'T> = class end -00:00:21 verbose #129 > #if FABLE_COMPILER -00:00:21 verbose #130 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] -00:00:21 verbose #131 > #endif -00:00:21 verbose #132 > type Mut<'T> = class end -00:00:21 verbose #133 > #if FABLE_COMPILER -00:00:21 verbose #134 > [[<Fable.Core.Erase; Fable.Co... -00:00:21 verbose #135 > -00:00:21 verbose #136 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #137 > #if FABLE_COMPILER -00:00:21 verbose #138 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:00:21 verbose #139 > #endif -00:00:21 verbose #140 > type Any = class end -00:00:21 verbose #141 > #if FABLE_COMPILER -00:00:21 verbose #142 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:00:21 verbose #143 > #endif -00:00:21 verbose #144 > type Func0<'T> = class end -00:00:21 verbose #145 > #if FABLE_COMPILER -00:00:21 verbose #146 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:00:21 verbose #147 > #endif -00:00:21 verbose #148 > type Func0<'T, 'U> = class end -00:00:21 verbose #149 > #if FABLE_COMPILER -00:00:21 verbose #150 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:00:21 verbose #151 > #endif -00:00:21 verbose #152 > type Box<'T> = class end -00:00:21 verbose #153 > #if FABLE_COMPILER -00:00:21 verbose #154 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:00:21 verbose #155 > #endif -00:00:21 verbose #156 > type Dyn<'T> = class end -00:00:21 verbose #157 > #if FABLE_COMPILER -00:00:21 verbose #158 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] -00:00:21 verbose #159 > #endif -00:00:21 verbose #160 > type Send<'T> = class end -00:00:21 verbose #161 > #if FABLE_COMPILER -00:00:21 verbose #162 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] -00:00:21 verbose #163 > #endif -00:00:21 verbose #164 > type Fn<'T> = class end -00:00:21 verbose #165 > #if FABLE_COMPILER -00:00:21 verbose #166 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] -00:00:21 verbose #167 > #endif -00:00:21 verbose #168 > type FnUnit = class end -00:00:21 verbose #169 > #if FABLE_COMPILER -00:00:21 verbose #170 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] -00:00:21 verbose #171 > #endif -00:00:21 verbose #172 > type FnOnce<'T> = class end -00:00:21 verbose #173 > #if FABLE_COMPILER -00:00:21 verbose #174 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] -00:00:21 verbose #175 > #endif -00:00:21 verbose #176 > type ActionFn<'T> = class end -00:00:21 verbose #177 > #if FABLE_COMPILER -00:00:21 verbose #178 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] -00:00:21 verbose #179 > #endif -00:00:21 verbose #180 > type ActionFn2<'T, 'U> = class end -00:00:21 verbose #181 > #if FABLE_COMPILER -00:00:21 verbose #182 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] -00:00:21 verbose #183 > #endif -00:00:21 verbose #184 > type Impl<'T> = class end -00:00:21 verbose #185 > #if FABLE_COMPILER -00:00:21 verbose #186 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] -00:00:21 verbose #187 > #endif -00:00:21 verbose #188 > type Mut<'T> = class end -00:00:21 verbose #189 > #if FABLE_COMPILER -00:00:21 verbose #190 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]] -00:00:21 verbose #191 > #endif -00:00:21 verbose #192 > type Ref<'T> = class end -00:00:21 verbose #193 > #if FABLE_COMPILER -00:00:21 verbose #194 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]... -00:00:21 verbose #195 > -00:00:21 verbose #196 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #197 > #if FABLE_COMPILER -00:00:21 verbose #198 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] -00:00:21 verbose #199 > #endif -00:00:21 verbose #200 > type std_future_Future<'T> = class end -00:00:21 verbose #201 > #if FABLE_COMPILER -00:00:21 verbose #202 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] -00:00:21 verbose #203 > #endif -00:00:21 verbose #204 > type futures_future_TryJoinAll<'T> = class end -00:00:21 verbose #205 > #if FABLE_COMPILER -00:00:21 verbose #206 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] -00:00:21 verbose #207 > #endif -00:00:21 verbose #208 > type rayon_vec_IntoIter<'T> = class end -00:00:21 verbose #209 > #if FABLE_COMPILER -00:00:21 verbose #210 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] -00:00:21 verbose #211 > #endif -00:00:21 verbose #212 > type rayon_iter_Map<'T> = class end -00:00:21 verbose #213 > #if FABLE_COMPILER -00:00:21 verbose #214 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] -00:00:21 verbose #215 > #endif -00:00:21 verbose #216 > type futures_lite_stream_StreamExt = class end -00:00:21 verbose #217 > let rec closure0 () (v0 : System.Threading.CancellationToken) : -00:00:21 verbose #218 > Async<System.Threading.CancellationToken> = -00:00:21 verbose #219 > let v1 : bool = true -00:00:21 verbose #220 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None -00:00:21 verbose #221 > -00:00:21 verbose #222 > #if FABLE_COMPILER || WASM || CONTRACT -00:00:21 verbose #223 > -00:00:21 verbose #224 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT -00:00:21 verbose #225 > let v2 : Async<System.Threading.CancellationToken> = null |> -00:00:21 verbose #226 > unbox<Async<System.Threading.CancellationToken>> -00:00:21 verbose #227 > v2 -00:00:21 verbose #228 > #endif -00:00:21 verbose #229 > #if FABLE_COMPILER_RUST && WASM -00:00:21 verbose #230 > let v3 : Async<System.Threading.CancellationToken> = null |> -00:00:21 verbose #231 > unbox<Async<System.Threading.CancellationToken>> -00:00:21 verbose #232 > v3 -00:00:21 verbose #233 > #endif -00:00:21 verbose #234 > #if FABLE_COMPILER_RUST && CONTRACT -00:00:21 verbose #235 > let v4 : Async<System.Threading.CancellationToken> = null |> -00:00:21 verbose #236 > unbox<Async<System.Threading.CancellationToken>> -00:00:21 verbose #237 > v4 -00:00:21 verbose #238 > #endif -00:00:21 verbose #239 > #if FABLE_COMPILER_TYPESCRIPT -00:00:21 verbose #240 > le... -00:00:21 verbose #241 > -00:00:21 verbose #242 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #243 > #if FABLE_COMPILER -00:00:21 verbose #244 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] -00:00:21 verbose #245 > #endif -00:00:21 verbose #246 > type std_thread_JoinHandle<'T> = class end -00:00:21 verbose #247 > #if FABLE_COMPILER -00:00:21 verbose #248 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] -00:00:21 verbose #249 > #endif -00:00:21 verbose #250 > type std_sync_Arc<'T> = class end -00:00:21 verbose #251 > #if FABLE_COMPILER -00:00:21 verbose #252 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] -00:00:21 verbose #253 > #endif -00:00:21 verbose #254 > type std_sync_Mutex<'T> = class end -00:00:21 verbose #255 > #if FABLE_COMPILER -00:00:21 verbose #256 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] -00:00:21 verbose #257 > #endif -00:00:21 verbose #258 > type std_sync_MutexGuard<'T> = class end -00:00:21 verbose #259 > #if FABLE_COMPILER -00:00:21 verbose #260 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] -00:00:21 verbose #261 > #endif -00:00:21 verbose #262 > type std_sync_PoisonError<'T> = class end -00:00:21 verbose #263 > type Disposable (f : unit -> unit) = interface System.IDisposable with member -00:00:21 verbose #264 > _.Dispose () = f () -00:00:21 verbose #265 > type [[<Struct>]] US0 = -00:00:21 verbose #266 > | US0_0 of f0_0 : System.Threading.CancellationToken -00:00:21 verbose #267 > | US0_1 -00:00:21 verbose #268 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = -00:00:21 verbose #269 > let v1 : bool = true -00:00:21 verbose #270 > let mutable _v1 : unit option = None -00:00:21 verbose #271 > -00:00:21 verbose #272 > #if FABLE_COMPILER || WASM || CONTRACT -00:00:21 verbose #273 > -00:00:21 verbose #274 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT -00:00:21 verbose #275 > null |> unbox<unit> -00:00:21 verbose #276 > () -00:00:21 verbose #277 > #endif -00:00:21 verbose #278 > #if FABLE_COMPILER_RUST && WASM -00:00:21 verbose #279 > null |> unbox<unit> -00:00:21 verbose #280 > () -00:00:21 verbose #281 > #endif -00:00:21 verbose #282 > #if FABLE_COMPILER_RUST && CONTRACT -00:00:21 verbose #283 > null |> unbox<unit> -00:00:21 verbose #284 > () -00:00:21 verbose #285 > #endif -00:00:21 verbose #286 > #if FABLE_COMPILER_TYPESCRIPT -00:00:21 verbose #287 > null |> unbox<unit> -00:00:21 verbose #288 > () -00:00:21 verbose #289 > #endif -00:00:21 verbose #290 > #if FABLE_COMPILER_PYTHON -00:00:21 verbose #291 > null |> unbox<unit> -00:00:21 verbose #292 > () -00:00:21 verbose #293 > #endif -00:00:21 verbose #294 > #else -00:00:21 verbose #295 > let v2 : (unit -> unit) = v0.Cancel -00:00:21 verbose #296 > v2 () -00:00:21 verbose #297 > () -00:00:21 verbose #298 > #endif -00:00:21 verbose #299 > |>... -00:00:21 verbose #300 > -00:00:21 verbose #301 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #302 > #if FABLE_COMPILER -00:00:21 verbose #303 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] -00:00:21 verbose #304 > #endif -00:00:21 verbose #305 > type reqwest_Error = class end -00:00:21 verbose #306 > #if FABLE_COMPILER -00:00:21 verbose #307 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] -00:00:21 verbose #308 > #endif -00:00:21 verbose #309 > type reqwest_RequestBuilder = class end -00:00:21 verbose #310 > #if FABLE_COMPILER -00:00:21 verbose #311 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] -00:00:21 verbose #312 > #endif -00:00:21 verbose #313 > type reqwest_Response = class end -00:00:21 verbose #314 > #if FABLE_COMPILER -00:00:21 verbose #315 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] -00:00:21 verbose #316 > #endif -00:00:21 verbose #317 > type std_env_VarError = class end -00:00:21 verbose #318 > #if FABLE_COMPILER -00:00:21 verbose #319 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:00:21 verbose #320 > #endif -00:00:21 verbose #321 > type Any = class end -00:00:21 verbose #322 > #if FABLE_COMPILER -00:00:21 verbose #323 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:00:21 verbose #324 > #endif -00:00:21 verbose #325 > type Func0<'T> = class end -00:00:21 verbose #326 > #if FABLE_COMPILER -00:00:21 verbose #327 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:00:21 verbose #328 > #endif -00:00:21 verbose #329 > type Func0<'T, 'U> = class end -00:00:21 verbose #330 > #if FABLE_COMPILER -00:00:21 verbose #331 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:00:21 verbose #332 > #endif -00:00:21 verbose #333 > type Box<'T> = class end -00:00:21 verbose #334 > #if FABLE_COMPILER -00:00:21 verbose #335 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:00:21 verbose #336 > #endif -00:00:21 verbose #337 > type Dyn<'T> = class end -00:00:21 verbose #338 > #if FABLE_COMPILER -00:00:21 verbose #339 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] -00:00:21 verbose #340 > #endif -00:00:21 verbose #341 > type Send<'T> = class end -00:00:21 verbose #342 > #if FABLE_COMPILER -00:00:21 verbose #343 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] -00:00:21 verbose #344 > #endif -00:00:21 verbose #345 > type Fn<'T> = class end -00:00:21 verbose #346 > #if FABLE_COMPILER -00:00:21 verbose #347 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] -00:00:21 verbose #348 > #endif -00:00:21 verbose #349 > type FnUnit = class end -00:00:21 verbose #350 > #if FABLE_COMPILER -00:00:21 verbose #351 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] -00:00:21 verbose #352 > #endif -00:00:21 verbose #353 > type FnOnce<'T> = class end -00:00:21 verbose #354 > #if FABLE_COMPILER -00:00:21 verbose #355 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] -00:00:21 verbose #356 > #endif -00:00:21 verbose #357 > type ActionF... -00:00:21 verbose #358 > -00:00:21 verbose #359 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #360 > #if FABLE_COMPILER -00:00:21 verbose #361 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] -00:00:21 verbose #362 > #endif -00:00:21 verbose #363 > type clap_Arg = class end -00:00:21 verbose #364 > #if FABLE_COMPILER -00:00:21 verbose #365 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] -00:00:21 verbose #366 > #endif -00:00:21 verbose #367 > type clap_ArgAction = class end -00:00:21 verbose #368 > #if FABLE_COMPILER -00:00:21 verbose #369 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] -00:00:21 verbose #370 > #endif -00:00:21 verbose #371 > type clap_Command = class end -00:00:21 verbose #372 > #if FABLE_COMPILER -00:00:21 verbose #373 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] -00:00:21 verbose #374 > #endif -00:00:21 verbose #375 > type clap_ArgMatches = class end -00:00:21 verbose #376 > #if FABLE_COMPILER -00:00:21 verbose #377 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] -00:00:21 verbose #378 > #endif -00:00:21 verbose #379 > type clap_builder_ValueRange = class end -00:00:21 verbose #380 > #if FABLE_COMPILER -00:00:21 verbose #381 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] -00:00:21 verbose #382 > #endif -00:00:21 verbose #383 > type clap_builder_ValueParser = class end -00:00:21 verbose #384 > #if FABLE_COMPILER -00:00:21 verbose #385 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] -00:00:21 verbose #386 > #endif -00:00:21 verbose #387 > type clap_builder_PossibleValue = class end -00:00:21 verbose #388 > #if FABLE_COMPILER -00:00:21 verbose #389 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] -00:00:21 verbose #390 > #endif -00:00:21 verbose #391 > type std_process_Child = class end -00:00:21 verbose #392 > #if FABLE_COMPILER -00:00:21 verbose #393 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] -00:00:21 verbose #394 > #endif -00:00:21 verbose #395 > type std_process_ChildStderr = class end -00:00:21 verbose #396 > #if FABLE_COMPILER -00:00:21 verbose #397 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] -00:00:21 verbose #398 > #endif -00:00:21 verbose #399 > type std_process_ChildStdout = class end -00:00:21 verbose #400 > #if FABLE_COMPILER -00:00:21 verbose #401 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] -00:00:21 verbose #402 > #endif -00:00:21 verbose #403 > type std_process_ChildStdin = class end -00:00:21 verbose #404 > #if FABLE_COMPILER -00:00:21 verbose #405 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] -00:00:21 verbose #406 > #endif -00:00:21 verbose #407 > type std_process_Command = class ... -00:00:21 verbose #408 > -00:00:21 verbose #409 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #410 > #if FABLE_COMPILER -00:00:21 verbose #411 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] -00:00:21 verbose #412 > #endif -00:00:21 verbose #413 > type std_fs_File = class end -00:00:21 verbose #414 > #if FABLE_COMPILER -00:00:21 verbose #415 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] -00:00:21 verbose #416 > #endif -00:00:21 verbose #417 > type std_fs_FileType = class end -00:00:21 verbose #418 > #if FABLE_COMPILER -00:00:21 verbose #419 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] -00:00:21 verbose #420 > #endif -00:00:21 verbose #421 > type std_path_Display = class end -00:00:21 verbose #422 > #if FABLE_COMPILER -00:00:21 verbose #423 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] -00:00:21 verbose #424 > #endif -00:00:21 verbose #425 > type std_path_Path = class end -00:00:21 verbose #426 > #if FABLE_COMPILER -00:00:21 verbose #427 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] -00:00:21 verbose #428 > #endif -00:00:21 verbose #429 > type std_path_PathBuf = class end -00:00:21 verbose #430 > #if FABLE_COMPILER -00:00:21 verbose #431 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] -00:00:21 verbose #432 > #endif -00:00:21 verbose #433 > type async_walkdir_DirEntry = class end -00:00:21 verbose #434 > #if FABLE_COMPILER -00:00:21 verbose #435 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] -00:00:21 verbose #436 > #endif -00:00:21 verbose #437 > type async_walkdir_Filtering = class end -00:00:21 verbose #438 > #if FABLE_COMPILER -00:00:21 verbose #439 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] -00:00:21 verbose #440 > #endif -00:00:21 verbose #441 > type async_walkdir_WalkDir = class end -00:00:21 verbose #442 > #if FABLE_COMPILER -00:00:21 verbose #443 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:00:21 verbose #444 > #endif -00:00:21 verbose #445 > type Any = class end -00:00:21 verbose #446 > #if FABLE_COMPILER -00:00:21 verbose #447 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:00:21 verbose #448 > #endif -00:00:21 verbose #449 > type Func0<'T> = class end -00:00:21 verbose #450 > #if FABLE_COMPILER -00:00:21 verbose #451 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:00:21 verbose #452 > #endif -00:00:21 verbose #453 > type Func0<'T, 'U> = class end -00:00:21 verbose #454 > #if FABLE_COMPILER -00:00:21 verbose #455 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:00:21 verbose #456 > #endif -00:00:21 verbose #457 > type Box<'T> = class end -00:00:21 verbose #458 > #if FABLE_COMPILER -00:00:21 verbose #459 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:00:21 verbose #460 > #endif -00:00:21 verbose #461 > type Dyn<'T> = class end -00:00:21 verbose #462 > #if FABLE_COMPILER -00:00:21 verbose #463 > [[... -00:00:21 verbose #464 > -00:00:21 verbose #465 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #466 > module SpiralTrace = -00:00:21 verbose #467 > let trace x = -00:00:21 verbose #468 > #if !INTERACTIVE -00:00:21 verbose #469 > Trace.trace x -00:00:21 verbose #470 > #else -00:00:21 verbose #471 > trace x -00:00:21 verbose #472 > #endif -00:00:21 verbose #473 > -00:00:21 verbose #474 > type TraceLevel = -00:00:21 verbose #475 > #if !INTERACTIVE -00:00:21 verbose #476 > Trace.US0 -00:00:21 verbose #477 > #else -00:00:21 verbose #478 > US0 -00:00:21 verbose #479 > #endif -00:00:21 verbose #480 > -00:00:21 verbose #481 > module SpiralCrypto = -00:00:21 verbose #482 > let hash_text x = -00:00:21 verbose #483 > #if !INTERACTIVE -00:00:21 verbose #484 > Crypto.hash_text x -00:00:21 verbose #485 > #else -00:00:21 verbose #486 > hash_text x -00:00:21 verbose #487 > #endif -00:00:21 verbose #488 > -00:00:21 verbose #489 > #if !FABLE_COMPILER && !WASM && !CONTRACT -00:00:21 verbose #490 > -00:00:21 verbose #491 > module SpiralAsync = -00:00:21 verbose #492 > let merge_cancellation_token_with_default_async x = -00:00:21 verbose #493 > #if !INTERACTIVE -00:00:21 verbose #494 > Async_.merge_cancellation_token_with_default_async x -00:00:21 verbose #495 > #else -00:00:21 verbose #496 > merge_cancellation_token_with_default_async x -00:00:21 verbose #497 > #endif -00:00:21 verbose #498 > -00:00:21 verbose #499 > module SpiralThreading = -00:00:21 verbose #500 > let new_disposable_token x = -00:00:21 verbose #501 > #if !INTERACTIVE -00:00:21 verbose #502 > Threading.new_disposable_token x -00:00:21 verbose #503 > #else -00:00:21 verbose #504 > new_disposable_token x -00:00:21 verbose #505 > #endif -00:00:21 verbose #506 > -00:00:21 verbose #507 > module SpiralNetworking = -00:00:21 verbose #508 > let test_port_open x = -00:00:21 verbose #509 > #if !INTERACTIVE -00:00:21 verbose #510 > Networking.test_port_open x -00:00:21 verbose #511 > #else -00:00:21 verbose #512 > test_port_open x -00:00:21 verbose #513 > #endif -00:00:21 verbose #514 > -00:00:21 verbose #515 > let test_port_open_timeout x = -00:00:21 verbose #516 > #if !INTERACTIVE -00:00:21 verbose #517 > Networking.test_port_open_timeout x -00:00:21 verbose #518 > #else -00:00:21 verbose #519 > test_port_open_timeout x -00:00:21 verbose #520 > #endif -00:00:21 verbose #521 > -00:00:21 verbose #522 > let wait_for_port_access x = -00:00:21 verbose #523 > #if !INTERACTIVE -00:00:21 verbose #524 > Networking.wait_for_port_access x -00:00:21 verbose #525 > #else -00:00:21 verbose #526 > wait_for_port_access x -00:00:21 verbose #527 > #endif -00:00:21 verbose #528 > -00:00:21 verbose #529 > let get_available_port x = -00:00:21 verbose #530 > #if !INTERACTIVE -00:00:21 verbose #531 > Networking.get_available_port x -00:00:21 verbose #532 > #else -00:00:21 verbose #533 > get_available_port x -00:00:21 verbose #534 > #endif -00:00:21 verbose #535 > -00:00:21 verbose #536 > module SpiralRuntime = -00:00:21 verbose #537 > let get_executable_suffix () = -00:00:21 verbose #538 > #if !INTERACTIVE -00:00:21 verbose #539 > Runtime.get_executable_suffix () -00:00:21 verbose #540 > #else -00:00:21 verbose #541 > get_executable_suffix () -00:00:21 verbose #542 > #endif -00:00:21 verbose #543 > -00:00:21 verbose #544 > let is_windows () = -00:00:21 verbose #545 > #if !INTERACTIVE -00:00:21 verbose #546 > ... -00:00:21 verbose #547 > -00:00:21 verbose #548 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #549 > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" -00:00:21 verbose #550 > -00:00:21 verbose #551 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #552 > //// test -00:00:21 verbose #553 > -00:00:21 verbose #554 > type AssertExceptionFormatter (ex) = -00:00:21 verbose #555 > member _.Text = -00:00:21 verbose #556 > ex.ToString() -00:00:21 verbose #557 > .Replace("32m", "<span style=\"color: green;\">") -00:00:21 verbose #558 > .Replace("36m", "</span>") -00:00:21 verbose #559 > .Replace("31m", "<span style=\"color: red;\">") -00:00:21 verbose #560 > .Replace("\n", "<br/>\n") -00:00:21 verbose #561 > -00:00:21 verbose #562 > -00:00:21 verbose #563 > Formatter.Register<AssertExceptionFormatter> ((fun (x : -00:00:21 verbose #564 > AssertExceptionFormatter) -> x.Text), "text/html") -00:00:21 verbose #565 > -00:00:21 verbose #566 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #567 > //// test -00:00:21 verbose #568 > -00:00:21 verbose #569 > let inline __expect fn log expected actual = -00:00:21 verbose #570 > if log then printfn $"{actual.ToDisplayString ()}" -00:00:21 verbose #571 > try -00:00:21 verbose #572 > "Testing.__expect" |> fn actual expected -00:00:21 verbose #573 > with :? Expecto.AssertException as ex -> -00:00:21 verbose #574 > AssertExceptionFormatter(ex).Display () |> ignore -00:00:21 verbose #575 > failwith (ex.GetType().FullName) -00:00:21 verbose #576 > -00:00:21 verbose #577 > let inline __contains log expected actual = __expect Expecto.Expect.contains log -00:00:21 verbose #578 > expected actual -00:00:21 verbose #579 > let inline _contains expected actual = __contains true expected actual -00:00:21 verbose #580 > -00:00:21 verbose #581 > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log -00:00:21 verbose #582 > expected actual -00:00:21 verbose #583 > let inline _assertEqual expected actual = __assertEqual true expected actual -00:00:21 verbose #584 > -00:00:21 verbose #585 > let inline __isGreaterThan log expected actual = __expect -00:00:21 verbose #586 > Expecto.Expect.isGreaterThan log expected actual -00:00:21 verbose #587 > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual -00:00:21 verbose #588 > -00:00:21 verbose #589 > let inline __isGreaterThanOrEqual log expected actual = __expect -00:00:21 verbose #590 > Expecto.Expect.isGreaterThanOrEqual log expected actual -00:00:21 verbose #591 > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true -00:00:21 verbose #592 > expected actual -00:00:21 verbose #593 > -00:00:21 verbose #594 > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan -00:00:21 verbose #595 > log expected actual -00:00:21 verbose #596 > let inline _isLessThan expected actual = __isLessThan true expected actual -00:00:21 verbose #597 > -00:00:21 verbose #598 > let inline __isLessThanOrEqual log expected actual = __expect -00:00:21 verbose #599 > Expecto.Expect.isLessThanOrEqual log expected actual -00:00:21 verbose #600 > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true -00:00:21 verbose #601 > expected actual -00:00:21 verbose #602 > -00:00:21 verbose #603 > let inline __sequenceEqual log expected actual = __expe... -00:00:21 verbose #604 > -00:00:21 verbose #605 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #606 > //// test -00:00:21 verbose #607 > -00:00:21 verbose #608 > let inline __isBetween log a b actual = -00:00:21 verbose #609 > let inline isBetween actual (a, b) _ = -00:00:21 verbose #610 > __isGreaterThanOrEqual log a actual -00:00:21 verbose #611 > __isLessThanOrEqual log b actual -00:00:21 verbose #612 > __expect isBetween log (a, b) actual -00:00:21 verbose #613 > let inline _isBetween a b actual = __isBetween true a b actual -00:00:21 verbose #614 > -00:00:21 verbose #615 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #616 > #!import ../../lib/fsharp/Common.fs -00:00:21 verbose #617 > #!import ../../lib/fsharp/CommonFSharp.fs -00:00:21 verbose #618 > #!import ../../lib/fsharp/Async.fs -00:00:21 verbose #619 > #!import ../../lib/fsharp/AsyncSeq.fs -00:00:21 verbose #620 > #!import ../../lib/fsharp/Runtime.fs -00:00:21 verbose #621 > #!import ../../lib/fsharp/FileSystem.fs -00:00:21 verbose #622 > -00:00:21 verbose #623 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #624 > #if !INTERACTIVE -00:00:21 verbose #625 > namespace Polyglot -00:00:21 verbose #626 > #endif -00:00:21 verbose #627 > -00:00:21 verbose #628 > module Common = -00:00:21 verbose #629 > -00:00:21 verbose #630 > #if !INTERACTIVE -00:00:21 verbose #631 > open Lib -00:00:21 verbose #632 > #endif -00:00:21 verbose #633 > -00:00:21 verbose #634 > let nl = System.Environment.NewLine -00:00:21 verbose #635 > let q = @"""" -00:00:21 verbose #636 > -00:00:21 verbose #637 > let inline cons head tail = head :: tail -00:00:21 verbose #638 > -00:00:21 verbose #639 > /// ## memoize -00:00:21 verbose #640 > let inline memoize fn = -00:00:21 verbose #641 > let result = lazy fn () -00:00:21 verbose #642 > fun () -> result.Value -00:00:21 verbose #643 > -00:00:21 verbose #644 > /// ## TraceLevel -00:00:21 verbose #645 > type TraceLevel = -00:00:21 verbose #646 > | Verbose -00:00:21 verbose #647 > | Debug -00:00:21 verbose #648 > | Info -00:00:21 verbose #649 > | Warning -00:00:21 verbose #650 > | Critical -00:00:21 verbose #651 > -00:00:21 verbose #652 > let inline _locals () = "" -00:00:21 verbose #653 > -00:00:21 verbose #654 > /// ## trace -00:00:21 verbose #655 > let to_trace_level = function -00:00:21 verbose #656 > | Verbose -> SpiralTrace.TraceLevel.US0_0 -00:00:21 verbose #657 > | Debug -> SpiralTrace.TraceLevel.US0_1 -00:00:21 verbose #658 > | Info -> SpiralTrace.TraceLevel.US0_2 -00:00:21 verbose #659 > | Warning -> SpiralTrace.TraceLevel.US0_3 -00:00:21 verbose #660 > | Critical -> SpiralTrace.TraceLevel.US0_4 -00:00:21 verbose #661 > -00:00:21 verbose #662 > let trace level fn locals = -00:00:21 verbose #663 > let level = level |> to_trace_level -00:00:21 verbose #664 > SpiralTrace.trace level fn locals -00:00:21 verbose #665 > -00:00:21 verbose #666 > -00:00:21 verbose #667 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #668 > #if !INTERACTIVE -00:00:21 verbose #669 > namespace Polyglot -00:00:21 verbose #670 > #endif -00:00:21 verbose #671 > -00:00:21 verbose #672 > module CommonFSharp = -00:00:21 verbose #673 > -00:00:21 verbose #674 > open Common -00:00:21 verbose #675 > -00:00:21 verbose #676 > /// ## getUnionCaseName -00:00:21 verbose #677 > let inline getUnionCaseName<'T> (x: 'T) = -00:00:21 verbose #678 > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with -00:00:21 verbose #679 > | case, _ -> case.Name -00:00:21 verbose #680 > -00:00:21 verbose #681 > -00:00:21 verbose #682 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #683 > #if !INTERACTIVE -00:00:21 verbose #684 > namespace Polyglot -00:00:21 verbose #685 > #endif -00:00:21 verbose #686 > -00:00:21 verbose #687 > module Async = -00:00:21 verbose #688 > -00:00:21 verbose #689 > #if !INTERACTIVE -00:00:21 verbose #690 > open Lib -00:00:21 verbose #691 > #endif -00:00:21 verbose #692 > -00:00:21 verbose #693 > open Common -00:00:21 verbose #694 > -00:00:21 verbose #695 > /// ## choice -00:00:21 verbose #696 > let inline choice asyncs = async { -00:00:21 verbose #697 > let e = Event<_> () -00:00:21 verbose #698 > use cts = new System.Threading.CancellationTokenSource () -00:00:21 verbose #699 > let fn = -00:00:21 verbose #700 > asyncs -00:00:21 verbose #701 > |> Seq.map (fun a -> async { -00:00:21 verbose #702 > let! x = a -00:00:21 verbose #703 > e.Trigger x -00:00:21 verbose #704 > }) -00:00:21 verbose #705 > |> Async.Parallel -00:00:21 verbose #706 > |> Async.Ignore -00:00:21 verbose #707 > Async.Start (fn, cts.Token) -00:00:21 verbose #708 > let! result = Async.AwaitEvent e.Publish -00:00:21 verbose #709 > cts.Cancel () -00:00:21 verbose #710 > return result -00:00:21 verbose #711 > } -00:00:21 verbose #712 > -00:00:21 verbose #713 > /// ## map -00:00:21 verbose #714 > let inline map fn a = async { -00:00:21 verbose #715 > let! x = a -00:00:21 verbose #716 > return fn x -00:00:21 verbose #717 > } -00:00:21 verbose #718 > -00:00:21 verbose #719 > /// ## catch -00:00:21 verbose #720 > let inline catch a = -00:00:21 verbose #721 > a -00:00:21 verbose #722 > |> Async.Catch -00:00:21 verbose #723 > |> map (function -00:00:21 verbose #724 > | Choice1Of2 result -> Ok result -00:00:21 verbose #725 > | Choice2Of2 ex -> Error ex -00:00:21 verbose #726 > ) -00:00:21 verbose #727 > -00:00:21 verbose #728 > /// ## runWithTimeoutChoiceAsync -00:00:21 verbose #729 > let inline runWithTimeoutChoiceAsync (timeout : int) fn = -00:00:21 verbose #730 > let _locals () = $"timeout: {timeout} / {_locals ()}" -00:00:21 verbose #731 > -00:00:21 verbose #732 > let timeoutTask = async { -00:00:21 verbose #733 > do! Async.Sleep timeout -00:00:21 verbose #734 > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals -00:00:21 verbose #735 > return None -00:00:21 verbose #736 > } -00:00:21 verbose #737 > -00:00:21 verbose #738 > let task = async { -00:00:21 verbose #739 > try -00:00:21 verbose #740 > let! result = fn -00:00:21 verbose #741 > return Some result -00:00:21 verbose #742 > with -00:00:21 verbose #743 > | :? System.AggregateException as ex when -00:00:21 verbose #744 > ex.InnerExceptions -00:00:21 verbose #745 > |> Seq.exists (function :? Sys... -00:00:21 verbose #746 > -00:00:21 verbose #747 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #748 > #if !INTERACTIVE -00:00:21 verbose #749 > namespace Polyglot -00:00:21 verbose #750 > #endif -00:00:21 verbose #751 > -00:00:21 verbose #752 > module AsyncSeq = -00:00:21 verbose #753 > -00:00:21 verbose #754 > #if !INTERACTIVE -00:00:21 verbose #755 > open Lib -00:00:21 verbose #756 > #endif -00:00:21 verbose #757 > -00:00:21 verbose #758 > open Common -00:00:21 verbose #759 > -00:00:21 verbose #760 > /// ## subscribeEvent -00:00:21 verbose #761 > let inline subscribeEvent (event: IEvent<'H, 'A>) map = -00:00:21 verbose #762 > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, -00:00:21 verbose #763 > 'A>(event.AddHandler, event.RemoveHandler) -00:00:21 verbose #764 > System.Reactive.Linq.Observable.Select (observable, fun event -> map -00:00:21 verbose #765 > event.EventArgs) -00:00:21 verbose #766 > |> FSharp.Control.AsyncSeq.ofObservableBuffered -00:00:21 verbose #767 > -00:00:21 verbose #768 > /// ## subscribeToken -00:00:21 verbose #769 > let subscribeToken (token : System.Threading.CancellationToken) = -00:00:21 verbose #770 > let tcs = new System.Threading.Tasks.TaskCompletionSource () -00:00:21 verbose #771 > System.Action tcs.SetResult |> token.Register |> ignore -00:00:21 verbose #772 > let start = System.DateTime.Now.Ticks -00:00:21 verbose #773 > FSharp.Control.AsyncSeq.unfoldAsync -00:00:21 verbose #774 > (fun () -> async { -00:00:21 verbose #775 > do! tcs.Task |> Async.AwaitTask -00:00:21 verbose #776 > return Some (System.DateTime.Now.Ticks - start, ()) -00:00:21 verbose #777 > }) -00:00:21 verbose #778 > () -00:00:21 verbose #779 > -00:00:21 verbose #780 > -00:00:21 verbose #781 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #782 > #if !INTERACTIVE -00:00:21 verbose #783 > namespace Polyglot -00:00:21 verbose #784 > #endif -00:00:21 verbose #785 > -00:00:21 verbose #786 > module Runtime = -00:00:21 verbose #787 > -00:00:21 verbose #788 > #if !INTERACTIVE -00:00:21 verbose #789 > open Lib -00:00:21 verbose #790 > #endif -00:00:21 verbose #791 > -00:00:21 verbose #792 > open Common -00:00:21 verbose #793 > -00:00:21 verbose #794 > /// ## parseArgs -00:00:21 verbose #795 > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = -00:00:21 verbose #796 > let assemblyName = -00:00:21 verbose #797 > System.Reflection.Assembly.GetEntryAssembly().GetName().Name -00:00:21 verbose #798 > let errorHandler : Argu.IExiter = -00:00:21 verbose #799 > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> -00:00:21 verbose #800 > List.contains assemblyName -00:00:21 verbose #801 > then Argu.ExceptionExiter () -00:00:21 verbose #802 > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | -00:00:21 verbose #803 > _ -> Some System.ConsoleColor.Red) -00:00:21 verbose #804 > -00:00:21 verbose #805 > let parser = -00:00:21 verbose #806 > Argu.ArgumentParser.Create<'T> ( -00:00:21 verbose #807 > programName = -00:00:21 verbose #808 > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", -00:00:21 verbose #809 > errorHandler = errorHandler -00:00:21 verbose #810 > ) -00:00:21 verbose #811 > -00:00:21 verbose #812 > parser.ParseCommandLine args -00:00:21 verbose #813 > -00:00:21 verbose #814 > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = -00:00:21 verbose #815 > args -00:00:21 verbose #816 > |> parseArgs<'T> -00:00:21 verbose #817 > |> fun results -> results.GetAllResults () -00:00:21 verbose #818 > -00:00:21 verbose #819 > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = -00:00:21 verbose #820 > args -00:00:21 verbose #821 > |> parseAllArgs<'T> -00:00:21 verbose #822 > |> List.groupBy CommonFSharp.getUnionCaseName<'T> -00:00:21 verbose #823 > |> Map.ofList -00:00:21 verbose #824 > -00:00:21 verbose #825 > -00:00:21 verbose #826 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:00:21 verbose #827 > #if !INTERACTIVE -00:00:21 verbose #828 > namespace Polyglot -00:00:21 verbose #829 > #endif -00:00:21 verbose #830 > -00:00:21 verbose #831 > module FileSystem = -00:00:21 verbose #832 > -00:00:21 verbose #833 > #if !INTERACTIVE -00:00:21 verbose #834 > open Lib -00:00:21 verbose #835 > #endif -00:00:21 verbose #836 > -00:00:21 verbose #837 > open Common -00:00:21 verbose #838 > open SpiralFileSystem.Operators -00:00:21 verbose #839 > -00:00:21 verbose #840 > /// ## watchDirectory -00:00:21 verbose #841 > [[<RequireQualifiedAccess>]] -00:00:21 verbose #842 > type FileSystemChangeType = -00:00:21 verbose #843 > | Failure -00:00:21 verbose #844 > | Changed -00:00:21 verbose #845 > | Created -00:00:21 verbose #846 > | Deleted -00:00:21 verbose #847 > | Renamed -00:00:21 verbose #848 > -00:00:21 verbose #849 > [[<RequireQualifiedAccess>]] -00:00:21 verbose #850 > type FileSystemChange = -00:00:21 verbose #851 > | Failure of exn: exn -00:00:21 verbose #852 > | Changed of path: string * content: string option -00:00:21 verbose #853 > | Created of path: string * content: string option -00:00:21 verbose #854 > | Deleted of path: string -00:00:21 verbose #855 > | Renamed of oldPath: string * (string * string option) -00:00:21 verbose #856 > -00:00:21 verbose #857 > -00:00:21 verbose #858 > let inline watchDirectoryWithFilter filter shouldReadContent path = -00:00:21 verbose #859 > let fullPath = path |> System.IO.Path.GetFullPath -00:00:21 verbose #860 > let _locals () = $"filter: {filter} / {_locals ()}" -00:00:21 verbose #861 > -00:00:21 verbose #862 > let watcher = -00:00:21 verbose #863 > new System.IO.FileSystemWatcher ( -00:00:21 verbose #864 > Path = fullPath, -00:00:21 verbose #865 > NotifyFilter = filter, -00:00:21 verbose #866 > EnableRaisingEvents = true, -00:00:21 verbose #867 > IncludeSubdirectories = true -00:00:21 verbose #868 > ) -00:00:21 verbose #869 > -00:00:21 verbose #870 > let inline getEventPath (path : string) = -00:00:21 verbose #871 > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> -00:00:21 verbose #872 > SpiralSm.trim_start [[| '/'; '\\' |]] -00:00:21 verbose #873 > -00:00:21 verbose #874 > let inline ticks () = -00:00:21 verbose #875 > System.DateTime.UtcNow.Ticks -00:00:21 verbose #876 > -00:00:21 verbose #877 > let changedStream = -00:00:21 verbose #878 > AsyncSeq.subscribeEvent -00:00:21 verbose #879 > watcher.Changed -00:00:21 verbose #880 > (fun event -> -00:00:21 verbose #881 > ticks (), -00:00:21 verbose #882 > [[ FileSystemChange... -00:00:21 verbose #883 > -00:00:21 verbose #884 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #885 > #if !INTERACTIVE -00:00:21 verbose #886 > open Lib -00:00:21 verbose #887 > #endif -00:00:21 verbose #888 > -00:00:21 verbose #889 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #890 > open SpiralFileSystem.Operators -00:00:21 verbose #891 > open Falco.Markup -00:00:21 verbose #892 > -00:00:21 verbose #893 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #894 > type FileSystemNode = -00:00:21 verbose #895 > | File of string * string * int64 -00:00:21 verbose #896 > | Folder of string * string * FileSystemNode list -00:00:21 verbose #897 > | Root of FileSystemNode list -00:00:21 verbose #898 > -00:00:21 verbose #899 > let rec scanDirectory isRoot (basePath : string) (path : string) = -00:00:21 verbose #900 > let relativePath = -00:00:21 verbose #901 > path -00:00:21 verbose #902 > |> SpiralSm.replace basePath "" -00:00:21 verbose #903 > |> SpiralSm.replace "\\" "/" -00:00:21 verbose #904 > |> SpiralSm.replace "//" "/" -00:00:21 verbose #905 > |> SpiralSm.trim_start [[| '/' |]] -00:00:21 verbose #906 > -00:00:21 verbose #907 > let directories = -00:00:21 verbose #908 > path -00:00:21 verbose #909 > |> System.IO.Directory.GetDirectories -00:00:21 verbose #910 > |> Array.toList -00:00:21 verbose #911 > |> List.sort -00:00:21 verbose #912 > |> List.map (scanDirectory false basePath) -00:00:21 verbose #913 > let files = -00:00:21 verbose #914 > path -00:00:21 verbose #915 > |> System.IO.Directory.GetFiles -00:00:21 verbose #916 > |> Array.toList -00:00:21 verbose #917 > |> List.sort -00:00:21 verbose #918 > |> List.map (fun f -> File (System.IO.Path.GetFileName f, relativePath, -00:00:21 verbose #919 > System.IO.FileInfo(f).Length)) -00:00:21 verbose #920 > -00:00:21 verbose #921 > let children = directories @ files -00:00:21 verbose #922 > if isRoot -00:00:21 verbose #923 > then Root children -00:00:21 verbose #924 > else Folder (path |> System.IO.Path.GetFileName, relativePath, children) -00:00:21 verbose #925 > -00:00:21 verbose #926 > let rec generateHtml fsNode = -00:00:21 verbose #927 > let sizeLabel size = -00:00:21 verbose #928 > match float size with -00:00:21 verbose #929 > | size when size > 1024.0 * 1024.0 -> $"%.2f{size / 1024.0 / 1024.0} MB" -00:00:21 verbose #930 > | size when size > 1024.0 -> $"%.2f{size / 1024.0} KB" -00:00:21 verbose #931 > | size -> $"%.2f{size} B" -00:00:21 verbose #932 > match fsNode with -00:00:21 verbose #933 > | File (fileName, relativePath, size) -> -00:00:21 verbose #934 > Elem.div [[]] [[ -00:00:21 verbose #935 > Text.raw "&#128196; " -00:00:21 verbose #936 > Elem.a [[ -00:00:21 verbose #937 > Attr.href $"""{relativePath}{if relativePath = "" then "" else -00:00:21 verbose #938 > "/"}{fileName}""" -00:00:21 verbose #939 > ]] [[ -00:00:21 verbose #940 > Text.raw fileName -00:00:21 verbose #941 > ]] -00:00:21 verbose #942 > Elem.span [[]] [[ -00:00:21 verbose #943 > Text.raw $" ({size |> sizeLabel})" -00:00:21 verbose #944 > ]] -00:00:21 verbose #945 > ]] -00:00:21 verbose #946 > | Folder (folderName, relativePath, children) -> -00:00:21 verbose #947 > let size = -00:00:21 verbose #948 > let rec loop children = -00:00:21 verbose #949 > children -00:00:21 verbose #950 > |> List.sumBy (function -00:00:21 verbose #951 > | File (_, _, size) -> size -00:00:21 verbose #952 > | Folder (_, _, children) -00:00:21 verbose #953 > | Root children -> loop children -00:00:21 verbose #954 > ) -00:00:21 verbose #955 > loop children -00:00:21 verbose #956 > Elem.details [[ -00:00:21 verbose #957 > Attr.open' "true" -00:00:21 verbose #958 > ]] [[ -00:00:21 verbose #959 > Elem.summary [[]] [[ -00:00:21 verbose #960 > Text.raw "&#128194; " -00:00:21 verbose #961 > Elem.a [[ -00:00:21 verbose #962 > Attr.href relativePath -00:00:21 verbose #963 > ]] [[ -00:00:21 verbose #964 > Text.raw folderName -00:00:21 verbose #965 > ]] -00:00:21 verbose #966 > Elem.span [[]] [[ -00:00:21 verbose #967 > Text.raw $" ({size |> sizeLabel})" -00:00:21 verbose #968 > ]] -00:00:21 verbose #969 > ]] -00:00:21 verbose #970 > Elem.div [[]] [[ -00:00:21 verbose #971 > yield! children |> List.map generateHtml -00:00:21 verbose #972 > ]] -00:00:21 verbose #973 > ]] -00:00:21 verbose #974 > | Root children -> -00:00:21 verbose #975 > Elem.div [[]] [[ -00:00:21 verbose #976 > yield! children |> List.map generateHtml -00:00:21 verbose #977 > ]] -00:00:21 verbose #978 > -00:00:21 verbose #979 > let generateHtmlForFileSystem root = -00:00:21 verbose #980 > $"""<!DOCTYPE html> -00:00:21 verbose #981 > <html lang="en"> -00:00:21 verbose #982 > <head> -00:00:21 verbose #983 > <meta charset="UTF-8"> -00:00:21 verbose #984 > <style> -00:00:21 verbose #985 > body {{ -00:00:21 verbose #986 > background-color: #222; -00:00:21 verbose #987 > color: #ccc; -00:00:21 verbose #988 > }} -00:00:21 verbose #989 > a {{ -00:00:21 verbose #990 > color: #777; -00:00:21 verbose #991 > font-size: 15px; -00:00:21 verbose #992 > }} -00:00:21 verbose #993 > span {{ -00:00:21 verbose #994 > font-size: 11px; -00:00:21 verbose #995 > }} -00:00:21 verbose #996 > div > div {{ -00:00:21 verbose #997 > padding-left: 10px; -00:00:21 verbose #998 > }} -00:00:21 verbose #999 > details > div {{ -00:00:21 verbose #1000 > padding-left: 19px; -00:00:21 verbose #1001 > }} -00:00:21 verbose #1002 > </style> -00:00:21 verbose #1003 > </head> -00:00:21 verbose #1004 > <body> -00:00:21 verbose #1005 > {root |> generateHtml |> renderNode} -00:00:21 verbose #1006 > </body> -00:00:21 verbose #1007 > </html> -00:00:21 verbose #1008 > """ -00:00:21 verbose #1009 > -00:00:21 verbose #1010 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #1011 > //// test -00:00:21 verbose #1012 > -00:00:21 verbose #1013 > let struct (tempFolder, disposable) = SpiralFileSystem.create_temp_directory () -00:00:21 verbose #1014 > let rec loop d n = async { -00:00:21 verbose #1015 > if n >= 0 then -00:00:21 verbose #1016 > tempFolder </> d |> System.IO.Directory.CreateDirectory |> ignore -00:00:21 verbose #1017 > do! -00:00:21 verbose #1018 > n -00:00:21 verbose #1019 > |> string -00:00:21 verbose #1020 > |> String.replicate (n + 1) -00:00:21 verbose #1021 > |> SpiralFileSystem.write_all_text_async (tempFolder </> d </> -00:00:21 verbose #1022 > $"file.txt") -00:00:21 verbose #1023 > do! loop $"{d}/{n}" (n - 1) -00:00:21 verbose #1024 > } -00:00:21 verbose #1025 > loop "_.root" 3 -00:00:21 verbose #1026 > |> Async.RunSynchronously -00:00:21 verbose #1027 > -00:00:21 verbose #1028 > let html = -00:00:21 verbose #1029 > scanDirectory true tempFolder tempFolder -00:00:21 verbose #1030 > |> generateHtmlForFileSystem -00:00:21 verbose #1031 > -00:00:21 verbose #1032 > html -00:00:21 verbose #1033 > |> _assertEqual """<!DOCTYPE html> -00:00:21 verbose #1034 > <html lang="en"> -00:00:21 verbose #1035 > <head> -00:00:21 verbose #1036 > <meta charset="UTF-8"> -00:00:21 verbose #1037 > <style> -00:00:21 verbose #1038 > body { -00:00:21 verbose #1039 > background-color: #222; -00:00:21 verbose #1040 > color: #ccc; -00:00:21 verbose #1041 > } -00:00:21 verbose #1042 > a { -00:00:21 verbose #1043 > color: #777; -00:00:21 verbose #1044 > font-size: 15px; -00:00:21 verbose #1045 > } -00:00:21 verbose #1046 > span { -00:00:21 verbose #1047 > font-size: 11px; -00:00:21 verbose #1048 > } -00:00:21 verbose #1049 > div > div { -00:00:21 verbose #1050 > padding-left: 10px; -00:00:21 verbose #1051 > } -00:00:21 verbose #1052 > details > div { -00:00:21 verbose #1053 > padding-left: 19px; -00:00:21 verbose #1054 > } -00:00:21 verbose #1055 > </style> -00:00:21 verbose #1056 > </head> -00:00:21 verbose #1057 > <body> -00:00:21 verbose #1058 > <div><details open="true"><summary>&#128194; <a href="_.root">_.root</a><span> -00:00:21 verbose #1059 > (10.00 B)</span></summary><div><details open="true"><summary>&#128194; <a -00:00:21 verbose #1060 > href="_.root/3">3</a><span> (6.00 B)</span></summary><div><details -00:00:21 verbose #1061 > open="true"><summary>&#128194; <a href="_.root/3/2">2</a><span> (3.00 -00:00:21 verbose #1062 > B)</span></summary><div><details open="true"><summary>&#128194; <a -00:00:21 verbose #1063 > href="_.root/3/2/1">1</a><span> (1.00 B)</span></summary><div><div>&#128196; <a -00:00:21 verbose #1064 > href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 -00:00:21 verbose #1065 > B)</span></div></div></details><div>&#128196; <a -00:00:21 verbose #1066 > href="_.root/3/2/file.txt">file.txt</a><span> (2.00 -00:00:21 verbose #1067 > B)</span></div></div></details><div>&#128196; <a -00:00:21 verbose #1068 > href="_.root/3/file.txt">file.txt</a><span> (3.00 -00:00:21 verbose #1069 > B)</span></div></div></details><div>&#128196; <a -00:00:21 verbose #1070 > href="_.root/file.txt">file.txt</a><span> (4.00 -00:00:21 verbose #1071 > B)</span></div></div></details></div> -00:00:21 verbose #1072 > </body> -00:00:21 verbose #1073 > </html> -00:00:21 verbose #1074 > """ -00:00:21 verbose #1075 > -00:00:21 verbose #1076 > disposable.Dispose () -00:00:21 verbose #1077 > -00:00:21 verbose #1078 > html |> Microsoft.DotNet.Interactive.Formatting.Html.ToHtmlContent -00:00:21 verbose #1079 > -00:00:21 verbose #1080 > ╭─[ 171.44ms - return value ]──────────────────────────────────────────────────╮ -00:00:21 verbose #1081 > │ <!DOCTYPE html> │ -00:00:21 verbose #1082 > │ <html lang="en"> │ -00:00:21 verbose #1083 > │ <head> │ -00:00:21 verbose #1084 > │ <meta charset="UTF-8"> │ -00:00:21 verbose #1085 > │ <style> │ -00:00:21 verbose #1086 > │ body { │ -00:00:21 verbose #1087 > │ background-color: #222; │ -00:00:21 verbose #1088 > │ color: #ccc; │ -00:00:21 verbose #1089 > │ } │ -00:00:21 verbose #1090 > │ a { │ -00:00:21 verbose #1091 > │ color: #777; │ -00:00:21 verbose #1092 > │ font-size: 15px; │ -00:00:21 verbose #1093 > │ } │ -00:00:21 verbose #1094 > │ span { │ -00:00:21 verbose #1095 > │ font-size: 11px; │ -00:00:21 verbose #1096 > │ } │ -00:00:21 verbose #1097 > │ div > div { │ -00:00:21 verbose #1098 > │ padding-left: 10px; │ -00:00:21 verbose #1099 > │ } │ -00:00:21 verbose #1100 > │ details > div { │ -00:00:21 verbose #1101 > │ padding-left: 19px; │ -00:00:21 verbose #1102 > │ } │ -00:00:21 verbose #1103 > │ </style> │ -00:00:21 verbose #1104 > │ </head> │ -00:00:21 verbose #1105 > │ <body> │ -00:00:21 verbose #1106 > │ <div><details open="true"><summary>&#128194; <a │ -00:00:21 verbose #1107 > │ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │ -00:00:21 verbose #1108 > │ open="true"><summary>&#128194; <a href="_.root/3">3</a><span> (6.00 │ -00:00:21 verbose #1109 > │ B)</span></summary><div><details open="true"><summary>&#128194; <a │ -00:00:21 verbose #1110 > │ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │ -00:00:21 verbose #1111 > │ open="true"><summary>&#128194; <a href="_.root/3/2/1">1</a><span> (1.00 │ -00:00:21 verbose #1112 > │ B)</span></summary><div><div>&#128196; <a │ -00:00:21 verbose #1113 > │ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │ -00:00:21 verbose #1114 > │ B)</span></div></div></details><div>&#128196; <a │ -00:00:21 verbose #1115 > │ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │ -00:00:21 verbose #1116 > │ B)</span></div></div></details><div>&#128196; <a │ -00:00:21 verbose #1117 > │ href="_.root/3/file.txt">file.txt</a><span> (3.00 │ -00:00:21 verbose #1118 > │ B)</span></div></div></details><div>&#128196; <a │ -00:00:21 verbose #1119 > │ href="_.root/file.txt">file.txt</a><span> (4.00 │ -00:00:21 verbose #1120 > │ B)</span></div></div></details></div> │ -00:00:21 verbose #1121 > │ </body> │ -00:00:21 verbose #1122 > │ </html> │ -00:00:21 verbose #1123 > │ │ -00:00:21 verbose #1124 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:21 verbose #1125 > -00:00:21 verbose #1126 > ╭─[ 176.95ms - stdout ]────────────────────────────────────────────────────────╮ -00:00:21 verbose #1127 > │ "<!DOCTYPE html> │ -00:00:21 verbose #1128 > │ <html lang="en"> │ -00:00:21 verbose #1129 > │ <head> │ -00:00:21 verbose #1130 > │ <meta charset="UTF-8"> │ -00:00:21 verbose #1131 > │ <style> │ -00:00:21 verbose #1132 > │ body { │ -00:00:21 verbose #1133 > │ background-color: #222; │ -00:00:21 verbose #1134 > │ color: #ccc; │ -00:00:21 verbose #1135 > │ } │ -00:00:21 verbose #1136 > │ a { │ -00:00:21 verbose #1137 > │ color: #777; │ -00:00:21 verbose #1138 > │ font-size: 15px; │ -00:00:21 verbose #1139 > │ } │ -00:00:21 verbose #1140 > │ span { │ -00:00:21 verbose #1141 > │ font-size: 11px; │ -00:00:21 verbose #1142 > │ } │ -00:00:21 verbose #1143 > │ div > div { │ -00:00:21 verbose #1144 > │ padding-left: 10px; │ -00:00:21 verbose #1145 > │ } │ -00:00:21 verbose #1146 > │ details > div { │ -00:00:21 verbose #1147 > │ padding-left: 19px; │ -00:00:21 verbose #1148 > │ } │ -00:00:21 verbose #1149 > │ </style> │ -00:00:21 verbose #1150 > │ </head> │ -00:00:21 verbose #1151 > │ <body> │ -00:00:21 verbose #1152 > │ <div><details open="true"><summary>&#128194; <a │ -00:00:21 verbose #1153 > │ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │ -00:00:21 verbose #1154 > │ open="true"><summary>&#128194; <a href="_.root/3">3</a><span> (6.00 │ -00:00:21 verbose #1155 > │ B)</span></summary><div><details open="true"><summary>&#128194; <a │ -00:00:21 verbose #1156 > │ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │ -00:00:21 verbose #1157 > │ open="true"><summary>&#128194; <a href="_.root/3/2/1">1</a><span> (1.00 │ -00:00:21 verbose #1158 > │ B)</span></summary><div><div>&#128196; <a │ -00:00:21 verbose #1159 > │ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │ -00:00:21 verbose #1160 > │ B)</span></div></div></details><div>&#128196; <a │ -00:00:21 verbose #1161 > │ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │ -00:00:21 verbose #1162 > │ B)</span></div></div></details><div>&#128196; <a │ -00:00:21 verbose #1163 > │ href="_.root/3/file.txt">file.txt</a><span> (3.00 │ -00:00:21 verbose #1164 > │ B)</span></div></div></details><div>&#128196; <a │ -00:00:21 verbose #1165 > │ href="_.root/file.txt">file.txt</a><span> (4.00 │ -00:00:21 verbose #1166 > │ B)</span></div></div></details></div> │ -00:00:21 verbose #1167 > │ </body> │ -00:00:21 verbose #1168 > │ </html> │ -00:00:21 verbose #1169 > │ " │ -00:00:21 verbose #1170 > │ │ -00:00:21 verbose #1171 > │ │ -00:00:21 verbose #1172 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:21 verbose #1173 > -00:00:21 verbose #1174 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:21 verbose #1175 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:21 verbose #1176 > │ ## Arguments │ -00:00:21 verbose #1177 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:21 verbose #1178 > -00:00:21 verbose #1179 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #1180 > [[<RequireQualifiedAccess>]] -00:00:21 verbose #1181 > type Arguments = -00:00:21 verbose #1182 > | [[<Argu.ArguAttributes.ExactlyOnce>]] Dir of string -00:00:21 verbose #1183 > | [[<Argu.ArguAttributes.ExactlyOnce>]] Html of string -00:00:21 verbose #1184 > -00:00:21 verbose #1185 > interface Argu.IArgParserTemplate with -00:00:21 verbose #1186 > member s.Usage = -00:00:21 verbose #1187 > match s with -00:00:21 verbose #1188 > | Dir _ -> nameof Dir -00:00:21 verbose #1189 > | Html _ -> nameof Html -00:00:21 verbose #1190 > -00:00:21 verbose #1191 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #1192 > //// test -00:00:21 verbose #1193 > -00:00:21 verbose #1194 > Argu.ArgumentParser.Create<Arguments>().PrintUsage () -00:00:21 verbose #1195 > -00:00:21 verbose #1196 > ╭─[ 114.41ms - return value ]──────────────────────────────────────────────────╮ -00:00:21 verbose #1197 > │ "USAGE: dotnet-repl [--help] --dir <string> --html <string> │ -00:00:21 verbose #1198 > │ │ -00:00:21 verbose #1199 > │ OPTIONS: │ -00:00:21 verbose #1200 > │ │ -00:00:21 verbose #1201 > │ --dir <string> Dir │ -00:00:21 verbose #1202 > │ --html <string> Html │ -00:00:21 verbose #1203 > │ --help display this list of options. │ -00:00:21 verbose #1204 > │ " │ -00:00:21 verbose #1205 > │ │ -00:00:21 verbose #1206 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:21 verbose #1207 > -00:00:21 verbose #1208 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:21 verbose #1209 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:21 verbose #1210 > │ ## main │ -00:00:21 verbose #1211 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:21 verbose #1212 > -00:00:21 verbose #1213 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #1214 > let main args = -00:00:21 verbose #1215 > let argsMap = args |> Runtime.parseArgsMap<Arguments> -00:00:21 verbose #1216 > -00:00:21 verbose #1217 > let dir = -00:00:21 verbose #1218 > match argsMap.[[nameof Arguments.Dir]] with -00:00:21 verbose #1219 > | [[ Arguments.Dir dir ]] -> Some dir -00:00:21 verbose #1220 > | _ -> None -00:00:21 verbose #1221 > |> Option.get -00:00:21 verbose #1222 > -00:00:21 verbose #1223 > let htmlPath = -00:00:21 verbose #1224 > match argsMap.[[nameof Arguments.Html]] with -00:00:21 verbose #1225 > | [[ Arguments.Html html ]] -> Some html -00:00:21 verbose #1226 > | _ -> None -00:00:21 verbose #1227 > |> Option.get -00:00:21 verbose #1228 > -00:00:21 verbose #1229 > let fileSystem = scanDirectory true dir dir -00:00:21 verbose #1230 > let html = generateHtmlForFileSystem fileSystem -00:00:21 verbose #1231 > -00:00:21 verbose #1232 > html |> SpiralFileSystem.write_all_text_async htmlPath -00:00:21 verbose #1233 > |> Async.runWithTimeout 30000 -00:00:21 verbose #1234 > |> function -00:00:21 verbose #1235 > | Some () -> 0 -00:00:21 verbose #1236 > | None -> 1 -00:00:21 verbose #1237 > -00:00:21 verbose #1238 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:00:21 verbose #1239 > //// test -00:00:21 verbose #1240 > -00:00:21 verbose #1241 > let args = -00:00:21 verbose #1242 > System.Environment.GetEnvironmentVariable "ARGS" -00:00:21 verbose #1243 > |> SpiralRuntime.split_args -00:00:21 verbose #1244 > |> Seq.toArray -00:00:21 verbose #1245 > -00:00:21 verbose #1246 > match args with -00:00:21 verbose #1247 > | [[||]] -> 0 -00:00:21 verbose #1248 > | args -> if main args = 0 then 0 else failwith "main failed" -00:00:21 verbose #1249 > -00:00:21 verbose #1250 > ╭─[ 88.26ms - return value ]───────────────────────────────────────────────────╮ -00:00:21 verbose #1251 > │ <div class="dni-plaintext"><pre>0 │ -00:00:21 verbose #1252 > │ </pre></div><style> │ -00:00:21 verbose #1253 > │ .dni-code-hint { │ -00:00:21 verbose #1254 > │ font-style: italic; │ -00:00:21 verbose #1255 > │ overflow: hidden; │ -00:00:21 verbose #1256 > │ white-space: nowrap; │ -00:00:21 verbose #1257 > │ } │ -00:00:21 verbose #1258 > │ .dni-treeview { │ -00:00:21 verbose #1259 > │ white-space: nowrap; │ -00:00:21 verbose #1260 > │ } │ -00:00:21 verbose #1261 > │ .dni-treeview td { │ -00:00:21 verbose #1262 > │ vertical-align: top; │ -00:00:21 verbose #1263 > │ text-align: start; │ -00:00:21 verbose #1264 > │ } │ -00:00:21 verbose #1265 > │ details.dni-treeview { │ -00:00:21 verbose #1266 > │ padding-left: 1em; │ -00:00:21 verbose #1267 > │ } │ -00:00:21 verbose #1268 > │ table td { │ -00:00:21 verbose #1269 > │ text-align: start; │ -00:00:21 verbose #1270 > │ } │ -00:00:21 verbose #1271 > │ table tr { │ -00:00:21 verbose #1272 > │ vertical-align: top; │ -00:00:21 verbose #1273 > │ margin: 0em 0px; │ -00:00:21 verbose #1274 > │ } │ -00:00:21 verbose #1275 > │ table tr td pre │ -00:00:21 verbose #1276 > │ { │ -00:00:21 verbose #1277 > │ vertical-align: top !important; │ -00:00:21 verbose #1278 > │ margin: 0em 0px !important; │ -00:00:21 verbose #1279 > │ } │ -00:00:21 verbose #1280 > │ table th { │ -00:00:21 verbose #1281 > │ text-align: start; │ -00:00:21 verbose #1282 > │ } │ -00:00:21 verbose #1283 > │ </style> │ -00:00:21 verbose #1284 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:21 verbose #1285 > 00:00:19 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 43979 -00:00:21 verbose #1286 > 00:00:19 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:00:25 verbose #1287 > 00:00:23 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb to html\e[0m -00:00:25 verbose #1288 > 00:00:23 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:00:25 verbose #1289 > 00:00:23 verbose #7 \e[4;7m validate(nb)\e[0m -00:00:25 verbose #1290 > 00:00:23 verbose #8 \e[4;7m[NbConvertApp] Writing 309493 bytes to c:\home\git\polyglot\apps\dir-tree-html\DirTreeHtml.dib.html\e[0m -00:00:25 verbose #1291 > 00:00:23 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 629 -00:00:25 verbose #1292 > 00:00:23 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 629 -00:00:25 verbose #1293 > 00:00:23 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:00:26 verbose #1294 > 00:00:24 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:00:26 verbose #1295 > 00:00:24 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:00:26 verbose #1296 > 00:00:24 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 44667 -00:00:26 debug #1297 execute_with_options_async / exit_code: 0 / output.Length: 47067 -00:00:26 debug #3 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path DirTreeHtml.dib -00:00:26 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False -00:00:26 debug #7 run_with_timeout_async / timeout: 100 +00:00:06 verbose #10 > > +00:00:06 verbose #11 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:06 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:06 verbose #13 > > │ # DirTreeHtml (Polyglot) │ +00:00:06 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:06 verbose #15 > > +00:00:06 verbose #16 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:06 verbose #17 > > #r +00:00:06 verbose #18 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan +00:00:06 verbose #19 > > dard2.1/FSharp.Control.AsyncSeq.dll" +00:00:06 verbose #20 > > #r +00:00:06 verbose #21 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. +00:00:06 verbose #22 > > 0/System.Reactive.dll" +00:00:06 verbose #23 > > #r +00:00:06 verbose #24 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib +00:00:06 verbose #25 > > netstandard2.0/System.Reactive.Linq.dll" +00:00:06 verbose #26 > > #r +00:00:06 verbose #27 > > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" +00:00:06 verbose #28 > > #r +00:00:06 verbose #29 > > @"../../../../../../../.nuget/packages/falco.markup/1.1.1/lib/netstandard2.0/Fal +00:00:06 verbose #30 > > co.Markup.dll" +00:00:06 verbose #31 > > +00:00:06 verbose #32 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:06 verbose #33 > > #r +00:00:06 verbose #34 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A +00:00:06 verbose #35 > > spNetCore.Html.Abstractions.dll" +00:00:06 verbose #36 > > #r +00:00:06 verbose #37 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:06 verbose #38 > > otNet.Interactive.dll" +00:00:06 verbose #39 > > #r +00:00:06 verbose #40 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:06 verbose #41 > > otNet.Interactive.FSharp.dll" +00:00:06 verbose #42 > > #r +00:00:06 verbose #43 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:06 verbose #44 > > otNet.Interactive.Formatting.dll" +00:00:06 verbose #45 > > open System +00:00:06 verbose #46 > > open System.IO +00:00:06 verbose #47 > > open System.Text +00:00:06 verbose #48 > > open Microsoft.DotNet.Interactive.Formatting +00:00:10 verbose #49 > > +00:00:10 verbose #50 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:10 verbose #51 > > #r +00:00:10 verbose #52 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:10 verbose #53 > > otNet.Interactive.FSharp.dll" +00:00:10 verbose #54 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers +00:00:10 verbose #55 > > #r +00:00:10 verbose #56 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:10 verbose #57 > > otNet.Interactive.dll" +00:00:10 verbose #58 > > open type Microsoft.DotNet.Interactive.Kernel +00:00:11 verbose #59 > > +00:00:11 verbose #60 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:11 verbose #61 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) +00:00:11 verbose #62 > > +00:00:11 verbose #63 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:11 verbose #64 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: +00:00:11 verbose #65 > > TextWriter)->fprintfn writer "%120A" x) +00:00:12 verbose #66 > > +00:00:12 verbose #67 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #68 > > #!import ../../lib/fsharp/Notebooks.dib +00:00:12 verbose #69 > > #!import ../../lib/fsharp/Testing.dib +00:00:12 verbose #70 > > +00:00:12 verbose #71 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:12 verbose #72 > > //// test +00:00:12 verbose #73 > > +00:00:12 verbose #74 > > Formatter.ListExpansionLimit <- 100 +00:00:12 verbose #75 > > +00:00:12 verbose #76 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:12 verbose #77 > > #if FABLE_COMPILER +00:00:12 verbose #78 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] +00:00:12 verbose #79 > > #endif +00:00:12 verbose #80 > > type std_env_VarError = class end +00:00:12 verbose #81 > > #if FABLE_COMPILER +00:00:12 verbose #82 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:00:12 verbose #83 > > #endif +00:00:12 verbose #84 > > type core_any_Any = class end +00:00:12 verbose #85 > > #if FABLE_COMPILER +00:00:12 verbose #86 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:00:12 verbose #87 > > #endif +00:00:12 verbose #88 > > type core_ops_Try<'T> = class end +00:00:12 verbose #89 > > #if FABLE_COMPILER +00:00:12 verbose #90 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:00:12 verbose #91 > > #endif +00:00:12 verbose #92 > > type Func0<'T> = class end +00:00:12 verbose #93 > > #if FABLE_COMPILER +00:00:12 verbose #94 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:00:12 verbose #95 > > #endif +00:00:12 verbose #96 > > type Func0<'T, 'U> = class end +00:00:12 verbose #97 > > #if FABLE_COMPILER +00:00:12 verbose #98 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:00:12 verbose #99 > > #endif +00:00:12 verbose #100 > > type Box<'T> = class end +00:00:12 verbose #101 > > #if FABLE_COMPILER +00:00:12 verbose #102 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] +00:00:12 verbose #103 > > #endif +00:00:12 verbose #104 > > type Dyn<'T> = class end +00:00:12 verbose #105 > > #if FABLE_COMPILER +00:00:12 verbose #106 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] +00:00:12 verbose #107 > > #endif +00:00:12 verbose #108 > > type Send<'T> = class end +00:00:12 verbose #109 > > #if FABLE_COMPILER +00:00:12 verbose #110 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] +00:00:12 verbose #111 > > #endif +00:00:12 verbose #112 > > type Fn<'T> = class end +00:00:12 verbose #113 > > #if FABLE_COMPILER +00:00:12 verbose #114 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] +00:00:12 verbose #115 > > #endif +00:00:12 verbose #116 > > type FnUnit = class end +00:00:12 verbose #117 > > #if FABLE_COMPILER +00:00:12 verbose #118 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] +00:00:12 verbose #119 > > #endif +00:00:12 verbose #120 > > type FnOnce<'T> = class end +00:00:12 verbose #121 > > #if FABLE_COMPILER +00:00:12 verbose #122 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] +00:00:12 verbose #123 > > #endif +00:00:12 verbose #124 > > type ActionFn<'T> = class end +00:00:12 verbose #125 > > #if FABLE_COMPILER +00:00:12 verbose #126 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] +00:00:12 verbose #127 > > #endif +00:00:12 verbose #128 > > type ActionFn2<'T, 'U> = class end +00:00:12 verbose #129 > > #if FABLE_COMPILER +00:00:12 verbose #130 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] +00:00:12 verbose #131 > > #endif +00:00:12 verbose #132 > > type Impl<'T> = class end +00:00:12 verbose #133 > > #if FABLE_COMPILER +00:00:12 verbose #134 > > [[<Fable... +00:00:13 verbose #135 > > +00:00:13 verbose #136 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:13 verbose #137 > > #if FABLE_COMPILER +00:00:13 verbose #138 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:00:13 verbose #139 > > #endif +00:00:13 verbose #140 > > type core_any_Any = class end +00:00:13 verbose #141 > > #if FABLE_COMPILER +00:00:13 verbose #142 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:00:13 verbose #143 > > #endif +00:00:13 verbose #144 > > type core_ops_Try<'T> = class end +00:00:13 verbose #145 > > #if FABLE_COMPILER +00:00:13 verbose #146 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:00:13 verbose #147 > > #endif +00:00:13 verbose #148 > > type Func0<'T> = class end +00:00:13 verbose #149 > > #if FABLE_COMPILER +00:00:13 verbose #150 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:00:13 verbose #151 > > #endif +00:00:13 verbose #152 > > type Func0<'T, 'U> = class end +00:00:13 verbose #153 > > #if FABLE_COMPILER +00:00:13 verbose #154 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:00:13 verbose #155 > > #endif +00:00:13 verbose #156 > > type Box<'T> = class end +00:00:13 verbose #157 > > #if FABLE_COMPILER +00:00:13 verbose #158 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] +00:00:13 verbose #159 > > #endif +00:00:13 verbose #160 > > type Dyn<'T> = class end +00:00:13 verbose #161 > > #if FABLE_COMPILER +00:00:13 verbose #162 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] +00:00:13 verbose #163 > > #endif +00:00:13 verbose #164 > > type Send<'T> = class end +00:00:13 verbose #165 > > #if FABLE_COMPILER +00:00:13 verbose #166 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] +00:00:13 verbose #167 > > #endif +00:00:13 verbose #168 > > type Fn<'T> = class end +00:00:13 verbose #169 > > #if FABLE_COMPILER +00:00:13 verbose #170 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] +00:00:13 verbose #171 > > #endif +00:00:13 verbose #172 > > type FnUnit = class end +00:00:13 verbose #173 > > #if FABLE_COMPILER +00:00:13 verbose #174 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] +00:00:13 verbose #175 > > #endif +00:00:13 verbose #176 > > type FnOnce<'T> = class end +00:00:13 verbose #177 > > #if FABLE_COMPILER +00:00:13 verbose #178 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] +00:00:13 verbose #179 > > #endif +00:00:13 verbose #180 > > type ActionFn<'T> = class end +00:00:13 verbose #181 > > #if FABLE_COMPILER +00:00:13 verbose #182 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] +00:00:13 verbose #183 > > #endif +00:00:13 verbose #184 > > type ActionFn2<'T, 'U> = class end +00:00:13 verbose #185 > > #if FABLE_COMPILER +00:00:13 verbose #186 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] +00:00:13 verbose #187 > > #endif +00:00:13 verbose #188 > > type Impl<'T> = class end +00:00:13 verbose #189 > > #if FABLE_COMPILER +00:00:13 verbose #190 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] +00:00:13 verbose #191 > > #endif +00:00:13 verbose #192 > > type Mut<'T> = class end +00:00:13 verbose #193 > > #if FABLE_COMPILER +00:00:13 verbose #194 > > [[<Fable.Core.Erase; Fable.Co... +00:00:15 verbose #195 > > +00:00:15 verbose #196 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:15 verbose #197 > > #if FABLE_COMPILER +00:00:15 verbose #198 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]] +00:00:15 verbose #199 > > #endif +00:00:15 verbose #200 > > type async_std_task_JoinHandle<'T> = class end +00:00:15 verbose #201 > > #if FABLE_COMPILER +00:00:15 verbose #202 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] +00:00:15 verbose #203 > > #endif +00:00:15 verbose #204 > > type std_future_Future<'T> = class end +00:00:15 verbose #205 > > #if FABLE_COMPILER +00:00:15 verbose #206 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] +00:00:15 verbose #207 > > #endif +00:00:15 verbose #208 > > type rayon_vec_IntoIter<'T> = class end +00:00:15 verbose #209 > > #if FABLE_COMPILER +00:00:15 verbose #210 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] +00:00:15 verbose #211 > > #endif +00:00:15 verbose #212 > > type rayon_iter_Map<'T> = class end +00:00:15 verbose #213 > > #if FABLE_COMPILER +00:00:15 verbose #214 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] +00:00:15 verbose #215 > > #endif +00:00:15 verbose #216 > > type futures_lite_stream_StreamExt = class end +00:00:15 verbose #217 > > #if FABLE_COMPILER +00:00:15 verbose #218 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] +00:00:15 verbose #219 > > #endif +00:00:15 verbose #220 > > type futures_future_TryJoinAll<'T> = class end +00:00:15 verbose #221 > > #if FABLE_COMPILER +00:00:15 verbose #222 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]] +00:00:15 verbose #223 > > #endif +00:00:15 verbose #224 > > type futures_future_Fuse<'T> = class end +00:00:15 verbose #225 > > #if FABLE_COMPILER +00:00:15 verbose #226 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]] +00:00:15 verbose #227 > > #endif +00:00:15 verbose #228 > > type futures_future_JoinAll<'T> = class end +00:00:15 verbose #229 > > let rec closure0 () (v0 : System.Threading.CancellationToken) : +00:00:15 verbose #230 > > Async<System.Threading.CancellationToken> = +00:00:15 verbose #231 > > let v1 : bool = true +00:00:15 verbose #232 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None +00:00:15 verbose #233 > > +00:00:15 verbose #234 > > #if FABLE_COMPILER || WASM || CONTRACT +00:00:15 verbose #235 > > +00:00:15 verbose #236 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT +00:00:15 verbose #237 > > let v2 : Async<System.Threading.CancellationToken> = null |> +00:00:15 verbose #238 > > unbox<Async<System... +00:00:15 verbose #239 > > +00:00:15 verbose #240 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:15 verbose #241 > > #if FABLE_COMPILER +00:00:15 verbose #242 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] +00:00:15 verbose #243 > > #endif +00:00:15 verbose #244 > > type std_thread_JoinHandle<'T> = class end +00:00:15 verbose #245 > > #if FABLE_COMPILER +00:00:15 verbose #246 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] +00:00:15 verbose #247 > > #endif +00:00:15 verbose #248 > > type std_sync_Arc<'T> = class end +00:00:15 verbose #249 > > #if FABLE_COMPILER +00:00:15 verbose #250 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] +00:00:15 verbose #251 > > #endif +00:00:15 verbose #252 > > type std_sync_Mutex<'T> = class end +00:00:15 verbose #253 > > #if FABLE_COMPILER +00:00:15 verbose #254 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] +00:00:15 verbose #255 > > #endif +00:00:15 verbose #256 > > type std_sync_MutexGuard<'T> = class end +00:00:15 verbose #257 > > #if FABLE_COMPILER +00:00:15 verbose #258 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] +00:00:15 verbose #259 > > #endif +00:00:15 verbose #260 > > type std_sync_PoisonError<'T> = class end +00:00:15 verbose #261 > > #if FABLE_COMPILER +00:00:15 verbose #262 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]] +00:00:15 verbose #263 > > #endif +00:00:15 verbose #264 > > type std_sync_mpsc_Receiver<'T> = class end +00:00:15 verbose #265 > > #if FABLE_COMPILER +00:00:15 verbose #266 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]] +00:00:15 verbose #267 > > #endif +00:00:15 verbose #268 > > type std_sync_mpsc_SendError<'T> = class end +00:00:15 verbose #269 > > #if FABLE_COMPILER +00:00:15 verbose #270 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]] +00:00:15 verbose #271 > > #endif +00:00:15 verbose #272 > > type std_sync_mpsc_Sender<'T> = class end +00:00:15 verbose #273 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member +00:00:15 verbose #274 > > _.Dispose () = f () +00:00:15 verbose #275 > > type [[<Struct>]] US0 = +00:00:15 verbose #276 > > | US0_0 of f0_0 : System.Threading.CancellationToken +00:00:15 verbose #277 > > | US0_1 +00:00:15 verbose #278 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = +00:00:15 verbose #279 > > let v1 : bool = true +00:00:15 verbose #280 > > let mutable _v1 : unit option = None +00:00:15 verbose #281 > > +00:00:15 verbose #282 > > #if FABLE_COMPILER || WASM || CONTRACT +00:00:15 verbose #283 > > +00:00:15 verbose #284 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT... +00:00:15 verbose #285 > > +00:00:15 verbose #286 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:15 verbose #287 > > #if FABLE_COMPILER +00:00:15 verbose #288 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] +00:00:15 verbose #289 > > #endif +00:00:15 verbose #290 > > type reqwest_Error = class end +00:00:15 verbose #291 > > #if FABLE_COMPILER +00:00:15 verbose #292 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] +00:00:15 verbose #293 > > #endif +00:00:15 verbose #294 > > type reqwest_RequestBuilder = class end +00:00:15 verbose #295 > > #if FABLE_COMPILER +00:00:15 verbose #296 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] +00:00:15 verbose #297 > > #endif +00:00:15 verbose #298 > > type reqwest_Response = class end +00:00:15 verbose #299 > > #if FABLE_COMPILER +00:00:15 verbose #300 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] +00:00:15 verbose #301 > > #endif +00:00:15 verbose #302 > > type std_env_VarError = class end +00:00:15 verbose #303 > > #if FABLE_COMPILER +00:00:15 verbose #304 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:00:15 verbose #305 > > #endif +00:00:15 verbose #306 > > type core_any_Any = class end +00:00:15 verbose #307 > > #if FABLE_COMPILER +00:00:15 verbose #308 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:00:15 verbose #309 > > #endif +00:00:15 verbose #310 > > type core_ops_Try<'T> = class end +00:00:15 verbose #311 > > #if FABLE_COMPILER +00:00:15 verbose #312 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:00:15 verbose #313 > > #endif +00:00:15 verbose #314 > > type Func0<'T> = class end +00:00:15 verbose #315 > > #if FABLE_COMPILER +00:00:15 verbose #316 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:00:15 verbose #317 > > #endif +00:00:15 verbose #318 > > type Func0<'T, 'U> = class end +00:00:15 verbose #319 > > #if FABLE_COMPILER +00:00:15 verbose #320 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:00:15 verbose #321 > > #endif +00:00:15 verbose #322 > > type Box<'T> = class end +00:00:15 verbose #323 > > #if FABLE_COMPILER +00:00:15 verbose #324 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] +00:00:15 verbose #325 > > #endif +00:00:15 verbose #326 > > type Dyn<'T> = class end +00:00:15 verbose #327 > > #if FABLE_COMPILER +00:00:15 verbose #328 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] +00:00:15 verbose #329 > > #endif +00:00:15 verbose #330 > > type Send<'T> = class end +00:00:15 verbose #331 > > #if FABLE_COMPILER +00:00:15 verbose #332 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] +00:00:15 verbose #333 > > #endif +00:00:15 verbose #334 > > type Fn<'T> = class end +00:00:15 verbose #335 > > #if FABLE_COMPILER +00:00:15 verbose #336 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] +00:00:15 verbose #337 > > #endif +00:00:15 verbose #338 > > type FnUnit = class end +00:00:15 verbose #339 > > #if FABLE_COMPILER +00:00:15 verbose #340 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] +00:00:15 verbose #341 > > #... +00:00:17 verbose #342 > > +00:00:17 verbose #343 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:17 verbose #344 > > #if FABLE_COMPILER +00:00:17 verbose #345 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] +00:00:17 verbose #346 > > #endif +00:00:17 verbose #347 > > type clap_Arg = class end +00:00:17 verbose #348 > > #if FABLE_COMPILER +00:00:17 verbose #349 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] +00:00:17 verbose #350 > > #endif +00:00:17 verbose #351 > > type clap_ArgAction = class end +00:00:17 verbose #352 > > #if FABLE_COMPILER +00:00:17 verbose #353 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] +00:00:17 verbose #354 > > #endif +00:00:17 verbose #355 > > type clap_Command = class end +00:00:17 verbose #356 > > #if FABLE_COMPILER +00:00:17 verbose #357 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] +00:00:17 verbose #358 > > #endif +00:00:17 verbose #359 > > type clap_ArgMatches = class end +00:00:17 verbose #360 > > #if FABLE_COMPILER +00:00:17 verbose #361 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] +00:00:17 verbose #362 > > #endif +00:00:17 verbose #363 > > type clap_builder_ValueRange = class end +00:00:17 verbose #364 > > #if FABLE_COMPILER +00:00:17 verbose #365 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] +00:00:17 verbose #366 > > #endif +00:00:17 verbose #367 > > type clap_builder_ValueParser = class end +00:00:17 verbose #368 > > #if FABLE_COMPILER +00:00:17 verbose #369 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] +00:00:17 verbose #370 > > #endif +00:00:17 verbose #371 > > type clap_builder_PossibleValue = class end +00:00:17 verbose #372 > > #if FABLE_COMPILER +00:00:17 verbose #373 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] +00:00:17 verbose #374 > > #endif +00:00:17 verbose #375 > > type std_process_Child = class end +00:00:17 verbose #376 > > #if FABLE_COMPILER +00:00:17 verbose #377 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] +00:00:17 verbose #378 > > #endif +00:00:17 verbose #379 > > type std_process_ChildStderr = class end +00:00:17 verbose #380 > > #if FABLE_COMPILER +00:00:17 verbose #381 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] +00:00:17 verbose #382 > > #endif +00:00:17 verbose #383 > > type std_process_ChildStdout = class end +00:00:17 verbose #384 > > #if FABLE_COMPILER +00:00:17 verbose #385 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] +00:00:17 verbose #386 > > #endif +00:00:17 verbose #387 > > type std_process_ChildStdin = class end +00:00:17 verbose #388 > > #if FABLE_COMPILER +00:00:17 verbose #389 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] +00:00:17 verbose #390 > > #endif +00:00:17 verbose #391 > > type std_process_Command = class ... +00:00:19 verbose #392 > > +00:00:19 verbose #393 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:19 verbose #394 > > #if FABLE_COMPILER +00:00:19 verbose #395 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] +00:00:19 verbose #396 > > #endif +00:00:19 verbose #397 > > type std_fs_File = class end +00:00:19 verbose #398 > > #if FABLE_COMPILER +00:00:19 verbose #399 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] +00:00:19 verbose #400 > > #endif +00:00:19 verbose #401 > > type std_fs_FileType = class end +00:00:19 verbose #402 > > #if FABLE_COMPILER +00:00:19 verbose #403 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] +00:00:19 verbose #404 > > #endif +00:00:19 verbose #405 > > type std_path_Display = class end +00:00:19 verbose #406 > > #if FABLE_COMPILER +00:00:19 verbose #407 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] +00:00:19 verbose #408 > > #endif +00:00:19 verbose #409 > > type std_path_Path = class end +00:00:19 verbose #410 > > #if FABLE_COMPILER +00:00:19 verbose #411 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] +00:00:19 verbose #412 > > #endif +00:00:19 verbose #413 > > type std_path_PathBuf = class end +00:00:19 verbose #414 > > #if FABLE_COMPILER +00:00:19 verbose #415 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] +00:00:19 verbose #416 > > #endif +00:00:19 verbose #417 > > type async_walkdir_DirEntry = class end +00:00:19 verbose #418 > > #if FABLE_COMPILER +00:00:19 verbose #419 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] +00:00:19 verbose #420 > > #endif +00:00:19 verbose #421 > > type async_walkdir_Filtering = class end +00:00:19 verbose #422 > > #if FABLE_COMPILER +00:00:19 verbose #423 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] +00:00:19 verbose #424 > > #endif +00:00:19 verbose #425 > > type async_walkdir_WalkDir = class end +00:00:19 verbose #426 > > #if FABLE_COMPILER +00:00:19 verbose #427 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:00:19 verbose #428 > > #endif +00:00:19 verbose #429 > > type core_any_Any = class end +00:00:19 verbose #430 > > #if FABLE_COMPILER +00:00:19 verbose #431 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:00:19 verbose #432 > > #endif +00:00:19 verbose #433 > > type core_ops_Try<'T> = class end +00:00:19 verbose #434 > > #if FABLE_COMPILER +00:00:19 verbose #435 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:00:19 verbose #436 > > #endif +00:00:19 verbose #437 > > type Func0<'T> = class end +00:00:19 verbose #438 > > #if FABLE_COMPILER +00:00:19 verbose #439 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:00:19 verbose #440 > > #endif +00:00:19 verbose #441 > > type Func0<'T, 'U> = class end +00:00:19 verbose #442 > > #if FABLE_COMPILER +00:00:19 verbose #443 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:00:19 verbose #444 > > #endif +00:00:19 verbose #445 > > type Box<'T> = clas... +00:00:22 verbose #446 > > +00:00:22 verbose #447 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #448 > > module SpiralTrace = +00:00:22 verbose #449 > > let trace x = +00:00:22 verbose #450 > > #if !INTERACTIVE +00:00:22 verbose #451 > > Trace.trace x +00:00:22 verbose #452 > > #else +00:00:22 verbose #453 > > trace x +00:00:22 verbose #454 > > #endif +00:00:22 verbose #455 > > +00:00:22 verbose #456 > > type TraceLevel = +00:00:22 verbose #457 > > #if !INTERACTIVE +00:00:22 verbose #458 > > Trace.US0 +00:00:22 verbose #459 > > #else +00:00:22 verbose #460 > > US0 +00:00:22 verbose #461 > > #endif +00:00:22 verbose #462 > > +00:00:22 verbose #463 > > module SpiralCrypto = +00:00:22 verbose #464 > > let hash_text x = +00:00:22 verbose #465 > > #if !INTERACTIVE +00:00:22 verbose #466 > > Crypto.hash_text x +00:00:22 verbose #467 > > #else +00:00:22 verbose #468 > > hash_text x +00:00:22 verbose #469 > > #endif +00:00:22 verbose #470 > > +00:00:22 verbose #471 > > #if !FABLE_COMPILER && !WASM && !CONTRACT +00:00:22 verbose #472 > > +00:00:22 verbose #473 > > module SpiralAsync = +00:00:22 verbose #474 > > let merge_cancellation_token_with_default_async x = +00:00:22 verbose #475 > > #if !INTERACTIVE +00:00:22 verbose #476 > > Async_.merge_cancellation_token_with_default_async x +00:00:22 verbose #477 > > #else +00:00:22 verbose #478 > > merge_cancellation_token_with_default_async x +00:00:22 verbose #479 > > #endif +00:00:22 verbose #480 > > +00:00:22 verbose #481 > > module SpiralThreading = +00:00:22 verbose #482 > > let new_disposable_token x = +00:00:22 verbose #483 > > #if !INTERACTIVE +00:00:22 verbose #484 > > Threading.new_disposable_token x +00:00:22 verbose #485 > > #else +00:00:22 verbose #486 > > new_disposable_token x +00:00:22 verbose #487 > > #endif +00:00:22 verbose #488 > > +00:00:22 verbose #489 > > module SpiralNetworking = +00:00:22 verbose #490 > > let test_port_open x = +00:00:22 verbose #491 > > #if !INTERACTIVE +00:00:22 verbose #492 > > Networking.test_port_open x +00:00:22 verbose #493 > > #else +00:00:22 verbose #494 > > test_port_open x +00:00:22 verbose #495 > > #endif +00:00:22 verbose #496 > > +00:00:22 verbose #497 > > let test_port_open_timeout x = +00:00:22 verbose #498 > > #if !INTERACTIVE +00:00:22 verbose #499 > > Networking.test_port_open_timeout x +00:00:22 verbose #500 > > #else +00:00:22 verbose #501 > > test_port_open_timeout x +00:00:22 verbose #502 > > #endif +00:00:22 verbose #503 > > +00:00:22 verbose #504 > > let wait_for_port_access x = +00:00:22 verbose #505 > > #if !INTERACTIVE +00:00:22 verbose #506 > > Networking.wait_for_port_access x +00:00:22 verbose #507 > > #else +00:00:22 verbose #508 > > wait_for_port_access x +00:00:22 verbose #509 > > #endif +00:00:22 verbose #510 > > +00:00:22 verbose #511 > > let get_available_port x = +00:00:22 verbose #512 > > #if !INTERACTIVE +00:00:22 verbose #513 > > Networking.get_available_port x +00:00:22 verbose #514 > > #else +00:00:22 verbose #515 > > get_available_port x +00:00:22 verbose #516 > > #endif +00:00:22 verbose #517 > > +00:00:22 verbose #518 > > module SpiralRuntime = +00:00:22 verbose #519 > > let get_executable_suffix () = +00:00:22 verbose #520 > > #if !INTERACTIVE +00:00:22 verbose #521 > > Runtime.get_executable_suffix () +00:00:22 verbose #522 > > #else +00:00:22 verbose #523 > > get_executable_suffix () +00:00:22 verbose #524 > > #endif +00:00:22 verbose #525 > > +00:00:22 verbose #526 > > let is_windows () = +00:00:22 verbose #527 > > #if !INTERACTIVE +00:00:22 verbose #528 > > ... +00:00:22 verbose #529 > > +00:00:22 verbose #530 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #531 > > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" +00:00:22 verbose #532 > > +00:00:22 verbose #533 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #534 > > //// test +00:00:22 verbose #535 > > +00:00:22 verbose #536 > > type AssertExceptionFormatter (ex) = +00:00:22 verbose #537 > > member _.Text = +00:00:22 verbose #538 > > ex.ToString() +00:00:22 verbose #539 > > .Replace("32m", "<span style=\"color: green;\">") +00:00:22 verbose #540 > > .Replace("36m", "</span>") +00:00:22 verbose #541 > > .Replace("31m", "<span style=\"color: red;\">") +00:00:22 verbose #542 > > .Replace("\n", "<br/>\n") +00:00:22 verbose #543 > > +00:00:22 verbose #544 > > +00:00:22 verbose #545 > > Formatter.Register<AssertExceptionFormatter> ((fun (x : +00:00:22 verbose #546 > > AssertExceptionFormatter) -> x.Text), "text/html") +00:00:22 verbose #547 > > +00:00:22 verbose #548 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #549 > > //// test +00:00:22 verbose #550 > > +00:00:22 verbose #551 > > let inline __expect fn log expected actual = +00:00:22 verbose #552 > > if log then printfn $"{actual.ToDisplayString ()}" +00:00:22 verbose #553 > > try +00:00:22 verbose #554 > > "Testing.__expect" |> fn actual expected +00:00:22 verbose #555 > > with :? Expecto.AssertException as ex -> +00:00:22 verbose #556 > > AssertExceptionFormatter(ex).Display () |> ignore +00:00:22 verbose #557 > > failwith (ex.GetType().FullName) +00:00:22 verbose #558 > > +00:00:22 verbose #559 > > let inline __contains log expected actual = __expect Expecto.Expect.contains log +00:00:22 verbose #560 > > expected actual +00:00:22 verbose #561 > > let inline _contains expected actual = __contains true expected actual +00:00:22 verbose #562 > > +00:00:22 verbose #563 > > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log +00:00:22 verbose #564 > > expected actual +00:00:22 verbose #565 > > let inline _assertEqual expected actual = __assertEqual true expected actual +00:00:22 verbose #566 > > +00:00:22 verbose #567 > > let inline __isGreaterThan log expected actual = __expect +00:00:22 verbose #568 > > Expecto.Expect.isGreaterThan log expected actual +00:00:22 verbose #569 > > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual +00:00:22 verbose #570 > > +00:00:22 verbose #571 > > let inline __isGreaterThanOrEqual log expected actual = __expect +00:00:22 verbose #572 > > Expecto.Expect.isGreaterThanOrEqual log expected actual +00:00:22 verbose #573 > > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true +00:00:22 verbose #574 > > expected actual +00:00:22 verbose #575 > > +00:00:22 verbose #576 > > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan +00:00:22 verbose #577 > > log expected actual +00:00:22 verbose #578 > > let inline _isLessThan expected actual = __isLessThan true expected actual +00:00:22 verbose #579 > > +00:00:22 verbose #580 > > let inline __isLessThanOrEqual log expected actual = __expect +00:00:22 verbose #581 > > Expecto.Expect.isLessThanOrEqual log expected actual +00:00:22 verbose #582 > > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true +00:00:22 verbose #583 > > expected actual +00:00:22 verbose #584 > > +00:00:22 verbose #585 > > let inline __sequenceEqual log expected actual = __expe... +00:00:22 verbose #586 > > +00:00:22 verbose #587 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #588 > > //// test +00:00:22 verbose #589 > > +00:00:22 verbose #590 > > let inline __isBetween log a b actual = +00:00:22 verbose #591 > > let inline isBetween actual (a, b) _ = +00:00:22 verbose #592 > > __isGreaterThanOrEqual log a actual +00:00:22 verbose #593 > > __isLessThanOrEqual log b actual +00:00:22 verbose #594 > > __expect isBetween log (a, b) actual +00:00:22 verbose #595 > > let inline _isBetween a b actual = __isBetween true a b actual +00:00:22 verbose #596 > > +00:00:22 verbose #597 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:22 verbose #598 > > #!import ../../lib/fsharp/Common.fs +00:00:22 verbose #599 > > #!import ../../lib/fsharp/CommonFSharp.fs +00:00:22 verbose #600 > > #!import ../../lib/fsharp/Async.fs +00:00:22 verbose #601 > > #!import ../../lib/fsharp/AsyncSeq.fs +00:00:22 verbose #602 > > #!import ../../lib/fsharp/Runtime.fs +00:00:22 verbose #603 > > #!import ../../lib/fsharp/FileSystem.fs +00:00:22 verbose #604 > > +00:00:22 verbose #605 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #606 > > #if !INTERACTIVE +00:00:22 verbose #607 > > namespace Polyglot +00:00:22 verbose #608 > > #endif +00:00:22 verbose #609 > > +00:00:22 verbose #610 > > module Common = +00:00:22 verbose #611 > > +00:00:22 verbose #612 > > #if !INTERACTIVE +00:00:22 verbose #613 > > open Lib +00:00:22 verbose #614 > > #endif +00:00:22 verbose #615 > > +00:00:22 verbose #616 > > let nl = System.Environment.NewLine +00:00:22 verbose #617 > > let q = @"""" +00:00:22 verbose #618 > > +00:00:22 verbose #619 > > let inline cons head tail = head :: tail +00:00:22 verbose #620 > > +00:00:22 verbose #621 > > /// ## memoize +00:00:22 verbose #622 > > let inline memoize fn = +00:00:22 verbose #623 > > let result = lazy fn () +00:00:22 verbose #624 > > fun () -> result.Value +00:00:22 verbose #625 > > +00:00:22 verbose #626 > > /// ## TraceLevel +00:00:22 verbose #627 > > type TraceLevel = +00:00:22 verbose #628 > > | Verbose +00:00:22 verbose #629 > > | Debug +00:00:22 verbose #630 > > | Info +00:00:22 verbose #631 > > | Warning +00:00:22 verbose #632 > > | Critical +00:00:22 verbose #633 > > +00:00:22 verbose #634 > > let inline _locals () = "" +00:00:22 verbose #635 > > +00:00:22 verbose #636 > > /// ## trace +00:00:22 verbose #637 > > let to_trace_level = function +00:00:22 verbose #638 > > | Verbose -> SpiralTrace.TraceLevel.US0_0 +00:00:22 verbose #639 > > | Debug -> SpiralTrace.TraceLevel.US0_1 +00:00:22 verbose #640 > > | Info -> SpiralTrace.TraceLevel.US0_2 +00:00:22 verbose #641 > > | Warning -> SpiralTrace.TraceLevel.US0_3 +00:00:22 verbose #642 > > | Critical -> SpiralTrace.TraceLevel.US0_4 +00:00:22 verbose #643 > > +00:00:22 verbose #644 > > let trace level fn locals = +00:00:22 verbose #645 > > let level = level |> to_trace_level +00:00:22 verbose #646 > > SpiralTrace.trace level fn locals +00:00:22 verbose #647 > > +00:00:22 verbose #648 > > +00:00:22 verbose #649 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:22 verbose #650 > > #if !INTERACTIVE +00:00:22 verbose #651 > > namespace Polyglot +00:00:22 verbose #652 > > #endif +00:00:22 verbose #653 > > +00:00:22 verbose #654 > > module CommonFSharp = +00:00:22 verbose #655 > > +00:00:22 verbose #656 > > open Common +00:00:22 verbose #657 > > +00:00:22 verbose #658 > > /// ## getUnionCaseName +00:00:22 verbose #659 > > let inline getUnionCaseName<'T> (x: 'T) = +00:00:22 verbose #660 > > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with +00:00:22 verbose #661 > > | case, _ -> case.Name +00:00:22 verbose #662 > > +00:00:23 verbose #663 > > +00:00:23 verbose #664 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:23 verbose #665 > > #if !INTERACTIVE +00:00:23 verbose #666 > > namespace Polyglot +00:00:23 verbose #667 > > #endif +00:00:23 verbose #668 > > +00:00:23 verbose #669 > > module Async = +00:00:23 verbose #670 > > +00:00:23 verbose #671 > > #if !INTERACTIVE +00:00:23 verbose #672 > > open Lib +00:00:23 verbose #673 > > #endif +00:00:23 verbose #674 > > +00:00:23 verbose #675 > > open Common +00:00:23 verbose #676 > > +00:00:23 verbose #677 > > /// ## choice +00:00:23 verbose #678 > > let inline choice asyncs = async { +00:00:23 verbose #679 > > let e = Event<_> () +00:00:23 verbose #680 > > use cts = new System.Threading.CancellationTokenSource () +00:00:23 verbose #681 > > let fn = +00:00:23 verbose #682 > > asyncs +00:00:23 verbose #683 > > |> Seq.map (fun a -> async { +00:00:23 verbose #684 > > let! x = a +00:00:23 verbose #685 > > e.Trigger x +00:00:23 verbose #686 > > }) +00:00:23 verbose #687 > > |> Async.Parallel +00:00:23 verbose #688 > > |> Async.Ignore +00:00:23 verbose #689 > > Async.Start (fn, cts.Token) +00:00:23 verbose #690 > > let! result = Async.AwaitEvent e.Publish +00:00:23 verbose #691 > > cts.Cancel () +00:00:23 verbose #692 > > return result +00:00:23 verbose #693 > > } +00:00:23 verbose #694 > > +00:00:23 verbose #695 > > /// ## map +00:00:23 verbose #696 > > let inline map fn a = async { +00:00:23 verbose #697 > > let! x = a +00:00:23 verbose #698 > > return fn x +00:00:23 verbose #699 > > } +00:00:23 verbose #700 > > +00:00:23 verbose #701 > > /// ## catch +00:00:23 verbose #702 > > let inline catch a = +00:00:23 verbose #703 > > a +00:00:23 verbose #704 > > |> Async.Catch +00:00:23 verbose #705 > > |> map (function +00:00:23 verbose #706 > > | Choice1Of2 result -> Ok result +00:00:23 verbose #707 > > | Choice2Of2 ex -> Error ex +00:00:23 verbose #708 > > ) +00:00:23 verbose #709 > > +00:00:23 verbose #710 > > /// ## runWithTimeoutChoiceAsync +00:00:23 verbose #711 > > let inline runWithTimeoutChoiceAsync (timeout : int) fn = +00:00:23 verbose #712 > > let _locals () = $"timeout: {timeout} / {_locals ()}" +00:00:23 verbose #713 > > +00:00:23 verbose #714 > > let timeoutTask = async { +00:00:23 verbose #715 > > do! Async.Sleep timeout +00:00:23 verbose #716 > > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals +00:00:23 verbose #717 > > return None +00:00:23 verbose #718 > > } +00:00:23 verbose #719 > > +00:00:23 verbose #720 > > let task = async { +00:00:23 verbose #721 > > try +00:00:23 verbose #722 > > let! result = fn +00:00:23 verbose #723 > > return Some result +00:00:23 verbose #724 > > with +00:00:23 verbose #725 > > | :? System.AggregateException as ex when +00:00:23 verbose #726 > > ex.InnerExceptions +00:00:23 verbose #727 > > |> Seq.exists (function :? Sys... +00:00:23 verbose #728 > > +00:00:23 verbose #729 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:23 verbose #730 > > #if !INTERACTIVE +00:00:23 verbose #731 > > namespace Polyglot +00:00:23 verbose #732 > > #endif +00:00:23 verbose #733 > > +00:00:23 verbose #734 > > module AsyncSeq = +00:00:23 verbose #735 > > +00:00:23 verbose #736 > > #if !INTERACTIVE +00:00:23 verbose #737 > > open Lib +00:00:23 verbose #738 > > #endif +00:00:23 verbose #739 > > +00:00:23 verbose #740 > > open Common +00:00:23 verbose #741 > > +00:00:23 verbose #742 > > /// ## subscribeEvent +00:00:23 verbose #743 > > let inline subscribeEvent (event: IEvent<'H, 'A>) map = +00:00:23 verbose #744 > > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, +00:00:23 verbose #745 > > 'A>(event.AddHandler, event.RemoveHandler) +00:00:23 verbose #746 > > System.Reactive.Linq.Observable.Select (observable, fun event -> map +00:00:23 verbose #747 > > event.EventArgs) +00:00:23 verbose #748 > > |> FSharp.Control.AsyncSeq.ofObservableBuffered +00:00:23 verbose #749 > > +00:00:23 verbose #750 > > /// ## subscribeToken +00:00:23 verbose #751 > > let subscribeToken (token : System.Threading.CancellationToken) = +00:00:23 verbose #752 > > let tcs = new System.Threading.Tasks.TaskCompletionSource () +00:00:23 verbose #753 > > System.Action tcs.SetResult |> token.Register |> ignore +00:00:23 verbose #754 > > let start = System.DateTime.Now.Ticks +00:00:23 verbose #755 > > FSharp.Control.AsyncSeq.unfoldAsync +00:00:23 verbose #756 > > (fun () -> async { +00:00:23 verbose #757 > > do! tcs.Task |> Async.AwaitTask +00:00:23 verbose #758 > > return Some (System.DateTime.Now.Ticks - start, ()) +00:00:23 verbose #759 > > }) +00:00:23 verbose #760 > > () +00:00:23 verbose #761 > > +00:00:24 verbose #762 > > +00:00:24 verbose #763 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:24 verbose #764 > > #if !INTERACTIVE +00:00:24 verbose #765 > > namespace Polyglot +00:00:24 verbose #766 > > #endif +00:00:24 verbose #767 > > +00:00:24 verbose #768 > > module Runtime = +00:00:24 verbose #769 > > +00:00:24 verbose #770 > > #if !INTERACTIVE +00:00:24 verbose #771 > > open Lib +00:00:24 verbose #772 > > #endif +00:00:24 verbose #773 > > +00:00:24 verbose #774 > > open Common +00:00:24 verbose #775 > > +00:00:24 verbose #776 > > /// ## parseArgs +00:00:24 verbose #777 > > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = +00:00:24 verbose #778 > > let assemblyName = +00:00:24 verbose #779 > > System.Reflection.Assembly.GetEntryAssembly().GetName().Name +00:00:24 verbose #780 > > let errorHandler : Argu.IExiter = +00:00:24 verbose #781 > > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> +00:00:24 verbose #782 > > List.contains assemblyName +00:00:24 verbose #783 > > then Argu.ExceptionExiter () +00:00:24 verbose #784 > > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | +00:00:24 verbose #785 > > _ -> Some System.ConsoleColor.Red) +00:00:24 verbose #786 > > +00:00:24 verbose #787 > > let parser = +00:00:24 verbose #788 > > Argu.ArgumentParser.Create<'T> ( +00:00:24 verbose #789 > > programName = +00:00:24 verbose #790 > > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", +00:00:24 verbose #791 > > errorHandler = errorHandler +00:00:24 verbose #792 > > ) +00:00:24 verbose #793 > > +00:00:24 verbose #794 > > parser.ParseCommandLine args +00:00:24 verbose #795 > > +00:00:24 verbose #796 > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = +00:00:24 verbose #797 > > args +00:00:24 verbose #798 > > |> parseArgs<'T> +00:00:24 verbose #799 > > |> fun results -> results.GetAllResults () +00:00:24 verbose #800 > > +00:00:24 verbose #801 > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = +00:00:24 verbose #802 > > args +00:00:24 verbose #803 > > |> parseAllArgs<'T> +00:00:24 verbose #804 > > |> List.groupBy CommonFSharp.getUnionCaseName<'T> +00:00:24 verbose #805 > > |> Map.ofList +00:00:24 verbose #806 > > +00:00:24 verbose #807 > > +00:00:24 verbose #808 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:00:24 verbose #809 > > #if !INTERACTIVE +00:00:24 verbose #810 > > namespace Polyglot +00:00:24 verbose #811 > > #endif +00:00:24 verbose #812 > > +00:00:24 verbose #813 > > module FileSystem = +00:00:24 verbose #814 > > +00:00:24 verbose #815 > > #if !INTERACTIVE +00:00:24 verbose #816 > > open Lib +00:00:24 verbose #817 > > #endif +00:00:24 verbose #818 > > +00:00:24 verbose #819 > > open Common +00:00:24 verbose #820 > > open SpiralFileSystem.Operators +00:00:24 verbose #821 > > +00:00:24 verbose #822 > > /// ## watchDirectory +00:00:24 verbose #823 > > [[<RequireQualifiedAccess>]] +00:00:24 verbose #824 > > type FileSystemChangeType = +00:00:24 verbose #825 > > | Failure +00:00:24 verbose #826 > > | Changed +00:00:24 verbose #827 > > | Created +00:00:24 verbose #828 > > | Deleted +00:00:24 verbose #829 > > | Renamed +00:00:24 verbose #830 > > +00:00:24 verbose #831 > > [[<RequireQualifiedAccess>]] +00:00:24 verbose #832 > > type FileSystemChange = +00:00:24 verbose #833 > > | Failure of exn: exn +00:00:24 verbose #834 > > | Changed of path: string * content: string option +00:00:24 verbose #835 > > | Created of path: string * content: string option +00:00:24 verbose #836 > > | Deleted of path: string +00:00:24 verbose #837 > > | Renamed of oldPath: string * (string * string option) +00:00:24 verbose #838 > > +00:00:24 verbose #839 > > +00:00:24 verbose #840 > > let inline watchDirectoryWithFilter filter shouldReadContent path = +00:00:24 verbose #841 > > let fullPath = path |> System.IO.Path.GetFullPath +00:00:24 verbose #842 > > let _locals () = $"filter: {filter} / {_locals ()}" +00:00:24 verbose #843 > > +00:00:24 verbose #844 > > let watcher = +00:00:24 verbose #845 > > new System.IO.FileSystemWatcher ( +00:00:24 verbose #846 > > Path = fullPath, +00:00:24 verbose #847 > > NotifyFilter = filter, +00:00:24 verbose #848 > > EnableRaisingEvents = true, +00:00:24 verbose #849 > > IncludeSubdirectories = true +00:00:24 verbose #850 > > ) +00:00:24 verbose #851 > > +00:00:24 verbose #852 > > let inline getEventPath (path : string) = +00:00:24 verbose #853 > > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> +00:00:24 verbose #854 > > SpiralSm.trim_start [[| '/'; '\\' |]] +00:00:24 verbose #855 > > +00:00:24 verbose #856 > > let inline ticks () = +00:00:24 verbose #857 > > System.DateTime.UtcNow.Ticks +00:00:24 verbose #858 > > +00:00:24 verbose #859 > > let changedStream = +00:00:24 verbose #860 > > AsyncSeq.subscribeEvent +00:00:24 verbose #861 > > watcher.Changed +00:00:24 verbose #862 > > (fun event -> +00:00:24 verbose #863 > > ticks (), +00:00:24 verbose #864 > > [[ FileSystemChange... +00:00:24 verbose #865 > > +00:00:24 verbose #866 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:24 verbose #867 > > #if !INTERACTIVE +00:00:24 verbose #868 > > open Lib +00:00:24 verbose #869 > > #endif +00:00:24 verbose #870 > > +00:00:24 verbose #871 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:24 verbose #872 > > open SpiralFileSystem.Operators +00:00:24 verbose #873 > > open Falco.Markup +00:00:24 verbose #874 > > +00:00:24 verbose #875 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:24 verbose #876 > > type FileSystemNode = +00:00:24 verbose #877 > > | File of string * string * int64 +00:00:24 verbose #878 > > | Folder of string * string * FileSystemNode list +00:00:24 verbose #879 > > | Root of FileSystemNode list +00:00:24 verbose #880 > > +00:00:24 verbose #881 > > let rec scanDirectory isRoot (basePath : string) (path : string) = +00:00:24 verbose #882 > > let relativePath = +00:00:24 verbose #883 > > path +00:00:24 verbose #884 > > |> SpiralSm.replace basePath "" +00:00:24 verbose #885 > > |> SpiralSm.replace "\\" "/" +00:00:24 verbose #886 > > |> SpiralSm.replace "//" "/" +00:00:24 verbose #887 > > |> SpiralSm.trim_start [[| '/' |]] +00:00:24 verbose #888 > > +00:00:24 verbose #889 > > let directories = +00:00:24 verbose #890 > > path +00:00:24 verbose #891 > > |> System.IO.Directory.GetDirectories +00:00:24 verbose #892 > > |> Array.toList +00:00:24 verbose #893 > > |> List.sort +00:00:24 verbose #894 > > |> List.map (scanDirectory false basePath) +00:00:24 verbose #895 > > let files = +00:00:24 verbose #896 > > path +00:00:24 verbose #897 > > |> System.IO.Directory.GetFiles +00:00:24 verbose #898 > > |> Array.toList +00:00:24 verbose #899 > > |> List.sort +00:00:24 verbose #900 > > |> List.map (fun f -> File (System.IO.Path.GetFileName f, relativePath, +00:00:24 verbose #901 > > System.IO.FileInfo(f).Length)) +00:00:24 verbose #902 > > +00:00:24 verbose #903 > > let children = directories @ files +00:00:24 verbose #904 > > if isRoot +00:00:24 verbose #905 > > then Root children +00:00:24 verbose #906 > > else Folder (path |> System.IO.Path.GetFileName, relativePath, children) +00:00:24 verbose #907 > > +00:00:24 verbose #908 > > let rec generateHtml fsNode = +00:00:24 verbose #909 > > let sizeLabel size = +00:00:24 verbose #910 > > match float size with +00:00:24 verbose #911 > > | size when size > 1024.0 * 1024.0 -> $"%.2f{size / 1024.0 / 1024.0} MB" +00:00:24 verbose #912 > > | size when size > 1024.0 -> $"%.2f{size / 1024.0} KB" +00:00:24 verbose #913 > > | size -> $"%.2f{size} B" +00:00:24 verbose #914 > > match fsNode with +00:00:24 verbose #915 > > | File (fileName, relativePath, size) -> +00:00:24 verbose #916 > > Elem.div [[]] [[ +00:00:24 verbose #917 > > Text.raw "&#128196; " +00:00:24 verbose #918 > > Elem.a [[ +00:00:24 verbose #919 > > Attr.href $"""{relativePath}{if relativePath = "" then "" else +00:00:24 verbose #920 > > "/"}{fileName}""" +00:00:24 verbose #921 > > ]] [[ +00:00:24 verbose #922 > > Text.raw fileName +00:00:24 verbose #923 > > ]] +00:00:24 verbose #924 > > Elem.span [[]] [[ +00:00:24 verbose #925 > > Text.raw $" ({size |> sizeLabel})" +00:00:24 verbose #926 > > ]] +00:00:24 verbose #927 > > ]] +00:00:24 verbose #928 > > | Folder (folderName, relativePath, children) -> +00:00:24 verbose #929 > > let size = +00:00:24 verbose #930 > > let rec loop children = +00:00:24 verbose #931 > > children +00:00:24 verbose #932 > > |> List.sumBy (function +00:00:24 verbose #933 > > | File (_, _, size) -> size +00:00:24 verbose #934 > > | Folder (_, _, children) +00:00:24 verbose #935 > > | Root children -> loop children +00:00:24 verbose #936 > > ) +00:00:24 verbose #937 > > loop children +00:00:24 verbose #938 > > Elem.details [[ +00:00:24 verbose #939 > > Attr.open' "true" +00:00:24 verbose #940 > > ]] [[ +00:00:24 verbose #941 > > Elem.summary [[]] [[ +00:00:24 verbose #942 > > Text.raw "&#128194; " +00:00:24 verbose #943 > > Elem.a [[ +00:00:24 verbose #944 > > Attr.href relativePath +00:00:24 verbose #945 > > ]] [[ +00:00:24 verbose #946 > > Text.raw folderName +00:00:24 verbose #947 > > ]] +00:00:24 verbose #948 > > Elem.span [[]] [[ +00:00:24 verbose #949 > > Text.raw $" ({size |> sizeLabel})" +00:00:24 verbose #950 > > ]] +00:00:24 verbose #951 > > ]] +00:00:24 verbose #952 > > Elem.div [[]] [[ +00:00:24 verbose #953 > > yield! children |> List.map generateHtml +00:00:24 verbose #954 > > ]] +00:00:24 verbose #955 > > ]] +00:00:24 verbose #956 > > | Root children -> +00:00:24 verbose #957 > > Elem.div [[]] [[ +00:00:24 verbose #958 > > yield! children |> List.map generateHtml +00:00:24 verbose #959 > > ]] +00:00:24 verbose #960 > > +00:00:24 verbose #961 > > let generateHtmlForFileSystem root = +00:00:24 verbose #962 > > $"""<!DOCTYPE html> +00:00:24 verbose #963 > > <html lang="en"> +00:00:24 verbose #964 > > <head> +00:00:24 verbose #965 > > <meta charset="UTF-8"> +00:00:24 verbose #966 > > <style> +00:00:24 verbose #967 > > body {{ +00:00:24 verbose #968 > > background-color: #222; +00:00:24 verbose #969 > > color: #ccc; +00:00:24 verbose #970 > > }} +00:00:24 verbose #971 > > a {{ +00:00:24 verbose #972 > > color: #777; +00:00:24 verbose #973 > > font-size: 15px; +00:00:24 verbose #974 > > }} +00:00:24 verbose #975 > > span {{ +00:00:24 verbose #976 > > font-size: 11px; +00:00:24 verbose #977 > > }} +00:00:24 verbose #978 > > div > div {{ +00:00:24 verbose #979 > > padding-left: 10px; +00:00:24 verbose #980 > > }} +00:00:24 verbose #981 > > details > div {{ +00:00:24 verbose #982 > > padding-left: 19px; +00:00:24 verbose #983 > > }} +00:00:24 verbose #984 > > </style> +00:00:24 verbose #985 > > </head> +00:00:24 verbose #986 > > <body> +00:00:24 verbose #987 > > {root |> generateHtml |> renderNode} +00:00:24 verbose #988 > > </body> +00:00:24 verbose #989 > > </html> +00:00:24 verbose #990 > > """ +00:00:25 verbose #991 > > +00:00:25 verbose #992 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #993 > > //// test +00:00:25 verbose #994 > > +00:00:25 verbose #995 > > let struct (tempFolder, disposable) = SpiralFileSystem.create_temp_directory () +00:00:25 verbose #996 > > let rec loop d n = async { +00:00:25 verbose #997 > > if n >= 0 then +00:00:25 verbose #998 > > tempFolder </> d |> System.IO.Directory.CreateDirectory |> ignore +00:00:25 verbose #999 > > do! +00:00:25 verbose #1000 > > n +00:00:25 verbose #1001 > > |> string +00:00:25 verbose #1002 > > |> String.replicate (n + 1) +00:00:25 verbose #1003 > > |> SpiralFileSystem.write_all_text_async (tempFolder </> d </> +00:00:25 verbose #1004 > > $"file.txt") +00:00:25 verbose #1005 > > do! loop $"{d}/{n}" (n - 1) +00:00:25 verbose #1006 > > } +00:00:25 verbose #1007 > > loop "_.root" 3 +00:00:25 verbose #1008 > > |> Async.RunSynchronously +00:00:25 verbose #1009 > > +00:00:25 verbose #1010 > > let html = +00:00:25 verbose #1011 > > scanDirectory true tempFolder tempFolder +00:00:25 verbose #1012 > > |> generateHtmlForFileSystem +00:00:25 verbose #1013 > > +00:00:25 verbose #1014 > > html +00:00:25 verbose #1015 > > |> _assertEqual """<!DOCTYPE html> +00:00:25 verbose #1016 > > <html lang="en"> +00:00:25 verbose #1017 > > <head> +00:00:25 verbose #1018 > > <meta charset="UTF-8"> +00:00:25 verbose #1019 > > <style> +00:00:25 verbose #1020 > > body { +00:00:25 verbose #1021 > > background-color: #222; +00:00:25 verbose #1022 > > color: #ccc; +00:00:25 verbose #1023 > > } +00:00:25 verbose #1024 > > a { +00:00:25 verbose #1025 > > color: #777; +00:00:25 verbose #1026 > > font-size: 15px; +00:00:25 verbose #1027 > > } +00:00:25 verbose #1028 > > span { +00:00:25 verbose #1029 > > font-size: 11px; +00:00:25 verbose #1030 > > } +00:00:25 verbose #1031 > > div > div { +00:00:25 verbose #1032 > > padding-left: 10px; +00:00:25 verbose #1033 > > } +00:00:25 verbose #1034 > > details > div { +00:00:25 verbose #1035 > > padding-left: 19px; +00:00:25 verbose #1036 > > } +00:00:25 verbose #1037 > > </style> +00:00:25 verbose #1038 > > </head> +00:00:25 verbose #1039 > > <body> +00:00:25 verbose #1040 > > <div><details open="true"><summary>&#128194; <a href="_.root">_.root</a><span> +00:00:25 verbose #1041 > > (10.00 B)</span></summary><div><details open="true"><summary>&#128194; <a +00:00:25 verbose #1042 > > href="_.root/3">3</a><span> (6.00 B)</span></summary><div><details +00:00:25 verbose #1043 > > open="true"><summary>&#128194; <a href="_.root/3/2">2</a><span> (3.00 +00:00:25 verbose #1044 > > B)</span></summary><div><details open="true"><summary>&#128194; <a +00:00:25 verbose #1045 > > href="_.root/3/2/1">1</a><span> (1.00 B)</span></summary><div><div>&#128196; <a +00:00:25 verbose #1046 > > href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 +00:00:25 verbose #1047 > > B)</span></div></div></details><div>&#128196; <a +00:00:25 verbose #1048 > > href="_.root/3/2/file.txt">file.txt</a><span> (2.00 +00:00:25 verbose #1049 > > B)</span></div></div></details><div>&#128196; <a +00:00:25 verbose #1050 > > href="_.root/3/file.txt">file.txt</a><span> (3.00 +00:00:25 verbose #1051 > > B)</span></div></div></details><div>&#128196; <a +00:00:25 verbose #1052 > > href="_.root/file.txt">file.txt</a><span> (4.00 +00:00:25 verbose #1053 > > B)</span></div></div></details></div> +00:00:25 verbose #1054 > > </body> +00:00:25 verbose #1055 > > </html> +00:00:25 verbose #1056 > > """ +00:00:25 verbose #1057 > > +00:00:25 verbose #1058 > > disposable.Dispose () +00:00:25 verbose #1059 > > +00:00:25 verbose #1060 > > html |> Microsoft.DotNet.Interactive.Formatting.Html.ToHtmlContent +00:00:25 verbose #1061 > > +00:00:25 verbose #1062 > > ╭─[ 196.38ms - return value ]──────────────────────────────────────────────────╮ +00:00:25 verbose #1063 > > │ <!DOCTYPE html> │ +00:00:25 verbose #1064 > > │ <html lang="en"> │ +00:00:25 verbose #1065 > > │ <head> │ +00:00:25 verbose #1066 > > │ <meta charset="UTF-8"> │ +00:00:25 verbose #1067 > > │ <style> │ +00:00:25 verbose #1068 > > │ body { │ +00:00:25 verbose #1069 > > │ background-color: #222; │ +00:00:25 verbose #1070 > > │ color: #ccc; │ +00:00:25 verbose #1071 > > │ } │ +00:00:25 verbose #1072 > > │ a { │ +00:00:25 verbose #1073 > > │ color: #777; │ +00:00:25 verbose #1074 > > │ font-size: 15px; │ +00:00:25 verbose #1075 > > │ } │ +00:00:25 verbose #1076 > > │ span { │ +00:00:25 verbose #1077 > > │ font-size: 11px; │ +00:00:25 verbose #1078 > > │ } │ +00:00:25 verbose #1079 > > │ div > div { │ +00:00:25 verbose #1080 > > │ padding-left: 10px; │ +00:00:25 verbose #1081 > > │ } │ +00:00:25 verbose #1082 > > │ details > div { │ +00:00:25 verbose #1083 > > │ padding-left: 19px; │ +00:00:25 verbose #1084 > > │ } │ +00:00:25 verbose #1085 > > │ </style> │ +00:00:25 verbose #1086 > > │ </head> │ +00:00:25 verbose #1087 > > │ <body> │ +00:00:25 verbose #1088 > > │ <div><details open="true"><summary>&#128194; <a │ +00:00:25 verbose #1089 > > │ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │ +00:00:25 verbose #1090 > > │ open="true"><summary>&#128194; <a href="_.root/3">3</a><span> (6.00 │ +00:00:25 verbose #1091 > > │ B)</span></summary><div><details open="true"><summary>&#128194; <a │ +00:00:25 verbose #1092 > > │ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │ +00:00:25 verbose #1093 > > │ open="true"><summary>&#128194; <a href="_.root/3/2/1">1</a><span> (1.00 │ +00:00:25 verbose #1094 > > │ B)</span></summary><div><div>&#128196; <a │ +00:00:25 verbose #1095 > > │ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │ +00:00:25 verbose #1096 > > │ B)</span></div></div></details><div>&#128196; <a │ +00:00:25 verbose #1097 > > │ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │ +00:00:25 verbose #1098 > > │ B)</span></div></div></details><div>&#128196; <a │ +00:00:25 verbose #1099 > > │ href="_.root/3/file.txt">file.txt</a><span> (3.00 │ +00:00:25 verbose #1100 > > │ B)</span></div></div></details><div>&#128196; <a │ +00:00:25 verbose #1101 > > │ href="_.root/file.txt">file.txt</a><span> (4.00 │ +00:00:25 verbose #1102 > > │ B)</span></div></div></details></div> │ +00:00:25 verbose #1103 > > │ </body> │ +00:00:25 verbose #1104 > > │ </html> │ +00:00:25 verbose #1105 > > │ │ +00:00:25 verbose #1106 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #1107 > > +00:00:25 verbose #1108 > > ╭─[ 202.47ms - stdout ]────────────────────────────────────────────────────────╮ +00:00:25 verbose #1109 > > │ "<!DOCTYPE html> │ +00:00:25 verbose #1110 > > │ <html lang="en"> │ +00:00:25 verbose #1111 > > │ <head> │ +00:00:25 verbose #1112 > > │ <meta charset="UTF-8"> │ +00:00:25 verbose #1113 > > │ <style> │ +00:00:25 verbose #1114 > > │ body { │ +00:00:25 verbose #1115 > > │ background-color: #222; │ +00:00:25 verbose #1116 > > │ color: #ccc; │ +00:00:25 verbose #1117 > > │ } │ +00:00:25 verbose #1118 > > │ a { │ +00:00:25 verbose #1119 > > │ color: #777; │ +00:00:25 verbose #1120 > > │ font-size: 15px; │ +00:00:25 verbose #1121 > > │ } │ +00:00:25 verbose #1122 > > │ span { │ +00:00:25 verbose #1123 > > │ font-size: 11px; │ +00:00:25 verbose #1124 > > │ } │ +00:00:25 verbose #1125 > > │ div > div { │ +00:00:25 verbose #1126 > > │ padding-left: 10px; │ +00:00:25 verbose #1127 > > │ } │ +00:00:25 verbose #1128 > > │ details > div { │ +00:00:25 verbose #1129 > > │ padding-left: 19px; │ +00:00:25 verbose #1130 > > │ } │ +00:00:25 verbose #1131 > > │ </style> │ +00:00:25 verbose #1132 > > │ </head> │ +00:00:25 verbose #1133 > > │ <body> │ +00:00:25 verbose #1134 > > │ <div><details open="true"><summary>&#128194; <a │ +00:00:25 verbose #1135 > > │ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │ +00:00:25 verbose #1136 > > │ open="true"><summary>&#128194; <a href="_.root/3">3</a><span> (6.00 │ +00:00:25 verbose #1137 > > │ B)</span></summary><div><details open="true"><summary>&#128194; <a │ +00:00:25 verbose #1138 > > │ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │ +00:00:25 verbose #1139 > > │ open="true"><summary>&#128194; <a href="_.root/3/2/1">1</a><span> (1.00 │ +00:00:25 verbose #1140 > > │ B)</span></summary><div><div>&#128196; <a │ +00:00:25 verbose #1141 > > │ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │ +00:00:25 verbose #1142 > > │ B)</span></div></div></details><div>&#128196; <a │ +00:00:25 verbose #1143 > > │ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │ +00:00:25 verbose #1144 > > │ B)</span></div></div></details><div>&#128196; <a │ +00:00:25 verbose #1145 > > │ href="_.root/3/file.txt">file.txt</a><span> (3.00 │ +00:00:25 verbose #1146 > > │ B)</span></div></div></details><div>&#128196; <a │ +00:00:25 verbose #1147 > > │ href="_.root/file.txt">file.txt</a><span> (4.00 │ +00:00:25 verbose #1148 > > │ B)</span></div></div></details></div> │ +00:00:25 verbose #1149 > > │ </body> │ +00:00:25 verbose #1150 > > │ </html> │ +00:00:25 verbose #1151 > > │ " │ +00:00:25 verbose #1152 > > │ │ +00:00:25 verbose #1153 > > │ │ +00:00:25 verbose #1154 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #1155 > > +00:00:25 verbose #1156 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:25 verbose #1157 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:25 verbose #1158 > > │ ## Arguments │ +00:00:25 verbose #1159 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #1160 > > +00:00:25 verbose #1161 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #1162 > > [[<RequireQualifiedAccess>]] +00:00:25 verbose #1163 > > type Arguments = +00:00:25 verbose #1164 > > | [[<Argu.ArguAttributes.ExactlyOnce>]] Dir of string +00:00:25 verbose #1165 > > | [[<Argu.ArguAttributes.ExactlyOnce>]] Html of string +00:00:25 verbose #1166 > > +00:00:25 verbose #1167 > > interface Argu.IArgParserTemplate with +00:00:25 verbose #1168 > > member s.Usage = +00:00:25 verbose #1169 > > match s with +00:00:25 verbose #1170 > > | Dir _ -> nameof Dir +00:00:25 verbose #1171 > > | Html _ -> nameof Html +00:00:25 verbose #1172 > > +00:00:25 verbose #1173 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #1174 > > //// test +00:00:25 verbose #1175 > > +00:00:25 verbose #1176 > > Argu.ArgumentParser.Create<Arguments>().PrintUsage () +00:00:25 verbose #1177 > > +00:00:25 verbose #1178 > > ╭─[ 109.69ms - return value ]──────────────────────────────────────────────────╮ +00:00:25 verbose #1179 > > │ "USAGE: dotnet-repl [--help] --dir <string> --html <string> │ +00:00:25 verbose #1180 > > │ │ +00:00:25 verbose #1181 > > │ OPTIONS: │ +00:00:25 verbose #1182 > > │ │ +00:00:25 verbose #1183 > > │ --dir <string> Dir │ +00:00:25 verbose #1184 > > │ --html <string> Html │ +00:00:25 verbose #1185 > > │ --help display this list of options. │ +00:00:25 verbose #1186 > > │ " │ +00:00:25 verbose #1187 > > │ │ +00:00:25 verbose #1188 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #1189 > > +00:00:25 verbose #1190 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:25 verbose #1191 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:25 verbose #1192 > > │ ## main │ +00:00:25 verbose #1193 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #1194 > > +00:00:25 verbose #1195 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #1196 > > let main args = +00:00:25 verbose #1197 > > let argsMap = args |> Runtime.parseArgsMap<Arguments> +00:00:25 verbose #1198 > > +00:00:25 verbose #1199 > > let dir = +00:00:25 verbose #1200 > > match argsMap.[[nameof Arguments.Dir]] with +00:00:25 verbose #1201 > > | [[ Arguments.Dir dir ]] -> Some dir +00:00:25 verbose #1202 > > | _ -> None +00:00:25 verbose #1203 > > |> Option.get +00:00:25 verbose #1204 > > +00:00:25 verbose #1205 > > let htmlPath = +00:00:25 verbose #1206 > > match argsMap.[[nameof Arguments.Html]] with +00:00:25 verbose #1207 > > | [[ Arguments.Html html ]] -> Some html +00:00:25 verbose #1208 > > | _ -> None +00:00:25 verbose #1209 > > |> Option.get +00:00:25 verbose #1210 > > +00:00:25 verbose #1211 > > let fileSystem = scanDirectory true dir dir +00:00:25 verbose #1212 > > let html = generateHtmlForFileSystem fileSystem +00:00:25 verbose #1213 > > +00:00:25 verbose #1214 > > html |> SpiralFileSystem.write_all_text_async htmlPath +00:00:25 verbose #1215 > > |> Async.runWithTimeout 30000 +00:00:25 verbose #1216 > > |> function +00:00:25 verbose #1217 > > | Some () -> 0 +00:00:25 verbose #1218 > > | None -> 1 +00:00:25 verbose #1219 > > +00:00:25 verbose #1220 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:00:25 verbose #1221 > > //// test +00:00:25 verbose #1222 > > +00:00:25 verbose #1223 > > let args = +00:00:25 verbose #1224 > > System.Environment.GetEnvironmentVariable "ARGS" +00:00:25 verbose #1225 > > |> SpiralRuntime.split_args +00:00:25 verbose #1226 > > |> Seq.toArray +00:00:25 verbose #1227 > > +00:00:25 verbose #1228 > > match args with +00:00:25 verbose #1229 > > | [[||]] -> 0 +00:00:25 verbose #1230 > > | args -> if main args = 0 then 0 else failwith "main failed" +00:00:25 verbose #1231 > > +00:00:25 verbose #1232 > > ╭─[ 131.97ms - return value ]──────────────────────────────────────────────────╮ +00:00:25 verbose #1233 > > │ <div class="dni-plaintext"><pre>0 │ +00:00:25 verbose #1234 > > │ </pre></div><style> │ +00:00:25 verbose #1235 > > │ .dni-code-hint { │ +00:00:25 verbose #1236 > > │ font-style: italic; │ +00:00:25 verbose #1237 > > │ overflow: hidden; │ +00:00:25 verbose #1238 > > │ white-space: nowrap; │ +00:00:25 verbose #1239 > > │ } │ +00:00:25 verbose #1240 > > │ .dni-treeview { │ +00:00:25 verbose #1241 > > │ white-space: nowrap; │ +00:00:25 verbose #1242 > > │ } │ +00:00:25 verbose #1243 > > │ .dni-treeview td { │ +00:00:25 verbose #1244 > > │ vertical-align: top; │ +00:00:25 verbose #1245 > > │ text-align: start; │ +00:00:25 verbose #1246 > > │ } │ +00:00:25 verbose #1247 > > │ details.dni-treeview { │ +00:00:25 verbose #1248 > > │ padding-left: 1em; │ +00:00:25 verbose #1249 > > │ } │ +00:00:25 verbose #1250 > > │ table td { │ +00:00:25 verbose #1251 > > │ text-align: start; │ +00:00:25 verbose #1252 > > │ } │ +00:00:25 verbose #1253 > > │ table tr { │ +00:00:25 verbose #1254 > > │ vertical-align: top; │ +00:00:25 verbose #1255 > > │ margin: 0em 0px; │ +00:00:25 verbose #1256 > > │ } │ +00:00:25 verbose #1257 > > │ table tr td pre │ +00:00:25 verbose #1258 > > │ { │ +00:00:25 verbose #1259 > > │ vertical-align: top !important; │ +00:00:25 verbose #1260 > > │ margin: 0em 0px !important; │ +00:00:25 verbose #1261 > > │ } │ +00:00:25 verbose #1262 > > │ table th { │ +00:00:25 verbose #1263 > > │ text-align: start; │ +00:00:25 verbose #1264 > > │ } │ +00:00:25 verbose #1265 > > │ </style> │ +00:00:25 verbose #1266 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:25 verbose #1267 > 00:00:23 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 43987 +00:00:25 verbose #1268 > 00:00:23 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:00:28 verbose #1269 > 00:00:25 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb to html +00:00:28 verbose #1270 > 00:00:25 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:28 verbose #1271 > 00:00:25 verbose #7 ! validate(nb) +00:00:30 verbose #1272 > 00:00:27 verbose #8 ! [NbConvertApp] Writing 309493 bytes to c:\home\git\polyglot\apps\dir-tree-html\DirTreeHtml.dib.html +00:00:30 verbose #1273 > 00:00:27 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 669 +00:00:30 verbose #1274 > 00:00:27 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 669 +00:00:30 verbose #1275 > 00:00:27 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:00:31 verbose #1276 > 00:00:28 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:00:31 verbose #1277 > 00:00:28 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:00:31 verbose #1278 > 00:00:29 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 44715 +00:00:31 debug #1279 execute_with_options_async / exit_code: 0 / output.Length: 49549 +00:00:31 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path DirTreeHtml.dib +00:00:31 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False +00:00:32 debug #8 run_with_timeout_async / timeout: 100 #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>] #endif @@ -34952,9 +34638,13 @@ #endif type std_env_VarError = class end #if FABLE_COMPILER +[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>] +#endif +type core_any_Any = class end +#if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("_")>] #endif -type Any = class end +type core_ops_Try<'T> = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>] #endif @@ -34972,7 +34662,7 @@ #endif type Dyn<'T> = class end #if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>] +[<Fable.Core.Erase; Fable.Core.Emit("Send")>] #endif type Send<'T> = class end #if FABLE_COMPILER @@ -35008,9 +34698,21 @@ #endif type Ref<'T> = class end #if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>] +[<Fable.Core.Erase; Fable.Core.Emit("$0 + $1")>] +#endif +type LifetimeJoin<'T, 'U> = class end +#if FABLE_COMPILER +[<Fable.Core.Erase; Fable.Core.Emit("'static")>] +#endif +type StaticLifetime = class end +#if FABLE_COMPILER +[<Fable.Core.Erase; Fable.Core.Emit("$0")>] +#endif +type LifetimeRef<'T> = class end +#if FABLE_COMPILER +[<Fable.Core.Erase; Fable.Core.Emit("$0 $1")>] #endif -type StaticRef<'T> = class end +type Lifetime<'T, 'U> = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("MutCell<$0>")>] #endif @@ -37780,22 +37482,22 @@ Some "C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml") 00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... -00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj (in 415 ms). +00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj (in 452 ms). 00:00:02 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj] -00:00:11 verbose #6 > DirTreeHtml -> C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\bin\Release\net9.0\linux-x64\DirTreeHtml.dll -00:00:13 verbose #7 > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\ -00:00:13 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 730 -00:00:13 debug #9 execute_with_options_async / options: struct (None, +00:00:14 verbose #6 > DirTreeHtml -> C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\bin\Release\net9.0\linux-x64\DirTreeHtml.dll +00:00:16 verbose #7 > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\ +00:00:16 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 730 +00:00:16 debug #9 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DirTreeHtml\DirTreeHtml.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\dir-tree-html\dist" --runtime win-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml") -00:00:13 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET -00:00:14 verbose #11 > Determining projects to restore... -00:00:14 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj (in 373 ms). -00:00:15 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj] -00:00:24 verbose #14 > DirTreeHtml -> C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\bin\Release\net9.0\win-x64\DirTreeHtml.dll -00:00:28 verbose #15 > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\ -00:00:28 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 728 +00:00:16 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET +00:00:17 verbose #11 > Determining projects to restore... +00:00:18 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj (in 447 ms). +00:00:18 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj] +00:00:29 verbose #14 > DirTreeHtml -> C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\bin\Release\net9.0\win-x64\DirTreeHtml.dll +00:00:34 verbose #15 > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\ +00:00:34 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 728 @@ -37832,19381 +37534,18230 @@ 00:00:01 debug #2 run_with_timeout_async / timeout: 100 00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True 00:00:01 debug #4 run_with_timeout_async / timeout: 100 -00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805 00:00:01 debug #5 run_with_timeout_async / timeout: 100 +00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805 +00:00:01 debug #6 run_with_timeout_async / timeout: 100 00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result: 00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0 00:00:02 verbose #6 > Server bound to: http://localhost:13805 00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path sm'.dib --retries 3", + "../../workspace/target/release/spiral_builder.exe dib --path sm'.dib --retries 3", [||], None, None, true, None) 00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "sm'.dib", "--retries", "3"]) 00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/sm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/sm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:01:24 verbose #10 > -00:01:24 verbose #11 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #12 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #13 > │ # sm' │ -00:01:24 verbose #14 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #15 > -00:01:24 verbose #16 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #17 > //// test -00:01:24 verbose #18 > -00:01:24 verbose #19 > open testing -00:01:24 verbose #20 > -00:01:24 verbose #21 > ── spiral - import ───────────────────────────────────────────────────────────── -00:01:24 verbose #22 > #r -00:01:24 verbose #23 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:24 verbose #24 > otNet.Interactive.Spiral.dll" -00:01:24 verbose #25 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:01:24 verbose #26 > #r -00:01:24 verbose #27 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:24 verbose #28 > otNet.Interactive.dll" -00:01:24 verbose #29 > open type Microsoft.DotNet.Interactive.Kernel -00:01:24 verbose #30 > -00:01:24 verbose #31 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #32 > open rust_operators -00:01:24 verbose #33 > -00:01:24 verbose #34 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #35 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #36 > │ ## types │ -00:01:24 verbose #37 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #38 > -00:01:24 verbose #39 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #40 > inl types () = -00:01:24 verbose #41 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #42 > Fable.Core.Emit(\"str\")>]]\n#endif\ntype Str = class end" -00:01:24 verbose #43 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #44 > Fable.Core.Emit(\"base64::DecodeError\")>]]\n#endif\ntype base64_DecodeError = -00:01:24 verbose #45 > class end" -00:01:24 verbose #46 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #47 > Fable.Core.Emit(\"borsh::io::Error\")>]]\n#endif\ntype borsh_io_Error = class -00:01:24 verbose #48 > end" -00:01:24 verbose #49 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #50 > Fable.Core.Emit(\"encoding_rs::Encoding\")>]]\n#endif\ntype encoding_rs_Encoding -00:01:24 verbose #51 > = class end" -00:01:24 verbose #52 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #53 > Fable.Core.Emit(\"js_sys::JsString\")>]]\n#endif\ntype js_sys_JsString = class -00:01:24 verbose #54 > end" -00:01:24 verbose #55 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #56 > Fable.Core.Emit(\"serde_json::Error\")>]]\n#endif\ntype serde_json_Error = class -00:01:24 verbose #57 > end" -00:01:24 verbose #58 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #59 > Fable.Core.Emit(\"serde_json::Value\")>]]\n#endif\ntype serde_json_Value = class -00:01:24 verbose #60 > end" -00:01:24 verbose #61 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #62 > Fable.Core.Emit(\"serde_wasm_bindgen::Error\")>]]\n#endif\ntype -00:01:24 verbose #63 > serde_wasm_bindgen_Error = class end" -00:01:24 verbose #64 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #65 > Fable.Core.Emit(\"std::ffi::OsStr\")>]]\n#endif\ntype std_ffi_OsStr = class end" -00:01:24 verbose #66 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #67 > Fable.Core.Emit(\"std::ffi::OsString\")>]]\n#endif\ntype std_ffi_OsString = -00:01:24 verbose #68 > class end" -00:01:24 verbose #69 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #70 > Fable.Core.Emit(\"std::fmt::Display<$0>\")>]]\n#endif\ntype std_fmt_Display<'T> -00:01:24 verbose #71 > = class end" -00:01:24 verbose #72 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #73 > Fable.Core.Emit(\"std::str::Utf8Error\")>]]\n#endif\ntype std_str_Utf8Error = -00:01:24 verbose #74 > class end" -00:01:24 verbose #75 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #76 > Fable.Core.Emit(\"std::string::FromUtf8Error\")>]]\n#endif\ntype -00:01:24 verbose #77 > std_string_FromUtf8Error = class end" -00:01:24 verbose #78 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #79 > Fable.Core.Emit(\"std::string::String\")>]]\n#endif\ntype std_string_String = -00:01:24 verbose #80 > class end" -00:01:24 verbose #81 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #82 > Fable.Core.Emit(\"std::slice::Windows<$0>\")>]]\n#endif\ntype -00:01:24 verbose #83 > std_slice_Windows<'T> = class end" -00:01:24 verbose #84 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #85 > Fable.Core.Emit(\"regex::Regex\")>]]\n#endif\ntype regex_Regex = class end" -00:01:24 verbose #86 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #87 > Fable.Core.Emit(\"regex::Captures\")>]]\n#endif\ntype regex_Captures = class -00:01:24 verbose #88 > end" -00:01:24 verbose #89 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #90 > Fable.Core.Emit(\"regex::CaptureMatches\")>]]\n#endif\ntype regex_CaptureMatches -00:01:24 verbose #91 > = class end" -00:01:24 verbose #92 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:24 verbose #93 > Fable.Core.Emit(\"regex::Error\")>]]\n#endif\ntype regex_Error = class end" -00:01:24 verbose #94 > -00:01:24 verbose #95 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #96 > inl types () = -00:01:24 verbose #97 > rust.types () -00:01:24 verbose #98 > mapm.types () -00:01:24 verbose #99 > types () -00:01:24 verbose #100 > -00:01:24 verbose #101 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #102 > nominal display t = $"std_fmt_Display<`t>" -00:01:24 verbose #103 > nominal str = $"Str" -00:01:24 verbose #104 > nominal base64_decode_error = $"base64_DecodeError" -00:01:24 verbose #105 > nominal borsh_io_error = $"borsh_io_Error" -00:01:24 verbose #106 > nominal utf8_error = $"std_str_Utf8Error" -00:01:24 verbose #107 > nominal from_utf8_error = $"std_string_FromUtf8Error" -00:01:24 verbose #108 > nominal json_value = $"serde_json_Value" -00:01:24 verbose #109 > nominal json_error = $"serde_json_Error" -00:01:24 verbose #110 > nominal serde_wasm_bindgen_error = $"serde_wasm_bindgen_Error" -00:01:24 verbose #111 > nominal js_string = $"js_sys_JsString" -00:01:24 verbose #112 > nominal os_str = $"std_ffi_OsStr" -00:01:24 verbose #113 > nominal os_string = $"std_ffi_OsString" -00:01:24 verbose #114 > nominal std_string = $"std_string_String" -00:01:24 verbose #115 > -00:01:24 verbose #116 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #117 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #118 > │ ## contains │ -00:01:24 verbose #119 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #120 > -00:01:24 verbose #121 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #122 > inl contains (value : string) (s : string) : bool = -00:01:24 verbose #123 > $"!s.Contains !value" -00:01:24 verbose #124 > -00:01:24 verbose #125 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #126 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #127 > │ ## ends_with │ -00:01:24 verbose #128 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #129 > -00:01:24 verbose #130 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #131 > inl ends_with (value : string) (s : string) : bool = -00:01:24 verbose #132 > $"!s.EndsWith !value" -00:01:24 verbose #133 > -00:01:24 verbose #134 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #135 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #136 > │ ## last_index_of │ -00:01:24 verbose #137 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #138 > -00:01:24 verbose #139 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #140 > inl last_index_of (search : string) (s : string) : i32 = -00:01:24 verbose #141 > $"!s.LastIndexOf !search" -00:01:24 verbose #142 > -00:01:24 verbose #143 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #144 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #145 > │ ## pad_left │ -00:01:24 verbose #146 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #147 > -00:01:24 verbose #148 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #149 > inl pad_left (total_width : i32) (padding_char : char) (s : string) : string = -00:01:24 verbose #150 > $"!s.PadLeft (!total_width, !padding_char)" -00:01:24 verbose #151 > -00:01:24 verbose #152 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #153 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #154 > │ ## pad_right │ -00:01:24 verbose #155 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #156 > -00:01:24 verbose #157 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #158 > inl pad_right (total_width : i32) (padding_char : char) (s : string) : string = -00:01:24 verbose #159 > $"!s.PadRight (!total_width, !padding_char)" -00:01:24 verbose #160 > -00:01:24 verbose #161 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #162 > //// test -00:01:24 verbose #163 > -00:01:24 verbose #164 > "123" -00:01:24 verbose #165 > |> pad_right 6 ' ' -00:01:24 verbose #166 > |> _assert_eq "123 " -00:01:24 verbose #167 > -00:01:24 verbose #168 > ╭─[ 693.82ms - stdout ]────────────────────────────────────────────────────────╮ -00:01:24 verbose #169 > │ assert_eq / actual: "123 " / expected: "123 " │ -00:01:24 verbose #170 > │ │ -00:01:24 verbose #171 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #172 > -00:01:24 verbose #173 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #174 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #175 > │ ## starts_with │ -00:01:24 verbose #176 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #177 > -00:01:24 verbose #178 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #179 > inl starts_with (value : string) (s : string) : bool = -00:01:24 verbose #180 > $"!s.StartsWith !value" -00:01:24 verbose #181 > -00:01:24 verbose #182 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #183 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #184 > │ ## substring │ -00:01:24 verbose #185 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #186 > -00:01:24 verbose #187 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #188 > inl substring (start : i32) (len : i32) (str : string) : string = -00:01:24 verbose #189 > $"!str.Substring (!start, !len)" -00:01:24 verbose #190 > -00:01:24 verbose #191 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #192 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #193 > │ ## to_lower │ -00:01:24 verbose #194 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #195 > -00:01:24 verbose #196 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #197 > inl to_lower (input : string) : string = -00:01:24 verbose #198 > $"!input.ToLower ()" -00:01:24 verbose #199 > -00:01:24 verbose #200 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #201 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #202 > │ ## to_upper │ -00:01:24 verbose #203 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #204 > -00:01:24 verbose #205 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #206 > inl to_upper (input : string) : string = -00:01:24 verbose #207 > $"!input.ToUpper ()" -00:01:24 verbose #208 > -00:01:24 verbose #209 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #210 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #211 > │ ## trim │ -00:01:24 verbose #212 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #213 > -00:01:24 verbose #214 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #215 > inl trim (input : string) : string = -00:01:24 verbose #216 > $"!input.Trim ()" -00:01:24 verbose #217 > -00:01:24 verbose #218 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #219 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #220 > │ ## trim_end │ -00:01:24 verbose #221 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #222 > -00:01:24 verbose #223 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #224 > inl trim_end (trim_chars : array_base char) (input : string) : string = -00:01:24 verbose #225 > $"!input.TrimEnd !trim_chars" -00:01:24 verbose #226 > -00:01:24 verbose #227 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #228 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #229 > │ ## trim_start │ -00:01:24 verbose #230 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #231 > -00:01:24 verbose #232 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #233 > inl trim_start (trim_chars : array_base char) (input : string) : string = -00:01:24 verbose #234 > $"!input.TrimStart !trim_chars" -00:01:24 verbose #235 > -00:01:24 verbose #236 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #237 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #238 > │ ## length │ -00:01:24 verbose #239 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #240 > -00:01:24 verbose #241 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #242 > inl length forall dim {int}. (input : string) : dim = -00:01:24 verbose #243 > input |> sm.length -00:01:24 verbose #244 > -00:01:24 verbose #245 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #246 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #247 > │ ## length' │ -00:01:24 verbose #248 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #249 > -00:01:24 verbose #250 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #251 > inl length' forall dim. (input : string) : dim = -00:01:24 verbose #252 > input |> $'String.length' -00:01:24 verbose #253 > -00:01:24 verbose #254 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #255 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #256 > │ ## is_empty │ -00:01:24 verbose #257 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #258 > -00:01:24 verbose #259 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #260 > inl is_empty (input : string) : bool = -00:01:24 verbose #261 > length input = 0i32 -00:01:24 verbose #262 > -00:01:24 verbose #263 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #264 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #265 > │ ## slice │ -00:01:24 verbose #266 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #267 > -00:01:24 verbose #268 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #269 > inl slice from to s : string = -00:01:24 verbose #270 > sm.slice s { from to } -00:01:24 verbose #271 > -00:01:24 verbose #272 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #273 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #274 > │ ## range │ -00:01:24 verbose #275 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #276 > -00:01:24 verbose #277 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #278 > inl range forall t. (start : am'.range t) (end : am'.range t) s = -00:01:24 verbose #279 > inl start, end = -00:01:24 verbose #280 > match start, end with -00:01:24 verbose #281 > | Start start, End fn => -00:01:24 verbose #282 > start, s |> length' |> fn -00:01:24 verbose #283 > | End start_fn, End end_fn => -00:01:24 verbose #284 > inl len = s |> length' -00:01:24 verbose #285 > start_fn len, end_fn len -00:01:24 verbose #286 > s |> slice (start |> u64) (end |> u64) -00:01:24 verbose #287 > -00:01:24 verbose #288 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #289 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #290 > │ ## raw_string_literal │ -00:01:24 verbose #291 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #292 > -00:01:24 verbose #293 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #294 > inl raw_string_literal (s : string) : rust.ref' str = -00:01:24 verbose #295 > !\($"\"r#\\\"\" + !s + \"\\\"#\"") -00:01:24 verbose #296 > -00:01:24 verbose #297 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #298 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #299 > │ ## raw_string_literal_static │ -00:01:24 verbose #300 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #301 > -00:01:24 verbose #302 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #303 > inl raw_string_literal_static (s : string) : rust.static_ref' str = -00:01:24 verbose #304 > !\($"\"r#\\\"\" + !s + \"\\\"#\"") -00:01:24 verbose #305 > -00:01:24 verbose #306 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #307 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #308 > │ ## (~#) │ -00:01:24 verbose #309 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #310 > -00:01:24 verbose #311 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #312 > inl (~#) s = -00:01:24 verbose #313 > s |> raw_string_literal -00:01:24 verbose #314 > -00:01:24 verbose #315 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #316 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #317 > │ ## (~##) │ -00:01:24 verbose #318 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #319 > -00:01:24 verbose #320 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #321 > inl (~##) s = -00:01:24 verbose #322 > s |> raw_string_literal_static -00:01:24 verbose #323 > -00:01:24 verbose #324 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #325 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #326 > │ ## include_str │ -00:01:24 verbose #327 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #328 > -00:01:24 verbose #329 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #330 > inl include_str (path : string) : rust.ref' str = -00:01:24 verbose #331 > !\($'"include_str\!(\\\"" + !path + "\\\")"') -00:01:24 verbose #332 > -00:01:24 verbose #333 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #334 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #335 > │ ## as_str │ -00:01:24 verbose #336 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #337 > -00:01:24 verbose #338 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #339 > inl as_str (s : string) : rust.ref' str = -00:01:24 verbose #340 > // !\\(s, $'"fable_library_rust::String_::LrcStr::as_str(&$0)"') -00:01:24 verbose #341 > !\\(s, $'"&*$0"') -00:01:24 verbose #342 > -00:01:24 verbose #343 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #344 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #345 > │ ## from_std_string │ -00:01:24 verbose #346 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #347 > -00:01:24 verbose #348 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #349 > inl from_std_string (str : std_string) : string = -00:01:24 verbose #350 > !\\(str, $'"fable_library_rust::String_::fromString($0)"') -00:01:24 verbose #351 > -00:01:24 verbose #352 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #353 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #354 > │ ## ref_to_std_string │ -00:01:24 verbose #355 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #356 > -00:01:24 verbose #357 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #358 > inl ref_to_std_string (str : rust.ref' str) : std_string = -00:01:24 verbose #359 > !\\(str, $'"String::from($0)"') -00:01:24 verbose #360 > -00:01:24 verbose #361 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #362 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #363 > │ ## cow_to_std_string │ -00:01:24 verbose #364 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #365 > -00:01:24 verbose #366 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #367 > inl cow_to_std_string (str : rust.cow str) : std_string = -00:01:24 verbose #368 > !\\(str, $'"String::from($0)"') -00:01:24 verbose #369 > -00:01:24 verbose #370 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #371 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #372 > │ ## to_std_string │ -00:01:24 verbose #373 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #374 > -00:01:24 verbose #375 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #376 > inl to_std_string (s : string) : std_string = -00:01:24 verbose #377 > s |> as_str |> ref_to_std_string -00:01:24 verbose #378 > -00:01:24 verbose #379 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #380 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #381 > │ ## as_str_std │ -00:01:24 verbose #382 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #383 > -00:01:24 verbose #384 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #385 > inl as_str_std (s : std_string) : rust.ref' str = -00:01:24 verbose #386 > !\\(s, $'"$0.as_str()"') -00:01:24 verbose #387 > -00:01:24 verbose #388 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #389 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #390 > │ ## into_boxed_str │ -00:01:24 verbose #391 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #392 > -00:01:24 verbose #393 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #394 > inl into_boxed_str (s : std_string) : rust.box str = -00:01:24 verbose #395 > !\\(s, $'"$0.into_boxed_str()"') -00:01:24 verbose #396 > -00:01:24 verbose #397 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #398 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #399 > │ ## os_string_as_ref │ -00:01:24 verbose #400 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #401 > -00:01:24 verbose #402 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #403 > inl os_string_as_ref (s : os_string) : rust.ref' os_str = -00:01:24 verbose #404 > !\\(s, $'"$0.as_ref()"') -00:01:24 verbose #405 > -00:01:24 verbose #406 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #407 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #408 > │ ## to_os_string │ -00:01:24 verbose #409 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #410 > -00:01:24 verbose #411 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #412 > inl to_os_string (s : rust.ref' os_str) : os_string = -00:01:24 verbose #413 > !\\(s, $'"$0.to_os_string()"') -00:01:24 verbose #414 > -00:01:24 verbose #415 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #416 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #417 > │ ## os_to_str │ -00:01:24 verbose #418 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #419 > -00:01:24 verbose #420 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #421 > inl os_to_str (s : os_string) : optionm'.option' (rust.ref' str) = -00:01:24 verbose #422 > !\\(s, $'"$0.to_str()"') -00:01:24 verbose #423 > -00:01:24 verbose #424 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #425 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #426 > │ ## from_os_str_ref │ -00:01:24 verbose #427 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #428 > -00:01:24 verbose #429 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #430 > inl from_os_str_ref s = -00:01:24 verbose #431 > s -00:01:24 verbose #432 > |> to_os_string -00:01:24 verbose #433 > |> os_to_str -00:01:24 verbose #434 > |> optionm'.unwrap -00:01:24 verbose #435 > |> ref_to_std_string -00:01:24 verbose #436 > |> from_std_string -00:01:24 verbose #437 > -00:01:24 verbose #438 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #439 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #440 > │ ## obj_to_string │ -00:01:24 verbose #441 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #442 > -00:01:24 verbose #443 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #444 > inl obj_to_string x : string = -00:01:24 verbose #445 > x |> $'_.ToString()' -00:01:24 verbose #446 > -00:01:24 verbose #447 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #448 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #449 > │ ## to_string any │ -00:01:24 verbose #450 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #451 > -00:01:24 verbose #452 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #453 > instance to_string any = -00:01:24 verbose #454 > obj_to_string -00:01:24 verbose #455 > -00:01:24 verbose #456 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #457 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #458 > │ ## to_string result t u │ -00:01:24 verbose #459 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #460 > -00:01:24 verbose #461 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #462 > instance to_string result t u = fun x => -00:01:24 verbose #463 > real -00:01:24 verbose #464 > open rust -00:01:24 verbose #465 > typecase (t * u) with -00:01:24 verbose #466 > | string * string => -00:01:24 verbose #467 > match x with -00:01:24 verbose #468 > | Ok x => x -00:01:24 verbose #469 > | Error x => $'"sm\'.to_string result / Error: " + !x + ""' : string -00:01:24 verbose #470 > | std_string * std_string => -00:01:24 verbose #471 > match x with -00:01:24 verbose #472 > | Ok x => from_std_string x -00:01:24 verbose #473 > | Error x => $'"sm\'.to_string result / Error: " + string !x + ""' : -00:01:24 verbose #474 > string -00:01:24 verbose #475 > | _ => obj_to_string `u x -00:01:24 verbose #476 > -00:01:24 verbose #477 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #478 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #479 > │ ## format_debug │ -00:01:24 verbose #480 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #481 > -00:01:24 verbose #482 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #483 > inl format_debug x : string = -00:01:24 verbose #484 > $'$"%A{!x}"' -00:01:24 verbose #485 > -00:01:24 verbose #486 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #487 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #488 > │ ## format_custom' │ -00:01:24 verbose #489 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #490 > -00:01:24 verbose #491 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #492 > inl format_custom' format x : std_string = -00:01:24 verbose #493 > !\\(x, $'"format\!(\\\"" + !format + "\\\", $0)"') -00:01:24 verbose #494 > -00:01:24 verbose #495 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #496 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #497 > │ ## format' │ -00:01:24 verbose #498 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #499 > -00:01:24 verbose #500 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #501 > inl format' x : std_string = -00:01:24 verbose #502 > run_target function -00:01:24 verbose #503 > | Rust _ => fun () => -00:01:24 verbose #504 > !\\(x, $'"format\!(\\\"{}\\\", $0)"') -00:01:24 verbose #505 > | _ => fun () => null () -00:01:24 verbose #506 > -00:01:24 verbose #507 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #508 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #509 > │ ## format_debug' │ -00:01:24 verbose #510 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #511 > -00:01:24 verbose #512 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #513 > inl format_debug' x : std_string = -00:01:24 verbose #514 > run_target function -00:01:24 verbose #515 > | Rust _ => fun () => -00:01:24 verbose #516 > !\\(x, $'"format\!(\\\"{:?}\\\", $0)"') -00:01:24 verbose #517 > | _ => fun () => null () -00:01:24 verbose #518 > -00:01:24 verbose #519 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #520 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #521 > │ ## format_pretty' │ -00:01:24 verbose #522 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #523 > -00:01:24 verbose #524 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #525 > inl format_pretty' x : std_string = -00:01:24 verbose #526 > run_target function -00:01:24 verbose #527 > | Rust _ => fun () => -00:01:24 verbose #528 > !\\(x, $'"format\!(\\\"{:#?}\\\", $0)"') -00:01:24 verbose #529 > | _ => fun () => null () -00:01:24 verbose #530 > -00:01:24 verbose #531 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #532 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #533 > │ ## format_hex' │ -00:01:24 verbose #534 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #535 > -00:01:24 verbose #536 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #537 > inl format_hex' x : std_string = -00:01:24 verbose #538 > run_target function -00:01:24 verbose #539 > | Rust _ => fun () => -00:01:24 verbose #540 > !\\(x, $'"format\!(\\\"{:x}\\\", $0)"') -00:01:24 verbose #541 > | _ => fun () => null () -00:01:24 verbose #542 > -00:01:24 verbose #543 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #544 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #545 > │ ## format'' │ -00:01:24 verbose #546 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #547 > -00:01:24 verbose #548 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #549 > inl format'' (format : string) : std_string = -00:01:24 verbose #550 > !\($'@@$"format\!(" + !format + ")"') -00:01:24 verbose #551 > -00:01:24 verbose #552 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #553 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #554 > │ ## format_exception │ -00:01:24 verbose #555 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #556 > -00:01:24 verbose #557 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #558 > inl format_exception (ex : exn) : string = -00:01:24 verbose #559 > run_target function -00:01:24 verbose #560 > | Fsharp (Native) => fun () => $'$"{!ex.GetType ()}: {!ex.Message}"' -00:01:24 verbose #561 > | _ => fun () => ex |> format_debug -00:01:24 verbose #562 > -00:01:24 verbose #563 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #564 > //// test -00:01:24 verbose #565 > -00:01:24 verbose #566 > fun () => failwith "test" -00:01:24 verbose #567 > |> _throws -00:01:24 verbose #568 > |> optionm.map sm'.format_exception -00:01:24 verbose #569 > |> _assert_eq (Some "System.Exception: test") -00:01:24 verbose #570 > -00:01:24 verbose #571 > ╭─[ 493.63ms - stdout ]────────────────────────────────────────────────────────╮ -00:01:24 verbose #572 > │ assert_eq / actual: US1_0 "System.Exception: test" / expected: US1_0 │ -00:01:24 verbose #573 > │ "System.Exception: test" │ -00:01:24 verbose #574 > │ │ -00:01:24 verbose #575 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #576 > -00:01:24 verbose #577 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #578 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #579 > │ ## replace │ -00:01:24 verbose #580 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #581 > -00:01:24 verbose #582 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #583 > inl replace (old_value : string) (new_value : string) (s : string) : string = -00:01:24 verbose #584 > $"!s.Replace (!old_value, !new_value)" -00:01:24 verbose #585 > -00:01:24 verbose #586 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #587 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #588 > │ ## regex │ -00:01:24 verbose #589 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #590 > -00:01:24 verbose #591 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #592 > nominal regex = $'regex_Regex' -00:01:24 verbose #593 > -00:01:24 verbose #594 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #595 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #596 > │ ## regex_error │ -00:01:24 verbose #597 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #598 > -00:01:24 verbose #599 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #600 > nominal regex_error = $'regex_Error' -00:01:24 verbose #601 > -00:01:24 verbose #602 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #603 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #604 > │ ## new_regex │ -00:01:24 verbose #605 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #606 > -00:01:24 verbose #607 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #608 > inl new_regex (pattern : string) : resultm.result' regex regex_error = -00:01:24 verbose #609 > run_target function -00:01:24 verbose #610 > | Rust (Native) => fun () => -00:01:24 verbose #611 > inl pattern = join pattern -00:01:24 verbose #612 > !\\(pattern, $'$"regex::Regex::new(&$0)"') -00:01:24 verbose #613 > | _ => fun () => null () -00:01:24 verbose #614 > -00:01:24 verbose #615 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #616 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #617 > │ ## captures │ -00:01:24 verbose #618 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #619 > -00:01:24 verbose #620 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #621 > nominal regex_captures = $'regex_Captures' -00:01:24 verbose #622 > -00:01:24 verbose #623 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #624 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #625 > │ ## regex_capture_matches │ -00:01:24 verbose #626 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #627 > -00:01:24 verbose #628 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #629 > nominal regex_capture_matches = $'regex_CaptureMatches' -00:01:24 verbose #630 > -00:01:24 verbose #631 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #632 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #633 > │ ## regex_captures │ -00:01:24 verbose #634 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #635 > -00:01:24 verbose #636 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #637 > inl regex_captures (s : string) (regex : regex) : am'.vec (mapm.hash_map -00:01:24 verbose #638 > (rust.ref' str) (rust.ref' str)) = -00:01:24 verbose #639 > inl s = join s -00:01:24 verbose #640 > !\\(regex, $'$"$0.captures_iter(&*!s).map(|caps| $0.capture_names().map(|x| -00:01:24 verbose #641 > x.and_then(|n| Some((n, -00:01:24 verbose #642 > caps.name(n)?.as_str())))).flatten().collect()).collect()"') -00:01:24 verbose #643 > -00:01:24 verbose #644 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #645 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #646 > │ ## replace_regex │ -00:01:24 verbose #647 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #648 > -00:01:24 verbose #649 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #650 > inl replace_regex (pattern : string) (replacement : string) (s : string) : -00:01:24 verbose #651 > string = -00:01:24 verbose #652 > run_target function -00:01:24 verbose #653 > | Fsharp (Native) => fun () => -00:01:24 verbose #654 > inl replacement = join replacement -00:01:24 verbose #655 > $"System.Text.RegularExpressions.Regex.Replace (!s, !pattern, -00:01:24 verbose #656 > !replacement)" -00:01:24 verbose #657 > | Rust (Native) => fun () => -00:01:24 verbose #658 > inl s = join s -00:01:24 verbose #659 > inl replacement = join replacement -00:01:24 verbose #660 > inl regex = pattern |> new_regex |> resultm.unwrap' -00:01:24 verbose #661 > !\\((regex, s, replacement), $'$"$0.replace_all(&$1, &*$2)"') -00:01:24 verbose #662 > |> cow_to_std_string -00:01:24 verbose #663 > |> from_std_string -00:01:24 verbose #664 > | _ => fun () => null () -00:01:24 verbose #665 > -00:01:24 verbose #666 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #667 > //// test -00:01:24 verbose #668 > -00:01:24 verbose #669 > " 123" -00:01:24 verbose #670 > |> replace_regex "\\s\\w2" "" -00:01:24 verbose #671 > |> _assert_eq "3" -00:01:24 verbose #672 > -00:01:24 verbose #673 > ╭─[ 56.94ms - stdout ]─────────────────────────────────────────────────────────╮ -00:01:24 verbose #674 > │ assert_eq / actual: "3" / expected: "3" │ -00:01:24 verbose #675 > │ │ -00:01:24 verbose #676 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #677 > -00:01:24 verbose #678 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #679 > //// test -00:01:24 verbose #680 > ///! rust -d regex -00:01:24 verbose #681 > -00:01:24 verbose #682 > types () -00:01:24 verbose #683 > " 123" -00:01:24 verbose #684 > |> replace_regex "\\s\\w2" "" -00:01:24 verbose #685 > |> _assert_eq "3" -00:01:24 verbose #686 > -00:01:24 verbose #687 > ╭─[ 18.99s - return value ]────────────────────────────────────────────────────╮ -00:01:24 verbose #688 > │ assert_eq / actual: "3" / expected: "3" │ -00:01:24 verbose #689 > │ │ -00:01:24 verbose #690 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #691 > -00:01:24 verbose #692 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #693 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #694 > │ ## serialize │ -00:01:24 verbose #695 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #696 > -00:01:24 verbose #697 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #698 > inl serialize forall t. (x : t) : resultm.result' std_string json_error = -00:01:24 verbose #699 > !\($'"serde_json::to_string(&!x)"') -00:01:24 verbose #700 > -00:01:24 verbose #701 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #702 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #703 > │ ## deserialize │ -00:01:24 verbose #704 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #705 > -00:01:24 verbose #706 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #707 > inl deserialize forall t. (json : string) : resultm.result' t std_string = -00:01:24 verbose #708 > inl json = join json -00:01:24 verbose #709 > inl json = json |> as_str -00:01:24 verbose #710 > !\($'"serde_json::from_str(&!json)"') -00:01:24 verbose #711 > |> resultm.map_error' fun (x : json_error) => x |> format' -00:01:24 verbose #712 > -00:01:24 verbose #713 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #714 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #715 > │ ## borsh_deserialize │ -00:01:24 verbose #716 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #717 > -00:01:24 verbose #718 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #719 > inl borsh_deserialize forall t. (data : array_base u8) : resultm.result' t -00:01:24 verbose #720 > std_string = -00:01:24 verbose #721 > inl data = data |> am'.as_slice -00:01:24 verbose #722 > (!\($'"true; let mut !data = !data"') : bool) |> ignore -00:01:24 verbose #723 > inl result = !\($'"borsh::BorshDeserialize::deserialize(&mut !data)"') -00:01:24 verbose #724 > result -00:01:24 verbose #725 > |> resultm.map_error' fun (x : borsh_io_error) => x |> format' -00:01:24 verbose #726 > -00:01:24 verbose #727 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #728 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #729 > │ ## deserialize_vec │ -00:01:24 verbose #730 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #731 > -00:01:24 verbose #732 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #733 > inl deserialize_vec (value : json_value) : resultm.result' (am'.vec u8) -00:01:24 verbose #734 > std_string = -00:01:24 verbose #735 > inl value = join value -00:01:24 verbose #736 > !\($'"serde_json::from_value(!value)"') -00:01:24 verbose #737 > |> resultm.map_error' fun (x : json_error) => x |> format' -00:01:24 verbose #738 > -00:01:24 verbose #739 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #740 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #741 > │ ## encode_uri_component │ -00:01:24 verbose #742 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #743 > -00:01:24 verbose #744 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #745 > inl encode_uri_component (s : std_string) : js_string = -00:01:24 verbose #746 > !\($'"js_sys::encode_uri_component(&!s)"') -00:01:24 verbose #747 > -00:01:24 verbose #748 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #749 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #750 > │ ## strip_prefix │ -00:01:24 verbose #751 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #752 > -00:01:24 verbose #753 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #754 > inl strip_prefix (prefix : char) (s : std_string) : optionm'.option' (rust.ref' -00:01:24 verbose #755 > str) = -00:01:24 verbose #756 > inl s = join s -00:01:24 verbose #757 > !\($'"!s.strip_prefix(!prefix)"') -00:01:24 verbose #758 > -00:01:24 verbose #759 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #760 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #761 > │ ## str_from_utf8 │ -00:01:24 verbose #762 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #763 > -00:01:24 verbose #764 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #765 > inl str_from_utf8 (bytes : rust.ref' (am'.slice u8)) : resultm.result' -00:01:24 verbose #766 > (rust.ref' str) utf8_error = -00:01:24 verbose #767 > !\($'"std::str::from_utf8(!bytes)"') -00:01:24 verbose #768 > -00:01:24 verbose #769 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #770 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #771 > │ ## string_from_utf8 │ -00:01:24 verbose #772 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #773 > -00:01:24 verbose #774 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #775 > inl string_from_utf8 (bytes : am'.vec u8) : resultm.result' std_string -00:01:24 verbose #776 > from_utf8_error = -00:01:24 verbose #777 > !\($'"std::string::String::from_utf8(!bytes)"') -00:01:24 verbose #778 > -00:01:24 verbose #779 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #780 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #781 > │ ## base64_decode │ -00:01:24 verbose #782 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #783 > -00:01:24 verbose #784 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #785 > inl base64_decode (s : std_string) : result std_string std_string = -00:01:24 verbose #786 > fun () => -00:01:24 verbose #787 > inl s = join s -00:01:24 verbose #788 > inl bytes : resultm.result' (am'.vec u8) base64_decode_error = -00:01:24 verbose #789 > -00:01:24 verbose #790 > !\($'"base64::Engine::decode(&base64::engine::general_purpose::STANDARD, !s)"') -00:01:24 verbose #791 > bytes -00:01:24 verbose #792 > |> resultm.map_error' format' -00:01:24 verbose #793 > |> resultm.try' -00:01:24 verbose #794 > |> string_from_utf8 -00:01:24 verbose #795 > |> resultm.map_error' format' -00:01:24 verbose #796 > |> fun x => -00:01:24 verbose #797 > join x () -00:01:24 verbose #798 > |> resultm.unbox -00:01:24 verbose #799 > -00:01:24 verbose #800 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #801 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #802 > │ ## encoding' │ -00:01:24 verbose #803 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #804 > -00:01:24 verbose #805 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #806 > nominal encoding' = $'encoding_rs_Encoding' -00:01:24 verbose #807 > -00:01:24 verbose #808 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #809 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #810 > │ ## encoding_utf8' │ -00:01:24 verbose #811 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #812 > -00:01:24 verbose #813 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #814 > inl encoding_utf8' () : rust.ref' encoding' = -00:01:24 verbose #815 > !\($'"encoding_rs::UTF_8"') -00:01:24 verbose #816 > -00:01:24 verbose #817 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #818 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #819 > │ ## encoding_1252 │ -00:01:24 verbose #820 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #821 > -00:01:24 verbose #822 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #823 > inl encoding_1252' () : rust.ref' encoding' = -00:01:24 verbose #824 > !\($'"encoding_rs::WINDOWS_1252"') -00:01:24 verbose #825 > -00:01:24 verbose #826 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #827 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #828 > │ ## encoding_encode │ -00:01:24 verbose #829 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #830 > -00:01:24 verbose #831 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #832 > inl encoding_encode' (encoding : rust.ref' encoding') (text : string) : rust.cow -00:01:24 verbose #833 > (am'.slice u8) = -00:01:24 verbose #834 > !\\((encoding, text), $'"$0.encode(&*$1).0"') -00:01:24 verbose #835 > -00:01:24 verbose #836 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #837 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #838 > │ ## write_all_text │ -00:01:24 verbose #839 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #840 > -00:01:24 verbose #841 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #842 > inl write_all_text (path : string) (text : string) : () = -00:01:24 verbose #843 > run_target function -00:01:24 verbose #844 > | Fsharp (Native) => fun () => -00:01:24 verbose #845 > inl text = join text -00:01:24 verbose #846 > $'System.IO.File.WriteAllText (!path, !text)' -00:01:24 verbose #847 > | Rust (Native) => fun () => -00:01:24 verbose #848 > open rust_operators -00:01:24 verbose #849 > !\\((path, text), $'"std::fs::write(&*$0, &*$1).unwrap()"') -00:01:24 verbose #850 > | _ => fun () => null () -00:01:24 verbose #851 > -00:01:24 verbose #852 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #853 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #854 > │ ## utf8_decode │ -00:01:24 verbose #855 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #856 > -00:01:24 verbose #857 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #858 > inl utf8_decode (data : am'.vec u8) : resultm.result' std_string (rust.cow str) -00:01:24 verbose #859 > = -00:01:24 verbose #860 > !\($'$"encoding::Encoding::decode(encoding::all::UTF_8, &!data, -00:01:24 verbose #861 > encoding::DecoderTrap::Replace)"') -00:01:24 verbose #862 > -00:01:24 verbose #863 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #864 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #865 > │ ## concat_array_trailing │ -00:01:24 verbose #866 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #867 > -00:01:24 verbose #868 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #869 > inl concat_array_trailing (separator : string) (input : a i32 string) = -00:01:24 verbose #870 > ("", input) -00:01:24 verbose #871 > ||> am.fold fun acc (x : string) => -00:01:24 verbose #872 > $'!acc + !x + !separator + ""' -00:01:24 verbose #873 > -00:01:24 verbose #874 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #875 > //// test -00:01:24 verbose #876 > ///! rust -00:01:24 verbose #877 > -00:01:24 verbose #878 > ;[[ -00:01:24 verbose #879 > "1" -00:01:24 verbose #880 > "2" -00:01:24 verbose #881 > "3" -00:01:24 verbose #882 > ]] -00:01:24 verbose #883 > |> fun x => -00:01:24 verbose #884 > inl code = (a x : _ i32 _) |> concat_array_trailing "\n" -00:01:24 verbose #885 > code -00:01:24 verbose #886 > |> _assert_eq "1\n2\n3\n" -00:01:24 verbose #887 > -00:01:24 verbose #888 > ╭─[ 17.55s - return value ]────────────────────────────────────────────────────╮ -00:01:24 verbose #889 > │ assert_eq / actual: "1 │ -00:01:24 verbose #890 > │ 2 │ -00:01:24 verbose #891 > │ 3 │ -00:01:24 verbose #892 > │ " / expected: "1 │ -00:01:24 verbose #893 > │ 2 │ -00:01:24 verbose #894 > │ 3 │ -00:01:24 verbose #895 > │ " │ -00:01:24 verbose #896 > │ │ -00:01:24 verbose #897 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #898 > -00:01:24 verbose #899 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #900 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #901 > │ ## concat_list_trailing │ -00:01:24 verbose #902 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #903 > -00:01:24 verbose #904 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #905 > inl concat_list_trailing separator input = -00:01:24 verbose #906 > ("", input) -00:01:24 verbose #907 > ||> listm.fold fun acc (x : string) => -00:01:24 verbose #908 > $'!acc + !x + !separator + ""' -00:01:24 verbose #909 > -00:01:24 verbose #910 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #911 > //// test -00:01:24 verbose #912 > ///! rust -00:01:24 verbose #913 > -00:01:24 verbose #914 > [[ -00:01:24 verbose #915 > "1" -00:01:24 verbose #916 > "2" -00:01:24 verbose #917 > "3" -00:01:24 verbose #918 > ]] -00:01:24 verbose #919 > |> fun x => -00:01:24 verbose #920 > inl code = (x : _) |> concat_list_trailing "\n" -00:01:24 verbose #921 > code -00:01:24 verbose #922 > |> _assert_eq "1\n2\n3\n" -00:01:24 verbose #923 > -00:01:24 verbose #924 > ╭─[ 16.84s - return value ]────────────────────────────────────────────────────╮ -00:01:24 verbose #925 > │ assert_eq / actual: "1 │ -00:01:24 verbose #926 > │ 2 │ -00:01:24 verbose #927 > │ 3 │ -00:01:24 verbose #928 > │ " / expected: "1 │ -00:01:24 verbose #929 > │ 2 │ -00:01:24 verbose #930 > │ 3 │ -00:01:24 verbose #931 > │ " │ -00:01:24 verbose #932 > │ │ -00:01:24 verbose #933 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #934 > -00:01:24 verbose #935 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #936 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #937 > │ ## concat_list_heap_trailing │ -00:01:24 verbose #938 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #939 > -00:01:24 verbose #940 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #941 > inl concat_list_heap_trailing separator input = -00:01:24 verbose #942 > inl separator = join separator -00:01:24 verbose #943 > inl separator = separator |> as_str -00:01:24 verbose #944 > ("", input) -00:01:24 verbose #945 > ||> listm.fold fun acc (x : string) => -00:01:24 verbose #946 > inl acc = acc |> to_std_string -00:01:24 verbose #947 > inl x = x |> as_str -00:01:24 verbose #948 > $'$"{!acc}{!x}{!separator}"' -00:01:24 verbose #949 > -00:01:24 verbose #950 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #951 > //// test -00:01:24 verbose #952 > ///! rust -00:01:24 verbose #953 > -00:01:24 verbose #954 > types () -00:01:24 verbose #955 > -00:01:24 verbose #956 > [[ -00:01:24 verbose #957 > "1" -00:01:24 verbose #958 > "2" -00:01:24 verbose #959 > "3" -00:01:24 verbose #960 > ]] -00:01:24 verbose #961 > |> fun x => -00:01:24 verbose #962 > inl code = (x : _) |> concat_list_heap_trailing "\n" -00:01:24 verbose #963 > code -00:01:24 verbose #964 > |> _assert_eq "1\n2\n3\n" -00:01:24 verbose #965 > -00:01:24 verbose #966 > ╭─[ 17.64s - return value ]────────────────────────────────────────────────────╮ -00:01:24 verbose #967 > │ assert_eq / actual: "1 │ -00:01:24 verbose #968 > │ 2 │ -00:01:24 verbose #969 > │ 3 │ -00:01:24 verbose #970 > │ " / expected: "1 │ -00:01:24 verbose #971 > │ 2 │ -00:01:24 verbose #972 > │ 3 │ -00:01:24 verbose #973 > │ " │ -00:01:24 verbose #974 > │ │ -00:01:24 verbose #975 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #976 > -00:01:24 verbose #977 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #978 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #979 > │ ## concat │ -00:01:24 verbose #980 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #981 > -00:01:24 verbose #982 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #983 > inl concat (a : string) (b : seq.seq' _) : string = -00:01:24 verbose #984 > inl a = join a -00:01:24 verbose #985 > b |> $"String.concat" a -00:01:24 verbose #986 > -00:01:24 verbose #987 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #988 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #989 > │ ## ellipsis │ -00:01:24 verbose #990 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #991 > -00:01:24 verbose #992 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #993 > inl ellipsis (max : i32) (s : string) = -00:01:24 verbose #994 > if sm.length s <= max -00:01:24 verbose #995 > then s -00:01:24 verbose #996 > else s |> slice 0 (max - 1) |> fun x => $'!x + "..."' -00:01:24 verbose #997 > -00:01:24 verbose #998 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #999 > //// test -00:01:24 verbose #1000 > -00:01:24 verbose #1001 > "12345" -00:01:24 verbose #1002 > |> ellipsis 2 -00:01:24 verbose #1003 > |> _assert_eq "12..." -00:01:24 verbose #1004 > -00:01:24 verbose #1005 > "12345" -00:01:24 verbose #1006 > |> ellipsis 4 -00:01:24 verbose #1007 > |> _assert_eq "1234..." -00:01:24 verbose #1008 > -00:01:24 verbose #1009 > ╭─[ 101.87ms - stdout ]────────────────────────────────────────────────────────╮ -00:01:24 verbose #1010 > │ assert_eq / actual: "12..." / expected: "12..." │ -00:01:24 verbose #1011 > │ assert_eq / actual: "1234..." / expected: "1234..." │ -00:01:24 verbose #1012 > │ │ -00:01:24 verbose #1013 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1014 > -00:01:24 verbose #1015 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1016 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1017 > │ ## ellipsis_end │ -00:01:24 verbose #1018 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1019 > -00:01:24 verbose #1020 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1021 > let ellipsis_end (max : i64) (s : string) = -00:01:24 verbose #1022 > inl len = sm.length s -00:01:24 verbose #1023 > if len <= max -00:01:24 verbose #1024 > then s -00:01:24 verbose #1025 > else -00:01:24 verbose #1026 > inl half = f64 max / 2 -00:01:24 verbose #1027 > inl start_half = half |> math.ceil |> i64 -00:01:24 verbose #1028 > inl end_half = half |> math.floor |> i64 -00:01:24 verbose #1029 > inl start = s |> slice 0 (start_half - 1) -00:01:24 verbose #1030 > inl end = s |> slice (len - end_half) (len - 1) -00:01:24 verbose #1031 > (a ;[[start; "..."; end]] : _ i32 _) -00:01:24 verbose #1032 > |> seq.of_array -00:01:24 verbose #1033 > |> concat "" -00:01:24 verbose #1034 > -00:01:24 verbose #1035 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1036 > //// test -00:01:24 verbose #1037 > -00:01:24 verbose #1038 > "12345" -00:01:24 verbose #1039 > |> ellipsis_end 2 -00:01:24 verbose #1040 > |> _assert_eq "1...5" -00:01:24 verbose #1041 > -00:01:24 verbose #1042 > "12345" -00:01:24 verbose #1043 > |> ellipsis_end 3 -00:01:24 verbose #1044 > |> _assert_eq "12...5" -00:01:24 verbose #1045 > -00:01:24 verbose #1046 > "1234567" -00:01:24 verbose #1047 > |> ellipsis_end 4 -00:01:24 verbose #1048 > |> _assert_eq "12...67" -00:01:24 verbose #1049 > -00:01:24 verbose #1050 > ╭─[ 289.25ms - stdout ]────────────────────────────────────────────────────────╮ -00:01:24 verbose #1051 > │ assert_eq / actual: "1...5" / expected: "1...5" │ -00:01:24 verbose #1052 > │ assert_eq / actual: "12...5" / expected: "12...5" │ -00:01:24 verbose #1053 > │ assert_eq / actual: "12...67" / expected: "12...67" │ -00:01:24 verbose #1054 > │ │ -00:01:24 verbose #1055 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1056 > -00:01:24 verbose #1057 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1058 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1059 > │ ## format_ellipsis │ -00:01:24 verbose #1060 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1061 > -00:01:24 verbose #1062 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1063 > inl format_ellipsis s = -00:01:24 verbose #1064 > s -00:01:24 verbose #1065 > |> format_debug -00:01:24 verbose #1066 > |> ellipsis_end 400 -00:01:24 verbose #1067 > -00:01:24 verbose #1068 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1069 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1070 > │ ## split │ -00:01:24 verbose #1071 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1072 > -00:01:24 verbose #1073 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1074 > inl split (separator : string) (str : string) : array_base string = -00:01:24 verbose #1075 > $"!str.Split !separator" -00:01:24 verbose #1076 > -00:01:24 verbose #1077 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1078 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1079 > │ ## split_string │ -00:01:24 verbose #1080 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1081 > -00:01:24 verbose #1082 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1083 > inl split_string (separator : array_base string) (str : string) : array_base -00:01:24 verbose #1084 > string = -00:01:24 verbose #1085 > run_target function -00:01:24 verbose #1086 > | Fsharp (Native) => fun () => $"!str.Split (!separator, -00:01:24 verbose #1087 > System.StringSplitOptions.None)" -00:01:24 verbose #1088 > | _ => fun () => str |> split ((a separator : _ i32 _) |> seq.of_array -00:01:24 verbose #1089 > |> concat "") -00:01:24 verbose #1090 > -00:01:24 verbose #1091 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1092 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1093 > │ ## join' │ -00:01:24 verbose #1094 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1095 > -00:01:24 verbose #1096 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1097 > inl join' (concat : string) (s : a i32 string) : string = -00:01:24 verbose #1098 > $"System.String.Join (!concat, !s)" -00:01:24 verbose #1099 > -00:01:24 verbose #1100 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1101 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1102 > │ ## to_char_array │ -00:01:24 verbose #1103 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1104 > -00:01:24 verbose #1105 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1106 > inl to_char_array (str : string) : a i32 char = -00:01:24 verbose #1107 > am.init (str |> sm.length) (fun i => sm.index str i) -00:01:24 verbose #1108 > -00:01:24 verbose #1109 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1110 > //// test -00:01:24 verbose #1111 > -00:01:24 verbose #1112 > "abc" -00:01:24 verbose #1113 > |> to_char_array -00:01:24 verbose #1114 > |> _assert_eq (a ;[['a'; 'b'; 'c']]) -00:01:24 verbose #1115 > -00:01:24 verbose #1116 > ╭─[ 149.27ms - stdout ]────────────────────────────────────────────────────────╮ -00:01:24 verbose #1117 > │ assert_eq / actual: [|'a'; 'b'; 'c'|] / expected: [|'a'; 'b'; 'c'|] │ -00:01:24 verbose #1118 > │ │ -00:01:24 verbose #1119 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1120 > -00:01:24 verbose #1121 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1122 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1123 > │ ## to_char_list │ -00:01:24 verbose #1124 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1125 > -00:01:24 verbose #1126 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1127 > inl to_char_list (str : string) : list char = -00:01:24 verbose #1128 > listm.init (str |> sm.length) (fun (i : i64) => sm.index str i) -00:01:24 verbose #1129 > -00:01:24 verbose #1130 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1131 > //// test -00:01:24 verbose #1132 > -00:01:24 verbose #1133 > "abc" -00:01:24 verbose #1134 > |> to_char_list -00:01:24 verbose #1135 > |> _assert_eq [['a'; 'b'; 'c']] -00:01:24 verbose #1136 > -00:01:24 verbose #1137 > ╭─[ 90.82ms - stdout ]─────────────────────────────────────────────────────────╮ -00:01:24 verbose #1138 > │ assert_eq / actual: UH0_1 ('a', UH0_1 ('b', UH0_1 ('c', UH0_0))) / expected: │ -00:01:24 verbose #1139 > │ UH0_1 ('a', UH0_1 ('b', UH0_1 ('c', UH0_0))) │ -00:01:24 verbose #1140 > │ │ -00:01:24 verbose #1141 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1142 > -00:01:24 verbose #1143 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1144 > nominal encoding = $'System.Text.Encoding' -00:01:24 verbose #1145 > -00:01:24 verbose #1146 > inl encoding_utf8 () : encoding = -00:01:24 verbose #1147 > $'System.Text.Encoding.UTF8' -00:01:24 verbose #1148 > -00:01:24 verbose #1149 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1150 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1151 > │ ## utf8_get_bytes │ -00:01:24 verbose #1152 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1153 > -00:01:24 verbose #1154 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1155 > inl utf8_get_bytes (s : string) : a i32 u8 = -00:01:24 verbose #1156 > s |> $'`encoding.UTF8.GetBytes' -00:01:24 verbose #1157 > -00:01:24 verbose #1158 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1159 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1160 > │ ## byte_to_string │ -00:01:24 verbose #1161 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1162 > -00:01:24 verbose #1163 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1164 > inl byte_to_string (format : string) (x : u8) : string = -00:01:24 verbose #1165 > $'!x.ToString' format -00:01:24 verbose #1166 > -00:01:24 verbose #1167 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1168 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1169 > │ ## windows │ -00:01:24 verbose #1170 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1171 > -00:01:24 verbose #1172 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1173 > nominal windows t = $'std_slice_Windows<`t>' -00:01:24 verbose #1174 > -00:01:24 verbose #1175 > inl windows (len : unativeint) (source : am'.vec u8) : windows u8 = -00:01:24 verbose #1176 > inl source = source |> rust.new_box |> rust.box_leak -00:01:24 verbose #1177 > // inl source' = source |> rust.clone -00:01:24 verbose #1178 > inl result = !\\(len, $'"<[[_]]>::windows(!source, $0)"') -00:01:24 verbose #1179 > // source |> rust.drop -00:01:24 verbose #1180 > result -00:01:24 verbose #1181 > -00:01:24 verbose #1182 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1183 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1184 > │ ## any │ -00:01:24 verbose #1185 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1186 > -00:01:24 verbose #1187 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1188 > inl any forall t. (fn : string -> bool) (source : windows t) : bool = -00:01:24 verbose #1189 > (!\($'"true; let mut !source = !source"') : bool) |> ignore -00:01:24 verbose #1190 > inl fn' x = -00:01:24 verbose #1191 > x -00:01:24 verbose #1192 > |> str_from_utf8 -00:01:24 verbose #1193 > |> resultm.unwrap_or' #"" -00:01:24 verbose #1194 > |> ref_to_std_string -00:01:24 verbose #1195 > |> from_std_string -00:01:24 verbose #1196 > |> fn -00:01:24 verbose #1197 > !\\(fn', $'"!source.any(move |x| $0(x))"') -00:01:24 verbose #1198 > -00:01:24 verbose #1199 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1200 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1201 > │ ## slice_contains │ -00:01:24 verbose #1202 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1203 > -00:01:24 verbose #1204 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1205 > inl slice_contains (text : string) (source : am'.vec u8) : bool = -00:01:24 verbose #1206 > fun () => -00:01:24 verbose #1207 > inl source = join source -00:01:24 verbose #1208 > source -00:01:24 verbose #1209 > |> windows (text |> length |> (fun x => x : i32) |> unativeint) -00:01:24 verbose #1210 > |> any ((=.) text) -00:01:24 verbose #1211 > |> fun x => join x () -00:01:24 verbose #1212 > -00:01:24 verbose #1213 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1214 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1215 > │ ## as_bytes │ -00:01:24 verbose #1216 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1217 > -00:01:24 verbose #1218 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1219 > inl as_bytes (text : string) : rust.ref' (am'.slice u8) = -00:01:24 verbose #1220 > inl text = join text -00:01:24 verbose #1221 > !\($'"!text.as_bytes()"') -00:01:24 verbose #1222 > -00:01:24 verbose #1223 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1224 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1225 > │ ## main │ -00:01:24 verbose #1226 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1227 > -00:01:24 verbose #1228 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1229 > inl main () = -00:01:24 verbose #1230 > types () -00:01:24 verbose #1231 > $"let contains x = !contains x" : () -00:01:24 verbose #1232 > $"let ends_with x = !ends_with x" : () -00:01:24 verbose #1233 > $"let pad_left x = !pad_left x" : () -00:01:24 verbose #1234 > $"let pad_right x = !pad_right x" : () -00:01:24 verbose #1235 > $"let replace x = !replace x" : () -00:01:24 verbose #1236 > $"let replace_regex x = !replace_regex x" : () -00:01:24 verbose #1237 > inl slice (a : i32) (b : i32) c = slice a b c -00:01:24 verbose #1238 > $"let slice x = !slice x" : () -00:01:24 verbose #1239 > $"let split x = !split x" : () -00:01:24 verbose #1240 > $"let split_string x = !split_string x" : () -00:01:24 verbose #1241 > $"let starts_with x = !starts_with x" : () -00:01:24 verbose #1242 > $"let substring x = !substring x" : () -00:01:24 verbose #1243 > $"let to_lower x = !to_lower x" : () -00:01:24 verbose #1244 > $"let to_upper x = !to_upper x" : () -00:01:24 verbose #1245 > $"let trim x = !trim x" : () -00:01:24 verbose #1246 > $"let trim_end x = !trim_end x" : () -00:01:24 verbose #1247 > $"let trim_start x = !trim_start x" : () -00:01:24 verbose #1248 > $"let ellipsis x = !ellipsis x" : () -00:01:24 verbose #1249 > $"let ellipsis_end x = !ellipsis_end x" : () -00:01:24 verbose #1250 > $"let format_exception x = !format_exception x" : () -00:01:24 verbose #1251 > $"let concat_array_trailing x = !concat_array_trailing x" : () -00:01:24 verbose #1252 > inl concat a (b : seq.seq' string) = concat a b -00:01:24 verbose #1253 > $"let concat x = !concat x" : () -00:01:24 verbose #1254 > $"let join' x = !join' x" : () -00:01:24 verbose #1255 > $"let to_char_array x = !to_char_array x" : () -00:01:24 verbose #1256 > -00:01:24 verbose #1257 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:24 verbose #1258 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:24 verbose #1259 > │ ## to_string std_string │ -00:01:24 verbose #1260 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:24 verbose #1261 > -00:01:24 verbose #1262 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:24 verbose #1263 > open rust -00:01:24 verbose #1264 > instance to_string std_string = from_std_string -00:01:24 verbose #1265 > 00:01:22 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 61637 -00:01:24 verbose #1266 > 00:01:22 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:01:29 verbose #1267 > 00:01:27 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb to html\e[0m -00:01:29 verbose #1268 > 00:01:27 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:01:29 verbose #1269 > 00:01:27 verbose #7 \e[4;7m validate(nb)\e[0m -00:01:29 verbose #1270 > 00:01:27 verbose #8 \e[4;7m[NbConvertApp] Writing 461712 bytes to c:\home\git\polyglot\lib\spiral\sm'.dib.html\e[0m -00:01:29 verbose #1271 > 00:01:27 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 597 -00:01:29 verbose #1272 > 00:01:27 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 597 -00:01:29 verbose #1273 > 00:01:27 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/sm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/sm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:01:30 verbose #1274 > 00:01:28 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:01:30 verbose #1275 > 00:01:28 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:01:30 verbose #1276 > 00:01:28 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 62293 -00:01:30 debug #1277 execute_with_options_async / exit_code: 0 / output.Length: 64577 -00:01:30 debug #3 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path sm'.dib --retries 3 -00:01:30 debug #1278 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path rust.dib --retries 3", +00:00:06 verbose #10 > > +00:00:06 verbose #11 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:06 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:06 verbose #13 > > │ # sm' │ +00:00:06 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:06 verbose #15 > > +00:00:06 verbose #16 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:06 verbose #17 > > //// test +00:00:06 verbose #18 > > +00:00:06 verbose #19 > > open testing +00:00:06 verbose #20 > > +00:00:06 verbose #21 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:00:06 verbose #22 > > #r +00:00:06 verbose #23 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:06 verbose #24 > > otNet.Interactive.Spiral.dll" +00:00:06 verbose #25 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:00:06 verbose #26 > > #r +00:00:06 verbose #27 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:06 verbose #28 > > otNet.Interactive.dll" +00:00:06 verbose #29 > > open type Microsoft.DotNet.Interactive.Kernel +00:00:12 verbose #30 > > +00:00:12 verbose #31 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #32 > > open rust_operators +00:00:12 verbose #33 > > +00:00:12 verbose #34 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:12 verbose #35 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:12 verbose #36 > > │ ## types │ +00:00:12 verbose #37 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:12 verbose #38 > > +00:00:12 verbose #39 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #40 > > inl types () = +00:00:12 verbose #41 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #42 > > Fable.Core.Emit(\"str\")>]]\n#endif\ntype Str = class end" +00:00:12 verbose #43 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #44 > > Fable.Core.Emit(\"base64::DecodeError\")>]]\n#endif\ntype base64_DecodeError = +00:00:12 verbose #45 > > class end" +00:00:12 verbose #46 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #47 > > Fable.Core.Emit(\"borsh::io::Error\")>]]\n#endif\ntype borsh_io_Error = class +00:00:12 verbose #48 > > end" +00:00:12 verbose #49 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #50 > > Fable.Core.Emit(\"encoding_rs::Encoding\")>]]\n#endif\ntype encoding_rs_Encoding +00:00:12 verbose #51 > > = class end" +00:00:12 verbose #52 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #53 > > Fable.Core.Emit(\"js_sys::JsString\")>]]\n#endif\ntype js_sys_JsString = class +00:00:12 verbose #54 > > end" +00:00:12 verbose #55 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #56 > > Fable.Core.Emit(\"serde_json::Error\")>]]\n#endif\ntype serde_json_Error = class +00:00:12 verbose #57 > > end" +00:00:12 verbose #58 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #59 > > Fable.Core.Emit(\"serde_json::Value\")>]]\n#endif\ntype serde_json_Value = class +00:00:12 verbose #60 > > end" +00:00:12 verbose #61 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #62 > > Fable.Core.Emit(\"serde_wasm_bindgen::Error\")>]]\n#endif\ntype +00:00:12 verbose #63 > > serde_wasm_bindgen_Error = class end" +00:00:12 verbose #64 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #65 > > Fable.Core.Emit(\"std::ffi::OsStr\")>]]\n#endif\ntype std_ffi_OsStr = class end" +00:00:12 verbose #66 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #67 > > Fable.Core.Emit(\"std::ffi::OsString\")>]]\n#endif\ntype std_ffi_OsString = +00:00:12 verbose #68 > > class end" +00:00:12 verbose #69 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #70 > > Fable.Core.Emit(\"std::fmt::Display<$0>\")>]]\n#endif\ntype std_fmt_Display<'T> +00:00:12 verbose #71 > > = class end" +00:00:12 verbose #72 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #73 > > Fable.Core.Emit(\"std::str::Utf8Error\")>]]\n#endif\ntype std_str_Utf8Error = +00:00:12 verbose #74 > > class end" +00:00:12 verbose #75 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #76 > > Fable.Core.Emit(\"std::string::FromUtf8Error\")>]]\n#endif\ntype +00:00:12 verbose #77 > > std_string_FromUtf8Error = class end" +00:00:12 verbose #78 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #79 > > Fable.Core.Emit(\"std::string::String\")>]]\n#endif\ntype std_string_String = +00:00:12 verbose #80 > > class end" +00:00:12 verbose #81 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #82 > > Fable.Core.Emit(\"std::slice::Windows<$0>\")>]]\n#endif\ntype +00:00:12 verbose #83 > > std_slice_Windows<'T> = class end" +00:00:12 verbose #84 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #85 > > Fable.Core.Emit(\"regex::Regex\")>]]\n#endif\ntype regex_Regex = class end" +00:00:12 verbose #86 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #87 > > Fable.Core.Emit(\"regex::Captures\")>]]\n#endif\ntype regex_Captures = class +00:00:12 verbose #88 > > end" +00:00:12 verbose #89 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #90 > > Fable.Core.Emit(\"regex::CaptureMatches\")>]]\n#endif\ntype regex_CaptureMatches +00:00:12 verbose #91 > > = class end" +00:00:12 verbose #92 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:12 verbose #93 > > Fable.Core.Emit(\"regex::Error\")>]]\n#endif\ntype regex_Error = class end" +00:00:12 verbose #94 > > +00:00:12 verbose #95 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #96 > > inl types () = +00:00:12 verbose #97 > > rust.types () +00:00:12 verbose #98 > > mapm.types () +00:00:12 verbose #99 > > types () +00:00:12 verbose #100 > > +00:00:12 verbose #101 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #102 > > nominal display t = $"std_fmt_Display<`t>" +00:00:12 verbose #103 > > nominal str = $"Str" +00:00:12 verbose #104 > > nominal base64_decode_error = $"base64_DecodeError" +00:00:12 verbose #105 > > nominal borsh_io_error = $"borsh_io_Error" +00:00:12 verbose #106 > > nominal utf8_error = $"std_str_Utf8Error" +00:00:12 verbose #107 > > nominal from_utf8_error = $"std_string_FromUtf8Error" +00:00:12 verbose #108 > > nominal json_value = $"serde_json_Value" +00:00:12 verbose #109 > > nominal json_error = $"serde_json_Error" +00:00:12 verbose #110 > > nominal serde_wasm_bindgen_error = $"serde_wasm_bindgen_Error" +00:00:12 verbose #111 > > nominal js_string = $"js_sys_JsString" +00:00:12 verbose #112 > > nominal os_str = $"std_ffi_OsStr" +00:00:12 verbose #113 > > nominal os_string = $"std_ffi_OsString" +00:00:12 verbose #114 > > nominal std_string = $"std_string_String" +00:00:12 verbose #115 > > +00:00:12 verbose #116 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:12 verbose #117 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:12 verbose #118 > > │ ## contains │ +00:00:12 verbose #119 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:12 verbose #120 > > +00:00:12 verbose #121 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #122 > > inl contains (value : string) (s : string) : bool = +00:00:12 verbose #123 > > $"!s.Contains !value" +00:00:12 verbose #124 > > +00:00:12 verbose #125 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:12 verbose #126 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:12 verbose #127 > > │ ## ends_with │ +00:00:12 verbose #128 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:12 verbose #129 > > +00:00:12 verbose #130 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #131 > > inl ends_with (value : string) (s : string) : bool = +00:00:12 verbose #132 > > $"!s.EndsWith !value" +00:00:12 verbose #133 > > +00:00:12 verbose #134 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:12 verbose #135 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:12 verbose #136 > > │ ## last_index_of │ +00:00:12 verbose #137 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:12 verbose #138 > > +00:00:12 verbose #139 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #140 > > inl last_index_of (search : string) (s : string) : i32 = +00:00:12 verbose #141 > > $"!s.LastIndexOf !search" +00:00:12 verbose #142 > > +00:00:12 verbose #143 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:12 verbose #144 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:12 verbose #145 > > │ ## pad_left │ +00:00:12 verbose #146 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:12 verbose #147 > > +00:00:12 verbose #148 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #149 > > inl pad_left (total_width : i32) (padding_char : char) (s : string) : string = +00:00:12 verbose #150 > > $"!s.PadLeft (!total_width, !padding_char)" +00:00:12 verbose #151 > > +00:00:12 verbose #152 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:12 verbose #153 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:12 verbose #154 > > │ ## pad_right │ +00:00:12 verbose #155 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:12 verbose #156 > > +00:00:12 verbose #157 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #158 > > inl pad_right (total_width : i32) (padding_char : char) (s : string) : string = +00:00:12 verbose #159 > > $"!s.PadRight (!total_width, !padding_char)" +00:00:12 verbose #160 > > +00:00:12 verbose #161 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:12 verbose #162 > > //// test +00:00:12 verbose #163 > > +00:00:12 verbose #164 > > "123" +00:00:12 verbose #165 > > |> pad_right 6 ' ' +00:00:12 verbose #166 > > |> _assert_eq "123 " +00:00:13 verbose #167 > > +00:00:13 verbose #168 > > ╭─[ 818.21ms - stdout ]────────────────────────────────────────────────────────╮ +00:00:13 verbose #169 > > │ assert_eq / actual: "123 " / expected: "123 " │ +00:00:13 verbose #170 > > │ │ +00:00:13 verbose #171 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #172 > > +00:00:13 verbose #173 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #174 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #175 > > │ ## starts_with │ +00:00:13 verbose #176 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #177 > > +00:00:13 verbose #178 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #179 > > inl starts_with (value : string) (s : string) : bool = +00:00:13 verbose #180 > > $"!s.StartsWith !value" +00:00:13 verbose #181 > > +00:00:13 verbose #182 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #183 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #184 > > │ ## substring │ +00:00:13 verbose #185 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #186 > > +00:00:13 verbose #187 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #188 > > inl substring (start : i32) (len : i32) (str : string) : string = +00:00:13 verbose #189 > > $"!str.Substring (!start, !len)" +00:00:13 verbose #190 > > +00:00:13 verbose #191 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #192 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #193 > > │ ## to_lower │ +00:00:13 verbose #194 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #195 > > +00:00:13 verbose #196 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #197 > > inl to_lower (input : string) : string = +00:00:13 verbose #198 > > $"!input.ToLower ()" +00:00:13 verbose #199 > > +00:00:13 verbose #200 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #201 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #202 > > │ ## to_upper │ +00:00:13 verbose #203 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #204 > > +00:00:13 verbose #205 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #206 > > inl to_upper (input : string) : string = +00:00:13 verbose #207 > > $"!input.ToUpper ()" +00:00:13 verbose #208 > > +00:00:13 verbose #209 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #210 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #211 > > │ ## trim │ +00:00:13 verbose #212 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #213 > > +00:00:13 verbose #214 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #215 > > inl trim (input : string) : string = +00:00:13 verbose #216 > > $"!input.Trim ()" +00:00:13 verbose #217 > > +00:00:13 verbose #218 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #219 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #220 > > │ ## trim_end │ +00:00:13 verbose #221 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #222 > > +00:00:13 verbose #223 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #224 > > inl trim_end (trim_chars : array_base char) (input : string) : string = +00:00:13 verbose #225 > > $"!input.TrimEnd !trim_chars" +00:00:13 verbose #226 > > +00:00:13 verbose #227 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #228 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #229 > > │ ## trim_start │ +00:00:13 verbose #230 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #231 > > +00:00:13 verbose #232 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #233 > > inl trim_start (trim_chars : array_base char) (input : string) : string = +00:00:13 verbose #234 > > $"!input.TrimStart !trim_chars" +00:00:13 verbose #235 > > +00:00:13 verbose #236 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #237 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #238 > > │ ## length │ +00:00:13 verbose #239 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #240 > > +00:00:13 verbose #241 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #242 > > inl length forall dim {int}. (input : string) : dim = +00:00:13 verbose #243 > > input |> sm.length +00:00:13 verbose #244 > > +00:00:13 verbose #245 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #246 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #247 > > │ ## length' │ +00:00:13 verbose #248 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #249 > > +00:00:13 verbose #250 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #251 > > inl length' forall dim. (input : string) : dim = +00:00:13 verbose #252 > > input |> $'String.length' +00:00:13 verbose #253 > > +00:00:13 verbose #254 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #255 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #256 > > │ ## is_empty │ +00:00:13 verbose #257 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #258 > > +00:00:13 verbose #259 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #260 > > inl is_empty (input : string) : bool = +00:00:13 verbose #261 > > length input = 0i32 +00:00:13 verbose #262 > > +00:00:13 verbose #263 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #264 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #265 > > │ ## slice │ +00:00:13 verbose #266 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #267 > > +00:00:13 verbose #268 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #269 > > inl slice from to s : string = +00:00:13 verbose #270 > > sm.slice s { from to } +00:00:13 verbose #271 > > +00:00:13 verbose #272 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #273 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #274 > > │ ## range │ +00:00:13 verbose #275 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #276 > > +00:00:13 verbose #277 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #278 > > inl range forall t. (start : am'.range t) (end : am'.range t) s = +00:00:13 verbose #279 > > inl start, end = +00:00:13 verbose #280 > > match start, end with +00:00:13 verbose #281 > > | Start start, End fn => +00:00:13 verbose #282 > > start, s |> length' |> fn +00:00:13 verbose #283 > > | End start_fn, End end_fn => +00:00:13 verbose #284 > > inl len = s |> length' +00:00:13 verbose #285 > > start_fn len, end_fn len +00:00:13 verbose #286 > > s |> slice (start |> u64) (end |> u64) +00:00:13 verbose #287 > > +00:00:13 verbose #288 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #289 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #290 > > │ ## raw_string_literal │ +00:00:13 verbose #291 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #292 > > +00:00:13 verbose #293 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #294 > > inl raw_string_literal (s : string) : rust.ref' str = +00:00:13 verbose #295 > > !\($"\"r#\\\"\" + !s + \"\\\"#\"") +00:00:13 verbose #296 > > +00:00:13 verbose #297 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #298 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #299 > > │ ## raw_string_literal_static │ +00:00:13 verbose #300 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #301 > > +00:00:13 verbose #302 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #303 > > inl raw_string_literal_static (s : string) : rust.static_ref' str = +00:00:13 verbose #304 > > !\($"\"r#\\\"\" + !s + \"\\\"#\"") +00:00:13 verbose #305 > > +00:00:13 verbose #306 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #307 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #308 > > │ ## (~#) │ +00:00:13 verbose #309 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #310 > > +00:00:13 verbose #311 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #312 > > inl (~#) s = +00:00:13 verbose #313 > > s |> raw_string_literal +00:00:13 verbose #314 > > +00:00:13 verbose #315 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #316 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #317 > > │ ## (~##) │ +00:00:13 verbose #318 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #319 > > +00:00:13 verbose #320 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #321 > > inl (~##) s = +00:00:13 verbose #322 > > s |> raw_string_literal_static +00:00:13 verbose #323 > > +00:00:13 verbose #324 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #325 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #326 > > │ ## include_str │ +00:00:13 verbose #327 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #328 > > +00:00:13 verbose #329 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #330 > > inl include_str (path : string) : rust.ref' str = +00:00:13 verbose #331 > > !\($'"include_str\!(\\\"" + !path + "\\\")"') +00:00:13 verbose #332 > > +00:00:13 verbose #333 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #334 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #335 > > │ ## as_str │ +00:00:13 verbose #336 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #337 > > +00:00:13 verbose #338 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #339 > > inl as_str (s : string) : rust.ref' str = +00:00:13 verbose #340 > > // !\\(s, $'"fable_library_rust::String_::LrcStr::as_str(&$0)"') +00:00:13 verbose #341 > > !\\(s, $'"&*$0"') +00:00:13 verbose #342 > > +00:00:13 verbose #343 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #344 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #345 > > │ ## from_std_string │ +00:00:13 verbose #346 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #347 > > +00:00:13 verbose #348 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #349 > > inl from_std_string (str : std_string) : string = +00:00:13 verbose #350 > > !\\(str, $'"fable_library_rust::String_::fromString($0)"') +00:00:13 verbose #351 > > +00:00:13 verbose #352 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #353 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #354 > > │ ## ref_to_std_string │ +00:00:13 verbose #355 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #356 > > +00:00:13 verbose #357 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #358 > > inl ref_to_std_string (str : rust.ref' str) : std_string = +00:00:13 verbose #359 > > !\\(str, $'"String::from($0)"') +00:00:13 verbose #360 > > +00:00:13 verbose #361 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #362 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #363 > > │ ## cow_to_std_string │ +00:00:13 verbose #364 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #365 > > +00:00:13 verbose #366 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #367 > > inl cow_to_std_string (str : rust.cow str) : std_string = +00:00:13 verbose #368 > > !\\(str, $'"String::from($0)"') +00:00:13 verbose #369 > > +00:00:13 verbose #370 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #371 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #372 > > │ ## to_std_string │ +00:00:13 verbose #373 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #374 > > +00:00:13 verbose #375 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #376 > > inl to_std_string (s : string) : std_string = +00:00:13 verbose #377 > > s |> as_str |> ref_to_std_string +00:00:13 verbose #378 > > +00:00:13 verbose #379 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #380 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #381 > > │ ## as_str_std │ +00:00:13 verbose #382 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #383 > > +00:00:13 verbose #384 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #385 > > inl as_str_std (s : std_string) : rust.ref' str = +00:00:13 verbose #386 > > !\\(s, $'"$0.as_str()"') +00:00:13 verbose #387 > > +00:00:13 verbose #388 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #389 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #390 > > │ ## into_boxed_str │ +00:00:13 verbose #391 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #392 > > +00:00:13 verbose #393 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #394 > > inl into_boxed_str (s : std_string) : rust.box str = +00:00:13 verbose #395 > > !\\(s, $'"$0.into_boxed_str()"') +00:00:13 verbose #396 > > +00:00:13 verbose #397 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #398 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #399 > > │ ## os_string_as_ref │ +00:00:13 verbose #400 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #401 > > +00:00:13 verbose #402 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #403 > > inl os_string_as_ref (s : os_string) : rust.ref' os_str = +00:00:13 verbose #404 > > !\\(s, $'"$0.as_ref()"') +00:00:13 verbose #405 > > +00:00:13 verbose #406 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #407 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #408 > > │ ## to_os_string │ +00:00:13 verbose #409 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #410 > > +00:00:13 verbose #411 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #412 > > inl to_os_string (s : rust.ref' os_str) : os_string = +00:00:13 verbose #413 > > !\\(s, $'"$0.to_os_string()"') +00:00:13 verbose #414 > > +00:00:13 verbose #415 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #416 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #417 > > │ ## os_to_str │ +00:00:13 verbose #418 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #419 > > +00:00:13 verbose #420 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #421 > > inl os_to_str (s : os_string) : optionm'.option' (rust.ref' str) = +00:00:13 verbose #422 > > !\\(s, $'"$0.to_str()"') +00:00:13 verbose #423 > > +00:00:13 verbose #424 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #425 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #426 > > │ ## from_os_str_ref │ +00:00:13 verbose #427 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #428 > > +00:00:13 verbose #429 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #430 > > inl from_os_str_ref s = +00:00:13 verbose #431 > > s +00:00:13 verbose #432 > > |> to_os_string +00:00:13 verbose #433 > > |> os_to_str +00:00:13 verbose #434 > > |> optionm'.unwrap +00:00:13 verbose #435 > > |> ref_to_std_string +00:00:13 verbose #436 > > |> from_std_string +00:00:13 verbose #437 > > +00:00:13 verbose #438 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #439 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #440 > > │ ## obj_to_string │ +00:00:13 verbose #441 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #442 > > +00:00:13 verbose #443 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #444 > > inl obj_to_string x : string = +00:00:13 verbose #445 > > x |> $'_.ToString()' +00:00:13 verbose #446 > > +00:00:13 verbose #447 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #448 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #449 > > │ ## to_string any │ +00:00:13 verbose #450 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #451 > > +00:00:13 verbose #452 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #453 > > instance to_string any = +00:00:13 verbose #454 > > obj_to_string +00:00:13 verbose #455 > > +00:00:13 verbose #456 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #457 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #458 > > │ ## to_string result t u │ +00:00:13 verbose #459 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #460 > > +00:00:13 verbose #461 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #462 > > instance to_string result t u = fun x => +00:00:13 verbose #463 > > real +00:00:13 verbose #464 > > open rust +00:00:13 verbose #465 > > typecase (t * u) with +00:00:13 verbose #466 > > | string * string => +00:00:13 verbose #467 > > match x with +00:00:13 verbose #468 > > | Ok x => x +00:00:13 verbose #469 > > | Error x => $'"sm\'.to_string result / Error: " + !x + ""' : string +00:00:13 verbose #470 > > | std_string * std_string => +00:00:13 verbose #471 > > match x with +00:00:13 verbose #472 > > | Ok x => from_std_string x +00:00:13 verbose #473 > > | Error x => $'"sm\'.to_string result / Error: " + string !x + ""' : +00:00:13 verbose #474 > > string +00:00:13 verbose #475 > > | _ => obj_to_string `u x +00:00:13 verbose #476 > > +00:00:13 verbose #477 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #478 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #479 > > │ ## format_debug │ +00:00:13 verbose #480 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #481 > > +00:00:13 verbose #482 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #483 > > inl format_debug x : string = +00:00:13 verbose #484 > > $'$"%A{!x}"' +00:00:13 verbose #485 > > +00:00:13 verbose #486 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #487 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #488 > > │ ## format_custom' │ +00:00:13 verbose #489 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #490 > > +00:00:13 verbose #491 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #492 > > inl format_custom' format x : std_string = +00:00:13 verbose #493 > > !\\(x, $'"format\!(\\\"" + !format + "\\\", $0)"') +00:00:13 verbose #494 > > +00:00:13 verbose #495 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #496 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #497 > > │ ## format' │ +00:00:13 verbose #498 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #499 > > +00:00:13 verbose #500 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #501 > > inl format' x : std_string = +00:00:13 verbose #502 > > run_target function +00:00:13 verbose #503 > > | Rust _ => fun () => +00:00:13 verbose #504 > > !\\(x, $'"format\!(\\\"{}\\\", $0)"') +00:00:13 verbose #505 > > | _ => fun () => null () +00:00:13 verbose #506 > > +00:00:13 verbose #507 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #508 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #509 > > │ ## format_debug' │ +00:00:13 verbose #510 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #511 > > +00:00:13 verbose #512 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #513 > > inl format_debug' x : std_string = +00:00:13 verbose #514 > > run_target function +00:00:13 verbose #515 > > | Rust _ => fun () => +00:00:13 verbose #516 > > !\\(x, $'"format\!(\\\"{:?}\\\", $0)"') +00:00:13 verbose #517 > > | _ => fun () => null () +00:00:13 verbose #518 > > +00:00:13 verbose #519 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:13 verbose #520 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:13 verbose #521 > > │ ## format_pretty' │ +00:00:13 verbose #522 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:13 verbose #523 > > +00:00:13 verbose #524 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:13 verbose #525 > > inl format_pretty' x : std_string = +00:00:13 verbose #526 > > run_target function +00:00:13 verbose #527 > > | Rust _ => fun () => +00:00:13 verbose #528 > > !\\(x, $'"format\!(\\\"{:#?}\\\", $0)"') +00:00:13 verbose #529 > > | _ => fun () => null () +00:00:14 verbose #530 > > +00:00:14 verbose #531 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #532 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #533 > > │ ## format_hex' │ +00:00:14 verbose #534 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #535 > > +00:00:14 verbose #536 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #537 > > inl format_hex' x : std_string = +00:00:14 verbose #538 > > run_target function +00:00:14 verbose #539 > > | Rust _ => fun () => +00:00:14 verbose #540 > > !\\(x, $'"format\!(\\\"{:x}\\\", $0)"') +00:00:14 verbose #541 > > | _ => fun () => null () +00:00:14 verbose #542 > > +00:00:14 verbose #543 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #544 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #545 > > │ ## format'' │ +00:00:14 verbose #546 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #547 > > +00:00:14 verbose #548 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #549 > > inl format'' (format : string) : std_string = +00:00:14 verbose #550 > > !\($'@@$"format\!(" + !format + ")"') +00:00:14 verbose #551 > > +00:00:14 verbose #552 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #553 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #554 > > │ ## format_exception │ +00:00:14 verbose #555 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #556 > > +00:00:14 verbose #557 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #558 > > inl format_exception (ex : exn) : string = +00:00:14 verbose #559 > > run_target function +00:00:14 verbose #560 > > | Fsharp (Native) => fun () => $'$"{!ex.GetType ()}: {!ex.Message}"' +00:00:14 verbose #561 > > | _ => fun () => ex |> format_debug +00:00:14 verbose #562 > > +00:00:14 verbose #563 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #564 > > //// test +00:00:14 verbose #565 > > +00:00:14 verbose #566 > > fun () => failwith "test" +00:00:14 verbose #567 > > |> _throws +00:00:14 verbose #568 > > |> optionm.map sm'.format_exception +00:00:14 verbose #569 > > |> _assert_eq (Some "System.Exception: test") +00:00:14 verbose #570 > > +00:00:14 verbose #571 > > ╭─[ 579.99ms - stdout ]────────────────────────────────────────────────────────╮ +00:00:14 verbose #572 > > │ assert_eq / actual: US1_0 "System.Exception: test" / expected: US1_0 │ +00:00:14 verbose #573 > > │ "System.Exception: test" │ +00:00:14 verbose #574 > > │ │ +00:00:14 verbose #575 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #576 > > +00:00:14 verbose #577 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #578 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #579 > > │ ## replace │ +00:00:14 verbose #580 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #581 > > +00:00:14 verbose #582 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #583 > > inl replace (old_value : string) (new_value : string) (s : string) : string = +00:00:14 verbose #584 > > $"!s.Replace (!old_value, !new_value)" +00:00:14 verbose #585 > > +00:00:14 verbose #586 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #587 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #588 > > │ ## regex │ +00:00:14 verbose #589 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #590 > > +00:00:14 verbose #591 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #592 > > nominal regex = $'regex_Regex' +00:00:14 verbose #593 > > +00:00:14 verbose #594 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #595 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #596 > > │ ## regex_error │ +00:00:14 verbose #597 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #598 > > +00:00:14 verbose #599 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #600 > > nominal regex_error = $'regex_Error' +00:00:14 verbose #601 > > +00:00:14 verbose #602 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #603 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #604 > > │ ## new_regex │ +00:00:14 verbose #605 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #606 > > +00:00:14 verbose #607 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #608 > > inl new_regex (pattern : string) : resultm.result' regex regex_error = +00:00:14 verbose #609 > > run_target function +00:00:14 verbose #610 > > | Rust (Native) => fun () => +00:00:14 verbose #611 > > inl pattern = join pattern +00:00:14 verbose #612 > > !\\(pattern, $'$"regex::Regex::new(&$0)"') +00:00:14 verbose #613 > > | _ => fun () => null () +00:00:14 verbose #614 > > +00:00:14 verbose #615 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #616 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #617 > > │ ## captures │ +00:00:14 verbose #618 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #619 > > +00:00:14 verbose #620 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #621 > > nominal regex_captures = $'regex_Captures' +00:00:14 verbose #622 > > +00:00:14 verbose #623 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #624 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #625 > > │ ## regex_capture_matches │ +00:00:14 verbose #626 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #627 > > +00:00:14 verbose #628 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #629 > > nominal regex_capture_matches = $'regex_CaptureMatches' +00:00:14 verbose #630 > > +00:00:14 verbose #631 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #632 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #633 > > │ ## regex_captures │ +00:00:14 verbose #634 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #635 > > +00:00:14 verbose #636 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #637 > > inl regex_captures (s : string) (regex : regex) : am'.vec (mapm.hash_map +00:00:14 verbose #638 > > (rust.ref' str) (rust.ref' str)) = +00:00:14 verbose #639 > > inl s = join s +00:00:14 verbose #640 > > !\\(regex, $'$"$0.captures_iter(&*!s).map(|caps| $0.capture_names().map(|x| +00:00:14 verbose #641 > > x.and_then(|n| Some((n, +00:00:14 verbose #642 > > caps.name(n)?.as_str())))).flatten().collect()).collect()"') +00:00:14 verbose #643 > > +00:00:14 verbose #644 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:14 verbose #645 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:14 verbose #646 > > │ ## replace_regex │ +00:00:14 verbose #647 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #648 > > +00:00:14 verbose #649 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #650 > > inl replace_regex (pattern : string) (replacement : string) (s : string) : +00:00:14 verbose #651 > > string = +00:00:14 verbose #652 > > run_target function +00:00:14 verbose #653 > > | Fsharp (Native) => fun () => +00:00:14 verbose #654 > > inl replacement = join replacement +00:00:14 verbose #655 > > $"System.Text.RegularExpressions.Regex.Replace (!s, !pattern, +00:00:14 verbose #656 > > !replacement)" +00:00:14 verbose #657 > > | Rust (Native) => fun () => +00:00:14 verbose #658 > > inl s = join s +00:00:14 verbose #659 > > inl replacement = join replacement +00:00:14 verbose #660 > > inl regex = pattern |> new_regex |> resultm.unwrap' +00:00:14 verbose #661 > > !\\((regex, s, replacement), $'$"$0.replace_all(&$1, &*$2)"') +00:00:14 verbose #662 > > |> cow_to_std_string +00:00:14 verbose #663 > > |> from_std_string +00:00:14 verbose #664 > > | _ => fun () => null () +00:00:14 verbose #665 > > +00:00:14 verbose #666 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #667 > > //// test +00:00:14 verbose #668 > > +00:00:14 verbose #669 > > " 123" +00:00:14 verbose #670 > > |> replace_regex "\\s\\w2" "" +00:00:14 verbose #671 > > |> _assert_eq "3" +00:00:14 verbose #672 > > +00:00:14 verbose #673 > > ╭─[ 58.80ms - stdout ]─────────────────────────────────────────────────────────╮ +00:00:14 verbose #674 > > │ assert_eq / actual: "3" / expected: "3" │ +00:00:14 verbose #675 > > │ │ +00:00:14 verbose #676 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:14 verbose #677 > > +00:00:14 verbose #678 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:14 verbose #679 > > //// test +00:00:14 verbose #680 > > ///! rust -d regex +00:00:14 verbose #681 > > +00:00:14 verbose #682 > > types () +00:00:14 verbose #683 > > " 123" +00:00:14 verbose #684 > > |> replace_regex "\\s\\w2" "" +00:00:14 verbose #685 > > |> _assert_eq "3" +00:00:23 verbose #686 > > +00:00:23 verbose #687 > > ╭─[ 8.29s - return value ]─────────────────────────────────────────────────────╮ +00:00:23 verbose #688 > > │ assert_eq / actual: "3" / expected: "3" │ +00:00:23 verbose #689 > > │ │ +00:00:23 verbose #690 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #691 > > +00:00:23 verbose #692 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #693 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #694 > > │ ## serialize │ +00:00:23 verbose #695 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #696 > > +00:00:23 verbose #697 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #698 > > inl serialize forall t. (x : t) : resultm.result' std_string json_error = +00:00:23 verbose #699 > > !\($'"serde_json::to_string(&!x)"') +00:00:23 verbose #700 > > +00:00:23 verbose #701 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #702 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #703 > > │ ## deserialize │ +00:00:23 verbose #704 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #705 > > +00:00:23 verbose #706 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #707 > > inl deserialize forall t. (json : string) : resultm.result' t std_string = +00:00:23 verbose #708 > > inl json = join json +00:00:23 verbose #709 > > inl json = json |> as_str +00:00:23 verbose #710 > > !\($'"serde_json::from_str(&!json)"') +00:00:23 verbose #711 > > |> resultm.map_error' fun (x : json_error) => x |> format' +00:00:23 verbose #712 > > +00:00:23 verbose #713 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #714 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #715 > > │ ## borsh_deserialize │ +00:00:23 verbose #716 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #717 > > +00:00:23 verbose #718 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #719 > > inl borsh_deserialize forall t. (data : array_base u8) : resultm.result' t +00:00:23 verbose #720 > > std_string = +00:00:23 verbose #721 > > inl data = data |> am'.as_slice +00:00:23 verbose #722 > > (!\($'"true; let mut !data = !data"') : bool) |> ignore +00:00:23 verbose #723 > > inl result = !\($'"borsh::BorshDeserialize::deserialize(&mut !data)"') +00:00:23 verbose #724 > > result +00:00:23 verbose #725 > > |> resultm.map_error' fun (x : borsh_io_error) => x |> format' +00:00:23 verbose #726 > > +00:00:23 verbose #727 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #728 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #729 > > │ ## deserialize_vec │ +00:00:23 verbose #730 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #731 > > +00:00:23 verbose #732 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #733 > > inl deserialize_vec (value : json_value) : resultm.result' (am'.vec u8) +00:00:23 verbose #734 > > std_string = +00:00:23 verbose #735 > > inl value = join value +00:00:23 verbose #736 > > !\($'"serde_json::from_value(!value)"') +00:00:23 verbose #737 > > |> resultm.map_error' fun (x : json_error) => x |> format' +00:00:23 verbose #738 > > +00:00:23 verbose #739 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #740 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #741 > > │ ## encode_uri_component │ +00:00:23 verbose #742 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #743 > > +00:00:23 verbose #744 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #745 > > inl encode_uri_component (s : std_string) : js_string = +00:00:23 verbose #746 > > !\($'"js_sys::encode_uri_component(&!s)"') +00:00:23 verbose #747 > > +00:00:23 verbose #748 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #749 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #750 > > │ ## strip_prefix │ +00:00:23 verbose #751 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #752 > > +00:00:23 verbose #753 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #754 > > inl strip_prefix (prefix : char) (s : std_string) : optionm'.option' (rust.ref' +00:00:23 verbose #755 > > str) = +00:00:23 verbose #756 > > inl s = join s +00:00:23 verbose #757 > > !\($'"!s.strip_prefix(!prefix)"') +00:00:23 verbose #758 > > +00:00:23 verbose #759 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #760 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #761 > > │ ## str_from_utf8 │ +00:00:23 verbose #762 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #763 > > +00:00:23 verbose #764 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #765 > > inl str_from_utf8 (bytes : rust.ref' (am'.slice u8)) : resultm.result' +00:00:23 verbose #766 > > (rust.ref' str) utf8_error = +00:00:23 verbose #767 > > !\($'"std::str::from_utf8(!bytes)"') +00:00:23 verbose #768 > > +00:00:23 verbose #769 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #770 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #771 > > │ ## string_from_utf8 │ +00:00:23 verbose #772 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #773 > > +00:00:23 verbose #774 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #775 > > inl string_from_utf8 (bytes : am'.vec u8) : resultm.result' std_string +00:00:23 verbose #776 > > from_utf8_error = +00:00:23 verbose #777 > > !\($'"std::string::String::from_utf8(!bytes)"') +00:00:23 verbose #778 > > +00:00:23 verbose #779 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #780 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #781 > > │ ## base64_decode │ +00:00:23 verbose #782 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #783 > > +00:00:23 verbose #784 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #785 > > inl base64_decode (s : std_string) : result std_string std_string = +00:00:23 verbose #786 > > fun () => +00:00:23 verbose #787 > > inl s = join s +00:00:23 verbose #788 > > inl bytes : resultm.result' (am'.vec u8) base64_decode_error = +00:00:23 verbose #789 > > +00:00:23 verbose #790 > > !\($'"base64::Engine::decode(&base64::engine::general_purpose::STANDARD, !s)"') +00:00:23 verbose #791 > > bytes +00:00:23 verbose #792 > > |> resultm.map_error' format' +00:00:23 verbose #793 > > |> resultm.try' +00:00:23 verbose #794 > > |> string_from_utf8 +00:00:23 verbose #795 > > |> resultm.map_error' format' +00:00:23 verbose #796 > > |> fun x => +00:00:23 verbose #797 > > join x () +00:00:23 verbose #798 > > |> resultm.unbox +00:00:23 verbose #799 > > +00:00:23 verbose #800 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #801 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #802 > > │ ## encoding' │ +00:00:23 verbose #803 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #804 > > +00:00:23 verbose #805 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #806 > > nominal encoding' = $'encoding_rs_Encoding' +00:00:23 verbose #807 > > +00:00:23 verbose #808 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #809 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #810 > > │ ## encoding_utf8' │ +00:00:23 verbose #811 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #812 > > +00:00:23 verbose #813 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #814 > > inl encoding_utf8' () : rust.ref' encoding' = +00:00:23 verbose #815 > > !\($'"encoding_rs::UTF_8"') +00:00:23 verbose #816 > > +00:00:23 verbose #817 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #818 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #819 > > │ ## encoding_1252 │ +00:00:23 verbose #820 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #821 > > +00:00:23 verbose #822 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #823 > > inl encoding_1252' () : rust.ref' encoding' = +00:00:23 verbose #824 > > !\($'"encoding_rs::WINDOWS_1252"') +00:00:23 verbose #825 > > +00:00:23 verbose #826 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #827 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #828 > > │ ## encoding_encode │ +00:00:23 verbose #829 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #830 > > +00:00:23 verbose #831 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #832 > > inl encoding_encode' (encoding : rust.ref' encoding') (text : string) : rust.cow +00:00:23 verbose #833 > > (am'.slice u8) = +00:00:23 verbose #834 > > !\\((encoding, text), $'"$0.encode(&*$1).0"') +00:00:23 verbose #835 > > +00:00:23 verbose #836 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #837 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #838 > > │ ## write_all_text │ +00:00:23 verbose #839 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #840 > > +00:00:23 verbose #841 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #842 > > inl write_all_text (path : string) (text : string) : () = +00:00:23 verbose #843 > > run_target function +00:00:23 verbose #844 > > | Fsharp (Native) => fun () => +00:00:23 verbose #845 > > inl text = join text +00:00:23 verbose #846 > > $'System.IO.File.WriteAllText (!path, !text)' +00:00:23 verbose #847 > > | Rust (Native) => fun () => +00:00:23 verbose #848 > > open rust_operators +00:00:23 verbose #849 > > !\\((path, text), $'"std::fs::write(&*$0, &*$1).unwrap()"') +00:00:23 verbose #850 > > | _ => fun () => null () +00:00:23 verbose #851 > > +00:00:23 verbose #852 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #853 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #854 > > │ ## utf8_decode │ +00:00:23 verbose #855 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #856 > > +00:00:23 verbose #857 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #858 > > inl utf8_decode (data : am'.vec u8) : resultm.result' std_string (rust.cow str) +00:00:23 verbose #859 > > = +00:00:23 verbose #860 > > !\($'$"encoding::Encoding::decode(encoding::all::UTF_8, &!data, +00:00:23 verbose #861 > > encoding::DecoderTrap::Replace)"') +00:00:23 verbose #862 > > +00:00:23 verbose #863 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:23 verbose #864 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:23 verbose #865 > > │ ## concat_array_trailing │ +00:00:23 verbose #866 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:23 verbose #867 > > +00:00:23 verbose #868 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #869 > > inl concat_array_trailing (separator : string) (input : a i32 string) = +00:00:23 verbose #870 > > ("", input) +00:00:23 verbose #871 > > ||> am.fold fun acc (x : string) => +00:00:23 verbose #872 > > $'!acc + !x + !separator + ""' +00:00:23 verbose #873 > > +00:00:23 verbose #874 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:23 verbose #875 > > //// test +00:00:23 verbose #876 > > ///! rust +00:00:23 verbose #877 > > +00:00:23 verbose #878 > > ;[[ +00:00:23 verbose #879 > > "1" +00:00:23 verbose #880 > > "2" +00:00:23 verbose #881 > > "3" +00:00:23 verbose #882 > > ]] +00:00:23 verbose #883 > > |> fun x => +00:00:23 verbose #884 > > inl code = (a x : _ i32 _) |> concat_array_trailing "\n" +00:00:23 verbose #885 > > code +00:00:23 verbose #886 > > |> _assert_eq "1\n2\n3\n" +00:00:28 verbose #887 > > +00:00:28 verbose #888 > > ╭─[ 5.07s - return value ]─────────────────────────────────────────────────────╮ +00:00:28 verbose #889 > > │ assert_eq / actual: "1 │ +00:00:28 verbose #890 > > │ 2 │ +00:00:28 verbose #891 > > │ 3 │ +00:00:28 verbose #892 > > │ " / expected: "1 │ +00:00:28 verbose #893 > > │ 2 │ +00:00:28 verbose #894 > > │ 3 │ +00:00:28 verbose #895 > > │ " │ +00:00:28 verbose #896 > > │ │ +00:00:28 verbose #897 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:28 verbose #898 > > +00:00:28 verbose #899 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:28 verbose #900 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:28 verbose #901 > > │ ## concat_list_trailing │ +00:00:28 verbose #902 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:28 verbose #903 > > +00:00:28 verbose #904 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:28 verbose #905 > > inl concat_list_trailing separator input = +00:00:28 verbose #906 > > ("", input) +00:00:28 verbose #907 > > ||> listm.fold fun acc (x : string) => +00:00:28 verbose #908 > > $'!acc + !x + !separator + ""' +00:00:28 verbose #909 > > +00:00:28 verbose #910 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:28 verbose #911 > > //// test +00:00:28 verbose #912 > > ///! rust +00:00:28 verbose #913 > > +00:00:28 verbose #914 > > [[ +00:00:28 verbose #915 > > "1" +00:00:28 verbose #916 > > "2" +00:00:28 verbose #917 > > "3" +00:00:28 verbose #918 > > ]] +00:00:28 verbose #919 > > |> fun x => +00:00:28 verbose #920 > > inl code = (x : _) |> concat_list_trailing "\n" +00:00:28 verbose #921 > > code +00:00:28 verbose #922 > > |> _assert_eq "1\n2\n3\n" +00:00:33 verbose #923 > > +00:00:33 verbose #924 > > ╭─[ 4.61s - return value ]─────────────────────────────────────────────────────╮ +00:00:33 verbose #925 > > │ assert_eq / actual: "1 │ +00:00:33 verbose #926 > > │ 2 │ +00:00:33 verbose #927 > > │ 3 │ +00:00:33 verbose #928 > > │ " / expected: "1 │ +00:00:33 verbose #929 > > │ 2 │ +00:00:33 verbose #930 > > │ 3 │ +00:00:33 verbose #931 > > │ " │ +00:00:33 verbose #932 > > │ │ +00:00:33 verbose #933 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:33 verbose #934 > > +00:00:33 verbose #935 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:33 verbose #936 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:33 verbose #937 > > │ ## concat_list_heap_trailing │ +00:00:33 verbose #938 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:33 verbose #939 > > +00:00:33 verbose #940 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:33 verbose #941 > > inl concat_list_heap_trailing separator input = +00:00:33 verbose #942 > > inl separator = join separator +00:00:33 verbose #943 > > inl separator = separator |> as_str +00:00:33 verbose #944 > > ("", input) +00:00:33 verbose #945 > > ||> listm.fold fun acc (x : string) => +00:00:33 verbose #946 > > inl acc = acc |> to_std_string +00:00:33 verbose #947 > > inl x = x |> as_str +00:00:33 verbose #948 > > $'$"{!acc}{!x}{!separator}"' +00:00:33 verbose #949 > > +00:00:33 verbose #950 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:33 verbose #951 > > //// test +00:00:33 verbose #952 > > ///! rust +00:00:33 verbose #953 > > +00:00:33 verbose #954 > > types () +00:00:33 verbose #955 > > +00:00:33 verbose #956 > > [[ +00:00:33 verbose #957 > > "1" +00:00:33 verbose #958 > > "2" +00:00:33 verbose #959 > > "3" +00:00:33 verbose #960 > > ]] +00:00:33 verbose #961 > > |> fun x => +00:00:33 verbose #962 > > inl code = (x : _) |> concat_list_heap_trailing "\n" +00:00:33 verbose #963 > > code +00:00:33 verbose #964 > > |> _assert_eq "1\n2\n3\n" +00:00:37 verbose #965 > > +00:00:37 verbose #966 > > ╭─[ 4.56s - return value ]─────────────────────────────────────────────────────╮ +00:00:37 verbose #967 > > │ assert_eq / actual: "1 │ +00:00:37 verbose #968 > > │ 2 │ +00:00:37 verbose #969 > > │ 3 │ +00:00:37 verbose #970 > > │ " / expected: "1 │ +00:00:37 verbose #971 > > │ 2 │ +00:00:37 verbose #972 > > │ 3 │ +00:00:37 verbose #973 > > │ " │ +00:00:37 verbose #974 > > │ │ +00:00:37 verbose #975 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:37 verbose #976 > > +00:00:37 verbose #977 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:37 verbose #978 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:37 verbose #979 > > │ ## concat │ +00:00:37 verbose #980 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:37 verbose #981 > > +00:00:37 verbose #982 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:37 verbose #983 > > inl concat (a : string) (b : seq.seq' _) : string = +00:00:37 verbose #984 > > inl a = join a +00:00:37 verbose #985 > > b |> $"String.concat" a +00:00:37 verbose #986 > > +00:00:37 verbose #987 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:37 verbose #988 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:37 verbose #989 > > │ ## ellipsis │ +00:00:37 verbose #990 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:37 verbose #991 > > +00:00:37 verbose #992 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:37 verbose #993 > > inl ellipsis (max : i32) (s : string) = +00:00:37 verbose #994 > > if sm.length s <= max +00:00:37 verbose #995 > > then s +00:00:37 verbose #996 > > else s |> slice 0 (max - 1) |> fun x => $'!x + "..."' +00:00:37 verbose #997 > > +00:00:37 verbose #998 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:37 verbose #999 > > //// test +00:00:37 verbose #1000 > > +00:00:37 verbose #1001 > > "12345" +00:00:37 verbose #1002 > > |> ellipsis 2 +00:00:37 verbose #1003 > > |> _assert_eq "12..." +00:00:37 verbose #1004 > > +00:00:37 verbose #1005 > > "12345" +00:00:37 verbose #1006 > > |> ellipsis 4 +00:00:37 verbose #1007 > > |> _assert_eq "1234..." +00:00:38 verbose #1008 > > +00:00:38 verbose #1009 > > ╭─[ 99.14ms - stdout ]─────────────────────────────────────────────────────────╮ +00:00:38 verbose #1010 > > │ assert_eq / actual: "12..." / expected: "12..." │ +00:00:38 verbose #1011 > > │ assert_eq / actual: "1234..." / expected: "1234..." │ +00:00:38 verbose #1012 > > │ │ +00:00:38 verbose #1013 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1014 > > +00:00:38 verbose #1015 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1016 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1017 > > │ ## ellipsis_end │ +00:00:38 verbose #1018 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1019 > > +00:00:38 verbose #1020 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1021 > > let ellipsis_end (max : i64) (s : string) = +00:00:38 verbose #1022 > > inl len = sm.length s +00:00:38 verbose #1023 > > if len <= max +00:00:38 verbose #1024 > > then s +00:00:38 verbose #1025 > > else +00:00:38 verbose #1026 > > inl half = f64 max / 2 +00:00:38 verbose #1027 > > inl start_half = half |> math.ceil |> i64 +00:00:38 verbose #1028 > > inl end_half = half |> math.floor |> i64 +00:00:38 verbose #1029 > > inl start = s |> slice 0 (start_half - 1) +00:00:38 verbose #1030 > > inl end = s |> slice (len - end_half) (len - 1) +00:00:38 verbose #1031 > > (a ;[[start; "..."; end]] : _ i32 _) +00:00:38 verbose #1032 > > |> seq.of_array +00:00:38 verbose #1033 > > |> concat "" +00:00:38 verbose #1034 > > +00:00:38 verbose #1035 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1036 > > //// test +00:00:38 verbose #1037 > > +00:00:38 verbose #1038 > > "12345" +00:00:38 verbose #1039 > > |> ellipsis_end 2 +00:00:38 verbose #1040 > > |> _assert_eq "1...5" +00:00:38 verbose #1041 > > +00:00:38 verbose #1042 > > "12345" +00:00:38 verbose #1043 > > |> ellipsis_end 3 +00:00:38 verbose #1044 > > |> _assert_eq "12...5" +00:00:38 verbose #1045 > > +00:00:38 verbose #1046 > > "1234567" +00:00:38 verbose #1047 > > |> ellipsis_end 4 +00:00:38 verbose #1048 > > |> _assert_eq "12...67" +00:00:38 verbose #1049 > > +00:00:38 verbose #1050 > > ╭─[ 278.64ms - stdout ]────────────────────────────────────────────────────────╮ +00:00:38 verbose #1051 > > │ assert_eq / actual: "1...5" / expected: "1...5" │ +00:00:38 verbose #1052 > > │ assert_eq / actual: "12...5" / expected: "12...5" │ +00:00:38 verbose #1053 > > │ assert_eq / actual: "12...67" / expected: "12...67" │ +00:00:38 verbose #1054 > > │ │ +00:00:38 verbose #1055 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1056 > > +00:00:38 verbose #1057 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1058 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1059 > > │ ## format_ellipsis │ +00:00:38 verbose #1060 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1061 > > +00:00:38 verbose #1062 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1063 > > inl format_ellipsis s = +00:00:38 verbose #1064 > > s +00:00:38 verbose #1065 > > |> format_debug +00:00:38 verbose #1066 > > |> ellipsis_end 400 +00:00:38 verbose #1067 > > +00:00:38 verbose #1068 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1069 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1070 > > │ ## split │ +00:00:38 verbose #1071 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1072 > > +00:00:38 verbose #1073 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1074 > > inl split (separator : string) (str : string) : array_base string = +00:00:38 verbose #1075 > > $"!str.Split !separator" +00:00:38 verbose #1076 > > +00:00:38 verbose #1077 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1078 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1079 > > │ ## split_string │ +00:00:38 verbose #1080 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1081 > > +00:00:38 verbose #1082 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1083 > > inl split_string (separator : array_base string) (str : string) : array_base +00:00:38 verbose #1084 > > string = +00:00:38 verbose #1085 > > run_target function +00:00:38 verbose #1086 > > | Fsharp (Native) => fun () => $"!str.Split (!separator, +00:00:38 verbose #1087 > > System.StringSplitOptions.None)" +00:00:38 verbose #1088 > > | _ => fun () => str |> split ((a separator : _ i32 _) |> seq.of_array +00:00:38 verbose #1089 > > |> concat "") +00:00:38 verbose #1090 > > +00:00:38 verbose #1091 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1092 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1093 > > │ ## join' │ +00:00:38 verbose #1094 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1095 > > +00:00:38 verbose #1096 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1097 > > inl join' (concat : string) (s : a i32 string) : string = +00:00:38 verbose #1098 > > $"System.String.Join (!concat, !s)" +00:00:38 verbose #1099 > > +00:00:38 verbose #1100 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1101 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1102 > > │ ## to_char_array │ +00:00:38 verbose #1103 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1104 > > +00:00:38 verbose #1105 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1106 > > inl to_char_array (str : string) : a i32 char = +00:00:38 verbose #1107 > > am.init (str |> sm.length) (fun i => sm.index str i) +00:00:38 verbose #1108 > > +00:00:38 verbose #1109 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1110 > > //// test +00:00:38 verbose #1111 > > +00:00:38 verbose #1112 > > "abc" +00:00:38 verbose #1113 > > |> to_char_array +00:00:38 verbose #1114 > > |> _assert_eq (a ;[['a'; 'b'; 'c']]) +00:00:38 verbose #1115 > > +00:00:38 verbose #1116 > > ╭─[ 138.15ms - stdout ]────────────────────────────────────────────────────────╮ +00:00:38 verbose #1117 > > │ assert_eq / actual: [|'a'; 'b'; 'c'|] / expected: [|'a'; 'b'; 'c'|] │ +00:00:38 verbose #1118 > > │ │ +00:00:38 verbose #1119 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1120 > > +00:00:38 verbose #1121 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1122 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1123 > > │ ## to_char_list │ +00:00:38 verbose #1124 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1125 > > +00:00:38 verbose #1126 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1127 > > inl to_char_list (str : string) : list char = +00:00:38 verbose #1128 > > listm.init (str |> sm.length) (fun (i : i64) => sm.index str i) +00:00:38 verbose #1129 > > +00:00:38 verbose #1130 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1131 > > //// test +00:00:38 verbose #1132 > > +00:00:38 verbose #1133 > > "abc" +00:00:38 verbose #1134 > > |> to_char_list +00:00:38 verbose #1135 > > |> _assert_eq [['a'; 'b'; 'c']] +00:00:38 verbose #1136 > > +00:00:38 verbose #1137 > > ╭─[ 77.61ms - stdout ]─────────────────────────────────────────────────────────╮ +00:00:38 verbose #1138 > > │ assert_eq / actual: UH0_1 ('a', UH0_1 ('b', UH0_1 ('c', UH0_0))) / expected: │ +00:00:38 verbose #1139 > > │ UH0_1 ('a', UH0_1 ('b', UH0_1 ('c', UH0_0))) │ +00:00:38 verbose #1140 > > │ │ +00:00:38 verbose #1141 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1142 > > +00:00:38 verbose #1143 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1144 > > nominal encoding = $'System.Text.Encoding' +00:00:38 verbose #1145 > > +00:00:38 verbose #1146 > > inl encoding_utf8 () : encoding = +00:00:38 verbose #1147 > > $'System.Text.Encoding.UTF8' +00:00:38 verbose #1148 > > +00:00:38 verbose #1149 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1150 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1151 > > │ ## utf8_get_bytes │ +00:00:38 verbose #1152 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1153 > > +00:00:38 verbose #1154 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1155 > > inl utf8_get_bytes (s : string) : a i32 u8 = +00:00:38 verbose #1156 > > s |> $'`encoding.UTF8.GetBytes' +00:00:38 verbose #1157 > > +00:00:38 verbose #1158 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1159 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1160 > > │ ## byte_to_string │ +00:00:38 verbose #1161 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1162 > > +00:00:38 verbose #1163 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1164 > > inl byte_to_string (format : string) (x : u8) : string = +00:00:38 verbose #1165 > > $'!x.ToString' format +00:00:38 verbose #1166 > > +00:00:38 verbose #1167 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1168 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1169 > > │ ## windows │ +00:00:38 verbose #1170 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1171 > > +00:00:38 verbose #1172 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1173 > > nominal windows t = $'std_slice_Windows<`t>' +00:00:38 verbose #1174 > > +00:00:38 verbose #1175 > > inl windows (len : unativeint) (source : am'.vec u8) : windows u8 = +00:00:38 verbose #1176 > > inl source = source |> rust.new_box |> rust.box_leak +00:00:38 verbose #1177 > > // inl source' = source |> rust.clone +00:00:38 verbose #1178 > > inl result = !\\(len, $'"<[[_]]>::windows(!source, $0)"') +00:00:38 verbose #1179 > > // source |> rust.drop +00:00:38 verbose #1180 > > result +00:00:38 verbose #1181 > > +00:00:38 verbose #1182 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1183 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1184 > > │ ## any │ +00:00:38 verbose #1185 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1186 > > +00:00:38 verbose #1187 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1188 > > inl any forall t. (fn : string -> bool) (source : windows t) : bool = +00:00:38 verbose #1189 > > (!\($'"true; let mut !source = !source"') : bool) |> ignore +00:00:38 verbose #1190 > > inl fn' x = +00:00:38 verbose #1191 > > x +00:00:38 verbose #1192 > > |> str_from_utf8 +00:00:38 verbose #1193 > > |> resultm.unwrap_or' #"" +00:00:38 verbose #1194 > > |> ref_to_std_string +00:00:38 verbose #1195 > > |> from_std_string +00:00:38 verbose #1196 > > |> fn +00:00:38 verbose #1197 > > !\\(fn', $'"!source.any(move |x| $0(x))"') +00:00:38 verbose #1198 > > +00:00:38 verbose #1199 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1200 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1201 > > │ ## slice_contains │ +00:00:38 verbose #1202 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1203 > > +00:00:38 verbose #1204 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1205 > > inl slice_contains (text : string) (source : am'.vec u8) : bool = +00:00:38 verbose #1206 > > fun () => +00:00:38 verbose #1207 > > inl source = join source +00:00:38 verbose #1208 > > source +00:00:38 verbose #1209 > > |> windows (text |> length |> (fun x => x : i32) |> unativeint) +00:00:38 verbose #1210 > > |> any ((=.) text) +00:00:38 verbose #1211 > > |> fun x => join x () +00:00:38 verbose #1212 > > +00:00:38 verbose #1213 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1214 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1215 > > │ ## as_bytes │ +00:00:38 verbose #1216 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1217 > > +00:00:38 verbose #1218 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1219 > > inl as_bytes (text : string) : rust.ref' (am'.slice u8) = +00:00:38 verbose #1220 > > inl text = join text +00:00:38 verbose #1221 > > !\($'"!text.as_bytes()"') +00:00:38 verbose #1222 > > +00:00:38 verbose #1223 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:38 verbose #1224 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:38 verbose #1225 > > │ ## main │ +00:00:38 verbose #1226 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:38 verbose #1227 > > +00:00:38 verbose #1228 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:38 verbose #1229 > > inl main () = +00:00:38 verbose #1230 > > types () +00:00:38 verbose #1231 > > $"let contains x = !contains x" : () +00:00:38 verbose #1232 > > $"let ends_with x = !ends_with x" : () +00:00:38 verbose #1233 > > $"let pad_left x = !pad_left x" : () +00:00:38 verbose #1234 > > $"let pad_right x = !pad_right x" : () +00:00:38 verbose #1235 > > $"let replace x = !replace x" : () +00:00:38 verbose #1236 > > $"let replace_regex x = !replace_regex x" : () +00:00:38 verbose #1237 > > inl slice (a : i32) (b : i32) c = slice a b c +00:00:38 verbose #1238 > > $"let slice x = !slice x" : () +00:00:38 verbose #1239 > > $"let split x = !split x" : () +00:00:38 verbose #1240 > > $"let split_string x = !split_string x" : () +00:00:38 verbose #1241 > > $"let starts_with x = !starts_with x" : () +00:00:38 verbose #1242 > > $"let substring x = !substring x" : () +00:00:38 verbose #1243 > > $"let to_lower x = !to_lower x" : () +00:00:38 verbose #1244 > > $"let to_upper x = !to_upper x" : () +00:00:38 verbose #1245 > > $"let trim x = !trim x" : () +00:00:38 verbose #1246 > > $"let trim_end x = !trim_end x" : () +00:00:38 verbose #1247 > > $"let trim_start x = !trim_start x" : () +00:00:38 verbose #1248 > > $"let ellipsis x = !ellipsis x" : () +00:00:38 verbose #1249 > > $"let ellipsis_end x = !ellipsis_end x" : () +00:00:38 verbose #1250 > > $"let format_exception x = !format_exception x" : () +00:00:38 verbose #1251 > > $"let concat_array_trailing x = !concat_array_trailing x" : () +00:00:38 verbose #1252 > > inl concat a (b : seq.seq' string) = concat a b +00:00:38 verbose #1253 > > $"let concat x = !concat x" : () +00:00:38 verbose #1254 > > $"let join' x = !join' x" : () +00:00:38 verbose #1255 > > $"let to_char_array x = !to_char_array x" : () +00:00:39 verbose #1256 > > +00:00:39 verbose #1257 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:39 verbose #1258 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:39 verbose #1259 > > │ ## to_string std_string │ +00:00:39 verbose #1260 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:39 verbose #1261 > > +00:00:39 verbose #1262 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:39 verbose #1263 > > open rust +00:00:39 verbose #1264 > > instance to_string std_string = from_std_string +00:00:39 verbose #1265 > 00:00:37 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 61637 +00:00:39 verbose #1266 > 00:00:37 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:00:42 verbose #1267 > 00:00:39 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb to html +00:00:42 verbose #1268 > 00:00:39 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:42 verbose #1269 > 00:00:39 verbose #7 ! validate(nb) +00:00:44 verbose #1270 > 00:00:42 verbose #8 ! [NbConvertApp] Writing 461712 bytes to c:\home\git\polyglot\lib\spiral\sm'.dib.html +00:00:44 verbose #1271 > 00:00:42 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 637 +00:00:44 verbose #1272 > 00:00:42 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 637 +00:00:44 verbose #1273 > 00:00:42 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/sm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/sm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:00:46 verbose #1274 > 00:00:43 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:00:46 verbose #1275 > 00:00:43 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:00:46 verbose #1276 > 00:00:44 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 62333 +00:00:46 debug #1277 execute_with_options_async / exit_code: 0 / output.Length: 67047 +00:00:46 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path sm'.dib --retries 3 +00:00:46 debug #1278 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path rust.dib --retries 3", [||], None, None, true, None) -00:01:30 verbose #1279 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "rust.dib", "--retries", "3"]) -00:01:30 verbose #1280 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/rust.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/rust.dib" --output-path "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:01:38 verbose #1281 > -00:01:38 verbose #1282 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1283 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1284 > │ # rust │ -00:01:38 verbose #1285 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1286 > -00:01:38 verbose #1287 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1288 > //// test -00:01:38 verbose #1289 > -00:01:38 verbose #1290 > open testing -00:01:38 verbose #1291 > -00:01:38 verbose #1292 > ── spiral - import ───────────────────────────────────────────────────────────── -00:01:38 verbose #1293 > #r -00:01:38 verbose #1294 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:38 verbose #1295 > otNet.Interactive.Spiral.dll" -00:01:38 verbose #1296 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:01:38 verbose #1297 > #r -00:01:38 verbose #1298 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:38 verbose #1299 > otNet.Interactive.dll" -00:01:38 verbose #1300 > open type Microsoft.DotNet.Interactive.Kernel -00:01:38 verbose #1301 > -00:01:38 verbose #1302 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1303 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1304 > │ ## types │ -00:01:38 verbose #1305 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1306 > -00:01:38 verbose #1307 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1308 > inl types () = -00:01:38 verbose #1309 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1310 > Fable.Core.Emit(\"_\")>]]\n#endif\ntype Any = class end" -00:01:38 verbose #1311 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1312 > Fable.Core.Emit(\"Func0<$0>\")>]]\n#endif\ntype Func0<'T> = class end" -00:01:38 verbose #1313 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Func1<$0, -00:01:38 verbose #1314 > $1>\")>]]\n#endif\ntype Func0<'T, 'U> = class end" -00:01:38 verbose #1315 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1316 > Fable.Core.Emit(\"Box<$0>\")>]]\n#endif\ntype Box<'T> = class end" -00:01:38 verbose #1317 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"dyn -00:01:38 verbose #1318 > $0\")>]]\n#endif\ntype Dyn<'T> = class end" -00:01:38 verbose #1319 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"$0 + -00:01:38 verbose #1320 > Send\")>]]\n#endif\ntype Send<'T> = class end" -00:01:38 verbose #1321 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn() -> -00:01:38 verbose #1322 > $0\")>]]\n#endif\ntype Fn<'T> = class end" -00:01:38 verbose #1323 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1324 > Fable.Core.Emit(\"Fn()\")>]]\n#endif\ntype FnUnit = class end" -00:01:38 verbose #1325 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"FnOnce() -00:01:38 verbose #1326 > -> $0\")>]]\n#endif\ntype FnOnce<'T> = class end" -00:01:38 verbose #1327 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1328 > Fable.Core.Emit(\"Fn($0)\")>]]\n#endif\ntype ActionFn<'T> = class end" -00:01:38 verbose #1329 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn($0, -00:01:38 verbose #1330 > $1)\")>]]\n#endif\ntype ActionFn2<'T, 'U> = class end" -00:01:38 verbose #1331 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"impl -00:01:38 verbose #1332 > $0\")>]]\n#endif\ntype Impl<'T> = class end" -00:01:38 verbose #1333 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"mut -00:01:38 verbose #1334 > $0\")>]]\n#endif\ntype Mut<'T> = class end" -00:01:38 verbose #1335 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1336 > Fable.Core.Emit(\"&$0\")>]]\n#endif\ntype Ref<'T> = class end" -00:01:38 verbose #1337 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"&'static -00:01:38 verbose #1338 > $0\")>]]\n#endif\ntype StaticRef<'T> = class end" -00:01:38 verbose #1339 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1340 > Fable.Core.Emit(\"MutCell<$0>\")>]]\n#endif\ntype MutCell<'T> = class end" -00:01:38 verbose #1341 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1342 > Fable.Core.Emit(\"std::any::Any\")>]]\n#endif\ntype std_any_Any = class end" -00:01:38 verbose #1343 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1344 > Fable.Core.Emit(\"std::borrow::Cow<$0>\")>]]\n#endif\ntype std_borrow_Cow<'T> = -00:01:38 verbose #1345 > class end" -00:01:38 verbose #1346 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1347 > Fable.Core.Emit(\"std::cell::RefCell<$0>\")>]]\n#endif\ntype -00:01:38 verbose #1348 > std_cell_RefCell<'T> = class end" -00:01:38 verbose #1349 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1350 > Fable.Core.Emit(\"std::pin::Pin<$0>\")>]]\n#endif\ntype std_pin_Pin<'T> = class -00:01:38 verbose #1351 > end" -00:01:38 verbose #1352 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1353 > Fable.Core.Emit(\"std::rc::Rc<$0>\")>]]\n#endif\ntype std_rc_Rc<'T> = class end" -00:01:38 verbose #1354 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:01:38 verbose #1355 > Fable.Core.Emit(\"std::rc::Weak<$0>\")>]]\n#endif\ntype std_rc_Weak<'T> = class -00:01:38 verbose #1356 > end" -00:01:38 verbose #1357 > -00:01:38 verbose #1358 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1359 > nominal any' = $"Any" -00:01:38 verbose #1360 > nominal cow t = $"std_borrow_Cow<`t>" -00:01:38 verbose #1361 > nominal ref_cell t = $"std_cell_RefCell<`t>" -00:01:38 verbose #1362 > nominal rc t = $"std_rc_Rc<`t>" -00:01:38 verbose #1363 > nominal weak_rc t = $"std_rc_Weak<`t>" -00:01:38 verbose #1364 > nominal box t = $"Box<`t>" -00:01:38 verbose #1365 > nominal mut_cell t = $"MutCell<`t>" -00:01:38 verbose #1366 > nominal pin t = $"std_pin_Pin<`t>" -00:01:38 verbose #1367 > nominal dyn' t = $"Dyn<`t>" -00:01:38 verbose #1368 > nominal fn' t = $"Fn<`t>" -00:01:38 verbose #1369 > nominal action_fn t = $"ActionFn<`t>" -00:01:38 verbose #1370 > nominal action_fn2 t u = $"ActionFn2<`t, `u>" -00:01:38 verbose #1371 > nominal fn_once t = $"FnOnce<`t>" -00:01:38 verbose #1372 > nominal fn_unit = $"FnUnit" -00:01:38 verbose #1373 > nominal func0 t = $"Func0<`t>" -00:01:38 verbose #1374 > nominal func1 t u = -00:01:38 verbose #1375 > `( -00:01:38 verbose #1376 > typecase t with -00:01:38 verbose #1377 > | () => `func0 `u -00:01:38 verbose #1378 > | _ => $'' : $"Func0<`t, `u>" -00:01:38 verbose #1379 > ) -00:01:38 verbose #1380 > nominal impl t = $"Impl<`t>" -00:01:38 verbose #1381 > nominal mut' t = $"Mut<`t>" -00:01:38 verbose #1382 > nominal ref' t = $"Ref<`t>" -00:01:38 verbose #1383 > nominal send t = $"Send<`t>" -00:01:38 verbose #1384 > nominal static_ref' t = $"StaticRef<`t>" -00:01:38 verbose #1385 > -00:01:38 verbose #1386 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1387 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1388 > │ ## emit_expr │ -00:01:38 verbose #1389 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1390 > -00:01:38 verbose #1391 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1392 > inl emit_expr forall a t. (args : a) (code : string) : t = -00:01:38 verbose #1393 > real -00:01:38 verbose #1394 > $"Fable.Core.RustInterop.emitRustExpr !args !code" : t -00:01:38 verbose #1395 > -00:01:38 verbose #1396 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1397 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1398 > │ ## (~!\\) │ -00:01:38 verbose #1399 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1400 > -00:01:38 verbose #1401 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1402 > inl (~!\) forall t. (code : string) : t = -00:01:38 verbose #1403 > emit_expr () code -00:01:38 verbose #1404 > -00:01:38 verbose #1405 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1406 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1407 > │ ## (~!\\\\) │ -00:01:38 verbose #1408 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1409 > -00:01:38 verbose #1410 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1411 > inl (~!\\) forall t u. ((args : t), (code : string)) : u = -00:01:38 verbose #1412 > emit_expr args code -00:01:38 verbose #1413 > -00:01:38 verbose #1414 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1415 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1416 > │ ## emit │ -00:01:38 verbose #1417 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1418 > -00:01:38 verbose #1419 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1420 > inl emit forall t. (x : t) : t = -00:01:38 verbose #1421 > !\\(x, $'"$0"') -00:01:38 verbose #1422 > -00:01:38 verbose #1423 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1424 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1425 > │ ## emit' │ -00:01:38 verbose #1426 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1427 > -00:01:38 verbose #1428 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1429 > inl emit' forall t. (x : t) : t = -00:01:38 verbose #1430 > !\\(x, $'"let !x = $0"') -00:01:38 verbose #1431 > x -00:01:38 verbose #1432 > -00:01:38 verbose #1433 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1434 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1435 > │ ## clone │ -00:01:38 verbose #1436 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1437 > -00:01:38 verbose #1438 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1439 > inl clone forall t. (x : t) : t = -00:01:38 verbose #1440 > !\($'"!x.clone()"') -00:01:38 verbose #1441 > -00:01:38 verbose #1442 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1443 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1444 > │ ## new_box │ -00:01:38 verbose #1445 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1446 > -00:01:38 verbose #1447 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1448 > inl new_box forall t. (x : t) : box t = -00:01:38 verbose #1449 > inl x = join x -00:01:38 verbose #1450 > !\($'"Box::new(!x)"') -00:01:38 verbose #1451 > -00:01:38 verbose #1452 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1453 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1454 > │ ## new_rc │ -00:01:38 verbose #1455 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1456 > -00:01:38 verbose #1457 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1458 > inl new_rc forall t. (x : t) : rc t = -00:01:38 verbose #1459 > inl x = join x -00:01:38 verbose #1460 > !\($'"std::rc::Rc::new(!x)"') -00:01:38 verbose #1461 > -00:01:38 verbose #1462 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1463 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1464 > │ ## rc_clone │ -00:01:38 verbose #1465 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1466 > -00:01:38 verbose #1467 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1468 > inl rc_clone forall t. (x : rc t) : rc t = -00:01:38 verbose #1469 > inl x = join x -00:01:38 verbose #1470 > !\($'"std::rc::Rc::clone(&!x)"') -00:01:38 verbose #1471 > -00:01:38 verbose #1472 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1473 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1474 > │ ## rc_unwrap_or_clone │ -00:01:38 verbose #1475 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1476 > -00:01:38 verbose #1477 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1478 > inl rc_unwrap_or_clone forall t. (x : rc t) : t = -00:01:38 verbose #1479 > inl x = join x -00:01:38 verbose #1480 > !\($'"std::rc::Rc::unwrap_or_clone(!x)"') -00:01:38 verbose #1481 > -00:01:38 verbose #1482 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1483 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1484 > │ ## rc_downgrade │ -00:01:38 verbose #1485 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1486 > -00:01:38 verbose #1487 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1488 > inl rc_downgrade forall t. (x : rc t) : weak_rc t = -00:01:38 verbose #1489 > inl x = join x -00:01:38 verbose #1490 > !\($'"std::rc::Rc::downgrade(&!x)"') -00:01:38 verbose #1491 > -00:01:38 verbose #1492 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1493 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1494 > │ ## new_ref_cell │ -00:01:38 verbose #1495 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1496 > -00:01:38 verbose #1497 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1498 > inl new_ref_cell forall t. (x : t) : ref_cell t = -00:01:38 verbose #1499 > inl x = join x -00:01:38 verbose #1500 > !\($'"std::cell::RefCell::new(!x)"') -00:01:38 verbose #1501 > -00:01:38 verbose #1502 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1503 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1504 > │ ## ref_cell_borrow │ -00:01:38 verbose #1505 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1506 > -00:01:38 verbose #1507 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1508 > inl ref_cell_borrow forall t. (x : rc (ref_cell t)) : t = -00:01:38 verbose #1509 > inl x = join x -00:01:38 verbose #1510 > !\($'"*std::cell::RefCell::borrow(&std::rc::Rc::clone(&!x))"') -00:01:38 verbose #1511 > -00:01:38 verbose #1512 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1513 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1514 > │ ## ref_cell_borrow_mut │ -00:01:38 verbose #1515 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1516 > -00:01:38 verbose #1517 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1518 > inl ref_cell_borrow_mut forall t. (x : rc (ref_cell t)) : mut' t = -00:01:38 verbose #1519 > inl x = join x -00:01:38 verbose #1520 > !\($'"*std::cell::RefCell::borrow_mut(&std::rc::Rc::clone(&!x))"') -00:01:38 verbose #1521 > -00:01:38 verbose #1522 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1523 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1524 > │ ## to_mut │ -00:01:38 verbose #1525 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1526 > -00:01:38 verbose #1527 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1528 > inl to_mut forall t. (x : t) : t = -00:01:38 verbose #1529 > (!\($'"true; // 1"') : bool) |> ignore -00:01:38 verbose #1530 > (!\($'"true; let mut !x = !x"') : bool) |> ignore -00:01:38 verbose #1531 > (!\($'"true; !x"') : bool) |> ignore -00:01:38 verbose #1532 > !\($'"!x"') -00:01:38 verbose #1533 > // inl result = !\($'"!x"') : mut' t -00:01:38 verbose #1534 > // !\($'"!result"') -00:01:38 verbose #1535 > // inl result = !\($'"*/ // a"') : mut' t -00:01:38 verbose #1536 > // inl result = !\($'"!x"') : mut' t -00:01:38 verbose #1537 > // result |> fun x => $'!x |> unbox // b' -00:01:38 verbose #1538 > -00:01:38 verbose #1539 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1540 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1541 > │ ## ref_map │ -00:01:38 verbose #1542 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1543 > -00:01:38 verbose #1544 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1545 > inl ref_map forall t u. (fn : t -> u) (x : ref' t) : ref' u = -00:01:38 verbose #1546 > !\($'"!fn(!x)"') -00:01:38 verbose #1547 > -00:01:38 verbose #1548 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1549 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1550 > │ ## cow_as_ref │ -00:01:38 verbose #1551 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1552 > -00:01:38 verbose #1553 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1554 > inl cow_as_ref forall t. (s : cow t) : ref' t = -00:01:38 verbose #1555 > !\\(s, $'"$0.as_ref()"') -00:01:38 verbose #1556 > -00:01:38 verbose #1557 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1558 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1559 > │ ## from_mut │ -00:01:38 verbose #1560 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1561 > -00:01:38 verbose #1562 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1563 > inl from_mut forall t. (x : mut' t) : t = -00:01:38 verbose #1564 > !\($'"!x"') -00:01:38 verbose #1565 > -00:01:38 verbose #1566 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1567 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1568 > │ ## box_fn │ -00:01:38 verbose #1569 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1570 > -00:01:38 verbose #1571 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1572 > inl box_fn forall t. (x : () -> ()) : box t = -00:01:38 verbose #1573 > inl x = join x -00:01:38 verbose #1574 > !\($'"Box::new(move || !x())"') -00:01:38 verbose #1575 > -00:01:38 verbose #1576 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1577 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1578 > │ ## box_pin │ -00:01:38 verbose #1579 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1580 > -00:01:38 verbose #1581 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1582 > inl box_pin forall t. (x : t) : pin (box t) = -00:01:38 verbose #1583 > inl x = join x -00:01:38 verbose #1584 > !\($'"Box::pin(!x)"') -00:01:38 verbose #1585 > -00:01:38 verbose #1586 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1587 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1588 > │ ## to_ref │ -00:01:38 verbose #1589 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1590 > -00:01:38 verbose #1591 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1592 > inl to_ref forall t. (x : t) : ref' t = -00:01:38 verbose #1593 > !\\(x, $'"&$0"') -00:01:38 verbose #1594 > -00:01:38 verbose #1595 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1596 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1597 > │ ## deref │ -00:01:38 verbose #1598 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1599 > -00:01:38 verbose #1600 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1601 > inl deref forall t. (ref : ref' t) : t = -00:01:38 verbose #1602 > !\\(ref, $'"*$0"') -00:01:38 verbose #1603 > -00:01:38 verbose #1604 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1605 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1606 > │ ## ops_deref │ -00:01:38 verbose #1607 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1608 > -00:01:38 verbose #1609 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1610 > inl ops_deref forall t. (ref : t) : t = -00:01:38 verbose #1611 > inl ref = join ref -00:01:38 verbose #1612 > !\($'"core::ops::Deref::deref(&!ref)"') -00:01:38 verbose #1613 > -00:01:38 verbose #1614 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1615 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1616 > │ ## func0_invoke │ -00:01:38 verbose #1617 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1618 > -00:01:38 verbose #1619 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1620 > inl func0_invoke forall t. (x : func0 t) : t = -00:01:38 verbose #1621 > !\\(x, $'"$0()"') -00:01:38 verbose #1622 > -00:01:38 verbose #1623 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1624 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1625 > │ ## func0_move │ -00:01:38 verbose #1626 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1627 > -00:01:38 verbose #1628 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1629 > inl func0_move forall t. (fn : func0 t) : t = -00:01:38 verbose #1630 > inl fn = join fn -00:01:38 verbose #1631 > !\($'"(move || !fn())()"') -00:01:38 verbose #1632 > -00:01:38 verbose #1633 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1634 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1635 > │ ## move │ -00:01:38 verbose #1636 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1637 > -00:01:38 verbose #1638 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1639 > inl move forall t. (fn : () -> t) : func0 t = -00:01:38 verbose #1640 > !\\(fn, $'"Func0::new(move || $0())"') -00:01:38 verbose #1641 > -00:01:38 verbose #1642 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1643 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1644 > │ ## to_static_ref_unbox │ -00:01:38 verbose #1645 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1646 > -00:01:38 verbose #1647 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1648 > inl to_static_ref_unbox forall t. (x : ref' t) : static_ref' t = -00:01:38 verbose #1649 > x |> unbox -00:01:38 verbose #1650 > -00:01:38 verbose #1651 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1652 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1653 > │ ## from_static_ref_unbox │ -00:01:38 verbose #1654 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1655 > -00:01:38 verbose #1656 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1657 > inl from_static_ref_unbox forall t. (x : static_ref' t) : ref' t = -00:01:38 verbose #1658 > x |> unbox -00:01:38 verbose #1659 > -00:01:38 verbose #1660 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1661 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1662 > │ ## box_leak │ -00:01:38 verbose #1663 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1664 > -00:01:38 verbose #1665 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1666 > inl box_leak forall t. (x : box t) : static_ref' (mut' t) = -00:01:38 verbose #1667 > !\\(x, $'"Box::leak($0)"') -00:01:38 verbose #1668 > -00:01:38 verbose #1669 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1670 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1671 > │ ## drop │ -00:01:38 verbose #1672 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1673 > -00:01:38 verbose #1674 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1675 > inl drop forall t. (x : t) : () = -00:01:38 verbose #1676 > !\\(x, $'"drop($0)"') -00:01:38 verbose #1677 > -00:01:38 verbose #1678 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1679 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1680 > │ ## break │ -00:01:38 verbose #1681 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1682 > -00:01:38 verbose #1683 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1684 > inl break () : () = -00:01:38 verbose #1685 > (!\($'"true; break"') : bool) |> ignore -00:01:38 verbose #1686 > -00:01:38 verbose #1687 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1688 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1689 > │ ## fix_closure │ -00:01:38 verbose #1690 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1691 > -00:01:38 verbose #1692 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1693 > inl fix_closure depth' x' = -00:01:38 verbose #1694 > inl depth = depth' |> fst -00:01:38 verbose #1695 > if depth = 1 -00:01:38 verbose #1696 > then !\($'"!x' })"') -00:01:38 verbose #1697 > elif depth = 2 -00:01:38 verbose #1698 > then !\($'"!x' }})"') -00:01:38 verbose #1699 > elif depth = 3 -00:01:38 verbose #1700 > then !\($'"!x' }}})"') -00:01:38 verbose #1701 > elif depth = 4 -00:01:38 verbose #1702 > then !\($'"!x' }}}})"') -00:01:38 verbose #1703 > elif depth = 5 -00:01:38 verbose #1704 > then !\($'"!x' }}}}})"') -00:01:38 verbose #1705 > elif depth = 6 -00:01:38 verbose #1706 > then !\($'"!x' }}}}}})"') -00:01:38 verbose #1707 > elif depth = 7 -00:01:38 verbose #1708 > then !\($'"!x' }}}}}}})"') -00:01:38 verbose #1709 > elif depth = 8 -00:01:38 verbose #1710 > then !\($'"!x' }}}}}}}})"') -00:01:38 verbose #1711 > -00:01:38 verbose #1712 > inl depth = depth' |> snd -00:01:38 verbose #1713 > if depth = 1 -00:01:38 verbose #1714 > then !\($'"{ //"') -00:01:38 verbose #1715 > elif depth = 2 -00:01:38 verbose #1716 > then !\($'"{{ //"') -00:01:38 verbose #1717 > elif depth = 3 -00:01:38 verbose #1718 > then !\($'"{{{ //"') -00:01:38 verbose #1719 > elif depth = 4 -00:01:38 verbose #1720 > then !\($'"{{{{ //"') -00:01:38 verbose #1721 > elif depth = 5 -00:01:38 verbose #1722 > then !\($'"{{{{{ //"') -00:01:38 verbose #1723 > elif depth = 6 -00:01:38 verbose #1724 > then !\($'"{{{{{{ //"') -00:01:38 verbose #1725 > elif depth = 7 -00:01:38 verbose #1726 > then !\($'"{{{{{{{ //"') -00:01:38 verbose #1727 > elif depth = 8 -00:01:38 verbose #1728 > then !\($'"{{{{{{{{ //"') -00:01:38 verbose #1729 > -00:01:38 verbose #1730 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1731 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1732 > │ ## loop │ -00:01:38 verbose #1733 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1734 > -00:01:38 verbose #1735 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1736 > inl loop (depth : i32) (fn : () -> ()) : () = -00:01:38 verbose #1737 > (!\($'"true; loop { // rust.loop"') : bool) |> ignore -00:01:38 verbose #1738 > fn () -00:01:38 verbose #1739 > -00:01:38 verbose #1740 > listm.init depth id -00:01:38 verbose #1741 > |> listm.iter fun n => -00:01:38 verbose #1742 > (!\($'"true; } // rust.loop"') : bool) |> ignore -00:01:38 verbose #1743 > -00:01:38 verbose #1744 > (!\($'"true; } // rust.loop"') : bool) |> ignore -00:01:38 verbose #1745 > -00:01:38 verbose #1746 > listm.init depth id -00:01:38 verbose #1747 > |> listm.iter fun n => -00:01:38 verbose #1748 > (!\($'"true; { // rust.loop"') : bool) |> ignore -00:01:38 verbose #1749 > -00:01:38 verbose #1750 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1751 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1752 > │ ## run_tests │ -00:01:38 verbose #1753 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1754 > -00:01:38 verbose #1755 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1756 > inl run_tests tests = -00:01:38 verbose #1757 > (!\($'"true; () //"') : bool) |> ignore -00:01:38 verbose #1758 > -00:01:38 verbose #1759 > tests -00:01:38 verbose #1760 > |> listm.iter fun name, fn => -00:01:38 verbose #1761 > !\($'"} /* /*"') -00:01:38 verbose #1762 > (!\($'$"*/ #[[test]] fn " + !name + "() { //"') : bool) |> ignore -00:01:38 verbose #1763 > fn name |> ignore -00:01:38 verbose #1764 > -00:01:38 verbose #1765 > tests -00:01:38 verbose #1766 > |> listm.iter fun name, fn => -00:01:38 verbose #1767 > !\($'"{ //"') : () -00:01:38 verbose #1768 > -00:01:38 verbose #1769 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:38 verbose #1770 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:38 verbose #1771 > │ ## capture │ -00:01:38 verbose #1772 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:38 verbose #1773 > -00:01:38 verbose #1774 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:38 verbose #1775 > inl capture forall t. (fn : () -> t) : t = -00:01:38 verbose #1776 > (!\($'"true; let _result = (move || { //"') : bool) |> ignore -00:01:38 verbose #1777 > (!\\(fn (), $'"true; $0 })()"') : bool) |> ignore -00:01:38 verbose #1778 > !\($'"_result"') -00:01:38 verbose #1779 > 00:00:07 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 23936 -00:01:38 verbose #1780 > 00:00:07 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:01:42 verbose #1781 > 00:00:11 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/rust.dib.ipynb to html\e[0m -00:01:42 verbose #1782 > 00:00:11 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:01:42 verbose #1783 > 00:00:11 verbose #7 \e[4;7m validate(nb)\e[0m -00:01:42 verbose #1784 > 00:00:11 verbose #8 \e[4;7m[NbConvertApp] Writing 352985 bytes to c:\home\git\polyglot\lib\spiral\rust.dib.html\e[0m -00:01:42 verbose #1785 > 00:00:11 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 599 -00:01:42 verbose #1786 > 00:00:11 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 599 -00:01:42 verbose #1787 > 00:00:11 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:01:43 verbose #1788 > 00:00:12 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:01:43 verbose #1789 > 00:00:12 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:01:43 verbose #1790 > 00:00:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 24594 -00:01:43 debug #1791 execute_with_options_async / exit_code: 0 / output.Length: 26885 -00:01:43 debug #4 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path rust.dib --retries 3 -00:01:43 debug #1792 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path testing.dib --retries 3", +00:00:46 verbose #1279 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "rust.dib", "--retries", "3"]) +00:00:46 verbose #1280 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/rust.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/rust.dib" --output-path "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:00:49 verbose #1281 > > +00:00:49 verbose #1282 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:49 verbose #1283 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:49 verbose #1284 > > │ # rust │ +00:00:49 verbose #1285 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:49 verbose #1286 > > +00:00:49 verbose #1287 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:49 verbose #1288 > > //// test +00:00:49 verbose #1289 > > +00:00:49 verbose #1290 > > open testing +00:00:49 verbose #1291 > > +00:00:49 verbose #1292 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:00:49 verbose #1293 > > #r +00:00:49 verbose #1294 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:49 verbose #1295 > > otNet.Interactive.Spiral.dll" +00:00:49 verbose #1296 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:00:49 verbose #1297 > > #r +00:00:49 verbose #1298 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:49 verbose #1299 > > otNet.Interactive.dll" +00:00:49 verbose #1300 > > open type Microsoft.DotNet.Interactive.Kernel +00:00:53 verbose #1301 > > +00:00:53 verbose #1302 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:53 verbose #1303 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:53 verbose #1304 > > │ ## types │ +00:00:53 verbose #1305 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:53 verbose #1306 > > +00:00:53 verbose #1307 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:53 verbose #1308 > > inl types () = +00:00:53 verbose #1309 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1310 > > Fable.Core.Emit(\"core::any::Any\")>]]\n#endif\ntype core_any_Any = class end" +00:00:53 verbose #1311 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1312 > > Fable.Core.Emit(\"_\")>]]\n#endif\ntype core_ops_Try<'T> = class end" +00:00:53 verbose #1313 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1314 > > Fable.Core.Emit(\"Func0<$0>\")>]]\n#endif\ntype Func0<'T> = class end" +00:00:53 verbose #1315 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Func1<$0, +00:00:53 verbose #1316 > > $1>\")>]]\n#endif\ntype Func0<'T, 'U> = class end" +00:00:53 verbose #1317 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1318 > > Fable.Core.Emit(\"Box<$0>\")>]]\n#endif\ntype Box<'T> = class end" +00:00:53 verbose #1319 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"dyn +00:00:53 verbose #1320 > > $0\")>]]\n#endif\ntype Dyn<'T> = class end" +00:00:53 verbose #1321 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1322 > > Fable.Core.Emit(\"Send\")>]]\n#endif\ntype Send<'T> = class end" +00:00:53 verbose #1323 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn() -> +00:00:53 verbose #1324 > > $0\")>]]\n#endif\ntype Fn<'T> = class end" +00:00:53 verbose #1325 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1326 > > Fable.Core.Emit(\"Fn()\")>]]\n#endif\ntype FnUnit = class end" +00:00:53 verbose #1327 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"FnOnce() +00:00:53 verbose #1328 > > -> $0\")>]]\n#endif\ntype FnOnce<'T> = class end" +00:00:53 verbose #1329 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1330 > > Fable.Core.Emit(\"Fn($0)\")>]]\n#endif\ntype ActionFn<'T> = class end" +00:00:53 verbose #1331 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn($0, +00:00:53 verbose #1332 > > $1)\")>]]\n#endif\ntype ActionFn2<'T, 'U> = class end" +00:00:53 verbose #1333 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"impl +00:00:53 verbose #1334 > > $0\")>]]\n#endif\ntype Impl<'T> = class end" +00:00:53 verbose #1335 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"mut +00:00:53 verbose #1336 > > $0\")>]]\n#endif\ntype Mut<'T> = class end" +00:00:53 verbose #1337 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1338 > > Fable.Core.Emit(\"&$0\")>]]\n#endif\ntype Ref<'T> = class end" +00:00:53 verbose #1339 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"$0 + +00:00:53 verbose #1340 > > $1\")>]]\n#endif\ntype LifetimeJoin<'T, 'U> = class end" +00:00:53 verbose #1341 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1342 > > Fable.Core.Emit(\"'static\")>]]\n#endif\ntype StaticLifetime = class end" +00:00:53 verbose #1343 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1344 > > Fable.Core.Emit(\"$0\")>]]\n#endif\ntype LifetimeRef<'T> = class end" +00:00:53 verbose #1345 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"$0 +00:00:53 verbose #1346 > > $1\")>]]\n#endif\ntype Lifetime<'T, 'U> = class end" +00:00:53 verbose #1347 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1348 > > Fable.Core.Emit(\"MutCell<$0>\")>]]\n#endif\ntype MutCell<'T> = class end" +00:00:53 verbose #1349 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1350 > > Fable.Core.Emit(\"std::any::Any\")>]]\n#endif\ntype std_any_Any = class end" +00:00:53 verbose #1351 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1352 > > Fable.Core.Emit(\"std::borrow::Cow<$0>\")>]]\n#endif\ntype std_borrow_Cow<'T> = +00:00:53 verbose #1353 > > class end" +00:00:53 verbose #1354 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1355 > > Fable.Core.Emit(\"std::cell::RefCell<$0>\")>]]\n#endif\ntype +00:00:53 verbose #1356 > > std_cell_RefCell<'T> = class end" +00:00:53 verbose #1357 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1358 > > Fable.Core.Emit(\"std::pin::Pin<$0>\")>]]\n#endif\ntype std_pin_Pin<'T> = class +00:00:53 verbose #1359 > > end" +00:00:53 verbose #1360 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1361 > > Fable.Core.Emit(\"std::rc::Rc<$0>\")>]]\n#endif\ntype std_rc_Rc<'T> = class end" +00:00:53 verbose #1362 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:00:53 verbose #1363 > > Fable.Core.Emit(\"std::rc::Weak<$0>\")>]]\n#endif\ntype std_rc_Weak<'T> = class +00:00:53 verbose #1364 > > end" +00:00:53 verbose #1365 > > +00:00:53 verbose #1366 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:53 verbose #1367 > > nominal unit = $'unit' +00:00:53 verbose #1368 > > nominal any = $"core_any_Any" +00:00:53 verbose #1369 > > nominal try t = $'core_ops_Try<`t>' +00:00:53 verbose #1370 > > nominal cow t = $"std_borrow_Cow<`t>" +00:00:53 verbose #1371 > > nominal ref_cell t = $"std_cell_RefCell<`t>" +00:00:53 verbose #1372 > > nominal rc t = $"std_rc_Rc<`t>" +00:00:53 verbose #1373 > > nominal lifetime_join' (t : * -> *) u = $"LifetimeRef<`(t u)>" +00:00:53 verbose #1374 > > nominal lifetime_join t u = $"LifetimeJoin<`t, `u>" +00:00:53 verbose #1375 > > nominal lifetime t u = $"Lifetime<`t, `u>" +00:00:53 verbose #1376 > > nominal static_lifetime = $"StaticLifetime" +00:00:53 verbose #1377 > > nominal ref t = $"Ref<`t>" +00:00:53 verbose #1378 > > nominal static_ref t = ref (lifetime static_lifetime t) +00:00:53 verbose #1379 > > nominal weak_rc t = $"std_rc_Weak<`t>" +00:00:53 verbose #1380 > > nominal box t = $"Box<`t>" +00:00:53 verbose #1381 > > nominal mut_cell t = $"MutCell<`t>" +00:00:53 verbose #1382 > > nominal pin t = $"std_pin_Pin<`t>" +00:00:53 verbose #1383 > > nominal dyn' t = $"Dyn<`t>" +00:00:53 verbose #1384 > > nominal fn' t = $"Fn<`t>" +00:00:53 verbose #1385 > > nominal action_fn t = $"ActionFn<`t>" +00:00:53 verbose #1386 > > nominal action_fn2 t u = $"ActionFn2<`t, `u>" +00:00:53 verbose #1387 > > nominal fn_once t = $"FnOnce<`t>" +00:00:53 verbose #1388 > > nominal fn_unit = $"FnUnit" +00:00:53 verbose #1389 > > nominal func0 t = $"Func0<`t>" +00:00:53 verbose #1390 > > nominal func1 t u = +00:00:53 verbose #1391 > > `( +00:00:53 verbose #1392 > > typecase t with +00:00:53 verbose #1393 > > | () => `func0 `u +00:00:53 verbose #1394 > > | _ => $'' : $"Func0<`t, `u>" +00:00:53 verbose #1395 > > ) +00:00:53 verbose #1396 > > nominal impl t = $"Impl<`t>" +00:00:53 verbose #1397 > > nominal mut' t = $"Mut<`t>" +00:00:53 verbose #1398 > > nominal ref' t = $"Ref<`t>" +00:00:53 verbose #1399 > > nominal send t = lifetime_join t $"Send<`t>" +00:00:53 verbose #1400 > > nominal static_ref' t = static_ref t +00:00:53 verbose #1401 > > +00:00:53 verbose #1402 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:53 verbose #1403 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:53 verbose #1404 > > │ ## emit_expr │ +00:00:53 verbose #1405 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:53 verbose #1406 > > +00:00:53 verbose #1407 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:53 verbose #1408 > > inl emit_expr forall a t. (args : a) (code : string) : t = +00:00:53 verbose #1409 > > real +00:00:53 verbose #1410 > > $"Fable.Core.RustInterop.emitRustExpr !args !code" : t +00:00:53 verbose #1411 > > +00:00:53 verbose #1412 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:53 verbose #1413 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:53 verbose #1414 > > │ ## (~!\\) │ +00:00:53 verbose #1415 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:53 verbose #1416 > > +00:00:53 verbose #1417 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:53 verbose #1418 > > inl (~!\) forall t. (code : string) : t = +00:00:53 verbose #1419 > > emit_expr () code +00:00:53 verbose #1420 > > +00:00:53 verbose #1421 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:53 verbose #1422 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:53 verbose #1423 > > │ ## (~!\\\\) │ +00:00:53 verbose #1424 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:53 verbose #1425 > > +00:00:53 verbose #1426 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:53 verbose #1427 > > inl (~!\\) forall t u. ((args : t), (code : string)) : u = +00:00:53 verbose #1428 > > emit_expr args code +00:00:54 verbose #1429 > > +00:00:54 verbose #1430 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1431 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1432 > > │ ## emit │ +00:00:54 verbose #1433 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1434 > > +00:00:54 verbose #1435 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1436 > > inl emit forall t. (x : t) : t = +00:00:54 verbose #1437 > > !\\(x, $'"$0"') +00:00:54 verbose #1438 > > +00:00:54 verbose #1439 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1440 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1441 > > │ ## emit' │ +00:00:54 verbose #1442 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1443 > > +00:00:54 verbose #1444 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1445 > > inl emit' forall t. (x : t) : t = +00:00:54 verbose #1446 > > !\\(x, $'"let !x = $0"') +00:00:54 verbose #1447 > > x +00:00:54 verbose #1448 > > +00:00:54 verbose #1449 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1450 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1451 > > │ ## clone │ +00:00:54 verbose #1452 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1453 > > +00:00:54 verbose #1454 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1455 > > inl clone forall t. (x : t) : t = +00:00:54 verbose #1456 > > !\\(x, $'"$0.clone()"') +00:00:54 verbose #1457 > > +00:00:54 verbose #1458 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1459 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1460 > > │ ## new_box │ +00:00:54 verbose #1461 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1462 > > +00:00:54 verbose #1463 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1464 > > inl new_box forall t. (x : t) : box t = +00:00:54 verbose #1465 > > !\\(x, $'"Box::new($0)"') +00:00:54 verbose #1466 > > +00:00:54 verbose #1467 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1468 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1469 > > │ ## new_rc │ +00:00:54 verbose #1470 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1471 > > +00:00:54 verbose #1472 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1473 > > inl new_rc forall t. (x : t) : rc t = +00:00:54 verbose #1474 > > !\\(x, $'"std::rc::Rc::new($0)"') +00:00:54 verbose #1475 > > +00:00:54 verbose #1476 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1477 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1478 > > │ ## rc_clone │ +00:00:54 verbose #1479 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1480 > > +00:00:54 verbose #1481 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1482 > > inl rc_clone forall t. (x : rc t) : rc t = +00:00:54 verbose #1483 > > !\\(x, $'"std::rc::Rc::clone(&$0)"') +00:00:54 verbose #1484 > > +00:00:54 verbose #1485 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1486 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1487 > > │ ## rc_unwrap_or_clone │ +00:00:54 verbose #1488 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1489 > > +00:00:54 verbose #1490 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1491 > > inl rc_unwrap_or_clone forall t. (x : rc t) : t = +00:00:54 verbose #1492 > > !\\(x, $'"std::rc::Rc::unwrap_or_clone($0)"') +00:00:54 verbose #1493 > > +00:00:54 verbose #1494 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1495 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1496 > > │ ## rc_downgrade │ +00:00:54 verbose #1497 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1498 > > +00:00:54 verbose #1499 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1500 > > inl rc_downgrade forall t. (x : rc t) : weak_rc t = +00:00:54 verbose #1501 > > inl x = join x +00:00:54 verbose #1502 > > !\($'"std::rc::Rc::downgrade(&!x)"') +00:00:54 verbose #1503 > > +00:00:54 verbose #1504 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1505 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1506 > > │ ## new_ref_cell │ +00:00:54 verbose #1507 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1508 > > +00:00:54 verbose #1509 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1510 > > inl new_ref_cell forall t. (x : t) : ref_cell t = +00:00:54 verbose #1511 > > inl x = join x +00:00:54 verbose #1512 > > !\($'"std::cell::RefCell::new(!x)"') +00:00:54 verbose #1513 > > +00:00:54 verbose #1514 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1515 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1516 > > │ ## ref_cell_borrow │ +00:00:54 verbose #1517 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1518 > > +00:00:54 verbose #1519 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1520 > > inl ref_cell_borrow forall t. (x : rc (ref_cell t)) : t = +00:00:54 verbose #1521 > > inl x = join x +00:00:54 verbose #1522 > > !\($'"*std::cell::RefCell::borrow(&std::rc::Rc::clone(&!x))"') +00:00:54 verbose #1523 > > +00:00:54 verbose #1524 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1525 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1526 > > │ ## ref_cell_borrow_mut │ +00:00:54 verbose #1527 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1528 > > +00:00:54 verbose #1529 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1530 > > inl ref_cell_borrow_mut forall t. (x : rc (ref_cell t)) : mut' t = +00:00:54 verbose #1531 > > inl x = join x +00:00:54 verbose #1532 > > !\($'"*std::cell::RefCell::borrow_mut(&std::rc::Rc::clone(&!x))"') +00:00:54 verbose #1533 > > +00:00:54 verbose #1534 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1535 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1536 > > │ ## to_mut │ +00:00:54 verbose #1537 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1538 > > +00:00:54 verbose #1539 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1540 > > inl to_mut forall t. (x : t) : t = +00:00:54 verbose #1541 > > (!\($'"true; // 1"') : bool) |> ignore +00:00:54 verbose #1542 > > (!\($'"true; let mut !x = !x"') : bool) |> ignore +00:00:54 verbose #1543 > > (!\($'"true; !x"') : bool) |> ignore +00:00:54 verbose #1544 > > !\($'"!x"') +00:00:54 verbose #1545 > > // inl result = !\($'"!x"') : mut' t +00:00:54 verbose #1546 > > // !\($'"!result"') +00:00:54 verbose #1547 > > // inl result = !\($'"*/ // a"') : mut' t +00:00:54 verbose #1548 > > // inl result = !\($'"!x"') : mut' t +00:00:54 verbose #1549 > > // result |> fun x => $'!x |> unbox // b' +00:00:54 verbose #1550 > > +00:00:54 verbose #1551 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1552 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1553 > > │ ## ref_map │ +00:00:54 verbose #1554 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1555 > > +00:00:54 verbose #1556 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1557 > > inl ref_map forall t u. (fn : t -> u) (x : ref' t) : ref' u = +00:00:54 verbose #1558 > > !\($'"!fn(!x)"') +00:00:54 verbose #1559 > > +00:00:54 verbose #1560 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1561 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1562 > > │ ## ref_invoke │ +00:00:54 verbose #1563 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1564 > > +00:00:54 verbose #1565 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1566 > > inl ref_invoke forall t u. (fn : t -> u) (ref : ref' t) : u = +00:00:54 verbose #1567 > > !\\(fn, $'"$0(!ref.clone())"') +00:00:54 verbose #1568 > > +00:00:54 verbose #1569 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1570 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1571 > > │ ## cow_as_ref │ +00:00:54 verbose #1572 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1573 > > +00:00:54 verbose #1574 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1575 > > inl cow_as_ref forall t. (s : cow t) : ref' t = +00:00:54 verbose #1576 > > !\\(s, $'"$0.as_ref()"') +00:00:54 verbose #1577 > > +00:00:54 verbose #1578 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1579 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1580 > > │ ## from_mut │ +00:00:54 verbose #1581 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1582 > > +00:00:54 verbose #1583 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1584 > > inl from_mut forall t. (x : mut' t) : t = +00:00:54 verbose #1585 > > !\($'"!x"') +00:00:54 verbose #1586 > > +00:00:54 verbose #1587 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1588 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1589 > > │ ## box_fn │ +00:00:54 verbose #1590 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1591 > > +00:00:54 verbose #1592 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1593 > > inl box_fn forall t. (x : () -> ()) : box t = +00:00:54 verbose #1594 > > inl x = join x +00:00:54 verbose #1595 > > !\($'"Box::new(move || !x())"') +00:00:54 verbose #1596 > > +00:00:54 verbose #1597 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1598 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1599 > > │ ## box_pin │ +00:00:54 verbose #1600 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1601 > > +00:00:54 verbose #1602 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1603 > > inl box_pin forall t. (x : t) : pin (box t) = +00:00:54 verbose #1604 > > inl x = join x +00:00:54 verbose #1605 > > !\($'"Box::pin(!x)"') +00:00:54 verbose #1606 > > +00:00:54 verbose #1607 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1608 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1609 > > │ ## to_ref │ +00:00:54 verbose #1610 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1611 > > +00:00:54 verbose #1612 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1613 > > inl to_ref forall t. (x : t) : ref' t = +00:00:54 verbose #1614 > > !\\(x, $'"&$0"') +00:00:54 verbose #1615 > > +00:00:54 verbose #1616 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1617 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1618 > > │ ## deref │ +00:00:54 verbose #1619 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1620 > > +00:00:54 verbose #1621 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1622 > > inl deref forall t. (ref : ref' t) : t = +00:00:54 verbose #1623 > > !\\(ref, $'"*$0"') +00:00:54 verbose #1624 > > +00:00:54 verbose #1625 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1626 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1627 > > │ ## ops_deref │ +00:00:54 verbose #1628 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1629 > > +00:00:54 verbose #1630 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1631 > > inl ops_deref forall t. (ref : t) : t = +00:00:54 verbose #1632 > > inl ref = join ref +00:00:54 verbose #1633 > > !\($'"core::ops::Deref::deref(&!ref)"') +00:00:54 verbose #1634 > > +00:00:54 verbose #1635 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1636 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1637 > > │ ## func0_invoke │ +00:00:54 verbose #1638 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1639 > > +00:00:54 verbose #1640 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1641 > > inl func0_invoke forall t. (x : func0 t) : t = +00:00:54 verbose #1642 > > !\\(x, $'"$0()"') +00:00:54 verbose #1643 > > +00:00:54 verbose #1644 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1645 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1646 > > │ ## func0_move │ +00:00:54 verbose #1647 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1648 > > +00:00:54 verbose #1649 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1650 > > inl func0_move forall t. (fn : func0 t) : t = +00:00:54 verbose #1651 > > inl fn = join fn +00:00:54 verbose #1652 > > !\($'"(move || !fn())()"') +00:00:54 verbose #1653 > > +00:00:54 verbose #1654 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1655 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1656 > > │ ## move │ +00:00:54 verbose #1657 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1658 > > +00:00:54 verbose #1659 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1660 > > inl move forall t. (fn : () -> t) : func0 t = +00:00:54 verbose #1661 > > !\\(fn, $'"Func0::new(move || $0())"') +00:00:54 verbose #1662 > > +00:00:54 verbose #1663 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1664 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1665 > > │ ## to_static_ref_unbox │ +00:00:54 verbose #1666 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1667 > > +00:00:54 verbose #1668 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1669 > > inl to_static_ref_unbox forall t. (x : ref' t) : static_ref' t = +00:00:54 verbose #1670 > > x |> unbox +00:00:54 verbose #1671 > > +00:00:54 verbose #1672 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1673 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1674 > > │ ## from_static_ref_unbox │ +00:00:54 verbose #1675 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1676 > > +00:00:54 verbose #1677 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1678 > > inl from_static_ref_unbox forall t. (x : static_ref' t) : ref' t = +00:00:54 verbose #1679 > > x |> unbox +00:00:54 verbose #1680 > > +00:00:54 verbose #1681 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1682 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1683 > > │ ## box_leak │ +00:00:54 verbose #1684 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1685 > > +00:00:54 verbose #1686 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1687 > > inl box_leak forall t. (x : box t) : static_ref' (mut' t) = +00:00:54 verbose #1688 > > !\\(x, $'"Box::leak($0)"') +00:00:54 verbose #1689 > > +00:00:54 verbose #1690 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1691 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1692 > > │ ## drop │ +00:00:54 verbose #1693 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1694 > > +00:00:54 verbose #1695 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1696 > > inl drop forall t. (x : t) : () = +00:00:54 verbose #1697 > > !\\(x, $'"drop($0)"') +00:00:54 verbose #1698 > > +00:00:54 verbose #1699 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1700 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1701 > > │ ## break │ +00:00:54 verbose #1702 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1703 > > +00:00:54 verbose #1704 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1705 > > inl break () : () = +00:00:54 verbose #1706 > > (!\($'"true; break"') : bool) |> ignore +00:00:54 verbose #1707 > > +00:00:54 verbose #1708 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:54 verbose #1709 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:54 verbose #1710 > > │ ## fix_closure' │ +00:00:54 verbose #1711 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:54 verbose #1712 > > +00:00:54 verbose #1713 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1714 > > inl fix_closure' (depth : u8 * u8) x = +00:00:54 verbose #1715 > > inl rec loop text (acc : string) n : string = +00:00:54 verbose #1716 > > if n <= 0 +00:00:54 verbose #1717 > > then acc +00:00:54 verbose #1718 > > else loop text (acc +. text) (n - 1) +00:00:54 verbose #1719 > > inl a = depth |> fst |> loop "}" "" +00:00:54 verbose #1720 > > inl b = depth |> snd |> loop "{" "" +00:00:54 verbose #1721 > > $'"!x " + !a + "); " + !b + " //"' +00:00:54 verbose #1722 > > +00:00:54 verbose #1723 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:54 verbose #1724 > > //// test +00:00:54 verbose #1725 > > +00:00:54 verbose #1726 > > fix_closure' (3, 2) 0i32 +00:00:54 verbose #1727 > > |> _assert_eq "0 }}}); {{ //" +00:00:55 verbose #1728 > > +00:00:55 verbose #1729 > > ╭─[ 867.47ms - stdout ]────────────────────────────────────────────────────────╮ +00:00:55 verbose #1730 > > │ assert_eq / actual: "0 }}}); {{ //" / expected: "0 }}}); {{ //" │ +00:00:55 verbose #1731 > > │ │ +00:00:55 verbose #1732 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:55 verbose #1733 > > +00:00:55 verbose #1734 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:55 verbose #1735 > > //// test +00:00:55 verbose #1736 > > +00:00:55 verbose #1737 > > fix_closure' (0, 0) () +00:00:55 verbose #1738 > > |> _assert_eq "() ); //" +00:00:55 verbose #1739 > > +00:00:55 verbose #1740 > > ╭─[ 44.85ms - stdout ]─────────────────────────────────────────────────────────╮ +00:00:55 verbose #1741 > > │ assert_eq / actual: "() ); //" / expected: "() ); //" │ +00:00:55 verbose #1742 > > │ │ +00:00:55 verbose #1743 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:55 verbose #1744 > > +00:00:55 verbose #1745 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:55 verbose #1746 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:55 verbose #1747 > > │ ## fix_closure │ +00:00:55 verbose #1748 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:55 verbose #1749 > > +00:00:55 verbose #1750 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:55 verbose #1751 > > inl fix_closure depth x = +00:00:55 verbose #1752 > > inl code = fix_closure' depth x +00:00:55 verbose #1753 > > !\code +00:00:55 verbose #1754 > > +00:00:55 verbose #1755 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:55 verbose #1756 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:55 verbose #1757 > > │ ## loop │ +00:00:55 verbose #1758 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:55 verbose #1759 > > +00:00:55 verbose #1760 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:55 verbose #1761 > > inl loop (depth : i32) (fn : () -> ()) : () = +00:00:55 verbose #1762 > > (!\($'"true; loop { // rust.loop"') : bool) |> ignore +00:00:55 verbose #1763 > > fn () +00:00:55 verbose #1764 > > +00:00:55 verbose #1765 > > listm.init depth id +00:00:55 verbose #1766 > > |> listm.iter fun n => +00:00:55 verbose #1767 > > (!\($'"true; } // rust.loop"') : bool) |> ignore +00:00:55 verbose #1768 > > +00:00:55 verbose #1769 > > (!\($'"true; } // rust.loop"') : bool) |> ignore +00:00:55 verbose #1770 > > +00:00:55 verbose #1771 > > listm.init depth id +00:00:55 verbose #1772 > > |> listm.iter fun n => +00:00:55 verbose #1773 > > (!\($'"true; { // rust.loop"') : bool) |> ignore +00:00:55 verbose #1774 > > +00:00:55 verbose #1775 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:55 verbose #1776 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:55 verbose #1777 > > │ ## run_tests │ +00:00:55 verbose #1778 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:55 verbose #1779 > > +00:00:55 verbose #1780 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:55 verbose #1781 > > inl run_tests tests = +00:00:55 verbose #1782 > > (!\($'"true; () //"') : bool) |> ignore +00:00:55 verbose #1783 > > +00:00:55 verbose #1784 > > tests +00:00:55 verbose #1785 > > |> listm.iter fun name, fn => +00:00:55 verbose #1786 > > !\($'"} /* /*"') +00:00:55 verbose #1787 > > (!\($'$"*/ #[[test]] fn " + !name + "() { //"') : bool) |> ignore +00:00:55 verbose #1788 > > fn name |> ignore +00:00:55 verbose #1789 > > +00:00:55 verbose #1790 > > tests +00:00:55 verbose #1791 > > |> listm.iter fun name, fn => +00:00:55 verbose #1792 > > !\($'"{ //"') : () +00:00:55 verbose #1793 > > +00:00:55 verbose #1794 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:55 verbose #1795 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:55 verbose #1796 > > │ ## capture │ +00:00:55 verbose #1797 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:55 verbose #1798 > > +00:00:55 verbose #1799 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:55 verbose #1800 > > inl capture forall t. (fn : () -> t) : t = +00:00:55 verbose #1801 > > (!\($'"true; let _result = (move || { //"') : bool) |> ignore +00:00:55 verbose #1802 > > (!\\(fn (), $'"true; $0 })()"') : bool) |> ignore +00:00:55 verbose #1803 > > !\($'"_result"') +00:00:56 verbose #1804 > 00:00:09 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 26151 +00:00:56 verbose #1805 > 00:00:09 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:00:58 verbose #1806 > 00:00:11 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/rust.dib.ipynb to html +00:00:58 verbose #1807 > 00:00:11 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:58 verbose #1808 > 00:00:11 verbose #7 ! validate(nb) +00:01:00 verbose #1809 > 00:00:13 verbose #8 ! [NbConvertApp] Writing 358247 bytes to c:\home\git\polyglot\lib\spiral\rust.dib.html +00:01:00 verbose #1810 > 00:00:13 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 639 +00:01:00 verbose #1811 > 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 639 +00:01:00 verbose #1812 > 00:00:13 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:01:01 verbose #1813 > 00:00:15 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:01:01 verbose #1814 > 00:00:15 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:01:02 verbose #1815 > 00:00:15 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 26849 +00:01:02 debug #1816 execute_with_options_async / exit_code: 0 / output.Length: 30106 +00:01:02 debug #4 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path rust.dib --retries 3 +00:01:02 debug #1817 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path testing.dib --retries 3", [||], None, None, true, None) -00:01:43 verbose #1793 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "testing.dib", "--retries", "3"]) -00:01:43 verbose #1794 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/testing.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/testing.dib" --output-path "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:01:51 verbose #1795 > -00:01:51 verbose #1796 > ── markdown ──────────────────────────────────────────────────────────────────── -00:01:51 verbose #1797 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:01:51 verbose #1798 > │ # testing │ -00:01:51 verbose #1799 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:51 verbose #1800 > -00:01:51 verbose #1801 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:51 verbose #1802 > inl __expect fn log name b a = -00:01:51 verbose #1803 > inl result = fn a b -00:01:51 verbose #1804 > inl result = -00:01:51 verbose #1805 > result || join result -00:01:51 verbose #1806 > if log |> not -00:01:51 verbose #1807 > then "__expect" -00:01:51 verbose #1808 > else -00:01:51 verbose #1809 > inl text = $'$"{!name} / actual: %A{!a} / expected: %A{!b}"' -00:01:51 verbose #1810 > text |> console.write_line -00:01:51 verbose #1811 > text -00:01:51 verbose #1812 > |> assert result -00:01:51 verbose #1813 > -00:01:51 verbose #1814 > inl __assert_approx_eq log e b a = __expect (fun a b => abs (b - a) < (e |> -00:01:51 verbose #1815 > optionm.defaultWith 0.00000001)) log "assert_approx_eq" b a -00:01:51 verbose #1816 > inl _assert_approx_eq e b a = __assert_approx_eq true e b a -00:01:51 verbose #1817 > -00:01:51 verbose #1818 > inl __assert_eq log b a = __expect (=) log "assert_eq" b a -00:01:51 verbose #1819 > inl _assert_eq b a = __assert_eq true b a -00:01:51 verbose #1820 > -00:01:51 verbose #1821 > inl __assert_eq' log b a = __expect (=.) log "assert_eq'" b a -00:01:51 verbose #1822 > inl _assert_eq' b a = __assert_eq' true b a -00:01:51 verbose #1823 > -00:01:51 verbose #1824 > inl __assert_ne log b a = __expect (<>.) log "assert_ne" b a -00:01:51 verbose #1825 > inl _assert_ne b a = __assert_ne true b a -00:01:51 verbose #1826 > -00:01:51 verbose #1827 > inl __assert_gt log b a = __expect (>) log "assert_gt" b a -00:01:51 verbose #1828 > inl _assert_gt b a = __assert_gt true b a -00:01:51 verbose #1829 > -00:01:51 verbose #1830 > inl __assert_ge log b a = __expect (>=) log "assert_ge" b a -00:01:51 verbose #1831 > inl _assert_ge b a = __assert_ge true b a -00:01:51 verbose #1832 > -00:01:51 verbose #1833 > inl __assert_lt log b a = __expect (<) log "assert_lt" b a -00:01:51 verbose #1834 > inl _assert_lt b a = __assert_lt true b a -00:01:51 verbose #1835 > -00:01:51 verbose #1836 > inl __assert_le log b a = __expect (<=) log "assert_le" b a -00:01:51 verbose #1837 > inl _assert_le b a = __assert_le true b a -00:01:51 verbose #1838 > -00:01:51 verbose #1839 > inl __assert_contains forall t. log (b : t) a = -00:01:51 verbose #1840 > __expect -00:01:51 verbose #1841 > fun a b => -00:01:51 verbose #1842 > a -00:01:51 verbose #1843 > |> $'List.ofSeq' -00:01:51 verbose #1844 > |> fun x => x : listm'.list' t -00:01:51 verbose #1845 > |> $'List.tryFind' ((=) b) -00:01:51 verbose #1846 > |> optionm'.unbox -00:01:51 verbose #1847 > |> fun (x : _ t) => x <> None -00:01:51 verbose #1848 > log "assert_contains" b a -00:01:51 verbose #1849 > inl _assert_contains b a = __assert_contains true b a -00:01:51 verbose #1850 > -00:01:51 verbose #1851 > inl __assert_string_contains log b a = __expect sm'.contains log -00:01:51 verbose #1852 > "assert_string_contains" a b -00:01:51 verbose #1853 > inl _assert_string_contains b a = __assert_string_contains true b a -00:01:51 verbose #1854 > -00:01:51 verbose #1855 > inl _throws (fn : () -> ()) : option exn = -00:01:51 verbose #1856 > inl none = None : option exn -00:01:51 verbose #1857 > inl some (s : exn) = Some s -00:01:51 verbose #1858 > $"try !fn (); !none with ex -> ex |> !some" -00:01:51 verbose #1859 > -00:01:51 verbose #1860 > inl __assert_between log a b actual = -00:01:51 verbose #1861 > inl assert_between actual (a, b) = -00:01:51 verbose #1862 > __assert_ge false a actual -00:01:51 verbose #1863 > __assert_le false b actual -00:01:51 verbose #1864 > true -00:01:51 verbose #1865 > __expect assert_between log "assert_between" (a, b) actual -00:01:51 verbose #1866 > inl _assert_between a b actual = __assert_between true a b actual -00:01:51 verbose #1867 > -00:01:51 verbose #1868 > ── spiral - import ───────────────────────────────────────────────────────────── -00:01:51 verbose #1869 > #r -00:01:51 verbose #1870 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:51 verbose #1871 > otNet.Interactive.Spiral.dll" -00:01:51 verbose #1872 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:01:51 verbose #1873 > #r -00:01:51 verbose #1874 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:01:51 verbose #1875 > otNet.Interactive.dll" -00:01:51 verbose #1876 > open type Microsoft.DotNet.Interactive.Kernel -00:01:51 verbose #1877 > -00:01:51 verbose #1878 > ── spiral - import ───────────────────────────────────────────────────────────── -00:01:51 verbose #1879 > inl __expect fn log name b a = -00:01:51 verbose #1880 > inl result = fn a b -00:01:51 verbose #1881 > inl result = -00:01:51 verbose #1882 > result || join result -00:01:51 verbose #1883 > if log |> not -00:01:51 verbose #1884 > then "__expect" -00:01:51 verbose #1885 > else -00:01:51 verbose #1886 > inl text = $'$"{!name} / actual: %A{!a} / expected: %A{!b}"' -00:01:51 verbose #1887 > text |> console.write_line -00:01:51 verbose #1888 > text -00:01:51 verbose #1889 > |> assert result -00:01:51 verbose #1890 > -00:01:51 verbose #1891 > inl __assert_approx_eq log e b a = __expect (fun a b => abs (b - a) < (e |> -00:01:51 verbose #1892 > optionm.defaultWith 0.00000001)) log "assert_approx_eq" b a -00:01:51 verbose #1893 > inl _assert_approx_eq e b a = __assert_approx_eq true e b a -00:01:51 verbose #1894 > -00:01:51 verbose #1895 > inl __assert_eq log b a = __expect (=) log "assert_eq" b a -00:01:51 verbose #1896 > inl _assert_eq b a = __assert_eq true b a -00:01:51 verbose #1897 > -00:01:51 verbose #1898 > inl __assert_eq' log b a = __expect (=.) log "assert_eq'" b a -00:01:51 verbose #1899 > inl _assert_eq' b a = __assert_eq' true b a -00:01:51 verbose #1900 > -00:01:51 verbose #1901 > inl __assert_ne log b a = __expect (<>.) log "assert_ne" b a -00:01:51 verbose #1902 > inl _assert_ne b a = __assert_ne true b a -00:01:51 verbose #1903 > -00:01:51 verbose #1904 > inl __assert_gt log b a = __expect (>) log "assert_gt" b a -00:01:51 verbose #1905 > inl _assert_gt b a = __assert_gt true b a -00:01:51 verbose #1906 > -00:01:51 verbose #1907 > inl __assert_ge log b a = __expect (>=) log "assert_ge" b a -00:01:51 verbose #1908 > inl _assert_ge b a = __assert_ge true b a -00:01:51 verbose #1909 > -00:01:51 verbose #1910 > inl __assert_lt log b a = __expect (<) log "assert_lt" b a -00:01:51 verbose #1911 > inl _assert_lt b a = __assert_lt true b a -00:01:51 verbose #1912 > -00:01:51 verbose #1913 > inl __assert_le log b a = __expect (<=) log "assert_le" b a -00:01:51 verbose #1914 > inl _assert_le b a = __assert_le true b a -00:01:51 verbose #1915 > -00:01:51 verbose #1916 > inl __assert_contains forall t. log (b : t) a = -00:01:51 verbose #1917 > __expect -00:01:51 verbose #1918 > fun a b => -00:01:51 verbose #1919 > a -00:01:51 verbose #1920 > |> $'List.ofSeq' -00:01:51 verbose #1921 > |> fun x => x : listm'.list' t -00:01:51 verbose #1922 > |> $'List.tryFind' ((=) b) -00:01:51 verbose #1923 > |> optionm'.unbox -00:01:51 verbose #1924 > |> fun (x : _ t) => x <> None -00:01:51 verbose #1925 > log "as... -00:01:51 verbose #1926 > -00:01:51 verbose #1927 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:51 verbose #1928 > //// test -00:01:51 verbose #1929 > -00:01:51 verbose #1930 > 1f64 -00:01:51 verbose #1931 > |> _assert_approx_eq (Some 3) 2 -00:01:51 verbose #1932 > -00:01:51 verbose #1933 > ╭─[ 608.46ms - stdout ]────────────────────────────────────────────────────────╮ -00:01:51 verbose #1934 > │ assert_approx_eq / actual: 1.0 / expected: 2.0 │ -00:01:51 verbose #1935 > │ │ -00:01:51 verbose #1936 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:51 verbose #1937 > -00:01:51 verbose #1938 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:51 verbose #1939 > //// test -00:01:51 verbose #1940 > -00:01:51 verbose #1941 > "abcd" -00:01:51 verbose #1942 > |> _assert_contains 'b' -00:01:51 verbose #1943 > -00:01:51 verbose #1944 > ╭─[ 628.95ms - stdout ]────────────────────────────────────────────────────────╮ -00:01:51 verbose #1945 > │ assert_contains / actual: "abcd" / expected: 'b' │ -00:01:51 verbose #1946 > │ │ -00:01:51 verbose #1947 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:51 verbose #1948 > -00:01:51 verbose #1949 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:51 verbose #1950 > //// test -00:01:51 verbose #1951 > -00:01:51 verbose #1952 > (dyn 1f64) -00:01:51 verbose #1953 > |> _assert_approx_eq (Some 3) 2 -00:01:51 verbose #1954 > -00:01:51 verbose #1955 > ╭─[ 76.15ms - stdout ]─────────────────────────────────────────────────────────╮ -00:01:51 verbose #1956 > │ assert_approx_eq / actual: 1.0 / expected: 2.0 │ -00:01:51 verbose #1957 > │ │ -00:01:51 verbose #1958 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:01:51 verbose #1959 > -00:01:51 verbose #1960 > ── spiral ────────────────────────────────────────────────────────────────────── -00:01:51 verbose #1961 > inl print_and_return x = -00:01:51 verbose #1962 > $"printfn $\"print_and_return / x: {!x}\"" -00:01:51 verbose #1963 > x -00:01:51 verbose #1964 > 00:00:07 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 6115 -00:01:51 verbose #1965 > 00:00:07 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:01:55 verbose #1966 > 00:00:11 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/testing.dib.ipynb to html\e[0m -00:01:55 verbose #1967 > 00:00:11 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:01:55 verbose #1968 > 00:00:11 verbose #7 \e[4;7m validate(nb)\e[0m -00:01:55 verbose #1969 > 00:00:11 verbose #8 \e[4;7m[NbConvertApp] Writing 287016 bytes to c:\home\git\polyglot\lib\spiral\testing.dib.html\e[0m -00:01:55 verbose #1970 > 00:00:11 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 605 -00:01:55 verbose #1971 > 00:00:11 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 605 -00:01:55 verbose #1972 > 00:00:11 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:01:56 verbose #1973 > 00:00:12 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:01:56 verbose #1974 > 00:00:12 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:01:56 verbose #1975 > 00:00:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 6779 -00:01:56 debug #1976 execute_with_options_async / exit_code: 0 / output.Length: 9095 -00:01:56 debug #5 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path testing.dib --retries 3 -00:01:56 debug #1977 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path guid.dib --retries 3", +00:01:02 verbose #1818 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "testing.dib", "--retries", "3"]) +00:01:02 verbose #1819 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/testing.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/testing.dib" --output-path "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:01:04 verbose #1820 > > +00:01:04 verbose #1821 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:04 verbose #1822 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:04 verbose #1823 > > │ # testing │ +00:01:04 verbose #1824 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:04 verbose #1825 > > +00:01:04 verbose #1826 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:04 verbose #1827 > > inl __expect fn log name b a = +00:01:04 verbose #1828 > > inl result = fn a b +00:01:04 verbose #1829 > > inl result = +00:01:04 verbose #1830 > > result || join result +00:01:04 verbose #1831 > > if log |> not +00:01:04 verbose #1832 > > then "__expect" +00:01:04 verbose #1833 > > else +00:01:04 verbose #1834 > > inl text = $'$"{!name} / actual: %A{!a} / expected: %A{!b}"' +00:01:04 verbose #1835 > > text |> console.write_line +00:01:04 verbose #1836 > > text +00:01:04 verbose #1837 > > |> assert result +00:01:04 verbose #1838 > > +00:01:04 verbose #1839 > > inl __assert_approx_eq log e b a = __expect (fun a b => abs (b - a) < (e |> +00:01:04 verbose #1840 > > optionm.defaultWith 0.00000001)) log "assert_approx_eq" b a +00:01:04 verbose #1841 > > inl _assert_approx_eq e b a = __assert_approx_eq true e b a +00:01:04 verbose #1842 > > +00:01:04 verbose #1843 > > inl __assert_eq log b a = __expect (=) log "assert_eq" b a +00:01:04 verbose #1844 > > inl _assert_eq b a = __assert_eq true b a +00:01:04 verbose #1845 > > +00:01:04 verbose #1846 > > inl __assert_eq' log b a = __expect (=.) log "assert_eq'" b a +00:01:04 verbose #1847 > > inl _assert_eq' b a = __assert_eq' true b a +00:01:04 verbose #1848 > > +00:01:04 verbose #1849 > > inl __assert_ne log b a = __expect (<>.) log "assert_ne" b a +00:01:04 verbose #1850 > > inl _assert_ne b a = __assert_ne true b a +00:01:04 verbose #1851 > > +00:01:04 verbose #1852 > > inl __assert_gt log b a = __expect (>) log "assert_gt" b a +00:01:04 verbose #1853 > > inl _assert_gt b a = __assert_gt true b a +00:01:04 verbose #1854 > > +00:01:04 verbose #1855 > > inl __assert_ge log b a = __expect (>=) log "assert_ge" b a +00:01:04 verbose #1856 > > inl _assert_ge b a = __assert_ge true b a +00:01:04 verbose #1857 > > +00:01:04 verbose #1858 > > inl __assert_lt log b a = __expect (<) log "assert_lt" b a +00:01:04 verbose #1859 > > inl _assert_lt b a = __assert_lt true b a +00:01:04 verbose #1860 > > +00:01:04 verbose #1861 > > inl __assert_le log b a = __expect (<=) log "assert_le" b a +00:01:04 verbose #1862 > > inl _assert_le b a = __assert_le true b a +00:01:04 verbose #1863 > > +00:01:04 verbose #1864 > > inl __assert_contains forall t. log (b : t) a = +00:01:04 verbose #1865 > > __expect +00:01:04 verbose #1866 > > fun a b => +00:01:04 verbose #1867 > > a +00:01:04 verbose #1868 > > |> $'List.ofSeq' +00:01:04 verbose #1869 > > |> fun x => x : listm'.list' t +00:01:04 verbose #1870 > > |> $'List.tryFind' ((=) b) +00:01:04 verbose #1871 > > |> optionm'.unbox +00:01:04 verbose #1872 > > |> fun (x : _ t) => x <> None +00:01:04 verbose #1873 > > log "assert_contains" b a +00:01:04 verbose #1874 > > inl _assert_contains b a = __assert_contains true b a +00:01:04 verbose #1875 > > +00:01:04 verbose #1876 > > inl __assert_string_contains log b a = __expect sm'.contains log +00:01:04 verbose #1877 > > "assert_string_contains" a b +00:01:04 verbose #1878 > > inl _assert_string_contains b a = __assert_string_contains true b a +00:01:04 verbose #1879 > > +00:01:04 verbose #1880 > > inl _throws (fn : () -> ()) : option exn = +00:01:04 verbose #1881 > > inl none = None : option exn +00:01:04 verbose #1882 > > inl some (s : exn) = Some s +00:01:04 verbose #1883 > > $"try !fn (); !none with ex -> ex |> !some" +00:01:04 verbose #1884 > > +00:01:04 verbose #1885 > > inl __assert_between log a b actual = +00:01:04 verbose #1886 > > inl assert_between actual (a, b) = +00:01:04 verbose #1887 > > __assert_ge false a actual +00:01:04 verbose #1888 > > __assert_le false b actual +00:01:04 verbose #1889 > > true +00:01:04 verbose #1890 > > __expect assert_between log "assert_between" (a, b) actual +00:01:04 verbose #1891 > > inl _assert_between a b actual = __assert_between true a b actual +00:01:04 verbose #1892 > > +00:01:04 verbose #1893 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:01:04 verbose #1894 > > #r +00:01:04 verbose #1895 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:01:04 verbose #1896 > > otNet.Interactive.Spiral.dll" +00:01:04 verbose #1897 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:01:04 verbose #1898 > > #r +00:01:04 verbose #1899 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:01:04 verbose #1900 > > otNet.Interactive.dll" +00:01:04 verbose #1901 > > open type Microsoft.DotNet.Interactive.Kernel +00:01:09 verbose #1902 > > +00:01:09 verbose #1903 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:01:09 verbose #1904 > > inl __expect fn log name b a = +00:01:09 verbose #1905 > > inl result = fn a b +00:01:09 verbose #1906 > > inl result = +00:01:09 verbose #1907 > > result || join result +00:01:09 verbose #1908 > > if log |> not +00:01:09 verbose #1909 > > then "__expect" +00:01:09 verbose #1910 > > else +00:01:09 verbose #1911 > > inl text = $'$"{!name} / actual: %A{!a} / expected: %A{!b}"' +00:01:09 verbose #1912 > > text |> console.write_line +00:01:09 verbose #1913 > > text +00:01:09 verbose #1914 > > |> assert result +00:01:09 verbose #1915 > > +00:01:09 verbose #1916 > > inl __assert_approx_eq log e b a = __expect (fun a b => abs (b - a) < (e |> +00:01:09 verbose #1917 > > optionm.defaultWith 0.00000001)) log "assert_approx_eq" b a +00:01:09 verbose #1918 > > inl _assert_approx_eq e b a = __assert_approx_eq true e b a +00:01:09 verbose #1919 > > +00:01:09 verbose #1920 > > inl __assert_eq log b a = __expect (=) log "assert_eq" b a +00:01:09 verbose #1921 > > inl _assert_eq b a = __assert_eq true b a +00:01:09 verbose #1922 > > +00:01:09 verbose #1923 > > inl __assert_eq' log b a = __expect (=.) log "assert_eq'" b a +00:01:09 verbose #1924 > > inl _assert_eq' b a = __assert_eq' true b a +00:01:09 verbose #1925 > > +00:01:09 verbose #1926 > > inl __assert_ne log b a = __expect (<>.) log "assert_ne" b a +00:01:09 verbose #1927 > > inl _assert_ne b a = __assert_ne true b a +00:01:09 verbose #1928 > > +00:01:09 verbose #1929 > > inl __assert_gt log b a = __expect (>) log "assert_gt" b a +00:01:09 verbose #1930 > > inl _assert_gt b a = __assert_gt true b a +00:01:09 verbose #1931 > > +00:01:09 verbose #1932 > > inl __assert_ge log b a = __expect (>=) log "assert_ge" b a +00:01:09 verbose #1933 > > inl _assert_ge b a = __assert_ge true b a +00:01:09 verbose #1934 > > +00:01:09 verbose #1935 > > inl __assert_lt log b a = __expect (<) log "assert_lt" b a +00:01:09 verbose #1936 > > inl _assert_lt b a = __assert_lt true b a +00:01:09 verbose #1937 > > +00:01:09 verbose #1938 > > inl __assert_le log b a = __expect (<=) log "assert_le" b a +00:01:09 verbose #1939 > > inl _assert_le b a = __assert_le true b a +00:01:09 verbose #1940 > > +00:01:09 verbose #1941 > > inl __assert_contains forall t. log (b : t) a = +00:01:09 verbose #1942 > > __expect +00:01:09 verbose #1943 > > fun a b => +00:01:09 verbose #1944 > > a +00:01:09 verbose #1945 > > |> $'List.ofSeq' +00:01:09 verbose #1946 > > |> fun x => x : listm'.list' t +00:01:09 verbose #1947 > > |> $'List.tryFind' ((=) b) +00:01:09 verbose #1948 > > |> optionm'.unbox +00:01:09 verbose #1949 > > |> fun (x : _ t) => x <> None +00:01:09 verbose #1950 > > log "as... +00:01:09 verbose #1951 > > +00:01:09 verbose #1952 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:09 verbose #1953 > > //// test +00:01:09 verbose #1954 > > +00:01:09 verbose #1955 > > 1f64 +00:01:09 verbose #1956 > > |> _assert_approx_eq (Some 3) 2 +00:01:10 verbose #1957 > > +00:01:10 verbose #1958 > > ╭─[ 667.07ms - stdout ]────────────────────────────────────────────────────────╮ +00:01:10 verbose #1959 > > │ assert_approx_eq / actual: 1.0 / expected: 2.0 │ +00:01:10 verbose #1960 > > │ │ +00:01:10 verbose #1961 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:10 verbose #1962 > > +00:01:10 verbose #1963 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:10 verbose #1964 > > //// test +00:01:10 verbose #1965 > > +00:01:10 verbose #1966 > > "abcd" +00:01:10 verbose #1967 > > |> _assert_contains 'b' +00:01:11 verbose #1968 > > +00:01:11 verbose #1969 > > ╭─[ 698.23ms - stdout ]────────────────────────────────────────────────────────╮ +00:01:11 verbose #1970 > > │ assert_contains / actual: "abcd" / expected: 'b' │ +00:01:11 verbose #1971 > > │ │ +00:01:11 verbose #1972 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:11 verbose #1973 > > +00:01:11 verbose #1974 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:11 verbose #1975 > > //// test +00:01:11 verbose #1976 > > +00:01:11 verbose #1977 > > (dyn 1f64) +00:01:11 verbose #1978 > > |> _assert_approx_eq (Some 3) 2 +00:01:11 verbose #1979 > > +00:01:11 verbose #1980 > > ╭─[ 98.81ms - stdout ]─────────────────────────────────────────────────────────╮ +00:01:11 verbose #1981 > > │ assert_approx_eq / actual: 1.0 / expected: 2.0 │ +00:01:11 verbose #1982 > > │ │ +00:01:11 verbose #1983 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:11 verbose #1984 > > +00:01:11 verbose #1985 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:11 verbose #1986 > > inl print_and_return x = +00:01:11 verbose #1987 > > $"printfn $\"print_and_return / x: {!x}\"" +00:01:11 verbose #1988 > > x +00:01:11 verbose #1989 > 00:00:09 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 6115 +00:01:11 verbose #1990 > 00:00:09 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:01:13 verbose #1991 > 00:00:11 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/testing.dib.ipynb to html +00:01:13 verbose #1992 > 00:00:11 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:01:13 verbose #1993 > 00:00:11 verbose #7 ! validate(nb) +00:01:15 verbose #1994 > 00:00:13 verbose #8 ! [NbConvertApp] Writing 287016 bytes to c:\home\git\polyglot\lib\spiral\testing.dib.html +00:01:15 verbose #1995 > 00:00:13 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 645 +00:01:15 verbose #1996 > 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 645 +00:01:15 verbose #1997 > 00:00:13 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:01:16 verbose #1998 > 00:00:14 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:01:16 verbose #1999 > 00:00:14 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:01:17 verbose #2000 > 00:00:15 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 6819 +00:01:17 debug #2001 execute_with_options_async / exit_code: 0 / output.Length: 9393 +00:01:17 debug #5 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path testing.dib --retries 3 +00:01:17 debug #2002 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path guid.dib --retries 3", [||], None, None, true, None) -00:01:56 verbose #1978 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "guid.dib", "--retries", "3"]) -00:01:56 verbose #1979 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/guid.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/guid.dib" --output-path "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:02:03 verbose #1980 > -00:02:03 verbose #1981 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:03 verbose #1982 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:03 verbose #1983 > │ # guid │ -00:02:03 verbose #1984 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:03 verbose #1985 > -00:02:03 verbose #1986 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:03 verbose #1987 > //// test -00:02:03 verbose #1988 > -00:02:03 verbose #1989 > open testing -00:02:03 verbose #1990 > -00:02:03 verbose #1991 > ── spiral - import ───────────────────────────────────────────────────────────── -00:02:03 verbose #1992 > #r -00:02:03 verbose #1993 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:02:03 verbose #1994 > otNet.Interactive.Spiral.dll" -00:02:03 verbose #1995 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:02:03 verbose #1996 > #r -00:02:03 verbose #1997 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:02:03 verbose #1998 > otNet.Interactive.dll" -00:02:03 verbose #1999 > open type Microsoft.DotNet.Interactive.Kernel -00:02:03 verbose #2000 > -00:02:03 verbose #2001 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:03 verbose #2002 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:03 verbose #2003 > │ ## guid │ -00:02:03 verbose #2004 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:03 verbose #2005 > -00:02:03 verbose #2006 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:03 verbose #2007 > nominal guid = $"System.Guid" -00:02:03 verbose #2008 > -00:02:03 verbose #2009 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:03 verbose #2010 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:03 verbose #2011 > │ ## new_guid │ -00:02:03 verbose #2012 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:03 verbose #2013 > -00:02:03 verbose #2014 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:03 verbose #2015 > inl new_guid (x : string) : guid = -00:02:03 verbose #2016 > $'`guid !x ' -00:02:03 verbose #2017 > -00:02:03 verbose #2018 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:03 verbose #2019 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:03 verbose #2020 > │ ## new_raw_guid │ -00:02:03 verbose #2021 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:03 verbose #2022 > -00:02:03 verbose #2023 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:03 verbose #2024 > inl new_raw_guid () : guid = -00:02:03 verbose #2025 > $"System.Guid.NewGuid ()" -00:02:03 verbose #2026 > -00:02:03 verbose #2027 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:03 verbose #2028 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:03 verbose #2029 > │ ## main │ -00:02:03 verbose #2030 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:03 verbose #2031 > -00:02:03 verbose #2032 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:03 verbose #2033 > inl main () = -00:02:03 verbose #2034 > $"let new_guid x = !new_guid x" : () -00:02:03 verbose #2035 > $"let new_raw_guid x = !new_raw_guid x" : () -00:02:03 verbose #2036 > 00:00:07 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 2715 -00:02:03 verbose #2037 > 00:00:07 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:02:07 verbose #2038 > 00:00:10 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/guid.dib.ipynb to html\e[0m -00:02:07 verbose #2039 > 00:00:10 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:02:07 verbose #2040 > 00:00:10 verbose #7 \e[4;7m validate(nb)\e[0m -00:02:07 verbose #2041 > 00:00:10 verbose #8 \e[4;7m[NbConvertApp] Writing 276376 bytes to c:\home\git\polyglot\lib\spiral\guid.dib.html\e[0m -00:02:07 verbose #2042 > 00:00:10 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 599 -00:02:07 verbose #2043 > 00:00:10 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 599 -00:02:07 verbose #2044 > 00:00:10 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/guid.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/guid.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:02:08 verbose #2045 > 00:00:11 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:02:08 verbose #2046 > 00:00:11 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:02:08 verbose #2047 > 00:00:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 3373 -00:02:08 debug #2048 execute_with_options_async / exit_code: 0 / output.Length: 5662 -00:02:08 debug #6 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path guid.dib --retries 3 -00:02:08 debug #2049 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path async.dib --retries 3", +00:01:17 verbose #2003 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "guid.dib", "--retries", "3"]) +00:01:17 verbose #2004 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/guid.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/guid.dib" --output-path "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:01:19 verbose #2005 > > +00:01:19 verbose #2006 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:19 verbose #2007 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:19 verbose #2008 > > │ # guid │ +00:01:19 verbose #2009 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:19 verbose #2010 > > +00:01:19 verbose #2011 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:19 verbose #2012 > > //// test +00:01:19 verbose #2013 > > +00:01:19 verbose #2014 > > open testing +00:01:19 verbose #2015 > > +00:01:19 verbose #2016 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:01:19 verbose #2017 > > #r +00:01:19 verbose #2018 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:01:19 verbose #2019 > > otNet.Interactive.Spiral.dll" +00:01:19 verbose #2020 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:01:19 verbose #2021 > > #r +00:01:19 verbose #2022 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:01:19 verbose #2023 > > otNet.Interactive.dll" +00:01:19 verbose #2024 > > open type Microsoft.DotNet.Interactive.Kernel +00:01:24 verbose #2025 > > +00:01:24 verbose #2026 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:24 verbose #2027 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:24 verbose #2028 > > │ ## guid │ +00:01:24 verbose #2029 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:24 verbose #2030 > > +00:01:24 verbose #2031 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:24 verbose #2032 > > nominal guid = $"System.Guid" +00:01:24 verbose #2033 > > +00:01:24 verbose #2034 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:24 verbose #2035 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:24 verbose #2036 > > │ ## new_guid │ +00:01:24 verbose #2037 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:24 verbose #2038 > > +00:01:24 verbose #2039 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:24 verbose #2040 > > inl new_guid (x : string) : guid = +00:01:24 verbose #2041 > > $'`guid !x ' +00:01:24 verbose #2042 > > +00:01:24 verbose #2043 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:24 verbose #2044 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:24 verbose #2045 > > │ ## new_raw_guid │ +00:01:24 verbose #2046 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:24 verbose #2047 > > +00:01:24 verbose #2048 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:24 verbose #2049 > > inl new_raw_guid () : guid = +00:01:24 verbose #2050 > > $"System.Guid.NewGuid ()" +00:01:24 verbose #2051 > > +00:01:24 verbose #2052 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:24 verbose #2053 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:24 verbose #2054 > > │ ## main │ +00:01:24 verbose #2055 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:24 verbose #2056 > > +00:01:24 verbose #2057 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:24 verbose #2058 > > inl main () = +00:01:24 verbose #2059 > > $"let new_guid x = !new_guid x" : () +00:01:24 verbose #2060 > > $"let new_raw_guid x = !new_raw_guid x" : () +00:01:25 verbose #2061 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 2715 +00:01:25 verbose #2062 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:01:28 verbose #2063 > 00:00:10 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/guid.dib.ipynb to html +00:01:28 verbose #2064 > 00:00:10 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:01:28 verbose #2065 > 00:00:10 verbose #7 ! validate(nb) +00:01:29 verbose #2066 > 00:00:12 verbose #8 ! [NbConvertApp] Writing 276376 bytes to c:\home\git\polyglot\lib\spiral\guid.dib.html +00:01:29 verbose #2067 > 00:00:12 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 639 +00:01:29 verbose #2068 > 00:00:12 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 639 +00:01:29 verbose #2069 > 00:00:12 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/guid.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/guid.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:01:30 verbose #2070 > 00:00:13 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:01:30 verbose #2071 > 00:00:13 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:01:31 verbose #2072 > 00:00:14 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 3413 +00:01:31 debug #2073 execute_with_options_async / exit_code: 0 / output.Length: 5734 +00:01:31 debug #6 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path guid.dib --retries 3 +00:01:31 debug #2074 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path async.dib --retries 3", [||], None, None, true, None) -00:02:08 verbose #2050 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "async.dib", "--retries", "3"]) -00:02:08 verbose #2051 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/async.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/async.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/async.dib" --output-path "c:/home/git/polyglot/lib/spiral/async.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:02:17 verbose #2052 > -00:02:17 verbose #2053 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2054 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2055 > │ # async │ -00:02:17 verbose #2056 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2057 > -00:02:17 verbose #2058 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2059 > //// test -00:02:17 verbose #2060 > -00:02:17 verbose #2061 > open testing -00:02:17 verbose #2062 > -00:02:17 verbose #2063 > ── spiral - import ───────────────────────────────────────────────────────────── -00:02:17 verbose #2064 > #r -00:02:17 verbose #2065 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:02:17 verbose #2066 > otNet.Interactive.Spiral.dll" -00:02:17 verbose #2067 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:02:17 verbose #2068 > #r -00:02:17 verbose #2069 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:02:17 verbose #2070 > otNet.Interactive.dll" -00:02:17 verbose #2071 > open type Microsoft.DotNet.Interactive.Kernel -00:02:17 verbose #2072 > -00:02:17 verbose #2073 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2074 > open rust_operators -00:02:17 verbose #2075 > -00:02:17 verbose #2076 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2077 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2078 > │ ## types │ -00:02:17 verbose #2079 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2080 > -00:02:17 verbose #2081 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2082 > inl types () = -00:02:17 verbose #2083 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:02:17 verbose #2084 > Fable.Core.Emit(\"std::future::Future<Output = $0>\")>]]\n#endif\ntype -00:02:17 verbose #2085 > std_future_Future<'T> = class end" -00:02:17 verbose #2086 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:02:17 verbose #2087 > Fable.Core.Emit(\"futures::future::TryJoinAll<$0>\")>]]\n#endif\ntype -00:02:17 verbose #2088 > futures_future_TryJoinAll<'T> = class end" -00:02:17 verbose #2089 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:02:17 verbose #2090 > Fable.Core.Emit(\"rayon::vec::IntoIter<$0>\")>]]\n#endif\ntype -00:02:17 verbose #2091 > rayon_vec_IntoIter<'T> = class end" -00:02:17 verbose #2092 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:02:17 verbose #2093 > Fable.Core.Emit(\"rayon::iter::Map<$0, _>\")>]]\n#endif\ntype rayon_iter_Map<'T> -00:02:17 verbose #2094 > = class end" -00:02:17 verbose #2095 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:02:17 verbose #2096 > Fable.Core.Emit(\"futures_lite::stream::StreamExt\")>]]\n#endif\ntype -00:02:17 verbose #2097 > futures_lite_stream_StreamExt = class end" -00:02:17 verbose #2098 > -00:02:17 verbose #2099 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2100 > nominal stream_ext = $'futures_lite_stream_StreamExt' -00:02:17 verbose #2101 > -00:02:17 verbose #2102 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2103 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2104 > │ ## async │ -00:02:17 verbose #2105 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2106 > -00:02:17 verbose #2107 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2108 > nominal async t = $"Async<`t>" -00:02:17 verbose #2109 > -00:02:17 verbose #2110 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2111 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2112 > │ ## task │ -00:02:17 verbose #2113 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2114 > -00:02:17 verbose #2115 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2116 > nominal task t = -00:02:17 verbose #2117 > `( -00:02:17 verbose #2118 > typecase t with -00:02:17 verbose #2119 > | () => $'' : $"System.Threading.Tasks.Task" -00:02:17 verbose #2120 > | _ => $'' : $"System.Threading.Tasks.Task<`t>" -00:02:17 verbose #2121 > ) -00:02:17 verbose #2122 > -00:02:17 verbose #2123 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2124 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2125 > │ ## future │ -00:02:17 verbose #2126 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2127 > -00:02:17 verbose #2128 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2129 > nominal future t = $"std_future_Future<`t>" -00:02:17 verbose #2130 > -00:02:17 verbose #2131 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2132 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2133 > │ ## future_pin │ -00:02:17 verbose #2134 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2135 > -00:02:17 verbose #2136 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2137 > type future_pin t = rust.pin (rust.box (rust.dyn' (future t))) -00:02:17 verbose #2138 > -00:02:17 verbose #2139 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2140 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2141 > │ ## future_pin_send │ -00:02:17 verbose #2142 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2143 > -00:02:17 verbose #2144 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2145 > type future_pin_send t = rust.pin (rust.box (rust.send (rust.dyn' (future t)))) -00:02:17 verbose #2146 > -00:02:17 verbose #2147 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2148 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2149 > │ ## block_on │ -00:02:17 verbose #2150 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2151 > -00:02:17 verbose #2152 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2153 > inl block_on forall t. (fn : future_pin t) : t = -00:02:17 verbose #2154 > !\\(fn, $'"futures_lite::future::block_on($0)"') -00:02:17 verbose #2155 > -00:02:17 verbose #2156 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2157 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2158 > │ ## block_on_send │ -00:02:17 verbose #2159 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2160 > -00:02:17 verbose #2161 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2162 > inl block_on_send forall t. (fn : future_pin_send t) : t = -00:02:17 verbose #2163 > !\($'"futures_lite::future::block_on(!fn)"') -00:02:17 verbose #2164 > -00:02:17 verbose #2165 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2166 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2167 > │ ## spawn │ -00:02:17 verbose #2168 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2169 > -00:02:17 verbose #2170 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2171 > inl spawn forall t. (fn : future_pin t) : t = -00:02:17 verbose #2172 > !\($'"async_std::task::spawn(!fn)"') -00:02:17 verbose #2173 > -00:02:17 verbose #2174 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2175 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2176 > │ ## try_join_all │ -00:02:17 verbose #2177 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2178 > -00:02:17 verbose #2179 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2180 > nominal try_join_all t = $"futures_future_TryJoinAll<`t>" -00:02:17 verbose #2181 > -00:02:17 verbose #2182 > inl try_join_all forall t. (x : am'.vec (future_pin (resultm.result' t -00:02:17 verbose #2183 > sm'.std_string))) : try_join_all (future_pin (resultm.result' t sm'.std_string)) -00:02:17 verbose #2184 > = -00:02:17 verbose #2185 > inl x = join x -00:02:17 verbose #2186 > !\($'"futures::future::try_join_all(!x)"') -00:02:17 verbose #2187 > -00:02:17 verbose #2188 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2189 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2190 > │ ## await_all │ -00:02:17 verbose #2191 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2192 > -00:02:17 verbose #2193 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2194 > inl await_all forall t. (x : try_join_all (future_pin (resultm.result' t -00:02:17 verbose #2195 > sm'.std_string))) : resultm.result' (am'.vec t) sm'.std_string = -00:02:17 verbose #2196 > !\($'"!x.await"') -00:02:17 verbose #2197 > -00:02:17 verbose #2198 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2199 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2200 > │ ## await_all_send │ -00:02:17 verbose #2201 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2202 > -00:02:17 verbose #2203 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2204 > inl await_all_send forall t. (x : try_join_all (future_pin_send (resultm.result' -00:02:17 verbose #2205 > t sm'.std_string))) : resultm.result' (am'.vec t) sm'.std_string = -00:02:17 verbose #2206 > !\($'"!x.await"') -00:02:17 verbose #2207 > -00:02:17 verbose #2208 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2209 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2210 > │ ## await │ -00:02:17 verbose #2211 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2212 > -00:02:17 verbose #2213 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2214 > inl await forall t. (x : future_pin t) : t = -00:02:17 verbose #2215 > !\($'"!x.await"') -00:02:17 verbose #2216 > -00:02:17 verbose #2217 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2218 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2219 > │ ## await │ -00:02:17 verbose #2220 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2221 > -00:02:17 verbose #2222 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2223 > inl await_send forall t. (x : future_pin_send t) : t = -00:02:17 verbose #2224 > !\($'"!x.await"') -00:02:17 verbose #2225 > -00:02:17 verbose #2226 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2227 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2228 > │ ## into_iter │ -00:02:17 verbose #2229 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2230 > -00:02:17 verbose #2231 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2232 > nominal into_iter t = $'rayon_vec_IntoIter<`t>' -00:02:17 verbose #2233 > -00:02:17 verbose #2234 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2235 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2236 > │ ## into_par_iter │ -00:02:17 verbose #2237 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2238 > -00:02:17 verbose #2239 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2240 > inl into_par_iter forall t. (x : am'.vec t) : into_iter t = -00:02:17 verbose #2241 > !\($'"rayon::iter::IntoParallelIterator::into_par_iter(!x)"') -00:02:17 verbose #2242 > -00:02:17 verbose #2243 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2244 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2245 > │ ## par_iter │ -00:02:17 verbose #2246 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2247 > -00:02:17 verbose #2248 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2249 > inl par_iter forall t. (x : am'.vec t) : into_iter t = -00:02:17 verbose #2250 > !\($'"rayon::iter::IntoParallelIterator::par_iter(!x)"') -00:02:17 verbose #2251 > -00:02:17 verbose #2252 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2253 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2254 > │ ## iter_map │ -00:02:17 verbose #2255 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2256 > -00:02:17 verbose #2257 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2258 > nominal iter_map t u = $'rayon_iter_Map<`t>' -00:02:17 verbose #2259 > -00:02:17 verbose #2260 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2261 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2262 > │ ## par_map │ -00:02:17 verbose #2263 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2264 > -00:02:17 verbose #2265 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2266 > inl par_map forall t u. (fn : t -> u) (ar : into_iter t) : iter_map (into_iter -00:02:17 verbose #2267 > t) u = -00:02:17 verbose #2268 > !\\((ar, fn), $'"rayon::iter::ParallelIterator::map($0, |x| $1(x))"') -00:02:17 verbose #2269 > -00:02:17 verbose #2270 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2271 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2272 > │ ## par_collect │ -00:02:17 verbose #2273 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2274 > -00:02:17 verbose #2275 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2276 > inl par_collect forall t u. (iter : iter_map (into_iter t) u) : am'.vec u = -00:02:17 verbose #2277 > !\\(iter, $'"rayon::iter::ParallelIterator::collect($0)"') -00:02:17 verbose #2278 > -00:02:17 verbose #2279 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2280 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2281 > │ ## try_join_all_iter │ -00:02:17 verbose #2282 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2283 > -00:02:17 verbose #2284 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2285 > inl try_join_all_iter forall t. (x : am'.vec (future_pin_send (resultm.result' t -00:02:17 verbose #2286 > sm'.std_string))) : try_join_all (future_pin_send (resultm.result' t -00:02:17 verbose #2287 > sm'.std_string)) = -00:02:17 verbose #2288 > inl x = join x -00:02:17 verbose #2289 > !\($'"futures::future::try_join_all(!x)"') -00:02:17 verbose #2290 > -00:02:17 verbose #2291 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2292 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2293 > │ ## new_future │ -00:02:17 verbose #2294 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2295 > -00:02:17 verbose #2296 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2297 > inl new_future forall t. (x : () -> t) : future_pin t = -00:02:17 verbose #2298 > join -00:02:17 verbose #2299 > !\($'"{Box::pin(async { //"') -00:02:17 verbose #2300 > x () |> fun x => join $'!x ' -00:02:17 verbose #2301 > !\($'"}}) //"') -00:02:17 verbose #2302 > -00:02:17 verbose #2303 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2304 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2305 > │ ## new_future_move │ -00:02:17 verbose #2306 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2307 > -00:02:17 verbose #2308 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2309 > inl new_future_move forall t. (x : () -> t) : future_pin t = -00:02:17 verbose #2310 > join -00:02:17 verbose #2311 > !\($'"{Box::pin(async move { //"') -00:02:17 verbose #2312 > x () |> fun x => join $'!x ' -00:02:17 verbose #2313 > !\($'"}}) //"') -00:02:17 verbose #2314 > -00:02:17 verbose #2315 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2316 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2317 > │ ## future_init │ -00:02:17 verbose #2318 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2319 > -00:02:17 verbose #2320 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2321 > inl future_init forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t) : -00:02:17 verbose #2322 > future_pin t = -00:02:17 verbose #2323 > // join -00:02:17 verbose #2324 > // if flag = 1 -00:02:17 verbose #2325 > // then new_future_move x -00:02:17 verbose #2326 > // else new_future x -00:02:17 verbose #2327 > if flag = 1 -00:02:17 verbose #2328 > then !\($'"let __result = Box::pin(async move { //"') -00:02:17 verbose #2329 > else !\($'"let __result = Box::pin(async { //"') -00:02:17 verbose #2330 > -00:02:17 verbose #2331 > let x' = x () -00:02:17 verbose #2332 > inl x' = join x' -00:02:17 verbose #2333 > -00:02:17 verbose #2334 > x' |> rust.fix_closure depth -00:02:17 verbose #2335 > -00:02:17 verbose #2336 > !\($'"__result"') -00:02:17 verbose #2337 > -00:02:17 verbose #2338 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2339 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2340 > │ ## future_init_send │ -00:02:17 verbose #2341 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2342 > -00:02:17 verbose #2343 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2344 > inl future_init_send forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t) : -00:02:17 verbose #2345 > future_pin_send t = -00:02:17 verbose #2346 > // join -00:02:17 verbose #2347 > // if flag = 1 -00:02:17 verbose #2348 > // then new_future_move x -00:02:17 verbose #2349 > // else new_future x -00:02:17 verbose #2350 > join -00:02:17 verbose #2351 > if flag = 1 -00:02:17 verbose #2352 > then !\($'"let __result = Box::pin(async move { //"') -00:02:17 verbose #2353 > else !\($'"let __result = Box::pin(async { //"') -00:02:17 verbose #2354 > -00:02:17 verbose #2355 > let x' = x () -00:02:17 verbose #2356 > inl x' = join x' -00:02:17 verbose #2357 > -00:02:17 verbose #2358 > x' |> rust.fix_closure depth -00:02:17 verbose #2359 > -00:02:17 verbose #2360 > !\($'"__result"') -00:02:17 verbose #2361 > -00:02:17 verbose #2362 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2363 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2364 > │ ## new_future_move_init │ -00:02:17 verbose #2365 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2366 > -00:02:17 verbose #2367 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2368 > inl new_future_move_init forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t) -00:02:17 verbose #2369 > : future_pin t = -00:02:17 verbose #2370 > future_init depth flag x -00:02:17 verbose #2371 > // join -00:02:17 verbose #2372 > // !\($'"{Box::pin(async move { //"') -00:02:17 verbose #2373 > // inl x' = x () |> fun x => join $'!x ' -00:02:17 verbose #2374 > -00:02:17 verbose #2375 > // inl depth = depth |> fst -00:02:17 verbose #2376 > // if depth = 1 -00:02:17 verbose #2377 > // then !\($'"!x' })"') -00:02:17 verbose #2378 > // elif depth = 2 -00:02:17 verbose #2379 > // then !\($'"!x' }})"') -00:02:17 verbose #2380 > // elif depth = 3 -00:02:17 verbose #2381 > // then !\($'"!x' }}})"') -00:02:17 verbose #2382 > // elif depth = 4 -00:02:17 verbose #2383 > // then !\($'"!x' }}}})"') -00:02:17 verbose #2384 > -00:02:17 verbose #2385 > // !\($'"// 1"') -00:02:17 verbose #2386 > -00:02:17 verbose #2387 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2388 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2389 > │ ## new_async_unit │ -00:02:17 verbose #2390 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2391 > -00:02:17 verbose #2392 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2393 > inl new_async_unit forall t. (fn : () -> ()) : async t = -00:02:17 verbose #2394 > run_target function -00:02:17 verbose #2395 > | Fsharp (Native) => fun () => -00:02:17 verbose #2396 > inl result : optionm'.option' (async t) = optionm'.none' () -00:02:17 verbose #2397 > $"let mutable _!result = !result" -00:02:17 verbose #2398 > $"async {" -00:02:17 verbose #2399 > fn () -00:02:17 verbose #2400 > $"}" -00:02:17 verbose #2401 > $"|> fun x -> _!result <- Some x" -00:02:17 verbose #2402 > $"_!result |> Option.get" -00:02:17 verbose #2403 > | _ => fun () => null () -00:02:17 verbose #2404 > -00:02:17 verbose #2405 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2406 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2407 > │ ## new_async │ -00:02:17 verbose #2408 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2409 > -00:02:17 verbose #2410 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2411 > inl new_async forall t. (fn : () -> t) : async t = -00:02:17 verbose #2412 > new_async_unit (fn >> ignore) -00:02:17 verbose #2413 > -00:02:17 verbose #2414 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2415 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2416 > │ ## new_task │ -00:02:17 verbose #2417 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2418 > -00:02:17 verbose #2419 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2420 > inl new_task forall t. (fn : () -> t) : task t = -00:02:17 verbose #2421 > run_target function -00:02:17 verbose #2422 > | Fsharp (Native) => fun () => -00:02:17 verbose #2423 > inl result : optionm'.option' (task t) = optionm'.none' () -00:02:17 verbose #2424 > $"let mutable _!result = !result" -00:02:17 verbose #2425 > $"task {" -00:02:17 verbose #2426 > fn () |> ignore -00:02:17 verbose #2427 > $"}" -00:02:17 verbose #2428 > $"|> fun x -> _!result <- Some x" -00:02:17 verbose #2429 > $"_!result |> Option.get" -00:02:17 verbose #2430 > | _ => fun () => null () -00:02:17 verbose #2431 > -00:02:17 verbose #2432 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2433 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2434 > │ ## await_task │ -00:02:17 verbose #2435 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2436 > -00:02:17 verbose #2437 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2438 > inl await_task forall t. (a : task t) : async t = -00:02:17 verbose #2439 > run_target function -00:02:17 verbose #2440 > | Fsharp (Native) => fun () => -00:02:17 verbose #2441 > a |> $'Async.AwaitTask' -00:02:17 verbose #2442 > | _ => fun () => null () -00:02:17 verbose #2443 > -00:02:17 verbose #2444 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2445 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2446 > │ ## ignore │ -00:02:17 verbose #2447 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2448 > -00:02:17 verbose #2449 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2450 > inl ignore forall t. (a : async t) : async () = -00:02:17 verbose #2451 > run_target function -00:02:17 verbose #2452 > | Fsharp (Native) => fun () => -00:02:17 verbose #2453 > a |> $'Async.Ignore' -00:02:17 verbose #2454 > | _ => fun () => null () -00:02:17 verbose #2455 > -00:02:17 verbose #2456 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2457 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2458 > │ ## run_synchronously │ -00:02:17 verbose #2459 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2460 > -00:02:17 verbose #2461 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2462 > inl run_synchronously forall t. (a : async t) : t = -00:02:17 verbose #2463 > run_target function -00:02:17 verbose #2464 > | Fsharp (Native) => fun () => -00:02:17 verbose #2465 > a |> $'Async.RunSynchronously' -00:02:17 verbose #2466 > | _ => fun () => null () -00:02:17 verbose #2467 > -00:02:17 verbose #2468 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2469 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2470 > │ ## start │ -00:02:17 verbose #2471 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2472 > -00:02:17 verbose #2473 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2474 > inl start (a : async ()) : () = -00:02:17 verbose #2475 > run_target function -00:02:17 verbose #2476 > | Fsharp (Native) => fun () => -00:02:17 verbose #2477 > a |> $'Async.Start' -00:02:17 verbose #2478 > | _ => fun () => null () -00:02:17 verbose #2479 > -00:02:17 verbose #2480 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2481 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2482 > │ ## start_child │ -00:02:17 verbose #2483 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2484 > -00:02:17 verbose #2485 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2486 > inl start_child forall t. (a : async t) : async (async t) = -00:02:17 verbose #2487 > run_target function -00:02:17 verbose #2488 > | Fsharp (Native) => fun () => -00:02:17 verbose #2489 > a |> $'Async.StartChild' -00:02:17 verbose #2490 > | _ => fun () => null () -00:02:17 verbose #2491 > -00:02:17 verbose #2492 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2493 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2494 > │ ## start_child_timeout │ -00:02:17 verbose #2495 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2496 > -00:02:17 verbose #2497 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2498 > inl start_child_timeout forall t. (timeout : i32) (a : async t) : async (async -00:02:17 verbose #2499 > t) = -00:02:17 verbose #2500 > run_target function -00:02:17 verbose #2501 > | Fsharp (Native) => fun () => -00:02:17 verbose #2502 > $'Async.StartChild (!a, !timeout)' -00:02:17 verbose #2503 > | _ => fun () => null () -00:02:17 verbose #2504 > -00:02:17 verbose #2505 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2506 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2507 > │ ## start_immediate │ -00:02:17 verbose #2508 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2509 > -00:02:17 verbose #2510 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2511 > inl start_immediate forall t. (a : async t) : () = -00:02:17 verbose #2512 > run_target function -00:02:17 verbose #2513 > | Fsharp (Native) => fun () => -00:02:17 verbose #2514 > a |> $'Async.StartImmediate' -00:02:17 verbose #2515 > | _ => fun () => null () -00:02:17 verbose #2516 > -00:02:17 verbose #2517 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2518 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2519 > │ ## task_canceled_exception │ -00:02:17 verbose #2520 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2521 > -00:02:17 verbose #2522 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2523 > nominal task_canceled_exception = -00:02:17 verbose #2524 > $'System.Threading.Tasks.TaskCanceledException' -00:02:17 verbose #2525 > -00:02:17 verbose #2526 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2527 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2528 > │ ## sleep │ -00:02:17 verbose #2529 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2530 > -00:02:17 verbose #2531 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2532 > inl sleep (ms : i32) : async () = -00:02:17 verbose #2533 > run_target function -00:02:17 verbose #2534 > | Fsharp (Native) => fun () => -00:02:17 verbose #2535 > ms |> $'Async.Sleep' -00:02:17 verbose #2536 > | _ => fun () => null () -00:02:17 verbose #2537 > -00:02:17 verbose #2538 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2539 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2540 > │ ## do │ -00:02:17 verbose #2541 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2542 > -00:02:17 verbose #2543 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2544 > inl do (a : async ()) : () = -00:02:17 verbose #2545 > $'do\! !a ' -00:02:17 verbose #2546 > -00:02:17 verbose #2547 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2548 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2549 > │ ## let' │ -00:02:17 verbose #2550 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2551 > -00:02:17 verbose #2552 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2553 > inl let' forall t. (a : async t) : t = -00:02:17 verbose #2554 > $'let\! !a = !a ' -00:02:17 verbose #2555 > $'!a ' -00:02:17 verbose #2556 > -00:02:17 verbose #2557 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2558 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2559 > │ ## return_await │ -00:02:17 verbose #2560 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2561 > -00:02:17 verbose #2562 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2563 > inl return_await forall t. (a : async t) : () = -00:02:17 verbose #2564 > $'return\! !a ' -00:02:17 verbose #2565 > -00:02:17 verbose #2566 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2567 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2568 > │ ## return_await' │ -00:02:17 verbose #2569 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2570 > -00:02:17 verbose #2571 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2572 > inl return_await' forall t. (a : async t) : t = -00:02:17 verbose #2573 > $'return\! !a ' -00:02:17 verbose #2574 > -00:02:17 verbose #2575 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2576 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2577 > │ ## map │ -00:02:17 verbose #2578 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2579 > -00:02:17 verbose #2580 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2581 > inl map forall t u. (fn : t -> u) (a : async t) : async u = -00:02:17 verbose #2582 > fun () => -00:02:17 verbose #2583 > inl x = a |> let' -00:02:17 verbose #2584 > fn x |> return -00:02:17 verbose #2585 > |> new_async_unit -00:02:17 verbose #2586 > -00:02:17 verbose #2587 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2588 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2589 > │ ## choice │ -00:02:17 verbose #2590 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2591 > -00:02:17 verbose #2592 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2593 > union choice t1 t2 = -00:02:17 verbose #2594 > | Choice1Of2 : t1 -00:02:17 verbose #2595 > | Choice2Of2 : t2 -00:02:17 verbose #2596 > -00:02:17 verbose #2597 > nominal choice' t1 t2 = $'Choice<`t1, `t2>' -00:02:17 verbose #2598 > -00:02:17 verbose #2599 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2600 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2601 > │ ## choice_unbox │ -00:02:17 verbose #2602 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2603 > -00:02:17 verbose #2604 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2605 > inl choice_unbox forall t1 t2. (choice : choice' t1 t2) : choice t1 t2 = -00:02:17 verbose #2606 > run_target function -00:02:17 verbose #2607 > | Fsharp (Native) => fun () => -00:02:17 verbose #2608 > inl choice1Of2 (x : t1) : _ _ t2 = Choice1Of2 x -00:02:17 verbose #2609 > inl choice2Of2 (x : t2) : _ t1 _ = Choice2Of2 x -00:02:17 verbose #2610 > $'match !choice with Choice1Of2 x -> !choice1Of2 x | Choice2Of2 x -> -00:02:17 verbose #2611 > !choice2Of2 x' -00:02:17 verbose #2612 > | _ => fun () => null () -00:02:17 verbose #2613 > -00:02:17 verbose #2614 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2615 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2616 > │ ## catch' │ -00:02:17 verbose #2617 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2618 > -00:02:17 verbose #2619 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2620 > inl catch' forall t e. (a : async t) : async (choice' t e) = -00:02:17 verbose #2621 > run_target function -00:02:17 verbose #2622 > | Fsharp (Native) => fun () => -00:02:17 verbose #2623 > a |> $'Async.Catch' -00:02:17 verbose #2624 > | _ => fun () => null () -00:02:17 verbose #2625 > -00:02:17 verbose #2626 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2627 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2628 > │ ## catch │ -00:02:17 verbose #2629 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2630 > -00:02:17 verbose #2631 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2632 > inl catch forall t e. (a : async t) : async (result t e) = -00:02:17 verbose #2633 > a -00:02:17 verbose #2634 > |> catch' -00:02:17 verbose #2635 > |> map choice_unbox -00:02:17 verbose #2636 > |> map function -00:02:17 verbose #2637 > | Choice1Of2 result => Ok result -00:02:17 verbose #2638 > | Choice2Of2 ex => Error ex -00:02:17 verbose #2639 > -00:02:17 verbose #2640 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2641 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2642 > │ ## run_with_timeout_async │ -00:02:17 verbose #2643 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2644 > -00:02:17 verbose #2645 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2646 > inl run_with_timeout_async forall t. (timeout : i32) (fn : async t) : async -00:02:17 verbose #2647 > (option t) = -00:02:17 verbose #2648 > run_target function -00:02:17 verbose #2649 > | Fsharp (Native) => fun () => -00:02:17 verbose #2650 > fun () => -00:02:17 verbose #2651 > inl _locals () = $'$"timeout: {!timeout} / {!_locals ()}"' -00:02:17 verbose #2652 > inl child = fn |> start_child_timeout timeout |> let' -00:02:17 verbose #2653 > child -00:02:17 verbose #2654 > |> catch -00:02:17 verbose #2655 > |> map function -00:02:17 verbose #2656 > | Ok result => Some result -00:02:17 verbose #2657 > | Error ex when ex |> sm'.format_debug |> sm'.contains -00:02:17 verbose #2658 > "System.TimeoutException" => -00:02:17 verbose #2659 > trace Debug (fun () => $'"run_with_timeout_async"') -00:02:17 verbose #2660 > _locals -00:02:17 verbose #2661 > None -00:02:17 verbose #2662 > | Error (ex : exn) => -00:02:17 verbose #2663 > inl ex = ex |> sm'.format_exception -00:02:17 verbose #2664 > trace Critical (fun () => $'$"run_with_timeout_async** -00:02:17 verbose #2665 > ex: {!ex}"') _locals -00:02:17 verbose #2666 > None -00:02:17 verbose #2667 > |> return_await -00:02:17 verbose #2668 > |> new_async_unit -00:02:17 verbose #2669 > | _ => fun () => null () -00:02:17 verbose #2670 > -00:02:17 verbose #2671 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2672 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2673 > │ ## run_with_timeout │ -00:02:17 verbose #2674 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2675 > -00:02:17 verbose #2676 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2677 > inl run_with_timeout timeout fn = -00:02:17 verbose #2678 > fn -00:02:17 verbose #2679 > |> run_with_timeout_async timeout -00:02:17 verbose #2680 > |> run_synchronously -00:02:17 verbose #2681 > -00:02:17 verbose #2682 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2683 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2684 > │ ## cancellation_token │ -00:02:17 verbose #2685 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2686 > -00:02:17 verbose #2687 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2688 > inl cancellation_token () : async threading.cancellation_token = -00:02:17 verbose #2689 > $'Async.CancellationToken' -00:02:17 verbose #2690 > -00:02:17 verbose #2691 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2692 > inl default_cancellation_token () : threading.cancellation_token = -00:02:17 verbose #2693 > $'Async.DefaultCancellationToken' -00:02:17 verbose #2694 > -00:02:17 verbose #2695 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2696 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2697 > │ ## merge_cancellation_token_with_default_async │ -00:02:17 verbose #2698 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2699 > -00:02:17 verbose #2700 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2701 > inl merge_cancellation_token_with_default_async -00:02:17 verbose #2702 > (token : threading.cancellation_token) -00:02:17 verbose #2703 > : async threading.cancellation_token -00:02:17 verbose #2704 > = -00:02:17 verbose #2705 > run_target function -00:02:17 verbose #2706 > | Fsharp (Native) => fun () => -00:02:17 verbose #2707 > fun () => -00:02:17 verbose #2708 > inl ct = cancellation_token () |> let' -00:02:17 verbose #2709 > inl dct = default_cancellation_token () -00:02:17 verbose #2710 > inl cts = threading.create_linked_token_source ;[[ ct; dct; -00:02:17 verbose #2711 > token ]] -00:02:17 verbose #2712 > cts |> threading.cancellation_source_token |> return -00:02:17 verbose #2713 > |> new_async_unit -00:02:17 verbose #2714 > | _ => fun () => null () -00:02:17 verbose #2715 > -00:02:17 verbose #2716 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2717 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2718 > │ ## with_trace_level │ -00:02:17 verbose #2719 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2720 > -00:02:17 verbose #2721 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2722 > inl with_trace_level forall t. level fn : _ t = new_async fun () => -00:02:17 verbose #2723 > inl trace_state = get_trace_state_or_init None -00:02:17 verbose #2724 > inl old_trace_level = *trace_state.level -00:02:17 verbose #2725 > inl trace_level = trace_state.level -00:02:17 verbose #2726 > try_finally -00:02:17 verbose #2727 > fun () => -00:02:17 verbose #2728 > trace_level <- level -00:02:17 verbose #2729 > fn |> return_await -00:02:17 verbose #2730 > fun () => -00:02:17 verbose #2731 > trace_level <- old_trace_level -00:02:17 verbose #2732 > -00:02:17 verbose #2733 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2734 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2735 > │ ## value_task │ -00:02:17 verbose #2736 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2737 > -00:02:17 verbose #2738 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2739 > nominal value_task = $'System.Threading.Tasks.ValueTask' -00:02:17 verbose #2740 > -00:02:17 verbose #2741 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2742 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2743 > │ ## value_task_as_task │ -00:02:17 verbose #2744 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2745 > -00:02:17 verbose #2746 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2747 > inl value_task_as_task (task : value_task) : task () = -00:02:17 verbose #2748 > $'!task.AsTask' () -00:02:17 verbose #2749 > -00:02:17 verbose #2750 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2751 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2752 > │ ## await_value_task_unit │ -00:02:17 verbose #2753 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2754 > -00:02:17 verbose #2755 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2756 > inl await_value_task_unit (task : value_task) : async () = -00:02:17 verbose #2757 > task |> value_task_as_task |> await_task -00:02:17 verbose #2758 > -00:02:17 verbose #2759 > ── markdown ──────────────────────────────────────────────────────────────────── -00:02:17 verbose #2760 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:02:17 verbose #2761 > │ ## main │ -00:02:17 verbose #2762 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:02:17 verbose #2763 > -00:02:17 verbose #2764 > ── spiral ────────────────────────────────────────────────────────────────────── -00:02:17 verbose #2765 > inl main () = -00:02:17 verbose #2766 > types () -00:02:17 verbose #2767 > $"let merge_cancellation_token_with_default_async x = -00:02:17 verbose #2768 > !merge_cancellation_token_with_default_async x" : () -00:02:17 verbose #2769 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 35210 -00:02:17 verbose #2770 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/async.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/async.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:02:21 verbose #2771 > 00:00:12 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/async.dib.ipynb to html\e[0m -00:02:21 verbose #2772 > 00:00:12 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:02:21 verbose #2773 > 00:00:12 verbose #7 \e[4;7m validate(nb)\e[0m -00:02:21 verbose #2774 > 00:00:12 verbose #8 \e[4;7m[NbConvertApp] Writing 385396 bytes to c:\home\git\polyglot\lib\spiral\async.dib.html\e[0m -00:02:21 verbose #2775 > 00:00:12 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 601 -00:02:21 verbose #2776 > 00:00:12 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 601 -00:02:21 verbose #2777 > 00:00:12 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/async.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/async.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:02:22 verbose #2778 > 00:00:13 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:02:22 verbose #2779 > 00:00:13 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:02:22 verbose #2780 > 00:00:14 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 35870 -00:02:22 debug #2781 execute_with_options_async / exit_code: 0 / output.Length: 38170 -00:02:22 debug #7 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path async.dib --retries 3 -00:02:22 debug #2782 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path runtime.dib --retries 3", +00:01:31 verbose #2075 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "async.dib", "--retries", "3"]) +00:01:31 verbose #2076 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/async.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/async.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/async.dib" --output-path "c:/home/git/polyglot/lib/spiral/async.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:01:34 verbose #2077 > > +00:01:34 verbose #2078 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:34 verbose #2079 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:34 verbose #2080 > > │ # async │ +00:01:34 verbose #2081 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:34 verbose #2082 > > +00:01:34 verbose #2083 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:34 verbose #2084 > > //// test +00:01:34 verbose #2085 > > +00:01:34 verbose #2086 > > open testing +00:01:34 verbose #2087 > > +00:01:34 verbose #2088 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:01:34 verbose #2089 > > #r +00:01:34 verbose #2090 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:01:34 verbose #2091 > > otNet.Interactive.Spiral.dll" +00:01:34 verbose #2092 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:01:34 verbose #2093 > > #r +00:01:34 verbose #2094 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:01:34 verbose #2095 > > otNet.Interactive.dll" +00:01:34 verbose #2096 > > open type Microsoft.DotNet.Interactive.Kernel +00:01:39 verbose #2097 > > +00:01:39 verbose #2098 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2099 > > open rust_operators +00:01:39 verbose #2100 > > +00:01:39 verbose #2101 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2102 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2103 > > │ ## types │ +00:01:39 verbose #2104 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2105 > > +00:01:39 verbose #2106 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2107 > > inl types () = +00:01:39 verbose #2108 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:39 verbose #2109 > > Fable.Core.Emit(\"async_std::task::JoinHandle<$0>\")>]]\n#endif\ntype +00:01:39 verbose #2110 > > async_std_task_JoinHandle<'T> = class end" +00:01:39 verbose #2111 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:39 verbose #2112 > > Fable.Core.Emit(\"std::future::Future<Output = $0>\")>]]\n#endif\ntype +00:01:39 verbose #2113 > > std_future_Future<'T> = class end" +00:01:39 verbose #2114 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:39 verbose #2115 > > Fable.Core.Emit(\"rayon::vec::IntoIter<$0>\")>]]\n#endif\ntype +00:01:39 verbose #2116 > > rayon_vec_IntoIter<'T> = class end" +00:01:39 verbose #2117 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:39 verbose #2118 > > Fable.Core.Emit(\"rayon::iter::Map<$0, _>\")>]]\n#endif\ntype rayon_iter_Map<'T> +00:01:39 verbose #2119 > > = class end" +00:01:39 verbose #2120 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:39 verbose #2121 > > Fable.Core.Emit(\"futures_lite::stream::StreamExt\")>]]\n#endif\ntype +00:01:39 verbose #2122 > > futures_lite_stream_StreamExt = class end" +00:01:39 verbose #2123 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:39 verbose #2124 > > Fable.Core.Emit(\"futures::future::TryJoinAll<$0>\")>]]\n#endif\ntype +00:01:39 verbose #2125 > > futures_future_TryJoinAll<'T> = class end" +00:01:39 verbose #2126 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:39 verbose #2127 > > Fable.Core.Emit(\"futures::future::Fuse<$0>\")>]]\n#endif\ntype +00:01:39 verbose #2128 > > futures_future_Fuse<'T> = class end" +00:01:39 verbose #2129 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:39 verbose #2130 > > Fable.Core.Emit(\"futures::future::JoinAll<$0>\")>]]\n#endif\ntype +00:01:39 verbose #2131 > > futures_future_JoinAll<'T> = class end" +00:01:39 verbose #2132 > > +00:01:39 verbose #2133 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2134 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2135 > > │ ## async │ +00:01:39 verbose #2136 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2137 > > +00:01:39 verbose #2138 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2139 > > nominal async t = $"Async<`t>" +00:01:39 verbose #2140 > > +00:01:39 verbose #2141 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2142 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2143 > > │ ## task │ +00:01:39 verbose #2144 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2145 > > +00:01:39 verbose #2146 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2147 > > nominal task t = +00:01:39 verbose #2148 > > `( +00:01:39 verbose #2149 > > typecase t with +00:01:39 verbose #2150 > > | () => $'' : $"System.Threading.Tasks.Task" +00:01:39 verbose #2151 > > | _ => $'' : $"System.Threading.Tasks.Task<`t>" +00:01:39 verbose #2152 > > ) +00:01:39 verbose #2153 > > +00:01:39 verbose #2154 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2155 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2156 > > │ ## future │ +00:01:39 verbose #2157 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2158 > > +00:01:39 verbose #2159 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2160 > > nominal future t = $"std_future_Future<`t>" +00:01:39 verbose #2161 > > +00:01:39 verbose #2162 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2163 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2164 > > │ ## future_pin │ +00:01:39 verbose #2165 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2166 > > +00:01:39 verbose #2167 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2168 > > type future_pin t = rust.pin (rust.box (rust.dyn' (future t))) +00:01:39 verbose #2169 > > +00:01:39 verbose #2170 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2171 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2172 > > │ ## future_pin_send │ +00:01:39 verbose #2173 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2174 > > +00:01:39 verbose #2175 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2176 > > type future_pin_send t = rust.pin (rust.box (rust.send (rust.dyn' (future t)))) +00:01:39 verbose #2177 > > +00:01:39 verbose #2178 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2179 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2180 > > │ ## block_on │ +00:01:39 verbose #2181 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2182 > > +00:01:39 verbose #2183 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2184 > > inl block_on forall t. (fn : future_pin t) : t = +00:01:39 verbose #2185 > > !\\(fn, $'"futures_lite::future::block_on($0)"') +00:01:39 verbose #2186 > > +00:01:39 verbose #2187 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2188 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2189 > > │ ## block_on_send │ +00:01:39 verbose #2190 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2191 > > +00:01:39 verbose #2192 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2193 > > inl block_on_send forall t. (fn : future_pin_send t) : t = +00:01:39 verbose #2194 > > !\($'"futures_lite::future::block_on(!fn)"') +00:01:39 verbose #2195 > > +00:01:39 verbose #2196 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2197 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2198 > > │ ## stream_ext │ +00:01:39 verbose #2199 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2200 > > +00:01:39 verbose #2201 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2202 > > nominal stream_ext = $'futures_lite_stream_StreamExt' +00:01:39 verbose #2203 > > +00:01:39 verbose #2204 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2205 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2206 > > │ ## join_handle │ +00:01:39 verbose #2207 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2208 > > +00:01:39 verbose #2209 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2210 > > nominal join_handle t = $'async_std_task_JoinHandle<`t>' +00:01:39 verbose #2211 > > +00:01:39 verbose #2212 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2213 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2214 > > │ ## spawn │ +00:01:39 verbose #2215 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2216 > > +00:01:39 verbose #2217 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2218 > > inl spawn forall t. (fn : future_pin_send t) : join_handle t = +00:01:39 verbose #2219 > > !\($'"async_std::task::spawn(!fn)"') +00:01:39 verbose #2220 > > +00:01:39 verbose #2221 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2222 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2223 > > │ ## try_join_all │ +00:01:39 verbose #2224 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2225 > > +00:01:39 verbose #2226 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2227 > > nominal try_join_all t = $"futures_future_TryJoinAll<`t>" +00:01:39 verbose #2228 > > +00:01:39 verbose #2229 > > inl try_join_all forall t. (x : am'.vec (future_pin (resultm.result' t +00:01:39 verbose #2230 > > sm'.std_string))) : try_join_all (future_pin (resultm.result' t sm'.std_string)) +00:01:39 verbose #2231 > > = +00:01:39 verbose #2232 > > inl x = join x +00:01:39 verbose #2233 > > !\($'"futures::future::try_join_all(!x)"') +00:01:39 verbose #2234 > > +00:01:39 verbose #2235 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2236 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2237 > > │ ## fuse │ +00:01:39 verbose #2238 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2239 > > +00:01:39 verbose #2240 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2241 > > nominal fuse t = $"futures_future_Fuse<`t>" +00:01:39 verbose #2242 > > +00:01:39 verbose #2243 > > inl future_fuse forall t. (x : future_pin t) : fuse (future_pin t) = +00:01:39 verbose #2244 > > !\($'"futures::future::FutureExt::fuse(!x)"') +00:01:39 verbose #2245 > > +00:01:39 verbose #2246 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2247 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2248 > > │ ## join_all │ +00:01:39 verbose #2249 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2250 > > +00:01:39 verbose #2251 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2252 > > nominal join_all t = $"futures_future_JoinAll<`t>" +00:01:39 verbose #2253 > > +00:01:39 verbose #2254 > > inl join_all forall t. (x : am'.vec (future_pin t)) : join_all (future_pin t) = +00:01:39 verbose #2255 > > inl x = join x +00:01:39 verbose #2256 > > !\($'"futures::future::join_all(!x)"') +00:01:39 verbose #2257 > > +00:01:39 verbose #2258 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2259 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2260 > > │ ## join_all_send │ +00:01:39 verbose #2261 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2262 > > +00:01:39 verbose #2263 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2264 > > inl join_all_send forall t. (x : am'.vec (future_pin_send t)) : join_all +00:01:39 verbose #2265 > > (future_pin_send t) = +00:01:39 verbose #2266 > > inl x = join x +00:01:39 verbose #2267 > > !\($'"futures::future::join_all(!x)"') +00:01:39 verbose #2268 > > +00:01:39 verbose #2269 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2270 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2271 > > │ ## await_handle │ +00:01:39 verbose #2272 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2273 > > +00:01:39 verbose #2274 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2275 > > inl await_handle forall t. (x : join_handle t) : t = +00:01:39 verbose #2276 > > !\($'"!x.await"') +00:01:39 verbose #2277 > > +00:01:39 verbose #2278 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2279 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2280 > > │ ## await_all │ +00:01:39 verbose #2281 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2282 > > +00:01:39 verbose #2283 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2284 > > inl await_all forall t. (x : join_all (future_pin t)) : am'.vec t = +00:01:39 verbose #2285 > > !\($'"!x.await"') +00:01:39 verbose #2286 > > +00:01:39 verbose #2287 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2288 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2289 > > │ ## await_all_send │ +00:01:39 verbose #2290 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2291 > > +00:01:39 verbose #2292 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2293 > > inl await_all_send forall t. (x : join_all (future_pin_send t)) : am'.vec t = +00:01:39 verbose #2294 > > !\($'"!x.await"') +00:01:39 verbose #2295 > > +00:01:39 verbose #2296 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2297 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2298 > > │ ## try_await_all │ +00:01:39 verbose #2299 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2300 > > +00:01:39 verbose #2301 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2302 > > inl try_await_all forall t. (x : try_join_all (future_pin (resultm.result' t +00:01:39 verbose #2303 > > sm'.std_string))) : resultm.result' (am'.vec t) sm'.std_string = +00:01:39 verbose #2304 > > !\($'"!x.await"') +00:01:39 verbose #2305 > > +00:01:39 verbose #2306 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2307 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2308 > > │ ## try_await_all_send │ +00:01:39 verbose #2309 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2310 > > +00:01:39 verbose #2311 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2312 > > inl try_await_all_send forall t. (x : try_join_all (future_pin_send +00:01:39 verbose #2313 > > (resultm.result' t sm'.std_string))) : resultm.result' (am'.vec t) +00:01:39 verbose #2314 > > sm'.std_string = +00:01:39 verbose #2315 > > !\($'"!x.await"') +00:01:39 verbose #2316 > > +00:01:39 verbose #2317 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2318 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2319 > > │ ## await │ +00:01:39 verbose #2320 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2321 > > +00:01:39 verbose #2322 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2323 > > inl await forall t. (x : future_pin t) : t = +00:01:39 verbose #2324 > > !\($'"!x.await"') +00:01:39 verbose #2325 > > +00:01:39 verbose #2326 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2327 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2328 > > │ ## await │ +00:01:39 verbose #2329 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2330 > > +00:01:39 verbose #2331 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2332 > > inl await_send forall t. (x : future_pin_send t) : t = +00:01:39 verbose #2333 > > !\($'"!x.await"') +00:01:39 verbose #2334 > > +00:01:39 verbose #2335 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2336 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2337 > > │ ## into_iter │ +00:01:39 verbose #2338 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2339 > > +00:01:39 verbose #2340 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2341 > > nominal into_iter t = $'rayon_vec_IntoIter<`t>' +00:01:39 verbose #2342 > > +00:01:39 verbose #2343 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2344 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2345 > > │ ## into_par_iter │ +00:01:39 verbose #2346 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2347 > > +00:01:39 verbose #2348 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2349 > > inl into_par_iter forall t. (x : am'.vec t) : into_iter t = +00:01:39 verbose #2350 > > !\($'"rayon::iter::IntoParallelIterator::into_par_iter(!x)"') +00:01:39 verbose #2351 > > +00:01:39 verbose #2352 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2353 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2354 > > │ ## par_iter │ +00:01:39 verbose #2355 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2356 > > +00:01:39 verbose #2357 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2358 > > inl par_iter forall t. (x : am'.vec t) : into_iter t = +00:01:39 verbose #2359 > > !\($'"rayon::iter::IntoParallelIterator::par_iter(!x)"') +00:01:39 verbose #2360 > > +00:01:39 verbose #2361 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2362 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2363 > > │ ## iter_map │ +00:01:39 verbose #2364 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2365 > > +00:01:39 verbose #2366 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2367 > > nominal iter_map t u = $'rayon_iter_Map<`t>' +00:01:39 verbose #2368 > > +00:01:39 verbose #2369 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2370 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2371 > > │ ## par_map │ +00:01:39 verbose #2372 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2373 > > +00:01:39 verbose #2374 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2375 > > inl par_map forall t u. (fn : t -> u) (ar : into_iter t) : iter_map (into_iter +00:01:39 verbose #2376 > > t) u = +00:01:39 verbose #2377 > > !\\((ar, fn), $'"rayon::iter::ParallelIterator::map($0, |x| $1(x))"') +00:01:39 verbose #2378 > > +00:01:39 verbose #2379 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2380 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2381 > > │ ## par_collect │ +00:01:39 verbose #2382 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2383 > > +00:01:39 verbose #2384 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2385 > > inl par_collect forall t u. (iter : iter_map (into_iter t) u) : am'.vec u = +00:01:39 verbose #2386 > > !\\(iter, $'"rayon::iter::ParallelIterator::collect($0)"') +00:01:39 verbose #2387 > > +00:01:39 verbose #2388 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2389 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2390 > > │ ## try_join_all_iter │ +00:01:39 verbose #2391 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2392 > > +00:01:39 verbose #2393 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2394 > > inl try_join_all_iter forall t. (x : am'.vec (future_pin_send (resultm.result' t +00:01:39 verbose #2395 > > sm'.std_string))) : try_join_all (future_pin_send (resultm.result' t +00:01:39 verbose #2396 > > sm'.std_string)) = +00:01:39 verbose #2397 > > inl x = join x +00:01:39 verbose #2398 > > !\($'"futures::future::try_join_all(!x)"') +00:01:39 verbose #2399 > > +00:01:39 verbose #2400 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2401 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2402 > > │ ## new_future │ +00:01:39 verbose #2403 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2404 > > +00:01:39 verbose #2405 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2406 > > inl new_future forall t. (x : () -> t) : future_pin t = +00:01:39 verbose #2407 > > join +00:01:39 verbose #2408 > > !\($'"{Box::pin(async { //"') +00:01:39 verbose #2409 > > x () |> fun x => join $'!x ' +00:01:39 verbose #2410 > > !\($'"}}) //"') +00:01:39 verbose #2411 > > +00:01:39 verbose #2412 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2413 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2414 > > │ ## new_future_move │ +00:01:39 verbose #2415 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2416 > > +00:01:39 verbose #2417 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2418 > > inl new_future_move forall t. (x : () -> t) : future_pin t = +00:01:39 verbose #2419 > > join +00:01:39 verbose #2420 > > !\($'"{Box::pin(async move { //"') +00:01:39 verbose #2421 > > x () |> fun x => join $'!x ' +00:01:39 verbose #2422 > > !\($'"}}) //"') +00:01:39 verbose #2423 > > +00:01:39 verbose #2424 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2425 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2426 > > │ ## future_init │ +00:01:39 verbose #2427 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2428 > > +00:01:39 verbose #2429 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2430 > > inl future_init forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t) : +00:01:39 verbose #2431 > > future_pin t = +00:01:39 verbose #2432 > > // join +00:01:39 verbose #2433 > > // if flag = 1 +00:01:39 verbose #2434 > > // then new_future_move x +00:01:39 verbose #2435 > > // else new_future x +00:01:39 verbose #2436 > > if flag = 1 +00:01:39 verbose #2437 > > then !\($'"let __result = Box::pin(async move { //"') +00:01:39 verbose #2438 > > else !\($'"let __result = Box::pin(async { //"') +00:01:39 verbose #2439 > > +00:01:39 verbose #2440 > > let x' = x () +00:01:39 verbose #2441 > > inl x' = join x' +00:01:39 verbose #2442 > > +00:01:39 verbose #2443 > > x' |> rust.fix_closure depth +00:01:39 verbose #2444 > > +00:01:39 verbose #2445 > > !\($'"__result"') +00:01:39 verbose #2446 > > +00:01:39 verbose #2447 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2448 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2449 > > │ ## future_init_send │ +00:01:39 verbose #2450 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2451 > > +00:01:39 verbose #2452 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2453 > > inl future_init_send forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t) : +00:01:39 verbose #2454 > > future_pin_send t = +00:01:39 verbose #2455 > > // join +00:01:39 verbose #2456 > > // if flag = 1 +00:01:39 verbose #2457 > > // then new_future_move x +00:01:39 verbose #2458 > > // else new_future x +00:01:39 verbose #2459 > > join +00:01:39 verbose #2460 > > if flag = 1 +00:01:39 verbose #2461 > > then !\($'"let __result = Box::pin(async move { //"') +00:01:39 verbose #2462 > > else !\($'"let __result = Box::pin(async { //"') +00:01:39 verbose #2463 > > +00:01:39 verbose #2464 > > let x' = x () +00:01:39 verbose #2465 > > inl x' = join x' +00:01:39 verbose #2466 > > +00:01:39 verbose #2467 > > x' |> rust.fix_closure depth +00:01:39 verbose #2468 > > +00:01:39 verbose #2469 > > !\($'"__result"') +00:01:39 verbose #2470 > > +00:01:39 verbose #2471 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2472 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2473 > > │ ## new_future_move_init │ +00:01:39 verbose #2474 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2475 > > +00:01:39 verbose #2476 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2477 > > inl new_future_move_init forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t) +00:01:39 verbose #2478 > > : future_pin t = +00:01:39 verbose #2479 > > future_init depth flag x +00:01:39 verbose #2480 > > // join +00:01:39 verbose #2481 > > // !\($'"{Box::pin(async move { //"') +00:01:39 verbose #2482 > > // inl x' = x () |> fun x => join $'!x ' +00:01:39 verbose #2483 > > +00:01:39 verbose #2484 > > // inl depth = depth |> fst +00:01:39 verbose #2485 > > // if depth = 1 +00:01:39 verbose #2486 > > // then !\($'"!x' })"') +00:01:39 verbose #2487 > > // elif depth = 2 +00:01:39 verbose #2488 > > // then !\($'"!x' }})"') +00:01:39 verbose #2489 > > // elif depth = 3 +00:01:39 verbose #2490 > > // then !\($'"!x' }}})"') +00:01:39 verbose #2491 > > // elif depth = 4 +00:01:39 verbose #2492 > > // then !\($'"!x' }}}})"') +00:01:39 verbose #2493 > > +00:01:39 verbose #2494 > > // !\($'"// 1"') +00:01:39 verbose #2495 > > +00:01:39 verbose #2496 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2497 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2498 > > │ ## new_async_unit │ +00:01:39 verbose #2499 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2500 > > +00:01:39 verbose #2501 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2502 > > inl new_async_unit forall t. (fn : () -> ()) : async t = +00:01:39 verbose #2503 > > run_target function +00:01:39 verbose #2504 > > | Fsharp (Native) => fun () => +00:01:39 verbose #2505 > > inl result : optionm'.option' (async t) = optionm'.none' () +00:01:39 verbose #2506 > > $"let mutable _!result = !result" +00:01:39 verbose #2507 > > $"async {" +00:01:39 verbose #2508 > > fn () +00:01:39 verbose #2509 > > $"}" +00:01:39 verbose #2510 > > $"|> fun x -> _!result <- Some x" +00:01:39 verbose #2511 > > $"_!result |> Option.get" +00:01:39 verbose #2512 > > | _ => fun () => null () +00:01:39 verbose #2513 > > +00:01:39 verbose #2514 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2515 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2516 > > │ ## new_async │ +00:01:39 verbose #2517 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2518 > > +00:01:39 verbose #2519 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2520 > > inl new_async forall t. (fn : () -> t) : async t = +00:01:39 verbose #2521 > > new_async_unit (fn >> ignore) +00:01:39 verbose #2522 > > +00:01:39 verbose #2523 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2524 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2525 > > │ ## new_task │ +00:01:39 verbose #2526 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2527 > > +00:01:39 verbose #2528 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2529 > > inl new_task forall t. (fn : () -> t) : task t = +00:01:39 verbose #2530 > > run_target function +00:01:39 verbose #2531 > > | Fsharp (Native) => fun () => +00:01:39 verbose #2532 > > inl result : optionm'.option' (task t) = optionm'.none' () +00:01:39 verbose #2533 > > $"let mutable _!result = !result" +00:01:39 verbose #2534 > > $"task {" +00:01:39 verbose #2535 > > fn () |> ignore +00:01:39 verbose #2536 > > $"}" +00:01:39 verbose #2537 > > $"|> fun x -> _!result <- Some x" +00:01:39 verbose #2538 > > $"_!result |> Option.get" +00:01:39 verbose #2539 > > | _ => fun () => null () +00:01:39 verbose #2540 > > +00:01:39 verbose #2541 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2542 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2543 > > │ ## await_task │ +00:01:39 verbose #2544 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2545 > > +00:01:39 verbose #2546 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2547 > > inl await_task forall t. (a : task t) : async t = +00:01:39 verbose #2548 > > run_target function +00:01:39 verbose #2549 > > | Fsharp (Native) => fun () => +00:01:39 verbose #2550 > > a |> $'Async.AwaitTask' +00:01:39 verbose #2551 > > | _ => fun () => null () +00:01:39 verbose #2552 > > +00:01:39 verbose #2553 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:39 verbose #2554 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:39 verbose #2555 > > │ ## ignore │ +00:01:39 verbose #2556 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:39 verbose #2557 > > +00:01:39 verbose #2558 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:39 verbose #2559 > > inl ignore forall t. (a : async t) : async () = +00:01:39 verbose #2560 > > run_target function +00:01:39 verbose #2561 > > | Fsharp (Native) => fun () => +00:01:39 verbose #2562 > > a |> $'Async.Ignore' +00:01:39 verbose #2563 > > | _ => fun () => null () +00:01:39 verbose #2564 > > +00:01:39 verbose #2565 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2566 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2567 > > │ ## run_synchronously │ +00:01:40 verbose #2568 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2569 > > +00:01:40 verbose #2570 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2571 > > inl run_synchronously forall t. (a : async t) : t = +00:01:40 verbose #2572 > > run_target function +00:01:40 verbose #2573 > > | Fsharp (Native) => fun () => +00:01:40 verbose #2574 > > a |> $'Async.RunSynchronously' +00:01:40 verbose #2575 > > | _ => fun () => null () +00:01:40 verbose #2576 > > +00:01:40 verbose #2577 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2578 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2579 > > │ ## start │ +00:01:40 verbose #2580 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2581 > > +00:01:40 verbose #2582 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2583 > > inl start (a : async ()) : () = +00:01:40 verbose #2584 > > run_target function +00:01:40 verbose #2585 > > | Fsharp (Native) => fun () => +00:01:40 verbose #2586 > > a |> $'Async.Start' +00:01:40 verbose #2587 > > | _ => fun () => null () +00:01:40 verbose #2588 > > +00:01:40 verbose #2589 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2590 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2591 > > │ ## start_child │ +00:01:40 verbose #2592 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2593 > > +00:01:40 verbose #2594 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2595 > > inl start_child forall t. (a : async t) : async (async t) = +00:01:40 verbose #2596 > > run_target function +00:01:40 verbose #2597 > > | Fsharp (Native) => fun () => +00:01:40 verbose #2598 > > a |> $'Async.StartChild' +00:01:40 verbose #2599 > > | _ => fun () => null () +00:01:40 verbose #2600 > > +00:01:40 verbose #2601 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2602 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2603 > > │ ## start_child_timeout │ +00:01:40 verbose #2604 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2605 > > +00:01:40 verbose #2606 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2607 > > inl start_child_timeout forall t. (timeout : i32) (a : async t) : async (async +00:01:40 verbose #2608 > > t) = +00:01:40 verbose #2609 > > run_target function +00:01:40 verbose #2610 > > | Fsharp (Native) => fun () => +00:01:40 verbose #2611 > > $'Async.StartChild (!a, !timeout)' +00:01:40 verbose #2612 > > | _ => fun () => null () +00:01:40 verbose #2613 > > +00:01:40 verbose #2614 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2615 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2616 > > │ ## start_immediate │ +00:01:40 verbose #2617 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2618 > > +00:01:40 verbose #2619 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2620 > > inl start_immediate forall t. (a : async t) : () = +00:01:40 verbose #2621 > > run_target function +00:01:40 verbose #2622 > > | Fsharp (Native) => fun () => +00:01:40 verbose #2623 > > a |> $'Async.StartImmediate' +00:01:40 verbose #2624 > > | _ => fun () => null () +00:01:40 verbose #2625 > > +00:01:40 verbose #2626 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2627 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2628 > > │ ## task_canceled_exception │ +00:01:40 verbose #2629 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2630 > > +00:01:40 verbose #2631 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2632 > > nominal task_canceled_exception = +00:01:40 verbose #2633 > > $'System.Threading.Tasks.TaskCanceledException' +00:01:40 verbose #2634 > > +00:01:40 verbose #2635 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2636 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2637 > > │ ## sleep │ +00:01:40 verbose #2638 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2639 > > +00:01:40 verbose #2640 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2641 > > inl sleep (ms : i32) : async () = +00:01:40 verbose #2642 > > run_target function +00:01:40 verbose #2643 > > | Fsharp (Native) => fun () => +00:01:40 verbose #2644 > > ms |> $'Async.Sleep' +00:01:40 verbose #2645 > > | _ => fun () => null () +00:01:40 verbose #2646 > > +00:01:40 verbose #2647 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2648 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2649 > > │ ## do │ +00:01:40 verbose #2650 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2651 > > +00:01:40 verbose #2652 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2653 > > inl do (a : async ()) : () = +00:01:40 verbose #2654 > > $'do\! !a ' +00:01:40 verbose #2655 > > +00:01:40 verbose #2656 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2657 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2658 > > │ ## let' │ +00:01:40 verbose #2659 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2660 > > +00:01:40 verbose #2661 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2662 > > inl let' forall t. (a : async t) : t = +00:01:40 verbose #2663 > > $'let\! !a = !a ' +00:01:40 verbose #2664 > > $'!a ' +00:01:40 verbose #2665 > > +00:01:40 verbose #2666 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2667 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2668 > > │ ## return_await │ +00:01:40 verbose #2669 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2670 > > +00:01:40 verbose #2671 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2672 > > inl return_await forall t. (a : async t) : () = +00:01:40 verbose #2673 > > $'return\! !a ' +00:01:40 verbose #2674 > > +00:01:40 verbose #2675 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2676 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2677 > > │ ## return_await' │ +00:01:40 verbose #2678 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2679 > > +00:01:40 verbose #2680 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2681 > > inl return_await' forall t. (a : async t) : t = +00:01:40 verbose #2682 > > $'return\! !a ' +00:01:40 verbose #2683 > > +00:01:40 verbose #2684 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2685 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2686 > > │ ## map │ +00:01:40 verbose #2687 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2688 > > +00:01:40 verbose #2689 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2690 > > inl map forall t u. (fn : t -> u) (a : async t) : async u = +00:01:40 verbose #2691 > > fun () => +00:01:40 verbose #2692 > > inl x = a |> let' +00:01:40 verbose #2693 > > fn x |> return +00:01:40 verbose #2694 > > |> new_async_unit +00:01:40 verbose #2695 > > +00:01:40 verbose #2696 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2697 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2698 > > │ ## choice │ +00:01:40 verbose #2699 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2700 > > +00:01:40 verbose #2701 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2702 > > union choice t1 t2 = +00:01:40 verbose #2703 > > | Choice1Of2 : t1 +00:01:40 verbose #2704 > > | Choice2Of2 : t2 +00:01:40 verbose #2705 > > +00:01:40 verbose #2706 > > nominal choice' t1 t2 = $'Choice<`t1, `t2>' +00:01:40 verbose #2707 > > +00:01:40 verbose #2708 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2709 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2710 > > │ ## choice_unbox │ +00:01:40 verbose #2711 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2712 > > +00:01:40 verbose #2713 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2714 > > inl choice_unbox forall t1 t2. (choice : choice' t1 t2) : choice t1 t2 = +00:01:40 verbose #2715 > > run_target function +00:01:40 verbose #2716 > > | Fsharp (Native) => fun () => +00:01:40 verbose #2717 > > inl choice1Of2 (x : t1) : _ _ t2 = Choice1Of2 x +00:01:40 verbose #2718 > > inl choice2Of2 (x : t2) : _ t1 _ = Choice2Of2 x +00:01:40 verbose #2719 > > $'match !choice with Choice1Of2 x -> !choice1Of2 x | Choice2Of2 x -> +00:01:40 verbose #2720 > > !choice2Of2 x' +00:01:40 verbose #2721 > > | _ => fun () => null () +00:01:40 verbose #2722 > > +00:01:40 verbose #2723 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2724 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2725 > > │ ## catch' │ +00:01:40 verbose #2726 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2727 > > +00:01:40 verbose #2728 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2729 > > inl catch' forall t e. (a : async t) : async (choice' t e) = +00:01:40 verbose #2730 > > run_target function +00:01:40 verbose #2731 > > | Fsharp (Native) => fun () => +00:01:40 verbose #2732 > > a |> $'Async.Catch' +00:01:40 verbose #2733 > > | _ => fun () => null () +00:01:40 verbose #2734 > > +00:01:40 verbose #2735 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2736 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2737 > > │ ## catch │ +00:01:40 verbose #2738 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2739 > > +00:01:40 verbose #2740 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2741 > > inl catch forall t e. (a : async t) : async (result t e) = +00:01:40 verbose #2742 > > a +00:01:40 verbose #2743 > > |> catch' +00:01:40 verbose #2744 > > |> map choice_unbox +00:01:40 verbose #2745 > > |> map function +00:01:40 verbose #2746 > > | Choice1Of2 result => Ok result +00:01:40 verbose #2747 > > | Choice2Of2 ex => Error ex +00:01:40 verbose #2748 > > +00:01:40 verbose #2749 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2750 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2751 > > │ ## run_with_timeout_async │ +00:01:40 verbose #2752 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2753 > > +00:01:40 verbose #2754 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2755 > > inl run_with_timeout_async forall t. (timeout : i32) (fn : async t) : async +00:01:40 verbose #2756 > > (option t) = +00:01:40 verbose #2757 > > run_target function +00:01:40 verbose #2758 > > | Fsharp (Native) => fun () => +00:01:40 verbose #2759 > > fun () => +00:01:40 verbose #2760 > > inl _locals () = $'$"timeout: {!timeout} / {!_locals ()}"' +00:01:40 verbose #2761 > > inl child = fn |> start_child_timeout timeout |> let' +00:01:40 verbose #2762 > > child +00:01:40 verbose #2763 > > |> catch +00:01:40 verbose #2764 > > |> map function +00:01:40 verbose #2765 > > | Ok result => Some result +00:01:40 verbose #2766 > > | Error ex when ex |> sm'.format_debug |> sm'.contains +00:01:40 verbose #2767 > > "System.TimeoutException" => +00:01:40 verbose #2768 > > trace Debug (fun () => $'"run_with_timeout_async"') +00:01:40 verbose #2769 > > _locals +00:01:40 verbose #2770 > > None +00:01:40 verbose #2771 > > | Error (ex : exn) => +00:01:40 verbose #2772 > > inl ex = ex |> sm'.format_exception +00:01:40 verbose #2773 > > trace Critical (fun () => $'$"run_with_timeout_async** +00:01:40 verbose #2774 > > ex: {!ex}"') _locals +00:01:40 verbose #2775 > > None +00:01:40 verbose #2776 > > |> return_await +00:01:40 verbose #2777 > > |> new_async_unit +00:01:40 verbose #2778 > > | _ => fun () => null () +00:01:40 verbose #2779 > > +00:01:40 verbose #2780 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2781 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2782 > > │ ## run_with_timeout │ +00:01:40 verbose #2783 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2784 > > +00:01:40 verbose #2785 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2786 > > inl run_with_timeout timeout fn = +00:01:40 verbose #2787 > > fn +00:01:40 verbose #2788 > > |> run_with_timeout_async timeout +00:01:40 verbose #2789 > > |> run_synchronously +00:01:40 verbose #2790 > > +00:01:40 verbose #2791 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2792 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2793 > > │ ## cancellation_token │ +00:01:40 verbose #2794 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2795 > > +00:01:40 verbose #2796 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2797 > > inl cancellation_token () : async threading.cancellation_token = +00:01:40 verbose #2798 > > $'Async.CancellationToken' +00:01:40 verbose #2799 > > +00:01:40 verbose #2800 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2801 > > inl default_cancellation_token () : threading.cancellation_token = +00:01:40 verbose #2802 > > $'Async.DefaultCancellationToken' +00:01:40 verbose #2803 > > +00:01:40 verbose #2804 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2805 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2806 > > │ ## merge_cancellation_token_with_default_async │ +00:01:40 verbose #2807 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2808 > > +00:01:40 verbose #2809 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2810 > > inl merge_cancellation_token_with_default_async +00:01:40 verbose #2811 > > (token : threading.cancellation_token) +00:01:40 verbose #2812 > > : async threading.cancellation_token +00:01:40 verbose #2813 > > = +00:01:40 verbose #2814 > > run_target function +00:01:40 verbose #2815 > > | Fsharp (Native) => fun () => +00:01:40 verbose #2816 > > fun () => +00:01:40 verbose #2817 > > inl ct = cancellation_token () |> let' +00:01:40 verbose #2818 > > inl dct = default_cancellation_token () +00:01:40 verbose #2819 > > inl cts = threading.create_linked_token_source ;[[ ct; dct; +00:01:40 verbose #2820 > > token ]] +00:01:40 verbose #2821 > > cts |> threading.cancellation_source_token |> return +00:01:40 verbose #2822 > > |> new_async_unit +00:01:40 verbose #2823 > > | _ => fun () => null () +00:01:40 verbose #2824 > > +00:01:40 verbose #2825 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2826 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2827 > > │ ## with_trace_level │ +00:01:40 verbose #2828 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2829 > > +00:01:40 verbose #2830 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2831 > > inl with_trace_level forall t. level fn : _ t = new_async fun () => +00:01:40 verbose #2832 > > inl trace_state = get_trace_state_or_init None +00:01:40 verbose #2833 > > inl old_trace_level = *trace_state.level +00:01:40 verbose #2834 > > inl trace_level = trace_state.level +00:01:40 verbose #2835 > > try_finally +00:01:40 verbose #2836 > > fun () => +00:01:40 verbose #2837 > > trace_level <- level +00:01:40 verbose #2838 > > fn |> return_await +00:01:40 verbose #2839 > > fun () => +00:01:40 verbose #2840 > > trace_level <- old_trace_level +00:01:40 verbose #2841 > > +00:01:40 verbose #2842 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2843 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2844 > > │ ## value_task │ +00:01:40 verbose #2845 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2846 > > +00:01:40 verbose #2847 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2848 > > nominal value_task = $'System.Threading.Tasks.ValueTask' +00:01:40 verbose #2849 > > +00:01:40 verbose #2850 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2851 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2852 > > │ ## value_task_as_task │ +00:01:40 verbose #2853 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2854 > > +00:01:40 verbose #2855 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2856 > > inl value_task_as_task (task : value_task) : task () = +00:01:40 verbose #2857 > > $'!task.AsTask' () +00:01:40 verbose #2858 > > +00:01:40 verbose #2859 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2860 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2861 > > │ ## await_value_task_unit │ +00:01:40 verbose #2862 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2863 > > +00:01:40 verbose #2864 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2865 > > inl await_value_task_unit (task : value_task) : async () = +00:01:40 verbose #2866 > > task |> value_task_as_task |> await_task +00:01:40 verbose #2867 > > +00:01:40 verbose #2868 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:40 verbose #2869 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:40 verbose #2870 > > │ ## main │ +00:01:40 verbose #2871 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:40 verbose #2872 > > +00:01:40 verbose #2873 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:40 verbose #2874 > > inl main () = +00:01:40 verbose #2875 > > types () +00:01:40 verbose #2876 > > $"let merge_cancellation_token_with_default_async x = +00:01:40 verbose #2877 > > !merge_cancellation_token_with_default_async x" : () +00:01:41 verbose #2878 > 00:00:10 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 39735 +00:01:41 verbose #2879 > 00:00:10 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/async.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/async.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:01:44 verbose #2880 > 00:00:12 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/async.dib.ipynb to html +00:01:44 verbose #2881 > 00:00:12 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:01:44 verbose #2882 > 00:00:12 verbose #7 ! validate(nb) +00:01:46 verbose #2883 > 00:00:14 verbose #8 ! [NbConvertApp] Writing 398768 bytes to c:\home\git\polyglot\lib\spiral\async.dib.html +00:01:46 verbose #2884 > 00:00:15 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 641 +00:01:46 verbose #2885 > 00:00:15 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 641 +00:01:46 verbose #2886 > 00:00:15 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/async.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/async.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:01:47 verbose #2887 > 00:00:16 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:01:47 verbose #2888 > 00:00:16 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:01:48 verbose #2889 > 00:00:16 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 40435 +00:01:48 debug #2890 execute_with_options_async / exit_code: 0 / output.Length: 44257 +00:01:48 debug #7 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path async.dib --retries 3 +00:01:48 debug #2891 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path runtime.dib --retries 3", [||], None, None, true, None) -00:02:22 verbose #2783 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "runtime.dib", "--retries", "3"]) -00:02:22 verbose #2784 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/runtime.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/runtime.dib" --output-path "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:02:32 verbose #2785 > 00:02:31 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b306262f3a759a91d94eff06ff8f2ab1c7cdb05a8ebf335b02726a051250cba5/main.spi -00:02:39 verbose #2786 > 00:02:38 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5623e6812635dc5f12db916f0ce508c78b0117ef4145279f637523401e95543a/main.spi -00:02:42 verbose #2787 > 00:02:41 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e4a4ecb9939f470f6f2ecd2e6941c306f20d7ac719296613e3211bcad5b1d4a7/main.spi -00:02:43 verbose #2788 > 00:02:42 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/33155d3c8bb0574428e7ac426a62791a3bb497bd79db3e3b8a87635417d47135/main.spi -00:02:45 verbose #2789 > 00:02:43 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d6ed48dc7fef4b6ba90a4b5cd5caaf6c3e6b271d27fb952e1fe9724eeec60cbc/main.spi -00:02:46 verbose #2790 > 00:02:45 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f002b3b15aadc2d3dc3d106223ceff3d6b760a365fdc191d4f841fa47069db89/main.spi -00:02:47 verbose #2791 > 00:02:46 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/10273f7c1ec46e5975c5a3d7725e455be518e9e6208ffb3185139728593233da/main.spi -00:02:48 verbose #2792 > 00:02:47 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6c9bdf0db2a7b15ccb38da28954e75f5cb4cb5ead646fb9057899a250da57161/main.spi -00:02:50 verbose #2793 > 00:02:49 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4eca05d72124a493cb1bb06de063be0bb5d0c5c2997843544b3b346fc51f7b4e/main.spi -00:02:51 verbose #2794 > 00:02:50 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/70d8ace1671f7b501cb4e8c2a992105fe52e8fbbcb8d19d14d4580088620baf5/main.spi -00:02:53 verbose #2795 > 00:02:51 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/83b24f822cfa8857e49e6e59d145f73a8531e370c0ebae09ebe81bff11700354/main.spi -00:02:54 verbose #2796 > 00:02:53 debug #15 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7eedd4fa1e194ccb8f09ebe6c411740d09776a138b2fdace2f2d5c1c90816d79/main.spi -00:02:55 verbose #2797 > 00:02:54 debug #16 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b23aff599a1e179a31e17d94881ff7197b06ffdee1899359ea4f69ac05a09693/main.spi -00:02:56 verbose #2798 > 00:02:55 debug #17 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f36be1b93ea485309cea3a03fb5c60ea2dfd25f6b0bf2286fba139d12c2a5cbf/main.spi -00:02:58 verbose #2799 > 00:02:56 debug #18 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/22192815d14694c3d3f529ed9b6c12ae212ccfdc8966858e3bf9c193ed607294/main.spi -00:02:58 verbose #2800 > 00:02:57 debug #19 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/492ab45338b698211a25ffcdd6324af724927ac45090cb867176761e6d459ac3/main.spi -00:02:59 verbose #2801 > 00:02:58 debug #20 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8a89d2c038f5ff549d2998855ff90e7742e6f93ea58c83ed70a9f6b2e1d6dc32/main.spi -00:03:00 verbose #2802 > 00:02:59 debug #21 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ea397b54c0fdde0b257a48f2fa31d6c53ccb6614a5778730d4321323031371c5/main.spi -00:03:00 verbose #2803 > 00:02:59 debug #22 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/faf251597c3358b3ee2cd986a928a7c2dad5fb35ea917978408587f133b205c6/main.spi -00:03:01 verbose #2804 > 00:03:00 debug #23 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/740739e2ceb176f46ce45fa06342fd408005d211f95b64c821cb03979e06e64d/main.spi -00:03:02 verbose #2805 > 00:03:01 debug #24 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/eefa361552ae13bd2bac301133665de05c93cd88c067bb4fddda7bda27076688/main.spi -00:03:02 verbose #2806 > 00:03:01 debug #25 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/65ed8ccd35819a23888bee67dfc8b11b1119c96aeac2b890a1cca63323766923/main.spi -00:03:03 verbose #2807 > 00:03:02 debug #26 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a28514d76db1f3f5ea437c787dbcc56f9c472df4aa409fa877c1a1d2642524f1/main.spi -00:03:04 verbose #2808 > 00:03:03 debug #27 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/bd94251b28e828f66a08f675ef5f19e1eb6fd0d934637cebb4fb003114b43c3c/main.spi -00:03:05 verbose #2809 > 00:03:04 debug #28 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2e4d55ca50352472ec393af14cadffe6d4497a33b95f7c665821b9ca8abf2bd5/main.spi -00:03:05 verbose #2810 > 00:03:04 debug #29 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d2ef023eecd89eec939371ca1339560542436bbdb67d4998bc664be7c7e4d5c/main.spi -00:03:06 verbose #2811 > 00:03:05 debug #30 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f1c4cbbdbe59d28177753d7e35994d13dcad64aef54d0da2f4fc2bd13bf372f9/main.spi -00:03:07 verbose #2812 > 00:03:06 debug #31 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c2d4e17ba1556fc7674210462cd737e27c62832867a5eea62499497811f131f1/main.spi -00:03:07 verbose #2813 > 00:03:06 debug #32 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a3d3ad8466d856b36a1addb586a36923a61542f051aebe5a6f36a3a67710af78/main.spi -00:03:33 verbose #2814 > 00:03:32 debug #33 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/add676c3117f08676b700043b1958a80397795b6a6bf521cb62a5f5c0baec83f/main.spi -00:03:34 verbose #2815 > 00:03:33 debug #34 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b0ddcf9f0a5b518de45c5f80af131670591fbf721964fa4fb4c6a004bd29ce49/main.spi -00:03:35 verbose #2816 > 00:03:34 debug #35 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/983e1fd48eaefda1c4ea4f81aaa543ac77b4814d07908d082e65c4c634dafb8e/main.spi -00:03:53 verbose #2817 > 00:03:52 debug #36 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9f8d9b8d8393ab233d73c8721d699e77bb818abd83429acf0d773f61a1a6e78c/main.spi -00:03:54 verbose #2818 > 00:03:53 debug #37 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e8c727840f8b87f647bd764782b6f8b817452d2e358f8319158fd3641c8fd801/main.spi -00:03:54 verbose #2819 > 00:03:53 debug #38 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8c451270d012996e7ffc4dfda82500d0c4838d5c6413babbee71f5fcd01eb233/main.spi -00:04:13 verbose #2820 > 00:04:12 debug #39 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0f41572687d637d3fa2c92253db48029561567afb6cf7eaf3ce2d07f1c6ca075/main.spi -00:04:13 verbose #2821 > 00:04:12 debug #40 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6f0f8e3ad6eb8dc7c3a2ca5e89f6952ac58a0b72a43064be62ee1acdd33bd767/main.spi -00:04:14 verbose #2822 > 00:04:13 debug #41 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/98c9ba553f8b2954139db8baff5bde8c3873310a6cc0b05a0f0cd87c2f708ca7/main.spi -00:04:15 verbose #2823 > 00:04:14 debug #42 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/adcc39d1653670dde071502b20422df2bbbd338abe0c3ab91171b91aa497c75e/main.spi -00:04:16 verbose #2824 > 00:04:15 debug #43 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6dc6b5cc9b4043f3974b0e8fb8f254cef222035992f2b8ad10aa2322a7be971e/main.spi -00:04:16 verbose #2825 > 00:04:15 debug #44 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e4cb1de95b93f59e3aa27e9de933f6f0a046cc003f429d6b8c2b178dee61d0b7/main.spi -00:04:17 verbose #2826 > 00:04:16 debug #45 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6c943e9a6955db45cdec598300e58cf5662b03f2dee33127c80f1d36ebca4e3a/main.spi -00:04:18 verbose #2827 > 00:04:17 debug #46 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ac841bb9f0b2187af1bbb77b871ac8c69c7b008a0b7f809b16cc02b03a0ebc7a/main.spi -00:04:18 verbose #2828 > 00:04:17 debug #47 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ffd855f17a930430bb4c51d2f69500e3d49fc22a9309563c0cab2afac6b07fd8/main.spi -00:04:19 verbose #2829 > 00:04:18 debug #48 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1caf036863bd4f992c7a4e7b78dc71642a92e18b2ac8d38ee25ea859c190a738/main.spi -00:04:20 verbose #2830 > 00:04:19 debug #49 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3ba22571cc240d03dbf6c1f3d6974809bd2f9a06e317a36d5e334ca83c8e17d8/main.spi -00:04:21 verbose #2831 > 00:04:19 debug #50 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/75e3a447597d292003ab138bef49ede70546f1c2ffae692f53088b1afb9c402d/main.spi -00:04:21 verbose #2832 > 00:04:20 debug #51 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/18c4440f42f38ded0cad256e9f9d4b0bd5e25fc9c16e5e50b8c418b5cb37cef7/main.spi -00:04:22 verbose #2833 > 00:04:21 debug #52 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d209c9ed80df42f56934972a76e36eb29a06acb4cd86bf6547998a6c89386d9f/main.spi -00:04:23 verbose #2834 > 00:04:22 debug #53 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/779432d6c100eb29e0247368c091d6f620dc0451f06aebe6a52583dba729fcb5/main.spi -00:04:24 verbose #2835 > 00:04:22 debug #54 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8a1a274b90a5628c7e42c59b63fd2085ddbd4e018d77925a371d9dd89e98df43/main.spi -00:04:24 verbose #2836 > 00:04:23 debug #55 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/392363f75d06d75a69d7f549b3def17638a3251059018838555310d5ca953e91/main.spi -00:04:25 verbose #2837 > 00:04:24 debug #56 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5b0e35cc0567fe3e12ca9a1289edc9168693a7c552c0ec3c572aa71920e3875a/main.spi -00:04:26 verbose #2838 > 00:04:25 debug #57 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fcc2985212c4db4d108f5207bed0539eed03039afbe60e0dd94258e52d244132/main.spi -00:04:26 verbose #2839 > 00:04:25 debug #58 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d47ebb8bcd5e08d3bc0616129a60d9c3fa67aef44d625ee8eccde85f3b4e62d7/main.spi -00:04:27 verbose #2840 > 00:04:26 debug #59 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/39fb2609ec0282736918a824be7183b52452c182186392ac99b26d6141896221/main.spi -00:04:28 verbose #2841 > 00:04:27 debug #60 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a818629c8d71133aecacce38f3083bd2a0a0618956686a20d1fbf8a103580438/main.spi -00:04:29 verbose #2842 > 00:04:28 debug #61 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1f11601643b1ee70deb0e3332d7599abd10bc88010df40570f9c8a32ba80ed9f/main.spi -00:04:29 verbose #2843 > 00:04:28 debug #62 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/657a7663c08fc1041f77fbd11d85018dd854db9cc52da21ae09f2cca196e8733/main.spi -00:04:30 verbose #2844 > 00:04:29 debug #63 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5c2ccfe5b99e056b64342e66b8b16a5776ee85a7a57d2252a0c3e314a721fa9f/main.spi -00:04:31 verbose #2845 > 00:04:30 debug #64 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f6f94a0aed9be557afb9434c62bbe023d8acd61d469df83e188dec4d5fbb7e6e/main.spi -00:04:32 verbose #2846 > 00:04:31 debug #65 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d6ccd9c5691157b8d3d9a1755fa44daba2117fb28c6b72c62f8c1f38f1912a0a/main.spi -00:04:32 verbose #2847 > 00:04:31 debug #66 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/939839464620e130e144d6e286ce9118a02bd6601d054307e82eac3a7cfde9c4/main.spi -00:04:33 verbose #2848 > 00:04:32 debug #67 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/cc8f480a0f24477501c07f31e25452a1973ca18fa236e0ed0c4a4074c98f5f6a/main.spi -00:04:34 verbose #2849 > 00:04:33 debug #68 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b03a334d57c3fbe38a9bfd5d9a5dbaabfbb5d38b3481a113e1c14e8a86ee9561/main.spi -00:04:35 verbose #2850 > 00:04:34 debug #69 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/89cd6e5d98605ad71acebc817571911e10c46e03b41a78e83784315f21bf9cbf/main.spi -00:04:35 verbose #2851 > 00:04:34 debug #70 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9c79319c28c909d29297286517deadb31c85eb5f774c29b58335f05b050b6069/main.spi -00:04:36 verbose #2852 > 00:04:35 debug #71 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c98d845a270397e992289ae2c23789031ee8d199ec6f2e85c124a9e4b4a20452/main.spi -00:04:37 verbose #2853 > 00:04:36 debug #72 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d5a49e1ec9717218bd2a44228865f3c9559d907d91b780cefe3d14cd9328f440/main.spi -00:04:39 verbose #2854 > -00:04:39 verbose #2855 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #2856 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #2857 > │ # runtime │ -00:04:39 verbose #2858 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #2859 > -00:04:39 verbose #2860 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2861 > open rust_operators -00:04:39 verbose #2862 > open sm'_operators -00:04:39 verbose #2863 > -00:04:39 verbose #2864 > ── spiral - import ───────────────────────────────────────────────────────────── -00:04:39 verbose #2865 > #r -00:04:39 verbose #2866 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:04:39 verbose #2867 > otNet.Interactive.Spiral.dll" -00:04:39 verbose #2868 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:04:39 verbose #2869 > #r -00:04:39 verbose #2870 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:04:39 verbose #2871 > otNet.Interactive.dll" -00:04:39 verbose #2872 > open type Microsoft.DotNet.Interactive.Kernel -00:04:39 verbose #2873 > -00:04:39 verbose #2874 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2875 > //// test -00:04:39 verbose #2876 > -00:04:39 verbose #2877 > open testing -00:04:39 verbose #2878 > open file_system_operators -00:04:39 verbose #2879 > -00:04:39 verbose #2880 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #2881 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #2882 > │ ## types │ -00:04:39 verbose #2883 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #2884 > -00:04:39 verbose #2885 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2886 > inl types () = -00:04:39 verbose #2887 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2888 > Fable.Core.Emit(\"clap::Arg\")>]]\n#endif\ntype clap_Arg = class end" -00:04:39 verbose #2889 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2890 > Fable.Core.Emit(\"clap::ArgAction\")>]]\n#endif\ntype clap_ArgAction = class -00:04:39 verbose #2891 > end" -00:04:39 verbose #2892 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2893 > Fable.Core.Emit(\"clap::Command\")>]]\n#endif\ntype clap_Command = class end" -00:04:39 verbose #2894 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2895 > Fable.Core.Emit(\"clap::ArgMatches\")>]]\n#endif\ntype clap_ArgMatches = class -00:04:39 verbose #2896 > end" -00:04:39 verbose #2897 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2898 > Fable.Core.Emit(\"clap::builder::ValueRange\")>]]\n#endif\ntype -00:04:39 verbose #2899 > clap_builder_ValueRange = class end" -00:04:39 verbose #2900 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2901 > Fable.Core.Emit(\"clap::builder::ValueParser\")>]]\n#endif\ntype -00:04:39 verbose #2902 > clap_builder_ValueParser = class end" -00:04:39 verbose #2903 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2904 > Fable.Core.Emit(\"clap::builder::PossibleValue\")>]]\n#endif\ntype -00:04:39 verbose #2905 > clap_builder_PossibleValue = class end" -00:04:39 verbose #2906 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2907 > Fable.Core.Emit(\"std::process::Child\")>]]\n#endif\ntype std_process_Child = -00:04:39 verbose #2908 > class end" -00:04:39 verbose #2909 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2910 > Fable.Core.Emit(\"std::process::ChildStderr\")>]]\n#endif\ntype -00:04:39 verbose #2911 > std_process_ChildStderr = class end" -00:04:39 verbose #2912 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2913 > Fable.Core.Emit(\"std::process::ChildStdout\")>]]\n#endif\ntype -00:04:39 verbose #2914 > std_process_ChildStdout = class end" -00:04:39 verbose #2915 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2916 > Fable.Core.Emit(\"std::process::ChildStdin\")>]]\n#endif\ntype -00:04:39 verbose #2917 > std_process_ChildStdin = class end" -00:04:39 verbose #2918 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2919 > Fable.Core.Emit(\"std::process::Command\")>]]\n#endif\ntype std_process_Command -00:04:39 verbose #2920 > = class end" -00:04:39 verbose #2921 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2922 > Fable.Core.Emit(\"std::process::Output\")>]]\n#endif\ntype std_process_Output = -00:04:39 verbose #2923 > class end" -00:04:39 verbose #2924 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2925 > Fable.Core.Emit(\"std::process::Stdio\")>]]\n#endif\ntype std_process_Stdio = -00:04:39 verbose #2926 > class end" -00:04:39 verbose #2927 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2928 > Fable.Core.Emit(\"std::sync::mpsc::Receiver<$0>\")>]]\n#endif\ntype -00:04:39 verbose #2929 > std_sync_mpsc_Receiver<'T> = class end" -00:04:39 verbose #2930 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:04:39 verbose #2931 > Fable.Core.Emit(\"std::sync::mpsc::Sender<$0>\")>]]\n#endif\ntype -00:04:39 verbose #2932 > std_sync_mpsc_Sender<'T> = class end" -00:04:39 verbose #2933 > -00:04:39 verbose #2934 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2935 > inl types () = -00:04:39 verbose #2936 > types () -00:04:39 verbose #2937 > am'.types () -00:04:39 verbose #2938 > async.types () -00:04:39 verbose #2939 > env.types () -00:04:39 verbose #2940 > rust.types () -00:04:39 verbose #2941 > seq.types () -00:04:39 verbose #2942 > sm'.types () -00:04:39 verbose #2943 > threading.types () -00:04:39 verbose #2944 > -00:04:39 verbose #2945 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2946 > //// test -00:04:39 verbose #2947 > -00:04:39 verbose #2948 > inl types () = -00:04:39 verbose #2949 > file_system.types () -00:04:39 verbose #2950 > types () -00:04:39 verbose #2951 > -00:04:39 verbose #2952 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #2953 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #2954 > │ ## child │ -00:04:39 verbose #2955 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #2956 > -00:04:39 verbose #2957 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2958 > nominal child = $'std_process_Child' -00:04:39 verbose #2959 > -00:04:39 verbose #2960 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #2961 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #2962 > │ ## child_stderr │ -00:04:39 verbose #2963 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #2964 > -00:04:39 verbose #2965 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2966 > nominal child_stderr = $"std_process_ChildStderr" -00:04:39 verbose #2967 > -00:04:39 verbose #2968 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #2969 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #2970 > │ ## child_stdout │ -00:04:39 verbose #2971 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #2972 > -00:04:39 verbose #2973 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2974 > nominal child_stdout = $"std_process_ChildStdout" -00:04:39 verbose #2975 > -00:04:39 verbose #2976 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #2977 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #2978 > │ ## child_stdin │ -00:04:39 verbose #2979 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #2980 > -00:04:39 verbose #2981 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2982 > nominal child_stdin = $"std_process_ChildStdin" -00:04:39 verbose #2983 > -00:04:39 verbose #2984 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #2985 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #2986 > │ ## process_command │ -00:04:39 verbose #2987 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #2988 > -00:04:39 verbose #2989 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2990 > nominal process_command = $'std_process_Command' -00:04:39 verbose #2991 > -00:04:39 verbose #2992 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #2993 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #2994 > │ ## stdio │ -00:04:39 verbose #2995 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #2996 > -00:04:39 verbose #2997 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #2998 > nominal stdio = $'std_process_Stdio' -00:04:39 verbose #2999 > -00:04:39 verbose #3000 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3001 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3002 > │ ## output │ -00:04:39 verbose #3003 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3004 > -00:04:39 verbose #3005 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3006 > nominal output = $'std_process_Output' -00:04:39 verbose #3007 > -00:04:39 verbose #3008 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3009 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3010 > │ ## receiver │ -00:04:39 verbose #3011 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3012 > -00:04:39 verbose #3013 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3014 > nominal receiver t = $'std_sync_mpsc_Receiver<`t>' -00:04:39 verbose #3015 > -00:04:39 verbose #3016 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3017 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3018 > │ ## sender │ -00:04:39 verbose #3019 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3020 > -00:04:39 verbose #3021 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3022 > nominal sender t = $'std_sync_mpsc_Sender<`t>' -00:04:39 verbose #3023 > -00:04:39 verbose #3024 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3025 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3026 > │ ## os_platform │ -00:04:39 verbose #3027 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3028 > -00:04:39 verbose #3029 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3030 > nominal os_platform' = $'System.Runtime.InteropServices.OSPlatform' -00:04:39 verbose #3031 > -00:04:39 verbose #3032 > union os_platform = -00:04:39 verbose #3033 > | Windows -00:04:39 verbose #3034 > -00:04:39 verbose #3035 > inl os_platform = function -00:04:39 verbose #3036 > | Windows => $'`os_platform'.Windows' : os_platform' -00:04:39 verbose #3037 > -00:04:39 verbose #3038 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3039 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3040 > │ ## is_os_platform │ -00:04:39 verbose #3041 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3042 > -00:04:39 verbose #3043 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3044 > inl is_os_platform (x : os_platform') : bool = -00:04:39 verbose #3045 > x |> $'System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform' -00:04:39 verbose #3046 > -00:04:39 verbose #3047 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3048 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3049 > │ ## is_windows │ -00:04:39 verbose #3050 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3051 > -00:04:39 verbose #3052 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3053 > inl is_windows () : bool = -00:04:39 verbose #3054 > run_target function -00:04:39 verbose #3055 > | Fsharp (Native) => fun () => -00:04:39 verbose #3056 > Windows |> os_platform |> is_os_platform -00:04:39 verbose #3057 > | Rust (Native) => fun () => -00:04:39 verbose #3058 > !\($'"cfg\!(windows)"') -00:04:39 verbose #3059 > | _ => fun () => null () -00:04:39 verbose #3060 > -00:04:39 verbose #3061 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3062 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3063 > │ ## get_executable_suffix │ -00:04:39 verbose #3064 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3065 > -00:04:39 verbose #3066 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3067 > inl get_executable_suffix () = -00:04:39 verbose #3068 > if is_windows () -00:04:39 verbose #3069 > then ".exe" -00:04:39 verbose #3070 > else "" -00:04:39 verbose #3071 > -00:04:39 verbose #3072 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3073 > //// test -00:04:39 verbose #3074 > -00:04:39 verbose #3075 > get_executable_suffix () -00:04:39 verbose #3076 > -00:04:39 verbose #3077 > ╭─[ 608.84ms - return value ]──────────────────────────────────────────────────╮ -00:04:39 verbose #3078 > │ .exe │ -00:04:39 verbose #3079 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3080 > -00:04:39 verbose #3081 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3082 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3083 > │ ## quoted │ -00:04:39 verbose #3084 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3085 > -00:04:39 verbose #3086 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3087 > union quoted = -00:04:39 verbose #3088 > | Quoted -00:04:39 verbose #3089 > | NotQuoted -00:04:39 verbose #3090 > -00:04:39 verbose #3091 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3092 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3093 > │ ## split_command │ -00:04:39 verbose #3094 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3095 > -00:04:39 verbose #3096 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3097 > union command_parse_step = -00:04:39 verbose #3098 > | Start -00:04:39 verbose #3099 > | Path : quoted -00:04:39 verbose #3100 > | Arguments -00:04:39 verbose #3101 > -00:04:39 verbose #3102 > inl split_command (command : string) = -00:04:39 verbose #3103 > let rec loop (path, args) (chars : list char) step = -00:04:39 verbose #3104 > match step, chars with -00:04:39 verbose #3105 > | _, (('"' | '\'') :: tail) when path = "" => loop (path, args) tail -00:04:39 verbose #3106 > (Path Quoted) -00:04:39 verbose #3107 > | Path (Quoted), (('"' | '\'') :: tail) => loop (path, args) tail (Path -00:04:39 verbose #3108 > NotQuoted) -00:04:39 verbose #3109 > | Path (Quoted), (' ' :: tail) => loop ($'$"{!path} "', args) tail (Path -00:04:39 verbose #3110 > Quoted) -00:04:39 verbose #3111 > | (Start | Path _), (' ' :: tail) => loop (path, args) tail Arguments -00:04:39 verbose #3112 > | Arguments, (char :: tail) => loop (path, $'$"{!args}{!char}"') tail -00:04:39 verbose #3113 > Arguments -00:04:39 verbose #3114 > | _, (char :: tail) => loop ($'$"{!path}{!char}"', args) tail step -00:04:39 verbose #3115 > | _ => path |> sm'.replace @"\" "/", args -00:04:39 verbose #3116 > loop (join "", "") (command |> sm'.to_char_array |> am'.to_list' |> -00:04:39 verbose #3117 > listm'.unbox) Start -00:04:39 verbose #3118 > -00:04:39 verbose #3119 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3120 > //// test -00:04:39 verbose #3121 > -00:04:39 verbose #3122 > split_command "" -00:04:39 verbose #3123 > |> _assert_eq ("", "") -00:04:39 verbose #3124 > -00:04:39 verbose #3125 > split_command "/a/b/c" -00:04:39 verbose #3126 > |> _assert_eq ("/a/b/c", "") -00:04:39 verbose #3127 > -00:04:39 verbose #3128 > split_command "cat file.txt" -00:04:39 verbose #3129 > |> _assert_eq ("cat", "file.txt") -00:04:39 verbose #3130 > -00:04:39 verbose #3131 > split_command $'"""..\\..\\file.exe file1.txt file2.txt"""' -00:04:39 verbose #3132 > |> _assert_eq ("../../file.exe", "file1.txt file2.txt") -00:04:39 verbose #3133 > -00:04:39 verbose #3134 > split_command $'\@"c:\\dir\\file.exe ""file1.txt file2.txt"""' -00:04:39 verbose #3135 > |> _assert_eq ("c:/dir/file.exe", $'\@"""file1.txt file2.txt"""') -00:04:39 verbose #3136 > -00:04:39 verbose #3137 > split_command $'\@"""..\\..\\dir name\\file.exe"" ""file 1.txt"" file2.txt"' -00:04:39 verbose #3138 > |> _assert_eq ("../../dir name/file.exe", $'\@"""file 1.txt"" file2.txt"') -00:04:39 verbose #3139 > -00:04:39 verbose #3140 > split_command $'\@"""..\\..\\file 1.exe"" -c \\\\""echo 1\\\\"""' -00:04:39 verbose #3141 > |> _assert_eq ("../../file 1.exe", $'\@"-c \\\\""echo 1\\\\"""') -00:04:39 verbose #3142 > -00:04:39 verbose #3143 > split_command $'\@"..\\..\\file 1.exe -c \\\\""echo 1\\\\"""' -00:04:39 verbose #3144 > |> _assert_eq ("../../file", $'\@"1.exe -c \\\\""echo 1\\\\"""') -00:04:39 verbose #3145 > -00:04:39 verbose #3146 > ╭─[ 1.11s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3147 > │ assert_eq / actual: struct ("", "") / expected: struct ("", "") │ -00:04:39 verbose #3148 > │ assert_eq / actual: struct ("/a/b/c", "") / expected: struct ("/a/b/c", "") │ -00:04:39 verbose #3149 > │ assert_eq / actual: struct ("cat", "file.txt") / expected: struct ("cat", │ -00:04:39 verbose #3150 > │ "file.txt") │ -00:04:39 verbose #3151 > │ assert_eq / actual: struct ("../../file.exe", "file1.txt file2.txt") / │ -00:04:39 verbose #3152 > │ expected: struct ("../../file.exe", "file1.txt file2.txt") │ -00:04:39 verbose #3153 > │ assert_eq / actual: struct ("c:/dir/file.exe", ""file1.txt file2.txt"") / │ -00:04:39 verbose #3154 > │ expected: struct ("c:/dir/file.exe", ""file1.txt file2.txt"") │ -00:04:39 verbose #3155 > │ assert_eq / actual: struct ("../../dir name/file.exe", ""file 1.txt" │ -00:04:39 verbose #3156 > │ file2.txt") / expected: struct ("../../dir name/file.exe", ""file 1.txt" │ -00:04:39 verbose #3157 > │ file2.txt") │ -00:04:39 verbose #3158 > │ assert_eq / actual: struct ("../../file 1.exe", "-c \\"echo 1\\"") / │ -00:04:39 verbose #3159 > │ expected: struct ("../../file 1.exe", "-c \\"echo 1\\"") │ -00:04:39 verbose #3160 > │ assert_eq / actual: struct ("../../file", "1.exe -c \\"echo 1\\"") / │ -00:04:39 verbose #3161 > │ expected: struct ("../../file", "1.exe -c \\"echo 1\\"") │ -00:04:39 verbose #3162 > │ │ -00:04:39 verbose #3163 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3164 > -00:04:39 verbose #3165 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3166 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3167 > │ ## process │ -00:04:39 verbose #3168 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3169 > -00:04:39 verbose #3170 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3171 > nominal process = $'System.Diagnostics.Process' -00:04:39 verbose #3172 > nominal process_start_info = $'System.Diagnostics.ProcessStartInfo' -00:04:39 verbose #3173 > nominal data_received_event_args = $'System.Diagnostics.DataReceivedEventArgs' -00:04:39 verbose #3174 > -00:04:39 verbose #3175 > inl new_process (process_start_info : process_start_info) : process = -00:04:39 verbose #3176 > $'new `process (StartInfo = !process_start_info)' -00:04:39 verbose #3177 > -00:04:39 verbose #3178 > inl process_start (process : process) : bool = -00:04:39 verbose #3179 > $'!process.Start' () -00:04:39 verbose #3180 > -00:04:39 verbose #3181 > inl process_exit_code (process : process) : i32 = -00:04:39 verbose #3182 > $'!process.ExitCode' -00:04:39 verbose #3183 > -00:04:39 verbose #3184 > inl process_id (process : process) : i32 = -00:04:39 verbose #3185 > $'!process.Id' -00:04:39 verbose #3186 > -00:04:39 verbose #3187 > inl process_has_exited (process : process) : bool = -00:04:39 verbose #3188 > run_target function -00:04:39 verbose #3189 > | Fsharp (Native) => fun () => -00:04:39 verbose #3190 > $'!process.HasExited' -00:04:39 verbose #3191 > | _ => fun () => null () -00:04:39 verbose #3192 > -00:04:39 verbose #3193 > inl process_kill (process : process) : () = -00:04:39 verbose #3194 > run_target function -00:04:39 verbose #3195 > | Fsharp (Native) => fun () => -00:04:39 verbose #3196 > $'!process.Kill' () -00:04:39 verbose #3197 > | _ => fun () => null () -00:04:39 verbose #3198 > -00:04:39 verbose #3199 > inl process_begin_error_read_line (process : process) : () = -00:04:39 verbose #3200 > $'!process.BeginErrorReadLine' () -00:04:39 verbose #3201 > -00:04:39 verbose #3202 > inl process_begin_output_read_line (process : process) : () = -00:04:39 verbose #3203 > $'!process.BeginOutputReadLine' () -00:04:39 verbose #3204 > -00:04:39 verbose #3205 > inl process_add_output_data_received fn (process : process) : () = -00:04:39 verbose #3206 > $'!process.OutputDataReceived.Add !fn ' -00:04:39 verbose #3207 > -00:04:39 verbose #3208 > inl process_add_error_data_received fn (process : process) : () = -00:04:39 verbose #3209 > $'!process.ErrorDataReceived.Add !fn ' -00:04:39 verbose #3210 > -00:04:39 verbose #3211 > inl process_wait_for_exit_async (ct : threading.cancellation_token) (process : -00:04:39 verbose #3212 > process) : async.task () = -00:04:39 verbose #3213 > $'!process.WaitForExitAsync !ct ' -00:04:39 verbose #3214 > -00:04:39 verbose #3215 > inl event_data (e : data_received_event_args) : string = -00:04:39 verbose #3216 > $'!e.Data' -00:04:39 verbose #3217 > -00:04:39 verbose #3218 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3219 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3220 > │ ## execution_line │ -00:04:39 verbose #3221 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3222 > -00:04:39 verbose #3223 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3224 > type execution_line = -00:04:39 verbose #3225 > { -00:04:39 verbose #3226 > process_id : int -00:04:39 verbose #3227 > line : string -00:04:39 verbose #3228 > error : bool -00:04:39 verbose #3229 > } -00:04:39 verbose #3230 > -00:04:39 verbose #3231 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3232 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3233 > │ ## execution_options │ -00:04:39 verbose #3234 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3235 > -00:04:39 verbose #3236 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3237 > type execution_options = -00:04:39 verbose #3238 > { -00:04:39 verbose #3239 > command : string -00:04:39 verbose #3240 > cancellation_token : optionm'.option' threading.cancellation_token -00:04:39 verbose #3241 > environment_variables : array_base (string * string) -00:04:39 verbose #3242 > on_line : optionm'.option' (execution_line -> async.async ()) -00:04:39 verbose #3243 > stdin : optionm'.option' (threading.arc (threading.mutex child_stdin) -> -00:04:39 verbose #3244 > ()) -00:04:39 verbose #3245 > trace : bool -00:04:39 verbose #3246 > working_directory : optionm'.option' string -00:04:39 verbose #3247 > } -00:04:39 verbose #3248 > -00:04:39 verbose #3249 > inl execution_options (fn : execution_options -> execution_options) : -00:04:39 verbose #3250 > execution_options = -00:04:39 verbose #3251 > { -00:04:39 verbose #3252 > command = "" -00:04:39 verbose #3253 > cancellation_token = None |> optionm'.box -00:04:39 verbose #3254 > environment_variables = ;[[]] -00:04:39 verbose #3255 > on_line = None |> optionm'.box -00:04:39 verbose #3256 > stdin = None |> optionm'.box -00:04:39 verbose #3257 > trace = true -00:04:39 verbose #3258 > working_directory = None |> optionm'.box -00:04:39 verbose #3259 > } -00:04:39 verbose #3260 > |> fn -00:04:39 verbose #3261 > -00:04:39 verbose #3262 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3263 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3264 > │ ## execute_with_options_async │ -00:04:39 verbose #3265 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3266 > -00:04:39 verbose #3267 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3268 > let execute_with_options_async (options : execution_options) : _ (i32 * string) -00:04:39 verbose #3269 > = -00:04:39 verbose #3270 > run_target function -00:04:39 verbose #3271 > | Fsharp (Native) => fun () => -00:04:39 verbose #3272 > fun () => -00:04:39 verbose #3273 > inl file_name, arguments = options.command |> split_command -00:04:39 verbose #3274 > inl working_directory = options.working_directory |> -00:04:39 verbose #3275 > optionm'.unbox |> optionm'.default_value "" -00:04:39 verbose #3276 > -00:04:39 verbose #3277 > trace Debug (fun () => $'$"execute_with_options_async / options: -00:04:39 verbose #3278 > %A{!options}"') (join _locals) -00:04:39 verbose #3279 > -00:04:39 verbose #3280 > inl utf8 = sm'.encoding_utf8 () -00:04:39 verbose #3281 > inl start_info : process_start_info = -00:04:39 verbose #3282 > $'System.Diagnostics.ProcessStartInfo (Arguments = !arguments, -00:04:39 verbose #3283 > StandardOutputEncoding = !utf8, WorkingDirectory = !working_directory, FileName -00:04:39 verbose #3284 > = !file_name, CreateNoWindow = true, RedirectStandardError = true, -00:04:39 verbose #3285 > RedirectStandardOutput = true, UseShellExecute = false)' -00:04:39 verbose #3286 > -00:04:39 verbose #3287 > (a options.environment_variables : _ i32 _) -00:04:39 verbose #3288 > |> am.iter fun key, value => -00:04:39 verbose #3289 > $'!start_info.EnvironmentVariables.[[!key]] <- !value ' -00:04:39 verbose #3290 > -00:04:39 verbose #3291 > inl proc = start_info |> new_process |> use -00:04:39 verbose #3292 > inl output : _ string = threading.new_concurrent_stack () -00:04:39 verbose #3293 > -00:04:39 verbose #3294 > inl event error (e : data_received_event_args) = async.new_async -00:04:39 verbose #3295 > fun () => -00:04:39 verbose #3296 > inl data = e |> event_data -00:04:39 verbose #3297 > if data <> null () then -00:04:39 verbose #3298 > match options.on_line |> optionm'.unbox with -00:04:39 verbose #3299 > | Some on_line => -00:04:39 verbose #3300 > on_line -00:04:39 verbose #3301 > { -00:04:39 verbose #3302 > process_id = proc |> process_id -00:04:39 verbose #3303 > line = data -00:04:39 verbose #3304 > error = error -00:04:39 verbose #3305 > } -00:04:39 verbose #3306 > |> async.do -00:04:39 verbose #3307 > | None => () -00:04:39 verbose #3308 > -00:04:39 verbose #3309 > inl text = $'$"> {!data}"' -00:04:39 verbose #3310 > if options.trace -00:04:39 verbose #3311 > then trace Verbose (fun () => text) _locals -00:04:39 verbose #3312 > else text |> console.write_line -00:04:39 verbose #3313 > -00:04:39 verbose #3314 > inl l = if error then "\\e[[4;7m" else "" -00:04:39 verbose #3315 > inl r = if error then "\\e[[0m" else "" -00:04:39 verbose #3316 > output |> threading.concurrent_stack_push -00:04:39 verbose #3317 > $'$"{!l}{!data}{!r}"' -00:04:39 verbose #3318 > -00:04:39 verbose #3319 > proc |> process_add_output_data_received (event false >> -00:04:39 verbose #3320 > async.start_immediate) -00:04:39 verbose #3321 > proc |> process_add_error_data_received (event true >> -00:04:39 verbose #3322 > async.start_immediate) -00:04:39 verbose #3323 > -00:04:39 verbose #3324 > if proc |> process_start |> not -00:04:39 verbose #3325 > then failwith $'$"execute_with_options_async / process_start -00:04:39 verbose #3326 > error"' -00:04:39 verbose #3327 > -00:04:39 verbose #3328 > proc |> process_begin_error_read_line -00:04:39 verbose #3329 > proc |> process_begin_output_read_line -00:04:39 verbose #3330 > -00:04:39 verbose #3331 > inl ct = -00:04:39 verbose #3332 > options.cancellation_token -00:04:39 verbose #3333 > |> optionm'.unbox -00:04:39 verbose #3334 > |> optionm'.default_with threading.token_none -00:04:39 verbose #3335 > |> async.merge_cancellation_token_with_default_async -00:04:39 verbose #3336 > |> async.let' -00:04:39 verbose #3337 > -00:04:39 verbose #3338 > ct |> threading.token_register fun () => -00:04:39 verbose #3339 > if proc |> process_has_exited |> not -00:04:39 verbose #3340 > then proc |> process_kill -00:04:39 verbose #3341 > |> use -00:04:39 verbose #3342 > |> ignore -00:04:39 verbose #3343 > -00:04:39 verbose #3344 > inl exit_code : i32 = -00:04:39 verbose #3345 > fun () => -00:04:39 verbose #3346 > try_unit -00:04:39 verbose #3347 > fun () => -00:04:39 verbose #3348 > proc -00:04:39 verbose #3349 > |> process_wait_for_exit_async ct -00:04:39 verbose #3350 > |> async.await_task -00:04:39 verbose #3351 > |> async.do -00:04:39 verbose #3352 > proc |> process_exit_code |> return -00:04:39 verbose #3353 > fun ex => -00:04:39 verbose #3354 > // with :? -00:04:39 verbose #3355 > System.Threading.Tasks.TaskCanceledException as ex => -00:04:39 verbose #3356 > inl ex' = ex |> sm'.format_exception -00:04:39 verbose #3357 > output |> threading.concurrent_stack_push ex' -00:04:39 verbose #3358 > inl ex : async.task_canceled_exception = ex |> -00:04:39 verbose #3359 > unbox -00:04:39 verbose #3360 > trace Warning (fun () => -00:04:39 verbose #3361 > $'$"execute_with_options_async / WaitForExitAsync / ex: %A{!ex}"') (join -00:04:39 verbose #3362 > _locals) -00:04:39 verbose #3363 > (limit.min : i32) |> return -00:04:39 verbose #3364 > |> async.new_async_unit -00:04:39 verbose #3365 > |> async.let' -00:04:39 verbose #3366 > -00:04:39 verbose #3367 > inl output = -00:04:39 verbose #3368 > output -00:04:39 verbose #3369 > |> seq.rev'' -00:04:39 verbose #3370 > |> fun x => x : seq.seq' string -00:04:39 verbose #3371 > |> sm'.concat "\n" -00:04:39 verbose #3372 > -00:04:39 verbose #3373 > trace Debug (fun () => -00:04:39 verbose #3374 > $'$"execute_with_options_async / exit_code: {!exit_code} -00:04:39 verbose #3375 > output.Length: {!output.Length}"' -00:04:39 verbose #3376 > ) (join _locals) -00:04:39 verbose #3377 > -00:04:39 verbose #3378 > (exit_code, output) |> return -00:04:39 verbose #3379 > |> async.new_async_unit -00:04:39 verbose #3380 > | _ => fun () => -00:04:39 verbose #3381 > global "#if FABLE_COMPILER\n[[<CompilationRepresentation -00:04:39 verbose #3382 > (CompilationRepresentationFlags.ModuleSuffix)>]]\nmodule System =\n module -00:04:39 verbose #3383 > Diagnostics =\n type Process = unit\n type DataReceivedEventArgs = -00:04:39 verbose #3384 > unit\n#endif" -00:04:39 verbose #3385 > null () -00:04:39 verbose #3386 > -00:04:39 verbose #3387 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3388 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3389 > │ ## execute_async │ -00:04:39 verbose #3390 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3391 > -00:04:39 verbose #3392 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3393 > inl execute_async command = -00:04:39 verbose #3394 > execution_options fun x => { x with -00:04:39 verbose #3395 > command = command -00:04:39 verbose #3396 > } -00:04:39 verbose #3397 > |> execute_with_options_async -00:04:39 verbose #3398 > -00:04:39 verbose #3399 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3400 > //// test -00:04:39 verbose #3401 > -00:04:39 verbose #3402 > types () -00:04:39 verbose #3403 > inl temp_folder, disposable = file_system.create_temp_directory () -00:04:39 verbose #3404 > disposable |> use |> ignore -00:04:39 verbose #3405 > inl file_name = "test.txt" -00:04:39 verbose #3406 > inl path = temp_folder </> file_name -00:04:39 verbose #3407 > -00:04:39 verbose #3408 > inl content = "╭─[[ 你好,世界!こんにちは世界! ]]─╮" -00:04:39 verbose #3409 > fun () => -00:04:39 verbose #3410 > inl exit_code, result = execute_async $'\@$"pwsh -c ""Get-Content -00:04:39 verbose #3411 > {!path}"""' |> async.let' -00:04:39 verbose #3412 > exit_code |> join _assert_eq 1 -00:04:39 verbose #3413 > result |> _assert_string_contains "not exist" -00:04:39 verbose #3414 > -00:04:39 verbose #3415 > content |> file_system.write_all_text_async path |> async.do -00:04:39 verbose #3416 > -00:04:39 verbose #3417 > execution_options fun x => { x with -00:04:39 verbose #3418 > command = $'\@$"cat ""{!file_name}"""' -00:04:39 verbose #3419 > working_directory = Some temp_folder |> optionm'.box -00:04:39 verbose #3420 > } -00:04:39 verbose #3421 > |> execute_with_options_async -00:04:39 verbose #3422 > |> async.let' -00:04:39 verbose #3423 > |> ignore -00:04:39 verbose #3424 > -00:04:39 verbose #3425 > execution_options fun x => { x with -00:04:39 verbose #3426 > command = $'\@$"pwsh -c ""[[System.Console]]::OutputEncoding = -00:04:39 verbose #3427 > [[System.Text.Encoding]]::UTF8; Get-Content {!file_name}"""' -00:04:39 verbose #3428 > working_directory = Some temp_folder |> optionm'.box -00:04:39 verbose #3429 > } -00:04:39 verbose #3430 > |> execute_with_options_async -00:04:39 verbose #3431 > |> async.return_await -00:04:39 verbose #3432 > |> async.new_async_unit -00:04:39 verbose #3433 > |> async.run_with_timeout 10000 -00:04:39 verbose #3434 > |> function -00:04:39 verbose #3435 > | Some (exit_code, output) => -00:04:39 verbose #3436 > exit_code |> join _assert_eq 0i32 -00:04:39 verbose #3437 > output |> join _assert_eq content -00:04:39 verbose #3438 > true -00:04:39 verbose #3439 > | _ => false -00:04:39 verbose #3440 > |> _assert_eq true -00:04:39 verbose #3441 > -00:04:39 verbose #3442 > ╭─[ 7.80s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3443 > │ 00:00:00 debug #1 execute_with_options_async / options: struct (None, │ -00:04:39 verbose #3444 > │ "pwsh -c "Get-Content │ -00:04:39 verbose #3445 > │ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1552-5257-50040 │ -00:04:39 verbose #3446 > │ 05579ff\test.txt"", │ -00:04:39 verbose #3447 > │ [||], None, None, true, None) │ -00:04:39 verbose #3448 > │ 00:00:00 verbose #2 > Get-Content: Cannot find path │ -00:04:39 verbose #3449 > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1552-5257-5004 │ -00:04:39 verbose #3450 > │ 005579ff\test.txt' because it does not exist. │ -00:04:39 verbose #3451 > │ 00:00:00 debug #3 execute_with_options_async / exit_code: 1 / │ -00:04:39 verbose #3452 > │ output.Length: 181 │ -00:04:39 verbose #3453 > │ assert_eq / actual: 1 / expected: 1 │ -00:04:39 verbose #3454 > │ assert_string_contains / actual: "not exist" / expected: "\e[4;7m[ │ -00:04:39 verbose #3455 > │ 31;1mGet-Content: Cannot find path │ -00:04:39 verbose #3456 > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1552-5257-5004 │ -00:04:39 verbose #3457 > │ 005579ff\test.txt' because it does not exist.\e[0m" │ -00:04:39 verbose #3458 > │ 00:00:00 debug #4 execute_with_options_async / options: struct (None, "cat │ -00:04:39 verbose #3459 > │ "test.txt"", [||], None, None, true, │ -00:04:39 verbose #3460 > │ Some │ -00:04:39 verbose #3461 > │ │ -00:04:39 verbose #3462 > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1552-5257-5004 │ -00:04:39 verbose #3463 > │ 005579ff") │ -00:04:39 verbose #3464 > │ 00:00:00 verbose #5 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │ -00:04:39 verbose #3465 > │ 00:00:00 debug #6 execute_with_options_async / exit_code: 0 / │ -00:04:39 verbose #3466 > │ output.Length: 22 │ -00:04:39 verbose #3467 > │ 00:00:00 debug #7 execute_with_options_async / options: struct (None, │ -00:04:39 verbose #3468 > │ "pwsh -c "[System.Console]::OutputEncoding = [ │ -00:04:39 verbose #3469 > │ System.Text.Encoding]::UTF8; Get-Content test.txt"", │ -00:04:39 verbose #3470 > │ [||], None, None, true, │ -00:04:39 verbose #3471 > │ Some │ -00:04:39 verbose #3472 > │ │ -00:04:39 verbose #3473 > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1552-5257-5004 │ -00:04:39 verbose #3474 > │ 005579ff") │ -00:04:39 verbose #3475 > │ 00:00:01 verbose #8 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │ -00:04:39 verbose #3476 > │ 00:00:01 debug #9 execute_with_options_async / exit_code: 0 / │ -00:04:39 verbose #3477 > │ output.Length: 22 │ -00:04:39 verbose #3478 > │ assert_eq / actual: 0 / expected: 0 │ -00:04:39 verbose #3479 > │ assert_eq / actual: "╭─[ 你好,世界!こんにちは世界! ]─╮" / expected: "╭─[ │ -00:04:39 verbose #3480 > │ 你好,世界!こんにちは世界! ]─╮" │ -00:04:39 verbose #3481 > │ assert_eq / actual: true / expected: true │ -00:04:39 verbose #3482 > │ │ -00:04:39 verbose #3483 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3484 > -00:04:39 verbose #3485 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3486 > //// test -00:04:39 verbose #3487 > -00:04:39 verbose #3488 > file_system.types () -00:04:39 verbose #3489 > inl temp_dir, disposable = file_system.create_temp_directory () -00:04:39 verbose #3490 > disposable |> use |> ignore -00:04:39 verbose #3491 > fun () => -00:04:39 verbose #3492 > inl path = temp_dir </> "test.txt" -00:04:39 verbose #3493 > "0" |> file_system.write_all_text_async path |> async.do -00:04:39 verbose #3494 > -00:04:39 verbose #3495 > inl cts = threading.new_cancellation_token_source () -00:04:39 verbose #3496 > trace Debug (fun () => "1") _locals -00:04:39 verbose #3497 > inl result = -00:04:39 verbose #3498 > execution_options fun x => { x with -00:04:39 verbose #3499 > command = $'\@$"pwsh -c ""Get-Content {!path}"""' -00:04:39 verbose #3500 > cancellation_token = cts |> threading.cancellation_source_token |> -00:04:39 verbose #3501 > Some |> optionm'.box -00:04:39 verbose #3502 > } -00:04:39 verbose #3503 > |> execute_with_options_async -00:04:39 verbose #3504 > |> async.start_child -00:04:39 verbose #3505 > |> async.let' -00:04:39 verbose #3506 > trace Debug (fun () => "2") _locals -00:04:39 verbose #3507 > async.sleep 100 |> async.do -00:04:39 verbose #3508 > trace Debug (fun () => "3") _locals -00:04:39 verbose #3509 > cts |> threading.cancellation_source_cancel -00:04:39 verbose #3510 > trace Debug (fun () => "4") _locals -00:04:39 verbose #3511 > inl exit_code, output = result |> async.let' -00:04:39 verbose #3512 > trace Debug (fun () => "5") _locals -00:04:39 verbose #3513 > (exit_code, output) |> return -00:04:39 verbose #3514 > |> async.new_async_unit -00:04:39 verbose #3515 > |> async.run_with_timeout 10000 -00:04:39 verbose #3516 > |> function -00:04:39 verbose #3517 > | Some (exit_code, output) => -00:04:39 verbose #3518 > exit_code |> _assert_eq -2147483648i32 -00:04:39 verbose #3519 > output |> _assert_eq (join -00:04:39 verbose #3520 > "System.Threading.Tasks.TaskCanceledException: A task was canceled.") -00:04:39 verbose #3521 > true -00:04:39 verbose #3522 > | _ => false -00:04:39 verbose #3523 > |> _assert_eq true -00:04:39 verbose #3524 > -00:04:39 verbose #3525 > ╭─[ 2.64s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3526 > │ 00:00:00 debug #1 1 │ -00:04:39 verbose #3527 > │ 00:00:00 debug #2 2 │ -00:04:39 verbose #3528 > │ 00:00:00 debug #3 execute_with_options_async / options: struct (Some │ -00:04:39 verbose #3529 > │ System.Threading.CancellationToken, │ -00:04:39 verbose #3530 > │ "pwsh -c "Get-Content │ -00:04:39 verbose #3531 > │ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1966-6645-60040 │ -00:04:39 verbose #3532 > │ 0973265\test.txt"", │ -00:04:39 verbose #3533 > │ [||], None, None, true, None) │ -00:04:39 verbose #3534 > │ 00:00:00 debug #4 3 │ -00:04:39 verbose #3535 > │ 00:00:00 debug #5 4 │ -00:04:39 verbose #3536 > │ 00:00:00 warning #6 execute_with_options_async / WaitForExitAsync / ex: │ -00:04:39 verbose #3537 > │ System.Threading.Tasks.TaskCanceledException: A task was canceled. │ -00:04:39 verbose #3538 > │ 00:00:00 debug #7 execute_with_options_async / exit_code: -2147483648 / │ -00:04:39 verbose #3539 > │ output.Length: 66 │ -00:04:39 verbose #3540 > │ 00:00:00 debug #8 5 │ -00:04:39 verbose #3541 > │ assert_eq / actual: -2147483648 / expected: -2147483648 │ -00:04:39 verbose #3542 > │ assert_eq / actual: "System.Threading.Tasks.TaskCanceledException: A task │ -00:04:39 verbose #3543 > │ was canceled." / expected: "System.Threading.Tasks.TaskCanceledException: A │ -00:04:39 verbose #3544 > │ task was canceled." │ -00:04:39 verbose #3545 > │ assert_eq / actual: true / expected: true │ -00:04:39 verbose #3546 > │ │ -00:04:39 verbose #3547 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3548 > -00:04:39 verbose #3549 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3550 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3551 > │ ## split_args │ -00:04:39 verbose #3552 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3553 > -00:04:39 verbose #3554 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3555 > union args_parse_step = -00:04:39 verbose #3556 > | Start -00:04:39 verbose #3557 > | Quoted : char -00:04:39 verbose #3558 > | Escaped : u8 * char -00:04:39 verbose #3559 > -00:04:39 verbose #3560 > let split_args (args : string) : array_base string = -00:04:39 verbose #3561 > let rec loop (acc, current) (chars : list char) (step, last) = -00:04:39 verbose #3562 > // trace Verbose (fun () => $'$"split_args / current: %A{!current} -00:04:39 verbose #3563 > acc: %A{!acc} / step: %A{!step} / last: %A{!last}"') _locals -00:04:39 verbose #3564 > match step, last, chars with -00:04:39 verbose #3565 > | Start, _, ('"' :: tail) => -00:04:39 verbose #3566 > loop (acc, "") tail (Quoted '"', step) -00:04:39 verbose #3567 > | Escaped _, _, (('\\' | '\`') & c :: tail) => -00:04:39 verbose #3568 > loop (acc, current) tail (Quoted c, step) -00:04:39 verbose #3569 > | Escaped _, Start, ('"' :: tail) => -00:04:39 verbose #3570 > loop (acc, current) tail (step, step) -00:04:39 verbose #3571 > | Quoted ('"'), Quoted _, ('"' :: tail) => -00:04:39 verbose #3572 > loop (acc, current) tail (Start, step) -00:04:39 verbose #3573 > | Escaped (0, ('\\' | '\`') & c), Quoted ('"'), (c' :: tail) => -00:04:39 verbose #3574 > loop (acc, $'$"{!current}{!c}{!c'}"') tail (Quoted '"', step) -00:04:39 verbose #3575 > | Quoted (('\\' | '\`') as c), _, ('"' :: tail) -00:04:39 verbose #3576 > when last <>. Escaped (0, '\\') && last <>. Escaped (0, '\`') => -00:04:39 verbose #3577 > loop (acc, $'$"{!current}{!c}\\\""') tail (Quoted '"', step) -00:04:39 verbose #3578 > | Quoted (('\\' | '\`') as c), Quoted _, ('"' :: tail) => -00:04:39 verbose #3579 > loop (acc, $'$"{!current}{!c}\\\""') tail (Quoted '"', step) -00:04:39 verbose #3580 > | Quoted ('\\' | '\`'), _, ('"' :: tail) => -00:04:39 verbose #3581 > loop (acc, current) tail (Start, step) -00:04:39 verbose #3582 > | Escaped (n, c), _, ('"' :: tail) => -00:04:39 verbose #3583 > loop (acc, $'$"{!current}{!c}\\\""') tail (Escaped (n, c), step) -00:04:39 verbose #3584 > | Quoted _, Quoted _, (('\\' | '\`') & c :: tail) => -00:04:39 verbose #3585 > loop (acc, current) tail (Escaped (0, c), step) -00:04:39 verbose #3586 > | Quoted _, _, (('\\' | '\`') & c :: tail) => -00:04:39 verbose #3587 > loop (acc, current) tail (Escaped (1, c), step) -00:04:39 verbose #3588 > | Quoted _, Escaped (0, _), ('"' :: tail) => -00:04:39 verbose #3589 > loop (acc, $'$"{!current}"') tail (Quoted '"', step) -00:04:39 verbose #3590 > | Quoted _, _, ('"' :: tail) => -00:04:39 verbose #3591 > loop (acc ++ [[ current ]], "") tail (Start, step) -00:04:39 verbose #3592 > | (Escaped _ | Quoted _), _, (' ' :: tail) => -00:04:39 verbose #3593 > loop (acc, $'$"{!current} "') tail (step, step) -00:04:39 verbose #3594 > | _, _, (('\\' | '\`') & c :: tail) => -00:04:39 verbose #3595 > loop (acc, current) tail (Escaped (0, c), step) -00:04:39 verbose #3596 > | _, _, (' ' :: tail) => -00:04:39 verbose #3597 > loop ((if current = "" then acc else acc ++ [[ current ]]), "") tail -00:04:39 verbose #3598 > (step, step) -00:04:39 verbose #3599 > | Escaped (1, _), _, (char :: tail) when last <>. step => -00:04:39 verbose #3600 > loop (acc, $'$"{!current}\\{!char}"') tail (last, step) -00:04:39 verbose #3601 > | _, _, (char :: tail) => -00:04:39 verbose #3602 > loop (acc, $'$"{!current}{!char}"') tail (step, step) -00:04:39 verbose #3603 > | _ => -00:04:39 verbose #3604 > (if current = "" then acc else acc ++ [[ current ]]), current -00:04:39 verbose #3605 > loop -00:04:39 verbose #3606 > ([[]], "") -00:04:39 verbose #3607 > ( -00:04:39 verbose #3608 > args -00:04:39 verbose #3609 > |> optionm'.of_obj -00:04:39 verbose #3610 > |> optionm'.unbox -00:04:39 verbose #3611 > |> optionm'.default_value "" -00:04:39 verbose #3612 > |> sm'.to_char_array -00:04:39 verbose #3613 > |> am'.to_list' -00:04:39 verbose #3614 > |> listm'.unbox -00:04:39 verbose #3615 > ) -00:04:39 verbose #3616 > (Start, Start) -00:04:39 verbose #3617 > |> fst -00:04:39 verbose #3618 > |> listm'.box -00:04:39 verbose #3619 > |> listm'.to_array' -00:04:39 verbose #3620 > |> fun (a x : _ i32 _) => x -00:04:39 verbose #3621 > -00:04:39 verbose #3622 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3623 > //// test -00:04:39 verbose #3624 > -00:04:39 verbose #3625 > "a b \"c d\" e" -00:04:39 verbose #3626 > |> split_args -00:04:39 verbose #3627 > |> _assert_eq' ;[[ "a"; "b"; "c d"; "e" ]] -00:04:39 verbose #3628 > -00:04:39 verbose #3629 > ╭─[ 1.74s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3630 > │ assert_eq' / actual: [|"a"; "b"; "c d"; "e"|] / expected: [|"a"; "b"; "c d"; │ -00:04:39 verbose #3631 > │ "e"|] │ -00:04:39 verbose #3632 > │ │ -00:04:39 verbose #3633 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3634 > -00:04:39 verbose #3635 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3636 > //// test -00:04:39 verbose #3637 > -00:04:39 verbose #3638 > "a b e" -00:04:39 verbose #3639 > |> split_args -00:04:39 verbose #3640 > |> _assert_eq' ;[[ "a"; "b"; "e" ]] -00:04:39 verbose #3641 > -00:04:39 verbose #3642 > ╭─[ 1.36s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3643 > │ assert_eq' / actual: [|"a"; "b"; "e"|] / expected: [|"a"; "b"; "e"|] │ -00:04:39 verbose #3644 > │ │ -00:04:39 verbose #3645 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3646 > -00:04:39 verbose #3647 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3648 > //// test -00:04:39 verbose #3649 > -00:04:39 verbose #3650 > "\"a b\" \"e\" \"f\"" -00:04:39 verbose #3651 > |> split_args -00:04:39 verbose #3652 > |> _assert_eq' ;[[ "a b"; "e"; "f" ]] -00:04:39 verbose #3653 > -00:04:39 verbose #3654 > ╭─[ 1.33s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3655 > │ assert_eq' / actual: [|"a b"; "e"; "f"|] / expected: [|"a b"; "e"; "f"|] │ -00:04:39 verbose #3656 > │ │ -00:04:39 verbose #3657 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3658 > -00:04:39 verbose #3659 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3660 > //// test -00:04:39 verbose #3661 > -00:04:39 verbose #3662 > "a -b \"c \\\"d\\\"\"" -00:04:39 verbose #3663 > |> split_args -00:04:39 verbose #3664 > |> _assert_eq' ;[[ "a"; "-b"; "c \\\"d\\\"" ]] -00:04:39 verbose #3665 > -00:04:39 verbose #3666 > ╭─[ 1.19s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3667 > │ assert_eq' / actual: [|"a"; "-b"; "c \"d\""|] / expected: [|"a"; "-b"; "c │ -00:04:39 verbose #3668 > │ \"d\""|] │ -00:04:39 verbose #3669 > │ │ -00:04:39 verbose #3670 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3671 > -00:04:39 verbose #3672 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3673 > //// test -00:04:39 verbose #3674 > -00:04:39 verbose #3675 > "a -b \"c \\\"d\\\" e\"" -00:04:39 verbose #3676 > |> split_args -00:04:39 verbose #3677 > |> _assert_eq' ;[[ "a"; "-b"; "c \\\"d\\\" e" ]] -00:04:39 verbose #3678 > -00:04:39 verbose #3679 > ╭─[ 1.26s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3680 > │ assert_eq' / actual: [|"a"; "-b"; "c \"d\" e"|] / expected: [|"a"; "-b"; "c │ -00:04:39 verbose #3681 > │ \"d\" e"|] │ -00:04:39 verbose #3682 > │ │ -00:04:39 verbose #3683 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3684 > -00:04:39 verbose #3685 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3686 > //// test -00:04:39 verbose #3687 > -00:04:39 verbose #3688 > "a -b \"c \`\"d\`\" e\"" -00:04:39 verbose #3689 > |> split_args -00:04:39 verbose #3690 > |> _assert_eq' ;[[ "a"; "-b"; "c \`\"d\`\" e" ]] -00:04:39 verbose #3691 > -00:04:39 verbose #3692 > ╭─[ 1.34s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3693 > │ assert_eq' / actual: [|"a"; "-b"; "c `"d`" e"|] / expected: [|"a"; "-b"; "c │ -00:04:39 verbose #3694 > │ `"d`" e"|] │ -00:04:39 verbose #3695 > │ │ -00:04:39 verbose #3696 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3697 > -00:04:39 verbose #3698 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3699 > //// test -00:04:39 verbose #3700 > -00:04:39 verbose #3701 > $'$"--text \\\\\\"\'\'\' value \'\'\'\\\\\\" "' -00:04:39 verbose #3702 > |> split_args -00:04:39 verbose #3703 > |> _assert_eq' ;[[ "--text"; "''' value '''" ]] -00:04:39 verbose #3704 > -00:04:39 verbose #3705 > ╭─[ 1.51s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3706 > │ assert_eq' / actual: [|"--text"; "''' value '''"|] / expected: [|"--text"; │ -00:04:39 verbose #3707 > │ "''' value '''"|] │ -00:04:39 verbose #3708 > │ │ -00:04:39 verbose #3709 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3710 > -00:04:39 verbose #3711 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3712 > //// test -00:04:39 verbose #3713 > -00:04:39 verbose #3714 > $'\@$"run ""get c:\\test.txt"""' -00:04:39 verbose #3715 > |> split_args -00:04:39 verbose #3716 > |> _assert_eq' ;[[ "run"; "get c:\\test.txt" ]] -00:04:39 verbose #3717 > -00:04:39 verbose #3718 > ╭─[ 1.40s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3719 > │ assert_eq' / actual: [|"run"; "get c:\test.txt"|] / expected: [|"run"; "get │ -00:04:39 verbose #3720 > │ c:\test.txt"|] │ -00:04:39 verbose #3721 > │ │ -00:04:39 verbose #3722 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3723 > -00:04:39 verbose #3724 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3725 > //// test -00:04:39 verbose #3726 > -00:04:39 verbose #3727 > "pwsh -c \"$x -replace '(id=`\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + -00:04:39 verbose #3728 > `$counter++ }\"" -00:04:39 verbose #3729 > |> split_args -00:04:39 verbose #3730 > |> _assert_eq' ;[[ "pwsh"; "-c"; "$x -replace -00:04:39 verbose #3731 > '(id=`\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$counter++ }" ]] -00:04:39 verbose #3732 > -00:04:39 verbose #3733 > ╭─[ 1.16s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3734 > │ assert_eq' / actual: [|"pwsh"; "-c"; │ -00:04:39 verbose #3735 > │ "$x -replace '(id=`"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │ -00:04:39 verbose #3736 > │ / expected: [|"pwsh"; "-c"; │ -00:04:39 verbose #3737 > │ "$x -replace '(id=`"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │ -00:04:39 verbose #3738 > │ │ -00:04:39 verbose #3739 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3740 > -00:04:39 verbose #3741 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3742 > //// test -00:04:39 verbose #3743 > -00:04:39 verbose #3744 > $'$"pwsh -c \\\"$x -replace \'(id=\\\\\\"cell-id=)[[a-fA-F0-9]]{{8}}\', {{ -00:04:39 verbose #3745 > \`$_[[1]] + \`$counter++ }}\\\""' -00:04:39 verbose #3746 > |> split_args -00:04:39 verbose #3747 > |> _assert_eq' ;[[ "pwsh"; "-c"; "$x -replace -00:04:39 verbose #3748 > '(id=\\\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$counter++ }" ]] -00:04:39 verbose #3749 > -00:04:39 verbose #3750 > ╭─[ 1.20s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3751 > │ assert_eq' / actual: [|"pwsh"; "-c"; │ -00:04:39 verbose #3752 > │ "$x -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │ -00:04:39 verbose #3753 > │ / expected: [|"pwsh"; "-c"; │ -00:04:39 verbose #3754 > │ "$x -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │ -00:04:39 verbose #3755 > │ │ -00:04:39 verbose #3756 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3757 > -00:04:39 verbose #3758 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3759 > //// test -00:04:39 verbose #3760 > -00:04:39 verbose #3761 > $'$"a --b --c d --e \\\"c:/f f/test.hangul.md\\\" --output \\\"c:/md.pdf\\\" -00:04:39 verbose #3762 > --set tex.template.add \\\"\\\\usepackage{{cjkutf8-ko}}\\\" -00:04:39 verbose #3763 > rendering.highlight.theme \\\"Solarized (dark)\\\""' -00:04:39 verbose #3764 > |> split_args -00:04:39 verbose #3765 > |> _assert_eq' ;[[ "a"; "--b"; "--c"; "d"; "--e"; "c:/f f/test.hangul.md"; -00:04:39 verbose #3766 > "--output"; "c:/md.pdf"; "--set"; "tex.template.add"; -00:04:39 verbose #3767 > "\\usepackage{cjkutf8-ko}"; "rendering.highlight.theme"; "Solarized (dark)" ]] -00:04:39 verbose #3768 > -00:04:39 verbose #3769 > ╭─[ 1.19s - stdout ]───────────────────────────────────────────────────────────╮ -00:04:39 verbose #3770 > │ assert_eq' / actual: [|"a"; "--b"; "--c"; "d"; "--e"; "c:/f │ -00:04:39 verbose #3771 > │ f/test.hangul.md"; "--output"; │ -00:04:39 verbose #3772 > │ "c:/md.pdf"; "--set"; "tex.template.add"; "\usepackage{cjkutf8-ko}"; │ -00:04:39 verbose #3773 > │ "rendering.highlight.theme"; "Solarized (dark)"|] / expected: [|"a"; │ -00:04:39 verbose #3774 > │ "--b"; "--c"; "d"; "--e"; "c:/f f/test.hangul.md"; "--output"; │ -00:04:39 verbose #3775 > │ "c:/md.pdf"; "--set"; "tex.template.add"; "\usepackage{cjkutf8-ko}"; │ -00:04:39 verbose #3776 > │ "rendering.highlight.theme"; "Solarized (dark)"|] │ -00:04:39 verbose #3777 > │ │ -00:04:39 verbose #3778 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3779 > -00:04:39 verbose #3780 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3781 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3782 > │ ## stdin_write_all │ -00:04:39 verbose #3783 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3784 > -00:04:39 verbose #3785 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3786 > inl stdin_write_all (stdin : threading.mutex_guard child_stdin) (text : string) -00:04:39 verbose #3787 > : () = -00:04:39 verbose #3788 > inl stream = text |> sm'.as_bytes -00:04:39 verbose #3789 > inl stdin = join stdin -00:04:39 verbose #3790 > (!\($'"true; let mut !stdin = !stdin"') : bool) |> ignore -00:04:39 verbose #3791 > (!\\(stdin, $'"true; std::io::Write::write_all(&mut *$0, -00:04:39 verbose #3792 > !stream).unwrap()"') : bool) |> ignore -00:04:39 verbose #3793 > -00:04:39 verbose #3794 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3795 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3796 > │ ## stdin_flush │ -00:04:39 verbose #3797 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3798 > -00:04:39 verbose #3799 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3800 > inl stdin_flush (stdin : threading.mutex_guard child_stdin) : () = -00:04:39 verbose #3801 > inl stdin = join stdin -00:04:39 verbose #3802 > (!\($'"true; let mut !stdin = !stdin"') : bool) |> ignore -00:04:39 verbose #3803 > (!\\(stdin, $'"true; std::io::Write::flush(&mut *$0).unwrap()"') : bool) |> -00:04:39 verbose #3804 > ignore -00:04:39 verbose #3805 > -00:04:39 verbose #3806 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3807 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3808 > │ ## new_process_command │ -00:04:39 verbose #3809 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3810 > -00:04:39 verbose #3811 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3812 > inl new_process_command (file_name : string) : process_command = -00:04:39 verbose #3813 > !\\(file_name, $'"std::process::Command::new(&*$0)"') -00:04:39 verbose #3814 > -00:04:39 verbose #3815 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3816 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3817 > │ ## process_stdio_piped │ -00:04:39 verbose #3818 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3819 > -00:04:39 verbose #3820 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3821 > inl process_stdio_piped () : stdio = -00:04:39 verbose #3822 > !\($'"std::process::Stdio::piped()"') -00:04:39 verbose #3823 > -00:04:39 verbose #3824 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3825 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3826 > │ ## process_command_args │ -00:04:39 verbose #3827 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3828 > -00:04:39 verbose #3829 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3830 > inl process_command_args (args : am'.vec sm'.std_string) (c : process_command) : -00:04:39 verbose #3831 > rust.ref' (rust.mut' process_command) = -00:04:39 verbose #3832 > (!\($'"true; let mut !c = !c"') : bool) |> ignore -00:04:39 verbose #3833 > !\\((c, args), $'"std::process::Command::args(&mut $0, &*$1)"') -00:04:39 verbose #3834 > -00:04:39 verbose #3835 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3836 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3837 > │ ## process_command_stdout │ -00:04:39 verbose #3838 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3839 > -00:04:39 verbose #3840 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3841 > inl process_command_stdout (stdio : stdio) (c : rust.ref' (rust.mut' -00:04:39 verbose #3842 > process_command)) : rust.ref' (rust.mut' process_command) = -00:04:39 verbose #3843 > !\\(c, $'"std::process::Command::stdout($0, std::process::Stdio::piped())"') -00:04:39 verbose #3844 > -00:04:39 verbose #3845 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3846 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3847 > │ ## process_command_stderr │ -00:04:39 verbose #3848 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3849 > -00:04:39 verbose #3850 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3851 > inl process_command_stderr (stdio : stdio) (c : rust.ref' (rust.mut' -00:04:39 verbose #3852 > process_command)) : rust.ref' (rust.mut' process_command) = -00:04:39 verbose #3853 > !\\(c, $'"std::process::Command::stderr($0, std::process::Stdio::piped())"') -00:04:39 verbose #3854 > -00:04:39 verbose #3855 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3856 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3857 > │ ## process_command_stdin │ -00:04:39 verbose #3858 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3859 > -00:04:39 verbose #3860 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3861 > inl process_command_stdin (stdio : stdio) (c : rust.ref' (rust.mut' -00:04:39 verbose #3862 > process_command)) : rust.ref' (rust.mut' process_command) = -00:04:39 verbose #3863 > !\\(c, $'"std::process::Command::stdin($0, std::process::Stdio::piped())"') -00:04:39 verbose #3864 > -00:04:39 verbose #3865 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3866 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3867 > │ ## process_command_current_dir │ -00:04:39 verbose #3868 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3869 > -00:04:39 verbose #3870 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3871 > inl process_command_current_dir (dir : string) (c : rust.ref' (rust.mut' -00:04:39 verbose #3872 > process_command)) : rust.ref' (rust.mut' process_command) = -00:04:39 verbose #3873 > !\\(dir, $'"std::process::Command::current_dir(!c, &*$0)"') -00:04:39 verbose #3874 > -00:04:39 verbose #3875 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3876 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3877 > │ ## process_command_env │ -00:04:39 verbose #3878 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3879 > -00:04:39 verbose #3880 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3881 > inl process_command_env (key : string) (value : string) (c : rust.ref' -00:04:39 verbose #3882 > (rust.mut' process_command)) : rust.ref' (rust.mut' process_command) = -00:04:39 verbose #3883 > !\\((key, value), $'"std::process::Command::env(!c, &*$0, &*$1)"') -00:04:39 verbose #3884 > -00:04:39 verbose #3885 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3886 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3887 > │ ## process_command_spawn │ -00:04:39 verbose #3888 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3889 > -00:04:39 verbose #3890 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3891 > inl process_command_spawn (c : rust.ref' (rust.mut' process_command)) : -00:04:39 verbose #3892 > resultm.result' child stream.io_error = -00:04:39 verbose #3893 > !\\(c, $'"std::process::Command::spawn($0)"') -00:04:39 verbose #3894 > -00:04:39 verbose #3895 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3896 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3897 > │ ## stdio_line │ -00:04:39 verbose #3898 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3899 > -00:04:39 verbose #3900 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3901 > inl stdio_line -00:04:39 verbose #3902 > (stdout : bool) -00:04:39 verbose #3903 > (trace' : bool) -00:04:39 verbose #3904 > (channel_sender : threading.arc (threading.mutex (sender sm'.std_string))) -00:04:39 verbose #3905 > (line : resultm.result' sm'.std_string stream.io_error) -00:04:39 verbose #3906 > = -00:04:39 verbose #3907 > run_target function -00:04:39 verbose #3908 > | Rust (Native) => fun () => -00:04:39 verbose #3909 > inl line = -00:04:39 verbose #3910 > inl highlight text = -00:04:39 verbose #3911 > $'$"\\e[[4;7m{!text}\\e[[0m"' -00:04:39 verbose #3912 > match -00:04:39 verbose #3913 > line -00:04:39 verbose #3914 > |> resultm.map_error' sm'.format' -00:04:39 verbose #3915 > |> resultm.unbox -00:04:39 verbose #3916 > with -00:04:39 verbose #3917 > | Ok line => -00:04:39 verbose #3918 > inl line = -00:04:39 verbose #3919 > line -00:04:39 verbose #3920 > |> sm'.from_std_string -00:04:39 verbose #3921 > // |> sm'.as_bytes -00:04:39 verbose #3922 > // |> am'.slice_to_vec -00:04:39 verbose #3923 > |> sm'.encoding_encode' (sm'.encoding_utf8' ()) -00:04:39 verbose #3924 > |> rust.cow_as_ref -00:04:39 verbose #3925 > |> sm'.str_from_utf8 -00:04:39 verbose #3926 > // |> sm'.utf8_decode -00:04:39 verbose #3927 > |> resultm.unwrap' -00:04:39 verbose #3928 > |> sm'.ref_to_std_string -00:04:39 verbose #3929 > // String::from_utf8_lossy(line.as_bytes()).into() -00:04:39 verbose #3930 > inl line_log = line |> sm'.from_std_string -00:04:39 verbose #3931 > inl text = -00:04:39 verbose #3932 > if stdout -00:04:39 verbose #3933 > then line_log -00:04:39 verbose #3934 > else line_log |> highlight -00:04:39 verbose #3935 > if trace' -00:04:39 verbose #3936 > then trace Verbose (fun () => text) _locals -00:04:39 verbose #3937 > else text |> console.write_line -00:04:39 verbose #3938 > line -00:04:39 verbose #3939 > | Error e => -00:04:39 verbose #3940 > trace Critical -00:04:39 verbose #3941 > fun () => $'$"runtime.stdio_line"' -00:04:39 verbose #3942 > fun () => $'$"e: {!e} / {!_locals ()}"' -00:04:39 verbose #3943 > e |> highlight |> sm'.to_std_string -00:04:39 verbose #3944 > (!\\((channel_sender, line), $'"true; -00:04:39 verbose #3945 > $0.lock().unwrap().send($1).unwrap()"') : bool) |> ignore -00:04:39 verbose #3946 > | _ => fun () => null () -00:04:39 verbose #3947 > -00:04:39 verbose #3948 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #3949 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #3950 > │ ## execute_with_options │ -00:04:39 verbose #3951 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #3952 > -00:04:39 verbose #3953 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #3954 > let execute_with_options (options : execution_options) : i32 * string = -00:04:39 verbose #3955 > run_target function -00:04:39 verbose #3956 > | Fsharp (Native) => fun () => -00:04:39 verbose #3957 > options |> execute_with_options_async |> async.run_synchronously -00:04:39 verbose #3958 > | Rust (Native) => fun () => -00:04:39 verbose #3959 > inl command = join options.command -00:04:39 verbose #3960 > inl file_name, arguments = command |> split_command -00:04:39 verbose #3961 > inl arguments = -00:04:39 verbose #3962 > arguments -00:04:39 verbose #3963 > |> split_args -00:04:39 verbose #3964 > |> am'.to_vec -00:04:39 verbose #3965 > |> am'.vec_map sm'.to_std_string -00:04:39 verbose #3966 > -00:04:39 verbose #3967 > trace Debug -00:04:39 verbose #3968 > fun () => $'$"runtime.execute_with_options"' -00:04:39 verbose #3969 > fun () => $'$"file_name: {!file_name} / arguments: -00:04:39 verbose #3970 > %A{!arguments} / options: %A{!options} / {!_locals ()}"' -00:04:39 verbose #3971 > -00:04:39 verbose #3972 > fun () => -00:04:39 verbose #3973 > fun () => -00:04:39 verbose #3974 > file_name -00:04:39 verbose #3975 > |> new_process_command -00:04:39 verbose #3976 > |> process_command_args arguments -00:04:39 verbose #3977 > |> process_command_stdout (process_stdio_piped ()) -00:04:39 verbose #3978 > |> process_command_stderr (process_stdio_piped ()) -00:04:39 verbose #3979 > |> process_command_stdin (process_stdio_piped ()) -00:04:39 verbose #3980 > |> fun command => -00:04:39 verbose #3981 > match options.working_directory |> optionm'.unbox with -00:04:39 verbose #3982 > | Some working_directory => command |> -00:04:39 verbose #3983 > process_command_current_dir working_directory -00:04:39 verbose #3984 > | None => command -00:04:39 verbose #3985 > |> fun command => -00:04:39 verbose #3986 > match options.environment_variables with -00:04:39 verbose #3987 > | ;[[]] => command -00:04:39 verbose #3988 > | vars => -00:04:39 verbose #3989 > (command, vars |> am'.to_vec) -00:04:39 verbose #3990 > ||> am'.vec_fold' fun command (key, value) => -00:04:39 verbose #3991 > command |> process_command_env key value -00:04:39 verbose #3992 > |> process_command_spawn -00:04:39 verbose #3993 > |> resultm.map_error' sm'.format' -00:04:39 verbose #3994 > |> resultm.map' (optionm'.some' >> threading.new_arc_mutex) -00:04:39 verbose #3995 > |> resultm.unbox' -00:04:39 verbose #3996 > |> function -00:04:39 verbose #3997 > | Ok child => -00:04:39 verbose #3998 > inl stdout : child_stdout = !\\(child, -00:04:39 verbose #3999 > $'"$0.lock().unwrap().as_mut().unwrap().stdout.take().unwrap()"') -00:04:39 verbose #4000 > inl stderr : child_stderr = !\\(child, -00:04:39 verbose #4001 > $'"$0.lock().unwrap().as_mut().unwrap().stderr.take().unwrap()"') -00:04:39 verbose #4002 > inl stdin : child_stdin = !\\(child, -00:04:39 verbose #4003 > $'"$0.lock().unwrap().as_mut().unwrap().stdin.take().unwrap()"') -00:04:39 verbose #4004 > inl stdout = stdout |> optionm'.some' |> -00:04:39 verbose #4005 > threading.new_arc_mutex -00:04:39 verbose #4006 > inl stderr = stderr |> optionm'.some' |> -00:04:39 verbose #4007 > threading.new_arc_mutex -00:04:39 verbose #4008 > inl stdin = stdin |> optionm'.some' |> -00:04:39 verbose #4009 > threading.new_arc_mutex -00:04:39 verbose #4010 > -00:04:39 verbose #4011 > inl channel_sender, channel_receiver : sender -00:04:39 verbose #4012 > sm'.std_string * threading.arc (receiver sm'.std_string) = -00:04:39 verbose #4013 > !\($'"{ let (sender, receiver) = -00:04:39 verbose #4014 > std::sync::mpsc::channel(); (sender, std::sync::Arc::new(receiver)) }"') -00:04:39 verbose #4015 > inl channel_receiver = join channel_receiver -00:04:39 verbose #4016 > (!\\(channel_receiver, $'"true; let -00:04:39 verbose #4017 > !channel_receiver = !channel_receiver"') : bool) |> ignore -00:04:39 verbose #4018 > -00:04:39 verbose #4019 > inl channel_sender = channel_sender |> -00:04:39 verbose #4020 > threading.new_arc_mutex -00:04:39 verbose #4021 > inl channel_sender' = channel_sender |> rust.clone -00:04:39 verbose #4022 > inl channel_sender'' = channel_sender |> rust.clone -00:04:39 verbose #4023 > inl channel_receiver' = channel_receiver |> -00:04:39 verbose #4024 > threading.new_arc_mutex -00:04:39 verbose #4025 > -00:04:39 verbose #4026 > -00:04:39 verbose #4027 > inl stdout_thread : threading.join_handle () = -00:04:39 verbose #4028 > !\($'"std::thread::spawn(move || { //"') -00:04:39 verbose #4029 > inl stdout' : child_stdout = -00:04:39 verbose #4030 > !\($'"!stdout.lock().unwrap().take().unwrap()"') -00:04:39 verbose #4031 > inl stdout_lines = -00:04:39 verbose #4032 > stdout' -00:04:39 verbose #4033 > |> stream.decode_reader_bytes_build -00:04:39 verbose #4034 > |> stream.new_buf_reader -00:04:39 verbose #4035 > |> threading.new_arc_mutex -00:04:39 verbose #4036 > inl stdio_line' = stdio_line true options.trace -00:04:39 verbose #4037 > channel_sender' -00:04:39 verbose #4038 > (!\\((stdout_lines, stdio_line'), $'"true; for line -00:04:39 verbose #4039 > in std::io::BufRead::lines(std::io::Read::by_ref(&mut -00:04:39 verbose #4040 > *$0.lock().unwrap())).collect::<Vec<_>>() { $1(line) }"') : bool) |> ignore -00:04:39 verbose #4041 > (!\($'"true; })"') : bool) |> ignore -00:04:39 verbose #4042 > -00:04:39 verbose #4043 > inl stderr_thread : threading.join_handle () = -00:04:39 verbose #4044 > !\($'"std::thread::spawn(move || { //"') -00:04:39 verbose #4045 > inl stderr' : child_stderr = -00:04:39 verbose #4046 > !\($'"!stderr.lock().unwrap().take().unwrap()"') -00:04:39 verbose #4047 > inl stderr_lines = -00:04:39 verbose #4048 > stderr' -00:04:39 verbose #4049 > |> stream.decode_reader_bytes_build -00:04:39 verbose #4050 > |> stream.new_buf_reader -00:04:39 verbose #4051 > |> threading.new_arc_mutex -00:04:39 verbose #4052 > inl stdio_line' = stdio_line false options.trace -00:04:39 verbose #4053 > channel_sender -00:04:39 verbose #4054 > (!\\((stderr_lines, stdio_line'), $'"true; for line -00:04:39 verbose #4055 > in std::io::BufRead::lines(std::io::Read::by_ref(&mut -00:04:39 verbose #4056 > *$0.lock().unwrap())).collect::<Vec<_>>() { $1(line) }"') : bool) |> ignore -00:04:39 verbose #4057 > (!\($'"true; })"') : bool) |> ignore -00:04:39 verbose #4058 > -00:04:39 verbose #4059 > match options.stdin |> optionm'.unbox with -00:04:39 verbose #4060 > | Some stdin' => -00:04:39 verbose #4061 > inl stdin : optionm'.option' child_stdin = -00:04:39 verbose #4062 > !\($'"!stdin.lock().unwrap().take()"') -00:04:39 verbose #4063 > stdin -00:04:39 verbose #4064 > |> optionm'.map' threading.new_arc_mutex -00:04:39 verbose #4065 > |> optionm'.unbox -00:04:39 verbose #4066 > |> function -00:04:39 verbose #4067 > | Some stdin => -00:04:39 verbose #4068 > stdin |> stdin' -00:04:39 verbose #4069 > stdin -00:04:39 verbose #4070 > |> threading.arc_mutex_lock -00:04:39 verbose #4071 > |> resultm.unwrap' -00:04:39 verbose #4072 > |> stdin_flush -00:04:39 verbose #4073 > | None => () -00:04:39 verbose #4074 > | None => () -00:04:39 verbose #4075 > -00:04:39 verbose #4076 > inl output : resultm.result' output stream.io_error -00:04:39 verbose #4077 > = -00:04:39 verbose #4078 > !\\(child, -00:04:39 verbose #4079 > $'"$0.lock().unwrap().take().unwrap().wait_with_output()"') -00:04:39 verbose #4080 > inl output = output |> resultm.map_error' -00:04:39 verbose #4081 > sm'.format' -00:04:39 verbose #4082 > -00:04:39 verbose #4083 > (!\($'"true; !stdout_thread.join().unwrap()"') : -00:04:39 verbose #4084 > bool) |> ignore -00:04:39 verbose #4085 > (!\($'"true; !stderr_thread.join().unwrap()"') : -00:04:39 verbose #4086 > bool) |> ignore -00:04:39 verbose #4087 > -00:04:39 verbose #4088 > match output |> resultm.unbox with -00:04:39 verbose #4089 > | Ok output => -00:04:39 verbose #4090 > inl exit_code : i32 = !\\(output, -00:04:39 verbose #4091 > $'"$0.status.code().unwrap()"') -00:04:39 verbose #4092 > exit_code, None, Some channel_receiver' -00:04:39 verbose #4093 > | Error error => -00:04:39 verbose #4094 > trace Critical -00:04:39 verbose #4095 > fun () => $'$"runtime.execute_with_options -00:04:39 verbose #4096 > output error"' -00:04:39 verbose #4097 > fun () => $'$"error: {!error} / {!_locals -00:04:39 verbose #4098 > ()}"' -00:04:39 verbose #4099 > -2i32, error |> Some, None -00:04:39 verbose #4100 > | Error error => -00:04:39 verbose #4101 > trace Critical -00:04:39 verbose #4102 > fun () => $'$"runtime.execute_with_options -00:04:39 verbose #4103 > child error"' -00:04:39 verbose #4104 > fun () => $'$"error: {!error} / {!_locals ()}"' -00:04:39 verbose #4105 > -1i32, error |> Some, None -00:04:39 verbose #4106 > |> function -00:04:39 verbose #4107 > | exit_code, std_trace, channel_receiver => -00:04:39 verbose #4108 > inl std_trace = -00:04:39 verbose #4109 > channel_receiver -00:04:39 verbose #4110 > |> optionm.map fun channel_receiver => -00:04:39 verbose #4111 > !\\(channel_receiver, -00:04:39 verbose #4112 > $'"$0.lock().unwrap().iter().collect::<Vec<String>>().join(\\"\\\\n\\")"') -00:04:39 verbose #4113 > |> optionm.map sm'.from_std_string -00:04:39 verbose #4114 > |> optionm'.default_value ( -00:04:39 verbose #4115 > std_trace -00:04:39 verbose #4116 > |> optionm.map sm'.from_std_string -00:04:39 verbose #4117 > |> optionm'.default_value "" -00:04:39 verbose #4118 > ) -00:04:39 verbose #4119 > trace Verbose -00:04:39 verbose #4120 > fun () => $'$"runtime.execute_with_options -00:04:39 verbose #4121 > result"' -00:04:39 verbose #4122 > fun () => $'$"exit_code: {!exit_code} -00:04:39 verbose #4123 > std_trace.Length: {!std_trace.Length} / {!_locals ()}"' -00:04:39 verbose #4124 > new_pair exit_code std_trace -00:04:39 verbose #4125 > |> capture -00:04:39 verbose #4126 > |> async.future_init (3, 2) 1 -00:04:39 verbose #4127 > |> async.block_on -00:04:39 verbose #4128 > |> from_pair -00:04:39 verbose #4129 > | _ => fun () => null () -00:04:39 verbose #4130 > -00:04:39 verbose #4131 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4132 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4133 > │ ### execute │ -00:04:39 verbose #4134 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4135 > -00:04:39 verbose #4136 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4137 > inl execute command = -00:04:39 verbose #4138 > execution_options fun x => { x with -00:04:39 verbose #4139 > command = command -00:04:39 verbose #4140 > } -00:04:39 verbose #4141 > |> execute_with_options -00:04:39 verbose #4142 > -00:04:39 verbose #4143 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4144 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4145 > │ ### test 1 │ -00:04:39 verbose #4146 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4147 > -00:04:39 verbose #4148 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4149 > //// test -00:04:39 verbose #4150 > ///! rust -d chrono encoding encoding_rs encoding_rs_io futures-lite regex -00:04:39 verbose #4151 > -00:04:39 verbose #4152 > types () -00:04:39 verbose #4153 > inl temp_folder, disposable = file_system.create_temp_directory () -00:04:39 verbose #4154 > inl content = "╭─[[ 你好,世界!こんにちは世界! ]]─╮" -00:04:39 verbose #4155 > // inl content = "test" -00:04:39 verbose #4156 > fun () => -00:04:39 verbose #4157 > inl file_name = join "test.txt" -00:04:39 verbose #4158 > inl path = temp_folder </> file_name |> file_system.normalize_path -00:04:39 verbose #4159 > inl exit_code, result = -00:04:39 verbose #4160 > execute $'\@$"pwsh -c ""[[IO.File]]::ReadAllText(\'{!path}\')"""' -00:04:39 verbose #4161 > exit_code |> _assert_eq 1 -00:04:39 verbose #4162 > result |> _assert_string_contains "not find file" -00:04:39 verbose #4163 > -00:04:39 verbose #4164 > content |> file_system.write_all_text path -00:04:39 verbose #4165 > -00:04:39 verbose #4166 > execution_options fun x => { x with -00:04:39 verbose #4167 > command = $'\@$"cat ""{!file_name}"""' -00:04:39 verbose #4168 > working_directory = Some temp_folder |> optionm'.box -00:04:39 verbose #4169 > } -00:04:39 verbose #4170 > |> execute_with_options -00:04:39 verbose #4171 > |> ignore -00:04:39 verbose #4172 > -00:04:39 verbose #4173 > execution_options fun x => { x with -00:04:39 verbose #4174 > command = $'\@$"pwsh -c ""[[System.Console]]::OutputEncoding = -00:04:39 verbose #4175 > [[System.Text.Encoding]]::UTF8; [[IO.File]]::ReadAllText(\'{!file_name}\')"""' -00:04:39 verbose #4176 > working_directory = Some temp_folder |> optionm'.box -00:04:39 verbose #4177 > } -00:04:39 verbose #4178 > |> execute_with_options -00:04:39 verbose #4179 > |> fun fn => fn () |> Some -00:04:39 verbose #4180 > |> function -00:04:39 verbose #4181 > | Some (exit_code, output) => -00:04:39 verbose #4182 > exit_code |> _assert_eq 0i32 -00:04:39 verbose #4183 > output |> _assert_eq content -00:04:39 verbose #4184 > true -00:04:39 verbose #4185 > | _ => false -00:04:39 verbose #4186 > |> _assert_eq true -00:04:39 verbose #4187 > disposable |> use |> ignore -00:04:39 verbose #4188 > -00:04:39 verbose #4189 > ╭─[ 25.71s - return value ]────────────────────────────────────────────────────╮ -00:04:39 verbose #4190 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │ -00:04:39 verbose #4191 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_46d5d480534ae4e515d6e9f047 │ -00:04:39 verbose #4192 > │ 03b56b70538be116c38bb53bcb89e9ca31c9fb\20240515-1133-0954-2117-00000035d78d │ -00:04:39 verbose #4193 > │ 00:00:00 debug #2 runtime.execute_with_options / file_name: pwsh / │ -00:04:39 verbose #4194 > │ arguments: ["-c", "[ │ -00:04:39 verbose #4195 > │ IO.File]::ReadAllText('c:/Users/i574n/AppData/Local/Temp/!spiral_builder_46d │ -00:04:39 verbose #4196 > │ 5d480534ae4e515d6e9f04703b56b70538be116c38bb53bcb89e9ca31c9fb/20240515-1133- │ -00:04:39 verbose #4197 > │ 0954-2117-00000035d78d/test.txt')"] / options: (None, "pwsh -c "[ │ -00:04:39 verbose #4198 > │ IO.File]::ReadAllText('c:/Users/i574n/AppData/Local/Temp/!spiral_builder_46d │ -00:04:39 verbose #4199 > │ 5d480534ae4e515d6e9f04703b56b70538be116c38bb53bcb89e9ca31c9fb/20240515-1133- │ -00:04:39 verbose #4200 > │ 0954-2117-00000035d78d/test.txt')"", Array(MutCell([])), None, None, true, │ -00:04:39 verbose #4201 > │ None) │ -00:04:39 verbose #4202 > │ 00:00:00 verbose #3 \e[4;7mMethodInvocationException: [ │ -00:04:39 verbose #4203 > │ 31;1mException calling "ReadAllText" with "1" argument(s): "Could not find │ -00:04:39 verbose #4204 > │ file │ -00:04:39 verbose #4205 > │ 'c:\Users\i574n\AppData\Local\Temp\!spiral_builder_46d5d480534ae4e515d6e9f04 │ -00:04:39 verbose #4206 > │ 703b56b70538be116c38bb53bcb89e9ca31c9fb\20240515-1133-0954-2117-00000035d78d │ -00:04:39 verbose #4207 > │ \test.txt'."\e[0m │ -00:04:39 verbose #4208 > │ 00:00:00 verbose #4 runtime.execute_with_options / result / exit_code: │ -00:04:39 verbose #4209 > │ 1 / std_trace.Length: 284 │ -00:04:39 verbose #4210 > │ assert_eq / actual: 1 / expected: 1 │ -00:04:39 verbose #4211 > │ assert_string_contains / actual: "not find file" / expected: "[ │ -00:04:39 verbose #4212 > │ 31;1mMethodInvocationException: Exception calling "ReadAllText" with │ -00:04:39 verbose #4213 > │ "1" argument(s): "Could not find file │ -00:04:39 verbose #4214 > │ 'c:\Users\i574n\AppData\Local\Temp\!spiral_builder_46d5d480534ae4e515d6e9f04 │ -00:04:39 verbose #4215 > │ 703b56b70... │ -00:04:39 verbose #4216 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4217 > -00:04:39 verbose #4218 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4219 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4220 > │ ## command │ -00:04:39 verbose #4221 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4222 > -00:04:39 verbose #4223 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4224 > nominal command = $'clap_Command' -00:04:39 verbose #4225 > -00:04:39 verbose #4226 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4227 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4228 > │ ## new_command │ -00:04:39 verbose #4229 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4230 > -00:04:39 verbose #4231 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4232 > inl new_command (s : rust.static_ref' sm'.str) : command = -00:04:39 verbose #4233 > !\\(s, $'"clap::Command::new($0)"') -00:04:39 verbose #4234 > -00:04:39 verbose #4235 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4236 > //// test -00:04:39 verbose #4237 > ///! rust -d clap -00:04:39 verbose #4238 > -00:04:39 verbose #4239 > types () -00:04:39 verbose #4240 > ##"command" -00:04:39 verbose #4241 > |> new_command -00:04:39 verbose #4242 > |> sm'.format_pretty' -00:04:39 verbose #4243 > |> sm'.from_std_string -00:04:39 verbose #4244 > |> _assert_string_contains "command" -00:04:39 verbose #4245 > -00:04:39 verbose #4246 > ╭─[ 18.30s - return value ]────────────────────────────────────────────────────╮ -00:04:39 verbose #4247 > │ assert_string_contains / actual: "command" / expected: "Command { │ -00:04:39 verbose #4248 > │ name: "command", │ -00:04:39 verbose #4249 > │ long_flag: None, │ -00:04:39 verbose #4250 > │ short_flag: None, │ -00:04:39 verbose #4251 > │ display_name: None, │ -00:04:39 verbose #4252 > │ bin_name: None, │ -00:04:39 verbose #4253 > │ author: None, │ -00:04:39 verbose #4254 > │ version: None, │ -00:04:39 verbose #4255 > │ long_version: None, │ -00:04:39 verbose #4256 > │ about: None, │ -00:04:39 verbose #4257 > │ long_about: None, │ -00:04:39 verbose #4258 > │ before_help: None, │ -00:04:39 verbose #4259 > │ before_long_help: None, │ -00:04:39 verbose #4260 > │ after_help: None, │ -00:04:39 verbose #4261 > │ after_long_help: None, │ -00:04:39 verbose #4262 > │ aliases: [], │ -00:04:39 verbose #4263 > │ short_flag_aliases: [], │ -00:04:39 verbose #4264 > │ long_flag_aliases: [], │ -00:04:39 verbose #4265 > │ usage_str: None, │ -00:04:39 verbose #4266 > │ usage_name: None, │ -00:04:39 verbose #4267 > │ help_str: None, │ -00:04:39 verbose #4268 > │ disp_ord: None, │ -00:04:39 verbose #4269 > │ template: None, │ -00:04:39 verbose #4270 > │ settings: AppFlags( │ -00:04:39 verbose #4271 > │ 0, │ -00:04:39 verbose #4272 > │ ), │ -00:04:39 verbose #4273 > │ g_settings: AppFlags( │ -00:04:39 verbose #4274 > │ 0, │ -00:04:39 verbose #4275 > │ ), │ -00:04:39 verbose #4276 > │ args: MKeyMap { │ -00:04:39 verbose #4277 > │ args: [], │ -00:04:39 verbose #4278 > │ keys: [], │ -00:04:39 verbose #4279 > │ }, │ -00:04:39 verbose #4280 > │ subcommands: [], │ -00:04:39 verbose #4281 > │ groups: [], │ -00:04:39 verbose #4282 > │ current_help_heading: None, │ -00:04:39 verbose #4283 > │ current_disp_ord: Some( │ -00:04:39 verbose #4284 > │ 0, │ -00:04:39 verbose #4285 > │ ), │ -00:04:39 verbose #4286 > │ subcommand_value_name: None, │ -00:04:39 verbose #4287 > │ subcommand_heading: None, │ -00:04:39 verbose #4288 > │ external_value_parser: None, │ -00:04:39 verbose #4289 > │ long_help_exists: false, │ -00:04:39 verbose #4290 > │ deferred: None, │ -00:04:39 verbose #4291 > │ app_ext: Extensions { │ -00:04:39 verbose #4292 > │ extensions: FlatMap { │ -00:04:39 verbose #4293 > │ keys: [], │ -00:04:39 verbose #4294 > │ values: [], │ -00:04:39 verbose #4295 > │ }, │ -00:04:39 verbose #4296 > │ }, │ -00:04:39 verbose #4297 > │ }" │ -00:04:39 verbose #4298 > │ │ -00:04:39 verbose #4299 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4300 > -00:04:39 verbose #4301 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4302 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4303 > │ ## arg │ -00:04:39 verbose #4304 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4305 > -00:04:39 verbose #4306 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4307 > nominal arg = $'clap_Arg' -00:04:39 verbose #4308 > -00:04:39 verbose #4309 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4310 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4311 > │ ## new_arg │ -00:04:39 verbose #4312 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4313 > -00:04:39 verbose #4314 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4315 > inl new_arg (s : rust.static_ref' sm'.str) : arg = -00:04:39 verbose #4316 > !\\(s, $'"clap::Arg::new($0)"') -00:04:39 verbose #4317 > -00:04:39 verbose #4318 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4319 > //// test -00:04:39 verbose #4320 > ///! rust -d clap -00:04:39 verbose #4321 > -00:04:39 verbose #4322 > types () -00:04:39 verbose #4323 > ##"arg" -00:04:39 verbose #4324 > |> new_arg -00:04:39 verbose #4325 > |> sm'.format_pretty' -00:04:39 verbose #4326 > |> sm'.from_std_string -00:04:39 verbose #4327 > |> _assert_string_contains "arg" -00:04:39 verbose #4328 > -00:04:39 verbose #4329 > ╭─[ 18.24s - return value ]────────────────────────────────────────────────────╮ -00:04:39 verbose #4330 > │ assert_string_contains / actual: "arg" / expected: "Arg { │ -00:04:39 verbose #4331 > │ id: "arg", │ -00:04:39 verbose #4332 > │ help: None, │ -00:04:39 verbose #4333 > │ long_help: None, │ -00:04:39 verbose #4334 > │ action: None, │ -00:04:39 verbose #4335 > │ value_parser: None, │ -00:04:39 verbose #4336 > │ blacklist: [], │ -00:04:39 verbose #4337 > │ settings: ArgFlags( │ -00:04:39 verbose #4338 > │ 0, │ -00:04:39 verbose #4339 > │ ), │ -00:04:39 verbose #4340 > │ overrides: [], │ -00:04:39 verbose #4341 > │ groups: [], │ -00:04:39 verbose #4342 > │ requires: [], │ -00:04:39 verbose #4343 > │ r_ifs: [], │ -00:04:39 verbose #4344 > │ r_unless: [], │ -00:04:39 verbose #4345 > │ short: None, │ -00:04:39 verbose #4346 > │ long: None, │ -00:04:39 verbose #4347 > │ aliases: [], │ -00:04:39 verbose #4348 > │ short_aliases: [], │ -00:04:39 verbose #4349 > │ disp_ord: None, │ -00:04:39 verbose #4350 > │ val_names: [], │ -00:04:39 verbose #4351 > │ num_vals: None, │ -00:04:39 verbose #4352 > │ val_delim: None, │ -00:04:39 verbose #4353 > │ default_vals: [], │ -00:04:39 verbose #4354 > │ default_vals_ifs: [], │ -00:04:39 verbose #4355 > │ terminator: None, │ -00:04:39 verbose #4356 > │ index: None, │ -00:04:39 verbose #4357 > │ help_heading: None, │ -00:04:39 verbose #4358 > │ value_hint: None, │ -00:04:39 verbose #4359 > │ default_missing_vals: [], │ -00:04:39 verbose #4360 > │ }" │ -00:04:39 verbose #4361 > │ │ -00:04:39 verbose #4362 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4363 > -00:04:39 verbose #4364 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4365 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4366 > │ ## command_arg │ -00:04:39 verbose #4367 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4368 > -00:04:39 verbose #4369 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4370 > inl command_arg (arg : arg) (command : command) : command = -00:04:39 verbose #4371 > !\\((command, arg), $'"clap::Command::arg($0, $1)"') -00:04:39 verbose #4372 > -00:04:39 verbose #4373 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4374 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4375 > │ ## arg_required │ -00:04:39 verbose #4376 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4377 > -00:04:39 verbose #4378 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4379 > inl arg_required (value : bool) (arg : arg) : arg = -00:04:39 verbose #4380 > !\\((arg, value), $'"$0.required($1)"') -00:04:39 verbose #4381 > -00:04:39 verbose #4382 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4383 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4384 > │ ## arg_short │ -00:04:39 verbose #4385 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4386 > -00:04:39 verbose #4387 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4388 > inl arg_short (value : char) (arg : arg) : arg = -00:04:39 verbose #4389 > !\\((arg, value), $'"$0.short($1)"') -00:04:39 verbose #4390 > -00:04:39 verbose #4391 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4392 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4393 > │ ## arg_long │ -00:04:39 verbose #4394 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4395 > -00:04:39 verbose #4396 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4397 > inl arg_long (value : rust.static_ref' sm'.str) (arg : arg) : arg = -00:04:39 verbose #4398 > !\\((arg, value), $'"$0.long($1)"') -00:04:39 verbose #4399 > -00:04:39 verbose #4400 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4401 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4402 > │ ## arg_value_names │ -00:04:39 verbose #4403 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4404 > -00:04:39 verbose #4405 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4406 > inl arg_value_names (values : array_base (rust.static_ref' sm'.str)) (arg : arg) -00:04:39 verbose #4407 > : arg = -00:04:39 verbose #4408 > inl values = values |> am'.to_vec -00:04:39 verbose #4409 > !\\((arg, values), $'"$0.value_names($1)"') -00:04:39 verbose #4410 > -00:04:39 verbose #4411 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4412 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4413 > │ ## arg_num_args │ -00:04:39 verbose #4414 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4415 > -00:04:39 verbose #4416 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4417 > inl arg_num_args (value : i32) (arg : arg) : arg = -00:04:39 verbose #4418 > !\\((arg, value), $'"$0.num_args($1)"') -00:04:39 verbose #4419 > -00:04:39 verbose #4420 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4421 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4422 > │ ## value_range │ -00:04:39 verbose #4423 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4424 > -00:04:39 verbose #4425 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4426 > nominal value_range = $'clap_builder_ValueRange' -00:04:39 verbose #4427 > -00:04:39 verbose #4428 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4429 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4430 > │ ## new_value_range │ -00:04:39 verbose #4431 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4432 > -00:04:39 verbose #4433 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4434 > inl new_value_range start end : value_range = -00:04:39 verbose #4435 > inl len = 0i32 |> unativeint -00:04:39 verbose #4436 > inl start, end = -00:04:39 verbose #4437 > open am' -00:04:39 verbose #4438 > match start, end with -00:04:39 verbose #4439 > | Start start, End fn => -00:04:39 verbose #4440 > start, len |> fn -00:04:39 verbose #4441 > | End start_fn, End end_fn => -00:04:39 verbose #4442 > start_fn len, end_fn len -00:04:39 verbose #4443 > match start, end with -00:04:39 verbose #4444 > | start, end when end =. len => -00:04:39 verbose #4445 > !\($'"clap::builder::ValueRange::new(!start..)"') -00:04:39 verbose #4446 > | start, end => !\($'"clap::builder::ValueRange::new(!start..!end)"') -00:04:39 verbose #4447 > -00:04:39 verbose #4448 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4449 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4450 > │ ## arg_num_args_range │ -00:04:39 verbose #4451 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4452 > -00:04:39 verbose #4453 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4454 > inl arg_num_args_range (value : value_range) (arg : arg) : arg = -00:04:39 verbose #4455 > !\\((arg, value), $'"$0.num_args($1)"') -00:04:39 verbose #4456 > -00:04:39 verbose #4457 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4458 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4459 > │ ## arg_value_name │ -00:04:39 verbose #4460 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4461 > -00:04:39 verbose #4462 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4463 > inl arg_value_name (value : string) (arg : arg) : arg = -00:04:39 verbose #4464 > inl value = value |> sm'.as_str -00:04:39 verbose #4465 > !\\((arg, value), $'"$0.value_name($1)"') -00:04:39 verbose #4466 > -00:04:39 verbose #4467 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4468 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4469 > │ ## value_parser │ -00:04:39 verbose #4470 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4471 > -00:04:39 verbose #4472 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4473 > nominal value_parser = $'clap_builder_ValueParser' -00:04:39 verbose #4474 > -00:04:39 verbose #4475 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4476 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4477 > │ ## possible_value │ -00:04:39 verbose #4478 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4479 > -00:04:39 verbose #4480 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4481 > nominal possible_value = $'clap_builder_PossibleValue' -00:04:39 verbose #4482 > -00:04:39 verbose #4483 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4484 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4485 > │ ## new_possible_value │ -00:04:39 verbose #4486 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4487 > -00:04:39 verbose #4488 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4489 > inl new_possible_value forall t. (x : t) : possible_value = -00:04:39 verbose #4490 > !\\(x, $'"clap::builder::PossibleValue::new(&**$0)"') -00:04:39 verbose #4491 > -00:04:39 verbose #4492 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4493 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4494 > │ ## value_parser_possible_values │ -00:04:39 verbose #4495 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4496 > -00:04:39 verbose #4497 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4498 > inl value_parser_possible_values (values : array_base string) : value_parser = -00:04:39 verbose #4499 > inl values = -00:04:39 verbose #4500 > values -00:04:39 verbose #4501 > |> am'.to_vec -00:04:39 verbose #4502 > |> am'.vec_map (sm'.to_std_string >> rust.new_box >> rust.box_leak >> -00:04:39 verbose #4503 > new_possible_value) -00:04:39 verbose #4504 > !\\(values, $'"clap::builder::PossibleValuesParser::new($0).into()"') -00:04:39 verbose #4505 > -00:04:39 verbose #4506 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4507 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4508 > │ ## value_parser_path_buf │ -00:04:39 verbose #4509 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4510 > -00:04:39 verbose #4511 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4512 > inl value_parser_path_buf () : value_parser = -00:04:39 verbose #4513 > !\($'"clap::value_parser\!(std::path::PathBuf)"') -00:04:39 verbose #4514 > -00:04:39 verbose #4515 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4516 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4517 > │ ## value_parser_expr │ -00:04:39 verbose #4518 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4519 > -00:04:39 verbose #4520 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4521 > inl value_parser_expr (expr : string) : value_parser = -00:04:39 verbose #4522 > !\($'"clap::value_parser\!(" + !expr + ").into()"') -00:04:39 verbose #4523 > -00:04:39 verbose #4524 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4525 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4526 > │ ## arg_value_parser │ -00:04:39 verbose #4527 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4528 > -00:04:39 verbose #4529 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4530 > inl arg_value_parser (values : value_parser) (arg : arg) : arg = -00:04:39 verbose #4531 > !\\((arg, values), $'"$0.value_parser($1)"') -00:04:39 verbose #4532 > -00:04:39 verbose #4533 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4534 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4535 > │ ## arg_union │ -00:04:39 verbose #4536 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4537 > -00:04:39 verbose #4538 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4539 > inl arg_union forall union_type {to_string}. (fn : union_type -> ()) (arg : arg) -00:04:39 verbose #4540 > : arg = -00:04:39 verbose #4541 > arg -00:04:39 verbose #4542 > |> arg_value_parser ( -00:04:39 verbose #4543 > real get_union_fields_untag `union_type () -00:04:39 verbose #4544 > |> fun x => x : list union_type -00:04:39 verbose #4545 > |> listm.map to_string -00:04:39 verbose #4546 > |> listm'.box -00:04:39 verbose #4547 > |> listm'.to_array' -00:04:39 verbose #4548 > |> fun (a x : _ i32 _) => x -00:04:39 verbose #4549 > |> value_parser_possible_values -00:04:39 verbose #4550 > ) -00:04:39 verbose #4551 > -00:04:39 verbose #4552 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4553 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4554 > │ ## arg_action │ -00:04:39 verbose #4555 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4556 > -00:04:39 verbose #4557 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4558 > nominal arg_action' = $'clap_ArgAction' -00:04:39 verbose #4559 > -00:04:39 verbose #4560 > union arg_action = -00:04:39 verbose #4561 > | Set -00:04:39 verbose #4562 > | Append -00:04:39 verbose #4563 > | SetTrue -00:04:39 verbose #4564 > | SetFalse -00:04:39 verbose #4565 > | Count -00:04:39 verbose #4566 > | Help -00:04:39 verbose #4567 > | HelpShort -00:04:39 verbose #4568 > | HelpLong -00:04:39 verbose #4569 > | Version -00:04:39 verbose #4570 > -00:04:39 verbose #4571 > inl arg_action = function -00:04:39 verbose #4572 > | Set => !\($'"clap::ArgAction::Set"') : arg_action' -00:04:39 verbose #4573 > | Append => !\($'"clap::ArgAction::Append"') : arg_action' -00:04:39 verbose #4574 > | SetTrue => !\($'"clap::ArgAction::SetTrue"') : arg_action' -00:04:39 verbose #4575 > | SetFalse => !\($'"clap::ArgAction::SetFalse"') : arg_action' -00:04:39 verbose #4576 > | Count => !\($'"clap::ArgAction::Count"') : arg_action' -00:04:39 verbose #4577 > | Help => !\($'"clap::ArgAction::Help"') : arg_action' -00:04:39 verbose #4578 > | HelpShort => !\($'"clap::ArgAction::HelpShort"') : arg_action' -00:04:39 verbose #4579 > | HelpLong => !\($'"clap::ArgAction::HelpLong"') : arg_action' -00:04:39 verbose #4580 > | Version => !\($'"clap::ArgAction::Version"') : arg_action' -00:04:39 verbose #4581 > -00:04:39 verbose #4582 > inl arg_action (value : arg_action) (arg : arg) : arg = -00:04:39 verbose #4583 > inl value = value |> arg_action -00:04:39 verbose #4584 > !\\((arg, value), $'"$0.action($1)"') -00:04:39 verbose #4585 > -00:04:39 verbose #4586 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4587 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4588 > │ ## arg_index │ -00:04:39 verbose #4589 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4590 > -00:04:39 verbose #4591 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4592 > inl arg_index (value : i32) (arg : arg) : arg = -00:04:39 verbose #4593 > !\\((arg, value), $'"$0.index($1)"') -00:04:39 verbose #4594 > -00:04:39 verbose #4595 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4596 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4597 > │ ## arg_matches │ -00:04:39 verbose #4598 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4599 > -00:04:39 verbose #4600 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4601 > nominal arg_matches = $'clap_ArgMatches' -00:04:39 verbose #4602 > -00:04:39 verbose #4603 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4604 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4605 > │ ## command_get_matches │ -00:04:39 verbose #4606 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4607 > -00:04:39 verbose #4608 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4609 > inl command_get_matches (command : command) : arg_matches = -00:04:39 verbose #4610 > !\\(command, $'"clap::Command::get_matches($0)"') -00:04:39 verbose #4611 > -00:04:39 verbose #4612 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4613 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4614 > │ ## command_get_matches_from │ -00:04:39 verbose #4615 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4616 > -00:04:39 verbose #4617 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4618 > inl command_get_matches_from (args : array_base string) (command : command) : -00:04:39 verbose #4619 > arg_matches = -00:04:39 verbose #4620 > inl args = args |> am'.to_vec |> am'.vec_map sm'.to_std_string -00:04:39 verbose #4621 > !\\(command, $'"clap::Command::get_matches_from($0, !args)"') -00:04:39 verbose #4622 > -00:04:39 verbose #4623 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4624 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4625 > │ ## command_init_arg │ -00:04:39 verbose #4626 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4627 > -00:04:39 verbose #4628 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4629 > inl command_init_arg (long, short) fn command = -00:04:39 verbose #4630 > command -00:04:39 verbose #4631 > |> command_arg ( -00:04:39 verbose #4632 > new_arg ##long -00:04:39 verbose #4633 > |> arg_short short -00:04:39 verbose #4634 > |> arg_long ##long -00:04:39 verbose #4635 > |> fn -00:04:39 verbose #4636 > ) -00:04:39 verbose #4637 > -00:04:39 verbose #4638 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4639 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4640 > │ ## matches_get_one │ -00:04:39 verbose #4641 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4642 > -00:04:39 verbose #4643 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4644 > inl matches_get_one forall t. (x : string) (matches : arg_matches) : -00:04:39 verbose #4645 > optionm'.option' t = -00:04:39 verbose #4646 > inl x = join x -00:04:39 verbose #4647 > inl x = x |> sm'.as_str -00:04:39 verbose #4648 > !\\(matches, $'"clap::ArgMatches::get_one(&$0, !x).cloned()"') -00:04:39 verbose #4649 > -00:04:39 verbose #4650 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4651 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4652 > │ ## matches_get_flag │ -00:04:39 verbose #4653 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4654 > -00:04:39 verbose #4655 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4656 > inl matches_get_flag (x : string) (matches : arg_matches) : bool = -00:04:39 verbose #4657 > inl x = join x -00:04:39 verbose #4658 > inl x = x |> sm'.as_str -00:04:39 verbose #4659 > !\($'"clap::ArgMatches::get_flag(&!matches, !x)"') -00:04:39 verbose #4660 > -00:04:39 verbose #4661 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4662 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4663 > │ ## matches_get_many │ -00:04:39 verbose #4664 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4665 > -00:04:39 verbose #4666 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4667 > inl matches_get_many forall t. (x : string) (matches : arg_matches) : -00:04:39 verbose #4668 > optionm'.option' (am'.vec t) = -00:04:39 verbose #4669 > inl x = join x -00:04:39 verbose #4670 > inl x = x |> sm'.as_str -00:04:39 verbose #4671 > !\\(matches, $'"clap::ArgMatches::get_many(&$0, !x).map(|x| -00:04:39 verbose #4672 > x.cloned().into_iter().collect())"') -00:04:39 verbose #4673 > -00:04:39 verbose #4674 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4675 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4676 > │ ## matches_get_occurrences │ -00:04:39 verbose #4677 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4678 > -00:04:39 verbose #4679 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4680 > inl matches_get_occurrences (x : string) (matches : arg_matches) : -00:04:39 verbose #4681 > optionm'.option' (array_base sm'.std_string) = -00:04:39 verbose #4682 > inl x = join x -00:04:39 verbose #4683 > inl x = x |> sm'.as_str -00:04:39 verbose #4684 > !\($'"clap::ArgMatches::get_occurrences(&!matches, !x).cloned()"') -00:04:39 verbose #4685 > -00:04:39 verbose #4686 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4687 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4688 > │ ## matches_subcommand │ -00:04:39 verbose #4689 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4690 > -00:04:39 verbose #4691 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4692 > inl matches_subcommand (matches : arg_matches) : optionm'.option' -00:04:39 verbose #4693 > (sm'.std_string * arg_matches) = -00:04:39 verbose #4694 > !\\((matches, sm'.ref_to_std_string), -00:04:39 verbose #4695 > $'"clap::ArgMatches::subcommand(Box::leak(Box::new($0))).map(|(a, b)| ($1(a), -00:04:39 verbose #4696 > b.clone()))"') -00:04:39 verbose #4697 > -00:04:39 verbose #4698 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4699 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4700 > │ ## matches_values_of │ -00:04:39 verbose #4701 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4702 > -00:04:39 verbose #4703 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4704 > inl matches_values_of (x : string) (matches : arg_matches) : array_base -00:04:39 verbose #4705 > sm'.std_string = -00:04:39 verbose #4706 > !\\((matches, x), $'"clap::ArgMatches::values_of($0, &*$1)"') -00:04:39 verbose #4707 > -00:04:39 verbose #4708 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4709 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4710 > │ ## command_debug_assert │ -00:04:39 verbose #4711 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4712 > -00:04:39 verbose #4713 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4714 > inl command_debug_assert (command : command) : () = -00:04:39 verbose #4715 > !\\(command, $'"clap::Command::debug_assert($0)"') -00:04:39 verbose #4716 > -00:04:39 verbose #4717 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4718 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4719 > │ ## command_subcommand_required │ -00:04:39 verbose #4720 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4721 > -00:04:39 verbose #4722 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4723 > inl command_subcommand_required (value : bool) (command : command) : command = -00:04:39 verbose #4724 > !\\(command, $'"clap::Command::subcommand_required($0, !value)"') -00:04:39 verbose #4725 > -00:04:39 verbose #4726 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4727 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4728 > │ ## command_subcommand │ -00:04:39 verbose #4729 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4730 > -00:04:39 verbose #4731 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4732 > inl command_subcommand (subcommand : command) (command : command) : command = -00:04:39 verbose #4733 > !\\(command, $'"clap::Command::subcommand($0, !subcommand)"') -00:04:39 verbose #4734 > -00:04:39 verbose #4735 > ── markdown ──────────────────────────────────────────────────────────────────── -00:04:39 verbose #4736 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:04:39 verbose #4737 > │ ## main │ -00:04:39 verbose #4738 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:04:39 verbose #4739 > -00:04:39 verbose #4740 > ── spiral ────────────────────────────────────────────────────────────────────── -00:04:39 verbose #4741 > inl main () = -00:04:39 verbose #4742 > types () -00:04:39 verbose #4743 > init_trace_state None -00:04:39 verbose #4744 > $"let is_windows () = !is_windows ()" : () -00:04:39 verbose #4745 > $"let get_executable_suffix () = !get_executable_suffix ()" : () -00:04:39 verbose #4746 > $"let execute_async x = !execute_async x" : () -00:04:39 verbose #4747 > $"let execute_with_options_async x = !execute_with_options_async x" : () -00:04:39 verbose #4748 > inl execution_options fn = -00:04:39 verbose #4749 > execution_options fun x => -00:04:39 verbose #4750 > x -00:04:39 verbose #4751 > |> heap -00:04:39 verbose #4752 > |> fn -00:04:39 verbose #4753 > |> fun x => !x -00:04:39 verbose #4754 > $"let execution_options x = !execution_options x" : () -00:04:39 verbose #4755 > $"let split_args x = !split_args x" : () -00:04:39 verbose #4756 > 00:02:16 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 95968 -00:04:39 verbose #4757 > 00:02:16 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:04:43 verbose #4758 > 00:02:21 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb to html\e[0m -00:04:43 verbose #4759 > 00:02:21 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:04:43 verbose #4760 > 00:02:21 verbose #7 \e[4;7m validate(nb)\e[0m -00:04:43 verbose #4761 > 00:02:21 verbose #8 \e[4;7m[NbConvertApp] Writing 547577 bytes to c:\home\git\polyglot\lib\spiral\runtime.dib.html\e[0m -00:04:43 verbose #4762 > 00:02:21 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 605 -00:04:43 verbose #4763 > 00:02:21 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 605 -00:04:43 verbose #4764 > 00:02:21 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:04:44 verbose #4765 > 00:02:22 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:04:44 verbose #4766 > 00:02:22 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:04:45 verbose #4767 > 00:02:22 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 96632 -00:04:45 debug #4768 execute_with_options_async / exit_code: 0 / output.Length: 98950 -00:04:45 debug #8 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path runtime.dib --retries 3 -00:04:45 debug #4769 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path trace.dib --retries 3", +00:01:48 verbose #2892 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "runtime.dib", "--retries", "3"]) +00:01:48 verbose #2893 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/runtime.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/runtime.dib" --output-path "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:01:50 verbose #2894 > > +00:01:50 verbose #2895 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:50 verbose #2896 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:50 verbose #2897 > > │ # runtime │ +00:01:50 verbose #2898 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:50 verbose #2899 > > +00:01:50 verbose #2900 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:50 verbose #2901 > > open rust_operators +00:01:50 verbose #2902 > > open sm'_operators +00:01:50 verbose #2903 > > +00:01:50 verbose #2904 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:01:50 verbose #2905 > > #r +00:01:50 verbose #2906 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:01:50 verbose #2907 > > otNet.Interactive.Spiral.dll" +00:01:50 verbose #2908 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:01:50 verbose #2909 > > #r +00:01:50 verbose #2910 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:01:50 verbose #2911 > > otNet.Interactive.dll" +00:01:50 verbose #2912 > > open type Microsoft.DotNet.Interactive.Kernel +00:01:55 verbose #2913 > > +00:01:55 verbose #2914 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:55 verbose #2915 > > //// test +00:01:55 verbose #2916 > > +00:01:55 verbose #2917 > > open testing +00:01:55 verbose #2918 > > open file_system_operators +00:01:55 verbose #2919 > > +00:01:55 verbose #2920 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:55 verbose #2921 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:55 verbose #2922 > > │ ## types │ +00:01:55 verbose #2923 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:55 verbose #2924 > > +00:01:55 verbose #2925 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:55 verbose #2926 > > inl types () = +00:01:55 verbose #2927 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2928 > > Fable.Core.Emit(\"clap::Arg\")>]]\n#endif\ntype clap_Arg = class end" +00:01:55 verbose #2929 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2930 > > Fable.Core.Emit(\"clap::ArgAction\")>]]\n#endif\ntype clap_ArgAction = class +00:01:55 verbose #2931 > > end" +00:01:55 verbose #2932 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2933 > > Fable.Core.Emit(\"clap::Command\")>]]\n#endif\ntype clap_Command = class end" +00:01:55 verbose #2934 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2935 > > Fable.Core.Emit(\"clap::ArgMatches\")>]]\n#endif\ntype clap_ArgMatches = class +00:01:55 verbose #2936 > > end" +00:01:55 verbose #2937 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2938 > > Fable.Core.Emit(\"clap::builder::ValueRange\")>]]\n#endif\ntype +00:01:55 verbose #2939 > > clap_builder_ValueRange = class end" +00:01:55 verbose #2940 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2941 > > Fable.Core.Emit(\"clap::builder::ValueParser\")>]]\n#endif\ntype +00:01:55 verbose #2942 > > clap_builder_ValueParser = class end" +00:01:55 verbose #2943 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2944 > > Fable.Core.Emit(\"clap::builder::PossibleValue\")>]]\n#endif\ntype +00:01:55 verbose #2945 > > clap_builder_PossibleValue = class end" +00:01:55 verbose #2946 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2947 > > Fable.Core.Emit(\"std::process::Child\")>]]\n#endif\ntype std_process_Child = +00:01:55 verbose #2948 > > class end" +00:01:55 verbose #2949 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2950 > > Fable.Core.Emit(\"std::process::ChildStderr\")>]]\n#endif\ntype +00:01:55 verbose #2951 > > std_process_ChildStderr = class end" +00:01:55 verbose #2952 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2953 > > Fable.Core.Emit(\"std::process::ChildStdout\")>]]\n#endif\ntype +00:01:55 verbose #2954 > > std_process_ChildStdout = class end" +00:01:55 verbose #2955 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2956 > > Fable.Core.Emit(\"std::process::ChildStdin\")>]]\n#endif\ntype +00:01:55 verbose #2957 > > std_process_ChildStdin = class end" +00:01:55 verbose #2958 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2959 > > Fable.Core.Emit(\"std::process::Command\")>]]\n#endif\ntype std_process_Command +00:01:55 verbose #2960 > > = class end" +00:01:55 verbose #2961 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2962 > > Fable.Core.Emit(\"std::process::ExitStatus\")>]]\n#endif\ntype +00:01:55 verbose #2963 > > std_process_ExitStatus = class end" +00:01:55 verbose #2964 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2965 > > Fable.Core.Emit(\"std::process::Output\")>]]\n#endif\ntype std_process_Output = +00:01:55 verbose #2966 > > class end" +00:01:55 verbose #2967 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:01:55 verbose #2968 > > Fable.Core.Emit(\"std::process::Stdio\")>]]\n#endif\ntype std_process_Stdio = +00:01:55 verbose #2969 > > class end" +00:01:56 verbose #2970 > > +00:01:56 verbose #2971 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #2972 > > inl types () = +00:01:56 verbose #2973 > > types () +00:01:56 verbose #2974 > > am'.types () +00:01:56 verbose #2975 > > async.types () +00:01:56 verbose #2976 > > env.types () +00:01:56 verbose #2977 > > rust.types () +00:01:56 verbose #2978 > > seq.types () +00:01:56 verbose #2979 > > sm'.types () +00:01:56 verbose #2980 > > threading.types () +00:01:56 verbose #2981 > > +00:01:56 verbose #2982 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #2983 > > //// test +00:01:56 verbose #2984 > > +00:01:56 verbose #2985 > > inl types () = +00:01:56 verbose #2986 > > file_system.types () +00:01:56 verbose #2987 > > types () +00:01:56 verbose #2988 > > +00:01:56 verbose #2989 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #2990 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #2991 > > │ ## process_child │ +00:01:56 verbose #2992 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #2993 > > +00:01:56 verbose #2994 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #2995 > > nominal process_child = $'std_process_Child' +00:01:56 verbose #2996 > > +00:01:56 verbose #2997 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #2998 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #2999 > > │ ## process_child_stderr │ +00:01:56 verbose #3000 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3001 > > +00:01:56 verbose #3002 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3003 > > nominal process_child_stderr = $"std_process_ChildStderr" +00:01:56 verbose #3004 > > +00:01:56 verbose #3005 > > inl process_child_stderr (child : rust.ref' (rust.mut' process_child)) : +00:01:56 verbose #3006 > > rust.ref' (rust.mut' (optionm'.option' process_child_stderr)) = +00:01:56 verbose #3007 > > !\\(child, $'"&mut $0.stderr"') +00:01:56 verbose #3008 > > +00:01:56 verbose #3009 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3010 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3011 > > │ ## process_child_stdout │ +00:01:56 verbose #3012 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3013 > > +00:01:56 verbose #3014 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3015 > > nominal process_child_stdout = $"std_process_ChildStdout" +00:01:56 verbose #3016 > > +00:01:56 verbose #3017 > > inl process_child_stdout (child : rust.ref' (rust.mut' process_child)) : +00:01:56 verbose #3018 > > rust.ref' (rust.mut' (optionm'.option' process_child_stdout)) = +00:01:56 verbose #3019 > > !\\(child, $'"&mut $0.stdout"') +00:01:56 verbose #3020 > > +00:01:56 verbose #3021 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3022 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3023 > > │ ## process_child_stdin │ +00:01:56 verbose #3024 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3025 > > +00:01:56 verbose #3026 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3027 > > nominal process_child_stdin = $"std_process_ChildStdin" +00:01:56 verbose #3028 > > +00:01:56 verbose #3029 > > inl process_child_stdin (child : rust.ref' (rust.mut' process_child)) : +00:01:56 verbose #3030 > > rust.ref' (rust.mut' (optionm'.option' process_child_stdin)) = +00:01:56 verbose #3031 > > !\\(child, $'"&mut $0.stdin"') +00:01:56 verbose #3032 > > +00:01:56 verbose #3033 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3034 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3035 > > │ ## process_command │ +00:01:56 verbose #3036 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3037 > > +00:01:56 verbose #3038 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3039 > > nominal process_command = $'std_process_Command' +00:01:56 verbose #3040 > > +00:01:56 verbose #3041 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3042 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3043 > > │ ## process_stdio │ +00:01:56 verbose #3044 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3045 > > +00:01:56 verbose #3046 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3047 > > nominal process_stdio = $'std_process_Stdio' +00:01:56 verbose #3048 > > +00:01:56 verbose #3049 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3050 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3051 > > │ ## process_output │ +00:01:56 verbose #3052 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3053 > > +00:01:56 verbose #3054 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3055 > > nominal process_output = $'std_process_Output' +00:01:56 verbose #3056 > > +00:01:56 verbose #3057 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3058 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3059 > > │ ## process_exit_status │ +00:01:56 verbose #3060 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3061 > > +00:01:56 verbose #3062 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3063 > > nominal process_exit_status = $'std_process_ExitStatus' +00:01:56 verbose #3064 > > +00:01:56 verbose #3065 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3066 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3067 > > │ ## process_output_status │ +00:01:56 verbose #3068 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3069 > > +00:01:56 verbose #3070 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3071 > > inl process_output_status (output : process_output) : process_exit_status = +00:01:56 verbose #3072 > > !\\(output, $'"$0.status"') +00:01:56 verbose #3073 > > +00:01:56 verbose #3074 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3075 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3076 > > │ ## process_exit_status_code │ +00:01:56 verbose #3077 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3078 > > +00:01:56 verbose #3079 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3080 > > inl process_exit_status_code (status : process_exit_status) : optionm'.option' +00:01:56 verbose #3081 > > i32 = +00:01:56 verbose #3082 > > !\\(status, $'"$0.code()"') +00:01:56 verbose #3083 > > +00:01:56 verbose #3084 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3085 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3086 > > │ ## os_platform │ +00:01:56 verbose #3087 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3088 > > +00:01:56 verbose #3089 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3090 > > nominal os_platform' = $'System.Runtime.InteropServices.OSPlatform' +00:01:56 verbose #3091 > > +00:01:56 verbose #3092 > > union os_platform = +00:01:56 verbose #3093 > > | Windows +00:01:56 verbose #3094 > > +00:01:56 verbose #3095 > > inl os_platform = function +00:01:56 verbose #3096 > > | Windows => $'`os_platform'.Windows' : os_platform' +00:01:56 verbose #3097 > > +00:01:56 verbose #3098 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3099 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3100 > > │ ## is_os_platform │ +00:01:56 verbose #3101 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3102 > > +00:01:56 verbose #3103 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3104 > > inl is_os_platform (x : os_platform') : bool = +00:01:56 verbose #3105 > > x |> $'System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform' +00:01:56 verbose #3106 > > +00:01:56 verbose #3107 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3108 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3109 > > │ ## is_windows │ +00:01:56 verbose #3110 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3111 > > +00:01:56 verbose #3112 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3113 > > inl is_windows () : bool = +00:01:56 verbose #3114 > > run_target function +00:01:56 verbose #3115 > > | Fsharp (Native) => fun () => +00:01:56 verbose #3116 > > Windows |> os_platform |> is_os_platform +00:01:56 verbose #3117 > > | Rust (Native) => fun () => +00:01:56 verbose #3118 > > !\($'"cfg\!(windows)"') +00:01:56 verbose #3119 > > | _ => fun () => null () +00:01:56 verbose #3120 > > +00:01:56 verbose #3121 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:56 verbose #3122 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:56 verbose #3123 > > │ ## get_executable_suffix │ +00:01:56 verbose #3124 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:56 verbose #3125 > > +00:01:56 verbose #3126 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3127 > > inl get_executable_suffix () = +00:01:56 verbose #3128 > > if is_windows () +00:01:56 verbose #3129 > > then ".exe" +00:01:56 verbose #3130 > > else "" +00:01:56 verbose #3131 > > +00:01:56 verbose #3132 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:56 verbose #3133 > > //// test +00:01:56 verbose #3134 > > +00:01:56 verbose #3135 > > get_executable_suffix () +00:01:57 verbose #3136 > > +00:01:57 verbose #3137 > > ╭─[ 713.86ms - return value ]──────────────────────────────────────────────────╮ +00:01:57 verbose #3138 > > │ .exe │ +00:01:57 verbose #3139 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:57 verbose #3140 > > +00:01:57 verbose #3141 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:57 verbose #3142 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:57 verbose #3143 > > │ ## quoted │ +00:01:57 verbose #3144 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:57 verbose #3145 > > +00:01:57 verbose #3146 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:57 verbose #3147 > > union quoted = +00:01:57 verbose #3148 > > | Quoted +00:01:57 verbose #3149 > > | NotQuoted +00:01:57 verbose #3150 > > +00:01:57 verbose #3151 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:57 verbose #3152 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:57 verbose #3153 > > │ ## split_command │ +00:01:57 verbose #3154 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:57 verbose #3155 > > +00:01:57 verbose #3156 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:57 verbose #3157 > > union command_parse_step = +00:01:57 verbose #3158 > > | Start +00:01:57 verbose #3159 > > | Path : quoted +00:01:57 verbose #3160 > > | Arguments +00:01:57 verbose #3161 > > +00:01:57 verbose #3162 > > inl split_command (command : string) = +00:01:57 verbose #3163 > > let rec loop (path, args) (chars : list char) step = +00:01:57 verbose #3164 > > match step, chars with +00:01:57 verbose #3165 > > | _, (('"' | '\'') :: tail) when path = "" => loop (path, args) tail +00:01:57 verbose #3166 > > (Path Quoted) +00:01:57 verbose #3167 > > | Path (Quoted), (('"' | '\'') :: tail) => loop (path, args) tail (Path +00:01:57 verbose #3168 > > NotQuoted) +00:01:57 verbose #3169 > > | Path (Quoted), (' ' :: tail) => loop ($'$"{!path} "', args) tail (Path +00:01:57 verbose #3170 > > Quoted) +00:01:57 verbose #3171 > > | (Start | Path _), (' ' :: tail) => loop (path, args) tail Arguments +00:01:57 verbose #3172 > > | Arguments, (char :: tail) => loop (path, $'$"{!args}{!char}"') tail +00:01:57 verbose #3173 > > Arguments +00:01:57 verbose #3174 > > | _, (char :: tail) => loop ($'$"{!path}{!char}"', args) tail step +00:01:57 verbose #3175 > > | _ => path |> sm'.replace @"\" "/", args +00:01:57 verbose #3176 > > loop (join "", "") (command |> sm'.to_char_array |> am'.to_list' |> +00:01:57 verbose #3177 > > listm'.unbox) Start +00:01:57 verbose #3178 > > +00:01:57 verbose #3179 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:57 verbose #3180 > > //// test +00:01:57 verbose #3181 > > +00:01:57 verbose #3182 > > split_command "" +00:01:57 verbose #3183 > > |> _assert_eq ("", "") +00:01:57 verbose #3184 > > +00:01:57 verbose #3185 > > split_command "/a/b/c" +00:01:57 verbose #3186 > > |> _assert_eq ("/a/b/c", "") +00:01:57 verbose #3187 > > +00:01:57 verbose #3188 > > split_command "cat file.txt" +00:01:57 verbose #3189 > > |> _assert_eq ("cat", "file.txt") +00:01:57 verbose #3190 > > +00:01:57 verbose #3191 > > split_command $'"""..\\..\\file.exe file1.txt file2.txt"""' +00:01:57 verbose #3192 > > |> _assert_eq ("../../file.exe", "file1.txt file2.txt") +00:01:57 verbose #3193 > > +00:01:57 verbose #3194 > > split_command $'\@"c:\\dir\\file.exe ""file1.txt file2.txt"""' +00:01:57 verbose #3195 > > |> _assert_eq ("c:/dir/file.exe", $'\@"""file1.txt file2.txt"""') +00:01:57 verbose #3196 > > +00:01:57 verbose #3197 > > split_command $'\@"""..\\..\\dir name\\file.exe"" ""file 1.txt"" file2.txt"' +00:01:57 verbose #3198 > > |> _assert_eq ("../../dir name/file.exe", $'\@"""file 1.txt"" file2.txt"') +00:01:57 verbose #3199 > > +00:01:57 verbose #3200 > > split_command $'\@"""..\\..\\file 1.exe"" -c \\\\""echo 1\\\\"""' +00:01:57 verbose #3201 > > |> _assert_eq ("../../file 1.exe", $'\@"-c \\\\""echo 1\\\\"""') +00:01:57 verbose #3202 > > +00:01:57 verbose #3203 > > split_command $'\@"..\\..\\file 1.exe -c \\\\""echo 1\\\\"""' +00:01:57 verbose #3204 > > |> _assert_eq ("../../file", $'\@"1.exe -c \\\\""echo 1\\\\"""') +00:01:58 verbose #3205 > > +00:01:58 verbose #3206 > > ╭─[ 1.20s - stdout ]───────────────────────────────────────────────────────────╮ +00:01:58 verbose #3207 > > │ assert_eq / actual: struct ("", "") / expected: struct ("", "") │ +00:01:58 verbose #3208 > > │ assert_eq / actual: struct ("/a/b/c", "") / expected: struct ("/a/b/c", "") │ +00:01:58 verbose #3209 > > │ assert_eq / actual: struct ("cat", "file.txt") / expected: struct ("cat", │ +00:01:58 verbose #3210 > > │ "file.txt") │ +00:01:58 verbose #3211 > > │ assert_eq / actual: struct ("../../file.exe", "file1.txt file2.txt") / │ +00:01:58 verbose #3212 > > │ expected: struct ("../../file.exe", "file1.txt file2.txt") │ +00:01:58 verbose #3213 > > │ assert_eq / actual: struct ("c:/dir/file.exe", ""file1.txt file2.txt"") / │ +00:01:58 verbose #3214 > > │ expected: struct ("c:/dir/file.exe", ""file1.txt file2.txt"") │ +00:01:58 verbose #3215 > > │ assert_eq / actual: struct ("../../dir name/file.exe", ""file 1.txt" │ +00:01:58 verbose #3216 > > │ file2.txt") / expected: struct ("../../dir name/file.exe", ""file 1.txt" │ +00:01:58 verbose #3217 > > │ file2.txt") │ +00:01:58 verbose #3218 > > │ assert_eq / actual: struct ("../../file 1.exe", "-c \\"echo 1\\"") / │ +00:01:58 verbose #3219 > > │ expected: struct ("../../file 1.exe", "-c \\"echo 1\\"") │ +00:01:58 verbose #3220 > > │ assert_eq / actual: struct ("../../file", "1.exe -c \\"echo 1\\"") / │ +00:01:58 verbose #3221 > > │ expected: struct ("../../file", "1.exe -c \\"echo 1\\"") │ +00:01:58 verbose #3222 > > │ │ +00:01:58 verbose #3223 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:58 verbose #3224 > > +00:01:58 verbose #3225 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:58 verbose #3226 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:58 verbose #3227 > > │ ## process │ +00:01:58 verbose #3228 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:58 verbose #3229 > > +00:01:58 verbose #3230 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:58 verbose #3231 > > nominal process = $'System.Diagnostics.Process' +00:01:58 verbose #3232 > > nominal process_start_info = $'System.Diagnostics.ProcessStartInfo' +00:01:58 verbose #3233 > > nominal data_received_event_args = $'System.Diagnostics.DataReceivedEventArgs' +00:01:58 verbose #3234 > > +00:01:58 verbose #3235 > > inl new_process (process_start_info : process_start_info) : process = +00:01:58 verbose #3236 > > $'new `process (StartInfo = !process_start_info)' +00:01:58 verbose #3237 > > +00:01:58 verbose #3238 > > inl process_start (process : process) : bool = +00:01:58 verbose #3239 > > $'!process.Start' () +00:01:58 verbose #3240 > > +00:01:58 verbose #3241 > > inl process_exit_code (process : process) : i32 = +00:01:58 verbose #3242 > > $'!process.ExitCode' +00:01:58 verbose #3243 > > +00:01:58 verbose #3244 > > inl process_id (process : process) : i32 = +00:01:58 verbose #3245 > > $'!process.Id' +00:01:58 verbose #3246 > > +00:01:58 verbose #3247 > > inl process_has_exited (process : process) : bool = +00:01:58 verbose #3248 > > run_target function +00:01:58 verbose #3249 > > | Fsharp (Native) => fun () => +00:01:58 verbose #3250 > > $'!process.HasExited' +00:01:58 verbose #3251 > > | _ => fun () => null () +00:01:58 verbose #3252 > > +00:01:58 verbose #3253 > > inl process_kill (process : process) : () = +00:01:58 verbose #3254 > > run_target function +00:01:58 verbose #3255 > > | Fsharp (Native) => fun () => +00:01:58 verbose #3256 > > $'!process.Kill' () +00:01:58 verbose #3257 > > | _ => fun () => null () +00:01:58 verbose #3258 > > +00:01:58 verbose #3259 > > inl process_begin_error_read_line (process : process) : () = +00:01:58 verbose #3260 > > $'!process.BeginErrorReadLine' () +00:01:58 verbose #3261 > > +00:01:58 verbose #3262 > > inl process_begin_output_read_line (process : process) : () = +00:01:58 verbose #3263 > > $'!process.BeginOutputReadLine' () +00:01:58 verbose #3264 > > +00:01:58 verbose #3265 > > inl process_add_output_data_received fn (process : process) : () = +00:01:58 verbose #3266 > > $'!process.OutputDataReceived.Add !fn ' +00:01:58 verbose #3267 > > +00:01:58 verbose #3268 > > inl process_add_error_data_received fn (process : process) : () = +00:01:58 verbose #3269 > > $'!process.ErrorDataReceived.Add !fn ' +00:01:58 verbose #3270 > > +00:01:58 verbose #3271 > > inl process_wait_for_exit_async (ct : threading.cancellation_token) (process : +00:01:58 verbose #3272 > > process) : async.task () = +00:01:58 verbose #3273 > > $'!process.WaitForExitAsync !ct ' +00:01:58 verbose #3274 > > +00:01:58 verbose #3275 > > inl event_data (e : data_received_event_args) : string = +00:01:58 verbose #3276 > > $'!e.Data' +00:01:58 verbose #3277 > > +00:01:58 verbose #3278 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:58 verbose #3279 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:58 verbose #3280 > > │ ## execution_line │ +00:01:58 verbose #3281 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:58 verbose #3282 > > +00:01:58 verbose #3283 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:58 verbose #3284 > > type execution_line = +00:01:58 verbose #3285 > > { +00:01:58 verbose #3286 > > process_id : int +00:01:58 verbose #3287 > > line : string +00:01:58 verbose #3288 > > error : bool +00:01:58 verbose #3289 > > } +00:01:58 verbose #3290 > > +00:01:58 verbose #3291 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:58 verbose #3292 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:58 verbose #3293 > > │ ## execution_options │ +00:01:58 verbose #3294 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:58 verbose #3295 > > +00:01:58 verbose #3296 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:58 verbose #3297 > > type execution_options = +00:01:58 verbose #3298 > > { +00:01:58 verbose #3299 > > command : string +00:01:58 verbose #3300 > > cancellation_token : optionm'.option' threading.cancellation_token +00:01:58 verbose #3301 > > environment_variables : array_base (string * string) +00:01:58 verbose #3302 > > on_line : optionm'.option' (execution_line -> async.async ()) +00:01:58 verbose #3303 > > stdin : optionm'.option' (threading.arc (threading.mutex +00:01:58 verbose #3304 > > process_child_stdin) -> ()) +00:01:58 verbose #3305 > > trace : bool +00:01:58 verbose #3306 > > working_directory : optionm'.option' string +00:01:58 verbose #3307 > > } +00:01:58 verbose #3308 > > +00:01:58 verbose #3309 > > inl execution_options (fn : execution_options -> execution_options) : +00:01:58 verbose #3310 > > execution_options = +00:01:58 verbose #3311 > > { +00:01:58 verbose #3312 > > command = "" +00:01:58 verbose #3313 > > cancellation_token = None |> optionm'.box +00:01:58 verbose #3314 > > environment_variables = ;[[]] +00:01:58 verbose #3315 > > on_line = None |> optionm'.box +00:01:58 verbose #3316 > > stdin = None |> optionm'.box +00:01:58 verbose #3317 > > trace = true +00:01:58 verbose #3318 > > working_directory = None |> optionm'.box +00:01:58 verbose #3319 > > } +00:01:58 verbose #3320 > > |> fn +00:01:58 verbose #3321 > > +00:01:58 verbose #3322 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:58 verbose #3323 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:58 verbose #3324 > > │ ## execute_with_options_async │ +00:01:58 verbose #3325 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:58 verbose #3326 > > +00:01:58 verbose #3327 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:58 verbose #3328 > > let execute_with_options_async (options : execution_options) : _ (i32 * string) +00:01:58 verbose #3329 > > = +00:01:58 verbose #3330 > > run_target function +00:01:58 verbose #3331 > > | Fsharp (Native) => fun () => +00:01:58 verbose #3332 > > fun () => +00:01:58 verbose #3333 > > inl file_name, arguments = options.command |> split_command +00:01:58 verbose #3334 > > inl working_directory = options.working_directory |> +00:01:58 verbose #3335 > > optionm'.unbox |> optionm'.default_value "" +00:01:58 verbose #3336 > > +00:01:58 verbose #3337 > > trace Debug (fun () => $'$"execute_with_options_async / options: +00:01:58 verbose #3338 > > %A{!options}"') (join _locals) +00:01:58 verbose #3339 > > +00:01:58 verbose #3340 > > inl utf8 = sm'.encoding_utf8 () +00:01:58 verbose #3341 > > inl start_info : process_start_info = +00:01:58 verbose #3342 > > $'System.Diagnostics.ProcessStartInfo (Arguments = !arguments, +00:01:58 verbose #3343 > > StandardOutputEncoding = !utf8, WorkingDirectory = !working_directory, FileName +00:01:58 verbose #3344 > > = !file_name, CreateNoWindow = true, RedirectStandardError = true, +00:01:58 verbose #3345 > > RedirectStandardOutput = true, UseShellExecute = false)' +00:01:58 verbose #3346 > > +00:01:58 verbose #3347 > > (a options.environment_variables : _ i32 _) +00:01:58 verbose #3348 > > |> am.iter fun key, value => +00:01:58 verbose #3349 > > $'!start_info.EnvironmentVariables.[[!key]] <- !value ' +00:01:58 verbose #3350 > > +00:01:58 verbose #3351 > > inl proc = start_info |> new_process |> use +00:01:58 verbose #3352 > > inl output : _ string = threading.new_concurrent_stack () +00:01:58 verbose #3353 > > +00:01:58 verbose #3354 > > inl event error (e : data_received_event_args) = async.new_async +00:01:58 verbose #3355 > > fun () => +00:01:58 verbose #3356 > > inl data = e |> event_data +00:01:58 verbose #3357 > > if data <> null () then +00:01:58 verbose #3358 > > match options.on_line |> optionm'.unbox with +00:01:58 verbose #3359 > > | Some on_line => +00:01:58 verbose #3360 > > on_line +00:01:58 verbose #3361 > > { +00:01:58 verbose #3362 > > process_id = proc |> process_id +00:01:58 verbose #3363 > > line = data +00:01:58 verbose #3364 > > error = error +00:01:58 verbose #3365 > > } +00:01:58 verbose #3366 > > |> async.do +00:01:58 verbose #3367 > > | None => () +00:01:58 verbose #3368 > > +00:01:58 verbose #3369 > > inl text = +00:01:58 verbose #3370 > > if error +00:01:58 verbose #3371 > > then $'$"\! {!data}"' +00:01:58 verbose #3372 > > else $'$"> {!data}"' +00:01:58 verbose #3373 > > if options.trace +00:01:58 verbose #3374 > > then trace Verbose (fun () => text) _locals +00:01:58 verbose #3375 > > else text |> console.write_line +00:01:58 verbose #3376 > > +00:01:58 verbose #3377 > > inl l = if error then $'"\\u001b[[7;4m"' else "" +00:01:58 verbose #3378 > > inl r = if error then $'"\\u001b[[0m"' else "" +00:01:58 verbose #3379 > > output |> threading.concurrent_stack_push +00:01:58 verbose #3380 > > $'$"{!l}{!data}{!r}"' +00:01:58 verbose #3381 > > +00:01:58 verbose #3382 > > proc |> process_add_output_data_received (event false >> +00:01:58 verbose #3383 > > async.start_immediate) +00:01:58 verbose #3384 > > proc |> process_add_error_data_received (event true >> +00:01:58 verbose #3385 > > async.start_immediate) +00:01:58 verbose #3386 > > +00:01:58 verbose #3387 > > if proc |> process_start |> not +00:01:58 verbose #3388 > > then failwith $'$"execute_with_options_async / process_start +00:01:58 verbose #3389 > > error"' +00:01:58 verbose #3390 > > +00:01:58 verbose #3391 > > proc |> process_begin_error_read_line +00:01:58 verbose #3392 > > proc |> process_begin_output_read_line +00:01:58 verbose #3393 > > +00:01:58 verbose #3394 > > inl ct = +00:01:58 verbose #3395 > > options.cancellation_token +00:01:58 verbose #3396 > > |> optionm'.unbox +00:01:58 verbose #3397 > > |> optionm'.default_with threading.token_none +00:01:58 verbose #3398 > > |> async.merge_cancellation_token_with_default_async +00:01:58 verbose #3399 > > |> async.let' +00:01:58 verbose #3400 > > +00:01:58 verbose #3401 > > ct |> threading.token_register fun () => +00:01:58 verbose #3402 > > if proc |> process_has_exited |> not +00:01:58 verbose #3403 > > then proc |> process_kill +00:01:58 verbose #3404 > > |> use +00:01:58 verbose #3405 > > |> ignore +00:01:58 verbose #3406 > > +00:01:58 verbose #3407 > > inl exit_code : i32 = +00:01:58 verbose #3408 > > fun () => +00:01:58 verbose #3409 > > try_unit +00:01:58 verbose #3410 > > fun () => +00:01:58 verbose #3411 > > proc +00:01:58 verbose #3412 > > |> process_wait_for_exit_async ct +00:01:58 verbose #3413 > > |> async.await_task +00:01:58 verbose #3414 > > |> async.do +00:01:58 verbose #3415 > > proc |> process_exit_code |> return +00:01:58 verbose #3416 > > fun ex => +00:01:58 verbose #3417 > > // with :? +00:01:58 verbose #3418 > > System.Threading.Tasks.TaskCanceledException as ex => +00:01:58 verbose #3419 > > inl ex' = ex |> sm'.format_exception +00:01:58 verbose #3420 > > output |> threading.concurrent_stack_push ex' +00:01:58 verbose #3421 > > inl ex : async.task_canceled_exception = ex |> +00:01:58 verbose #3422 > > unbox +00:01:58 verbose #3423 > > trace Warning (fun () => +00:01:58 verbose #3424 > > $'$"execute_with_options_async / WaitForExitAsync / ex: %A{!ex}"') (join +00:01:58 verbose #3425 > > _locals) +00:01:58 verbose #3426 > > (limit.min : i32) |> return +00:01:58 verbose #3427 > > |> async.new_async_unit +00:01:58 verbose #3428 > > |> async.let' +00:01:58 verbose #3429 > > +00:01:58 verbose #3430 > > inl output = +00:01:58 verbose #3431 > > output +00:01:58 verbose #3432 > > |> seq.rev'' +00:01:58 verbose #3433 > > |> fun x => x : seq.seq' string +00:01:58 verbose #3434 > > |> sm'.concat "\n" +00:01:58 verbose #3435 > > +00:01:58 verbose #3436 > > trace Debug (fun () => +00:01:58 verbose #3437 > > $'$"execute_with_options_async / exit_code: {!exit_code} +00:01:58 verbose #3438 > > output.Length: {!output.Length}"' +00:01:58 verbose #3439 > > ) (join _locals) +00:01:58 verbose #3440 > > +00:01:58 verbose #3441 > > (exit_code, output) |> return +00:01:58 verbose #3442 > > |> async.new_async_unit +00:01:58 verbose #3443 > > | _ => fun () => +00:01:58 verbose #3444 > > global "#if FABLE_COMPILER\n[[<CompilationRepresentation +00:01:58 verbose #3445 > > (CompilationRepresentationFlags.ModuleSuffix)>]]\nmodule System =\n module +00:01:58 verbose #3446 > > Diagnostics =\n type Process = unit\n type DataReceivedEventArgs = +00:01:58 verbose #3447 > > unit\n#endif" +00:01:58 verbose #3448 > > null () +00:01:58 verbose #3449 > > +00:01:58 verbose #3450 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:01:58 verbose #3451 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:01:58 verbose #3452 > > │ ## execute_async │ +00:01:58 verbose #3453 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:01:58 verbose #3454 > > +00:01:58 verbose #3455 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:58 verbose #3456 > > inl execute_async command = +00:01:58 verbose #3457 > > execution_options fun x => { x with +00:01:58 verbose #3458 > > command = command +00:01:58 verbose #3459 > > } +00:01:58 verbose #3460 > > |> execute_with_options_async +00:01:58 verbose #3461 > > +00:01:58 verbose #3462 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:01:58 verbose #3463 > > //// test +00:01:58 verbose #3464 > > +00:01:58 verbose #3465 > > types () +00:01:58 verbose #3466 > > inl temp_folder, disposable = file_system.create_temp_directory () +00:01:58 verbose #3467 > > disposable |> use |> ignore +00:01:58 verbose #3468 > > inl file_name = "test.txt" +00:01:58 verbose #3469 > > inl path = temp_folder </> file_name +00:01:58 verbose #3470 > > +00:01:58 verbose #3471 > > inl content = "╭─[[ 你好,世界!こんにちは世界! ]]─╮" +00:01:58 verbose #3472 > > fun () => +00:01:58 verbose #3473 > > inl exit_code, result = execute_async $'\@$"pwsh -c ""Get-Content +00:01:58 verbose #3474 > > {!path}"""' |> async.let' +00:01:58 verbose #3475 > > exit_code |> join _assert_eq 1 +00:01:58 verbose #3476 > > result |> _assert_string_contains "not exist" +00:01:58 verbose #3477 > > +00:01:58 verbose #3478 > > content |> file_system.write_all_text_async path |> async.do +00:01:58 verbose #3479 > > +00:01:58 verbose #3480 > > execution_options fun x => { x with +00:01:58 verbose #3481 > > command = $'\@$"cat ""{!file_name}"""' +00:01:58 verbose #3482 > > working_directory = Some temp_folder |> optionm'.box +00:01:58 verbose #3483 > > } +00:01:58 verbose #3484 > > |> execute_with_options_async +00:01:58 verbose #3485 > > |> async.let' +00:01:58 verbose #3486 > > |> ignore +00:01:58 verbose #3487 > > +00:01:58 verbose #3488 > > execution_options fun x => { x with +00:01:58 verbose #3489 > > command = $'\@$"pwsh -c ""[[System.Console]]::OutputEncoding = +00:01:58 verbose #3490 > > [[System.Text.Encoding]]::UTF8; Get-Content {!file_name}"""' +00:01:58 verbose #3491 > > working_directory = Some temp_folder |> optionm'.box +00:01:58 verbose #3492 > > } +00:01:58 verbose #3493 > > |> execute_with_options_async +00:01:58 verbose #3494 > > |> async.return_await +00:01:58 verbose #3495 > > |> async.new_async_unit +00:01:58 verbose #3496 > > |> async.run_with_timeout 10000 +00:01:58 verbose #3497 > > |> function +00:01:58 verbose #3498 > > | Some (exit_code, output) => +00:01:58 verbose #3499 > > exit_code |> join _assert_eq 0i32 +00:01:58 verbose #3500 > > output |> join _assert_eq content +00:01:58 verbose #3501 > > true +00:01:58 verbose #3502 > > | _ => false +00:01:58 verbose #3503 > > |> _assert_eq true +00:02:02 verbose #3504 > > +00:02:02 verbose #3505 > > ╭─[ 4.04s - stdout ]───────────────────────────────────────────────────────────╮ +00:02:02 verbose #3506 > > │ 00:00:00 debug #1 execute_with_options_async / options: struct (None, │ +00:02:02 verbose #3507 > > │ "pwsh -c "Get-Content │ +00:02:02 verbose #3508 > > │ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-0440-0980-8052-80040 │ +00:02:02 verbose #3509 > > │ 0df9adf\test.txt"", │ +00:02:02 verbose #3510 > > │ [||], None, None, true, None) │ +00:02:02 verbose #3511 > > │ 00:00:00 verbose #2 ! Get-Content: Cannot find path │ +00:02:02 verbose #3512 > > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-0440-0980-8052-8004 │ +00:02:02 verbose #3513 > > │ 00df9adf\test.txt' because it does not exist. │ +00:02:02 verbose #3514 > > │ 00:00:00 debug #3 execute_with_options_async / exit_code: 1 / │ +00:02:02 verbose #3515 > > │ output.Length: 179 │ +00:02:02 verbose #3516 > > │ assert_eq / actual: 1 / expected: 1 │ +00:02:02 verbose #3517 > > │ assert_string_contains / actual: "not exist" / expected: "[ │ +00:02:02 verbose #3518 > > │ 31;1mGet-Content: Cannot find path │ +00:02:02 verbose #3519 > > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-0440-0980-8052-8004 │ +00:02:02 verbose #3520 > > │ 00df9adf\test.txt' because it does not exist." │ +00:02:02 verbose #3521 > > │ 00:00:00 debug #4 execute_with_options_async / options: struct (None, "cat │ +00:02:02 verbose #3522 > > │ "test.txt"", [||], None, None, true, │ +00:02:02 verbose #3523 > > │ Some │ +00:02:02 verbose #3524 > > │ │ +00:02:02 verbose #3525 > > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-0440-0980-8052-8004 │ +00:02:02 verbose #3526 > > │ 00df9adf") │ +00:02:02 verbose #3527 > > │ 00:00:01 verbose #5 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │ +00:02:02 verbose #3528 > > │ 00:00:01 debug #6 execute_with_options_async / exit_code: 0 / │ +00:02:02 verbose #3529 > > │ output.Length: 22 │ +00:02:02 verbose #3530 > > │ 00:00:01 debug #7 execute_with_options_async / options: struct (None, │ +00:02:02 verbose #3531 > > │ "pwsh -c "[System.Console]::OutputEncoding = [ │ +00:02:02 verbose #3532 > > │ System.Text.Encoding]::UTF8; Get-Content test.txt"", │ +00:02:02 verbose #3533 > > │ [||], None, None, true, │ +00:02:02 verbose #3534 > > │ Some │ +00:02:02 verbose #3535 > > │ │ +00:02:02 verbose #3536 > > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-0440-0980-8052-8004 │ +00:02:02 verbose #3537 > > │ 00df9adf") │ +00:02:02 verbose #3538 > > │ 00:00:01 verbose #8 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │ +00:02:02 verbose #3539 > > │ 00:00:01 debug #9 execute_with_options_async / exit_code: 0 / │ +00:02:02 verbose #3540 > > │ output.Length: 22 │ +00:02:02 verbose #3541 > > │ assert_eq / actual: 0 / expected: 0 │ +00:02:02 verbose #3542 > > │ assert_eq / actual: "╭─[ 你好,世界!こんにちは世界! ]─╮" / expected: "╭─[ │ +00:02:02 verbose #3543 > > │ 你好,世界!こんにちは世界! ]─╮" │ +00:02:02 verbose #3544 > > │ assert_eq / actual: true / expected: true │ +00:02:02 verbose #3545 > > │ │ +00:02:02 verbose #3546 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:02 verbose #3547 > > +00:02:02 verbose #3548 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:02 verbose #3549 > > //// test +00:02:02 verbose #3550 > > +00:02:02 verbose #3551 > > file_system.types () +00:02:02 verbose #3552 > > inl temp_dir, disposable = file_system.create_temp_directory () +00:02:02 verbose #3553 > > disposable |> use |> ignore +00:02:02 verbose #3554 > > fun () => +00:02:02 verbose #3555 > > inl path = temp_dir </> "test.txt" +00:02:02 verbose #3556 > > "0" |> file_system.write_all_text_async path |> async.do +00:02:02 verbose #3557 > > +00:02:02 verbose #3558 > > inl cts = threading.new_cancellation_token_source () +00:02:02 verbose #3559 > > trace Debug (fun () => "1") _locals +00:02:02 verbose #3560 > > inl result = +00:02:02 verbose #3561 > > execution_options fun x => { x with +00:02:02 verbose #3562 > > command = $'\@$"pwsh -c ""Get-Content {!path}"""' +00:02:02 verbose #3563 > > cancellation_token = cts |> threading.cancellation_source_token |> +00:02:02 verbose #3564 > > Some |> optionm'.box +00:02:02 verbose #3565 > > } +00:02:02 verbose #3566 > > |> execute_with_options_async +00:02:02 verbose #3567 > > |> async.start_child +00:02:02 verbose #3568 > > |> async.let' +00:02:02 verbose #3569 > > trace Debug (fun () => "2") _locals +00:02:02 verbose #3570 > > async.sleep 100 |> async.do +00:02:02 verbose #3571 > > trace Debug (fun () => "3") _locals +00:02:02 verbose #3572 > > cts |> threading.cancellation_source_cancel +00:02:02 verbose #3573 > > trace Debug (fun () => "4") _locals +00:02:02 verbose #3574 > > inl exit_code, output = result |> async.let' +00:02:02 verbose #3575 > > trace Debug (fun () => "5") _locals +00:02:02 verbose #3576 > > (exit_code, output) |> return +00:02:02 verbose #3577 > > |> async.new_async_unit +00:02:02 verbose #3578 > > |> async.run_with_timeout 10000 +00:02:02 verbose #3579 > > |> function +00:02:02 verbose #3580 > > | Some (exit_code, output) => +00:02:02 verbose #3581 > > exit_code |> _assert_eq -2147483648i32 +00:02:02 verbose #3582 > > output |> _assert_eq (join +00:02:02 verbose #3583 > > "System.Threading.Tasks.TaskCanceledException: A task was canceled.") +00:02:02 verbose #3584 > > true +00:02:02 verbose #3585 > > | _ => false +00:02:02 verbose #3586 > > |> _assert_eq true +00:02:04 verbose #3587 > > +00:02:04 verbose #3588 > > ╭─[ 2.07s - stdout ]───────────────────────────────────────────────────────────╮ +00:02:04 verbose #3589 > > │ 00:00:00 debug #1 1 │ +00:02:04 verbose #3590 > > │ 00:00:00 debug #2 2 │ +00:02:04 verbose #3591 > > │ 00:00:00 debug #3 execute_with_options_async / options: struct (Some │ +00:02:04 verbose #3592 > > │ System.Threading.CancellationToken, │ +00:02:04 verbose #3593 > > │ "pwsh -c "Get-Content │ +00:02:04 verbose #3594 > > │ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-0440-1344-4460-40040 │ +00:02:04 verbose #3595 > > │ 0bf3b79\test.txt"", │ +00:02:04 verbose #3596 > > │ [||], None, None, true, None) │ +00:02:04 verbose #3597 > > │ 00:00:00 debug #4 3 │ +00:02:04 verbose #3598 > > │ 00:00:00 debug #5 4 │ +00:02:04 verbose #3599 > > │ 00:00:00 warning #6 execute_with_options_async / WaitForExitAsync / ex: │ +00:02:04 verbose #3600 > > │ System.Threading.Tasks.TaskCanceledException: A task was canceled. │ +00:02:04 verbose #3601 > > │ 00:00:00 debug #7 execute_with_options_async / exit_code: -2147483648 / │ +00:02:04 verbose #3602 > > │ output.Length: 66 │ +00:02:04 verbose #3603 > > │ 00:00:00 debug #8 5 │ +00:02:04 verbose #3604 > > │ assert_eq / actual: -2147483648 / expected: -2147483648 │ +00:02:04 verbose #3605 > > │ assert_eq / actual: "System.Threading.Tasks.TaskCanceledException: A task │ +00:02:04 verbose #3606 > > │ was canceled." / expected: "System.Threading.Tasks.TaskCanceledException: A │ +00:02:04 verbose #3607 > > │ task was canceled." │ +00:02:04 verbose #3608 > > │ assert_eq / actual: true / expected: true │ +00:02:04 verbose #3609 > > │ │ +00:02:04 verbose #3610 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:04 verbose #3611 > > +00:02:04 verbose #3612 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:04 verbose #3613 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:04 verbose #3614 > > │ ## split_args │ +00:02:04 verbose #3615 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:04 verbose #3616 > > +00:02:04 verbose #3617 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:04 verbose #3618 > > union args_parse_step = +00:02:04 verbose #3619 > > | Start +00:02:04 verbose #3620 > > | Quoted : char +00:02:04 verbose #3621 > > | Escaped : u8 * char +00:02:04 verbose #3622 > > +00:02:04 verbose #3623 > > let split_args (args : string) : array_base string = +00:02:04 verbose #3624 > > let rec loop (acc, current) (chars : list char) (step, last) = +00:02:04 verbose #3625 > > // trace Verbose (fun () => $'$"split_args / current: %A{!current} +00:02:04 verbose #3626 > > acc: %A{!acc} / step: %A{!step} / last: %A{!last}"') _locals +00:02:04 verbose #3627 > > match step, last, chars with +00:02:04 verbose #3628 > > | Start, _, ('"' :: tail) => +00:02:04 verbose #3629 > > loop (acc, "") tail (Quoted '"', step) +00:02:04 verbose #3630 > > | Escaped _, _, (('\\' | '\`') & c :: tail) => +00:02:04 verbose #3631 > > loop (acc, current) tail (Quoted c, step) +00:02:04 verbose #3632 > > | Escaped _, Start, ('"' :: tail) => +00:02:04 verbose #3633 > > loop (acc, current) tail (step, step) +00:02:04 verbose #3634 > > | Quoted ('"'), Quoted _, ('"' :: tail) => +00:02:04 verbose #3635 > > loop (acc, current) tail (Start, step) +00:02:04 verbose #3636 > > | Escaped (0, ('\\' | '\`') & c), Quoted ('"'), (c' :: tail) => +00:02:04 verbose #3637 > > loop (acc, $'$"{!current}{!c}{!c'}"') tail (Quoted '"', step) +00:02:04 verbose #3638 > > | Quoted (('\\' | '\`') as c), _, ('"' :: tail) +00:02:04 verbose #3639 > > when last <>. Escaped (0, '\\') && last <>. Escaped (0, '\`') => +00:02:04 verbose #3640 > > loop (acc, $'$"{!current}{!c}\\\""') tail (Quoted '"', step) +00:02:04 verbose #3641 > > | Quoted (('\\' | '\`') as c), Quoted _, ('"' :: tail) => +00:02:04 verbose #3642 > > loop (acc, $'$"{!current}{!c}\\\""') tail (Quoted '"', step) +00:02:04 verbose #3643 > > | Quoted ('\\' | '\`'), _, ('"' :: tail) => +00:02:04 verbose #3644 > > loop (acc, current) tail (Start, step) +00:02:04 verbose #3645 > > | Escaped (n, c), _, ('"' :: tail) => +00:02:04 verbose #3646 > > loop (acc, $'$"{!current}{!c}\\\""') tail (Escaped (n, c), step) +00:02:04 verbose #3647 > > | Quoted _, Quoted _, (('\\' | '\`') & c :: tail) => +00:02:04 verbose #3648 > > loop (acc, current) tail (Escaped (0, c), step) +00:02:04 verbose #3649 > > | Quoted _, _, (('\\' | '\`') & c :: tail) => +00:02:04 verbose #3650 > > loop (acc, current) tail (Escaped (1, c), step) +00:02:04 verbose #3651 > > | Quoted _, Escaped (0, _), ('"' :: tail) => +00:02:04 verbose #3652 > > loop (acc, $'$"{!current}"') tail (Quoted '"', step) +00:02:04 verbose #3653 > > | Quoted _, _, ('"' :: tail) => +00:02:04 verbose #3654 > > loop (acc ++ [[ current ]], "") tail (Start, step) +00:02:04 verbose #3655 > > | (Escaped _ | Quoted _), _, (' ' :: tail) => +00:02:04 verbose #3656 > > loop (acc, $'$"{!current} "') tail (step, step) +00:02:04 verbose #3657 > > | _, _, (('\\' | '\`') & c :: tail) => +00:02:04 verbose #3658 > > loop (acc, current) tail (Escaped (0, c), step) +00:02:04 verbose #3659 > > | _, _, (' ' :: tail) => +00:02:04 verbose #3660 > > loop ((if current = "" then acc else acc ++ [[ current ]]), "") tail +00:02:04 verbose #3661 > > (step, step) +00:02:04 verbose #3662 > > | Escaped (1, _), _, (char :: tail) when last <>. step => +00:02:04 verbose #3663 > > loop (acc, $'$"{!current}\\{!char}"') tail (last, step) +00:02:04 verbose #3664 > > | _, _, (char :: tail) => +00:02:04 verbose #3665 > > loop (acc, $'$"{!current}{!char}"') tail (step, step) +00:02:04 verbose #3666 > > | _ => +00:02:04 verbose #3667 > > (if current = "" then acc else acc ++ [[ current ]]), current +00:02:04 verbose #3668 > > loop +00:02:04 verbose #3669 > > ([[]], "") +00:02:04 verbose #3670 > > ( +00:02:04 verbose #3671 > > args +00:02:04 verbose #3672 > > |> optionm'.of_obj +00:02:04 verbose #3673 > > |> optionm'.unbox +00:02:04 verbose #3674 > > |> optionm'.default_value "" +00:02:04 verbose #3675 > > |> sm'.to_char_array +00:02:04 verbose #3676 > > |> am'.to_list' +00:02:04 verbose #3677 > > |> listm'.unbox +00:02:04 verbose #3678 > > ) +00:02:04 verbose #3679 > > (Start, Start) +00:02:04 verbose #3680 > > |> fst +00:02:04 verbose #3681 > > |> listm'.box +00:02:04 verbose #3682 > > |> listm'.to_array' +00:02:04 verbose #3683 > > |> fun (a x : _ i32 _) => x +00:02:04 verbose #3684 > > +00:02:04 verbose #3685 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:04 verbose #3686 > > //// test +00:02:04 verbose #3687 > > +00:02:04 verbose #3688 > > "a b \"c d\" e" +00:02:04 verbose #3689 > > |> split_args +00:02:04 verbose #3690 > > |> _assert_eq' ;[[ "a"; "b"; "c d"; "e" ]] +00:02:05 verbose #3691 > > +00:02:05 verbose #3692 > > ╭─[ 923.49ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:05 verbose #3693 > > │ assert_eq' / actual: [|"a"; "b"; "c d"; "e"|] / expected: [|"a"; "b"; "c d"; │ +00:02:05 verbose #3694 > > │ "e"|] │ +00:02:05 verbose #3695 > > │ │ +00:02:05 verbose #3696 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:05 verbose #3697 > > +00:02:05 verbose #3698 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:05 verbose #3699 > > //// test +00:02:05 verbose #3700 > > +00:02:05 verbose #3701 > > "a b e" +00:02:05 verbose #3702 > > |> split_args +00:02:05 verbose #3703 > > |> _assert_eq' ;[[ "a"; "b"; "e" ]] +00:02:06 verbose #3704 > > +00:02:06 verbose #3705 > > ╭─[ 1.04s - stdout ]───────────────────────────────────────────────────────────╮ +00:02:06 verbose #3706 > > │ assert_eq' / actual: [|"a"; "b"; "e"|] / expected: [|"a"; "b"; "e"|] │ +00:02:06 verbose #3707 > > │ │ +00:02:06 verbose #3708 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:06 verbose #3709 > > +00:02:06 verbose #3710 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:06 verbose #3711 > > //// test +00:02:06 verbose #3712 > > +00:02:06 verbose #3713 > > "\"a b\" \"e\" \"f\"" +00:02:06 verbose #3714 > > |> split_args +00:02:06 verbose #3715 > > |> _assert_eq' ;[[ "a b"; "e"; "f" ]] +00:02:07 verbose #3716 > > +00:02:07 verbose #3717 > > ╭─[ 895.34ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:07 verbose #3718 > > │ assert_eq' / actual: [|"a b"; "e"; "f"|] / expected: [|"a b"; "e"; "f"|] │ +00:02:07 verbose #3719 > > │ │ +00:02:07 verbose #3720 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:07 verbose #3721 > > +00:02:07 verbose #3722 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:07 verbose #3723 > > //// test +00:02:07 verbose #3724 > > +00:02:07 verbose #3725 > > "a -b \"c \\\"d\\\"\"" +00:02:07 verbose #3726 > > |> split_args +00:02:07 verbose #3727 > > |> _assert_eq' ;[[ "a"; "-b"; "c \\\"d\\\"" ]] +00:02:08 verbose #3728 > > +00:02:08 verbose #3729 > > ╭─[ 861.50ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:08 verbose #3730 > > │ assert_eq' / actual: [|"a"; "-b"; "c \"d\""|] / expected: [|"a"; "-b"; "c │ +00:02:08 verbose #3731 > > │ \"d\""|] │ +00:02:08 verbose #3732 > > │ │ +00:02:08 verbose #3733 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:08 verbose #3734 > > +00:02:08 verbose #3735 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:08 verbose #3736 > > //// test +00:02:08 verbose #3737 > > +00:02:08 verbose #3738 > > "a -b \"c \\\"d\\\" e\"" +00:02:08 verbose #3739 > > |> split_args +00:02:08 verbose #3740 > > |> _assert_eq' ;[[ "a"; "-b"; "c \\\"d\\\" e" ]] +00:02:09 verbose #3741 > > +00:02:09 verbose #3742 > > ╭─[ 892.19ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:09 verbose #3743 > > │ assert_eq' / actual: [|"a"; "-b"; "c \"d\" e"|] / expected: [|"a"; "-b"; "c │ +00:02:09 verbose #3744 > > │ \"d\" e"|] │ +00:02:09 verbose #3745 > > │ │ +00:02:09 verbose #3746 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:09 verbose #3747 > > +00:02:09 verbose #3748 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:09 verbose #3749 > > //// test +00:02:09 verbose #3750 > > +00:02:09 verbose #3751 > > "a -b \"c \`\"d\`\" e\"" +00:02:09 verbose #3752 > > |> split_args +00:02:09 verbose #3753 > > |> _assert_eq' ;[[ "a"; "-b"; "c \`\"d\`\" e" ]] +00:02:10 verbose #3754 > > +00:02:10 verbose #3755 > > ╭─[ 831.31ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:10 verbose #3756 > > │ assert_eq' / actual: [|"a"; "-b"; "c `"d`" e"|] / expected: [|"a"; "-b"; "c │ +00:02:10 verbose #3757 > > │ `"d`" e"|] │ +00:02:10 verbose #3758 > > │ │ +00:02:10 verbose #3759 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:10 verbose #3760 > > +00:02:10 verbose #3761 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:10 verbose #3762 > > //// test +00:02:10 verbose #3763 > > +00:02:10 verbose #3764 > > $'$"--text \\\\\\"\'\'\' value \'\'\'\\\\\\" "' +00:02:10 verbose #3765 > > |> split_args +00:02:10 verbose #3766 > > |> _assert_eq' ;[[ "--text"; "''' value '''" ]] +00:02:10 verbose #3767 > > +00:02:10 verbose #3768 > > ╭─[ 767.97ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:10 verbose #3769 > > │ assert_eq' / actual: [|"--text"; "''' value '''"|] / expected: [|"--text"; │ +00:02:10 verbose #3770 > > │ "''' value '''"|] │ +00:02:10 verbose #3771 > > │ │ +00:02:10 verbose #3772 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:10 verbose #3773 > > +00:02:10 verbose #3774 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:10 verbose #3775 > > //// test +00:02:10 verbose #3776 > > +00:02:10 verbose #3777 > > $'\@$"run ""get c:\\test.txt"""' +00:02:10 verbose #3778 > > |> split_args +00:02:10 verbose #3779 > > |> _assert_eq' ;[[ "run"; "get c:\\test.txt" ]] +00:02:11 verbose #3780 > > +00:02:11 verbose #3781 > > ╭─[ 679.60ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:11 verbose #3782 > > │ assert_eq' / actual: [|"run"; "get c:\test.txt"|] / expected: [|"run"; "get │ +00:02:11 verbose #3783 > > │ c:\test.txt"|] │ +00:02:11 verbose #3784 > > │ │ +00:02:11 verbose #3785 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:11 verbose #3786 > > +00:02:11 verbose #3787 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:11 verbose #3788 > > //// test +00:02:11 verbose #3789 > > +00:02:11 verbose #3790 > > "pwsh -c \"$x -replace '(id=`\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + +00:02:11 verbose #3791 > > `$counter++ }\"" +00:02:11 verbose #3792 > > |> split_args +00:02:11 verbose #3793 > > |> _assert_eq' ;[[ "pwsh"; "-c"; "$x -replace +00:02:11 verbose #3794 > > '(id=`\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$counter++ }" ]] +00:02:12 verbose #3795 > > +00:02:12 verbose #3796 > > ╭─[ 603.19ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:12 verbose #3797 > > │ assert_eq' / actual: [|"pwsh"; "-c"; │ +00:02:12 verbose #3798 > > │ "$x -replace '(id=`"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │ +00:02:12 verbose #3799 > > │ / expected: [|"pwsh"; "-c"; │ +00:02:12 verbose #3800 > > │ "$x -replace '(id=`"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │ +00:02:12 verbose #3801 > > │ │ +00:02:12 verbose #3802 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:12 verbose #3803 > > +00:02:12 verbose #3804 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:12 verbose #3805 > > //// test +00:02:12 verbose #3806 > > +00:02:12 verbose #3807 > > $'$"pwsh -c \\\"$x -replace \'(id=\\\\\\"cell-id=)[[a-fA-F0-9]]{{8}}\', {{ +00:02:12 verbose #3808 > > \`$_[[1]] + \`$counter++ }}\\\""' +00:02:12 verbose #3809 > > |> split_args +00:02:12 verbose #3810 > > |> _assert_eq' ;[[ "pwsh"; "-c"; "$x -replace +00:02:12 verbose #3811 > > '(id=\\\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$counter++ }" ]] +00:02:12 verbose #3812 > > +00:02:12 verbose #3813 > > ╭─[ 720.96ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:12 verbose #3814 > > │ assert_eq' / actual: [|"pwsh"; "-c"; │ +00:02:12 verbose #3815 > > │ "$x -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │ +00:02:12 verbose #3816 > > │ / expected: [|"pwsh"; "-c"; │ +00:02:12 verbose #3817 > > │ "$x -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │ +00:02:12 verbose #3818 > > │ │ +00:02:12 verbose #3819 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:12 verbose #3820 > > +00:02:12 verbose #3821 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:12 verbose #3822 > > //// test +00:02:12 verbose #3823 > > +00:02:12 verbose #3824 > > $'$"a --b --c d --e \\\"c:/f f/test.hangul.md\\\" --output \\\"c:/md.pdf\\\" +00:02:12 verbose #3825 > > --set tex.template.add \\\"\\\\usepackage{{cjkutf8-ko}}\\\" +00:02:12 verbose #3826 > > rendering.highlight.theme \\\"Solarized (dark)\\\""' +00:02:12 verbose #3827 > > |> split_args +00:02:12 verbose #3828 > > |> _assert_eq' ;[[ "a"; "--b"; "--c"; "d"; "--e"; "c:/f f/test.hangul.md"; +00:02:12 verbose #3829 > > "--output"; "c:/md.pdf"; "--set"; "tex.template.add"; +00:02:12 verbose #3830 > > "\\usepackage{cjkutf8-ko}"; "rendering.highlight.theme"; "Solarized (dark)" ]] +00:02:13 verbose #3831 > > +00:02:13 verbose #3832 > > ╭─[ 604.45ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:13 verbose #3833 > > │ assert_eq' / actual: [|"a"; "--b"; "--c"; "d"; "--e"; "c:/f │ +00:02:13 verbose #3834 > > │ f/test.hangul.md"; "--output"; │ +00:02:13 verbose #3835 > > │ "c:/md.pdf"; "--set"; "tex.template.add"; "\usepackage{cjkutf8-ko}"; │ +00:02:13 verbose #3836 > > │ "rendering.highlight.theme"; "Solarized (dark)"|] / expected: [|"a"; │ +00:02:13 verbose #3837 > > │ "--b"; "--c"; "d"; "--e"; "c:/f f/test.hangul.md"; "--output"; │ +00:02:13 verbose #3838 > > │ "c:/md.pdf"; "--set"; "tex.template.add"; "\usepackage{cjkutf8-ko}"; │ +00:02:13 verbose #3839 > > │ "rendering.highlight.theme"; "Solarized (dark)"|] │ +00:02:13 verbose #3840 > > │ │ +00:02:13 verbose #3841 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3842 > > +00:02:13 verbose #3843 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3844 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3845 > > │ ## stdin_write_all │ +00:02:13 verbose #3846 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3847 > > +00:02:13 verbose #3848 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3849 > > inl stdin_write_all (stdin : threading.mutex_guard process_child_stdin) (text : +00:02:13 verbose #3850 > > string) : () = +00:02:13 verbose #3851 > > inl stream = text |> sm'.as_bytes +00:02:13 verbose #3852 > > inl stdin = join stdin +00:02:13 verbose #3853 > > (!\($'"true; let mut !stdin = !stdin"') : bool) |> ignore +00:02:13 verbose #3854 > > (!\\(stdin, $'"true; std::io::Write::write_all(&mut *$0, +00:02:13 verbose #3855 > > !stream).unwrap()"') : bool) |> ignore +00:02:13 verbose #3856 > > +00:02:13 verbose #3857 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3858 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3859 > > │ ## stdin_flush │ +00:02:13 verbose #3860 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3861 > > +00:02:13 verbose #3862 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3863 > > inl stdin_flush (stdin : threading.mutex_guard process_child_stdin) : () = +00:02:13 verbose #3864 > > inl stdin = join stdin +00:02:13 verbose #3865 > > (!\($'"true; let mut !stdin = !stdin"') : bool) |> ignore +00:02:13 verbose #3866 > > (!\\(stdin, $'"true; std::io::Write::flush(&mut *$0).unwrap()"') : bool) |> +00:02:13 verbose #3867 > > ignore +00:02:13 verbose #3868 > > +00:02:13 verbose #3869 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3870 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3871 > > │ ## new_process_command │ +00:02:13 verbose #3872 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3873 > > +00:02:13 verbose #3874 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3875 > > inl new_process_command (file_name : string) : process_command = +00:02:13 verbose #3876 > > !\\(file_name, $'"std::process::Command::new(&*$0)"') +00:02:13 verbose #3877 > > +00:02:13 verbose #3878 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3879 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3880 > > │ ## process_stdio_piped │ +00:02:13 verbose #3881 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3882 > > +00:02:13 verbose #3883 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3884 > > inl process_stdio_piped () : process_stdio = +00:02:13 verbose #3885 > > !\($'"std::process::Stdio::piped()"') +00:02:13 verbose #3886 > > +00:02:13 verbose #3887 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3888 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3889 > > │ ## process_command_args │ +00:02:13 verbose #3890 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3891 > > +00:02:13 verbose #3892 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3893 > > inl process_command_args (args : am'.vec sm'.std_string) (c : process_command) : +00:02:13 verbose #3894 > > rust.ref' (rust.mut' process_command) = +00:02:13 verbose #3895 > > (!\($'"true; let mut !c = !c"') : bool) |> ignore +00:02:13 verbose #3896 > > !\\((c, args), $'"std::process::Command::args(&mut $0, &*$1)"') +00:02:13 verbose #3897 > > +00:02:13 verbose #3898 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3899 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3900 > > │ ## process_command_stdout │ +00:02:13 verbose #3901 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3902 > > +00:02:13 verbose #3903 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3904 > > inl process_command_stdout (stdio : process_stdio) (c : rust.ref' (rust.mut' +00:02:13 verbose #3905 > > process_command)) : rust.ref' (rust.mut' process_command) = +00:02:13 verbose #3906 > > !\\(c, $'"std::process::Command::stdout($0, std::process::Stdio::piped())"') +00:02:13 verbose #3907 > > +00:02:13 verbose #3908 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3909 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3910 > > │ ## process_command_stderr │ +00:02:13 verbose #3911 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3912 > > +00:02:13 verbose #3913 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3914 > > inl process_command_stderr (stdio : process_stdio) (c : rust.ref' (rust.mut' +00:02:13 verbose #3915 > > process_command)) : rust.ref' (rust.mut' process_command) = +00:02:13 verbose #3916 > > !\\(c, $'"std::process::Command::stderr($0, std::process::Stdio::piped())"') +00:02:13 verbose #3917 > > +00:02:13 verbose #3918 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3919 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3920 > > │ ## process_command_stdin │ +00:02:13 verbose #3921 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3922 > > +00:02:13 verbose #3923 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3924 > > inl process_command_stdin (stdio : process_stdio) (c : rust.ref' (rust.mut' +00:02:13 verbose #3925 > > process_command)) : rust.ref' (rust.mut' process_command) = +00:02:13 verbose #3926 > > !\\(c, $'"std::process::Command::stdin($0, std::process::Stdio::piped())"') +00:02:13 verbose #3927 > > +00:02:13 verbose #3928 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3929 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3930 > > │ ## process_command_current_dir │ +00:02:13 verbose #3931 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3932 > > +00:02:13 verbose #3933 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3934 > > inl process_command_current_dir +00:02:13 verbose #3935 > > (dir : string) +00:02:13 verbose #3936 > > (c : rust.ref' (rust.mut' process_command)) +00:02:13 verbose #3937 > > : rust.ref' (rust.mut' process_command) +00:02:13 verbose #3938 > > = +00:02:13 verbose #3939 > > !\\(dir, $'"std::process::Command::current_dir(!c, &*$0)"') +00:02:13 verbose #3940 > > +00:02:13 verbose #3941 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3942 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3943 > > │ ## process_command_env │ +00:02:13 verbose #3944 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3945 > > +00:02:13 verbose #3946 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3947 > > inl process_command_env +00:02:13 verbose #3948 > > (key : string) +00:02:13 verbose #3949 > > (value : string) +00:02:13 verbose #3950 > > (c : rust.ref' (rust.mut' process_command)) +00:02:13 verbose #3951 > > : rust.ref' (rust.mut' process_command) +00:02:13 verbose #3952 > > = +00:02:13 verbose #3953 > > !\\((key, value), $'"std::process::Command::env(!c, &*$0, &*$1)"') +00:02:13 verbose #3954 > > +00:02:13 verbose #3955 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3956 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3957 > > │ ## process_command_spawn │ +00:02:13 verbose #3958 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3959 > > +00:02:13 verbose #3960 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3961 > > inl process_command_spawn +00:02:13 verbose #3962 > > (c : rust.ref' (rust.mut' process_command)) +00:02:13 verbose #3963 > > : resultm.result' process_child stream.io_error +00:02:13 verbose #3964 > > = +00:02:13 verbose #3965 > > !\\(c, $'"std::process::Command::spawn($0)"') +00:02:13 verbose #3966 > > +00:02:13 verbose #3967 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3968 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3969 > > │ ## child_wait_with_output │ +00:02:13 verbose #3970 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3971 > > +00:02:13 verbose #3972 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3973 > > inl child_wait_with_output +00:02:13 verbose #3974 > > (child : process_child) +00:02:13 verbose #3975 > > : resultm.result' process_output stream.io_error +00:02:13 verbose #3976 > > = +00:02:13 verbose #3977 > > !\\(child, $'"$0.wait_with_output()"') +00:02:13 verbose #3978 > > +00:02:13 verbose #3979 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #3980 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #3981 > > │ ## stdio_line │ +00:02:13 verbose #3982 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #3983 > > +00:02:13 verbose #3984 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #3985 > > inl stdio_line +00:02:13 verbose #3986 > > (stdio : result () ()) +00:02:13 verbose #3987 > > (trace' : bool) +00:02:13 verbose #3988 > > (channel_sender : threading.arc (threading.mutex (threading.channel_sender +00:02:13 verbose #3989 > > sm'.std_string))) +00:02:13 verbose #3990 > > (line : resultm.result' sm'.std_string stream.io_error) +00:02:13 verbose #3991 > > : resultm.result' () sm'.std_string +00:02:13 verbose #3992 > > = +00:02:13 verbose #3993 > > inl highlight text = +00:02:13 verbose #3994 > > $'$"\\u001b[[4;7m{!text}\\u001b[[0m"' +00:02:13 verbose #3995 > > inl line = +00:02:13 verbose #3996 > > match +00:02:13 verbose #3997 > > line +00:02:13 verbose #3998 > > |> resultm.map_error' sm'.format' +00:02:13 verbose #3999 > > |> resultm.unbox' +00:02:13 verbose #4000 > > with +00:02:13 verbose #4001 > > | Ok line => +00:02:13 verbose #4002 > > inl line = +00:02:13 verbose #4003 > > line +00:02:13 verbose #4004 > > |> sm'.from_std_string +00:02:13 verbose #4005 > > // |> sm'.as_bytes +00:02:13 verbose #4006 > > // |> am'.slice_to_vec +00:02:13 verbose #4007 > > |> sm'.encoding_encode' (sm'.encoding_utf8' ()) +00:02:13 verbose #4008 > > |> rust.cow_as_ref +00:02:13 verbose #4009 > > |> sm'.str_from_utf8 +00:02:13 verbose #4010 > > // |> sm'.utf8_decode +00:02:13 verbose #4011 > > |> resultm.unwrap' +00:02:13 verbose #4012 > > |> sm'.ref_to_std_string +00:02:13 verbose #4013 > > // String::from_utf8_lossy(line.as_bytes()).into() +00:02:13 verbose #4014 > > inl line_log = line |> sm'.from_std_string +00:02:13 verbose #4015 > > inl text = +00:02:13 verbose #4016 > > match stdio with +00:02:13 verbose #4017 > > | Ok () => $'$"> {!line_log}"' +00:02:13 verbose #4018 > > | Error () => $'$"\! {!line_log}"' +00:02:13 verbose #4019 > > if trace' +00:02:13 verbose #4020 > > then trace Verbose (fun () => text) _locals +00:02:13 verbose #4021 > > else text |> console.write_line +00:02:13 verbose #4022 > > match stdio with +00:02:13 verbose #4023 > > | Ok () => line +00:02:13 verbose #4024 > > | Error () => line |> highlight |> sm'.to_std_string +00:02:13 verbose #4025 > > | Error e => +00:02:13 verbose #4026 > > trace Critical +00:02:13 verbose #4027 > > fun () => $'$"runtime.stdio_line"' +00:02:13 verbose #4028 > > fun () => $'$"e: {!e} / {!_locals ()}"' +00:02:13 verbose #4029 > > e |> highlight |> sm'.to_std_string +00:02:13 verbose #4030 > > channel_sender +00:02:13 verbose #4031 > > |> threading.arc_mutex_lock +00:02:13 verbose #4032 > > |> resultm.unwrap' +00:02:13 verbose #4033 > > |> threading.mutex_guard_ref +00:02:13 verbose #4034 > > |> threading.channel_send line +00:02:13 verbose #4035 > > |> resultm.map_error' sm'.format' +00:02:13 verbose #4036 > > +00:02:13 verbose #4037 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #4038 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #4039 > > │ ## execute_with_options │ +00:02:13 verbose #4040 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #4041 > > +00:02:13 verbose #4042 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #4043 > > let execute_with_options (options : execution_options) : i32 * string = +00:02:13 verbose #4044 > > run_target function +00:02:13 verbose #4045 > > | Fsharp (Native) => fun () => +00:02:13 verbose #4046 > > options |> execute_with_options_async |> async.run_synchronously +00:02:13 verbose #4047 > > | Rust (Native) => fun () => +00:02:13 verbose #4048 > > inl command = join options.command +00:02:13 verbose #4049 > > inl file_name, arguments = command |> split_command +00:02:13 verbose #4050 > > inl arguments = +00:02:13 verbose #4051 > > arguments +00:02:13 verbose #4052 > > |> split_args +00:02:13 verbose #4053 > > |> am'.to_vec +00:02:13 verbose #4054 > > |> am'.vec_map sm'.to_std_string +00:02:13 verbose #4055 > > +00:02:13 verbose #4056 > > trace Debug +00:02:13 verbose #4057 > > fun () => $'$"runtime.execute_with_options"' +00:02:13 verbose #4058 > > fun () => $'$"file_name: {!file_name} / arguments: +00:02:13 verbose #4059 > > %A{!arguments} / options: %A{!options} / {!_locals ()}"' +00:02:13 verbose #4060 > > +00:02:13 verbose #4061 > > fun () => +00:02:13 verbose #4062 > > fun () => +00:02:13 verbose #4063 > > file_name +00:02:13 verbose #4064 > > |> new_process_command +00:02:13 verbose #4065 > > |> process_command_args arguments +00:02:13 verbose #4066 > > |> process_command_stdout (process_stdio_piped ()) +00:02:13 verbose #4067 > > |> process_command_stderr (process_stdio_piped ()) +00:02:13 verbose #4068 > > |> process_command_stdin (process_stdio_piped ()) +00:02:13 verbose #4069 > > |> fun command => +00:02:13 verbose #4070 > > match options.working_directory |> optionm'.unbox with +00:02:13 verbose #4071 > > | Some working_directory => command |> +00:02:13 verbose #4072 > > process_command_current_dir working_directory +00:02:13 verbose #4073 > > | None => command +00:02:13 verbose #4074 > > |> fun command => +00:02:13 verbose #4075 > > match options.environment_variables with +00:02:13 verbose #4076 > > | ;[[]] => command +00:02:13 verbose #4077 > > | vars => +00:02:13 verbose #4078 > > (command, vars |> am'.to_vec) +00:02:13 verbose #4079 > > ||> am'.vec_fold' fun command (key, value) => +00:02:13 verbose #4080 > > command |> process_command_env key value +00:02:13 verbose #4081 > > |> process_command_spawn +00:02:13 verbose #4082 > > |> resultm.map_error' sm'.format' +00:02:13 verbose #4083 > > |> resultm.map' (optionm'.some' >> threading.new_arc_mutex) +00:02:13 verbose #4084 > > |> resultm.unbox' +00:02:13 verbose #4085 > > |> function +00:02:13 verbose #4086 > > | Ok child => +00:02:13 verbose #4087 > > // inl stdout = +00:02:13 verbose #4088 > > // child +00:02:13 verbose #4089 > > // |> threading.arc_mutex_lock +00:02:13 verbose #4090 > > // |> resultm.unwrap' +00:02:13 verbose #4091 > > // |> threading.mutex_guard_ref_mut +00:02:13 verbose #4092 > > // |> optionm'.as_mut +00:02:13 verbose #4093 > > // |> optionm'.unwrap +00:02:13 verbose #4094 > > // |> process_child_stdout +00:02:13 verbose #4095 > > // |> optionm'.ref_take +00:02:13 verbose #4096 > > // |> optionm'.unwrap +00:02:13 verbose #4097 > > // |> optionm'.some' +00:02:13 verbose #4098 > > // |> threading.new_arc_mutex +00:02:13 verbose #4099 > > // inl stderr = +00:02:13 verbose #4100 > > // child +00:02:13 verbose #4101 > > // |> threading.arc_mutex_lock +00:02:13 verbose #4102 > > // |> resultm.unwrap' +00:02:13 verbose #4103 > > // |> threading.mutex_guard_ref_mut +00:02:13 verbose #4104 > > // |> optionm'.as_mut +00:02:13 verbose #4105 > > // |> optionm'.unwrap +00:02:13 verbose #4106 > > // |> process_child_stderr +00:02:13 verbose #4107 > > // |> optionm'.ref_take +00:02:13 verbose #4108 > > // |> optionm'.unwrap +00:02:13 verbose #4109 > > // |> optionm'.some' +00:02:13 verbose #4110 > > // |> threading.new_arc_mutex +00:02:13 verbose #4111 > > // inl stdin = +00:02:13 verbose #4112 > > // child +00:02:13 verbose #4113 > > // |> threading.arc_mutex_lock +00:02:13 verbose #4114 > > // |> resultm.unwrap' +00:02:13 verbose #4115 > > // |> threading.mutex_guard_ref_mut +00:02:13 verbose #4116 > > // |> optionm'.as_mut +00:02:13 verbose #4117 > > // |> optionm'.unwrap +00:02:13 verbose #4118 > > // |> process_child_stdin +00:02:13 verbose #4119 > > // |> optionm'.ref_take +00:02:13 verbose #4120 > > // |> optionm'.unwrap +00:02:13 verbose #4121 > > // |> optionm'.some' +00:02:13 verbose #4122 > > // |> threading.new_arc_mutex +00:02:13 verbose #4123 > > +00:02:13 verbose #4124 > > inl stdout : process_child_stdout = +00:02:13 verbose #4125 > > !\\(child, +00:02:13 verbose #4126 > > $'"$0.lock().unwrap().as_mut().unwrap().stdout.take().unwrap()"') +00:02:13 verbose #4127 > > inl stderr : process_child_stderr = +00:02:13 verbose #4128 > > !\\(child, +00:02:13 verbose #4129 > > $'"$0.lock().unwrap().as_mut().unwrap().stderr.take().unwrap()"') +00:02:13 verbose #4130 > > inl stdin : process_child_stdin = +00:02:13 verbose #4131 > > !\\(child, +00:02:13 verbose #4132 > > $'"$0.lock().unwrap().as_mut().unwrap().stdin.take().unwrap()"') +00:02:13 verbose #4133 > > inl stdout = stdout |> threading.new_arc_mutex +00:02:13 verbose #4134 > > inl stderr = stderr |> threading.new_arc_mutex +00:02:13 verbose #4135 > > inl stdin = stdin |> optionm'.some' |> +00:02:13 verbose #4136 > > threading.new_arc_mutex +00:02:13 verbose #4137 > > inl channel_sender, channel_receiver = +00:02:13 verbose #4138 > > threading.new_channel () +00:02:13 verbose #4139 > > inl channel_sender'' = channel_sender |> +00:02:13 verbose #4140 > > threading.new_arc_mutex +00:02:13 verbose #4141 > > inl channel_sender' = channel_sender |> +00:02:13 verbose #4142 > > threading.new_arc_mutex +00:02:13 verbose #4143 > > inl channel_receiver' = channel_receiver |> +00:02:13 verbose #4144 > > threading.new_arc_mutex +00:02:13 verbose #4145 > > +00:02:13 verbose #4146 > > inl stdout_handle = +00:02:13 verbose #4147 > > fun () => +00:02:13 verbose #4148 > > stdout +00:02:13 verbose #4149 > > |> threading.arc_mutex_lock +00:02:13 verbose #4150 > > |> resultm.unwrap' +00:02:13 verbose #4151 > > |> threading.mutex_guard_ref_mut +00:02:13 verbose #4152 > > |> stream.decode_reader_bytes_build +00:02:13 verbose #4153 > > |> stream.new_buf_reader +00:02:13 verbose #4154 > > |> stream.buf_read_lines +00:02:13 verbose #4155 > > |> iter.try_for_each fun lines => +00:02:13 verbose #4156 > > inl channel_sender'' = channel_sender'' +00:02:13 verbose #4157 > > |> rust.clone +00:02:13 verbose #4158 > > lines +00:02:13 verbose #4159 > > |> stdio_line (Ok ()) options.trace +00:02:13 verbose #4160 > > channel_sender'' +00:02:13 verbose #4161 > > |> resultm.to_try +00:02:13 verbose #4162 > > |> threading.spawn (1, 0) 1 +00:02:13 verbose #4163 > > +00:02:13 verbose #4164 > > inl stderr_handle = +00:02:13 verbose #4165 > > fun () => +00:02:13 verbose #4166 > > stderr +00:02:13 verbose #4167 > > |> threading.arc_mutex_lock +00:02:13 verbose #4168 > > |> resultm.unwrap' +00:02:13 verbose #4169 > > |> threading.mutex_guard_ref_mut +00:02:13 verbose #4170 > > |> stream.decode_reader_bytes_build +00:02:13 verbose #4171 > > |> stream.new_buf_reader +00:02:13 verbose #4172 > > |> stream.buf_read_lines +00:02:13 verbose #4173 > > |> iter.try_for_each fun lines => +00:02:13 verbose #4174 > > inl channel_sender' = channel_sender' |> +00:02:13 verbose #4175 > > rust.clone +00:02:13 verbose #4176 > > lines +00:02:13 verbose #4177 > > |> stdio_line (Error ()) options.trace +00:02:13 verbose #4178 > > channel_sender' +00:02:13 verbose #4179 > > |> resultm.to_try +00:02:13 verbose #4180 > > |> threading.spawn (1, 0) 1 +00:02:13 verbose #4181 > > +00:02:13 verbose #4182 > > match options.stdin |> optionm'.unbox with +00:02:13 verbose #4183 > > | Some stdin' => +00:02:13 verbose #4184 > > stdin +00:02:13 verbose #4185 > > |> threading.arc_mutex_lock +00:02:13 verbose #4186 > > |> resultm.unwrap' +00:02:13 verbose #4187 > > |> threading.mutex_guard_ref_mut +00:02:13 verbose #4188 > > |> optionm'.ref_take +00:02:13 verbose #4189 > > |> optionm'.map' threading.new_arc_mutex +00:02:13 verbose #4190 > > |> optionm'.unbox +00:02:13 verbose #4191 > > |> function +00:02:13 verbose #4192 > > | Some stdin => +00:02:13 verbose #4193 > > stdin |> stdin' +00:02:13 verbose #4194 > > stdin +00:02:13 verbose #4195 > > |> threading.arc_mutex_lock +00:02:13 verbose #4196 > > |> resultm.unwrap' +00:02:13 verbose #4197 > > |> stdin_flush +00:02:13 verbose #4198 > > | None => () +00:02:13 verbose #4199 > > | None => () +00:02:13 verbose #4200 > > +00:02:13 verbose #4201 > > inl output = +00:02:13 verbose #4202 > > child +00:02:13 verbose #4203 > > |> threading.arc_mutex_lock +00:02:13 verbose #4204 > > |> resultm.unwrap' +00:02:13 verbose #4205 > > |> threading.mutex_guard_ref_mut +00:02:13 verbose #4206 > > |> optionm'.ref_take +00:02:13 verbose #4207 > > |> optionm'.unwrap +00:02:13 verbose #4208 > > |> child_wait_with_output +00:02:13 verbose #4209 > > |> resultm.map_error' sm'.format' +00:02:13 verbose #4210 > > +00:02:13 verbose #4211 > > [[ stdout_handle; stderr_handle ]] +00:02:13 verbose #4212 > > |> am'.new_vec +00:02:13 verbose #4213 > > |> am'.vec_for_each' (threading.join' >> +00:02:13 verbose #4214 > > resultm.unwrap' >> resultm.unwrap') +00:02:13 verbose #4215 > > +00:02:13 verbose #4216 > > match output |> resultm.unbox with +00:02:13 verbose #4217 > > | Ok output => +00:02:13 verbose #4218 > > inl exit_code = +00:02:13 verbose #4219 > > output +00:02:13 verbose #4220 > > |> process_output_status +00:02:13 verbose #4221 > > |> process_exit_status_code +00:02:13 verbose #4222 > > |> optionm'.unwrap +00:02:13 verbose #4223 > > exit_code, None, Some channel_receiver' +00:02:13 verbose #4224 > > | Error error => +00:02:13 verbose #4225 > > trace Critical +00:02:13 verbose #4226 > > fun () => $'$"runtime.execute_with_options +00:02:13 verbose #4227 > > output error"' +00:02:13 verbose #4228 > > fun () => $'$"error: {!error} / {!_locals +00:02:13 verbose #4229 > > ()}"' +00:02:13 verbose #4230 > > -2i32, error |> Some, None +00:02:13 verbose #4231 > > | Error error => +00:02:13 verbose #4232 > > trace Critical +00:02:13 verbose #4233 > > fun () => $'$"runtime.execute_with_options +00:02:13 verbose #4234 > > child error"' +00:02:13 verbose #4235 > > fun () => $'$"error: {!error} / {!_locals ()}"' +00:02:13 verbose #4236 > > -1i32, error |> Some, None +00:02:13 verbose #4237 > > |> function +00:02:13 verbose #4238 > > | exit_code, std_trace, channel_receiver => +00:02:13 verbose #4239 > > inl std_trace = +00:02:13 verbose #4240 > > channel_receiver +00:02:13 verbose #4241 > > |> optionm'.box +00:02:13 verbose #4242 > > |> optionm'.map' fun channel_receiver => +00:02:13 verbose #4243 > > channel_receiver +00:02:13 verbose #4244 > > |> threading.arc_mutex_lock +00:02:13 verbose #4245 > > |> resultm.unwrap' +00:02:13 verbose #4246 > > |> iter.iter +00:02:13 verbose #4247 > > |> iter_prototypes.iter_collect'' +00:02:13 verbose #4248 > > |> am'.vec_map sm'.from_std_string +00:02:13 verbose #4249 > > |> am'.from_vec +00:02:13 verbose #4250 > > |> fun x => x : _ i32 _ +00:02:13 verbose #4251 > > |> seq.of_array +00:02:13 verbose #4252 > > |> sm'.concat "\n" +00:02:13 verbose #4253 > > |> optionm'.default_value' ( +00:02:13 verbose #4254 > > std_trace +00:02:13 verbose #4255 > > |> optionm.map sm'.from_std_string +00:02:13 verbose #4256 > > |> optionm'.default_value "" +00:02:13 verbose #4257 > > ) +00:02:13 verbose #4258 > > trace Verbose +00:02:13 verbose #4259 > > fun () => $'$"runtime.execute_with_options +00:02:13 verbose #4260 > > result"' +00:02:13 verbose #4261 > > fun () => $'$"exit_code: {!exit_code} +00:02:13 verbose #4262 > > std_trace.Length: {!std_trace.Length} / {!_locals ()}"' +00:02:13 verbose #4263 > > new_pair exit_code std_trace +00:02:13 verbose #4264 > > |> capture +00:02:13 verbose #4265 > > |> async.future_init (3, 2) 1 +00:02:13 verbose #4266 > > |> async.block_on +00:02:13 verbose #4267 > > |> from_pair +00:02:13 verbose #4268 > > | _ => fun () => null () +00:02:13 verbose #4269 > > +00:02:13 verbose #4270 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #4271 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #4272 > > │ ### execute │ +00:02:13 verbose #4273 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #4274 > > +00:02:13 verbose #4275 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #4276 > > inl execute command = +00:02:13 verbose #4277 > > execution_options fun x => { x with +00:02:13 verbose #4278 > > command = command +00:02:13 verbose #4279 > > } +00:02:13 verbose #4280 > > |> execute_with_options +00:02:13 verbose #4281 > > +00:02:13 verbose #4282 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:13 verbose #4283 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:13 verbose #4284 > > │ ### test 1 │ +00:02:13 verbose #4285 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:13 verbose #4286 > > +00:02:13 verbose #4287 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:13 verbose #4288 > > //// test +00:02:13 verbose #4289 > > ///! rust -d chrono encoding_rs encoding_rs_io futures futures-lite regex +00:02:13 verbose #4290 > > +00:02:13 verbose #4291 > > types () +00:02:13 verbose #4292 > > inl temp_folder, disposable = file_system.create_temp_directory () +00:02:13 verbose #4293 > > inl content = "╭─[[ 你好,世界!こんにちは世界! ]]─╮" +00:02:13 verbose #4294 > > // inl content = "test" +00:02:13 verbose #4295 > > fun () => +00:02:13 verbose #4296 > > inl file_name = join "test.txt" +00:02:13 verbose #4297 > > inl path = temp_folder </> file_name |> file_system.normalize_path +00:02:13 verbose #4298 > > inl exit_code, result = +00:02:13 verbose #4299 > > execute $'\@$"pwsh -c ""[[IO.File]]::ReadAllText(\'{!path}\')"""' +00:02:13 verbose #4300 > > exit_code |> _assert_eq 1 +00:02:13 verbose #4301 > > result |> _assert_string_contains "not find file" +00:02:13 verbose #4302 > > +00:02:13 verbose #4303 > > content |> file_system.write_all_text path +00:02:13 verbose #4304 > > +00:02:13 verbose #4305 > > execution_options fun x => { x with +00:02:13 verbose #4306 > > command = $'\@$"cat ""{!file_name}"""' +00:02:13 verbose #4307 > > working_directory = Some temp_folder |> optionm'.box +00:02:13 verbose #4308 > > } +00:02:13 verbose #4309 > > |> execute_with_options +00:02:13 verbose #4310 > > |> ignore +00:02:13 verbose #4311 > > +00:02:13 verbose #4312 > > execution_options fun x => { x with +00:02:13 verbose #4313 > > command = $'\@$"pwsh -c ""[[System.Console]]::OutputEncoding = +00:02:13 verbose #4314 > > [[System.Text.Encoding]]::UTF8; [[IO.File]]::ReadAllText(\'{!file_name}\')"""' +00:02:13 verbose #4315 > > working_directory = Some temp_folder |> optionm'.box +00:02:13 verbose #4316 > > } +00:02:13 verbose #4317 > > |> execute_with_options +00:02:13 verbose #4318 > > |> fun fn => fn () |> Some +00:02:13 verbose #4319 > > |> function +00:02:13 verbose #4320 > > | Some (exit_code, output) => +00:02:13 verbose #4321 > > exit_code |> _assert_eq 0i32 +00:02:13 verbose #4322 > > output |> _assert_eq content +00:02:13 verbose #4323 > > true +00:02:13 verbose #4324 > > | _ => false +00:02:13 verbose #4325 > > |> _assert_eq true +00:02:13 verbose #4326 > > disposable |> use |> ignore +00:02:23 verbose #4327 > > +00:02:23 verbose #4328 > > ╭─[ 9.60s - return value ]─────────────────────────────────────────────────────╮ +00:02:23 verbose #4329 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │ +00:02:23 verbose #4330 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_b4bc1ce1a9925b66fe43056b79 │ +00:02:23 verbose #4331 > > │ 2e895a507b337bf890c023ce2150afbeed17bb\20240520-0440-3106-5615-0000001c0df6 │ +00:02:23 verbose #4332 > > │ 00:00:00 debug #2 runtime.execute_with_options / file_name: pwsh / │ +00:02:23 verbose #4333 > > │ arguments: ["-c", "[ │ +00:02:23 verbose #4334 > > │ IO.File]::ReadAllText('c:/Users/i574n/AppData/Local/Temp/!spiral_builder_b4b │ +00:02:23 verbose #4335 > > │ c1ce1a9925b66fe43056b792e895a507b337bf890c023ce2150afbeed17bb/20240520-0440- │ +00:02:23 verbose #4336 > > │ 3106-5615-0000001c0df6/test.txt')"] / options: (None, "pwsh -c "[ │ +00:02:23 verbose #4337 > > │ IO.File]::ReadAllText('c:/Users/i574n/AppData/Local/Temp/!spiral_builder_b4b │ +00:02:23 verbose #4338 > > │ c1ce1a9925b66fe43056b792e895a507b337bf890c023ce2150afbeed17bb/20240520-0440- │ +00:02:23 verbose #4339 > > │ 3106-5615-0000001c0df6/test.txt')"", Array(MutCell([])), None, None, true, │ +00:02:23 verbose #4340 > > │ None) │ +00:02:23 verbose #4341 > > │ 00:00:00 verbose #3 ! MethodInvocationException: Exception │ +00:02:23 verbose #4342 > > │ calling "ReadAllText" with "1" argument(s): "Could not find file │ +00:02:23 verbose #4343 > > │ 'c:\Users\i574n\AppData\Local\Temp\!spiral_builder_b4bc1ce1a9925b66fe43056b7 │ +00:02:23 verbose #4344 > > │ 92e895a507b337bf890c023ce2150afbeed17bb\20240520-0440-3106-5615-0000001c0df6 │ +00:02:23 verbose #4345 > > │ \test.txt'." │ +00:02:23 verbose #4346 > > │ 00:00:00 verbose #4 runtime.execute_with_options / result / exit_code: │ +00:02:23 verbose #4347 > > │ 1 / std_trace.Length: 294 │ +00:02:23 verbose #4348 > > │ assert_eq / actual: 1 / expected: 1 │ +00:02:23 verbose #4349 > > │ assert_string_contains / actual: "not find file" / expected: "[ │ +00:02:23 verbose #4350 > > │ 31;1mMethodInvocationException: Exception calling "ReadAllText" with │ +00:02:23 verbose #4351 > > │ "1" argument(s): "Could not find file │ +00:02:23 verbose #4352 > > │ 'c:\Users\i574n\AppData\Local\Temp\!spiral_builder_b4bc1ce1a9925b66fe43056b7 │ +00:02:23 verbose #4353 > > │ 92e895a507b33... │ +00:02:23 verbose #4354 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:23 verbose #4355 > > +00:02:23 verbose #4356 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:23 verbose #4357 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:23 verbose #4358 > > │ ## command │ +00:02:23 verbose #4359 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:23 verbose #4360 > > +00:02:23 verbose #4361 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:23 verbose #4362 > > nominal command = $'clap_Command' +00:02:23 verbose #4363 > > +00:02:23 verbose #4364 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:23 verbose #4365 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:23 verbose #4366 > > │ ## new_command │ +00:02:23 verbose #4367 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:23 verbose #4368 > > +00:02:23 verbose #4369 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:23 verbose #4370 > > inl new_command (s : rust.static_ref' sm'.str) : command = +00:02:23 verbose #4371 > > !\\(s, $'"clap::Command::new($0)"') +00:02:23 verbose #4372 > > +00:02:23 verbose #4373 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:23 verbose #4374 > > //// test +00:02:23 verbose #4375 > > ///! rust -d clap +00:02:23 verbose #4376 > > +00:02:23 verbose #4377 > > types () +00:02:23 verbose #4378 > > ##"command" +00:02:23 verbose #4379 > > |> new_command +00:02:23 verbose #4380 > > |> sm'.format_pretty' +00:02:23 verbose #4381 > > |> sm'.from_std_string +00:02:23 verbose #4382 > > |> _assert_string_contains "command" +00:02:28 verbose #4383 > > +00:02:28 verbose #4384 > > ╭─[ 5.25s - return value ]─────────────────────────────────────────────────────╮ +00:02:28 verbose #4385 > > │ assert_string_contains / actual: "command" / expected: "Command { │ +00:02:28 verbose #4386 > > │ name: "command", │ +00:02:28 verbose #4387 > > │ long_flag: None, │ +00:02:28 verbose #4388 > > │ short_flag: None, │ +00:02:28 verbose #4389 > > │ display_name: None, │ +00:02:28 verbose #4390 > > │ bin_name: None, │ +00:02:28 verbose #4391 > > │ author: None, │ +00:02:28 verbose #4392 > > │ version: None, │ +00:02:28 verbose #4393 > > │ long_version: None, │ +00:02:28 verbose #4394 > > │ about: None, │ +00:02:28 verbose #4395 > > │ long_about: None, │ +00:02:28 verbose #4396 > > │ before_help: None, │ +00:02:28 verbose #4397 > > │ before_long_help: None, │ +00:02:28 verbose #4398 > > │ after_help: None, │ +00:02:28 verbose #4399 > > │ after_long_help: None, │ +00:02:28 verbose #4400 > > │ aliases: [], │ +00:02:28 verbose #4401 > > │ short_flag_aliases: [], │ +00:02:28 verbose #4402 > > │ long_flag_aliases: [], │ +00:02:28 verbose #4403 > > │ usage_str: None, │ +00:02:28 verbose #4404 > > │ usage_name: None, │ +00:02:28 verbose #4405 > > │ help_str: None, │ +00:02:28 verbose #4406 > > │ disp_ord: None, │ +00:02:28 verbose #4407 > > │ template: None, │ +00:02:28 verbose #4408 > > │ settings: AppFlags( │ +00:02:28 verbose #4409 > > │ 0, │ +00:02:28 verbose #4410 > > │ ), │ +00:02:28 verbose #4411 > > │ g_settings: AppFlags( │ +00:02:28 verbose #4412 > > │ 0, │ +00:02:28 verbose #4413 > > │ ), │ +00:02:28 verbose #4414 > > │ args: MKeyMap { │ +00:02:28 verbose #4415 > > │ args: [], │ +00:02:28 verbose #4416 > > │ keys: [], │ +00:02:28 verbose #4417 > > │ }, │ +00:02:28 verbose #4418 > > │ subcommands: [], │ +00:02:28 verbose #4419 > > │ groups: [], │ +00:02:28 verbose #4420 > > │ current_help_heading: None, │ +00:02:28 verbose #4421 > > │ current_disp_ord: Some( │ +00:02:28 verbose #4422 > > │ 0, │ +00:02:28 verbose #4423 > > │ ), │ +00:02:28 verbose #4424 > > │ subcommand_value_name: None, │ +00:02:28 verbose #4425 > > │ subcommand_heading: None, │ +00:02:28 verbose #4426 > > │ external_value_parser: None, │ +00:02:28 verbose #4427 > > │ long_help_exists: false, │ +00:02:28 verbose #4428 > > │ deferred: None, │ +00:02:28 verbose #4429 > > │ app_ext: Extensions { │ +00:02:28 verbose #4430 > > │ extensions: FlatMap { │ +00:02:28 verbose #4431 > > │ keys: [], │ +00:02:28 verbose #4432 > > │ values: [], │ +00:02:28 verbose #4433 > > │ }, │ +00:02:28 verbose #4434 > > │ }, │ +00:02:28 verbose #4435 > > │ }" │ +00:02:28 verbose #4436 > > │ │ +00:02:28 verbose #4437 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:28 verbose #4438 > > +00:02:28 verbose #4439 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:28 verbose #4440 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:28 verbose #4441 > > │ ## arg │ +00:02:28 verbose #4442 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:28 verbose #4443 > > +00:02:28 verbose #4444 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:28 verbose #4445 > > nominal arg = $'clap_Arg' +00:02:28 verbose #4446 > > +00:02:28 verbose #4447 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:28 verbose #4448 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:28 verbose #4449 > > │ ## new_arg │ +00:02:28 verbose #4450 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:28 verbose #4451 > > +00:02:28 verbose #4452 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:28 verbose #4453 > > inl new_arg (s : rust.static_ref' sm'.str) : arg = +00:02:28 verbose #4454 > > !\\(s, $'"clap::Arg::new($0)"') +00:02:28 verbose #4455 > > +00:02:28 verbose #4456 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:28 verbose #4457 > > //// test +00:02:28 verbose #4458 > > ///! rust -d clap +00:02:28 verbose #4459 > > +00:02:28 verbose #4460 > > types () +00:02:28 verbose #4461 > > ##"arg" +00:02:28 verbose #4462 > > |> new_arg +00:02:28 verbose #4463 > > |> sm'.format_pretty' +00:02:28 verbose #4464 > > |> sm'.from_std_string +00:02:28 verbose #4465 > > |> _assert_string_contains "arg" +00:02:33 verbose #4466 > > +00:02:33 verbose #4467 > > ╭─[ 4.69s - return value ]─────────────────────────────────────────────────────╮ +00:02:33 verbose #4468 > > │ assert_string_contains / actual: "arg" / expected: "Arg { │ +00:02:33 verbose #4469 > > │ id: "arg", │ +00:02:33 verbose #4470 > > │ help: None, │ +00:02:33 verbose #4471 > > │ long_help: None, │ +00:02:33 verbose #4472 > > │ action: None, │ +00:02:33 verbose #4473 > > │ value_parser: None, │ +00:02:33 verbose #4474 > > │ blacklist: [], │ +00:02:33 verbose #4475 > > │ settings: ArgFlags( │ +00:02:33 verbose #4476 > > │ 0, │ +00:02:33 verbose #4477 > > │ ), │ +00:02:33 verbose #4478 > > │ overrides: [], │ +00:02:33 verbose #4479 > > │ groups: [], │ +00:02:33 verbose #4480 > > │ requires: [], │ +00:02:33 verbose #4481 > > │ r_ifs: [], │ +00:02:33 verbose #4482 > > │ r_unless: [], │ +00:02:33 verbose #4483 > > │ short: None, │ +00:02:33 verbose #4484 > > │ long: None, │ +00:02:33 verbose #4485 > > │ aliases: [], │ +00:02:33 verbose #4486 > > │ short_aliases: [], │ +00:02:33 verbose #4487 > > │ disp_ord: None, │ +00:02:33 verbose #4488 > > │ val_names: [], │ +00:02:33 verbose #4489 > > │ num_vals: None, │ +00:02:33 verbose #4490 > > │ val_delim: None, │ +00:02:33 verbose #4491 > > │ default_vals: [], │ +00:02:33 verbose #4492 > > │ default_vals_ifs: [], │ +00:02:33 verbose #4493 > > │ terminator: None, │ +00:02:33 verbose #4494 > > │ index: None, │ +00:02:33 verbose #4495 > > │ help_heading: None, │ +00:02:33 verbose #4496 > > │ value_hint: None, │ +00:02:33 verbose #4497 > > │ default_missing_vals: [], │ +00:02:33 verbose #4498 > > │ }" │ +00:02:33 verbose #4499 > > │ │ +00:02:33 verbose #4500 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4501 > > +00:02:33 verbose #4502 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4503 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4504 > > │ ## command_arg │ +00:02:33 verbose #4505 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4506 > > +00:02:33 verbose #4507 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4508 > > inl command_arg (arg : arg) (command : command) : command = +00:02:33 verbose #4509 > > !\\((command, arg), $'"clap::Command::arg($0, $1)"') +00:02:33 verbose #4510 > > +00:02:33 verbose #4511 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4512 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4513 > > │ ## arg_required │ +00:02:33 verbose #4514 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4515 > > +00:02:33 verbose #4516 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4517 > > inl arg_required (value : bool) (arg : arg) : arg = +00:02:33 verbose #4518 > > !\\((arg, value), $'"$0.required($1)"') +00:02:33 verbose #4519 > > +00:02:33 verbose #4520 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4521 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4522 > > │ ## arg_short │ +00:02:33 verbose #4523 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4524 > > +00:02:33 verbose #4525 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4526 > > inl arg_short (value : char) (arg : arg) : arg = +00:02:33 verbose #4527 > > !\\((arg, value), $'"$0.short($1)"') +00:02:33 verbose #4528 > > +00:02:33 verbose #4529 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4530 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4531 > > │ ## arg_long │ +00:02:33 verbose #4532 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4533 > > +00:02:33 verbose #4534 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4535 > > inl arg_long (value : rust.static_ref' sm'.str) (arg : arg) : arg = +00:02:33 verbose #4536 > > !\\((arg, value), $'"$0.long($1)"') +00:02:33 verbose #4537 > > +00:02:33 verbose #4538 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4539 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4540 > > │ ## arg_value_names │ +00:02:33 verbose #4541 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4542 > > +00:02:33 verbose #4543 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4544 > > inl arg_value_names (values : array_base (rust.static_ref' sm'.str)) (arg : arg) +00:02:33 verbose #4545 > > : arg = +00:02:33 verbose #4546 > > inl values = values |> am'.to_vec +00:02:33 verbose #4547 > > !\\((arg, values), $'"$0.value_names($1)"') +00:02:33 verbose #4548 > > +00:02:33 verbose #4549 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4550 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4551 > > │ ## arg_num_args │ +00:02:33 verbose #4552 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4553 > > +00:02:33 verbose #4554 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4555 > > inl arg_num_args (value : i32) (arg : arg) : arg = +00:02:33 verbose #4556 > > !\\((arg, value), $'"$0.num_args($1)"') +00:02:33 verbose #4557 > > +00:02:33 verbose #4558 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4559 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4560 > > │ ## value_range │ +00:02:33 verbose #4561 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4562 > > +00:02:33 verbose #4563 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4564 > > nominal value_range = $'clap_builder_ValueRange' +00:02:33 verbose #4565 > > +00:02:33 verbose #4566 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4567 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4568 > > │ ## new_value_range │ +00:02:33 verbose #4569 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4570 > > +00:02:33 verbose #4571 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4572 > > inl new_value_range start end : value_range = +00:02:33 verbose #4573 > > inl len = 0i32 |> unativeint +00:02:33 verbose #4574 > > inl start, end = +00:02:33 verbose #4575 > > open am' +00:02:33 verbose #4576 > > match start, end with +00:02:33 verbose #4577 > > | Start start, End fn => +00:02:33 verbose #4578 > > start, len |> fn +00:02:33 verbose #4579 > > | End start_fn, End end_fn => +00:02:33 verbose #4580 > > start_fn len, end_fn len +00:02:33 verbose #4581 > > match start, end with +00:02:33 verbose #4582 > > | start, end when end =. len => +00:02:33 verbose #4583 > > !\($'"clap::builder::ValueRange::new(!start..)"') +00:02:33 verbose #4584 > > | start, end => !\($'"clap::builder::ValueRange::new(!start..!end)"') +00:02:33 verbose #4585 > > +00:02:33 verbose #4586 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4587 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4588 > > │ ## arg_num_args_range │ +00:02:33 verbose #4589 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4590 > > +00:02:33 verbose #4591 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4592 > > inl arg_num_args_range (value : value_range) (arg : arg) : arg = +00:02:33 verbose #4593 > > !\\((arg, value), $'"$0.num_args($1)"') +00:02:33 verbose #4594 > > +00:02:33 verbose #4595 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4596 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4597 > > │ ## arg_value_name │ +00:02:33 verbose #4598 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4599 > > +00:02:33 verbose #4600 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4601 > > inl arg_value_name (value : string) (arg : arg) : arg = +00:02:33 verbose #4602 > > inl value = value |> sm'.as_str +00:02:33 verbose #4603 > > !\\((arg, value), $'"$0.value_name($1)"') +00:02:33 verbose #4604 > > +00:02:33 verbose #4605 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4606 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4607 > > │ ## value_parser │ +00:02:33 verbose #4608 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4609 > > +00:02:33 verbose #4610 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4611 > > nominal value_parser = $'clap_builder_ValueParser' +00:02:33 verbose #4612 > > +00:02:33 verbose #4613 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4614 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4615 > > │ ## possible_value │ +00:02:33 verbose #4616 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4617 > > +00:02:33 verbose #4618 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4619 > > nominal possible_value = $'clap_builder_PossibleValue' +00:02:33 verbose #4620 > > +00:02:33 verbose #4621 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:33 verbose #4622 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:33 verbose #4623 > > │ ## new_possible_value │ +00:02:33 verbose #4624 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:33 verbose #4625 > > +00:02:33 verbose #4626 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:33 verbose #4627 > > inl new_possible_value forall t. (x : t) : possible_value = +00:02:33 verbose #4628 > > !\\(x, $'"clap::builder::PossibleValue::new(&**$0)"') +00:02:34 verbose #4629 > > +00:02:34 verbose #4630 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4631 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4632 > > │ ## value_parser_possible_values │ +00:02:34 verbose #4633 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4634 > > +00:02:34 verbose #4635 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4636 > > inl value_parser_possible_values (values : array_base string) : value_parser = +00:02:34 verbose #4637 > > inl values = +00:02:34 verbose #4638 > > values +00:02:34 verbose #4639 > > |> am'.to_vec +00:02:34 verbose #4640 > > |> am'.vec_map (sm'.to_std_string >> rust.new_box >> rust.box_leak >> +00:02:34 verbose #4641 > > new_possible_value) +00:02:34 verbose #4642 > > !\\(values, $'"clap::builder::PossibleValuesParser::new($0).into()"') +00:02:34 verbose #4643 > > +00:02:34 verbose #4644 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4645 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4646 > > │ ## value_parser_path_buf │ +00:02:34 verbose #4647 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4648 > > +00:02:34 verbose #4649 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4650 > > inl value_parser_path_buf () : value_parser = +00:02:34 verbose #4651 > > !\($'"clap::value_parser\!(std::path::PathBuf)"') +00:02:34 verbose #4652 > > +00:02:34 verbose #4653 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4654 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4655 > > │ ## value_parser_expr │ +00:02:34 verbose #4656 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4657 > > +00:02:34 verbose #4658 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4659 > > inl value_parser_expr (expr : string) : value_parser = +00:02:34 verbose #4660 > > !\($'"clap::value_parser\!(" + !expr + ").into()"') +00:02:34 verbose #4661 > > +00:02:34 verbose #4662 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4663 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4664 > > │ ## arg_value_parser │ +00:02:34 verbose #4665 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4666 > > +00:02:34 verbose #4667 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4668 > > inl arg_value_parser (values : value_parser) (arg : arg) : arg = +00:02:34 verbose #4669 > > !\\((arg, values), $'"$0.value_parser($1)"') +00:02:34 verbose #4670 > > +00:02:34 verbose #4671 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4672 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4673 > > │ ## arg_union │ +00:02:34 verbose #4674 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4675 > > +00:02:34 verbose #4676 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4677 > > inl arg_union forall union_type {to_string}. (fn : union_type -> ()) (arg : arg) +00:02:34 verbose #4678 > > : arg = +00:02:34 verbose #4679 > > arg +00:02:34 verbose #4680 > > |> arg_value_parser ( +00:02:34 verbose #4681 > > real get_union_fields_untag `union_type () +00:02:34 verbose #4682 > > |> fun x => x : list union_type +00:02:34 verbose #4683 > > |> listm.map to_string +00:02:34 verbose #4684 > > |> listm'.box +00:02:34 verbose #4685 > > |> listm'.to_array' +00:02:34 verbose #4686 > > |> fun (a x : _ i32 _) => x +00:02:34 verbose #4687 > > |> value_parser_possible_values +00:02:34 verbose #4688 > > ) +00:02:34 verbose #4689 > > +00:02:34 verbose #4690 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4691 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4692 > > │ ## arg_action │ +00:02:34 verbose #4693 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4694 > > +00:02:34 verbose #4695 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4696 > > nominal arg_action' = $'clap_ArgAction' +00:02:34 verbose #4697 > > +00:02:34 verbose #4698 > > union arg_action = +00:02:34 verbose #4699 > > | Set +00:02:34 verbose #4700 > > | Append +00:02:34 verbose #4701 > > | SetTrue +00:02:34 verbose #4702 > > | SetFalse +00:02:34 verbose #4703 > > | Count +00:02:34 verbose #4704 > > | Help +00:02:34 verbose #4705 > > | HelpShort +00:02:34 verbose #4706 > > | HelpLong +00:02:34 verbose #4707 > > | Version +00:02:34 verbose #4708 > > +00:02:34 verbose #4709 > > inl arg_action = function +00:02:34 verbose #4710 > > | Set => !\($'"clap::ArgAction::Set"') : arg_action' +00:02:34 verbose #4711 > > | Append => !\($'"clap::ArgAction::Append"') : arg_action' +00:02:34 verbose #4712 > > | SetTrue => !\($'"clap::ArgAction::SetTrue"') : arg_action' +00:02:34 verbose #4713 > > | SetFalse => !\($'"clap::ArgAction::SetFalse"') : arg_action' +00:02:34 verbose #4714 > > | Count => !\($'"clap::ArgAction::Count"') : arg_action' +00:02:34 verbose #4715 > > | Help => !\($'"clap::ArgAction::Help"') : arg_action' +00:02:34 verbose #4716 > > | HelpShort => !\($'"clap::ArgAction::HelpShort"') : arg_action' +00:02:34 verbose #4717 > > | HelpLong => !\($'"clap::ArgAction::HelpLong"') : arg_action' +00:02:34 verbose #4718 > > | Version => !\($'"clap::ArgAction::Version"') : arg_action' +00:02:34 verbose #4719 > > +00:02:34 verbose #4720 > > inl arg_action (value : arg_action) (arg : arg) : arg = +00:02:34 verbose #4721 > > inl value = value |> arg_action +00:02:34 verbose #4722 > > !\\((arg, value), $'"$0.action($1)"') +00:02:34 verbose #4723 > > +00:02:34 verbose #4724 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4725 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4726 > > │ ## arg_index │ +00:02:34 verbose #4727 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4728 > > +00:02:34 verbose #4729 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4730 > > inl arg_index (value : i32) (arg : arg) : arg = +00:02:34 verbose #4731 > > !\\((arg, value), $'"$0.index($1)"') +00:02:34 verbose #4732 > > +00:02:34 verbose #4733 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4734 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4735 > > │ ## arg_matches │ +00:02:34 verbose #4736 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4737 > > +00:02:34 verbose #4738 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4739 > > nominal arg_matches = $'clap_ArgMatches' +00:02:34 verbose #4740 > > +00:02:34 verbose #4741 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4742 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4743 > > │ ## command_get_matches │ +00:02:34 verbose #4744 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4745 > > +00:02:34 verbose #4746 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4747 > > inl command_get_matches (command : command) : arg_matches = +00:02:34 verbose #4748 > > !\\(command, $'"clap::Command::get_matches($0)"') +00:02:34 verbose #4749 > > +00:02:34 verbose #4750 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4751 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4752 > > │ ## command_get_matches_from │ +00:02:34 verbose #4753 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4754 > > +00:02:34 verbose #4755 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4756 > > inl command_get_matches_from (args : array_base string) (command : command) : +00:02:34 verbose #4757 > > arg_matches = +00:02:34 verbose #4758 > > inl args = args |> am'.to_vec |> am'.vec_map sm'.to_std_string +00:02:34 verbose #4759 > > !\\(command, $'"clap::Command::get_matches_from($0, !args)"') +00:02:34 verbose #4760 > > +00:02:34 verbose #4761 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4762 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4763 > > │ ## command_init_arg │ +00:02:34 verbose #4764 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4765 > > +00:02:34 verbose #4766 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4767 > > inl command_init_arg (long, short) fn command = +00:02:34 verbose #4768 > > command +00:02:34 verbose #4769 > > |> command_arg ( +00:02:34 verbose #4770 > > new_arg ##long +00:02:34 verbose #4771 > > |> arg_short short +00:02:34 verbose #4772 > > |> arg_long ##long +00:02:34 verbose #4773 > > |> fn +00:02:34 verbose #4774 > > ) +00:02:34 verbose #4775 > > +00:02:34 verbose #4776 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4777 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4778 > > │ ## matches_get_one │ +00:02:34 verbose #4779 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4780 > > +00:02:34 verbose #4781 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4782 > > inl matches_get_one forall t. (x : string) (matches : arg_matches) : +00:02:34 verbose #4783 > > optionm'.option' t = +00:02:34 verbose #4784 > > inl x = join x +00:02:34 verbose #4785 > > inl x = x |> sm'.as_str +00:02:34 verbose #4786 > > !\\(matches, $'"clap::ArgMatches::get_one(&$0, !x).cloned()"') +00:02:34 verbose #4787 > > +00:02:34 verbose #4788 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4789 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4790 > > │ ## matches_get_flag │ +00:02:34 verbose #4791 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4792 > > +00:02:34 verbose #4793 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4794 > > inl matches_get_flag (x : string) (matches : arg_matches) : bool = +00:02:34 verbose #4795 > > inl x = join x +00:02:34 verbose #4796 > > inl x = x |> sm'.as_str +00:02:34 verbose #4797 > > !\($'"clap::ArgMatches::get_flag(&!matches, !x)"') +00:02:34 verbose #4798 > > +00:02:34 verbose #4799 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4800 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4801 > > │ ## matches_get_many │ +00:02:34 verbose #4802 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4803 > > +00:02:34 verbose #4804 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4805 > > inl matches_get_many forall t. (x : string) (matches : arg_matches) : +00:02:34 verbose #4806 > > optionm'.option' (am'.vec t) = +00:02:34 verbose #4807 > > inl x = join x +00:02:34 verbose #4808 > > inl x = x |> sm'.as_str +00:02:34 verbose #4809 > > !\\(matches, $'"clap::ArgMatches::get_many(&$0, !x).map(|x| +00:02:34 verbose #4810 > > x.cloned().into_iter().collect())"') +00:02:34 verbose #4811 > > +00:02:34 verbose #4812 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4813 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4814 > > │ ## matches_get_occurrences │ +00:02:34 verbose #4815 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4816 > > +00:02:34 verbose #4817 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4818 > > inl matches_get_occurrences (x : string) (matches : arg_matches) : +00:02:34 verbose #4819 > > optionm'.option' (array_base sm'.std_string) = +00:02:34 verbose #4820 > > inl x = join x +00:02:34 verbose #4821 > > inl x = x |> sm'.as_str +00:02:34 verbose #4822 > > !\($'"clap::ArgMatches::get_occurrences(&!matches, !x).cloned()"') +00:02:34 verbose #4823 > > +00:02:34 verbose #4824 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4825 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4826 > > │ ## matches_subcommand │ +00:02:34 verbose #4827 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4828 > > +00:02:34 verbose #4829 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4830 > > inl matches_subcommand (matches : arg_matches) : optionm'.option' +00:02:34 verbose #4831 > > (sm'.std_string * arg_matches) = +00:02:34 verbose #4832 > > !\\((matches, sm'.ref_to_std_string), +00:02:34 verbose #4833 > > $'"clap::ArgMatches::subcommand(Box::leak(Box::new($0))).map(|(a, b)| ($1(a), +00:02:34 verbose #4834 > > b.clone()))"') +00:02:34 verbose #4835 > > +00:02:34 verbose #4836 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4837 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4838 > > │ ## matches_values_of │ +00:02:34 verbose #4839 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4840 > > +00:02:34 verbose #4841 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4842 > > inl matches_values_of (x : string) (matches : arg_matches) : array_base +00:02:34 verbose #4843 > > sm'.std_string = +00:02:34 verbose #4844 > > !\\((matches, x), $'"clap::ArgMatches::values_of($0, &*$1)"') +00:02:34 verbose #4845 > > +00:02:34 verbose #4846 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4847 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4848 > > │ ## command_debug_assert │ +00:02:34 verbose #4849 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4850 > > +00:02:34 verbose #4851 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4852 > > inl command_debug_assert (command : command) : () = +00:02:34 verbose #4853 > > !\\(command, $'"clap::Command::debug_assert($0)"') +00:02:34 verbose #4854 > > +00:02:34 verbose #4855 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4856 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4857 > > │ ## command_subcommand_required │ +00:02:34 verbose #4858 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4859 > > +00:02:34 verbose #4860 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4861 > > inl command_subcommand_required (value : bool) (command : command) : command = +00:02:34 verbose #4862 > > !\\(command, $'"clap::Command::subcommand_required($0, !value)"') +00:02:34 verbose #4863 > > +00:02:34 verbose #4864 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4865 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4866 > > │ ## command_subcommand │ +00:02:34 verbose #4867 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4868 > > +00:02:34 verbose #4869 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4870 > > inl command_subcommand (subcommand : command) (command : command) : command = +00:02:34 verbose #4871 > > !\\(command, $'"clap::Command::subcommand($0, !subcommand)"') +00:02:34 verbose #4872 > > +00:02:34 verbose #4873 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:34 verbose #4874 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:34 verbose #4875 > > │ ## main │ +00:02:34 verbose #4876 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:34 verbose #4877 > > +00:02:34 verbose #4878 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:34 verbose #4879 > > inl main () = +00:02:34 verbose #4880 > > types () +00:02:34 verbose #4881 > > init_trace_state None +00:02:34 verbose #4882 > > $"let is_windows () = !is_windows ()" : () +00:02:34 verbose #4883 > > $"let get_executable_suffix () = !get_executable_suffix ()" : () +00:02:34 verbose #4884 > > $"let execute_async x = !execute_async x" : () +00:02:34 verbose #4885 > > $"let execute_with_options_async x = !execute_with_options_async x" : () +00:02:34 verbose #4886 > > inl execution_options fn = +00:02:34 verbose #4887 > > execution_options fun x => +00:02:34 verbose #4888 > > x +00:02:34 verbose #4889 > > |> heap +00:02:34 verbose #4890 > > |> fn +00:02:34 verbose #4891 > > |> fun x => !x +00:02:34 verbose #4892 > > $"let execution_options x = !execution_options x" : () +00:02:34 verbose #4893 > > $"let split_args x = !split_args x" : () +00:02:36 verbose #4894 > 00:00:48 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 100157 +00:02:36 verbose #4895 > 00:00:48 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:02:38 verbose #4896 > 00:00:50 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb to html +00:02:38 verbose #4897 > 00:00:50 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:02:38 verbose #4898 > 00:00:50 verbose #7 ! validate(nb) +00:02:41 verbose #4899 > 00:00:53 verbose #8 ! [NbConvertApp] Writing 561144 bytes to c:\home\git\polyglot\lib\spiral\runtime.dib.html +00:02:42 verbose #4900 > 00:00:53 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 645 +00:02:42 verbose #4901 > 00:00:53 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 645 +00:02:42 verbose #4902 > 00:00:53 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:02:43 verbose #4903 > 00:00:54 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:02:43 verbose #4904 > 00:00:54 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:02:43 verbose #4905 > 00:00:55 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 100861 +00:02:43 debug #4906 execute_with_options_async / exit_code: 0 / output.Length: 107101 +00:02:43 debug #8 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path runtime.dib --retries 3 +00:02:43 debug #4907 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path trace.dib --retries 3", [||], None, None, true, None) -00:04:45 verbose #4770 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "trace.dib", "--retries", "3"]) -00:04:45 verbose #4771 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/trace.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/trace.dib" --output-path "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:04:54 verbose #4772 > 00:04:53 debug #73 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/86d48a2ef38aa74ee58659e0f6eef746ed1e9125c1bffd546ef4933a80df981e/main.spi -00:04:55 verbose #4773 > 00:04:54 debug #74 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4ec0ee56ef0eff1ffcb913099a09c6e090711b5fbf19ed27788d2ee68112749d/main.spi -00:05:14 verbose #4774 > 00:05:13 debug #75 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6e5271eeb3fbbe9d776d28fd4e2bd9c05c20309c1e213b922686a134726b6d80/main.spi -00:05:15 verbose #4775 > -00:05:15 verbose #4776 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4777 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4778 > │ # trace │ -00:05:15 verbose #4779 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4780 > -00:05:15 verbose #4781 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4782 > //// test -00:05:15 verbose #4783 > -00:05:15 verbose #4784 > open testing -00:05:15 verbose #4785 > -00:05:15 verbose #4786 > ── spiral - import ───────────────────────────────────────────────────────────── -00:05:15 verbose #4787 > #r -00:05:15 verbose #4788 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:05:15 verbose #4789 > otNet.Interactive.Spiral.dll" -00:05:15 verbose #4790 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:05:15 verbose #4791 > #r -00:05:15 verbose #4792 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:05:15 verbose #4793 > otNet.Interactive.dll" -00:05:15 verbose #4794 > open type Microsoft.DotNet.Interactive.Kernel -00:05:15 verbose #4795 > -00:05:15 verbose #4796 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4797 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4798 > │ ## types │ -00:05:15 verbose #4799 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4800 > -00:05:15 verbose #4801 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4802 > inl types () = -00:05:15 verbose #4803 > rust.types () -00:05:15 verbose #4804 > sm'.types () -00:05:15 verbose #4805 > env.types () -00:05:15 verbose #4806 > -00:05:15 verbose #4807 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4808 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4809 > │ ## trace_level │ -00:05:15 verbose #4810 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4811 > -00:05:15 verbose #4812 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4813 > union trace_level = -00:05:15 verbose #4814 > | Verbose -00:05:15 verbose #4815 > | Debug -00:05:15 verbose #4816 > | Info -00:05:15 verbose #4817 > | Warning -00:05:15 verbose #4818 > | Critical -00:05:15 verbose #4819 > -00:05:15 verbose #4820 > instance to_string trace_level = function -00:05:15 verbose #4821 > | Verbose => "Verbose" -00:05:15 verbose #4822 > | Debug => "Debug" -00:05:15 verbose #4823 > | Info => "Info" -00:05:15 verbose #4824 > | Warning => "Warning" -00:05:15 verbose #4825 > | Critical => "Critical" -00:05:15 verbose #4826 > -00:05:15 verbose #4827 > instance of_string trace_level = function -00:05:15 verbose #4828 > | "Verbose" => Verbose -00:05:15 verbose #4829 > | "Debug" => Debug -00:05:15 verbose #4830 > | "Info" => Info -00:05:15 verbose #4831 > | "Warning" => Warning -00:05:15 verbose #4832 > | "Critical" => Critical -00:05:15 verbose #4833 > | x => failwith $'$"of_string trace_level / x: {!x}"' -00:05:15 verbose #4834 > -00:05:15 verbose #4835 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4836 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4837 > │ ## repl_start │ -00:05:15 verbose #4838 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4839 > -00:05:15 verbose #4840 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4841 > inl repl_start () : optionm'.option' i64 = -00:05:15 verbose #4842 > run_target function -00:05:15 verbose #4843 > | Fsharp (Native) & x -00:05:15 verbose #4844 > | Rust (Native) & x => fun () => -00:05:15 verbose #4845 > inl automation = env.get_environment_variable "AUTOMATION" -00:05:15 verbose #4846 > // inl target = -00:05:15 verbose #4847 > // match x with -00:05:15 verbose #4848 > // | Fsharp (Native) => "Fsharp (Native)" -00:05:15 verbose #4849 > // | Rust (Native) => "Rust (Native)" -00:05:15 verbose #4850 > // inl assembly_name = env.get_entry_assembly_name () -00:05:15 verbose #4851 > // console.write_line ($'$"repl_start / automation: -00:05:15 verbose #4852 > \'{!automation}\' / target: {!target} / assembly_name: {!assembly_name}"' : -00:05:15 verbose #4853 > string) -00:05:15 verbose #4854 > if automation = "True" -00:05:15 verbose #4855 > then date_time.now () |> date_time.ticks |> fun (date_time.timestamp -00:05:15 verbose #4856 > x) => x |> Some -00:05:15 verbose #4857 > else None -00:05:15 verbose #4858 > |> optionm'.box -00:05:15 verbose #4859 > | _ => fun () => optionm'.none' () -00:05:15 verbose #4860 > -00:05:15 verbose #4861 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4862 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4863 > │ ## trace_state │ -00:05:15 verbose #4864 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4865 > -00:05:15 verbose #4866 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4867 > type trace_state = -00:05:15 verbose #4868 > { -00:05:15 verbose #4869 > count : mut i64 -00:05:15 verbose #4870 > trace_file : mut (string -> ()) -00:05:15 verbose #4871 > enabled : mut bool -00:05:15 verbose #4872 > level : mut trace_level -00:05:15 verbose #4873 > repl_start : optionm'.option' i64 -00:05:15 verbose #4874 > } -00:05:15 verbose #4875 > -00:05:15 verbose #4876 > inl new_trace_state trace_level = -00:05:15 verbose #4877 > { -00:05:15 verbose #4878 > enabled = mut true -00:05:15 verbose #4879 > count = mut 0i64 -00:05:15 verbose #4880 > level = mut trace_level -00:05:15 verbose #4881 > trace_file = mut ignore -00:05:15 verbose #4882 > repl_start = repl_start () -00:05:15 verbose #4883 > } : trace_state -00:05:15 verbose #4884 > -00:05:15 verbose #4885 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4886 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4887 > │ ## init_trace_state │ -00:05:15 verbose #4888 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4889 > -00:05:15 verbose #4890 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4891 > inl init_trace_state trace_level : () = -00:05:15 verbose #4892 > inl trace_level = -00:05:15 verbose #4893 > trace_level -00:05:15 verbose #4894 > |> optionm'.default_value Verbose -00:05:15 verbose #4895 > global "module State = let mutable trace_state = None" -00:05:15 verbose #4896 > $"if State.trace_state.IsNone then State.trace_state <- !new_trace_state -00:05:15 verbose #4897 > !trace_level |> Some" : () -00:05:15 verbose #4898 > -00:05:15 verbose #4899 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4900 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4901 > │ ## get_trace_state_or_init │ -00:05:15 verbose #4902 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4903 > -00:05:15 verbose #4904 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4905 > inl get_trace_state_or_init trace_level : trace_state = -00:05:15 verbose #4906 > init_trace_state trace_level -00:05:15 verbose #4907 > $'State.trace_state.Value' -00:05:15 verbose #4908 > -00:05:15 verbose #4909 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4910 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4911 > │ ## _locals │ -00:05:15 verbose #4912 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4913 > -00:05:15 verbose #4914 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4915 > inl _locals () = "" -00:05:15 verbose #4916 > -00:05:15 verbose #4917 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4918 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4919 > │ ## test_trace_level │ -00:05:15 verbose #4920 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4921 > -00:05:15 verbose #4922 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4923 > inl test_trace_level level : bool = -00:05:15 verbose #4924 > inl state = get_trace_state_or_init None -00:05:15 verbose #4925 > inl level' = *state.level -00:05:15 verbose #4926 > if *state.enabled |> not -00:05:15 verbose #4927 > then false -00:05:15 verbose #4928 > else -00:05:15 verbose #4929 > inl level : i32 = real real_core.union_tag level -00:05:15 verbose #4930 > inl level' : i32 = real real_core.union_tag level' -00:05:15 verbose #4931 > level >= level' -00:05:15 verbose #4932 > -00:05:15 verbose #4933 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4934 > //// test -00:05:15 verbose #4935 > -00:05:15 verbose #4936 > test_trace_level Critical |> _assert_eq true -00:05:15 verbose #4937 > test_trace_level Verbose |> _assert_eq true -00:05:15 verbose #4938 > -00:05:15 verbose #4939 > inl level = get_trace_state_or_init None .level -00:05:15 verbose #4940 > level <- Debug -00:05:15 verbose #4941 > test_trace_level Verbose |> _assert_eq false -00:05:15 verbose #4942 > level <- Verbose -00:05:15 verbose #4943 > test_trace_level Verbose |> _assert_eq true -00:05:15 verbose #4944 > -00:05:15 verbose #4945 > ╭─[ 1.41s - stdout ]───────────────────────────────────────────────────────────╮ -00:05:15 verbose #4946 > │ assert_eq / actual: true / expected: true │ -00:05:15 verbose #4947 > │ assert_eq / actual: true / expected: true │ -00:05:15 verbose #4948 > │ assert_eq / actual: false / expected: false │ -00:05:15 verbose #4949 > │ assert_eq / actual: true / expected: true │ -00:05:15 verbose #4950 > │ │ -00:05:15 verbose #4951 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4952 > -00:05:15 verbose #4953 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4954 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4955 > │ ## trace_raw │ -00:05:15 verbose #4956 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4957 > -00:05:15 verbose #4958 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4959 > let rec trace_raw level fn = -00:05:15 verbose #4960 > inl trace_state = get_trace_state_or_init None -00:05:15 verbose #4961 > if level |> test_trace_level then -00:05:15 verbose #4962 > inl count = trace_state.count -00:05:15 verbose #4963 > count <- *trace_state.count + 1 -00:05:15 verbose #4964 > -00:05:15 verbose #4965 > inl text = $'$"%s{!fn ()}"' : string -00:05:15 verbose #4966 > run_target function -00:05:15 verbose #4967 > | Rust _ => fun () => -00:05:15 verbose #4968 > open rust_operators -00:05:15 verbose #4969 > !\\(text, $'\@"println\!(""{}"", $0)"') -00:05:15 verbose #4970 > | _ => fun () => -00:05:15 verbose #4971 > $'System.Console.WriteLine !text ' -00:05:15 verbose #4972 > -00:05:15 verbose #4973 > *trace_state.trace_file text -00:05:15 verbose #4974 > -00:05:15 verbose #4975 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #4976 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #4977 > │ ## trace │ -00:05:15 verbose #4978 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #4979 > -00:05:15 verbose #4980 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #4981 > let trace (level : trace_level) (text_fn : () -> string) (locals : () -> string) -00:05:15 verbose #4982 > = -00:05:15 verbose #4983 > fun () => -00:05:15 verbose #4984 > inl trace_state = get_trace_state_or_init None -00:05:15 verbose #4985 > inl time = -00:05:15 verbose #4986 > run_target fun target => -00:05:15 verbose #4987 > match target with -00:05:15 verbose #4988 > | Fsharp (Native) -00:05:15 verbose #4989 > | Rust (Native) => fun () => -00:05:15 verbose #4990 > match trace_state.repl_start |> optionm'.unbox with -00:05:15 verbose #4991 > | Some repl_start => -00:05:15 verbose #4992 > inl t = -00:05:15 verbose #4993 > (date_time.now () |> date_time.ticks |> fun -00:05:15 verbose #4994 > (date_time.timestamp x) => x) -00:05:15 verbose #4995 > - repl_start |> date_time.time_span -00:05:15 verbose #4996 > date_time.date_time_milliseconds -00:05:15 verbose #4997 > 1i32 1i32 1i32 -00:05:15 verbose #4998 > (t |> date_time.hours) -00:05:15 verbose #4999 > (t |> date_time.minutes) -00:05:15 verbose #5000 > (t |> date_time.seconds) -00:05:15 verbose #5001 > (t |> date_time.milliseconds) -00:05:15 verbose #5002 > | None => date_time.now () -00:05:15 verbose #5003 > |> fun date_time => -00:05:15 verbose #5004 > inl format = -00:05:15 verbose #5005 > match target with -00:05:15 verbose #5006 > | Rust _ => "hh:mm:ss" -00:05:15 verbose #5007 > | _ => "HH:mm:ss" -00:05:15 verbose #5008 > $'!date_time.ToString !format ' -00:05:15 verbose #5009 > | _ => fun () => join "" -00:05:15 verbose #5010 > inl count = *trace_state.count -00:05:15 verbose #5011 > inl level_str = level |> to_string |> sm'.to_lower |> sm'.pad_left 7 ' ' -00:05:15 verbose #5012 > inl level_str = -00:05:15 verbose #5013 > run_target function -00:05:15 verbose #5014 > | Rust _ => fun () => -00:05:15 verbose #5015 > open rust_operators -00:05:15 verbose #5016 > inl color : rust.ref' sm'.str = -00:05:15 verbose #5017 > match level with -00:05:15 verbose #5018 > | Verbose => -00:05:15 verbose #5019 > !\($'"inline_colorization::color_bright_black"') -00:05:15 verbose #5020 > | Debug => !\($'"inline_colorization::color_bright_blue"') -00:05:15 verbose #5021 > | Info => !\($'"inline_colorization::color_bright_green"') -00:05:15 verbose #5022 > | Warning => !\($'"inline_colorization::color_yellow"') -00:05:15 verbose #5023 > | Critical => !\($'"inline_colorization::color_bright_red"') -00:05:15 verbose #5024 > inl level_str = level_str |> sm'.as_str -00:05:15 verbose #5025 > inl color_reset : rust.ref' sm'.str = -00:05:15 verbose #5026 > !\($'"inline_colorization::color_reset"') -00:05:15 verbose #5027 > $'"\\\"{!color}{!level_str}{!color_reset}\\\""' -00:05:15 verbose #5028 > |> sm'.format'' -00:05:15 verbose #5029 > |> sm'.from_std_string -00:05:15 verbose #5030 > | _ => fun () => level_str -00:05:15 verbose #5031 > $'$"{!time} {!level_str} #{!count} %s{!text_fn ()} / %s{!locals ()}"' -00:05:15 verbose #5032 > |> sm'.trim_start ;[[]] -00:05:15 verbose #5033 > |> sm'.trim_end ;[[ ' '; '/' ]] -00:05:15 verbose #5034 > |> trace_raw level -00:05:15 verbose #5035 > -00:05:15 verbose #5036 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #5037 > //// test -00:05:15 verbose #5038 > -00:05:15 verbose #5039 > trace Debug (fun () => "test") _locals -00:05:15 verbose #5040 > trace Debug (fun () => "test") _locals -00:05:15 verbose #5041 > get_trace_state_or_init None .count -00:05:15 verbose #5042 > |> fun x => *x -00:05:15 verbose #5043 > |> _assert_eq 2 -00:05:15 verbose #5044 > -00:05:15 verbose #5045 > ╭─[ 1.38s - stdout ]───────────────────────────────────────────────────────────╮ -00:05:15 verbose #5046 > │ 00:00:00 debug #1 test │ -00:05:15 verbose #5047 > │ 00:00:00 debug #2 test │ -00:05:15 verbose #5048 > │ assert_eq / actual: 2L / expected: 2L │ -00:05:15 verbose #5049 > │ │ -00:05:15 verbose #5050 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #5051 > -00:05:15 verbose #5052 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #5053 > //// test -00:05:15 verbose #5054 > ///! rust -00:05:15 verbose #5055 > -00:05:15 verbose #5056 > types () -00:05:15 verbose #5057 > trace Debug (fun () => "test1") _locals -00:05:15 verbose #5058 > trace Debug (fun () => "test2") _locals -00:05:15 verbose #5059 > get_trace_state_or_init None .count -00:05:15 verbose #5060 > |> fun x => *x -00:05:15 verbose #5061 > |> _assert_eq 2 -00:05:15 verbose #5062 > -00:05:15 verbose #5063 > ╭─[ 19.38s - return value ]────────────────────────────────────────────────────╮ -00:05:15 verbose #5064 > │ 00:00:00 debug #1 test1 │ -00:05:15 verbose #5065 > │ 00:00:00 debug #2 test2 │ -00:05:15 verbose #5066 > │ assert_eq / actual: 2 / expected: 2 │ -00:05:15 verbose #5067 > │ │ -00:05:15 verbose #5068 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #5069 > -00:05:15 verbose #5070 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:15 verbose #5071 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:15 verbose #5072 > │ ## main │ -00:05:15 verbose #5073 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:15 verbose #5074 > -00:05:15 verbose #5075 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:15 verbose #5076 > inl main () = -00:05:15 verbose #5077 > types () -00:05:15 verbose #5078 > init_trace_state None -00:05:15 verbose #5079 > $"let trace x = !trace x" : () -00:05:15 verbose #5080 > 00:00:29 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 13354 -00:05:15 verbose #5081 > 00:00:29 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:05:18 verbose #5082 > 00:00:33 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/trace.dib.ipynb to html\e[0m -00:05:18 verbose #5083 > 00:00:33 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:05:18 verbose #5084 > 00:00:33 verbose #7 \e[4;7m validate(nb)\e[0m -00:05:18 verbose #5085 > 00:00:33 verbose #8 \e[4;7m[NbConvertApp] Writing 311574 bytes to c:\home\git\polyglot\lib\spiral\trace.dib.html\e[0m -00:05:18 verbose #5086 > 00:00:33 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 601 -00:05:18 verbose #5087 > 00:00:33 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 601 -00:05:18 verbose #5088 > 00:00:33 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/trace.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/trace.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:05:19 verbose #5089 > 00:00:34 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:05:19 verbose #5090 > 00:00:34 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:05:20 verbose #5091 > 00:00:34 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 14014 -00:05:20 debug #5092 execute_with_options_async / exit_code: 0 / output.Length: 16314 -00:05:20 debug #9 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path trace.dib --retries 3 -00:05:20 debug #5093 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path am'.dib --retries 3", +00:02:43 verbose #4908 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "trace.dib", "--retries", "3"]) +00:02:43 verbose #4909 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/trace.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/trace.dib" --output-path "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:02:46 verbose #4910 > > +00:02:46 verbose #4911 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:46 verbose #4912 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:46 verbose #4913 > > │ # trace │ +00:02:46 verbose #4914 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:46 verbose #4915 > > +00:02:46 verbose #4916 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:46 verbose #4917 > > //// test +00:02:46 verbose #4918 > > +00:02:46 verbose #4919 > > open testing +00:02:46 verbose #4920 > > +00:02:46 verbose #4921 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:02:46 verbose #4922 > > #r +00:02:46 verbose #4923 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:02:46 verbose #4924 > > otNet.Interactive.Spiral.dll" +00:02:46 verbose #4925 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:02:46 verbose #4926 > > #r +00:02:46 verbose #4927 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:02:46 verbose #4928 > > otNet.Interactive.dll" +00:02:46 verbose #4929 > > open type Microsoft.DotNet.Interactive.Kernel +00:02:50 verbose #4930 > > +00:02:50 verbose #4931 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:50 verbose #4932 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:50 verbose #4933 > > │ ## types │ +00:02:50 verbose #4934 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:50 verbose #4935 > > +00:02:50 verbose #4936 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:50 verbose #4937 > > inl types () = +00:02:50 verbose #4938 > > rust.types () +00:02:50 verbose #4939 > > sm'.types () +00:02:50 verbose #4940 > > env.types () +00:02:50 verbose #4941 > > +00:02:50 verbose #4942 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:50 verbose #4943 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:50 verbose #4944 > > │ ## trace_level │ +00:02:50 verbose #4945 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:50 verbose #4946 > > +00:02:50 verbose #4947 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:50 verbose #4948 > > union trace_level = +00:02:50 verbose #4949 > > | Verbose +00:02:50 verbose #4950 > > | Debug +00:02:50 verbose #4951 > > | Info +00:02:50 verbose #4952 > > | Warning +00:02:50 verbose #4953 > > | Critical +00:02:50 verbose #4954 > > +00:02:50 verbose #4955 > > instance to_string trace_level = function +00:02:50 verbose #4956 > > | Verbose => "Verbose" +00:02:50 verbose #4957 > > | Debug => "Debug" +00:02:50 verbose #4958 > > | Info => "Info" +00:02:50 verbose #4959 > > | Warning => "Warning" +00:02:50 verbose #4960 > > | Critical => "Critical" +00:02:50 verbose #4961 > > +00:02:50 verbose #4962 > > instance of_string trace_level = function +00:02:50 verbose #4963 > > | "Verbose" => Verbose +00:02:50 verbose #4964 > > | "Debug" => Debug +00:02:50 verbose #4965 > > | "Info" => Info +00:02:50 verbose #4966 > > | "Warning" => Warning +00:02:50 verbose #4967 > > | "Critical" => Critical +00:02:50 verbose #4968 > > | x => failwith $'$"of_string trace_level / x: {!x}"' +00:02:50 verbose #4969 > > +00:02:50 verbose #4970 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:50 verbose #4971 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:50 verbose #4972 > > │ ## repl_start │ +00:02:50 verbose #4973 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:50 verbose #4974 > > +00:02:50 verbose #4975 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:50 verbose #4976 > > inl repl_start () : optionm'.option' i64 = +00:02:50 verbose #4977 > > run_target function +00:02:50 verbose #4978 > > | Fsharp (Native) & x +00:02:50 verbose #4979 > > | Rust (Native) & x => fun () => +00:02:50 verbose #4980 > > inl automation = env.get_environment_variable "AUTOMATION" +00:02:50 verbose #4981 > > // inl target = +00:02:50 verbose #4982 > > // match x with +00:02:50 verbose #4983 > > // | Fsharp (Native) => "Fsharp (Native)" +00:02:50 verbose #4984 > > // | Rust (Native) => "Rust (Native)" +00:02:50 verbose #4985 > > // inl assembly_name = env.get_entry_assembly_name () +00:02:50 verbose #4986 > > // console.write_line ($'$"repl_start / automation: +00:02:50 verbose #4987 > > \'{!automation}\' / target: {!target} / assembly_name: {!assembly_name}"' : +00:02:50 verbose #4988 > > string) +00:02:50 verbose #4989 > > if automation = "True" +00:02:50 verbose #4990 > > then date_time.now () |> date_time.ticks |> fun (date_time.timestamp +00:02:50 verbose #4991 > > x) => x |> Some +00:02:50 verbose #4992 > > else None +00:02:50 verbose #4993 > > |> optionm'.box +00:02:50 verbose #4994 > > | _ => fun () => optionm'.none' () +00:02:50 verbose #4995 > > +00:02:50 verbose #4996 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:50 verbose #4997 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:50 verbose #4998 > > │ ## trace_state │ +00:02:50 verbose #4999 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:50 verbose #5000 > > +00:02:50 verbose #5001 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:50 verbose #5002 > > type trace_state = +00:02:50 verbose #5003 > > { +00:02:50 verbose #5004 > > count : mut i64 +00:02:50 verbose #5005 > > trace_file : mut (string -> ()) +00:02:50 verbose #5006 > > enabled : mut bool +00:02:50 verbose #5007 > > level : mut trace_level +00:02:50 verbose #5008 > > repl_start : optionm'.option' i64 +00:02:50 verbose #5009 > > } +00:02:50 verbose #5010 > > +00:02:50 verbose #5011 > > inl new_trace_state trace_level = +00:02:50 verbose #5012 > > { +00:02:50 verbose #5013 > > enabled = mut true +00:02:50 verbose #5014 > > count = mut 0i64 +00:02:50 verbose #5015 > > level = mut trace_level +00:02:50 verbose #5016 > > trace_file = mut ignore +00:02:50 verbose #5017 > > repl_start = repl_start () +00:02:50 verbose #5018 > > } : trace_state +00:02:50 verbose #5019 > > +00:02:50 verbose #5020 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:50 verbose #5021 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:50 verbose #5022 > > │ ## init_trace_state │ +00:02:50 verbose #5023 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:50 verbose #5024 > > +00:02:50 verbose #5025 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:50 verbose #5026 > > inl init_trace_state trace_level : () = +00:02:50 verbose #5027 > > inl trace_level = +00:02:50 verbose #5028 > > trace_level +00:02:50 verbose #5029 > > |> optionm'.default_value Verbose +00:02:50 verbose #5030 > > global "module State = let mutable trace_state = None" +00:02:50 verbose #5031 > > $"if State.trace_state.IsNone then State.trace_state <- !new_trace_state +00:02:50 verbose #5032 > > !trace_level |> Some" : () +00:02:50 verbose #5033 > > +00:02:50 verbose #5034 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:50 verbose #5035 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:50 verbose #5036 > > │ ## get_trace_state_or_init │ +00:02:50 verbose #5037 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:50 verbose #5038 > > +00:02:50 verbose #5039 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:50 verbose #5040 > > inl get_trace_state_or_init trace_level : trace_state = +00:02:50 verbose #5041 > > init_trace_state trace_level +00:02:50 verbose #5042 > > $'State.trace_state.Value' +00:02:50 verbose #5043 > > +00:02:50 verbose #5044 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:50 verbose #5045 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:50 verbose #5046 > > │ ## _locals │ +00:02:50 verbose #5047 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:50 verbose #5048 > > +00:02:50 verbose #5049 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:50 verbose #5050 > > inl _locals () = "" +00:02:50 verbose #5051 > > +00:02:50 verbose #5052 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:50 verbose #5053 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:50 verbose #5054 > > │ ## test_trace_level │ +00:02:50 verbose #5055 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:50 verbose #5056 > > +00:02:50 verbose #5057 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:50 verbose #5058 > > inl test_trace_level level : bool = +00:02:50 verbose #5059 > > inl state = get_trace_state_or_init None +00:02:50 verbose #5060 > > inl level' = *state.level +00:02:50 verbose #5061 > > if *state.enabled |> not +00:02:50 verbose #5062 > > then false +00:02:50 verbose #5063 > > else +00:02:50 verbose #5064 > > inl level : i32 = real real_core.union_tag level +00:02:50 verbose #5065 > > inl level' : i32 = real real_core.union_tag level' +00:02:50 verbose #5066 > > level >= level' +00:02:50 verbose #5067 > > +00:02:50 verbose #5068 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:50 verbose #5069 > > //// test +00:02:50 verbose #5070 > > +00:02:50 verbose #5071 > > test_trace_level Critical |> _assert_eq true +00:02:50 verbose #5072 > > test_trace_level Verbose |> _assert_eq true +00:02:50 verbose #5073 > > +00:02:50 verbose #5074 > > inl level = get_trace_state_or_init None .level +00:02:50 verbose #5075 > > level <- Debug +00:02:50 verbose #5076 > > test_trace_level Verbose |> _assert_eq false +00:02:50 verbose #5077 > > level <- Verbose +00:02:50 verbose #5078 > > test_trace_level Verbose |> _assert_eq true +00:02:51 verbose #5079 > > +00:02:51 verbose #5080 > > ╭─[ 1.42s - stdout ]───────────────────────────────────────────────────────────╮ +00:02:51 verbose #5081 > > │ assert_eq / actual: true / expected: true │ +00:02:51 verbose #5082 > > │ assert_eq / actual: true / expected: true │ +00:02:51 verbose #5083 > > │ assert_eq / actual: false / expected: false │ +00:02:51 verbose #5084 > > │ assert_eq / actual: true / expected: true │ +00:02:51 verbose #5085 > > │ │ +00:02:51 verbose #5086 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:51 verbose #5087 > > +00:02:51 verbose #5088 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:51 verbose #5089 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:51 verbose #5090 > > │ ## trace_raw │ +00:02:51 verbose #5091 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:51 verbose #5092 > > +00:02:51 verbose #5093 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:51 verbose #5094 > > let rec trace_raw level fn = +00:02:51 verbose #5095 > > inl trace_state = get_trace_state_or_init None +00:02:51 verbose #5096 > > if level |> test_trace_level then +00:02:51 verbose #5097 > > inl count = trace_state.count +00:02:51 verbose #5098 > > count <- *trace_state.count + 1 +00:02:51 verbose #5099 > > +00:02:51 verbose #5100 > > inl text = $'$"%s{!fn ()}"' : string +00:02:51 verbose #5101 > > run_target function +00:02:51 verbose #5102 > > | Rust _ => fun () => +00:02:51 verbose #5103 > > open rust_operators +00:02:51 verbose #5104 > > !\\(text, $'\@"println\!(""{}"", $0)"') +00:02:51 verbose #5105 > > | _ => fun () => +00:02:51 verbose #5106 > > $'System.Console.WriteLine !text ' +00:02:51 verbose #5107 > > +00:02:51 verbose #5108 > > *trace_state.trace_file text +00:02:51 verbose #5109 > > +00:02:51 verbose #5110 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:51 verbose #5111 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:51 verbose #5112 > > │ ## trace │ +00:02:51 verbose #5113 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:51 verbose #5114 > > +00:02:51 verbose #5115 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:51 verbose #5116 > > let trace (level : trace_level) (text_fn : () -> string) (locals : () -> string) +00:02:51 verbose #5117 > > = +00:02:51 verbose #5118 > > fun () => +00:02:51 verbose #5119 > > inl trace_state = get_trace_state_or_init None +00:02:51 verbose #5120 > > inl time = +00:02:51 verbose #5121 > > run_target fun target => +00:02:51 verbose #5122 > > match target with +00:02:51 verbose #5123 > > | Fsharp (Native) +00:02:51 verbose #5124 > > | Rust (Native) => fun () => +00:02:51 verbose #5125 > > match trace_state.repl_start |> optionm'.unbox with +00:02:51 verbose #5126 > > | Some repl_start => +00:02:51 verbose #5127 > > inl t = +00:02:51 verbose #5128 > > (date_time.now () |> date_time.ticks |> fun +00:02:51 verbose #5129 > > (date_time.timestamp x) => x) +00:02:51 verbose #5130 > > - repl_start |> date_time.time_span +00:02:51 verbose #5131 > > date_time.date_time_milliseconds +00:02:51 verbose #5132 > > 1i32 1i32 1i32 +00:02:51 verbose #5133 > > (t |> date_time.hours) +00:02:51 verbose #5134 > > (t |> date_time.minutes) +00:02:51 verbose #5135 > > (t |> date_time.seconds) +00:02:51 verbose #5136 > > (t |> date_time.milliseconds) +00:02:51 verbose #5137 > > | None => date_time.now () +00:02:51 verbose #5138 > > |> fun date_time => +00:02:51 verbose #5139 > > inl format = +00:02:51 verbose #5140 > > match target with +00:02:51 verbose #5141 > > | Rust _ => "hh:mm:ss" +00:02:51 verbose #5142 > > | _ => "HH:mm:ss" +00:02:51 verbose #5143 > > $'!date_time.ToString !format ' +00:02:51 verbose #5144 > > | _ => fun () => join "" +00:02:51 verbose #5145 > > inl count = *trace_state.count +00:02:51 verbose #5146 > > inl level_str = level |> to_string |> sm'.to_lower |> sm'.pad_left 7 ' ' +00:02:51 verbose #5147 > > inl level_str = +00:02:51 verbose #5148 > > run_target function +00:02:51 verbose #5149 > > | Rust _ => fun () => +00:02:51 verbose #5150 > > open rust_operators +00:02:51 verbose #5151 > > inl color : rust.ref' sm'.str = +00:02:51 verbose #5152 > > match level with +00:02:51 verbose #5153 > > | Verbose => +00:02:51 verbose #5154 > > !\($'"inline_colorization::color_bright_black"') +00:02:51 verbose #5155 > > | Debug => !\($'"inline_colorization::color_bright_blue"') +00:02:51 verbose #5156 > > | Info => !\($'"inline_colorization::color_bright_green"') +00:02:51 verbose #5157 > > | Warning => !\($'"inline_colorization::color_yellow"') +00:02:51 verbose #5158 > > | Critical => !\($'"inline_colorization::color_bright_red"') +00:02:51 verbose #5159 > > inl level_str = level_str |> sm'.as_str +00:02:51 verbose #5160 > > inl color_reset : rust.ref' sm'.str = +00:02:51 verbose #5161 > > !\($'"inline_colorization::color_reset"') +00:02:51 verbose #5162 > > $'"\\\"{!color}{!level_str}{!color_reset}\\\""' +00:02:51 verbose #5163 > > |> sm'.format'' +00:02:51 verbose #5164 > > |> sm'.from_std_string +00:02:51 verbose #5165 > > | _ => fun () => level_str +00:02:51 verbose #5166 > > $'$"{!time} {!level_str} #{!count} %s{!text_fn ()} / %s{!locals ()}"' +00:02:51 verbose #5167 > > |> sm'.trim_start ;[[]] +00:02:51 verbose #5168 > > |> sm'.trim_end ;[[ ' '; '/' ]] +00:02:51 verbose #5169 > > |> trace_raw level +00:02:51 verbose #5170 > > +00:02:51 verbose #5171 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:51 verbose #5172 > > //// test +00:02:51 verbose #5173 > > +00:02:51 verbose #5174 > > trace Debug (fun () => "test") _locals +00:02:51 verbose #5175 > > trace Debug (fun () => "test") _locals +00:02:51 verbose #5176 > > get_trace_state_or_init None .count +00:02:51 verbose #5177 > > |> fun x => *x +00:02:51 verbose #5178 > > |> _assert_eq 2 +00:02:52 verbose #5179 > > +00:02:52 verbose #5180 > > ╭─[ 318.08ms - stdout ]────────────────────────────────────────────────────────╮ +00:02:52 verbose #5181 > > │ 00:00:00 debug #1 test │ +00:02:52 verbose #5182 > > │ 00:00:00 debug #2 test │ +00:02:52 verbose #5183 > > │ assert_eq / actual: 2L / expected: 2L │ +00:02:52 verbose #5184 > > │ │ +00:02:52 verbose #5185 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:52 verbose #5186 > > +00:02:52 verbose #5187 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:52 verbose #5188 > > //// test +00:02:52 verbose #5189 > > ///! rust +00:02:52 verbose #5190 > > +00:02:52 verbose #5191 > > types () +00:02:52 verbose #5192 > > trace Debug (fun () => "test1") _locals +00:02:52 verbose #5193 > > trace Debug (fun () => "test2") _locals +00:02:52 verbose #5194 > > get_trace_state_or_init None .count +00:02:52 verbose #5195 > > |> fun x => *x +00:02:52 verbose #5196 > > |> _assert_eq 2 +00:02:57 verbose #5197 > > +00:02:57 verbose #5198 > > ╭─[ 4.99s - return value ]─────────────────────────────────────────────────────╮ +00:02:57 verbose #5199 > > │ 00:00:00 debug #1 test1 │ +00:02:57 verbose #5200 > > │ 00:00:00 debug #2 test2 │ +00:02:57 verbose #5201 > > │ assert_eq / actual: 2 / expected: 2 │ +00:02:57 verbose #5202 > > │ │ +00:02:57 verbose #5203 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:57 verbose #5204 > > +00:02:57 verbose #5205 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:02:57 verbose #5206 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:02:57 verbose #5207 > > │ ## main │ +00:02:57 verbose #5208 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:02:57 verbose #5209 > > +00:02:57 verbose #5210 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:02:57 verbose #5211 > > inl main () = +00:02:57 verbose #5212 > > types () +00:02:57 verbose #5213 > > init_trace_state None +00:02:57 verbose #5214 > > $"let trace x = !trace x" : () +00:02:57 verbose #5215 > 00:00:14 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 13354 +00:02:57 verbose #5216 > 00:00:14 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:02:59 verbose #5217 > 00:00:16 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/trace.dib.ipynb to html +00:02:59 verbose #5218 > 00:00:16 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:02:59 verbose #5219 > 00:00:16 verbose #7 ! validate(nb) +00:03:01 verbose #5220 > 00:00:17 verbose #8 ! [NbConvertApp] Writing 311574 bytes to c:\home\git\polyglot\lib\spiral\trace.dib.html +00:03:01 verbose #5221 > 00:00:17 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 641 +00:03:01 verbose #5222 > 00:00:17 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 641 +00:03:01 verbose #5223 > 00:00:17 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/trace.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/trace.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:03:02 verbose #5224 > 00:00:18 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:03:02 verbose #5225 > 00:00:18 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:03:02 verbose #5226 > 00:00:18 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 14054 +00:03:02 debug #5227 execute_with_options_async / exit_code: 0 / output.Length: 16884 +00:03:02 debug #9 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path trace.dib --retries 3 +00:03:02 debug #5228 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path am'.dib --retries 3", [||], None, None, true, None) -00:05:20 verbose #5094 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "am'.dib", "--retries", "3"]) -00:05:20 verbose #5095 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/am'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/am'.dib" --output-path "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:05:31 verbose #5096 > 00:05:30 debug #76 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d8cf4e237444f2409d6311e850eec2fa7698306d9ce29fcae281879098c2f798/main.spi -00:05:49 verbose #5097 > -00:05:49 verbose #5098 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5099 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5100 > │ # am' │ -00:05:49 verbose #5101 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5102 > -00:05:49 verbose #5103 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5104 > //// test -00:05:49 verbose #5105 > -00:05:49 verbose #5106 > open testing -00:05:49 verbose #5107 > -00:05:49 verbose #5108 > ── spiral - import ───────────────────────────────────────────────────────────── -00:05:49 verbose #5109 > #r -00:05:49 verbose #5110 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:05:49 verbose #5111 > otNet.Interactive.Spiral.dll" -00:05:49 verbose #5112 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:05:49 verbose #5113 > #r -00:05:49 verbose #5114 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:05:49 verbose #5115 > otNet.Interactive.dll" -00:05:49 verbose #5116 > open type Microsoft.DotNet.Interactive.Kernel -00:05:49 verbose #5117 > -00:05:49 verbose #5118 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5119 > open rust_operators -00:05:49 verbose #5120 > -00:05:49 verbose #5121 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5122 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5123 > │ ## types () │ -00:05:49 verbose #5124 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5125 > -00:05:49 verbose #5126 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5127 > inl types () = -00:05:49 verbose #5128 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:05:49 verbose #5129 > Fable.Core.Emit(\"[[$0]]\")>]]\n#endif\ntype Slice<'T> = class end" -00:05:49 verbose #5130 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:05:49 verbose #5131 > Fable.Core.Emit(\"_\")>]]\n#endif\ntype Slice'<'T> = class end" -00:05:49 verbose #5132 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:05:49 verbose #5133 > Fable.Core.Emit(\"Vec<$0>\")>]]\n#endif\ntype Vec<'T> = class end" -00:05:49 verbose #5134 > -00:05:49 verbose #5135 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5136 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5137 > │ ## length │ -00:05:49 verbose #5138 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5139 > -00:05:49 verbose #5140 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5141 > inl length forall dim {int} el. (a : a dim el) : dim = -00:05:49 verbose #5142 > a |> length -00:05:49 verbose #5143 > -00:05:49 verbose #5144 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5145 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5146 > │ ## index │ -00:05:49 verbose #5147 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5148 > -00:05:49 verbose #5149 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5150 > inl index forall dim {int} el. (i : dim) (a : a dim el) : el = -00:05:49 verbose #5151 > index a i -00:05:49 verbose #5152 > -00:05:49 verbose #5153 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5154 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5155 > │ ## append │ -00:05:49 verbose #5156 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5157 > -00:05:49 verbose #5158 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5159 > instance append a dim {int; number} t = -00:05:49 verbose #5160 > am.append -00:05:49 verbose #5161 > -00:05:49 verbose #5162 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5163 > //// test -00:05:49 verbose #5164 > -00:05:49 verbose #5165 > a ;[[ "a"; "b" ]] ++ a ;[[ "c"; "d" ]] -00:05:49 verbose #5166 > |> _assert_eq (a ;[[ "a"; "b"; "c"; "d" ]] : _ i32 _) -00:05:49 verbose #5167 > -00:05:49 verbose #5168 > ╭─[ 1.01s - stdout ]───────────────────────────────────────────────────────────╮ -00:05:49 verbose #5169 > │ assert_eq / actual: [|"a"; "b"; "c"; "d"|] / expected: [|"a"; "b"; "c"; │ -00:05:49 verbose #5170 > │ "d"|] │ -00:05:49 verbose #5171 > │ │ -00:05:49 verbose #5172 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5173 > -00:05:49 verbose #5174 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5175 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5176 > │ ## collect │ -00:05:49 verbose #5177 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5178 > -00:05:49 verbose #5179 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5180 > inl collect forall t r. (fn : t -> a i32 r) (items : a i32 t) : a i32 r = -00:05:49 verbose #5181 > items -00:05:49 verbose #5182 > |> am.map fn -00:05:49 verbose #5183 > |> am.fold (++) (a ;[[]]) -00:05:49 verbose #5184 > -00:05:49 verbose #5185 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5186 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5187 > │ ## choose │ -00:05:49 verbose #5188 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5189 > -00:05:49 verbose #5190 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5191 > inl choose f l = -00:05:49 verbose #5192 > (l, [[]]) -00:05:49 verbose #5193 > ||> am.foldBack fun x acc => -00:05:49 verbose #5194 > match f x with -00:05:49 verbose #5195 > | Some y => y :: acc -00:05:49 verbose #5196 > | None => acc -00:05:49 verbose #5197 > |> listm.toArray -00:05:49 verbose #5198 > -00:05:49 verbose #5199 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5200 > //// test -00:05:49 verbose #5201 > -00:05:49 verbose #5202 > (am.init 10i32 id : a _ _) -00:05:49 verbose #5203 > |> choose (fun x => if x % 2 = 0 then Some x else None) -00:05:49 verbose #5204 > |> _assert_eq (a ;[[ 0; 2; 4; 6; 8 ]] : _ i32 _) -00:05:49 verbose #5205 > -00:05:49 verbose #5206 > ╭─[ 392.41ms - stdout ]────────────────────────────────────────────────────────╮ -00:05:49 verbose #5207 > │ assert_eq / actual: [|0; 2; 4; 6; 8|] / expected: [|0; 2; 4; 6; 8|] │ -00:05:49 verbose #5208 > │ │ -00:05:49 verbose #5209 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5210 > -00:05:49 verbose #5211 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5212 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5213 > │ ## sum │ -00:05:49 verbose #5214 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5215 > -00:05:49 verbose #5216 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5217 > inl sum (a' : a _ _) = -00:05:49 verbose #5218 > a' |> am.fold (+) 0 -00:05:49 verbose #5219 > -00:05:49 verbose #5220 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5221 > //// test -00:05:49 verbose #5222 > -00:05:49 verbose #5223 > am.init 10i32 id -00:05:49 verbose #5224 > |> sum -00:05:49 verbose #5225 > |> _assert_eq 45 -00:05:49 verbose #5226 > -00:05:49 verbose #5227 > ╭─[ 74.17ms - stdout ]─────────────────────────────────────────────────────────╮ -00:05:49 verbose #5228 > │ assert_eq / actual: 45 / expected: 45 │ -00:05:49 verbose #5229 > │ │ -00:05:49 verbose #5230 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5231 > -00:05:49 verbose #5232 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5233 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5234 > │ ## init_series │ -00:05:49 verbose #5235 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5236 > -00:05:49 verbose #5237 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5238 > inl init_series start end inc = -00:05:49 verbose #5239 > inl total = conv ((end - start) / inc) + 1 -00:05:49 verbose #5240 > am.init total (conv >> (*) inc >> (+) start) : a i32 _ -00:05:49 verbose #5241 > -00:05:49 verbose #5242 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5243 > //// test -00:05:49 verbose #5244 > -00:05:49 verbose #5245 > init_series 0 1 0.5 -00:05:49 verbose #5246 > |> _assert_eq (a ;[[ 0f64; 0.5; 1 ]]) -00:05:49 verbose #5247 > -00:05:49 verbose #5248 > ╭─[ 82.06ms - stdout ]─────────────────────────────────────────────────────────╮ -00:05:49 verbose #5249 > │ assert_eq / actual: [|0.0; 0.5; 1.0|] / expected: [|0.0; 0.5; 1.0|] │ -00:05:49 verbose #5250 > │ │ -00:05:49 verbose #5251 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5252 > -00:05:49 verbose #5253 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5254 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5255 > │ ## head │ -00:05:49 verbose #5256 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5257 > -00:05:49 verbose #5258 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5259 > inl head (ar : a _ _) = -00:05:49 verbose #5260 > if var_is ar || length ar > 0 -00:05:49 verbose #5261 > then ar |> index 0 -00:05:49 verbose #5262 > else error_type "The length of the array should be greater than 0." -00:05:49 verbose #5263 > -00:05:49 verbose #5264 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5265 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5266 > │ ## last │ -00:05:49 verbose #5267 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5268 > -00:05:49 verbose #5269 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5270 > inl last (ar : a _ _) = -00:05:49 verbose #5271 > inl len = length ar -00:05:49 verbose #5272 > if var_is ar || len > 0 -00:05:49 verbose #5273 > then ar |> index (len - 1) -00:05:49 verbose #5274 > else error_type "The length of the array should be greater than 0." -00:05:49 verbose #5275 > -00:05:49 verbose #5276 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5277 > //// test -00:05:49 verbose #5278 > -00:05:49 verbose #5279 > am.init 10i32 id -00:05:49 verbose #5280 > |> last -00:05:49 verbose #5281 > |> _assert_eq 9 -00:05:49 verbose #5282 > -00:05:49 verbose #5283 > ╭─[ 55.91ms - stdout ]─────────────────────────────────────────────────────────╮ -00:05:49 verbose #5284 > │ assert_eq / actual: 9 / expected: 9 │ -00:05:49 verbose #5285 > │ │ -00:05:49 verbose #5286 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5287 > -00:05:49 verbose #5288 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5289 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5290 > │ ## try_pick │ -00:05:49 verbose #5291 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5292 > -00:05:49 verbose #5293 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5294 > inl try_pick forall t u. (fn : t -> option u) (array : a _ t) : option u = -00:05:49 verbose #5295 > (array, None) -00:05:49 verbose #5296 > ||> am.foldBack fun x acc => -00:05:49 verbose #5297 > match acc with -00:05:49 verbose #5298 > | Some _ => acc -00:05:49 verbose #5299 > | None => x |> fn -00:05:49 verbose #5300 > -00:05:49 verbose #5301 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5302 > //// test -00:05:49 verbose #5303 > -00:05:49 verbose #5304 > am.init 10i32 id -00:05:49 verbose #5305 > |> try_pick (fun x => if x = 5i32 then Some x else None) -00:05:49 verbose #5306 > |> _assert_eq (Some 5i32) -00:05:49 verbose #5307 > -00:05:49 verbose #5308 > ╭─[ 123.77ms - stdout ]────────────────────────────────────────────────────────╮ -00:05:49 verbose #5309 > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │ -00:05:49 verbose #5310 > │ │ -00:05:49 verbose #5311 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5312 > -00:05:49 verbose #5313 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5314 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5315 > │ ## indexed' │ -00:05:49 verbose #5316 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5317 > -00:05:49 verbose #5318 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5319 > inl indexed' forall t dim {int; number} dim' {int; number} u {number}. (ar : a -00:05:49 verbose #5320 > dim t) : a dim' (u * t) = -00:05:49 verbose #5321 > ((0, a ;[[]]), ar) -00:05:49 verbose #5322 > ||> am.fold fun (i, acc) x => -00:05:49 verbose #5323 > i + 1, acc ++ a ;[[i, x]] -00:05:49 verbose #5324 > |> snd -00:05:49 verbose #5325 > -00:05:49 verbose #5326 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5327 > //// test -00:05:49 verbose #5328 > -00:05:49 verbose #5329 > am.init 3i32 ((*) 2) -00:05:49 verbose #5330 > |> indexed' -00:05:49 verbose #5331 > |> _assert_eq (a ;[[0i32, 0; 1, 2; 2, 4]] : a i32 _) -00:05:49 verbose #5332 > -00:05:49 verbose #5333 > ╭─[ 149.57ms - stdout ]────────────────────────────────────────────────────────╮ -00:05:49 verbose #5334 > │ assert_eq / actual: [|struct (0, 0); struct (1, 2); struct (2, 4)|] / │ -00:05:49 verbose #5335 > │ expected: [|struct (0, 0); struct (1, 2); struct (2, 4)|] │ -00:05:49 verbose #5336 > │ │ -00:05:49 verbose #5337 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5338 > -00:05:49 verbose #5339 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5340 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5341 > │ ## map_base │ -00:05:49 verbose #5342 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5343 > -00:05:49 verbose #5344 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5345 > inl map_base forall t u. (fn : t -> u) (x : array_base t) : array_base u = -00:05:49 verbose #5346 > a x -00:05:49 verbose #5347 > |> am.map fn -00:05:49 verbose #5348 > |> fun (a x : _ i64 _) => x -00:05:49 verbose #5349 > -00:05:49 verbose #5350 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5351 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5352 > │ ## average │ -00:05:49 verbose #5353 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5354 > -00:05:49 verbose #5355 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5356 > inl average forall el {number}. (a : a _ el) : el = -00:05:49 verbose #5357 > a |> $'Array.average' -00:05:49 verbose #5358 > -00:05:49 verbose #5359 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5360 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5361 > │ ## distinct │ -00:05:49 verbose #5362 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5363 > -00:05:49 verbose #5364 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5365 > inl distinct forall dim el. (a : a dim el) : a dim el = -00:05:49 verbose #5366 > a |> $'Array.distinct' -00:05:49 verbose #5367 > -00:05:49 verbose #5368 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5369 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5370 > │ ## to_list' │ -00:05:49 verbose #5371 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5372 > -00:05:49 verbose #5373 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5374 > inl to_list' forall dim t. (items : a dim t) : listm'.list' t = -00:05:49 verbose #5375 > items |> $'Array.toList' -00:05:49 verbose #5376 > -00:05:49 verbose #5377 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5378 > //// test -00:05:49 verbose #5379 > -00:05:49 verbose #5380 > (a ;[[ "a"; "b" ]] : _ i32 _) -00:05:49 verbose #5381 > |> to_list' -00:05:49 verbose #5382 > |> listm'.unbox -00:05:49 verbose #5383 > |> _assert_eq ([[ "a"; "b" ]]) -00:05:49 verbose #5384 > -00:05:49 verbose #5385 > ╭─[ 130.18ms - stdout ]────────────────────────────────────────────────────────╮ -00:05:49 verbose #5386 > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_0)) / expected: UH0_1 ("a", │ -00:05:49 verbose #5387 > │ UH0_1 ("b", UH0_0)) │ -00:05:49 verbose #5388 > │ │ -00:05:49 verbose #5389 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5390 > -00:05:49 verbose #5391 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5392 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5393 > │ ## parallel_map │ -00:05:49 verbose #5394 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5395 > -00:05:49 verbose #5396 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5397 > inl parallel_map forall dim el el'. (fn : el -> el') (a : a dim el) : a dim el' -00:05:49 verbose #5398 > = -00:05:49 verbose #5399 > a |> $'Array.Parallel.map' fn -00:05:49 verbose #5400 > -00:05:49 verbose #5401 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5402 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5403 > │ ## map' │ -00:05:49 verbose #5404 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5405 > -00:05:49 verbose #5406 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5407 > inl map' forall dim el el'. (fn : el -> el') (a : a dim el) : a dim el' = -00:05:49 verbose #5408 > $'!a |> Array.map !fn ' -00:05:49 verbose #5409 > -00:05:49 verbose #5410 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5411 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5412 > │ ## sort_by │ -00:05:49 verbose #5413 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5414 > -00:05:49 verbose #5415 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5416 > inl sort_by forall dim el. (fn : el -> _) (a : a dim el) : a dim el = -00:05:49 verbose #5417 > a |> $'Array.sortBy' fn -00:05:49 verbose #5418 > -00:05:49 verbose #5419 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5420 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5421 > │ ## sort │ -00:05:49 verbose #5422 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5423 > -00:05:49 verbose #5424 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5425 > inl sort forall dim el. (a : a dim el) : a dim el = -00:05:49 verbose #5426 > a |> $'Array.sort' -00:05:49 verbose #5427 > -00:05:49 verbose #5428 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5429 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5430 > │ ## sort_descending │ -00:05:49 verbose #5431 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5432 > -00:05:49 verbose #5433 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5434 > inl sort_descending forall dim el. (a : a dim el) : a dim el = -00:05:49 verbose #5435 > a |> $'Array.sortDescending' -00:05:49 verbose #5436 > -00:05:49 verbose #5437 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5438 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5439 > │ ## transpose │ -00:05:49 verbose #5440 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5441 > -00:05:49 verbose #5442 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5443 > inl transpose forall dim el. (a : a dim (a dim el)) : a dim (a dim el) = -00:05:49 verbose #5444 > a |> $'Array.transpose' -00:05:49 verbose #5445 > -00:05:49 verbose #5446 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5447 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5448 > │ ## try_item │ -00:05:49 verbose #5449 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5450 > -00:05:49 verbose #5451 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5452 > inl try_item forall dim el. (i : i32) (a : a dim el) : option el = -00:05:49 verbose #5453 > a |> $'Array.tryItem' i |> optionm'.unbox -00:05:49 verbose #5454 > -00:05:49 verbose #5455 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5456 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5457 > │ ## indexed │ -00:05:49 verbose #5458 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5459 > -00:05:49 verbose #5460 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5461 > inl indexed (array : a _ _) = -00:05:49 verbose #5462 > (([[]], 0), array) -00:05:49 verbose #5463 > ||> am.fold fun (acc, i) x => -00:05:49 verbose #5464 > (i, x) :: acc, i + 1 -00:05:49 verbose #5465 > |> fst -00:05:49 verbose #5466 > |> listm.rev -00:05:49 verbose #5467 > |> listm.toArray -00:05:49 verbose #5468 > -00:05:49 verbose #5469 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5470 > //// test -00:05:49 verbose #5471 > -00:05:49 verbose #5472 > am.init 3i32 ((*) 2) -00:05:49 verbose #5473 > |> indexed -00:05:49 verbose #5474 > |> _assert_eq (a ;[[0i32, 0; 1, 2; 2, 4]] : a i32 _) -00:05:49 verbose #5475 > -00:05:49 verbose #5476 > ╭─[ 175.02ms - stdout ]────────────────────────────────────────────────────────╮ -00:05:49 verbose #5477 > │ assert_eq / actual: [|struct (0, 0); struct (1, 2); struct (2, 4)|] / │ -00:05:49 verbose #5478 > │ expected: [|struct (0, 0); struct (1, 2); struct (2, 4)|] │ -00:05:49 verbose #5479 > │ │ -00:05:49 verbose #5480 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5481 > -00:05:49 verbose #5482 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5483 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5484 > │ ## vec │ -00:05:49 verbose #5485 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5486 > -00:05:49 verbose #5487 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5488 > nominal vec t = $"Vec<`t>" -00:05:49 verbose #5489 > -00:05:49 verbose #5490 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5491 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5492 > │ ## from_vec │ -00:05:49 verbose #5493 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5494 > -00:05:49 verbose #5495 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5496 > inl from_vec forall dim el. (vec : vec el) : a dim el = -00:05:49 verbose #5497 > !\\(vec, $'"fable_library_rust::NativeArray_::array_from($0)"') -00:05:49 verbose #5498 > -00:05:49 verbose #5499 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5500 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5501 > │ ## to_vec │ -00:05:49 verbose #5502 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5503 > -00:05:49 verbose #5504 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5505 > inl to_vec forall t. (ab : array_base t) : vec t = -00:05:49 verbose #5506 > !\\(ab, $'"$0.to_vec()"') -00:05:49 verbose #5507 > -00:05:49 verbose #5508 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5509 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5510 > │ ## vec_push │ -00:05:49 verbose #5511 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5512 > -00:05:49 verbose #5513 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5514 > inl vec_push forall el. (el : el) (vec : vec el) : vec el = -00:05:49 verbose #5515 > inl el = join el -00:05:49 verbose #5516 > inl vec = join vec -00:05:49 verbose #5517 > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore -00:05:49 verbose #5518 > // inl vec = vec |> rust.to_mut -00:05:49 verbose #5519 > (!\($'"true; !vec.push(!el)"') : bool) |> ignore -00:05:49 verbose #5520 > !\($'"!vec"') -00:05:49 verbose #5521 > -00:05:49 verbose #5522 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5523 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5524 > │ ## vec_reverse │ -00:05:49 verbose #5525 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5526 > -00:05:49 verbose #5527 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5528 > inl vec_reverse forall el. (vec : vec el) : vec el = -00:05:49 verbose #5529 > inl vec = join vec -00:05:49 verbose #5530 > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore -00:05:49 verbose #5531 > (!\($'"true; !vec.reverse()"') : bool) |> ignore -00:05:49 verbose #5532 > !\($'"!vec"') -00:05:49 verbose #5533 > -00:05:49 verbose #5534 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5535 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5536 > │ ## vec_retain │ -00:05:49 verbose #5537 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5538 > -00:05:49 verbose #5539 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5540 > inl vec_retain forall el. (fn : el -> bool) (vec : vec el) : vec el = -00:05:49 verbose #5541 > inl vec = join vec -00:05:49 verbose #5542 > inl fn = join fn -00:05:49 verbose #5543 > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore -00:05:49 verbose #5544 > // inl vec = vec |> rust.to_mut -00:05:49 verbose #5545 > (!\($'"true; !vec.retain(|x| !fn(x.clone()))"') : bool) |> ignore -00:05:49 verbose #5546 > !\($'"!vec"') -00:05:49 verbose #5547 > -00:05:49 verbose #5548 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5549 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5550 > │ ## vec_sort_by_key │ -00:05:49 verbose #5551 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5552 > -00:05:49 verbose #5553 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5554 > inl vec_sort_by_key forall el t. (fn : el -> t) (vec : vec el) : vec el = -00:05:49 verbose #5555 > inl vec = join vec -00:05:49 verbose #5556 > inl fn = join fn -00:05:49 verbose #5557 > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore -00:05:49 verbose #5558 > // inl vec = vec |> rust.to_mut -00:05:49 verbose #5559 > (!\($'"true; !vec.sort_by_key(|x| !fn(x.clone()))"') : bool) |> ignore -00:05:49 verbose #5560 > !\($'"!vec"') -00:05:49 verbose #5561 > -00:05:49 verbose #5562 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5563 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5564 > │ ## vec_extend │ -00:05:49 verbose #5565 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5566 > -00:05:49 verbose #5567 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5568 > inl vec_extend forall el. (el : vec el) (vec : vec el) : vec el = -00:05:49 verbose #5569 > inl el = join el -00:05:49 verbose #5570 > inl vec = join vec -00:05:49 verbose #5571 > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore -00:05:49 verbose #5572 > // inl vec = vec |> rust.to_mut -00:05:49 verbose #5573 > (!\($'"true; !vec.extend(!el)"') : bool) |> ignore -00:05:49 verbose #5574 > !\($'"!vec"') -00:05:49 verbose #5575 > -00:05:49 verbose #5576 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5577 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5578 > │ ## vec_collect │ -00:05:49 verbose #5579 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5580 > -00:05:49 verbose #5581 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5582 > inl vec_collect fn vec = -00:05:49 verbose #5583 > ((;[[]] |> to_vec), (vec |> from_vec : _ i32 _)) -00:05:49 verbose #5584 > ||> am.fold fun acc x => -00:05:49 verbose #5585 > acc |> vec_extend (fn x) -00:05:49 verbose #5586 > -00:05:49 verbose #5587 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5588 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5589 > │ ## vec_collect_option │ -00:05:49 verbose #5590 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5591 > -00:05:49 verbose #5592 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5593 > inl vec_collect_option vec = -00:05:49 verbose #5594 > ((;[[]] |> to_vec |> Ok), (vec |> from_vec : _ i32 _)) -00:05:49 verbose #5595 > ||> am.fold fun acc x => -00:05:49 verbose #5596 > x -00:05:49 verbose #5597 > |> resultm.unbox -00:05:49 verbose #5598 > |> fun x => -00:05:49 verbose #5599 > match acc, x |> resultm.map optionm'.unbox with -00:05:49 verbose #5600 > | Ok acc, Ok (Some x) => acc |> vec_extend x |> Ok -00:05:49 verbose #5601 > | _, Error error => error |> Error -00:05:49 verbose #5602 > | _ => acc -00:05:49 verbose #5603 > -00:05:49 verbose #5604 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5605 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5606 > │ ## vec_collect_into │ -00:05:49 verbose #5607 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5608 > -00:05:49 verbose #5609 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5610 > inl vec_collect_into forall (c : * -> * -> *) t e. -00:05:49 verbose #5611 > (x : vec (c t e)) -00:05:49 verbose #5612 > : c (vec t) e -00:05:49 verbose #5613 > = -00:05:49 verbose #5614 > !\($'"!x.into_iter().collect()"') -00:05:49 verbose #5615 > -00:05:49 verbose #5616 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5617 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5618 > │ ## vec_mapi │ -00:05:49 verbose #5619 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5620 > -00:05:49 verbose #5621 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5622 > inl vec_mapi forall dim t u. (fn : dim -> t -> u) (ar : vec t) : vec u = -00:05:49 verbose #5623 > inl fn = join fn -00:05:49 verbose #5624 > inl ar = join ar -00:05:49 verbose #5625 > !\($'"!ar.iter().enumerate().map(|(i, x)| -00:05:49 verbose #5626 > !fn(i.try_into().unwrap())(x.clone())).collect()"') -00:05:49 verbose #5627 > -00:05:49 verbose #5628 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5629 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5630 > │ ## vec_map │ -00:05:49 verbose #5631 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5632 > -00:05:49 verbose #5633 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5634 > inl vec_map forall t u. (fn : t -> u) (ar : vec t) : vec u = -00:05:49 verbose #5635 > (!\($'"true; let _result = !ar.into_iter().map(|x| { //"') : bool) |> ignore -00:05:49 verbose #5636 > (!\\(fn !\($'"x"'), $'"true; $0 }).collect()"') : bool) |> ignore -00:05:49 verbose #5637 > !\($'"_result"') -00:05:49 verbose #5638 > -00:05:49 verbose #5639 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5640 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5641 > │ ## vec_map' │ -00:05:49 verbose #5642 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5643 > -00:05:49 verbose #5644 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5645 > inl vec_map' forall t u. (fn : t -> u) (ar : vec t) : vec u = -00:05:49 verbose #5646 > !\\((ar, fn), $'"$0.into_iter().map(|x| $1(x.clone())).collect()"') -00:05:49 verbose #5647 > -00:05:49 verbose #5648 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5649 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5650 > │ ## vec_fold' │ -00:05:49 verbose #5651 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5652 > -00:05:49 verbose #5653 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5654 > inl vec_fold' forall t u. (fn : u -> t -> u) (init : u) (ar : vec t) : u = -00:05:49 verbose #5655 > (!\\(ar, $'"true; let _result = $0.into_iter().fold(!init, |acc, x| { //"') -00:05:49 verbose #5656 > : bool) |> ignore -00:05:49 verbose #5657 > (!\\(fn !\($'"acc"') !\($'"x"'), $'"true; $0 })"') : bool) |> ignore -00:05:49 verbose #5658 > !\($'"_result"') -00:05:49 verbose #5659 > -00:05:49 verbose #5660 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5661 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5662 > │ ## vec_iter │ -00:05:49 verbose #5663 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5664 > -00:05:49 verbose #5665 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5666 > inl vec_iter forall t. (fn : t -> ()) (ar : vec t) : () = -00:05:49 verbose #5667 > !\\((ar, fn), $'"$0.iter().map(|x| { $1(x.clone()); }).collect()"') -00:05:49 verbose #5668 > -00:05:49 verbose #5669 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5670 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5671 > │ ## vec_filter │ -00:05:49 verbose #5672 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5673 > -00:05:49 verbose #5674 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5675 > inl vec_filter forall t. (fn : t -> bool) (ar : vec t) : vec t = -00:05:49 verbose #5676 > inl fn = join fn -00:05:49 verbose #5677 > inl ar = join ar -00:05:49 verbose #5678 > !\($'"!ar.into_iter().filter(|x| !fn(x.clone().clone())).collect()"') -00:05:49 verbose #5679 > -00:05:49 verbose #5680 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5681 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5682 > │ ## vec_len │ -00:05:49 verbose #5683 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5684 > -00:05:49 verbose #5685 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5686 > inl vec_len forall t. (vec : vec t) : unativeint = -00:05:49 verbose #5687 > !\\(vec, $'"$0.len()"') -00:05:49 verbose #5688 > -00:05:49 verbose #5689 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5690 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5691 > │ ## vec_chunks │ -00:05:49 verbose #5692 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5693 > -00:05:49 verbose #5694 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5695 > inl vec_chunks forall t. (n : i32) (vec : vec t) : vec (vec t) = -00:05:49 verbose #5696 > !\\(vec, $'"$0.chunks(!n).map(|x| x.into_iter().map(|x| -00:05:49 verbose #5697 > x.clone()).collect()).collect()"') -00:05:49 verbose #5698 > -00:05:49 verbose #5699 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5700 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5701 > │ ## slice │ -00:05:49 verbose #5702 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5703 > -00:05:49 verbose #5704 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5705 > nominal slice t = $"Slice<`t>" -00:05:49 verbose #5706 > -00:05:49 verbose #5707 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5708 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5709 > │ ## slice │ -00:05:49 verbose #5710 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5711 > -00:05:49 verbose #5712 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5713 > inl slice forall dim {int; number} el. from nearTo s : a dim el = -00:05:49 verbose #5714 > am.slice { from nearTo } s -00:05:49 verbose #5715 > -00:05:49 verbose #5716 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5717 > //// test -00:05:49 verbose #5718 > -00:05:49 verbose #5719 > inl x : _ i32 _ = a ;[[ 1i32; 2; 3 ]] -00:05:49 verbose #5720 > x |> slice 0 0 |> _assert_eq (a ;[[]]) -00:05:49 verbose #5721 > x |> slice 0 1 |> _assert_eq (a ;[[ 1 ]]) -00:05:49 verbose #5722 > x |> slice 1 1 |> _assert_eq (a ;[[]]) -00:05:49 verbose #5723 > x |> slice 1 2 |> _assert_eq (a ;[[ 2 ]]) -00:05:49 verbose #5724 > x |> slice 2 2 |> _assert_eq (a ;[[]]) -00:05:49 verbose #5725 > x |> slice 0 2 |> _assert_eq (a ;[[ 1; 2 ]]) -00:05:49 verbose #5726 > -00:05:49 verbose #5727 > ╭─[ 270.08ms - stdout ]────────────────────────────────────────────────────────╮ -00:05:49 verbose #5728 > │ assert_eq / actual: [||] / expected: [||] │ -00:05:49 verbose #5729 > │ assert_eq / actual: [|1|] / expected: [|1|] │ -00:05:49 verbose #5730 > │ assert_eq / actual: [||] / expected: [||] │ -00:05:49 verbose #5731 > │ assert_eq / actual: [|2|] / expected: [|2|] │ -00:05:49 verbose #5732 > │ assert_eq / actual: [||] / expected: [||] │ -00:05:49 verbose #5733 > │ assert_eq / actual: [|1; 2|] / expected: [|1; 2|] │ -00:05:49 verbose #5734 > │ │ -00:05:49 verbose #5735 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5736 > -00:05:49 verbose #5737 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5738 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5739 > │ ## range │ -00:05:49 verbose #5740 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5741 > -00:05:49 verbose #5742 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5743 > union range dim = -00:05:49 verbose #5744 > | Start : dim -00:05:49 verbose #5745 > | End : dim -> dim -00:05:49 verbose #5746 > -00:05:49 verbose #5747 > inl range start end s = -00:05:49 verbose #5748 > inl start, end = -00:05:49 verbose #5749 > match start, end with -00:05:49 verbose #5750 > | Start start, End fn => -00:05:49 verbose #5751 > start, s |> length |> conv |> fn -00:05:49 verbose #5752 > | End start_fn, End end_fn => -00:05:49 verbose #5753 > inl len = s |> length |> conv -00:05:49 verbose #5754 > start_fn len, end_fn len -00:05:49 verbose #5755 > s |> slice (start |> unbox) (end |> unbox) -00:05:49 verbose #5756 > -00:05:49 verbose #5757 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5758 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5759 > │ ## slice' │ -00:05:49 verbose #5760 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5761 > -00:05:49 verbose #5762 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5763 > nominal slice' el dim = $"Slice'<`el>" -00:05:49 verbose #5764 > -00:05:49 verbose #5765 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5766 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5767 > │ ## slice_singleton │ -00:05:49 verbose #5768 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5769 > -00:05:49 verbose #5770 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5771 > inl slice_singleton forall dim el. (x : option el) : slice' el dim = -00:05:49 verbose #5772 > match x with -00:05:49 verbose #5773 > | Some x => !\($'"[[!x]]"') -00:05:49 verbose #5774 > | None => -00:05:49 verbose #5775 > !\($'"[[\\\"\\\".to_string()]]"') : slice' el dim -00:05:49 verbose #5776 > // emit_expr `(()) `(slice' el dim) () ($'"[[@dim]]"' : string) : -00:05:49 verbose #5777 > slice' el 10 -00:05:49 verbose #5778 > // !\( : string) : slice' el i32 // !\($'"[[]]"') -00:05:49 verbose #5779 > -00:05:49 verbose #5780 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5781 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5782 > │ ## slice_length │ -00:05:49 verbose #5783 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5784 > -00:05:49 verbose #5785 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5786 > inl slice_length forall t dim. (x : slice' t dim) : unativeint = -00:05:49 verbose #5787 > !\($'"!x.len()"') -00:05:49 verbose #5788 > -00:05:49 verbose #5789 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5790 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5791 > │ ## slice_range │ -00:05:49 verbose #5792 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5793 > -00:05:49 verbose #5794 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5795 > inl slice_range forall t dim. (start : range t) (end : range t) (s : slice' t -00:05:49 verbose #5796 > dim) : rust.ref' (slice' t dim) = -00:05:49 verbose #5797 > inl len = s |> slice_length -00:05:49 verbose #5798 > inl start, end = -00:05:49 verbose #5799 > match start, end with -00:05:49 verbose #5800 > | Start start, End fn => start, len |> convert |> fn |> unativeint -00:05:49 verbose #5801 > | End start_fn, End end_fn => len |> convert |> start_fn, len |> convert -00:05:49 verbose #5802 > |> end_fn |> unativeint -00:05:49 verbose #5803 > match start, end with -00:05:49 verbose #5804 > | start, end when unbox end =. len => !\($'"&!s[[!start..]]"') -00:05:49 verbose #5805 > | start, end => !\\((start, end), $'"&!s[[$0..$1]]"') -00:05:49 verbose #5806 > -00:05:49 verbose #5807 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5808 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5809 > │ ## new_slice │ -00:05:49 verbose #5810 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5811 > -00:05:49 verbose #5812 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5813 > inl new_slice forall el dim. (el : el) : slice' el dim = -00:05:49 verbose #5814 > !\\(el, $'"[[$0; @dim]]"') -00:05:49 verbose #5815 > -00:05:49 verbose #5816 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5817 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5818 > │ ## as_slice │ -00:05:49 verbose #5819 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5820 > -00:05:49 verbose #5821 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5822 > inl as_slice forall t. (x : array_base t) : rust.ref' (slice t) = -00:05:49 verbose #5823 > inl x = x |> to_vec -00:05:49 verbose #5824 > !\($'"!x.as_slice()"') -00:05:49 verbose #5825 > -00:05:49 verbose #5826 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5827 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5828 > │ ## slice_to_vec │ -00:05:49 verbose #5829 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5830 > -00:05:49 verbose #5831 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5832 > inl slice_to_vec forall t. (slice : rust.ref' (slice t)) : vec t = -00:05:49 verbose #5833 > !\\(slice, $'"$0.iter().map(|x| *x).collect()"') -00:05:49 verbose #5834 > -00:05:49 verbose #5835 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5836 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5837 > │ ## any │ -00:05:49 verbose #5838 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5839 > -00:05:49 verbose #5840 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5841 > inl any forall t. (fn : t -> bool) (source : array_base t) : bool = -00:05:49 verbose #5842 > !\($'"!source.any(|x| !fn(x))"') -00:05:49 verbose #5843 > -00:05:49 verbose #5844 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5845 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5846 > │ ## iter_collect vec │ -00:05:49 verbose #5847 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5848 > -00:05:49 verbose #5849 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5850 > open iter_prototypes -00:05:49 verbose #5851 > -00:05:49 verbose #5852 > instance iter_collect vec = fun (iter : iter_prototypes.into_iterator u) => -00:05:49 verbose #5853 > !\($'"!iter.collect()"') -00:05:49 verbose #5854 > -00:05:49 verbose #5855 > ── markdown ──────────────────────────────────────────────────────────────────── -00:05:49 verbose #5856 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:05:49 verbose #5857 > │ ## enumerate │ -00:05:49 verbose #5858 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5859 > -00:05:49 verbose #5860 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5861 > inl enumerate forall dim {int; number} t. (ar : a dim t) : a dim (unativeint * -00:05:49 verbose #5862 > t) = -00:05:49 verbose #5863 > inl (a ar) = ar -00:05:49 verbose #5864 > ar -00:05:49 verbose #5865 > |> to_vec -00:05:49 verbose #5866 > |> iter.into_iter -00:05:49 verbose #5867 > |> iter.iter_enumerate -00:05:49 verbose #5868 > |> iter_prototypes.iter_collect -00:05:49 verbose #5869 > |> vec_map' from_pair -00:05:49 verbose #5870 > |> from_vec -00:05:49 verbose #5871 > -00:05:49 verbose #5872 > ── spiral ────────────────────────────────────────────────────────────────────── -00:05:49 verbose #5873 > //// test -00:05:49 verbose #5874 > ///! rust -00:05:49 verbose #5875 > -00:05:49 verbose #5876 > types () -00:05:49 verbose #5877 > init_series 0i32 2 1 -00:05:49 verbose #5878 > |> enumerate -00:05:49 verbose #5879 > |> _assert_eq' (a ;[[ unativeint 0i32, 0; unativeint 1i32, 1; unativeint 2i32, 2 -00:05:49 verbose #5880 > ]]) -00:05:49 verbose #5881 > -00:05:49 verbose #5882 > ╭─[ 19.32s - return value ]────────────────────────────────────────────────────╮ -00:05:49 verbose #5883 > │ assert_eq' / actual: Array(MutCell([(0, 0), (1, 1), (2, 2)])) / expected: │ -00:05:49 verbose #5884 > │ Array(MutCell([(0, 0), (1, 1), (2, 2)])) │ -00:05:49 verbose #5885 > │ │ -00:05:49 verbose #5886 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:05:49 verbose #5887 > 00:00:29 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 39272 -00:05:49 verbose #5888 > 00:00:29 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:05:55 verbose #5889 > 00:00:35 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/am'.dib.ipynb to html\e[0m -00:05:55 verbose #5890 > 00:00:35 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:05:55 verbose #5891 > 00:00:35 verbose #7 \e[4;7m validate(nb)\e[0m -00:05:55 verbose #5892 > 00:00:35 verbose #8 \e[4;7m[NbConvertApp] Writing 405904 bytes to c:\home\git\polyglot\lib\spiral\am'.dib.html\e[0m -00:05:55 verbose #5893 > 00:00:35 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 597 -00:05:55 verbose #5894 > 00:00:35 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 597 -00:05:55 verbose #5895 > 00:00:35 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/am''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/am''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:05:56 verbose #5896 > 00:00:35 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:05:56 verbose #5897 > 00:00:35 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:05:56 verbose #5898 > 00:00:36 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 39928 -00:05:56 debug #5899 execute_with_options_async / exit_code: 0 / output.Length: 42212 -00:05:56 debug #10 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path am'.dib --retries 3 -00:05:56 debug #5900 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path crypto.dib --retries 3", +00:03:02 verbose #5229 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "am'.dib", "--retries", "3"]) +00:03:02 verbose #5230 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/am'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/am'.dib" --output-path "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:03:04 verbose #5231 > > +00:03:04 verbose #5232 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:04 verbose #5233 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:04 verbose #5234 > > │ # am' │ +00:03:04 verbose #5235 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:04 verbose #5236 > > +00:03:04 verbose #5237 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:04 verbose #5238 > > //// test +00:03:04 verbose #5239 > > +00:03:04 verbose #5240 > > open testing +00:03:04 verbose #5241 > > +00:03:04 verbose #5242 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:03:04 verbose #5243 > > #r +00:03:04 verbose #5244 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:03:04 verbose #5245 > > otNet.Interactive.Spiral.dll" +00:03:04 verbose #5246 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:03:04 verbose #5247 > > #r +00:03:04 verbose #5248 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:03:04 verbose #5249 > > otNet.Interactive.dll" +00:03:04 verbose #5250 > > open type Microsoft.DotNet.Interactive.Kernel +00:03:08 verbose #5251 > > +00:03:08 verbose #5252 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:08 verbose #5253 > > open rust_operators +00:03:08 verbose #5254 > > +00:03:08 verbose #5255 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:08 verbose #5256 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:08 verbose #5257 > > │ ## types () │ +00:03:08 verbose #5258 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:08 verbose #5259 > > +00:03:08 verbose #5260 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:08 verbose #5261 > > inl types () = +00:03:08 verbose #5262 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:03:08 verbose #5263 > > Fable.Core.Emit(\"[[$0]]\")>]]\n#endif\ntype Slice<'T> = class end" +00:03:08 verbose #5264 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:03:08 verbose #5265 > > Fable.Core.Emit(\"_\")>]]\n#endif\ntype Slice'<'T> = class end" +00:03:08 verbose #5266 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:03:08 verbose #5267 > > Fable.Core.Emit(\"Vec<$0>\")>]]\n#endif\ntype Vec<'T> = class end" +00:03:08 verbose #5268 > > +00:03:08 verbose #5269 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:08 verbose #5270 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:08 verbose #5271 > > │ ## length │ +00:03:08 verbose #5272 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:08 verbose #5273 > > +00:03:08 verbose #5274 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:08 verbose #5275 > > inl length forall dim {int} el. (a : a dim el) : dim = +00:03:08 verbose #5276 > > a |> length +00:03:08 verbose #5277 > > +00:03:08 verbose #5278 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:08 verbose #5279 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:08 verbose #5280 > > │ ## index │ +00:03:08 verbose #5281 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:08 verbose #5282 > > +00:03:08 verbose #5283 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:08 verbose #5284 > > inl index forall dim {int} el. (i : dim) (a : a dim el) : el = +00:03:08 verbose #5285 > > index a i +00:03:08 verbose #5286 > > +00:03:08 verbose #5287 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:08 verbose #5288 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:08 verbose #5289 > > │ ## append │ +00:03:08 verbose #5290 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:08 verbose #5291 > > +00:03:08 verbose #5292 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:08 verbose #5293 > > instance append a dim {int; number} t = +00:03:08 verbose #5294 > > am.append +00:03:08 verbose #5295 > > +00:03:08 verbose #5296 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:08 verbose #5297 > > //// test +00:03:08 verbose #5298 > > +00:03:08 verbose #5299 > > a ;[[ "a"; "b" ]] ++ a ;[[ "c"; "d" ]] +00:03:08 verbose #5300 > > |> _assert_eq (a ;[[ "a"; "b"; "c"; "d" ]] : _ i32 _) +00:03:09 verbose #5301 > > +00:03:09 verbose #5302 > > ╭─[ 1.07s - stdout ]───────────────────────────────────────────────────────────╮ +00:03:09 verbose #5303 > > │ assert_eq / actual: [|"a"; "b"; "c"; "d"|] / expected: [|"a"; "b"; "c"; │ +00:03:09 verbose #5304 > > │ "d"|] │ +00:03:09 verbose #5305 > > │ │ +00:03:09 verbose #5306 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:09 verbose #5307 > > +00:03:09 verbose #5308 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:09 verbose #5309 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:09 verbose #5310 > > │ ## collect │ +00:03:09 verbose #5311 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:09 verbose #5312 > > +00:03:09 verbose #5313 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:09 verbose #5314 > > inl collect forall t r. (fn : t -> a i32 r) (items : a i32 t) : a i32 r = +00:03:09 verbose #5315 > > items +00:03:09 verbose #5316 > > |> am.map fn +00:03:09 verbose #5317 > > |> am.fold (++) (a ;[[]]) +00:03:09 verbose #5318 > > +00:03:09 verbose #5319 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:09 verbose #5320 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:09 verbose #5321 > > │ ## choose │ +00:03:09 verbose #5322 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:09 verbose #5323 > > +00:03:09 verbose #5324 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:09 verbose #5325 > > inl choose f l = +00:03:09 verbose #5326 > > (l, [[]]) +00:03:09 verbose #5327 > > ||> am.foldBack fun x acc => +00:03:09 verbose #5328 > > match f x with +00:03:09 verbose #5329 > > | Some y => y :: acc +00:03:09 verbose #5330 > > | None => acc +00:03:09 verbose #5331 > > |> listm.toArray +00:03:09 verbose #5332 > > +00:03:09 verbose #5333 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:09 verbose #5334 > > //// test +00:03:09 verbose #5335 > > +00:03:09 verbose #5336 > > (am.init 10i32 id : a _ _) +00:03:09 verbose #5337 > > |> choose (fun x => if x % 2 = 0 then Some x else None) +00:03:09 verbose #5338 > > |> _assert_eq (a ;[[ 0; 2; 4; 6; 8 ]] : _ i32 _) +00:03:10 verbose #5339 > > +00:03:10 verbose #5340 > > ╭─[ 360.39ms - stdout ]────────────────────────────────────────────────────────╮ +00:03:10 verbose #5341 > > │ assert_eq / actual: [|0; 2; 4; 6; 8|] / expected: [|0; 2; 4; 6; 8|] │ +00:03:10 verbose #5342 > > │ │ +00:03:10 verbose #5343 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5344 > > +00:03:10 verbose #5345 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:10 verbose #5346 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:10 verbose #5347 > > │ ## sum │ +00:03:10 verbose #5348 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5349 > > +00:03:10 verbose #5350 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5351 > > inl sum (a' : a _ _) = +00:03:10 verbose #5352 > > a' |> am.fold (+) 0 +00:03:10 verbose #5353 > > +00:03:10 verbose #5354 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5355 > > //// test +00:03:10 verbose #5356 > > +00:03:10 verbose #5357 > > am.init 10i32 id +00:03:10 verbose #5358 > > |> sum +00:03:10 verbose #5359 > > |> _assert_eq 45 +00:03:10 verbose #5360 > > +00:03:10 verbose #5361 > > ╭─[ 81.19ms - stdout ]─────────────────────────────────────────────────────────╮ +00:03:10 verbose #5362 > > │ assert_eq / actual: 45 / expected: 45 │ +00:03:10 verbose #5363 > > │ │ +00:03:10 verbose #5364 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5365 > > +00:03:10 verbose #5366 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:10 verbose #5367 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:10 verbose #5368 > > │ ## init_series │ +00:03:10 verbose #5369 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5370 > > +00:03:10 verbose #5371 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5372 > > inl init_series start end inc = +00:03:10 verbose #5373 > > inl total = conv ((end - start) / inc) + 1 +00:03:10 verbose #5374 > > am.init total (conv >> (*) inc >> (+) start) : a i32 _ +00:03:10 verbose #5375 > > +00:03:10 verbose #5376 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5377 > > //// test +00:03:10 verbose #5378 > > +00:03:10 verbose #5379 > > init_series 0 1 0.5 +00:03:10 verbose #5380 > > |> _assert_eq (a ;[[ 0f64; 0.5; 1 ]]) +00:03:10 verbose #5381 > > +00:03:10 verbose #5382 > > ╭─[ 76.33ms - stdout ]─────────────────────────────────────────────────────────╮ +00:03:10 verbose #5383 > > │ assert_eq / actual: [|0.0; 0.5; 1.0|] / expected: [|0.0; 0.5; 1.0|] │ +00:03:10 verbose #5384 > > │ │ +00:03:10 verbose #5385 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5386 > > +00:03:10 verbose #5387 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:10 verbose #5388 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:10 verbose #5389 > > │ ## head │ +00:03:10 verbose #5390 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5391 > > +00:03:10 verbose #5392 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5393 > > inl head (ar : a _ _) = +00:03:10 verbose #5394 > > if var_is ar || length ar > 0 +00:03:10 verbose #5395 > > then ar |> index 0 +00:03:10 verbose #5396 > > else error_type "The length of the array should be greater than 0." +00:03:10 verbose #5397 > > +00:03:10 verbose #5398 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:10 verbose #5399 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:10 verbose #5400 > > │ ## last │ +00:03:10 verbose #5401 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5402 > > +00:03:10 verbose #5403 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5404 > > inl last (ar : a _ _) = +00:03:10 verbose #5405 > > inl len = length ar +00:03:10 verbose #5406 > > if var_is ar || len > 0 +00:03:10 verbose #5407 > > then ar |> index (len - 1) +00:03:10 verbose #5408 > > else error_type "The length of the array should be greater than 0." +00:03:10 verbose #5409 > > +00:03:10 verbose #5410 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5411 > > //// test +00:03:10 verbose #5412 > > +00:03:10 verbose #5413 > > am.init 10i32 id +00:03:10 verbose #5414 > > |> last +00:03:10 verbose #5415 > > |> _assert_eq 9 +00:03:10 verbose #5416 > > +00:03:10 verbose #5417 > > ╭─[ 61.09ms - stdout ]─────────────────────────────────────────────────────────╮ +00:03:10 verbose #5418 > > │ assert_eq / actual: 9 / expected: 9 │ +00:03:10 verbose #5419 > > │ │ +00:03:10 verbose #5420 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5421 > > +00:03:10 verbose #5422 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:10 verbose #5423 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:10 verbose #5424 > > │ ## try_pick │ +00:03:10 verbose #5425 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5426 > > +00:03:10 verbose #5427 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5428 > > inl try_pick forall t u. (fn : t -> option u) (array : a _ t) : option u = +00:03:10 verbose #5429 > > (array, None) +00:03:10 verbose #5430 > > ||> am.foldBack fun x acc => +00:03:10 verbose #5431 > > match acc with +00:03:10 verbose #5432 > > | Some _ => acc +00:03:10 verbose #5433 > > | None => x |> fn +00:03:10 verbose #5434 > > +00:03:10 verbose #5435 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5436 > > //// test +00:03:10 verbose #5437 > > +00:03:10 verbose #5438 > > am.init 10i32 id +00:03:10 verbose #5439 > > |> try_pick (fun x => if x = 5i32 then Some x else None) +00:03:10 verbose #5440 > > |> _assert_eq (Some 5i32) +00:03:10 verbose #5441 > > +00:03:10 verbose #5442 > > ╭─[ 116.04ms - stdout ]────────────────────────────────────────────────────────╮ +00:03:10 verbose #5443 > > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │ +00:03:10 verbose #5444 > > │ │ +00:03:10 verbose #5445 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5446 > > +00:03:10 verbose #5447 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:10 verbose #5448 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:10 verbose #5449 > > │ ## indexed' │ +00:03:10 verbose #5450 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5451 > > +00:03:10 verbose #5452 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5453 > > inl indexed' forall t dim {int; number} dim' {int; number} u {number}. (ar : a +00:03:10 verbose #5454 > > dim t) : a dim' (u * t) = +00:03:10 verbose #5455 > > ((0, a ;[[]]), ar) +00:03:10 verbose #5456 > > ||> am.fold fun (i, acc) x => +00:03:10 verbose #5457 > > i + 1, acc ++ a ;[[i, x]] +00:03:10 verbose #5458 > > |> snd +00:03:10 verbose #5459 > > +00:03:10 verbose #5460 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5461 > > //// test +00:03:10 verbose #5462 > > +00:03:10 verbose #5463 > > am.init 3i32 ((*) 2) +00:03:10 verbose #5464 > > |> indexed' +00:03:10 verbose #5465 > > |> _assert_eq (a ;[[0i32, 0; 1, 2; 2, 4]] : a i32 _) +00:03:10 verbose #5466 > > +00:03:10 verbose #5467 > > ╭─[ 137.13ms - stdout ]────────────────────────────────────────────────────────╮ +00:03:10 verbose #5468 > > │ assert_eq / actual: [|struct (0, 0); struct (1, 2); struct (2, 4)|] / │ +00:03:10 verbose #5469 > > │ expected: [|struct (0, 0); struct (1, 2); struct (2, 4)|] │ +00:03:10 verbose #5470 > > │ │ +00:03:10 verbose #5471 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5472 > > +00:03:10 verbose #5473 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:10 verbose #5474 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:10 verbose #5475 > > │ ## map_base │ +00:03:10 verbose #5476 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5477 > > +00:03:10 verbose #5478 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5479 > > inl map_base forall t u. (fn : t -> u) (x : array_base t) : array_base u = +00:03:10 verbose #5480 > > a x +00:03:10 verbose #5481 > > |> am.map fn +00:03:10 verbose #5482 > > |> fun (a x : _ i64 _) => x +00:03:10 verbose #5483 > > +00:03:10 verbose #5484 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:10 verbose #5485 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:10 verbose #5486 > > │ ## average │ +00:03:10 verbose #5487 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5488 > > +00:03:10 verbose #5489 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5490 > > inl average forall el {number}. (a : a _ el) : el = +00:03:10 verbose #5491 > > a |> $'Array.average' +00:03:10 verbose #5492 > > +00:03:10 verbose #5493 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:10 verbose #5494 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:10 verbose #5495 > > │ ## distinct │ +00:03:10 verbose #5496 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5497 > > +00:03:10 verbose #5498 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5499 > > inl distinct forall dim el. (a : a dim el) : a dim el = +00:03:10 verbose #5500 > > a |> $'Array.distinct' +00:03:10 verbose #5501 > > +00:03:10 verbose #5502 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:10 verbose #5503 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:10 verbose #5504 > > │ ## to_list' │ +00:03:10 verbose #5505 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:10 verbose #5506 > > +00:03:10 verbose #5507 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5508 > > inl to_list' forall dim t. (items : a dim t) : listm'.list' t = +00:03:10 verbose #5509 > > items |> $'Array.toList' +00:03:10 verbose #5510 > > +00:03:10 verbose #5511 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:10 verbose #5512 > > //// test +00:03:10 verbose #5513 > > +00:03:10 verbose #5514 > > (a ;[[ "a"; "b" ]] : _ i32 _) +00:03:10 verbose #5515 > > |> to_list' +00:03:10 verbose #5516 > > |> listm'.unbox +00:03:10 verbose #5517 > > |> _assert_eq ([[ "a"; "b" ]]) +00:03:11 verbose #5518 > > +00:03:11 verbose #5519 > > ╭─[ 112.73ms - stdout ]────────────────────────────────────────────────────────╮ +00:03:11 verbose #5520 > > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_0)) / expected: UH0_1 ("a", │ +00:03:11 verbose #5521 > > │ UH0_1 ("b", UH0_0)) │ +00:03:11 verbose #5522 > > │ │ +00:03:11 verbose #5523 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5524 > > +00:03:11 verbose #5525 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5526 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5527 > > │ ## parallel_map │ +00:03:11 verbose #5528 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5529 > > +00:03:11 verbose #5530 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5531 > > inl parallel_map forall dim el el'. (fn : el -> el') (a : a dim el) : a dim el' +00:03:11 verbose #5532 > > = +00:03:11 verbose #5533 > > a |> $'Array.Parallel.map' fn +00:03:11 verbose #5534 > > +00:03:11 verbose #5535 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5536 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5537 > > │ ## map' │ +00:03:11 verbose #5538 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5539 > > +00:03:11 verbose #5540 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5541 > > inl map' forall dim el el'. (fn : el -> el') (a : a dim el) : a dim el' = +00:03:11 verbose #5542 > > $'!a |> Array.map !fn ' +00:03:11 verbose #5543 > > +00:03:11 verbose #5544 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5545 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5546 > > │ ## sort_by │ +00:03:11 verbose #5547 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5548 > > +00:03:11 verbose #5549 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5550 > > inl sort_by forall dim el. (fn : el -> _) (a : a dim el) : a dim el = +00:03:11 verbose #5551 > > a |> $'Array.sortBy' fn +00:03:11 verbose #5552 > > +00:03:11 verbose #5553 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5554 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5555 > > │ ## sort │ +00:03:11 verbose #5556 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5557 > > +00:03:11 verbose #5558 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5559 > > inl sort forall dim el. (a : a dim el) : a dim el = +00:03:11 verbose #5560 > > a |> $'Array.sort' +00:03:11 verbose #5561 > > +00:03:11 verbose #5562 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5563 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5564 > > │ ## sort_descending │ +00:03:11 verbose #5565 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5566 > > +00:03:11 verbose #5567 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5568 > > inl sort_descending forall dim el. (a : a dim el) : a dim el = +00:03:11 verbose #5569 > > a |> $'Array.sortDescending' +00:03:11 verbose #5570 > > +00:03:11 verbose #5571 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5572 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5573 > > │ ## transpose │ +00:03:11 verbose #5574 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5575 > > +00:03:11 verbose #5576 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5577 > > inl transpose forall dim el. (a : a dim (a dim el)) : a dim (a dim el) = +00:03:11 verbose #5578 > > a |> $'Array.transpose' +00:03:11 verbose #5579 > > +00:03:11 verbose #5580 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5581 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5582 > > │ ## try_item │ +00:03:11 verbose #5583 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5584 > > +00:03:11 verbose #5585 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5586 > > inl try_item forall dim el. (i : i32) (a : a dim el) : option el = +00:03:11 verbose #5587 > > a |> $'Array.tryItem' i |> optionm'.unbox +00:03:11 verbose #5588 > > +00:03:11 verbose #5589 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5590 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5591 > > │ ## indexed │ +00:03:11 verbose #5592 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5593 > > +00:03:11 verbose #5594 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5595 > > inl indexed (array : a _ _) = +00:03:11 verbose #5596 > > (([[]], 0), array) +00:03:11 verbose #5597 > > ||> am.fold fun (acc, i) x => +00:03:11 verbose #5598 > > (i, x) :: acc, i + 1 +00:03:11 verbose #5599 > > |> fst +00:03:11 verbose #5600 > > |> listm.rev +00:03:11 verbose #5601 > > |> listm.toArray +00:03:11 verbose #5602 > > +00:03:11 verbose #5603 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5604 > > //// test +00:03:11 verbose #5605 > > +00:03:11 verbose #5606 > > am.init 3i32 ((*) 2) +00:03:11 verbose #5607 > > |> indexed +00:03:11 verbose #5608 > > |> _assert_eq (a ;[[0i32, 0; 1, 2; 2, 4]] : a i32 _) +00:03:11 verbose #5609 > > +00:03:11 verbose #5610 > > ╭─[ 168.75ms - stdout ]────────────────────────────────────────────────────────╮ +00:03:11 verbose #5611 > > │ assert_eq / actual: [|struct (0, 0); struct (1, 2); struct (2, 4)|] / │ +00:03:11 verbose #5612 > > │ expected: [|struct (0, 0); struct (1, 2); struct (2, 4)|] │ +00:03:11 verbose #5613 > > │ │ +00:03:11 verbose #5614 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5615 > > +00:03:11 verbose #5616 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5617 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5618 > > │ ## vec │ +00:03:11 verbose #5619 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5620 > > +00:03:11 verbose #5621 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5622 > > nominal vec t = $"Vec<`t>" +00:03:11 verbose #5623 > > +00:03:11 verbose #5624 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5625 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5626 > > │ ## from_vec │ +00:03:11 verbose #5627 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5628 > > +00:03:11 verbose #5629 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5630 > > inl from_vec forall dim el. (vec : vec el) : a dim el = +00:03:11 verbose #5631 > > !\\(vec, $'"fable_library_rust::NativeArray_::array_from($0)"') +00:03:11 verbose #5632 > > +00:03:11 verbose #5633 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5634 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5635 > > │ ## to_vec │ +00:03:11 verbose #5636 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5637 > > +00:03:11 verbose #5638 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5639 > > inl to_vec forall t. (ab : array_base t) : vec t = +00:03:11 verbose #5640 > > !\\(ab, $'"$0.to_vec()"') +00:03:11 verbose #5641 > > +00:03:11 verbose #5642 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5643 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5644 > > │ ## vec_push │ +00:03:11 verbose #5645 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5646 > > +00:03:11 verbose #5647 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5648 > > inl vec_push forall el. (el : el) (vec : vec el) : vec el = +00:03:11 verbose #5649 > > inl el = join el +00:03:11 verbose #5650 > > inl vec = join vec +00:03:11 verbose #5651 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore +00:03:11 verbose #5652 > > // inl vec = vec |> rust.to_mut +00:03:11 verbose #5653 > > (!\($'"true; !vec.push(!el)"') : bool) |> ignore +00:03:11 verbose #5654 > > !\($'"!vec"') +00:03:11 verbose #5655 > > +00:03:11 verbose #5656 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5657 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5658 > > │ ## vec_reverse │ +00:03:11 verbose #5659 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5660 > > +00:03:11 verbose #5661 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5662 > > inl vec_reverse forall el. (vec : vec el) : vec el = +00:03:11 verbose #5663 > > inl vec = join vec +00:03:11 verbose #5664 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore +00:03:11 verbose #5665 > > (!\($'"true; !vec.reverse()"') : bool) |> ignore +00:03:11 verbose #5666 > > !\($'"!vec"') +00:03:11 verbose #5667 > > +00:03:11 verbose #5668 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5669 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5670 > > │ ## vec_retain │ +00:03:11 verbose #5671 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5672 > > +00:03:11 verbose #5673 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5674 > > inl vec_retain forall el. (fn : el -> bool) (vec : vec el) : vec el = +00:03:11 verbose #5675 > > inl vec = join vec +00:03:11 verbose #5676 > > inl fn = join fn +00:03:11 verbose #5677 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore +00:03:11 verbose #5678 > > // inl vec = vec |> rust.to_mut +00:03:11 verbose #5679 > > (!\($'"true; !vec.retain(|x| !fn(x.clone()))"') : bool) |> ignore +00:03:11 verbose #5680 > > !\($'"!vec"') +00:03:11 verbose #5681 > > +00:03:11 verbose #5682 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5683 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5684 > > │ ## vec_sort_by_key │ +00:03:11 verbose #5685 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5686 > > +00:03:11 verbose #5687 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5688 > > inl vec_sort_by_key forall el t. (fn : el -> t) (vec : vec el) : vec el = +00:03:11 verbose #5689 > > inl vec = join vec +00:03:11 verbose #5690 > > inl fn = join fn +00:03:11 verbose #5691 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore +00:03:11 verbose #5692 > > // inl vec = vec |> rust.to_mut +00:03:11 verbose #5693 > > (!\($'"true; !vec.sort_by_key(|x| !fn(x.clone()))"') : bool) |> ignore +00:03:11 verbose #5694 > > !\($'"!vec"') +00:03:11 verbose #5695 > > +00:03:11 verbose #5696 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5697 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5698 > > │ ## vec_extend │ +00:03:11 verbose #5699 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5700 > > +00:03:11 verbose #5701 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5702 > > inl vec_extend forall el. (el : vec el) (vec : vec el) : vec el = +00:03:11 verbose #5703 > > inl el = join el +00:03:11 verbose #5704 > > inl vec = join vec +00:03:11 verbose #5705 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore +00:03:11 verbose #5706 > > // inl vec = vec |> rust.to_mut +00:03:11 verbose #5707 > > (!\($'"true; !vec.extend(!el)"') : bool) |> ignore +00:03:11 verbose #5708 > > !\($'"!vec"') +00:03:11 verbose #5709 > > +00:03:11 verbose #5710 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5711 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5712 > > │ ## vec_collect │ +00:03:11 verbose #5713 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5714 > > +00:03:11 verbose #5715 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5716 > > inl vec_collect fn vec = +00:03:11 verbose #5717 > > ((;[[]] |> to_vec), (vec |> from_vec : _ i32 _)) +00:03:11 verbose #5718 > > ||> am.fold fun acc x => +00:03:11 verbose #5719 > > acc |> vec_extend (fn x) +00:03:11 verbose #5720 > > +00:03:11 verbose #5721 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5722 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5723 > > │ ## vec_collect_option │ +00:03:11 verbose #5724 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5725 > > +00:03:11 verbose #5726 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5727 > > inl vec_collect_option vec = +00:03:11 verbose #5728 > > ((;[[]] |> to_vec |> Ok), (vec |> from_vec : _ i32 _)) +00:03:11 verbose #5729 > > ||> am.fold fun acc x => +00:03:11 verbose #5730 > > x +00:03:11 verbose #5731 > > |> resultm.unbox +00:03:11 verbose #5732 > > |> fun x => +00:03:11 verbose #5733 > > match acc, x |> resultm.map optionm'.unbox with +00:03:11 verbose #5734 > > | Ok acc, Ok (Some x) => acc |> vec_extend x |> Ok +00:03:11 verbose #5735 > > | _, Error error => error |> Error +00:03:11 verbose #5736 > > | _ => acc +00:03:11 verbose #5737 > > +00:03:11 verbose #5738 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5739 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5740 > > │ ## vec_collect_into │ +00:03:11 verbose #5741 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5742 > > +00:03:11 verbose #5743 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5744 > > inl vec_collect_into forall (c : * -> * -> *) t e. +00:03:11 verbose #5745 > > (x : vec (c t e)) +00:03:11 verbose #5746 > > : c (vec t) e +00:03:11 verbose #5747 > > = +00:03:11 verbose #5748 > > !\($'"!x.into_iter().collect()"') +00:03:11 verbose #5749 > > +00:03:11 verbose #5750 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5751 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5752 > > │ ## vec_mapi │ +00:03:11 verbose #5753 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5754 > > +00:03:11 verbose #5755 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5756 > > inl vec_mapi forall dim t u. (fn : dim -> t -> u) (ar : vec t) : vec u = +00:03:11 verbose #5757 > > inl fn = join fn +00:03:11 verbose #5758 > > inl ar = join ar +00:03:11 verbose #5759 > > !\($'"!ar.iter().enumerate().map(|(i, x)| +00:03:11 verbose #5760 > > !fn(i.try_into().unwrap())(x.clone())).collect::<Vec<_>>()"') +00:03:11 verbose #5761 > > +00:03:11 verbose #5762 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5763 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5764 > > │ ## vec_map │ +00:03:11 verbose #5765 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5766 > > +00:03:11 verbose #5767 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5768 > > inl vec_map forall t u. (fn : t -> u) (ar : vec t) : vec u = +00:03:11 verbose #5769 > > (!\($'"true; let _result = !ar.into_iter().map(|x| { //"') : bool) |> ignore +00:03:11 verbose #5770 > > (!\\(fn !\($'"x"'), $'"true; $0 }).collect::<Vec<_>>()"') : bool) |> ignore +00:03:11 verbose #5771 > > !\($'"_result"') +00:03:11 verbose #5772 > > +00:03:11 verbose #5773 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5774 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5775 > > │ ## vec_map''' │ +00:03:11 verbose #5776 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5777 > > +00:03:11 verbose #5778 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5779 > > inl vec_map''' forall t u. (fn : t -> u) (ar : vec t) : vec u = +00:03:11 verbose #5780 > > (!\($'"true; let _result = !ar.into_iter().map(|x| { //"') : bool) |> ignore +00:03:11 verbose #5781 > > (!\\(fn !\($'"x"'), $'"true; $0 }}).collect::<Vec<_>>(); {{ //"') : bool) |> +00:03:11 verbose #5782 > > ignore +00:03:11 verbose #5783 > > !\($'"_result"') +00:03:11 verbose #5784 > > +00:03:11 verbose #5785 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5786 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5787 > > │ ## vec_map' │ +00:03:11 verbose #5788 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5789 > > +00:03:11 verbose #5790 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5791 > > inl vec_map' forall t u. (fn : t -> u) (ar : vec t) : vec u = +00:03:11 verbose #5792 > > !\\((ar, fn), $'"$0.into_iter().map(|x| +00:03:11 verbose #5793 > > $1(x.clone())).collect::<Vec<_>>()"') +00:03:11 verbose #5794 > > +00:03:11 verbose #5795 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5796 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5797 > > │ ## vec_fold' │ +00:03:11 verbose #5798 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5799 > > +00:03:11 verbose #5800 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5801 > > inl vec_fold' forall t u. (fn : u -> t -> u) (init : u) (ar : vec t) : u = +00:03:11 verbose #5802 > > (!\\(ar, $'"true; let _result = $0.into_iter().fold(!init, |acc, x| { //"') +00:03:11 verbose #5803 > > : bool) |> ignore +00:03:11 verbose #5804 > > (!\\(fn !\($'"acc"') !\($'"x"'), $'"true; $0 })"') : bool) |> ignore +00:03:11 verbose #5805 > > !\($'"_result"') +00:03:11 verbose #5806 > > +00:03:11 verbose #5807 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5808 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5809 > > │ ## vec_for_each │ +00:03:11 verbose #5810 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5811 > > +00:03:11 verbose #5812 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5813 > > inl vec_for_each forall t. (fn : t -> ()) (ar : vec t) : () = +00:03:11 verbose #5814 > > !\\((ar, fn), $'"$0.iter().for_each(|x| { $1(x.clone()); })"') +00:03:11 verbose #5815 > > +00:03:11 verbose #5816 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5817 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5818 > > │ ## vec_for_each' │ +00:03:11 verbose #5819 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5820 > > +00:03:11 verbose #5821 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5822 > > inl vec_for_each' forall t. (fn : t -> ()) (ar : vec t) : () = +00:03:11 verbose #5823 > > (!\($'"true; !ar.into_iter().for_each(|x| { //"') : bool) |> ignore +00:03:11 verbose #5824 > > inl x = fn !\($'"x"') +00:03:11 verbose #5825 > > (!\($'"true; !x }}); { //"') : bool) |> ignore +00:03:11 verbose #5826 > > +00:03:11 verbose #5827 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5828 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5829 > > │ ## vec_filter │ +00:03:11 verbose #5830 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5831 > > +00:03:11 verbose #5832 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5833 > > inl vec_filter forall t. (fn : t -> bool) (ar : vec t) : vec t = +00:03:11 verbose #5834 > > inl fn = join fn +00:03:11 verbose #5835 > > inl ar = join ar +00:03:11 verbose #5836 > > !\($'"!ar.into_iter().filter(|x| +00:03:11 verbose #5837 > > !fn(x.clone().clone())).collect::<Vec<_>>()"') +00:03:11 verbose #5838 > > +00:03:11 verbose #5839 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5840 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5841 > > │ ## vec_len │ +00:03:11 verbose #5842 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5843 > > +00:03:11 verbose #5844 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5845 > > inl vec_len forall t. (vec : vec t) : unativeint = +00:03:11 verbose #5846 > > !\\(vec, $'"$0.len()"') +00:03:11 verbose #5847 > > +00:03:11 verbose #5848 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5849 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5850 > > │ ## vec_chunks │ +00:03:11 verbose #5851 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5852 > > +00:03:11 verbose #5853 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5854 > > inl vec_chunks forall t. (n : i32) (vec : vec t) : vec (vec t) = +00:03:11 verbose #5855 > > !\\(vec, $'"$0.chunks(!n).map(|x| x.into_iter().map(|x| +00:03:11 verbose #5856 > > x.clone()).collect::<Vec<_>>()).collect::<Vec<_>>()"') +00:03:11 verbose #5857 > > +00:03:11 verbose #5858 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5859 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5860 > > │ ## slice │ +00:03:11 verbose #5861 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5862 > > +00:03:11 verbose #5863 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5864 > > nominal slice t = $"Slice<`t>" +00:03:11 verbose #5865 > > +00:03:11 verbose #5866 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:11 verbose #5867 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:11 verbose #5868 > > │ ## slice │ +00:03:11 verbose #5869 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:11 verbose #5870 > > +00:03:11 verbose #5871 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5872 > > inl slice forall dim {int; number} el. from nearTo s : a dim el = +00:03:11 verbose #5873 > > am.slice { from nearTo } s +00:03:11 verbose #5874 > > +00:03:11 verbose #5875 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:11 verbose #5876 > > //// test +00:03:11 verbose #5877 > > +00:03:11 verbose #5878 > > inl x : _ i32 _ = a ;[[ 1i32; 2; 3 ]] +00:03:11 verbose #5879 > > x |> slice 0 0 |> _assert_eq (a ;[[]]) +00:03:11 verbose #5880 > > x |> slice 0 1 |> _assert_eq (a ;[[ 1 ]]) +00:03:11 verbose #5881 > > x |> slice 1 1 |> _assert_eq (a ;[[]]) +00:03:11 verbose #5882 > > x |> slice 1 2 |> _assert_eq (a ;[[ 2 ]]) +00:03:11 verbose #5883 > > x |> slice 2 2 |> _assert_eq (a ;[[]]) +00:03:11 verbose #5884 > > x |> slice 0 2 |> _assert_eq (a ;[[ 1; 2 ]]) +00:03:12 verbose #5885 > > +00:03:12 verbose #5886 > > ╭─[ 174.38ms - stdout ]────────────────────────────────────────────────────────╮ +00:03:12 verbose #5887 > > │ assert_eq / actual: [||] / expected: [||] │ +00:03:12 verbose #5888 > > │ assert_eq / actual: [|1|] / expected: [|1|] │ +00:03:12 verbose #5889 > > │ assert_eq / actual: [||] / expected: [||] │ +00:03:12 verbose #5890 > > │ assert_eq / actual: [|2|] / expected: [|2|] │ +00:03:12 verbose #5891 > > │ assert_eq / actual: [||] / expected: [||] │ +00:03:12 verbose #5892 > > │ assert_eq / actual: [|1; 2|] / expected: [|1; 2|] │ +00:03:12 verbose #5893 > > │ │ +00:03:12 verbose #5894 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #5895 > > +00:03:12 verbose #5896 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #5897 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #5898 > > │ ## range │ +00:03:12 verbose #5899 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #5900 > > +00:03:12 verbose #5901 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #5902 > > union range dim = +00:03:12 verbose #5903 > > | Start : dim +00:03:12 verbose #5904 > > | End : dim -> dim +00:03:12 verbose #5905 > > +00:03:12 verbose #5906 > > inl range start end s = +00:03:12 verbose #5907 > > inl start, end = +00:03:12 verbose #5908 > > match start, end with +00:03:12 verbose #5909 > > | Start start, End fn => +00:03:12 verbose #5910 > > start, s |> length |> conv |> fn +00:03:12 verbose #5911 > > | End start_fn, End end_fn => +00:03:12 verbose #5912 > > inl len = s |> length |> conv +00:03:12 verbose #5913 > > start_fn len, end_fn len +00:03:12 verbose #5914 > > s |> slice (start |> unbox) (end |> unbox) +00:03:12 verbose #5915 > > +00:03:12 verbose #5916 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #5917 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #5918 > > │ ## slice' │ +00:03:12 verbose #5919 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #5920 > > +00:03:12 verbose #5921 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #5922 > > nominal slice' el dim = $"Slice'<`el>" +00:03:12 verbose #5923 > > +00:03:12 verbose #5924 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #5925 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #5926 > > │ ## slice_singleton │ +00:03:12 verbose #5927 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #5928 > > +00:03:12 verbose #5929 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #5930 > > inl slice_singleton forall dim el. (x : option el) : slice' el dim = +00:03:12 verbose #5931 > > match x with +00:03:12 verbose #5932 > > | Some x => !\($'"[[!x]]"') +00:03:12 verbose #5933 > > | None => +00:03:12 verbose #5934 > > !\($'"[[\\\"\\\".to_string()]]"') : slice' el dim +00:03:12 verbose #5935 > > // emit_expr `(()) `(slice' el dim) () ($'"[[@dim]]"' : string) : +00:03:12 verbose #5936 > > slice' el 10 +00:03:12 verbose #5937 > > // !\( : string) : slice' el i32 // !\($'"[[]]"') +00:03:12 verbose #5938 > > +00:03:12 verbose #5939 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #5940 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #5941 > > │ ## slice_length │ +00:03:12 verbose #5942 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #5943 > > +00:03:12 verbose #5944 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #5945 > > inl slice_length forall t dim. (x : slice' t dim) : unativeint = +00:03:12 verbose #5946 > > !\($'"!x.len()"') +00:03:12 verbose #5947 > > +00:03:12 verbose #5948 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #5949 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #5950 > > │ ## slice_range │ +00:03:12 verbose #5951 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #5952 > > +00:03:12 verbose #5953 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #5954 > > inl slice_range forall t dim. (start : range t) (end : range t) (s : slice' t +00:03:12 verbose #5955 > > dim) : rust.ref' (slice' t dim) = +00:03:12 verbose #5956 > > inl len = s |> slice_length +00:03:12 verbose #5957 > > inl start, end = +00:03:12 verbose #5958 > > match start, end with +00:03:12 verbose #5959 > > | Start start, End fn => start, len |> convert |> fn |> unativeint +00:03:12 verbose #5960 > > | End start_fn, End end_fn => len |> convert |> start_fn, len |> convert +00:03:12 verbose #5961 > > |> end_fn |> unativeint +00:03:12 verbose #5962 > > match start, end with +00:03:12 verbose #5963 > > | start, end when unbox end =. len => !\($'"&!s[[!start..]]"') +00:03:12 verbose #5964 > > | start, end => !\\((start, end), $'"&!s[[$0..$1]]"') +00:03:12 verbose #5965 > > +00:03:12 verbose #5966 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #5967 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #5968 > > │ ## new_slice │ +00:03:12 verbose #5969 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #5970 > > +00:03:12 verbose #5971 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #5972 > > inl new_slice forall el dim. (el : el) : slice' el dim = +00:03:12 verbose #5973 > > !\\(el, $'"[[$0; @dim]]"') +00:03:12 verbose #5974 > > +00:03:12 verbose #5975 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #5976 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #5977 > > │ ## as_slice │ +00:03:12 verbose #5978 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #5979 > > +00:03:12 verbose #5980 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #5981 > > inl as_slice forall t. (x : array_base t) : rust.ref' (slice t) = +00:03:12 verbose #5982 > > inl x = x |> to_vec +00:03:12 verbose #5983 > > !\($'"!x.as_slice()"') +00:03:12 verbose #5984 > > +00:03:12 verbose #5985 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #5986 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #5987 > > │ ## slice_to_vec │ +00:03:12 verbose #5988 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #5989 > > +00:03:12 verbose #5990 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #5991 > > inl slice_to_vec forall t. (slice : rust.ref' (slice t)) : vec t = +00:03:12 verbose #5992 > > !\\(slice, $'"$0.iter().map(|x| *x).collect::<Vec<_>>()"') +00:03:12 verbose #5993 > > +00:03:12 verbose #5994 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #5995 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #5996 > > │ ## any │ +00:03:12 verbose #5997 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #5998 > > +00:03:12 verbose #5999 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #6000 > > inl any forall t. (fn : t -> bool) (source : array_base t) : bool = +00:03:12 verbose #6001 > > !\($'"!source.any(|x| !fn(x))"') +00:03:12 verbose #6002 > > +00:03:12 verbose #6003 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #6004 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #6005 > > │ ## iter_collect vec │ +00:03:12 verbose #6006 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #6007 > > +00:03:12 verbose #6008 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #6009 > > open iter_prototypes +00:03:12 verbose #6010 > > +00:03:12 verbose #6011 > > instance iter_collect vec = fun (iter : iter_prototypes.into_iterator u) => +00:03:12 verbose #6012 > > !\($'"!iter.collect::<Vec<_>>()"') +00:03:12 verbose #6013 > > +00:03:12 verbose #6014 > > instance iter_collect'' vec = fun (iter : iter_prototypes.into_iterator (t (u +00:03:12 verbose #6015 > > v))) => +00:03:12 verbose #6016 > > !\($'"!iter.collect::<Vec<_>>()"') +00:03:12 verbose #6017 > > +00:03:12 verbose #6018 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:12 verbose #6019 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:12 verbose #6020 > > │ ## new_vec │ +00:03:12 verbose #6021 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:12 verbose #6022 > > +00:03:12 verbose #6023 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #6024 > > inl new_vec forall t. (items : list t) : vec t = +00:03:12 verbose #6025 > > inl items = +00:03:12 verbose #6026 > > (items, ("", 0i32)) +00:03:12 verbose #6027 > > ||> listm.foldBack fun (x : t) (acc, i) => +00:03:12 verbose #6028 > > inl x = join x +00:03:12 verbose #6029 > > $'"!x"' +. (if i = 0 then "" else ",") +. acc, i + 1 +00:03:12 verbose #6030 > > |> fst +00:03:12 verbose #6031 > > !\($'"vec\![[" + !items + "]]"') +00:03:12 verbose #6032 > > +00:03:12 verbose #6033 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:12 verbose #6034 > > //// test +00:03:12 verbose #6035 > > ///! rust +00:03:12 verbose #6036 > > +00:03:12 verbose #6037 > > types () +00:03:12 verbose #6038 > > sm'.types () +00:03:12 verbose #6039 > > [[ 0i32; 1 ]] +00:03:12 verbose #6040 > > |> new_vec +00:03:12 verbose #6041 > > |> sm'.format_debug' +00:03:12 verbose #6042 > > |> sm'.from_std_string +00:03:12 verbose #6043 > > |> _assert_eq "[[0, 1]]" +00:03:16 verbose #6044 > > +00:03:16 verbose #6045 > > ╭─[ 4.45s - return value ]─────────────────────────────────────────────────────╮ +00:03:16 verbose #6046 > > │ assert_eq / actual: "[0, 1]" / expected: "[0, 1]" │ +00:03:16 verbose #6047 > > │ │ +00:03:16 verbose #6048 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:16 verbose #6049 > 00:00:14 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 40702 +00:03:16 verbose #6050 > 00:00:14 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:03:18 verbose #6051 > 00:00:16 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/am'.dib.ipynb to html +00:03:18 verbose #6052 > 00:00:16 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:03:18 verbose #6053 > 00:00:16 verbose #7 ! validate(nb) +00:03:20 verbose #6054 > 00:00:18 verbose #8 ! [NbConvertApp] Writing 410934 bytes to c:\home\git\polyglot\lib\spiral\am'.dib.html +00:03:20 verbose #6055 > 00:00:18 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 637 +00:03:20 verbose #6056 > 00:00:18 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 637 +00:03:20 verbose #6057 > 00:00:18 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/am''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/am''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:03:21 verbose #6058 > 00:00:19 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:03:21 verbose #6059 > 00:00:19 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:03:22 verbose #6060 > 00:00:19 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 41398 +00:03:22 debug #6061 execute_with_options_async / exit_code: 0 / output.Length: 45238 +00:03:22 debug #10 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path am'.dib --retries 3 +00:03:22 debug #6062 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path crypto.dib --retries 3", [||], None, None, true, None) -00:05:56 verbose #5901 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "crypto.dib", "--retries", "3"]) -00:05:56 verbose #5902 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/crypto.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/crypto.dib" --output-path "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:06:05 verbose #5903 > 00:06:04 debug #77 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fc264ee6780f336f902c108138f04e820ada8eb99c80762d9298cdd7243de76b/main.spi -00:06:09 verbose #5904 > 00:06:08 debug #78 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/79bb81cc76ca731ddce03ea7a1ca5e3f4925f84b8e13a3af4077f43bd561535d/main.spi -00:06:40 verbose #5905 > 00:06:38 debug #79 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f3d1e0dfc6d3093581176841c5379a38227e2b0882e4694697fa7c51b4bad390/main.spi -00:06:40 verbose #5906 > 00:06:39 debug #80 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1dc5e097b7dff674187553a26b155133737aaf64af03b7f6c09e115c3543195f/main.spi -00:06:41 verbose #5907 > 00:06:40 debug #81 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dd33f32c5eee3869c8e456b03b0999d1bdf417e9fd79598fd2ed00ad95b026b7/main.spi -00:06:41 verbose #5908 > 00:06:40 debug #82 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2b5a459b191de741b4bacd06e2b8af4949e26e7338d6291c9596a337b4700ec8/main.spi -00:06:42 verbose #5909 > 00:06:41 debug #83 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9a0e3845cc3a8bf7bc36dcd4e05e15a2e1f86451ed41cc5d7e4b782e31a21d34/main.spi -00:06:43 verbose #5910 > 00:06:42 debug #84 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8fbe8fd221b2dfa0e259bc85f13785c3ea5055c7c37d0b7f08438c40f7b3e855/main.spi -00:07:05 verbose #5911 > 00:07:04 debug #85 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/01900b809062399444c64462f4ecc9859a5e6497bf5f3e184b9dc0e5bb2cca41/main.spi -00:07:30 verbose #5912 > 00:07:29 debug #86 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/87ddfd4588d034c7d9ac14bd0a5e568ef5b8dd3500fa0427d096d4838ae3edc7/main.spi -00:07:30 verbose #5913 > -00:07:30 verbose #5914 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #5915 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #5916 > │ # crypto │ -00:07:30 verbose #5917 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #5918 > -00:07:30 verbose #5919 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #5920 > open rust_operators -00:07:30 verbose #5921 > -00:07:30 verbose #5922 > ── spiral - import ───────────────────────────────────────────────────────────── -00:07:30 verbose #5923 > #r -00:07:30 verbose #5924 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:07:30 verbose #5925 > otNet.Interactive.Spiral.dll" -00:07:30 verbose #5926 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:07:30 verbose #5927 > #r -00:07:30 verbose #5928 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:07:30 verbose #5929 > otNet.Interactive.dll" -00:07:30 verbose #5930 > open type Microsoft.DotNet.Interactive.Kernel -00:07:30 verbose #5931 > -00:07:30 verbose #5932 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #5933 > //// test -00:07:30 verbose #5934 > -00:07:30 verbose #5935 > open testing -00:07:30 verbose #5936 > open file_system_operators -00:07:30 verbose #5937 > -00:07:30 verbose #5938 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #5939 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #5940 > │ ## types │ -00:07:30 verbose #5941 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #5942 > -00:07:30 verbose #5943 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #5944 > inl types () = -00:07:30 verbose #5945 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:07:30 verbose #5946 > Fable.Core.Emit(\"sha2::Sha256\")>]]\n#endif\ntype sha2_Sha256 = class end" -00:07:30 verbose #5947 > -00:07:30 verbose #5948 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #5949 > inl types () = -00:07:30 verbose #5950 > sm'.types () -00:07:30 verbose #5951 > am'.types () -00:07:30 verbose #5952 > threading.types () -00:07:30 verbose #5953 > rust.types () -00:07:30 verbose #5954 > date_time.types () -00:07:30 verbose #5955 > file_system.types () -00:07:30 verbose #5956 > stream.types () -00:07:30 verbose #5957 > runtime.types () -00:07:30 verbose #5958 > types () -00:07:30 verbose #5959 > -00:07:30 verbose #5960 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #5961 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #5962 > │ ## sha256 │ -00:07:30 verbose #5963 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #5964 > -00:07:30 verbose #5965 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #5966 > nominal sha256 = $'System.Security.Cryptography.SHA256' -00:07:30 verbose #5967 > -00:07:30 verbose #5968 > inl sha256 () : sha256 = -00:07:30 verbose #5969 > $'`sha256.Create' () -00:07:30 verbose #5970 > -00:07:30 verbose #5971 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #5972 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #5973 > │ ## sha256_compute_hash │ -00:07:30 verbose #5974 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #5975 > -00:07:30 verbose #5976 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #5977 > inl sha256_compute_hash (x : sha256) (data : a i32 u8) : a i32 u8 = -00:07:30 verbose #5978 > data |> $'!x.ComputeHash' -00:07:30 verbose #5979 > -00:07:30 verbose #5980 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #5981 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #5982 > │ ## create_hash │ -00:07:30 verbose #5983 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #5984 > -00:07:30 verbose #5985 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #5986 > inl create_hash (x : string) : any = -00:07:30 verbose #5987 > open ts_operators -00:07:30 verbose #5988 > global "type ICryptoCreateHash = abstract createHash: x: string -> obj" -00:07:30 verbose #5989 > inl crypto : $'ICryptoCreateHash' = ts.import_all "crypto" -00:07:30 verbose #5990 > !\\(x, $'"!crypto.createHash($0)"') -00:07:30 verbose #5991 > -00:07:30 verbose #5992 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #5993 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #5994 > │ ## hash_update │ -00:07:30 verbose #5995 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #5996 > -00:07:30 verbose #5997 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #5998 > inl hash_update (s : string) (x : any) : any = -00:07:30 verbose #5999 > open ts_operators -00:07:30 verbose #6000 > !\\((x, s), $'"$0.update($1, \'utf8\')"') -00:07:30 verbose #6001 > -00:07:30 verbose #6002 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #6003 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #6004 > │ ## hash_digest │ -00:07:30 verbose #6005 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6006 > -00:07:30 verbose #6007 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6008 > inl hash_digest (s : string) (x : any) : string = -00:07:30 verbose #6009 > open ts_operators -00:07:30 verbose #6010 > !\\((x, s), $'"$0.digest($1)"') -00:07:30 verbose #6011 > -00:07:30 verbose #6012 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #6013 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #6014 > │ ## hash_text │ -00:07:30 verbose #6015 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6016 > -00:07:30 verbose #6017 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6018 > inl hash_text (input : string) = -00:07:30 verbose #6019 > run_target function -00:07:30 verbose #6020 > | Fsharp (Native) => fun () => -00:07:30 verbose #6021 > inl input = join input -00:07:30 verbose #6022 > inl sha256 = sha256 () |> use -00:07:30 verbose #6023 > input -00:07:30 verbose #6024 > |> sm'.utf8_get_bytes -00:07:30 verbose #6025 > |> sha256_compute_hash sha256 -00:07:30 verbose #6026 > |> am.map (sm'.byte_to_string "x2") -00:07:30 verbose #6027 > |> seq.of_array' -00:07:30 verbose #6028 > |> sm'.concat "" -00:07:30 verbose #6029 > | TypeScript _ => fun () => -00:07:30 verbose #6030 > create_hash "sha256" -00:07:30 verbose #6031 > |> hash_update input -00:07:30 verbose #6032 > |> hash_digest "hex" -00:07:30 verbose #6033 > | _ => fun () => null () -00:07:30 verbose #6034 > -00:07:30 verbose #6035 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6036 > //// test -00:07:30 verbose #6037 > -00:07:30 verbose #6038 > "" -00:07:30 verbose #6039 > |> hash_text -00:07:30 verbose #6040 > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" -00:07:30 verbose #6041 > -00:07:30 verbose #6042 > ╭─[ 1.26s - stdout ]───────────────────────────────────────────────────────────╮ -00:07:30 verbose #6043 > │ assert_eq / actual: │ -00:07:30 verbose #6044 > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ -00:07:30 verbose #6045 > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ -00:07:30 verbose #6046 > │ │ -00:07:30 verbose #6047 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6048 > -00:07:30 verbose #6049 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6050 > //// test -00:07:30 verbose #6051 > -00:07:30 verbose #6052 > " " -00:07:30 verbose #6053 > |> hash_text -00:07:30 verbose #6054 > |> _assert_eq "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" -00:07:30 verbose #6055 > -00:07:30 verbose #6056 > ╭─[ 109.61ms - stdout ]────────────────────────────────────────────────────────╮ -00:07:30 verbose #6057 > │ assert_eq / actual: │ -00:07:30 verbose #6058 > │ "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" / │ -00:07:30 verbose #6059 > │ expected: "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" │ -00:07:30 verbose #6060 > │ │ -00:07:30 verbose #6061 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6062 > -00:07:30 verbose #6063 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #6064 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #6065 > │ ## get_file_hash' │ -00:07:30 verbose #6066 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6067 > -00:07:30 verbose #6068 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6069 > inl get_file_hash' (path : string) : result string string = -00:07:30 verbose #6070 > inl path = path |> file_system.normalize_path -00:07:30 verbose #6071 > inl exit_code, result = -00:07:30 verbose #6072 > runtime.execution_options fun x => { x with -00:07:30 verbose #6073 > command = $'$"pwsh -c \\\"(Get-FileHash \'{!path}\' -Algorithm -00:07:30 verbose #6074 > SHA256).Hash\\\""' -00:07:30 verbose #6075 > } -00:07:30 verbose #6076 > |> runtime.execute_with_options -00:07:30 verbose #6077 > if exit_code = 0 -00:07:30 verbose #6078 > then result |> sm'.to_lower |> Ok -00:07:30 verbose #6079 > else result |> Error -00:07:30 verbose #6080 > -00:07:30 verbose #6081 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6082 > //// test -00:07:30 verbose #6083 > -00:07:30 verbose #6084 > types () -00:07:30 verbose #6085 > inl temp_folder, disposable = file_system.create_temp_directory () -00:07:30 verbose #6086 > disposable |> use |> ignore -00:07:30 verbose #6087 > inl file_name = "test.txt" -00:07:30 verbose #6088 > inl path = temp_folder </> file_name -00:07:30 verbose #6089 > "" |> file_system.write_all_text_async path |> async.run_synchronously -00:07:30 verbose #6090 > path -00:07:30 verbose #6091 > |> get_file_hash' -00:07:30 verbose #6092 > |> resultm.get -00:07:30 verbose #6093 > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" -00:07:30 verbose #6094 > -00:07:30 verbose #6095 > ╭─[ 4.76s - stdout ]───────────────────────────────────────────────────────────╮ -00:07:30 verbose #6096 > │ 00:00:00 debug #1 execute_with_options_async / options: struct (None, │ -00:07:30 verbose #6097 > │ "pwsh -c "(Get-FileHash │ -00:07:30 verbose #6098 > │ 'c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240515-1135-4658-5827-5004 │ -00:07:30 verbose #6099 > │ 00a4b76e/test.txt' -Algorithm SHA256).Hash"", │ -00:07:30 verbose #6100 > │ [||], None, None, true, None) │ -00:07:30 verbose #6101 > │ 00:00:00 verbose #2 > │ -00:07:30 verbose #6102 > │ E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 │ -00:07:30 verbose #6103 > │ 00:00:00 debug #3 execute_with_options_async / exit_code: 0 / │ -00:07:30 verbose #6104 > │ output.Length: 64 │ -00:07:30 verbose #6105 > │ assert_eq / actual: │ -00:07:30 verbose #6106 > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ -00:07:30 verbose #6107 > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ -00:07:30 verbose #6108 > │ │ -00:07:30 verbose #6109 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6110 > -00:07:30 verbose #6111 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6112 > //// test -00:07:30 verbose #6113 > ///! rust -d chrono encoding_rs encoding_rs_io futures-lite regex -00:07:30 verbose #6114 > -00:07:30 verbose #6115 > types () -00:07:30 verbose #6116 > inl temp_folder, disposable = file_system.create_temp_directory () -00:07:30 verbose #6117 > inl file_name = "test.txt" -00:07:30 verbose #6118 > inl path = temp_folder </> file_name -00:07:30 verbose #6119 > "" |> file_system.write_all_text path -00:07:30 verbose #6120 > path -00:07:30 verbose #6121 > |> get_file_hash' -00:07:30 verbose #6122 > |> resultm.get -00:07:30 verbose #6123 > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" -00:07:30 verbose #6124 > disposable |> use |> ignore -00:07:30 verbose #6125 > -00:07:30 verbose #6126 > ╭─[ 30.05s - return value ]────────────────────────────────────────────────────╮ -00:07:30 verbose #6127 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │ -00:07:30 verbose #6128 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_711521836e7d2aa4902af4b4e8 │ -00:07:30 verbose #6129 > │ 7a2cad9d0e707e50b406cb74abdca9130ccffb\20240515-1136-1653-1453-00000026452f │ -00:07:30 verbose #6130 > │ 00:00:00 debug #2 runtime.execute_with_options / file_name: pwsh / │ -00:07:30 verbose #6131 > │ arguments: ["-c", "(Get-FileHash │ -00:07:30 verbose #6132 > │ 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_711521836e7d2aa4902af4b4e │ -00:07:30 verbose #6133 > │ 87a2cad9d0e707e50b406cb74abdca9130ccffb/20240515-1136-1653-1453-00000026452f │ -00:07:30 verbose #6134 > │ /test.txt' -Algorithm SHA256).Hash"] / options: (None, "pwsh -c │ -00:07:30 verbose #6135 > │ "(Get-FileHash │ -00:07:30 verbose #6136 > │ 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_711521836e7d2aa4902af4b4e │ -00:07:30 verbose #6137 > │ 87a2cad9d0e707e50b406cb74abdca9130ccffb/20240515-1136-1653-1453-00000026452f │ -00:07:30 verbose #6138 > │ /test.txt' -Algorithm SHA256).Hash"", Array(MutCell([])), None, None, true, │ -00:07:30 verbose #6139 > │ None) │ -00:07:30 verbose #6140 > │ 00:00:00 verbose #3 │ -00:07:30 verbose #6141 > │ E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 │ -00:07:30 verbose #6142 > │ 00:00:00 verbose #4 runtime.execute_with_options / result / exit_code: │ -00:07:30 verbose #6143 > │ 0 / std_trace.Length: 64 │ -00:07:30 verbose #6144 > │ assert_eq / actual: │ -00:07:30 verbose #6145 > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ -00:07:30 verbose #6146 > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ -00:07:30 verbose #6147 > │ │ -00:07:30 verbose #6148 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6149 > -00:07:30 verbose #6150 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #6151 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #6152 > │ ## sha256' │ -00:07:30 verbose #6153 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6154 > -00:07:30 verbose #6155 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6156 > nominal sha256' = $'sha2_Sha256' -00:07:30 verbose #6157 > -00:07:30 verbose #6158 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #6159 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #6160 > │ ## new_sha256 │ -00:07:30 verbose #6161 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6162 > -00:07:30 verbose #6163 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6164 > inl new_sha256 () : sha256' = -00:07:30 verbose #6165 > !\($'"sha2::Digest::new()"') -00:07:30 verbose #6166 > -00:07:30 verbose #6167 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #6168 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #6169 > │ ## hasher_update │ -00:07:30 verbose #6170 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6171 > -00:07:30 verbose #6172 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6173 > inl hasher_update forall el dim. (slice : rust.ref' (am'.slice' el dim)) (hasher -00:07:30 verbose #6174 > : sha256') : () = -00:07:30 verbose #6175 > !\($'"sha2::Digest::update(&mut !hasher, !slice)"') -00:07:30 verbose #6176 > -00:07:30 verbose #6177 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #6178 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #6179 > │ ## hasher_finalize │ -00:07:30 verbose #6180 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6181 > -00:07:30 verbose #6182 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6183 > inl hasher_finalize (hasher : sha256') : rust.ref' (am'.slice u8) = -00:07:30 verbose #6184 > !\($'"&sha2::Digest::finalize(!hasher)"') -00:07:30 verbose #6185 > -00:07:30 verbose #6186 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #6187 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #6188 > │ ## get_file_hash │ -00:07:30 verbose #6189 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6190 > -00:07:30 verbose #6191 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6192 > inl get_file_hash (path : string) : result string string = -00:07:30 verbose #6193 > inl path = path |> file_system.normalize_path -00:07:30 verbose #6194 > inl file = path |> file_system.file_open |> resultm.unwrap' -00:07:30 verbose #6195 > inl reader = file |> stream.new_buf_reader -00:07:30 verbose #6196 > (!\($'"true; let mut !reader = !reader"') : bool) |> ignore -00:07:30 verbose #6197 > inl hasher = new_sha256 () -00:07:30 verbose #6198 > (!\($'"true; let mut !hasher = !hasher"') : bool) |> ignore -00:07:30 verbose #6199 > -00:07:30 verbose #6200 > real -00:07:30 verbose #6201 > inl size = 1024 -00:07:30 verbose #6202 > inl zero = unativeint `i32 0 -00:07:30 verbose #6203 > inl buffer = am'.new_slice `u8 `@size 0u8 -00:07:30 verbose #6204 > -00:07:30 verbose #6205 > rust.loop 2 fun () => -00:07:30 verbose #6206 > inl count = stream.buf_reader_read `u8 `@size buffer reader -00:07:30 verbose #6207 > inl count = resultm.unwrap' `unativeint `(stream.io_error) count -00:07:30 verbose #6208 > -00:07:30 verbose #6209 > if (=.) `unativeint count zero then rust.break () -00:07:30 verbose #6210 > -00:07:30 verbose #6211 > hasher_update `u8 `@size -00:07:30 verbose #6212 > ( -00:07:30 verbose #6213 > am'.slice_range `u8 `@size -00:07:30 verbose #6214 > (am'.Start `unativeint zero) -00:07:30 verbose #6215 > (am'.End `unativeint ((fun _ => count) : unativeint -> -00:07:30 verbose #6216 > unativeint)) -00:07:30 verbose #6217 > buffer -00:07:30 verbose #6218 > ) -00:07:30 verbose #6219 > hasher -00:07:30 verbose #6220 > -00:07:30 verbose #6221 > hasher -00:07:30 verbose #6222 > |> hasher_finalize -00:07:30 verbose #6223 > |> am'.slice_to_vec -00:07:30 verbose #6224 > |> am'.vec_map' (sm'.format_custom' "{:02x}" >> sm'.from_std_string) -00:07:30 verbose #6225 > |> am'.from_vec -00:07:30 verbose #6226 > |> fun x => x : _ i32 _ -00:07:30 verbose #6227 > |> seq.of_array' -00:07:30 verbose #6228 > |> sm'.concat "" -00:07:30 verbose #6229 > |> Ok -00:07:30 verbose #6230 > -00:07:30 verbose #6231 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6232 > //// test -00:07:30 verbose #6233 > ///! rust -d chrono regex sha2 -00:07:30 verbose #6234 > -00:07:30 verbose #6235 > types () -00:07:30 verbose #6236 > inl temp_folder, disposable = file_system.create_temp_directory () -00:07:30 verbose #6237 > -00:07:30 verbose #6238 > inl file_name = join "test.txt" -00:07:30 verbose #6239 > inl path = temp_folder </> file_name -00:07:30 verbose #6240 > "" |> file_system.write_all_text path -00:07:30 verbose #6241 > path -00:07:30 verbose #6242 > |> get_file_hash -00:07:30 verbose #6243 > |> resultm.get -00:07:30 verbose #6244 > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" -00:07:30 verbose #6245 > disposable |> use |> ignore -00:07:30 verbose #6246 > -00:07:30 verbose #6247 > ╭─[ 22.44s - return value ]────────────────────────────────────────────────────╮ -00:07:30 verbose #6248 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │ -00:07:30 verbose #6249 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_67cb6c2c222a74017ea620d0fe │ -00:07:30 verbose #6250 > │ 2ff94578745279596932f787d7c69650fcaa4a\20240515-1136-4279-6101-000000530d7d │ -00:07:30 verbose #6251 > │ assert_eq / actual: │ -00:07:30 verbose #6252 > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ -00:07:30 verbose #6253 > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ -00:07:30 verbose #6254 > │ │ -00:07:30 verbose #6255 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6256 > -00:07:30 verbose #6257 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6258 > //// test -00:07:30 verbose #6259 > ///! rust -d chrono regex sha2 -00:07:30 verbose #6260 > -00:07:30 verbose #6261 > types () -00:07:30 verbose #6262 > inl temp_folder, disposable = file_system.create_temp_directory () -00:07:30 verbose #6263 > -00:07:30 verbose #6264 > inl file_name = join "test.txt" -00:07:30 verbose #6265 > inl path = temp_folder </> file_name -00:07:30 verbose #6266 > " " |> file_system.write_all_text path -00:07:30 verbose #6267 > path -00:07:30 verbose #6268 > |> get_file_hash -00:07:30 verbose #6269 > |> resultm.get -00:07:30 verbose #6270 > |> _assert_eq "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" -00:07:30 verbose #6271 > disposable |> use |> ignore -00:07:30 verbose #6272 > -00:07:30 verbose #6273 > ╭─[ 24.56s - return value ]────────────────────────────────────────────────────╮ -00:07:30 verbose #6274 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │ -00:07:30 verbose #6275 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_b74015e8981876fb887ad66b60 │ -00:07:30 verbose #6276 > │ 1bde884abd839a056cfa97337e0df25ec29277\20240515-1137-0735-2527-000000f4cc7c │ -00:07:30 verbose #6277 > │ assert_eq / actual: │ -00:07:30 verbose #6278 > │ "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" / │ -00:07:30 verbose #6279 > │ expected: "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" │ -00:07:30 verbose #6280 > │ │ -00:07:30 verbose #6281 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6282 > -00:07:30 verbose #6283 > ── markdown ──────────────────────────────────────────────────────────────────── -00:07:30 verbose #6284 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:07:30 verbose #6285 > │ ## main │ -00:07:30 verbose #6286 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:07:30 verbose #6287 > -00:07:30 verbose #6288 > ── spiral ────────────────────────────────────────────────────────────────────── -00:07:30 verbose #6289 > inl main () = -00:07:30 verbose #6290 > types () -00:07:30 verbose #6291 > $"let hash_text x = !hash_text x" : () -00:07:30 verbose #6292 > 00:01:34 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 18212 -00:07:30 verbose #6293 > 00:01:34 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:07:35 verbose #6294 > 00:01:38 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb to html\e[0m -00:07:35 verbose #6295 > 00:01:38 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:07:35 verbose #6296 > 00:01:38 verbose #7 \e[4;7m validate(nb)\e[0m -00:07:35 verbose #6297 > 00:01:38 verbose #8 \e[4;7m[NbConvertApp] Writing 318947 bytes to c:\home\git\polyglot\lib\spiral\crypto.dib.html\e[0m -00:07:35 verbose #6298 > 00:01:38 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 603 -00:07:35 verbose #6299 > 00:01:38 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 603 -00:07:35 verbose #6300 > 00:01:38 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/crypto.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/crypto.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:07:36 verbose #6301 > 00:01:40 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:07:36 verbose #6302 > 00:01:40 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:07:37 verbose #6303 > 00:01:40 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 18874 -00:07:37 debug #6304 execute_with_options_async / exit_code: 0 / output.Length: 21183 -00:07:37 debug #11 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path crypto.dib --retries 3 -00:07:37 debug #6305 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path common.dib --retries 3", +00:03:22 verbose #6063 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "crypto.dib", "--retries", "3"]) +00:03:22 verbose #6064 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/crypto.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/crypto.dib" --output-path "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:03:24 verbose #6065 > > +00:03:24 verbose #6066 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:24 verbose #6067 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:24 verbose #6068 > > │ # crypto │ +00:03:24 verbose #6069 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:24 verbose #6070 > > +00:03:24 verbose #6071 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:24 verbose #6072 > > open rust_operators +00:03:24 verbose #6073 > > +00:03:24 verbose #6074 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:03:24 verbose #6075 > > #r +00:03:24 verbose #6076 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:03:24 verbose #6077 > > otNet.Interactive.Spiral.dll" +00:03:24 verbose #6078 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:03:24 verbose #6079 > > #r +00:03:24 verbose #6080 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:03:24 verbose #6081 > > otNet.Interactive.dll" +00:03:24 verbose #6082 > > open type Microsoft.DotNet.Interactive.Kernel +00:03:28 verbose #6083 > > +00:03:28 verbose #6084 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:28 verbose #6085 > > //// test +00:03:28 verbose #6086 > > +00:03:28 verbose #6087 > > open testing +00:03:28 verbose #6088 > > open file_system_operators +00:03:28 verbose #6089 > > +00:03:28 verbose #6090 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:28 verbose #6091 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:28 verbose #6092 > > │ ## types │ +00:03:28 verbose #6093 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:28 verbose #6094 > > +00:03:28 verbose #6095 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:28 verbose #6096 > > inl types () = +00:03:28 verbose #6097 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:03:28 verbose #6098 > > Fable.Core.Emit(\"sha2::Sha256\")>]]\n#endif\ntype sha2_Sha256 = class end" +00:03:28 verbose #6099 > > +00:03:28 verbose #6100 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:28 verbose #6101 > > inl types () = +00:03:28 verbose #6102 > > sm'.types () +00:03:28 verbose #6103 > > am'.types () +00:03:28 verbose #6104 > > threading.types () +00:03:28 verbose #6105 > > rust.types () +00:03:28 verbose #6106 > > date_time.types () +00:03:28 verbose #6107 > > file_system.types () +00:03:28 verbose #6108 > > stream.types () +00:03:28 verbose #6109 > > runtime.types () +00:03:28 verbose #6110 > > types () +00:03:28 verbose #6111 > > +00:03:28 verbose #6112 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:28 verbose #6113 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:28 verbose #6114 > > │ ## sha256 │ +00:03:28 verbose #6115 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:28 verbose #6116 > > +00:03:28 verbose #6117 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:28 verbose #6118 > > nominal sha256 = $'System.Security.Cryptography.SHA256' +00:03:28 verbose #6119 > > +00:03:28 verbose #6120 > > inl sha256 () : sha256 = +00:03:28 verbose #6121 > > $'`sha256.Create' () +00:03:28 verbose #6122 > > +00:03:28 verbose #6123 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:28 verbose #6124 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:28 verbose #6125 > > │ ## sha256_compute_hash │ +00:03:28 verbose #6126 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:28 verbose #6127 > > +00:03:28 verbose #6128 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:28 verbose #6129 > > inl sha256_compute_hash (x : sha256) (data : a i32 u8) : a i32 u8 = +00:03:28 verbose #6130 > > data |> $'!x.ComputeHash' +00:03:28 verbose #6131 > > +00:03:28 verbose #6132 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:28 verbose #6133 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:28 verbose #6134 > > │ ## create_hash │ +00:03:28 verbose #6135 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:28 verbose #6136 > > +00:03:28 verbose #6137 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:28 verbose #6138 > > inl create_hash (x : string) : any = +00:03:28 verbose #6139 > > open ts_operators +00:03:28 verbose #6140 > > global "type ICryptoCreateHash = abstract createHash: x: string -> obj" +00:03:28 verbose #6141 > > inl crypto : $'ICryptoCreateHash' = ts.import_all "crypto" +00:03:28 verbose #6142 > > !\\(x, $'"!crypto.createHash($0)"') +00:03:28 verbose #6143 > > +00:03:28 verbose #6144 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:28 verbose #6145 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:28 verbose #6146 > > │ ## hash_update │ +00:03:28 verbose #6147 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:28 verbose #6148 > > +00:03:28 verbose #6149 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:28 verbose #6150 > > inl hash_update (s : string) (x : any) : any = +00:03:28 verbose #6151 > > open ts_operators +00:03:28 verbose #6152 > > !\\((x, s), $'"$0.update($1, \'utf8\')"') +00:03:28 verbose #6153 > > +00:03:28 verbose #6154 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:28 verbose #6155 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:28 verbose #6156 > > │ ## hash_digest │ +00:03:28 verbose #6157 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:28 verbose #6158 > > +00:03:28 verbose #6159 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:28 verbose #6160 > > inl hash_digest (s : string) (x : any) : string = +00:03:28 verbose #6161 > > open ts_operators +00:03:28 verbose #6162 > > !\\((x, s), $'"$0.digest($1)"') +00:03:28 verbose #6163 > > +00:03:28 verbose #6164 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:28 verbose #6165 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:28 verbose #6166 > > │ ## hash_text │ +00:03:28 verbose #6167 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:28 verbose #6168 > > +00:03:28 verbose #6169 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:28 verbose #6170 > > inl hash_text (input : string) = +00:03:28 verbose #6171 > > run_target function +00:03:28 verbose #6172 > > | Fsharp (Native) => fun () => +00:03:28 verbose #6173 > > inl input = join input +00:03:28 verbose #6174 > > inl sha256 = sha256 () |> use +00:03:28 verbose #6175 > > input +00:03:28 verbose #6176 > > |> sm'.utf8_get_bytes +00:03:28 verbose #6177 > > |> sha256_compute_hash sha256 +00:03:28 verbose #6178 > > |> am.map (sm'.byte_to_string "x2") +00:03:28 verbose #6179 > > |> seq.of_array' +00:03:28 verbose #6180 > > |> sm'.concat "" +00:03:28 verbose #6181 > > | TypeScript _ => fun () => +00:03:28 verbose #6182 > > create_hash "sha256" +00:03:28 verbose #6183 > > |> hash_update input +00:03:28 verbose #6184 > > |> hash_digest "hex" +00:03:28 verbose #6185 > > | _ => fun () => null () +00:03:28 verbose #6186 > > +00:03:28 verbose #6187 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:28 verbose #6188 > > //// test +00:03:28 verbose #6189 > > +00:03:28 verbose #6190 > > "" +00:03:28 verbose #6191 > > |> hash_text +00:03:28 verbose #6192 > > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +00:03:29 verbose #6193 > > +00:03:29 verbose #6194 > > ╭─[ 1.17s - stdout ]───────────────────────────────────────────────────────────╮ +00:03:29 verbose #6195 > > │ assert_eq / actual: │ +00:03:29 verbose #6196 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ +00:03:29 verbose #6197 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ +00:03:29 verbose #6198 > > │ │ +00:03:29 verbose #6199 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:29 verbose #6200 > > +00:03:29 verbose #6201 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:29 verbose #6202 > > //// test +00:03:29 verbose #6203 > > +00:03:29 verbose #6204 > > " " +00:03:29 verbose #6205 > > |> hash_text +00:03:29 verbose #6206 > > |> _assert_eq "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" +00:03:29 verbose #6207 > > +00:03:29 verbose #6208 > > ╭─[ 77.31ms - stdout ]─────────────────────────────────────────────────────────╮ +00:03:29 verbose #6209 > > │ assert_eq / actual: │ +00:03:29 verbose #6210 > > │ "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" / │ +00:03:29 verbose #6211 > > │ expected: "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" │ +00:03:29 verbose #6212 > > │ │ +00:03:29 verbose #6213 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:29 verbose #6214 > > +00:03:29 verbose #6215 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:29 verbose #6216 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:29 verbose #6217 > > │ ## get_file_hash' │ +00:03:29 verbose #6218 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:29 verbose #6219 > > +00:03:29 verbose #6220 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:29 verbose #6221 > > inl get_file_hash' (path : string) : result string string = +00:03:29 verbose #6222 > > inl path = path |> file_system.normalize_path +00:03:29 verbose #6223 > > inl exit_code, result = +00:03:29 verbose #6224 > > runtime.execution_options fun x => { x with +00:03:29 verbose #6225 > > command = $'$"pwsh -c \\\"(Get-FileHash \'{!path}\' -Algorithm +00:03:29 verbose #6226 > > SHA256).Hash\\\""' +00:03:29 verbose #6227 > > } +00:03:29 verbose #6228 > > |> runtime.execute_with_options +00:03:29 verbose #6229 > > if exit_code = 0 +00:03:29 verbose #6230 > > then result |> sm'.to_lower |> Ok +00:03:29 verbose #6231 > > else result |> Error +00:03:29 verbose #6232 > > +00:03:29 verbose #6233 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:29 verbose #6234 > > //// test +00:03:29 verbose #6235 > > +00:03:29 verbose #6236 > > types () +00:03:29 verbose #6237 > > inl temp_folder, disposable = file_system.create_temp_directory () +00:03:29 verbose #6238 > > disposable |> use |> ignore +00:03:29 verbose #6239 > > inl file_name = "test.txt" +00:03:29 verbose #6240 > > inl path = temp_folder </> file_name +00:03:29 verbose #6241 > > "" |> file_system.write_all_text_async path |> async.run_synchronously +00:03:29 verbose #6242 > > path +00:03:29 verbose #6243 > > |> get_file_hash' +00:03:29 verbose #6244 > > |> resultm.get +00:03:29 verbose #6245 > > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +00:03:33 verbose #6246 > > +00:03:33 verbose #6247 > > ╭─[ 3.29s - stdout ]───────────────────────────────────────────────────────────╮ +00:03:33 verbose #6248 > > │ 00:00:00 debug #1 execute_with_options_async / options: struct (None, │ +00:03:33 verbose #6249 > > │ "pwsh -c "(Get-FileHash │ +00:03:33 verbose #6250 > > │ 'c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240520-0441-4158-5835-5004 │ +00:03:33 verbose #6251 > > │ 00bbf309/test.txt' -Algorithm SHA256).Hash"", │ +00:03:33 verbose #6252 > > │ [||], None, None, true, None) │ +00:03:33 verbose #6253 > > │ 00:00:00 verbose #2 > │ +00:03:33 verbose #6254 > > │ E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 │ +00:03:33 verbose #6255 > > │ 00:00:00 debug #3 execute_with_options_async / exit_code: 0 / │ +00:03:33 verbose #6256 > > │ output.Length: 64 │ +00:03:33 verbose #6257 > > │ assert_eq / actual: │ +00:03:33 verbose #6258 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ +00:03:33 verbose #6259 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ +00:03:33 verbose #6260 > > │ │ +00:03:33 verbose #6261 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:33 verbose #6262 > > +00:03:33 verbose #6263 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:33 verbose #6264 > > //// test +00:03:33 verbose #6265 > > ///! rust -d chrono encoding_rs encoding_rs_io futures futures-lite regex +00:03:33 verbose #6266 > > +00:03:33 verbose #6267 > > types () +00:03:33 verbose #6268 > > inl temp_folder, disposable = file_system.create_temp_directory () +00:03:33 verbose #6269 > > inl file_name = "test.txt" +00:03:33 verbose #6270 > > inl path = temp_folder </> file_name +00:03:33 verbose #6271 > > "" |> file_system.write_all_text path +00:03:33 verbose #6272 > > path +00:03:33 verbose #6273 > > |> get_file_hash' +00:03:33 verbose #6274 > > |> resultm.get +00:03:33 verbose #6275 > > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +00:03:33 verbose #6276 > > disposable |> use |> ignore +00:03:40 verbose #6277 > > +00:03:40 verbose #6278 > > ╭─[ 7.53s - return value ]─────────────────────────────────────────────────────╮ +00:03:40 verbose #6279 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │ +00:03:40 verbose #6280 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_28e239ae45fa411d5446d41d1a │ +00:03:40 verbose #6281 > > │ 99f210110076943882edefe0706e85dc5a94e5\20240520-0441-4898-5961-000000230070 │ +00:03:40 verbose #6282 > > │ 00:00:00 debug #2 runtime.execute_with_options / file_name: pwsh / │ +00:03:40 verbose #6283 > > │ arguments: ["-c", "(Get-FileHash │ +00:03:40 verbose #6284 > > │ 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_28e239ae45fa411d5446d41d1 │ +00:03:40 verbose #6285 > > │ a99f210110076943882edefe0706e85dc5a94e5/20240520-0441-4898-5961-000000230070 │ +00:03:40 verbose #6286 > > │ /test.txt' -Algorithm SHA256).Hash"] / options: (None, "pwsh -c │ +00:03:40 verbose #6287 > > │ "(Get-FileHash │ +00:03:40 verbose #6288 > > │ 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_28e239ae45fa411d5446d41d1 │ +00:03:40 verbose #6289 > > │ a99f210110076943882edefe0706e85dc5a94e5/20240520-0441-4898-5961-000000230070 │ +00:03:40 verbose #6290 > > │ /test.txt' -Algorithm SHA256).Hash"", Array(MutCell([])), None, None, true, │ +00:03:40 verbose #6291 > > │ None) │ +00:03:40 verbose #6292 > > │ 00:00:00 verbose #3 > │ +00:03:40 verbose #6293 > > │ E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 │ +00:03:40 verbose #6294 > > │ 00:00:00 verbose #4 runtime.execute_with_options / result / exit_code: │ +00:03:40 verbose #6295 > > │ 0 / std_trace.Length: 64 │ +00:03:40 verbose #6296 > > │ assert_eq / actual: │ +00:03:40 verbose #6297 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ +00:03:40 verbose #6298 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ +00:03:40 verbose #6299 > > │ │ +00:03:40 verbose #6300 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:40 verbose #6301 > > +00:03:40 verbose #6302 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:40 verbose #6303 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:40 verbose #6304 > > │ ## sha256' │ +00:03:40 verbose #6305 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:40 verbose #6306 > > +00:03:40 verbose #6307 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:40 verbose #6308 > > nominal sha256' = $'sha2_Sha256' +00:03:40 verbose #6309 > > +00:03:40 verbose #6310 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:40 verbose #6311 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:40 verbose #6312 > > │ ## new_sha256 │ +00:03:40 verbose #6313 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:40 verbose #6314 > > +00:03:40 verbose #6315 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:40 verbose #6316 > > inl new_sha256 () : sha256' = +00:03:40 verbose #6317 > > !\($'"sha2::Digest::new()"') +00:03:40 verbose #6318 > > +00:03:40 verbose #6319 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:40 verbose #6320 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:40 verbose #6321 > > │ ## hasher_update │ +00:03:40 verbose #6322 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:40 verbose #6323 > > +00:03:40 verbose #6324 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:40 verbose #6325 > > inl hasher_update forall el dim. (slice : rust.ref' (am'.slice' el dim)) (hasher +00:03:40 verbose #6326 > > : sha256') : () = +00:03:40 verbose #6327 > > !\($'"sha2::Digest::update(&mut !hasher, !slice)"') +00:03:40 verbose #6328 > > +00:03:40 verbose #6329 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:40 verbose #6330 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:40 verbose #6331 > > │ ## hasher_finalize │ +00:03:40 verbose #6332 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:40 verbose #6333 > > +00:03:40 verbose #6334 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:40 verbose #6335 > > inl hasher_finalize (hasher : sha256') : rust.ref' (am'.slice u8) = +00:03:40 verbose #6336 > > !\($'"&sha2::Digest::finalize(!hasher)"') +00:03:40 verbose #6337 > > +00:03:40 verbose #6338 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:40 verbose #6339 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:40 verbose #6340 > > │ ## get_file_hash │ +00:03:40 verbose #6341 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:40 verbose #6342 > > +00:03:40 verbose #6343 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:40 verbose #6344 > > inl get_file_hash (path : string) : result string string = +00:03:40 verbose #6345 > > inl path = path |> file_system.normalize_path +00:03:40 verbose #6346 > > inl file = path |> file_system.file_open |> resultm.unwrap' +00:03:40 verbose #6347 > > inl reader = file |> stream.new_buf_reader +00:03:40 verbose #6348 > > (!\($'"true; let mut !reader = !reader"') : bool) |> ignore +00:03:40 verbose #6349 > > inl hasher = new_sha256 () +00:03:40 verbose #6350 > > (!\($'"true; let mut !hasher = !hasher"') : bool) |> ignore +00:03:40 verbose #6351 > > +00:03:40 verbose #6352 > > real +00:03:40 verbose #6353 > > inl size = 1024 +00:03:40 verbose #6354 > > inl zero = unativeint `i32 0 +00:03:40 verbose #6355 > > inl buffer = am'.new_slice `u8 `@size 0u8 +00:03:40 verbose #6356 > > +00:03:40 verbose #6357 > > rust.loop 2 fun () => +00:03:40 verbose #6358 > > inl count = stream.buf_reader_read `u8 `@size buffer reader +00:03:40 verbose #6359 > > inl count = resultm.unwrap' `unativeint `(stream.io_error) count +00:03:40 verbose #6360 > > +00:03:40 verbose #6361 > > if (=.) `unativeint count zero then rust.break () +00:03:40 verbose #6362 > > +00:03:40 verbose #6363 > > hasher_update `u8 `@size +00:03:40 verbose #6364 > > ( +00:03:40 verbose #6365 > > am'.slice_range `u8 `@size +00:03:40 verbose #6366 > > (am'.Start `unativeint zero) +00:03:40 verbose #6367 > > (am'.End `unativeint ((fun _ => count) : unativeint -> +00:03:40 verbose #6368 > > unativeint)) +00:03:40 verbose #6369 > > buffer +00:03:40 verbose #6370 > > ) +00:03:40 verbose #6371 > > hasher +00:03:40 verbose #6372 > > +00:03:40 verbose #6373 > > hasher +00:03:40 verbose #6374 > > |> hasher_finalize +00:03:40 verbose #6375 > > |> am'.slice_to_vec +00:03:40 verbose #6376 > > |> am'.vec_map' (sm'.format_custom' "{:02x}" >> sm'.from_std_string) +00:03:40 verbose #6377 > > |> am'.from_vec +00:03:40 verbose #6378 > > |> fun x => x : _ i32 _ +00:03:40 verbose #6379 > > |> seq.of_array' +00:03:40 verbose #6380 > > |> sm'.concat "" +00:03:40 verbose #6381 > > |> Ok +00:03:40 verbose #6382 > > +00:03:40 verbose #6383 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:40 verbose #6384 > > //// test +00:03:40 verbose #6385 > > ///! rust -d chrono regex sha2 +00:03:40 verbose #6386 > > +00:03:40 verbose #6387 > > types () +00:03:40 verbose #6388 > > inl temp_folder, disposable = file_system.create_temp_directory () +00:03:40 verbose #6389 > > +00:03:40 verbose #6390 > > inl file_name = join "test.txt" +00:03:40 verbose #6391 > > inl path = temp_folder </> file_name +00:03:40 verbose #6392 > > "" |> file_system.write_all_text path +00:03:40 verbose #6393 > > path +00:03:40 verbose #6394 > > |> get_file_hash +00:03:40 verbose #6395 > > |> resultm.get +00:03:40 verbose #6396 > > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +00:03:40 verbose #6397 > > disposable |> use |> ignore +00:03:46 verbose #6398 > > +00:03:46 verbose #6399 > > ╭─[ 5.59s - return value ]─────────────────────────────────────────────────────╮ +00:03:46 verbose #6400 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │ +00:03:46 verbose #6401 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_f2f837a3fd3f31a551997578d4 │ +00:03:46 verbose #6402 > > │ 54aa64c2d89813b04e431485cd82153c8f5329\20240520-0441-5518-8608-0000004d40f8 │ +00:03:46 verbose #6403 > > │ assert_eq / actual: │ +00:03:46 verbose #6404 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ +00:03:46 verbose #6405 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ +00:03:46 verbose #6406 > > │ │ +00:03:46 verbose #6407 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:46 verbose #6408 > > +00:03:46 verbose #6409 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:46 verbose #6410 > > //// test +00:03:46 verbose #6411 > > ///! rust -d chrono regex sha2 +00:03:46 verbose #6412 > > +00:03:46 verbose #6413 > > types () +00:03:46 verbose #6414 > > inl temp_folder, disposable = file_system.create_temp_directory () +00:03:46 verbose #6415 > > +00:03:46 verbose #6416 > > inl file_name = join "test.txt" +00:03:46 verbose #6417 > > inl path = temp_folder </> file_name +00:03:46 verbose #6418 > > " " |> file_system.write_all_text path +00:03:46 verbose #6419 > > path +00:03:46 verbose #6420 > > |> get_file_hash +00:03:46 verbose #6421 > > |> resultm.get +00:03:46 verbose #6422 > > |> _assert_eq "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" +00:03:46 verbose #6423 > > disposable |> use |> ignore +00:03:51 verbose #6424 > > +00:03:51 verbose #6425 > > ╭─[ 5.02s - return value ]─────────────────────────────────────────────────────╮ +00:03:51 verbose #6426 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │ +00:03:51 verbose #6427 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_10eb4cf90f035e50d5826a64b2 │ +00:03:51 verbose #6428 > > │ 742e7c11f22d4d8acd61507eb4adb594e3e141\20240520-0442-0022-2907-0000002f63af │ +00:03:51 verbose #6429 > > │ assert_eq / actual: │ +00:03:51 verbose #6430 > > │ "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" / │ +00:03:51 verbose #6431 > > │ expected: "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" │ +00:03:51 verbose #6432 > > │ │ +00:03:51 verbose #6433 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:51 verbose #6434 > > +00:03:51 verbose #6435 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:51 verbose #6436 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:51 verbose #6437 > > │ ## main │ +00:03:51 verbose #6438 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:51 verbose #6439 > > +00:03:51 verbose #6440 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:51 verbose #6441 > > inl main () = +00:03:51 verbose #6442 > > types () +00:03:51 verbose #6443 > > $"let hash_text x = !hash_text x" : () +00:03:51 verbose #6444 > 00:00:29 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 18220 +00:03:51 verbose #6445 > 00:00:29 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:03:53 verbose #6446 > 00:00:31 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb to html +00:03:53 verbose #6447 > 00:00:31 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:03:53 verbose #6448 > 00:00:31 verbose #7 ! validate(nb) +00:03:55 verbose #6449 > 00:00:32 verbose #8 ! [NbConvertApp] Writing 318983 bytes to c:\home\git\polyglot\lib\spiral\crypto.dib.html +00:03:55 verbose #6450 > 00:00:33 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 643 +00:03:55 verbose #6451 > 00:00:33 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 643 +00:03:55 verbose #6452 > 00:00:33 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/crypto.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/crypto.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:03:56 verbose #6453 > 00:00:33 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:03:56 verbose #6454 > 00:00:33 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:03:56 verbose #6455 > 00:00:34 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 18922 +00:03:56 debug #6456 execute_with_options_async / exit_code: 0 / output.Length: 21909 +00:03:56 debug #11 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path crypto.dib --retries 3 +00:03:56 debug #6457 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path common.dib --retries 3", [||], None, None, true, None) -00:07:37 verbose #6306 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "common.dib", "--retries", "3"]) -00:07:37 verbose #6307 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/common.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/common.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/common.dib" --output-path "c:/home/git/polyglot/lib/spiral/common.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:08:06 verbose #6308 > 00:08:05 debug #87 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d1880c71fd9c37bd6ae8ab8e0ebf4fb498f569e8d8c3b99cd67ca6537d75c23a/main.spi -00:08:25 verbose #6309 > 00:08:23 debug #88 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/bd88ea3da6dda486679b01e1950f4d28263c2efbcdee45d2c9deb9e97da5e2e9/main.spi -00:08:25 verbose #6310 > 00:08:24 debug #89 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/462b6028a6cbe238d526250f3b7fa22b2eef30853b45e6c87aedf8169fe94530/main.spi -00:08:26 verbose #6311 > 00:08:25 debug #90 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/547c51749f2765728bc141b0df666b149458d8cecd1f4416a67d33f6530f155a/main.spi -00:08:27 verbose #6312 > 00:08:26 debug #91 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/030f480a50bbb37bab4409d0d74c488fa76357ac9adee057ad3eb4809a44627b/main.spi -00:08:28 verbose #6313 > 00:08:26 debug #92 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/85d27207f34aa0432375e8e8fc7603e1043f572d88df7dfa0a32c7452fabc09c/main.spi -00:08:28 verbose #6314 > 00:08:27 debug #93 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/bc476c2540c7710b1944db6c1c29ae2d4fcb3e390ca21e479d41a25073a6b699/main.spi -00:08:29 verbose #6315 > 00:08:28 debug #94 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c4602d51ee160862955129bfb85add88432537f3ad5d3e1aff0da2866293c34a/main.spi -00:08:30 verbose #6316 > 00:08:29 debug #95 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/57d3f2849f9eeea2c501fe6f9d6c3088d0945474aa9478d5b96b839d1abb792c/main.spi -00:08:50 verbose #6317 > 00:08:49 debug #96 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/26daf963e024bca8398ec18495ddc5a2baec980f143e59a19860212a5273845c/main.spi -00:08:51 verbose #6318 > 00:08:50 debug #97 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8ccb04df943b671d593bca10933e69e7ee05777f0d4ae1fe1fc2ae10ab8e0b0d/main.spi -00:09:10 verbose #6319 > 00:09:09 debug #98 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/21e1f5a0f2898727b14dfd4933b74e3c4841565ef0ef877be818468cc0ae8486/main.spi -00:09:11 verbose #6320 > -00:09:11 verbose #6321 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6322 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6323 > │ # common │ -00:09:11 verbose #6324 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6325 > -00:09:11 verbose #6326 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6327 > //// test -00:09:11 verbose #6328 > -00:09:11 verbose #6329 > open testing -00:09:11 verbose #6330 > -00:09:11 verbose #6331 > ── spiral - import ───────────────────────────────────────────────────────────── -00:09:11 verbose #6332 > #r -00:09:11 verbose #6333 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:09:11 verbose #6334 > otNet.Interactive.Spiral.dll" -00:09:11 verbose #6335 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:09:11 verbose #6336 > #r -00:09:11 verbose #6337 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:09:11 verbose #6338 > otNet.Interactive.dll" -00:09:11 verbose #6339 > open type Microsoft.DotNet.Interactive.Kernel -00:09:11 verbose #6340 > -00:09:11 verbose #6341 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6342 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6343 > │ ## types │ -00:09:11 verbose #6344 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6345 > -00:09:11 verbose #6346 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6347 > inl types () = -00:09:11 verbose #6348 > env.types () -00:09:11 verbose #6349 > rust.types () -00:09:11 verbose #6350 > sm'.types () -00:09:11 verbose #6351 > -00:09:11 verbose #6352 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6353 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6354 > │ ## prototype │ -00:09:11 verbose #6355 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6356 > -00:09:11 verbose #6357 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6358 > prototype (~:>) r : forall t. t -> r -00:09:11 verbose #6359 > -00:09:11 verbose #6360 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6361 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6362 > │ ## run_target │ -00:09:11 verbose #6363 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6364 > -00:09:11 verbose #6365 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6366 > //// test -00:09:11 verbose #6367 > -00:09:11 verbose #6368 > run_target function -00:09:11 verbose #6369 > | Fsharp (Native) => fun () => $'1uy' -00:09:11 verbose #6370 > | _ => fun () => $'2uy' -00:09:11 verbose #6371 > |> _assert_eq 1u8 -00:09:11 verbose #6372 > -00:09:11 verbose #6373 > ╭─[ 769.58ms - stdout ]────────────────────────────────────────────────────────╮ -00:09:11 verbose #6374 > │ assert_eq / actual: 1uy / expected: 1uy │ -00:09:11 verbose #6375 > │ │ -00:09:11 verbose #6376 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6377 > -00:09:11 verbose #6378 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6379 > //// test -00:09:11 verbose #6380 > ///! rust -00:09:11 verbose #6381 > -00:09:11 verbose #6382 > run_target function -00:09:11 verbose #6383 > | Rust (Native) => fun () => $'1uy' -00:09:11 verbose #6384 > | _ => fun () => $'2uy' -00:09:11 verbose #6385 > |> _assert_eq 1u8 -00:09:11 verbose #6386 > -00:09:11 verbose #6387 > ╭─[ 17.90s - return value ]────────────────────────────────────────────────────╮ -00:09:11 verbose #6388 > │ assert_eq / actual: 1 / expected: 1 │ -00:09:11 verbose #6389 > │ │ -00:09:11 verbose #6390 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6391 > -00:09:11 verbose #6392 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6393 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6394 > │ ## upcast │ -00:09:11 verbose #6395 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6396 > -00:09:11 verbose #6397 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6398 > inl upcast forall t u. (x : t) : u = -00:09:11 verbose #6399 > $'!x :> `u ' -00:09:11 verbose #6400 > -00:09:11 verbose #6401 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6402 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6403 > │ ## downcast │ -00:09:11 verbose #6404 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6405 > -00:09:11 verbose #6406 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6407 > inl downcast forall t u. (x : t) : u = -00:09:11 verbose #6408 > $'!x :?> `u ' -00:09:11 verbose #6409 > -00:09:11 verbose #6410 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6411 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6412 > │ ## to_any │ -00:09:11 verbose #6413 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6414 > -00:09:11 verbose #6415 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6416 > inl to_any forall t. (obj : t) : any = -00:09:11 verbose #6417 > $"!obj" -00:09:11 verbose #6418 > -00:09:11 verbose #6419 > instance (~:>) any = to_any -00:09:11 verbose #6420 > -00:09:11 verbose #6421 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6422 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6423 > │ ## (||>) │ -00:09:11 verbose #6424 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6425 > -00:09:11 verbose #6426 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6427 > //// test -00:09:11 verbose #6428 > -00:09:11 verbose #6429 > (3i32, 2i32) -00:09:11 verbose #6430 > ||> fun a b => a - b -00:09:11 verbose #6431 > |> _assert_eq 1 -00:09:11 verbose #6432 > -00:09:11 verbose #6433 > ╭─[ 38.53ms - stdout ]─────────────────────────────────────────────────────────╮ -00:09:11 verbose #6434 > │ assert_eq / actual: 1 / expected: 1 │ -00:09:11 verbose #6435 > │ │ -00:09:11 verbose #6436 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6437 > -00:09:11 verbose #6438 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6439 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6440 > │ ## flip │ -00:09:11 verbose #6441 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6442 > -00:09:11 verbose #6443 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6444 > inl flip fn a b = -00:09:11 verbose #6445 > fn b a -00:09:11 verbose #6446 > -00:09:11 verbose #6447 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6448 > //// test -00:09:11 verbose #6449 > -00:09:11 verbose #6450 > (1i32, 2i32) -00:09:11 verbose #6451 > ||> flip pair -00:09:11 verbose #6452 > |> _assert_eq (2, 1) -00:09:11 verbose #6453 > -00:09:11 verbose #6454 > ╭─[ 49.07ms - stdout ]─────────────────────────────────────────────────────────╮ -00:09:11 verbose #6455 > │ assert_eq / actual: struct (2, 1) / expected: struct (2, 1) │ -00:09:11 verbose #6456 > │ │ -00:09:11 verbose #6457 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6458 > -00:09:11 verbose #6459 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6460 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6461 > │ ## join_body │ -00:09:11 verbose #6462 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6463 > -00:09:11 verbose #6464 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6465 > inl join_body body acc x = -00:09:11 verbose #6466 > if var_is x |> not -00:09:11 verbose #6467 > then body acc x -00:09:11 verbose #6468 > else -00:09:11 verbose #6469 > inl acc = dyn acc -00:09:11 verbose #6470 > join body acc x -00:09:11 verbose #6471 > -00:09:11 verbose #6472 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6473 > //// test -00:09:11 verbose #6474 > -00:09:11 verbose #6475 > inl rec fold_list f s = function -00:09:11 verbose #6476 > | Cons (x, x') => fold_list f (f s x) x' -00:09:11 verbose #6477 > | Nil => s -00:09:11 verbose #6478 > -00:09:11 verbose #6479 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6480 > //// test -00:09:11 verbose #6481 > -00:09:11 verbose #6482 > [[ 5i32; 4; join 3; 2; 1 ]] -00:09:11 verbose #6483 > |> fold_list (+) 0 -00:09:11 verbose #6484 > |> _assert_eq 15 -00:09:11 verbose #6485 > -00:09:11 verbose #6486 > ╭─[ 119.31ms - stdout ]────────────────────────────────────────────────────────╮ -00:09:11 verbose #6487 > │ assert_eq / actual: 15 / expected: 15 │ -00:09:11 verbose #6488 > │ │ -00:09:11 verbose #6489 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6490 > -00:09:11 verbose #6491 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6492 > //// test -00:09:11 verbose #6493 > -00:09:11 verbose #6494 > [[ 5i32; 4; join 3; 2; 1 ]] -00:09:11 verbose #6495 > |> fold_list (join_body (+)) 0 -00:09:11 verbose #6496 > |> _assert_eq 15 -00:09:11 verbose #6497 > -00:09:11 verbose #6498 > ╭─[ 53.69ms - stdout ]─────────────────────────────────────────────────────────╮ -00:09:11 verbose #6499 > │ assert_eq / actual: 15 / expected: 15 │ -00:09:11 verbose #6500 > │ │ -00:09:11 verbose #6501 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6502 > -00:09:11 verbose #6503 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6504 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6505 > │ ## join_body_unit │ -00:09:11 verbose #6506 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6507 > -00:09:11 verbose #6508 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6509 > inl join_body_unit body d x = -00:09:11 verbose #6510 > if var_is d |> not -00:09:11 verbose #6511 > then body x -00:09:11 verbose #6512 > else -00:09:11 verbose #6513 > inl x = dyn x -00:09:11 verbose #6514 > join body x -00:09:11 verbose #6515 > -00:09:11 verbose #6516 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6517 > //// test -00:09:11 verbose #6518 > -00:09:11 verbose #6519 > [[ 5i32; 4; join 3; 2; 1 ]] -00:09:11 verbose #6520 > |> fold_list (fun acc n => join_body_unit ((+) acc) n n) 0 -00:09:11 verbose #6521 > |> _assert_eq 15 -00:09:11 verbose #6522 > -00:09:11 verbose #6523 > ╭─[ 42.23ms - stdout ]─────────────────────────────────────────────────────────╮ -00:09:11 verbose #6524 > │ assert_eq / actual: 15 / expected: 15 │ -00:09:11 verbose #6525 > │ │ -00:09:11 verbose #6526 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6527 > -00:09:11 verbose #6528 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6529 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6530 > │ ## nameof │ -00:09:11 verbose #6531 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6532 > -00:09:11 verbose #6533 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6534 > inl nameof x : string = -00:09:11 verbose #6535 > $"nameof !x" -00:09:11 verbose #6536 > -00:09:11 verbose #6537 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6538 > //// test -00:09:11 verbose #6539 > -00:09:11 verbose #6540 > fun () => failwith "test" -00:09:11 verbose #6541 > |> _throws -00:09:11 verbose #6542 > |> optionm.map sm'.format_exception -00:09:11 verbose #6543 > |> _assert_eq (Some "System.Exception: test") -00:09:11 verbose #6544 > -00:09:11 verbose #6545 > ╭─[ 549.06ms - stdout ]────────────────────────────────────────────────────────╮ -00:09:11 verbose #6546 > │ assert_eq / actual: US1_0 "System.Exception: test" / expected: US1_0 │ -00:09:11 verbose #6547 > │ "System.Exception: test" │ -00:09:11 verbose #6548 > │ │ -00:09:11 verbose #6549 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6550 > -00:09:11 verbose #6551 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6552 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6553 > │ ## disposable │ -00:09:11 verbose #6554 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6555 > -00:09:11 verbose #6556 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6557 > nominal disposable t = $"System.IDisposable" -00:09:11 verbose #6558 > -00:09:11 verbose #6559 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6560 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6561 > │ ## dispose │ -00:09:11 verbose #6562 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6563 > -00:09:11 verbose #6564 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6565 > inl dispose (disposable : disposable _) : () = -00:09:11 verbose #6566 > disposable |> $'_.Dispose()' -00:09:11 verbose #6567 > -00:09:11 verbose #6568 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6569 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6570 > │ ## new_disposable │ -00:09:11 verbose #6571 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6572 > -00:09:11 verbose #6573 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6574 > inl new_disposable (fn : () -> ()) : disposable _ = -00:09:11 verbose #6575 > run_target function -00:09:11 verbose #6576 > | Rust _ => fun () => -00:09:11 verbose #6577 > global "type Disposable (f : unit -> unit) = interface -00:09:11 verbose #6578 > System.IDisposable with member _.Dispose () = f ()" -00:09:11 verbose #6579 > $'new Disposable (fun () -> Fable.Core.RustInterop.emitRustExpr !fn -00:09:11 verbose #6580 > "$0()" )' -00:09:11 verbose #6581 > | Fsharp _ => fun () => -00:09:11 verbose #6582 > inl fn = join fn -00:09:11 verbose #6583 > $'{ new System.IDisposable with member _.Dispose () = !fn () }' -00:09:11 verbose #6584 > | _ => fun () => null () -00:09:11 verbose #6585 > -00:09:11 verbose #6586 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6587 > //// test -00:09:11 verbose #6588 > -00:09:11 verbose #6589 > inl new_disposable_test = mut 0i32 -00:09:11 verbose #6590 > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 -00:09:11 verbose #6591 > |> fun x => x : disposable () -00:09:11 verbose #6592 > |> dispose -00:09:11 verbose #6593 > *new_disposable_test |> _assert_eq 1 -00:09:11 verbose #6594 > -00:09:11 verbose #6595 > ╭─[ 277.83ms - stdout ]────────────────────────────────────────────────────────╮ -00:09:11 verbose #6596 > │ assert_eq / actual: 1 / expected: 1 │ -00:09:11 verbose #6597 > │ │ -00:09:11 verbose #6598 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6599 > -00:09:11 verbose #6600 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6601 > //// test -00:09:11 verbose #6602 > ///! rust -00:09:11 verbose #6603 > -00:09:11 verbose #6604 > inl new_disposable_test = mut 0i32 -00:09:11 verbose #6605 > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 -00:09:11 verbose #6606 > |> fun x => x : disposable () -00:09:11 verbose #6607 > |> dispose -00:09:11 verbose #6608 > *new_disposable_test |> _assert_eq 1 -00:09:11 verbose #6609 > -00:09:11 verbose #6610 > ╭─[ 19.21s - return value ]────────────────────────────────────────────────────╮ -00:09:11 verbose #6611 > │ assert_eq / actual: 1 / expected: 1 │ -00:09:11 verbose #6612 > │ │ -00:09:11 verbose #6613 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6614 > -00:09:11 verbose #6615 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6616 > //// test -00:09:11 verbose #6617 > -00:09:11 verbose #6618 > inl new_disposable_test = mut 0i32 -00:09:11 verbose #6619 > fun () => -00:09:11 verbose #6620 > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 -00:09:11 verbose #6621 > |> fun x => x : disposable () -00:09:11 verbose #6622 > |> use -00:09:11 verbose #6623 > |> ignore -00:09:11 verbose #6624 > |> return -00:09:11 verbose #6625 > |> async.new_task -00:09:11 verbose #6626 > |> async.await_task -00:09:11 verbose #6627 > |> async.run_synchronously -00:09:11 verbose #6628 > *new_disposable_test |> _assert_eq 1 -00:09:11 verbose #6629 > -00:09:11 verbose #6630 > ╭─[ 899.99ms - stdout ]────────────────────────────────────────────────────────╮ -00:09:11 verbose #6631 > │ assert_eq / actual: 1 / expected: 1 │ -00:09:11 verbose #6632 > │ │ -00:09:11 verbose #6633 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6634 > -00:09:11 verbose #6635 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6636 > //// test -00:09:11 verbose #6637 > -00:09:11 verbose #6638 > inl new_disposable_test = mut 0i32 -00:09:11 verbose #6639 > fun () => -00:09:11 verbose #6640 > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 -00:09:11 verbose #6641 > |> fun x => x : disposable () -00:09:11 verbose #6642 > |> use -00:09:11 verbose #6643 > |> ignore -00:09:11 verbose #6644 > |> return -00:09:11 verbose #6645 > |> async.new_async -00:09:11 verbose #6646 > |> async.run_synchronously -00:09:11 verbose #6647 > *new_disposable_test |> _assert_eq 1 -00:09:11 verbose #6648 > -00:09:11 verbose #6649 > ╭─[ 741.00ms - stdout ]────────────────────────────────────────────────────────╮ -00:09:11 verbose #6650 > │ assert_eq / actual: 1 / expected: 1 │ -00:09:11 verbose #6651 > │ │ -00:09:11 verbose #6652 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6653 > -00:09:11 verbose #6654 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6655 > //// test -00:09:11 verbose #6656 > -00:09:11 verbose #6657 > inl new_disposable_test = mut 0i32 -00:09:11 verbose #6658 > fun () => -00:09:11 verbose #6659 > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 -00:09:11 verbose #6660 > |> fun x => x : disposable () -00:09:11 verbose #6661 > |> ignore -00:09:11 verbose #6662 > |> return -00:09:11 verbose #6663 > |> async.new_async -00:09:11 verbose #6664 > |> async.run_synchronously -00:09:11 verbose #6665 > *new_disposable_test |> _assert_eq 0 -00:09:11 verbose #6666 > -00:09:11 verbose #6667 > ╭─[ 729.93ms - stdout ]────────────────────────────────────────────────────────╮ -00:09:11 verbose #6668 > │ assert_eq / actual: 0 / expected: 0 │ -00:09:11 verbose #6669 > │ │ -00:09:11 verbose #6670 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6671 > -00:09:11 verbose #6672 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6673 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6674 > │ ## return │ -00:09:11 verbose #6675 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6676 > -00:09:11 verbose #6677 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6678 > inl return forall t. (x : t) : () = -00:09:11 verbose #6679 > $'return !x ' -00:09:11 verbose #6680 > -00:09:11 verbose #6681 > inl return' forall t. (x : t) : t = -00:09:11 verbose #6682 > $'return !x ' -00:09:11 verbose #6683 > -00:09:11 verbose #6684 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6685 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6686 > │ ## sleep │ -00:09:11 verbose #6687 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6688 > -00:09:11 verbose #6689 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6690 > inl sleep (n : i32) : () = -00:09:11 verbose #6691 > run_target function -00:09:11 verbose #6692 > | Fsharp (Native) => fun () => $'System.Threading.Thread.Sleep' n -00:09:11 verbose #6693 > | _ => fun () => () -00:09:11 verbose #6694 > -00:09:11 verbose #6695 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6696 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6697 > │ ## retry_fn │ -00:09:11 verbose #6698 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6699 > -00:09:11 verbose #6700 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6701 > inl retry_fn forall t. retries (fn : () -> t) : option t = -00:09:11 verbose #6702 > let rec loop retry = -00:09:11 verbose #6703 > try -00:09:11 verbose #6704 > fun () => -00:09:11 verbose #6705 > if retry < retries -00:09:11 verbose #6706 > then fn () |> Some -00:09:11 verbose #6707 > else None -00:09:11 verbose #6708 > fun ex => -00:09:11 verbose #6709 > trace Warning -00:09:11 verbose #6710 > fun () => "retry_fn" -00:09:11 verbose #6711 > fun () => $'$"retry: {!retry} / ex: %A{!ex} / {!_locals -00:09:11 verbose #6712 > ()}"' -00:09:11 verbose #6713 > sleep 1 -00:09:11 verbose #6714 > None -00:09:11 verbose #6715 > |> function -00:09:11 verbose #6716 > | Some x => x -00:09:11 verbose #6717 > | None => loop (retry + 1) -00:09:11 verbose #6718 > loop 0 -00:09:11 verbose #6719 > -00:09:11 verbose #6720 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6721 > //// test -00:09:11 verbose #6722 > -00:09:11 verbose #6723 > inl retry_fn_test = mut 0i32 -00:09:11 verbose #6724 > fun () => -00:09:11 verbose #6725 > retry_fn_test <- *retry_fn_test + 1 -00:09:11 verbose #6726 > *retry_fn_test -00:09:11 verbose #6727 > |> retry_fn 3i32 -00:09:11 verbose #6728 > |> _assert_eq (Some 1i32) -00:09:11 verbose #6729 > -00:09:11 verbose #6730 > ╭─[ 995.95ms - stdout ]────────────────────────────────────────────────────────╮ -00:09:11 verbose #6731 > │ assert_eq / actual: US0_0 1 / expected: US0_0 1 │ -00:09:11 verbose #6732 > │ │ -00:09:11 verbose #6733 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6734 > -00:09:11 verbose #6735 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6736 > //// test -00:09:11 verbose #6737 > ///! rust -00:09:11 verbose #6738 > -00:09:11 verbose #6739 > types () -00:09:11 verbose #6740 > inl retry_fn_test = mut 0i32 -00:09:11 verbose #6741 > fun () => -00:09:11 verbose #6742 > retry_fn_test <- *retry_fn_test + 1 -00:09:11 verbose #6743 > *retry_fn_test -00:09:11 verbose #6744 > |> retry_fn 3i32 -00:09:11 verbose #6745 > |> _assert_eq' (Some 1i32) -00:09:11 verbose #6746 > -00:09:11 verbose #6747 > ╭─[ 19.95s - return value ]────────────────────────────────────────────────────╮ -00:09:11 verbose #6748 > │ assert_eq' / actual: US0_0(1) / expected: US0_0(1) │ -00:09:11 verbose #6749 > │ │ -00:09:11 verbose #6750 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6751 > -00:09:11 verbose #6752 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6753 > //// test -00:09:11 verbose #6754 > -00:09:11 verbose #6755 > inl retry_fn_test = mut 0i32 -00:09:11 verbose #6756 > fun () => -00:09:11 verbose #6757 > if *retry_fn_test >= 2 -00:09:11 verbose #6758 > then *retry_fn_test -00:09:11 verbose #6759 > else -00:09:11 verbose #6760 > retry_fn_test <- *retry_fn_test + 1 -00:09:11 verbose #6761 > failwith "test" -00:09:11 verbose #6762 > |> retry_fn 3i32 -00:09:11 verbose #6763 > |> _assert_eq (Some 2i32) -00:09:11 verbose #6764 > -00:09:11 verbose #6765 > ╭─[ 884.07ms - stdout ]────────────────────────────────────────────────────────╮ -00:09:11 verbose #6766 > │ 00:00:00 warning #1 retry_fn / retry: 0 / ex: System.Exception: test │ -00:09:11 verbose #6767 > │ at FSI_0035.closure0(Mut0 v0, Int32 v1, Unit unitVar2) │ -00:09:11 verbose #6768 > │ at FSI_0035.method1(Mut0 v0, Int32 v1) │ -00:09:11 verbose #6769 > │ 00:00:00 warning #2 retry_fn / retry: 1 / ex: System.Exception: test │ -00:09:11 verbose #6770 > │ at FSI_0035.closure0(Mut0 v0, Int32 v1, Unit unitVar2) │ -00:09:11 verbose #6771 > │ at FSI_0035.method1(Mut0 v0, Int32 v1) │ -00:09:11 verbose #6772 > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │ -00:09:11 verbose #6773 > │ │ -00:09:11 verbose #6774 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6775 > -00:09:11 verbose #6776 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6777 > //// test -00:09:11 verbose #6778 > ///! rust -00:09:11 verbose #6779 > -00:09:11 verbose #6780 > types () -00:09:11 verbose #6781 > inl retry_fn_test = mut 0i32 -00:09:11 verbose #6782 > fun () => -00:09:11 verbose #6783 > if *retry_fn_test >= 2 -00:09:11 verbose #6784 > then *retry_fn_test -00:09:11 verbose #6785 > else -00:09:11 verbose #6786 > retry_fn_test <- *retry_fn_test + 1 -00:09:11 verbose #6787 > failwith "test" -00:09:11 verbose #6788 > |> retry_fn 3i32 -00:09:11 verbose #6789 > |> _assert_eq' (Some 2i32) -00:09:11 verbose #6790 > -00:09:11 verbose #6791 > ╭─[ 19.73s - return value ]────────────────────────────────────────────────────╮ -00:09:11 verbose #6792 > │ 00:00:00 warning #1 retry_fn / retry: 0 / ex: Exception { message: │ -00:09:11 verbose #6793 > │ "test" } │ -00:09:11 verbose #6794 > │ 00:00:00 warning #2 retry_fn / retry: 1 / ex: Exception { message: │ -00:09:11 verbose #6795 > │ "test" } │ -00:09:11 verbose #6796 > │ assert_eq' / actual: US0_0(2) / expected: US0_0(2) │ -00:09:11 verbose #6797 > │ │ -00:09:11 verbose #6798 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6799 > -00:09:11 verbose #6800 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:11 verbose #6801 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:11 verbose #6802 > │ ## main │ -00:09:11 verbose #6803 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:11 verbose #6804 > -00:09:11 verbose #6805 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:11 verbose #6806 > inl main () = -00:09:11 verbose #6807 > types () -00:09:11 verbose #6808 > init_trace_state None -00:09:11 verbose #6809 > inl new_disposable x : _ () = new_disposable x -00:09:11 verbose #6810 > $"let new_disposable x = !new_disposable x" : () -00:09:11 verbose #6811 > -00:09:11 verbose #6812 > inl retry_fn (r : i32) (x : () -> _) : optionm'.option' () = retry_fn r x |> -00:09:11 verbose #6813 > optionm'.box -00:09:11 verbose #6814 > $"let retry_fn x = !retry_fn x" : () -00:09:11 verbose #6815 > inl memoize (fn : () -> ()) : () -> () = memoize fn -00:09:11 verbose #6816 > $"let memoize x = !memoize x" : () -00:09:11 verbose #6817 > 00:01:33 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 21253 -00:09:11 verbose #6818 > 00:01:33 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/common.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/common.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:09:15 verbose #6819 > 00:01:38 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/common.dib.ipynb to html\e[0m -00:09:15 verbose #6820 > 00:01:38 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:09:15 verbose #6821 > 00:01:38 verbose #7 \e[4;7m validate(nb)\e[0m -00:09:15 verbose #6822 > 00:01:38 verbose #8 \e[4;7m[NbConvertApp] Writing 334611 bytes to c:\home\git\polyglot\lib\spiral\common.dib.html\e[0m -00:09:15 verbose #6823 > 00:01:38 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 603 -00:09:15 verbose #6824 > 00:01:38 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 603 -00:09:15 verbose #6825 > 00:01:38 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/common.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/common.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:09:16 verbose #6826 > 00:01:39 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:09:16 verbose #6827 > 00:01:39 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:09:16 verbose #6828 > 00:01:39 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 21915 -00:09:16 debug #6829 execute_with_options_async / exit_code: 0 / output.Length: 24224 -00:09:16 debug #12 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path common.dib --retries 3 -00:09:16 debug #6830 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path resultm.dib --retries 3", +00:03:56 verbose #6458 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "common.dib", "--retries", "3"]) +00:03:56 verbose #6459 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/common.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/common.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/common.dib" --output-path "c:/home/git/polyglot/lib/spiral/common.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:03:58 verbose #6460 > > +00:03:58 verbose #6461 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:03:58 verbose #6462 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:03:58 verbose #6463 > > │ # common │ +00:03:58 verbose #6464 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:03:58 verbose #6465 > > +00:03:58 verbose #6466 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:03:58 verbose #6467 > > //// test +00:03:58 verbose #6468 > > +00:03:58 verbose #6469 > > open testing +00:03:58 verbose #6470 > > +00:03:58 verbose #6471 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:03:58 verbose #6472 > > #r +00:03:58 verbose #6473 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:03:58 verbose #6474 > > otNet.Interactive.Spiral.dll" +00:03:58 verbose #6475 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:03:58 verbose #6476 > > #r +00:03:58 verbose #6477 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:03:58 verbose #6478 > > otNet.Interactive.dll" +00:03:58 verbose #6479 > > open type Microsoft.DotNet.Interactive.Kernel +00:04:02 verbose #6480 > > +00:04:02 verbose #6481 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:02 verbose #6482 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:02 verbose #6483 > > │ ## types │ +00:04:02 verbose #6484 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:02 verbose #6485 > > +00:04:02 verbose #6486 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:02 verbose #6487 > > inl types () = +00:04:02 verbose #6488 > > env.types () +00:04:02 verbose #6489 > > rust.types () +00:04:02 verbose #6490 > > sm'.types () +00:04:02 verbose #6491 > > +00:04:02 verbose #6492 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:02 verbose #6493 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:02 verbose #6494 > > │ ## prototype │ +00:04:02 verbose #6495 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:02 verbose #6496 > > +00:04:02 verbose #6497 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:02 verbose #6498 > > prototype (~:>) r : forall t. t -> r +00:04:02 verbose #6499 > > +00:04:02 verbose #6500 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:02 verbose #6501 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:02 verbose #6502 > > │ ## run_target │ +00:04:02 verbose #6503 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:02 verbose #6504 > > +00:04:02 verbose #6505 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:02 verbose #6506 > > //// test +00:04:02 verbose #6507 > > +00:04:02 verbose #6508 > > run_target function +00:04:02 verbose #6509 > > | Fsharp (Native) => fun () => $'1uy' +00:04:02 verbose #6510 > > | _ => fun () => $'2uy' +00:04:02 verbose #6511 > > |> _assert_eq 1u8 +00:04:03 verbose #6512 > > +00:04:03 verbose #6513 > > ╭─[ 657.25ms - stdout ]────────────────────────────────────────────────────────╮ +00:04:03 verbose #6514 > > │ assert_eq / actual: 1uy / expected: 1uy │ +00:04:03 verbose #6515 > > │ │ +00:04:03 verbose #6516 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:03 verbose #6517 > > +00:04:03 verbose #6518 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:03 verbose #6519 > > //// test +00:04:03 verbose #6520 > > ///! rust +00:04:03 verbose #6521 > > +00:04:03 verbose #6522 > > run_target function +00:04:03 verbose #6523 > > | Rust (Native) => fun () => $'1uy' +00:04:03 verbose #6524 > > | _ => fun () => $'2uy' +00:04:03 verbose #6525 > > |> _assert_eq 1u8 +00:04:07 verbose #6526 > > +00:04:07 verbose #6527 > > ╭─[ 4.26s - return value ]─────────────────────────────────────────────────────╮ +00:04:07 verbose #6528 > > │ assert_eq / actual: 1 / expected: 1 │ +00:04:07 verbose #6529 > > │ │ +00:04:07 verbose #6530 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6531 > > +00:04:07 verbose #6532 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:07 verbose #6533 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:07 verbose #6534 > > │ ## upcast │ +00:04:07 verbose #6535 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6536 > > +00:04:07 verbose #6537 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6538 > > inl upcast forall t u. (x : t) : u = +00:04:07 verbose #6539 > > $'!x :> `u ' +00:04:07 verbose #6540 > > +00:04:07 verbose #6541 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:07 verbose #6542 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:07 verbose #6543 > > │ ## downcast │ +00:04:07 verbose #6544 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6545 > > +00:04:07 verbose #6546 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6547 > > inl downcast forall t u. (x : t) : u = +00:04:07 verbose #6548 > > $'!x :?> `u ' +00:04:07 verbose #6549 > > +00:04:07 verbose #6550 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:07 verbose #6551 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:07 verbose #6552 > > │ ## to_any │ +00:04:07 verbose #6553 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6554 > > +00:04:07 verbose #6555 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6556 > > inl to_any forall t. (obj : t) : any = +00:04:07 verbose #6557 > > $"!obj" +00:04:07 verbose #6558 > > +00:04:07 verbose #6559 > > instance (~:>) any = to_any +00:04:07 verbose #6560 > > +00:04:07 verbose #6561 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:07 verbose #6562 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:07 verbose #6563 > > │ ## (||>) │ +00:04:07 verbose #6564 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6565 > > +00:04:07 verbose #6566 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6567 > > //// test +00:04:07 verbose #6568 > > +00:04:07 verbose #6569 > > (3i32, 2i32) +00:04:07 verbose #6570 > > ||> fun a b => a - b +00:04:07 verbose #6571 > > |> _assert_eq 1 +00:04:07 verbose #6572 > > +00:04:07 verbose #6573 > > ╭─[ 20.24ms - stdout ]─────────────────────────────────────────────────────────╮ +00:04:07 verbose #6574 > > │ assert_eq / actual: 1 / expected: 1 │ +00:04:07 verbose #6575 > > │ │ +00:04:07 verbose #6576 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6577 > > +00:04:07 verbose #6578 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:07 verbose #6579 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:07 verbose #6580 > > │ ## flip │ +00:04:07 verbose #6581 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6582 > > +00:04:07 verbose #6583 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6584 > > inl flip fn a b = +00:04:07 verbose #6585 > > fn b a +00:04:07 verbose #6586 > > +00:04:07 verbose #6587 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6588 > > //// test +00:04:07 verbose #6589 > > +00:04:07 verbose #6590 > > (1i32, 2i32) +00:04:07 verbose #6591 > > ||> flip pair +00:04:07 verbose #6592 > > |> _assert_eq (2, 1) +00:04:07 verbose #6593 > > +00:04:07 verbose #6594 > > ╭─[ 33.84ms - stdout ]─────────────────────────────────────────────────────────╮ +00:04:07 verbose #6595 > > │ assert_eq / actual: struct (2, 1) / expected: struct (2, 1) │ +00:04:07 verbose #6596 > > │ │ +00:04:07 verbose #6597 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6598 > > +00:04:07 verbose #6599 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:07 verbose #6600 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:07 verbose #6601 > > │ ## join_body │ +00:04:07 verbose #6602 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6603 > > +00:04:07 verbose #6604 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6605 > > inl join_body body acc x = +00:04:07 verbose #6606 > > if var_is x |> not +00:04:07 verbose #6607 > > then body acc x +00:04:07 verbose #6608 > > else +00:04:07 verbose #6609 > > inl acc = dyn acc +00:04:07 verbose #6610 > > join body acc x +00:04:07 verbose #6611 > > +00:04:07 verbose #6612 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6613 > > //// test +00:04:07 verbose #6614 > > +00:04:07 verbose #6615 > > inl rec fold_list f s = function +00:04:07 verbose #6616 > > | Cons (x, x') => fold_list f (f s x) x' +00:04:07 verbose #6617 > > | Nil => s +00:04:07 verbose #6618 > > +00:04:07 verbose #6619 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6620 > > //// test +00:04:07 verbose #6621 > > +00:04:07 verbose #6622 > > [[ 5i32; 4; join 3; 2; 1 ]] +00:04:07 verbose #6623 > > |> fold_list (+) 0 +00:04:07 verbose #6624 > > |> _assert_eq 15 +00:04:07 verbose #6625 > > +00:04:07 verbose #6626 > > ╭─[ 83.37ms - stdout ]─────────────────────────────────────────────────────────╮ +00:04:07 verbose #6627 > > │ assert_eq / actual: 15 / expected: 15 │ +00:04:07 verbose #6628 > > │ │ +00:04:07 verbose #6629 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6630 > > +00:04:07 verbose #6631 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6632 > > //// test +00:04:07 verbose #6633 > > +00:04:07 verbose #6634 > > [[ 5i32; 4; join 3; 2; 1 ]] +00:04:07 verbose #6635 > > |> fold_list (join_body (+)) 0 +00:04:07 verbose #6636 > > |> _assert_eq 15 +00:04:07 verbose #6637 > > +00:04:07 verbose #6638 > > ╭─[ 36.51ms - stdout ]─────────────────────────────────────────────────────────╮ +00:04:07 verbose #6639 > > │ assert_eq / actual: 15 / expected: 15 │ +00:04:07 verbose #6640 > > │ │ +00:04:07 verbose #6641 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6642 > > +00:04:07 verbose #6643 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:07 verbose #6644 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:07 verbose #6645 > > │ ## join_body_unit │ +00:04:07 verbose #6646 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6647 > > +00:04:07 verbose #6648 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6649 > > inl join_body_unit body d x = +00:04:07 verbose #6650 > > if var_is d |> not +00:04:07 verbose #6651 > > then body x +00:04:07 verbose #6652 > > else +00:04:07 verbose #6653 > > inl x = dyn x +00:04:07 verbose #6654 > > join body x +00:04:07 verbose #6655 > > +00:04:07 verbose #6656 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6657 > > //// test +00:04:07 verbose #6658 > > +00:04:07 verbose #6659 > > [[ 5i32; 4; join 3; 2; 1 ]] +00:04:07 verbose #6660 > > |> fold_list (fun acc n => join_body_unit ((+) acc) n n) 0 +00:04:07 verbose #6661 > > |> _assert_eq 15 +00:04:07 verbose #6662 > > +00:04:07 verbose #6663 > > ╭─[ 27.16ms - stdout ]─────────────────────────────────────────────────────────╮ +00:04:07 verbose #6664 > > │ assert_eq / actual: 15 / expected: 15 │ +00:04:07 verbose #6665 > > │ │ +00:04:07 verbose #6666 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6667 > > +00:04:07 verbose #6668 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:07 verbose #6669 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:07 verbose #6670 > > │ ## nameof │ +00:04:07 verbose #6671 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:07 verbose #6672 > > +00:04:07 verbose #6673 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6674 > > inl nameof x : string = +00:04:07 verbose #6675 > > $"nameof !x" +00:04:07 verbose #6676 > > +00:04:07 verbose #6677 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:07 verbose #6678 > > //// test +00:04:07 verbose #6679 > > +00:04:07 verbose #6680 > > fun () => failwith "test" +00:04:07 verbose #6681 > > |> _throws +00:04:07 verbose #6682 > > |> optionm.map sm'.format_exception +00:04:07 verbose #6683 > > |> _assert_eq (Some "System.Exception: test") +00:04:08 verbose #6684 > > +00:04:08 verbose #6685 > > ╭─[ 408.11ms - stdout ]────────────────────────────────────────────────────────╮ +00:04:08 verbose #6686 > > │ assert_eq / actual: US1_0 "System.Exception: test" / expected: US1_0 │ +00:04:08 verbose #6687 > > │ "System.Exception: test" │ +00:04:08 verbose #6688 > > │ │ +00:04:08 verbose #6689 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:08 verbose #6690 > > +00:04:08 verbose #6691 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:08 verbose #6692 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:08 verbose #6693 > > │ ## disposable │ +00:04:08 verbose #6694 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:08 verbose #6695 > > +00:04:08 verbose #6696 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:08 verbose #6697 > > nominal disposable t = $"System.IDisposable" +00:04:08 verbose #6698 > > +00:04:08 verbose #6699 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:08 verbose #6700 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:08 verbose #6701 > > │ ## dispose │ +00:04:08 verbose #6702 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:08 verbose #6703 > > +00:04:08 verbose #6704 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:08 verbose #6705 > > inl dispose (disposable : disposable _) : () = +00:04:08 verbose #6706 > > disposable |> $'_.Dispose()' +00:04:08 verbose #6707 > > +00:04:08 verbose #6708 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:08 verbose #6709 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:08 verbose #6710 > > │ ## new_disposable │ +00:04:08 verbose #6711 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:08 verbose #6712 > > +00:04:08 verbose #6713 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:08 verbose #6714 > > inl new_disposable (fn : () -> ()) : disposable _ = +00:04:08 verbose #6715 > > run_target function +00:04:08 verbose #6716 > > | Rust _ => fun () => +00:04:08 verbose #6717 > > global "type Disposable (f : unit -> unit) = interface +00:04:08 verbose #6718 > > System.IDisposable with member _.Dispose () = f ()" +00:04:08 verbose #6719 > > $'new Disposable (fun () -> Fable.Core.RustInterop.emitRustExpr !fn +00:04:08 verbose #6720 > > "$0()" )' +00:04:08 verbose #6721 > > | Fsharp _ => fun () => +00:04:08 verbose #6722 > > inl fn = join fn +00:04:08 verbose #6723 > > $'{ new System.IDisposable with member _.Dispose () = !fn () }' +00:04:08 verbose #6724 > > | _ => fun () => null () +00:04:08 verbose #6725 > > +00:04:08 verbose #6726 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:08 verbose #6727 > > //// test +00:04:08 verbose #6728 > > +00:04:08 verbose #6729 > > inl new_disposable_test = mut 0i32 +00:04:08 verbose #6730 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 +00:04:08 verbose #6731 > > |> fun x => x : disposable () +00:04:08 verbose #6732 > > |> dispose +00:04:08 verbose #6733 > > *new_disposable_test |> _assert_eq 1 +00:04:08 verbose #6734 > > +00:04:08 verbose #6735 > > ╭─[ 235.12ms - stdout ]────────────────────────────────────────────────────────╮ +00:04:08 verbose #6736 > > │ assert_eq / actual: 1 / expected: 1 │ +00:04:08 verbose #6737 > > │ │ +00:04:08 verbose #6738 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:08 verbose #6739 > > +00:04:08 verbose #6740 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:08 verbose #6741 > > //// test +00:04:08 verbose #6742 > > ///! rust +00:04:08 verbose #6743 > > +00:04:08 verbose #6744 > > inl new_disposable_test = mut 0i32 +00:04:08 verbose #6745 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 +00:04:08 verbose #6746 > > |> fun x => x : disposable () +00:04:08 verbose #6747 > > |> dispose +00:04:08 verbose #6748 > > *new_disposable_test |> _assert_eq 1 +00:04:12 verbose #6749 > > +00:04:12 verbose #6750 > > ╭─[ 4.14s - return value ]─────────────────────────────────────────────────────╮ +00:04:12 verbose #6751 > > │ assert_eq / actual: 1 / expected: 1 │ +00:04:12 verbose #6752 > > │ │ +00:04:12 verbose #6753 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:12 verbose #6754 > > +00:04:12 verbose #6755 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:12 verbose #6756 > > //// test +00:04:12 verbose #6757 > > +00:04:12 verbose #6758 > > inl new_disposable_test = mut 0i32 +00:04:12 verbose #6759 > > fun () => +00:04:12 verbose #6760 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 +00:04:12 verbose #6761 > > |> fun x => x : disposable () +00:04:12 verbose #6762 > > |> use +00:04:12 verbose #6763 > > |> ignore +00:04:12 verbose #6764 > > |> return +00:04:12 verbose #6765 > > |> async.new_task +00:04:12 verbose #6766 > > |> async.await_task +00:04:12 verbose #6767 > > |> async.run_synchronously +00:04:12 verbose #6768 > > *new_disposable_test |> _assert_eq 1 +00:04:12 verbose #6769 > > +00:04:12 verbose #6770 > > ╭─[ 164.99ms - stdout ]────────────────────────────────────────────────────────╮ +00:04:12 verbose #6771 > > │ assert_eq / actual: 1 / expected: 1 │ +00:04:12 verbose #6772 > > │ │ +00:04:12 verbose #6773 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:12 verbose #6774 > > +00:04:12 verbose #6775 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:12 verbose #6776 > > //// test +00:04:12 verbose #6777 > > +00:04:12 verbose #6778 > > inl new_disposable_test = mut 0i32 +00:04:12 verbose #6779 > > fun () => +00:04:12 verbose #6780 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 +00:04:12 verbose #6781 > > |> fun x => x : disposable () +00:04:12 verbose #6782 > > |> use +00:04:12 verbose #6783 > > |> ignore +00:04:12 verbose #6784 > > |> return +00:04:12 verbose #6785 > > |> async.new_async +00:04:12 verbose #6786 > > |> async.run_synchronously +00:04:12 verbose #6787 > > *new_disposable_test |> _assert_eq 1 +00:04:13 verbose #6788 > > +00:04:13 verbose #6789 > > ╭─[ 62.19ms - stdout ]─────────────────────────────────────────────────────────╮ +00:04:13 verbose #6790 > > │ assert_eq / actual: 1 / expected: 1 │ +00:04:13 verbose #6791 > > │ │ +00:04:13 verbose #6792 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:13 verbose #6793 > > +00:04:13 verbose #6794 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:13 verbose #6795 > > //// test +00:04:13 verbose #6796 > > +00:04:13 verbose #6797 > > inl new_disposable_test = mut 0i32 +00:04:13 verbose #6798 > > fun () => +00:04:13 verbose #6799 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 +00:04:13 verbose #6800 > > |> fun x => x : disposable () +00:04:13 verbose #6801 > > |> ignore +00:04:13 verbose #6802 > > |> return +00:04:13 verbose #6803 > > |> async.new_async +00:04:13 verbose #6804 > > |> async.run_synchronously +00:04:13 verbose #6805 > > *new_disposable_test |> _assert_eq 0 +00:04:13 verbose #6806 > > +00:04:13 verbose #6807 > > ╭─[ 46.47ms - stdout ]─────────────────────────────────────────────────────────╮ +00:04:13 verbose #6808 > > │ assert_eq / actual: 0 / expected: 0 │ +00:04:13 verbose #6809 > > │ │ +00:04:13 verbose #6810 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:13 verbose #6811 > > +00:04:13 verbose #6812 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:13 verbose #6813 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:13 verbose #6814 > > │ ## return │ +00:04:13 verbose #6815 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:13 verbose #6816 > > +00:04:13 verbose #6817 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:13 verbose #6818 > > inl return forall t. (x : t) : () = +00:04:13 verbose #6819 > > $'return !x ' +00:04:13 verbose #6820 > > +00:04:13 verbose #6821 > > inl return' forall t. (x : t) : t = +00:04:13 verbose #6822 > > $'return !x ' +00:04:13 verbose #6823 > > +00:04:13 verbose #6824 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:13 verbose #6825 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:13 verbose #6826 > > │ ## sleep │ +00:04:13 verbose #6827 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:13 verbose #6828 > > +00:04:13 verbose #6829 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:13 verbose #6830 > > inl sleep (n : i32) : () = +00:04:13 verbose #6831 > > run_target function +00:04:13 verbose #6832 > > | Fsharp (Native) => fun () => $'System.Threading.Thread.Sleep' n +00:04:13 verbose #6833 > > | _ => fun () => () +00:04:13 verbose #6834 > > +00:04:13 verbose #6835 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:13 verbose #6836 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:13 verbose #6837 > > │ ## retry_fn │ +00:04:13 verbose #6838 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:13 verbose #6839 > > +00:04:13 verbose #6840 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:13 verbose #6841 > > inl retry_fn forall t. retries (fn : () -> t) : option t = +00:04:13 verbose #6842 > > let rec loop retry = +00:04:13 verbose #6843 > > try +00:04:13 verbose #6844 > > fun () => +00:04:13 verbose #6845 > > if retry < retries +00:04:13 verbose #6846 > > then fn () |> Some +00:04:13 verbose #6847 > > else None +00:04:13 verbose #6848 > > fun ex => +00:04:13 verbose #6849 > > trace Warning +00:04:13 verbose #6850 > > fun () => "retry_fn" +00:04:13 verbose #6851 > > fun () => $'$"retry: {!retry} / ex: %A{!ex} / {!_locals +00:04:13 verbose #6852 > > ()}"' +00:04:13 verbose #6853 > > sleep 1 +00:04:13 verbose #6854 > > None +00:04:13 verbose #6855 > > |> function +00:04:13 verbose #6856 > > | Some x => x +00:04:13 verbose #6857 > > | None => loop (retry + 1) +00:04:13 verbose #6858 > > loop 0 +00:04:13 verbose #6859 > > +00:04:13 verbose #6860 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:13 verbose #6861 > > //// test +00:04:13 verbose #6862 > > +00:04:13 verbose #6863 > > inl retry_fn_test = mut 0i32 +00:04:13 verbose #6864 > > fun () => +00:04:13 verbose #6865 > > retry_fn_test <- *retry_fn_test + 1 +00:04:13 verbose #6866 > > *retry_fn_test +00:04:13 verbose #6867 > > |> retry_fn 3i32 +00:04:13 verbose #6868 > > |> _assert_eq (Some 1i32) +00:04:13 verbose #6869 > > +00:04:13 verbose #6870 > > ╭─[ 344.16ms - stdout ]────────────────────────────────────────────────────────╮ +00:04:13 verbose #6871 > > │ assert_eq / actual: US0_0 1 / expected: US0_0 1 │ +00:04:13 verbose #6872 > > │ │ +00:04:13 verbose #6873 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:13 verbose #6874 > > +00:04:13 verbose #6875 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:13 verbose #6876 > > //// test +00:04:13 verbose #6877 > > ///! rust +00:04:13 verbose #6878 > > +00:04:13 verbose #6879 > > types () +00:04:13 verbose #6880 > > inl retry_fn_test = mut 0i32 +00:04:13 verbose #6881 > > fun () => +00:04:13 verbose #6882 > > retry_fn_test <- *retry_fn_test + 1 +00:04:13 verbose #6883 > > *retry_fn_test +00:04:13 verbose #6884 > > |> retry_fn 3i32 +00:04:13 verbose #6885 > > |> _assert_eq' (Some 1i32) +00:04:17 verbose #6886 > > +00:04:17 verbose #6887 > > ╭─[ 4.42s - return value ]─────────────────────────────────────────────────────╮ +00:04:17 verbose #6888 > > │ assert_eq' / actual: US0_0(1) / expected: US0_0(1) │ +00:04:17 verbose #6889 > > │ │ +00:04:17 verbose #6890 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:17 verbose #6891 > > +00:04:17 verbose #6892 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:17 verbose #6893 > > //// test +00:04:17 verbose #6894 > > +00:04:17 verbose #6895 > > inl retry_fn_test = mut 0i32 +00:04:17 verbose #6896 > > fun () => +00:04:17 verbose #6897 > > if *retry_fn_test >= 2 +00:04:17 verbose #6898 > > then *retry_fn_test +00:04:17 verbose #6899 > > else +00:04:17 verbose #6900 > > retry_fn_test <- *retry_fn_test + 1 +00:04:17 verbose #6901 > > failwith "test" +00:04:17 verbose #6902 > > |> retry_fn 3i32 +00:04:17 verbose #6903 > > |> _assert_eq (Some 2i32) +00:04:18 verbose #6904 > > +00:04:18 verbose #6905 > > ╭─[ 209.09ms - stdout ]────────────────────────────────────────────────────────╮ +00:04:18 verbose #6906 > > │ 00:00:00 warning #1 retry_fn / retry: 0 / ex: System.Exception: test │ +00:04:18 verbose #6907 > > │ at FSI_0035.closure0(Mut0 v0, Int32 v1, Unit unitVar2) │ +00:04:18 verbose #6908 > > │ at FSI_0035.method1(Mut0 v0, Int32 v1) │ +00:04:18 verbose #6909 > > │ 00:00:00 warning #2 retry_fn / retry: 1 / ex: System.Exception: test │ +00:04:18 verbose #6910 > > │ at FSI_0035.closure0(Mut0 v0, Int32 v1, Unit unitVar2) │ +00:04:18 verbose #6911 > > │ at FSI_0035.method1(Mut0 v0, Int32 v1) │ +00:04:18 verbose #6912 > > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │ +00:04:18 verbose #6913 > > │ │ +00:04:18 verbose #6914 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:18 verbose #6915 > > +00:04:18 verbose #6916 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:18 verbose #6917 > > //// test +00:04:18 verbose #6918 > > ///! rust +00:04:18 verbose #6919 > > +00:04:18 verbose #6920 > > types () +00:04:18 verbose #6921 > > inl retry_fn_test = mut 0i32 +00:04:18 verbose #6922 > > fun () => +00:04:18 verbose #6923 > > if *retry_fn_test >= 2 +00:04:18 verbose #6924 > > then *retry_fn_test +00:04:18 verbose #6925 > > else +00:04:18 verbose #6926 > > retry_fn_test <- *retry_fn_test + 1 +00:04:18 verbose #6927 > > failwith "test" +00:04:18 verbose #6928 > > |> retry_fn 3i32 +00:04:18 verbose #6929 > > |> _assert_eq' (Some 2i32) +00:04:22 verbose #6930 > > +00:04:22 verbose #6931 > > ╭─[ 4.28s - return value ]─────────────────────────────────────────────────────╮ +00:04:22 verbose #6932 > > │ 00:00:00 warning #1 retry_fn / retry: 0 / ex: Exception { message: │ +00:04:22 verbose #6933 > > │ "test" } │ +00:04:22 verbose #6934 > > │ 00:00:00 warning #2 retry_fn / retry: 1 / ex: Exception { message: │ +00:04:22 verbose #6935 > > │ "test" } │ +00:04:22 verbose #6936 > > │ assert_eq' / actual: US0_0(2) / expected: US0_0(2) │ +00:04:22 verbose #6937 > > │ │ +00:04:22 verbose #6938 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:22 verbose #6939 > > +00:04:22 verbose #6940 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:22 verbose #6941 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:22 verbose #6942 > > │ ## main │ +00:04:22 verbose #6943 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:22 verbose #6944 > > +00:04:22 verbose #6945 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:22 verbose #6946 > > inl main () = +00:04:22 verbose #6947 > > types () +00:04:22 verbose #6948 > > init_trace_state None +00:04:22 verbose #6949 > > inl new_disposable x : _ () = new_disposable x +00:04:22 verbose #6950 > > $"let new_disposable x = !new_disposable x" : () +00:04:22 verbose #6951 > > +00:04:22 verbose #6952 > > inl retry_fn (r : i32) (x : () -> _) : optionm'.option' () = retry_fn r x |> +00:04:22 verbose #6953 > > optionm'.box +00:04:22 verbose #6954 > > $"let retry_fn x = !retry_fn x" : () +00:04:22 verbose #6955 > > inl memoize (fn : () -> ()) : () -> () = memoize fn +00:04:22 verbose #6956 > > $"let memoize x = !memoize x" : () +00:04:22 verbose #6957 > 00:00:26 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 21253 +00:04:22 verbose #6958 > 00:00:26 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/common.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/common.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:04:24 verbose #6959 > 00:00:28 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/common.dib.ipynb to html +00:04:24 verbose #6960 > 00:00:28 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:04:24 verbose #6961 > 00:00:28 verbose #7 ! validate(nb) +00:04:26 verbose #6962 > 00:00:29 verbose #8 ! [NbConvertApp] Writing 334611 bytes to c:\home\git\polyglot\lib\spiral\common.dib.html +00:04:26 verbose #6963 > 00:00:29 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 643 +00:04:26 verbose #6964 > 00:00:29 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 643 +00:04:26 verbose #6965 > 00:00:29 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/common.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/common.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:04:27 verbose #6966 > 00:00:30 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:04:27 verbose #6967 > 00:00:30 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:04:27 verbose #6968 > 00:00:31 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 21955 +00:04:27 debug #6969 execute_with_options_async / exit_code: 0 / output.Length: 25178 +00:04:27 debug #12 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path common.dib --retries 3 +00:04:27 debug #6970 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path resultm.dib --retries 3", [||], None, None, true, None) -00:09:16 verbose #6831 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "resultm.dib", "--retries", "3"]) -00:09:16 verbose #6832 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/resultm.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/resultm.dib" --output-path "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:09:42 verbose #6833 > -00:09:42 verbose #6834 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6835 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6836 > │ # resultm │ -00:09:42 verbose #6837 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6838 > -00:09:42 verbose #6839 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6840 > open rust_operators -00:09:42 verbose #6841 > -00:09:42 verbose #6842 > ── spiral - import ───────────────────────────────────────────────────────────── -00:09:42 verbose #6843 > #r -00:09:42 verbose #6844 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:09:42 verbose #6845 > otNet.Interactive.Spiral.dll" -00:09:42 verbose #6846 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:09:42 verbose #6847 > #r -00:09:42 verbose #6848 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:09:42 verbose #6849 > otNet.Interactive.dll" -00:09:42 verbose #6850 > open type Microsoft.DotNet.Interactive.Kernel -00:09:42 verbose #6851 > -00:09:42 verbose #6852 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6853 > //// test -00:09:42 verbose #6854 > -00:09:42 verbose #6855 > open testing -00:09:42 verbose #6856 > -00:09:42 verbose #6857 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6858 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6859 > │ ## result' │ -00:09:42 verbose #6860 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6861 > -00:09:42 verbose #6862 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6863 > nominal result' t u = $"Result<`t, `u>" -00:09:42 verbose #6864 > -00:09:42 verbose #6865 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6866 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6867 > │ ## from_option_error │ -00:09:42 verbose #6868 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6869 > -00:09:42 verbose #6870 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6871 > inl from_option_error error opt = -00:09:42 verbose #6872 > match opt with -00:09:42 verbose #6873 > | Some x => Ok x -00:09:42 verbose #6874 > | None => Error error -00:09:42 verbose #6875 > -00:09:42 verbose #6876 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6877 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6878 > │ ## from_option │ -00:09:42 verbose #6879 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6880 > -00:09:42 verbose #6881 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6882 > inl from_option opt = -00:09:42 verbose #6883 > opt |> from_option_error "resultm.from_option / Option does not have a -00:09:42 verbose #6884 > value." -00:09:42 verbose #6885 > -00:09:42 verbose #6886 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6887 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6888 > │ ## flatten_option │ -00:09:42 verbose #6889 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6890 > -00:09:42 verbose #6891 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6892 > inl flatten_option forall t u. (x : option (result (option t) u)) : result -00:09:42 verbose #6893 > (option t) u = -00:09:42 verbose #6894 > match x with -00:09:42 verbose #6895 > | Some (Error x) => Error x -00:09:42 verbose #6896 > | Some (Ok (Some x)) => Ok (Some x) -00:09:42 verbose #6897 > | _ => Ok None -00:09:42 verbose #6898 > -00:09:42 verbose #6899 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6900 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6901 > │ ## flatten │ -00:09:42 verbose #6902 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6903 > -00:09:42 verbose #6904 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6905 > inl flatten forall t u. (x : result (result t u) u) : result t u = -00:09:42 verbose #6906 > match x with -00:09:42 verbose #6907 > | Ok x => x -00:09:42 verbose #6908 > | Error x => Error x -00:09:42 verbose #6909 > -00:09:42 verbose #6910 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6911 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6912 > │ ## try' │ -00:09:42 verbose #6913 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6914 > -00:09:42 verbose #6915 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6916 > inl try' forall t u. (x : result' t u) : t = -00:09:42 verbose #6917 > !\\(x, $'"$0?"') -00:09:42 verbose #6918 > -00:09:42 verbose #6919 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6920 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6921 > │ ## unwrap' │ -00:09:42 verbose #6922 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6923 > -00:09:42 verbose #6924 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6925 > inl unwrap' forall t u. (x : result' t u) : t = -00:09:42 verbose #6926 > !\\(x, $'"$0.unwrap()"') -00:09:42 verbose #6927 > -00:09:42 verbose #6928 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6929 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6930 > │ ## get │ -00:09:42 verbose #6931 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6932 > -00:09:42 verbose #6933 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6934 > inl get forall t e. (source : result t e) : t = -00:09:42 verbose #6935 > match source with -00:09:42 verbose #6936 > | Ok x => x -00:09:42 verbose #6937 > | Error x => failwith $'$"resultm.get / Result value was Error: {!x}"' -00:09:42 verbose #6938 > -00:09:42 verbose #6939 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6940 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6941 > │ ## unbox │ -00:09:42 verbose #6942 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6943 > -00:09:42 verbose #6944 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6945 > inl unbox forall t u. (x : result' t u) : result t u = -00:09:42 verbose #6946 > inl ok x : result t u = Ok x -00:09:42 verbose #6947 > inl error x : result t u = Error x -00:09:42 verbose #6948 > real -00:09:42 verbose #6949 > typecase t with -00:09:42 verbose #6950 > | () => $"match !x with Ok () -> !ok () | Error x -> !error x" : result -00:09:42 verbose #6951 > t u -00:09:42 verbose #6952 > | _ => $"match !x with Ok x -> !ok x | Error x -> !error x" : result t u -00:09:42 verbose #6953 > -00:09:42 verbose #6954 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6955 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6956 > │ ## unbox' │ -00:09:42 verbose #6957 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6958 > -00:09:42 verbose #6959 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6960 > inl unbox' forall t u. (x : result' t u) : result t u = -00:09:42 verbose #6961 > inl ok x : result t u = Ok x -00:09:42 verbose #6962 > inl error x : result t u = Error x -00:09:42 verbose #6963 > real -00:09:42 verbose #6964 > typecase t with -00:09:42 verbose #6965 > | () => -00:09:42 verbose #6966 > (~!\\) -00:09:42 verbose #6967 > `((result' t u -> result t u) * (result' t u -> result t u)) -00:09:42 verbose #6968 > `(result t u) -00:09:42 verbose #6969 > ((ok, error), ($'"match !x { Ok(()) => $0(()), Err(e) => $1(e) -00:09:42 verbose #6970 > }"' : string)) -00:09:42 verbose #6971 > | _ => -00:09:42 verbose #6972 > (~!\\) -00:09:42 verbose #6973 > `((result' t u -> result t u) * (result' t u -> result t u)) -00:09:42 verbose #6974 > `(result t u) -00:09:42 verbose #6975 > ((ok, error), ($'"match !x { Ok(x) => $0(x), Err(e) => $1(e) }"' -00:09:42 verbose #6976 > : string)) -00:09:42 verbose #6977 > -00:09:42 verbose #6978 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6979 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6980 > │ ## box │ -00:09:42 verbose #6981 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6982 > -00:09:42 verbose #6983 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6984 > inl box forall t u. (x : result t u) : result' t u = -00:09:42 verbose #6985 > match x with -00:09:42 verbose #6986 > | Ok x => $"Ok !x" -00:09:42 verbose #6987 > | Error err => $"Error !err" -00:09:42 verbose #6988 > -00:09:42 verbose #6989 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #6990 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #6991 > │ ## map │ -00:09:42 verbose #6992 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #6993 > -00:09:42 verbose #6994 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #6995 > inl map forall t e u. (fn : t -> u) (source : result t e) : result u e = -00:09:42 verbose #6996 > match source with -00:09:42 verbose #6997 > | Ok x => x |> fn |> Ok -00:09:42 verbose #6998 > | Error x => Error x -00:09:42 verbose #6999 > -00:09:42 verbose #7000 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7001 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7002 > │ ## map_error │ -00:09:42 verbose #7003 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7004 > -00:09:42 verbose #7005 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7006 > inl map_error forall t e u. (fn : e -> u) (source : result t e) : result t u = -00:09:42 verbose #7007 > match source with -00:09:42 verbose #7008 > | Ok x => Ok x -00:09:42 verbose #7009 > | Error x => x |> fn |> Error -00:09:42 verbose #7010 > -00:09:42 verbose #7011 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7012 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7013 > │ ## map' │ -00:09:42 verbose #7014 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7015 > -00:09:42 verbose #7016 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7017 > inl map' forall t e u. (fn : t -> u) (source : result' t e) : result' u e = -00:09:42 verbose #7018 > (!\\(source, $'"true; let _result = $0.map(|x| { //"') : bool) |> ignore -00:09:42 verbose #7019 > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore -00:09:42 verbose #7020 > !\($'"_result"') -00:09:42 verbose #7021 > -00:09:42 verbose #7022 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7023 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7024 > │ ## map'' │ -00:09:42 verbose #7025 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7026 > -00:09:42 verbose #7027 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7028 > inl map'' forall t e u. (fn : t -> u) (source : result' t e) : result' u e = -00:09:42 verbose #7029 > inl fn = join fn -00:09:42 verbose #7030 > inl source = join source -00:09:42 verbose #7031 > !\($'"!source.map(|x| !fn(x))"') -00:09:42 verbose #7032 > -00:09:42 verbose #7033 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7034 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7035 > │ ## map_error' │ -00:09:42 verbose #7036 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7037 > -00:09:42 verbose #7038 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7039 > inl map_error' forall t e u. (fn : e -> u) (source : result' t e) : result' t u -00:09:42 verbose #7040 > = -00:09:42 verbose #7041 > inl fn = join fn -00:09:42 verbose #7042 > !\\((source, fn), $'"$0.map_err(|x| $1(x))"') -00:09:42 verbose #7043 > -00:09:42 verbose #7044 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7045 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7046 > │ ## map_error'' │ -00:09:42 verbose #7047 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7048 > -00:09:42 verbose #7049 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7050 > inl map_error'' forall t e u. (fn : e -> u) (source : result' t e) : result' t u -00:09:42 verbose #7051 > = -00:09:42 verbose #7052 > (!\\(source, $'"true; let _result = $0.map_err(|x| { //"') : bool) |> ignore -00:09:42 verbose #7053 > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore -00:09:42 verbose #7054 > !\($'"_result"') -00:09:42 verbose #7055 > -00:09:42 verbose #7056 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7057 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7058 > │ ## option_ok_or │ -00:09:42 verbose #7059 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7060 > -00:09:42 verbose #7061 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7062 > inl option_ok_or forall t e. (e : e) (source : optionm'.option' t) : result' t e -00:09:42 verbose #7063 > = -00:09:42 verbose #7064 > !\\(source, $'"$0.ok_or(!e)"') -00:09:42 verbose #7065 > -00:09:42 verbose #7066 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7067 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7068 > │ ## as_ref │ -00:09:42 verbose #7069 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7070 > -00:09:42 verbose #7071 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7072 > inl as_ref forall t e. (source : result' t e) : result' (rust.ref' t) (rust.ref' -00:09:42 verbose #7073 > e) = -00:09:42 verbose #7074 > !\($'"!source.as_ref()"') -00:09:42 verbose #7075 > -00:09:42 verbose #7076 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7077 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7078 > │ ## as_ref' │ -00:09:42 verbose #7079 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7080 > -00:09:42 verbose #7081 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7082 > inl as_ref' forall t e. (source : rust.ref' (result' t e)) : result' (rust.ref' -00:09:42 verbose #7083 > t) (rust.ref' e) = -00:09:42 verbose #7084 > !\($'"!source.as_ref()"') -00:09:42 verbose #7085 > -00:09:42 verbose #7086 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7087 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7088 > │ ## unwrap_or' │ -00:09:42 verbose #7089 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7090 > -00:09:42 verbose #7091 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7092 > inl unwrap_or' forall t u. (default : t) (x : result' t u) : t = -00:09:42 verbose #7093 > !\\((x, default), $'"$0.unwrap_or($1)"') -00:09:42 verbose #7094 > -00:09:42 verbose #7095 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7096 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7097 > │ ## expect │ -00:09:42 verbose #7098 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7099 > -00:09:42 verbose #7100 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7101 > inl expect forall t u. (error : rust.ref' string) (x : result' t u) : t = -00:09:42 verbose #7102 > !\($'"!x.expect(&!error)"') -00:09:42 verbose #7103 > -00:09:42 verbose #7104 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7105 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7106 > │ ## ok' │ -00:09:42 verbose #7107 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7108 > -00:09:42 verbose #7109 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7110 > inl ok' forall t. (x : result' t _) : optionm'.option' t = -00:09:42 verbose #7111 > !\($'"!x.ok()"') -00:09:42 verbose #7112 > -00:09:42 verbose #7113 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7114 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7115 > │ ## ok │ -00:09:42 verbose #7116 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7117 > -00:09:42 verbose #7118 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7119 > inl ok forall t. (x : result t _) : option t = -00:09:42 verbose #7120 > match x with -00:09:42 verbose #7121 > | Ok x => Some x -00:09:42 verbose #7122 > | Error _ => None -00:09:42 verbose #7123 > -00:09:42 verbose #7124 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7125 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7126 > │ ## transpose │ -00:09:42 verbose #7127 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7128 > -00:09:42 verbose #7129 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7130 > inl transpose forall t u. (x : optionm'.option' (result' t u)) : result' -00:09:42 verbose #7131 > (optionm'.option' t) u = -00:09:42 verbose #7132 > !\\(x, $'"$0.transpose()"') -00:09:42 verbose #7133 > -00:09:42 verbose #7134 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:42 verbose #7135 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:42 verbose #7136 > │ ## rc_try_unwrap │ -00:09:42 verbose #7137 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7138 > -00:09:42 verbose #7139 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7140 > inl rc_try_unwrap forall t. (x : rust.rc t) : result' t (rust.rc t) = -00:09:42 verbose #7141 > !\($'"std::rc::Rc::try_unwrap(!x)"') -00:09:42 verbose #7142 > -00:09:42 verbose #7143 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:42 verbose #7144 > //// test -00:09:42 verbose #7145 > ///! rust -00:09:42 verbose #7146 > -00:09:42 verbose #7147 > types () -00:09:42 verbose #7148 > rust.new_rc () -00:09:42 verbose #7149 > |> rc_try_unwrap -00:09:42 verbose #7150 > |> unbox -00:09:42 verbose #7151 > |> _assert_eq (Ok ()) -00:09:42 verbose #7152 > -00:09:42 verbose #7153 > ╭─[ 18.17s - return value ]────────────────────────────────────────────────────╮ -00:09:42 verbose #7154 > │ assert_eq / actual: US0_0 / expected: US0_0 │ -00:09:42 verbose #7155 > │ │ -00:09:42 verbose #7156 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:42 verbose #7157 > 00:00:25 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 16091 -00:09:42 verbose #7158 > 00:00:25 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:09:46 verbose #7159 > 00:00:29 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb to html\e[0m -00:09:46 verbose #7160 > 00:00:29 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:09:46 verbose #7161 > 00:00:29 verbose #7 \e[4;7m validate(nb)\e[0m -00:09:46 verbose #7162 > 00:00:29 verbose #8 \e[4;7m[NbConvertApp] Writing 323602 bytes to c:\home\git\polyglot\lib\spiral\resultm.dib.html\e[0m -00:09:46 verbose #7163 > 00:00:29 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 605 -00:09:46 verbose #7164 > 00:00:29 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 605 -00:09:46 verbose #7165 > 00:00:29 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/resultm.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/resultm.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:09:47 verbose #7166 > 00:00:30 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:09:47 verbose #7167 > 00:00:30 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:09:47 verbose #7168 > 00:00:30 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 16755 -00:09:47 debug #7169 execute_with_options_async / exit_code: 0 / output.Length: 19073 -00:09:47 debug #13 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path resultm.dib --retries 3 -00:09:47 debug #7170 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path console.dib --retries 3", +00:04:27 verbose #6971 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "resultm.dib", "--retries", "3"]) +00:04:27 verbose #6972 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/resultm.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/resultm.dib" --output-path "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:04:29 verbose #6973 > > +00:04:29 verbose #6974 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:29 verbose #6975 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:29 verbose #6976 > > │ # resultm │ +00:04:29 verbose #6977 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:29 verbose #6978 > > +00:04:29 verbose #6979 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:29 verbose #6980 > > open rust_operators +00:04:29 verbose #6981 > > +00:04:29 verbose #6982 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:04:29 verbose #6983 > > #r +00:04:29 verbose #6984 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:04:29 verbose #6985 > > otNet.Interactive.Spiral.dll" +00:04:29 verbose #6986 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:04:29 verbose #6987 > > #r +00:04:29 verbose #6988 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:04:29 verbose #6989 > > otNet.Interactive.dll" +00:04:29 verbose #6990 > > open type Microsoft.DotNet.Interactive.Kernel +00:04:33 verbose #6991 > > +00:04:33 verbose #6992 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:33 verbose #6993 > > //// test +00:04:33 verbose #6994 > > +00:04:33 verbose #6995 > > open testing +00:04:33 verbose #6996 > > +00:04:33 verbose #6997 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:33 verbose #6998 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:33 verbose #6999 > > │ ## result' │ +00:04:33 verbose #7000 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:33 verbose #7001 > > +00:04:33 verbose #7002 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:33 verbose #7003 > > nominal result' t u = $"Result<`t, `u>" +00:04:33 verbose #7004 > > +00:04:33 verbose #7005 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:33 verbose #7006 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:33 verbose #7007 > > │ ## from_option_error │ +00:04:33 verbose #7008 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:33 verbose #7009 > > +00:04:33 verbose #7010 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:33 verbose #7011 > > inl from_option_error error opt = +00:04:33 verbose #7012 > > match opt with +00:04:33 verbose #7013 > > | Some x => Ok x +00:04:33 verbose #7014 > > | None => Error error +00:04:33 verbose #7015 > > +00:04:33 verbose #7016 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:33 verbose #7017 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:33 verbose #7018 > > │ ## from_option │ +00:04:33 verbose #7019 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:33 verbose #7020 > > +00:04:33 verbose #7021 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:33 verbose #7022 > > inl from_option opt = +00:04:33 verbose #7023 > > opt |> from_option_error "resultm.from_option / Option does not have a +00:04:33 verbose #7024 > > value." +00:04:33 verbose #7025 > > +00:04:33 verbose #7026 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:33 verbose #7027 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:33 verbose #7028 > > │ ## flatten_option │ +00:04:33 verbose #7029 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:33 verbose #7030 > > +00:04:33 verbose #7031 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:33 verbose #7032 > > inl flatten_option forall t u. (x : option (result (option t) u)) : result +00:04:33 verbose #7033 > > (option t) u = +00:04:33 verbose #7034 > > match x with +00:04:33 verbose #7035 > > | Some (Error x) => Error x +00:04:33 verbose #7036 > > | Some (Ok (Some x)) => Ok (Some x) +00:04:33 verbose #7037 > > | _ => Ok None +00:04:34 verbose #7038 > > +00:04:34 verbose #7039 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7040 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7041 > > │ ## flatten │ +00:04:34 verbose #7042 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7043 > > +00:04:34 verbose #7044 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7045 > > inl flatten forall t u. (x : result (result t u) u) : result t u = +00:04:34 verbose #7046 > > match x with +00:04:34 verbose #7047 > > | Ok x => x +00:04:34 verbose #7048 > > | Error x => Error x +00:04:34 verbose #7049 > > +00:04:34 verbose #7050 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7051 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7052 > > │ ## try' │ +00:04:34 verbose #7053 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7054 > > +00:04:34 verbose #7055 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7056 > > inl try' forall t u. (x : result' t u) : t = +00:04:34 verbose #7057 > > !\\(x, $'"$0?"') +00:04:34 verbose #7058 > > +00:04:34 verbose #7059 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7060 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7061 > > │ ## to_try │ +00:04:34 verbose #7062 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7063 > > +00:04:34 verbose #7064 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7065 > > inl to_try forall t u. (x : result' t u) : rust.try t = +00:04:34 verbose #7066 > > !\\(x, $'"$0"') +00:04:34 verbose #7067 > > +00:04:34 verbose #7068 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7069 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7070 > > │ ## unwrap' │ +00:04:34 verbose #7071 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7072 > > +00:04:34 verbose #7073 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7074 > > inl unwrap' forall t u. (x : result' t u) : t = +00:04:34 verbose #7075 > > !\\(x, $'"$0.unwrap()"') +00:04:34 verbose #7076 > > +00:04:34 verbose #7077 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7078 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7079 > > │ ## get │ +00:04:34 verbose #7080 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7081 > > +00:04:34 verbose #7082 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7083 > > inl get forall t e. (source : result t e) : t = +00:04:34 verbose #7084 > > match source with +00:04:34 verbose #7085 > > | Ok x => x +00:04:34 verbose #7086 > > | Error x => failwith $'$"resultm.get / Result value was Error: {!x}"' +00:04:34 verbose #7087 > > +00:04:34 verbose #7088 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7089 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7090 > > │ ## unbox │ +00:04:34 verbose #7091 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7092 > > +00:04:34 verbose #7093 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7094 > > inl unbox forall t u. (x : result' t u) : result t u = +00:04:34 verbose #7095 > > inl ok x : result t u = Ok x +00:04:34 verbose #7096 > > inl error x : result t u = Error x +00:04:34 verbose #7097 > > real +00:04:34 verbose #7098 > > typecase t with +00:04:34 verbose #7099 > > | () => $"match !x with Ok () -> !ok () | Error x -> !error x" : result +00:04:34 verbose #7100 > > t u +00:04:34 verbose #7101 > > | _ => $"match !x with Ok x -> !ok x | Error x -> !error x" : result t u +00:04:34 verbose #7102 > > +00:04:34 verbose #7103 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7104 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7105 > > │ ## unbox' │ +00:04:34 verbose #7106 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7107 > > +00:04:34 verbose #7108 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7109 > > inl unbox' forall t u. (x : result' t u) : result t u = +00:04:34 verbose #7110 > > inl ok x : result t u = Ok x +00:04:34 verbose #7111 > > inl ok = join ok +00:04:34 verbose #7112 > > inl error x : result t u = Error x +00:04:34 verbose #7113 > > inl error = join error +00:04:34 verbose #7114 > > real +00:04:34 verbose #7115 > > typecase t with +00:04:34 verbose #7116 > > | () => +00:04:34 verbose #7117 > > (~!\\) +00:04:34 verbose #7118 > > `((result' t u -> result t u) * (result' t u -> result t u)) +00:04:34 verbose #7119 > > `(result t u) +00:04:34 verbose #7120 > > ((ok, error), ($'"match !x { Ok(()) => $0(()), Err(e) => $1(e) +00:04:34 verbose #7121 > > }"' : string)) +00:04:34 verbose #7122 > > | _ => +00:04:34 verbose #7123 > > (~!\\) +00:04:34 verbose #7124 > > `((result' t u -> result t u) * (result' t u -> result t u)) +00:04:34 verbose #7125 > > `(result t u) +00:04:34 verbose #7126 > > ((ok, error), ($'"match !x { Ok(x) => $0(x), Err(e) => $1(e) }"' +00:04:34 verbose #7127 > > : string)) +00:04:34 verbose #7128 > > +00:04:34 verbose #7129 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7130 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7131 > > │ ## box │ +00:04:34 verbose #7132 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7133 > > +00:04:34 verbose #7134 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7135 > > inl box forall t u. (x : result t u) : result' t u = +00:04:34 verbose #7136 > > match x with +00:04:34 verbose #7137 > > | Ok x => $"Ok !x" +00:04:34 verbose #7138 > > | Error err => $"Error !err" +00:04:34 verbose #7139 > > +00:04:34 verbose #7140 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7141 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7142 > > │ ## map │ +00:04:34 verbose #7143 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7144 > > +00:04:34 verbose #7145 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7146 > > inl map forall t e u. (fn : t -> u) (source : result t e) : result u e = +00:04:34 verbose #7147 > > match source with +00:04:34 verbose #7148 > > | Ok x => x |> fn |> Ok +00:04:34 verbose #7149 > > | Error x => Error x +00:04:34 verbose #7150 > > +00:04:34 verbose #7151 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7152 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7153 > > │ ## map_error │ +00:04:34 verbose #7154 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7155 > > +00:04:34 verbose #7156 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7157 > > inl map_error forall t e u. (fn : e -> u) (source : result t e) : result t u = +00:04:34 verbose #7158 > > match source with +00:04:34 verbose #7159 > > | Ok x => Ok x +00:04:34 verbose #7160 > > | Error x => x |> fn |> Error +00:04:34 verbose #7161 > > +00:04:34 verbose #7162 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7163 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7164 > > │ ## map' │ +00:04:34 verbose #7165 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7166 > > +00:04:34 verbose #7167 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7168 > > inl map' forall t e u. (fn : t -> u) (source : result' t e) : result' u e = +00:04:34 verbose #7169 > > (!\\(source, $'"true; let _result = $0.map(|x| { //"') : bool) |> ignore +00:04:34 verbose #7170 > > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore +00:04:34 verbose #7171 > > !\($'"_result"') +00:04:34 verbose #7172 > > +00:04:34 verbose #7173 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7174 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7175 > > │ ## map'' │ +00:04:34 verbose #7176 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7177 > > +00:04:34 verbose #7178 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7179 > > inl map'' forall t e u. (fn : t -> u) (source : result' t e) : result' u e = +00:04:34 verbose #7180 > > inl fn = join fn +00:04:34 verbose #7181 > > inl source = join source +00:04:34 verbose #7182 > > !\($'"!source.map(|x| !fn(x))"') +00:04:34 verbose #7183 > > +00:04:34 verbose #7184 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7185 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7186 > > │ ## map_error' │ +00:04:34 verbose #7187 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7188 > > +00:04:34 verbose #7189 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7190 > > inl map_error' forall t e u. (fn : e -> u) (source : result' t e) : result' t u +00:04:34 verbose #7191 > > = +00:04:34 verbose #7192 > > inl fn = join fn +00:04:34 verbose #7193 > > !\\((source, fn), $'"$0.map_err(|x| $1(x))"') +00:04:34 verbose #7194 > > +00:04:34 verbose #7195 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7196 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7197 > > │ ## map_error'' │ +00:04:34 verbose #7198 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7199 > > +00:04:34 verbose #7200 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7201 > > inl map_error'' forall t e u. (fn : e -> u) (source : result' t e) : result' t u +00:04:34 verbose #7202 > > = +00:04:34 verbose #7203 > > (!\\(source, $'"true; let _result = $0.map_err(|x| { //"') : bool) |> ignore +00:04:34 verbose #7204 > > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore +00:04:34 verbose #7205 > > !\($'"_result"') +00:04:34 verbose #7206 > > +00:04:34 verbose #7207 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7208 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7209 > > │ ## option_ok_or │ +00:04:34 verbose #7210 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7211 > > +00:04:34 verbose #7212 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7213 > > inl option_ok_or forall t e. (e : e) (source : optionm'.option' t) : result' t e +00:04:34 verbose #7214 > > = +00:04:34 verbose #7215 > > !\\(source, $'"$0.ok_or(!e)"') +00:04:34 verbose #7216 > > +00:04:34 verbose #7217 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7218 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7219 > > │ ## as_ref │ +00:04:34 verbose #7220 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7221 > > +00:04:34 verbose #7222 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7223 > > inl as_ref forall t e. (source : result' t e) : result' (rust.ref' t) (rust.ref' +00:04:34 verbose #7224 > > e) = +00:04:34 verbose #7225 > > !\($'"!source.as_ref()"') +00:04:34 verbose #7226 > > +00:04:34 verbose #7227 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7228 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7229 > > │ ## as_ref' │ +00:04:34 verbose #7230 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7231 > > +00:04:34 verbose #7232 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7233 > > inl as_ref' forall t e. (source : rust.ref' (result' t e)) : result' (rust.ref' +00:04:34 verbose #7234 > > t) (rust.ref' e) = +00:04:34 verbose #7235 > > !\($'"!source.as_ref()"') +00:04:34 verbose #7236 > > +00:04:34 verbose #7237 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7238 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7239 > > │ ## unwrap_or' │ +00:04:34 verbose #7240 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7241 > > +00:04:34 verbose #7242 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7243 > > inl unwrap_or' forall t u. (default : t) (x : result' t u) : t = +00:04:34 verbose #7244 > > !\\((x, default), $'"$0.unwrap_or($1)"') +00:04:34 verbose #7245 > > +00:04:34 verbose #7246 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7247 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7248 > > │ ## expect │ +00:04:34 verbose #7249 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7250 > > +00:04:34 verbose #7251 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7252 > > inl expect forall t u. (error : rust.ref' string) (x : result' t u) : t = +00:04:34 verbose #7253 > > !\($'"!x.expect(&!error)"') +00:04:34 verbose #7254 > > +00:04:34 verbose #7255 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7256 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7257 > > │ ## ok' │ +00:04:34 verbose #7258 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7259 > > +00:04:34 verbose #7260 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7261 > > inl ok' forall t. (x : result' t _) : optionm'.option' t = +00:04:34 verbose #7262 > > !\($'"!x.ok()"') +00:04:34 verbose #7263 > > +00:04:34 verbose #7264 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7265 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7266 > > │ ## ok │ +00:04:34 verbose #7267 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7268 > > +00:04:34 verbose #7269 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7270 > > inl ok forall t. (x : result t _) : option t = +00:04:34 verbose #7271 > > match x with +00:04:34 verbose #7272 > > | Ok x => Some x +00:04:34 verbose #7273 > > | Error _ => None +00:04:34 verbose #7274 > > +00:04:34 verbose #7275 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7276 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7277 > > │ ## transpose │ +00:04:34 verbose #7278 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7279 > > +00:04:34 verbose #7280 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7281 > > inl transpose forall t u. (x : optionm'.option' (result' t u)) : result' +00:04:34 verbose #7282 > > (optionm'.option' t) u = +00:04:34 verbose #7283 > > !\\(x, $'"$0.transpose()"') +00:04:34 verbose #7284 > > +00:04:34 verbose #7285 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:34 verbose #7286 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:34 verbose #7287 > > │ ## rc_try_unwrap │ +00:04:34 verbose #7288 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:34 verbose #7289 > > +00:04:34 verbose #7290 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7291 > > inl rc_try_unwrap forall t. (x : rust.rc t) : result' t (rust.rc t) = +00:04:34 verbose #7292 > > !\\(x, $'"std::rc::Rc::try_unwrap($0)"') +00:04:34 verbose #7293 > > +00:04:34 verbose #7294 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:34 verbose #7295 > > //// test +00:04:34 verbose #7296 > > ///! rust +00:04:34 verbose #7297 > > +00:04:34 verbose #7298 > > types () +00:04:34 verbose #7299 > > rust.new_rc true +00:04:34 verbose #7300 > > |> rc_try_unwrap +00:04:34 verbose #7301 > > |> unbox +00:04:34 verbose #7302 > > |> _assert_eq (Ok true) +00:04:35 verbose #7303 > 00:04:34 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1b6f2f26862c48a67ddf0840db6a7a4d2544f71f807935009def79f98e8c8b41/main.spi +00:04:40 verbose #7304 > > +00:04:40 verbose #7305 > > ╭─[ 6.17s - return value ]─────────────────────────────────────────────────────╮ +00:04:40 verbose #7306 > > │ assert_eq / actual: US0_0(true) / expected: US0_0(true) │ +00:04:40 verbose #7307 > > │ │ +00:04:40 verbose #7308 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:40 verbose #7309 > 00:00:12 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 16630 +00:04:40 verbose #7310 > 00:00:12 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:04:42 verbose #7311 > 00:00:14 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb to html +00:04:42 verbose #7312 > 00:00:14 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:04:42 verbose #7313 > 00:00:14 verbose #7 ! validate(nb) +00:04:43 verbose #7314 > 00:00:16 verbose #8 ! [NbConvertApp] Writing 325482 bytes to c:\home\git\polyglot\lib\spiral\resultm.dib.html +00:04:44 verbose #7315 > 00:00:16 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 645 +00:04:44 verbose #7316 > 00:00:16 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 645 +00:04:44 verbose #7317 > 00:00:16 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/resultm.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/resultm.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:04:44 verbose #7318 > 00:00:17 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:04:44 verbose #7319 > 00:00:17 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:04:45 verbose #7320 > 00:00:17 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 17334 +00:04:45 debug #7321 execute_with_options_async / exit_code: 0 / output.Length: 20242 +00:04:45 debug #13 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path resultm.dib --retries 3 +00:04:45 debug #7322 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path console.dib --retries 3", [||], None, None, true, None) -00:09:47 verbose #7171 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "console.dib", "--retries", "3"]) -00:09:47 verbose #7172 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/console.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/console.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/console.dib" --output-path "c:/home/git/polyglot/lib/spiral/console.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:09:54 verbose #7173 > -00:09:54 verbose #7174 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:54 verbose #7175 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:54 verbose #7176 > │ # console │ -00:09:54 verbose #7177 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:54 verbose #7178 > -00:09:54 verbose #7179 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:54 verbose #7180 > //// test -00:09:54 verbose #7181 > -00:09:54 verbose #7182 > open testing -00:09:54 verbose #7183 > -00:09:54 verbose #7184 > ── spiral - import ───────────────────────────────────────────────────────────── -00:09:54 verbose #7185 > #r -00:09:54 verbose #7186 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:09:54 verbose #7187 > otNet.Interactive.Spiral.dll" -00:09:54 verbose #7188 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:09:54 verbose #7189 > #r -00:09:54 verbose #7190 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:09:54 verbose #7191 > otNet.Interactive.dll" -00:09:54 verbose #7192 > open type Microsoft.DotNet.Interactive.Kernel -00:09:54 verbose #7193 > -00:09:54 verbose #7194 > ── markdown ──────────────────────────────────────────────────────────────────── -00:09:54 verbose #7195 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:09:54 verbose #7196 > │ ## write_line │ -00:09:54 verbose #7197 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:09:54 verbose #7198 > -00:09:54 verbose #7199 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:54 verbose #7200 > inl write_line obj : () = -00:09:54 verbose #7201 > $"System.Console.WriteLine !obj" -00:09:54 verbose #7202 > -00:09:54 verbose #7203 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:54 verbose #7204 > inl write_line_ ~obj : () = -00:09:54 verbose #7205 > $"System.Console.WriteLine !obj" -00:09:54 verbose #7206 > -00:09:54 verbose #7207 > ── spiral ────────────────────────────────────────────────────────────────────── -00:09:54 verbose #7208 > nominal console_color = $"System.ConsoleColor" -00:09:54 verbose #7209 > -00:09:54 verbose #7210 > inl reset_color () : () = -00:09:54 verbose #7211 > run_target function -00:09:54 verbose #7212 > | Fsharp => fun () => $"System.Console.ResetColor ()" -00:09:54 verbose #7213 > | _ => fun () => () -00:09:54 verbose #7214 > -00:09:54 verbose #7215 > inl set_foreground_color (color : console_color) : () = -00:09:54 verbose #7216 > run_target function -00:09:54 verbose #7217 > | Fsharp => fun () => $"System.Console.ForegroundColor <- !color" -00:09:54 verbose #7218 > | _ => fun () => () -00:09:54 verbose #7219 > 00:00:06 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 1912 -00:09:54 verbose #7220 > 00:00:06 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/console.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/console.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:09:57 verbose #7221 > 00:00:10 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/console.dib.ipynb to html\e[0m -00:09:57 verbose #7222 > 00:00:10 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:09:57 verbose #7223 > 00:00:10 verbose #7 \e[4;7m validate(nb)\e[0m -00:09:57 verbose #7224 > 00:00:10 verbose #8 \e[4;7m[NbConvertApp] Writing 275425 bytes to c:\home\git\polyglot\lib\spiral\console.dib.html\e[0m -00:09:57 verbose #7225 > 00:00:10 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 605 -00:09:57 verbose #7226 > 00:00:10 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 605 -00:09:57 verbose #7227 > 00:00:10 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/console.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/console.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:09:58 verbose #7228 > 00:00:11 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:09:58 verbose #7229 > 00:00:11 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:09:59 verbose #7230 > 00:00:11 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 2576 -00:09:59 debug #7231 execute_with_options_async / exit_code: 0 / output.Length: 4892 -00:09:59 debug #14 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path console.dib --retries 3 -00:09:59 debug #7232 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path date_time.dib --retries 3", +00:04:45 verbose #7323 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "console.dib", "--retries", "3"]) +00:04:45 verbose #7324 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/console.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/console.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/console.dib" --output-path "c:/home/git/polyglot/lib/spiral/console.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:04:47 verbose #7325 > > +00:04:47 verbose #7326 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:47 verbose #7327 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:47 verbose #7328 > > │ # console │ +00:04:47 verbose #7329 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:47 verbose #7330 > > +00:04:47 verbose #7331 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:47 verbose #7332 > > //// test +00:04:47 verbose #7333 > > +00:04:47 verbose #7334 > > open testing +00:04:47 verbose #7335 > > +00:04:47 verbose #7336 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:04:47 verbose #7337 > > #r +00:04:47 verbose #7338 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:04:47 verbose #7339 > > otNet.Interactive.Spiral.dll" +00:04:47 verbose #7340 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:04:47 verbose #7341 > > #r +00:04:47 verbose #7342 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:04:47 verbose #7343 > > otNet.Interactive.dll" +00:04:47 verbose #7344 > > open type Microsoft.DotNet.Interactive.Kernel +00:04:51 verbose #7345 > > +00:04:51 verbose #7346 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:51 verbose #7347 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:51 verbose #7348 > > │ ## write_line │ +00:04:51 verbose #7349 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:51 verbose #7350 > > +00:04:51 verbose #7351 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:51 verbose #7352 > > inl write_line obj : () = +00:04:51 verbose #7353 > > $"System.Console.WriteLine !obj" +00:04:51 verbose #7354 > > +00:04:51 verbose #7355 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:51 verbose #7356 > > inl write_line_ ~obj : () = +00:04:51 verbose #7357 > > $"System.Console.WriteLine !obj" +00:04:51 verbose #7358 > > +00:04:51 verbose #7359 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:51 verbose #7360 > > nominal console_color = $"System.ConsoleColor" +00:04:51 verbose #7361 > > +00:04:51 verbose #7362 > > inl reset_color () : () = +00:04:51 verbose #7363 > > run_target function +00:04:51 verbose #7364 > > | Fsharp => fun () => $"System.Console.ResetColor ()" +00:04:51 verbose #7365 > > | _ => fun () => () +00:04:51 verbose #7366 > > +00:04:51 verbose #7367 > > inl set_foreground_color (color : console_color) : () = +00:04:51 verbose #7368 > > run_target function +00:04:51 verbose #7369 > > | Fsharp => fun () => $"System.Console.ForegroundColor <- !color" +00:04:51 verbose #7370 > > | _ => fun () => () +00:04:51 verbose #7371 > 00:00:06 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 1912 +00:04:51 verbose #7372 > 00:00:06 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/console.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/console.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:04:54 verbose #7373 > 00:00:08 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/console.dib.ipynb to html +00:04:54 verbose #7374 > 00:00:08 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:04:54 verbose #7375 > 00:00:08 verbose #7 ! validate(nb) +00:04:55 verbose #7376 > 00:00:09 verbose #8 ! [NbConvertApp] Writing 275425 bytes to c:\home\git\polyglot\lib\spiral\console.dib.html +00:04:55 verbose #7377 > 00:00:10 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 645 +00:04:55 verbose #7378 > 00:00:10 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 645 +00:04:55 verbose #7379 > 00:00:10 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/console.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/console.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:04:56 verbose #7380 > 00:00:11 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:04:56 verbose #7381 > 00:00:11 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:04:56 verbose #7382 > 00:00:11 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 2616 +00:04:56 debug #7383 execute_with_options_async / exit_code: 0 / output.Length: 4944 +00:04:56 debug #14 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path console.dib --retries 3 +00:04:56 debug #7384 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path date_time.dib --retries 3", [||], None, None, true, None) -00:09:59 verbose #7233 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "date_time.dib", "--retries", "3"]) -00:09:59 verbose #7234 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/date_time.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/date_time.dib" --output-path "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:10:07 verbose #7235 > 00:10:06 debug #99 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/522c0eda53e8a8373468c0bb8e048cea2fe991d59ff6bad9d3732f2498709037/main.spi -00:10:09 verbose #7236 > 00:10:08 debug #100 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/59f767d6efb0d692c7fd73ecebdcb760f924258ddd9b3917f8a8e6ece4d092e8/main.spi -00:10:29 verbose #7237 > 00:10:27 debug #101 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f381b57e7c652687066e2cb4d2c04b24d05ded5f5ce31ea323301b567491fcfc/main.spi -00:10:30 verbose #7238 > 00:10:28 debug #102 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/03a076432f7a2b8880755f7b74e360a3b9a4f36c05e125284d04b65d6216930d/main.spi -00:10:49 verbose #7239 > 00:10:48 debug #103 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3639bf7bd880849a43f349db9141a19a2138994b8164a3508eb6b6293a8664ef/main.spi -00:10:50 verbose #7240 > 00:10:49 debug #104 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/13d0a1ef0cb0e24407700b9010b5ac679008f1f01a74f871b493db4ce562bb63/main.spi -00:11:12 verbose #7241 > 00:11:11 debug #105 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8d6289e7e0e1987aa902e724700b8bb69a840ede36e19ba7d379317028f4d70b/main.spi -00:11:13 verbose #7242 > 00:11:12 debug #106 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/10e36ade82ed1276942fe1512cb0fc5179700e93c4bcf7d9372c00756daa9352/main.spi -00:11:35 verbose #7243 > 00:11:34 debug #107 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/06710419ffe2b75f8fdb0b1582802fc926ab68e00cc2e7d5c7a3510c0073a786/main.spi -00:11:36 verbose #7244 > 00:11:35 debug #108 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/798fe9c46f9de8e59d60ade0ed9d7cd0b0ec6070398cfd3cf4385bd60fbd273e/main.spi -00:11:37 verbose #7245 > 00:11:36 debug #109 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/aafc30adea24146f47d4a63903097597757d8d10ba4e33c4490dfe10e4014a53/main.spi -00:11:38 verbose #7246 > 00:11:36 debug #110 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5a10d28fb0f13ad722a005d1062e7b364756421a2aec71d2f87e6f0c8f9596ca/main.spi -00:11:38 verbose #7247 > 00:11:37 debug #111 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5de2ae931f051c80239ee85a9b5e22d198f457da9fb5cdb352bcd46ec1866be7/main.spi -00:11:39 verbose #7248 > 00:11:38 debug #112 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0df6bfd55dd5491acd87b83d1f1c21e78f166d18286abf0a2e8d088b68cc5f86/main.spi -00:11:40 verbose #7249 > 00:11:39 debug #113 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/eff41408b50d42f8e0899f2bdbc062e93ade58346def35531cca9113567ed1d1/main.spi -00:11:41 verbose #7250 > 00:11:40 debug #114 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0e96cd6230ce53ad97cfc30e91ef1e966d0b8a2ef526c7ec7f73711b4755622c/main.spi -00:11:41 verbose #7251 > 00:11:40 debug #115 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/21773623106abfe24307a3134da14feb2cd686bdc5b028973ac549d61324dc3d/main.spi -00:11:42 verbose #7252 > 00:11:41 debug #116 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dfe8c07cdd88725228af9e3bcd37471c19df62e944c9d4bdf117bc24c9679904/main.spi -00:11:43 verbose #7253 > 00:11:42 debug #117 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9f82b0db83376c89d0fc5e073520b17ec525915d68e58f57fddf7d75149dedbf/main.spi -00:11:44 verbose #7254 > 00:11:43 debug #118 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fca88c0156c826ff6c5279f2f4c93e2601bc60f06f2c8cf8d1cdab6a9f28a5fd/main.spi -00:11:44 verbose #7255 > 00:11:43 debug #119 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/beef4d3e477dd2cf6880841217f9a38838420169038a102d3f384d5b3660bdad/main.spi -00:11:45 verbose #7256 > 00:11:44 debug #120 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4e20df6e315f0a1d6a475d5516ef5a562f30eea2f0d955cf27b94424cb945ec7/main.spi -00:11:46 verbose #7257 > 00:11:45 debug #121 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d330352c2b875c6ed21ded273ae11c41e131d4b370f2a22a6f81d5f4bbbef2cb/main.spi -00:11:46 verbose #7258 > -00:11:46 verbose #7259 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7260 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7261 > │ # date_time │ -00:11:46 verbose #7262 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7263 > -00:11:46 verbose #7264 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7265 > open rust_operators -00:11:46 verbose #7266 > open sm'_operators -00:11:46 verbose #7267 > -00:11:46 verbose #7268 > ── spiral - import ───────────────────────────────────────────────────────────── -00:11:46 verbose #7269 > #r -00:11:46 verbose #7270 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:11:46 verbose #7271 > otNet.Interactive.Spiral.dll" -00:11:46 verbose #7272 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:11:46 verbose #7273 > #r -00:11:46 verbose #7274 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:11:46 verbose #7275 > otNet.Interactive.dll" -00:11:46 verbose #7276 > open type Microsoft.DotNet.Interactive.Kernel -00:11:46 verbose #7277 > -00:11:46 verbose #7278 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7279 > //// test -00:11:46 verbose #7280 > -00:11:46 verbose #7281 > open testing -00:11:46 verbose #7282 > -00:11:46 verbose #7283 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7284 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7285 > │ ## types │ -00:11:46 verbose #7286 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7287 > -00:11:46 verbose #7288 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7289 > inl types () = -00:11:46 verbose #7290 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:11:46 verbose #7291 > Fable.Core.Emit(\"chrono::DateTime<$0>\")>]]\n#endif\ntype chrono_DateTime<'T> = -00:11:46 verbose #7292 > class end" -00:11:46 verbose #7293 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:11:46 verbose #7294 > Fable.Core.Emit(\"chrono::Local\")>]]\n#endif\ntype chrono_Local = class end" -00:11:46 verbose #7295 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:11:46 verbose #7296 > Fable.Core.Emit(\"chrono::NaiveDateTime\")>]]\n#endif\ntype chrono_NaiveDateTime -00:11:46 verbose #7297 > = class end" -00:11:46 verbose #7298 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:11:46 verbose #7299 > Fable.Core.Emit(\"chrono::Utc\")>]]\n#endif\ntype chrono_Utc = class end" -00:11:46 verbose #7300 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:11:46 verbose #7301 > Fable.Core.Emit(\"std::time::Duration\")>]]\n#endif\ntype std_time_Duration = -00:11:46 verbose #7302 > class end" -00:11:46 verbose #7303 > -00:11:46 verbose #7304 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7305 > inl types () = -00:11:46 verbose #7306 > sm'.types () -00:11:46 verbose #7307 > types () -00:11:46 verbose #7308 > -00:11:46 verbose #7309 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7310 > nominal timestamp = i64 -00:11:46 verbose #7311 > nominal duration = $"std_time_Duration" -00:11:46 verbose #7312 > nominal date_time = $"System.DateTime" -00:11:46 verbose #7313 > nominal date_time' t = $"chrono_DateTime<`t>" -00:11:46 verbose #7314 > nominal local = $"chrono_Local" -00:11:46 verbose #7315 > nominal naive_date_time = $"chrono_NaiveDateTime" -00:11:46 verbose #7316 > nominal utc = $"chrono_Utc" -00:11:46 verbose #7317 > -00:11:46 verbose #7318 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7319 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7320 > │ ## date_time_milliseconds │ -00:11:46 verbose #7321 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7322 > -00:11:46 verbose #7323 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7324 > inl date_time_milliseconds -00:11:46 verbose #7325 > (year : int) (month : int) (day : int) (hour : int) (minute : int) (second : -00:11:46 verbose #7326 > int) (millisecond : int) -00:11:46 verbose #7327 > : date_time -00:11:46 verbose #7328 > = -00:11:46 verbose #7329 > $'System.DateTime (!year, !month, !day, !hour, !minute, !second, -00:11:46 verbose #7330 > !millisecond)' -00:11:46 verbose #7331 > -00:11:46 verbose #7332 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7333 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7334 > │ ## date_time_utc │ -00:11:46 verbose #7335 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7336 > -00:11:46 verbose #7337 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7338 > inl date_time_utc -00:11:46 verbose #7339 > (year : int) (month : int) (day : int) (hour : int) (minute : int) (second : -00:11:46 verbose #7340 > int) -00:11:46 verbose #7341 > : date_time -00:11:46 verbose #7342 > = -00:11:46 verbose #7343 > $'System.DateTime (!year, !month, !day, !hour, !minute, !second, -00:11:46 verbose #7344 > System.DateTimeKind.Utc)' -00:11:46 verbose #7345 > -00:11:46 verbose #7346 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7347 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7348 > │ ## naive_utc │ -00:11:46 verbose #7349 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7350 > -00:11:46 verbose #7351 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7352 > inl naive_utc (date_time : date_time' utc) : naive_date_time = -00:11:46 verbose #7353 > inl date_time = join date_time -00:11:46 verbose #7354 > !\($'"!date_time.naive_utc()"') -00:11:46 verbose #7355 > -00:11:46 verbose #7356 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7357 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7358 > │ ## to_local │ -00:11:46 verbose #7359 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7360 > -00:11:46 verbose #7361 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7362 > inl to_local (date_time : date_time' utc) : date_time' local = -00:11:46 verbose #7363 > inl naive_date_time = date_time |> naive_utc -00:11:46 verbose #7364 > !\($'"chrono::offset::TimeZone::from_utc_datetime(&chrono::Local, -00:11:46 verbose #7365 > &!naive_date_time)"') -00:11:46 verbose #7366 > -00:11:46 verbose #7367 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7368 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7369 > │ ## from_timestamp_micros │ -00:11:46 verbose #7370 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7371 > -00:11:46 verbose #7372 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7373 > inl from_timestamp_micros forall t {number; int}. (timestamp : t) : option -00:11:46 verbose #7374 > (date_time' utc) = -00:11:46 verbose #7375 > inl result : optionm'.option' (date_time' utc) = -00:11:46 verbose #7376 > !\\(timestamp, $'"chrono::DateTime::from_timestamp_micros($0)"') -00:11:46 verbose #7377 > result |> optionm'.unbox -00:11:46 verbose #7378 > -00:11:46 verbose #7379 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7380 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7381 > │ ## ticks │ -00:11:46 verbose #7382 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7383 > -00:11:46 verbose #7384 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7385 > inl ticks (date_time : date_time) : timestamp = -00:11:46 verbose #7386 > date_time |> $'_.Ticks' -00:11:46 verbose #7387 > -00:11:46 verbose #7388 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7389 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7390 > │ ## format │ -00:11:46 verbose #7391 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7392 > -00:11:46 verbose #7393 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7394 > inl format (format : string) (date_time : date_time) : string = -00:11:46 verbose #7395 > $'!date_time.ToString' format -00:11:46 verbose #7396 > -00:11:46 verbose #7397 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7398 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7399 > │ ## format_iso8601 │ -00:11:46 verbose #7400 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7401 > -00:11:46 verbose #7402 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7403 > inl format_iso8601 (date_time : date_time) = -00:11:46 verbose #7404 > date_time |> format "yyyy-MM-ddTHH-mm-ss.fff" -00:11:46 verbose #7405 > -00:11:46 verbose #7406 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7407 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7408 > │ ## format' │ -00:11:46 verbose #7409 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7410 > -00:11:46 verbose #7411 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7412 > inl format' (format : string) (date_time : date_time' utc) : sm'.std_string = -00:11:46 verbose #7413 > inl format = #format -00:11:46 verbose #7414 > inl date_time = join date_time -00:11:46 verbose #7415 > !\($'"!date_time.format(!format).to_string()"') -00:11:46 verbose #7416 > -00:11:46 verbose #7417 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7418 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7419 > │ ## format'' │ -00:11:46 verbose #7420 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7421 > -00:11:46 verbose #7422 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7423 > inl format'' (format : string) (date_time : date_time' _) : sm'.std_string = -00:11:46 verbose #7424 > inl format = #format -00:11:46 verbose #7425 > inl date_time = join date_time -00:11:46 verbose #7426 > !\($'"!date_time.format(!format).to_string()"') -00:11:46 verbose #7427 > -00:11:46 verbose #7428 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7429 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7430 > │ ## format_timestamp │ -00:11:46 verbose #7431 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7432 > -00:11:46 verbose #7433 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7434 > inl format_timestamp forall t {number; int}. (timestamp : t) = -00:11:46 verbose #7435 > inl timestamp = join timestamp -00:11:46 verbose #7436 > (timestamp / 1000) -00:11:46 verbose #7437 > |> from_timestamp_micros -00:11:46 verbose #7438 > |> optionm.map fun x => -00:11:46 verbose #7439 > x -00:11:46 verbose #7440 > |> to_local -00:11:46 verbose #7441 > |> format'' "%Y-%m-%d %H:%M:%S" -00:11:46 verbose #7442 > |> sm'.from_std_string -00:11:46 verbose #7443 > |> resultm.from_option -00:11:46 verbose #7444 > -00:11:46 verbose #7445 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7446 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7447 > │ ## duration_from_millis │ -00:11:46 verbose #7448 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7449 > -00:11:46 verbose #7450 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7451 > inl duration_from_millis (ms : u64) : duration = -00:11:46 verbose #7452 > inl ms = join ms -00:11:46 verbose #7453 > !\($'"std::time::Duration::from_millis(!ms)"') -00:11:46 verbose #7454 > -00:11:46 verbose #7455 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7456 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7457 > │ ## min_value │ -00:11:46 verbose #7458 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7459 > -00:11:46 verbose #7460 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7461 > inl min_value () : date_time = -00:11:46 verbose #7462 > $'System.DateTime.MinValue' -00:11:46 verbose #7463 > -00:11:46 verbose #7464 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7465 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7466 > │ ## max_value │ -00:11:46 verbose #7467 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7468 > -00:11:46 verbose #7469 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7470 > inl max_value () : date_time = -00:11:46 verbose #7471 > $'System.DateTime.MaxValue' -00:11:46 verbose #7472 > -00:11:46 verbose #7473 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7474 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7475 > │ ## unix_epoch │ -00:11:46 verbose #7476 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7477 > -00:11:46 verbose #7478 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7479 > inl unix_epoch () : date_time = -00:11:46 verbose #7480 > $'System.DateTime.UnixEpoch' -00:11:46 verbose #7481 > -00:11:46 verbose #7482 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7483 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7484 > │ ## to_universal_time │ -00:11:46 verbose #7485 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7486 > -00:11:46 verbose #7487 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7488 > inl to_universal_time (date_time : date_time) : date_time = -00:11:46 verbose #7489 > date_time |> $'_.ToUniversalTime()' -00:11:46 verbose #7490 > -00:11:46 verbose #7491 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7492 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7493 > │ ## date_time_kind │ -00:11:46 verbose #7494 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7495 > -00:11:46 verbose #7496 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7497 > union date_time_kind = -00:11:46 verbose #7498 > | Unspecified -00:11:46 verbose #7499 > | Utc -00:11:46 verbose #7500 > | Local -00:11:46 verbose #7501 > -00:11:46 verbose #7502 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7503 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7504 > │ ## specify_date_kind │ -00:11:46 verbose #7505 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7506 > -00:11:46 verbose #7507 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7508 > inl specify_date_kind (kind : date_time_kind) (date_time : date_time) : -00:11:46 verbose #7509 > date_time = -00:11:46 verbose #7510 > inl kind : $'System.DateTimeKind' = -00:11:46 verbose #7511 > match kind with -00:11:46 verbose #7512 > | Unspecified => $'System.DateTimeKind.Unspecified' -00:11:46 verbose #7513 > | Utc => $'System.DateTimeKind.Utc' -00:11:46 verbose #7514 > | Local => $'System.DateTimeKind.Local' -00:11:46 verbose #7515 > $'System.DateTime.SpecifyKind (!date_time, !kind)' -00:11:46 verbose #7516 > -00:11:46 verbose #7517 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7518 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7519 > │ ## time_span │ -00:11:46 verbose #7520 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7521 > -00:11:46 verbose #7522 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7523 > nominal time_span = $'System.TimeSpan' -00:11:46 verbose #7524 > -00:11:46 verbose #7525 > inl time_span x : time_span = -00:11:46 verbose #7526 > $'`time_span !x ' -00:11:46 verbose #7527 > -00:11:46 verbose #7528 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7529 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7530 > │ ## new_time_span │ -00:11:46 verbose #7531 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7532 > -00:11:46 verbose #7533 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7534 > inl new_time_span (a : date_time) (b : date_time) : time_span = -00:11:46 verbose #7535 > $'!b - !a ' -00:11:46 verbose #7536 > -00:11:46 verbose #7537 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7538 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7539 > │ ## time_span_format │ -00:11:46 verbose #7540 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7541 > -00:11:46 verbose #7542 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7543 > inl time_span_format (format : string) (time_span : time_span) : string = -00:11:46 verbose #7544 > $'!time_span.ToString' format -00:11:46 verbose #7545 > -00:11:46 verbose #7546 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7547 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7548 > │ ## hours │ -00:11:46 verbose #7549 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7550 > -00:11:46 verbose #7551 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7552 > inl hours (time_span : time_span) : i32 = -00:11:46 verbose #7553 > time_span |> $'_.Hours' -00:11:46 verbose #7554 > -00:11:46 verbose #7555 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7556 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7557 > │ ## milliseconds │ -00:11:46 verbose #7558 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7559 > -00:11:46 verbose #7560 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7561 > inl milliseconds (time_span : time_span) : i32 = -00:11:46 verbose #7562 > time_span |> $'_.Milliseconds' -00:11:46 verbose #7563 > -00:11:46 verbose #7564 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7565 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7566 > │ ## minutes │ -00:11:46 verbose #7567 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7568 > -00:11:46 verbose #7569 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7570 > inl minutes (time_span : time_span) : i32 = -00:11:46 verbose #7571 > time_span |> $'_.Minutes' -00:11:46 verbose #7572 > -00:11:46 verbose #7573 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7574 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7575 > │ ## seconds │ -00:11:46 verbose #7576 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7577 > -00:11:46 verbose #7578 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7579 > inl seconds (time_span : time_span) : i32 = -00:11:46 verbose #7580 > time_span |> $'_.Seconds' -00:11:46 verbose #7581 > -00:11:46 verbose #7582 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7583 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7584 > │ ## total_seconds │ -00:11:46 verbose #7585 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7586 > -00:11:46 verbose #7587 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7588 > inl total_seconds (time_span : time_span) : f64 = -00:11:46 verbose #7589 > time_span |> $'_.TotalSeconds' -00:11:46 verbose #7590 > -00:11:46 verbose #7591 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7592 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7593 > │ ## time_zone_info │ -00:11:46 verbose #7594 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7595 > -00:11:46 verbose #7596 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7597 > nominal time_zone_info = $'System.TimeZoneInfo' -00:11:46 verbose #7598 > -00:11:46 verbose #7599 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7600 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7601 > │ ## time_zone_local │ -00:11:46 verbose #7602 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7603 > -00:11:46 verbose #7604 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7605 > inl time_zone_local () : time_zone_info = -00:11:46 verbose #7606 > run_target function -00:11:46 verbose #7607 > | Fsharp (Native) => fun () => -00:11:46 verbose #7608 > $'System.TimeZoneInfo.Local' -00:11:46 verbose #7609 > | Rust (Native) => fun () => -00:11:46 verbose #7610 > open rust_operators -00:11:46 verbose #7611 > !\($'"0i64.into()"') -00:11:46 verbose #7612 > | _ => fun () => null () -00:11:46 verbose #7613 > -00:11:46 verbose #7614 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7615 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7616 > │ ## get_utc_offset │ -00:11:46 verbose #7617 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7618 > -00:11:46 verbose #7619 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7620 > inl get_utc_offset (time_zone_info : time_zone_info) (date_time : date_time) : -00:11:46 verbose #7621 > time_span = -00:11:46 verbose #7622 > run_target function -00:11:46 verbose #7623 > | Fsharp (Native) => fun () => -00:11:46 verbose #7624 > date_time |> $'_.GetUtcOffset' (time_zone_local ()) -00:11:46 verbose #7625 > | _ => fun () => -00:11:46 verbose #7626 > time_span () -00:11:46 verbose #7627 > -00:11:46 verbose #7628 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7629 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7630 > │ ## add_days │ -00:11:46 verbose #7631 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7632 > -00:11:46 verbose #7633 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7634 > inl add_days (days : i32) (date_time : date_time) : date_time = -00:11:46 verbose #7635 > $'!date_time.AddDays' days -00:11:46 verbose #7636 > -00:11:46 verbose #7637 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7638 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7639 > │ ## now │ -00:11:46 verbose #7640 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7641 > -00:11:46 verbose #7642 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7643 > inl now () : date_time = -00:11:46 verbose #7644 > $'System.DateTime.Now' -00:11:46 verbose #7645 > -00:11:46 verbose #7646 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7647 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7648 > │ ## utc_now │ -00:11:46 verbose #7649 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7650 > -00:11:46 verbose #7651 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7652 > inl utc_now () : date_time = -00:11:46 verbose #7653 > $'System.DateTime.UtcNow' -00:11:46 verbose #7654 > -00:11:46 verbose #7655 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7656 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7657 > │ ## timestamp_guid │ -00:11:46 verbose #7658 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7659 > -00:11:46 verbose #7660 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7661 > type timestamp_guid = guid.guid -00:11:46 verbose #7662 > -00:11:46 verbose #7663 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7664 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7665 > │ ## date_time_guid │ -00:11:46 verbose #7666 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7667 > -00:11:46 verbose #7668 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7669 > type date_time_guid = guid.guid -00:11:46 verbose #7670 > -00:11:46 verbose #7671 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7672 > //// test -00:11:46 verbose #7673 > -00:11:46 verbose #7674 > inl test_guid () = -00:11:46 verbose #7675 > guid.new_guid "FEDCBA98-7654-3210-FEDC-BA9876543210" -00:11:46 verbose #7676 > -00:11:46 verbose #7677 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7678 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7679 > │ ## date_time_guid_from_date_time │ -00:11:46 verbose #7680 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7681 > -00:11:46 verbose #7682 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7683 > let date_time_guid_from_date_time (guid : guid.guid) (date_time : date_time) = -00:11:46 verbose #7684 > inl parse prefix time_zone : date_time_guid = -00:11:46 verbose #7685 > inl guid = guid |> sm'.obj_to_string -00:11:46 verbose #7686 > $'`date_time_guid $"{!prefix}{!time_zone}{!guid.[[!prefix.Length + -00:11:46 verbose #7687 > !time_zone.Length..]]}"' -00:11:46 verbose #7688 > run_target function -00:11:46 verbose #7689 > | Fsharp (Native) => fun () => -00:11:46 verbose #7690 > inl prefix = date_time |> format (join "yyyyMMdd-HHmm-ssff-ffff-f") -00:11:46 verbose #7691 > inl time_zone = date_time |> get_utc_offset (time_zone_local ()) -00:11:46 verbose #7692 > inl time_zone_signal = (hours time_zone > 0) |> convert_i32 -00:11:46 verbose #7693 > inl time_zone_value = time_zone |> time_span_format (join "hhmm") -00:11:46 verbose #7694 > inl time_zone = $'$"{!time_zone_signal}{!time_zone_value}"' : string -00:11:46 verbose #7695 > parse prefix time_zone -00:11:46 verbose #7696 > | Rust (Native) => fun () => -00:11:46 verbose #7697 > inl epoch = -00:11:46 verbose #7698 > date_time_utc 1970 1 1 0 0 0 -00:11:46 verbose #7699 > |> to_universal_time -00:11:46 verbose #7700 > inl date_time = -00:11:46 verbose #7701 > date_time -00:11:46 verbose #7702 > |> specify_date_kind Local -00:11:46 verbose #7703 > |> to_universal_time -00:11:46 verbose #7704 > inl unixticks = -00:11:46 verbose #7705 > match date_time |> ticks, epoch |> ticks with -00:11:46 verbose #7706 > | timestamp date_time, timestamp epoch => date_time - epoch -00:11:46 verbose #7707 > inl prefix = -00:11:46 verbose #7708 > unixticks / 10 -00:11:46 verbose #7709 > |> from_timestamp_micros -00:11:46 verbose #7710 > |> optionm.map ( -00:11:46 verbose #7711 > to_local -00:11:46 verbose #7712 > >> format'' "%Y%m%d-%H%M-%S%f" -00:11:46 verbose #7713 > >> sm'.from_std_string -00:11:46 verbose #7714 > >> fun s => $'$"{!s.[[0..17]]}-{!s.[[18..21]]}-{!s.[[22]]}"' -00:11:46 verbose #7715 > ) -00:11:46 verbose #7716 > |> optionm'.default_value "" -00:11:46 verbose #7717 > inl time_zone = date_time |> get_utc_offset (time_zone_local ()) -00:11:46 verbose #7718 > inl time_zone_signal = if hours time_zone > 0 then 1u8 else 0 -00:11:46 verbose #7719 > inl time_zone_value = time_zone |> time_span_format "hh:mm" -00:11:46 verbose #7720 > inl time_zone = -00:11:46 verbose #7721 > $'$"{!time_zone_signal}{!time_zone_value.[[0..1]]}{!time_zone_value.[[3..4]]}"' -00:11:46 verbose #7722 > : string -00:11:46 verbose #7723 > parse prefix time_zone -00:11:46 verbose #7724 > | _ => fun () => null () -00:11:46 verbose #7725 > -00:11:46 verbose #7726 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7727 > //// test -00:11:46 verbose #7728 > -00:11:46 verbose #7729 > types () -00:11:46 verbose #7730 > now () |> to_universal_time |> date_time_guid_from_date_time (test_guid ()) |> -00:11:46 verbose #7731 > sm'.obj_to_string -00:11:46 verbose #7732 > |> console.write_line -00:11:46 verbose #7733 > -00:11:46 verbose #7734 > ╭─[ 2.61s - stdout ]───────────────────────────────────────────────────────────╮ -00:11:46 verbose #7735 > │ 20240515-1539-4680-8067-800400543210 │ -00:11:46 verbose #7736 > │ │ -00:11:46 verbose #7737 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7738 > -00:11:46 verbose #7739 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7740 > //// test -00:11:46 verbose #7741 > ///! rust -d chrono -00:11:46 verbose #7742 > -00:11:46 verbose #7743 > types () -00:11:46 verbose #7744 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x -00:11:46 verbose #7745 > - 6i32) (am'.End id) -00:11:46 verbose #7746 > now () -00:11:46 verbose #7747 > |> to_universal_time -00:11:46 verbose #7748 > |> date_time_guid_from_date_time (test_guid ()) -00:11:46 verbose #7749 > |> sm'.obj_to_string -00:11:46 verbose #7750 > |> fun s => s |> _assert_eq' $'$"{!s.[[0..29]]}{!suffix}"' -00:11:46 verbose #7751 > -00:11:46 verbose #7752 > ╭─[ 19.51s - return value ]────────────────────────────────────────────────────╮ -00:11:46 verbose #7753 > │ assert_eq' / actual: "20240515-1540-0614-8408-000000543210" / expected: │ -00:11:46 verbose #7754 > │ "20240515-1540-0614-8408-000000543210" │ -00:11:46 verbose #7755 > │ │ -00:11:46 verbose #7756 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7757 > -00:11:46 verbose #7758 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7759 > //// test -00:11:46 verbose #7760 > -00:11:46 verbose #7761 > types () -00:11:46 verbose #7762 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x -00:11:46 verbose #7763 > - 6i32) (am'.End id) -00:11:46 verbose #7764 > min_value () -00:11:46 verbose #7765 > |> specify_date_kind Local -00:11:46 verbose #7766 > |> date_time_guid_from_date_time (test_guid ()) -00:11:46 verbose #7767 > |> sm'.obj_to_string -00:11:46 verbose #7768 > |> fun s => s |> _assert_eq' -00:11:46 verbose #7769 > $'$"00010101-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' -00:11:46 verbose #7770 > -00:11:46 verbose #7771 > ╭─[ 906.23ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #7772 > │ assert_eq' / actual: "00010101-0000-0000-0000-000400543210" / expected: │ -00:11:46 verbose #7773 > │ "00010101-0000-0000-0000-000400543210" │ -00:11:46 verbose #7774 > │ │ -00:11:46 verbose #7775 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7776 > -00:11:46 verbose #7777 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7778 > //// test -00:11:46 verbose #7779 > ///! rust -d chrono -00:11:46 verbose #7780 > -00:11:46 verbose #7781 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x -00:11:46 verbose #7782 > - 6i32) (am'.End id) -00:11:46 verbose #7783 > types () -00:11:46 verbose #7784 > min_value () -00:11:46 verbose #7785 > |> specify_date_kind Local -00:11:46 verbose #7786 > |> date_time_guid_from_date_time (test_guid ()) -00:11:46 verbose #7787 > |> sm'.obj_to_string -00:11:46 verbose #7788 > |> fun s => s |> _assert_eq' -00:11:46 verbose #7789 > $'$"00010101-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' -00:11:46 verbose #7790 > -00:11:46 verbose #7791 > ╭─[ 19.72s - return value ]────────────────────────────────────────────────────╮ -00:11:46 verbose #7792 > │ assert_eq' / actual: "00010101-0000-0000-0000-000000543210" / expected: │ -00:11:46 verbose #7793 > │ "00010101-0000-0000-0000-000000543210" │ -00:11:46 verbose #7794 > │ │ -00:11:46 verbose #7795 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7796 > -00:11:46 verbose #7797 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7798 > //// test -00:11:46 verbose #7799 > -00:11:46 verbose #7800 > types () -00:11:46 verbose #7801 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x -00:11:46 verbose #7802 > - 6i32) (am'.End id) -00:11:46 verbose #7803 > max_value () -00:11:46 verbose #7804 > |> specify_date_kind Utc -00:11:46 verbose #7805 > |> add_days -1 -00:11:46 verbose #7806 > |> date_time_guid_from_date_time (test_guid ()) -00:11:46 verbose #7807 > |> sm'.obj_to_string -00:11:46 verbose #7808 > |> fun s => s |> _assert_eq -00:11:46 verbose #7809 > $'$"99991230-2359-5999-9999-9{!s.[[25..29]]}{!suffix}"' -00:11:46 verbose #7810 > -00:11:46 verbose #7811 > ╭─[ 836.07ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #7812 > │ assert_eq / actual: "99991230-2359-5999-9999-900400543210" / expected: │ -00:11:46 verbose #7813 > │ "99991230-2359-5999-9999-900400543210" │ -00:11:46 verbose #7814 > │ │ -00:11:46 verbose #7815 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7816 > -00:11:46 verbose #7817 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7818 > //// test -00:11:46 verbose #7819 > ///! rust -d chrono -00:11:46 verbose #7820 > -00:11:46 verbose #7821 > types () -00:11:46 verbose #7822 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x -00:11:46 verbose #7823 > - 6i32) (am'.End id) -00:11:46 verbose #7824 > max_value () -00:11:46 verbose #7825 > |> specify_date_kind Utc -00:11:46 verbose #7826 > |> add_days -1 -00:11:46 verbose #7827 > |> date_time_guid_from_date_time (test_guid ()) -00:11:46 verbose #7828 > |> sm'.obj_to_string -00:11:46 verbose #7829 > |> fun s => s |> _assert_eq -00:11:46 verbose #7830 > $'$"99991230-2359-5999-9999-0{!s.[[25..29]]}{!suffix}"' -00:11:46 verbose #7831 > -00:11:46 verbose #7832 > ╭─[ 22.22s - return value ]────────────────────────────────────────────────────╮ -00:11:46 verbose #7833 > │ assert_eq / actual: "99991230-2359-5999-9999-000000543210" / expected: │ -00:11:46 verbose #7834 > │ "99991230-2359-5999-9999-000000543210" │ -00:11:46 verbose #7835 > │ │ -00:11:46 verbose #7836 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7837 > -00:11:46 verbose #7838 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7839 > //// test -00:11:46 verbose #7840 > -00:11:46 verbose #7841 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x -00:11:46 verbose #7842 > - 6i32) (am'.End id) -00:11:46 verbose #7843 > unix_epoch () -00:11:46 verbose #7844 > |> specify_date_kind Utc -00:11:46 verbose #7845 > |> add_days 1 -00:11:46 verbose #7846 > |> date_time_guid_from_date_time (test_guid ()) -00:11:46 verbose #7847 > |> sm'.obj_to_string -00:11:46 verbose #7848 > |> fun s => s |> _assert_eq -00:11:46 verbose #7849 > $'$"19700102-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' -00:11:46 verbose #7850 > -00:11:46 verbose #7851 > ╭─[ 891.74ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #7852 > │ assert_eq / actual: "19700102-0000-0000-0000-000400543210" / expected: │ -00:11:46 verbose #7853 > │ "19700102-0000-0000-0000-000400543210" │ -00:11:46 verbose #7854 > │ │ -00:11:46 verbose #7855 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7856 > -00:11:46 verbose #7857 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7858 > //// test -00:11:46 verbose #7859 > ///! rust -d chrono -00:11:46 verbose #7860 > -00:11:46 verbose #7861 > types () -00:11:46 verbose #7862 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x -00:11:46 verbose #7863 > - 6i32) (am'.End id) -00:11:46 verbose #7864 > unix_epoch () -00:11:46 verbose #7865 > |> specify_date_kind Utc -00:11:46 verbose #7866 > |> add_days 1 -00:11:46 verbose #7867 > |> date_time_guid_from_date_time (test_guid ()) -00:11:46 verbose #7868 > |> sm'.obj_to_string -00:11:46 verbose #7869 > |> fun s => s |> _assert_eq -00:11:46 verbose #7870 > $'$"19700102-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' -00:11:46 verbose #7871 > -00:11:46 verbose #7872 > ╭─[ 22.34s - return value ]────────────────────────────────────────────────────╮ -00:11:46 verbose #7873 > │ assert_eq / actual: "19700102-0000-0000-0000-000000543210" / expected: │ -00:11:46 verbose #7874 > │ "19700102-0000-0000-0000-000000543210" │ -00:11:46 verbose #7875 > │ │ -00:11:46 verbose #7876 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7877 > -00:11:46 verbose #7878 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7879 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7880 > │ ## date_time_from_guid │ -00:11:46 verbose #7881 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7882 > -00:11:46 verbose #7883 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7884 > inl date_time_from_guid (date_time_guid : date_time_guid) = -00:11:46 verbose #7885 > inl date_time_guid = date_time_guid |> sm'.obj_to_string -00:11:46 verbose #7886 > inl sm'_replace = join sm'.replace -00:11:46 verbose #7887 > run_target function -00:11:46 verbose #7888 > | Rust _ => fun () => -00:11:46 verbose #7889 > $'System.DateTime.Parse (!date_time_guid.[[..24]] |> !sm'_replace -00:11:46 verbose #7890 > "-" "")' : date_time -00:11:46 verbose #7891 > | _ => fun () => $'System.DateTime.ParseExact (!date_time_guid.[[..24]] -00:11:46 verbose #7892 > |> !sm'_replace "-" "", "yyyyMMddHHmmssfffffff", null)' : date_time -00:11:46 verbose #7893 > -00:11:46 verbose #7894 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7895 > //// test -00:11:46 verbose #7896 > -00:11:46 verbose #7897 > date_time_from_guid (guid.new_guid "00010101-0000-0000-0000-0a9876543210") -00:11:46 verbose #7898 > |> _assert_eq' (min_value ()) -00:11:46 verbose #7899 > -00:11:46 verbose #7900 > ╭─[ 723.13ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #7901 > │ assert_eq' / actual: 0001-01-01 12:00:00 AM / expected: 0001-01-01 12:00:00 │ -00:11:46 verbose #7902 > │ AM │ -00:11:46 verbose #7903 > │ │ -00:11:46 verbose #7904 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7905 > -00:11:46 verbose #7906 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7907 > //// test -00:11:46 verbose #7908 > -00:11:46 verbose #7909 > date_time_from_guid (guid.new_guid $'$"99991231-2359-5999-9999-9{(!test_guid () -00:11:46 verbose #7910 > |> string).[[^10..]]}"') -00:11:46 verbose #7911 > |> _assert_eq' (max_value ()) -00:11:46 verbose #7912 > -00:11:46 verbose #7913 > ╭─[ 712.77ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #7914 > │ assert_eq' / actual: 9999-12-31 11:59:59 PM / expected: 9999-12-31 11:59:59 │ -00:11:46 verbose #7915 > │ PM │ -00:11:46 verbose #7916 > │ │ -00:11:46 verbose #7917 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7918 > -00:11:46 verbose #7919 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7920 > //// test -00:11:46 verbose #7921 > -00:11:46 verbose #7922 > date_time_from_guid (guid.new_guid $'$"19700101-0000-0000-0000-0{(!test_guid () -00:11:46 verbose #7923 > |> string).[[^10..]]}"') -00:11:46 verbose #7924 > |> _assert_eq' $'System.DateTime.UnixEpoch' -00:11:46 verbose #7925 > -00:11:46 verbose #7926 > ╭─[ 722.82ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #7927 > │ assert_eq' / actual: 1970-01-01 12:00:00 AM / expected: 1970-01-01 12:00:00 │ -00:11:46 verbose #7928 > │ AM │ -00:11:46 verbose #7929 > │ │ -00:11:46 verbose #7930 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7931 > -00:11:46 verbose #7932 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7933 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7934 > │ ## timestamp_guid_from_timestamp │ -00:11:46 verbose #7935 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7936 > -00:11:46 verbose #7937 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7938 > inl timestamp_guid_from_timestamp (guid : guid.guid) (timestamp : timestamp) : -00:11:46 verbose #7939 > timestamp_guid = -00:11:46 verbose #7940 > inl guid = guid |> sm'.obj_to_string -00:11:46 verbose #7941 > inl timestamp = timestamp |> sm'.obj_to_string |> sm'.pad_left 18i32 '0' -00:11:46 verbose #7942 > $'`timestamp_guid -00:11:46 verbose #7943 > $"{!timestamp.[[0..7]]}-{!timestamp.[[8..11]]}-{!timestamp.[[12..15]]}-{!timesta -00:11:46 verbose #7944 > mp.[[16..17]]}{!guid.[[21..]]}"' -00:11:46 verbose #7945 > -00:11:46 verbose #7946 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7947 > //// test -00:11:46 verbose #7948 > -00:11:46 verbose #7949 > timestamp_guid_from_timestamp (test_guid ()) (timestamp 0i64) -00:11:46 verbose #7950 > |> _assert_eq' (guid.new_guid "00000000-0000-0000-00dc-ba9876543210") -00:11:46 verbose #7951 > -00:11:46 verbose #7952 > ╭─[ 752.47ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #7953 > │ assert_eq' / actual: 00000000-0000-0000-00dc-ba9876543210 / expected: │ -00:11:46 verbose #7954 > │ 00000000-0000-0000-00dc-ba9876543210 │ -00:11:46 verbose #7955 > │ │ -00:11:46 verbose #7956 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7957 > -00:11:46 verbose #7958 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7959 > //// test -00:11:46 verbose #7960 > -00:11:46 verbose #7961 > timestamp_guid_from_timestamp (test_guid ()) (timestamp 999999999999999999i64) -00:11:46 verbose #7962 > |> _assert_eq' (guid.new_guid $'$"99999999-9999-9999-99dc-b{(!test_guid () |> -00:11:46 verbose #7963 > string).[[^10..]]}"') -00:11:46 verbose #7964 > -00:11:46 verbose #7965 > ╭─[ 727.38ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #7966 > │ assert_eq' / actual: 99999999-9999-9999-99dc-ba9876543210 / expected: │ -00:11:46 verbose #7967 > │ 99999999-9999-9999-99dc-ba9876543210 │ -00:11:46 verbose #7968 > │ │ -00:11:46 verbose #7969 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7970 > -00:11:46 verbose #7971 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #7972 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #7973 > │ ## timestamp_from_guid │ -00:11:46 verbose #7974 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7975 > -00:11:46 verbose #7976 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7977 > inl timestamp_from_guid (guid : date_time_guid) : timestamp = -00:11:46 verbose #7978 > inl guid = guid |> sm'.obj_to_string -00:11:46 verbose #7979 > $'`i64 -00:11:46 verbose #7980 > $"{!guid.[[0..7]]}{!guid.[[9..12]]}{!guid.[[14..17]]}{!guid.[[19..20]]}"' -00:11:46 verbose #7981 > -00:11:46 verbose #7982 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7983 > //// test -00:11:46 verbose #7984 > -00:11:46 verbose #7985 > timestamp_from_guid (guid.new_guid "00000000-0000-0000-00dc-ba9876543210") -00:11:46 verbose #7986 > |> _assert_eq (timestamp 0) -00:11:46 verbose #7987 > -00:11:46 verbose #7988 > ╭─[ 780.25ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #7989 > │ assert_eq / actual: 0L / expected: 0L │ -00:11:46 verbose #7990 > │ │ -00:11:46 verbose #7991 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #7992 > -00:11:46 verbose #7993 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #7994 > //// test -00:11:46 verbose #7995 > -00:11:46 verbose #7996 > timestamp_from_guid (guid.new_guid $'$"99999999-9999-9999-99{(!test_guid () |> -00:11:46 verbose #7997 > string).[[^14..]]}"') -00:11:46 verbose #7998 > |> _assert_eq (timestamp 999999999999999999) -00:11:46 verbose #7999 > -00:11:46 verbose #8000 > ╭─[ 688.16ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #8001 > │ assert_eq / actual: 999999999999999999L / expected: 999999999999999999L │ -00:11:46 verbose #8002 > │ │ -00:11:46 verbose #8003 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #8004 > -00:11:46 verbose #8005 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #8006 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #8007 > │ ## new_guid_from_date_time │ -00:11:46 verbose #8008 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #8009 > -00:11:46 verbose #8010 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #8011 > inl new_guid_from_date_time (date_time : date_time) = -00:11:46 verbose #8012 > inl guid = guid.new_raw_guid () -00:11:46 verbose #8013 > date_time_guid_from_date_time guid date_time -00:11:46 verbose #8014 > -00:11:46 verbose #8015 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #8016 > //// test -00:11:46 verbose #8017 > -00:11:46 verbose #8018 > utc_now () -00:11:46 verbose #8019 > |> new_guid_from_date_time -00:11:46 verbose #8020 > |> date_time_from_guid -00:11:46 verbose #8021 > |> fun date_time => new_time_span date_time (utc_now ()) |> total_seconds |> i32 -00:11:46 verbose #8022 > |> _assert_eq 0 -00:11:46 verbose #8023 > -00:11:46 verbose #8024 > ╭─[ 793.55ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #8025 > │ assert_eq / actual: 0 / expected: 0 │ -00:11:46 verbose #8026 > │ │ -00:11:46 verbose #8027 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #8028 > -00:11:46 verbose #8029 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #8030 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #8031 > │ ## new_guid_from_timestamp │ -00:11:46 verbose #8032 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #8033 > -00:11:46 verbose #8034 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #8035 > inl new_guid_from_timestamp (timestamp : timestamp) = -00:11:46 verbose #8036 > inl guid = guid.new_raw_guid () -00:11:46 verbose #8037 > timestamp_guid_from_timestamp guid timestamp -00:11:46 verbose #8038 > -00:11:46 verbose #8039 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #8040 > //// test -00:11:46 verbose #8041 > -00:11:46 verbose #8042 > utc_now () -00:11:46 verbose #8043 > |> ticks -00:11:46 verbose #8044 > |> new_guid_from_timestamp -00:11:46 verbose #8045 > |> timestamp_from_guid -00:11:46 verbose #8046 > |> fun (timestamp timestamp) => (timestamp - (utc_now () |> ticks |> fun -00:11:46 verbose #8047 > (timestamp x) => x)) / 100000i64 -00:11:46 verbose #8048 > |> _assert_eq 0i64 -00:11:46 verbose #8049 > -00:11:46 verbose #8050 > ╭─[ 697.05ms - stdout ]────────────────────────────────────────────────────────╮ -00:11:46 verbose #8051 > │ assert_eq / actual: 0L / expected: 0L │ -00:11:46 verbose #8052 > │ │ -00:11:46 verbose #8053 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #8054 > -00:11:46 verbose #8055 > ── markdown ──────────────────────────────────────────────────────────────────── -00:11:46 verbose #8056 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:11:46 verbose #8057 > │ ## main │ -00:11:46 verbose #8058 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:11:46 verbose #8059 > -00:11:46 verbose #8060 > ── spiral ────────────────────────────────────────────────────────────────────── -00:11:46 verbose #8061 > inl main () = -00:11:46 verbose #8062 > types () -00:11:46 verbose #8063 > $"let date_time_guid_from_date_time x = !date_time_guid_from_date_time x" : -00:11:46 verbose #8064 > () -00:11:46 verbose #8065 > $"let date_time_from_guid x = !date_time_from_guid x" : () -00:11:46 verbose #8066 > $"let timestamp_guid_from_timestamp x = !timestamp_guid_from_timestamp x" : -00:11:46 verbose #8067 > () -00:11:46 verbose #8068 > $"let timestamp_from_guid x = !timestamp_from_guid x" : () -00:11:46 verbose #8069 > $"let new_guid_from_date_time x = !new_guid_from_date_time x" : () -00:11:46 verbose #8070 > $"let new_guid_from_timestamp x = !new_guid_from_timestamp x" : () -00:11:46 verbose #8071 > $"let format x = !format x" : () -00:11:46 verbose #8072 > $"let format_iso8601 x = !format_iso8601 x" : () -00:11:46 verbose #8073 > 00:01:47 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 39360 -00:11:46 verbose #8074 > 00:01:47 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:11:51 verbose #8075 > 00:01:52 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb to html\e[0m -00:11:51 verbose #8076 > 00:01:52 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:11:51 verbose #8077 > 00:01:52 verbose #7 \e[4;7m validate(nb)\e[0m -00:11:51 verbose #8078 > 00:01:52 verbose #8 \e[4;7m[NbConvertApp] Writing 388206 bytes to c:\home\git\polyglot\lib\spiral\date_time.dib.html\e[0m -00:11:51 verbose #8079 > 00:01:52 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 609 -00:11:51 verbose #8080 > 00:01:52 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 609 -00:11:51 verbose #8081 > 00:01:52 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/date_time.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/date_time.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:11:53 verbose #8082 > 00:01:53 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:11:53 verbose #8083 > 00:01:53 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:11:53 verbose #8084 > 00:01:54 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 40028 -00:11:53 debug #8085 execute_with_options_async / exit_code: 0 / output.Length: 42364 -00:11:53 debug #15 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path date_time.dib --retries 3 -00:11:53 debug #8086 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path math.dib --retries 3", +00:04:56 verbose #7385 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "date_time.dib", "--retries", "3"]) +00:04:56 verbose #7386 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/date_time.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/date_time.dib" --output-path "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:04:58 verbose #7387 > > +00:04:58 verbose #7388 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:04:58 verbose #7389 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:04:58 verbose #7390 > > │ # date_time │ +00:04:58 verbose #7391 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:04:58 verbose #7392 > > +00:04:58 verbose #7393 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:04:58 verbose #7394 > > open rust_operators +00:04:58 verbose #7395 > > open sm'_operators +00:04:58 verbose #7396 > > +00:04:58 verbose #7397 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:04:58 verbose #7398 > > #r +00:04:58 verbose #7399 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:04:58 verbose #7400 > > otNet.Interactive.Spiral.dll" +00:04:58 verbose #7401 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:04:58 verbose #7402 > > #r +00:04:58 verbose #7403 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:04:58 verbose #7404 > > otNet.Interactive.dll" +00:04:58 verbose #7405 > > open type Microsoft.DotNet.Interactive.Kernel +00:05:02 verbose #7406 > > +00:05:02 verbose #7407 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7408 > > //// test +00:05:02 verbose #7409 > > +00:05:02 verbose #7410 > > open testing +00:05:02 verbose #7411 > > +00:05:02 verbose #7412 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7413 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7414 > > │ ## types │ +00:05:02 verbose #7415 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7416 > > +00:05:02 verbose #7417 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7418 > > inl types () = +00:05:02 verbose #7419 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:05:02 verbose #7420 > > Fable.Core.Emit(\"chrono::DateTime<$0>\")>]]\n#endif\ntype chrono_DateTime<'T> = +00:05:02 verbose #7421 > > class end" +00:05:02 verbose #7422 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:05:02 verbose #7423 > > Fable.Core.Emit(\"chrono::Local\")>]]\n#endif\ntype chrono_Local = class end" +00:05:02 verbose #7424 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:05:02 verbose #7425 > > Fable.Core.Emit(\"chrono::NaiveDateTime\")>]]\n#endif\ntype chrono_NaiveDateTime +00:05:02 verbose #7426 > > = class end" +00:05:02 verbose #7427 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:05:02 verbose #7428 > > Fable.Core.Emit(\"chrono::Utc\")>]]\n#endif\ntype chrono_Utc = class end" +00:05:02 verbose #7429 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:05:02 verbose #7430 > > Fable.Core.Emit(\"std::time::Duration\")>]]\n#endif\ntype std_time_Duration = +00:05:02 verbose #7431 > > class end" +00:05:02 verbose #7432 > > +00:05:02 verbose #7433 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7434 > > inl types () = +00:05:02 verbose #7435 > > sm'.types () +00:05:02 verbose #7436 > > types () +00:05:02 verbose #7437 > > +00:05:02 verbose #7438 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7439 > > nominal timestamp = i64 +00:05:02 verbose #7440 > > nominal duration = $"std_time_Duration" +00:05:02 verbose #7441 > > nominal date_time = $"System.DateTime" +00:05:02 verbose #7442 > > nominal date_time' t = $"chrono_DateTime<`t>" +00:05:02 verbose #7443 > > nominal local = $"chrono_Local" +00:05:02 verbose #7444 > > nominal naive_date_time = $"chrono_NaiveDateTime" +00:05:02 verbose #7445 > > nominal utc = $"chrono_Utc" +00:05:02 verbose #7446 > > +00:05:02 verbose #7447 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7448 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7449 > > │ ## date_time_milliseconds │ +00:05:02 verbose #7450 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7451 > > +00:05:02 verbose #7452 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7453 > > inl date_time_milliseconds +00:05:02 verbose #7454 > > (year : int) (month : int) (day : int) (hour : int) (minute : int) (second : +00:05:02 verbose #7455 > > int) (millisecond : int) +00:05:02 verbose #7456 > > : date_time +00:05:02 verbose #7457 > > = +00:05:02 verbose #7458 > > $'System.DateTime (!year, !month, !day, !hour, !minute, !second, +00:05:02 verbose #7459 > > !millisecond)' +00:05:02 verbose #7460 > > +00:05:02 verbose #7461 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7462 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7463 > > │ ## date_time_utc │ +00:05:02 verbose #7464 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7465 > > +00:05:02 verbose #7466 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7467 > > inl date_time_utc +00:05:02 verbose #7468 > > (year : int) (month : int) (day : int) (hour : int) (minute : int) (second : +00:05:02 verbose #7469 > > int) +00:05:02 verbose #7470 > > : date_time +00:05:02 verbose #7471 > > = +00:05:02 verbose #7472 > > $'System.DateTime (!year, !month, !day, !hour, !minute, !second, +00:05:02 verbose #7473 > > System.DateTimeKind.Utc)' +00:05:02 verbose #7474 > > +00:05:02 verbose #7475 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7476 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7477 > > │ ## naive_utc │ +00:05:02 verbose #7478 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7479 > > +00:05:02 verbose #7480 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7481 > > inl naive_utc (date_time : date_time' utc) : naive_date_time = +00:05:02 verbose #7482 > > inl date_time = join date_time +00:05:02 verbose #7483 > > !\($'"!date_time.naive_utc()"') +00:05:02 verbose #7484 > > +00:05:02 verbose #7485 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7486 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7487 > > │ ## to_local │ +00:05:02 verbose #7488 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7489 > > +00:05:02 verbose #7490 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7491 > > inl to_local (date_time : date_time' utc) : date_time' local = +00:05:02 verbose #7492 > > inl naive_date_time = date_time |> naive_utc +00:05:02 verbose #7493 > > !\($'"chrono::offset::TimeZone::from_utc_datetime(&chrono::Local, +00:05:02 verbose #7494 > > &!naive_date_time)"') +00:05:02 verbose #7495 > > +00:05:02 verbose #7496 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7497 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7498 > > │ ## from_timestamp_micros │ +00:05:02 verbose #7499 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7500 > > +00:05:02 verbose #7501 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7502 > > inl from_timestamp_micros forall t {number; int}. (timestamp : t) : option +00:05:02 verbose #7503 > > (date_time' utc) = +00:05:02 verbose #7504 > > inl result : optionm'.option' (date_time' utc) = +00:05:02 verbose #7505 > > !\\(timestamp, $'"chrono::DateTime::from_timestamp_micros($0)"') +00:05:02 verbose #7506 > > result |> optionm'.unbox +00:05:02 verbose #7507 > > +00:05:02 verbose #7508 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7509 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7510 > > │ ## ticks │ +00:05:02 verbose #7511 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7512 > > +00:05:02 verbose #7513 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7514 > > inl ticks (date_time : date_time) : timestamp = +00:05:02 verbose #7515 > > date_time |> $'_.Ticks' +00:05:02 verbose #7516 > > +00:05:02 verbose #7517 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7518 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7519 > > │ ## format │ +00:05:02 verbose #7520 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7521 > > +00:05:02 verbose #7522 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7523 > > inl format (format : string) (date_time : date_time) : string = +00:05:02 verbose #7524 > > $'!date_time.ToString' format +00:05:02 verbose #7525 > > +00:05:02 verbose #7526 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7527 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7528 > > │ ## format_iso8601 │ +00:05:02 verbose #7529 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7530 > > +00:05:02 verbose #7531 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7532 > > inl format_iso8601 (date_time : date_time) = +00:05:02 verbose #7533 > > date_time |> format "yyyy-MM-ddTHH-mm-ss.fff" +00:05:02 verbose #7534 > > +00:05:02 verbose #7535 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7536 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7537 > > │ ## format' │ +00:05:02 verbose #7538 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7539 > > +00:05:02 verbose #7540 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7541 > > inl format' (format : string) (date_time : date_time' utc) : sm'.std_string = +00:05:02 verbose #7542 > > inl format = #format +00:05:02 verbose #7543 > > inl date_time = join date_time +00:05:02 verbose #7544 > > !\($'"!date_time.format(!format).to_string()"') +00:05:02 verbose #7545 > > +00:05:02 verbose #7546 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7547 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7548 > > │ ## format'' │ +00:05:02 verbose #7549 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7550 > > +00:05:02 verbose #7551 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7552 > > inl format'' (format : string) (date_time : date_time' _) : sm'.std_string = +00:05:02 verbose #7553 > > inl format = #format +00:05:02 verbose #7554 > > inl date_time = join date_time +00:05:02 verbose #7555 > > !\($'"!date_time.format(!format).to_string()"') +00:05:02 verbose #7556 > > +00:05:02 verbose #7557 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7558 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7559 > > │ ## format_timestamp │ +00:05:02 verbose #7560 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7561 > > +00:05:02 verbose #7562 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7563 > > inl format_timestamp forall t {number; int}. (timestamp : t) = +00:05:02 verbose #7564 > > inl timestamp = join timestamp +00:05:02 verbose #7565 > > (timestamp / 1000) +00:05:02 verbose #7566 > > |> from_timestamp_micros +00:05:02 verbose #7567 > > |> optionm.map fun x => +00:05:02 verbose #7568 > > x +00:05:02 verbose #7569 > > |> to_local +00:05:02 verbose #7570 > > |> format'' "%Y-%m-%d %H:%M:%S" +00:05:02 verbose #7571 > > |> sm'.from_std_string +00:05:02 verbose #7572 > > |> resultm.from_option +00:05:02 verbose #7573 > > +00:05:02 verbose #7574 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7575 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7576 > > │ ## duration_from_millis │ +00:05:02 verbose #7577 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7578 > > +00:05:02 verbose #7579 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7580 > > inl duration_from_millis (ms : u64) : duration = +00:05:02 verbose #7581 > > inl ms = join ms +00:05:02 verbose #7582 > > !\($'"std::time::Duration::from_millis(!ms)"') +00:05:02 verbose #7583 > > +00:05:02 verbose #7584 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7585 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7586 > > │ ## min_value │ +00:05:02 verbose #7587 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7588 > > +00:05:02 verbose #7589 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7590 > > inl min_value () : date_time = +00:05:02 verbose #7591 > > $'System.DateTime.MinValue' +00:05:02 verbose #7592 > > +00:05:02 verbose #7593 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7594 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7595 > > │ ## max_value │ +00:05:02 verbose #7596 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7597 > > +00:05:02 verbose #7598 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7599 > > inl max_value () : date_time = +00:05:02 verbose #7600 > > $'System.DateTime.MaxValue' +00:05:02 verbose #7601 > > +00:05:02 verbose #7602 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7603 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7604 > > │ ## unix_epoch │ +00:05:02 verbose #7605 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7606 > > +00:05:02 verbose #7607 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7608 > > inl unix_epoch () : date_time = +00:05:02 verbose #7609 > > $'System.DateTime.UnixEpoch' +00:05:02 verbose #7610 > > +00:05:02 verbose #7611 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7612 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7613 > > │ ## to_universal_time │ +00:05:02 verbose #7614 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7615 > > +00:05:02 verbose #7616 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7617 > > inl to_universal_time (date_time : date_time) : date_time = +00:05:02 verbose #7618 > > date_time |> $'_.ToUniversalTime()' +00:05:02 verbose #7619 > > +00:05:02 verbose #7620 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7621 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7622 > > │ ## date_time_kind │ +00:05:02 verbose #7623 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7624 > > +00:05:02 verbose #7625 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7626 > > union date_time_kind = +00:05:02 verbose #7627 > > | Unspecified +00:05:02 verbose #7628 > > | Utc +00:05:02 verbose #7629 > > | Local +00:05:02 verbose #7630 > > +00:05:02 verbose #7631 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7632 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7633 > > │ ## specify_date_kind │ +00:05:02 verbose #7634 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7635 > > +00:05:02 verbose #7636 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7637 > > inl specify_date_kind (kind : date_time_kind) (date_time : date_time) : +00:05:02 verbose #7638 > > date_time = +00:05:02 verbose #7639 > > inl kind : $'System.DateTimeKind' = +00:05:02 verbose #7640 > > match kind with +00:05:02 verbose #7641 > > | Unspecified => $'System.DateTimeKind.Unspecified' +00:05:02 verbose #7642 > > | Utc => $'System.DateTimeKind.Utc' +00:05:02 verbose #7643 > > | Local => $'System.DateTimeKind.Local' +00:05:02 verbose #7644 > > $'System.DateTime.SpecifyKind (!date_time, !kind)' +00:05:02 verbose #7645 > > +00:05:02 verbose #7646 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7647 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7648 > > │ ## time_span │ +00:05:02 verbose #7649 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7650 > > +00:05:02 verbose #7651 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7652 > > nominal time_span = $'System.TimeSpan' +00:05:02 verbose #7653 > > +00:05:02 verbose #7654 > > inl time_span x : time_span = +00:05:02 verbose #7655 > > $'`time_span !x ' +00:05:02 verbose #7656 > > +00:05:02 verbose #7657 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:02 verbose #7658 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:02 verbose #7659 > > │ ## new_time_span │ +00:05:02 verbose #7660 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:02 verbose #7661 > > +00:05:02 verbose #7662 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:02 verbose #7663 > > inl new_time_span (a : date_time) (b : date_time) : time_span = +00:05:02 verbose #7664 > > $'!b - !a ' +00:05:03 verbose #7665 > > +00:05:03 verbose #7666 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7667 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7668 > > │ ## time_span_format │ +00:05:03 verbose #7669 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7670 > > +00:05:03 verbose #7671 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7672 > > inl time_span_format (format : string) (time_span : time_span) : string = +00:05:03 verbose #7673 > > $'!time_span.ToString' format +00:05:03 verbose #7674 > > +00:05:03 verbose #7675 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7676 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7677 > > │ ## hours │ +00:05:03 verbose #7678 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7679 > > +00:05:03 verbose #7680 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7681 > > inl hours (time_span : time_span) : i32 = +00:05:03 verbose #7682 > > time_span |> $'_.Hours' +00:05:03 verbose #7683 > > +00:05:03 verbose #7684 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7685 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7686 > > │ ## milliseconds │ +00:05:03 verbose #7687 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7688 > > +00:05:03 verbose #7689 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7690 > > inl milliseconds (time_span : time_span) : i32 = +00:05:03 verbose #7691 > > time_span |> $'_.Milliseconds' +00:05:03 verbose #7692 > > +00:05:03 verbose #7693 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7694 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7695 > > │ ## minutes │ +00:05:03 verbose #7696 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7697 > > +00:05:03 verbose #7698 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7699 > > inl minutes (time_span : time_span) : i32 = +00:05:03 verbose #7700 > > time_span |> $'_.Minutes' +00:05:03 verbose #7701 > > +00:05:03 verbose #7702 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7703 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7704 > > │ ## seconds │ +00:05:03 verbose #7705 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7706 > > +00:05:03 verbose #7707 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7708 > > inl seconds (time_span : time_span) : i32 = +00:05:03 verbose #7709 > > time_span |> $'_.Seconds' +00:05:03 verbose #7710 > > +00:05:03 verbose #7711 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7712 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7713 > > │ ## total_seconds │ +00:05:03 verbose #7714 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7715 > > +00:05:03 verbose #7716 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7717 > > inl total_seconds (time_span : time_span) : f64 = +00:05:03 verbose #7718 > > time_span |> $'_.TotalSeconds' +00:05:03 verbose #7719 > > +00:05:03 verbose #7720 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7721 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7722 > > │ ## time_zone_info │ +00:05:03 verbose #7723 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7724 > > +00:05:03 verbose #7725 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7726 > > nominal time_zone_info = $'System.TimeZoneInfo' +00:05:03 verbose #7727 > > +00:05:03 verbose #7728 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7729 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7730 > > │ ## time_zone_local │ +00:05:03 verbose #7731 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7732 > > +00:05:03 verbose #7733 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7734 > > inl time_zone_local () : time_zone_info = +00:05:03 verbose #7735 > > run_target function +00:05:03 verbose #7736 > > | Fsharp (Native) => fun () => +00:05:03 verbose #7737 > > $'System.TimeZoneInfo.Local' +00:05:03 verbose #7738 > > | Rust (Native) => fun () => +00:05:03 verbose #7739 > > open rust_operators +00:05:03 verbose #7740 > > !\($'"0i64.into()"') +00:05:03 verbose #7741 > > | _ => fun () => null () +00:05:03 verbose #7742 > > +00:05:03 verbose #7743 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7744 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7745 > > │ ## get_utc_offset │ +00:05:03 verbose #7746 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7747 > > +00:05:03 verbose #7748 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7749 > > inl get_utc_offset (time_zone_info : time_zone_info) (date_time : date_time) : +00:05:03 verbose #7750 > > time_span = +00:05:03 verbose #7751 > > run_target function +00:05:03 verbose #7752 > > | Fsharp (Native) => fun () => +00:05:03 verbose #7753 > > date_time |> $'_.GetUtcOffset' (time_zone_local ()) +00:05:03 verbose #7754 > > | _ => fun () => +00:05:03 verbose #7755 > > time_span () +00:05:03 verbose #7756 > > +00:05:03 verbose #7757 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7758 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7759 > > │ ## add_days │ +00:05:03 verbose #7760 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7761 > > +00:05:03 verbose #7762 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7763 > > inl add_days (days : i32) (date_time : date_time) : date_time = +00:05:03 verbose #7764 > > $'!date_time.AddDays' days +00:05:03 verbose #7765 > > +00:05:03 verbose #7766 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7767 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7768 > > │ ## now │ +00:05:03 verbose #7769 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7770 > > +00:05:03 verbose #7771 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7772 > > inl now () : date_time = +00:05:03 verbose #7773 > > $'System.DateTime.Now' +00:05:03 verbose #7774 > > +00:05:03 verbose #7775 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7776 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7777 > > │ ## utc_now │ +00:05:03 verbose #7778 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7779 > > +00:05:03 verbose #7780 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7781 > > inl utc_now () : date_time = +00:05:03 verbose #7782 > > $'System.DateTime.UtcNow' +00:05:03 verbose #7783 > > +00:05:03 verbose #7784 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7785 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7786 > > │ ## timestamp_guid │ +00:05:03 verbose #7787 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7788 > > +00:05:03 verbose #7789 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7790 > > type timestamp_guid = guid.guid +00:05:03 verbose #7791 > > +00:05:03 verbose #7792 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7793 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7794 > > │ ## date_time_guid │ +00:05:03 verbose #7795 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7796 > > +00:05:03 verbose #7797 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7798 > > type date_time_guid = guid.guid +00:05:03 verbose #7799 > > +00:05:03 verbose #7800 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7801 > > //// test +00:05:03 verbose #7802 > > +00:05:03 verbose #7803 > > inl test_guid () = +00:05:03 verbose #7804 > > guid.new_guid "FEDCBA98-7654-3210-FEDC-BA9876543210" +00:05:03 verbose #7805 > > +00:05:03 verbose #7806 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:03 verbose #7807 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:03 verbose #7808 > > │ ## date_time_guid_from_date_time │ +00:05:03 verbose #7809 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:03 verbose #7810 > > +00:05:03 verbose #7811 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7812 > > let date_time_guid_from_date_time (guid : guid.guid) (date_time : date_time) = +00:05:03 verbose #7813 > > inl parse prefix time_zone : date_time_guid = +00:05:03 verbose #7814 > > inl guid = guid |> sm'.obj_to_string +00:05:03 verbose #7815 > > $'`date_time_guid $"{!prefix}{!time_zone}{!guid.[[!prefix.Length + +00:05:03 verbose #7816 > > !time_zone.Length..]]}"' +00:05:03 verbose #7817 > > run_target function +00:05:03 verbose #7818 > > | Fsharp (Native) => fun () => +00:05:03 verbose #7819 > > inl prefix = date_time |> format (join "yyyyMMdd-HHmm-ssff-ffff-f") +00:05:03 verbose #7820 > > inl time_zone = date_time |> get_utc_offset (time_zone_local ()) +00:05:03 verbose #7821 > > inl time_zone_signal = (hours time_zone > 0) |> convert_i32 +00:05:03 verbose #7822 > > inl time_zone_value = time_zone |> time_span_format (join "hhmm") +00:05:03 verbose #7823 > > inl time_zone = $'$"{!time_zone_signal}{!time_zone_value}"' : string +00:05:03 verbose #7824 > > parse prefix time_zone +00:05:03 verbose #7825 > > | Rust (Native) => fun () => +00:05:03 verbose #7826 > > inl epoch = +00:05:03 verbose #7827 > > date_time_utc 1970 1 1 0 0 0 +00:05:03 verbose #7828 > > |> to_universal_time +00:05:03 verbose #7829 > > inl date_time = +00:05:03 verbose #7830 > > date_time +00:05:03 verbose #7831 > > |> specify_date_kind Local +00:05:03 verbose #7832 > > |> to_universal_time +00:05:03 verbose #7833 > > inl unixticks = +00:05:03 verbose #7834 > > match date_time |> ticks, epoch |> ticks with +00:05:03 verbose #7835 > > | timestamp date_time, timestamp epoch => date_time - epoch +00:05:03 verbose #7836 > > inl prefix = +00:05:03 verbose #7837 > > unixticks / 10 +00:05:03 verbose #7838 > > |> from_timestamp_micros +00:05:03 verbose #7839 > > |> optionm.map ( +00:05:03 verbose #7840 > > to_local +00:05:03 verbose #7841 > > >> format'' "%Y%m%d-%H%M-%S%f" +00:05:03 verbose #7842 > > >> sm'.from_std_string +00:05:03 verbose #7843 > > >> fun s => $'$"{!s.[[0..17]]}-{!s.[[18..21]]}-{!s.[[22]]}"' +00:05:03 verbose #7844 > > ) +00:05:03 verbose #7845 > > |> optionm'.default_value "" +00:05:03 verbose #7846 > > inl time_zone = date_time |> get_utc_offset (time_zone_local ()) +00:05:03 verbose #7847 > > inl time_zone_signal = if hours time_zone > 0 then 1u8 else 0 +00:05:03 verbose #7848 > > inl time_zone_value = time_zone |> time_span_format "hh:mm" +00:05:03 verbose #7849 > > inl time_zone = +00:05:03 verbose #7850 > > $'$"{!time_zone_signal}{!time_zone_value.[[0..1]]}{!time_zone_value.[[3..4]]}"' +00:05:03 verbose #7851 > > : string +00:05:03 verbose #7852 > > parse prefix time_zone +00:05:03 verbose #7853 > > | _ => fun () => null () +00:05:03 verbose #7854 > > +00:05:03 verbose #7855 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:03 verbose #7856 > > //// test +00:05:03 verbose #7857 > > +00:05:03 verbose #7858 > > types () +00:05:03 verbose #7859 > > now () |> to_universal_time |> date_time_guid_from_date_time (test_guid ()) |> +00:05:03 verbose #7860 > > sm'.obj_to_string +00:05:03 verbose #7861 > > |> console.write_line +00:05:04 verbose #7862 > > +00:05:04 verbose #7863 > > ╭─[ 1.38s - stdout ]───────────────────────────────────────────────────────────╮ +00:05:04 verbose #7864 > > │ 20240520-0843-1356-5678-500400543210 │ +00:05:04 verbose #7865 > > │ │ +00:05:04 verbose #7866 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:04 verbose #7867 > > +00:05:04 verbose #7868 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:04 verbose #7869 > > //// test +00:05:04 verbose #7870 > > ///! rust -d chrono +00:05:04 verbose #7871 > > +00:05:04 verbose #7872 > > types () +00:05:04 verbose #7873 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x +00:05:04 verbose #7874 > > - 6i32) (am'.End id) +00:05:04 verbose #7875 > > now () +00:05:04 verbose #7876 > > |> to_universal_time +00:05:04 verbose #7877 > > |> date_time_guid_from_date_time (test_guid ()) +00:05:04 verbose #7878 > > |> sm'.obj_to_string +00:05:04 verbose #7879 > > |> fun s => s |> _assert_eq' $'$"{!s.[[0..29]]}{!suffix}"' +00:05:09 verbose #7880 > > +00:05:09 verbose #7881 > > ╭─[ 4.55s - return value ]─────────────────────────────────────────────────────╮ +00:05:09 verbose #7882 > > │ assert_eq' / actual: "20240520-0843-1792-5605-000000543210" / expected: │ +00:05:09 verbose #7883 > > │ "20240520-0843-1792-5605-000000543210" │ +00:05:09 verbose #7884 > > │ │ +00:05:09 verbose #7885 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:09 verbose #7886 > > +00:05:09 verbose #7887 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:09 verbose #7888 > > //// test +00:05:09 verbose #7889 > > +00:05:09 verbose #7890 > > types () +00:05:09 verbose #7891 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x +00:05:09 verbose #7892 > > - 6i32) (am'.End id) +00:05:09 verbose #7893 > > min_value () +00:05:09 verbose #7894 > > |> specify_date_kind Local +00:05:09 verbose #7895 > > |> date_time_guid_from_date_time (test_guid ()) +00:05:09 verbose #7896 > > |> sm'.obj_to_string +00:05:09 verbose #7897 > > |> fun s => s |> _assert_eq' +00:05:09 verbose #7898 > > $'$"00010101-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' +00:05:09 verbose #7899 > > +00:05:09 verbose #7900 > > ╭─[ 250.52ms - stdout ]────────────────────────────────────────────────────────╮ +00:05:09 verbose #7901 > > │ assert_eq' / actual: "00010101-0000-0000-0000-000400543210" / expected: │ +00:05:09 verbose #7902 > > │ "00010101-0000-0000-0000-000400543210" │ +00:05:09 verbose #7903 > > │ │ +00:05:09 verbose #7904 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:09 verbose #7905 > > +00:05:09 verbose #7906 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:09 verbose #7907 > > //// test +00:05:09 verbose #7908 > > ///! rust -d chrono +00:05:09 verbose #7909 > > +00:05:09 verbose #7910 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x +00:05:09 verbose #7911 > > - 6i32) (am'.End id) +00:05:09 verbose #7912 > > types () +00:05:09 verbose #7913 > > min_value () +00:05:09 verbose #7914 > > |> specify_date_kind Local +00:05:09 verbose #7915 > > |> date_time_guid_from_date_time (test_guid ()) +00:05:09 verbose #7916 > > |> sm'.obj_to_string +00:05:09 verbose #7917 > > |> fun s => s |> _assert_eq' +00:05:09 verbose #7918 > > $'$"00010101-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' +00:05:13 verbose #7919 > > +00:05:13 verbose #7920 > > ╭─[ 4.33s - return value ]─────────────────────────────────────────────────────╮ +00:05:13 verbose #7921 > > │ assert_eq' / actual: "00010101-0000-0000-0000-000000543210" / expected: │ +00:05:13 verbose #7922 > > │ "00010101-0000-0000-0000-000000543210" │ +00:05:13 verbose #7923 > > │ │ +00:05:13 verbose #7924 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:13 verbose #7925 > > +00:05:13 verbose #7926 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:13 verbose #7927 > > //// test +00:05:13 verbose #7928 > > +00:05:13 verbose #7929 > > types () +00:05:13 verbose #7930 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x +00:05:13 verbose #7931 > > - 6i32) (am'.End id) +00:05:13 verbose #7932 > > max_value () +00:05:13 verbose #7933 > > |> specify_date_kind Utc +00:05:13 verbose #7934 > > |> add_days -1 +00:05:13 verbose #7935 > > |> date_time_guid_from_date_time (test_guid ()) +00:05:13 verbose #7936 > > |> sm'.obj_to_string +00:05:13 verbose #7937 > > |> fun s => s |> _assert_eq +00:05:13 verbose #7938 > > $'$"99991230-2359-5999-9999-9{!s.[[25..29]]}{!suffix}"' +00:05:13 verbose #7939 > > +00:05:13 verbose #7940 > > ╭─[ 159.80ms - stdout ]────────────────────────────────────────────────────────╮ +00:05:13 verbose #7941 > > │ assert_eq / actual: "99991230-2359-5999-9999-900400543210" / expected: │ +00:05:13 verbose #7942 > > │ "99991230-2359-5999-9999-900400543210" │ +00:05:13 verbose #7943 > > │ │ +00:05:13 verbose #7944 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:13 verbose #7945 > > +00:05:13 verbose #7946 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:13 verbose #7947 > > //// test +00:05:13 verbose #7948 > > ///! rust -d chrono +00:05:13 verbose #7949 > > +00:05:13 verbose #7950 > > types () +00:05:13 verbose #7951 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x +00:05:13 verbose #7952 > > - 6i32) (am'.End id) +00:05:13 verbose #7953 > > max_value () +00:05:13 verbose #7954 > > |> specify_date_kind Utc +00:05:13 verbose #7955 > > |> add_days -1 +00:05:13 verbose #7956 > > |> date_time_guid_from_date_time (test_guid ()) +00:05:13 verbose #7957 > > |> sm'.obj_to_string +00:05:13 verbose #7958 > > |> fun s => s |> _assert_eq +00:05:13 verbose #7959 > > $'$"99991230-2359-5999-9999-0{!s.[[25..29]]}{!suffix}"' +00:05:18 verbose #7960 > > +00:05:18 verbose #7961 > > ╭─[ 4.23s - return value ]─────────────────────────────────────────────────────╮ +00:05:18 verbose #7962 > > │ assert_eq / actual: "99991230-2359-5999-9999-000000543210" / expected: │ +00:05:18 verbose #7963 > > │ "99991230-2359-5999-9999-000000543210" │ +00:05:18 verbose #7964 > > │ │ +00:05:18 verbose #7965 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:18 verbose #7966 > > +00:05:18 verbose #7967 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:18 verbose #7968 > > //// test +00:05:18 verbose #7969 > > +00:05:18 verbose #7970 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x +00:05:18 verbose #7971 > > - 6i32) (am'.End id) +00:05:18 verbose #7972 > > unix_epoch () +00:05:18 verbose #7973 > > |> specify_date_kind Utc +00:05:18 verbose #7974 > > |> add_days 1 +00:05:18 verbose #7975 > > |> date_time_guid_from_date_time (test_guid ()) +00:05:18 verbose #7976 > > |> sm'.obj_to_string +00:05:18 verbose #7977 > > |> fun s => s |> _assert_eq +00:05:18 verbose #7978 > > $'$"19700102-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' +00:05:18 verbose #7979 > > +00:05:18 verbose #7980 > > ╭─[ 85.20ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:18 verbose #7981 > > │ assert_eq / actual: "19700102-0000-0000-0000-000400543210" / expected: │ +00:05:18 verbose #7982 > > │ "19700102-0000-0000-0000-000400543210" │ +00:05:18 verbose #7983 > > │ │ +00:05:18 verbose #7984 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:18 verbose #7985 > > +00:05:18 verbose #7986 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:18 verbose #7987 > > //// test +00:05:18 verbose #7988 > > ///! rust -d chrono +00:05:18 verbose #7989 > > +00:05:18 verbose #7990 > > types () +00:05:18 verbose #7991 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x +00:05:18 verbose #7992 > > - 6i32) (am'.End id) +00:05:18 verbose #7993 > > unix_epoch () +00:05:18 verbose #7994 > > |> specify_date_kind Utc +00:05:18 verbose #7995 > > |> add_days 1 +00:05:18 verbose #7996 > > |> date_time_guid_from_date_time (test_guid ()) +00:05:18 verbose #7997 > > |> sm'.obj_to_string +00:05:18 verbose #7998 > > |> fun s => s |> _assert_eq +00:05:18 verbose #7999 > > $'$"19700102-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' +00:05:22 verbose #8000 > > +00:05:22 verbose #8001 > > ╭─[ 3.97s - return value ]─────────────────────────────────────────────────────╮ +00:05:22 verbose #8002 > > │ assert_eq / actual: "19700102-0000-0000-0000-000000543210" / expected: │ +00:05:22 verbose #8003 > > │ "19700102-0000-0000-0000-000000543210" │ +00:05:22 verbose #8004 > > │ │ +00:05:22 verbose #8005 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8006 > > +00:05:22 verbose #8007 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:22 verbose #8008 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:22 verbose #8009 > > │ ## date_time_from_guid │ +00:05:22 verbose #8010 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8011 > > +00:05:22 verbose #8012 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8013 > > inl date_time_from_guid (date_time_guid : date_time_guid) = +00:05:22 verbose #8014 > > inl date_time_guid = date_time_guid |> sm'.obj_to_string +00:05:22 verbose #8015 > > inl sm'_replace = join sm'.replace +00:05:22 verbose #8016 > > run_target function +00:05:22 verbose #8017 > > | Rust _ => fun () => +00:05:22 verbose #8018 > > $'System.DateTime.Parse (!date_time_guid.[[..24]] |> !sm'_replace +00:05:22 verbose #8019 > > "-" "")' : date_time +00:05:22 verbose #8020 > > | _ => fun () => $'System.DateTime.ParseExact (!date_time_guid.[[..24]] +00:05:22 verbose #8021 > > |> !sm'_replace "-" "", "yyyyMMddHHmmssfffffff", null)' : date_time +00:05:22 verbose #8022 > > +00:05:22 verbose #8023 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8024 > > //// test +00:05:22 verbose #8025 > > +00:05:22 verbose #8026 > > date_time_from_guid (guid.new_guid "00010101-0000-0000-0000-0a9876543210") +00:05:22 verbose #8027 > > |> _assert_eq' (min_value ()) +00:05:22 verbose #8028 > > +00:05:22 verbose #8029 > > ╭─[ 47.06ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:22 verbose #8030 > > │ assert_eq' / actual: 0001-01-01 12:00:00 AM / expected: 0001-01-01 12:00:00 │ +00:05:22 verbose #8031 > > │ AM │ +00:05:22 verbose #8032 > > │ │ +00:05:22 verbose #8033 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8034 > > +00:05:22 verbose #8035 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8036 > > //// test +00:05:22 verbose #8037 > > +00:05:22 verbose #8038 > > date_time_from_guid (guid.new_guid $'$"99991231-2359-5999-9999-9{(!test_guid () +00:05:22 verbose #8039 > > |> string).[[^10..]]}"') +00:05:22 verbose #8040 > > |> _assert_eq' (max_value ()) +00:05:22 verbose #8041 > > +00:05:22 verbose #8042 > > ╭─[ 39.16ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:22 verbose #8043 > > │ assert_eq' / actual: 9999-12-31 11:59:59 PM / expected: 9999-12-31 11:59:59 │ +00:05:22 verbose #8044 > > │ PM │ +00:05:22 verbose #8045 > > │ │ +00:05:22 verbose #8046 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8047 > > +00:05:22 verbose #8048 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8049 > > //// test +00:05:22 verbose #8050 > > +00:05:22 verbose #8051 > > date_time_from_guid (guid.new_guid $'$"19700101-0000-0000-0000-0{(!test_guid () +00:05:22 verbose #8052 > > |> string).[[^10..]]}"') +00:05:22 verbose #8053 > > |> _assert_eq' $'System.DateTime.UnixEpoch' +00:05:22 verbose #8054 > > +00:05:22 verbose #8055 > > ╭─[ 32.94ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:22 verbose #8056 > > │ assert_eq' / actual: 1970-01-01 12:00:00 AM / expected: 1970-01-01 12:00:00 │ +00:05:22 verbose #8057 > > │ AM │ +00:05:22 verbose #8058 > > │ │ +00:05:22 verbose #8059 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8060 > > +00:05:22 verbose #8061 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:22 verbose #8062 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:22 verbose #8063 > > │ ## timestamp_guid_from_timestamp │ +00:05:22 verbose #8064 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8065 > > +00:05:22 verbose #8066 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8067 > > inl timestamp_guid_from_timestamp (guid : guid.guid) (timestamp : timestamp) : +00:05:22 verbose #8068 > > timestamp_guid = +00:05:22 verbose #8069 > > inl guid = guid |> sm'.obj_to_string +00:05:22 verbose #8070 > > inl timestamp = timestamp |> sm'.obj_to_string |> sm'.pad_left 18i32 '0' +00:05:22 verbose #8071 > > $'`timestamp_guid +00:05:22 verbose #8072 > > $"{!timestamp.[[0..7]]}-{!timestamp.[[8..11]]}-{!timestamp.[[12..15]]}-{!timesta +00:05:22 verbose #8073 > > mp.[[16..17]]}{!guid.[[21..]]}"' +00:05:22 verbose #8074 > > +00:05:22 verbose #8075 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8076 > > //// test +00:05:22 verbose #8077 > > +00:05:22 verbose #8078 > > timestamp_guid_from_timestamp (test_guid ()) (timestamp 0i64) +00:05:22 verbose #8079 > > |> _assert_eq' (guid.new_guid "00000000-0000-0000-00dc-ba9876543210") +00:05:22 verbose #8080 > > +00:05:22 verbose #8081 > > ╭─[ 25.18ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:22 verbose #8082 > > │ assert_eq' / actual: 00000000-0000-0000-00dc-ba9876543210 / expected: │ +00:05:22 verbose #8083 > > │ 00000000-0000-0000-00dc-ba9876543210 │ +00:05:22 verbose #8084 > > │ │ +00:05:22 verbose #8085 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8086 > > +00:05:22 verbose #8087 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8088 > > //// test +00:05:22 verbose #8089 > > +00:05:22 verbose #8090 > > timestamp_guid_from_timestamp (test_guid ()) (timestamp 999999999999999999i64) +00:05:22 verbose #8091 > > |> _assert_eq' (guid.new_guid $'$"99999999-9999-9999-99dc-b{(!test_guid () |> +00:05:22 verbose #8092 > > string).[[^10..]]}"') +00:05:22 verbose #8093 > > +00:05:22 verbose #8094 > > ╭─[ 34.82ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:22 verbose #8095 > > │ assert_eq' / actual: 99999999-9999-9999-99dc-ba9876543210 / expected: │ +00:05:22 verbose #8096 > > │ 99999999-9999-9999-99dc-ba9876543210 │ +00:05:22 verbose #8097 > > │ │ +00:05:22 verbose #8098 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8099 > > +00:05:22 verbose #8100 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:22 verbose #8101 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:22 verbose #8102 > > │ ## timestamp_from_guid │ +00:05:22 verbose #8103 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8104 > > +00:05:22 verbose #8105 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8106 > > inl timestamp_from_guid (guid : date_time_guid) : timestamp = +00:05:22 verbose #8107 > > inl guid = guid |> sm'.obj_to_string +00:05:22 verbose #8108 > > $'`i64 +00:05:22 verbose #8109 > > $"{!guid.[[0..7]]}{!guid.[[9..12]]}{!guid.[[14..17]]}{!guid.[[19..20]]}"' +00:05:22 verbose #8110 > > +00:05:22 verbose #8111 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8112 > > //// test +00:05:22 verbose #8113 > > +00:05:22 verbose #8114 > > timestamp_from_guid (guid.new_guid "00000000-0000-0000-00dc-ba9876543210") +00:05:22 verbose #8115 > > |> _assert_eq (timestamp 0) +00:05:22 verbose #8116 > > +00:05:22 verbose #8117 > > ╭─[ 21.82ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:22 verbose #8118 > > │ assert_eq / actual: 0L / expected: 0L │ +00:05:22 verbose #8119 > > │ │ +00:05:22 verbose #8120 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8121 > > +00:05:22 verbose #8122 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8123 > > //// test +00:05:22 verbose #8124 > > +00:05:22 verbose #8125 > > timestamp_from_guid (guid.new_guid $'$"99999999-9999-9999-99{(!test_guid () |> +00:05:22 verbose #8126 > > string).[[^14..]]}"') +00:05:22 verbose #8127 > > |> _assert_eq (timestamp 999999999999999999) +00:05:22 verbose #8128 > > +00:05:22 verbose #8129 > > ╭─[ 36.39ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:22 verbose #8130 > > │ assert_eq / actual: 999999999999999999L / expected: 999999999999999999L │ +00:05:22 verbose #8131 > > │ │ +00:05:22 verbose #8132 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8133 > > +00:05:22 verbose #8134 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:22 verbose #8135 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:22 verbose #8136 > > │ ## new_guid_from_date_time │ +00:05:22 verbose #8137 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8138 > > +00:05:22 verbose #8139 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8140 > > inl new_guid_from_date_time (date_time : date_time) = +00:05:22 verbose #8141 > > inl guid = guid.new_raw_guid () +00:05:22 verbose #8142 > > date_time_guid_from_date_time guid date_time +00:05:22 verbose #8143 > > +00:05:22 verbose #8144 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8145 > > //// test +00:05:22 verbose #8146 > > +00:05:22 verbose #8147 > > utc_now () +00:05:22 verbose #8148 > > |> new_guid_from_date_time +00:05:22 verbose #8149 > > |> date_time_from_guid +00:05:22 verbose #8150 > > |> fun date_time => new_time_span date_time (utc_now ()) |> total_seconds |> i32 +00:05:22 verbose #8151 > > |> _assert_eq 0 +00:05:22 verbose #8152 > > +00:05:22 verbose #8153 > > ╭─[ 92.34ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:22 verbose #8154 > > │ assert_eq / actual: 0 / expected: 0 │ +00:05:22 verbose #8155 > > │ │ +00:05:22 verbose #8156 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8157 > > +00:05:22 verbose #8158 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:22 verbose #8159 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:22 verbose #8160 > > │ ## new_guid_from_timestamp │ +00:05:22 verbose #8161 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8162 > > +00:05:22 verbose #8163 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8164 > > inl new_guid_from_timestamp (timestamp : timestamp) = +00:05:22 verbose #8165 > > inl guid = guid.new_raw_guid () +00:05:22 verbose #8166 > > timestamp_guid_from_timestamp guid timestamp +00:05:22 verbose #8167 > > +00:05:22 verbose #8168 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8169 > > //// test +00:05:22 verbose #8170 > > +00:05:22 verbose #8171 > > utc_now () +00:05:22 verbose #8172 > > |> ticks +00:05:22 verbose #8173 > > |> new_guid_from_timestamp +00:05:22 verbose #8174 > > |> timestamp_from_guid +00:05:22 verbose #8175 > > |> fun (timestamp timestamp) => (timestamp - (utc_now () |> ticks |> fun +00:05:22 verbose #8176 > > (timestamp x) => x)) / 100000i64 +00:05:22 verbose #8177 > > |> _assert_eq 0i64 +00:05:22 verbose #8178 > > +00:05:22 verbose #8179 > > ╭─[ 36.85ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:22 verbose #8180 > > │ assert_eq / actual: 0L / expected: 0L │ +00:05:22 verbose #8181 > > │ │ +00:05:22 verbose #8182 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8183 > > +00:05:22 verbose #8184 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:22 verbose #8185 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:22 verbose #8186 > > │ ## main │ +00:05:22 verbose #8187 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:22 verbose #8188 > > +00:05:22 verbose #8189 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:22 verbose #8190 > > inl main () = +00:05:22 verbose #8191 > > types () +00:05:22 verbose #8192 > > $"let date_time_guid_from_date_time x = !date_time_guid_from_date_time x" : +00:05:22 verbose #8193 > > () +00:05:22 verbose #8194 > > $"let date_time_from_guid x = !date_time_from_guid x" : () +00:05:22 verbose #8195 > > $"let timestamp_guid_from_timestamp x = !timestamp_guid_from_timestamp x" : +00:05:22 verbose #8196 > > () +00:05:22 verbose #8197 > > $"let timestamp_from_guid x = !timestamp_from_guid x" : () +00:05:22 verbose #8198 > > $"let new_guid_from_date_time x = !new_guid_from_date_time x" : () +00:05:22 verbose #8199 > > $"let new_guid_from_timestamp x = !new_guid_from_timestamp x" : () +00:05:22 verbose #8200 > > $"let format x = !format x" : () +00:05:22 verbose #8201 > > $"let format_iso8601 x = !format_iso8601 x" : () +00:05:22 verbose #8202 > 00:00:26 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 39360 +00:05:22 verbose #8203 > 00:00:26 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:05:25 verbose #8204 > 00:00:28 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb to html +00:05:25 verbose #8205 > 00:00:28 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:05:25 verbose #8206 > 00:00:28 verbose #7 ! validate(nb) +00:05:26 verbose #8207 > 00:00:30 verbose #8 ! [NbConvertApp] Writing 388206 bytes to c:\home\git\polyglot\lib\spiral\date_time.dib.html +00:05:27 verbose #8208 > 00:00:30 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 649 +00:05:27 verbose #8209 > 00:00:30 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 649 +00:05:27 verbose #8210 > 00:00:30 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/date_time.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/date_time.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:05:28 verbose #8211 > 00:00:31 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:05:28 verbose #8212 > 00:00:31 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:05:28 verbose #8213 > 00:00:31 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 40068 +00:05:28 debug #8214 execute_with_options_async / exit_code: 0 / output.Length: 43954 +00:05:28 debug #15 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path date_time.dib --retries 3 +00:05:28 debug #8215 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path math.dib --retries 3", [||], None, None, true, None) -00:11:53 verbose #8087 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "math.dib", "--retries", "3"]) -00:11:53 verbose #8088 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/math.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/math.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/math.dib" --output-path "c:/home/git/polyglot/lib/spiral/math.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:12:03 verbose #8089 > -00:12:03 verbose #8090 > ── markdown ──────────────────────────────────────────────────────────────────── -00:12:03 verbose #8091 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:12:03 verbose #8092 > │ # math │ -00:12:03 verbose #8093 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8094 > -00:12:03 verbose #8095 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8096 > //// test -00:12:03 verbose #8097 > -00:12:03 verbose #8098 > open testing -00:12:03 verbose #8099 > -00:12:03 verbose #8100 > ── spiral - import ───────────────────────────────────────────────────────────── -00:12:03 verbose #8101 > #r -00:12:03 verbose #8102 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:12:03 verbose #8103 > otNet.Interactive.Spiral.dll" -00:12:03 verbose #8104 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:12:03 verbose #8105 > #r -00:12:03 verbose #8106 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:12:03 verbose #8107 > otNet.Interactive.dll" -00:12:03 verbose #8108 > open type Microsoft.DotNet.Interactive.Kernel -00:12:03 verbose #8109 > -00:12:03 verbose #8110 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8111 > //// test -00:12:03 verbose #8112 > -00:12:03 verbose #8113 > 2 * 2 / 0.4f64 |> sqrt -00:12:03 verbose #8114 > |> _assert_approx_eq None 3.1622776601683795 -00:12:03 verbose #8115 > -00:12:03 verbose #8116 > ╭─[ 726.86ms - stdout ]────────────────────────────────────────────────────────╮ -00:12:03 verbose #8117 > │ assert_approx_eq / actual: 3.16227766 / expected: 3.16227766 │ -00:12:03 verbose #8118 > │ │ -00:12:03 verbose #8119 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8120 > -00:12:03 verbose #8121 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8122 > //// test -00:12:03 verbose #8123 > -00:12:03 verbose #8124 > 2f64 / 3 -00:12:03 verbose #8125 > |> _assert_approx_eq None 0.6666666666666666 -00:12:03 verbose #8126 > -00:12:03 verbose #8127 > ╭─[ 40.99ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8128 > │ assert_approx_eq / actual: 0.6666666667 / expected: 0.6666666667 │ -00:12:03 verbose #8129 > │ │ -00:12:03 verbose #8130 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8131 > -00:12:03 verbose #8132 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8133 > //// test -00:12:03 verbose #8134 > -00:12:03 verbose #8135 > 2f64 |> log -00:12:03 verbose #8136 > |> _assert_approx_eq None 0.6931471805599453 -00:12:03 verbose #8137 > -00:12:03 verbose #8138 > ╭─[ 31.08ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8139 > │ assert_approx_eq / actual: 0.6931471806 / expected: 0.6931471806 │ -00:12:03 verbose #8140 > │ │ -00:12:03 verbose #8141 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8142 > -00:12:03 verbose #8143 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8144 > //// test -00:12:03 verbose #8145 > -00:12:03 verbose #8146 > pi -00:12:03 verbose #8147 > |> _assert_approx_eq None 3.141592653589793f64 -00:12:03 verbose #8148 > -00:12:03 verbose #8149 > ╭─[ 31.59ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8150 > │ assert_approx_eq / actual: 3.141592654 / expected: 3.141592654 │ -00:12:03 verbose #8151 > │ │ -00:12:03 verbose #8152 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8153 > -00:12:03 verbose #8154 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8155 > //// test -00:12:03 verbose #8156 > -00:12:03 verbose #8157 > pi |> cos -00:12:03 verbose #8158 > |> _assert_eq -1f64 -00:12:03 verbose #8159 > -00:12:03 verbose #8160 > ╭─[ 35.97ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8161 > │ assert_eq / actual: -1.0 / expected: -1.0 │ -00:12:03 verbose #8162 > │ │ -00:12:03 verbose #8163 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8164 > -00:12:03 verbose #8165 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8166 > //// test -00:12:03 verbose #8167 > -00:12:03 verbose #8168 > pi -00:12:03 verbose #8169 > |> cos -00:12:03 verbose #8170 > |> fun n => n / 2f64 -00:12:03 verbose #8171 > |> _assert_approx_eq None -0.5 -00:12:03 verbose #8172 > -00:12:03 verbose #8173 > ╭─[ 31.04ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8174 > │ assert_approx_eq / actual: -0.5 / expected: -0.5 │ -00:12:03 verbose #8175 > │ │ -00:12:03 verbose #8176 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8177 > -00:12:03 verbose #8178 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8179 > //// test -00:12:03 verbose #8180 > -00:12:03 verbose #8181 > pi / 2 |> cos -00:12:03 verbose #8182 > |> _assert_approx_eq None 0.00000000000000006123233995736766f64 -00:12:03 verbose #8183 > -00:12:03 verbose #8184 > ╭─[ 37.67ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8185 > │ assert_approx_eq / actual: 6.123233996e-17 / expected: 6.123233996e-17 │ -00:12:03 verbose #8186 > │ │ -00:12:03 verbose #8187 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8188 > -00:12:03 verbose #8189 > ── markdown ──────────────────────────────────────────────────────────────────── -00:12:03 verbose #8190 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:12:03 verbose #8191 > │ ## atan2 │ -00:12:03 verbose #8192 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8193 > -00:12:03 verbose #8194 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8195 > inl atan2 (y : f64) (x : f64) = -00:12:03 verbose #8196 > $"System.Math.Atan2 (!y, !x)" : f64 -00:12:03 verbose #8197 > -00:12:03 verbose #8198 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8199 > //// test -00:12:03 verbose #8200 > -00:12:03 verbose #8201 > 0 |> atan2 1 -00:12:03 verbose #8202 > |> _assert_eq 1.5707963267948966 -00:12:03 verbose #8203 > -00:12:03 verbose #8204 > ╭─[ 175.85ms - stdout ]────────────────────────────────────────────────────────╮ -00:12:03 verbose #8205 > │ assert_eq / actual: 1.570796327 / expected: 1.570796327 │ -00:12:03 verbose #8206 > │ │ -00:12:03 verbose #8207 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8208 > -00:12:03 verbose #8209 > ── markdown ──────────────────────────────────────────────────────────────────── -00:12:03 verbose #8210 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:12:03 verbose #8211 > │ ## e │ -00:12:03 verbose #8212 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8213 > -00:12:03 verbose #8214 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8215 > inl e () = -00:12:03 verbose #8216 > exp 1f64 -00:12:03 verbose #8217 > -00:12:03 verbose #8218 > ── markdown ──────────────────────────────────────────────────────────────────── -00:12:03 verbose #8219 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:12:03 verbose #8220 > │ ## floor │ -00:12:03 verbose #8221 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8222 > -00:12:03 verbose #8223 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8224 > inl floor forall t {float}. (n : t) : t = -00:12:03 verbose #8225 > n |> $'floor' -00:12:03 verbose #8226 > -00:12:03 verbose #8227 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8228 > //// test -00:12:03 verbose #8229 > -00:12:03 verbose #8230 > 0.6 |> floor -00:12:03 verbose #8231 > |> _assert_eq 0f64 -00:12:03 verbose #8232 > -00:12:03 verbose #8233 > ╭─[ 85.63ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8234 > │ assert_eq / actual: 0.0 / expected: 0.0 │ -00:12:03 verbose #8235 > │ │ -00:12:03 verbose #8236 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8237 > -00:12:03 verbose #8238 > ── markdown ──────────────────────────────────────────────────────────────────── -00:12:03 verbose #8239 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:12:03 verbose #8240 > │ ## ceil │ -00:12:03 verbose #8241 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8242 > -00:12:03 verbose #8243 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8244 > inl ceil forall t {float}. (n : t) : t = -00:12:03 verbose #8245 > n |> $'ceil' -00:12:03 verbose #8246 > -00:12:03 verbose #8247 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8248 > //// test -00:12:03 verbose #8249 > -00:12:03 verbose #8250 > 0.6 |> ceil -00:12:03 verbose #8251 > |> _assert_eq 1f64 -00:12:03 verbose #8252 > -00:12:03 verbose #8253 > ╭─[ 41.91ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8254 > │ assert_eq / actual: 1.0 / expected: 1.0 │ -00:12:03 verbose #8255 > │ │ -00:12:03 verbose #8256 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8257 > -00:12:03 verbose #8258 > ── markdown ──────────────────────────────────────────────────────────────────── -00:12:03 verbose #8259 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:12:03 verbose #8260 > │ ## round │ -00:12:03 verbose #8261 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8262 > -00:12:03 verbose #8263 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8264 > inl round forall t {float}. (n : t) : t = -00:12:03 verbose #8265 > n |> $'round' -00:12:03 verbose #8266 > -00:12:03 verbose #8267 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8268 > //// test -00:12:03 verbose #8269 > -00:12:03 verbose #8270 > 0.5 |> round -00:12:03 verbose #8271 > |> _assert_eq 0f64 -00:12:03 verbose #8272 > -00:12:03 verbose #8273 > 1.5 |> round -00:12:03 verbose #8274 > |> _assert_eq 2f64 -00:12:03 verbose #8275 > -00:12:03 verbose #8276 > 2.5 |> round -00:12:03 verbose #8277 > |> _assert_eq 2f64 -00:12:03 verbose #8278 > -00:12:03 verbose #8279 > 3.5 |> round -00:12:03 verbose #8280 > |> _assert_eq 4f64 -00:12:03 verbose #8281 > -00:12:03 verbose #8282 > ╭─[ 72.63ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8283 > │ assert_eq / actual: 0.0 / expected: 0.0 │ -00:12:03 verbose #8284 > │ assert_eq / actual: 2.0 / expected: 2.0 │ -00:12:03 verbose #8285 > │ assert_eq / actual: 2.0 / expected: 2.0 │ -00:12:03 verbose #8286 > │ assert_eq / actual: 4.0 / expected: 4.0 │ -00:12:03 verbose #8287 > │ │ -00:12:03 verbose #8288 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8289 > -00:12:03 verbose #8290 > ── markdown ──────────────────────────────────────────────────────────────────── -00:12:03 verbose #8291 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:12:03 verbose #8292 > │ ## log_base │ -00:12:03 verbose #8293 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8294 > -00:12:03 verbose #8295 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8296 > inl log_base (new_base : f64) (a : f64) = -00:12:03 verbose #8297 > $"System.Math.Log (!a, !new_base)" : f64 -00:12:03 verbose #8298 > -00:12:03 verbose #8299 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8300 > //// test -00:12:03 verbose #8301 > -00:12:03 verbose #8302 > 100 |> log_base 10 -00:12:03 verbose #8303 > |> _assert_eq 2 -00:12:03 verbose #8304 > -00:12:03 verbose #8305 > ╭─[ 44.04ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8306 > │ assert_eq / actual: 2.0 / expected: 2.0 │ -00:12:03 verbose #8307 > │ │ -00:12:03 verbose #8308 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8309 > -00:12:03 verbose #8310 > ── markdown ──────────────────────────────────────────────────────────────────── -00:12:03 verbose #8311 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:12:03 verbose #8312 > │ ## round │ -00:12:03 verbose #8313 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8314 > -00:12:03 verbose #8315 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8316 > inl round forall t {float}. (x : t) : t = -00:12:03 verbose #8317 > $"round !x" -00:12:03 verbose #8318 > -00:12:03 verbose #8319 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8320 > //// test -00:12:03 verbose #8321 > -00:12:03 verbose #8322 > 0.5 |> round -00:12:03 verbose #8323 > |> _assert_eq 0f64 -00:12:03 verbose #8324 > -00:12:03 verbose #8325 > ╭─[ 49.87ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8326 > │ assert_eq / actual: 0.0 / expected: 0.0 │ -00:12:03 verbose #8327 > │ │ -00:12:03 verbose #8328 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8329 > -00:12:03 verbose #8330 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8331 > //// test -00:12:03 verbose #8332 > -00:12:03 verbose #8333 > 0.6 |> round -00:12:03 verbose #8334 > |> _assert_eq 1f64 -00:12:03 verbose #8335 > -00:12:03 verbose #8336 > ╭─[ 35.93ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8337 > │ assert_eq / actual: 1.0 / expected: 1.0 │ -00:12:03 verbose #8338 > │ │ -00:12:03 verbose #8339 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8340 > -00:12:03 verbose #8341 > ── markdown ──────────────────────────────────────────────────────────────────── -00:12:03 verbose #8342 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:12:03 verbose #8343 > │ ## square │ -00:12:03 verbose #8344 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8345 > -00:12:03 verbose #8346 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8347 > inl square x = -00:12:03 verbose #8348 > x ** 2 -00:12:03 verbose #8349 > -00:12:03 verbose #8350 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8351 > //// test -00:12:03 verbose #8352 > -00:12:03 verbose #8353 > 5f64 -00:12:03 verbose #8354 > |> sqrt -00:12:03 verbose #8355 > |> square -00:12:03 verbose #8356 > |> _assert_approx_eq None 5 -00:12:03 verbose #8357 > -00:12:03 verbose #8358 > ╭─[ 39.15ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8359 > │ assert_approx_eq / actual: 5.0 / expected: 5.0 │ -00:12:03 verbose #8360 > │ │ -00:12:03 verbose #8361 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8362 > -00:12:03 verbose #8363 > ── spiral ────────────────────────────────────────────────────────────────────── -00:12:03 verbose #8364 > //// test -00:12:03 verbose #8365 > -00:12:03 verbose #8366 > e () |> square -00:12:03 verbose #8367 > |> _assert_approx_eq None 7.3890560989306495 -00:12:03 verbose #8368 > -00:12:03 verbose #8369 > ╭─[ 54.49ms - stdout ]─────────────────────────────────────────────────────────╮ -00:12:03 verbose #8370 > │ assert_approx_eq / actual: 7.389056099 / expected: 7.389056099 │ -00:12:03 verbose #8371 > │ │ -00:12:03 verbose #8372 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:12:03 verbose #8373 > 00:00:09 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 12323 -00:12:03 verbose #8374 > 00:00:09 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/math.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/math.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:12:07 verbose #8375 > 00:00:13 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/math.dib.ipynb to html\e[0m -00:12:07 verbose #8376 > 00:00:13 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:12:07 verbose #8377 > 00:00:13 verbose #7 \e[4;7m validate(nb)\e[0m -00:12:07 verbose #8378 > 00:00:13 verbose #8 \e[4;7m[NbConvertApp] Writing 303753 bytes to c:\home\git\polyglot\lib\spiral\math.dib.html\e[0m -00:12:07 verbose #8379 > 00:00:13 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 599 -00:12:07 verbose #8380 > 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 599 -00:12:07 verbose #8381 > 00:00:13 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:12:08 verbose #8382 > 00:00:15 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:12:08 verbose #8383 > 00:00:15 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:12:09 verbose #8384 > 00:00:15 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 12981 -00:12:09 debug #8385 execute_with_options_async / exit_code: 0 / output.Length: 15272 -00:12:09 debug #16 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path math.dib --retries 3 -00:12:09 debug #8386 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path optionm'.dib --retries 3", +00:05:28 verbose #8216 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "math.dib", "--retries", "3"]) +00:05:28 verbose #8217 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/math.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/math.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/math.dib" --output-path "c:/home/git/polyglot/lib/spiral/math.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:05:30 verbose #8218 > > +00:05:30 verbose #8219 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:30 verbose #8220 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:30 verbose #8221 > > │ # math │ +00:05:30 verbose #8222 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:30 verbose #8223 > > +00:05:30 verbose #8224 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:30 verbose #8225 > > //// test +00:05:30 verbose #8226 > > +00:05:30 verbose #8227 > > open testing +00:05:30 verbose #8228 > > +00:05:30 verbose #8229 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:05:30 verbose #8230 > > #r +00:05:30 verbose #8231 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:05:30 verbose #8232 > > otNet.Interactive.Spiral.dll" +00:05:30 verbose #8233 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:05:30 verbose #8234 > > #r +00:05:30 verbose #8235 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:05:30 verbose #8236 > > otNet.Interactive.dll" +00:05:30 verbose #8237 > > open type Microsoft.DotNet.Interactive.Kernel +00:05:34 verbose #8238 > > +00:05:34 verbose #8239 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:34 verbose #8240 > > //// test +00:05:34 verbose #8241 > > +00:05:34 verbose #8242 > > 2 * 2 / 0.4f64 |> sqrt +00:05:34 verbose #8243 > > |> _assert_approx_eq None 3.1622776601683795 +00:05:35 verbose #8244 > > +00:05:35 verbose #8245 > > ╭─[ 527.03ms - stdout ]────────────────────────────────────────────────────────╮ +00:05:35 verbose #8246 > > │ assert_approx_eq / actual: 3.16227766 / expected: 3.16227766 │ +00:05:35 verbose #8247 > > │ │ +00:05:35 verbose #8248 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8249 > > +00:05:35 verbose #8250 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8251 > > //// test +00:05:35 verbose #8252 > > +00:05:35 verbose #8253 > > 2f64 / 3 +00:05:35 verbose #8254 > > |> _assert_approx_eq None 0.6666666666666666 +00:05:35 verbose #8255 > > +00:05:35 verbose #8256 > > ╭─[ 19.76ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8257 > > │ assert_approx_eq / actual: 0.6666666667 / expected: 0.6666666667 │ +00:05:35 verbose #8258 > > │ │ +00:05:35 verbose #8259 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8260 > > +00:05:35 verbose #8261 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8262 > > //// test +00:05:35 verbose #8263 > > +00:05:35 verbose #8264 > > 2f64 |> log +00:05:35 verbose #8265 > > |> _assert_approx_eq None 0.6931471805599453 +00:05:35 verbose #8266 > > +00:05:35 verbose #8267 > > ╭─[ 15.00ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8268 > > │ assert_approx_eq / actual: 0.6931471806 / expected: 0.6931471806 │ +00:05:35 verbose #8269 > > │ │ +00:05:35 verbose #8270 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8271 > > +00:05:35 verbose #8272 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8273 > > //// test +00:05:35 verbose #8274 > > +00:05:35 verbose #8275 > > pi +00:05:35 verbose #8276 > > |> _assert_approx_eq None 3.141592653589793f64 +00:05:35 verbose #8277 > > +00:05:35 verbose #8278 > > ╭─[ 23.25ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8279 > > │ assert_approx_eq / actual: 3.141592654 / expected: 3.141592654 │ +00:05:35 verbose #8280 > > │ │ +00:05:35 verbose #8281 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8282 > > +00:05:35 verbose #8283 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8284 > > //// test +00:05:35 verbose #8285 > > +00:05:35 verbose #8286 > > pi |> cos +00:05:35 verbose #8287 > > |> _assert_eq -1f64 +00:05:35 verbose #8288 > > +00:05:35 verbose #8289 > > ╭─[ 15.27ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8290 > > │ assert_eq / actual: -1.0 / expected: -1.0 │ +00:05:35 verbose #8291 > > │ │ +00:05:35 verbose #8292 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8293 > > +00:05:35 verbose #8294 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8295 > > //// test +00:05:35 verbose #8296 > > +00:05:35 verbose #8297 > > pi +00:05:35 verbose #8298 > > |> cos +00:05:35 verbose #8299 > > |> fun n => n / 2f64 +00:05:35 verbose #8300 > > |> _assert_approx_eq None -0.5 +00:05:35 verbose #8301 > > +00:05:35 verbose #8302 > > ╭─[ 23.51ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8303 > > │ assert_approx_eq / actual: -0.5 / expected: -0.5 │ +00:05:35 verbose #8304 > > │ │ +00:05:35 verbose #8305 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8306 > > +00:05:35 verbose #8307 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8308 > > //// test +00:05:35 verbose #8309 > > +00:05:35 verbose #8310 > > pi / 2 |> cos +00:05:35 verbose #8311 > > |> _assert_approx_eq None 0.00000000000000006123233995736766f64 +00:05:35 verbose #8312 > > +00:05:35 verbose #8313 > > ╭─[ 15.88ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8314 > > │ assert_approx_eq / actual: 6.123233996e-17 / expected: 6.123233996e-17 │ +00:05:35 verbose #8315 > > │ │ +00:05:35 verbose #8316 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8317 > > +00:05:35 verbose #8318 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:35 verbose #8319 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:35 verbose #8320 > > │ ## atan2 │ +00:05:35 verbose #8321 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8322 > > +00:05:35 verbose #8323 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8324 > > inl atan2 (y : f64) (x : f64) = +00:05:35 verbose #8325 > > $"System.Math.Atan2 (!y, !x)" : f64 +00:05:35 verbose #8326 > > +00:05:35 verbose #8327 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8328 > > //// test +00:05:35 verbose #8329 > > +00:05:35 verbose #8330 > > 0 |> atan2 1 +00:05:35 verbose #8331 > > |> _assert_eq 1.5707963267948966 +00:05:35 verbose #8332 > > +00:05:35 verbose #8333 > > ╭─[ 108.02ms - stdout ]────────────────────────────────────────────────────────╮ +00:05:35 verbose #8334 > > │ assert_eq / actual: 1.570796327 / expected: 1.570796327 │ +00:05:35 verbose #8335 > > │ │ +00:05:35 verbose #8336 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8337 > > +00:05:35 verbose #8338 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:35 verbose #8339 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:35 verbose #8340 > > │ ## e │ +00:05:35 verbose #8341 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8342 > > +00:05:35 verbose #8343 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8344 > > inl e () = +00:05:35 verbose #8345 > > exp 1f64 +00:05:35 verbose #8346 > > +00:05:35 verbose #8347 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:35 verbose #8348 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:35 verbose #8349 > > │ ## floor │ +00:05:35 verbose #8350 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8351 > > +00:05:35 verbose #8352 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8353 > > inl floor forall t {float}. (n : t) : t = +00:05:35 verbose #8354 > > n |> $'floor' +00:05:35 verbose #8355 > > +00:05:35 verbose #8356 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8357 > > //// test +00:05:35 verbose #8358 > > +00:05:35 verbose #8359 > > 0.6 |> floor +00:05:35 verbose #8360 > > |> _assert_eq 0f64 +00:05:35 verbose #8361 > > +00:05:35 verbose #8362 > > ╭─[ 54.65ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8363 > > │ assert_eq / actual: 0.0 / expected: 0.0 │ +00:05:35 verbose #8364 > > │ │ +00:05:35 verbose #8365 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8366 > > +00:05:35 verbose #8367 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:35 verbose #8368 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:35 verbose #8369 > > │ ## ceil │ +00:05:35 verbose #8370 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8371 > > +00:05:35 verbose #8372 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8373 > > inl ceil forall t {float}. (n : t) : t = +00:05:35 verbose #8374 > > n |> $'ceil' +00:05:35 verbose #8375 > > +00:05:35 verbose #8376 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8377 > > //// test +00:05:35 verbose #8378 > > +00:05:35 verbose #8379 > > 0.6 |> ceil +00:05:35 verbose #8380 > > |> _assert_eq 1f64 +00:05:35 verbose #8381 > > +00:05:35 verbose #8382 > > ╭─[ 17.39ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8383 > > │ assert_eq / actual: 1.0 / expected: 1.0 │ +00:05:35 verbose #8384 > > │ │ +00:05:35 verbose #8385 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8386 > > +00:05:35 verbose #8387 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:35 verbose #8388 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:35 verbose #8389 > > │ ## round │ +00:05:35 verbose #8390 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8391 > > +00:05:35 verbose #8392 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8393 > > inl round forall t {float}. (n : t) : t = +00:05:35 verbose #8394 > > n |> $'round' +00:05:35 verbose #8395 > > +00:05:35 verbose #8396 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8397 > > //// test +00:05:35 verbose #8398 > > +00:05:35 verbose #8399 > > 0.5 |> round +00:05:35 verbose #8400 > > |> _assert_eq 0f64 +00:05:35 verbose #8401 > > +00:05:35 verbose #8402 > > 1.5 |> round +00:05:35 verbose #8403 > > |> _assert_eq 2f64 +00:05:35 verbose #8404 > > +00:05:35 verbose #8405 > > 2.5 |> round +00:05:35 verbose #8406 > > |> _assert_eq 2f64 +00:05:35 verbose #8407 > > +00:05:35 verbose #8408 > > 3.5 |> round +00:05:35 verbose #8409 > > |> _assert_eq 4f64 +00:05:35 verbose #8410 > > +00:05:35 verbose #8411 > > ╭─[ 48.83ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8412 > > │ assert_eq / actual: 0.0 / expected: 0.0 │ +00:05:35 verbose #8413 > > │ assert_eq / actual: 2.0 / expected: 2.0 │ +00:05:35 verbose #8414 > > │ assert_eq / actual: 2.0 / expected: 2.0 │ +00:05:35 verbose #8415 > > │ assert_eq / actual: 4.0 / expected: 4.0 │ +00:05:35 verbose #8416 > > │ │ +00:05:35 verbose #8417 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8418 > > +00:05:35 verbose #8419 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:35 verbose #8420 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:35 verbose #8421 > > │ ## log_base │ +00:05:35 verbose #8422 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8423 > > +00:05:35 verbose #8424 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8425 > > inl log_base (new_base : f64) (a : f64) = +00:05:35 verbose #8426 > > $"System.Math.Log (!a, !new_base)" : f64 +00:05:35 verbose #8427 > > +00:05:35 verbose #8428 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8429 > > //// test +00:05:35 verbose #8430 > > +00:05:35 verbose #8431 > > 100 |> log_base 10 +00:05:35 verbose #8432 > > |> _assert_eq 2 +00:05:35 verbose #8433 > > +00:05:35 verbose #8434 > > ╭─[ 21.18ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8435 > > │ assert_eq / actual: 2.0 / expected: 2.0 │ +00:05:35 verbose #8436 > > │ │ +00:05:35 verbose #8437 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8438 > > +00:05:35 verbose #8439 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:35 verbose #8440 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:35 verbose #8441 > > │ ## round │ +00:05:35 verbose #8442 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8443 > > +00:05:35 verbose #8444 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8445 > > inl round forall t {float}. (x : t) : t = +00:05:35 verbose #8446 > > $"round !x" +00:05:35 verbose #8447 > > +00:05:35 verbose #8448 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8449 > > //// test +00:05:35 verbose #8450 > > +00:05:35 verbose #8451 > > 0.5 |> round +00:05:35 verbose #8452 > > |> _assert_eq 0f64 +00:05:35 verbose #8453 > > +00:05:35 verbose #8454 > > ╭─[ 17.54ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8455 > > │ assert_eq / actual: 0.0 / expected: 0.0 │ +00:05:35 verbose #8456 > > │ │ +00:05:35 verbose #8457 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8458 > > +00:05:35 verbose #8459 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8460 > > //// test +00:05:35 verbose #8461 > > +00:05:35 verbose #8462 > > 0.6 |> round +00:05:35 verbose #8463 > > |> _assert_eq 1f64 +00:05:35 verbose #8464 > > +00:05:35 verbose #8465 > > ╭─[ 17.05ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8466 > > │ assert_eq / actual: 1.0 / expected: 1.0 │ +00:05:35 verbose #8467 > > │ │ +00:05:35 verbose #8468 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8469 > > +00:05:35 verbose #8470 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:35 verbose #8471 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:35 verbose #8472 > > │ ## square │ +00:05:35 verbose #8473 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8474 > > +00:05:35 verbose #8475 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8476 > > inl square x = +00:05:35 verbose #8477 > > x ** 2 +00:05:35 verbose #8478 > > +00:05:35 verbose #8479 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8480 > > //// test +00:05:35 verbose #8481 > > +00:05:35 verbose #8482 > > 5f64 +00:05:35 verbose #8483 > > |> sqrt +00:05:35 verbose #8484 > > |> square +00:05:35 verbose #8485 > > |> _assert_approx_eq None 5 +00:05:35 verbose #8486 > > +00:05:35 verbose #8487 > > ╭─[ 14.74ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8488 > > │ assert_approx_eq / actual: 5.0 / expected: 5.0 │ +00:05:35 verbose #8489 > > │ │ +00:05:35 verbose #8490 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8491 > > +00:05:35 verbose #8492 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:35 verbose #8493 > > //// test +00:05:35 verbose #8494 > > +00:05:35 verbose #8495 > > e () |> square +00:05:35 verbose #8496 > > |> _assert_approx_eq None 7.3890560989306495 +00:05:35 verbose #8497 > > +00:05:35 verbose #8498 > > ╭─[ 16.75ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:35 verbose #8499 > > │ assert_approx_eq / actual: 7.389056099 / expected: 7.389056099 │ +00:05:35 verbose #8500 > > │ │ +00:05:35 verbose #8501 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:35 verbose #8502 > 00:00:07 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 12323 +00:05:35 verbose #8503 > 00:00:07 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/math.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/math.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:05:37 verbose #8504 > 00:00:09 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/math.dib.ipynb to html +00:05:37 verbose #8505 > 00:00:09 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:05:37 verbose #8506 > 00:00:09 verbose #7 ! validate(nb) +00:05:39 verbose #8507 > 00:00:10 verbose #8 ! [NbConvertApp] Writing 303753 bytes to c:\home\git\polyglot\lib\spiral\math.dib.html +00:05:39 verbose #8508 > 00:00:10 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 639 +00:05:39 verbose #8509 > 00:00:10 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 639 +00:05:39 verbose #8510 > 00:00:10 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:05:40 verbose #8511 > 00:00:11 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:05:40 verbose #8512 > 00:00:11 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:05:40 verbose #8513 > 00:00:11 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 13021 +00:05:40 debug #8514 execute_with_options_async / exit_code: 0 / output.Length: 15800 +00:05:40 debug #16 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path math.dib --retries 3 +00:05:40 debug #8515 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path optionm'.dib --retries 3", [||], None, None, true, None) -00:12:09 verbose #8387 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "optionm'.dib", "--retries", "3"]) -00:12:09 verbose #8388 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/optionm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/optionm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:12:20 verbose #8389 > 00:12:18 debug #122 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d2da473085680db3e0589e07710babc658b1a5a384ecd6dfee3649e42297c0f5/main.spi -00:12:42 verbose #8390 > 00:12:41 debug #123 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/27f432b7944e73a697aa7472af3c10fede2247b24339574d288ffbfd1ca837ac/main.spi -00:12:42 verbose #8391 > 00:12:41 debug #124 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0222d11f2ea20a6380425de344a18707b12836dc9e49b62a0ba450ee0883dc5b/main.spi -00:12:43 verbose #8392 > 00:12:42 debug #125 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c3966286b98355fa8c41a0ad1d6a34b165bf1ef5c1789461f6756006055aebc4/main.spi -00:13:04 verbose #8393 > 00:13:03 debug #126 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/930f2a59f1ea85e8def4e259fd3003ebea9b5ea194e9446b24c03769e0470970/main.spi -00:13:05 verbose #8394 > 00:13:04 debug #127 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ed18d5b076cba6af6e995cf86403b0a47964b43188b5335171f78e173b210ed1/main.spi -00:13:05 verbose #8395 > 00:13:04 debug #128 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/25e00861e20b77b1ad0018d3b2a15f69b588d555f820319994f03c54c4fbb26b/main.spi -00:13:06 verbose #8396 > 00:13:05 debug #129 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f83d0efc47a12f94bb17a40ff8f3b64600e04d87f976896ab732af2169ec9d7a/main.spi -00:13:07 verbose #8397 > 00:13:06 debug #130 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/544cf9ed7d150072736a0351a0c25247bdfd9c1263844654e73484202ac38874/main.spi -00:13:07 verbose #8398 > 00:13:06 debug #131 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/52f7380478846ebdb37917817aa4e173bdc3b2a26a080e7eb5d17883114b6e07/main.spi -00:13:26 verbose #8399 > -00:13:26 verbose #8400 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8401 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8402 > │ # optionm │ -00:13:26 verbose #8403 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8404 > -00:13:26 verbose #8405 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8406 > //// test -00:13:26 verbose #8407 > -00:13:26 verbose #8408 > open testing -00:13:26 verbose #8409 > -00:13:26 verbose #8410 > ── spiral - import ───────────────────────────────────────────────────────────── -00:13:26 verbose #8411 > #r -00:13:26 verbose #8412 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:13:26 verbose #8413 > otNet.Interactive.Spiral.dll" -00:13:26 verbose #8414 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:13:26 verbose #8415 > #r -00:13:26 verbose #8416 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:13:26 verbose #8417 > otNet.Interactive.dll" -00:13:26 verbose #8418 > open type Microsoft.DotNet.Interactive.Kernel -00:13:26 verbose #8419 > -00:13:26 verbose #8420 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8421 > open rust_operators -00:13:26 verbose #8422 > -00:13:26 verbose #8423 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8424 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8425 > │ ## default_value │ -00:13:26 verbose #8426 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8427 > -00:13:26 verbose #8428 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8429 > inl default_value d = -00:13:26 verbose #8430 > optionm.defaultWith d -00:13:26 verbose #8431 > -00:13:26 verbose #8432 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8433 > //// test -00:13:26 verbose #8434 > -00:13:26 verbose #8435 > None -00:13:26 verbose #8436 > |> default_value 3i32 -00:13:26 verbose #8437 > |> _assert_eq 3i32 -00:13:26 verbose #8438 > -00:13:26 verbose #8439 > ╭─[ 702.56ms - stdout ]────────────────────────────────────────────────────────╮ -00:13:26 verbose #8440 > │ assert_eq / actual: 3 / expected: 3 │ -00:13:26 verbose #8441 > │ │ -00:13:26 verbose #8442 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8443 > -00:13:26 verbose #8444 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8445 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8446 > │ ## (/??) │ -00:13:26 verbose #8447 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8448 > -00:13:26 verbose #8449 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8450 > inl (/??) a b = -00:13:26 verbose #8451 > a |> default_value b -00:13:26 verbose #8452 > -00:13:26 verbose #8453 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8454 > //// test -00:13:26 verbose #8455 > -00:13:26 verbose #8456 > None /?? 3i32 -00:13:26 verbose #8457 > |> _assert_eq 3i32 -00:13:26 verbose #8458 > -00:13:26 verbose #8459 > ╭─[ 25.85ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:26 verbose #8460 > │ assert_eq / actual: 3 / expected: 3 │ -00:13:26 verbose #8461 > │ │ -00:13:26 verbose #8462 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8463 > -00:13:26 verbose #8464 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8465 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8466 > │ ## default_with │ -00:13:26 verbose #8467 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8468 > -00:13:26 verbose #8469 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8470 > inl default_with fn = function -00:13:26 verbose #8471 > | Some x => x -00:13:26 verbose #8472 > | None => fn () -00:13:26 verbose #8473 > -00:13:26 verbose #8474 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8475 > //// test -00:13:26 verbose #8476 > -00:13:26 verbose #8477 > None -00:13:26 verbose #8478 > |> default_with fun () => 3i32 -00:13:26 verbose #8479 > |> _assert_eq 3i32 -00:13:26 verbose #8480 > -00:13:26 verbose #8481 > ╭─[ 29.35ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:26 verbose #8482 > │ assert_eq / actual: 3 / expected: 3 │ -00:13:26 verbose #8483 > │ │ -00:13:26 verbose #8484 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8485 > -00:13:26 verbose #8486 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8487 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8488 > │ ## choose │ -00:13:26 verbose #8489 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8490 > -00:13:26 verbose #8491 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8492 > inl choose fn a b = -00:13:26 verbose #8493 > match a, b with -00:13:26 verbose #8494 > | Some x, Some y => fn x y |> Some -00:13:26 verbose #8495 > | _ => None -00:13:26 verbose #8496 > -00:13:26 verbose #8497 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8498 > //// test -00:13:26 verbose #8499 > -00:13:26 verbose #8500 > (Some 2i32, Some 3) -00:13:26 verbose #8501 > ||> choose (+) -00:13:26 verbose #8502 > |> _assert_eq (Some 5) -00:13:26 verbose #8503 > -00:13:26 verbose #8504 > ╭─[ 585.56ms - stdout ]────────────────────────────────────────────────────────╮ -00:13:26 verbose #8505 > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │ -00:13:26 verbose #8506 > │ │ -00:13:26 verbose #8507 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8508 > -00:13:26 verbose #8509 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8510 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8511 > │ ## iter │ -00:13:26 verbose #8512 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8513 > -00:13:26 verbose #8514 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8515 > inl iter fn = function -00:13:26 verbose #8516 > | Some x => fn x -00:13:26 verbose #8517 > | None => () -00:13:26 verbose #8518 > -00:13:26 verbose #8519 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8520 > //// test -00:13:26 verbose #8521 > -00:13:26 verbose #8522 > inl n = mut 1i32 -00:13:26 verbose #8523 > inl fn = -00:13:26 verbose #8524 > fun n' => -00:13:26 verbose #8525 > n <- *n + n' -00:13:26 verbose #8526 > Some 1i32 |> iter fn -00:13:26 verbose #8527 > None |> iter fn -00:13:26 verbose #8528 > *n -00:13:26 verbose #8529 > |> _assert_eq 2i32 -00:13:26 verbose #8530 > -00:13:26 verbose #8531 > ╭─[ 206.62ms - stdout ]────────────────────────────────────────────────────────╮ -00:13:26 verbose #8532 > │ assert_eq / actual: 2 / expected: 2 │ -00:13:26 verbose #8533 > │ │ -00:13:26 verbose #8534 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8535 > -00:13:26 verbose #8536 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8537 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8538 > │ ## option' │ -00:13:26 verbose #8539 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8540 > -00:13:26 verbose #8541 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8542 > nominal option' t = $"`t option" -00:13:26 verbose #8543 > -00:13:26 verbose #8544 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8545 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8546 > │ ## none' │ -00:13:26 verbose #8547 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8548 > -00:13:26 verbose #8549 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8550 > inl none' forall t. () : option' t = -00:13:26 verbose #8551 > $'None' -00:13:26 verbose #8552 > -00:13:26 verbose #8553 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8554 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8555 > │ ## some' │ -00:13:26 verbose #8556 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8557 > -00:13:26 verbose #8558 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8559 > inl some' forall t. (x : t) : option' t = -00:13:26 verbose #8560 > $'Some !x ' -00:13:26 verbose #8561 > -00:13:26 verbose #8562 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8563 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8564 > │ ## default_value' │ -00:13:26 verbose #8565 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8566 > -00:13:26 verbose #8567 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8568 > inl default_value' forall t. (value : t) (x : option' t) : t = -00:13:26 verbose #8569 > $'!x |> Option.defaultValue !value ' -00:13:26 verbose #8570 > -00:13:26 verbose #8571 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8572 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8573 > │ ## try' │ -00:13:26 verbose #8574 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8575 > -00:13:26 verbose #8576 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8577 > inl try' forall t. (x : option' t) : t = -00:13:26 verbose #8578 > !\\(x, $'"$0?"') -00:13:26 verbose #8579 > -00:13:26 verbose #8580 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8581 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8582 > │ ## map │ -00:13:26 verbose #8583 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8584 > -00:13:26 verbose #8585 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8586 > inl map forall t u. (fn : t -> u) (x : option' t) : option' u = -00:13:26 verbose #8587 > inl result : option' u = none' () -00:13:26 verbose #8588 > $'let _!result = ref !result ' -00:13:26 verbose #8589 > $'match !x with' -00:13:26 verbose #8590 > $'| Some x -> (' -00:13:26 verbose #8591 > $'(fun () ->' -00:13:26 verbose #8592 > $'(fun () ->' -00:13:26 verbose #8593 > inl x = dyn $'x' -00:13:26 verbose #8594 > x |> fn |> emit_unit -00:13:26 verbose #8595 > $')' -00:13:26 verbose #8596 > $"|> fun x -> x () |> Some" -00:13:26 verbose #8597 > $') () ) | None -> None' -00:13:26 verbose #8598 > $"|> fun x -> _!result.Value <- x" -00:13:26 verbose #8599 > $'_!result.Value ' -00:13:26 verbose #8600 > -00:13:26 verbose #8601 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8602 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8603 > │ ## box │ -00:13:26 verbose #8604 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8605 > -00:13:26 verbose #8606 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8607 > inl box forall t. (x : option t) : option' t = -00:13:26 verbose #8608 > // x -00:13:26 verbose #8609 > // |> optionm.map some' -00:13:26 verbose #8610 > // |> default_with none' -00:13:26 verbose #8611 > match x with -00:13:26 verbose #8612 > | Some x => some' x -00:13:26 verbose #8613 > | None => none' () -00:13:26 verbose #8614 > -00:13:26 verbose #8615 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8616 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8617 > │ ## map' │ -00:13:26 verbose #8618 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8619 > -00:13:26 verbose #8620 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8621 > inl map' forall t u. (fn : t -> u) (x : option' t) : option' u = -00:13:26 verbose #8622 > (!\($'"true; let _result = !x.map(|x| { //"') : bool) |> ignore -00:13:26 verbose #8623 > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore -00:13:26 verbose #8624 > !\($'"_result"') -00:13:26 verbose #8625 > -00:13:26 verbose #8626 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8627 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8628 > │ ## map'' │ -00:13:26 verbose #8629 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8630 > -00:13:26 verbose #8631 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8632 > inl map'' forall t u. (fn : t -> u) (x : option' t) : option' u = -00:13:26 verbose #8633 > $'!x |> Option.map !fn ' -00:13:26 verbose #8634 > -00:13:26 verbose #8635 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8636 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8637 > │ ## unbox │ -00:13:26 verbose #8638 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8639 > -00:13:26 verbose #8640 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8641 > inl unbox forall t. (x : option' t) : option t = -00:13:26 verbose #8642 > x |> map Some |> default_value' None -00:13:26 verbose #8643 > // inl some x : option t = Some x -00:13:26 verbose #8644 > // inl some = join some -00:13:26 verbose #8645 > // inl none : option t = None -00:13:26 verbose #8646 > // $'!x |> Option.map !some |> Option.defaultValue !none ' -00:13:26 verbose #8647 > -00:13:26 verbose #8648 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8649 > //// test -00:13:26 verbose #8650 > -00:13:26 verbose #8651 > inl x = Some 3i32 -00:13:26 verbose #8652 > inl y : option i32 = None -00:13:26 verbose #8653 > inl x' = x |> box |> unbox -00:13:26 verbose #8654 > inl y' = y |> box |> map id |> unbox -00:13:26 verbose #8655 > (x', y') |> _assert_eq (x, y) -00:13:26 verbose #8656 > -00:13:26 verbose #8657 > ╭─[ 191.16ms - stdout ]────────────────────────────────────────────────────────╮ -00:13:26 verbose #8658 > │ assert_eq / actual: struct (US0_0 3, US0_1) / expected: struct (US0_0 3, │ -00:13:26 verbose #8659 > │ US0_1) │ -00:13:26 verbose #8660 > │ │ -00:13:26 verbose #8661 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8662 > -00:13:26 verbose #8663 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8664 > //// test -00:13:26 verbose #8665 > ///! rust -00:13:26 verbose #8666 > -00:13:26 verbose #8667 > inl x = Some 3i32 -00:13:26 verbose #8668 > inl y : option i32 = None -00:13:26 verbose #8669 > inl x' = x |> box |> unbox -00:13:26 verbose #8670 > inl y' = y |> box |> map id |> unbox -00:13:26 verbose #8671 > (x', y') |> _assert_eq' (x, y) -00:13:26 verbose #8672 > -00:13:26 verbose #8673 > ╭─[ 22.81s - return value ]────────────────────────────────────────────────────╮ -00:13:26 verbose #8674 > │ assert_eq' / actual: (US0_0(3), US0_1) / expected: (US0_0(3), US0_1) │ -00:13:26 verbose #8675 > │ │ -00:13:26 verbose #8676 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8677 > -00:13:26 verbose #8678 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8679 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8680 > │ ## of_obj │ -00:13:26 verbose #8681 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8682 > -00:13:26 verbose #8683 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8684 > inl of_obj forall t. (x : t) : option' t = -00:13:26 verbose #8685 > $'let mutable _!x = None' -00:13:26 verbose #8686 > $"#if \!FABLE_COMPILER && \!WASM && \!CONTRACT" -00:13:26 verbose #8687 > ((x |> $'Option.ofObj') : option' t) -00:13:26 verbose #8688 > |> fun x => $'!x ' -00:13:26 verbose #8689 > $"#else" -00:13:26 verbose #8690 > $'Some !x ' -00:13:26 verbose #8691 > $"#endif" -00:13:26 verbose #8692 > $"|> fun x -> _!x <- Some x" -00:13:26 verbose #8693 > $'_!x.Value' -00:13:26 verbose #8694 > -00:13:26 verbose #8695 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8696 > //// test -00:13:26 verbose #8697 > -00:13:26 verbose #8698 > null () -00:13:26 verbose #8699 > |> of_obj -00:13:26 verbose #8700 > |> unbox -00:13:26 verbose #8701 > |> _assert_eq (None : option string) -00:13:26 verbose #8702 > -00:13:26 verbose #8703 > ╭─[ 805.72ms - stdout ]────────────────────────────────────────────────────────╮ -00:13:26 verbose #8704 > │ assert_eq / actual: US0_1 / expected: US0_1 │ -00:13:26 verbose #8705 > │ │ -00:13:26 verbose #8706 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8707 > -00:13:26 verbose #8708 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8709 > //// test -00:13:26 verbose #8710 > ///! rust -00:13:26 verbose #8711 > -00:13:26 verbose #8712 > "" -00:13:26 verbose #8713 > |> of_obj -00:13:26 verbose #8714 > |> unbox -00:13:26 verbose #8715 > |> _assert_eq' (Some "") -00:13:26 verbose #8716 > -00:13:26 verbose #8717 > ╭─[ 20.76s - return value ]────────────────────────────────────────────────────╮ -00:13:26 verbose #8718 > │ assert_eq' / actual: US0_0("") / expected: US0_0("") │ -00:13:26 verbose #8719 > │ │ -00:13:26 verbose #8720 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8721 > -00:13:26 verbose #8722 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8723 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8724 > │ ## flatten │ -00:13:26 verbose #8725 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8726 > -00:13:26 verbose #8727 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8728 > inl flatten x = -00:13:26 verbose #8729 > match x with -00:13:26 verbose #8730 > | Some (Some x) => Some x -00:13:26 verbose #8731 > | _ => None -00:13:26 verbose #8732 > -00:13:26 verbose #8733 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8734 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8735 > │ ## unwrap │ -00:13:26 verbose #8736 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8737 > -00:13:26 verbose #8738 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8739 > inl unwrap forall t. (x : option' t) : t = -00:13:26 verbose #8740 > !\\(x, $'"$0.unwrap()"') -00:13:26 verbose #8741 > -00:13:26 verbose #8742 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8743 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8744 > │ ## unwrap_or │ -00:13:26 verbose #8745 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8746 > -00:13:26 verbose #8747 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8748 > inl unwrap_or forall t. (def : t) (x : option' t) : t = -00:13:26 verbose #8749 > !\($'"!x.unwrap_or(!def)"') -00:13:26 verbose #8750 > -00:13:26 verbose #8751 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8752 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8753 > │ ## rc_upgrade │ -00:13:26 verbose #8754 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8755 > -00:13:26 verbose #8756 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8757 > inl rc_upgrade forall t. (x : rust.weak_rc t) : option' (rust.rc t) = -00:13:26 verbose #8758 > !\\(x, $'"std::rc::Weak::upgrade(&$0)"') -00:13:26 verbose #8759 > -00:13:26 verbose #8760 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:26 verbose #8761 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:26 verbose #8762 > │ ## rc_into_inner │ -00:13:26 verbose #8763 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8764 > -00:13:26 verbose #8765 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8766 > inl rc_into_inner forall t. (x : rust.rc t) : option' t = -00:13:26 verbose #8767 > !\\(x, $'"std::rc::Rc::into_inner($0)"') -00:13:26 verbose #8768 > -00:13:26 verbose #8769 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:26 verbose #8770 > //// test -00:13:26 verbose #8771 > ///! rust -00:13:26 verbose #8772 > -00:13:26 verbose #8773 > types () -00:13:26 verbose #8774 > rust.new_rc 0i32 -00:13:26 verbose #8775 > |> rc_into_inner -00:13:26 verbose #8776 > |> unbox -00:13:26 verbose #8777 > |> _assert_eq' (Some 0i32) -00:13:26 verbose #8778 > -00:13:26 verbose #8779 > ╭─[ 19.39s - return value ]────────────────────────────────────────────────────╮ -00:13:26 verbose #8780 > │ assert_eq' / actual: US0_0(0) / expected: US0_0(0) │ -00:13:26 verbose #8781 > │ │ -00:13:26 verbose #8782 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:26 verbose #8783 > 00:01:17 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 17052 -00:13:26 verbose #8784 > 00:01:17 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:13:30 verbose #8785 > 00:01:21 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb to html\e[0m -00:13:30 verbose #8786 > 00:01:21 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:13:30 verbose #8787 > 00:01:21 verbose #7 \e[4;7m validate(nb)\e[0m -00:13:30 verbose #8788 > 00:01:21 verbose #8 \e[4;7m[NbConvertApp] Writing 322390 bytes to c:\home\git\polyglot\lib\spiral\optionm'.dib.html\e[0m -00:13:30 verbose #8789 > 00:01:21 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 607 -00:13:30 verbose #8790 > 00:01:21 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 607 -00:13:30 verbose #8791 > 00:01:21 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/optionm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/optionm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:13:31 verbose #8792 > 00:01:22 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:13:31 verbose #8793 > 00:01:22 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:13:32 verbose #8794 > 00:01:22 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 17718 -00:13:32 debug #8795 execute_with_options_async / exit_code: 0 / output.Length: 20047 -00:13:32 debug #17 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path optionm'.dib --retries 3 -00:13:32 debug #8796 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path listm'.dib --retries 3", +00:05:40 verbose #8516 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "optionm'.dib", "--retries", "3"]) +00:05:40 verbose #8517 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/optionm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/optionm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:05:42 verbose #8518 > > +00:05:42 verbose #8519 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:42 verbose #8520 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:42 verbose #8521 > > │ # optionm │ +00:05:42 verbose #8522 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:42 verbose #8523 > > +00:05:42 verbose #8524 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:42 verbose #8525 > > //// test +00:05:42 verbose #8526 > > +00:05:42 verbose #8527 > > open testing +00:05:42 verbose #8528 > > +00:05:42 verbose #8529 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:05:42 verbose #8530 > > #r +00:05:42 verbose #8531 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:05:42 verbose #8532 > > otNet.Interactive.Spiral.dll" +00:05:42 verbose #8533 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:05:42 verbose #8534 > > #r +00:05:42 verbose #8535 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:05:42 verbose #8536 > > otNet.Interactive.dll" +00:05:42 verbose #8537 > > open type Microsoft.DotNet.Interactive.Kernel +00:05:46 verbose #8538 > > +00:05:46 verbose #8539 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:46 verbose #8540 > > open rust_operators +00:05:46 verbose #8541 > > +00:05:46 verbose #8542 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:46 verbose #8543 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:46 verbose #8544 > > │ ## default_value │ +00:05:46 verbose #8545 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:46 verbose #8546 > > +00:05:46 verbose #8547 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:46 verbose #8548 > > inl default_value d = +00:05:46 verbose #8549 > > optionm.defaultWith d +00:05:46 verbose #8550 > > +00:05:46 verbose #8551 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:46 verbose #8552 > > //// test +00:05:46 verbose #8553 > > +00:05:46 verbose #8554 > > None +00:05:46 verbose #8555 > > |> default_value 3i32 +00:05:46 verbose #8556 > > |> _assert_eq 3i32 +00:05:47 verbose #8557 > > +00:05:47 verbose #8558 > > ╭─[ 520.18ms - stdout ]────────────────────────────────────────────────────────╮ +00:05:47 verbose #8559 > > │ assert_eq / actual: 3 / expected: 3 │ +00:05:47 verbose #8560 > > │ │ +00:05:47 verbose #8561 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8562 > > +00:05:47 verbose #8563 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8564 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8565 > > │ ## (/??) │ +00:05:47 verbose #8566 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8567 > > +00:05:47 verbose #8568 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8569 > > inl (/??) a b = +00:05:47 verbose #8570 > > a |> default_value b +00:05:47 verbose #8571 > > +00:05:47 verbose #8572 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8573 > > //// test +00:05:47 verbose #8574 > > +00:05:47 verbose #8575 > > None /?? 3i32 +00:05:47 verbose #8576 > > |> _assert_eq 3i32 +00:05:47 verbose #8577 > > +00:05:47 verbose #8578 > > ╭─[ 17.31ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:47 verbose #8579 > > │ assert_eq / actual: 3 / expected: 3 │ +00:05:47 verbose #8580 > > │ │ +00:05:47 verbose #8581 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8582 > > +00:05:47 verbose #8583 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8584 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8585 > > │ ## default_with │ +00:05:47 verbose #8586 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8587 > > +00:05:47 verbose #8588 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8589 > > inl default_with fn = function +00:05:47 verbose #8590 > > | Some x => x +00:05:47 verbose #8591 > > | None => fn () +00:05:47 verbose #8592 > > +00:05:47 verbose #8593 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8594 > > //// test +00:05:47 verbose #8595 > > +00:05:47 verbose #8596 > > None +00:05:47 verbose #8597 > > |> default_with fun () => 3i32 +00:05:47 verbose #8598 > > |> _assert_eq 3i32 +00:05:47 verbose #8599 > > +00:05:47 verbose #8600 > > ╭─[ 15.27ms - stdout ]─────────────────────────────────────────────────────────╮ +00:05:47 verbose #8601 > > │ assert_eq / actual: 3 / expected: 3 │ +00:05:47 verbose #8602 > > │ │ +00:05:47 verbose #8603 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8604 > > +00:05:47 verbose #8605 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8606 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8607 > > │ ## choose │ +00:05:47 verbose #8608 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8609 > > +00:05:47 verbose #8610 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8611 > > inl choose fn a b = +00:05:47 verbose #8612 > > match a, b with +00:05:47 verbose #8613 > > | Some x, Some y => fn x y |> Some +00:05:47 verbose #8614 > > | _ => None +00:05:47 verbose #8615 > > +00:05:47 verbose #8616 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8617 > > //// test +00:05:47 verbose #8618 > > +00:05:47 verbose #8619 > > (Some 2i32, Some 3) +00:05:47 verbose #8620 > > ||> choose (+) +00:05:47 verbose #8621 > > |> _assert_eq (Some 5) +00:05:47 verbose #8622 > > +00:05:47 verbose #8623 > > ╭─[ 401.23ms - stdout ]────────────────────────────────────────────────────────╮ +00:05:47 verbose #8624 > > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │ +00:05:47 verbose #8625 > > │ │ +00:05:47 verbose #8626 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8627 > > +00:05:47 verbose #8628 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8629 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8630 > > │ ## iter │ +00:05:47 verbose #8631 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8632 > > +00:05:47 verbose #8633 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8634 > > inl iter fn = function +00:05:47 verbose #8635 > > | Some x => fn x +00:05:47 verbose #8636 > > | None => () +00:05:47 verbose #8637 > > +00:05:47 verbose #8638 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8639 > > //// test +00:05:47 verbose #8640 > > +00:05:47 verbose #8641 > > inl n = mut 1i32 +00:05:47 verbose #8642 > > inl fn = +00:05:47 verbose #8643 > > fun n' => +00:05:47 verbose #8644 > > n <- *n + n' +00:05:47 verbose #8645 > > Some 1i32 |> iter fn +00:05:47 verbose #8646 > > None |> iter fn +00:05:47 verbose #8647 > > *n +00:05:47 verbose #8648 > > |> _assert_eq 2i32 +00:05:47 verbose #8649 > > +00:05:47 verbose #8650 > > ╭─[ 148.38ms - stdout ]────────────────────────────────────────────────────────╮ +00:05:47 verbose #8651 > > │ assert_eq / actual: 2 / expected: 2 │ +00:05:47 verbose #8652 > > │ │ +00:05:47 verbose #8653 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8654 > > +00:05:47 verbose #8655 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8656 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8657 > > │ ## option' │ +00:05:47 verbose #8658 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8659 > > +00:05:47 verbose #8660 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8661 > > nominal option' t = $"`t option" +00:05:47 verbose #8662 > > +00:05:47 verbose #8663 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8664 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8665 > > │ ## none' │ +00:05:47 verbose #8666 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8667 > > +00:05:47 verbose #8668 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8669 > > inl none' forall t. () : option' t = +00:05:47 verbose #8670 > > $'None' +00:05:47 verbose #8671 > > +00:05:47 verbose #8672 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8673 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8674 > > │ ## some' │ +00:05:47 verbose #8675 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8676 > > +00:05:47 verbose #8677 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8678 > > inl some' forall t. (x : t) : option' t = +00:05:47 verbose #8679 > > $'Some !x ' +00:05:47 verbose #8680 > > +00:05:47 verbose #8681 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8682 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8683 > > │ ## default_value' │ +00:05:47 verbose #8684 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8685 > > +00:05:47 verbose #8686 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8687 > > inl default_value' forall t. (value : t) (x : option' t) : t = +00:05:47 verbose #8688 > > $'!x |> Option.defaultValue !value ' +00:05:47 verbose #8689 > > +00:05:47 verbose #8690 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8691 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8692 > > │ ## try' │ +00:05:47 verbose #8693 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8694 > > +00:05:47 verbose #8695 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8696 > > inl try' forall t. (x : option' t) : t = +00:05:47 verbose #8697 > > !\\(x, $'"$0?"') +00:05:47 verbose #8698 > > +00:05:47 verbose #8699 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8700 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8701 > > │ ## map │ +00:05:47 verbose #8702 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8703 > > +00:05:47 verbose #8704 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8705 > > inl map forall t u. (fn : t -> u) (x : option' t) : option' u = +00:05:47 verbose #8706 > > inl result : option' u = none' () +00:05:47 verbose #8707 > > $'let _!result = ref !result ' +00:05:47 verbose #8708 > > $'match !x with' +00:05:47 verbose #8709 > > $'| Some x -> (' +00:05:47 verbose #8710 > > $'(fun () ->' +00:05:47 verbose #8711 > > $'(fun () ->' +00:05:47 verbose #8712 > > inl x = dyn $'x' +00:05:47 verbose #8713 > > x |> fn |> emit_unit +00:05:47 verbose #8714 > > $')' +00:05:47 verbose #8715 > > $"|> fun x -> x () |> Some" +00:05:47 verbose #8716 > > $') () ) | None -> None' +00:05:47 verbose #8717 > > $"|> fun x -> _!result.Value <- x" +00:05:47 verbose #8718 > > $'_!result.Value ' +00:05:47 verbose #8719 > > +00:05:47 verbose #8720 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8721 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8722 > > │ ## box │ +00:05:47 verbose #8723 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8724 > > +00:05:47 verbose #8725 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8726 > > inl box forall t. (x : option t) : option' t = +00:05:47 verbose #8727 > > // x +00:05:47 verbose #8728 > > // |> optionm.map some' +00:05:47 verbose #8729 > > // |> default_with none' +00:05:47 verbose #8730 > > match x with +00:05:47 verbose #8731 > > | Some x => some' x +00:05:47 verbose #8732 > > | None => none' () +00:05:47 verbose #8733 > > +00:05:47 verbose #8734 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8735 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8736 > > │ ## map' │ +00:05:47 verbose #8737 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8738 > > +00:05:47 verbose #8739 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8740 > > inl map' forall t u. (fn : t -> u) (x : option' t) : option' u = +00:05:47 verbose #8741 > > (!\($'"true; let _result = !x.map(|x| { //"') : bool) |> ignore +00:05:47 verbose #8742 > > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore +00:05:47 verbose #8743 > > !\($'"_result"') +00:05:47 verbose #8744 > > +00:05:47 verbose #8745 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8746 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8747 > > │ ## map'' │ +00:05:47 verbose #8748 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8749 > > +00:05:47 verbose #8750 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8751 > > inl map'' forall t u. (fn : t -> u) (x : option' t) : option' u = +00:05:47 verbose #8752 > > $'!x |> Option.map !fn ' +00:05:47 verbose #8753 > > +00:05:47 verbose #8754 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:47 verbose #8755 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:47 verbose #8756 > > │ ## unbox │ +00:05:47 verbose #8757 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8758 > > +00:05:47 verbose #8759 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8760 > > inl unbox forall t. (x : option' t) : option t = +00:05:47 verbose #8761 > > x |> map Some |> default_value' None +00:05:47 verbose #8762 > > // inl some x : option t = Some x +00:05:47 verbose #8763 > > // inl some = join some +00:05:47 verbose #8764 > > // inl none : option t = None +00:05:47 verbose #8765 > > // $'!x |> Option.map !some |> Option.defaultValue !none ' +00:05:47 verbose #8766 > > +00:05:47 verbose #8767 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8768 > > //// test +00:05:47 verbose #8769 > > +00:05:47 verbose #8770 > > inl x = Some 3i32 +00:05:47 verbose #8771 > > inl y : option i32 = None +00:05:47 verbose #8772 > > inl x' = x |> box |> unbox +00:05:47 verbose #8773 > > inl y' = y |> box |> map id |> unbox +00:05:47 verbose #8774 > > (x', y') |> _assert_eq (x, y) +00:05:47 verbose #8775 > > +00:05:47 verbose #8776 > > ╭─[ 118.97ms - stdout ]────────────────────────────────────────────────────────╮ +00:05:47 verbose #8777 > > │ assert_eq / actual: struct (US0_0 3, US0_1) / expected: struct (US0_0 3, │ +00:05:47 verbose #8778 > > │ US0_1) │ +00:05:47 verbose #8779 > > │ │ +00:05:47 verbose #8780 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:47 verbose #8781 > > +00:05:47 verbose #8782 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:47 verbose #8783 > > //// test +00:05:47 verbose #8784 > > ///! rust +00:05:47 verbose #8785 > > +00:05:47 verbose #8786 > > inl x = Some 3i32 +00:05:47 verbose #8787 > > inl y : option i32 = None +00:05:47 verbose #8788 > > inl x' = x |> box |> unbox +00:05:47 verbose #8789 > > inl y' = y |> box |> map id |> unbox +00:05:47 verbose #8790 > > (x', y') |> _assert_eq' (x, y) +00:05:52 verbose #8791 > > +00:05:52 verbose #8792 > > ╭─[ 4.37s - return value ]─────────────────────────────────────────────────────╮ +00:05:52 verbose #8793 > > │ assert_eq' / actual: (US0_0(3), US0_1) / expected: (US0_0(3), US0_1) │ +00:05:52 verbose #8794 > > │ │ +00:05:52 verbose #8795 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:52 verbose #8796 > > +00:05:52 verbose #8797 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:52 verbose #8798 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:52 verbose #8799 > > │ ## of_obj │ +00:05:52 verbose #8800 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:52 verbose #8801 > > +00:05:52 verbose #8802 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:52 verbose #8803 > > inl of_obj forall t. (x : t) : option' t = +00:05:52 verbose #8804 > > $'let mutable _!x = None' +00:05:52 verbose #8805 > > $"#if \!FABLE_COMPILER && \!WASM && \!CONTRACT" +00:05:52 verbose #8806 > > ((x |> $'Option.ofObj') : option' t) |> emit_unit +00:05:52 verbose #8807 > > $"#else" +00:05:52 verbose #8808 > > $'Some !x ' +00:05:52 verbose #8809 > > $"#endif" +00:05:52 verbose #8810 > > $"|> fun x -> _!x <- Some x" +00:05:52 verbose #8811 > > $'_!x.Value' +00:05:52 verbose #8812 > > +00:05:52 verbose #8813 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:52 verbose #8814 > > //// test +00:05:52 verbose #8815 > > +00:05:52 verbose #8816 > > null () +00:05:52 verbose #8817 > > |> of_obj +00:05:52 verbose #8818 > > |> unbox +00:05:52 verbose #8819 > > |> _assert_eq (None : option string) +00:05:52 verbose #8820 > > +00:05:52 verbose #8821 > > ╭─[ 101.11ms - stdout ]────────────────────────────────────────────────────────╮ +00:05:52 verbose #8822 > > │ assert_eq / actual: US0_1 / expected: US0_1 │ +00:05:52 verbose #8823 > > │ │ +00:05:52 verbose #8824 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:52 verbose #8825 > > +00:05:52 verbose #8826 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:52 verbose #8827 > > //// test +00:05:52 verbose #8828 > > ///! rust +00:05:52 verbose #8829 > > +00:05:52 verbose #8830 > > "" +00:05:52 verbose #8831 > > |> of_obj +00:05:52 verbose #8832 > > |> unbox +00:05:52 verbose #8833 > > |> _assert_eq' (Some "") +00:05:56 verbose #8834 > > +00:05:56 verbose #8835 > > ╭─[ 4.16s - return value ]─────────────────────────────────────────────────────╮ +00:05:56 verbose #8836 > > │ assert_eq' / actual: US0_0("") / expected: US0_0("") │ +00:05:56 verbose #8837 > > │ │ +00:05:56 verbose #8838 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:56 verbose #8839 > > +00:05:56 verbose #8840 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:56 verbose #8841 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:56 verbose #8842 > > │ ## flatten │ +00:05:56 verbose #8843 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:56 verbose #8844 > > +00:05:56 verbose #8845 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:56 verbose #8846 > > inl flatten x = +00:05:56 verbose #8847 > > match x with +00:05:56 verbose #8848 > > | Some (Some x) => Some x +00:05:56 verbose #8849 > > | _ => None +00:05:56 verbose #8850 > > +00:05:56 verbose #8851 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:56 verbose #8852 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:56 verbose #8853 > > │ ## unwrap │ +00:05:56 verbose #8854 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:56 verbose #8855 > > +00:05:56 verbose #8856 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:56 verbose #8857 > > inl unwrap forall t. (x : option' t) : t = +00:05:56 verbose #8858 > > !\\(x, $'"$0.unwrap()"') +00:05:56 verbose #8859 > > +00:05:56 verbose #8860 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:56 verbose #8861 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:56 verbose #8862 > > │ ## take │ +00:05:56 verbose #8863 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:56 verbose #8864 > > +00:05:56 verbose #8865 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:56 verbose #8866 > > inl take forall t. (x : option' t) : option' t = +00:05:56 verbose #8867 > > (!\\(x, $'"true; let mut !x = !x"') : bool) |> ignore +00:05:56 verbose #8868 > > !\\(x, $'"Option::take(&mut $0)"') +00:05:56 verbose #8869 > > +00:05:56 verbose #8870 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:56 verbose #8871 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:56 verbose #8872 > > │ ## ref_take' │ +00:05:56 verbose #8873 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:56 verbose #8874 > > +00:05:56 verbose #8875 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:56 verbose #8876 > > inl ref_take' forall t. (x : rust.ref' (option' t)) : option' t = +00:05:56 verbose #8877 > > (!\\(x, $'"true; let mut !x = !x"') : bool) |> ignore +00:05:56 verbose #8878 > > !\\(x, $'"Option::take(&mut $0)"') +00:05:56 verbose #8879 > > +00:05:56 verbose #8880 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:56 verbose #8881 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:56 verbose #8882 > > │ ## ref_take │ +00:05:56 verbose #8883 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:56 verbose #8884 > > +00:05:56 verbose #8885 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:56 verbose #8886 > > inl ref_take forall t. (x : rust.ref' (rust.mut' (option' t))) : option' t = +00:05:56 verbose #8887 > > !\\(x, $'"Option::take($0)"') +00:05:56 verbose #8888 > > +00:05:56 verbose #8889 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:56 verbose #8890 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:56 verbose #8891 > > │ ## as_mut │ +00:05:56 verbose #8892 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:56 verbose #8893 > > +00:05:56 verbose #8894 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:56 verbose #8895 > > inl as_mut forall t. (x : rust.ref' (rust.mut' (option' t))) : option' +00:05:56 verbose #8896 > > (rust.ref' (rust.mut' t)) = +00:05:56 verbose #8897 > > !\\(x, $'"$0.as_mut()"') +00:05:56 verbose #8898 > > +00:05:56 verbose #8899 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:56 verbose #8900 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:56 verbose #8901 > > │ ## unwrap_or │ +00:05:56 verbose #8902 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:56 verbose #8903 > > +00:05:56 verbose #8904 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:56 verbose #8905 > > inl unwrap_or forall t. (def : t) (x : option' t) : t = +00:05:56 verbose #8906 > > !\($'"!x.unwrap_or(!def)"') +00:05:56 verbose #8907 > > +00:05:56 verbose #8908 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:56 verbose #8909 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:56 verbose #8910 > > │ ## rc_upgrade │ +00:05:56 verbose #8911 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:56 verbose #8912 > > +00:05:56 verbose #8913 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:56 verbose #8914 > > inl rc_upgrade forall t. (x : rust.weak_rc t) : option' (rust.rc t) = +00:05:56 verbose #8915 > > !\\(x, $'"std::rc::Weak::upgrade(&$0)"') +00:05:56 verbose #8916 > > +00:05:56 verbose #8917 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:05:56 verbose #8918 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:05:56 verbose #8919 > > │ ## rc_into_inner │ +00:05:56 verbose #8920 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:05:56 verbose #8921 > > +00:05:56 verbose #8922 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:56 verbose #8923 > > inl rc_into_inner forall t. (x : rust.rc t) : option' t = +00:05:56 verbose #8924 > > !\\(x, $'"std::rc::Rc::into_inner($0)"') +00:05:56 verbose #8925 > > +00:05:56 verbose #8926 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:05:56 verbose #8927 > > //// test +00:05:56 verbose #8928 > > ///! rust +00:05:56 verbose #8929 > > +00:05:56 verbose #8930 > > types () +00:05:56 verbose #8931 > > rust.new_rc 0i32 +00:05:56 verbose #8932 > > |> rc_into_inner +00:05:56 verbose #8933 > > |> unbox +00:05:56 verbose #8934 > > |> _assert_eq' (Some 0i32) +00:06:00 verbose #8935 > > +00:06:00 verbose #8936 > > ╭─[ 4.00s - return value ]─────────────────────────────────────────────────────╮ +00:06:00 verbose #8937 > > │ assert_eq' / actual: US0_0(0) / expected: US0_0(0) │ +00:06:00 verbose #8938 > > │ │ +00:06:00 verbose #8939 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:00 verbose #8940 > 00:00:20 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 19219 +00:06:00 verbose #8941 > 00:00:20 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:06:02 verbose #8942 > 00:00:22 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb to html +00:06:02 verbose #8943 > 00:00:22 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:06:02 verbose #8944 > 00:00:22 verbose #7 ! validate(nb) +00:06:04 verbose #8945 > 00:00:23 verbose #8 ! [NbConvertApp] Writing 329529 bytes to c:\home\git\polyglot\lib\spiral\optionm'.dib.html +00:06:04 verbose #8946 > 00:00:23 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 647 +00:06:04 verbose #8947 > 00:00:23 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 647 +00:06:04 verbose #8948 > 00:00:23 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/optionm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/optionm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:06:05 verbose #8949 > 00:00:24 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:06:05 verbose #8950 > 00:00:24 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:06:05 verbose #8951 > 00:00:25 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 19925 +00:06:05 debug #8952 execute_with_options_async / exit_code: 0 / output.Length: 23018 +00:06:05 debug #17 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path optionm'.dib --retries 3 +00:06:05 debug #8953 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path listm'.dib --retries 3", [||], None, None, true, None) -00:13:32 verbose #8797 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "listm'.dib", "--retries", "3"]) -00:13:32 verbose #8798 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/listm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/listm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:13:42 verbose #8799 > -00:13:42 verbose #8800 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8801 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8802 > │ # listm │ -00:13:42 verbose #8803 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8804 > -00:13:42 verbose #8805 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8806 > //// test -00:13:42 verbose #8807 > -00:13:42 verbose #8808 > open testing -00:13:42 verbose #8809 > -00:13:42 verbose #8810 > ── spiral - import ───────────────────────────────────────────────────────────── -00:13:42 verbose #8811 > #r -00:13:42 verbose #8812 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:13:42 verbose #8813 > otNet.Interactive.Spiral.dll" -00:13:42 verbose #8814 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:13:42 verbose #8815 > #r -00:13:42 verbose #8816 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:13:42 verbose #8817 > otNet.Interactive.dll" -00:13:42 verbose #8818 > open type Microsoft.DotNet.Interactive.Kernel -00:13:42 verbose #8819 > -00:13:42 verbose #8820 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8821 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8822 > │ ## list' │ -00:13:42 verbose #8823 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8824 > -00:13:42 verbose #8825 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8826 > nominal list' t = $'`t list' -00:13:42 verbose #8827 > -00:13:42 verbose #8828 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8829 > inl empty' forall t. () : list' t = -00:13:42 verbose #8830 > $'[[]]' -00:13:42 verbose #8831 > -00:13:42 verbose #8832 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8833 > inl cons' forall t. (head : t) (tail : list' t) : list' t = -00:13:42 verbose #8834 > $'!head :: !tail ' -00:13:42 verbose #8835 > -00:13:42 verbose #8836 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8837 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8838 > │ ## box │ -00:13:42 verbose #8839 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8840 > -00:13:42 verbose #8841 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8842 > inl box forall t. (list : list t) : list' t = -00:13:42 verbose #8843 > (list, empty' ()) -00:13:42 verbose #8844 > ||> listm.foldBack fun x acc => -00:13:42 verbose #8845 > acc |> cons' x -00:13:42 verbose #8846 > -00:13:42 verbose #8847 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8848 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8849 > │ ## fold' │ -00:13:42 verbose #8850 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8851 > -00:13:42 verbose #8852 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8853 > inl fold' forall t u. (fn : t -> u) (init : list u) (list : list' t) : list u = -00:13:42 verbose #8854 > (init, list) -00:13:42 verbose #8855 > ||> $'List.fold' join fun acc x => Cons (fn x, acc) -00:13:42 verbose #8856 > -00:13:42 verbose #8857 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8858 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8859 > │ ## fold_back' │ -00:13:42 verbose #8860 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8861 > -00:13:42 verbose #8862 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8863 > inl fold_back' forall t u. (fn : t -> u) (list : list' t) (init : list u) : list -00:13:42 verbose #8864 > u = -00:13:42 verbose #8865 > (list, init) -00:13:42 verbose #8866 > ||> $'List.foldBack' join fun x acc => Cons (fn x, acc) -00:13:42 verbose #8867 > -00:13:42 verbose #8868 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8869 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8870 > │ ## filter' │ -00:13:42 verbose #8871 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8872 > -00:13:42 verbose #8873 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8874 > inl filter' forall t. (fn : t -> bool) (list : list' t) : list' t = -00:13:42 verbose #8875 > list |> $'"List.filter !fn"' -00:13:42 verbose #8876 > -00:13:42 verbose #8877 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8878 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8879 > │ ## filter │ -00:13:42 verbose #8880 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8881 > -00:13:42 verbose #8882 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8883 > inl filter forall t. (fn : t -> bool) (list : list t) : list t = -00:13:42 verbose #8884 > (list, Nil) -00:13:42 verbose #8885 > ||> listm.foldBack fun x acc => -00:13:42 verbose #8886 > if fn x then x :: acc else acc -00:13:42 verbose #8887 > -00:13:42 verbose #8888 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8889 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8890 > │ ## unbox │ -00:13:42 verbose #8891 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8892 > -00:13:42 verbose #8893 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8894 > inl unbox forall t. (list : list' t) : list t = -00:13:42 verbose #8895 > (list, Nil) -00:13:42 verbose #8896 > ||> fold_back' id -00:13:42 verbose #8897 > -00:13:42 verbose #8898 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8899 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8900 > │ ## distinct' │ -00:13:42 verbose #8901 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8902 > -00:13:42 verbose #8903 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8904 > inl distinct' forall t. (list : list' t) : list' t = -00:13:42 verbose #8905 > list |> $'List.distinct' -00:13:42 verbose #8906 > -00:13:42 verbose #8907 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8908 > //// test -00:13:42 verbose #8909 > -00:13:42 verbose #8910 > [[ "1"; "2"; "2"; "3" ]] -00:13:42 verbose #8911 > |> box -00:13:42 verbose #8912 > |> distinct' -00:13:42 verbose #8913 > |> unbox -00:13:42 verbose #8914 > |> _assert_eq [[ "1"; "2"; "3" ]] -00:13:42 verbose #8915 > -00:13:42 verbose #8916 > ╭─[ 1.14s - stdout ]───────────────────────────────────────────────────────────╮ -00:13:42 verbose #8917 > │ assert_eq / actual: UH0_1 ("1", UH0_1 ("2", UH0_1 ("3", UH0_0))) / expected: │ -00:13:42 verbose #8918 > │ UH0_1 ("1", UH0_1 ("2", UH0_1 ("3", UH0_0))) │ -00:13:42 verbose #8919 > │ │ -00:13:42 verbose #8920 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8921 > -00:13:42 verbose #8922 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8923 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8924 > │ ## to_array' │ -00:13:42 verbose #8925 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8926 > -00:13:42 verbose #8927 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8928 > inl to_array' forall dim t. (items : list' t) : a dim t = -00:13:42 verbose #8929 > items |> $'List.toArray' -00:13:42 verbose #8930 > -00:13:42 verbose #8931 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8932 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8933 > │ ## append │ -00:13:42 verbose #8934 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8935 > -00:13:42 verbose #8936 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8937 > instance append list t = -00:13:42 verbose #8938 > listm.append -00:13:42 verbose #8939 > -00:13:42 verbose #8940 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8941 > //// test -00:13:42 verbose #8942 > -00:13:42 verbose #8943 > [[ "a"; "b" ]] ++ [[ "c"; "d" ]] -00:13:42 verbose #8944 > |> _assert_eq [[ "a"; "b"; "c"; "d" ]] -00:13:42 verbose #8945 > -00:13:42 verbose #8946 > ╭─[ 61.90ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #8947 > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_1 ("c", UH0_1 ("d", │ -00:13:42 verbose #8948 > │ UH0_0)))) / expected: UH0_1 ("a", UH0_1 ("b", UH0_1 ("c", UH0_1 ("d", │ -00:13:42 verbose #8949 > │ UH0_0)))) │ -00:13:42 verbose #8950 > │ │ -00:13:42 verbose #8951 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8952 > -00:13:42 verbose #8953 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8954 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8955 > │ ## collect │ -00:13:42 verbose #8956 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8957 > -00:13:42 verbose #8958 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8959 > inl collect forall t r. (fn : t -> list r) (items : list t) : list r = -00:13:42 verbose #8960 > items -00:13:42 verbose #8961 > |> listm.map fn -00:13:42 verbose #8962 > |> listm.fold (++) [[]] -00:13:42 verbose #8963 > -00:13:42 verbose #8964 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8965 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8966 > │ ## init_series │ -00:13:42 verbose #8967 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8968 > -00:13:42 verbose #8969 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8970 > inl init_series start end inc = -00:13:42 verbose #8971 > inl total : f64 = conv ((end - start) / inc) + 1 -00:13:42 verbose #8972 > listm.init total (conv >> (*) inc >> (+) start) -00:13:42 verbose #8973 > -00:13:42 verbose #8974 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8975 > //// test -00:13:42 verbose #8976 > -00:13:42 verbose #8977 > init_series 0 1 0.5 -00:13:42 verbose #8978 > |> _assert_eq [[ 0f64; 0.5; 1 ]] -00:13:42 verbose #8979 > -00:13:42 verbose #8980 > ╭─[ 73.78ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #8981 > │ assert_eq / actual: UH0_1 (0.0, UH0_1 (0.5, UH0_1 (1.0, UH0_0))) / expected: │ -00:13:42 verbose #8982 > │ UH0_1 (0.0, UH0_1 (0.5, UH0_1 (1.0, UH0_0))) │ -00:13:42 verbose #8983 > │ │ -00:13:42 verbose #8984 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8985 > -00:13:42 verbose #8986 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #8987 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #8988 > │ ## try_item │ -00:13:42 verbose #8989 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #8990 > -00:13:42 verbose #8991 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8992 > inl rec try_item i = function -00:13:42 verbose #8993 > | Cons (x, _) when i = 0 => Some x -00:13:42 verbose #8994 > | Cons (_, xs) => try_item (i - 1) xs -00:13:42 verbose #8995 > | Nil => None -00:13:42 verbose #8996 > -00:13:42 verbose #8997 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #8998 > //// test -00:13:42 verbose #8999 > -00:13:42 verbose #9000 > listm.init 10i32 id -00:13:42 verbose #9001 > |> try_item 9i32 -00:13:42 verbose #9002 > |> _assert_eq (Some 9) -00:13:42 verbose #9003 > -00:13:42 verbose #9004 > ╭─[ 82.31ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9005 > │ assert_eq / actual: US0_0 9 / expected: US0_0 9 │ -00:13:42 verbose #9006 > │ │ -00:13:42 verbose #9007 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9008 > -00:13:42 verbose #9009 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9010 > //// test -00:13:42 verbose #9011 > -00:13:42 verbose #9012 > listm.init 10i32 id -00:13:42 verbose #9013 > |> try_item 10i32 -00:13:42 verbose #9014 > |> _assert_eq None -00:13:42 verbose #9015 > -00:13:42 verbose #9016 > ╭─[ 51.28ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9017 > │ assert_eq / actual: US0_1 / expected: US0_1 │ -00:13:42 verbose #9018 > │ │ -00:13:42 verbose #9019 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9020 > -00:13:42 verbose #9021 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9022 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9023 > │ ## list_item │ -00:13:42 verbose #9024 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9025 > -00:13:42 verbose #9026 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9027 > inl item i = -00:13:42 verbose #9028 > try_item i >> optionm.value -00:13:42 verbose #9029 > -00:13:42 verbose #9030 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9031 > //// test -00:13:42 verbose #9032 > -00:13:42 verbose #9033 > listm.init 10i32 id -00:13:42 verbose #9034 > |> item 9i32 -00:13:42 verbose #9035 > |> _assert_eq 9 -00:13:42 verbose #9036 > -00:13:42 verbose #9037 > ╭─[ 30.89ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9038 > │ assert_eq / actual: 9 / expected: 9 │ -00:13:42 verbose #9039 > │ │ -00:13:42 verbose #9040 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9041 > -00:13:42 verbose #9042 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9043 > //// test -00:13:42 verbose #9044 > -00:13:42 verbose #9045 > fun () => -00:13:42 verbose #9046 > listm.init 10i32 id -00:13:42 verbose #9047 > |> item 10i32 -00:13:42 verbose #9048 > |> ignore -00:13:42 verbose #9049 > |> _throws -00:13:42 verbose #9050 > |> optionm.map sm'.format_exception -00:13:42 verbose #9051 > |> _assert_eq (Some "System.Exception: Option does not have a value.") -00:13:42 verbose #9052 > -00:13:42 verbose #9053 > ╭─[ 183.09ms - stdout ]────────────────────────────────────────────────────────╮ -00:13:42 verbose #9054 > │ assert_eq / actual: US1_0 "System.Exception: Option does not have a value." │ -00:13:42 verbose #9055 > │ / expected: US1_0 "System.Exception: Option does not have a value." │ -00:13:42 verbose #9056 > │ │ -00:13:42 verbose #9057 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9058 > -00:13:42 verbose #9059 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9060 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9061 > │ ## try_item_ │ -00:13:42 verbose #9062 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9063 > -00:13:42 verbose #9064 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9065 > let rec try_item_ i = function -00:13:42 verbose #9066 > | Cons (x, _) when i = 0 => Some x -00:13:42 verbose #9067 > | Cons (_, xs) => try_item_ (i - 1) xs -00:13:42 verbose #9068 > | Nil => None -00:13:42 verbose #9069 > -00:13:42 verbose #9070 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9071 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9072 > │ ## item_ │ -00:13:42 verbose #9073 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9074 > -00:13:42 verbose #9075 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9076 > inl item_ i = -00:13:42 verbose #9077 > try_item_ i >> optionm.value -00:13:42 verbose #9078 > -00:13:42 verbose #9079 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9080 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9081 > │ ## sum │ -00:13:42 verbose #9082 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9083 > -00:13:42 verbose #9084 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9085 > inl sum list = -00:13:42 verbose #9086 > list |> listm.fold (+) 0 -00:13:42 verbose #9087 > -00:13:42 verbose #9088 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9089 > //// test -00:13:42 verbose #9090 > -00:13:42 verbose #9091 > listm.init 10i32 id -00:13:42 verbose #9092 > |> sum -00:13:42 verbose #9093 > |> _assert_eq 45 -00:13:42 verbose #9094 > -00:13:42 verbose #9095 > ╭─[ 30.42ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9096 > │ assert_eq / actual: 45 / expected: 45 │ -00:13:42 verbose #9097 > │ │ -00:13:42 verbose #9098 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9099 > -00:13:42 verbose #9100 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9101 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9102 > │ ## unzip │ -00:13:42 verbose #9103 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9104 > -00:13:42 verbose #9105 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9106 > inl unzip list = -00:13:42 verbose #9107 > (([[]], [[]]), list) -00:13:42 verbose #9108 > ||> listm.fold fun (acc_x, acc_y) (x, y) => -00:13:42 verbose #9109 > x :: acc_x, y :: acc_y -00:13:42 verbose #9110 > |> fun x, y => -00:13:42 verbose #9111 > x |> listm.rev, y |> listm.rev -00:13:42 verbose #9112 > -00:13:42 verbose #9113 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9114 > //// test -00:13:42 verbose #9115 > -00:13:42 verbose #9116 > listm.init 10i32 id -00:13:42 verbose #9117 > |> listm.map (fun x => x, x) -00:13:42 verbose #9118 > |> unzip -00:13:42 verbose #9119 > |> fun x, y => -00:13:42 verbose #9120 > x |> sum -00:13:42 verbose #9121 > |> _assert_eq 45 -00:13:42 verbose #9122 > -00:13:42 verbose #9123 > y |> sum -00:13:42 verbose #9124 > |> _assert_eq 45 -00:13:42 verbose #9125 > -00:13:42 verbose #9126 > ╭─[ 37.44ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9127 > │ assert_eq / actual: 45 / expected: 45 │ -00:13:42 verbose #9128 > │ assert_eq / actual: 45 / expected: 45 │ -00:13:42 verbose #9129 > │ │ -00:13:42 verbose #9130 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9131 > -00:13:42 verbose #9132 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9133 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9134 > │ ## try_index_of │ -00:13:42 verbose #9135 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9136 > -00:13:42 verbose #9137 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9138 > inl try_index_of item list = -00:13:42 verbose #9139 > inl rec loop i = function -00:13:42 verbose #9140 > | [[]] => None -00:13:42 verbose #9141 > | x :: xs => -00:13:42 verbose #9142 > if x = item -00:13:42 verbose #9143 > then Some i -00:13:42 verbose #9144 > else loop (i + 1) xs -00:13:42 verbose #9145 > loop 0 list -00:13:42 verbose #9146 > -00:13:42 verbose #9147 > inl index_of item = -00:13:42 verbose #9148 > try_index_of item >> optionm.value -00:13:42 verbose #9149 > -00:13:42 verbose #9150 > inl try_index_of_ item list = -00:13:42 verbose #9151 > let rec loop i = function -00:13:42 verbose #9152 > | [[]] => None -00:13:42 verbose #9153 > | x :: xs => -00:13:42 verbose #9154 > if x = item -00:13:42 verbose #9155 > then Some i -00:13:42 verbose #9156 > else loop (i + 1) xs -00:13:42 verbose #9157 > loop 0 list -00:13:42 verbose #9158 > -00:13:42 verbose #9159 > inl index_of_ item = -00:13:42 verbose #9160 > try_index_of_ item >> optionm.value -00:13:42 verbose #9161 > -00:13:42 verbose #9162 > inl try_index_of__ item list = -00:13:42 verbose #9163 > inl i = mut 0 -00:13:42 verbose #9164 > inl list = mut list -00:13:42 verbose #9165 > inl result = mut None -00:13:42 verbose #9166 > let rec loop () = -00:13:42 verbose #9167 > match *list with -00:13:42 verbose #9168 > | [[]] => result <- None -00:13:42 verbose #9169 > | x :: xs => -00:13:42 verbose #9170 > if x = item -00:13:42 verbose #9171 > then result <- Some *i -00:13:42 verbose #9172 > else -00:13:42 verbose #9173 > i <- *i + 1 -00:13:42 verbose #9174 > list <- xs -00:13:42 verbose #9175 > loop () -00:13:42 verbose #9176 > loop () -00:13:42 verbose #9177 > *result -00:13:42 verbose #9178 > -00:13:42 verbose #9179 > inl index_of__ item = -00:13:42 verbose #9180 > try_index_of__ item >> optionm.value -00:13:42 verbose #9181 > -00:13:42 verbose #9182 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9183 > //// test -00:13:42 verbose #9184 > -00:13:42 verbose #9185 > listm.init 10i32 id -00:13:42 verbose #9186 > |> index_of 5i32 -00:13:42 verbose #9187 > |> _assert_eq 5i32 -00:13:42 verbose #9188 > -00:13:42 verbose #9189 > ╭─[ 31.11ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9190 > │ assert_eq / actual: 5 / expected: 5 │ -00:13:42 verbose #9191 > │ │ -00:13:42 verbose #9192 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9193 > -00:13:42 verbose #9194 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9195 > //// test -00:13:42 verbose #9196 > -00:13:42 verbose #9197 > listm.init 10i32 id -00:13:42 verbose #9198 > |> try_index_of 10i32 -00:13:42 verbose #9199 > |> _assert_eq (None : option i32) -00:13:42 verbose #9200 > -00:13:42 verbose #9201 > ╭─[ 48.16ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9202 > │ assert_eq / actual: US0_1 / expected: US0_1 │ -00:13:42 verbose #9203 > │ │ -00:13:42 verbose #9204 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9205 > -00:13:42 verbose #9206 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9207 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9208 > │ ## try_find │ -00:13:42 verbose #9209 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9210 > -00:13:42 verbose #9211 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9212 > inl try_find fn list = -00:13:42 verbose #9213 > inl rec loop = function -00:13:42 verbose #9214 > | [[]] => None -00:13:42 verbose #9215 > | x :: xs => -00:13:42 verbose #9216 > if fn x -00:13:42 verbose #9217 > then Some x -00:13:42 verbose #9218 > else loop xs -00:13:42 verbose #9219 > loop list -00:13:42 verbose #9220 > -00:13:42 verbose #9221 > inl try_find_ fn list = -00:13:42 verbose #9222 > let rec loop = function -00:13:42 verbose #9223 > | [[]] => None -00:13:42 verbose #9224 > | x :: xs => -00:13:42 verbose #9225 > if fn x -00:13:42 verbose #9226 > then Some x -00:13:42 verbose #9227 > else loop xs -00:13:42 verbose #9228 > loop list -00:13:42 verbose #9229 > -00:13:42 verbose #9230 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9231 > //// test -00:13:42 verbose #9232 > -00:13:42 verbose #9233 > listm.init 10i32 id -00:13:42 verbose #9234 > |> try_find ((=) 5i32) -00:13:42 verbose #9235 > |> _assert_eq (Some 5i32) -00:13:42 verbose #9236 > -00:13:42 verbose #9237 > ╭─[ 55.77ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9238 > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │ -00:13:42 verbose #9239 > │ │ -00:13:42 verbose #9240 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9241 > -00:13:42 verbose #9242 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9243 > inl find x = -00:13:42 verbose #9244 > try_find x >> optionm.value -00:13:42 verbose #9245 > -00:13:42 verbose #9246 > inl find_ x = -00:13:42 verbose #9247 > try_find_ x >> optionm.value -00:13:42 verbose #9248 > -00:13:42 verbose #9249 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9250 > //// test -00:13:42 verbose #9251 > -00:13:42 verbose #9252 > listm.init 10i32 id -00:13:42 verbose #9253 > |> find ((=) 5i32) -00:13:42 verbose #9254 > |> _assert_eq 5i32 -00:13:42 verbose #9255 > -00:13:42 verbose #9256 > ╭─[ 32.96ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9257 > │ assert_eq / actual: 5 / expected: 5 │ -00:13:42 verbose #9258 > │ │ -00:13:42 verbose #9259 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9260 > -00:13:42 verbose #9261 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9262 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9263 > │ ## choose │ -00:13:42 verbose #9264 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9265 > -00:13:42 verbose #9266 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9267 > inl choose f l = -00:13:42 verbose #9268 > (l, [[]]) -00:13:42 verbose #9269 > ||> listm.foldBack fun x acc => -00:13:42 verbose #9270 > match f x with -00:13:42 verbose #9271 > | Some y => y :: acc -00:13:42 verbose #9272 > | None => acc -00:13:42 verbose #9273 > -00:13:42 verbose #9274 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9275 > //// test -00:13:42 verbose #9276 > -00:13:42 verbose #9277 > listm.init 10i32 id -00:13:42 verbose #9278 > |> choose (fun x => if x % 2 = 0 then Some x else None) -00:13:42 verbose #9279 > |> _assert_eq [[ 0; 2; 4; 6; 8 ]] -00:13:42 verbose #9280 > -00:13:42 verbose #9281 > ╭─[ 76.14ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9282 > │ assert_eq / actual: UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, │ -00:13:42 verbose #9283 > │ UH0_0))))) / expected: UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, │ -00:13:42 verbose #9284 > │ UH0_0))))) │ -00:13:42 verbose #9285 > │ │ -00:13:42 verbose #9286 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9287 > -00:13:42 verbose #9288 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9289 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9290 > │ ## zip_with │ -00:13:42 verbose #9291 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9292 > -00:13:42 verbose #9293 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9294 > inl zip_with fn xs ys = -00:13:42 verbose #9295 > inl rec loop acc xs ys = -00:13:42 verbose #9296 > match xs, ys with -00:13:42 verbose #9297 > | Cons (x, xs), Cons (y, ys) => -00:13:42 verbose #9298 > loop (fn x y :: acc) xs ys -00:13:42 verbose #9299 > | _ => listm.rev acc -00:13:42 verbose #9300 > loop [[]] xs ys -00:13:42 verbose #9301 > -00:13:42 verbose #9302 > inl zip_with_ fn xs ys = -00:13:42 verbose #9303 > let rec loop acc xs ys = -00:13:42 verbose #9304 > match xs, ys with -00:13:42 verbose #9305 > | Cons (x, xs), Cons (y, ys) => -00:13:42 verbose #9306 > loop (fn x y :: acc) xs ys -00:13:42 verbose #9307 > | _ => listm.rev acc -00:13:42 verbose #9308 > loop [[]] xs ys -00:13:42 verbose #9309 > -00:13:42 verbose #9310 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9311 > //// test -00:13:42 verbose #9312 > -00:13:42 verbose #9313 > ([[ 1i32; 2; 3 ]], [[ 4; 5; 6 ]]) -00:13:42 verbose #9314 > ||> zip_with (+) -00:13:42 verbose #9315 > |> _assert_eq [[ 5; 7; 9 ]] -00:13:42 verbose #9316 > -00:13:42 verbose #9317 > ╭─[ 60.63ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9318 > │ assert_eq / actual: UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))) / expected: UH0_1 │ -00:13:42 verbose #9319 > │ (5, UH0_1 (7, UH0_1 (9, UH0_0))) │ -00:13:42 verbose #9320 > │ │ -00:13:42 verbose #9321 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9322 > -00:13:42 verbose #9323 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9324 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9325 > │ ## zip │ -00:13:42 verbose #9326 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9327 > -00:13:42 verbose #9328 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9329 > inl zip xs ys = -00:13:42 verbose #9330 > zip_with pair xs ys -00:13:42 verbose #9331 > -00:13:42 verbose #9332 > inl zip_ xs ys = -00:13:42 verbose #9333 > zip_with_ pair xs ys -00:13:42 verbose #9334 > -00:13:42 verbose #9335 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9336 > //// test -00:13:42 verbose #9337 > -00:13:42 verbose #9338 > ([[ 1i32; 2; 3 ]], [[ 4i32; 5; 6 ]]) -00:13:42 verbose #9339 > ||> zip -00:13:42 verbose #9340 > |> _assert_eq [[ 1, 4; 2, 5; 3, 6 ]] -00:13:42 verbose #9341 > -00:13:42 verbose #9342 > ╭─[ 96.43ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9343 > │ assert_eq / actual: UH0_1 (1, 4, UH0_1 (2, 5, UH0_1 (3, 6, UH0_0))) / │ -00:13:42 verbose #9344 > │ expected: UH0_1 (1, 4, UH0_1 (2, 5, UH0_1 (3, 6, UH0_0))) │ -00:13:42 verbose #9345 > │ │ -00:13:42 verbose #9346 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9347 > -00:13:42 verbose #9348 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9349 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9350 > │ ## indexed │ -00:13:42 verbose #9351 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9352 > -00:13:42 verbose #9353 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9354 > inl indexed list = -00:13:42 verbose #9355 > (([[]], 0), list) -00:13:42 verbose #9356 > ||> listm.fold fun (acc, i) x => -00:13:42 verbose #9357 > (i, x) :: acc, i + 1 -00:13:42 verbose #9358 > |> fst -00:13:42 verbose #9359 > |> listm.rev -00:13:42 verbose #9360 > -00:13:42 verbose #9361 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9362 > //// test -00:13:42 verbose #9363 > -00:13:42 verbose #9364 > listm.init 5i32 ((*) 2) -00:13:42 verbose #9365 > |> indexed -00:13:42 verbose #9366 > |> _assert_eq [[ 0i32, 0; 1, 2; 2, 4; 3, 6; 4, 8 ]] -00:13:42 verbose #9367 > -00:13:42 verbose #9368 > ╭─[ 68.77ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9369 > │ assert_eq / actual: UH0_1 (0, 0, UH0_1 (1, 2, UH0_1 (2, 4, UH0_1 (3, 6, │ -00:13:42 verbose #9370 > │ UH0_1 (4, 8, UH0_0))))) / expected: UH0_1 (0, 0, UH0_1 (1, 2, UH0_1 (2, 4, │ -00:13:42 verbose #9371 > │ UH0_1 (3, 6, UH0_1 (4, 8, UH0_0))))) │ -00:13:42 verbose #9372 > │ │ -00:13:42 verbose #9373 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9374 > -00:13:42 verbose #9375 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9376 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9377 > │ ## group_by │ -00:13:42 verbose #9378 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9379 > -00:13:42 verbose #9380 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9381 > inl group_by fn list = -00:13:42 verbose #9382 > (list, [[]]) -00:13:42 verbose #9383 > ||> listm.foldBack fun x acc => -00:13:42 verbose #9384 > inl xk = fn x -00:13:42 verbose #9385 > inl found, new_acc = -00:13:42 verbose #9386 > ((false, [[]]), acc) -00:13:42 verbose #9387 > ||> listm.fold fun (found, acc') (k, xs) => -00:13:42 verbose #9388 > if k = xk -00:13:42 verbose #9389 > then true, (k, x :: xs) :: acc' -00:13:42 verbose #9390 > else found, (k, xs) :: acc' -00:13:42 verbose #9391 > if found -00:13:42 verbose #9392 > then new_acc -00:13:42 verbose #9393 > else (xk, [[ x ]]) :: new_acc -00:13:42 verbose #9394 > -00:13:42 verbose #9395 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9396 > //// test -00:13:42 verbose #9397 > -00:13:42 verbose #9398 > listm.init 10i32 id -00:13:42 verbose #9399 > |> group_by (fun x => x % 2 = 0) -00:13:42 verbose #9400 > |> _assert_eq [[ true, [[ 0; 2; 4; 6; 8 ]]; false, [[ 1; 3; 5; 7; 9 ]] ]] -00:13:42 verbose #9401 > -00:13:42 verbose #9402 > ╭─[ 113.77ms - stdout ]────────────────────────────────────────────────────────╮ -00:13:42 verbose #9403 > │ assert_eq / actual: UH1_1 │ -00:13:42 verbose #9404 > │ (true, UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, UH0_0))))), │ -00:13:42 verbose #9405 > │ UH1_1 │ -00:13:42 verbose #9406 > │ (false, UH0_1 (1, UH0_1 (3, UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))))), │ -00:13:42 verbose #9407 > │ UH1_0)) / expected: UH1_1 │ -00:13:42 verbose #9408 > │ (true, UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, UH0_0))))), │ -00:13:42 verbose #9409 > │ UH1_1 │ -00:13:42 verbose #9410 > │ (false, UH0_1 (1, UH0_1 (3, UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))))), │ -00:13:42 verbose #9411 > │ UH1_0)) │ -00:13:42 verbose #9412 > │ │ -00:13:42 verbose #9413 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9414 > -00:13:42 verbose #9415 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9416 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9417 > │ ## forall' │ -00:13:42 verbose #9418 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9419 > -00:13:42 verbose #9420 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9421 > inl forall' fn (head :: tail) = -00:13:42 verbose #9422 > (true, tail) -00:13:42 verbose #9423 > ||> listm.fold fun acc x => -00:13:42 verbose #9424 > acc && x = head -00:13:42 verbose #9425 > -00:13:42 verbose #9426 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9427 > //// test -00:13:42 verbose #9428 > -00:13:42 verbose #9429 > [[ 1i32; 1; 1; 1; 1 ]] -00:13:42 verbose #9430 > |> forall' ((=) 1i32) -00:13:42 verbose #9431 > |> _assert_eq true -00:13:42 verbose #9432 > -00:13:42 verbose #9433 > ╭─[ 36.90ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9434 > │ assert_eq / actual: true / expected: true │ -00:13:42 verbose #9435 > │ │ -00:13:42 verbose #9436 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9437 > -00:13:42 verbose #9438 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9439 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9440 > │ ## last │ -00:13:42 verbose #9441 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9442 > -00:13:42 verbose #9443 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9444 > inl last list = -00:13:42 verbose #9445 > list -00:13:42 verbose #9446 > |> listm.rev -00:13:42 verbose #9447 > |> item 0i32 -00:13:42 verbose #9448 > -00:13:42 verbose #9449 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9450 > //// test -00:13:42 verbose #9451 > -00:13:42 verbose #9452 > listm.init 10i32 id -00:13:42 verbose #9453 > |> last -00:13:42 verbose #9454 > |> _assert_eq 9 -00:13:42 verbose #9455 > -00:13:42 verbose #9456 > ╭─[ 27.34ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9457 > │ assert_eq / actual: 9 / expected: 9 │ -00:13:42 verbose #9458 > │ │ -00:13:42 verbose #9459 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9460 > -00:13:42 verbose #9461 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:42 verbose #9462 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:42 verbose #9463 > │ ## try_pick │ -00:13:42 verbose #9464 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9465 > -00:13:42 verbose #9466 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9467 > inl try_pick fn list = -00:13:42 verbose #9468 > inl rec body fn = function -00:13:42 verbose #9469 > | [[]] => None -00:13:42 verbose #9470 > | x :: xs => -00:13:42 verbose #9471 > match fn x with -00:13:42 verbose #9472 > | Some y => Some y -00:13:42 verbose #9473 > | None => loop xs -00:13:42 verbose #9474 > and inl loop list = -00:13:42 verbose #9475 > if var_is list |> not -00:13:42 verbose #9476 > then body fn list -00:13:42 verbose #9477 > else -00:13:42 verbose #9478 > inl fn = join fn -00:13:42 verbose #9479 > inl list = dyn list -00:13:42 verbose #9480 > join body fn list -00:13:42 verbose #9481 > loop list -00:13:42 verbose #9482 > -00:13:42 verbose #9483 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:42 verbose #9484 > //// test -00:13:42 verbose #9485 > -00:13:42 verbose #9486 > listm.init 10i32 id -00:13:42 verbose #9487 > |> try_pick (fun x => if x = 5i32 then Some x else None) -00:13:42 verbose #9488 > |> _assert_eq (Some 5i32) -00:13:42 verbose #9489 > -00:13:42 verbose #9490 > ╭─[ 54.48ms - stdout ]─────────────────────────────────────────────────────────╮ -00:13:42 verbose #9491 > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │ -00:13:42 verbose #9492 > │ │ -00:13:42 verbose #9493 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:42 verbose #9494 > 00:00:09 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 29736 -00:13:42 verbose #9495 > 00:00:09 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:13:46 verbose #9496 > 00:00:14 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb to html\e[0m -00:13:46 verbose #9497 > 00:00:14 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:13:46 verbose #9498 > 00:00:14 verbose #7 \e[4;7m validate(nb)\e[0m -00:13:46 verbose #9499 > 00:00:14 verbose #8 \e[4;7m[NbConvertApp] Writing 368247 bytes to c:\home\git\polyglot\lib\spiral\listm'.dib.html\e[0m -00:13:46 verbose #9500 > 00:00:14 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 603 -00:13:46 verbose #9501 > 00:00:14 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 603 -00:13:46 verbose #9502 > 00:00:14 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/listm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/listm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:13:47 verbose #9503 > 00:00:14 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:13:47 verbose #9504 > 00:00:14 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:13:47 verbose #9505 > 00:00:15 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 30398 -00:13:47 debug #9506 execute_with_options_async / exit_code: 0 / output.Length: 32709 -00:13:47 debug #18 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path listm'.dib --retries 3 -00:13:47 debug #9507 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path util.dib --retries 3", +00:06:05 verbose #8954 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "listm'.dib", "--retries", "3"]) +00:06:05 verbose #8955 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/listm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/listm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:06:07 verbose #8956 > > +00:06:07 verbose #8957 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:07 verbose #8958 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:07 verbose #8959 > > │ # listm │ +00:06:07 verbose #8960 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:07 verbose #8961 > > +00:06:07 verbose #8962 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:07 verbose #8963 > > //// test +00:06:07 verbose #8964 > > +00:06:07 verbose #8965 > > open testing +00:06:07 verbose #8966 > > +00:06:07 verbose #8967 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:06:07 verbose #8968 > > #r +00:06:07 verbose #8969 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:06:07 verbose #8970 > > otNet.Interactive.Spiral.dll" +00:06:07 verbose #8971 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:06:07 verbose #8972 > > #r +00:06:07 verbose #8973 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:06:07 verbose #8974 > > otNet.Interactive.dll" +00:06:07 verbose #8975 > > open type Microsoft.DotNet.Interactive.Kernel +00:06:11 verbose #8976 > > +00:06:11 verbose #8977 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:11 verbose #8978 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:11 verbose #8979 > > │ ## list' │ +00:06:11 verbose #8980 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:11 verbose #8981 > > +00:06:11 verbose #8982 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #8983 > > nominal list' t = $'`t list' +00:06:11 verbose #8984 > > +00:06:11 verbose #8985 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #8986 > > inl empty' forall t. () : list' t = +00:06:11 verbose #8987 > > $'[[]]' +00:06:11 verbose #8988 > > +00:06:11 verbose #8989 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #8990 > > inl cons' forall t. (head : t) (tail : list' t) : list' t = +00:06:11 verbose #8991 > > $'!head :: !tail ' +00:06:11 verbose #8992 > > +00:06:11 verbose #8993 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:11 verbose #8994 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:11 verbose #8995 > > │ ## box │ +00:06:11 verbose #8996 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:11 verbose #8997 > > +00:06:11 verbose #8998 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #8999 > > inl box forall t. (list : list t) : list' t = +00:06:11 verbose #9000 > > (list, empty' ()) +00:06:11 verbose #9001 > > ||> listm.foldBack fun x acc => +00:06:11 verbose #9002 > > acc |> cons' x +00:06:11 verbose #9003 > > +00:06:11 verbose #9004 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:11 verbose #9005 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:11 verbose #9006 > > │ ## fold' │ +00:06:11 verbose #9007 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:11 verbose #9008 > > +00:06:11 verbose #9009 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #9010 > > inl fold' forall t u. (fn : t -> u) (init : list u) (list : list' t) : list u = +00:06:11 verbose #9011 > > (init, list) +00:06:11 verbose #9012 > > ||> $'List.fold' join fun acc x => Cons (fn x, acc) +00:06:11 verbose #9013 > > +00:06:11 verbose #9014 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:11 verbose #9015 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:11 verbose #9016 > > │ ## fold_back' │ +00:06:11 verbose #9017 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:11 verbose #9018 > > +00:06:11 verbose #9019 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #9020 > > inl fold_back' forall t u. (fn : t -> u) (list : list' t) (init : list u) : list +00:06:11 verbose #9021 > > u = +00:06:11 verbose #9022 > > (list, init) +00:06:11 verbose #9023 > > ||> $'List.foldBack' join fun x acc => Cons (fn x, acc) +00:06:11 verbose #9024 > > +00:06:11 verbose #9025 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:11 verbose #9026 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:11 verbose #9027 > > │ ## filter' │ +00:06:11 verbose #9028 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:11 verbose #9029 > > +00:06:11 verbose #9030 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #9031 > > inl filter' forall t. (fn : t -> bool) (list : list' t) : list' t = +00:06:11 verbose #9032 > > list |> $'"List.filter !fn"' +00:06:11 verbose #9033 > > +00:06:11 verbose #9034 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:11 verbose #9035 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:11 verbose #9036 > > │ ## filter │ +00:06:11 verbose #9037 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:11 verbose #9038 > > +00:06:11 verbose #9039 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #9040 > > inl filter forall t. (fn : t -> bool) (list : list t) : list t = +00:06:11 verbose #9041 > > (list, Nil) +00:06:11 verbose #9042 > > ||> listm.foldBack fun x acc => +00:06:11 verbose #9043 > > if fn x then x :: acc else acc +00:06:11 verbose #9044 > > +00:06:11 verbose #9045 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:11 verbose #9046 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:11 verbose #9047 > > │ ## unbox │ +00:06:11 verbose #9048 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:11 verbose #9049 > > +00:06:11 verbose #9050 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #9051 > > inl unbox forall t. (list : list' t) : list t = +00:06:11 verbose #9052 > > (list, Nil) +00:06:11 verbose #9053 > > ||> fold_back' id +00:06:11 verbose #9054 > > +00:06:11 verbose #9055 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:11 verbose #9056 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:11 verbose #9057 > > │ ## distinct' │ +00:06:11 verbose #9058 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:11 verbose #9059 > > +00:06:11 verbose #9060 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #9061 > > inl distinct' forall t. (list : list' t) : list' t = +00:06:11 verbose #9062 > > list |> $'List.distinct' +00:06:11 verbose #9063 > > +00:06:11 verbose #9064 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:11 verbose #9065 > > //// test +00:06:11 verbose #9066 > > +00:06:11 verbose #9067 > > [[ "1"; "2"; "2"; "3" ]] +00:06:11 verbose #9068 > > |> box +00:06:11 verbose #9069 > > |> distinct' +00:06:11 verbose #9070 > > |> unbox +00:06:11 verbose #9071 > > |> _assert_eq [[ "1"; "2"; "3" ]] +00:06:13 verbose #9072 > > +00:06:13 verbose #9073 > > ╭─[ 1.07s - stdout ]───────────────────────────────────────────────────────────╮ +00:06:13 verbose #9074 > > │ assert_eq / actual: UH0_1 ("1", UH0_1 ("2", UH0_1 ("3", UH0_0))) / expected: │ +00:06:13 verbose #9075 > > │ UH0_1 ("1", UH0_1 ("2", UH0_1 ("3", UH0_0))) │ +00:06:13 verbose #9076 > > │ │ +00:06:13 verbose #9077 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9078 > > +00:06:13 verbose #9079 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9080 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9081 > > │ ## to_array' │ +00:06:13 verbose #9082 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9083 > > +00:06:13 verbose #9084 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9085 > > inl to_array' forall dim t. (items : list' t) : a dim t = +00:06:13 verbose #9086 > > items |> $'List.toArray' +00:06:13 verbose #9087 > > +00:06:13 verbose #9088 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9089 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9090 > > │ ## append │ +00:06:13 verbose #9091 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9092 > > +00:06:13 verbose #9093 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9094 > > instance append list t = +00:06:13 verbose #9095 > > listm.append +00:06:13 verbose #9096 > > +00:06:13 verbose #9097 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9098 > > //// test +00:06:13 verbose #9099 > > +00:06:13 verbose #9100 > > [[ "a"; "b" ]] ++ [[ "c"; "d" ]] +00:06:13 verbose #9101 > > |> _assert_eq [[ "a"; "b"; "c"; "d" ]] +00:06:13 verbose #9102 > > +00:06:13 verbose #9103 > > ╭─[ 57.90ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9104 > > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_1 ("c", UH0_1 ("d", │ +00:06:13 verbose #9105 > > │ UH0_0)))) / expected: UH0_1 ("a", UH0_1 ("b", UH0_1 ("c", UH0_1 ("d", │ +00:06:13 verbose #9106 > > │ UH0_0)))) │ +00:06:13 verbose #9107 > > │ │ +00:06:13 verbose #9108 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9109 > > +00:06:13 verbose #9110 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9111 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9112 > > │ ## collect │ +00:06:13 verbose #9113 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9114 > > +00:06:13 verbose #9115 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9116 > > inl collect forall t r. (fn : t -> list r) (items : list t) : list r = +00:06:13 verbose #9117 > > items +00:06:13 verbose #9118 > > |> listm.map fn +00:06:13 verbose #9119 > > |> listm.fold (++) [[]] +00:06:13 verbose #9120 > > +00:06:13 verbose #9121 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9122 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9123 > > │ ## init_series │ +00:06:13 verbose #9124 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9125 > > +00:06:13 verbose #9126 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9127 > > inl init_series start end inc = +00:06:13 verbose #9128 > > inl total : f64 = conv ((end - start) / inc) + 1 +00:06:13 verbose #9129 > > listm.init total (conv >> (*) inc >> (+) start) +00:06:13 verbose #9130 > > +00:06:13 verbose #9131 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9132 > > //// test +00:06:13 verbose #9133 > > +00:06:13 verbose #9134 > > init_series 0 1 0.5 +00:06:13 verbose #9135 > > |> _assert_eq [[ 0f64; 0.5; 1 ]] +00:06:13 verbose #9136 > > +00:06:13 verbose #9137 > > ╭─[ 54.76ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9138 > > │ assert_eq / actual: UH0_1 (0.0, UH0_1 (0.5, UH0_1 (1.0, UH0_0))) / expected: │ +00:06:13 verbose #9139 > > │ UH0_1 (0.0, UH0_1 (0.5, UH0_1 (1.0, UH0_0))) │ +00:06:13 verbose #9140 > > │ │ +00:06:13 verbose #9141 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9142 > > +00:06:13 verbose #9143 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9144 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9145 > > │ ## try_item │ +00:06:13 verbose #9146 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9147 > > +00:06:13 verbose #9148 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9149 > > inl rec try_item i = function +00:06:13 verbose #9150 > > | Cons (x, _) when i = 0 => Some x +00:06:13 verbose #9151 > > | Cons (_, xs) => try_item (i - 1) xs +00:06:13 verbose #9152 > > | Nil => None +00:06:13 verbose #9153 > > +00:06:13 verbose #9154 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9155 > > //// test +00:06:13 verbose #9156 > > +00:06:13 verbose #9157 > > listm.init 10i32 id +00:06:13 verbose #9158 > > |> try_item 9i32 +00:06:13 verbose #9159 > > |> _assert_eq (Some 9) +00:06:13 verbose #9160 > > +00:06:13 verbose #9161 > > ╭─[ 70.64ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9162 > > │ assert_eq / actual: US0_0 9 / expected: US0_0 9 │ +00:06:13 verbose #9163 > > │ │ +00:06:13 verbose #9164 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9165 > > +00:06:13 verbose #9166 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9167 > > //// test +00:06:13 verbose #9168 > > +00:06:13 verbose #9169 > > listm.init 10i32 id +00:06:13 verbose #9170 > > |> try_item 10i32 +00:06:13 verbose #9171 > > |> _assert_eq None +00:06:13 verbose #9172 > > +00:06:13 verbose #9173 > > ╭─[ 38.29ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9174 > > │ assert_eq / actual: US0_1 / expected: US0_1 │ +00:06:13 verbose #9175 > > │ │ +00:06:13 verbose #9176 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9177 > > +00:06:13 verbose #9178 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9179 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9180 > > │ ## list_item │ +00:06:13 verbose #9181 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9182 > > +00:06:13 verbose #9183 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9184 > > inl item i = +00:06:13 verbose #9185 > > try_item i >> optionm.value +00:06:13 verbose #9186 > > +00:06:13 verbose #9187 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9188 > > //// test +00:06:13 verbose #9189 > > +00:06:13 verbose #9190 > > listm.init 10i32 id +00:06:13 verbose #9191 > > |> item 9i32 +00:06:13 verbose #9192 > > |> _assert_eq 9 +00:06:13 verbose #9193 > > +00:06:13 verbose #9194 > > ╭─[ 15.51ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9195 > > │ assert_eq / actual: 9 / expected: 9 │ +00:06:13 verbose #9196 > > │ │ +00:06:13 verbose #9197 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9198 > > +00:06:13 verbose #9199 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9200 > > //// test +00:06:13 verbose #9201 > > +00:06:13 verbose #9202 > > fun () => +00:06:13 verbose #9203 > > listm.init 10i32 id +00:06:13 verbose #9204 > > |> item 10i32 +00:06:13 verbose #9205 > > |> ignore +00:06:13 verbose #9206 > > |> _throws +00:06:13 verbose #9207 > > |> optionm.map sm'.format_exception +00:06:13 verbose #9208 > > |> _assert_eq (Some "System.Exception: Option does not have a value.") +00:06:13 verbose #9209 > > +00:06:13 verbose #9210 > > ╭─[ 153.51ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:13 verbose #9211 > > │ assert_eq / actual: US1_0 "System.Exception: Option does not have a value." │ +00:06:13 verbose #9212 > > │ / expected: US1_0 "System.Exception: Option does not have a value." │ +00:06:13 verbose #9213 > > │ │ +00:06:13 verbose #9214 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9215 > > +00:06:13 verbose #9216 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9217 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9218 > > │ ## try_item_ │ +00:06:13 verbose #9219 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9220 > > +00:06:13 verbose #9221 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9222 > > let rec try_item_ i = function +00:06:13 verbose #9223 > > | Cons (x, _) when i = 0 => Some x +00:06:13 verbose #9224 > > | Cons (_, xs) => try_item_ (i - 1) xs +00:06:13 verbose #9225 > > | Nil => None +00:06:13 verbose #9226 > > +00:06:13 verbose #9227 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9228 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9229 > > │ ## item_ │ +00:06:13 verbose #9230 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9231 > > +00:06:13 verbose #9232 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9233 > > inl item_ i = +00:06:13 verbose #9234 > > try_item_ i >> optionm.value +00:06:13 verbose #9235 > > +00:06:13 verbose #9236 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9237 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9238 > > │ ## sum │ +00:06:13 verbose #9239 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9240 > > +00:06:13 verbose #9241 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9242 > > inl sum list = +00:06:13 verbose #9243 > > list |> listm.fold (+) 0 +00:06:13 verbose #9244 > > +00:06:13 verbose #9245 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9246 > > //// test +00:06:13 verbose #9247 > > +00:06:13 verbose #9248 > > listm.init 10i32 id +00:06:13 verbose #9249 > > |> sum +00:06:13 verbose #9250 > > |> _assert_eq 45 +00:06:13 verbose #9251 > > +00:06:13 verbose #9252 > > ╭─[ 26.45ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9253 > > │ assert_eq / actual: 45 / expected: 45 │ +00:06:13 verbose #9254 > > │ │ +00:06:13 verbose #9255 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9256 > > +00:06:13 verbose #9257 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9258 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9259 > > │ ## unzip │ +00:06:13 verbose #9260 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9261 > > +00:06:13 verbose #9262 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9263 > > inl unzip list = +00:06:13 verbose #9264 > > (([[]], [[]]), list) +00:06:13 verbose #9265 > > ||> listm.fold fun (acc_x, acc_y) (x, y) => +00:06:13 verbose #9266 > > x :: acc_x, y :: acc_y +00:06:13 verbose #9267 > > |> fun x, y => +00:06:13 verbose #9268 > > x |> listm.rev, y |> listm.rev +00:06:13 verbose #9269 > > +00:06:13 verbose #9270 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9271 > > //// test +00:06:13 verbose #9272 > > +00:06:13 verbose #9273 > > listm.init 10i32 id +00:06:13 verbose #9274 > > |> listm.map (fun x => x, x) +00:06:13 verbose #9275 > > |> unzip +00:06:13 verbose #9276 > > |> fun x, y => +00:06:13 verbose #9277 > > x |> sum +00:06:13 verbose #9278 > > |> _assert_eq 45 +00:06:13 verbose #9279 > > +00:06:13 verbose #9280 > > y |> sum +00:06:13 verbose #9281 > > |> _assert_eq 45 +00:06:13 verbose #9282 > > +00:06:13 verbose #9283 > > ╭─[ 22.64ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9284 > > │ assert_eq / actual: 45 / expected: 45 │ +00:06:13 verbose #9285 > > │ assert_eq / actual: 45 / expected: 45 │ +00:06:13 verbose #9286 > > │ │ +00:06:13 verbose #9287 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9288 > > +00:06:13 verbose #9289 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9290 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9291 > > │ ## try_index_of │ +00:06:13 verbose #9292 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9293 > > +00:06:13 verbose #9294 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9295 > > inl try_index_of item list = +00:06:13 verbose #9296 > > inl rec loop i = function +00:06:13 verbose #9297 > > | [[]] => None +00:06:13 verbose #9298 > > | x :: xs => +00:06:13 verbose #9299 > > if x = item +00:06:13 verbose #9300 > > then Some i +00:06:13 verbose #9301 > > else loop (i + 1) xs +00:06:13 verbose #9302 > > loop 0 list +00:06:13 verbose #9303 > > +00:06:13 verbose #9304 > > inl index_of item = +00:06:13 verbose #9305 > > try_index_of item >> optionm.value +00:06:13 verbose #9306 > > +00:06:13 verbose #9307 > > inl try_index_of_ item list = +00:06:13 verbose #9308 > > let rec loop i = function +00:06:13 verbose #9309 > > | [[]] => None +00:06:13 verbose #9310 > > | x :: xs => +00:06:13 verbose #9311 > > if x = item +00:06:13 verbose #9312 > > then Some i +00:06:13 verbose #9313 > > else loop (i + 1) xs +00:06:13 verbose #9314 > > loop 0 list +00:06:13 verbose #9315 > > +00:06:13 verbose #9316 > > inl index_of_ item = +00:06:13 verbose #9317 > > try_index_of_ item >> optionm.value +00:06:13 verbose #9318 > > +00:06:13 verbose #9319 > > inl try_index_of__ item list = +00:06:13 verbose #9320 > > inl i = mut 0 +00:06:13 verbose #9321 > > inl list = mut list +00:06:13 verbose #9322 > > inl result = mut None +00:06:13 verbose #9323 > > let rec loop () = +00:06:13 verbose #9324 > > match *list with +00:06:13 verbose #9325 > > | [[]] => result <- None +00:06:13 verbose #9326 > > | x :: xs => +00:06:13 verbose #9327 > > if x = item +00:06:13 verbose #9328 > > then result <- Some *i +00:06:13 verbose #9329 > > else +00:06:13 verbose #9330 > > i <- *i + 1 +00:06:13 verbose #9331 > > list <- xs +00:06:13 verbose #9332 > > loop () +00:06:13 verbose #9333 > > loop () +00:06:13 verbose #9334 > > *result +00:06:13 verbose #9335 > > +00:06:13 verbose #9336 > > inl index_of__ item = +00:06:13 verbose #9337 > > try_index_of__ item >> optionm.value +00:06:13 verbose #9338 > > +00:06:13 verbose #9339 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9340 > > //// test +00:06:13 verbose #9341 > > +00:06:13 verbose #9342 > > listm.init 10i32 id +00:06:13 verbose #9343 > > |> index_of 5i32 +00:06:13 verbose #9344 > > |> _assert_eq 5i32 +00:06:13 verbose #9345 > > +00:06:13 verbose #9346 > > ╭─[ 15.84ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9347 > > │ assert_eq / actual: 5 / expected: 5 │ +00:06:13 verbose #9348 > > │ │ +00:06:13 verbose #9349 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9350 > > +00:06:13 verbose #9351 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9352 > > //// test +00:06:13 verbose #9353 > > +00:06:13 verbose #9354 > > listm.init 10i32 id +00:06:13 verbose #9355 > > |> try_index_of 10i32 +00:06:13 verbose #9356 > > |> _assert_eq (None : option i32) +00:06:13 verbose #9357 > > +00:06:13 verbose #9358 > > ╭─[ 39.49ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9359 > > │ assert_eq / actual: US0_1 / expected: US0_1 │ +00:06:13 verbose #9360 > > │ │ +00:06:13 verbose #9361 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9362 > > +00:06:13 verbose #9363 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9364 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9365 > > │ ## try_find │ +00:06:13 verbose #9366 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9367 > > +00:06:13 verbose #9368 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9369 > > inl try_find fn list = +00:06:13 verbose #9370 > > inl rec loop = function +00:06:13 verbose #9371 > > | [[]] => None +00:06:13 verbose #9372 > > | x :: xs => +00:06:13 verbose #9373 > > if fn x +00:06:13 verbose #9374 > > then Some x +00:06:13 verbose #9375 > > else loop xs +00:06:13 verbose #9376 > > loop list +00:06:13 verbose #9377 > > +00:06:13 verbose #9378 > > inl try_find_ fn list = +00:06:13 verbose #9379 > > let rec loop = function +00:06:13 verbose #9380 > > | [[]] => None +00:06:13 verbose #9381 > > | x :: xs => +00:06:13 verbose #9382 > > if fn x +00:06:13 verbose #9383 > > then Some x +00:06:13 verbose #9384 > > else loop xs +00:06:13 verbose #9385 > > loop list +00:06:13 verbose #9386 > > +00:06:13 verbose #9387 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9388 > > //// test +00:06:13 verbose #9389 > > +00:06:13 verbose #9390 > > listm.init 10i32 id +00:06:13 verbose #9391 > > |> try_find ((=) 5i32) +00:06:13 verbose #9392 > > |> _assert_eq (Some 5i32) +00:06:13 verbose #9393 > > +00:06:13 verbose #9394 > > ╭─[ 37.42ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9395 > > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │ +00:06:13 verbose #9396 > > │ │ +00:06:13 verbose #9397 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9398 > > +00:06:13 verbose #9399 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9400 > > inl find x = +00:06:13 verbose #9401 > > try_find x >> optionm.value +00:06:13 verbose #9402 > > +00:06:13 verbose #9403 > > inl find_ x = +00:06:13 verbose #9404 > > try_find_ x >> optionm.value +00:06:13 verbose #9405 > > +00:06:13 verbose #9406 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9407 > > //// test +00:06:13 verbose #9408 > > +00:06:13 verbose #9409 > > listm.init 10i32 id +00:06:13 verbose #9410 > > |> find ((=) 5i32) +00:06:13 verbose #9411 > > |> _assert_eq 5i32 +00:06:13 verbose #9412 > > +00:06:13 verbose #9413 > > ╭─[ 15.76ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9414 > > │ assert_eq / actual: 5 / expected: 5 │ +00:06:13 verbose #9415 > > │ │ +00:06:13 verbose #9416 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9417 > > +00:06:13 verbose #9418 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9419 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9420 > > │ ## choose │ +00:06:13 verbose #9421 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9422 > > +00:06:13 verbose #9423 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9424 > > inl choose f l = +00:06:13 verbose #9425 > > (l, [[]]) +00:06:13 verbose #9426 > > ||> listm.foldBack fun x acc => +00:06:13 verbose #9427 > > match f x with +00:06:13 verbose #9428 > > | Some y => y :: acc +00:06:13 verbose #9429 > > | None => acc +00:06:13 verbose #9430 > > +00:06:13 verbose #9431 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9432 > > //// test +00:06:13 verbose #9433 > > +00:06:13 verbose #9434 > > listm.init 10i32 id +00:06:13 verbose #9435 > > |> choose (fun x => if x % 2 = 0 then Some x else None) +00:06:13 verbose #9436 > > |> _assert_eq [[ 0; 2; 4; 6; 8 ]] +00:06:13 verbose #9437 > > +00:06:13 verbose #9438 > > ╭─[ 44.04ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9439 > > │ assert_eq / actual: UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, │ +00:06:13 verbose #9440 > > │ UH0_0))))) / expected: UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, │ +00:06:13 verbose #9441 > > │ UH0_0))))) │ +00:06:13 verbose #9442 > > │ │ +00:06:13 verbose #9443 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9444 > > +00:06:13 verbose #9445 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9446 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9447 > > │ ## zip_with │ +00:06:13 verbose #9448 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9449 > > +00:06:13 verbose #9450 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9451 > > inl zip_with fn xs ys = +00:06:13 verbose #9452 > > inl rec loop acc xs ys = +00:06:13 verbose #9453 > > match xs, ys with +00:06:13 verbose #9454 > > | Cons (x, xs), Cons (y, ys) => +00:06:13 verbose #9455 > > loop (fn x y :: acc) xs ys +00:06:13 verbose #9456 > > | _ => listm.rev acc +00:06:13 verbose #9457 > > loop [[]] xs ys +00:06:13 verbose #9458 > > +00:06:13 verbose #9459 > > inl zip_with_ fn xs ys = +00:06:13 verbose #9460 > > let rec loop acc xs ys = +00:06:13 verbose #9461 > > match xs, ys with +00:06:13 verbose #9462 > > | Cons (x, xs), Cons (y, ys) => +00:06:13 verbose #9463 > > loop (fn x y :: acc) xs ys +00:06:13 verbose #9464 > > | _ => listm.rev acc +00:06:13 verbose #9465 > > loop [[]] xs ys +00:06:13 verbose #9466 > > +00:06:13 verbose #9467 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9468 > > //// test +00:06:13 verbose #9469 > > +00:06:13 verbose #9470 > > ([[ 1i32; 2; 3 ]], [[ 4; 5; 6 ]]) +00:06:13 verbose #9471 > > ||> zip_with (+) +00:06:13 verbose #9472 > > |> _assert_eq [[ 5; 7; 9 ]] +00:06:13 verbose #9473 > > +00:06:13 verbose #9474 > > ╭─[ 46.29ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9475 > > │ assert_eq / actual: UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))) / expected: UH0_1 │ +00:06:13 verbose #9476 > > │ (5, UH0_1 (7, UH0_1 (9, UH0_0))) │ +00:06:13 verbose #9477 > > │ │ +00:06:13 verbose #9478 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9479 > > +00:06:13 verbose #9480 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9481 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9482 > > │ ## zip │ +00:06:13 verbose #9483 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9484 > > +00:06:13 verbose #9485 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9486 > > inl zip xs ys = +00:06:13 verbose #9487 > > zip_with pair xs ys +00:06:13 verbose #9488 > > +00:06:13 verbose #9489 > > inl zip_ xs ys = +00:06:13 verbose #9490 > > zip_with_ pair xs ys +00:06:13 verbose #9491 > > +00:06:13 verbose #9492 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9493 > > //// test +00:06:13 verbose #9494 > > +00:06:13 verbose #9495 > > ([[ 1i32; 2; 3 ]], [[ 4i32; 5; 6 ]]) +00:06:13 verbose #9496 > > ||> zip +00:06:13 verbose #9497 > > |> _assert_eq [[ 1, 4; 2, 5; 3, 6 ]] +00:06:13 verbose #9498 > > +00:06:13 verbose #9499 > > ╭─[ 86.79ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:13 verbose #9500 > > │ assert_eq / actual: UH0_1 (1, 4, UH0_1 (2, 5, UH0_1 (3, 6, UH0_0))) / │ +00:06:13 verbose #9501 > > │ expected: UH0_1 (1, 4, UH0_1 (2, 5, UH0_1 (3, 6, UH0_0))) │ +00:06:13 verbose #9502 > > │ │ +00:06:13 verbose #9503 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9504 > > +00:06:13 verbose #9505 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:13 verbose #9506 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:13 verbose #9507 > > │ ## indexed │ +00:06:13 verbose #9508 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:13 verbose #9509 > > +00:06:13 verbose #9510 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9511 > > inl indexed list = +00:06:13 verbose #9512 > > (([[]], 0), list) +00:06:13 verbose #9513 > > ||> listm.fold fun (acc, i) x => +00:06:13 verbose #9514 > > (i, x) :: acc, i + 1 +00:06:13 verbose #9515 > > |> fst +00:06:13 verbose #9516 > > |> listm.rev +00:06:13 verbose #9517 > > +00:06:13 verbose #9518 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:13 verbose #9519 > > //// test +00:06:13 verbose #9520 > > +00:06:13 verbose #9521 > > listm.init 5i32 ((*) 2) +00:06:13 verbose #9522 > > |> indexed +00:06:13 verbose #9523 > > |> _assert_eq [[ 0i32, 0; 1, 2; 2, 4; 3, 6; 4, 8 ]] +00:06:14 verbose #9524 > > +00:06:14 verbose #9525 > > ╭─[ 58.62ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:14 verbose #9526 > > │ assert_eq / actual: UH0_1 (0, 0, UH0_1 (1, 2, UH0_1 (2, 4, UH0_1 (3, 6, │ +00:06:14 verbose #9527 > > │ UH0_1 (4, 8, UH0_0))))) / expected: UH0_1 (0, 0, UH0_1 (1, 2, UH0_1 (2, 4, │ +00:06:14 verbose #9528 > > │ UH0_1 (3, 6, UH0_1 (4, 8, UH0_0))))) │ +00:06:14 verbose #9529 > > │ │ +00:06:14 verbose #9530 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:14 verbose #9531 > > +00:06:14 verbose #9532 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:14 verbose #9533 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:14 verbose #9534 > > │ ## group_by │ +00:06:14 verbose #9535 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:14 verbose #9536 > > +00:06:14 verbose #9537 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:14 verbose #9538 > > inl group_by fn list = +00:06:14 verbose #9539 > > (list, [[]]) +00:06:14 verbose #9540 > > ||> listm.foldBack fun x acc => +00:06:14 verbose #9541 > > inl xk = fn x +00:06:14 verbose #9542 > > inl found, new_acc = +00:06:14 verbose #9543 > > ((false, [[]]), acc) +00:06:14 verbose #9544 > > ||> listm.fold fun (found, acc') (k, xs) => +00:06:14 verbose #9545 > > if k = xk +00:06:14 verbose #9546 > > then true, (k, x :: xs) :: acc' +00:06:14 verbose #9547 > > else found, (k, xs) :: acc' +00:06:14 verbose #9548 > > if found +00:06:14 verbose #9549 > > then new_acc +00:06:14 verbose #9550 > > else (xk, [[ x ]]) :: new_acc +00:06:14 verbose #9551 > > +00:06:14 verbose #9552 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:14 verbose #9553 > > //// test +00:06:14 verbose #9554 > > +00:06:14 verbose #9555 > > listm.init 10i32 id +00:06:14 verbose #9556 > > |> group_by (fun x => x % 2 = 0) +00:06:14 verbose #9557 > > |> _assert_eq [[ true, [[ 0; 2; 4; 6; 8 ]]; false, [[ 1; 3; 5; 7; 9 ]] ]] +00:06:14 verbose #9558 > > +00:06:14 verbose #9559 > > ╭─[ 109.10ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:14 verbose #9560 > > │ assert_eq / actual: UH1_1 │ +00:06:14 verbose #9561 > > │ (true, UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, UH0_0))))), │ +00:06:14 verbose #9562 > > │ UH1_1 │ +00:06:14 verbose #9563 > > │ (false, UH0_1 (1, UH0_1 (3, UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))))), │ +00:06:14 verbose #9564 > > │ UH1_0)) / expected: UH1_1 │ +00:06:14 verbose #9565 > > │ (true, UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, UH0_0))))), │ +00:06:14 verbose #9566 > > │ UH1_1 │ +00:06:14 verbose #9567 > > │ (false, UH0_1 (1, UH0_1 (3, UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))))), │ +00:06:14 verbose #9568 > > │ UH1_0)) │ +00:06:14 verbose #9569 > > │ │ +00:06:14 verbose #9570 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:14 verbose #9571 > > +00:06:14 verbose #9572 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:14 verbose #9573 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:14 verbose #9574 > > │ ## forall' │ +00:06:14 verbose #9575 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:14 verbose #9576 > > +00:06:14 verbose #9577 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:14 verbose #9578 > > inl forall' fn (head :: tail) = +00:06:14 verbose #9579 > > (true, tail) +00:06:14 verbose #9580 > > ||> listm.fold fun acc x => +00:06:14 verbose #9581 > > acc && x = head +00:06:14 verbose #9582 > > +00:06:14 verbose #9583 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:14 verbose #9584 > > //// test +00:06:14 verbose #9585 > > +00:06:14 verbose #9586 > > [[ 1i32; 1; 1; 1; 1 ]] +00:06:14 verbose #9587 > > |> forall' ((=) 1i32) +00:06:14 verbose #9588 > > |> _assert_eq true +00:06:14 verbose #9589 > > +00:06:14 verbose #9590 > > ╭─[ 16.92ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:14 verbose #9591 > > │ assert_eq / actual: true / expected: true │ +00:06:14 verbose #9592 > > │ │ +00:06:14 verbose #9593 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:14 verbose #9594 > > +00:06:14 verbose #9595 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:14 verbose #9596 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:14 verbose #9597 > > │ ## last │ +00:06:14 verbose #9598 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:14 verbose #9599 > > +00:06:14 verbose #9600 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:14 verbose #9601 > > inl last list = +00:06:14 verbose #9602 > > list +00:06:14 verbose #9603 > > |> listm.rev +00:06:14 verbose #9604 > > |> item 0i32 +00:06:14 verbose #9605 > > +00:06:14 verbose #9606 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:14 verbose #9607 > > //// test +00:06:14 verbose #9608 > > +00:06:14 verbose #9609 > > listm.init 10i32 id +00:06:14 verbose #9610 > > |> last +00:06:14 verbose #9611 > > |> _assert_eq 9 +00:06:14 verbose #9612 > > +00:06:14 verbose #9613 > > ╭─[ 15.88ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:14 verbose #9614 > > │ assert_eq / actual: 9 / expected: 9 │ +00:06:14 verbose #9615 > > │ │ +00:06:14 verbose #9616 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:14 verbose #9617 > > +00:06:14 verbose #9618 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:14 verbose #9619 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:14 verbose #9620 > > │ ## try_pick │ +00:06:14 verbose #9621 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:14 verbose #9622 > > +00:06:14 verbose #9623 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:14 verbose #9624 > > inl try_pick fn list = +00:06:14 verbose #9625 > > inl rec body fn = function +00:06:14 verbose #9626 > > | [[]] => None +00:06:14 verbose #9627 > > | x :: xs => +00:06:14 verbose #9628 > > match fn x with +00:06:14 verbose #9629 > > | Some y => Some y +00:06:14 verbose #9630 > > | None => loop xs +00:06:14 verbose #9631 > > and inl loop list = +00:06:14 verbose #9632 > > if var_is list |> not +00:06:14 verbose #9633 > > then body fn list +00:06:14 verbose #9634 > > else +00:06:14 verbose #9635 > > inl fn = join fn +00:06:14 verbose #9636 > > inl list = dyn list +00:06:14 verbose #9637 > > join body fn list +00:06:14 verbose #9638 > > loop list +00:06:14 verbose #9639 > > +00:06:14 verbose #9640 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:14 verbose #9641 > > //// test +00:06:14 verbose #9642 > > +00:06:14 verbose #9643 > > listm.init 10i32 id +00:06:14 verbose #9644 > > |> try_pick (fun x => if x = 5i32 then Some x else None) +00:06:14 verbose #9645 > > |> _assert_eq (Some 5i32) +00:06:14 verbose #9646 > > +00:06:14 verbose #9647 > > ╭─[ 37.15ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:14 verbose #9648 > > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │ +00:06:14 verbose #9649 > > │ │ +00:06:14 verbose #9650 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:14 verbose #9651 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 29736 +00:06:14 verbose #9652 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:06:16 verbose #9653 > 00:00:10 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb to html +00:06:16 verbose #9654 > 00:00:10 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:06:16 verbose #9655 > 00:00:10 verbose #7 ! validate(nb) +00:06:17 verbose #9656 > 00:00:12 verbose #8 ! [NbConvertApp] Writing 368247 bytes to c:\home\git\polyglot\lib\spiral\listm'.dib.html +00:06:18 verbose #9657 > 00:00:12 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 643 +00:06:18 verbose #9658 > 00:00:12 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 643 +00:06:18 verbose #9659 > 00:00:12 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/listm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/listm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:06:18 verbose #9660 > 00:00:13 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:06:18 verbose #9661 > 00:00:13 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:06:19 verbose #9662 > 00:00:13 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 30438 +00:06:19 debug #9663 execute_with_options_async / exit_code: 0 / output.Length: 34059 +00:06:19 debug #18 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path listm'.dib --retries 3 +00:06:19 debug #9664 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path util.dib --retries 3", [||], None, None, true, None) -00:13:47 verbose #9508 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "util.dib", "--retries", "3"]) -00:13:47 verbose #9509 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/util.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/util.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/util.dib" --output-path "c:/home/git/polyglot/lib/spiral/util.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:13:55 verbose #9510 > -00:13:55 verbose #9511 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:55 verbose #9512 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:55 verbose #9513 > │ # util │ -00:13:55 verbose #9514 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:55 verbose #9515 > -00:13:55 verbose #9516 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:55 verbose #9517 > //// test -00:13:55 verbose #9518 > -00:13:55 verbose #9519 > open testing -00:13:55 verbose #9520 > -00:13:55 verbose #9521 > ── spiral - import ───────────────────────────────────────────────────────────── -00:13:55 verbose #9522 > #r -00:13:55 verbose #9523 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:13:55 verbose #9524 > otNet.Interactive.Spiral.dll" -00:13:55 verbose #9525 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:13:55 verbose #9526 > #r -00:13:55 verbose #9527 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:13:55 verbose #9528 > otNet.Interactive.dll" -00:13:55 verbose #9529 > open type Microsoft.DotNet.Interactive.Kernel -00:13:55 verbose #9530 > -00:13:55 verbose #9531 > ── markdown ──────────────────────────────────────────────────────────────────── -00:13:55 verbose #9532 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:13:55 verbose #9533 > │ ## ski │ -00:13:55 verbose #9534 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:55 verbose #9535 > -00:13:55 verbose #9536 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:55 verbose #9537 > union rec ski = -00:13:55 verbose #9538 > | I -00:13:55 verbose #9539 > | K -00:13:55 verbose #9540 > | S -00:13:55 verbose #9541 > | App : ski * ski -00:13:55 verbose #9542 > -00:13:55 verbose #9543 > inl rec eval ski = -00:13:55 verbose #9544 > match ski with -00:13:55 verbose #9545 > | App (App (K, x), y) => eval x -00:13:55 verbose #9546 > | App (App (App (S, x), y), z) => eval (App (App (x, z), App (y, z))) -00:13:55 verbose #9547 > | App (I, x) => eval x -00:13:55 verbose #9548 > | App (K, x) => App (K, eval x) -00:13:55 verbose #9549 > | App (f, x) => eval (App (eval f, x)) -00:13:55 verbose #9550 > | _ => ski -00:13:55 verbose #9551 > -00:13:55 verbose #9552 > ── spiral ────────────────────────────────────────────────────────────────────── -00:13:55 verbose #9553 > //// test -00:13:55 verbose #9554 > -00:13:55 verbose #9555 > eval I -00:13:55 verbose #9556 > |> _assert_eq I -00:13:55 verbose #9557 > -00:13:55 verbose #9558 > eval (App (I, I)) -00:13:55 verbose #9559 > |> _assert_eq I -00:13:55 verbose #9560 > -00:13:55 verbose #9561 > eval (App (I, App (I, I))) -00:13:55 verbose #9562 > |> _assert_eq I -00:13:55 verbose #9563 > -00:13:55 verbose #9564 > eval (App (App (I, I), I)) -00:13:55 verbose #9565 > |> _assert_eq I -00:13:55 verbose #9566 > -00:13:55 verbose #9567 > eval (App (App (App (I, I), I), I)) -00:13:55 verbose #9568 > |> _assert_eq I -00:13:55 verbose #9569 > -00:13:55 verbose #9570 > eval K -00:13:55 verbose #9571 > |> _assert_eq K -00:13:55 verbose #9572 > -00:13:55 verbose #9573 > eval (App (K, I)) -00:13:55 verbose #9574 > |> _assert_eq (App (K, I)) -00:13:55 verbose #9575 > -00:13:55 verbose #9576 > eval (App (K, K)) -00:13:55 verbose #9577 > |> _assert_eq (App (K, K)) -00:13:55 verbose #9578 > -00:13:55 verbose #9579 > eval (App (App (K, I), K)) -00:13:55 verbose #9580 > |> _assert_eq I -00:13:55 verbose #9581 > -00:13:55 verbose #9582 > eval (App (App (K, K), I)) -00:13:55 verbose #9583 > |> _assert_eq K -00:13:55 verbose #9584 > -00:13:55 verbose #9585 > eval (App (App (App (App (K, K), I), S), K)) -00:13:55 verbose #9586 > |> _assert_eq S -00:13:55 verbose #9587 > -00:13:55 verbose #9588 > eval S -00:13:55 verbose #9589 > |> _assert_eq S -00:13:55 verbose #9590 > -00:13:55 verbose #9591 > eval (App (App (App (S, I), I), I)) -00:13:55 verbose #9592 > |> _assert_eq I -00:13:55 verbose #9593 > -00:13:55 verbose #9594 > eval (App (App (App (S, K), K), I)) -00:13:55 verbose #9595 > |> _assert_eq I -00:13:55 verbose #9596 > -00:13:55 verbose #9597 > eval (App (App (App (S, K), I), (App (App (K, I), S)))) -00:13:55 verbose #9598 > |> _assert_eq I -00:13:55 verbose #9599 > -00:13:55 verbose #9600 > eval (App (App (K, S), App (I, App (App (App (S, K), S), I)))) -00:13:55 verbose #9601 > |> _assert_eq S -00:13:55 verbose #9602 > -00:13:55 verbose #9603 > eval (App (App (App (S, K), I), K)) -00:13:55 verbose #9604 > |> _assert_eq K -00:13:55 verbose #9605 > -00:13:55 verbose #9606 > ╭─[ 1.26s - stdout ]───────────────────────────────────────────────────────────╮ -00:13:55 verbose #9607 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ -00:13:55 verbose #9608 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ -00:13:55 verbose #9609 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ -00:13:55 verbose #9610 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ -00:13:55 verbose #9611 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ -00:13:55 verbose #9612 > │ assert_eq / actual: UH0_1 / expected: UH0_1 │ -00:13:55 verbose #9613 > │ assert_eq / actual: UH0_3 (UH0_1, UH0_0) / expected: UH0_3 (UH0_1, UH0_0) │ -00:13:55 verbose #9614 > │ assert_eq / actual: UH0_3 (UH0_1, UH0_1) / expected: UH0_3 (UH0_1, UH0_1) │ -00:13:55 verbose #9615 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ -00:13:55 verbose #9616 > │ assert_eq / actual: UH0_1 / expected: UH0_1 │ -00:13:55 verbose #9617 > │ assert_eq / actual: UH0_2 / expected: UH0_2 │ -00:13:55 verbose #9618 > │ assert_eq / actual: UH0_2 / expected: UH0_2 │ -00:13:55 verbose #9619 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ -00:13:55 verbose #9620 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ -00:13:55 verbose #9621 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ -00:13:55 verbose #9622 > │ assert_eq / actual: UH0_2 / expected: UH0_2 │ -00:13:55 verbose #9623 > │ assert_eq / actual: UH0_1 / expected: UH0_1 │ -00:13:55 verbose #9624 > │ │ -00:13:55 verbose #9625 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:13:55 verbose #9626 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 4096 -00:13:55 verbose #9627 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/util.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/util.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:13:59 verbose #9628 > 00:00:11 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/util.dib.ipynb to html\e[0m -00:13:59 verbose #9629 > 00:00:11 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:13:59 verbose #9630 > 00:00:11 verbose #7 \e[4;7m validate(nb)\e[0m -00:13:59 verbose #9631 > 00:00:11 verbose #8 \e[4;7m[NbConvertApp] Writing 284191 bytes to c:\home\git\polyglot\lib\spiral\util.dib.html\e[0m -00:13:59 verbose #9632 > 00:00:11 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 599 -00:13:59 verbose #9633 > 00:00:11 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 599 -00:13:59 verbose #9634 > 00:00:11 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/util.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/util.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:14:00 verbose #9635 > 00:00:12 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:14:00 verbose #9636 > 00:00:12 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:14:00 verbose #9637 > 00:00:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 4754 -00:14:00 debug #9638 execute_with_options_async / exit_code: 0 / output.Length: 7043 -00:14:00 debug #19 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path util.dib --retries 3 -00:14:00 debug #9639 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path stream.dib --retries 3", +00:06:19 verbose #9665 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "util.dib", "--retries", "3"]) +00:06:19 verbose #9666 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/util.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/util.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/util.dib" --output-path "c:/home/git/polyglot/lib/spiral/util.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:06:21 verbose #9667 > > +00:06:21 verbose #9668 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:21 verbose #9669 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:21 verbose #9670 > > │ # util │ +00:06:21 verbose #9671 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:21 verbose #9672 > > +00:06:21 verbose #9673 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:21 verbose #9674 > > //// test +00:06:21 verbose #9675 > > +00:06:21 verbose #9676 > > open testing +00:06:21 verbose #9677 > > +00:06:21 verbose #9678 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:06:21 verbose #9679 > > #r +00:06:21 verbose #9680 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:06:21 verbose #9681 > > otNet.Interactive.Spiral.dll" +00:06:21 verbose #9682 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:06:21 verbose #9683 > > #r +00:06:21 verbose #9684 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:06:21 verbose #9685 > > otNet.Interactive.dll" +00:06:21 verbose #9686 > > open type Microsoft.DotNet.Interactive.Kernel +00:06:25 verbose #9687 > > +00:06:25 verbose #9688 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:25 verbose #9689 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:25 verbose #9690 > > │ ## ski │ +00:06:25 verbose #9691 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:25 verbose #9692 > > +00:06:25 verbose #9693 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:25 verbose #9694 > > union rec ski = +00:06:25 verbose #9695 > > | I +00:06:25 verbose #9696 > > | K +00:06:25 verbose #9697 > > | S +00:06:25 verbose #9698 > > | App : ski * ski +00:06:25 verbose #9699 > > +00:06:25 verbose #9700 > > inl rec eval ski = +00:06:25 verbose #9701 > > match ski with +00:06:25 verbose #9702 > > | App (App (K, x), y) => eval x +00:06:25 verbose #9703 > > | App (App (App (S, x), y), z) => eval (App (App (x, z), App (y, z))) +00:06:25 verbose #9704 > > | App (I, x) => eval x +00:06:25 verbose #9705 > > | App (K, x) => App (K, eval x) +00:06:25 verbose #9706 > > | App (f, x) => eval (App (eval f, x)) +00:06:25 verbose #9707 > > | _ => ski +00:06:25 verbose #9708 > > +00:06:25 verbose #9709 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:25 verbose #9710 > > //// test +00:06:25 verbose #9711 > > +00:06:25 verbose #9712 > > eval I +00:06:25 verbose #9713 > > |> _assert_eq I +00:06:25 verbose #9714 > > +00:06:25 verbose #9715 > > eval (App (I, I)) +00:06:25 verbose #9716 > > |> _assert_eq I +00:06:25 verbose #9717 > > +00:06:25 verbose #9718 > > eval (App (I, App (I, I))) +00:06:25 verbose #9719 > > |> _assert_eq I +00:06:25 verbose #9720 > > +00:06:25 verbose #9721 > > eval (App (App (I, I), I)) +00:06:25 verbose #9722 > > |> _assert_eq I +00:06:25 verbose #9723 > > +00:06:25 verbose #9724 > > eval (App (App (App (I, I), I), I)) +00:06:25 verbose #9725 > > |> _assert_eq I +00:06:25 verbose #9726 > > +00:06:25 verbose #9727 > > eval K +00:06:25 verbose #9728 > > |> _assert_eq K +00:06:25 verbose #9729 > > +00:06:25 verbose #9730 > > eval (App (K, I)) +00:06:25 verbose #9731 > > |> _assert_eq (App (K, I)) +00:06:25 verbose #9732 > > +00:06:25 verbose #9733 > > eval (App (K, K)) +00:06:25 verbose #9734 > > |> _assert_eq (App (K, K)) +00:06:25 verbose #9735 > > +00:06:25 verbose #9736 > > eval (App (App (K, I), K)) +00:06:25 verbose #9737 > > |> _assert_eq I +00:06:25 verbose #9738 > > +00:06:25 verbose #9739 > > eval (App (App (K, K), I)) +00:06:25 verbose #9740 > > |> _assert_eq K +00:06:25 verbose #9741 > > +00:06:25 verbose #9742 > > eval (App (App (App (App (K, K), I), S), K)) +00:06:25 verbose #9743 > > |> _assert_eq S +00:06:25 verbose #9744 > > +00:06:25 verbose #9745 > > eval S +00:06:25 verbose #9746 > > |> _assert_eq S +00:06:25 verbose #9747 > > +00:06:25 verbose #9748 > > eval (App (App (App (S, I), I), I)) +00:06:25 verbose #9749 > > |> _assert_eq I +00:06:25 verbose #9750 > > +00:06:25 verbose #9751 > > eval (App (App (App (S, K), K), I)) +00:06:25 verbose #9752 > > |> _assert_eq I +00:06:25 verbose #9753 > > +00:06:25 verbose #9754 > > eval (App (App (App (S, K), I), (App (App (K, I), S)))) +00:06:25 verbose #9755 > > |> _assert_eq I +00:06:25 verbose #9756 > > +00:06:25 verbose #9757 > > eval (App (App (K, S), App (I, App (App (App (S, K), S), I)))) +00:06:25 verbose #9758 > > |> _assert_eq S +00:06:25 verbose #9759 > > +00:06:25 verbose #9760 > > eval (App (App (App (S, K), I), K)) +00:06:25 verbose #9761 > > |> _assert_eq K +00:06:26 verbose #9762 > > +00:06:26 verbose #9763 > > ╭─[ 1.03s - stdout ]───────────────────────────────────────────────────────────╮ +00:06:26 verbose #9764 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ +00:06:26 verbose #9765 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ +00:06:26 verbose #9766 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ +00:06:26 verbose #9767 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ +00:06:26 verbose #9768 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ +00:06:26 verbose #9769 > > │ assert_eq / actual: UH0_1 / expected: UH0_1 │ +00:06:26 verbose #9770 > > │ assert_eq / actual: UH0_3 (UH0_1, UH0_0) / expected: UH0_3 (UH0_1, UH0_0) │ +00:06:26 verbose #9771 > > │ assert_eq / actual: UH0_3 (UH0_1, UH0_1) / expected: UH0_3 (UH0_1, UH0_1) │ +00:06:26 verbose #9772 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ +00:06:26 verbose #9773 > > │ assert_eq / actual: UH0_1 / expected: UH0_1 │ +00:06:26 verbose #9774 > > │ assert_eq / actual: UH0_2 / expected: UH0_2 │ +00:06:26 verbose #9775 > > │ assert_eq / actual: UH0_2 / expected: UH0_2 │ +00:06:26 verbose #9776 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ +00:06:26 verbose #9777 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ +00:06:26 verbose #9778 > > │ assert_eq / actual: UH0_0 / expected: UH0_0 │ +00:06:26 verbose #9779 > > │ assert_eq / actual: UH0_2 / expected: UH0_2 │ +00:06:26 verbose #9780 > > │ assert_eq / actual: UH0_1 / expected: UH0_1 │ +00:06:26 verbose #9781 > > │ │ +00:06:26 verbose #9782 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:26 verbose #9783 > 00:00:07 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 4096 +00:06:26 verbose #9784 > 00:00:07 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/util.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/util.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:06:28 verbose #9785 > 00:00:09 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/util.dib.ipynb to html +00:06:28 verbose #9786 > 00:00:09 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:06:28 verbose #9787 > 00:00:09 verbose #7 ! validate(nb) +00:06:29 verbose #9788 > 00:00:10 verbose #8 ! [NbConvertApp] Writing 284191 bytes to c:\home\git\polyglot\lib\spiral\util.dib.html +00:06:29 verbose #9789 > 00:00:10 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 639 +00:06:29 verbose #9790 > 00:00:10 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 639 +00:06:29 verbose #9791 > 00:00:10 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/util.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/util.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:06:30 verbose #9792 > 00:00:11 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:06:30 verbose #9793 > 00:00:11 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:06:31 verbose #9794 > 00:00:11 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 4794 +00:06:31 debug #9795 execute_with_options_async / exit_code: 0 / output.Length: 7235 +00:06:31 debug #19 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path util.dib --retries 3 +00:06:31 debug #9796 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path stream.dib --retries 3", [||], None, None, true, None) -00:14:00 verbose #9640 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "stream.dib", "--retries", "3"]) -00:14:00 verbose #9641 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/stream.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/stream.dib" --output-path "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:14:10 verbose #9642 > -00:14:10 verbose #9643 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9644 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9645 > │ # stream │ -00:14:10 verbose #9646 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9647 > -00:14:10 verbose #9648 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9649 > open rust_operators -00:14:10 verbose #9650 > -00:14:10 verbose #9651 > ── spiral - import ───────────────────────────────────────────────────────────── -00:14:10 verbose #9652 > #r -00:14:10 verbose #9653 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:14:10 verbose #9654 > otNet.Interactive.Spiral.dll" -00:14:10 verbose #9655 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:14:10 verbose #9656 > #r -00:14:10 verbose #9657 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:14:10 verbose #9658 > otNet.Interactive.dll" -00:14:10 verbose #9659 > open type Microsoft.DotNet.Interactive.Kernel -00:14:10 verbose #9660 > -00:14:10 verbose #9661 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9662 > //// test -00:14:10 verbose #9663 > -00:14:10 verbose #9664 > open testing -00:14:10 verbose #9665 > -00:14:10 verbose #9666 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9667 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9668 > │ ## types │ -00:14:10 verbose #9669 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9670 > -00:14:10 verbose #9671 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9672 > inl types () = -00:14:10 verbose #9673 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:10 verbose #9674 > Fable.Core.Emit(\"async_std::io::BufReader<$0>\")>]]\n#endif\ntype -00:14:10 verbose #9675 > async_std_io_BufReader<'T> = class end" -00:14:10 verbose #9676 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:10 verbose #9677 > Fable.Core.Emit(\"std::io::BufReader<$0>\")>]]\n#endif\ntype -00:14:10 verbose #9678 > std_io_BufReader<'T> = class end" -00:14:10 verbose #9679 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:10 verbose #9680 > Fable.Core.Emit(\"std::io::Error\")>]]\n#endif\ntype std_io_Error = class end" -00:14:10 verbose #9681 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:10 verbose #9682 > Fable.Core.Emit(\"std::io::Lines<$0>\")>]]\n#endif\ntype std_io_Lines<'T> = -00:14:10 verbose #9683 > class end" -00:14:10 verbose #9684 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:10 verbose #9685 > Fable.Core.Emit(\"encoding_rs_io::DecodeReaderBytes<$0, $1>\")>]]\n#endif\ntype -00:14:10 verbose #9686 > encoding_rs_io_DecodeReaderBytes<'T, 'U> = class end" -00:14:10 verbose #9687 > -00:14:10 verbose #9688 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9689 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9690 > │ ## io_error │ -00:14:10 verbose #9691 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9692 > -00:14:10 verbose #9693 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9694 > nominal io_error = $"std_io_Error" -00:14:10 verbose #9695 > -00:14:10 verbose #9696 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9697 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9698 > │ ## buf_reader │ -00:14:10 verbose #9699 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9700 > -00:14:10 verbose #9701 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9702 > nominal buf_reader t = $'std_io_BufReader<`t>' -00:14:10 verbose #9703 > -00:14:10 verbose #9704 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9705 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9706 > │ ## async_buf_reader │ -00:14:10 verbose #9707 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9708 > -00:14:10 verbose #9709 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9710 > nominal async_buf_reader t = $'async_std_io_BufReader<`t>' -00:14:10 verbose #9711 > -00:14:10 verbose #9712 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9713 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9714 > │ ## new_buf_reader │ -00:14:10 verbose #9715 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9716 > -00:14:10 verbose #9717 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9718 > inl new_buf_reader forall t. (x : t) : buf_reader t = -00:14:10 verbose #9719 > !\($'"std::io::BufReader::new(!x)"') -00:14:10 verbose #9720 > -00:14:10 verbose #9721 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9722 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9723 > │ ## lines │ -00:14:10 verbose #9724 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9725 > -00:14:10 verbose #9726 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9727 > nominal lines t = $'std_io_Lines<`t>' -00:14:10 verbose #9728 > -00:14:10 verbose #9729 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9730 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9731 > │ ## buf_read_lines │ -00:14:10 verbose #9732 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9733 > -00:14:10 verbose #9734 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9735 > inl buf_read_lines forall t. (buf_reader : buf_reader t) : lines (buf_reader t) -00:14:10 verbose #9736 > = -00:14:10 verbose #9737 > !\($'"std::io::BufRead::lines(!buf_reader)"') -00:14:10 verbose #9738 > -00:14:10 verbose #9739 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9740 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9741 > │ ## decode_reader_bytes │ -00:14:10 verbose #9742 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9743 > -00:14:10 verbose #9744 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9745 > nominal decode_reader_bytes t u = $'encoding_rs_io_DecodeReaderBytes<`t, `u>' -00:14:10 verbose #9746 > -00:14:10 verbose #9747 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9748 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9749 > │ ## decode_reader_bytes_build │ -00:14:10 verbose #9750 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9751 > -00:14:10 verbose #9752 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9753 > inl decode_reader_bytes_build forall t. (x : t) : decode_reader_bytes t (am'.vec -00:14:10 verbose #9754 > u8) = -00:14:10 verbose #9755 > -00:14:10 verbose #9756 > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().encoding(Some(encoding_rs: -00:14:10 verbose #9757 > :UTF_8)).build(!x)"') -00:14:10 verbose #9758 > -00:14:10 verbose #9759 > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().encoding(Some(encoding_rs: -00:14:10 verbose #9760 > :UTF_8)).utf8_passthru(true).build(!x)"') -00:14:10 verbose #9761 > -00:14:10 verbose #9762 > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build( -00:14:10 verbose #9763 > !x)"') -00:14:10 verbose #9764 > // !\($'"encoding_rs_io::DecodeReaderBytes::new(!x)"') -00:14:10 verbose #9765 > -00:14:10 verbose #9766 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9767 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9768 > │ ## buf_reader_read │ -00:14:10 verbose #9769 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9770 > -00:14:10 verbose #9771 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9772 > inl buf_reader_read forall el dim. (slice : am'.slice' el dim) (buf_reader : -00:14:10 verbose #9773 > buf_reader el) : resultm.result' unativeint io_error = -00:14:10 verbose #9774 > (!\($'"true; let mut !slice = !slice"') : bool) |> ignore -00:14:10 verbose #9775 > !\($'"std::io::Read::read(&mut !buf_reader, &mut !slice)"') -00:14:10 verbose #9776 > -00:14:10 verbose #9777 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9778 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9779 > │ ## stream │ -00:14:10 verbose #9780 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9781 > -00:14:10 verbose #9782 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9783 > union rec stream t = -00:14:10 verbose #9784 > | StreamCons : t * (() -> stream t) -00:14:10 verbose #9785 > | StreamNil -00:14:10 verbose #9786 > -00:14:10 verbose #9787 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9788 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9789 > │ ## fold │ -00:14:10 verbose #9790 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9791 > -00:14:10 verbose #9792 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9793 > inl fold fn init s = -00:14:10 verbose #9794 > inl rec body acc = function -00:14:10 verbose #9795 > | StreamCons (st, fn') => loop (fn acc st) (fn' ()) -00:14:10 verbose #9796 > | StreamNil => acc -00:14:10 verbose #9797 > and inl loop acc = join_body body acc -00:14:10 verbose #9798 > loop init s -00:14:10 verbose #9799 > -00:14:10 verbose #9800 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9801 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9802 > │ ## fold_back │ -00:14:10 verbose #9803 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9804 > -00:14:10 verbose #9805 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9806 > inl fold_back fn s init = -00:14:10 verbose #9807 > inl rec body acc = function -00:14:10 verbose #9808 > | StreamCons (st, fn') => fn st (loop acc (fn' ())) -00:14:10 verbose #9809 > | StreamNil => acc -00:14:10 verbose #9810 > and inl loop acc = join_body body acc -00:14:10 verbose #9811 > loop init s -00:14:10 verbose #9812 > -00:14:10 verbose #9813 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9814 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9815 > │ ## to_list │ -00:14:10 verbose #9816 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9817 > -00:14:10 verbose #9818 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9819 > inl to_list s = -00:14:10 verbose #9820 > (s, [[]]) -00:14:10 verbose #9821 > ||> fold_back fun x acc => -00:14:10 verbose #9822 > x :: acc -00:14:10 verbose #9823 > -00:14:10 verbose #9824 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9825 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9826 > │ ## rev │ -00:14:10 verbose #9827 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9828 > -00:14:10 verbose #9829 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9830 > inl rev s = -00:14:10 verbose #9831 > (StreamNil, s) -00:14:10 verbose #9832 > ||> fold fun s x => -00:14:10 verbose #9833 > StreamCons (x, fun () => s) -00:14:10 verbose #9834 > -00:14:10 verbose #9835 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9836 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9837 > │ ## from_list │ -00:14:10 verbose #9838 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9839 > -00:14:10 verbose #9840 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9841 > inl from_list list = -00:14:10 verbose #9842 > (list, StreamNil) -00:14:10 verbose #9843 > ||> listm.foldBack fun x acc => -00:14:10 verbose #9844 > StreamCons (x, fun () => acc) -00:14:10 verbose #9845 > -00:14:10 verbose #9846 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9847 > //// test -00:14:10 verbose #9848 > -00:14:10 verbose #9849 > listm.init 3i32 id -00:14:10 verbose #9850 > |> from_list -00:14:10 verbose #9851 > |> rev -00:14:10 verbose #9852 > |> to_list -00:14:10 verbose #9853 > |> _assert_eq [[ 2; 1; 0 ]] -00:14:10 verbose #9854 > -00:14:10 verbose #9855 > ╭─[ 1.11s - stdout ]───────────────────────────────────────────────────────────╮ -00:14:10 verbose #9856 > │ assert_eq / actual: UH0_1 (2, UH0_1 (1, UH0_1 (0, UH0_0))) / expected: UH0_1 │ -00:14:10 verbose #9857 > │ (2, UH0_1 (1, UH0_1 (0, UH0_0))) │ -00:14:10 verbose #9858 > │ │ -00:14:10 verbose #9859 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9860 > -00:14:10 verbose #9861 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9862 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9863 > │ ## try_item │ -00:14:10 verbose #9864 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9865 > -00:14:10 verbose #9866 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9867 > inl try_item i s = -00:14:10 verbose #9868 > inl rec body i = function -00:14:10 verbose #9869 > | StreamCons (x, _) when i <= 0 => Some x -00:14:10 verbose #9870 > | StreamCons (_, fn) => loop (i - 1) (fn ()) -00:14:10 verbose #9871 > | StreamNil => None -00:14:10 verbose #9872 > and inl loop acc s' = -00:14:10 verbose #9873 > match var_is acc, var_is s' with -00:14:10 verbose #9874 > | false, false => body acc s' -00:14:10 verbose #9875 > | _ => -00:14:10 verbose #9876 > inl acc = dyn acc -00:14:10 verbose #9877 > inl s' = dyn s' -00:14:10 verbose #9878 > join body acc s' -00:14:10 verbose #9879 > loop i s -00:14:10 verbose #9880 > -00:14:10 verbose #9881 > inl item i = -00:14:10 verbose #9882 > try_item i >> optionm.value -00:14:10 verbose #9883 > -00:14:10 verbose #9884 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9885 > //// test -00:14:10 verbose #9886 > -00:14:10 verbose #9887 > listm.init 10i32 id -00:14:10 verbose #9888 > |> from_list -00:14:10 verbose #9889 > |> item 9i32 -00:14:10 verbose #9890 > |> _assert_eq 9 -00:14:10 verbose #9891 > -00:14:10 verbose #9892 > ╭─[ 44.97ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #9893 > │ assert_eq / actual: 9 / expected: 9 │ -00:14:10 verbose #9894 > │ │ -00:14:10 verbose #9895 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9896 > -00:14:10 verbose #9897 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9898 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9899 > │ ## new_infinite_stream │ -00:14:10 verbose #9900 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9901 > -00:14:10 verbose #9902 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9903 > inl new_infinite_stream fn = -00:14:10 verbose #9904 > inl rec loop n = -00:14:10 verbose #9905 > StreamCons (fn n, fun () => loop (n + 1)) -00:14:10 verbose #9906 > loop 0 -00:14:10 verbose #9907 > -00:14:10 verbose #9908 > inl new_infinite_stream_ fn = -00:14:10 verbose #9909 > let rec loop n = -00:14:10 verbose #9910 > StreamCons (fn n, fun () => loop (n + 1)) -00:14:10 verbose #9911 > loop 0 -00:14:10 verbose #9912 > -00:14:10 verbose #9913 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9914 > //// test -00:14:10 verbose #9915 > -00:14:10 verbose #9916 > new_infinite_stream print_and_return -00:14:10 verbose #9917 > |> item 4i32 -00:14:10 verbose #9918 > |> _assert_eq 4i32 -00:14:10 verbose #9919 > -00:14:10 verbose #9920 > ╭─[ 99.72ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #9921 > │ print_and_return / x: 0 │ -00:14:10 verbose #9922 > │ print_and_return / x: 1 │ -00:14:10 verbose #9923 > │ print_and_return / x: 2 │ -00:14:10 verbose #9924 > │ print_and_return / x: 3 │ -00:14:10 verbose #9925 > │ print_and_return / x: 4 │ -00:14:10 verbose #9926 > │ assert_eq / actual: 4 / expected: 4 │ -00:14:10 verbose #9927 > │ │ -00:14:10 verbose #9928 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9929 > -00:14:10 verbose #9930 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9931 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9932 > │ ## new_finite_stream │ -00:14:10 verbose #9933 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9934 > -00:14:10 verbose #9935 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9936 > inl new_finite_stream fn max = -00:14:10 verbose #9937 > inl rec loop n = -00:14:10 verbose #9938 > if n >= max -00:14:10 verbose #9939 > then StreamNil -00:14:10 verbose #9940 > else StreamCons (fn n, fun () => loop (n + 1)) -00:14:10 verbose #9941 > loop 0 -00:14:10 verbose #9942 > -00:14:10 verbose #9943 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #9944 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #9945 > │ ## memoize │ -00:14:10 verbose #9946 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9947 > -00:14:10 verbose #9948 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9949 > union memoized_stream t = -00:14:10 verbose #9950 > | NotComputed : () -> stream t -00:14:10 verbose #9951 > | Computed : stream t -00:14:10 verbose #9952 > -00:14:10 verbose #9953 > inl memoize s = -00:14:10 verbose #9954 > inl rec body s = -00:14:10 verbose #9955 > inl state = mut (NotComputed s) -00:14:10 verbose #9956 > fun () => -00:14:10 verbose #9957 > match *state with -00:14:10 verbose #9958 > | Computed x => x -00:14:10 verbose #9959 > | NotComputed fn => -00:14:10 verbose #9960 > inl new_state = -00:14:10 verbose #9961 > match fn () with -00:14:10 verbose #9962 > | StreamNil => StreamNil -00:14:10 verbose #9963 > | StreamCons (x, fn) => StreamCons (x, loop fn) -00:14:10 verbose #9964 > state <- Computed new_state -00:14:10 verbose #9965 > new_state -00:14:10 verbose #9966 > and inl loop s' = join_body_unit body s s' -00:14:10 verbose #9967 > loop (fun () => s) -00:14:10 verbose #9968 > -00:14:10 verbose #9969 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9970 > //// test -00:14:10 verbose #9971 > -00:14:10 verbose #9972 > inl memo_stream = new_finite_stream print_and_return 10 |> memoize -00:14:10 verbose #9973 > -00:14:10 verbose #9974 > memo_stream () -00:14:10 verbose #9975 > |> item 3i32 -00:14:10 verbose #9976 > |> _assert_eq 3i32 -00:14:10 verbose #9977 > -00:14:10 verbose #9978 > memo_stream () -00:14:10 verbose #9979 > |> item 5i32 -00:14:10 verbose #9980 > |> _assert_eq 5i32 -00:14:10 verbose #9981 > -00:14:10 verbose #9982 > ╭─[ 468.94ms - stdout ]────────────────────────────────────────────────────────╮ -00:14:10 verbose #9983 > │ print_and_return / x: 0 │ -00:14:10 verbose #9984 > │ print_and_return / x: 1 │ -00:14:10 verbose #9985 > │ print_and_return / x: 2 │ -00:14:10 verbose #9986 > │ print_and_return / x: 3 │ -00:14:10 verbose #9987 > │ assert_eq / actual: 3 / expected: 3 │ -00:14:10 verbose #9988 > │ print_and_return / x: 4 │ -00:14:10 verbose #9989 > │ print_and_return / x: 5 │ -00:14:10 verbose #9990 > │ assert_eq / actual: 5 / expected: 5 │ -00:14:10 verbose #9991 > │ │ -00:14:10 verbose #9992 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #9993 > -00:14:10 verbose #9994 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #9995 > //// test -00:14:10 verbose #9996 > -00:14:10 verbose #9997 > inl memo_stream = new_infinite_stream_ print_and_return |> memoize -00:14:10 verbose #9998 > -00:14:10 verbose #9999 > memo_stream () -00:14:10 verbose #10000 > |> item 3i32 -00:14:10 verbose #10001 > |> _assert_eq 3i32 -00:14:10 verbose #10002 > -00:14:10 verbose #10003 > memo_stream () -00:14:10 verbose #10004 > |> item 5i32 -00:14:10 verbose #10005 > |> _assert_eq 5i32 -00:14:10 verbose #10006 > -00:14:10 verbose #10007 > ╭─[ 120.07ms - stdout ]────────────────────────────────────────────────────────╮ -00:14:10 verbose #10008 > │ print_and_return / x: 0 │ -00:14:10 verbose #10009 > │ print_and_return / x: 1 │ -00:14:10 verbose #10010 > │ print_and_return / x: 2 │ -00:14:10 verbose #10011 > │ print_and_return / x: 3 │ -00:14:10 verbose #10012 > │ assert_eq / actual: 3 / expected: 3 │ -00:14:10 verbose #10013 > │ print_and_return / x: 4 │ -00:14:10 verbose #10014 > │ print_and_return / x: 5 │ -00:14:10 verbose #10015 > │ assert_eq / actual: 5 / expected: 5 │ -00:14:10 verbose #10016 > │ │ -00:14:10 verbose #10017 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10018 > -00:14:10 verbose #10019 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #10020 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #10021 > │ ## unfold │ -00:14:10 verbose #10022 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10023 > -00:14:10 verbose #10024 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10025 > inl unfold f x0 = -00:14:10 verbose #10026 > inl rec body x = -00:14:10 verbose #10027 > match f x with -00:14:10 verbose #10028 > | Some (x', y) => StreamCons (x', fun () => loop y) -00:14:10 verbose #10029 > | None => StreamNil -00:14:10 verbose #10030 > and inl loop x = join_body_unit body x0 x -00:14:10 verbose #10031 > loop x0 -00:14:10 verbose #10032 > -00:14:10 verbose #10033 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #10034 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #10035 > │ ## iterate │ -00:14:10 verbose #10036 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10037 > -00:14:10 verbose #10038 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10039 > inl iterate f = -00:14:10 verbose #10040 > unfold (fun x => Some (x, f x)) -00:14:10 verbose #10041 > -00:14:10 verbose #10042 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10043 > //// test -00:14:10 verbose #10044 > -00:14:10 verbose #10045 > iterate ((*) 2) 1i32 -00:14:10 verbose #10046 > |> item 10i32 -00:14:10 verbose #10047 > |> _assert_eq 1024 -00:14:10 verbose #10048 > -00:14:10 verbose #10049 > ╭─[ 34.06ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #10050 > │ assert_eq / actual: 1024 / expected: 1024 │ -00:14:10 verbose #10051 > │ │ -00:14:10 verbose #10052 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10053 > -00:14:10 verbose #10054 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #10055 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #10056 > │ ## take_while │ -00:14:10 verbose #10057 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10058 > -00:14:10 verbose #10059 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10060 > inl take_while cond s = -00:14:10 verbose #10061 > inl rec body i = function -00:14:10 verbose #10062 > | StreamCons (st, fn) when cond st i => StreamCons (st, fun () => loop -00:14:10 verbose #10063 > (i + 1) (fn ())) -00:14:10 verbose #10064 > | _ => StreamNil -00:14:10 verbose #10065 > and inl loop i = join_body body i -00:14:10 verbose #10066 > loop 0 s -00:14:10 verbose #10067 > -00:14:10 verbose #10068 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #10069 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #10070 > │ ## sum │ -00:14:10 verbose #10071 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10072 > -00:14:10 verbose #10073 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10074 > inl sum seq = -00:14:10 verbose #10075 > seq |> fold (+) 0 -00:14:10 verbose #10076 > -00:14:10 verbose #10077 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10078 > //// test -00:14:10 verbose #10079 > -00:14:10 verbose #10080 > listm.init 10i32 id -00:14:10 verbose #10081 > |> from_list -00:14:10 verbose #10082 > |> sum -00:14:10 verbose #10083 > |> _assert_eq 45 -00:14:10 verbose #10084 > -00:14:10 verbose #10085 > ╭─[ 32.60ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #10086 > │ assert_eq / actual: 45 / expected: 45 │ -00:14:10 verbose #10087 > │ │ -00:14:10 verbose #10088 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10089 > -00:14:10 verbose #10090 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10091 > //// test -00:14:10 verbose #10092 > -00:14:10 verbose #10093 > new_finite_stream print_and_return 10i32 -00:14:10 verbose #10094 > |> take_while (fun n (_ : i32) => n < 5) -00:14:10 verbose #10095 > |> sum -00:14:10 verbose #10096 > |> _assert_eq 10 -00:14:10 verbose #10097 > -00:14:10 verbose #10098 > ╭─[ 50.80ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #10099 > │ print_and_return / x: 0 │ -00:14:10 verbose #10100 > │ print_and_return / x: 1 │ -00:14:10 verbose #10101 > │ print_and_return / x: 2 │ -00:14:10 verbose #10102 > │ print_and_return / x: 3 │ -00:14:10 verbose #10103 > │ print_and_return / x: 4 │ -00:14:10 verbose #10104 > │ print_and_return / x: 5 │ -00:14:10 verbose #10105 > │ assert_eq / actual: 10 / expected: 10 │ -00:14:10 verbose #10106 > │ │ -00:14:10 verbose #10107 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10108 > -00:14:10 verbose #10109 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10110 > //// test -00:14:10 verbose #10111 > -00:14:10 verbose #10112 > new_infinite_stream print_and_return -00:14:10 verbose #10113 > |> take_while (fun n (_ : i32) => n < 5i32) -00:14:10 verbose #10114 > |> sum -00:14:10 verbose #10115 > |> _assert_eq 10 -00:14:10 verbose #10116 > -00:14:10 verbose #10117 > ╭─[ 41.95ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #10118 > │ print_and_return / x: 0 │ -00:14:10 verbose #10119 > │ print_and_return / x: 1 │ -00:14:10 verbose #10120 > │ print_and_return / x: 2 │ -00:14:10 verbose #10121 > │ print_and_return / x: 3 │ -00:14:10 verbose #10122 > │ print_and_return / x: 4 │ -00:14:10 verbose #10123 > │ print_and_return / x: 5 │ -00:14:10 verbose #10124 > │ assert_eq / actual: 10 / expected: 10 │ -00:14:10 verbose #10125 > │ │ -00:14:10 verbose #10126 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10127 > -00:14:10 verbose #10128 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10129 > //// test -00:14:10 verbose #10130 > -00:14:10 verbose #10131 > iterate ((*) 6) 1i32 -00:14:10 verbose #10132 > |> take_while (fun _ i => i <= 7i32) -00:14:10 verbose #10133 > |> to_list -00:14:10 verbose #10134 > |> _assert_eq [[ 1i32; 6; 36; 216; 1296; 7776; 46656; 279936 ]] -00:14:10 verbose #10135 > -00:14:10 verbose #10136 > ╭─[ 85.09ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #10137 > │ assert_eq / actual: UH0_1 │ -00:14:10 verbose #10138 > │ (1, │ -00:14:10 verbose #10139 > │ UH0_1 │ -00:14:10 verbose #10140 > │ (6, │ -00:14:10 verbose #10141 > │ UH0_1 │ -00:14:10 verbose #10142 > │ (36, │ -00:14:10 verbose #10143 > │ UH0_1 │ -00:14:10 verbose #10144 > │ (216, │ -00:14:10 verbose #10145 > │ UH0_1 (1296, UH0_1 (7776, UH0_1 (46656, UH0_1 (279936, │ -00:14:10 verbose #10146 > │ UH0_0)))))))) / expected: UH0_1 │ -00:14:10 verbose #10147 > │ (1, │ -00:14:10 verbose #10148 > │ UH0_1 │ -00:14:10 verbose #10149 > │ (6, │ -00:14:10 verbose #10150 > │ UH0_1 │ -00:14:10 verbose #10151 > │ (36, │ -00:14:10 verbose #10152 > │ UH0_1 │ -00:14:10 verbose #10153 > │ (216, │ -00:14:10 verbose #10154 > │ UH0_1 (1296, UH0_1 (7776, UH0_1 (46656, UH0_1 (279936, │ -00:14:10 verbose #10155 > │ UH0_0)))))))) │ -00:14:10 verbose #10156 > │ │ -00:14:10 verbose #10157 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10158 > -00:14:10 verbose #10159 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #10160 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #10161 > │ ## indexed │ -00:14:10 verbose #10162 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10163 > -00:14:10 verbose #10164 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10165 > inl indexed s = -00:14:10 verbose #10166 > ((StreamNil, 0), s) -00:14:10 verbose #10167 > ||> fold fun (acc, i) x => -00:14:10 verbose #10168 > StreamCons ((i, x), fun () => acc), i + 1 -00:14:10 verbose #10169 > |> fst -00:14:10 verbose #10170 > |> rev -00:14:10 verbose #10171 > -00:14:10 verbose #10172 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10173 > //// test -00:14:10 verbose #10174 > -00:14:10 verbose #10175 > listm.init 10i32 ((*) 2) -00:14:10 verbose #10176 > |> from_list -00:14:10 verbose #10177 > |> indexed -00:14:10 verbose #10178 > |> item 5i32 -00:14:10 verbose #10179 > |> _assert_eq (5i32, 10i32) -00:14:10 verbose #10180 > -00:14:10 verbose #10181 > ╭─[ 42.20ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #10182 > │ assert_eq / actual: struct (5, 10) / expected: struct (5, 10) │ -00:14:10 verbose #10183 > │ │ -00:14:10 verbose #10184 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10185 > -00:14:10 verbose #10186 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #10187 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #10188 > │ ## map │ -00:14:10 verbose #10189 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10190 > -00:14:10 verbose #10191 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10192 > inl map fn s = -00:14:10 verbose #10193 > (s, StreamNil) -00:14:10 verbose #10194 > ||> fold_back fun x acc => -00:14:10 verbose #10195 > StreamCons (fn x, fun () => acc) -00:14:10 verbose #10196 > -00:14:10 verbose #10197 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10198 > //// test -00:14:10 verbose #10199 > -00:14:10 verbose #10200 > listm.init 10i32 id -00:14:10 verbose #10201 > |> from_list -00:14:10 verbose #10202 > |> map ((*) 2) -00:14:10 verbose #10203 > |> item 5i32 -00:14:10 verbose #10204 > |> _assert_eq 10i32 -00:14:10 verbose #10205 > -00:14:10 verbose #10206 > ╭─[ 32.91ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #10207 > │ assert_eq / actual: 10 / expected: 10 │ -00:14:10 verbose #10208 > │ │ -00:14:10 verbose #10209 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10210 > -00:14:10 verbose #10211 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #10212 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #10213 > │ ## zip_with │ -00:14:10 verbose #10214 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10215 > -00:14:10 verbose #10216 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10217 > inl zip_with fn s1 s2 = -00:14:10 verbose #10218 > inl rec loop s1 s2 = -00:14:10 verbose #10219 > match s1, s2 with -00:14:10 verbose #10220 > | StreamCons (st1, fn1), StreamCons (st2, fn2) => -00:14:10 verbose #10221 > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ())) -00:14:10 verbose #10222 > | StreamNil, _ | _, StreamNil => StreamNil -00:14:10 verbose #10223 > loop s1 s2 -00:14:10 verbose #10224 > -00:14:10 verbose #10225 > inl zip_with_ fn s1 s2 = -00:14:10 verbose #10226 > let rec loop s1 s2 = -00:14:10 verbose #10227 > match s1, s2 with -00:14:10 verbose #10228 > | StreamCons (st1, fn1), StreamCons (st2, fn2) => -00:14:10 verbose #10229 > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ())) -00:14:10 verbose #10230 > | StreamNil, _ | _, StreamNil => StreamNil -00:14:10 verbose #10231 > loop s1 s2 -00:14:10 verbose #10232 > -00:14:10 verbose #10233 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10234 > //// test -00:14:10 verbose #10235 > -00:14:10 verbose #10236 > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) -00:14:10 verbose #10237 > ||> zip_with (+) -00:14:10 verbose #10238 > |> item 2i32 -00:14:10 verbose #10239 > |> _assert_eq 6 -00:14:10 verbose #10240 > -00:14:10 verbose #10241 > ╭─[ 34.72ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #10242 > │ assert_eq / actual: 6 / expected: 6 │ -00:14:10 verbose #10243 > │ │ -00:14:10 verbose #10244 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10245 > -00:14:10 verbose #10246 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #10247 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #10248 > │ ## zip │ -00:14:10 verbose #10249 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10250 > -00:14:10 verbose #10251 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10252 > inl zip s1 s2 = -00:14:10 verbose #10253 > zip_with pair s1 s2 -00:14:10 verbose #10254 > -00:14:10 verbose #10255 > inl zip_ s1 s2 = -00:14:10 verbose #10256 > zip_with_ pair s1 s2 -00:14:10 verbose #10257 > -00:14:10 verbose #10258 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10259 > //// test -00:14:10 verbose #10260 > -00:14:10 verbose #10261 > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) -00:14:10 verbose #10262 > ||> zip -00:14:10 verbose #10263 > |> item 5i32 -00:14:10 verbose #10264 > |> _assert_eq (5, 10) -00:14:10 verbose #10265 > -00:14:10 verbose #10266 > ╭─[ 32.88ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #10267 > │ assert_eq / actual: struct (5, 10) / expected: struct (5, 10) │ -00:14:10 verbose #10268 > │ │ -00:14:10 verbose #10269 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10270 > -00:14:10 verbose #10271 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:10 verbose #10272 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:10 verbose #10273 > │ ## unzip │ -00:14:10 verbose #10274 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10275 > -00:14:10 verbose #10276 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10277 > inl unzip s = -00:14:10 verbose #10278 > inl rec body s = -00:14:10 verbose #10279 > match s with -00:14:10 verbose #10280 > | StreamCons ((x, y), fn) => -00:14:10 verbose #10281 > inl xs, ys = loop (fn ()) -00:14:10 verbose #10282 > StreamCons (x, fun () => xs), StreamCons (y, fun () => ys) -00:14:10 verbose #10283 > | StreamNil => pair StreamNil StreamNil -00:14:10 verbose #10284 > and inl loop x = -00:14:10 verbose #10285 > if var_is x |> not -00:14:10 verbose #10286 > then body x -00:14:10 verbose #10287 > else -00:14:10 verbose #10288 > inl x = dyn x -00:14:10 verbose #10289 > join body x -00:14:10 verbose #10290 > loop s -00:14:10 verbose #10291 > -00:14:10 verbose #10292 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:10 verbose #10293 > //// test -00:14:10 verbose #10294 > -00:14:10 verbose #10295 > listm.init 10i32 id -00:14:10 verbose #10296 > |> listm.map (fun x => x, x) -00:14:10 verbose #10297 > |> from_list -00:14:10 verbose #10298 > |> unzip -00:14:10 verbose #10299 > |> fun x, y => -00:14:10 verbose #10300 > x |> sum -00:14:10 verbose #10301 > |> _assert_eq 45 -00:14:10 verbose #10302 > -00:14:10 verbose #10303 > y |> sum -00:14:10 verbose #10304 > |> _assert_eq 45 -00:14:10 verbose #10305 > -00:14:10 verbose #10306 > ╭─[ 40.12ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:10 verbose #10307 > │ assert_eq / actual: 45 / expected: 45 │ -00:14:10 verbose #10308 > │ assert_eq / actual: 45 / expected: 45 │ -00:14:10 verbose #10309 > │ │ -00:14:10 verbose #10310 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:10 verbose #10311 > 00:00:09 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 30704 -00:14:10 verbose #10312 > 00:00:09 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:14:13 verbose #10313 > 00:00:13 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/stream.dib.ipynb to html\e[0m -00:14:13 verbose #10314 > 00:00:13 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:14:13 verbose #10315 > 00:00:13 verbose #7 \e[4;7m validate(nb)\e[0m -00:14:13 verbose #10316 > 00:00:13 verbose #8 \e[4;7m[NbConvertApp] Writing 359431 bytes to c:\home\git\polyglot\lib\spiral\stream.dib.html\e[0m -00:14:13 verbose #10317 > 00:00:13 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 603 -00:14:13 verbose #10318 > 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 603 -00:14:13 verbose #10319 > 00:00:13 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/stream.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/stream.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:14:14 verbose #10320 > 00:00:14 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:14:14 verbose #10321 > 00:00:14 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:14:15 verbose #10322 > 00:00:14 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 31366 -00:14:15 debug #10323 execute_with_options_async / exit_code: 0 / output.Length: 33675 -00:14:15 debug #20 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path stream.dib --retries 3 -00:14:15 debug #10324 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path seq.dib --retries 3", +00:06:31 verbose #9797 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "stream.dib", "--retries", "3"]) +00:06:31 verbose #9798 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/stream.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/stream.dib" --output-path "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:06:33 verbose #9799 > > +00:06:33 verbose #9800 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:33 verbose #9801 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:33 verbose #9802 > > │ # stream │ +00:06:33 verbose #9803 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:33 verbose #9804 > > +00:06:33 verbose #9805 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:33 verbose #9806 > > open rust_operators +00:06:33 verbose #9807 > > +00:06:33 verbose #9808 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:06:33 verbose #9809 > > #r +00:06:33 verbose #9810 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:06:33 verbose #9811 > > otNet.Interactive.Spiral.dll" +00:06:33 verbose #9812 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:06:33 verbose #9813 > > #r +00:06:33 verbose #9814 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:06:33 verbose #9815 > > otNet.Interactive.dll" +00:06:33 verbose #9816 > > open type Microsoft.DotNet.Interactive.Kernel +00:06:37 verbose #9817 > > +00:06:37 verbose #9818 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9819 > > //// test +00:06:37 verbose #9820 > > +00:06:37 verbose #9821 > > open testing +00:06:37 verbose #9822 > > +00:06:37 verbose #9823 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9824 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9825 > > │ ## types │ +00:06:37 verbose #9826 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9827 > > +00:06:37 verbose #9828 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9829 > > inl types () = +00:06:37 verbose #9830 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:06:37 verbose #9831 > > Fable.Core.Emit(\"async_std::io::BufReader<$0>\")>]]\n#endif\ntype +00:06:37 verbose #9832 > > async_std_io_BufReader<'T> = class end" +00:06:37 verbose #9833 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:06:37 verbose #9834 > > Fable.Core.Emit(\"std::io::BufReader<$0>\")>]]\n#endif\ntype +00:06:37 verbose #9835 > > std_io_BufReader<'T> = class end" +00:06:37 verbose #9836 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:06:37 verbose #9837 > > Fable.Core.Emit(\"std::io::Error\")>]]\n#endif\ntype std_io_Error = class end" +00:06:37 verbose #9838 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:06:37 verbose #9839 > > Fable.Core.Emit(\"std::io::Lines<$0>\")>]]\n#endif\ntype std_io_Lines<'T> = +00:06:37 verbose #9840 > > class end" +00:06:37 verbose #9841 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:06:37 verbose #9842 > > Fable.Core.Emit(\"encoding_rs_io::DecodeReaderBytes<$0, $1>\")>]]\n#endif\ntype +00:06:37 verbose #9843 > > encoding_rs_io_DecodeReaderBytes<'T, 'U> = class end" +00:06:37 verbose #9844 > > +00:06:37 verbose #9845 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9846 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9847 > > │ ## io_error │ +00:06:37 verbose #9848 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9849 > > +00:06:37 verbose #9850 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9851 > > nominal io_error = $"std_io_Error" +00:06:37 verbose #9852 > > +00:06:37 verbose #9853 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9854 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9855 > > │ ## buf_reader │ +00:06:37 verbose #9856 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9857 > > +00:06:37 verbose #9858 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9859 > > nominal buf_reader t = $'std_io_BufReader<`t>' +00:06:37 verbose #9860 > > +00:06:37 verbose #9861 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9862 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9863 > > │ ## async_buf_reader │ +00:06:37 verbose #9864 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9865 > > +00:06:37 verbose #9866 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9867 > > nominal async_buf_reader t = $'async_std_io_BufReader<`t>' +00:06:37 verbose #9868 > > +00:06:37 verbose #9869 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9870 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9871 > > │ ## new_buf_reader │ +00:06:37 verbose #9872 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9873 > > +00:06:37 verbose #9874 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9875 > > inl new_buf_reader forall t. (x : t) : buf_reader t = +00:06:37 verbose #9876 > > !\($'"std::io::BufReader::new(!x)"') +00:06:37 verbose #9877 > > +00:06:37 verbose #9878 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9879 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9880 > > │ ## lines │ +00:06:37 verbose #9881 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9882 > > +00:06:37 verbose #9883 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9884 > > nominal lines t = $'std_io_Lines<`t>' +00:06:37 verbose #9885 > > +00:06:37 verbose #9886 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9887 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9888 > > │ ## buf_read_lines │ +00:06:37 verbose #9889 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9890 > > +00:06:37 verbose #9891 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9892 > > inl buf_read_lines forall t. (buf_reader : buf_reader t) : lines (buf_reader t) +00:06:37 verbose #9893 > > = +00:06:37 verbose #9894 > > !\($'"std::io::BufRead::lines(!buf_reader)"') +00:06:37 verbose #9895 > > +00:06:37 verbose #9896 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9897 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9898 > > │ ## decode_reader_bytes │ +00:06:37 verbose #9899 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9900 > > +00:06:37 verbose #9901 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9902 > > nominal decode_reader_bytes t u = $'encoding_rs_io_DecodeReaderBytes<`t, `u>' +00:06:37 verbose #9903 > > +00:06:37 verbose #9904 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9905 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9906 > > │ ## decode_reader_bytes_build │ +00:06:37 verbose #9907 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9908 > > +00:06:37 verbose #9909 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9910 > > inl decode_reader_bytes_build forall t. (x : t) : decode_reader_bytes t (am'.vec +00:06:37 verbose #9911 > > u8) = +00:06:37 verbose #9912 > > +00:06:37 verbose #9913 > > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().encoding(Some(encoding_rs: +00:06:37 verbose #9914 > > :UTF_8)).build(!x)"') +00:06:37 verbose #9915 > > +00:06:37 verbose #9916 > > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().encoding(Some(encoding_rs: +00:06:37 verbose #9917 > > :UTF_8)).utf8_passthru(true).build(!x)"') +00:06:37 verbose #9918 > > !\\(x, +00:06:37 verbose #9919 > > $'"encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build($0) +00:06:37 verbose #9920 > > "') +00:06:37 verbose #9921 > > // !\($'"encoding_rs_io::DecodeReaderBytes::new(!x)"') +00:06:37 verbose #9922 > > +00:06:37 verbose #9923 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9924 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9925 > > │ ## buf_reader_read │ +00:06:37 verbose #9926 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9927 > > +00:06:37 verbose #9928 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9929 > > inl buf_reader_read forall el dim. (slice : am'.slice' el dim) (buf_reader : +00:06:37 verbose #9930 > > buf_reader el) : resultm.result' unativeint io_error = +00:06:37 verbose #9931 > > (!\($'"true; let mut !slice = !slice"') : bool) |> ignore +00:06:37 verbose #9932 > > !\($'"std::io::Read::read(&mut !buf_reader, &mut !slice)"') +00:06:37 verbose #9933 > > +00:06:37 verbose #9934 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9935 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9936 > > │ ## io_read_by_ref │ +00:06:37 verbose #9937 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9938 > > +00:06:37 verbose #9939 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9940 > > inl io_read_by_ref forall t. (lines : lines t) : lines t = +00:06:37 verbose #9941 > > !\\(lines, $'"std::io::Read::by_ref($0)"') +00:06:37 verbose #9942 > > +00:06:37 verbose #9943 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9944 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9945 > > │ ## stream │ +00:06:37 verbose #9946 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9947 > > +00:06:37 verbose #9948 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9949 > > union rec stream t = +00:06:37 verbose #9950 > > | StreamCons : t * (() -> stream t) +00:06:37 verbose #9951 > > | StreamNil +00:06:37 verbose #9952 > > +00:06:37 verbose #9953 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9954 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9955 > > │ ## fold │ +00:06:37 verbose #9956 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9957 > > +00:06:37 verbose #9958 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9959 > > inl fold fn init s = +00:06:37 verbose #9960 > > inl rec body acc = function +00:06:37 verbose #9961 > > | StreamCons (st, fn') => loop (fn acc st) (fn' ()) +00:06:37 verbose #9962 > > | StreamNil => acc +00:06:37 verbose #9963 > > and inl loop acc = join_body body acc +00:06:37 verbose #9964 > > loop init s +00:06:37 verbose #9965 > > +00:06:37 verbose #9966 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9967 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9968 > > │ ## fold_back │ +00:06:37 verbose #9969 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9970 > > +00:06:37 verbose #9971 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9972 > > inl fold_back fn s init = +00:06:37 verbose #9973 > > inl rec body acc = function +00:06:37 verbose #9974 > > | StreamCons (st, fn') => fn st (loop acc (fn' ())) +00:06:37 verbose #9975 > > | StreamNil => acc +00:06:37 verbose #9976 > > and inl loop acc = join_body body acc +00:06:37 verbose #9977 > > loop init s +00:06:37 verbose #9978 > > +00:06:37 verbose #9979 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9980 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9981 > > │ ## to_list │ +00:06:37 verbose #9982 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9983 > > +00:06:37 verbose #9984 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9985 > > inl to_list s = +00:06:37 verbose #9986 > > (s, [[]]) +00:06:37 verbose #9987 > > ||> fold_back fun x acc => +00:06:37 verbose #9988 > > x :: acc +00:06:37 verbose #9989 > > +00:06:37 verbose #9990 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #9991 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #9992 > > │ ## rev │ +00:06:37 verbose #9993 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #9994 > > +00:06:37 verbose #9995 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #9996 > > inl rev s = +00:06:37 verbose #9997 > > (StreamNil, s) +00:06:37 verbose #9998 > > ||> fold fun s x => +00:06:37 verbose #9999 > > StreamCons (x, fun () => s) +00:06:37 verbose #10000 > > +00:06:37 verbose #10001 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:37 verbose #10002 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:37 verbose #10003 > > │ ## from_list │ +00:06:37 verbose #10004 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:37 verbose #10005 > > +00:06:37 verbose #10006 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #10007 > > inl from_list list = +00:06:37 verbose #10008 > > (list, StreamNil) +00:06:37 verbose #10009 > > ||> listm.foldBack fun x acc => +00:06:37 verbose #10010 > > StreamCons (x, fun () => acc) +00:06:37 verbose #10011 > > +00:06:37 verbose #10012 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:37 verbose #10013 > > //// test +00:06:37 verbose #10014 > > +00:06:37 verbose #10015 > > listm.init 3i32 id +00:06:37 verbose #10016 > > |> from_list +00:06:37 verbose #10017 > > |> rev +00:06:37 verbose #10018 > > |> to_list +00:06:37 verbose #10019 > > |> _assert_eq [[ 2; 1; 0 ]] +00:06:38 verbose #10020 > > +00:06:38 verbose #10021 > > ╭─[ 918.46ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:38 verbose #10022 > > │ assert_eq / actual: UH0_1 (2, UH0_1 (1, UH0_1 (0, UH0_0))) / expected: UH0_1 │ +00:06:38 verbose #10023 > > │ (2, UH0_1 (1, UH0_1 (0, UH0_0))) │ +00:06:38 verbose #10024 > > │ │ +00:06:38 verbose #10025 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10026 > > +00:06:38 verbose #10027 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:38 verbose #10028 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:38 verbose #10029 > > │ ## try_item │ +00:06:38 verbose #10030 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10031 > > +00:06:38 verbose #10032 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10033 > > inl try_item i s = +00:06:38 verbose #10034 > > inl rec body i = function +00:06:38 verbose #10035 > > | StreamCons (x, _) when i <= 0 => Some x +00:06:38 verbose #10036 > > | StreamCons (_, fn) => loop (i - 1) (fn ()) +00:06:38 verbose #10037 > > | StreamNil => None +00:06:38 verbose #10038 > > and inl loop acc s' = +00:06:38 verbose #10039 > > match var_is acc, var_is s' with +00:06:38 verbose #10040 > > | false, false => body acc s' +00:06:38 verbose #10041 > > | _ => +00:06:38 verbose #10042 > > inl acc = dyn acc +00:06:38 verbose #10043 > > inl s' = dyn s' +00:06:38 verbose #10044 > > join body acc s' +00:06:38 verbose #10045 > > loop i s +00:06:38 verbose #10046 > > +00:06:38 verbose #10047 > > inl item i = +00:06:38 verbose #10048 > > try_item i >> optionm.value +00:06:38 verbose #10049 > > +00:06:38 verbose #10050 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10051 > > //// test +00:06:38 verbose #10052 > > +00:06:38 verbose #10053 > > listm.init 10i32 id +00:06:38 verbose #10054 > > |> from_list +00:06:38 verbose #10055 > > |> item 9i32 +00:06:38 verbose #10056 > > |> _assert_eq 9 +00:06:38 verbose #10057 > > +00:06:38 verbose #10058 > > ╭─[ 15.55ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:38 verbose #10059 > > │ assert_eq / actual: 9 / expected: 9 │ +00:06:38 verbose #10060 > > │ │ +00:06:38 verbose #10061 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10062 > > +00:06:38 verbose #10063 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:38 verbose #10064 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:38 verbose #10065 > > │ ## new_infinite_stream │ +00:06:38 verbose #10066 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10067 > > +00:06:38 verbose #10068 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10069 > > inl new_infinite_stream fn = +00:06:38 verbose #10070 > > inl rec loop n = +00:06:38 verbose #10071 > > StreamCons (fn n, fun () => loop (n + 1)) +00:06:38 verbose #10072 > > loop 0 +00:06:38 verbose #10073 > > +00:06:38 verbose #10074 > > inl new_infinite_stream_ fn = +00:06:38 verbose #10075 > > let rec loop n = +00:06:38 verbose #10076 > > StreamCons (fn n, fun () => loop (n + 1)) +00:06:38 verbose #10077 > > loop 0 +00:06:38 verbose #10078 > > +00:06:38 verbose #10079 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10080 > > //// test +00:06:38 verbose #10081 > > +00:06:38 verbose #10082 > > new_infinite_stream print_and_return +00:06:38 verbose #10083 > > |> item 4i32 +00:06:38 verbose #10084 > > |> _assert_eq 4i32 +00:06:38 verbose #10085 > > +00:06:38 verbose #10086 > > ╭─[ 64.02ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:38 verbose #10087 > > │ print_and_return / x: 0 │ +00:06:38 verbose #10088 > > │ print_and_return / x: 1 │ +00:06:38 verbose #10089 > > │ print_and_return / x: 2 │ +00:06:38 verbose #10090 > > │ print_and_return / x: 3 │ +00:06:38 verbose #10091 > > │ print_and_return / x: 4 │ +00:06:38 verbose #10092 > > │ assert_eq / actual: 4 / expected: 4 │ +00:06:38 verbose #10093 > > │ │ +00:06:38 verbose #10094 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10095 > > +00:06:38 verbose #10096 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:38 verbose #10097 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:38 verbose #10098 > > │ ## new_finite_stream │ +00:06:38 verbose #10099 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10100 > > +00:06:38 verbose #10101 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10102 > > inl new_finite_stream fn max = +00:06:38 verbose #10103 > > inl rec loop n = +00:06:38 verbose #10104 > > if n >= max +00:06:38 verbose #10105 > > then StreamNil +00:06:38 verbose #10106 > > else StreamCons (fn n, fun () => loop (n + 1)) +00:06:38 verbose #10107 > > loop 0 +00:06:38 verbose #10108 > > +00:06:38 verbose #10109 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:38 verbose #10110 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:38 verbose #10111 > > │ ## memoize │ +00:06:38 verbose #10112 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10113 > > +00:06:38 verbose #10114 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10115 > > union memoized_stream t = +00:06:38 verbose #10116 > > | NotComputed : () -> stream t +00:06:38 verbose #10117 > > | Computed : stream t +00:06:38 verbose #10118 > > +00:06:38 verbose #10119 > > inl memoize s = +00:06:38 verbose #10120 > > inl rec body s = +00:06:38 verbose #10121 > > inl state = mut (NotComputed s) +00:06:38 verbose #10122 > > fun () => +00:06:38 verbose #10123 > > match *state with +00:06:38 verbose #10124 > > | Computed x => x +00:06:38 verbose #10125 > > | NotComputed fn => +00:06:38 verbose #10126 > > inl new_state = +00:06:38 verbose #10127 > > match fn () with +00:06:38 verbose #10128 > > | StreamNil => StreamNil +00:06:38 verbose #10129 > > | StreamCons (x, fn) => StreamCons (x, loop fn) +00:06:38 verbose #10130 > > state <- Computed new_state +00:06:38 verbose #10131 > > new_state +00:06:38 verbose #10132 > > and inl loop s' = join_body_unit body s s' +00:06:38 verbose #10133 > > loop (fun () => s) +00:06:38 verbose #10134 > > +00:06:38 verbose #10135 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10136 > > //// test +00:06:38 verbose #10137 > > +00:06:38 verbose #10138 > > inl memo_stream = new_finite_stream print_and_return 10 |> memoize +00:06:38 verbose #10139 > > +00:06:38 verbose #10140 > > memo_stream () +00:06:38 verbose #10141 > > |> item 3i32 +00:06:38 verbose #10142 > > |> _assert_eq 3i32 +00:06:38 verbose #10143 > > +00:06:38 verbose #10144 > > memo_stream () +00:06:38 verbose #10145 > > |> item 5i32 +00:06:38 verbose #10146 > > |> _assert_eq 5i32 +00:06:38 verbose #10147 > > +00:06:38 verbose #10148 > > ╭─[ 361.34ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:38 verbose #10149 > > │ print_and_return / x: 0 │ +00:06:38 verbose #10150 > > │ print_and_return / x: 1 │ +00:06:38 verbose #10151 > > │ print_and_return / x: 2 │ +00:06:38 verbose #10152 > > │ print_and_return / x: 3 │ +00:06:38 verbose #10153 > > │ assert_eq / actual: 3 / expected: 3 │ +00:06:38 verbose #10154 > > │ print_and_return / x: 4 │ +00:06:38 verbose #10155 > > │ print_and_return / x: 5 │ +00:06:38 verbose #10156 > > │ assert_eq / actual: 5 / expected: 5 │ +00:06:38 verbose #10157 > > │ │ +00:06:38 verbose #10158 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10159 > > +00:06:38 verbose #10160 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10161 > > //// test +00:06:38 verbose #10162 > > +00:06:38 verbose #10163 > > inl memo_stream = new_infinite_stream_ print_and_return |> memoize +00:06:38 verbose #10164 > > +00:06:38 verbose #10165 > > memo_stream () +00:06:38 verbose #10166 > > |> item 3i32 +00:06:38 verbose #10167 > > |> _assert_eq 3i32 +00:06:38 verbose #10168 > > +00:06:38 verbose #10169 > > memo_stream () +00:06:38 verbose #10170 > > |> item 5i32 +00:06:38 verbose #10171 > > |> _assert_eq 5i32 +00:06:38 verbose #10172 > > +00:06:38 verbose #10173 > > ╭─[ 88.86ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:38 verbose #10174 > > │ print_and_return / x: 0 │ +00:06:38 verbose #10175 > > │ print_and_return / x: 1 │ +00:06:38 verbose #10176 > > │ print_and_return / x: 2 │ +00:06:38 verbose #10177 > > │ print_and_return / x: 3 │ +00:06:38 verbose #10178 > > │ assert_eq / actual: 3 / expected: 3 │ +00:06:38 verbose #10179 > > │ print_and_return / x: 4 │ +00:06:38 verbose #10180 > > │ print_and_return / x: 5 │ +00:06:38 verbose #10181 > > │ assert_eq / actual: 5 / expected: 5 │ +00:06:38 verbose #10182 > > │ │ +00:06:38 verbose #10183 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10184 > > +00:06:38 verbose #10185 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:38 verbose #10186 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:38 verbose #10187 > > │ ## unfold │ +00:06:38 verbose #10188 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10189 > > +00:06:38 verbose #10190 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10191 > > inl unfold f x0 = +00:06:38 verbose #10192 > > inl rec body x = +00:06:38 verbose #10193 > > match f x with +00:06:38 verbose #10194 > > | Some (x', y) => StreamCons (x', fun () => loop y) +00:06:38 verbose #10195 > > | None => StreamNil +00:06:38 verbose #10196 > > and inl loop x = join_body_unit body x0 x +00:06:38 verbose #10197 > > loop x0 +00:06:38 verbose #10198 > > +00:06:38 verbose #10199 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:38 verbose #10200 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:38 verbose #10201 > > │ ## iterate │ +00:06:38 verbose #10202 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10203 > > +00:06:38 verbose #10204 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10205 > > inl iterate f = +00:06:38 verbose #10206 > > unfold (fun x => Some (x, f x)) +00:06:38 verbose #10207 > > +00:06:38 verbose #10208 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10209 > > //// test +00:06:38 verbose #10210 > > +00:06:38 verbose #10211 > > iterate ((*) 2) 1i32 +00:06:38 verbose #10212 > > |> item 10i32 +00:06:38 verbose #10213 > > |> _assert_eq 1024 +00:06:38 verbose #10214 > > +00:06:38 verbose #10215 > > ╭─[ 16.34ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:38 verbose #10216 > > │ assert_eq / actual: 1024 / expected: 1024 │ +00:06:38 verbose #10217 > > │ │ +00:06:38 verbose #10218 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10219 > > +00:06:38 verbose #10220 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:38 verbose #10221 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:38 verbose #10222 > > │ ## take_while │ +00:06:38 verbose #10223 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10224 > > +00:06:38 verbose #10225 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10226 > > inl take_while cond s = +00:06:38 verbose #10227 > > inl rec body i = function +00:06:38 verbose #10228 > > | StreamCons (st, fn) when cond st i => StreamCons (st, fun () => loop +00:06:38 verbose #10229 > > (i + 1) (fn ())) +00:06:38 verbose #10230 > > | _ => StreamNil +00:06:38 verbose #10231 > > and inl loop i = join_body body i +00:06:38 verbose #10232 > > loop 0 s +00:06:38 verbose #10233 > > +00:06:38 verbose #10234 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:38 verbose #10235 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:38 verbose #10236 > > │ ## sum │ +00:06:38 verbose #10237 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10238 > > +00:06:38 verbose #10239 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10240 > > inl sum seq = +00:06:38 verbose #10241 > > seq |> fold (+) 0 +00:06:38 verbose #10242 > > +00:06:38 verbose #10243 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10244 > > //// test +00:06:38 verbose #10245 > > +00:06:38 verbose #10246 > > listm.init 10i32 id +00:06:38 verbose #10247 > > |> from_list +00:06:38 verbose #10248 > > |> sum +00:06:38 verbose #10249 > > |> _assert_eq 45 +00:06:38 verbose #10250 > > +00:06:38 verbose #10251 > > ╭─[ 15.72ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:38 verbose #10252 > > │ assert_eq / actual: 45 / expected: 45 │ +00:06:38 verbose #10253 > > │ │ +00:06:38 verbose #10254 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10255 > > +00:06:38 verbose #10256 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10257 > > //// test +00:06:38 verbose #10258 > > +00:06:38 verbose #10259 > > new_finite_stream print_and_return 10i32 +00:06:38 verbose #10260 > > |> take_while (fun n (_ : i32) => n < 5) +00:06:38 verbose #10261 > > |> sum +00:06:38 verbose #10262 > > |> _assert_eq 10 +00:06:38 verbose #10263 > > +00:06:38 verbose #10264 > > ╭─[ 26.26ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:38 verbose #10265 > > │ print_and_return / x: 0 │ +00:06:38 verbose #10266 > > │ print_and_return / x: 1 │ +00:06:38 verbose #10267 > > │ print_and_return / x: 2 │ +00:06:38 verbose #10268 > > │ print_and_return / x: 3 │ +00:06:38 verbose #10269 > > │ print_and_return / x: 4 │ +00:06:38 verbose #10270 > > │ print_and_return / x: 5 │ +00:06:38 verbose #10271 > > │ assert_eq / actual: 10 / expected: 10 │ +00:06:38 verbose #10272 > > │ │ +00:06:38 verbose #10273 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:38 verbose #10274 > > +00:06:38 verbose #10275 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:38 verbose #10276 > > //// test +00:06:38 verbose #10277 > > +00:06:38 verbose #10278 > > new_infinite_stream print_and_return +00:06:38 verbose #10279 > > |> take_while (fun n (_ : i32) => n < 5i32) +00:06:38 verbose #10280 > > |> sum +00:06:38 verbose #10281 > > |> _assert_eq 10 +00:06:39 verbose #10282 > > +00:06:39 verbose #10283 > > ╭─[ 26.56ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:39 verbose #10284 > > │ print_and_return / x: 0 │ +00:06:39 verbose #10285 > > │ print_and_return / x: 1 │ +00:06:39 verbose #10286 > > │ print_and_return / x: 2 │ +00:06:39 verbose #10287 > > │ print_and_return / x: 3 │ +00:06:39 verbose #10288 > > │ print_and_return / x: 4 │ +00:06:39 verbose #10289 > > │ print_and_return / x: 5 │ +00:06:39 verbose #10290 > > │ assert_eq / actual: 10 / expected: 10 │ +00:06:39 verbose #10291 > > │ │ +00:06:39 verbose #10292 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10293 > > +00:06:39 verbose #10294 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10295 > > //// test +00:06:39 verbose #10296 > > +00:06:39 verbose #10297 > > iterate ((*) 6) 1i32 +00:06:39 verbose #10298 > > |> take_while (fun _ i => i <= 7i32) +00:06:39 verbose #10299 > > |> to_list +00:06:39 verbose #10300 > > |> _assert_eq [[ 1i32; 6; 36; 216; 1296; 7776; 46656; 279936 ]] +00:06:39 verbose #10301 > > +00:06:39 verbose #10302 > > ╭─[ 45.94ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:39 verbose #10303 > > │ assert_eq / actual: UH0_1 │ +00:06:39 verbose #10304 > > │ (1, │ +00:06:39 verbose #10305 > > │ UH0_1 │ +00:06:39 verbose #10306 > > │ (6, │ +00:06:39 verbose #10307 > > │ UH0_1 │ +00:06:39 verbose #10308 > > │ (36, │ +00:06:39 verbose #10309 > > │ UH0_1 │ +00:06:39 verbose #10310 > > │ (216, │ +00:06:39 verbose #10311 > > │ UH0_1 (1296, UH0_1 (7776, UH0_1 (46656, UH0_1 (279936, │ +00:06:39 verbose #10312 > > │ UH0_0)))))))) / expected: UH0_1 │ +00:06:39 verbose #10313 > > │ (1, │ +00:06:39 verbose #10314 > > │ UH0_1 │ +00:06:39 verbose #10315 > > │ (6, │ +00:06:39 verbose #10316 > > │ UH0_1 │ +00:06:39 verbose #10317 > > │ (36, │ +00:06:39 verbose #10318 > > │ UH0_1 │ +00:06:39 verbose #10319 > > │ (216, │ +00:06:39 verbose #10320 > > │ UH0_1 (1296, UH0_1 (7776, UH0_1 (46656, UH0_1 (279936, │ +00:06:39 verbose #10321 > > │ UH0_0)))))))) │ +00:06:39 verbose #10322 > > │ │ +00:06:39 verbose #10323 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10324 > > +00:06:39 verbose #10325 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:39 verbose #10326 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:39 verbose #10327 > > │ ## indexed │ +00:06:39 verbose #10328 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10329 > > +00:06:39 verbose #10330 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10331 > > inl indexed s = +00:06:39 verbose #10332 > > ((StreamNil, 0), s) +00:06:39 verbose #10333 > > ||> fold fun (acc, i) x => +00:06:39 verbose #10334 > > StreamCons ((i, x), fun () => acc), i + 1 +00:06:39 verbose #10335 > > |> fst +00:06:39 verbose #10336 > > |> rev +00:06:39 verbose #10337 > > +00:06:39 verbose #10338 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10339 > > //// test +00:06:39 verbose #10340 > > +00:06:39 verbose #10341 > > listm.init 10i32 ((*) 2) +00:06:39 verbose #10342 > > |> from_list +00:06:39 verbose #10343 > > |> indexed +00:06:39 verbose #10344 > > |> item 5i32 +00:06:39 verbose #10345 > > |> _assert_eq (5i32, 10i32) +00:06:39 verbose #10346 > > +00:06:39 verbose #10347 > > ╭─[ 23.19ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:39 verbose #10348 > > │ assert_eq / actual: struct (5, 10) / expected: struct (5, 10) │ +00:06:39 verbose #10349 > > │ │ +00:06:39 verbose #10350 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10351 > > +00:06:39 verbose #10352 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:39 verbose #10353 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:39 verbose #10354 > > │ ## map │ +00:06:39 verbose #10355 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10356 > > +00:06:39 verbose #10357 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10358 > > inl map fn s = +00:06:39 verbose #10359 > > (s, StreamNil) +00:06:39 verbose #10360 > > ||> fold_back fun x acc => +00:06:39 verbose #10361 > > StreamCons (fn x, fun () => acc) +00:06:39 verbose #10362 > > +00:06:39 verbose #10363 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10364 > > //// test +00:06:39 verbose #10365 > > +00:06:39 verbose #10366 > > listm.init 10i32 id +00:06:39 verbose #10367 > > |> from_list +00:06:39 verbose #10368 > > |> map ((*) 2) +00:06:39 verbose #10369 > > |> item 5i32 +00:06:39 verbose #10370 > > |> _assert_eq 10i32 +00:06:39 verbose #10371 > > +00:06:39 verbose #10372 > > ╭─[ 15.33ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:39 verbose #10373 > > │ assert_eq / actual: 10 / expected: 10 │ +00:06:39 verbose #10374 > > │ │ +00:06:39 verbose #10375 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10376 > > +00:06:39 verbose #10377 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:39 verbose #10378 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:39 verbose #10379 > > │ ## zip_with │ +00:06:39 verbose #10380 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10381 > > +00:06:39 verbose #10382 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10383 > > inl zip_with fn s1 s2 = +00:06:39 verbose #10384 > > inl rec loop s1 s2 = +00:06:39 verbose #10385 > > match s1, s2 with +00:06:39 verbose #10386 > > | StreamCons (st1, fn1), StreamCons (st2, fn2) => +00:06:39 verbose #10387 > > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ())) +00:06:39 verbose #10388 > > | StreamNil, _ | _, StreamNil => StreamNil +00:06:39 verbose #10389 > > loop s1 s2 +00:06:39 verbose #10390 > > +00:06:39 verbose #10391 > > inl zip_with_ fn s1 s2 = +00:06:39 verbose #10392 > > let rec loop s1 s2 = +00:06:39 verbose #10393 > > match s1, s2 with +00:06:39 verbose #10394 > > | StreamCons (st1, fn1), StreamCons (st2, fn2) => +00:06:39 verbose #10395 > > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ())) +00:06:39 verbose #10396 > > | StreamNil, _ | _, StreamNil => StreamNil +00:06:39 verbose #10397 > > loop s1 s2 +00:06:39 verbose #10398 > > +00:06:39 verbose #10399 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10400 > > //// test +00:06:39 verbose #10401 > > +00:06:39 verbose #10402 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) +00:06:39 verbose #10403 > > ||> zip_with (+) +00:06:39 verbose #10404 > > |> item 2i32 +00:06:39 verbose #10405 > > |> _assert_eq 6 +00:06:39 verbose #10406 > > +00:06:39 verbose #10407 > > ╭─[ 17.73ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:39 verbose #10408 > > │ assert_eq / actual: 6 / expected: 6 │ +00:06:39 verbose #10409 > > │ │ +00:06:39 verbose #10410 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10411 > > +00:06:39 verbose #10412 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:39 verbose #10413 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:39 verbose #10414 > > │ ## zip │ +00:06:39 verbose #10415 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10416 > > +00:06:39 verbose #10417 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10418 > > inl zip s1 s2 = +00:06:39 verbose #10419 > > zip_with pair s1 s2 +00:06:39 verbose #10420 > > +00:06:39 verbose #10421 > > inl zip_ s1 s2 = +00:06:39 verbose #10422 > > zip_with_ pair s1 s2 +00:06:39 verbose #10423 > > +00:06:39 verbose #10424 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10425 > > //// test +00:06:39 verbose #10426 > > +00:06:39 verbose #10427 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) +00:06:39 verbose #10428 > > ||> zip +00:06:39 verbose #10429 > > |> item 5i32 +00:06:39 verbose #10430 > > |> _assert_eq (5, 10) +00:06:39 verbose #10431 > > +00:06:39 verbose #10432 > > ╭─[ 16.49ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:39 verbose #10433 > > │ assert_eq / actual: struct (5, 10) / expected: struct (5, 10) │ +00:06:39 verbose #10434 > > │ │ +00:06:39 verbose #10435 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10436 > > +00:06:39 verbose #10437 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:39 verbose #10438 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:39 verbose #10439 > > │ ## unzip │ +00:06:39 verbose #10440 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10441 > > +00:06:39 verbose #10442 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10443 > > inl unzip s = +00:06:39 verbose #10444 > > inl rec body s = +00:06:39 verbose #10445 > > match s with +00:06:39 verbose #10446 > > | StreamCons ((x, y), fn) => +00:06:39 verbose #10447 > > inl xs, ys = loop (fn ()) +00:06:39 verbose #10448 > > StreamCons (x, fun () => xs), StreamCons (y, fun () => ys) +00:06:39 verbose #10449 > > | StreamNil => pair StreamNil StreamNil +00:06:39 verbose #10450 > > and inl loop x = +00:06:39 verbose #10451 > > if var_is x |> not +00:06:39 verbose #10452 > > then body x +00:06:39 verbose #10453 > > else +00:06:39 verbose #10454 > > inl x = dyn x +00:06:39 verbose #10455 > > join body x +00:06:39 verbose #10456 > > loop s +00:06:39 verbose #10457 > > +00:06:39 verbose #10458 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:39 verbose #10459 > > //// test +00:06:39 verbose #10460 > > +00:06:39 verbose #10461 > > listm.init 10i32 id +00:06:39 verbose #10462 > > |> listm.map (fun x => x, x) +00:06:39 verbose #10463 > > |> from_list +00:06:39 verbose #10464 > > |> unzip +00:06:39 verbose #10465 > > |> fun x, y => +00:06:39 verbose #10466 > > x |> sum +00:06:39 verbose #10467 > > |> _assert_eq 45 +00:06:39 verbose #10468 > > +00:06:39 verbose #10469 > > y |> sum +00:06:39 verbose #10470 > > |> _assert_eq 45 +00:06:39 verbose #10471 > > +00:06:39 verbose #10472 > > ╭─[ 21.06ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:39 verbose #10473 > > │ assert_eq / actual: 45 / expected: 45 │ +00:06:39 verbose #10474 > > │ assert_eq / actual: 45 / expected: 45 │ +00:06:39 verbose #10475 > > │ │ +00:06:39 verbose #10476 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:39 verbose #10477 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 31221 +00:06:39 verbose #10478 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:06:41 verbose #10479 > 00:00:09 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/stream.dib.ipynb to html +00:06:41 verbose #10480 > 00:00:09 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:06:41 verbose #10481 > 00:00:09 verbose #7 ! validate(nb) +00:06:42 verbose #10482 > 00:00:11 verbose #8 ! [NbConvertApp] Writing 361139 bytes to c:\home\git\polyglot\lib\spiral\stream.dib.html +00:06:42 verbose #10483 > 00:00:11 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 643 +00:06:42 verbose #10484 > 00:00:11 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 643 +00:06:42 verbose #10485 > 00:00:11 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/stream.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/stream.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:06:43 verbose #10486 > 00:00:12 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:06:43 verbose #10487 > 00:00:12 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:06:44 verbose #10488 > 00:00:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 31923 +00:06:44 debug #10489 execute_with_options_async / exit_code: 0 / output.Length: 35508 +00:06:44 debug #20 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path stream.dib --retries 3 +00:06:44 debug #10490 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path seq.dib --retries 3", [||], None, None, true, None) -00:14:15 verbose #10325 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "seq.dib", "--retries", "3"]) -00:14:15 verbose #10326 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/seq.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/seq.dib" --output-path "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:14:26 verbose #10327 > -00:14:26 verbose #10328 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10329 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10330 > │ # seq │ -00:14:26 verbose #10331 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10332 > -00:14:26 verbose #10333 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10334 > //// test -00:14:26 verbose #10335 > -00:14:26 verbose #10336 > open testing -00:14:26 verbose #10337 > -00:14:26 verbose #10338 > ── spiral - import ───────────────────────────────────────────────────────────── -00:14:26 verbose #10339 > #r -00:14:26 verbose #10340 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:14:26 verbose #10341 > otNet.Interactive.Spiral.dll" -00:14:26 verbose #10342 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:14:26 verbose #10343 > #r -00:14:26 verbose #10344 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:14:26 verbose #10345 > otNet.Interactive.dll" -00:14:26 verbose #10346 > open type Microsoft.DotNet.Interactive.Kernel -00:14:26 verbose #10347 > -00:14:26 verbose #10348 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10349 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10350 > │ ## types │ -00:14:26 verbose #10351 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10352 > -00:14:26 verbose #10353 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10354 > inl types () = -00:14:26 verbose #10355 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:26 verbose #10356 > Fable.Core.Emit(\"core::iter::Fuse<$0>\")>]]\n#endif\ntype core_iter_Fuse<'T> = -00:14:26 verbose #10357 > class end" -00:14:26 verbose #10358 > -00:14:26 verbose #10359 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10360 > nominal fuse t = $'core_iter_Fuse<`t>' -00:14:26 verbose #10361 > -00:14:26 verbose #10362 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10363 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10364 > │ ## seq' │ -00:14:26 verbose #10365 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10366 > -00:14:26 verbose #10367 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10368 > nominal seq' t = $"`t seq" -00:14:26 verbose #10369 > -00:14:26 verbose #10370 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10371 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10372 > │ ## of_array' │ -00:14:26 verbose #10373 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10374 > -00:14:26 verbose #10375 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10376 > inl of_array' forall dim t. (items : a dim t) : seq' t = -00:14:26 verbose #10377 > $'seq { for i = 0 to !items.Length - 1 do yield !items.[[i]] }' -00:14:26 verbose #10378 > -00:14:26 verbose #10379 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10380 > //// test -00:14:26 verbose #10381 > -00:14:26 verbose #10382 > (a ;[[ "a"; "b" ]] : _ i32 _) -00:14:26 verbose #10383 > |> of_array' -00:14:26 verbose #10384 > -00:14:26 verbose #10385 > ╭─[ 825.99ms - return value ]──────────────────────────────────────────────────╮ -00:14:26 verbose #10386 > │ <details open="open" class="dni-treeview"><summary><span │ -00:14:26 verbose #10387 > │ class="dni-code-hint"><code>[ a, b │ -00:14:26 verbose #10388 > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ -00:14:26 verbose #10389 > │ CheckClose</td><td><div │ -00:14:26 verbose #10390 > │ class="dni-plaintext"><pre>False</pre></div></td></tr><tr><td>LastGenerated< │ -00:14:26 verbose #10391 > │ /td><td><div │ -00:14:26 verbose #10392 > │ class="dni-plaintext"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>v2</td> │ -00:14:26 verbose #10393 > │ <td><div class="dni-plaintext"><pre>[ a, b │ -00:14:26 verbose #10394 > │ ]</pre></div></td></tr><tr><td>enum</td><td><div │ -00:14:26 verbose #10395 > │ class="dni-plaintext"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>pc</td> │ -00:14:26 verbose #10396 > │ <td><div │ -00:14:26 verbose #10397 > │ class="dni-plaintext"><pre>0</pre></div></td></tr><tr><td>current</td><td><d │ -00:14:26 verbose #10398 > │ iv │ -00:14:26 verbose #10399 > │ class="dni-plaintext"><pre>&lt;null&gt;</pre></div></td></tr><tr><td><i>(val │ -00:14:26 verbose #10400 > │ ues)</i></td><td><div class="dni-plaintext"><pre>[ a, b │ -00:14:26 verbose #10401 > │ ]</pre></div></td></tr></tbody></table></div></details><style> │ -00:14:26 verbose #10402 > │ .dni-code-hint { │ -00:14:26 verbose #10403 > │ font-style: italic; │ -00:14:26 verbose #10404 > │ overflow: hidden; │ -00:14:26 verbose #10405 > │ white-space: nowrap; │ -00:14:26 verbose #10406 > │ } │ -00:14:26 verbose #10407 > │ .dni-treeview { │ -00:14:26 verbose #10408 > │ white-space: nowrap; │ -00:14:26 verbose #10409 > │ } │ -00:14:26 verbose #10410 > │ .dni-treeview td { │ -00:14:26 verbose #10411 > │ vertical-align: top; │ -00:14:26 verbose #10412 > │ text-align: start; │ -00:14:26 verbose #10413 > │ } │ -00:14:26 verbose #10414 > │ details.dni-treeview { │ -00:14:26 verbose #10415 > │ padding-left: 1em; │ -00:14:26 verbose #10416 > │ } │ -00:14:26 verbose #10417 > │ table td { │ -00:14:26 verbose #10418 > │ text-align: start; │ -00:14:26 verbose #10419 > │ } │ -00:14:26 verbose #10420 > │ table tr { │ -00:14:26 verbose #10421 > │ vertical-align: top; │ -00:14:26 verbose #10422 > │ margin: 0em 0px; │ -00:14:26 verbose #10423 > │ } │ -00:14:26 verbose #10424 > │ table tr td pre │ -00:14:26 verbose #10425 > │ { │ -00:14:26 verbose #10426 > │ vertical-align: top !important; │ -00:14:26 verbose #10427 > │ margin: 0em 0px !important; │ -00:14:26 verbose #10428 > │ } │ -00:14:26 verbose #10429 > │ table th { │ -00:14:26 verbose #10430 > │ text-align: start; │ -00:14:26 verbose #10431 > │ } │ -00:14:26 verbose #10432 > │ </style> │ -00:14:26 verbose #10433 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10434 > -00:14:26 verbose #10435 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10436 > inl of_array forall dim t. (items : a dim t) : seq' t = -00:14:26 verbose #10437 > items |> $'Seq.ofArray' -00:14:26 verbose #10438 > -00:14:26 verbose #10439 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10440 > //// test -00:14:26 verbose #10441 > -00:14:26 verbose #10442 > (a ;[[ "a"; "b" ]] : _ i32 _) -00:14:26 verbose #10443 > |> of_array -00:14:26 verbose #10444 > -00:14:26 verbose #10445 > ╭─[ 58.18ms - return value ]───────────────────────────────────────────────────╮ -00:14:26 verbose #10446 > │ <details open="open" class="dni-treeview"><summary><span │ -00:14:26 verbose #10447 > │ class="dni-code-hint"><code>[ a, b │ -00:14:26 verbose #10448 > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ -00:14:26 verbose #10449 > │ f</td><td><details class="dni-treeview"><summary><span │ -00:14:26 verbose #10450 > │ class="dni-code-hint"><code>Microsoft.FSharp.Collections.SeqModule+OfArray@1 │ -00:14:26 verbose #10451 > │ 010[ │ -00:14:26 verbose #10452 > │ System.String]</code></span></summary><div><table><thead><tr></tr></thead><t │ -00:14:26 verbose #10453 > │ body><tr><td>source</td><td><div class="dni-plaintext"><pre>[ a, b │ -00:14:26 verbose #10454 > │ ]</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td><i> │ -00:14:26 verbose #10455 > │ (values)</i></td><td><div class="dni-plaintext"><pre>[ a, b │ -00:14:26 verbose #10456 > │ ]</pre></div></td></tr></tbody></table></div></details><style> │ -00:14:26 verbose #10457 > │ .dni-code-hint { │ -00:14:26 verbose #10458 > │ font-style: italic; │ -00:14:26 verbose #10459 > │ overflow: hidden; │ -00:14:26 verbose #10460 > │ white-space: nowrap; │ -00:14:26 verbose #10461 > │ } │ -00:14:26 verbose #10462 > │ .dni-treeview { │ -00:14:26 verbose #10463 > │ white-space: nowrap; │ -00:14:26 verbose #10464 > │ } │ -00:14:26 verbose #10465 > │ .dni-treeview td { │ -00:14:26 verbose #10466 > │ vertical-align: top; │ -00:14:26 verbose #10467 > │ text-align: start; │ -00:14:26 verbose #10468 > │ } │ -00:14:26 verbose #10469 > │ details.dni-treeview { │ -00:14:26 verbose #10470 > │ padding-left: 1em; │ -00:14:26 verbose #10471 > │ } │ -00:14:26 verbose #10472 > │ table td { │ -00:14:26 verbose #10473 > │ text-align: start; │ -00:14:26 verbose #10474 > │ } │ -00:14:26 verbose #10475 > │ table tr { │ -00:14:26 verbose #10476 > │ vertical-align: top; │ -00:14:26 verbose #10477 > │ margin: 0em 0px; │ -00:14:26 verbose #10478 > │ } │ -00:14:26 verbose #10479 > │ table tr td pre │ -00:14:26 verbose #10480 > │ { │ -00:14:26 verbose #10481 > │ vertical-align: top !important; │ -00:14:26 verbose #10482 > │ margin: 0em 0px !important; │ -00:14:26 verbose #10483 > │ } │ -00:14:26 verbose #10484 > │ table th { │ -00:14:26 verbose #10485 > │ text-align: start; │ -00:14:26 verbose #10486 > │ } │ -00:14:26 verbose #10487 > │ </style> │ -00:14:26 verbose #10488 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10489 > -00:14:26 verbose #10490 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10491 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10492 > │ ## to_array' │ -00:14:26 verbose #10493 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10494 > -00:14:26 verbose #10495 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10496 > inl to_array' forall dim t. (items : seq' t) : a dim t = -00:14:26 verbose #10497 > items |> $'Seq.toArray' -00:14:26 verbose #10498 > -00:14:26 verbose #10499 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10500 > //// test -00:14:26 verbose #10501 > -00:14:26 verbose #10502 > (a ;[[ "a"; "b" ]] : _ i32 _) -00:14:26 verbose #10503 > |> of_array' -00:14:26 verbose #10504 > |> to_array' -00:14:26 verbose #10505 > |> _assert_eq (a ;[[ "a"; "b" ]] : _ i32 _) -00:14:26 verbose #10506 > -00:14:26 verbose #10507 > ╭─[ 246.24ms - stdout ]────────────────────────────────────────────────────────╮ -00:14:26 verbose #10508 > │ assert_eq / actual: [|"a"; "b"|] / expected: [|"a"; "b"|] │ -00:14:26 verbose #10509 > │ │ -00:14:26 verbose #10510 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10511 > -00:14:26 verbose #10512 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10513 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10514 > │ ## to_list' │ -00:14:26 verbose #10515 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10516 > -00:14:26 verbose #10517 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10518 > inl to_list' forall t. (items : seq' t) : listm'.list' t = -00:14:26 verbose #10519 > items |> $'Seq.toList' -00:14:26 verbose #10520 > -00:14:26 verbose #10521 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10522 > //// test -00:14:26 verbose #10523 > -00:14:26 verbose #10524 > (a ;[[ "a"; "b" ]] : _ i32 _) -00:14:26 verbose #10525 > |> of_array -00:14:26 verbose #10526 > |> to_list' -00:14:26 verbose #10527 > |> listm'.unbox -00:14:26 verbose #10528 > |> _assert_eq ([[ "a"; "b" ]]) -00:14:26 verbose #10529 > -00:14:26 verbose #10530 > ╭─[ 454.33ms - stdout ]────────────────────────────────────────────────────────╮ -00:14:26 verbose #10531 > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_0)) / expected: UH0_1 ("a", │ -00:14:26 verbose #10532 > │ UH0_1 ("b", UH0_0)) │ -00:14:26 verbose #10533 > │ │ -00:14:26 verbose #10534 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10535 > -00:14:26 verbose #10536 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10537 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10538 > │ ## rev' │ -00:14:26 verbose #10539 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10540 > -00:14:26 verbose #10541 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10542 > inl rev'' forall t u. (items : t) : seq' u = -00:14:26 verbose #10543 > items |> $'Seq.rev' -00:14:26 verbose #10544 > -00:14:26 verbose #10545 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10546 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10547 > │ ## seq │ -00:14:26 verbose #10548 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10549 > -00:14:26 verbose #10550 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10551 > type seq dim el = dim -> option el -00:14:26 verbose #10552 > -00:14:26 verbose #10553 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10554 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10555 > │ ## try_item │ -00:14:26 verbose #10556 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10557 > -00:14:26 verbose #10558 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10559 > inl try_item n s = -00:14:26 verbose #10560 > n |> s -00:14:26 verbose #10561 > -00:14:26 verbose #10562 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10563 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10564 > │ ## from_list │ -00:14:26 verbose #10565 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10566 > -00:14:26 verbose #10567 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10568 > inl from_list list = -00:14:26 verbose #10569 > fun n => -00:14:26 verbose #10570 > list -00:14:26 verbose #10571 > |> listm'.try_item n -00:14:26 verbose #10572 > -00:14:26 verbose #10573 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10574 > //// test -00:14:26 verbose #10575 > -00:14:26 verbose #10576 > listm.init 10i32 print_and_return -00:14:26 verbose #10577 > |> from_list -00:14:26 verbose #10578 > |> try_item 5i32 -00:14:26 verbose #10579 > |> _assert_eq (Some 5i32) -00:14:26 verbose #10580 > -00:14:26 verbose #10581 > ╭─[ 102.04ms - stdout ]────────────────────────────────────────────────────────╮ -00:14:26 verbose #10582 > │ print_and_return / x: 0 │ -00:14:26 verbose #10583 > │ print_and_return / x: 1 │ -00:14:26 verbose #10584 > │ print_and_return / x: 2 │ -00:14:26 verbose #10585 > │ print_and_return / x: 3 │ -00:14:26 verbose #10586 > │ print_and_return / x: 4 │ -00:14:26 verbose #10587 > │ print_and_return / x: 5 │ -00:14:26 verbose #10588 > │ print_and_return / x: 6 │ -00:14:26 verbose #10589 > │ print_and_return / x: 7 │ -00:14:26 verbose #10590 > │ print_and_return / x: 8 │ -00:14:26 verbose #10591 > │ print_and_return / x: 9 │ -00:14:26 verbose #10592 > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │ -00:14:26 verbose #10593 > │ │ -00:14:26 verbose #10594 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10595 > -00:14:26 verbose #10596 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10597 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10598 > │ ## map │ -00:14:26 verbose #10599 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10600 > -00:14:26 verbose #10601 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10602 > inl map fn s = -00:14:26 verbose #10603 > fun n => -00:14:26 verbose #10604 > n -00:14:26 verbose #10605 > |> s -00:14:26 verbose #10606 > |> optionm.map fn -00:14:26 verbose #10607 > -00:14:26 verbose #10608 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10609 > //// test -00:14:26 verbose #10610 > -00:14:26 verbose #10611 > listm.init 10i32 id -00:14:26 verbose #10612 > |> from_list -00:14:26 verbose #10613 > |> map ((*) 2) -00:14:26 verbose #10614 > |> try_item 5i32 -00:14:26 verbose #10615 > |> _assert_eq (Some 10i32) -00:14:26 verbose #10616 > -00:14:26 verbose #10617 > ╭─[ 53.33ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10618 > │ assert_eq / actual: US0_0 10 / expected: US0_0 10 │ -00:14:26 verbose #10619 > │ │ -00:14:26 verbose #10620 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10621 > -00:14:26 verbose #10622 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10623 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10624 > │ ## mapi │ -00:14:26 verbose #10625 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10626 > -00:14:26 verbose #10627 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10628 > inl mapi fn s = -00:14:26 verbose #10629 > fun n => -00:14:26 verbose #10630 > n -00:14:26 verbose #10631 > |> s -00:14:26 verbose #10632 > |> optionm.map (fn n) -00:14:26 verbose #10633 > -00:14:26 verbose #10634 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10635 > //// test -00:14:26 verbose #10636 > -00:14:26 verbose #10637 > listm.init 10i32 print_and_return -00:14:26 verbose #10638 > |> from_list -00:14:26 verbose #10639 > |> mapi fun i x => i + x -00:14:26 verbose #10640 > |> try_item 5i32 -00:14:26 verbose #10641 > |> _assert_eq (Some 10i32) -00:14:26 verbose #10642 > -00:14:26 verbose #10643 > ╭─[ 91.90ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10644 > │ print_and_return / x: 0 │ -00:14:26 verbose #10645 > │ print_and_return / x: 1 │ -00:14:26 verbose #10646 > │ print_and_return / x: 2 │ -00:14:26 verbose #10647 > │ print_and_return / x: 3 │ -00:14:26 verbose #10648 > │ print_and_return / x: 4 │ -00:14:26 verbose #10649 > │ print_and_return / x: 5 │ -00:14:26 verbose #10650 > │ print_and_return / x: 6 │ -00:14:26 verbose #10651 > │ print_and_return / x: 7 │ -00:14:26 verbose #10652 > │ print_and_return / x: 8 │ -00:14:26 verbose #10653 > │ print_and_return / x: 9 │ -00:14:26 verbose #10654 > │ assert_eq / actual: US0_0 10 / expected: US0_0 10 │ -00:14:26 verbose #10655 > │ │ -00:14:26 verbose #10656 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10657 > -00:14:26 verbose #10658 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10659 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10660 > │ ## choose │ -00:14:26 verbose #10661 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10662 > -00:14:26 verbose #10663 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10664 > inl choose forall dim {number} t u. (fn : t -> option u) (s : seq dim t) : seq -00:14:26 verbose #10665 > dim u = -00:14:26 verbose #10666 > fun n => -00:14:26 verbose #10667 > inl rec body fn s i i' = -00:14:26 verbose #10668 > match i |> s with -00:14:26 verbose #10669 > | None => None -00:14:26 verbose #10670 > | Some x => -00:14:26 verbose #10671 > match x |> fn with -00:14:26 verbose #10672 > | Some x when n = i' => Some x -00:14:26 verbose #10673 > | Some _ => loop (i + 1) (i' + 1) -00:14:26 verbose #10674 > | _ => loop (i + 1) i' -00:14:26 verbose #10675 > and inl loop i i' = -00:14:26 verbose #10676 > if n |> var_is |> not -00:14:26 verbose #10677 > then body fn s i i' -00:14:26 verbose #10678 > else -00:14:26 verbose #10679 > inl fn = join fn -00:14:26 verbose #10680 > inl s = join s -00:14:26 verbose #10681 > join body fn s i i' -00:14:26 verbose #10682 > loop 0 0 -00:14:26 verbose #10683 > -00:14:26 verbose #10684 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10685 > //// test -00:14:26 verbose #10686 > -00:14:26 verbose #10687 > listm.init 10i32 print_and_return -00:14:26 verbose #10688 > |> from_list -00:14:26 verbose #10689 > |> choose (fun x => if x % 2 = 0 then Some x else None) -00:14:26 verbose #10690 > |> try_item 1i32 -00:14:26 verbose #10691 > |> _assert_eq (Some 2i32) -00:14:26 verbose #10692 > -00:14:26 verbose #10693 > ╭─[ 71.96ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10694 > │ print_and_return / x: 0 │ -00:14:26 verbose #10695 > │ print_and_return / x: 1 │ -00:14:26 verbose #10696 > │ print_and_return / x: 2 │ -00:14:26 verbose #10697 > │ print_and_return / x: 3 │ -00:14:26 verbose #10698 > │ print_and_return / x: 4 │ -00:14:26 verbose #10699 > │ print_and_return / x: 5 │ -00:14:26 verbose #10700 > │ print_and_return / x: 6 │ -00:14:26 verbose #10701 > │ print_and_return / x: 7 │ -00:14:26 verbose #10702 > │ print_and_return / x: 8 │ -00:14:26 verbose #10703 > │ print_and_return / x: 9 │ -00:14:26 verbose #10704 > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │ -00:14:26 verbose #10705 > │ │ -00:14:26 verbose #10706 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10707 > -00:14:26 verbose #10708 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10709 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10710 > │ ## indexed │ -00:14:26 verbose #10711 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10712 > -00:14:26 verbose #10713 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10714 > inl indexed s = -00:14:26 verbose #10715 > s -00:14:26 verbose #10716 > |> mapi fun i x => -00:14:26 verbose #10717 > i, x -00:14:26 verbose #10718 > -00:14:26 verbose #10719 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10720 > //// test -00:14:26 verbose #10721 > -00:14:26 verbose #10722 > listm.init 10i32 ((*) 2) -00:14:26 verbose #10723 > |> from_list -00:14:26 verbose #10724 > |> indexed -00:14:26 verbose #10725 > |> try_item 5i32 -00:14:26 verbose #10726 > |> _assert_eq (Some (5i32, 10i32)) -00:14:26 verbose #10727 > -00:14:26 verbose #10728 > ╭─[ 62.80ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10729 > │ assert_eq / actual: US0_0 (5, 10) / expected: US0_0 (5, 10) │ -00:14:26 verbose #10730 > │ │ -00:14:26 verbose #10731 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10732 > -00:14:26 verbose #10733 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10734 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10735 > │ ## zip │ -00:14:26 verbose #10736 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10737 > -00:14:26 verbose #10738 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10739 > inl zip n seq1 seq2 = -00:14:26 verbose #10740 > seq1 n, seq2 n -00:14:26 verbose #10741 > -00:14:26 verbose #10742 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10743 > //// test -00:14:26 verbose #10744 > -00:14:26 verbose #10745 > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) -00:14:26 verbose #10746 > ||> zip 5i32 -00:14:26 verbose #10747 > |> _assert_eq (Some 5, Some 10) -00:14:26 verbose #10748 > -00:14:26 verbose #10749 > ╭─[ 64.57ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10750 > │ assert_eq / actual: struct (US0_0 5, US0_0 10) / expected: struct (US0_0 5, │ -00:14:26 verbose #10751 > │ US0_0 10) │ -00:14:26 verbose #10752 > │ │ -00:14:26 verbose #10753 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10754 > -00:14:26 verbose #10755 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10756 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10757 > │ ## zip_with │ -00:14:26 verbose #10758 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10759 > -00:14:26 verbose #10760 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10761 > inl zip_with fn seq1 seq2 = -00:14:26 verbose #10762 > fun n => -00:14:26 verbose #10763 > fn (seq1 n) (seq2 n) -00:14:26 verbose #10764 > -00:14:26 verbose #10765 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10766 > //// test -00:14:26 verbose #10767 > -00:14:26 verbose #10768 > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) -00:14:26 verbose #10769 > ||> zip_with (optionm'.choose (+)) -00:14:26 verbose #10770 > |> try_item 2i32 -00:14:26 verbose #10771 > |> _assert_eq (Some 6) -00:14:26 verbose #10772 > -00:14:26 verbose #10773 > ╭─[ 55.61ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10774 > │ assert_eq / actual: US0_0 6 / expected: US0_0 6 │ -00:14:26 verbose #10775 > │ │ -00:14:26 verbose #10776 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10777 > -00:14:26 verbose #10778 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10779 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10780 > │ ## fold │ -00:14:26 verbose #10781 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10782 > -00:14:26 verbose #10783 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10784 > inl fold fn init seq = -00:14:26 verbose #10785 > inl rec loop acc n = -00:14:26 verbose #10786 > match seq n with -00:14:26 verbose #10787 > | Some x => loop (fn acc x) (n + 1) -00:14:26 verbose #10788 > | None => acc -00:14:26 verbose #10789 > loop init 0 -00:14:26 verbose #10790 > -00:14:26 verbose #10791 > inl fold_ fn init seq = -00:14:26 verbose #10792 > let rec loop acc n = -00:14:26 verbose #10793 > match seq n with -00:14:26 verbose #10794 > | Some x => loop (fn acc x) (n + 1) -00:14:26 verbose #10795 > | None => acc -00:14:26 verbose #10796 > loop init 0 -00:14:26 verbose #10797 > -00:14:26 verbose #10798 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10799 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10800 > │ ## sum │ -00:14:26 verbose #10801 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10802 > -00:14:26 verbose #10803 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10804 > inl sum seq = -00:14:26 verbose #10805 > seq |> fold (+) 0 -00:14:26 verbose #10806 > -00:14:26 verbose #10807 > inl sum_ seq = -00:14:26 verbose #10808 > seq |> fold_ (+) 0 -00:14:26 verbose #10809 > -00:14:26 verbose #10810 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10811 > //// test -00:14:26 verbose #10812 > -00:14:26 verbose #10813 > listm.init 10i32 id -00:14:26 verbose #10814 > |> from_list -00:14:26 verbose #10815 > |> fun f (n : i32) => f n -00:14:26 verbose #10816 > |> sum -00:14:26 verbose #10817 > |> _assert_eq 45 -00:14:26 verbose #10818 > -00:14:26 verbose #10819 > ╭─[ 29.04ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10820 > │ assert_eq / actual: 45 / expected: 45 │ -00:14:26 verbose #10821 > │ │ -00:14:26 verbose #10822 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10823 > -00:14:26 verbose #10824 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10825 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10826 > │ ## to_list │ -00:14:26 verbose #10827 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10828 > -00:14:26 verbose #10829 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10830 > inl to_list seq = -00:14:26 verbose #10831 > seq -00:14:26 verbose #10832 > |> fold (fun acc x => x :: acc) [[]] -00:14:26 verbose #10833 > |> listm.rev -00:14:26 verbose #10834 > -00:14:26 verbose #10835 > inl to_list_ seq = -00:14:26 verbose #10836 > seq -00:14:26 verbose #10837 > |> fold_ (fun acc x => x :: acc) [[]] -00:14:26 verbose #10838 > |> listm.rev -00:14:26 verbose #10839 > -00:14:26 verbose #10840 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10841 > //// test -00:14:26 verbose #10842 > -00:14:26 verbose #10843 > listm.init 10i32 id -00:14:26 verbose #10844 > |> from_list -00:14:26 verbose #10845 > |> fun f (n : i32) => f n -00:14:26 verbose #10846 > |> to_list -00:14:26 verbose #10847 > |> _assert_eq (listm.init 10i32 id) -00:14:26 verbose #10848 > -00:14:26 verbose #10849 > ╭─[ 80.17ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10850 > │ assert_eq / actual: UH0_1 │ -00:14:26 verbose #10851 > │ (0, │ -00:14:26 verbose #10852 > │ UH0_1 │ -00:14:26 verbose #10853 > │ (1, │ -00:14:26 verbose #10854 > │ UH0_1 │ -00:14:26 verbose #10855 > │ (2, │ -00:14:26 verbose #10856 > │ UH0_1 │ -00:14:26 verbose #10857 > │ (3, │ -00:14:26 verbose #10858 > │ UH0_1 │ -00:14:26 verbose #10859 > │ (4, UH0_1 (5, UH0_1 (6, UH0_1 (7, UH0_1 (8, UH0_1 (9, │ -00:14:26 verbose #10860 > │ UH0_0)))))))))) / expected: UH0_1 │ -00:14:26 verbose #10861 > │ (0, │ -00:14:26 verbose #10862 > │ UH0_1 │ -00:14:26 verbose #10863 > │ (1, │ -00:14:26 verbose #10864 > │ UH0_1 │ -00:14:26 verbose #10865 > │ (2, │ -00:14:26 verbose #10866 > │ UH0_1 │ -00:14:26 verbose #10867 > │ (3, │ -00:14:26 verbose #10868 > │ UH0_1 │ -00:14:26 verbose #10869 > │ (4, UH0_1 (5, UH0_1 (6, UH0_1 (7, UH0_1 (8, UH0_1 (9, │ -00:14:26 verbose #10870 > │ UH0_0)))))))))) │ -00:14:26 verbose #10871 > │ │ -00:14:26 verbose #10872 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10873 > -00:14:26 verbose #10874 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10875 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10876 > │ ## from_array │ -00:14:26 verbose #10877 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10878 > -00:14:26 verbose #10879 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10880 > inl from_array forall dim {number; int} el. (array : a dim el) : seq dim el = -00:14:26 verbose #10881 > fun n => -00:14:26 verbose #10882 > if n >= length array -00:14:26 verbose #10883 > then None -00:14:26 verbose #10884 > else index array n |> Some -00:14:26 verbose #10885 > -00:14:26 verbose #10886 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10887 > //// test -00:14:26 verbose #10888 > -00:14:26 verbose #10889 > a ;[[ 1; 2; 3 ]] -00:14:26 verbose #10890 > |> from_array -00:14:26 verbose #10891 > |> try_item 1i32 -00:14:26 verbose #10892 > |> _assert_eq (Some 2i32) -00:14:26 verbose #10893 > -00:14:26 verbose #10894 > ╭─[ 75.48ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10895 > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │ -00:14:26 verbose #10896 > │ │ -00:14:26 verbose #10897 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10898 > -00:14:26 verbose #10899 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10900 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10901 > │ ## to_array │ -00:14:26 verbose #10902 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10903 > -00:14:26 verbose #10904 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10905 > inl to_array seq = -00:14:26 verbose #10906 > inl ar = a ;[[]] |> mut -00:14:26 verbose #10907 > ((), seq) -00:14:26 verbose #10908 > ||> fold fun _ x => -00:14:26 verbose #10909 > ar <- *ar ++ a ;[[x]] -00:14:26 verbose #10910 > *ar -00:14:26 verbose #10911 > -00:14:26 verbose #10912 > inl to_array_ seq = -00:14:26 verbose #10913 > inl ar = a ;[[]] |> mut -00:14:26 verbose #10914 > ((), seq) -00:14:26 verbose #10915 > ||> fold_ fun _ x => -00:14:26 verbose #10916 > ar <- *ar ++ a ;[[x]] -00:14:26 verbose #10917 > *ar -00:14:26 verbose #10918 > -00:14:26 verbose #10919 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10920 > //// test -00:14:26 verbose #10921 > -00:14:26 verbose #10922 > listm.init 10i32 id -00:14:26 verbose #10923 > |> from_list -00:14:26 verbose #10924 > |> fun (x : i32 -> _) => x -00:14:26 verbose #10925 > |> to_array -00:14:26 verbose #10926 > |> _assert_eq (a ;[[ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9 ]] : _ i32 _) -00:14:26 verbose #10927 > -00:14:26 verbose #10928 > ╭─[ 284.97ms - stdout ]────────────────────────────────────────────────────────╮ -00:14:26 verbose #10929 > │ assert_eq / actual: [|0; 1; 2; 3; 4; 5; 6; 7; 8; 9|] / expected: [|0; 1; 2; │ -00:14:26 verbose #10930 > │ 3; 4; 5; 6; 7; 8; 9|] │ -00:14:26 verbose #10931 > │ │ -00:14:26 verbose #10932 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10933 > -00:14:26 verbose #10934 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10935 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10936 > │ ## take_while │ -00:14:26 verbose #10937 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10938 > -00:14:26 verbose #10939 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10940 > inl take_while cond seq = -00:14:26 verbose #10941 > inl rec loop acc i = -00:14:26 verbose #10942 > match seq i with -00:14:26 verbose #10943 > | Some st when cond st i => loop (st :: acc) (i + 1) -00:14:26 verbose #10944 > | _ => acc |> listm.rev -00:14:26 verbose #10945 > loop [[]] 0 -00:14:26 verbose #10946 > -00:14:26 verbose #10947 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10948 > //// test -00:14:26 verbose #10949 > -00:14:26 verbose #10950 > listm.init 10i32 id -00:14:26 verbose #10951 > |> from_list -00:14:26 verbose #10952 > |> take_while (fun n (_ : i32) => n < 5) -00:14:26 verbose #10953 > |> listm'.sum -00:14:26 verbose #10954 > |> _assert_eq 10 -00:14:26 verbose #10955 > -00:14:26 verbose #10956 > ╭─[ 32.50ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10957 > │ assert_eq / actual: 10 / expected: 10 │ -00:14:26 verbose #10958 > │ │ -00:14:26 verbose #10959 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10960 > -00:14:26 verbose #10961 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10962 > //// test -00:14:26 verbose #10963 > -00:14:26 verbose #10964 > stream.new_finite_stream print_and_return 10i32 -00:14:26 verbose #10965 > |> flip stream.try_item -00:14:26 verbose #10966 > |> take_while (fun n (_ : i32) => n < 5) -00:14:26 verbose #10967 > |> listm'.sum -00:14:26 verbose #10968 > |> _assert_eq 10 -00:14:26 verbose #10969 > -00:14:26 verbose #10970 > ╭─[ 63.66ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #10971 > │ print_and_return / x: 0 │ -00:14:26 verbose #10972 > │ print_and_return / x: 1 │ -00:14:26 verbose #10973 > │ print_and_return / x: 1 │ -00:14:26 verbose #10974 > │ print_and_return / x: 2 │ -00:14:26 verbose #10975 > │ print_and_return / x: 1 │ -00:14:26 verbose #10976 > │ print_and_return / x: 2 │ -00:14:26 verbose #10977 > │ print_and_return / x: 3 │ -00:14:26 verbose #10978 > │ print_and_return / x: 1 │ -00:14:26 verbose #10979 > │ print_and_return / x: 2 │ -00:14:26 verbose #10980 > │ print_and_return / x: 3 │ -00:14:26 verbose #10981 > │ print_and_return / x: 4 │ -00:14:26 verbose #10982 > │ print_and_return / x: 1 │ -00:14:26 verbose #10983 > │ print_and_return / x: 2 │ -00:14:26 verbose #10984 > │ print_and_return / x: 3 │ -00:14:26 verbose #10985 > │ print_and_return / x: 4 │ -00:14:26 verbose #10986 > │ print_and_return / x: 5 │ -00:14:26 verbose #10987 > │ assert_eq / actual: 10 / expected: 10 │ -00:14:26 verbose #10988 > │ │ -00:14:26 verbose #10989 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10990 > -00:14:26 verbose #10991 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #10992 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #10993 > │ ## take_while_ │ -00:14:26 verbose #10994 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #10995 > -00:14:26 verbose #10996 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #10997 > inl take_while_ cond seq = -00:14:26 verbose #10998 > let rec loop acc i = -00:14:26 verbose #10999 > match seq i with -00:14:26 verbose #11000 > | Some st when cond st i => loop (st :: acc) (i + 1) -00:14:26 verbose #11001 > | _ => acc |> listm.rev -00:14:26 verbose #11002 > loop [[]] 0 -00:14:26 verbose #11003 > -00:14:26 verbose #11004 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11005 > //// test -00:14:26 verbose #11006 > -00:14:26 verbose #11007 > stream.new_infinite_stream_ print_and_return -00:14:26 verbose #11008 > |> flip stream.try_item -00:14:26 verbose #11009 > |> take_while_ (fun n (_ : i32) => n < 5i32) -00:14:26 verbose #11010 > |> listm'.sum -00:14:26 verbose #11011 > |> _assert_eq 10 -00:14:26 verbose #11012 > -00:14:26 verbose #11013 > ╭─[ 153.54ms - stdout ]────────────────────────────────────────────────────────╮ -00:14:26 verbose #11014 > │ print_and_return / x: 0 │ -00:14:26 verbose #11015 > │ print_and_return / x: 1 │ -00:14:26 verbose #11016 > │ print_and_return / x: 1 │ -00:14:26 verbose #11017 > │ print_and_return / x: 2 │ -00:14:26 verbose #11018 > │ print_and_return / x: 1 │ -00:14:26 verbose #11019 > │ print_and_return / x: 2 │ -00:14:26 verbose #11020 > │ print_and_return / x: 3 │ -00:14:26 verbose #11021 > │ print_and_return / x: 1 │ -00:14:26 verbose #11022 > │ print_and_return / x: 2 │ -00:14:26 verbose #11023 > │ print_and_return / x: 3 │ -00:14:26 verbose #11024 > │ print_and_return / x: 4 │ -00:14:26 verbose #11025 > │ print_and_return / x: 1 │ -00:14:26 verbose #11026 > │ print_and_return / x: 2 │ -00:14:26 verbose #11027 > │ print_and_return / x: 3 │ -00:14:26 verbose #11028 > │ print_and_return / x: 4 │ -00:14:26 verbose #11029 > │ print_and_return / x: 5 │ -00:14:26 verbose #11030 > │ assert_eq / actual: 10 / expected: 10 │ -00:14:26 verbose #11031 > │ │ -00:14:26 verbose #11032 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #11033 > -00:14:26 verbose #11034 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11035 > //// test -00:14:26 verbose #11036 > -00:14:26 verbose #11037 > stream.new_infinite_stream_ print_and_return -00:14:26 verbose #11038 > |> stream.memoize -00:14:26 verbose #11039 > |> fun list => -00:14:26 verbose #11040 > inl list = list () -00:14:26 verbose #11041 > fun n => -00:14:26 verbose #11042 > list |> stream.try_item n -00:14:26 verbose #11043 > |> take_while_ (fun n (_ : i32) => n < 5i32) -00:14:26 verbose #11044 > |> listm'.sum -00:14:26 verbose #11045 > |> _assert_eq 10 -00:14:26 verbose #11046 > -00:14:26 verbose #11047 > ╭─[ 166.86ms - stdout ]────────────────────────────────────────────────────────╮ -00:14:26 verbose #11048 > │ print_and_return / x: 0 │ -00:14:26 verbose #11049 > │ print_and_return / x: 1 │ -00:14:26 verbose #11050 > │ print_and_return / x: 2 │ -00:14:26 verbose #11051 > │ print_and_return / x: 3 │ -00:14:26 verbose #11052 > │ print_and_return / x: 4 │ -00:14:26 verbose #11053 > │ print_and_return / x: 5 │ -00:14:26 verbose #11054 > │ assert_eq / actual: 10 / expected: 10 │ -00:14:26 verbose #11055 > │ │ -00:14:26 verbose #11056 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #11057 > -00:14:26 verbose #11058 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11059 > //// test -00:14:26 verbose #11060 > -00:14:26 verbose #11061 > stream.new_finite_stream print_and_return 10i32 -00:14:26 verbose #11062 > |> stream.memoize -00:14:26 verbose #11063 > |> fun list => -00:14:26 verbose #11064 > inl list = list () -00:14:26 verbose #11065 > fun n => -00:14:26 verbose #11066 > list |> stream.try_item n -00:14:26 verbose #11067 > |> take_while_ (fun n (_ : i32) => n < 5) -00:14:26 verbose #11068 > |> listm'.sum -00:14:26 verbose #11069 > |> _assert_eq 10 -00:14:26 verbose #11070 > -00:14:26 verbose #11071 > ╭─[ 193.04ms - stdout ]────────────────────────────────────────────────────────╮ -00:14:26 verbose #11072 > │ print_and_return / x: 0 │ -00:14:26 verbose #11073 > │ print_and_return / x: 1 │ -00:14:26 verbose #11074 > │ print_and_return / x: 2 │ -00:14:26 verbose #11075 > │ print_and_return / x: 3 │ -00:14:26 verbose #11076 > │ print_and_return / x: 4 │ -00:14:26 verbose #11077 > │ print_and_return / x: 5 │ -00:14:26 verbose #11078 > │ assert_eq / actual: 10 / expected: 10 │ -00:14:26 verbose #11079 > │ │ -00:14:26 verbose #11080 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #11081 > -00:14:26 verbose #11082 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #11083 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #11084 > │ ## memoize │ -00:14:26 verbose #11085 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #11086 > -00:14:26 verbose #11087 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11088 > inl memoize seq = -00:14:26 verbose #11089 > inl state = mut [[]] -00:14:26 verbose #11090 > fun n => -00:14:26 verbose #11091 > match *state |> listm'.try_find (fun (n', _) => n' = n) with -00:14:26 verbose #11092 > | Some (_, v) => v -00:14:26 verbose #11093 > | None => -00:14:26 verbose #11094 > inl new_state = seq n -00:14:26 verbose #11095 > state <- (n, new_state) :: *state -00:14:26 verbose #11096 > new_state -00:14:26 verbose #11097 > -00:14:26 verbose #11098 > inl memoize_ seq = -00:14:26 verbose #11099 > inl state = mut [[]] -00:14:26 verbose #11100 > fun n => -00:14:26 verbose #11101 > match *state |> listm'.try_find_ (fun (n', _) => n' = n) with -00:14:26 verbose #11102 > | Some (_, v) => v -00:14:26 verbose #11103 > | None => -00:14:26 verbose #11104 > inl new_state = seq n -00:14:26 verbose #11105 > state <- (n, new_state) :: *state -00:14:26 verbose #11106 > new_state -00:14:26 verbose #11107 > -00:14:26 verbose #11108 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11109 > //// test -00:14:26 verbose #11110 > -00:14:26 verbose #11111 > inl seq = -00:14:26 verbose #11112 > fun n => -00:14:26 verbose #11113 > n |> print_and_return |> Some -00:14:26 verbose #11114 > |> memoize_ -00:14:26 verbose #11115 > -00:14:26 verbose #11116 > seq -00:14:26 verbose #11117 > |> take_while_ (fun n (_ : i32) => n < 5) -00:14:26 verbose #11118 > |> listm'.sum -00:14:26 verbose #11119 > |> _assert_eq 10 -00:14:26 verbose #11120 > -00:14:26 verbose #11121 > seq -00:14:26 verbose #11122 > |> take_while_ (fun n _ => n < 5) -00:14:26 verbose #11123 > |> listm'.sum -00:14:26 verbose #11124 > |> _assert_eq 10 -00:14:26 verbose #11125 > -00:14:26 verbose #11126 > ╭─[ 186.18ms - stdout ]────────────────────────────────────────────────────────╮ -00:14:26 verbose #11127 > │ print_and_return / x: 0 │ -00:14:26 verbose #11128 > │ print_and_return / x: 1 │ -00:14:26 verbose #11129 > │ print_and_return / x: 2 │ -00:14:26 verbose #11130 > │ print_and_return / x: 3 │ -00:14:26 verbose #11131 > │ print_and_return / x: 4 │ -00:14:26 verbose #11132 > │ print_and_return / x: 5 │ -00:14:26 verbose #11133 > │ assert_eq / actual: 10 / expected: 10 │ -00:14:26 verbose #11134 > │ assert_eq / actual: 10 / expected: 10 │ -00:14:26 verbose #11135 > │ │ -00:14:26 verbose #11136 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #11137 > -00:14:26 verbose #11138 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #11139 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #11140 > │ ## iterate │ -00:14:26 verbose #11141 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #11142 > -00:14:26 verbose #11143 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11144 > inl iterate f x0 num_steps = -00:14:26 verbose #11145 > inl rec loop x n = -00:14:26 verbose #11146 > if n <= 0 -00:14:26 verbose #11147 > then x -00:14:26 verbose #11148 > else loop (f x) (n - 1) -00:14:26 verbose #11149 > loop x0 num_steps -00:14:26 verbose #11150 > -00:14:26 verbose #11151 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11152 > //// test -00:14:26 verbose #11153 > -00:14:26 verbose #11154 > 10i32 |> iterate ((*) 2) 1i32 -00:14:26 verbose #11155 > |> _assert_eq 1024 -00:14:26 verbose #11156 > -00:14:26 verbose #11157 > ╭─[ 27.31ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #11158 > │ assert_eq / actual: 1024 / expected: 1024 │ -00:14:26 verbose #11159 > │ │ -00:14:26 verbose #11160 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #11161 > -00:14:26 verbose #11162 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11163 > inl iterate_ f x0 num_steps = -00:14:26 verbose #11164 > let rec loop x n = -00:14:26 verbose #11165 > if n <= 0 -00:14:26 verbose #11166 > then x -00:14:26 verbose #11167 > else loop (f x) (n - 1) -00:14:26 verbose #11168 > loop x0 num_steps -00:14:26 verbose #11169 > -00:14:26 verbose #11170 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11171 > //// test -00:14:26 verbose #11172 > -00:14:26 verbose #11173 > 10i32 |> iterate_ ((*) 2) 1i32 -00:14:26 verbose #11174 > |> _assert_eq 1024 -00:14:26 verbose #11175 > -00:14:26 verbose #11176 > ╭─[ 41.37ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #11177 > │ assert_eq / actual: 1024 / expected: 1024 │ -00:14:26 verbose #11178 > │ │ -00:14:26 verbose #11179 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #11180 > -00:14:26 verbose #11181 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11182 > inl iterate' f x0 num_steps = -00:14:26 verbose #11183 > listm.init num_steps id -00:14:26 verbose #11184 > |> listm.fold (fun x _ => f x) x0 -00:14:26 verbose #11185 > -00:14:26 verbose #11186 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11187 > //// test -00:14:26 verbose #11188 > -00:14:26 verbose #11189 > 10i32 |> iterate' ((*) 2) 1i32 -00:14:26 verbose #11190 > |> _assert_eq 1024 -00:14:26 verbose #11191 > -00:14:26 verbose #11192 > ╭─[ 28.08ms - stdout ]─────────────────────────────────────────────────────────╮ -00:14:26 verbose #11193 > │ assert_eq / actual: 1024 / expected: 1024 │ -00:14:26 verbose #11194 > │ │ -00:14:26 verbose #11195 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #11196 > -00:14:26 verbose #11197 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:26 verbose #11198 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:26 verbose #11199 > │ ## find_last │ -00:14:26 verbose #11200 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:26 verbose #11201 > -00:14:26 verbose #11202 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:26 verbose #11203 > inl find_last forall item result. fold_fn fn target : option result = -00:14:26 verbose #11204 > fold_fn (fun (item : item) (result : option result) => -00:14:26 verbose #11205 > match result with -00:14:26 verbose #11206 > | None => fn item -00:14:26 verbose #11207 > | result => result -00:14:26 verbose #11208 > ) target (None : option result) -00:14:26 verbose #11209 > -00:14:26 verbose #11210 > inl array_find_last forall item result. (fn : item -> option result) (target : a -00:14:26 verbose #11211 > i32 item) : option result = -00:14:26 verbose #11212 > find_last am.foldBack fn target -00:14:26 verbose #11213 > -00:14:26 verbose #11214 > inl list_find_last forall item result. (fn : item -> option result) (target : -00:14:26 verbose #11215 > list item) : option result = -00:14:26 verbose #11216 > find_last listm.foldBack fn target -00:14:26 verbose #11217 > 00:00:10 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 43978 -00:14:26 verbose #11218 > 00:00:10 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:14:30 verbose #11219 > 00:00:14 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/seq.dib.ipynb to html\e[0m -00:14:30 verbose #11220 > 00:00:14 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:14:30 verbose #11221 > 00:00:14 verbose #7 \e[4;7m validate(nb)\e[0m -00:14:30 verbose #11222 > 00:00:14 verbose #8 \e[4;7m[NbConvertApp] Writing 375065 bytes to c:\home\git\polyglot\lib\spiral\seq.dib.html\e[0m -00:14:30 verbose #11223 > 00:00:14 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 597 -00:14:30 verbose #11224 > 00:00:14 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 597 -00:14:30 verbose #11225 > 00:00:14 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/seq.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/seq.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:14:31 verbose #11226 > 00:00:15 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:14:31 verbose #11227 > 00:00:15 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:14:31 verbose #11228 > 00:00:16 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 44634 -00:14:31 debug #11229 execute_with_options_async / exit_code: 0 / output.Length: 46916 -00:14:31 debug #21 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path seq.dib --retries 3 -00:14:31 debug #11230 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path threading.dib --retries 3", +00:06:44 verbose #10491 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "seq.dib", "--retries", "3"]) +00:06:44 verbose #10492 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/seq.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/seq.dib" --output-path "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:06:46 verbose #10493 > > +00:06:46 verbose #10494 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:46 verbose #10495 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:46 verbose #10496 > > │ # seq │ +00:06:46 verbose #10497 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:46 verbose #10498 > > +00:06:46 verbose #10499 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:46 verbose #10500 > > //// test +00:06:46 verbose #10501 > > +00:06:46 verbose #10502 > > open testing +00:06:46 verbose #10503 > > +00:06:46 verbose #10504 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:06:46 verbose #10505 > > #r +00:06:46 verbose #10506 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:06:46 verbose #10507 > > otNet.Interactive.Spiral.dll" +00:06:46 verbose #10508 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:06:46 verbose #10509 > > #r +00:06:46 verbose #10510 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:06:46 verbose #10511 > > otNet.Interactive.dll" +00:06:46 verbose #10512 > > open type Microsoft.DotNet.Interactive.Kernel +00:06:50 verbose #10513 > > +00:06:50 verbose #10514 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:50 verbose #10515 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:50 verbose #10516 > > │ ## types │ +00:06:50 verbose #10517 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:50 verbose #10518 > > +00:06:50 verbose #10519 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:50 verbose #10520 > > inl types () = +00:06:50 verbose #10521 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:06:50 verbose #10522 > > Fable.Core.Emit(\"core::iter::Fuse<$0>\")>]]\n#endif\ntype core_iter_Fuse<'T> = +00:06:50 verbose #10523 > > class end" +00:06:50 verbose #10524 > > +00:06:50 verbose #10525 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:50 verbose #10526 > > nominal fuse t = $'core_iter_Fuse<`t>' +00:06:50 verbose #10527 > > +00:06:50 verbose #10528 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:50 verbose #10529 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:50 verbose #10530 > > │ ## seq' │ +00:06:50 verbose #10531 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:50 verbose #10532 > > +00:06:50 verbose #10533 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:50 verbose #10534 > > nominal seq' t = $"`t seq" +00:06:50 verbose #10535 > > +00:06:50 verbose #10536 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:50 verbose #10537 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:50 verbose #10538 > > │ ## of_array' │ +00:06:50 verbose #10539 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:50 verbose #10540 > > +00:06:50 verbose #10541 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:50 verbose #10542 > > inl of_array' forall dim t. (items : a dim t) : seq' t = +00:06:50 verbose #10543 > > $'seq { for i = 0 to !items.Length - 1 do yield !items.[[i]] }' +00:06:50 verbose #10544 > > +00:06:50 verbose #10545 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:50 verbose #10546 > > //// test +00:06:50 verbose #10547 > > +00:06:50 verbose #10548 > > (a ;[[ "a"; "b" ]] : _ i32 _) +00:06:50 verbose #10549 > > |> of_array' +00:06:51 verbose #10550 > > +00:06:51 verbose #10551 > > ╭─[ 709.13ms - return value ]──────────────────────────────────────────────────╮ +00:06:51 verbose #10552 > > │ <details open="open" class="dni-treeview"><summary><span │ +00:06:51 verbose #10553 > > │ class="dni-code-hint"><code>[ a, b │ +00:06:51 verbose #10554 > > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ +00:06:51 verbose #10555 > > │ CheckClose</td><td><div │ +00:06:51 verbose #10556 > > │ class="dni-plaintext"><pre>False</pre></div></td></tr><tr><td>LastGenerated< │ +00:06:51 verbose #10557 > > │ /td><td><div │ +00:06:51 verbose #10558 > > │ class="dni-plaintext"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>v2</td> │ +00:06:51 verbose #10559 > > │ <td><div class="dni-plaintext"><pre>[ a, b │ +00:06:51 verbose #10560 > > │ ]</pre></div></td></tr><tr><td>enum</td><td><div │ +00:06:51 verbose #10561 > > │ class="dni-plaintext"><pre>&lt;null&gt;</pre></div></td></tr><tr><td>pc</td> │ +00:06:51 verbose #10562 > > │ <td><div │ +00:06:51 verbose #10563 > > │ class="dni-plaintext"><pre>0</pre></div></td></tr><tr><td>current</td><td><d │ +00:06:51 verbose #10564 > > │ iv │ +00:06:51 verbose #10565 > > │ class="dni-plaintext"><pre>&lt;null&gt;</pre></div></td></tr><tr><td><i>(val │ +00:06:51 verbose #10566 > > │ ues)</i></td><td><div class="dni-plaintext"><pre>[ a, b │ +00:06:51 verbose #10567 > > │ ]</pre></div></td></tr></tbody></table></div></details><style> │ +00:06:51 verbose #10568 > > │ .dni-code-hint { │ +00:06:51 verbose #10569 > > │ font-style: italic; │ +00:06:51 verbose #10570 > > │ overflow: hidden; │ +00:06:51 verbose #10571 > > │ white-space: nowrap; │ +00:06:51 verbose #10572 > > │ } │ +00:06:51 verbose #10573 > > │ .dni-treeview { │ +00:06:51 verbose #10574 > > │ white-space: nowrap; │ +00:06:51 verbose #10575 > > │ } │ +00:06:51 verbose #10576 > > │ .dni-treeview td { │ +00:06:51 verbose #10577 > > │ vertical-align: top; │ +00:06:51 verbose #10578 > > │ text-align: start; │ +00:06:51 verbose #10579 > > │ } │ +00:06:51 verbose #10580 > > │ details.dni-treeview { │ +00:06:51 verbose #10581 > > │ padding-left: 1em; │ +00:06:51 verbose #10582 > > │ } │ +00:06:51 verbose #10583 > > │ table td { │ +00:06:51 verbose #10584 > > │ text-align: start; │ +00:06:51 verbose #10585 > > │ } │ +00:06:51 verbose #10586 > > │ table tr { │ +00:06:51 verbose #10587 > > │ vertical-align: top; │ +00:06:51 verbose #10588 > > │ margin: 0em 0px; │ +00:06:51 verbose #10589 > > │ } │ +00:06:51 verbose #10590 > > │ table tr td pre │ +00:06:51 verbose #10591 > > │ { │ +00:06:51 verbose #10592 > > │ vertical-align: top !important; │ +00:06:51 verbose #10593 > > │ margin: 0em 0px !important; │ +00:06:51 verbose #10594 > > │ } │ +00:06:51 verbose #10595 > > │ table th { │ +00:06:51 verbose #10596 > > │ text-align: start; │ +00:06:51 verbose #10597 > > │ } │ +00:06:51 verbose #10598 > > │ </style> │ +00:06:51 verbose #10599 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:51 verbose #10600 > > +00:06:51 verbose #10601 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:51 verbose #10602 > > inl of_array forall dim t. (items : a dim t) : seq' t = +00:06:51 verbose #10603 > > items |> $'Seq.ofArray' +00:06:51 verbose #10604 > > +00:06:51 verbose #10605 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:51 verbose #10606 > > //// test +00:06:51 verbose #10607 > > +00:06:51 verbose #10608 > > (a ;[[ "a"; "b" ]] : _ i32 _) +00:06:51 verbose #10609 > > |> of_array +00:06:51 verbose #10610 > > +00:06:51 verbose #10611 > > ╭─[ 44.98ms - return value ]───────────────────────────────────────────────────╮ +00:06:51 verbose #10612 > > │ <details open="open" class="dni-treeview"><summary><span │ +00:06:51 verbose #10613 > > │ class="dni-code-hint"><code>[ a, b │ +00:06:51 verbose #10614 > > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ +00:06:51 verbose #10615 > > │ f</td><td><details class="dni-treeview"><summary><span │ +00:06:51 verbose #10616 > > │ class="dni-code-hint"><code>Microsoft.FSharp.Collections.SeqModule+OfArray@1 │ +00:06:51 verbose #10617 > > │ 010[ │ +00:06:51 verbose #10618 > > │ System.String]</code></span></summary><div><table><thead><tr></tr></thead><t │ +00:06:51 verbose #10619 > > │ body><tr><td>source</td><td><div class="dni-plaintext"><pre>[ a, b │ +00:06:51 verbose #10620 > > │ ]</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td><i> │ +00:06:51 verbose #10621 > > │ (values)</i></td><td><div class="dni-plaintext"><pre>[ a, b │ +00:06:51 verbose #10622 > > │ ]</pre></div></td></tr></tbody></table></div></details><style> │ +00:06:51 verbose #10623 > > │ .dni-code-hint { │ +00:06:51 verbose #10624 > > │ font-style: italic; │ +00:06:51 verbose #10625 > > │ overflow: hidden; │ +00:06:51 verbose #10626 > > │ white-space: nowrap; │ +00:06:51 verbose #10627 > > │ } │ +00:06:51 verbose #10628 > > │ .dni-treeview { │ +00:06:51 verbose #10629 > > │ white-space: nowrap; │ +00:06:51 verbose #10630 > > │ } │ +00:06:51 verbose #10631 > > │ .dni-treeview td { │ +00:06:51 verbose #10632 > > │ vertical-align: top; │ +00:06:51 verbose #10633 > > │ text-align: start; │ +00:06:51 verbose #10634 > > │ } │ +00:06:51 verbose #10635 > > │ details.dni-treeview { │ +00:06:51 verbose #10636 > > │ padding-left: 1em; │ +00:06:51 verbose #10637 > > │ } │ +00:06:51 verbose #10638 > > │ table td { │ +00:06:51 verbose #10639 > > │ text-align: start; │ +00:06:51 verbose #10640 > > │ } │ +00:06:51 verbose #10641 > > │ table tr { │ +00:06:51 verbose #10642 > > │ vertical-align: top; │ +00:06:51 verbose #10643 > > │ margin: 0em 0px; │ +00:06:51 verbose #10644 > > │ } │ +00:06:51 verbose #10645 > > │ table tr td pre │ +00:06:51 verbose #10646 > > │ { │ +00:06:51 verbose #10647 > > │ vertical-align: top !important; │ +00:06:51 verbose #10648 > > │ margin: 0em 0px !important; │ +00:06:51 verbose #10649 > > │ } │ +00:06:51 verbose #10650 > > │ table th { │ +00:06:51 verbose #10651 > > │ text-align: start; │ +00:06:51 verbose #10652 > > │ } │ +00:06:51 verbose #10653 > > │ </style> │ +00:06:51 verbose #10654 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:51 verbose #10655 > > +00:06:51 verbose #10656 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:51 verbose #10657 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:51 verbose #10658 > > │ ## to_array' │ +00:06:51 verbose #10659 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:51 verbose #10660 > > +00:06:51 verbose #10661 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:51 verbose #10662 > > inl to_array' forall dim t. (items : seq' t) : a dim t = +00:06:51 verbose #10663 > > items |> $'Seq.toArray' +00:06:51 verbose #10664 > > +00:06:51 verbose #10665 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:51 verbose #10666 > > //// test +00:06:51 verbose #10667 > > +00:06:51 verbose #10668 > > (a ;[[ "a"; "b" ]] : _ i32 _) +00:06:51 verbose #10669 > > |> of_array' +00:06:51 verbose #10670 > > |> to_array' +00:06:51 verbose #10671 > > |> _assert_eq (a ;[[ "a"; "b" ]] : _ i32 _) +00:06:51 verbose #10672 > > +00:06:51 verbose #10673 > > ╭─[ 216.56ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:51 verbose #10674 > > │ assert_eq / actual: [|"a"; "b"|] / expected: [|"a"; "b"|] │ +00:06:51 verbose #10675 > > │ │ +00:06:51 verbose #10676 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:51 verbose #10677 > > +00:06:51 verbose #10678 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:51 verbose #10679 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:51 verbose #10680 > > │ ## of_list' │ +00:06:51 verbose #10681 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:51 verbose #10682 > > +00:06:51 verbose #10683 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:51 verbose #10684 > > inl of_list' forall t. (items : listm'.list' t) : seq' t = +00:06:51 verbose #10685 > > $'seq { for i = 0 to !items.Length - 1 do yield !items.[[i]] }' +00:06:51 verbose #10686 > > +00:06:51 verbose #10687 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:51 verbose #10688 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:51 verbose #10689 > > │ ## to_list' │ +00:06:51 verbose #10690 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:51 verbose #10691 > > +00:06:51 verbose #10692 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:51 verbose #10693 > > inl to_list' forall t. (items : seq' t) : listm'.list' t = +00:06:51 verbose #10694 > > items |> $'Seq.toList' +00:06:51 verbose #10695 > > +00:06:51 verbose #10696 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:51 verbose #10697 > > //// test +00:06:51 verbose #10698 > > +00:06:51 verbose #10699 > > (a ;[[ "a"; "b" ]] : _ i32 _) +00:06:51 verbose #10700 > > |> of_array +00:06:51 verbose #10701 > > |> to_list' +00:06:51 verbose #10702 > > |> listm'.unbox +00:06:51 verbose #10703 > > |> _assert_eq ([[ "a"; "b" ]]) +00:06:52 verbose #10704 > > +00:06:52 verbose #10705 > > ╭─[ 364.64ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:52 verbose #10706 > > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_0)) / expected: UH0_1 ("a", │ +00:06:52 verbose #10707 > > │ UH0_1 ("b", UH0_0)) │ +00:06:52 verbose #10708 > > │ │ +00:06:52 verbose #10709 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10710 > > +00:06:52 verbose #10711 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10712 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10713 > > │ ## rev' │ +00:06:52 verbose #10714 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10715 > > +00:06:52 verbose #10716 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10717 > > inl rev'' forall t u. (items : t) : seq' u = +00:06:52 verbose #10718 > > items |> $'Seq.rev' +00:06:52 verbose #10719 > > +00:06:52 verbose #10720 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10721 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10722 > > │ ## seq │ +00:06:52 verbose #10723 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10724 > > +00:06:52 verbose #10725 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10726 > > type seq dim el = dim -> option el +00:06:52 verbose #10727 > > +00:06:52 verbose #10728 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10729 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10730 > > │ ## try_item │ +00:06:52 verbose #10731 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10732 > > +00:06:52 verbose #10733 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10734 > > inl try_item n s = +00:06:52 verbose #10735 > > n |> s +00:06:52 verbose #10736 > > +00:06:52 verbose #10737 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10738 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10739 > > │ ## from_list │ +00:06:52 verbose #10740 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10741 > > +00:06:52 verbose #10742 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10743 > > inl from_list list = +00:06:52 verbose #10744 > > fun n => +00:06:52 verbose #10745 > > list +00:06:52 verbose #10746 > > |> listm'.try_item n +00:06:52 verbose #10747 > > +00:06:52 verbose #10748 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10749 > > //// test +00:06:52 verbose #10750 > > +00:06:52 verbose #10751 > > listm.init 10i32 print_and_return +00:06:52 verbose #10752 > > |> from_list +00:06:52 verbose #10753 > > |> try_item 5i32 +00:06:52 verbose #10754 > > |> _assert_eq (Some 5i32) +00:06:52 verbose #10755 > > +00:06:52 verbose #10756 > > ╭─[ 90.26ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:52 verbose #10757 > > │ print_and_return / x: 0 │ +00:06:52 verbose #10758 > > │ print_and_return / x: 1 │ +00:06:52 verbose #10759 > > │ print_and_return / x: 2 │ +00:06:52 verbose #10760 > > │ print_and_return / x: 3 │ +00:06:52 verbose #10761 > > │ print_and_return / x: 4 │ +00:06:52 verbose #10762 > > │ print_and_return / x: 5 │ +00:06:52 verbose #10763 > > │ print_and_return / x: 6 │ +00:06:52 verbose #10764 > > │ print_and_return / x: 7 │ +00:06:52 verbose #10765 > > │ print_and_return / x: 8 │ +00:06:52 verbose #10766 > > │ print_and_return / x: 9 │ +00:06:52 verbose #10767 > > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │ +00:06:52 verbose #10768 > > │ │ +00:06:52 verbose #10769 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10770 > > +00:06:52 verbose #10771 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10772 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10773 > > │ ## map │ +00:06:52 verbose #10774 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10775 > > +00:06:52 verbose #10776 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10777 > > inl map fn s = +00:06:52 verbose #10778 > > fun n => +00:06:52 verbose #10779 > > n +00:06:52 verbose #10780 > > |> s +00:06:52 verbose #10781 > > |> optionm.map fn +00:06:52 verbose #10782 > > +00:06:52 verbose #10783 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10784 > > //// test +00:06:52 verbose #10785 > > +00:06:52 verbose #10786 > > listm.init 10i32 id +00:06:52 verbose #10787 > > |> from_list +00:06:52 verbose #10788 > > |> map ((*) 2) +00:06:52 verbose #10789 > > |> try_item 5i32 +00:06:52 verbose #10790 > > |> _assert_eq (Some 10i32) +00:06:52 verbose #10791 > > +00:06:52 verbose #10792 > > ╭─[ 35.13ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:52 verbose #10793 > > │ assert_eq / actual: US0_0 10 / expected: US0_0 10 │ +00:06:52 verbose #10794 > > │ │ +00:06:52 verbose #10795 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10796 > > +00:06:52 verbose #10797 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10798 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10799 > > │ ## mapi │ +00:06:52 verbose #10800 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10801 > > +00:06:52 verbose #10802 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10803 > > inl mapi fn s = +00:06:52 verbose #10804 > > fun n => +00:06:52 verbose #10805 > > n +00:06:52 verbose #10806 > > |> s +00:06:52 verbose #10807 > > |> optionm.map (fn n) +00:06:52 verbose #10808 > > +00:06:52 verbose #10809 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10810 > > //// test +00:06:52 verbose #10811 > > +00:06:52 verbose #10812 > > listm.init 10i32 print_and_return +00:06:52 verbose #10813 > > |> from_list +00:06:52 verbose #10814 > > |> mapi fun i x => i + x +00:06:52 verbose #10815 > > |> try_item 5i32 +00:06:52 verbose #10816 > > |> _assert_eq (Some 10i32) +00:06:52 verbose #10817 > > +00:06:52 verbose #10818 > > ╭─[ 61.59ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:52 verbose #10819 > > │ print_and_return / x: 0 │ +00:06:52 verbose #10820 > > │ print_and_return / x: 1 │ +00:06:52 verbose #10821 > > │ print_and_return / x: 2 │ +00:06:52 verbose #10822 > > │ print_and_return / x: 3 │ +00:06:52 verbose #10823 > > │ print_and_return / x: 4 │ +00:06:52 verbose #10824 > > │ print_and_return / x: 5 │ +00:06:52 verbose #10825 > > │ print_and_return / x: 6 │ +00:06:52 verbose #10826 > > │ print_and_return / x: 7 │ +00:06:52 verbose #10827 > > │ print_and_return / x: 8 │ +00:06:52 verbose #10828 > > │ print_and_return / x: 9 │ +00:06:52 verbose #10829 > > │ assert_eq / actual: US0_0 10 / expected: US0_0 10 │ +00:06:52 verbose #10830 > > │ │ +00:06:52 verbose #10831 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10832 > > +00:06:52 verbose #10833 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10834 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10835 > > │ ## choose │ +00:06:52 verbose #10836 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10837 > > +00:06:52 verbose #10838 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10839 > > inl choose forall dim {number} t u. (fn : t -> option u) (s : seq dim t) : seq +00:06:52 verbose #10840 > > dim u = +00:06:52 verbose #10841 > > fun n => +00:06:52 verbose #10842 > > inl rec body fn s i i' = +00:06:52 verbose #10843 > > match i |> s with +00:06:52 verbose #10844 > > | None => None +00:06:52 verbose #10845 > > | Some x => +00:06:52 verbose #10846 > > match x |> fn with +00:06:52 verbose #10847 > > | Some x when n = i' => Some x +00:06:52 verbose #10848 > > | Some _ => loop (i + 1) (i' + 1) +00:06:52 verbose #10849 > > | _ => loop (i + 1) i' +00:06:52 verbose #10850 > > and inl loop i i' = +00:06:52 verbose #10851 > > if n |> var_is |> not +00:06:52 verbose #10852 > > then body fn s i i' +00:06:52 verbose #10853 > > else +00:06:52 verbose #10854 > > inl fn = join fn +00:06:52 verbose #10855 > > inl s = join s +00:06:52 verbose #10856 > > join body fn s i i' +00:06:52 verbose #10857 > > loop 0 0 +00:06:52 verbose #10858 > > +00:06:52 verbose #10859 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10860 > > //// test +00:06:52 verbose #10861 > > +00:06:52 verbose #10862 > > listm.init 10i32 print_and_return +00:06:52 verbose #10863 > > |> from_list +00:06:52 verbose #10864 > > |> choose (fun x => if x % 2 = 0 then Some x else None) +00:06:52 verbose #10865 > > |> try_item 1i32 +00:06:52 verbose #10866 > > |> _assert_eq (Some 2i32) +00:06:52 verbose #10867 > > +00:06:52 verbose #10868 > > ╭─[ 54.06ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:52 verbose #10869 > > │ print_and_return / x: 0 │ +00:06:52 verbose #10870 > > │ print_and_return / x: 1 │ +00:06:52 verbose #10871 > > │ print_and_return / x: 2 │ +00:06:52 verbose #10872 > > │ print_and_return / x: 3 │ +00:06:52 verbose #10873 > > │ print_and_return / x: 4 │ +00:06:52 verbose #10874 > > │ print_and_return / x: 5 │ +00:06:52 verbose #10875 > > │ print_and_return / x: 6 │ +00:06:52 verbose #10876 > > │ print_and_return / x: 7 │ +00:06:52 verbose #10877 > > │ print_and_return / x: 8 │ +00:06:52 verbose #10878 > > │ print_and_return / x: 9 │ +00:06:52 verbose #10879 > > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │ +00:06:52 verbose #10880 > > │ │ +00:06:52 verbose #10881 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10882 > > +00:06:52 verbose #10883 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10884 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10885 > > │ ## indexed │ +00:06:52 verbose #10886 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10887 > > +00:06:52 verbose #10888 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10889 > > inl indexed s = +00:06:52 verbose #10890 > > s +00:06:52 verbose #10891 > > |> mapi fun i x => +00:06:52 verbose #10892 > > i, x +00:06:52 verbose #10893 > > +00:06:52 verbose #10894 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10895 > > //// test +00:06:52 verbose #10896 > > +00:06:52 verbose #10897 > > listm.init 10i32 ((*) 2) +00:06:52 verbose #10898 > > |> from_list +00:06:52 verbose #10899 > > |> indexed +00:06:52 verbose #10900 > > |> try_item 5i32 +00:06:52 verbose #10901 > > |> _assert_eq (Some (5i32, 10i32)) +00:06:52 verbose #10902 > > +00:06:52 verbose #10903 > > ╭─[ 42.32ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:52 verbose #10904 > > │ assert_eq / actual: US0_0 (5, 10) / expected: US0_0 (5, 10) │ +00:06:52 verbose #10905 > > │ │ +00:06:52 verbose #10906 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10907 > > +00:06:52 verbose #10908 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10909 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10910 > > │ ## zip │ +00:06:52 verbose #10911 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10912 > > +00:06:52 verbose #10913 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10914 > > inl zip n seq1 seq2 = +00:06:52 verbose #10915 > > seq1 n, seq2 n +00:06:52 verbose #10916 > > +00:06:52 verbose #10917 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10918 > > //// test +00:06:52 verbose #10919 > > +00:06:52 verbose #10920 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) +00:06:52 verbose #10921 > > ||> zip 5i32 +00:06:52 verbose #10922 > > |> _assert_eq (Some 5, Some 10) +00:06:52 verbose #10923 > > +00:06:52 verbose #10924 > > ╭─[ 41.80ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:52 verbose #10925 > > │ assert_eq / actual: struct (US0_0 5, US0_0 10) / expected: struct (US0_0 5, │ +00:06:52 verbose #10926 > > │ US0_0 10) │ +00:06:52 verbose #10927 > > │ │ +00:06:52 verbose #10928 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10929 > > +00:06:52 verbose #10930 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10931 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10932 > > │ ## zip_with │ +00:06:52 verbose #10933 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10934 > > +00:06:52 verbose #10935 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10936 > > inl zip_with fn seq1 seq2 = +00:06:52 verbose #10937 > > fun n => +00:06:52 verbose #10938 > > fn (seq1 n) (seq2 n) +00:06:52 verbose #10939 > > +00:06:52 verbose #10940 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10941 > > //// test +00:06:52 verbose #10942 > > +00:06:52 verbose #10943 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) +00:06:52 verbose #10944 > > ||> zip_with (optionm'.choose (+)) +00:06:52 verbose #10945 > > |> try_item 2i32 +00:06:52 verbose #10946 > > |> _assert_eq (Some 6) +00:06:52 verbose #10947 > > +00:06:52 verbose #10948 > > ╭─[ 40.97ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:52 verbose #10949 > > │ assert_eq / actual: US0_0 6 / expected: US0_0 6 │ +00:06:52 verbose #10950 > > │ │ +00:06:52 verbose #10951 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10952 > > +00:06:52 verbose #10953 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10954 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10955 > > │ ## fold │ +00:06:52 verbose #10956 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10957 > > +00:06:52 verbose #10958 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10959 > > inl fold fn init seq = +00:06:52 verbose #10960 > > inl rec loop acc n = +00:06:52 verbose #10961 > > match seq n with +00:06:52 verbose #10962 > > | Some x => loop (fn acc x) (n + 1) +00:06:52 verbose #10963 > > | None => acc +00:06:52 verbose #10964 > > loop init 0 +00:06:52 verbose #10965 > > +00:06:52 verbose #10966 > > inl fold_ fn init seq = +00:06:52 verbose #10967 > > let rec loop acc n = +00:06:52 verbose #10968 > > match seq n with +00:06:52 verbose #10969 > > | Some x => loop (fn acc x) (n + 1) +00:06:52 verbose #10970 > > | None => acc +00:06:52 verbose #10971 > > loop init 0 +00:06:52 verbose #10972 > > +00:06:52 verbose #10973 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #10974 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #10975 > > │ ## sum │ +00:06:52 verbose #10976 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10977 > > +00:06:52 verbose #10978 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10979 > > inl sum seq = +00:06:52 verbose #10980 > > seq |> fold (+) 0 +00:06:52 verbose #10981 > > +00:06:52 verbose #10982 > > inl sum_ seq = +00:06:52 verbose #10983 > > seq |> fold_ (+) 0 +00:06:52 verbose #10984 > > +00:06:52 verbose #10985 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #10986 > > //// test +00:06:52 verbose #10987 > > +00:06:52 verbose #10988 > > listm.init 10i32 id +00:06:52 verbose #10989 > > |> from_list +00:06:52 verbose #10990 > > |> fun f (n : i32) => f n +00:06:52 verbose #10991 > > |> sum +00:06:52 verbose #10992 > > |> _assert_eq 45 +00:06:52 verbose #10993 > > +00:06:52 verbose #10994 > > ╭─[ 19.38ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:52 verbose #10995 > > │ assert_eq / actual: 45 / expected: 45 │ +00:06:52 verbose #10996 > > │ │ +00:06:52 verbose #10997 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #10998 > > +00:06:52 verbose #10999 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #11000 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #11001 > > │ ## to_list │ +00:06:52 verbose #11002 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #11003 > > +00:06:52 verbose #11004 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #11005 > > inl to_list seq = +00:06:52 verbose #11006 > > seq +00:06:52 verbose #11007 > > |> fold (fun acc x => x :: acc) [[]] +00:06:52 verbose #11008 > > |> listm.rev +00:06:52 verbose #11009 > > +00:06:52 verbose #11010 > > inl to_list_ seq = +00:06:52 verbose #11011 > > seq +00:06:52 verbose #11012 > > |> fold_ (fun acc x => x :: acc) [[]] +00:06:52 verbose #11013 > > |> listm.rev +00:06:52 verbose #11014 > > +00:06:52 verbose #11015 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #11016 > > //// test +00:06:52 verbose #11017 > > +00:06:52 verbose #11018 > > listm.init 10i32 id +00:06:52 verbose #11019 > > |> from_list +00:06:52 verbose #11020 > > |> fun f (n : i32) => f n +00:06:52 verbose #11021 > > |> to_list +00:06:52 verbose #11022 > > |> _assert_eq (listm.init 10i32 id) +00:06:52 verbose #11023 > > +00:06:52 verbose #11024 > > ╭─[ 50.62ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:52 verbose #11025 > > │ assert_eq / actual: UH0_1 │ +00:06:52 verbose #11026 > > │ (0, │ +00:06:52 verbose #11027 > > │ UH0_1 │ +00:06:52 verbose #11028 > > │ (1, │ +00:06:52 verbose #11029 > > │ UH0_1 │ +00:06:52 verbose #11030 > > │ (2, │ +00:06:52 verbose #11031 > > │ UH0_1 │ +00:06:52 verbose #11032 > > │ (3, │ +00:06:52 verbose #11033 > > │ UH0_1 │ +00:06:52 verbose #11034 > > │ (4, UH0_1 (5, UH0_1 (6, UH0_1 (7, UH0_1 (8, UH0_1 (9, │ +00:06:52 verbose #11035 > > │ UH0_0)))))))))) / expected: UH0_1 │ +00:06:52 verbose #11036 > > │ (0, │ +00:06:52 verbose #11037 > > │ UH0_1 │ +00:06:52 verbose #11038 > > │ (1, │ +00:06:52 verbose #11039 > > │ UH0_1 │ +00:06:52 verbose #11040 > > │ (2, │ +00:06:52 verbose #11041 > > │ UH0_1 │ +00:06:52 verbose #11042 > > │ (3, │ +00:06:52 verbose #11043 > > │ UH0_1 │ +00:06:52 verbose #11044 > > │ (4, UH0_1 (5, UH0_1 (6, UH0_1 (7, UH0_1 (8, UH0_1 (9, │ +00:06:52 verbose #11045 > > │ UH0_0)))))))))) │ +00:06:52 verbose #11046 > > │ │ +00:06:52 verbose #11047 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #11048 > > +00:06:52 verbose #11049 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #11050 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #11051 > > │ ## from_array │ +00:06:52 verbose #11052 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #11053 > > +00:06:52 verbose #11054 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #11055 > > inl from_array forall dim {number; int} el. (array : a dim el) : seq dim el = +00:06:52 verbose #11056 > > fun n => +00:06:52 verbose #11057 > > if n >= length array +00:06:52 verbose #11058 > > then None +00:06:52 verbose #11059 > > else index array n |> Some +00:06:52 verbose #11060 > > +00:06:52 verbose #11061 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #11062 > > //// test +00:06:52 verbose #11063 > > +00:06:52 verbose #11064 > > a ;[[ 1; 2; 3 ]] +00:06:52 verbose #11065 > > |> from_array +00:06:52 verbose #11066 > > |> try_item 1i32 +00:06:52 verbose #11067 > > |> _assert_eq (Some 2i32) +00:06:52 verbose #11068 > > +00:06:52 verbose #11069 > > ╭─[ 54.69ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:52 verbose #11070 > > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │ +00:06:52 verbose #11071 > > │ │ +00:06:52 verbose #11072 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #11073 > > +00:06:52 verbose #11074 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #11075 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #11076 > > │ ## to_array │ +00:06:52 verbose #11077 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #11078 > > +00:06:52 verbose #11079 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #11080 > > inl to_array seq = +00:06:52 verbose #11081 > > inl ar = a ;[[]] |> mut +00:06:52 verbose #11082 > > ((), seq) +00:06:52 verbose #11083 > > ||> fold fun _ x => +00:06:52 verbose #11084 > > ar <- *ar ++ a ;[[x]] +00:06:52 verbose #11085 > > *ar +00:06:52 verbose #11086 > > +00:06:52 verbose #11087 > > inl to_array_ seq = +00:06:52 verbose #11088 > > inl ar = a ;[[]] |> mut +00:06:52 verbose #11089 > > ((), seq) +00:06:52 verbose #11090 > > ||> fold_ fun _ x => +00:06:52 verbose #11091 > > ar <- *ar ++ a ;[[x]] +00:06:52 verbose #11092 > > *ar +00:06:52 verbose #11093 > > +00:06:52 verbose #11094 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:52 verbose #11095 > > //// test +00:06:52 verbose #11096 > > +00:06:52 verbose #11097 > > listm.init 10i32 id +00:06:52 verbose #11098 > > |> from_list +00:06:52 verbose #11099 > > |> fun (x : i32 -> _) => x +00:06:52 verbose #11100 > > |> to_array +00:06:52 verbose #11101 > > |> _assert_eq (a ;[[ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9 ]] : _ i32 _) +00:06:52 verbose #11102 > > +00:06:52 verbose #11103 > > ╭─[ 256.00ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:52 verbose #11104 > > │ assert_eq / actual: [|0; 1; 2; 3; 4; 5; 6; 7; 8; 9|] / expected: [|0; 1; 2; │ +00:06:52 verbose #11105 > > │ 3; 4; 5; 6; 7; 8; 9|] │ +00:06:52 verbose #11106 > > │ │ +00:06:52 verbose #11107 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:52 verbose #11108 > > +00:06:52 verbose #11109 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:52 verbose #11110 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:52 verbose #11111 > > │ ## take_while │ +00:06:52 verbose #11112 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11113 > > +00:06:53 verbose #11114 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11115 > > inl take_while cond seq = +00:06:53 verbose #11116 > > inl rec loop acc i = +00:06:53 verbose #11117 > > match seq i with +00:06:53 verbose #11118 > > | Some st when cond st i => loop (st :: acc) (i + 1) +00:06:53 verbose #11119 > > | _ => acc |> listm.rev +00:06:53 verbose #11120 > > loop [[]] 0 +00:06:53 verbose #11121 > > +00:06:53 verbose #11122 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11123 > > //// test +00:06:53 verbose #11124 > > +00:06:53 verbose #11125 > > listm.init 10i32 id +00:06:53 verbose #11126 > > |> from_list +00:06:53 verbose #11127 > > |> take_while (fun n (_ : i32) => n < 5) +00:06:53 verbose #11128 > > |> listm'.sum +00:06:53 verbose #11129 > > |> _assert_eq 10 +00:06:53 verbose #11130 > > +00:06:53 verbose #11131 > > ╭─[ 15.92ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:53 verbose #11132 > > │ assert_eq / actual: 10 / expected: 10 │ +00:06:53 verbose #11133 > > │ │ +00:06:53 verbose #11134 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11135 > > +00:06:53 verbose #11136 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11137 > > //// test +00:06:53 verbose #11138 > > +00:06:53 verbose #11139 > > stream.new_finite_stream print_and_return 10i32 +00:06:53 verbose #11140 > > |> flip stream.try_item +00:06:53 verbose #11141 > > |> take_while (fun n (_ : i32) => n < 5) +00:06:53 verbose #11142 > > |> listm'.sum +00:06:53 verbose #11143 > > |> _assert_eq 10 +00:06:53 verbose #11144 > > +00:06:53 verbose #11145 > > ╭─[ 42.68ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:53 verbose #11146 > > │ print_and_return / x: 0 │ +00:06:53 verbose #11147 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11148 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11149 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11150 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11151 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11152 > > │ print_and_return / x: 3 │ +00:06:53 verbose #11153 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11154 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11155 > > │ print_and_return / x: 3 │ +00:06:53 verbose #11156 > > │ print_and_return / x: 4 │ +00:06:53 verbose #11157 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11158 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11159 > > │ print_and_return / x: 3 │ +00:06:53 verbose #11160 > > │ print_and_return / x: 4 │ +00:06:53 verbose #11161 > > │ print_and_return / x: 5 │ +00:06:53 verbose #11162 > > │ assert_eq / actual: 10 / expected: 10 │ +00:06:53 verbose #11163 > > │ │ +00:06:53 verbose #11164 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11165 > > +00:06:53 verbose #11166 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:53 verbose #11167 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:53 verbose #11168 > > │ ## take_while_ │ +00:06:53 verbose #11169 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11170 > > +00:06:53 verbose #11171 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11172 > > inl take_while_ cond seq = +00:06:53 verbose #11173 > > let rec loop acc i = +00:06:53 verbose #11174 > > match seq i with +00:06:53 verbose #11175 > > | Some st when cond st i => loop (st :: acc) (i + 1) +00:06:53 verbose #11176 > > | _ => acc |> listm.rev +00:06:53 verbose #11177 > > loop [[]] 0 +00:06:53 verbose #11178 > > +00:06:53 verbose #11179 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11180 > > //// test +00:06:53 verbose #11181 > > +00:06:53 verbose #11182 > > stream.new_infinite_stream_ print_and_return +00:06:53 verbose #11183 > > |> flip stream.try_item +00:06:53 verbose #11184 > > |> take_while_ (fun n (_ : i32) => n < 5i32) +00:06:53 verbose #11185 > > |> listm'.sum +00:06:53 verbose #11186 > > |> _assert_eq 10 +00:06:53 verbose #11187 > > +00:06:53 verbose #11188 > > ╭─[ 110.89ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:53 verbose #11189 > > │ print_and_return / x: 0 │ +00:06:53 verbose #11190 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11191 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11192 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11193 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11194 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11195 > > │ print_and_return / x: 3 │ +00:06:53 verbose #11196 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11197 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11198 > > │ print_and_return / x: 3 │ +00:06:53 verbose #11199 > > │ print_and_return / x: 4 │ +00:06:53 verbose #11200 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11201 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11202 > > │ print_and_return / x: 3 │ +00:06:53 verbose #11203 > > │ print_and_return / x: 4 │ +00:06:53 verbose #11204 > > │ print_and_return / x: 5 │ +00:06:53 verbose #11205 > > │ assert_eq / actual: 10 / expected: 10 │ +00:06:53 verbose #11206 > > │ │ +00:06:53 verbose #11207 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11208 > > +00:06:53 verbose #11209 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11210 > > //// test +00:06:53 verbose #11211 > > +00:06:53 verbose #11212 > > stream.new_infinite_stream_ print_and_return +00:06:53 verbose #11213 > > |> stream.memoize +00:06:53 verbose #11214 > > |> fun list => +00:06:53 verbose #11215 > > inl list = list () +00:06:53 verbose #11216 > > fun n => +00:06:53 verbose #11217 > > list |> stream.try_item n +00:06:53 verbose #11218 > > |> take_while_ (fun n (_ : i32) => n < 5i32) +00:06:53 verbose #11219 > > |> listm'.sum +00:06:53 verbose #11220 > > |> _assert_eq 10 +00:06:53 verbose #11221 > > +00:06:53 verbose #11222 > > ╭─[ 113.25ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:53 verbose #11223 > > │ print_and_return / x: 0 │ +00:06:53 verbose #11224 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11225 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11226 > > │ print_and_return / x: 3 │ +00:06:53 verbose #11227 > > │ print_and_return / x: 4 │ +00:06:53 verbose #11228 > > │ print_and_return / x: 5 │ +00:06:53 verbose #11229 > > │ assert_eq / actual: 10 / expected: 10 │ +00:06:53 verbose #11230 > > │ │ +00:06:53 verbose #11231 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11232 > > +00:06:53 verbose #11233 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11234 > > //// test +00:06:53 verbose #11235 > > +00:06:53 verbose #11236 > > stream.new_finite_stream print_and_return 10i32 +00:06:53 verbose #11237 > > |> stream.memoize +00:06:53 verbose #11238 > > |> fun list => +00:06:53 verbose #11239 > > inl list = list () +00:06:53 verbose #11240 > > fun n => +00:06:53 verbose #11241 > > list |> stream.try_item n +00:06:53 verbose #11242 > > |> take_while_ (fun n (_ : i32) => n < 5) +00:06:53 verbose #11243 > > |> listm'.sum +00:06:53 verbose #11244 > > |> _assert_eq 10 +00:06:53 verbose #11245 > > +00:06:53 verbose #11246 > > ╭─[ 158.15ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:53 verbose #11247 > > │ print_and_return / x: 0 │ +00:06:53 verbose #11248 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11249 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11250 > > │ print_and_return / x: 3 │ +00:06:53 verbose #11251 > > │ print_and_return / x: 4 │ +00:06:53 verbose #11252 > > │ print_and_return / x: 5 │ +00:06:53 verbose #11253 > > │ assert_eq / actual: 10 / expected: 10 │ +00:06:53 verbose #11254 > > │ │ +00:06:53 verbose #11255 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11256 > > +00:06:53 verbose #11257 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:53 verbose #11258 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:53 verbose #11259 > > │ ## memoize │ +00:06:53 verbose #11260 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11261 > > +00:06:53 verbose #11262 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11263 > > inl memoize seq = +00:06:53 verbose #11264 > > inl state = mut [[]] +00:06:53 verbose #11265 > > fun n => +00:06:53 verbose #11266 > > match *state |> listm'.try_find (fun (n', _) => n' = n) with +00:06:53 verbose #11267 > > | Some (_, v) => v +00:06:53 verbose #11268 > > | None => +00:06:53 verbose #11269 > > inl new_state = seq n +00:06:53 verbose #11270 > > state <- (n, new_state) :: *state +00:06:53 verbose #11271 > > new_state +00:06:53 verbose #11272 > > +00:06:53 verbose #11273 > > inl memoize_ seq = +00:06:53 verbose #11274 > > inl state = mut [[]] +00:06:53 verbose #11275 > > fun n => +00:06:53 verbose #11276 > > match *state |> listm'.try_find_ (fun (n', _) => n' = n) with +00:06:53 verbose #11277 > > | Some (_, v) => v +00:06:53 verbose #11278 > > | None => +00:06:53 verbose #11279 > > inl new_state = seq n +00:06:53 verbose #11280 > > state <- (n, new_state) :: *state +00:06:53 verbose #11281 > > new_state +00:06:53 verbose #11282 > > +00:06:53 verbose #11283 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11284 > > //// test +00:06:53 verbose #11285 > > +00:06:53 verbose #11286 > > inl seq = +00:06:53 verbose #11287 > > fun n => +00:06:53 verbose #11288 > > n |> print_and_return |> Some +00:06:53 verbose #11289 > > |> memoize_ +00:06:53 verbose #11290 > > +00:06:53 verbose #11291 > > seq +00:06:53 verbose #11292 > > |> take_while_ (fun n (_ : i32) => n < 5) +00:06:53 verbose #11293 > > |> listm'.sum +00:06:53 verbose #11294 > > |> _assert_eq 10 +00:06:53 verbose #11295 > > +00:06:53 verbose #11296 > > seq +00:06:53 verbose #11297 > > |> take_while_ (fun n _ => n < 5) +00:06:53 verbose #11298 > > |> listm'.sum +00:06:53 verbose #11299 > > |> _assert_eq 10 +00:06:53 verbose #11300 > > +00:06:53 verbose #11301 > > ╭─[ 181.68ms - stdout ]────────────────────────────────────────────────────────╮ +00:06:53 verbose #11302 > > │ print_and_return / x: 0 │ +00:06:53 verbose #11303 > > │ print_and_return / x: 1 │ +00:06:53 verbose #11304 > > │ print_and_return / x: 2 │ +00:06:53 verbose #11305 > > │ print_and_return / x: 3 │ +00:06:53 verbose #11306 > > │ print_and_return / x: 4 │ +00:06:53 verbose #11307 > > │ print_and_return / x: 5 │ +00:06:53 verbose #11308 > > │ assert_eq / actual: 10 / expected: 10 │ +00:06:53 verbose #11309 > > │ assert_eq / actual: 10 / expected: 10 │ +00:06:53 verbose #11310 > > │ │ +00:06:53 verbose #11311 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11312 > > +00:06:53 verbose #11313 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:53 verbose #11314 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:53 verbose #11315 > > │ ## iterate │ +00:06:53 verbose #11316 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11317 > > +00:06:53 verbose #11318 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11319 > > inl iterate f x0 num_steps = +00:06:53 verbose #11320 > > inl rec loop x n = +00:06:53 verbose #11321 > > if n <= 0 +00:06:53 verbose #11322 > > then x +00:06:53 verbose #11323 > > else loop (f x) (n - 1) +00:06:53 verbose #11324 > > loop x0 num_steps +00:06:53 verbose #11325 > > +00:06:53 verbose #11326 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11327 > > //// test +00:06:53 verbose #11328 > > +00:06:53 verbose #11329 > > 10i32 |> iterate ((*) 2) 1i32 +00:06:53 verbose #11330 > > |> _assert_eq 1024 +00:06:53 verbose #11331 > > +00:06:53 verbose #11332 > > ╭─[ 16.45ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:53 verbose #11333 > > │ assert_eq / actual: 1024 / expected: 1024 │ +00:06:53 verbose #11334 > > │ │ +00:06:53 verbose #11335 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11336 > > +00:06:53 verbose #11337 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11338 > > inl iterate_ f x0 num_steps = +00:06:53 verbose #11339 > > let rec loop x n = +00:06:53 verbose #11340 > > if n <= 0 +00:06:53 verbose #11341 > > then x +00:06:53 verbose #11342 > > else loop (f x) (n - 1) +00:06:53 verbose #11343 > > loop x0 num_steps +00:06:53 verbose #11344 > > +00:06:53 verbose #11345 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11346 > > //// test +00:06:53 verbose #11347 > > +00:06:53 verbose #11348 > > 10i32 |> iterate_ ((*) 2) 1i32 +00:06:53 verbose #11349 > > |> _assert_eq 1024 +00:06:53 verbose #11350 > > +00:06:53 verbose #11351 > > ╭─[ 37.15ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:53 verbose #11352 > > │ assert_eq / actual: 1024 / expected: 1024 │ +00:06:53 verbose #11353 > > │ │ +00:06:53 verbose #11354 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11355 > > +00:06:53 verbose #11356 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11357 > > inl iterate' f x0 num_steps = +00:06:53 verbose #11358 > > listm.init num_steps id +00:06:53 verbose #11359 > > |> listm.fold (fun x _ => f x) x0 +00:06:53 verbose #11360 > > +00:06:53 verbose #11361 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11362 > > //// test +00:06:53 verbose #11363 > > +00:06:53 verbose #11364 > > 10i32 |> iterate' ((*) 2) 1i32 +00:06:53 verbose #11365 > > |> _assert_eq 1024 +00:06:53 verbose #11366 > > +00:06:53 verbose #11367 > > ╭─[ 17.84ms - stdout ]─────────────────────────────────────────────────────────╮ +00:06:53 verbose #11368 > > │ assert_eq / actual: 1024 / expected: 1024 │ +00:06:53 verbose #11369 > > │ │ +00:06:53 verbose #11370 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11371 > > +00:06:53 verbose #11372 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:06:53 verbose #11373 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:06:53 verbose #11374 > > │ ## find_last │ +00:06:53 verbose #11375 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:06:53 verbose #11376 > > +00:06:53 verbose #11377 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:06:53 verbose #11378 > > inl find_last forall item result. fold_fn fn target : option result = +00:06:53 verbose #11379 > > fold_fn (fun (item : item) (result : option result) => +00:06:53 verbose #11380 > > match result with +00:06:53 verbose #11381 > > | None => fn item +00:06:53 verbose #11382 > > | result => result +00:06:53 verbose #11383 > > ) target (None : option result) +00:06:53 verbose #11384 > > +00:06:53 verbose #11385 > > inl array_find_last forall item result. (fn : item -> option result) (target : a +00:06:53 verbose #11386 > > i32 item) : option result = +00:06:53 verbose #11387 > > find_last am.foldBack fn target +00:06:53 verbose #11388 > > +00:06:53 verbose #11389 > > inl list_find_last forall item result. (fn : item -> option result) (target : +00:06:53 verbose #11390 > > list item) : option result = +00:06:53 verbose #11391 > > find_last listm.foldBack fn target +00:06:53 verbose #11392 > 00:00:09 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 44512 +00:06:53 verbose #11393 > 00:00:09 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:06:55 verbose #11394 > 00:00:11 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/seq.dib.ipynb to html +00:06:55 verbose #11395 > 00:00:11 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:06:55 verbose #11396 > 00:00:11 verbose #7 ! validate(nb) +00:06:57 verbose #11397 > 00:00:13 verbose #8 ! [NbConvertApp] Writing 376474 bytes to c:\home\git\polyglot\lib\spiral\seq.dib.html +00:06:57 verbose #11398 > 00:00:13 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 637 +00:06:57 verbose #11399 > 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 637 +00:06:57 verbose #11400 > 00:00:13 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/seq.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/seq.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:06:58 verbose #11401 > 00:00:14 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:06:58 verbose #11402 > 00:00:14 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:06:58 verbose #11403 > 00:00:14 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 45208 +00:06:58 debug #11404 execute_with_options_async / exit_code: 0 / output.Length: 49208 +00:06:58 debug #21 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path seq.dib --retries 3 +00:06:58 debug #11405 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path threading.dib --retries 3", [||], None, None, true, None) -00:14:31 verbose #11231 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "threading.dib", "--retries", "3"]) -00:14:31 verbose #11232 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/threading.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/threading.dib" --output-path "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:14:40 verbose #11233 > -00:14:40 verbose #11234 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11235 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11236 > │ # threading │ -00:14:40 verbose #11237 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11238 > -00:14:40 verbose #11239 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11240 > open rust_operators -00:14:40 verbose #11241 > -00:14:40 verbose #11242 > ── spiral - import ───────────────────────────────────────────────────────────── -00:14:40 verbose #11243 > #r -00:14:40 verbose #11244 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:14:40 verbose #11245 > otNet.Interactive.Spiral.dll" -00:14:40 verbose #11246 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:14:40 verbose #11247 > #r -00:14:40 verbose #11248 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:14:40 verbose #11249 > otNet.Interactive.dll" -00:14:40 verbose #11250 > open type Microsoft.DotNet.Interactive.Kernel -00:14:40 verbose #11251 > -00:14:40 verbose #11252 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11253 > //// test -00:14:40 verbose #11254 > -00:14:40 verbose #11255 > open testing -00:14:40 verbose #11256 > -00:14:40 verbose #11257 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11258 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11259 > │ ## types │ -00:14:40 verbose #11260 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11261 > -00:14:40 verbose #11262 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11263 > inl types () = -00:14:40 verbose #11264 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:40 verbose #11265 > Fable.Core.Emit(\"std::thread::JoinHandle<$0>\")>]]\n#endif\ntype -00:14:40 verbose #11266 > std_thread_JoinHandle<'T> = class end" -00:14:40 verbose #11267 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:40 verbose #11268 > Fable.Core.Emit(\"std::sync::Arc<$0>\")>]]\n#endif\ntype std_sync_Arc<'T> = -00:14:40 verbose #11269 > class end" -00:14:40 verbose #11270 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:40 verbose #11271 > Fable.Core.Emit(\"std::sync::Mutex<$0>\")>]]\n#endif\ntype std_sync_Mutex<'T> = -00:14:40 verbose #11272 > class end" -00:14:40 verbose #11273 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:40 verbose #11274 > Fable.Core.Emit(\"std::sync::MutexGuard<$0>\")>]]\n#endif\ntype -00:14:40 verbose #11275 > std_sync_MutexGuard<'T> = class end" -00:14:40 verbose #11276 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:14:40 verbose #11277 > Fable.Core.Emit(\"std::sync::PoisonError<$0>\")>]]\n#endif\ntype -00:14:40 verbose #11278 > std_sync_PoisonError<'T> = class end" -00:14:40 verbose #11279 > -00:14:40 verbose #11280 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11281 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11282 > │ ## join_handle │ -00:14:40 verbose #11283 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11284 > -00:14:40 verbose #11285 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11286 > nominal join_handle t = $'std_thread_JoinHandle<`t>' -00:14:40 verbose #11287 > -00:14:40 verbose #11288 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11289 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11290 > │ ## cancellation_token │ -00:14:40 verbose #11291 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11292 > -00:14:40 verbose #11293 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11294 > nominal cancellation_token = $'System.Threading.CancellationToken' -00:14:40 verbose #11295 > -00:14:40 verbose #11296 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11297 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11298 > │ ## cancellation_token_source │ -00:14:40 verbose #11299 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11300 > -00:14:40 verbose #11301 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11302 > nominal cancellation_token_source = $'System.Threading.CancellationTokenSource' -00:14:40 verbose #11303 > -00:14:40 verbose #11304 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11305 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11306 > │ ## cancellation_token_registration │ -00:14:40 verbose #11307 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11308 > -00:14:40 verbose #11309 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11310 > nominal cancellation_token_registration = -00:14:40 verbose #11311 > $'System.Threading.CancellationTokenRegistration' -00:14:40 verbose #11312 > -00:14:40 verbose #11313 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11314 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11315 > │ ## cancellation_source_token │ -00:14:40 verbose #11316 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11317 > -00:14:40 verbose #11318 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11319 > inl cancellation_source_token (x : cancellation_token_source) : -00:14:40 verbose #11320 > cancellation_token = -00:14:40 verbose #11321 > $'!x.Token' -00:14:40 verbose #11322 > -00:14:40 verbose #11323 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11324 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11325 > │ ## cancellation_source_cancel │ -00:14:40 verbose #11326 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11327 > -00:14:40 verbose #11328 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11329 > inl cancellation_source_cancel (x : cancellation_token_source) : () = -00:14:40 verbose #11330 > run_target function -00:14:40 verbose #11331 > | Fsharp (Native) => fun () => -00:14:40 verbose #11332 > $'!x.Cancel' () -00:14:40 verbose #11333 > | _ => fun () => null () -00:14:40 verbose #11334 > -00:14:40 verbose #11335 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11336 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11337 > │ ## create_linked_token_source │ -00:14:40 verbose #11338 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11339 > -00:14:40 verbose #11340 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11341 > inl create_linked_token_source (x : array_base cancellation_token) : -00:14:40 verbose #11342 > cancellation_token_source = -00:14:40 verbose #11343 > x |> $'System.Threading.CancellationTokenSource.CreateLinkedTokenSource' -00:14:40 verbose #11344 > -00:14:40 verbose #11345 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11346 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11347 > │ ## sleep │ -00:14:40 verbose #11348 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11349 > -00:14:40 verbose #11350 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11351 > inl sleep (duration : date_time.duration) : () = -00:14:40 verbose #11352 > inl duration = join duration -00:14:40 verbose #11353 > !\($'"std::thread::sleep(!duration)"') -00:14:40 verbose #11354 > -00:14:40 verbose #11355 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11356 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11357 > │ ## concurrent_stack │ -00:14:40 verbose #11358 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11359 > -00:14:40 verbose #11360 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11361 > nominal concurrent_stack t = -00:14:40 verbose #11362 > $'System.Collections.Concurrent.ConcurrentStack<`t>' -00:14:40 verbose #11363 > -00:14:40 verbose #11364 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11365 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11366 > │ ## concurrent_stack_push │ -00:14:40 verbose #11367 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11368 > -00:14:40 verbose #11369 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11370 > inl concurrent_stack_push forall t. (item : t) (stack : concurrent_stack t) : () -00:14:40 verbose #11371 > = -00:14:40 verbose #11372 > $'!stack.Push' item -00:14:40 verbose #11373 > -00:14:40 verbose #11374 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11375 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11376 > │ ## token_none │ -00:14:40 verbose #11377 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11378 > -00:14:40 verbose #11379 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11380 > inl token_none () : cancellation_token = -00:14:40 verbose #11381 > $'`cancellation_token.None' -00:14:40 verbose #11382 > -00:14:40 verbose #11383 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11384 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11385 > │ ## new_concurrent_stack │ -00:14:40 verbose #11386 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11387 > -00:14:40 verbose #11388 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11389 > inl new_concurrent_stack forall t. () : concurrent_stack t = -00:14:40 verbose #11390 > $'System.Collections.Concurrent.ConcurrentStack<`t>' () -00:14:40 verbose #11391 > -00:14:40 verbose #11392 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11393 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11394 > │ ## token_register │ -00:14:40 verbose #11395 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11396 > -00:14:40 verbose #11397 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11398 > inl token_register (fn : () -> ()) (ct : cancellation_token) : -00:14:40 verbose #11399 > cancellation_token_registration = -00:14:40 verbose #11400 > fn |> $'!ct.Register' -00:14:40 verbose #11401 > -00:14:40 verbose #11402 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11403 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11404 > │ ## new_cancellation_token_source │ -00:14:40 verbose #11405 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11406 > -00:14:40 verbose #11407 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11408 > inl new_cancellation_token_source () : cancellation_token_source = -00:14:40 verbose #11409 > $'new `cancellation_token_source ()' -00:14:40 verbose #11410 > -00:14:40 verbose #11411 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11412 > inl token_cancellation_requested (ct : cancellation_token) : bool = -00:14:40 verbose #11413 > $'!ct.IsCancellationRequested' -00:14:40 verbose #11414 > -00:14:40 verbose #11415 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11416 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11417 > │ ## new_disposable_token │ -00:14:40 verbose #11418 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11419 > -00:14:40 verbose #11420 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11421 > inl new_disposable_token (merge_token : optionm'.option' cancellation_token) = -00:14:40 verbose #11422 > run_target function -00:14:40 verbose #11423 > | Fsharp (Native) => fun () => -00:14:40 verbose #11424 > inl cts = new_cancellation_token_source () -00:14:40 verbose #11425 > inl cts = -00:14:40 verbose #11426 > match merge_token |> optionm'.unbox with -00:14:40 verbose #11427 > | None => cts -00:14:40 verbose #11428 > | Some merge_token => -00:14:40 verbose #11429 > create_linked_token_source ;[[ cts |> -00:14:40 verbose #11430 > cancellation_source_token; merge_token ]] -00:14:40 verbose #11431 > inl disposable : _ () = new_disposable fun () => -00:14:40 verbose #11432 > cts |> cancellation_source_cancel -00:14:40 verbose #11433 > cts |> cancellation_source_token, disposable -00:14:40 verbose #11434 > | _ => fun () => null () -00:14:40 verbose #11435 > -00:14:40 verbose #11436 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11437 > //// test -00:14:40 verbose #11438 > -00:14:40 verbose #11439 > inl run fn = -00:14:40 verbose #11440 > inl token, disposable = new_disposable_token (None |> optionm'.box) -00:14:40 verbose #11441 > disposable |> use |> ignore -00:14:40 verbose #11442 > fn token -00:14:40 verbose #11443 > fun () => -00:14:40 verbose #11444 > fn token -00:14:40 verbose #11445 > |> async.new_async -00:14:40 verbose #11446 > |> async.start -00:14:40 verbose #11447 > -00:14:40 verbose #11448 > fun () => -00:14:40 verbose #11449 > inl counter = mut 0i32 -00:14:40 verbose #11450 > -00:14:40 verbose #11451 > inl fn (token : cancellation_token) = -00:14:40 verbose #11452 > counter <- *counter + (if token |> token_cancellation_requested then 10 -00:14:40 verbose #11453 > else 1) -00:14:40 verbose #11454 > -00:14:40 verbose #11455 > join run fn -00:14:40 verbose #11456 > async.sleep 10 |> async.do -00:14:40 verbose #11457 > return *counter -00:14:40 verbose #11458 > |> async.new_async_unit -00:14:40 verbose #11459 > |> async.run_synchronously -00:14:40 verbose #11460 > |> _assert_eq 11i32 -00:14:40 verbose #11461 > -00:14:40 verbose #11462 > ╭─[ 1.59s - stdout ]───────────────────────────────────────────────────────────╮ -00:14:40 verbose #11463 > │ assert_eq / actual: 11 / expected: 11 │ -00:14:40 verbose #11464 > │ │ -00:14:40 verbose #11465 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11466 > -00:14:40 verbose #11467 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11468 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11469 > │ ## arc │ -00:14:40 verbose #11470 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11471 > -00:14:40 verbose #11472 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11473 > nominal arc t = $"std_sync_Arc<`t>" -00:14:40 verbose #11474 > -00:14:40 verbose #11475 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11476 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11477 > │ ## new_arc │ -00:14:40 verbose #11478 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11479 > -00:14:40 verbose #11480 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11481 > inl new_arc forall t. (x : t) : arc t = -00:14:40 verbose #11482 > !\\(x, $'"std::sync::Arc::new($0)"') -00:14:40 verbose #11483 > -00:14:40 verbose #11484 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11485 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11486 > │ ## mutex │ -00:14:40 verbose #11487 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11488 > -00:14:40 verbose #11489 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11490 > nominal mutex t = $"std_sync_Mutex<`t>" -00:14:40 verbose #11491 > -00:14:40 verbose #11492 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11493 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11494 > │ ## new_mutex │ -00:14:40 verbose #11495 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11496 > -00:14:40 verbose #11497 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11498 > inl new_mutex forall t. (x : t) : mutex t = -00:14:40 verbose #11499 > !\\(x, $'"std::sync::Mutex::new($0)"') -00:14:40 verbose #11500 > -00:14:40 verbose #11501 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11502 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11503 > │ ## new_arc_mutex │ -00:14:40 verbose #11504 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11505 > -00:14:40 verbose #11506 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11507 > inl new_arc_mutex forall t. (x : t) : arc (mutex t) = -00:14:40 verbose #11508 > x |> new_mutex |> new_arc -00:14:40 verbose #11509 > -00:14:40 verbose #11510 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11511 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11512 > │ ## arc_clone │ -00:14:40 verbose #11513 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11514 > -00:14:40 verbose #11515 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11516 > inl arc_clone forall t. (x : arc t) : arc t = -00:14:40 verbose #11517 > inl x = join x -00:14:40 verbose #11518 > !\($'"std::sync::Arc::clone(&!x)"') -00:14:40 verbose #11519 > -00:14:40 verbose #11520 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11521 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11522 > │ ## mutex_guard │ -00:14:40 verbose #11523 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11524 > -00:14:40 verbose #11525 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11526 > nominal mutex_guard t = $"std_sync_MutexGuard<`t>" -00:14:40 verbose #11527 > -00:14:40 verbose #11528 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11529 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11530 > │ ## poison_error │ -00:14:40 verbose #11531 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11532 > -00:14:40 verbose #11533 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11534 > nominal poison_error t = $"std_sync_PoisonError<`t>" -00:14:40 verbose #11535 > -00:14:40 verbose #11536 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11537 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11538 > │ ## mutex_lock │ -00:14:40 verbose #11539 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11540 > -00:14:40 verbose #11541 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11542 > inl arc_mutex_lock forall t. (x : arc (mutex t)) : resultm.result' (mutex_guard -00:14:40 verbose #11543 > t) (poison_error (mutex_guard t)) = -00:14:40 verbose #11544 > !\\(x, $'"$0.lock()"') -00:14:40 verbose #11545 > -00:14:40 verbose #11546 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11547 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11548 > │ ## mutex_guard_value │ -00:14:40 verbose #11549 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11550 > -00:14:40 verbose #11551 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11552 > inl mutex_guard_value forall t. (x : mutex_guard t) : rust.ref' t = -00:14:40 verbose #11553 > !\\(x, $'"&$0"') -00:14:40 verbose #11554 > -00:14:40 verbose #11555 > ── markdown ──────────────────────────────────────────────────────────────────── -00:14:40 verbose #11556 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:14:40 verbose #11557 > │ ## main │ -00:14:40 verbose #11558 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:14:40 verbose #11559 > -00:14:40 verbose #11560 > ── spiral ────────────────────────────────────────────────────────────────────── -00:14:40 verbose #11561 > inl main () = -00:14:40 verbose #11562 > types () -00:14:40 verbose #11563 > $"let new_disposable_token x = !new_disposable_token x" : () -00:14:40 verbose #11564 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 16838 -00:14:40 verbose #11565 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:14:44 verbose #11566 > 00:00:12 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/threading.dib.ipynb to html\e[0m -00:14:44 verbose #11567 > 00:00:12 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:14:44 verbose #11568 > 00:00:12 verbose #7 \e[4;7m validate(nb)\e[0m -00:14:44 verbose #11569 > 00:00:12 verbose #8 \e[4;7m[NbConvertApp] Writing 320429 bytes to c:\home\git\polyglot\lib\spiral\threading.dib.html\e[0m -00:14:44 verbose #11570 > 00:00:12 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 609 -00:14:44 verbose #11571 > 00:00:12 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 609 -00:14:44 verbose #11572 > 00:00:12 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/threading.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/threading.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:14:45 verbose #11573 > 00:00:13 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:14:45 verbose #11574 > 00:00:13 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:14:45 verbose #11575 > 00:00:13 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 17506 -00:14:45 debug #11576 execute_with_options_async / exit_code: 0 / output.Length: 19842 -00:14:45 debug #22 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path threading.dib --retries 3 -00:14:45 debug #11577 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path file_system.dib --retries 3", +00:06:59 verbose #11406 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "threading.dib", "--retries", "3"]) +00:06:59 verbose #11407 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/threading.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/threading.dib" --output-path "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:07:00 verbose #11408 > > +00:07:00 verbose #11409 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:00 verbose #11410 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:00 verbose #11411 > > │ # threading │ +00:07:00 verbose #11412 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:01 verbose #11413 > > +00:07:01 verbose #11414 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:01 verbose #11415 > > open rust_operators +00:07:01 verbose #11416 > > +00:07:01 verbose #11417 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:07:01 verbose #11418 > > #r +00:07:01 verbose #11419 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:01 verbose #11420 > > otNet.Interactive.Spiral.dll" +00:07:01 verbose #11421 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:07:01 verbose #11422 > > #r +00:07:01 verbose #11423 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:01 verbose #11424 > > otNet.Interactive.dll" +00:07:01 verbose #11425 > > open type Microsoft.DotNet.Interactive.Kernel +00:07:05 verbose #11426 > > +00:07:05 verbose #11427 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11428 > > //// test +00:07:05 verbose #11429 > > +00:07:05 verbose #11430 > > open testing +00:07:05 verbose #11431 > > +00:07:05 verbose #11432 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11433 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11434 > > │ ## types │ +00:07:05 verbose #11435 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11436 > > +00:07:05 verbose #11437 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11438 > > inl types () = +00:07:05 verbose #11439 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:07:05 verbose #11440 > > Fable.Core.Emit(\"std::thread::JoinHandle<$0>\")>]]\n#endif\ntype +00:07:05 verbose #11441 > > std_thread_JoinHandle<'T> = class end" +00:07:05 verbose #11442 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:07:05 verbose #11443 > > Fable.Core.Emit(\"std::sync::Arc<$0>\")>]]\n#endif\ntype std_sync_Arc<'T> = +00:07:05 verbose #11444 > > class end" +00:07:05 verbose #11445 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:07:05 verbose #11446 > > Fable.Core.Emit(\"std::sync::Mutex<$0>\")>]]\n#endif\ntype std_sync_Mutex<'T> = +00:07:05 verbose #11447 > > class end" +00:07:05 verbose #11448 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:07:05 verbose #11449 > > Fable.Core.Emit(\"std::sync::MutexGuard<$0>\")>]]\n#endif\ntype +00:07:05 verbose #11450 > > std_sync_MutexGuard<'T> = class end" +00:07:05 verbose #11451 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:07:05 verbose #11452 > > Fable.Core.Emit(\"std::sync::PoisonError<$0>\")>]]\n#endif\ntype +00:07:05 verbose #11453 > > std_sync_PoisonError<'T> = class end" +00:07:05 verbose #11454 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:07:05 verbose #11455 > > Fable.Core.Emit(\"std::sync::mpsc::Receiver<$0>\")>]]\n#endif\ntype +00:07:05 verbose #11456 > > std_sync_mpsc_Receiver<'T> = class end" +00:07:05 verbose #11457 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:07:05 verbose #11458 > > Fable.Core.Emit(\"std::sync::mpsc::SendError<$0>\")>]]\n#endif\ntype +00:07:05 verbose #11459 > > std_sync_mpsc_SendError<'T> = class end" +00:07:05 verbose #11460 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:07:05 verbose #11461 > > Fable.Core.Emit(\"std::sync::mpsc::Sender<$0>\")>]]\n#endif\ntype +00:07:05 verbose #11462 > > std_sync_mpsc_Sender<'T> = class end" +00:07:05 verbose #11463 > > +00:07:05 verbose #11464 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11465 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11466 > > │ ## join_handle │ +00:07:05 verbose #11467 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11468 > > +00:07:05 verbose #11469 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11470 > > nominal join_handle t = $'std_thread_JoinHandle<`t>' +00:07:05 verbose #11471 > > +00:07:05 verbose #11472 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11473 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11474 > > │ ## spawn │ +00:07:05 verbose #11475 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11476 > > +00:07:05 verbose #11477 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11478 > > inl spawn forall t. depth flag (x : () -> t) : join_handle t = +00:07:05 verbose #11479 > > if flag = 1u8 +00:07:05 verbose #11480 > > then (!\($'"true; let __result = std::thread::spawn(move || { //"') : bool) +00:07:05 verbose #11481 > > |> ignore +00:07:05 verbose #11482 > > else (!\($'"true; let __result = std::thread::spawn(|| { //"') : bool) |> +00:07:05 verbose #11483 > > ignore +00:07:05 verbose #11484 > > +00:07:05 verbose #11485 > > let x' = x () +00:07:05 verbose #11486 > > inl x' = join x' +00:07:05 verbose #11487 > > +00:07:05 verbose #11488 > > x' |> rust.fix_closure depth +00:07:05 verbose #11489 > > +00:07:05 verbose #11490 > > !\($'"__result"') +00:07:05 verbose #11491 > > +00:07:05 verbose #11492 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11493 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11494 > > │ ## join' │ +00:07:05 verbose #11495 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11496 > > +00:07:05 verbose #11497 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11498 > > inl join' forall t. +00:07:05 verbose #11499 > > (x : join_handle t) +00:07:05 verbose #11500 > > : resultm.result' +00:07:05 verbose #11501 > > t +00:07:05 verbose #11502 > > ( +00:07:05 verbose #11503 > > rust.box ( +00:07:05 verbose #11504 > > rust.lifetime_join' +00:07:05 verbose #11505 > > rust.dyn' +00:07:05 verbose #11506 > > ( +00:07:05 verbose #11507 > > rust.lifetime_join +00:07:05 verbose #11508 > > rust.any +00:07:05 verbose #11509 > > ( +00:07:05 verbose #11510 > > rust.lifetime_join' +00:07:05 verbose #11511 > > rust.send +00:07:05 verbose #11512 > > rust.static_lifetime +00:07:05 verbose #11513 > > ) +00:07:05 verbose #11514 > > ) +00:07:05 verbose #11515 > > ) +00:07:05 verbose #11516 > > ) = +00:07:05 verbose #11517 > > !\\(x, $'"std::thread::JoinHandle::join($0)"') +00:07:05 verbose #11518 > > +00:07:05 verbose #11519 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11520 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11521 > > │ ## cancellation_token │ +00:07:05 verbose #11522 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11523 > > +00:07:05 verbose #11524 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11525 > > nominal cancellation_token = $'System.Threading.CancellationToken' +00:07:05 verbose #11526 > > +00:07:05 verbose #11527 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11528 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11529 > > │ ## cancellation_token_source │ +00:07:05 verbose #11530 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11531 > > +00:07:05 verbose #11532 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11533 > > nominal cancellation_token_source = $'System.Threading.CancellationTokenSource' +00:07:05 verbose #11534 > > +00:07:05 verbose #11535 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11536 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11537 > > │ ## cancellation_token_registration │ +00:07:05 verbose #11538 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11539 > > +00:07:05 verbose #11540 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11541 > > nominal cancellation_token_registration = +00:07:05 verbose #11542 > > $'System.Threading.CancellationTokenRegistration' +00:07:05 verbose #11543 > > +00:07:05 verbose #11544 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11545 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11546 > > │ ## cancellation_source_token │ +00:07:05 verbose #11547 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11548 > > +00:07:05 verbose #11549 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11550 > > inl cancellation_source_token (x : cancellation_token_source) : +00:07:05 verbose #11551 > > cancellation_token = +00:07:05 verbose #11552 > > $'!x.Token' +00:07:05 verbose #11553 > > +00:07:05 verbose #11554 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11555 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11556 > > │ ## cancellation_source_cancel │ +00:07:05 verbose #11557 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11558 > > +00:07:05 verbose #11559 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11560 > > inl cancellation_source_cancel (x : cancellation_token_source) : () = +00:07:05 verbose #11561 > > run_target function +00:07:05 verbose #11562 > > | Fsharp (Native) => fun () => +00:07:05 verbose #11563 > > $'!x.Cancel' () +00:07:05 verbose #11564 > > | _ => fun () => null () +00:07:05 verbose #11565 > > +00:07:05 verbose #11566 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11567 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11568 > > │ ## create_linked_token_source │ +00:07:05 verbose #11569 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11570 > > +00:07:05 verbose #11571 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11572 > > inl create_linked_token_source (x : array_base cancellation_token) : +00:07:05 verbose #11573 > > cancellation_token_source = +00:07:05 verbose #11574 > > x |> $'System.Threading.CancellationTokenSource.CreateLinkedTokenSource' +00:07:05 verbose #11575 > > +00:07:05 verbose #11576 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11577 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11578 > > │ ## sleep │ +00:07:05 verbose #11579 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11580 > > +00:07:05 verbose #11581 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11582 > > inl sleep (duration : date_time.duration) : () = +00:07:05 verbose #11583 > > inl duration = join duration +00:07:05 verbose #11584 > > !\($'"std::thread::sleep(!duration)"') +00:07:05 verbose #11585 > > +00:07:05 verbose #11586 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11587 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11588 > > │ ## concurrent_stack │ +00:07:05 verbose #11589 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11590 > > +00:07:05 verbose #11591 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11592 > > nominal concurrent_stack t = +00:07:05 verbose #11593 > > $'System.Collections.Concurrent.ConcurrentStack<`t>' +00:07:05 verbose #11594 > > +00:07:05 verbose #11595 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11596 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11597 > > │ ## concurrent_stack_push │ +00:07:05 verbose #11598 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11599 > > +00:07:05 verbose #11600 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11601 > > inl concurrent_stack_push forall t. (item : t) (stack : concurrent_stack t) : () +00:07:05 verbose #11602 > > = +00:07:05 verbose #11603 > > $'!stack.Push' item +00:07:05 verbose #11604 > > +00:07:05 verbose #11605 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11606 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11607 > > │ ## token_none │ +00:07:05 verbose #11608 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11609 > > +00:07:05 verbose #11610 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11611 > > inl token_none () : cancellation_token = +00:07:05 verbose #11612 > > $'`cancellation_token.None' +00:07:05 verbose #11613 > > +00:07:05 verbose #11614 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11615 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11616 > > │ ## new_concurrent_stack │ +00:07:05 verbose #11617 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11618 > > +00:07:05 verbose #11619 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11620 > > inl new_concurrent_stack forall t. () : concurrent_stack t = +00:07:05 verbose #11621 > > $'System.Collections.Concurrent.ConcurrentStack<`t>' () +00:07:05 verbose #11622 > > +00:07:05 verbose #11623 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11624 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11625 > > │ ## token_register │ +00:07:05 verbose #11626 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11627 > > +00:07:05 verbose #11628 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11629 > > inl token_register (fn : () -> ()) (ct : cancellation_token) : +00:07:05 verbose #11630 > > cancellation_token_registration = +00:07:05 verbose #11631 > > fn |> $'!ct.Register' +00:07:05 verbose #11632 > > +00:07:05 verbose #11633 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11634 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11635 > > │ ## new_cancellation_token_source │ +00:07:05 verbose #11636 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11637 > > +00:07:05 verbose #11638 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11639 > > inl new_cancellation_token_source () : cancellation_token_source = +00:07:05 verbose #11640 > > $'new `cancellation_token_source ()' +00:07:05 verbose #11641 > > +00:07:05 verbose #11642 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11643 > > inl token_cancellation_requested (ct : cancellation_token) : bool = +00:07:05 verbose #11644 > > $'!ct.IsCancellationRequested' +00:07:05 verbose #11645 > > +00:07:05 verbose #11646 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:05 verbose #11647 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:05 verbose #11648 > > │ ## new_disposable_token │ +00:07:05 verbose #11649 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:05 verbose #11650 > > +00:07:05 verbose #11651 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11652 > > inl new_disposable_token (merge_token : optionm'.option' cancellation_token) = +00:07:05 verbose #11653 > > run_target function +00:07:05 verbose #11654 > > | Fsharp (Native) => fun () => +00:07:05 verbose #11655 > > inl cts = new_cancellation_token_source () +00:07:05 verbose #11656 > > inl cts = +00:07:05 verbose #11657 > > match merge_token |> optionm'.unbox with +00:07:05 verbose #11658 > > | None => cts +00:07:05 verbose #11659 > > | Some merge_token => +00:07:05 verbose #11660 > > create_linked_token_source ;[[ cts |> +00:07:05 verbose #11661 > > cancellation_source_token; merge_token ]] +00:07:05 verbose #11662 > > inl disposable : _ () = new_disposable fun () => +00:07:05 verbose #11663 > > cts |> cancellation_source_cancel +00:07:05 verbose #11664 > > cts |> cancellation_source_token, disposable +00:07:05 verbose #11665 > > | _ => fun () => null () +00:07:05 verbose #11666 > > +00:07:05 verbose #11667 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:05 verbose #11668 > > //// test +00:07:05 verbose #11669 > > +00:07:05 verbose #11670 > > inl run fn = +00:07:05 verbose #11671 > > inl token, disposable = new_disposable_token (None |> optionm'.box) +00:07:05 verbose #11672 > > disposable |> use |> ignore +00:07:05 verbose #11673 > > fn token +00:07:05 verbose #11674 > > fun () => +00:07:05 verbose #11675 > > fn token +00:07:05 verbose #11676 > > |> async.new_async +00:07:05 verbose #11677 > > |> async.start +00:07:05 verbose #11678 > > +00:07:05 verbose #11679 > > fun () => +00:07:05 verbose #11680 > > inl counter = mut 0i32 +00:07:05 verbose #11681 > > +00:07:05 verbose #11682 > > inl fn (token : cancellation_token) = +00:07:05 verbose #11683 > > counter <- *counter + (if token |> token_cancellation_requested then 10 +00:07:05 verbose #11684 > > else 1) +00:07:05 verbose #11685 > > +00:07:05 verbose #11686 > > join run fn +00:07:05 verbose #11687 > > async.sleep 10 |> async.do +00:07:05 verbose #11688 > > return *counter +00:07:05 verbose #11689 > > |> async.new_async_unit +00:07:05 verbose #11690 > > |> async.run_synchronously +00:07:05 verbose #11691 > > |> _assert_eq 11i32 +00:07:06 verbose #11692 > > +00:07:06 verbose #11693 > > ╭─[ 1.46s - stdout ]───────────────────────────────────────────────────────────╮ +00:07:06 verbose #11694 > > │ assert_eq / actual: 11 / expected: 11 │ +00:07:06 verbose #11695 > > │ │ +00:07:06 verbose #11696 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11697 > > +00:07:06 verbose #11698 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11699 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11700 > > │ ## arc │ +00:07:06 verbose #11701 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11702 > > +00:07:06 verbose #11703 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11704 > > nominal arc t = $"std_sync_Arc<`t>" +00:07:06 verbose #11705 > > +00:07:06 verbose #11706 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11707 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11708 > > │ ## new_arc │ +00:07:06 verbose #11709 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11710 > > +00:07:06 verbose #11711 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11712 > > inl new_arc forall t. (x : t) : arc t = +00:07:06 verbose #11713 > > !\\(x, $'"std::sync::Arc::new($0)"') +00:07:06 verbose #11714 > > +00:07:06 verbose #11715 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11716 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11717 > > │ ## mutex │ +00:07:06 verbose #11718 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11719 > > +00:07:06 verbose #11720 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11721 > > nominal mutex t = $"std_sync_Mutex<`t>" +00:07:06 verbose #11722 > > +00:07:06 verbose #11723 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11724 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11725 > > │ ## new_mutex │ +00:07:06 verbose #11726 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11727 > > +00:07:06 verbose #11728 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11729 > > inl new_mutex forall t. (x : t) : mutex t = +00:07:06 verbose #11730 > > !\\(x, $'"std::sync::Mutex::new($0)"') +00:07:06 verbose #11731 > > +00:07:06 verbose #11732 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11733 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11734 > > │ ## new_arc_mutex │ +00:07:06 verbose #11735 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11736 > > +00:07:06 verbose #11737 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11738 > > inl new_arc_mutex forall t. (x : t) : arc (mutex t) = +00:07:06 verbose #11739 > > x |> new_mutex |> new_arc +00:07:06 verbose #11740 > > +00:07:06 verbose #11741 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11742 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11743 > > │ ## arc_clone │ +00:07:06 verbose #11744 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11745 > > +00:07:06 verbose #11746 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11747 > > inl arc_clone forall t. (x : arc t) : arc t = +00:07:06 verbose #11748 > > inl x = join x +00:07:06 verbose #11749 > > !\($'"std::sync::Arc::clone(&!x)"') +00:07:06 verbose #11750 > > +00:07:06 verbose #11751 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11752 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11753 > > │ ## mutex_guard │ +00:07:06 verbose #11754 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11755 > > +00:07:06 verbose #11756 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11757 > > nominal mutex_guard t = $"std_sync_MutexGuard<`t>" +00:07:06 verbose #11758 > > +00:07:06 verbose #11759 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11760 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11761 > > │ ## poison_error │ +00:07:06 verbose #11762 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11763 > > +00:07:06 verbose #11764 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11765 > > nominal poison_error t = $"std_sync_PoisonError<`t>" +00:07:06 verbose #11766 > > +00:07:06 verbose #11767 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11768 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11769 > > │ ## arc_mutex_lock │ +00:07:06 verbose #11770 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11771 > > +00:07:06 verbose #11772 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11773 > > inl arc_mutex_lock forall t. (x : arc (mutex t)) : resultm.result' (mutex_guard +00:07:06 verbose #11774 > > t) (poison_error (mutex_guard t)) = +00:07:06 verbose #11775 > > !\\(x, $'"$0.lock()"') +00:07:06 verbose #11776 > > +00:07:06 verbose #11777 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11778 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11779 > > │ ## mutex_guard_ref │ +00:07:06 verbose #11780 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11781 > > +00:07:06 verbose #11782 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11783 > > inl mutex_guard_ref forall t. (x : mutex_guard t) : rust.ref' t = +00:07:06 verbose #11784 > > !\\(x, $'"&$0"') +00:07:06 verbose #11785 > > +00:07:06 verbose #11786 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11787 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11788 > > │ ## mutex_guard_ref_mut │ +00:07:06 verbose #11789 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11790 > > +00:07:06 verbose #11791 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11792 > > inl mutex_guard_ref_mut forall t. (x : mutex_guard t) : rust.ref' (rust.mut' t) +00:07:06 verbose #11793 > > = +00:07:06 verbose #11794 > > (!\($'"true; let mut !x = !x"') : bool) |> ignore +00:07:06 verbose #11795 > > !\\(x, $'"&mut $0"') +00:07:06 verbose #11796 > > +00:07:06 verbose #11797 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11798 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11799 > > │ ## channel_receiver │ +00:07:06 verbose #11800 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11801 > > +00:07:06 verbose #11802 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11803 > > nominal channel_receiver t = $'std_sync_mpsc_Receiver<`t>' +00:07:06 verbose #11804 > > +00:07:06 verbose #11805 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11806 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11807 > > │ ## channel_sender │ +00:07:06 verbose #11808 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11809 > > +00:07:06 verbose #11810 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11811 > > nominal channel_sender t = $'std_sync_mpsc_Sender<`t>' +00:07:06 verbose #11812 > > +00:07:06 verbose #11813 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11814 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11815 > > │ ## new_channel │ +00:07:06 verbose #11816 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11817 > > +00:07:06 verbose #11818 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11819 > > inl new_channel () : channel_sender sm'.std_string * arc (channel_receiver +00:07:06 verbose #11820 > > sm'.std_string) = +00:07:06 verbose #11821 > > !\($'"{ let (sender, receiver) = std::sync::mpsc::channel(); (sender, +00:07:06 verbose #11822 > > std::sync::Arc::new(receiver)) }"') +00:07:06 verbose #11823 > > +00:07:06 verbose #11824 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11825 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11826 > > │ ## send_error │ +00:07:06 verbose #11827 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11828 > > +00:07:06 verbose #11829 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11830 > > nominal send_error t = $"std_sync_mpsc_SendError<`t>" +00:07:06 verbose #11831 > > +00:07:06 verbose #11832 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11833 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11834 > > │ ## channel_send │ +00:07:06 verbose #11835 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11836 > > +00:07:06 verbose #11837 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11838 > > inl channel_send forall t. (line : t) (sender : rust.ref' (channel_sender t)) : +00:07:06 verbose #11839 > > resultm.result' () (send_error sm'.std_string) = +00:07:06 verbose #11840 > > !\\((sender, line), $'"$0.send($1)"') +00:07:06 verbose #11841 > > +00:07:06 verbose #11842 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:06 verbose #11843 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:06 verbose #11844 > > │ ## main │ +00:07:06 verbose #11845 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:06 verbose #11846 > > +00:07:06 verbose #11847 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:06 verbose #11848 > > inl main () = +00:07:06 verbose #11849 > > types () +00:07:06 verbose #11850 > > $"let new_disposable_token x = !new_disposable_token x" : () +00:07:07 verbose #11851 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 22232 +00:07:07 verbose #11852 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:07:09 verbose #11853 > 00:00:10 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/threading.dib.ipynb to html +00:07:09 verbose #11854 > 00:00:10 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:07:09 verbose #11855 > 00:00:10 verbose #7 ! validate(nb) +00:07:10 verbose #11856 > 00:00:11 verbose #8 ! [NbConvertApp] Writing 336966 bytes to c:\home\git\polyglot\lib\spiral\threading.dib.html +00:07:10 verbose #11857 > 00:00:11 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 649 +00:07:10 verbose #11858 > 00:00:11 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 649 +00:07:10 verbose #11859 > 00:00:11 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/threading.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/threading.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:07:11 verbose #11860 > 00:00:12 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:07:11 verbose #11861 > 00:00:12 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:07:11 verbose #11862 > 00:00:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 22940 +00:07:11 debug #11863 execute_with_options_async / exit_code: 0 / output.Length: 26082 +00:07:11 debug #22 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path threading.dib --retries 3 +00:07:11 debug #11864 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path physics.dib --retries 3", [||], None, None, true, None) -00:14:45 verbose #11578 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "file_system.dib", "--retries", "3"]) -00:14:45 verbose #11579 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/file_system.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/file_system.dib" --output-path "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:14:54 verbose #11580 > 00:14:53 debug #132 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/38b7b3eddf9d21581f16acbcda4bf3d8f11a838ca0aae88f363221473730af98/main.spi -00:14:55 verbose #11581 > 00:14:54 debug #133 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8e1c9fc6a09b39f7b3f7c7f837e081213a944856acab62f6a922282272c25548/main.spi -00:14:56 verbose #11582 > 00:14:55 debug #134 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f08d899896f01a690a38308231c610dff05e847edb49b63dd2ee830b6c93fa35/main.spi -00:15:16 verbose #11583 > 00:15:15 debug #135 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fdea2ab6b0d09930f72a85fa7f43a066a628b30c557119ed7f899639f293a6cd/main.spi -00:15:36 verbose #11584 > 00:15:35 debug #136 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b60f48d0fb15546bef141ca42e3a98219dcb7b85fa380b9e246191bdb7797135/main.spi -00:15:37 verbose #11585 > 00:15:36 debug #137 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a50e52cfab48703c3783c2d6e504ae089c687418b0ef88102104214a20c3e642/main.spi -00:15:38 verbose #11586 > 00:15:37 debug #138 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/099061586fc10229e53c133096afea922861f341f8da668db476332c9589d2b4/main.spi -00:15:58 verbose #11587 > 00:15:57 debug #139 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fd25e58cdd185cde59dd70d81cac8d6d2560e927f33bbfbb6194574b0aea75fe/main.spi -00:15:59 verbose #11588 > 00:15:58 debug #140 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4c0c8c1726fda4d01749766700246d8aebd721881f72efb8510f65e0a9f0e50a/main.spi -00:16:00 verbose #11589 > 00:15:59 debug #141 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b58c746b51f80ea8454b87ac57bf9e049921f3e207e3d46d0fa55b1954fecb91/main.spi -00:16:00 verbose #11590 > 00:15:59 debug #142 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fa05ac407228e2c921aeea51ca7276ff6d57d1a32914efc6ba5dacfb4d7db80b/main.spi -00:16:01 verbose #11591 > 00:16:00 debug #143 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2a0301fe0fab2b39f16ba8962837e0f1ff5751c6dcf7d05cbc6682e07f11b7f3/main.spi -00:16:02 verbose #11592 > 00:16:01 debug #144 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/cb8a2a5a82be92972b540ef59a7677d42641acfd91a1e2c481045265c221243a/main.spi -00:16:02 verbose #11593 > 00:16:01 debug #145 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2bf922a805c37b00a53ce1408f34223769064fcd5d1015163796c22aa3915108/main.spi -00:16:03 verbose #11594 > 00:16:02 debug #146 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/068de12563fcc6adfa28a394e11ea2b5a2fd631f1c18d87264de046381a618d1/main.spi -00:16:04 verbose #11595 > 00:16:03 debug #147 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/cef5d93922894e1cb065ee1cb98a13a7a1d0b2746e4053300195f2e5533ee670/main.spi -00:16:04 verbose #11596 > 00:16:03 debug #148 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c73aa4fb53d745038df48921e7b86a54f59e4a56e3fb24a9d53a0a7775c6a08f/main.spi -00:16:05 verbose #11597 > 00:16:04 debug #149 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7562aba60e7baac55e79e7fd89cb527f3b48efb2da5ce990656c63432b677998/main.spi -00:16:06 verbose #11598 > 00:16:05 debug #150 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c8edb2671add1ed5f19b2d85d6bb581f08e78421457c2e2d63a5b64251056ba3/main.spi -00:16:06 verbose #11599 > 00:16:05 debug #151 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/22d96c4714adc3500741b95422a19e59af2313dca9f6f3ae21337b18ba04b012/main.spi -00:16:07 verbose #11600 > 00:16:06 debug #152 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c6335eb3b1fe32ce3b40c9c53dfefef72538be92ff1baff60c7d8c91e11f0b25/main.spi -00:16:08 verbose #11601 > 00:16:07 debug #153 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/36b31e519b94e639d350b1640443ce2437d1adc3ed5b31922973df56010a9b56/main.spi -00:16:08 verbose #11602 > 00:16:07 debug #154 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0f1b0d17a3707dc9721b36f9c690e113b0e5f4ee9a5fa6e4157bdc05971dc658/main.spi -00:16:09 verbose #11603 > 00:16:08 debug #155 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/74b84a5cfec3722857ca3259031820b4715faf8b91d4fb42f94af53eb87670a2/main.spi -00:16:10 verbose #11604 > 00:16:09 debug #156 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e2696401b20502358bf763525bb49d7e6b8e3a027b4b5187191b2e56449ed972/main.spi -00:16:11 verbose #11605 > 00:16:09 debug #157 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6df8fc921dcd3bafafecd77738dd31ae667b17ff81f50c798b73bdbb34897cc2/main.spi -00:16:11 verbose #11606 > 00:16:10 debug #158 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9440b5866e8b63bd8744ed40a7287dac65ad707516e407a88eeaa6467e1dfa4d/main.spi -00:16:12 verbose #11607 > 00:16:11 debug #159 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5ed0d694c42cfdd6bcdcf2d602ff59a554ff61582dede4eed4734635d5fd2595/main.spi -00:16:13 verbose #11608 > 00:16:12 debug #160 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6ed0b79b136a4d47dfeccfc59acdda990e8c2f2433e074426aae707366c80df9/main.spi -00:16:13 verbose #11609 > 00:16:12 debug #161 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1eac3a414801320768b4c9f06d9784e5ff1a566b7322936a5544be346c7fc49f/main.spi -00:16:15 verbose #11610 > 00:16:14 debug #162 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/24d29df69481f5fb8aba805f5bbab57ed46aca02c4f904d7ed756c9fb27d4813/main.spi -00:16:35 verbose #11611 > 00:16:34 debug #163 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e4862efff04949a7ea86acd4e54827182c51820f2c50404070fcb25170e421dc/main.spi -00:16:38 verbose #11612 > 00:16:37 debug #164 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/37ebabe1d377bf2612d5b932bb4a53953dfea71dd6f7afbb38a3e37d825a40f1/main.spi -00:16:39 verbose #11613 > 00:16:38 debug #165 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/26f692bdde9828fdf17641d4d466899a378b5950d6926d880bd7fd1a39dccdb7/main.spi -00:16:43 verbose #11614 > 00:16:42 debug #166 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/348c45ccd88455704a27035106acc6c2e1c8e1e2796a7e536d33733d0707b9c9/main.spi -00:16:43 verbose #11615 > 00:16:42 debug #167 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e358b84f3bbeccab1fcf4848d1daedf07b2ceb787e6e041d4bf50bb4049ae937/main.spi -00:16:44 verbose #11616 > 00:16:43 debug #168 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7a6fc465e611783b6765006aae1348d08474cbe08505861b1ac1845005e8af00/main.spi -00:16:48 verbose #11617 > 00:16:46 debug #169 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/52612f086aaf9c633b106009094d81b987ac4ca09b87840c79b2c4d72243adf6/main.spi -00:16:48 verbose #11618 > 00:16:47 debug #170 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b3764e786e37e2ea9032335c35ebcd4d89e4bfbd07464a5e485bb993f5a16225/main.spi -00:16:52 verbose #11619 > 00:16:51 debug #171 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/959e43e658fd046d1bda3dfed12fca12430bea0e90bba314a69450ed98a7f038/main.spi -00:16:53 verbose #11620 > 00:16:52 debug #172 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1c608aa3b1df9143a7f3a603361fe8144f98b8f2195b55adfec8cffbc76fd60d/main.spi -00:16:53 verbose #11621 > 00:16:52 debug #173 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/73387cacdc372d89ac82a0584f6290d085f31c7d26b550bab10754101bd1f0db/main.spi -00:17:12 verbose #11622 > 00:17:11 debug #174 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/182a0e12f3d1557ab64ac049483d21b65e7e06ec158a32d8653e299b2c8ebc96/main.spi -00:17:13 verbose #11623 > 00:17:12 debug #175 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c6887ef79d5c2ad02381ac9191f091961622d9f6a3d969f252148b853cdcd92b/main.spi -00:17:14 verbose #11624 > 00:17:13 debug #176 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d914d0031fedd002fe677c600d25756e2b708c5a00740ca28db2ca6f773f9b42/main.spi -00:17:15 verbose #11625 > 00:17:13 debug #177 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/16d6193ae601945352d01c54fe91e36ac64c5e9e8481cde4133f28d8130015f5/main.spi -00:17:15 verbose #11626 > 00:17:14 debug #178 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c428a8c029a4a04047443a9b629af212ecc4dca939661b43b08541ec751f5b76/main.spi -00:17:16 verbose #11627 > 00:17:15 debug #179 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2ff5d72ab420389246f449bbdb98f9f9c5cff7f45e674003d077029f02ead137/main.spi -00:17:35 verbose #11628 > 00:17:33 debug #180 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/eaba0d8fdb3dfc0e5f49b3caf880857f6ed42e0ff222f49f927c40083068ae65/main.spi -00:17:35 verbose #11629 > 00:17:34 debug #181 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/16447342d269acb691d68aeebd995dad920d50361fd293eb34578421595a77ff/main.spi -00:17:36 verbose #11630 > 00:17:35 debug #182 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/589e590d0974942c8834eccb60d03ca25acf65cfb131daf453e6d7b479818ed4/main.spi -00:17:37 verbose #11631 > 00:17:36 debug #183 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2329d767a77f21bd8f31d725e128b283130da23e9d8eec8f00b8b2adbcecd45a/main.spi -00:17:39 verbose #11632 > -00:17:39 verbose #11633 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11634 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11635 > │ # file_system │ -00:17:39 verbose #11636 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11637 > -00:17:39 verbose #11638 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11639 > open sm'_operators -00:17:39 verbose #11640 > open rust_operators -00:17:39 verbose #11641 > -00:17:39 verbose #11642 > ── spiral - import ───────────────────────────────────────────────────────────── -00:17:39 verbose #11643 > #r -00:17:39 verbose #11644 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:17:39 verbose #11645 > otNet.Interactive.Spiral.dll" -00:17:39 verbose #11646 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:17:39 verbose #11647 > #r -00:17:39 verbose #11648 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:17:39 verbose #11649 > otNet.Interactive.dll" -00:17:39 verbose #11650 > open type Microsoft.DotNet.Interactive.Kernel -00:17:39 verbose #11651 > -00:17:39 verbose #11652 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11653 > //// test -00:17:39 verbose #11654 > -00:17:39 verbose #11655 > open testing -00:17:39 verbose #11656 > -00:17:39 verbose #11657 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11658 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11659 > │ ## types │ -00:17:39 verbose #11660 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11661 > -00:17:39 verbose #11662 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11663 > inl types () = -00:17:39 verbose #11664 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:17:39 verbose #11665 > Fable.Core.Emit(\"std::fs::File\")>]]\n#endif\ntype std_fs_File = class end" -00:17:39 verbose #11666 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:17:39 verbose #11667 > Fable.Core.Emit(\"std::fs::FileType\")>]]\n#endif\ntype std_fs_FileType = class -00:17:39 verbose #11668 > end" -00:17:39 verbose #11669 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:17:39 verbose #11670 > Fable.Core.Emit(\"std::path::Display\")>]]\n#endif\ntype std_path_Display = -00:17:39 verbose #11671 > class end" -00:17:39 verbose #11672 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:17:39 verbose #11673 > Fable.Core.Emit(\"std::path::Path\")>]]\n#endif\ntype std_path_Path = class end" -00:17:39 verbose #11674 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:17:39 verbose #11675 > Fable.Core.Emit(\"std::path::PathBuf\")>]]\n#endif\ntype std_path_PathBuf = -00:17:39 verbose #11676 > class end" -00:17:39 verbose #11677 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:17:39 verbose #11678 > Fable.Core.Emit(\"async_walkdir::DirEntry\")>]]\n#endif\ntype -00:17:39 verbose #11679 > async_walkdir_DirEntry = class end" -00:17:39 verbose #11680 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:17:39 verbose #11681 > Fable.Core.Emit(\"async_walkdir::Filtering\")>]]\n#endif\ntype -00:17:39 verbose #11682 > async_walkdir_Filtering = class end" -00:17:39 verbose #11683 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:17:39 verbose #11684 > Fable.Core.Emit(\"async_walkdir::WalkDir\")>]]\n#endif\ntype -00:17:39 verbose #11685 > async_walkdir_WalkDir = class end" -00:17:39 verbose #11686 > -00:17:39 verbose #11687 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11688 > inl types () = -00:17:39 verbose #11689 > types () -00:17:39 verbose #11690 > date_time.types () -00:17:39 verbose #11691 > env.types () -00:17:39 verbose #11692 > rust.types () -00:17:39 verbose #11693 > sm'.types () -00:17:39 verbose #11694 > stream.types () -00:17:39 verbose #11695 > -00:17:39 verbose #11696 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11697 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11698 > │ ## file_mode │ -00:17:39 verbose #11699 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11700 > -00:17:39 verbose #11701 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11702 > nominal file_mode' = $'System.IO.FileMode' -00:17:39 verbose #11703 > -00:17:39 verbose #11704 > union file_mode = -00:17:39 verbose #11705 > | ModeCreateNew -00:17:39 verbose #11706 > | ModeCreate -00:17:39 verbose #11707 > | ModeOpen -00:17:39 verbose #11708 > | ModeOpenOrCreate -00:17:39 verbose #11709 > | Truncate -00:17:39 verbose #11710 > | Append -00:17:39 verbose #11711 > -00:17:39 verbose #11712 > inl file_mode = function -00:17:39 verbose #11713 > | ModeCreateNew => $'System.IO.FileMode.CreateNew' : file_mode' -00:17:39 verbose #11714 > | ModeCreate => $'System.IO.FileMode.Create' : file_mode' -00:17:39 verbose #11715 > | ModeOpen => $'System.IO.FileMode.Open' : file_mode' -00:17:39 verbose #11716 > | ModeOpenOrCreate => $'System.IO.FileMode.OpenOrCreate' : file_mode' -00:17:39 verbose #11717 > | Truncate => $'System.IO.FileMode.Truncate' : file_mode' -00:17:39 verbose #11718 > | Append => $'System.IO.FileMode.Append' : file_mode' -00:17:39 verbose #11719 > -00:17:39 verbose #11720 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11721 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11722 > │ ## file_access │ -00:17:39 verbose #11723 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11724 > -00:17:39 verbose #11725 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11726 > nominal file_access' = $'System.IO.FileAccess' -00:17:39 verbose #11727 > -00:17:39 verbose #11728 > union file_access = -00:17:39 verbose #11729 > | AccessRead -00:17:39 verbose #11730 > | AccessWrite -00:17:39 verbose #11731 > | AccessReadWrite -00:17:39 verbose #11732 > -00:17:39 verbose #11733 > inl file_access = function -00:17:39 verbose #11734 > | AccessRead => $'System.IO.FileAccess.Read' : file_access' -00:17:39 verbose #11735 > | AccessWrite => $'System.IO.FileAccess.ReadWrite' : file_access' -00:17:39 verbose #11736 > | AccessReadWrite => $'System.IO.FileAccess.ReadWrite' : file_access' -00:17:39 verbose #11737 > -00:17:39 verbose #11738 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11739 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11740 > │ ## file_share │ -00:17:39 verbose #11741 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11742 > -00:17:39 verbose #11743 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11744 > nominal file_share' = $'System.IO.FileShare' -00:17:39 verbose #11745 > -00:17:39 verbose #11746 > union file_share = -00:17:39 verbose #11747 > | ShareNone -00:17:39 verbose #11748 > | ShareRead -00:17:39 verbose #11749 > | ShareWrite -00:17:39 verbose #11750 > | ShareReadWrite -00:17:39 verbose #11751 > | ShareDelete -00:17:39 verbose #11752 > -00:17:39 verbose #11753 > inl file_share = function -00:17:39 verbose #11754 > | ShareNone => $'System.IO.FileShare.None' : file_share' -00:17:39 verbose #11755 > | ShareRead => $'System.IO.FileShare.Read' : file_share' -00:17:39 verbose #11756 > | ShareWrite => $'System.IO.FileShare.Write' : file_share' -00:17:39 verbose #11757 > | ShareReadWrite => $'System.IO.FileShare.ReadWrite' : file_share' -00:17:39 verbose #11758 > | ShareDelete => $'System.IO.FileShare.Delete' : file_share' -00:17:39 verbose #11759 > -00:17:39 verbose #11760 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11761 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11762 > │ ## file_stream │ -00:17:39 verbose #11763 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11764 > -00:17:39 verbose #11765 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11766 > nominal file_stream' = $'System.IO.FileStream' -00:17:39 verbose #11767 > -00:17:39 verbose #11768 > inl file_stream (path : string) mode access share : file_stream' = -00:17:39 verbose #11769 > run_target function -00:17:39 verbose #11770 > | Fsharp (Native) => fun () => -00:17:39 verbose #11771 > inl mode = mode |> file_mode -00:17:39 verbose #11772 > inl access = access |> file_access -00:17:39 verbose #11773 > inl share = share |> file_share -00:17:39 verbose #11774 > $'new System.IO.FileStream (!path, !mode, !access, !share)' -00:17:39 verbose #11775 > | _ => fun () => null () -00:17:39 verbose #11776 > -00:17:39 verbose #11777 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11778 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11779 > │ ## display │ -00:17:39 verbose #11780 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11781 > -00:17:39 verbose #11782 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11783 > nominal display = $'std_path_Display' -00:17:39 verbose #11784 > -00:17:39 verbose #11785 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11786 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11787 > │ ## path │ -00:17:39 verbose #11788 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11789 > -00:17:39 verbose #11790 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11791 > nominal path = $'std_path_Path' -00:17:39 verbose #11792 > nominal path = $'std_path_Path' -00:17:39 verbose #11793 > nominal path_buf = $'std_path_PathBuf' -00:17:39 verbose #11794 > -00:17:39 verbose #11795 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11796 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11797 > │ ## new_path_buf │ -00:17:39 verbose #11798 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11799 > -00:17:39 verbose #11800 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11801 > inl new_path_buf (path : sm'.std_string) : path_buf = -00:17:39 verbose #11802 > open rust_operators -00:17:39 verbose #11803 > !\\(path, $'"std::path::PathBuf::from($0)"') -00:17:39 verbose #11804 > -00:17:39 verbose #11805 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11806 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11807 > │ ## path_buf_from │ -00:17:39 verbose #11808 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11809 > -00:17:39 verbose #11810 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11811 > inl path_buf_from (path : rust.box path) : path_buf = -00:17:39 verbose #11812 > open rust_operators -00:17:39 verbose #11813 > !\\(path, $'"std::path::PathBuf::from($0)"') -00:17:39 verbose #11814 > -00:17:39 verbose #11815 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11816 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11817 > │ ## path_buf_join │ -00:17:39 verbose #11818 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11819 > -00:17:39 verbose #11820 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11821 > inl path_buf_join (s : string) (path_buf : path_buf) : path_buf = -00:17:39 verbose #11822 > open rust_operators -00:17:39 verbose #11823 > !\\((path_buf, s |> sm'.to_std_string), $'"$0.join($1)"') -00:17:39 verbose #11824 > -00:17:39 verbose #11825 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11826 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11827 > │ ## path_buf_strip_prefix │ -00:17:39 verbose #11828 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11829 > -00:17:39 verbose #11830 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11831 > inl path_buf_strip_prefix (s : string) (path_buf : path_buf) : path_buf = -00:17:39 verbose #11832 > open rust_operators -00:17:39 verbose #11833 > !\\((path_buf, s |> sm'.to_std_string), -00:17:39 verbose #11834 > $'"$0.strip_prefix($1).unwrap().to_path_buf()"') -00:17:39 verbose #11835 > -00:17:39 verbose #11836 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11837 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11838 > │ ## path_display │ -00:17:39 verbose #11839 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11840 > -00:17:39 verbose #11841 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11842 > inl path_display (path : rust.ref' path) : display = -00:17:39 verbose #11843 > open rust_operators -00:17:39 verbose #11844 > !\\(path, $'"$0.display()"') -00:17:39 verbose #11845 > -00:17:39 verbose #11846 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11847 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11848 > │ ## path_buf_display │ -00:17:39 verbose #11849 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11850 > -00:17:39 verbose #11851 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11852 > inl path_buf_display (path_buf : path_buf) : display = -00:17:39 verbose #11853 > open rust_operators -00:17:39 verbose #11854 > !\\(path_buf, $'"$0.display()"') -00:17:39 verbose #11855 > -00:17:39 verbose #11856 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11857 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11858 > │ ## path_buf_file_name │ -00:17:39 verbose #11859 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11860 > -00:17:39 verbose #11861 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11862 > inl path_buf_file_name (path : path_buf) : optionm'.option' (rust.ref' -00:17:39 verbose #11863 > sm'.os_str) = -00:17:39 verbose #11864 > open rust_operators -00:17:39 verbose #11865 > !\($'"!path.file_name()"') -00:17:39 verbose #11866 > -00:17:39 verbose #11867 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11868 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11869 > │ ## path_buf_exists │ -00:17:39 verbose #11870 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11871 > -00:17:39 verbose #11872 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11873 > inl path_buf_exists (path_buf : path_buf) : bool = -00:17:39 verbose #11874 > open rust_operators -00:17:39 verbose #11875 > !\\(path_buf, $'"$0.exists()"') -00:17:39 verbose #11876 > -00:17:39 verbose #11877 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11878 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11879 > │ ## path_buf_is_dir │ -00:17:39 verbose #11880 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11881 > -00:17:39 verbose #11882 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11883 > inl path_buf_is_dir (path_buf : path_buf) : bool = -00:17:39 verbose #11884 > open rust_operators -00:17:39 verbose #11885 > !\\(path_buf, $'"$0.is_dir()"') -00:17:39 verbose #11886 > -00:17:39 verbose #11887 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11888 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11889 > │ ## path_buf_is_file │ -00:17:39 verbose #11890 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11891 > -00:17:39 verbose #11892 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11893 > inl path_buf_is_file (path_buf : path_buf) : bool = -00:17:39 verbose #11894 > open rust_operators -00:17:39 verbose #11895 > !\\(path_buf, $'"$0.is_file()"') -00:17:39 verbose #11896 > -00:17:39 verbose #11897 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11898 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11899 > │ ## path_buf_parent │ -00:17:39 verbose #11900 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11901 > -00:17:39 verbose #11902 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11903 > inl path_buf_parent (path_buf : path_buf) : optionm'.option' path_buf = -00:17:39 verbose #11904 > open rust_operators -00:17:39 verbose #11905 > !\\(path_buf, $'"$0.parent().map(std::path::PathBuf::from)"') -00:17:39 verbose #11906 > -00:17:39 verbose #11907 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11908 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11909 > │ ## ts_path_join │ -00:17:39 verbose #11910 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11911 > -00:17:39 verbose #11912 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11913 > inl ts_path_join (b : string) (a : string) : string = -00:17:39 verbose #11914 > open ts_operators -00:17:39 verbose #11915 > global "type IPathJoin = abstract join: [[<System.ParamArray>]] paths: -00:17:39 verbose #11916 > string[[]] -> string" -00:17:39 verbose #11917 > inl path : $'IPathJoin' = ts.import_all "path" -00:17:39 verbose #11918 > -00:17:39 verbose #11919 > inl a = join a -00:17:39 verbose #11920 > inl b = join b -00:17:39 verbose #11921 > !\($'"!path.join(!a, !b)"') -00:17:39 verbose #11922 > -00:17:39 verbose #11923 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11924 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11925 > │ ## (< />) │ -00:17:39 verbose #11926 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11927 > -00:17:39 verbose #11928 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11929 > let (</>) (a : string) (b : string) : string = -00:17:39 verbose #11930 > run_target function -00:17:39 verbose #11931 > | Fsharp (Native) => fun () => -00:17:39 verbose #11932 > $'System.IO.Path.Combine (!a, !b)' -00:17:39 verbose #11933 > | Rust (Native) => fun () => -00:17:39 verbose #11934 > a -00:17:39 verbose #11935 > |> sm'.to_std_string -00:17:39 verbose #11936 > |> new_path_buf -00:17:39 verbose #11937 > |> path_buf_join b -00:17:39 verbose #11938 > |> path_buf_display -00:17:39 verbose #11939 > |> sm'.format' -00:17:39 verbose #11940 > |> sm'.from_std_string -00:17:39 verbose #11941 > | TypeScript _ => fun () => -00:17:39 verbose #11942 > a |> ts_path_join b -00:17:39 verbose #11943 > | _ => fun () => null () -00:17:39 verbose #11944 > -00:17:39 verbose #11945 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11946 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11947 > │ ## directory_info │ -00:17:39 verbose #11948 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11949 > -00:17:39 verbose #11950 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11951 > nominal directory_info = $'System.IO.DirectoryInfo' -00:17:39 verbose #11952 > -00:17:39 verbose #11953 > inl directory_info (path : string) : directory_info = -00:17:39 verbose #11954 > path |> $'`directory_info ' -00:17:39 verbose #11955 > -00:17:39 verbose #11956 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11957 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11958 > │ ## directory_info_exists │ -00:17:39 verbose #11959 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11960 > -00:17:39 verbose #11961 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11962 > inl directory_info_exists (info : directory_info) : bool = -00:17:39 verbose #11963 > run_target function -00:17:39 verbose #11964 > | Fsharp (Native) => fun () => -00:17:39 verbose #11965 > $'!info.Exists' -00:17:39 verbose #11966 > | _ => fun () => null () -00:17:39 verbose #11967 > -00:17:39 verbose #11968 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11969 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11970 > │ ## directory_info_creation_time │ -00:17:39 verbose #11971 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11972 > -00:17:39 verbose #11973 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11974 > inl directory_info_creation_time (info : directory_info) : date_time.date_time = -00:17:39 verbose #11975 > run_target function -00:17:39 verbose #11976 > | Fsharp (Native) => fun () => -00:17:39 verbose #11977 > $'!info.CreationTime' -00:17:39 verbose #11978 > | _ => fun () => null () -00:17:39 verbose #11979 > -00:17:39 verbose #11980 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11981 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11982 > │ ## directory_info_name │ -00:17:39 verbose #11983 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11984 > -00:17:39 verbose #11985 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11986 > inl directory_info_name (info : directory_info) : string = -00:17:39 verbose #11987 > run_target function -00:17:39 verbose #11988 > | Fsharp (Native) => fun () => -00:17:39 verbose #11989 > $'!info.Name' -00:17:39 verbose #11990 > | _ => fun () => null () -00:17:39 verbose #11991 > -00:17:39 verbose #11992 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #11993 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #11994 > │ ## directory_info_full_name │ -00:17:39 verbose #11995 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #11996 > -00:17:39 verbose #11997 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #11998 > inl directory_info_full_name (info : directory_info) : string = -00:17:39 verbose #11999 > run_target function -00:17:39 verbose #12000 > | Fsharp (Native) => fun () => -00:17:39 verbose #12001 > $'!info.FullName' -00:17:39 verbose #12002 > | _ => fun () => null () -00:17:39 verbose #12003 > -00:17:39 verbose #12004 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12005 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12006 > │ ## dir_entry │ -00:17:39 verbose #12007 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12008 > -00:17:39 verbose #12009 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12010 > nominal dir_entry = $'async_walkdir_DirEntry' -00:17:39 verbose #12011 > -00:17:39 verbose #12012 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12013 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12014 > │ ## walk_dir │ -00:17:39 verbose #12015 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12016 > -00:17:39 verbose #12017 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12018 > nominal walk_dir = $'async_walkdir_WalkDir' -00:17:39 verbose #12019 > -00:17:39 verbose #12020 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12021 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12022 > │ ## async_walkdir_filtering │ -00:17:39 verbose #12023 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12024 > -00:17:39 verbose #12025 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12026 > nominal async_walkdir_filtering = $'async_walkdir_Filtering' -00:17:39 verbose #12027 > -00:17:39 verbose #12028 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12029 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12030 > │ ## filtering │ -00:17:39 verbose #12031 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12032 > -00:17:39 verbose #12033 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12034 > union filtering = -00:17:39 verbose #12035 > | Ignore -00:17:39 verbose #12036 > | IgnoreDir -00:17:39 verbose #12037 > | Continue -00:17:39 verbose #12038 > -00:17:39 verbose #12039 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12040 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12041 > │ ## stream_filter_map │ -00:17:39 verbose #12042 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12043 > -00:17:39 verbose #12044 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12045 > inl stream_filter_map forall t. -00:17:39 verbose #12046 > (fn : resultm.result' dir_entry stream.io_error -> optionm'.option' t) -00:17:39 verbose #12047 > (stream : walk_dir) -00:17:39 verbose #12048 > : am'.vec t = -00:17:39 verbose #12049 > -00:17:39 verbose #12050 > inl fn = join fn -00:17:39 verbose #12051 > inl result : am'.vec t = -00:17:39 verbose #12052 > -00:17:39 verbose #12053 > !\($'"futures_lite::stream::StreamExt::collect(futures_lite::stream::StreamExt:: -00:17:39 verbose #12054 > filter_map(!stream, |x| !fn(x))).await"') -00:17:39 verbose #12055 > result -00:17:39 verbose #12056 > -00:17:39 verbose #12057 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12058 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12059 > │ ## new_walk_dir │ -00:17:39 verbose #12060 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12061 > -00:17:39 verbose #12062 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12063 > inl new_walk_dir (dir : string) : walk_dir = -00:17:39 verbose #12064 > !\\(dir, $'"async_walkdir::WalkDir::new(&*$0)"') -00:17:39 verbose #12065 > // inl walk_dir : walk_dir = walk_dir |> rust.to_mut -00:17:39 verbose #12066 > // (!\($'"true; let mut !walk_dir = !walk_dir"') : bool) |> ignore -00:17:39 verbose #12067 > -00:17:39 verbose #12068 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12069 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12070 > │ ## walk_dir_filter │ -00:17:39 verbose #12071 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12072 > -00:17:39 verbose #12073 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12074 > inl walk_dir_filter (fn : dir_entry -> async.future_pin_send filtering) -00:17:39 verbose #12075 > (walk_dir : walk_dir) : walk_dir = -00:17:39 verbose #12076 > inl fn entry = async.future_init_send (2, 1) 0 fun () => -00:17:39 verbose #12077 > inl result = fn entry |> async.await_send -00:17:39 verbose #12078 > inl filtering : async_walkdir_filtering = -00:17:39 verbose #12079 > match result with -00:17:39 verbose #12080 > | Ignore => !\($'"async_walkdir::Filtering::Ignore"') -00:17:39 verbose #12081 > | IgnoreDir => !\($'"async_walkdir::Filtering::IgnoreDir"') -00:17:39 verbose #12082 > | Continue => !\($'"async_walkdir::Filtering::Continue"') -00:17:39 verbose #12083 > filtering -00:17:39 verbose #12084 > !\\((walk_dir, fn), $'"async_walkdir::WalkDir::filter($0, |x| $1(x))"') -00:17:39 verbose #12085 > -00:17:39 verbose #12086 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12087 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12088 > │ ## file_type │ -00:17:39 verbose #12089 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12090 > -00:17:39 verbose #12091 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12092 > nominal file_type = $'std_fs_FileType' -00:17:39 verbose #12093 > -00:17:39 verbose #12094 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12095 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12096 > │ ## dir_entry_file_type │ -00:17:39 verbose #12097 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12098 > -00:17:39 verbose #12099 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12100 > inl dir_entry_file_type (dir_entry : dir_entry) : async.future_pin_send -00:17:39 verbose #12101 > (resultm.result' file_type stream.io_error) = -00:17:39 verbose #12102 > inl dir_entry = join dir_entry -00:17:39 verbose #12103 > !\($'"Box::pin(async_walkdir::DirEntry::file_type(&!dir_entry))"') -00:17:39 verbose #12104 > -00:17:39 verbose #12105 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12106 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12107 > │ ## file_type_is_dir │ -00:17:39 verbose #12108 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12109 > -00:17:39 verbose #12110 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12111 > inl file_type_is_dir (file_type : file_type) : bool = -00:17:39 verbose #12112 > inl file_type = join file_type -00:17:39 verbose #12113 > !\($'"std::fs::FileType::is_dir(&!file_type)"') -00:17:39 verbose #12114 > -00:17:39 verbose #12115 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12116 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12117 > │ ## file │ -00:17:39 verbose #12118 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12119 > -00:17:39 verbose #12120 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12121 > nominal file = $'std_fs_File' -00:17:39 verbose #12122 > -00:17:39 verbose #12123 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12124 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12125 > │ ## file_open │ -00:17:39 verbose #12126 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12127 > -00:17:39 verbose #12128 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12129 > inl file_open (path : string) : resultm.result' file stream.io_error = -00:17:39 verbose #12130 > !\($'"std::fs::File::open(&*!path)"') -00:17:39 verbose #12131 > -00:17:39 verbose #12132 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12133 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12134 > │ ## dir_entry_path │ -00:17:39 verbose #12135 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12136 > -00:17:39 verbose #12137 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12138 > inl dir_entry_path (dir_entry : dir_entry) : path_buf = -00:17:39 verbose #12139 > !\\(dir_entry, $'"async_walkdir::DirEntry::path(&$0)"') -00:17:39 verbose #12140 > -00:17:39 verbose #12141 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12142 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12143 > │ ## get_temp_path │ -00:17:39 verbose #12144 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12145 > -00:17:39 verbose #12146 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12147 > inl get_temp_path () : string = -00:17:39 verbose #12148 > run_target function -00:17:39 verbose #12149 > | Fsharp (Native) => fun () => -00:17:39 verbose #12150 > $'System.IO.Path.GetTempPath' () -00:17:39 verbose #12151 > | Rust (Native) => fun () => -00:17:39 verbose #12152 > open rust_operators -00:17:39 verbose #12153 > !\($'"std::env::temp_dir()"') -00:17:39 verbose #12154 > |> path_buf_display -00:17:39 verbose #12155 > |> sm'.format' -00:17:39 verbose #12156 > |> sm'.from_std_string -00:17:39 verbose #12157 > | _ => fun () => null () -00:17:39 verbose #12158 > -00:17:39 verbose #12159 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12160 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12161 > │ ## get_file_name │ -00:17:39 verbose #12162 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12163 > -00:17:39 verbose #12164 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12165 > inl get_file_name (path : string) : string = -00:17:39 verbose #12166 > run_target function -00:17:39 verbose #12167 > | Fsharp (Native) => fun () => -00:17:39 verbose #12168 > path |> $'System.IO.Path.GetFileName' -00:17:39 verbose #12169 > | Rust (Native) => fun () => -00:17:39 verbose #12170 > open rust_operators -00:17:39 verbose #12171 > inl path_buf = path |> sm'.to_std_string |> new_path_buf -00:17:39 verbose #12172 > !\\(path_buf, $'"$0.file_name()"') -00:17:39 verbose #12173 > |> optionm'.unwrap -00:17:39 verbose #12174 > |> sm'.from_os_str_ref -00:17:39 verbose #12175 > | _ => fun () => null () -00:17:39 verbose #12176 > -00:17:39 verbose #12177 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12178 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12179 > │ ## get_current_directory │ -00:17:39 verbose #12180 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12181 > -00:17:39 verbose #12182 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12183 > inl get_current_directory () : string = -00:17:39 verbose #12184 > run_target function -00:17:39 verbose #12185 > | Fsharp (Native) => fun () => -00:17:39 verbose #12186 > $'System.IO.Directory.GetCurrentDirectory' () -00:17:39 verbose #12187 > | Rust (Native) => fun () => -00:17:39 verbose #12188 > open rust_operators -00:17:39 verbose #12189 > inl current_dir = !\($'"std::env::current_dir()"') : resultm.result' -00:17:39 verbose #12190 > path_buf stream.io_error -00:17:39 verbose #12191 > current_dir -00:17:39 verbose #12192 > |> resultm.unwrap' -00:17:39 verbose #12193 > |> path_buf_display -00:17:39 verbose #12194 > |> sm'.format' -00:17:39 verbose #12195 > |> sm'.from_std_string -00:17:39 verbose #12196 > | _ => fun () => null () -00:17:39 verbose #12197 > -00:17:39 verbose #12198 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12199 > //// test -00:17:39 verbose #12200 > -00:17:39 verbose #12201 > get_current_directory () -00:17:39 verbose #12202 > -00:17:39 verbose #12203 > ╭─[ 575.28ms - return value ]──────────────────────────────────────────────────╮ -00:17:39 verbose #12204 > │ C:\home\git\polyglot\lib\spiral │ -00:17:39 verbose #12205 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12206 > -00:17:39 verbose #12207 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12208 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12209 > │ ## directory_separator_char │ -00:17:39 verbose #12210 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12211 > -00:17:39 verbose #12212 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12213 > inl directory_separator_char () : char = -00:17:39 verbose #12214 > run_target function -00:17:39 verbose #12215 > | Fsharp (Native) => fun () => -00:17:39 verbose #12216 > $'System.IO.Path.DirectorySeparatorChar' -00:17:39 verbose #12217 > | Rust (Native) => fun () => -00:17:39 verbose #12218 > open rust_operators -00:17:39 verbose #12219 > !\($'"std::path::MAIN_SEPARATOR"') -00:17:39 verbose #12220 > | _ => fun () => null () -00:17:39 verbose #12221 > -00:17:39 verbose #12222 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12223 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12224 > │ ## normalize_path │ -00:17:39 verbose #12225 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12226 > -00:17:39 verbose #12227 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12228 > inl normalize_path (path : string) : string = -00:17:39 verbose #12229 > inl path = path |> sm'.replace_regex @"^\\\\\?\\" "" -00:17:39 verbose #12230 > $'$"{!path.[[0]] |> string |> _.ToLower()}{!path.[[1..]]}"' |> sm'.replace -00:17:39 verbose #12231 > "\\" "/" -00:17:39 verbose #12232 > -00:17:39 verbose #12233 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12234 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12235 > │ ## get_full_path │ -00:17:39 verbose #12236 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12237 > -00:17:39 verbose #12238 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12239 > inl get_full_path (path : string) : string = -00:17:39 verbose #12240 > run_target function -00:17:39 verbose #12241 > | Fsharp (Native) => fun () => -00:17:39 verbose #12242 > inl path = join path -00:17:39 verbose #12243 > path |> $'System.IO.Path.GetFullPath' -00:17:39 verbose #12244 > | Rust (Native) => fun () => -00:17:39 verbose #12245 > inl path = join path -00:17:39 verbose #12246 > open rust_operators -00:17:39 verbose #12247 > inl path_buf = path |> sm'.to_std_string |> new_path_buf -00:17:39 verbose #12248 > if path_buf |> path_buf_exists |> not then -00:17:39 verbose #12249 > inl current_dir = get_current_directory () -00:17:39 verbose #12250 > current_dir </> path -00:17:39 verbose #12251 > |> normalize_path -00:17:39 verbose #12252 > |> sm'.split "/" -00:17:39 verbose #12253 > |> fun x => -00:17:39 verbose #12254 > ((a x : _ i32 _), (0i32, (a ;[[]] : _ i32 _))) -00:17:39 verbose #12255 > ||> am.foldBack fun x level, acc => -00:17:39 verbose #12256 > match x, level with -00:17:39 verbose #12257 > | "..", _ => level + 1, acc -00:17:39 verbose #12258 > | ".", _ => level, acc -00:17:39 verbose #12259 > | _, 0 when x |> sm'.ends_with ":" => 0, a ;[[ -00:17:39 verbose #12260 > $'$"{!current_dir.[[0]]}:"' ]] ++ acc -00:17:39 verbose #12261 > | _, 0 => 0, a ;[[ x ]] ++ acc -00:17:39 verbose #12262 > | _ => level - 1, acc -00:17:39 verbose #12263 > |> snd -00:17:39 verbose #12264 > |> seq.of_array' -00:17:39 verbose #12265 > |> sm'.concat (directory_separator_char () |> sm'.obj_to_string) -00:17:39 verbose #12266 > else -00:17:39 verbose #12267 > inl path = !\\(path, $'"std::fs::canonicalize(&*$0)"') : -00:17:39 verbose #12268 > resultm.result' path_buf stream.io_error -00:17:39 verbose #12269 > path -00:17:39 verbose #12270 > |> resultm.unwrap' -00:17:39 verbose #12271 > |> path_buf_display -00:17:39 verbose #12272 > |> sm'.format' -00:17:39 verbose #12273 > |> sm'.from_std_string -00:17:39 verbose #12274 > | _ => fun () => null () -00:17:39 verbose #12275 > -00:17:39 verbose #12276 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12277 > //// test -00:17:39 verbose #12278 > -00:17:39 verbose #12279 > "." -00:17:39 verbose #12280 > |> get_full_path -00:17:39 verbose #12281 > |> directory_info -00:17:39 verbose #12282 > |> directory_info_name -00:17:39 verbose #12283 > |> _assert_eq "spiral" -00:17:39 verbose #12284 > -00:17:39 verbose #12285 > ╭─[ 1.78s - stdout ]───────────────────────────────────────────────────────────╮ -00:17:39 verbose #12286 > │ assert_eq / actual: "spiral" / expected: "spiral" │ -00:17:39 verbose #12287 > │ │ -00:17:39 verbose #12288 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12289 > -00:17:39 verbose #12290 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12291 > //// test -00:17:39 verbose #12292 > -00:17:39 verbose #12293 > "dir/.././._file" -00:17:39 verbose #12294 > |> get_full_path -00:17:39 verbose #12295 > |> _assert_eq (get_current_directory () </> "._file") -00:17:39 verbose #12296 > -00:17:39 verbose #12297 > ╭─[ 766.52ms - stdout ]────────────────────────────────────────────────────────╮ -00:17:39 verbose #12298 > │ assert_eq / actual: "C:\home\git\polyglot\lib\spiral\._file" / expected: │ -00:17:39 verbose #12299 > │ "C:\home\git\polyglot\lib\spiral\._file" │ -00:17:39 verbose #12300 > │ │ -00:17:39 verbose #12301 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12302 > -00:17:39 verbose #12303 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12304 > //// test -00:17:39 verbose #12305 > ///! rust -d regex -00:17:39 verbose #12306 > -00:17:39 verbose #12307 > types () -00:17:39 verbose #12308 > "." -00:17:39 verbose #12309 > |> get_full_path -00:17:39 verbose #12310 > |> sm'.to_std_string -00:17:39 verbose #12311 > |> new_path_buf -00:17:39 verbose #12312 > |> path_buf_file_name -00:17:39 verbose #12313 > |> optionm'.unwrap -00:17:39 verbose #12314 > |> sm'.from_os_str_ref -00:17:39 verbose #12315 > |> _assert_eq "spiral" -00:17:39 verbose #12316 > -00:17:39 verbose #12317 > ╭─[ 19.79s - return value ]────────────────────────────────────────────────────╮ -00:17:39 verbose #12318 > │ assert_eq / actual: "spiral" / expected: "spiral" │ -00:17:39 verbose #12319 > │ │ -00:17:39 verbose #12320 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12321 > -00:17:39 verbose #12322 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12323 > //// test -00:17:39 verbose #12324 > ///! rust -d regex -00:17:39 verbose #12325 > -00:17:39 verbose #12326 > types () -00:17:39 verbose #12327 > "dir/.././._file" -00:17:39 verbose #12328 > |> get_full_path -00:17:39 verbose #12329 > |> _assert_eq (get_current_directory () </> "._file") -00:17:39 verbose #12330 > -00:17:39 verbose #12331 > ╭─[ 20.33s - return value ]────────────────────────────────────────────────────╮ -00:17:39 verbose #12332 > │ assert_eq / actual: "C:\home\git\polyglot\lib\spiral\._file" / expected: │ -00:17:39 verbose #12333 > │ "C:\home\git\polyglot\lib\spiral\._file" │ -00:17:39 verbose #12334 > │ │ -00:17:39 verbose #12335 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12336 > -00:17:39 verbose #12337 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12338 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12339 > │ ## create_temp_directory_name │ -00:17:39 verbose #12340 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12341 > -00:17:39 verbose #12342 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12343 > inl create_temp_directory_name () = -00:17:39 verbose #12344 > run_target function -00:17:39 verbose #12345 > | Fsharp (Native) -00:17:39 verbose #12346 > | Rust (Native) => fun () => -00:17:39 verbose #12347 > inl assembly_name = env.get_entry_assembly_name () -00:17:39 verbose #12348 > get_temp_path () -00:17:39 verbose #12349 > </> ($'$"\!{!assembly_name}"' : string) -00:17:39 verbose #12350 > </> (date_time.now () |> date_time.new_guid_from_date_time |> -00:17:39 verbose #12351 > sm'.obj_to_string) -00:17:39 verbose #12352 > | _ => fun () => null () -00:17:39 verbose #12353 > -00:17:39 verbose #12354 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12355 > //// test -00:17:39 verbose #12356 > -00:17:39 verbose #12357 > types () -00:17:39 verbose #12358 > create_temp_directory_name () -00:17:39 verbose #12359 > |> _assert_contains (directory_separator_char ()) -00:17:39 verbose #12360 > -00:17:39 verbose #12361 > ╭─[ 1.28s - stdout ]───────────────────────────────────────────────────────────╮ -00:17:39 verbose #12362 > │ assert_contains / actual: │ -00:17:39 verbose #12363 > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1145-1582-8258-8004 │ -00:17:39 verbose #12364 > │ 0025323f" / expected: '\\' │ -00:17:39 verbose #12365 > │ │ -00:17:39 verbose #12366 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12367 > -00:17:39 verbose #12368 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12369 > //// test -00:17:39 verbose #12370 > ///! rust -d chrono -00:17:39 verbose #12371 > -00:17:39 verbose #12372 > types () -00:17:39 verbose #12373 > create_temp_directory_name () -00:17:39 verbose #12374 > |> _assert_contains (directory_separator_char ()) -00:17:39 verbose #12375 > -00:17:39 verbose #12376 > ╭─[ 20.15s - return value ]────────────────────────────────────────────────────╮ -00:17:39 verbose #12377 > │ assert_contains / actual: │ -00:17:39 verbose #12378 > │ "C:\Users\i574n\AppData\Local\Temp\!spiral_builder_e420b432c1bbe37c6212f00a5 │ -00:17:39 verbose #12379 > │ f19ae7e304a650657d0446f22abd9c98d13aafe\20240515-1145-3582-0987-0000003bc606 │ -00:17:39 verbose #12380 > │ " / expected: '\\' │ -00:17:39 verbose #12381 > │ │ -00:17:39 verbose #12382 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12383 > -00:17:39 verbose #12384 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12385 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12386 > │ ## get_source_directory │ -00:17:39 verbose #12387 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12388 > -00:17:39 verbose #12389 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12390 > inl get_source_directory () = -00:17:39 verbose #12391 > $'__SOURCE_DIRECTORY__' : string -00:17:39 verbose #12392 > -00:17:39 verbose #12393 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12394 > //// test -00:17:39 verbose #12395 > -00:17:39 verbose #12396 > get_source_directory () -00:17:39 verbose #12397 > |> directory_info -00:17:39 verbose #12398 > |> directory_info_name -00:17:39 verbose #12399 > |> _assert_eq "spiral" -00:17:39 verbose #12400 > -00:17:39 verbose #12401 > ╭─[ 723.93ms - stdout ]────────────────────────────────────────────────────────╮ -00:17:39 verbose #12402 > │ assert_eq / actual: "spiral" / expected: "spiral" │ -00:17:39 verbose #12403 > │ │ -00:17:39 verbose #12404 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12405 > -00:17:39 verbose #12406 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12407 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12408 > │ ## create_dir_all │ -00:17:39 verbose #12409 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12410 > -00:17:39 verbose #12411 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12412 > inl create_dir_all (path : string) : resultm.result' () stream.io_error = -00:17:39 verbose #12413 > !\\(path, $'"std::fs::create_dir_all(&*$0)"') -00:17:39 verbose #12414 > -00:17:39 verbose #12415 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12416 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12417 > │ ## create_directory │ -00:17:39 verbose #12418 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12419 > -00:17:39 verbose #12420 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12421 > inl create_directory (path : string) : directory_info = -00:17:39 verbose #12422 > run_target function -00:17:39 verbose #12423 > | Fsharp (Native) => fun () => -00:17:39 verbose #12424 > path |> $'System.IO.Directory.CreateDirectory' -00:17:39 verbose #12425 > | _ => fun () => null () -00:17:39 verbose #12426 > -00:17:39 verbose #12427 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12428 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12429 > │ ## directory_get_files │ -00:17:39 verbose #12430 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12431 > -00:17:39 verbose #12432 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12433 > inl directory_get_files (path : string) : array_base string = -00:17:39 verbose #12434 > run_target function -00:17:39 verbose #12435 > | Fsharp (Native) => fun () => -00:17:39 verbose #12436 > path |> $'System.IO.Directory.GetFiles' -00:17:39 verbose #12437 > | _ => fun () => null () -00:17:39 verbose #12438 > -00:17:39 verbose #12439 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12440 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12441 > │ ## directory_exists │ -00:17:39 verbose #12442 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12443 > -00:17:39 verbose #12444 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12445 > inl directory_exists (path : string) : bool = -00:17:39 verbose #12446 > run_target function -00:17:39 verbose #12447 > | Fsharp (Native) => fun () => -00:17:39 verbose #12448 > path |> $'System.IO.Directory.Exists' -00:17:39 verbose #12449 > | Rust (Native) => fun () => -00:17:39 verbose #12450 > inl path = path |> sm'.to_std_string |> new_path_buf -00:17:39 verbose #12451 > path_buf_exists path && path_buf_is_dir path -00:17:39 verbose #12452 > | TypeScript (Native) => fun () => -00:17:39 verbose #12453 > global "type IFsExistsSync = abstract existsSync: path: string -> -00:17:39 verbose #12454 > bool" -00:17:39 verbose #12455 > open ts_operators -00:17:39 verbose #12456 > inl fs : $'IFsExistsSync' = ts.import_all "fs" -00:17:39 verbose #12457 > !\\((fs, path), $'"$0.existsSync($1)"') -00:17:39 verbose #12458 > | _ => fun () => null () -00:17:39 verbose #12459 > -00:17:39 verbose #12460 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12461 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12462 > │ ## directory_get_parent │ -00:17:39 verbose #12463 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12464 > -00:17:39 verbose #12465 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12466 > inl directory_get_parent (path : string) : optionm'.option' string = -00:17:39 verbose #12467 > run_target function -00:17:39 verbose #12468 > | Fsharp (Native) => fun () => -00:17:39 verbose #12469 > inl parent : directory_info = path |> -00:17:39 verbose #12470 > $'System.IO.Directory.GetParent' -00:17:39 verbose #12471 > if parent =. null () -00:17:39 verbose #12472 > then None -00:17:39 verbose #12473 > else parent |> directory_info_full_name |> Some -00:17:39 verbose #12474 > | Rust (Native) => fun () => -00:17:39 verbose #12475 > path -00:17:39 verbose #12476 > |> sm'.to_std_string -00:17:39 verbose #12477 > |> new_path_buf -00:17:39 verbose #12478 > |> path_buf_parent -00:17:39 verbose #12479 > |> optionm'.try' -00:17:39 verbose #12480 > |> path_buf_display -00:17:39 verbose #12481 > |> sm'.format' -00:17:39 verbose #12482 > |> sm'.from_std_string -00:17:39 verbose #12483 > |> Some -00:17:39 verbose #12484 > | TypeScript _ => fun () => -00:17:39 verbose #12485 > global "type IPathDirname = abstract dirname: path: string -> -00:17:39 verbose #12486 > string" -00:17:39 verbose #12487 > inl fs : $'IPathDirname' = ts.import_all "path" -00:17:39 verbose #12488 > ts.emit_expr path $'"!fs.dirname($0)"' |> Some -00:17:39 verbose #12489 > | _ => fun () => null () -00:17:39 verbose #12490 > |> optionm'.box -00:17:39 verbose #12491 > -00:17:39 verbose #12492 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12493 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12494 > │ ## file_delete │ -00:17:39 verbose #12495 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12496 > -00:17:39 verbose #12497 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12498 > inl file_delete (path : string) : () = -00:17:39 verbose #12499 > run_target function -00:17:39 verbose #12500 > | Fsharp (Native) => fun () => -00:17:39 verbose #12501 > path |> $'System.IO.File.Delete' -00:17:39 verbose #12502 > | _ => fun () => null () -00:17:39 verbose #12503 > -00:17:39 verbose #12504 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12505 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12506 > │ ## file_move │ -00:17:39 verbose #12507 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12508 > -00:17:39 verbose #12509 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12510 > inl file_move (new_path : string) (old_path : string) : () = -00:17:39 verbose #12511 > run_target function -00:17:39 verbose #12512 > | Fsharp (Native) => fun () => -00:17:39 verbose #12513 > $'System.IO.File.Move (!old_path, !new_path)' -00:17:39 verbose #12514 > | _ => fun () => null () -00:17:39 verbose #12515 > -00:17:39 verbose #12516 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12517 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12518 > │ ## file_copy │ -00:17:39 verbose #12519 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12520 > -00:17:39 verbose #12521 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12522 > inl file_copy (new_path : string) (old_path : string) : () = -00:17:39 verbose #12523 > run_target function -00:17:39 verbose #12524 > | Fsharp (Native) => fun () => -00:17:39 verbose #12525 > $'System.IO.File.Copy (!old_path, !new_path, true)' -00:17:39 verbose #12526 > | Rust (Native) => fun () => -00:17:39 verbose #12527 > open rust_operators -00:17:39 verbose #12528 > inl new_path = join new_path -00:17:39 verbose #12529 > !\\(old_path, $'"std::fs::copy(&*$0, &*!new_path)"') -00:17:39 verbose #12530 > |> fun x => x : _ u64 stream.io_error -00:17:39 verbose #12531 > |> resultm.unwrap' -00:17:39 verbose #12532 > |> ignore -00:17:39 verbose #12533 > | _ => fun () => null () -00:17:39 verbose #12534 > -00:17:39 verbose #12535 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12536 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12537 > │ ## file_exists │ -00:17:39 verbose #12538 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12539 > -00:17:39 verbose #12540 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12541 > inl file_exists (path : string) : bool = -00:17:39 verbose #12542 > run_target function -00:17:39 verbose #12543 > | Fsharp (Native) => fun () => -00:17:39 verbose #12544 > path |> $'System.IO.File.Exists' -00:17:39 verbose #12545 > | Rust (Native) => fun () => -00:17:39 verbose #12546 > inl path_buf = path |> sm'.to_std_string |> new_path_buf -00:17:39 verbose #12547 > path_buf_exists path_buf && path_buf_is_file path_buf -00:17:39 verbose #12548 > | TypeScript (Native) => fun () => -00:17:39 verbose #12549 > open ts_operators -00:17:39 verbose #12550 > global "type IFsExistsSync = abstract existsSync: path: string -> -00:17:39 verbose #12551 > bool" -00:17:39 verbose #12552 > inl fs : $'IFsExistsSync' = ts.import_all "fs" -00:17:39 verbose #12553 > !\\((fs, path), $'"$0.existsSync($1)"') -00:17:39 verbose #12554 > | _ => fun () => null () -00:17:39 verbose #12555 > -00:17:39 verbose #12556 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12557 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12558 > │ ## directory_delete │ -00:17:39 verbose #12559 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12560 > -00:17:39 verbose #12561 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12562 > inl directory_delete recursive (path : string) : () = -00:17:39 verbose #12563 > run_target function -00:17:39 verbose #12564 > | Fsharp (Native) => fun () => -00:17:39 verbose #12565 > $'System.IO.Directory.Delete (!path, !recursive)' -00:17:39 verbose #12566 > | Rust (Native) => fun () => -00:17:39 verbose #12567 > inl path = join path -00:17:39 verbose #12568 > if path |> directory_exists then -00:17:39 verbose #12569 > open rust_operators -00:17:39 verbose #12570 > if recursive -00:17:39 verbose #12571 > then !\\(path, $'"std::fs::remove_dir_all(&*$0).unwrap()"') -00:17:39 verbose #12572 > else !\\(path, $'"std::fs::remove_dir(&*$0).unwrap()"') -00:17:39 verbose #12573 > | _ => fun () => null () -00:17:39 verbose #12574 > -00:17:39 verbose #12575 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12576 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12577 > │ ## read_all_text_async │ -00:17:39 verbose #12578 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12579 > -00:17:39 verbose #12580 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12581 > inl read_all_text_async (path : string) : _ string = -00:17:39 verbose #12582 > run_target function -00:17:39 verbose #12583 > | Fsharp (Native) => fun () => -00:17:39 verbose #12584 > path |> $'System.IO.File.ReadAllTextAsync' |> async.await_task -00:17:39 verbose #12585 > | _ => fun () => null () -00:17:39 verbose #12586 > -00:17:39 verbose #12587 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12588 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12589 > │ ## file_exists_content │ -00:17:39 verbose #12590 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12591 > -00:17:39 verbose #12592 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12593 > inl file_exists_content path content : _ bool = -00:17:39 verbose #12594 > run_target function -00:17:39 verbose #12595 > | Fsharp (Native) => fun () => -00:17:39 verbose #12596 > fun () => -00:17:39 verbose #12597 > fix_condition -00:17:39 verbose #12598 > fun () => path |> file_exists |> not -00:17:39 verbose #12599 > fun () => false |> return -00:17:39 verbose #12600 > fun () => -00:17:39 verbose #12601 > inl existing_content = path |> read_all_text_async |> -00:17:39 verbose #12602 > async.let' -00:17:39 verbose #12603 > content = existing_content |> return -00:17:39 verbose #12604 > |> async.new_async_unit -00:17:39 verbose #12605 > | _ => fun () => null () -00:17:39 verbose #12606 > -00:17:39 verbose #12607 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12608 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12609 > │ ## write_all_text │ -00:17:39 verbose #12610 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12611 > -00:17:39 verbose #12612 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12613 > inl write_all_text (path : string) (text : string) : () = -00:17:39 verbose #12614 > run_target function -00:17:39 verbose #12615 > | Fsharp (Native) => fun () => -00:17:39 verbose #12616 > inl text = join text -00:17:39 verbose #12617 > $'System.IO.File.WriteAllText (!path, !text)' -00:17:39 verbose #12618 > | Rust (Native) => fun () => -00:17:39 verbose #12619 > open rust_operators -00:17:39 verbose #12620 > !\\((path, text), $'"std::fs::write(&*$0, &*$1).unwrap()"') -00:17:39 verbose #12621 > | _ => fun () => null () -00:17:39 verbose #12622 > -00:17:39 verbose #12623 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12624 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12625 > │ ## read_all_bytes │ -00:17:39 verbose #12626 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12627 > -00:17:39 verbose #12628 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12629 > inl read_all_bytes (path : string) : am'.vec u8 = -00:17:39 verbose #12630 > run_target function -00:17:39 verbose #12631 > | Fsharp (Native) => fun () => -00:17:39 verbose #12632 > $'!path |> System.IO.File.ReadAllBytes' -00:17:39 verbose #12633 > |> am'.to_vec -00:17:39 verbose #12634 > | Rust (Native) => fun () => -00:17:39 verbose #12635 > open rust_operators -00:17:39 verbose #12636 > !\\(path, $'"std::fs::read(&*$0).unwrap()"') -00:17:39 verbose #12637 > | _ => fun () => null () -00:17:39 verbose #12638 > -00:17:39 verbose #12639 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12640 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12641 > │ ## read_all_text │ -00:17:39 verbose #12642 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12643 > -00:17:39 verbose #12644 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12645 > inl read_all_text (path : string) : string = -00:17:39 verbose #12646 > run_target function -00:17:39 verbose #12647 > | Fsharp (Native) => fun () => -00:17:39 verbose #12648 > $'!path |> System.IO.File.ReadAllText' -00:17:39 verbose #12649 > | Rust (Native) => fun () => -00:17:39 verbose #12650 > path -00:17:39 verbose #12651 > |> read_all_bytes -00:17:39 verbose #12652 > |> sm'.string_from_utf8 -00:17:39 verbose #12653 > |> resultm.unwrap' -00:17:39 verbose #12654 > |> sm'.from_std_string -00:17:39 verbose #12655 > | _ => fun () => null () -00:17:39 verbose #12656 > -00:17:39 verbose #12657 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12658 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12659 > │ ## write_all_text_async │ -00:17:39 verbose #12660 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12661 > -00:17:39 verbose #12662 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12663 > inl write_all_text_async (path : string) (text : string) : _ () = -00:17:39 verbose #12664 > run_target function -00:17:39 verbose #12665 > | Fsharp (Native) => fun () => -00:17:39 verbose #12666 > $'System.IO.File.WriteAllTextAsync (!path, !text)' |> -00:17:39 verbose #12667 > async.await_task -00:17:39 verbose #12668 > | _ => fun () => null () -00:17:39 verbose #12669 > -00:17:39 verbose #12670 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12671 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12672 > │ ## write_all_text_exists │ -00:17:39 verbose #12673 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12674 > -00:17:39 verbose #12675 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12676 > inl write_all_text_exists path contents = -00:17:39 verbose #12677 > fun () => -00:17:39 verbose #12678 > inl exists' = contents |> file_exists_content path |> async.let' -00:17:39 verbose #12679 > if not exists' -00:17:39 verbose #12680 > then contents |> write_all_text_async path |> async.do -00:17:39 verbose #12681 > |> async.new_async -00:17:39 verbose #12682 > -00:17:39 verbose #12683 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12684 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12685 > │ ## delete_directory_async │ -00:17:39 verbose #12686 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12687 > -00:17:39 verbose #12688 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12689 > inl delete_directory_async path : _ i64 = -00:17:39 verbose #12690 > run_target function -00:17:39 verbose #12691 > | Fsharp (Native) => fun () => -00:17:39 verbose #12692 > let rec loop (retry : i64) = -00:17:39 verbose #12693 > fun () => -00:17:39 verbose #12694 > try_unit -00:17:39 verbose #12695 > fun () => -00:17:39 verbose #12696 > path |> directory_delete true -00:17:39 verbose #12697 > retry |> return -00:17:39 verbose #12698 > fun ex => -00:17:39 verbose #12699 > if retry % 100i64 = 0 then -00:17:39 verbose #12700 > inl ex = ex |> sm'.format_exception -00:17:39 verbose #12701 > trace Debug -00:17:39 verbose #12702 > fun () => -00:17:39 verbose #12703 > "file_system.delete_directory_async" -00:17:39 verbose #12704 > fun () => $'$"path: {!path |> -00:17:39 verbose #12705 > !get_file_name} / ex: {!ex} / {!_locals ()}"' -00:17:39 verbose #12706 > async.sleep 10i32 |> async.do -00:17:39 verbose #12707 > loop (retry + 1) |> async.return_await -00:17:39 verbose #12708 > |> async.new_async -00:17:39 verbose #12709 > loop 0 -00:17:39 verbose #12710 > | _ => fun () => null () -00:17:39 verbose #12711 > -00:17:39 verbose #12712 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12713 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12714 > │ ## create_directory' │ -00:17:39 verbose #12715 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12716 > -00:17:39 verbose #12717 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12718 > inl create_directory' dir = -00:17:39 verbose #12719 > run_target function -00:17:39 verbose #12720 > | Fsharp (Native) => fun () => -00:17:39 verbose #12721 > inl directory_info = dir |> create_directory -00:17:39 verbose #12722 > -00:17:39 verbose #12723 > inl exists' = directory_info |> directory_info_exists -00:17:39 verbose #12724 > if not exists' then -00:17:39 verbose #12725 > inl creation_time = directory_info |> -00:17:39 verbose #12726 > directory_info_creation_time -00:17:39 verbose #12727 > inl result = ($'{| Exists = !exists'; CreationTime = -00:17:39 verbose #12728 > !creation_time |}' : any) |> sm'.format_debug -00:17:39 verbose #12729 > trace Debug -00:17:39 verbose #12730 > fun () => "file_system.create_directory" -00:17:39 verbose #12731 > fun () => $'$"dir: {!dir} / result: {!result} {!_locals -00:17:39 verbose #12732 > ()}"' -00:17:39 verbose #12733 > inl disposable : _ () = new_disposable fun () => -00:17:39 verbose #12734 > dir -00:17:39 verbose #12735 > |> delete_directory_async -00:17:39 verbose #12736 > |> async.ignore -00:17:39 verbose #12737 > |> async.run_synchronously -00:17:39 verbose #12738 > disposable -00:17:39 verbose #12739 > | Rust (Native) => fun () => -00:17:39 verbose #12740 > inl dir = join dir -00:17:39 verbose #12741 > match dir |> create_dir_all |> resultm.map_error' sm'.format' |> -00:17:39 verbose #12742 > resultm.unbox with -00:17:39 verbose #12743 > | Ok () => -00:17:39 verbose #12744 > trace Verbose -00:17:39 verbose #12745 > fun () => "file_system.create_directory" -00:17:39 verbose #12746 > fun () => $'$"dir: {!dir} / {!_locals ()}"' -00:17:39 verbose #12747 > | Error error => -00:17:39 verbose #12748 > trace Critical -00:17:39 verbose #12749 > fun () => "file_system.create_directory" -00:17:39 verbose #12750 > fun () => $'$"dir: {!dir} / error: {!error} / {!_locals -00:17:39 verbose #12751 > ()}"' -00:17:39 verbose #12752 > inl disposable : _ () = new_disposable fun () => -00:17:39 verbose #12753 > dir -00:17:39 verbose #12754 > |> directory_delete true -00:17:39 verbose #12755 > disposable -00:17:39 verbose #12756 > | _ => fun () => null () -00:17:39 verbose #12757 > -00:17:39 verbose #12758 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12759 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12760 > │ ## create_temp_directory │ -00:17:39 verbose #12761 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12762 > -00:17:39 verbose #12763 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12764 > inl create_temp_directory () = -00:17:39 verbose #12765 > inl dir = create_temp_directory_name () -00:17:39 verbose #12766 > dir, dir |> create_directory' -00:17:39 verbose #12767 > -00:17:39 verbose #12768 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12769 > //// test -00:17:39 verbose #12770 > -00:17:39 verbose #12771 > types () -00:17:39 verbose #12772 > inl path, disposable = create_temp_directory () -00:17:39 verbose #12773 > disposable |> use |> ignore -00:17:39 verbose #12774 > path -00:17:39 verbose #12775 > |> directory_exists -00:17:39 verbose #12776 > |> _assert_eq true -00:17:39 verbose #12777 > -00:17:39 verbose #12778 > ╭─[ 1.27s - stdout ]───────────────────────────────────────────────────────────╮ -00:17:39 verbose #12779 > │ assert_eq / actual: true / expected: true │ -00:17:39 verbose #12780 > │ │ -00:17:39 verbose #12781 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12782 > -00:17:39 verbose #12783 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12784 > //// test -00:17:39 verbose #12785 > ///! rust -d chrono -00:17:39 verbose #12786 > -00:17:39 verbose #12787 > types () -00:17:39 verbose #12788 > inl path, disposable = create_temp_directory () -00:17:39 verbose #12789 > path -00:17:39 verbose #12790 > |> directory_exists -00:17:39 verbose #12791 > |> _assert_eq true -00:17:39 verbose #12792 > disposable |> use |> ignore -00:17:39 verbose #12793 > path -00:17:39 verbose #12794 > |> directory_exists -00:17:39 verbose #12795 > |> _assert_eq false -00:17:39 verbose #12796 > -00:17:39 verbose #12797 > ╭─[ 20.13s - return value ]────────────────────────────────────────────────────╮ -00:17:39 verbose #12798 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │ -00:17:39 verbose #12799 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_d3a4fa669c1aa1689de5f1ff1b │ -00:17:39 verbose #12800 > │ 098cbc7aaa1851c72cb19e4a8fe091d8071a89\20240515-1146-1240-0931-00000043d762 │ -00:17:39 verbose #12801 > │ assert_eq / actual: true / expected: true │ -00:17:39 verbose #12802 > │ assert_eq / actual: false / expected: false │ -00:17:39 verbose #12803 > │ │ -00:17:39 verbose #12804 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12805 > -00:17:39 verbose #12806 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12807 > //// test -00:17:39 verbose #12808 > -00:17:39 verbose #12809 > inl lock_directory path = -00:17:39 verbose #12810 > fun () => -00:17:39 verbose #12811 > trace Debug (fun () => "_1") _locals -00:17:39 verbose #12812 > "0" |> write_all_text_async (path </> "test.txt") |> async.do -00:17:39 verbose #12813 > file_stream -00:17:39 verbose #12814 > (path </> "test.txt") -00:17:39 verbose #12815 > ModeOpen -00:17:39 verbose #12816 > AccessReadWrite -00:17:39 verbose #12817 > ShareNone -00:17:39 verbose #12818 > |> use -00:17:39 verbose #12819 > |> ignore -00:17:39 verbose #12820 > trace Debug (fun () => "_2") _locals -00:17:39 verbose #12821 > async.sleep 2000 |> async.do -00:17:39 verbose #12822 > trace Debug (fun () => "_3") _locals -00:17:39 verbose #12823 > () |> return -00:17:39 verbose #12824 > |> async.new_async -00:17:39 verbose #12825 > -00:17:39 verbose #12826 > types () -00:17:39 verbose #12827 > inl temp_dir, disposable = create_temp_directory () -00:17:39 verbose #12828 > disposable |> use |> ignore -00:17:39 verbose #12829 > inl path = temp_dir </> "test" -00:17:39 verbose #12830 > -00:17:39 verbose #12831 > fun () => -00:17:39 verbose #12832 > trace Debug (fun () => "1") _locals -00:17:39 verbose #12833 > path |> create_directory |> ignore -00:17:39 verbose #12834 > trace Debug (fun () => "2") _locals -00:17:39 verbose #12835 > inl child = path |> lock_directory |> async.start_child |> async.let' -00:17:39 verbose #12836 > trace Debug (fun () => "3") _locals -00:17:39 verbose #12837 > async.sleep 60 |> async.do -00:17:39 verbose #12838 > trace Debug (fun () => "4") _locals -00:17:39 verbose #12839 > inl retries = path |> delete_directory_async |> async.let' -00:17:39 verbose #12840 > trace Debug (fun () => "5") _locals -00:17:39 verbose #12841 > child |> async.do -00:17:39 verbose #12842 > trace Debug (fun () => "6") _locals -00:17:39 verbose #12843 > retries |> return -00:17:39 verbose #12844 > |> async.new_async_unit -00:17:39 verbose #12845 > |> async.run_with_timeout 3000 -00:17:39 verbose #12846 > |> fun x => x : _ i64 -00:17:39 verbose #12847 > |> function -00:17:39 verbose #12848 > | Some (retries : i64) => -00:17:39 verbose #12849 > retries -00:17:39 verbose #12850 > |> _assert_between -00:17:39 verbose #12851 > (if runtime.is_windows () then 50 else 0) -00:17:39 verbose #12852 > (if runtime.is_windows () then 150 else 0) -00:17:39 verbose #12853 > -00:17:39 verbose #12854 > true -00:17:39 verbose #12855 > | _ => false -00:17:39 verbose #12856 > |> _assert_eq true -00:17:39 verbose #12857 > -00:17:39 verbose #12858 > ╭─[ 3.47s - stdout ]───────────────────────────────────────────────────────────╮ -00:17:39 verbose #12859 > │ 00:00:00 debug #1 1 │ -00:17:39 verbose #12860 > │ 00:00:00 debug #2 2 │ -00:17:39 verbose #12861 > │ 00:00:00 debug #3 3 │ -00:17:39 verbose #12862 > │ 00:00:00 debug #4 _1 │ -00:17:39 verbose #12863 > │ 00:00:00 debug #5 _2 │ -00:17:39 verbose #12864 > │ 00:00:00 debug #6 4 │ -00:17:39 verbose #12865 > │ 00:00:00 debug #7 file_system.delete_directory_async / path: test / ex: │ -00:17:39 verbose #12866 > │ System.IO.IOException: The process cannot access the file 'test.txt' because │ -00:17:39 verbose #12867 > │ it is being used by another process. │ -00:17:39 verbose #12868 > │ 00:00:01 debug #8 file_system.delete_directory_async / path: test / ex: │ -00:17:39 verbose #12869 > │ System.IO.IOException: The process cannot access the file 'test.txt' because │ -00:17:39 verbose #12870 > │ it is being used by another process. │ -00:17:39 verbose #12871 > │ 00:00:02 debug #9 _3 │ -00:17:39 verbose #12872 > │ 00:00:02 debug #10 5 │ -00:17:39 verbose #12873 > │ 00:00:02 debug #11 6 │ -00:17:39 verbose #12874 > │ assert_between / actual: 117L / expected: struct (50L, 150L) │ -00:17:39 verbose #12875 > │ assert_eq / actual: true / expected: true │ -00:17:39 verbose #12876 > │ │ -00:17:39 verbose #12877 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12878 > -00:17:39 verbose #12879 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #12880 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #12881 > │ ## wait_for_file_access │ -00:17:39 verbose #12882 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #12883 > -00:17:39 verbose #12884 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12885 > inl wait_for_file_access access path = -00:17:39 verbose #12886 > run_target function -00:17:39 verbose #12887 > | Fsharp (Native) => fun () => -00:17:39 verbose #12888 > inl file_access, file_share = -00:17:39 verbose #12889 > access -00:17:39 verbose #12890 > |> optionm'.default_value (AccessReadWrite, ShareRead) -00:17:39 verbose #12891 > let rec loop (retry : i64) : _ i64 = -00:17:39 verbose #12892 > fun () => -00:17:39 verbose #12893 > try_unit -00:17:39 verbose #12894 > fun () => -00:17:39 verbose #12895 > file_stream -00:17:39 verbose #12896 > path -00:17:39 verbose #12897 > ModeOpen -00:17:39 verbose #12898 > file_access -00:17:39 verbose #12899 > file_share -00:17:39 verbose #12900 > |> use -00:17:39 verbose #12901 > |> ignore -00:17:39 verbose #12902 > retry |> return -00:17:39 verbose #12903 > fun ex => -00:17:39 verbose #12904 > if retry > 0 && retry % 100i64 = 0 then -00:17:39 verbose #12905 > inl ex = ex |> sm'.format_exception -00:17:39 verbose #12906 > trace Debug -00:17:39 verbose #12907 > fun () => "file_system.wait_for_file_access" -00:17:39 verbose #12908 > fun () => $'$"path: {!path |> -00:17:39 verbose #12909 > !get_file_name} / retry: {!retry} / ex: {!ex} / {!_locals ()}"' -00:17:39 verbose #12910 > async.sleep 10i32 |> async.do -00:17:39 verbose #12911 > loop (retry + 1) |> async.return_await -00:17:39 verbose #12912 > |> async.new_async -00:17:39 verbose #12913 > loop 0 -00:17:39 verbose #12914 > | _ => fun () => null () -00:17:39 verbose #12915 > -00:17:39 verbose #12916 > inl wait_for_file_access_read path = -00:17:39 verbose #12917 > path -00:17:39 verbose #12918 > |> wait_for_file_access (Some ( -00:17:39 verbose #12919 > AccessRead, -00:17:39 verbose #12920 > ShareRead -00:17:39 verbose #12921 > )) -00:17:39 verbose #12922 > -00:17:39 verbose #12923 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #12924 > //// test -00:17:39 verbose #12925 > -00:17:39 verbose #12926 > inl lock_file path = -00:17:39 verbose #12927 > fun () => -00:17:39 verbose #12928 > trace Debug (fun () => "_1") _locals -00:17:39 verbose #12929 > inl stream : file_stream' = -00:17:39 verbose #12930 > file_stream -00:17:39 verbose #12931 > path -00:17:39 verbose #12932 > ModeOpen -00:17:39 verbose #12933 > AccessReadWrite -00:17:39 verbose #12934 > ShareNone -00:17:39 verbose #12935 > |> use -00:17:39 verbose #12936 > trace Debug (fun () => "_2") _locals -00:17:39 verbose #12937 > async.sleep 2000 |> async.do -00:17:39 verbose #12938 > trace Debug (fun () => "_3") _locals -00:17:39 verbose #12939 > ($'!stream.Seek (0L, System.IO.SeekOrigin.Begin)' : i64) |> ignore -00:17:39 verbose #12940 > trace Debug (fun () => "_4") _locals -00:17:39 verbose #12941 > $'!stream.WriteByte' 49u8 -00:17:39 verbose #12942 > trace Debug (fun () => "_5") _locals -00:17:39 verbose #12943 > stream |> $'_.Flush()' -00:17:39 verbose #12944 > trace Debug (fun () => "_6") _locals -00:17:39 verbose #12945 > |> async.new_async -00:17:39 verbose #12946 > -00:17:39 verbose #12947 > types () -00:17:39 verbose #12948 > inl temp_dir, disposable = create_temp_directory () -00:17:39 verbose #12949 > disposable |> use |> ignore -00:17:39 verbose #12950 > inl path = temp_dir </> "test.txt" -00:17:39 verbose #12951 > -00:17:39 verbose #12952 > fun () => -00:17:39 verbose #12953 > trace Debug (fun () => "1") _locals -00:17:39 verbose #12954 > "0" |> write_all_text_async path |> async.do -00:17:39 verbose #12955 > trace Debug (fun () => "2") _locals -00:17:39 verbose #12956 > inl child = path |> lock_file |> async.start_child |> async.let' -00:17:39 verbose #12957 > trace Debug (fun () => "3") _locals -00:17:39 verbose #12958 > async.sleep 1 |> async.do -00:17:39 verbose #12959 > trace Debug (fun () => "4") _locals -00:17:39 verbose #12960 > inl retries = path |> wait_for_file_access None |> async.let' -00:17:39 verbose #12961 > trace Debug (fun () => "5") _locals -00:17:39 verbose #12962 > inl text = path |> read_all_text_async |> async.let' -00:17:39 verbose #12963 > trace Debug (fun () => "6") _locals -00:17:39 verbose #12964 > child |> async.do -00:17:39 verbose #12965 > trace Debug (fun () => "7") _locals -00:17:39 verbose #12966 > (retries, text) |> return -00:17:39 verbose #12967 > |> async.new_async_unit -00:17:39 verbose #12968 > |> async.run_with_timeout 3000 -00:17:39 verbose #12969 > |> function -00:17:39 verbose #12970 > | Some ((retries : i64), text) => -00:17:39 verbose #12971 > retries -00:17:39 verbose #12972 > |> _assert_between -00:17:39 verbose #12973 > (if runtime.is_windows () then 50 else 100) -00:17:39 verbose #12974 > (if runtime.is_windows () then 150 else 200) -00:17:39 verbose #12975 > -00:17:39 verbose #12976 > text |> _assert_eq (join "1") -00:17:39 verbose #12977 > -00:17:39 verbose #12978 > true -00:17:39 verbose #12979 > | _ => false -00:17:39 verbose #12980 > |> _assert_eq true -00:17:39 verbose #12981 > -00:17:39 verbose #12982 > ╭─[ 3.69s - stdout ]───────────────────────────────────────────────────────────╮ -00:17:39 verbose #12983 > │ 00:00:00 debug #1 1 │ -00:17:39 verbose #12984 > │ 00:00:00 debug #2 2 │ -00:17:39 verbose #12985 > │ 00:00:00 debug #3 3 │ -00:17:39 verbose #12986 > │ 00:00:00 debug #4 _1 │ -00:17:39 verbose #12987 > │ 00:00:00 debug #5 _2 │ -00:17:39 verbose #12988 > │ 00:00:00 debug #6 4 │ -00:17:39 verbose #12989 > │ 00:00:01 debug #7 file_system.wait_for_file_access / path: test.txt / │ -00:17:39 verbose #12990 > │ retry: 100 / ex: System.IO.IOException: The process cannot access the file │ -00:17:39 verbose #12991 > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1146-1828-2818-2004 │ -00:17:39 verbose #12992 > │ 00eaa480\test.txt' because it is being used by another process. │ -00:17:39 verbose #12993 > │ 00:00:02 debug #8 _3 │ -00:17:39 verbose #12994 > │ 00:00:02 debug #9 _4 │ -00:17:39 verbose #12995 > │ 00:00:02 debug #10 _5 │ -00:17:39 verbose #12996 > │ 00:00:02 debug #11 _6 │ -00:17:39 verbose #12997 > │ 00:00:02 debug #12 5 │ -00:17:39 verbose #12998 > │ 00:00:02 debug #13 6 │ -00:17:39 verbose #12999 > │ 00:00:02 debug #14 7 │ -00:17:39 verbose #13000 > │ assert_between / actual: 121L / expected: struct (50L, 150L) │ -00:17:39 verbose #13001 > │ assert_eq / actual: "1" / expected: "1" │ -00:17:39 verbose #13002 > │ assert_eq / actual: true / expected: true │ -00:17:39 verbose #13003 > │ │ -00:17:39 verbose #13004 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13005 > -00:17:39 verbose #13006 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13007 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13008 > │ ## read_all_text_retry_async │ -00:17:39 verbose #13009 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13010 > -00:17:39 verbose #13011 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13012 > inl read_all_text_retry_async full_path : async.async (optionm'.option' string) -00:17:39 verbose #13013 > = -00:17:39 verbose #13014 > run_target function -00:17:39 verbose #13015 > | Fsharp (Native) => fun () => -00:17:39 verbose #13016 > let rec loop (retry : i64) = -00:17:39 verbose #13017 > fun () => -00:17:39 verbose #13018 > try_unit -00:17:39 verbose #13019 > fun () => -00:17:39 verbose #13020 > if retry > 0 -00:17:39 verbose #13021 > then -00:17:39 verbose #13022 > full_path -00:17:39 verbose #13023 > |> wait_for_file_access_read -00:17:39 verbose #13024 > |> async.run_with_timeout_async 1000 -00:17:39 verbose #13025 > |> async.ignore -00:17:39 verbose #13026 > |> async.do -00:17:39 verbose #13027 > full_path |> read_all_text_async |> async.map (Some -00:17:39 verbose #13028 > >> optionm'.box) |> async.return_await -00:17:39 verbose #13029 > fun ex => -00:17:39 verbose #13030 > fix_condition -00:17:39 verbose #13031 > fun () => retry <> 0 -00:17:39 verbose #13032 > fun () => -00:17:39 verbose #13033 > inl ex = ex |> sm'.format_exception -00:17:39 verbose #13034 > let _locals () = $'$"retry: {!retry} / ex: -00:17:39 verbose #13035 > {!ex} / {!_locals ()}"' -00:17:39 verbose #13036 > trace Debug (fun () => -00:17:39 verbose #13037 > $'"read_all_text_retry_async"' : string) _locals -00:17:39 verbose #13038 > (None : _ string) |> optionm'.box |> return -00:17:39 verbose #13039 > fun () => -00:17:39 verbose #13040 > loop (retry + 1) |> async.return_await -00:17:39 verbose #13041 > |> async.new_async -00:17:39 verbose #13042 > loop 0 -00:17:39 verbose #13043 > | _ => fun () => null () -00:17:39 verbose #13044 > -00:17:39 verbose #13045 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13046 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13047 > │ ## delete_file_async │ -00:17:39 verbose #13048 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13049 > -00:17:39 verbose #13050 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13051 > inl delete_file_async path : _ i64 = -00:17:39 verbose #13052 > run_target function -00:17:39 verbose #13053 > | Fsharp (Native) => fun () => -00:17:39 verbose #13054 > let rec loop (retry : i64) = -00:17:39 verbose #13055 > fun () => -00:17:39 verbose #13056 > try_unit -00:17:39 verbose #13057 > fun () => -00:17:39 verbose #13058 > path |> file_delete -00:17:39 verbose #13059 > return retry -00:17:39 verbose #13060 > fun ex => -00:17:39 verbose #13061 > if retry % 100 = 0 then -00:17:39 verbose #13062 > trace Warning -00:17:39 verbose #13063 > fun () => "delete_file_async" -00:17:39 verbose #13064 > fun () => -00:17:39 verbose #13065 > inl ex = ex |> sm'.format_exception -00:17:39 verbose #13066 > $'$"path: {!path |> !get_file_name} -00:17:39 verbose #13067 > ex: {!ex} / {!_locals ()}"' -00:17:39 verbose #13068 > async.sleep 10 |> async.do -00:17:39 verbose #13069 > loop (retry + 1) |> async.return_await -00:17:39 verbose #13070 > |> async.new_async -00:17:39 verbose #13071 > loop 0 -00:17:39 verbose #13072 > | _ => fun () => null () -00:17:39 verbose #13073 > -00:17:39 verbose #13074 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13075 > //// test -00:17:39 verbose #13076 > -00:17:39 verbose #13077 > inl lock_file path = -00:17:39 verbose #13078 > fun () => -00:17:39 verbose #13079 > trace Debug (fun () => "_1") _locals -00:17:39 verbose #13080 > file_stream -00:17:39 verbose #13081 > path -00:17:39 verbose #13082 > ModeOpen -00:17:39 verbose #13083 > AccessReadWrite -00:17:39 verbose #13084 > ShareNone -00:17:39 verbose #13085 > |> use -00:17:39 verbose #13086 > |> ignore -00:17:39 verbose #13087 > trace Debug (fun () => "_2") _locals -00:17:39 verbose #13088 > async.sleep 2000 |> async.do -00:17:39 verbose #13089 > trace Debug (fun () => "_3") _locals -00:17:39 verbose #13090 > |> async.new_async -00:17:39 verbose #13091 > -00:17:39 verbose #13092 > types () -00:17:39 verbose #13093 > inl temp_dir, disposable = create_temp_directory () -00:17:39 verbose #13094 > disposable |> use |> ignore -00:17:39 verbose #13095 > inl path = temp_dir </> "test.txt" -00:17:39 verbose #13096 > -00:17:39 verbose #13097 > fun () => -00:17:39 verbose #13098 > trace Debug (fun () => "1") _locals -00:17:39 verbose #13099 > "0" |> write_all_text_async path |> async.do -00:17:39 verbose #13100 > trace Debug (fun () => "2") _locals -00:17:39 verbose #13101 > inl child = lock_file path |> async.start_child |> async.let' -00:17:39 verbose #13102 > trace Debug (fun () => "3") _locals -00:17:39 verbose #13103 > async.sleep 1 |> async.do -00:17:39 verbose #13104 > trace Debug (fun () => "4") _locals -00:17:39 verbose #13105 > inl retries = delete_file_async path |> async.let' -00:17:39 verbose #13106 > trace Debug (fun () => "5") _locals -00:17:39 verbose #13107 > child |> async.do -00:17:39 verbose #13108 > trace Debug (fun () => "6") _locals -00:17:39 verbose #13109 > return retries -00:17:39 verbose #13110 > |> async.new_async_unit -00:17:39 verbose #13111 > |> async.run_with_timeout 3000 -00:17:39 verbose #13112 > |> function -00:17:39 verbose #13113 > | Some (retries : i64) => -00:17:39 verbose #13114 > retries -00:17:39 verbose #13115 > |> _assert_between -00:17:39 verbose #13116 > (if runtime.is_windows () then 50 else 0) -00:17:39 verbose #13117 > (if runtime.is_windows () then 150 else 0) -00:17:39 verbose #13118 > -00:17:39 verbose #13119 > true -00:17:39 verbose #13120 > | _ => false -00:17:39 verbose #13121 > |> _assert_eq true -00:17:39 verbose #13122 > -00:17:39 verbose #13123 > ╭─[ 3.46s - stdout ]───────────────────────────────────────────────────────────╮ -00:17:39 verbose #13124 > │ 00:00:00 debug #1 1 │ -00:17:39 verbose #13125 > │ 00:00:00 debug #2 2 │ -00:17:39 verbose #13126 > │ 00:00:00 debug #3 3 │ -00:17:39 verbose #13127 > │ 00:00:00 debug #4 _1 │ -00:17:39 verbose #13128 > │ 00:00:00 debug #5 _2 │ -00:17:39 verbose #13129 > │ 00:00:00 debug #6 4 │ -00:17:39 verbose #13130 > │ 00:00:00 warning #7 delete_file_async / path: test.txt / ex: │ -00:17:39 verbose #13131 > │ System.IO.IOException: The process cannot access the file │ -00:17:39 verbose #13132 > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1146-2317-1766-1004 │ -00:17:39 verbose #13133 > │ 00364a86\test.txt' because it is being used by another process. │ -00:17:39 verbose #13134 > │ 00:00:01 warning #8 delete_file_async / path: test.txt / ex: │ -00:17:39 verbose #13135 > │ System.IO.IOException: The process cannot access the file │ -00:17:39 verbose #13136 > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1146-2317-1766-1004 │ -00:17:39 verbose #13137 > │ 00364a86\test.txt' because it is being used by another process. │ -00:17:39 verbose #13138 > │ 00:00:02 debug #9 _3 │ -00:17:39 verbose #13139 > │ 00:00:02 debug #10 5 │ -00:17:39 verbose #13140 > │ 00:00:02 debug #11 6 │ -00:17:39 verbose #13141 > │ assert_between / actual: 121L / expected: struct (50L, 150L) │ -00:17:39 verbose #13142 > │ assert_eq / actual: true / expected: true │ -00:17:39 verbose #13143 > │ │ -00:17:39 verbose #13144 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13145 > -00:17:39 verbose #13146 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13147 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13148 > │ ## move_file_async │ -00:17:39 verbose #13149 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13150 > -00:17:39 verbose #13151 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13152 > inl move_file_async new_path old_path : _ i64 = -00:17:39 verbose #13153 > run_target function -00:17:39 verbose #13154 > | Fsharp (Native) => fun () => -00:17:39 verbose #13155 > let rec loop (retry : i64) = -00:17:39 verbose #13156 > fun () => -00:17:39 verbose #13157 > try_unit -00:17:39 verbose #13158 > fun () => -00:17:39 verbose #13159 > old_path |> file_move new_path -00:17:39 verbose #13160 > return retry -00:17:39 verbose #13161 > fun ex => -00:17:39 verbose #13162 > if retry % 100 = 0 then -00:17:39 verbose #13163 > inl _locals () = -00:17:39 verbose #13164 > inl ex = ex |> sm'.format_exception -00:17:39 verbose #13165 > $'$"old_path: {!old_path |> !get_file_name} -00:17:39 verbose #13166 > / new_path: {!new_path |> !get_file_name} / ex: {!ex} / {!_locals ()}"' -00:17:39 verbose #13167 > trace Warning (fun () => "move_file_async") -00:17:39 verbose #13168 > _locals -00:17:39 verbose #13169 > async.sleep 10 |> async.do -00:17:39 verbose #13170 > loop (retry + 1) |> async.return_await -00:17:39 verbose #13171 > |> async.new_async_unit -00:17:39 verbose #13172 > loop 0 -00:17:39 verbose #13173 > | _ => fun () => null () -00:17:39 verbose #13174 > -00:17:39 verbose #13175 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13176 > //// test -00:17:39 verbose #13177 > -00:17:39 verbose #13178 > inl lock_file path = -00:17:39 verbose #13179 > fun () => -00:17:39 verbose #13180 > trace Debug (fun () => "_1") _locals -00:17:39 verbose #13181 > file_stream -00:17:39 verbose #13182 > path -00:17:39 verbose #13183 > ModeOpen -00:17:39 verbose #13184 > AccessReadWrite -00:17:39 verbose #13185 > ShareNone -00:17:39 verbose #13186 > |> use -00:17:39 verbose #13187 > |> ignore -00:17:39 verbose #13188 > trace Debug (fun () => "_2") _locals -00:17:39 verbose #13189 > async.sleep 2000 |> async.do -00:17:39 verbose #13190 > trace Debug (fun () => "_3") _locals -00:17:39 verbose #13191 > |> async.new_async -00:17:39 verbose #13192 > -00:17:39 verbose #13193 > types () -00:17:39 verbose #13194 > inl temp_dir, disposable = create_temp_directory () -00:17:39 verbose #13195 > disposable |> use |> ignore -00:17:39 verbose #13196 > let path = temp_dir </> "test.txt" -00:17:39 verbose #13197 > let new_path = temp_dir </> "test2.txt" -00:17:39 verbose #13198 > -00:17:39 verbose #13199 > fun () => -00:17:39 verbose #13200 > trace Debug (fun () => "1") _locals -00:17:39 verbose #13201 > "0" |> write_all_text_async path |> async.do -00:17:39 verbose #13202 > trace Debug (fun () => "2") _locals -00:17:39 verbose #13203 > inl child = lock_file path |> async.start_child |> async.let' -00:17:39 verbose #13204 > trace Debug (fun () => "3") _locals -00:17:39 verbose #13205 > async.sleep 1 |> async.do -00:17:39 verbose #13206 > trace Debug (fun () => "4") _locals -00:17:39 verbose #13207 > inl retries1 = path |> move_file_async new_path |> async.let' -00:17:39 verbose #13208 > trace Debug (fun () => "5") _locals -00:17:39 verbose #13209 > inl retries2 = new_path |> wait_for_file_access None |> async.let' -00:17:39 verbose #13210 > trace Debug (fun () => "6") _locals -00:17:39 verbose #13211 > inl text = new_path |> read_all_text_async |> async.let' -00:17:39 verbose #13212 > trace Debug (fun () => "7") _locals -00:17:39 verbose #13213 > child |> async.do -00:17:39 verbose #13214 > trace Debug (fun () => "8") _locals -00:17:39 verbose #13215 > (retries1, retries2, text) |> return -00:17:39 verbose #13216 > |> async.new_async_unit -00:17:39 verbose #13217 > |> async.run_with_timeout 3000 -00:17:39 verbose #13218 > |> function -00:17:39 verbose #13219 > | Some (retries1, retries2, text) => -00:17:39 verbose #13220 > retries1 -00:17:39 verbose #13221 > |> _assert_between -00:17:39 verbose #13222 > (if runtime.is_windows () then 50i64 else 0) -00:17:39 verbose #13223 > (if runtime.is_windows () then 150 else 0) -00:17:39 verbose #13224 > -00:17:39 verbose #13225 > retries2 -00:17:39 verbose #13226 > |> _assert_between -00:17:39 verbose #13227 > (if runtime.is_windows () then 0i64 else 100) -00:17:39 verbose #13228 > (if runtime.is_windows () then 0 else 200) -00:17:39 verbose #13229 > -00:17:39 verbose #13230 > text |> _assert_eq (join "0") -00:17:39 verbose #13231 > -00:17:39 verbose #13232 > true -00:17:39 verbose #13233 > | _ => false -00:17:39 verbose #13234 > |> _assert_eq true -00:17:39 verbose #13235 > -00:17:39 verbose #13236 > ╭─[ 3.70s - stdout ]───────────────────────────────────────────────────────────╮ -00:17:39 verbose #13237 > │ 00:00:00 debug #1 1 │ -00:17:39 verbose #13238 > │ 00:00:00 debug #2 2 │ -00:17:39 verbose #13239 > │ 00:00:00 debug #3 3 │ -00:17:39 verbose #13240 > │ 00:00:00 debug #4 _1 │ -00:17:39 verbose #13241 > │ 00:00:00 debug #5 _2 │ -00:17:39 verbose #13242 > │ 00:00:00 debug #6 4 │ -00:17:39 verbose #13243 > │ 00:00:00 warning #7 move_file_async / old_path: test.txt / new_path: │ -00:17:39 verbose #13244 > │ test2.txt / ex: System.IO.IOException: The process cannot access the file │ -00:17:39 verbose #13245 > │ because it is being used by another process. │ -00:17:39 verbose #13246 > │ 00:00:01 warning #8 move_file_async / old_path: test.txt / new_path: │ -00:17:39 verbose #13247 > │ test2.txt / ex: System.IO.IOException: The process cannot access the file │ -00:17:39 verbose #13248 > │ because it is being used by another process. │ -00:17:39 verbose #13249 > │ 00:00:02 debug #9 _3 │ -00:17:39 verbose #13250 > │ 00:00:02 debug #10 5 │ -00:17:39 verbose #13251 > │ 00:00:02 debug #11 6 │ -00:17:39 verbose #13252 > │ 00:00:02 debug #12 7 │ -00:17:39 verbose #13253 > │ 00:00:02 debug #13 8 │ -00:17:39 verbose #13254 > │ assert_between / actual: 121L / expected: struct (50L, 150L) │ -00:17:39 verbose #13255 > │ assert_between / actual: 0L / expected: struct (0L, 0L) │ -00:17:39 verbose #13256 > │ assert_eq / actual: "0" / expected: "0" │ -00:17:39 verbose #13257 > │ assert_eq / actual: true / expected: true │ -00:17:39 verbose #13258 > │ │ -00:17:39 verbose #13259 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13260 > -00:17:39 verbose #13261 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13262 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13263 > │ ## find_parent │ -00:17:39 verbose #13264 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13265 > -00:17:39 verbose #13266 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13267 > inl find_parent name is_file root_dir = -00:17:39 verbose #13268 > let rec loop dir = -00:17:39 verbose #13269 > if dir </> name |> (if is_file then file_exists else directory_exists) -00:17:39 verbose #13270 > then dir -00:17:39 verbose #13271 > else -00:17:39 verbose #13272 > inl result = dir |> (join directory_get_parent) -00:17:39 verbose #13273 > match result |> optionm'.unbox with -00:17:39 verbose #13274 > | Some parent => parent |> loop -00:17:39 verbose #13275 > | None => failwith $'$"""No parent for {if !is_file then "file" else -00:17:39 verbose #13276 > "dir"} \'{!name}\' at \'{!root_dir}\' (until \'{!dir}\')"""' -00:17:39 verbose #13277 > loop root_dir -00:17:39 verbose #13278 > -00:17:39 verbose #13279 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13280 > //// test -00:17:39 verbose #13281 > -00:17:39 verbose #13282 > a ;[[ ".paket", false; "paket.dependencies", true ]] -00:17:39 verbose #13283 > |> am.map fun (file, is_file) => -00:17:39 verbose #13284 > get_source_directory () -00:17:39 verbose #13285 > |> find_parent file is_file -00:17:39 verbose #13286 > |> directory_info -00:17:39 verbose #13287 > |> directory_info_name -00:17:39 verbose #13288 > |> am'.distinct -00:17:39 verbose #13289 > |> _assert_eq (a ;[[ "polyglot" ]] : _ i32 _) -00:17:39 verbose #13290 > -00:17:39 verbose #13291 > ╭─[ 834.76ms - stdout ]────────────────────────────────────────────────────────╮ -00:17:39 verbose #13292 > │ assert_eq / actual: [|"polyglot"|] / expected: [|"polyglot"|] │ -00:17:39 verbose #13293 > │ │ -00:17:39 verbose #13294 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13295 > -00:17:39 verbose #13296 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13297 > //// test -00:17:39 verbose #13298 > ///! rust -00:17:39 verbose #13299 > -00:17:39 verbose #13300 > types () -00:17:39 verbose #13301 > a ;[[ ".paket", false; "paket.dependencies", true ]] -00:17:39 verbose #13302 > |> am.map fun (file, is_file) => -00:17:39 verbose #13303 > fun () => -00:17:39 verbose #13304 > join -00:17:39 verbose #13305 > get_source_directory () -00:17:39 verbose #13306 > |> find_parent file is_file -00:17:39 verbose #13307 > |> sm'.to_std_string -00:17:39 verbose #13308 > |> new_path_buf -00:17:39 verbose #13309 > |> path_buf_file_name -00:17:39 verbose #13310 > |> optionm'.try' -00:17:39 verbose #13311 > |> sm'.from_os_str_ref -00:17:39 verbose #13312 > |> Some -00:17:39 verbose #13313 > |> optionm'.box -00:17:39 verbose #13314 > |> fun x => x () |> optionm'.unbox -00:17:39 verbose #13315 > |> optionm'.default_value "" -00:17:39 verbose #13316 > |> am'.distinct -00:17:39 verbose #13317 > |> fun result => -00:17:39 verbose #13318 > result |> am'.length |> _assert_eq 1i32 -00:17:39 verbose #13319 > index result 0i32 |> _assert_eq "polyglot" -00:17:39 verbose #13320 > -00:17:39 verbose #13321 > ╭─[ 18.90s - return value ]────────────────────────────────────────────────────╮ -00:17:39 verbose #13322 > │ assert_eq / actual: 1 / expected: 1 │ -00:17:39 verbose #13323 > │ assert_eq / actual: "polyglot" / expected: "polyglot" │ -00:17:39 verbose #13324 > │ │ -00:17:39 verbose #13325 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13326 > -00:17:39 verbose #13327 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13328 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13329 > │ ## get_workspace_root │ -00:17:39 verbose #13330 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13331 > -00:17:39 verbose #13332 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13333 > inl get_workspace_root () = -00:17:39 verbose #13334 > get_source_directory () -00:17:39 verbose #13335 > |> find_parent ("polyglot" </> ".paket") false -00:17:39 verbose #13336 > |> fun root => root </> "polyglot" -00:17:39 verbose #13337 > -00:17:39 verbose #13338 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13339 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13340 > │ ## standardize_path │ -00:17:39 verbose #13341 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13342 > -00:17:39 verbose #13343 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13344 > let standardize_path path = -00:17:39 verbose #13345 > path |> get_full_path |> normalize_path -00:17:39 verbose #13346 > -00:17:39 verbose #13347 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13348 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13349 > │ ## absolute_path │ -00:17:39 verbose #13350 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13351 > -00:17:39 verbose #13352 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13353 > let absolute_path path = -00:17:39 verbose #13354 > inl current_dir = get_current_directory () -00:17:39 verbose #13355 > current_dir </> path |> standardize_path -00:17:39 verbose #13356 > -00:17:39 verbose #13357 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13358 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13359 > │ ## new_file_uri │ -00:17:39 verbose #13360 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13361 > -00:17:39 verbose #13362 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13363 > inl new_file_uri (path : string) : string = -00:17:39 verbose #13364 > inl path = path |> sm'.trim_start ;[[ '/' ]] -00:17:39 verbose #13365 > $'$"file:///{!path}"' -00:17:39 verbose #13366 > -00:17:39 verbose #13367 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13368 > //// test -00:17:39 verbose #13369 > -00:17:39 verbose #13370 > @"\\?\C:\test" -00:17:39 verbose #13371 > |> normalize_path -00:17:39 verbose #13372 > |> new_file_uri -00:17:39 verbose #13373 > |> _assert_eq "file:///c:/test" -00:17:39 verbose #13374 > -00:17:39 verbose #13375 > ╭─[ 751.01ms - stdout ]────────────────────────────────────────────────────────╮ -00:17:39 verbose #13376 > │ assert_eq / actual: "file:///c:/test" / expected: "file:///c:/test" │ -00:17:39 verbose #13377 > │ │ -00:17:39 verbose #13378 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13379 > -00:17:39 verbose #13380 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13381 > //// test -00:17:39 verbose #13382 > ///! rust -d regex -00:17:39 verbose #13383 > -00:17:39 verbose #13384 > types () -00:17:39 verbose #13385 > @"\\?\C:\test" -00:17:39 verbose #13386 > |> normalize_path -00:17:39 verbose #13387 > |> new_file_uri -00:17:39 verbose #13388 > |> _assert_eq "file:///c:/test" -00:17:39 verbose #13389 > -00:17:39 verbose #13390 > ╭─[ 18.45s - return value ]────────────────────────────────────────────────────╮ -00:17:39 verbose #13391 > │ assert_eq / actual: "file:///c:/test" / expected: "file:///c:/test" │ -00:17:39 verbose #13392 > │ │ -00:17:39 verbose #13393 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13394 > -00:17:39 verbose #13395 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13396 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13397 > │ ## trace_file │ -00:17:39 verbose #13398 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13399 > -00:17:39 verbose #13400 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13401 > let rec trace_file text = -00:17:39 verbose #13402 > run_target function -00:17:39 verbose #13403 > | Fsharp (Native) => fun () => -00:17:39 verbose #13404 > try_unit -00:17:39 verbose #13405 > fun () => -00:17:39 verbose #13406 > inl assembly_name = env.get_entry_assembly_name () -00:17:39 verbose #13407 > inl guid = date_time.now () |> date_time.new_guid_from_date_time -00:17:39 verbose #13408 > inl file_name = $'$"{!assembly_name}_{!guid}.txt"' -00:17:39 verbose #13409 > -00:17:39 verbose #13410 > inl workspace_root = get_workspace_root () -00:17:39 verbose #13411 > inl trace_dir = workspace_root </> "target/polyglot/trace" -00:17:39 verbose #13412 > trace_dir |> create_directory |> ignore -00:17:39 verbose #13413 > inl path = trace_dir </> file_name -00:17:39 verbose #13414 > text |> write_all_text_async path |> async.run_synchronously -00:17:39 verbose #13415 > fun ex => -00:17:39 verbose #13416 > trace_file $'$"file_system.trace_file / ex: %A{!ex}"' -00:17:39 verbose #13417 > | _ => fun () => () -00:17:39 verbose #13418 > -00:17:39 verbose #13419 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13420 > //// test -00:17:39 verbose #13421 > -00:17:39 verbose #13422 > inl get_count dir : i64 = -00:17:39 verbose #13423 > inl files = dir |> file_system.directory_get_files -00:17:39 verbose #13424 > a files |> am'.length -00:17:39 verbose #13425 > -00:17:39 verbose #13426 > types () -00:17:39 verbose #13427 > inl trace_dir = file_system.get_workspace_root () </> "target/polyglot/trace" -00:17:39 verbose #13428 > trace_dir |> file_system.create_directory |> ignore -00:17:39 verbose #13429 > -00:17:39 verbose #13430 > inl count = get_count trace_dir -00:17:39 verbose #13431 > -00:17:39 verbose #13432 > trace_file "test" -00:17:39 verbose #13433 > -00:17:39 verbose #13434 > get_count trace_dir -00:17:39 verbose #13435 > |> _assert_eq (count + 1) -00:17:39 verbose #13436 > -00:17:39 verbose #13437 > ╭─[ 1.22s - stdout ]───────────────────────────────────────────────────────────╮ -00:17:39 verbose #13438 > │ assert_eq / actual: 63L / expected: 63L │ -00:17:39 verbose #13439 > │ │ -00:17:39 verbose #13440 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13441 > -00:17:39 verbose #13442 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13443 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13444 > │ ## init_trace_file │ -00:17:39 verbose #13445 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13446 > -00:17:39 verbose #13447 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13448 > inl init_trace_file enabled = -00:17:39 verbose #13449 > inl state_trace_file = get_trace_state_or_init None .trace_file -00:17:39 verbose #13450 > state_trace_file <- if enabled then trace_file else ignore -00:17:39 verbose #13451 > -00:17:39 verbose #13452 > ── markdown ──────────────────────────────────────────────────────────────────── -00:17:39 verbose #13453 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:17:39 verbose #13454 > │ ## main │ -00:17:39 verbose #13455 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:17:39 verbose #13456 > -00:17:39 verbose #13457 > ── spiral ────────────────────────────────────────────────────────────────────── -00:17:39 verbose #13458 > inl main () = -00:17:39 verbose #13459 > types () -00:17:39 verbose #13460 > init_trace_state None -00:17:39 verbose #13461 > $"let delete_directory_async x = !delete_directory_async x" : () -00:17:39 verbose #13462 > $"let wait_for_file_access x = !wait_for_file_access x" : () -00:17:39 verbose #13463 > $"let wait_for_file_access_read x = !wait_for_file_access_read x" : () -00:17:39 verbose #13464 > $"let read_all_text_async x = !read_all_text_async x" : () -00:17:39 verbose #13465 > $"let file_exists_content x = !file_exists_content x" : () -00:17:39 verbose #13466 > $"let write_all_text_async x = !write_all_text_async x" : () -00:17:39 verbose #13467 > $"let write_all_text_exists x = !write_all_text_exists x" : () -00:17:39 verbose #13468 > $"let delete_file_async x = !delete_file_async x" : () -00:17:39 verbose #13469 > $"let move_file_async x = !move_file_async x" : () -00:17:39 verbose #13470 > $"let read_all_text_retry_async x = !read_all_text_retry_async x" : () -00:17:39 verbose #13471 > $"let create_temp_directory_name () = !create_temp_directory_name ()" : () -00:17:39 verbose #13472 > $"let create_temp_directory () = !create_temp_directory ()" : () -00:17:39 verbose #13473 > $"let get_source_directory () = !get_source_directory ()" : () -00:17:39 verbose #13474 > $"let find_parent x = !find_parent x" : () -00:17:39 verbose #13475 > $"let normalize_path x = !normalize_path x" : () -00:17:39 verbose #13476 > $"let new_file_uri x = !new_file_uri x" : () -00:17:39 verbose #13477 > $"let get_workspace_root () = !get_workspace_root ()" : () -00:17:39 verbose #13478 > $"let init_trace_file x = !init_trace_file x" : () -00:17:39 verbose #13479 > inl combine x = (</>) x -00:17:39 verbose #13480 > $"let (</>) x = !combine x" : () -00:17:39 verbose #13481 > 00:02:53 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 85761 -00:17:39 verbose #13482 > 00:02:53 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:17:44 verbose #13483 > 00:02:58 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb to html\e[0m -00:17:44 verbose #13484 > 00:02:58 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:17:44 verbose #13485 > 00:02:58 verbose #7 \e[4;7m validate(nb)\e[0m -00:17:44 verbose #13486 > 00:02:58 verbose #8 \e[4;7m[NbConvertApp] Writing 539163 bytes to c:\home\git\polyglot\lib\spiral\file_system.dib.html\e[0m -00:17:44 verbose #13487 > 00:02:58 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 613 -00:17:44 verbose #13488 > 00:02:58 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 613 -00:17:44 verbose #13489 > 00:02:58 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/file_system.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/file_system.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:17:45 verbose #13490 > 00:02:59 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:17:45 verbose #13491 > 00:02:59 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:17:45 verbose #13492 > 00:03:00 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 86433 -00:17:45 debug #13493 execute_with_options_async / exit_code: 0 / output.Length: 88787 -00:17:45 debug #23 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path file_system.dib --retries 3 -00:17:45 debug #13494 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path physics.dib --retries 3", +00:07:12 verbose #11865 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "physics.dib", "--retries", "3"]) +00:07:12 verbose #11866 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/physics.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/physics.dib" --output-path "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:07:13 verbose #11867 > > +00:07:13 verbose #11868 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:13 verbose #11869 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:13 verbose #11870 > > │ # physics │ +00:07:13 verbose #11871 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:14 verbose #11872 > > +00:07:14 verbose #11873 > > ── fsharp ────────────────────────────────────────────────────────────────────── +00:07:14 verbose #11874 > > #!import ../../lib/fsharp/Plotting.dib +00:07:14 verbose #11875 > > +00:07:14 verbose #11876 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:14 verbose #11877 > > #r +00:07:14 verbose #11878 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A +00:07:14 verbose #11879 > > spNetCore.Html.Abstractions.dll" +00:07:14 verbose #11880 > > #r +00:07:14 verbose #11881 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:14 verbose #11882 > > otNet.Interactive.dll" +00:07:14 verbose #11883 > > #r +00:07:14 verbose #11884 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:14 verbose #11885 > > otNet.Interactive.FSharp.dll" +00:07:14 verbose #11886 > > #r +00:07:14 verbose #11887 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:14 verbose #11888 > > otNet.Interactive.Formatting.dll" +00:07:14 verbose #11889 > > open System +00:07:14 verbose #11890 > > open System.IO +00:07:14 verbose #11891 > > open System.Text +00:07:14 verbose #11892 > > open Microsoft.DotNet.Interactive.Formatting +00:07:17 verbose #11893 > > +00:07:17 verbose #11894 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:17 verbose #11895 > > #r +00:07:17 verbose #11896 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:17 verbose #11897 > > otNet.Interactive.FSharp.dll" +00:07:17 verbose #11898 > > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers +00:07:17 verbose #11899 > > #r +00:07:17 verbose #11900 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:17 verbose #11901 > > otNet.Interactive.dll" +00:07:17 verbose #11902 > > open type Microsoft.DotNet.Interactive.Kernel +00:07:17 verbose #11903 > > +00:07:17 verbose #11904 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:17 verbose #11905 > > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) +00:07:18 verbose #11906 > > +00:07:18 verbose #11907 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:18 verbose #11908 > > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: +00:07:18 verbose #11909 > > TextWriter)->fprintfn writer "%120A" x) +00:07:18 verbose #11910 > > +00:07:18 verbose #11911 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:18 verbose #11912 > > #r +00:07:18 verbose #11913 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan +00:07:18 verbose #11914 > > dard2.1/FSharp.Control.AsyncSeq.dll" +00:07:18 verbose #11915 > > #r +00:07:18 verbose #11916 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. +00:07:18 verbose #11917 > > 0/System.Reactive.dll" +00:07:18 verbose #11918 > > #r +00:07:18 verbose #11919 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib +00:07:18 verbose #11920 > > netstandard2.0/System.Reactive.Linq.dll" +00:07:18 verbose #11921 > > #r +00:07:18 verbose #11922 > > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" +00:07:18 verbose #11923 > > #r +00:07:18 verbose #11924 > > @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha +00:07:18 verbose #11925 > > rp.Json.dll" +00:07:18 verbose #11926 > > +00:07:18 verbose #11927 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:18 verbose #11928 > > //// test +00:07:18 verbose #11929 > > +00:07:18 verbose #11930 > > Formatter.ListExpansionLimit <- 100 +00:07:18 verbose #11931 > > +00:07:18 verbose #11932 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:18 verbose #11933 > > #if FABLE_COMPILER +00:07:18 verbose #11934 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] +00:07:18 verbose #11935 > > #endif +00:07:18 verbose #11936 > > type std_env_VarError = class end +00:07:18 verbose #11937 > > #if FABLE_COMPILER +00:07:18 verbose #11938 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:07:18 verbose #11939 > > #endif +00:07:18 verbose #11940 > > type core_any_Any = class end +00:07:18 verbose #11941 > > #if FABLE_COMPILER +00:07:18 verbose #11942 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:07:18 verbose #11943 > > #endif +00:07:18 verbose #11944 > > type core_ops_Try<'T> = class end +00:07:18 verbose #11945 > > #if FABLE_COMPILER +00:07:18 verbose #11946 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:07:18 verbose #11947 > > #endif +00:07:18 verbose #11948 > > type Func0<'T> = class end +00:07:18 verbose #11949 > > #if FABLE_COMPILER +00:07:18 verbose #11950 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:07:18 verbose #11951 > > #endif +00:07:18 verbose #11952 > > type Func0<'T, 'U> = class end +00:07:18 verbose #11953 > > #if FABLE_COMPILER +00:07:18 verbose #11954 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:07:18 verbose #11955 > > #endif +00:07:18 verbose #11956 > > type Box<'T> = class end +00:07:18 verbose #11957 > > #if FABLE_COMPILER +00:07:18 verbose #11958 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] +00:07:18 verbose #11959 > > #endif +00:07:18 verbose #11960 > > type Dyn<'T> = class end +00:07:18 verbose #11961 > > #if FABLE_COMPILER +00:07:18 verbose #11962 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] +00:07:18 verbose #11963 > > #endif +00:07:18 verbose #11964 > > type Send<'T> = class end +00:07:18 verbose #11965 > > #if FABLE_COMPILER +00:07:18 verbose #11966 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] +00:07:18 verbose #11967 > > #endif +00:07:18 verbose #11968 > > type Fn<'T> = class end +00:07:18 verbose #11969 > > #if FABLE_COMPILER +00:07:18 verbose #11970 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] +00:07:18 verbose #11971 > > #endif +00:07:18 verbose #11972 > > type FnUnit = class end +00:07:18 verbose #11973 > > #if FABLE_COMPILER +00:07:18 verbose #11974 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] +00:07:18 verbose #11975 > > #endif +00:07:18 verbose #11976 > > type FnOnce<'T> = class end +00:07:18 verbose #11977 > > #if FABLE_COMPILER +00:07:18 verbose #11978 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] +00:07:18 verbose #11979 > > #endif +00:07:18 verbose #11980 > > type ActionFn<'T> = class end +00:07:18 verbose #11981 > > #if FABLE_COMPILER +00:07:18 verbose #11982 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] +00:07:18 verbose #11983 > > #endif +00:07:18 verbose #11984 > > type ActionFn2<'T, 'U> = class end +00:07:18 verbose #11985 > > #if FABLE_COMPILER +00:07:18 verbose #11986 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] +00:07:18 verbose #11987 > > #endif +00:07:18 verbose #11988 > > type Impl<'T> = class end +00:07:18 verbose #11989 > > #if FABLE_COMPILER +00:07:18 verbose #11990 > > [[<Fable... +00:07:19 verbose #11991 > > +00:07:19 verbose #11992 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:19 verbose #11993 > > #if FABLE_COMPILER +00:07:19 verbose #11994 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:07:19 verbose #11995 > > #endif +00:07:19 verbose #11996 > > type core_any_Any = class end +00:07:19 verbose #11997 > > #if FABLE_COMPILER +00:07:19 verbose #11998 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:07:19 verbose #11999 > > #endif +00:07:19 verbose #12000 > > type core_ops_Try<'T> = class end +00:07:19 verbose #12001 > > #if FABLE_COMPILER +00:07:19 verbose #12002 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:07:19 verbose #12003 > > #endif +00:07:19 verbose #12004 > > type Func0<'T> = class end +00:07:19 verbose #12005 > > #if FABLE_COMPILER +00:07:19 verbose #12006 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:07:19 verbose #12007 > > #endif +00:07:19 verbose #12008 > > type Func0<'T, 'U> = class end +00:07:19 verbose #12009 > > #if FABLE_COMPILER +00:07:19 verbose #12010 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:07:19 verbose #12011 > > #endif +00:07:19 verbose #12012 > > type Box<'T> = class end +00:07:19 verbose #12013 > > #if FABLE_COMPILER +00:07:19 verbose #12014 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] +00:07:19 verbose #12015 > > #endif +00:07:19 verbose #12016 > > type Dyn<'T> = class end +00:07:19 verbose #12017 > > #if FABLE_COMPILER +00:07:19 verbose #12018 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] +00:07:19 verbose #12019 > > #endif +00:07:19 verbose #12020 > > type Send<'T> = class end +00:07:19 verbose #12021 > > #if FABLE_COMPILER +00:07:19 verbose #12022 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] +00:07:19 verbose #12023 > > #endif +00:07:19 verbose #12024 > > type Fn<'T> = class end +00:07:19 verbose #12025 > > #if FABLE_COMPILER +00:07:19 verbose #12026 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] +00:07:19 verbose #12027 > > #endif +00:07:19 verbose #12028 > > type FnUnit = class end +00:07:19 verbose #12029 > > #if FABLE_COMPILER +00:07:19 verbose #12030 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] +00:07:19 verbose #12031 > > #endif +00:07:19 verbose #12032 > > type FnOnce<'T> = class end +00:07:19 verbose #12033 > > #if FABLE_COMPILER +00:07:19 verbose #12034 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] +00:07:19 verbose #12035 > > #endif +00:07:19 verbose #12036 > > type ActionFn<'T> = class end +00:07:19 verbose #12037 > > #if FABLE_COMPILER +00:07:19 verbose #12038 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] +00:07:19 verbose #12039 > > #endif +00:07:19 verbose #12040 > > type ActionFn2<'T, 'U> = class end +00:07:19 verbose #12041 > > #if FABLE_COMPILER +00:07:19 verbose #12042 > > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] +00:07:19 verbose #12043 > > #endif +00:07:19 verbose #12044 > > type Impl<'T> = class end +00:07:19 verbose #12045 > > #if FABLE_COMPILER +00:07:19 verbose #12046 > > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] +00:07:19 verbose #12047 > > #endif +00:07:19 verbose #12048 > > type Mut<'T> = class end +00:07:19 verbose #12049 > > #if FABLE_COMPILER +00:07:19 verbose #12050 > > [[<Fable.Core.Erase; Fable.Co... +00:07:20 verbose #12051 > > +00:07:20 verbose #12052 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:20 verbose #12053 > > #if FABLE_COMPILER +00:07:20 verbose #12054 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>]] +00:07:20 verbose #12055 > > #endif +00:07:20 verbose #12056 > > type async_std_task_JoinHandle<'T> = class end +00:07:20 verbose #12057 > > #if FABLE_COMPILER +00:07:20 verbose #12058 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] +00:07:20 verbose #12059 > > #endif +00:07:20 verbose #12060 > > type std_future_Future<'T> = class end +00:07:20 verbose #12061 > > #if FABLE_COMPILER +00:07:20 verbose #12062 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] +00:07:20 verbose #12063 > > #endif +00:07:20 verbose #12064 > > type rayon_vec_IntoIter<'T> = class end +00:07:20 verbose #12065 > > #if FABLE_COMPILER +00:07:20 verbose #12066 > > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] +00:07:20 verbose #12067 > > #endif +00:07:20 verbose #12068 > > type rayon_iter_Map<'T> = class end +00:07:20 verbose #12069 > > #if FABLE_COMPILER +00:07:20 verbose #12070 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] +00:07:20 verbose #12071 > > #endif +00:07:20 verbose #12072 > > type futures_lite_stream_StreamExt = class end +00:07:20 verbose #12073 > > #if FABLE_COMPILER +00:07:20 verbose #12074 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] +00:07:20 verbose #12075 > > #endif +00:07:20 verbose #12076 > > type futures_future_TryJoinAll<'T> = class end +00:07:20 verbose #12077 > > #if FABLE_COMPILER +00:07:20 verbose #12078 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::Fuse<$0>")>]] +00:07:20 verbose #12079 > > #endif +00:07:20 verbose #12080 > > type futures_future_Fuse<'T> = class end +00:07:20 verbose #12081 > > #if FABLE_COMPILER +00:07:20 verbose #12082 > > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::JoinAll<$0>")>]] +00:07:20 verbose #12083 > > #endif +00:07:20 verbose #12084 > > type futures_future_JoinAll<'T> = class end +00:07:20 verbose #12085 > > let rec closure0 () (v0 : System.Threading.CancellationToken) : +00:07:20 verbose #12086 > > Async<System.Threading.CancellationToken> = +00:07:20 verbose #12087 > > let v1 : bool = true +00:07:20 verbose #12088 > > let mutable _v1 : Async<System.Threading.CancellationToken> option = None +00:07:20 verbose #12089 > > +00:07:20 verbose #12090 > > #if FABLE_COMPILER || WASM || CONTRACT +00:07:20 verbose #12091 > > +00:07:20 verbose #12092 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT +00:07:20 verbose #12093 > > let v2 : Async<System.Threading.CancellationToken> = null |> +00:07:20 verbose #12094 > > unbox<Async<System... +00:07:20 verbose #12095 > > +00:07:20 verbose #12096 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:20 verbose #12097 > > #if FABLE_COMPILER +00:07:20 verbose #12098 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] +00:07:20 verbose #12099 > > #endif +00:07:20 verbose #12100 > > type std_thread_JoinHandle<'T> = class end +00:07:20 verbose #12101 > > #if FABLE_COMPILER +00:07:20 verbose #12102 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] +00:07:20 verbose #12103 > > #endif +00:07:20 verbose #12104 > > type std_sync_Arc<'T> = class end +00:07:20 verbose #12105 > > #if FABLE_COMPILER +00:07:20 verbose #12106 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] +00:07:20 verbose #12107 > > #endif +00:07:20 verbose #12108 > > type std_sync_Mutex<'T> = class end +00:07:20 verbose #12109 > > #if FABLE_COMPILER +00:07:20 verbose #12110 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] +00:07:20 verbose #12111 > > #endif +00:07:20 verbose #12112 > > type std_sync_MutexGuard<'T> = class end +00:07:20 verbose #12113 > > #if FABLE_COMPILER +00:07:20 verbose #12114 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] +00:07:20 verbose #12115 > > #endif +00:07:20 verbose #12116 > > type std_sync_PoisonError<'T> = class end +00:07:20 verbose #12117 > > #if FABLE_COMPILER +00:07:20 verbose #12118 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Receiver<$0>")>]] +00:07:20 verbose #12119 > > #endif +00:07:20 verbose #12120 > > type std_sync_mpsc_Receiver<'T> = class end +00:07:20 verbose #12121 > > #if FABLE_COMPILER +00:07:20 verbose #12122 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::SendError<$0>")>]] +00:07:20 verbose #12123 > > #endif +00:07:20 verbose #12124 > > type std_sync_mpsc_SendError<'T> = class end +00:07:20 verbose #12125 > > #if FABLE_COMPILER +00:07:20 verbose #12126 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::mpsc::Sender<$0>")>]] +00:07:20 verbose #12127 > > #endif +00:07:20 verbose #12128 > > type std_sync_mpsc_Sender<'T> = class end +00:07:20 verbose #12129 > > type Disposable (f : unit -> unit) = interface System.IDisposable with member +00:07:20 verbose #12130 > > _.Dispose () = f () +00:07:20 verbose #12131 > > type [[<Struct>]] US0 = +00:07:20 verbose #12132 > > | US0_0 of f0_0 : System.Threading.CancellationToken +00:07:20 verbose #12133 > > | US0_1 +00:07:20 verbose #12134 > > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = +00:07:20 verbose #12135 > > let v1 : bool = true +00:07:20 verbose #12136 > > let mutable _v1 : unit option = None +00:07:20 verbose #12137 > > +00:07:20 verbose #12138 > > #if FABLE_COMPILER || WASM || CONTRACT +00:07:20 verbose #12139 > > +00:07:20 verbose #12140 > > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT... +00:07:21 verbose #12141 > > +00:07:21 verbose #12142 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:21 verbose #12143 > > #if FABLE_COMPILER +00:07:21 verbose #12144 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] +00:07:21 verbose #12145 > > #endif +00:07:21 verbose #12146 > > type reqwest_Error = class end +00:07:21 verbose #12147 > > #if FABLE_COMPILER +00:07:21 verbose #12148 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] +00:07:21 verbose #12149 > > #endif +00:07:21 verbose #12150 > > type reqwest_RequestBuilder = class end +00:07:21 verbose #12151 > > #if FABLE_COMPILER +00:07:21 verbose #12152 > > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] +00:07:21 verbose #12153 > > #endif +00:07:21 verbose #12154 > > type reqwest_Response = class end +00:07:21 verbose #12155 > > #if FABLE_COMPILER +00:07:21 verbose #12156 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] +00:07:21 verbose #12157 > > #endif +00:07:21 verbose #12158 > > type std_env_VarError = class end +00:07:21 verbose #12159 > > #if FABLE_COMPILER +00:07:21 verbose #12160 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:07:21 verbose #12161 > > #endif +00:07:21 verbose #12162 > > type core_any_Any = class end +00:07:21 verbose #12163 > > #if FABLE_COMPILER +00:07:21 verbose #12164 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:07:21 verbose #12165 > > #endif +00:07:21 verbose #12166 > > type core_ops_Try<'T> = class end +00:07:21 verbose #12167 > > #if FABLE_COMPILER +00:07:21 verbose #12168 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:07:21 verbose #12169 > > #endif +00:07:21 verbose #12170 > > type Func0<'T> = class end +00:07:21 verbose #12171 > > #if FABLE_COMPILER +00:07:21 verbose #12172 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:07:21 verbose #12173 > > #endif +00:07:21 verbose #12174 > > type Func0<'T, 'U> = class end +00:07:21 verbose #12175 > > #if FABLE_COMPILER +00:07:21 verbose #12176 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:07:21 verbose #12177 > > #endif +00:07:21 verbose #12178 > > type Box<'T> = class end +00:07:21 verbose #12179 > > #if FABLE_COMPILER +00:07:21 verbose #12180 > > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] +00:07:21 verbose #12181 > > #endif +00:07:21 verbose #12182 > > type Dyn<'T> = class end +00:07:21 verbose #12183 > > #if FABLE_COMPILER +00:07:21 verbose #12184 > > [[<Fable.Core.Erase; Fable.Core.Emit("Send")>]] +00:07:21 verbose #12185 > > #endif +00:07:21 verbose #12186 > > type Send<'T> = class end +00:07:21 verbose #12187 > > #if FABLE_COMPILER +00:07:21 verbose #12188 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] +00:07:21 verbose #12189 > > #endif +00:07:21 verbose #12190 > > type Fn<'T> = class end +00:07:21 verbose #12191 > > #if FABLE_COMPILER +00:07:21 verbose #12192 > > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] +00:07:21 verbose #12193 > > #endif +00:07:21 verbose #12194 > > type FnUnit = class end +00:07:21 verbose #12195 > > #if FABLE_COMPILER +00:07:21 verbose #12196 > > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] +00:07:21 verbose #12197 > > #... +00:07:22 verbose #12198 > > +00:07:22 verbose #12199 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:22 verbose #12200 > > #if FABLE_COMPILER +00:07:22 verbose #12201 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] +00:07:22 verbose #12202 > > #endif +00:07:22 verbose #12203 > > type clap_Arg = class end +00:07:22 verbose #12204 > > #if FABLE_COMPILER +00:07:22 verbose #12205 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] +00:07:22 verbose #12206 > > #endif +00:07:22 verbose #12207 > > type clap_ArgAction = class end +00:07:22 verbose #12208 > > #if FABLE_COMPILER +00:07:22 verbose #12209 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] +00:07:22 verbose #12210 > > #endif +00:07:22 verbose #12211 > > type clap_Command = class end +00:07:22 verbose #12212 > > #if FABLE_COMPILER +00:07:22 verbose #12213 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] +00:07:22 verbose #12214 > > #endif +00:07:22 verbose #12215 > > type clap_ArgMatches = class end +00:07:22 verbose #12216 > > #if FABLE_COMPILER +00:07:22 verbose #12217 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] +00:07:22 verbose #12218 > > #endif +00:07:22 verbose #12219 > > type clap_builder_ValueRange = class end +00:07:22 verbose #12220 > > #if FABLE_COMPILER +00:07:22 verbose #12221 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] +00:07:22 verbose #12222 > > #endif +00:07:22 verbose #12223 > > type clap_builder_ValueParser = class end +00:07:22 verbose #12224 > > #if FABLE_COMPILER +00:07:22 verbose #12225 > > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] +00:07:22 verbose #12226 > > #endif +00:07:22 verbose #12227 > > type clap_builder_PossibleValue = class end +00:07:22 verbose #12228 > > #if FABLE_COMPILER +00:07:22 verbose #12229 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] +00:07:22 verbose #12230 > > #endif +00:07:22 verbose #12231 > > type std_process_Child = class end +00:07:22 verbose #12232 > > #if FABLE_COMPILER +00:07:22 verbose #12233 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] +00:07:22 verbose #12234 > > #endif +00:07:22 verbose #12235 > > type std_process_ChildStderr = class end +00:07:22 verbose #12236 > > #if FABLE_COMPILER +00:07:22 verbose #12237 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] +00:07:22 verbose #12238 > > #endif +00:07:22 verbose #12239 > > type std_process_ChildStdout = class end +00:07:22 verbose #12240 > > #if FABLE_COMPILER +00:07:22 verbose #12241 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] +00:07:22 verbose #12242 > > #endif +00:07:22 verbose #12243 > > type std_process_ChildStdin = class end +00:07:22 verbose #12244 > > #if FABLE_COMPILER +00:07:22 verbose #12245 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] +00:07:22 verbose #12246 > > #endif +00:07:22 verbose #12247 > > type std_process_Command = class ... +00:07:24 verbose #12248 > > +00:07:24 verbose #12249 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:24 verbose #12250 > > #if FABLE_COMPILER +00:07:24 verbose #12251 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] +00:07:24 verbose #12252 > > #endif +00:07:24 verbose #12253 > > type std_fs_File = class end +00:07:24 verbose #12254 > > #if FABLE_COMPILER +00:07:24 verbose #12255 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] +00:07:24 verbose #12256 > > #endif +00:07:24 verbose #12257 > > type std_fs_FileType = class end +00:07:24 verbose #12258 > > #if FABLE_COMPILER +00:07:24 verbose #12259 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] +00:07:24 verbose #12260 > > #endif +00:07:24 verbose #12261 > > type std_path_Display = class end +00:07:24 verbose #12262 > > #if FABLE_COMPILER +00:07:24 verbose #12263 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] +00:07:24 verbose #12264 > > #endif +00:07:24 verbose #12265 > > type std_path_Path = class end +00:07:24 verbose #12266 > > #if FABLE_COMPILER +00:07:24 verbose #12267 > > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] +00:07:24 verbose #12268 > > #endif +00:07:24 verbose #12269 > > type std_path_PathBuf = class end +00:07:24 verbose #12270 > > #if FABLE_COMPILER +00:07:24 verbose #12271 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] +00:07:24 verbose #12272 > > #endif +00:07:24 verbose #12273 > > type async_walkdir_DirEntry = class end +00:07:24 verbose #12274 > > #if FABLE_COMPILER +00:07:24 verbose #12275 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] +00:07:24 verbose #12276 > > #endif +00:07:24 verbose #12277 > > type async_walkdir_Filtering = class end +00:07:24 verbose #12278 > > #if FABLE_COMPILER +00:07:24 verbose #12279 > > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] +00:07:24 verbose #12280 > > #endif +00:07:24 verbose #12281 > > type async_walkdir_WalkDir = class end +00:07:24 verbose #12282 > > #if FABLE_COMPILER +00:07:24 verbose #12283 > > [[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>]] +00:07:24 verbose #12284 > > #endif +00:07:24 verbose #12285 > > type core_any_Any = class end +00:07:24 verbose #12286 > > #if FABLE_COMPILER +00:07:24 verbose #12287 > > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] +00:07:24 verbose #12288 > > #endif +00:07:24 verbose #12289 > > type core_ops_Try<'T> = class end +00:07:24 verbose #12290 > > #if FABLE_COMPILER +00:07:24 verbose #12291 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] +00:07:24 verbose #12292 > > #endif +00:07:24 verbose #12293 > > type Func0<'T> = class end +00:07:24 verbose #12294 > > #if FABLE_COMPILER +00:07:24 verbose #12295 > > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] +00:07:24 verbose #12296 > > #endif +00:07:24 verbose #12297 > > type Func0<'T, 'U> = class end +00:07:24 verbose #12298 > > #if FABLE_COMPILER +00:07:24 verbose #12299 > > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] +00:07:24 verbose #12300 > > #endif +00:07:24 verbose #12301 > > type Box<'T> = clas... +00:07:26 verbose #12302 > > +00:07:26 verbose #12303 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:26 verbose #12304 > > module SpiralTrace = +00:07:26 verbose #12305 > > let trace x = +00:07:26 verbose #12306 > > #if !INTERACTIVE +00:07:26 verbose #12307 > > Trace.trace x +00:07:26 verbose #12308 > > #else +00:07:26 verbose #12309 > > trace x +00:07:26 verbose #12310 > > #endif +00:07:26 verbose #12311 > > +00:07:26 verbose #12312 > > type TraceLevel = +00:07:26 verbose #12313 > > #if !INTERACTIVE +00:07:26 verbose #12314 > > Trace.US0 +00:07:26 verbose #12315 > > #else +00:07:26 verbose #12316 > > US0 +00:07:26 verbose #12317 > > #endif +00:07:26 verbose #12318 > > +00:07:26 verbose #12319 > > module SpiralCrypto = +00:07:26 verbose #12320 > > let hash_text x = +00:07:26 verbose #12321 > > #if !INTERACTIVE +00:07:26 verbose #12322 > > Crypto.hash_text x +00:07:26 verbose #12323 > > #else +00:07:26 verbose #12324 > > hash_text x +00:07:26 verbose #12325 > > #endif +00:07:26 verbose #12326 > > +00:07:26 verbose #12327 > > #if !FABLE_COMPILER && !WASM && !CONTRACT +00:07:26 verbose #12328 > > +00:07:26 verbose #12329 > > module SpiralAsync = +00:07:26 verbose #12330 > > let merge_cancellation_token_with_default_async x = +00:07:26 verbose #12331 > > #if !INTERACTIVE +00:07:26 verbose #12332 > > Async_.merge_cancellation_token_with_default_async x +00:07:26 verbose #12333 > > #else +00:07:26 verbose #12334 > > merge_cancellation_token_with_default_async x +00:07:26 verbose #12335 > > #endif +00:07:26 verbose #12336 > > +00:07:26 verbose #12337 > > module SpiralThreading = +00:07:26 verbose #12338 > > let new_disposable_token x = +00:07:26 verbose #12339 > > #if !INTERACTIVE +00:07:26 verbose #12340 > > Threading.new_disposable_token x +00:07:26 verbose #12341 > > #else +00:07:26 verbose #12342 > > new_disposable_token x +00:07:26 verbose #12343 > > #endif +00:07:26 verbose #12344 > > +00:07:26 verbose #12345 > > module SpiralNetworking = +00:07:26 verbose #12346 > > let test_port_open x = +00:07:26 verbose #12347 > > #if !INTERACTIVE +00:07:26 verbose #12348 > > Networking.test_port_open x +00:07:26 verbose #12349 > > #else +00:07:26 verbose #12350 > > test_port_open x +00:07:26 verbose #12351 > > #endif +00:07:26 verbose #12352 > > +00:07:26 verbose #12353 > > let test_port_open_timeout x = +00:07:26 verbose #12354 > > #if !INTERACTIVE +00:07:26 verbose #12355 > > Networking.test_port_open_timeout x +00:07:26 verbose #12356 > > #else +00:07:26 verbose #12357 > > test_port_open_timeout x +00:07:26 verbose #12358 > > #endif +00:07:26 verbose #12359 > > +00:07:26 verbose #12360 > > let wait_for_port_access x = +00:07:26 verbose #12361 > > #if !INTERACTIVE +00:07:26 verbose #12362 > > Networking.wait_for_port_access x +00:07:26 verbose #12363 > > #else +00:07:26 verbose #12364 > > wait_for_port_access x +00:07:26 verbose #12365 > > #endif +00:07:26 verbose #12366 > > +00:07:26 verbose #12367 > > let get_available_port x = +00:07:26 verbose #12368 > > #if !INTERACTIVE +00:07:26 verbose #12369 > > Networking.get_available_port x +00:07:26 verbose #12370 > > #else +00:07:26 verbose #12371 > > get_available_port x +00:07:26 verbose #12372 > > #endif +00:07:26 verbose #12373 > > +00:07:26 verbose #12374 > > module SpiralRuntime = +00:07:26 verbose #12375 > > let get_executable_suffix () = +00:07:26 verbose #12376 > > #if !INTERACTIVE +00:07:26 verbose #12377 > > Runtime.get_executable_suffix () +00:07:26 verbose #12378 > > #else +00:07:26 verbose #12379 > > get_executable_suffix () +00:07:26 verbose #12380 > > #endif +00:07:26 verbose #12381 > > +00:07:26 verbose #12382 > > let is_windows () = +00:07:26 verbose #12383 > > #if !INTERACTIVE +00:07:26 verbose #12384 > > ... +00:07:26 verbose #12385 > > +00:07:26 verbose #12386 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:26 verbose #12387 > > #if !INTERACTIVE +00:07:26 verbose #12388 > > namespace Polyglot +00:07:26 verbose #12389 > > #endif +00:07:26 verbose #12390 > > +00:07:26 verbose #12391 > > module Common = +00:07:26 verbose #12392 > > +00:07:26 verbose #12393 > > #if !INTERACTIVE +00:07:26 verbose #12394 > > open Lib +00:07:26 verbose #12395 > > #endif +00:07:26 verbose #12396 > > +00:07:26 verbose #12397 > > let nl = System.Environment.NewLine +00:07:26 verbose #12398 > > let q = @"""" +00:07:26 verbose #12399 > > +00:07:26 verbose #12400 > > let inline cons head tail = head :: tail +00:07:26 verbose #12401 > > +00:07:26 verbose #12402 > > /// ## memoize +00:07:26 verbose #12403 > > let inline memoize fn = +00:07:26 verbose #12404 > > let result = lazy fn () +00:07:26 verbose #12405 > > fun () -> result.Value +00:07:26 verbose #12406 > > +00:07:26 verbose #12407 > > /// ## TraceLevel +00:07:26 verbose #12408 > > type TraceLevel = +00:07:26 verbose #12409 > > | Verbose +00:07:26 verbose #12410 > > | Debug +00:07:26 verbose #12411 > > | Info +00:07:26 verbose #12412 > > | Warning +00:07:26 verbose #12413 > > | Critical +00:07:26 verbose #12414 > > +00:07:26 verbose #12415 > > let inline _locals () = "" +00:07:26 verbose #12416 > > +00:07:26 verbose #12417 > > /// ## trace +00:07:26 verbose #12418 > > let to_trace_level = function +00:07:26 verbose #12419 > > | Verbose -> SpiralTrace.TraceLevel.US0_0 +00:07:26 verbose #12420 > > | Debug -> SpiralTrace.TraceLevel.US0_1 +00:07:26 verbose #12421 > > | Info -> SpiralTrace.TraceLevel.US0_2 +00:07:26 verbose #12422 > > | Warning -> SpiralTrace.TraceLevel.US0_3 +00:07:26 verbose #12423 > > | Critical -> SpiralTrace.TraceLevel.US0_4 +00:07:26 verbose #12424 > > +00:07:26 verbose #12425 > > let trace level fn locals = +00:07:26 verbose #12426 > > let level = level |> to_trace_level +00:07:26 verbose #12427 > > SpiralTrace.trace level fn locals +00:07:26 verbose #12428 > > +00:07:26 verbose #12429 > > +00:07:26 verbose #12430 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:26 verbose #12431 > > #if !INTERACTIVE +00:07:26 verbose #12432 > > namespace Polyglot +00:07:26 verbose #12433 > > #endif +00:07:26 verbose #12434 > > +00:07:26 verbose #12435 > > module CommonFSharp = +00:07:26 verbose #12436 > > +00:07:26 verbose #12437 > > open Common +00:07:26 verbose #12438 > > +00:07:26 verbose #12439 > > /// ## getUnionCaseName +00:07:26 verbose #12440 > > let inline getUnionCaseName<'T> (x: 'T) = +00:07:26 verbose #12441 > > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with +00:07:26 verbose #12442 > > | case, _ -> case.Name +00:07:26 verbose #12443 > > +00:07:26 verbose #12444 > > +00:07:26 verbose #12445 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:26 verbose #12446 > > #if !INTERACTIVE +00:07:26 verbose #12447 > > namespace Polyglot +00:07:26 verbose #12448 > > #endif +00:07:26 verbose #12449 > > +00:07:26 verbose #12450 > > module Async = +00:07:26 verbose #12451 > > +00:07:26 verbose #12452 > > #if !INTERACTIVE +00:07:26 verbose #12453 > > open Lib +00:07:26 verbose #12454 > > #endif +00:07:26 verbose #12455 > > +00:07:26 verbose #12456 > > open Common +00:07:26 verbose #12457 > > +00:07:26 verbose #12458 > > /// ## choice +00:07:26 verbose #12459 > > let inline choice asyncs = async { +00:07:26 verbose #12460 > > let e = Event<_> () +00:07:26 verbose #12461 > > use cts = new System.Threading.CancellationTokenSource () +00:07:26 verbose #12462 > > let fn = +00:07:26 verbose #12463 > > asyncs +00:07:26 verbose #12464 > > |> Seq.map (fun a -> async { +00:07:26 verbose #12465 > > let! x = a +00:07:26 verbose #12466 > > e.Trigger x +00:07:26 verbose #12467 > > }) +00:07:26 verbose #12468 > > |> Async.Parallel +00:07:26 verbose #12469 > > |> Async.Ignore +00:07:26 verbose #12470 > > Async.Start (fn, cts.Token) +00:07:26 verbose #12471 > > let! result = Async.AwaitEvent e.Publish +00:07:26 verbose #12472 > > cts.Cancel () +00:07:26 verbose #12473 > > return result +00:07:26 verbose #12474 > > } +00:07:26 verbose #12475 > > +00:07:26 verbose #12476 > > /// ## map +00:07:26 verbose #12477 > > let inline map fn a = async { +00:07:26 verbose #12478 > > let! x = a +00:07:26 verbose #12479 > > return fn x +00:07:26 verbose #12480 > > } +00:07:26 verbose #12481 > > +00:07:26 verbose #12482 > > /// ## catch +00:07:26 verbose #12483 > > let inline catch a = +00:07:26 verbose #12484 > > a +00:07:26 verbose #12485 > > |> Async.Catch +00:07:26 verbose #12486 > > |> map (function +00:07:26 verbose #12487 > > | Choice1Of2 result -> Ok result +00:07:26 verbose #12488 > > | Choice2Of2 ex -> Error ex +00:07:26 verbose #12489 > > ) +00:07:26 verbose #12490 > > +00:07:26 verbose #12491 > > /// ## runWithTimeoutChoiceAsync +00:07:26 verbose #12492 > > let inline runWithTimeoutChoiceAsync (timeout : int) fn = +00:07:26 verbose #12493 > > let _locals () = $"timeout: {timeout} / {_locals ()}" +00:07:26 verbose #12494 > > +00:07:26 verbose #12495 > > let timeoutTask = async { +00:07:26 verbose #12496 > > do! Async.Sleep timeout +00:07:26 verbose #12497 > > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals +00:07:26 verbose #12498 > > return None +00:07:26 verbose #12499 > > } +00:07:26 verbose #12500 > > +00:07:26 verbose #12501 > > let task = async { +00:07:26 verbose #12502 > > try +00:07:26 verbose #12503 > > let! result = fn +00:07:26 verbose #12504 > > return Some result +00:07:26 verbose #12505 > > with +00:07:26 verbose #12506 > > | :? System.AggregateException as ex when +00:07:26 verbose #12507 > > ex.InnerExceptions +00:07:26 verbose #12508 > > |> Seq.exists (function :? Sys... +00:07:27 verbose #12509 > > +00:07:27 verbose #12510 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:27 verbose #12511 > > #if !INTERACTIVE +00:07:27 verbose #12512 > > namespace Polyglot +00:07:27 verbose #12513 > > #endif +00:07:27 verbose #12514 > > +00:07:27 verbose #12515 > > module AsyncSeq = +00:07:27 verbose #12516 > > +00:07:27 verbose #12517 > > #if !INTERACTIVE +00:07:27 verbose #12518 > > open Lib +00:07:27 verbose #12519 > > #endif +00:07:27 verbose #12520 > > +00:07:27 verbose #12521 > > open Common +00:07:27 verbose #12522 > > +00:07:27 verbose #12523 > > /// ## subscribeEvent +00:07:27 verbose #12524 > > let inline subscribeEvent (event: IEvent<'H, 'A>) map = +00:07:27 verbose #12525 > > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, +00:07:27 verbose #12526 > > 'A>(event.AddHandler, event.RemoveHandler) +00:07:27 verbose #12527 > > System.Reactive.Linq.Observable.Select (observable, fun event -> map +00:07:27 verbose #12528 > > event.EventArgs) +00:07:27 verbose #12529 > > |> FSharp.Control.AsyncSeq.ofObservableBuffered +00:07:27 verbose #12530 > > +00:07:27 verbose #12531 > > /// ## subscribeToken +00:07:27 verbose #12532 > > let subscribeToken (token : System.Threading.CancellationToken) = +00:07:27 verbose #12533 > > let tcs = new System.Threading.Tasks.TaskCompletionSource () +00:07:27 verbose #12534 > > System.Action tcs.SetResult |> token.Register |> ignore +00:07:27 verbose #12535 > > let start = System.DateTime.Now.Ticks +00:07:27 verbose #12536 > > FSharp.Control.AsyncSeq.unfoldAsync +00:07:27 verbose #12537 > > (fun () -> async { +00:07:27 verbose #12538 > > do! tcs.Task |> Async.AwaitTask +00:07:27 verbose #12539 > > return Some (System.DateTime.Now.Ticks - start, ()) +00:07:27 verbose #12540 > > }) +00:07:27 verbose #12541 > > () +00:07:27 verbose #12542 > > +00:07:27 verbose #12543 > > +00:07:27 verbose #12544 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:27 verbose #12545 > > #if !INTERACTIVE +00:07:27 verbose #12546 > > namespace Polyglot +00:07:27 verbose #12547 > > #endif +00:07:27 verbose #12548 > > +00:07:27 verbose #12549 > > module Runtime = +00:07:27 verbose #12550 > > +00:07:27 verbose #12551 > > #if !INTERACTIVE +00:07:27 verbose #12552 > > open Lib +00:07:27 verbose #12553 > > #endif +00:07:27 verbose #12554 > > +00:07:27 verbose #12555 > > open Common +00:07:27 verbose #12556 > > +00:07:27 verbose #12557 > > /// ## parseArgs +00:07:27 verbose #12558 > > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = +00:07:27 verbose #12559 > > let assemblyName = +00:07:27 verbose #12560 > > System.Reflection.Assembly.GetEntryAssembly().GetName().Name +00:07:27 verbose #12561 > > let errorHandler : Argu.IExiter = +00:07:27 verbose #12562 > > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> +00:07:27 verbose #12563 > > List.contains assemblyName +00:07:27 verbose #12564 > > then Argu.ExceptionExiter () +00:07:27 verbose #12565 > > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | +00:07:27 verbose #12566 > > _ -> Some System.ConsoleColor.Red) +00:07:27 verbose #12567 > > +00:07:27 verbose #12568 > > let parser = +00:07:27 verbose #12569 > > Argu.ArgumentParser.Create<'T> ( +00:07:27 verbose #12570 > > programName = +00:07:27 verbose #12571 > > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", +00:07:27 verbose #12572 > > errorHandler = errorHandler +00:07:27 verbose #12573 > > ) +00:07:27 verbose #12574 > > +00:07:27 verbose #12575 > > parser.ParseCommandLine args +00:07:27 verbose #12576 > > +00:07:27 verbose #12577 > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = +00:07:27 verbose #12578 > > args +00:07:27 verbose #12579 > > |> parseArgs<'T> +00:07:27 verbose #12580 > > |> fun results -> results.GetAllResults () +00:07:27 verbose #12581 > > +00:07:27 verbose #12582 > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = +00:07:27 verbose #12583 > > args +00:07:27 verbose #12584 > > |> parseAllArgs<'T> +00:07:27 verbose #12585 > > |> List.groupBy CommonFSharp.getUnionCaseName<'T> +00:07:27 verbose #12586 > > |> Map.ofList +00:07:27 verbose #12587 > > +00:07:28 verbose #12588 > > +00:07:28 verbose #12589 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:28 verbose #12590 > > #if !INTERACTIVE +00:07:28 verbose #12591 > > namespace Polyglot +00:07:28 verbose #12592 > > #endif +00:07:28 verbose #12593 > > +00:07:28 verbose #12594 > > module FileSystem = +00:07:28 verbose #12595 > > +00:07:28 verbose #12596 > > #if !INTERACTIVE +00:07:28 verbose #12597 > > open Lib +00:07:28 verbose #12598 > > #endif +00:07:28 verbose #12599 > > +00:07:28 verbose #12600 > > open Common +00:07:28 verbose #12601 > > open SpiralFileSystem.Operators +00:07:28 verbose #12602 > > +00:07:28 verbose #12603 > > /// ## watchDirectory +00:07:28 verbose #12604 > > [[<RequireQualifiedAccess>]] +00:07:28 verbose #12605 > > type FileSystemChangeType = +00:07:28 verbose #12606 > > | Failure +00:07:28 verbose #12607 > > | Changed +00:07:28 verbose #12608 > > | Created +00:07:28 verbose #12609 > > | Deleted +00:07:28 verbose #12610 > > | Renamed +00:07:28 verbose #12611 > > +00:07:28 verbose #12612 > > [[<RequireQualifiedAccess>]] +00:07:28 verbose #12613 > > type FileSystemChange = +00:07:28 verbose #12614 > > | Failure of exn: exn +00:07:28 verbose #12615 > > | Changed of path: string * content: string option +00:07:28 verbose #12616 > > | Created of path: string * content: string option +00:07:28 verbose #12617 > > | Deleted of path: string +00:07:28 verbose #12618 > > | Renamed of oldPath: string * (string * string option) +00:07:28 verbose #12619 > > +00:07:28 verbose #12620 > > +00:07:28 verbose #12621 > > let inline watchDirectoryWithFilter filter shouldReadContent path = +00:07:28 verbose #12622 > > let fullPath = path |> System.IO.Path.GetFullPath +00:07:28 verbose #12623 > > let _locals () = $"filter: {filter} / {_locals ()}" +00:07:28 verbose #12624 > > +00:07:28 verbose #12625 > > let watcher = +00:07:28 verbose #12626 > > new System.IO.FileSystemWatcher ( +00:07:28 verbose #12627 > > Path = fullPath, +00:07:28 verbose #12628 > > NotifyFilter = filter, +00:07:28 verbose #12629 > > EnableRaisingEvents = true, +00:07:28 verbose #12630 > > IncludeSubdirectories = true +00:07:28 verbose #12631 > > ) +00:07:28 verbose #12632 > > +00:07:28 verbose #12633 > > let inline getEventPath (path : string) = +00:07:28 verbose #12634 > > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> +00:07:28 verbose #12635 > > SpiralSm.trim_start [[| '/'; '\\' |]] +00:07:28 verbose #12636 > > +00:07:28 verbose #12637 > > let inline ticks () = +00:07:28 verbose #12638 > > System.DateTime.UtcNow.Ticks +00:07:28 verbose #12639 > > +00:07:28 verbose #12640 > > let changedStream = +00:07:28 verbose #12641 > > AsyncSeq.subscribeEvent +00:07:28 verbose #12642 > > watcher.Changed +00:07:28 verbose #12643 > > (fun event -> +00:07:28 verbose #12644 > > ticks (), +00:07:28 verbose #12645 > > [[ FileSystemChange... +00:07:28 verbose #12646 > > +00:07:28 verbose #12647 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:28 verbose #12648 > > #if !INTERACTIVE +00:07:28 verbose #12649 > > open Lib +00:07:28 verbose #12650 > > #endif +00:07:28 verbose #12651 > > +00:07:28 verbose #12652 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:28 verbose #12653 > > open Common +00:07:28 verbose #12654 > > open SpiralFileSystem.Operators +00:07:28 verbose #12655 > > +00:07:28 verbose #12656 > > ── fsharp - import ───────────────────────────────────────────────────────────── +00:07:28 verbose #12657 > > let workspaceRoot = SpiralFileSystem.get_workspace_root () +00:07:28 verbose #12658 > > let tmpSpiralPath = workspaceRoot </> "target/polyglot/plotting" +00:07:28 verbose #12659 > > let linePlotsDataPath = tmpSpiralPath </> "line_data" +00:07:28 verbose #12660 > > let linePlotsSvgPath = tmpSpiralPath </> "line_svg" +00:07:28 verbose #12661 > > +00:07:28 verbose #12662 > > [[ tmpSpiralPath; linePlotsDataPath; linePlotsSvgPath ]] +00:07:28 verbose #12663 > > |> List.iter (fun dir -> if Directory.Exists dir |> not then +00:07:28 verbose #12664 > > Directory.CreateDirectory dir |> ignore) +00:07:28 verbose #12665 > > +00:07:28 verbose #12666 > > Formatter.Register<struct (string * string * string * struct (string * float +00:07:28 verbose #12667 > > array * float array) array)> ( +00:07:28 verbose #12668 > > (fun struct (caption, x_desc, y_desc, ys) -> +00:07:28 verbose #12669 > > let json = (caption, x_desc, y_desc, ys) |> FSharp.Json.Json.serialize +00:07:28 verbose #12670 > > async { +00:07:28 verbose #12671 > > let hashHex = json |> SpiralCrypto.hash_text +00:07:28 verbose #12672 > > let svgPath = linePlotsSvgPath </> $"{hashHex}.svg" +00:07:28 verbose #12673 > > +00:07:28 verbose #12674 > > if System.IO.File.Exists svgPath |> not then +00:07:28 verbose #12675 > > do! json |> SpiralFileSystem.write_all_text_async +00:07:28 verbose #12676 > > $"{linePlotsDataPath </> hashHex}.json" +00:07:28 verbose #12677 > > +00:07:28 verbose #12678 > > let ct = +00:07:28 verbose #12679 > > Microsoft.DotNet.Interactive.KernelInvocationContext.Current.CancellationToken +00:07:28 verbose #12680 > > +00:07:28 verbose #12681 > > let oldLevel = get_trace_level () +00:07:28 verbose #12682 > > SpiralTrace.TraceLevel.US0_2 +00:07:28 verbose #12683 > > |> set_trace_level +00:07:28 verbose #12684 > > use _ = (new_disposable (fun () -> +00:07:28 verbose #12685 > > oldLevel |> set_trace_level +00:07:28 verbose #12686 > > )) +00:07:28 verbose #12687 > > +00:07:28 verbose #12688 > > let plotExePath = workspaceRoot </> +00:07:28 verbose #12689 > > $"workspace/target/release/plot{SpiralRuntime.get_executable_suffix ()}" +00:07:28 verbose #12690 > > let! exitCode, result = +00:07:28 verbose #12691 > > SpiralRuntime.execution_options (f... +00:07:28 verbose #12692 > > +00:07:28 verbose #12693 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:28 verbose #12694 > > //// test +00:07:28 verbose #12695 > > +00:07:28 verbose #12696 > > open testing +00:07:28 verbose #12697 > > +00:07:28 verbose #12698 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:07:28 verbose #12699 > > #r +00:07:28 verbose #12700 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:28 verbose #12701 > > otNet.Interactive.Spiral.dll" +00:07:28 verbose #12702 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:07:28 verbose #12703 > > #r +00:07:28 verbose #12704 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:28 verbose #12705 > > otNet.Interactive.dll" +00:07:28 verbose #12706 > > open type Microsoft.DotNet.Interactive.Kernel +00:07:30 verbose #12707 > > +00:07:30 verbose #12708 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:30 verbose #12709 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:30 verbose #12710 > > │ ## init_series │ +00:07:30 verbose #12711 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #12712 > > +00:07:30 verbose #12713 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #12714 > > //// test +00:07:30 verbose #12715 > > +00:07:30 verbose #12716 > > inl x : a _ f64 = am'.init_series -3 3 0.01 +00:07:30 verbose #12717 > > inl y = x |> am.map math.square +00:07:30 verbose #12718 > > "square", "x", "y", ;[[ "square", x, y ]] +00:07:30 verbose #12719 > > +00:07:30 verbose #12720 > > ╭─[ 83.04ms - return value ]───────────────────────────────────────────────────╮ +00:07:30 verbose #12721 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:30 verbose #12722 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:30 verbose #12723 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:30 verbose #12724 > > │ stroke="none"/> │ +00:07:30 verbose #12725 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:30 verbose #12726 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:30 verbose #12727 > > │ fill="#FFFFFF"> │ +00:07:30 verbose #12728 > > │ square │ +00:07:30 verbose #12729 > > │ </text> │ +00:07:30 verbose #12730 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ +00:07:30 verbose #12731 > > │ y2="75"/> │ +00:07:30 verbose #12732 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:30 verbose #12733 > > │ y2="75"/> │ +00:07:30 verbose #12734 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ +00:07:30 verbose #12735 > > │ y2="75"/> │ +00:07:30 verbose #12736 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ +00:07:30 verbose #12737 > > │ y2="75"/> │ +00:07:30 verbose #12738 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ +00:07:30 verbose #12739 > > │ y2="75"/> │ +00:07:30 verbose #12740 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ +00:07:30 verbose #12741 > > │ x2="103" y2="75"/> │ +00:07:30 verbose #12742 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ +00:07:30 verbose #12743 > > │ x2="111" y2="75"/> │ +00:07:30 verbose #12744 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:30 verbose #12745 > > │ x2="119" y2="75"/> │ +00:07:30 verbose #12746 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ +00:07:30 verbose #12747 > > │ x2="128" y2="75"/> │ +00:07:30 verbose #12748 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ +00:07:30 verbose #12749 > > │ x2="136" y2="75"/> │ +00:07:30 verbose #12750 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ +00:07:30 verbose #12751 > > │ x2="144" y2="75"/> │ +00:07:30 verbose #12752 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ +00:07:30 verbose #12753 > > │ x2="153" y2="75"/> │ +00:07:30 verbose #12754 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ +00:07:30 verbose #12755 > > │ x2="161" y2="75"/> │ +00:07:30 verbose #12756 > > │ <line opacity="1" stroke="#3... │ +00:07:30 verbose #12757 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #12758 > > +00:07:30 verbose #12759 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #12760 > > //// test +00:07:30 verbose #12761 > > +00:07:30 verbose #12762 > > inl x : a _ f64 = am'.init_series -10 10 0.1 +00:07:30 verbose #12763 > > inl y_sin = x |> am.map sin +00:07:30 verbose #12764 > > inl y_cos = x |> am.map cos +00:07:30 verbose #12765 > > "sin cos", "x", "y", ;[[ "sin", x, y_sin; "cos", x, y_cos ]] +00:07:30 verbose #12766 > > +00:07:30 verbose #12767 > > ╭─[ 53.44ms - return value ]───────────────────────────────────────────────────╮ +00:07:30 verbose #12768 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:30 verbose #12769 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:30 verbose #12770 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:30 verbose #12771 > > │ stroke="none"/> │ +00:07:30 verbose #12772 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:30 verbose #12773 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:30 verbose #12774 > > │ fill="#FFFFFF"> │ +00:07:30 verbose #12775 > > │ sin cos │ +00:07:30 verbose #12776 > > │ </text> │ +00:07:30 verbose #12777 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │ +00:07:30 verbose #12778 > > │ y2="75"/> │ +00:07:30 verbose #12779 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:30 verbose #12780 > > │ y2="75"/> │ +00:07:30 verbose #12781 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │ +00:07:30 verbose #12782 > > │ y2="75"/> │ +00:07:30 verbose #12783 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ +00:07:30 verbose #12784 > > │ y2="75"/> │ +00:07:30 verbose #12785 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │ +00:07:30 verbose #12786 > > │ x2="107" y2="75"/> │ +00:07:30 verbose #12787 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:30 verbose #12788 > > │ x2="119" y2="75"/> │ +00:07:30 verbose #12789 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="132" y1="424" │ +00:07:30 verbose #12790 > > │ x2="132" y2="75"/> │ +00:07:30 verbose #12791 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ +00:07:30 verbose #12792 > > │ x2="144" y2="75"/> │ +00:07:30 verbose #12793 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="157" y1="424" │ +00:07:30 verbose #12794 > > │ x2="157" y2="75"/> │ +00:07:30 verbose #12795 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ +00:07:30 verbose #12796 > > │ x2="169" y2="75"/> │ +00:07:30 verbose #12797 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="182" y1="424" │ +00:07:30 verbose #12798 > > │ x2="182" y2="75"/> │ +00:07:30 verbose #12799 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="194" y1="424" │ +00:07:30 verbose #12800 > > │ x2="194" y2="75"/> │ +00:07:30 verbose #12801 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="207" y1="424" │ +00:07:30 verbose #12802 > > │ x2="207" y2="75"/> │ +00:07:30 verbose #12803 > > │ <line opacity="1" stroke=... │ +00:07:30 verbose #12804 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #12805 > > +00:07:30 verbose #12806 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #12807 > > //// test +00:07:30 verbose #12808 > > +00:07:30 verbose #12809 > > inl y_pos y0 vy0 ay t = +00:07:30 verbose #12810 > > y0 + vy0 * t + ay * (t |> math.square) / 2 +00:07:30 verbose #12811 > > +00:07:30 verbose #12812 > > inl x : a _ f64 = am'.init_series 0 5 0.01 +00:07:30 verbose #12813 > > inl y = x |> am.map (y_pos 0 20 -9.8) +00:07:30 verbose #12814 > > "projectile motion", "time (s)", "", ;[[ "height of projectile (m)", x, y ]] +00:07:30 verbose #12815 > > +00:07:30 verbose #12816 > > ╭─[ 40.18ms - return value ]───────────────────────────────────────────────────╮ +00:07:30 verbose #12817 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:30 verbose #12818 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:30 verbose #12819 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:30 verbose #12820 > > │ stroke="none"/> │ +00:07:30 verbose #12821 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:30 verbose #12822 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:30 verbose #12823 > > │ fill="#FFFFFF"> │ +00:07:30 verbose #12824 > > │ projectile motion │ +00:07:30 verbose #12825 > > │ </text> │ +00:07:30 verbose #12826 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ +00:07:30 verbose #12827 > > │ y2="75"/> │ +00:07:30 verbose #12828 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:30 verbose #12829 > > │ y2="75"/> │ +00:07:30 verbose #12830 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ +00:07:30 verbose #12831 > > │ y2="75"/> │ +00:07:30 verbose #12832 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ +00:07:30 verbose #12833 > > │ y2="75"/> │ +00:07:30 verbose #12834 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ +00:07:30 verbose #12835 > > │ y2="75"/> │ +00:07:30 verbose #12836 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ +00:07:30 verbose #12837 > > │ x2="109" y2="75"/> │ +00:07:30 verbose #12838 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:30 verbose #12839 > > │ x2="119" y2="75"/> │ +00:07:30 verbose #12840 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ +00:07:30 verbose #12841 > > │ x2="129" y2="75"/> │ +00:07:30 verbose #12842 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ +00:07:30 verbose #12843 > > │ x2="139" y2="75"/> │ +00:07:30 verbose #12844 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ +00:07:30 verbose #12845 > > │ x2="149" y2="75"/> │ +00:07:30 verbose #12846 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ +00:07:30 verbose #12847 > > │ x2="159" y2="75"/> │ +00:07:30 verbose #12848 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ +00:07:30 verbose #12849 > > │ x2="169" y2="75"/> │ +00:07:30 verbose #12850 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ +00:07:30 verbose #12851 > > │ x2="179" y2="75"/> │ +00:07:30 verbose #12852 > > │ <line opacity="1"... │ +00:07:30 verbose #12853 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #12854 > > +00:07:30 verbose #12855 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:30 verbose #12856 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:30 verbose #12857 > > │ ## velocity_cf │ +00:07:30 verbose #12858 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #12859 > > +00:07:30 verbose #12860 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #12861 > > type mass = f64 +00:07:30 verbose #12862 > > type time = f64 +00:07:30 verbose #12863 > > type position = f64 +00:07:30 verbose #12864 > > type velocity = f64 +00:07:30 verbose #12865 > > type force = f64 +00:07:30 verbose #12866 > > +00:07:30 verbose #12867 > > type velocity_cf = mass -> velocity -> list force -> (time -> velocity) +00:07:30 verbose #12868 > > +00:07:30 verbose #12869 > > inl velocity_cf m v0 fs = +00:07:30 verbose #12870 > > inl f_net = fs |> listm'.sum +00:07:30 verbose #12871 > > inl a0 = f_net / m +00:07:30 verbose #12872 > > inl v t = v0 + a0 * t +00:07:30 verbose #12873 > > v +00:07:30 verbose #12874 > > +00:07:30 verbose #12875 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #12876 > > //// test +00:07:30 verbose #12877 > > +00:07:30 verbose #12878 > > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 0 +00:07:30 verbose #12879 > > |> _assert_eq 0.6 +00:07:30 verbose #12880 > > +00:07:30 verbose #12881 > > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 1 +00:07:30 verbose #12882 > > |> _assert_eq 0.2 +00:07:30 verbose #12883 > > +00:07:30 verbose #12884 > > ╭─[ 21.11ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:30 verbose #12885 > > │ assert_eq / actual: 0.6 / expected: 0.6 │ +00:07:30 verbose #12886 > > │ assert_eq / actual: 0.2 / expected: 0.2 │ +00:07:30 verbose #12887 > > │ │ +00:07:30 verbose #12888 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #12889 > > +00:07:30 verbose #12890 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #12891 > > //// test +00:07:30 verbose #12892 > > +00:07:30 verbose #12893 > > inl x = am'.init_series 0 4 0.1 +00:07:30 verbose #12894 > > inl y = x |> am.map (velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]]) +00:07:30 verbose #12895 > > "car on an air track", "time (s)", "", ;[[ "velocity of car (m/s)", x, y ]] +00:07:30 verbose #12896 > > +00:07:30 verbose #12897 > > ╭─[ 41.15ms - return value ]───────────────────────────────────────────────────╮ +00:07:30 verbose #12898 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:30 verbose #12899 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:30 verbose #12900 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:30 verbose #12901 > > │ stroke="none"/> │ +00:07:30 verbose #12902 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:30 verbose #12903 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:30 verbose #12904 > > │ fill="#FFFFFF"> │ +00:07:30 verbose #12905 > > │ car on an air track │ +00:07:30 verbose #12906 > > │ </text> │ +00:07:30 verbose #12907 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │ +00:07:30 verbose #12908 > > │ y2="75"/> │ +00:07:30 verbose #12909 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:30 verbose #12910 > > │ y2="75"/> │ +00:07:30 verbose #12911 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │ +00:07:30 verbose #12912 > > │ y2="75"/> │ +00:07:30 verbose #12913 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ +00:07:30 verbose #12914 > > │ y2="75"/> │ +00:07:30 verbose #12915 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │ +00:07:30 verbose #12916 > > │ x2="107" y2="75"/> │ +00:07:30 verbose #12917 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:30 verbose #12918 > > │ x2="119" y2="75"/> │ +00:07:30 verbose #12919 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="132" y1="424" │ +00:07:30 verbose #12920 > > │ x2="132" y2="75"/> │ +00:07:30 verbose #12921 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ +00:07:30 verbose #12922 > > │ x2="144" y2="75"/> │ +00:07:30 verbose #12923 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="157" y1="424" │ +00:07:30 verbose #12924 > > │ x2="157" y2="75"/> │ +00:07:30 verbose #12925 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ +00:07:30 verbose #12926 > > │ x2="169" y2="75"/> │ +00:07:30 verbose #12927 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="182" y1="424" │ +00:07:30 verbose #12928 > > │ x2="182" y2="75"/> │ +00:07:30 verbose #12929 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="194" y1="424" │ +00:07:30 verbose #12930 > > │ x2="194" y2="75"/> │ +00:07:30 verbose #12931 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="207" y1="424" │ +00:07:30 verbose #12932 > > │ x2="207" y2="75"/> │ +00:07:30 verbose #12933 > > │ <line opacity... │ +00:07:30 verbose #12934 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #12935 > > +00:07:30 verbose #12936 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:30 verbose #12937 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:30 verbose #12938 > > │ ## derivative │ +00:07:30 verbose #12939 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #12940 > > +00:07:30 verbose #12941 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #12942 > > type derivative = (f64 -> f64) -> f64 -> f64 +00:07:30 verbose #12943 > > +00:07:30 verbose #12944 > > inl derivative dt : derivative = +00:07:30 verbose #12945 > > fun x t => +00:07:30 verbose #12946 > > (x (t + dt / 2) - x (t - dt / 2)) / dt +00:07:30 verbose #12947 > > +00:07:30 verbose #12948 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #12949 > > //// test +00:07:30 verbose #12950 > > +00:07:30 verbose #12951 > > derivative 1 (fun x => x ** 4 / 4) 1 - 1 +00:07:30 verbose #12952 > > |> _assert_approx_eq None 0.25 +00:07:30 verbose #12953 > > +00:07:30 verbose #12954 > > derivative 0.001 (fun x => x ** 4 / 4) 1 - 1 +00:07:30 verbose #12955 > > |> _assert_approx_eq None 0.0000002499998827953931 +00:07:30 verbose #12956 > > +00:07:30 verbose #12957 > > derivative 0.000001 (fun x => x ** 4 / 4) 1 - 1 +00:07:30 verbose #12958 > > |> _assert_approx_eq None 0.000000000001000088900582341 +00:07:30 verbose #12959 > > +00:07:30 verbose #12960 > > derivative 0.000000001 (fun x => x ** 4 / 4) 1 - 1 +00:07:30 verbose #12961 > > |> _assert_approx_eq None 0.00000008274037099909037 +00:07:30 verbose #12962 > > +00:07:30 verbose #12963 > > derivative 0.000000000001 (fun x => x ** 4 / 4) 1 - 1 +00:07:30 verbose #12964 > > |> _assert_approx_eq None 0.00008890058234101161 +00:07:30 verbose #12965 > > +00:07:30 verbose #12966 > > derivative 0.000000000000001 (fun x => x ** 4 / 4) 1 - 1 +00:07:30 verbose #12967 > > |> _assert_approx_eq None -0.0007992778373592246 +00:07:30 verbose #12968 > > +00:07:30 verbose #12969 > > derivative 0.000000000000000001 (fun x => x ** 4 / 4) 1 - 1 +00:07:30 verbose #12970 > > |> _assert_approx_eq None -1 +00:07:30 verbose #12971 > > +00:07:30 verbose #12972 > > ╭─[ 39.70ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:30 verbose #12973 > > │ assert_approx_eq / actual: 0.25 / expected: 0.25 │ +00:07:30 verbose #12974 > > │ assert_approx_eq / actual: 2.499998828e-07 / expected: 2.499998828e-07 │ +00:07:30 verbose #12975 > > │ assert_approx_eq / actual: 1.000088901e-12 / expected: 1.000088901e-12 │ +00:07:30 verbose #12976 > > │ assert_approx_eq / actual: 8.2740371e-08 / expected: 8.2740371e-08 │ +00:07:30 verbose #12977 > > │ assert_approx_eq / actual: 8.890058234e-05 / expected: 8.890058234e-05 │ +00:07:30 verbose #12978 > > │ assert_approx_eq / actual: -0.0007992778374 / expected: -0.0007992778374 │ +00:07:30 verbose #12979 > > │ assert_approx_eq / actual: -1.0 / expected: -1.0 │ +00:07:30 verbose #12980 > > │ │ +00:07:30 verbose #12981 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #12982 > > +00:07:30 verbose #12983 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:30 verbose #12984 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:30 verbose #12985 > > │ ## integration │ +00:07:30 verbose #12986 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #12987 > > +00:07:30 verbose #12988 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #12989 > > type integration = (f64 -> f64) -> f64 -> f64 -> f64 +00:07:30 verbose #12990 > > +00:07:30 verbose #12991 > > inl integral dt : integration = +00:07:30 verbose #12992 > > fun f a b => +00:07:30 verbose #12993 > > inl rec loop t y = +00:07:30 verbose #12994 > > if t < b +00:07:30 verbose #12995 > > then loop (t + dt) (y + f t * dt) +00:07:30 verbose #12996 > > else t, y +00:07:30 verbose #12997 > > loop (a + dt / 2) 0 +00:07:30 verbose #12998 > > |> snd +00:07:30 verbose #12999 > > +00:07:30 verbose #13000 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #13001 > > //// test +00:07:30 verbose #13002 > > +00:07:30 verbose #13003 > > integral 0.01 math.square 0 1 +00:07:30 verbose #13004 > > |> _assert_approx_eq None 0.33332500000000004 +00:07:30 verbose #13005 > > +00:07:30 verbose #13006 > > ╭─[ 14.44ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:30 verbose #13007 > > │ assert_approx_eq / actual: 0.333325 / expected: 0.333325 │ +00:07:30 verbose #13008 > > │ │ +00:07:30 verbose #13009 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #13010 > > +00:07:30 verbose #13011 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #13012 > > inl integral' dt : integration = +00:07:30 verbose #13013 > > fun f a b => +00:07:30 verbose #13014 > > listm'.init_series (a + dt / 2) (b - dt / 2) dt +00:07:30 verbose #13015 > > |> listm.map (f >> (*) dt) +00:07:30 verbose #13016 > > |> listm'.sum +00:07:30 verbose #13017 > > +00:07:30 verbose #13018 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #13019 > > //// test +00:07:30 verbose #13020 > > +00:07:30 verbose #13021 > > integral' 0.1 math.square 0 1 +00:07:30 verbose #13022 > > |> _assert_approx_eq None (integral 0.1 math.square 0 1) +00:07:30 verbose #13023 > > +00:07:30 verbose #13024 > > ╭─[ 12.27ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:30 verbose #13025 > > │ assert_approx_eq / actual: 0.3325 / expected: 0.3325 │ +00:07:30 verbose #13026 > > │ │ +00:07:30 verbose #13027 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #13028 > > +00:07:30 verbose #13029 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #13030 > > inl integral'' dt : integration = +00:07:30 verbose #13031 > > fun f a b => +00:07:30 verbose #13032 > > am'.init_series (a + dt / 2) (b - dt / 2) dt +00:07:30 verbose #13033 > > |> am.map (f >> (*) dt) +00:07:30 verbose #13034 > > |> am'.sum +00:07:30 verbose #13035 > > +00:07:30 verbose #13036 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #13037 > > //// test +00:07:30 verbose #13038 > > +00:07:30 verbose #13039 > > integral'' 0.01 math.square 0 1 +00:07:30 verbose #13040 > > |> _assert_approx_eq None (integral 0.01 math.square 0 1) +00:07:30 verbose #13041 > > +00:07:30 verbose #13042 > > ╭─[ 68.81ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:30 verbose #13043 > > │ assert_approx_eq / actual: 0.333325 / expected: 0.333325 │ +00:07:30 verbose #13044 > > │ │ +00:07:30 verbose #13045 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #13046 > > +00:07:30 verbose #13047 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:30 verbose #13048 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:30 verbose #13049 > > │ ## anti_derivative │ +00:07:30 verbose #13050 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #13051 > > +00:07:30 verbose #13052 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #13053 > > inl anti_derivative dt v0 a t = +00:07:30 verbose #13054 > > v0 + integral' dt a 0 t +00:07:30 verbose #13055 > > +00:07:30 verbose #13056 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:30 verbose #13057 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:30 verbose #13058 > > │ ## velocity_ft │ +00:07:30 verbose #13059 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #13060 > > +00:07:30 verbose #13061 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #13062 > > type velocity_ft = mass -> velocity -> list (time -> force) -> (time -> +00:07:30 verbose #13063 > > velocity) +00:07:30 verbose #13064 > > +00:07:30 verbose #13065 > > inl velocity_ft dt : velocity_ft = +00:07:30 verbose #13066 > > fun m v0 fs => +00:07:30 verbose #13067 > > inl f_net t = fs |> listm.map (fun f => f t) |> listm'.sum +00:07:30 verbose #13068 > > inl a t = f_net t / m +00:07:30 verbose #13069 > > anti_derivative dt v0 a +00:07:30 verbose #13070 > > +00:07:30 verbose #13071 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:30 verbose #13072 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:30 verbose #13073 > > │ ## position_ft │ +00:07:30 verbose #13074 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #13075 > > +00:07:30 verbose #13076 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #13077 > > type position_ft = mass -> position -> velocity -> list (time -> force) -> (time +00:07:30 verbose #13078 > > -> position) +00:07:30 verbose #13079 > > +00:07:30 verbose #13080 > > inl position_ft dt : position_ft = +00:07:30 verbose #13081 > > fun m x0 v0 fs => +00:07:30 verbose #13082 > > velocity_ft dt m v0 fs +00:07:30 verbose #13083 > > |> anti_derivative dt x0 +00:07:30 verbose #13084 > > +00:07:30 verbose #13085 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #13086 > > //// test +00:07:30 verbose #13087 > > +00:07:30 verbose #13088 > > inl pedal_coast (t : time) : force = +00:07:30 verbose #13089 > > inl t_cycle = 20 +00:07:30 verbose #13090 > > inl n_complete : i32 = t / t_cycle |> conv +00:07:30 verbose #13091 > > inl remainder = t - conv n_complete * t_cycle +00:07:30 verbose #13092 > > if remainder > 0 && remainder < 10 +00:07:30 verbose #13093 > > then 10 +00:07:30 verbose #13094 > > else 0 +00:07:30 verbose #13095 > > +00:07:30 verbose #13096 > > inl x = am'.init_series -5 45 0.1 +00:07:30 verbose #13097 > > inl y = x |> am.map pedal_coast +00:07:30 verbose #13098 > > "child pedaling then coasting", "time (s)", "", ;[[ "force on bike (N)", x, y ]] +00:07:30 verbose #13099 > > +00:07:30 verbose #13100 > > ╭─[ 43.95ms - return value ]───────────────────────────────────────────────────╮ +00:07:30 verbose #13101 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:30 verbose #13102 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:30 verbose #13103 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:30 verbose #13104 > > │ stroke="none"/> │ +00:07:30 verbose #13105 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:30 verbose #13106 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:30 verbose #13107 > > │ fill="#FFFFFF"> │ +00:07:30 verbose #13108 > > │ child pedaling then coasting │ +00:07:30 verbose #13109 > > │ </text> │ +00:07:30 verbose #13110 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ +00:07:30 verbose #13111 > > │ y2="75"/> │ +00:07:30 verbose #13112 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:30 verbose #13113 > > │ y2="75"/> │ +00:07:30 verbose #13114 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ +00:07:30 verbose #13115 > > │ y2="75"/> │ +00:07:30 verbose #13116 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ +00:07:30 verbose #13117 > > │ y2="75"/> │ +00:07:30 verbose #13118 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ +00:07:30 verbose #13119 > > │ y2="75"/> │ +00:07:30 verbose #13120 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ +00:07:30 verbose #13121 > > │ x2="109" y2="75"/> │ +00:07:30 verbose #13122 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:30 verbose #13123 > > │ x2="119" y2="75"/> │ +00:07:30 verbose #13124 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ +00:07:30 verbose #13125 > > │ x2="129" y2="75"/> │ +00:07:30 verbose #13126 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ +00:07:30 verbose #13127 > > │ x2="139" y2="75"/> │ +00:07:30 verbose #13128 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ +00:07:30 verbose #13129 > > │ x2="149" y2="75"/> │ +00:07:30 verbose #13130 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ +00:07:30 verbose #13131 > > │ x2="159" y2="75"/> │ +00:07:30 verbose #13132 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ +00:07:30 verbose #13133 > > │ x2="169" y2="75"/> │ +00:07:30 verbose #13134 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ +00:07:30 verbose #13135 > > │ x2="179" y2="75"/> │ +00:07:30 verbose #13136 > > │ <line ... │ +00:07:30 verbose #13137 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:30 verbose #13138 > > +00:07:30 verbose #13139 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:30 verbose #13140 > > //// test +00:07:30 verbose #13141 > > +00:07:30 verbose #13142 > > inl x = am'.init_series -5 45 1 +00:07:30 verbose #13143 > > inl y = x |> am.map (position_ft 0.1f64 20 0 0 [[ pedal_coast ]]) +00:07:30 verbose #13144 > > "child pedaling then coasting", "time (s)", "", ;[[ "position of bike (m)", x, y +00:07:30 verbose #13145 > > ]] +00:07:31 verbose #13146 > > +00:07:31 verbose #13147 > > ╭─[ 271.57ms - return value ]──────────────────────────────────────────────────╮ +00:07:31 verbose #13148 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:31 verbose #13149 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:31 verbose #13150 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:31 verbose #13151 > > │ stroke="none"/> │ +00:07:31 verbose #13152 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:31 verbose #13153 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:31 verbose #13154 > > │ fill="#FFFFFF"> │ +00:07:31 verbose #13155 > > │ child pedaling then coasting │ +00:07:31 verbose #13156 > > │ </text> │ +00:07:31 verbose #13157 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ +00:07:31 verbose #13158 > > │ y2="75"/> │ +00:07:31 verbose #13159 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:31 verbose #13160 > > │ y2="75"/> │ +00:07:31 verbose #13161 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ +00:07:31 verbose #13162 > > │ y2="75"/> │ +00:07:31 verbose #13163 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ +00:07:31 verbose #13164 > > │ y2="75"/> │ +00:07:31 verbose #13165 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ +00:07:31 verbose #13166 > > │ y2="75"/> │ +00:07:31 verbose #13167 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ +00:07:31 verbose #13168 > > │ x2="109" y2="75"/> │ +00:07:31 verbose #13169 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:31 verbose #13170 > > │ x2="119" y2="75"/> │ +00:07:31 verbose #13171 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ +00:07:31 verbose #13172 > > │ x2="129" y2="75"/> │ +00:07:31 verbose #13173 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ +00:07:31 verbose #13174 > > │ x2="139" y2="75"/> │ +00:07:31 verbose #13175 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ +00:07:31 verbose #13176 > > │ x2="149" y2="75"/> │ +00:07:31 verbose #13177 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ +00:07:31 verbose #13178 > > │ x2="159" y2="75"/> │ +00:07:31 verbose #13179 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ +00:07:31 verbose #13180 > > │ x2="169" y2="75"/> │ +00:07:31 verbose #13181 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ +00:07:31 verbose #13182 > > │ x2="179" y2="75"/> │ +00:07:31 verbose #13183 > > │ <line ... │ +00:07:31 verbose #13184 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13185 > > +00:07:31 verbose #13186 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:31 verbose #13187 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:31 verbose #13188 > > │ ## velocity_fv │ +00:07:31 verbose #13189 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13190 > > +00:07:31 verbose #13191 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13192 > > inl newton_second_v m fs v0 = +00:07:31 verbose #13193 > > fs |> listm.map (fun f => f v0) |> listm'.sum |> fun x => x / m +00:07:31 verbose #13194 > > +00:07:31 verbose #13195 > > inl update_velocity dt m fs v0 = +00:07:31 verbose #13196 > > v0 + newton_second_v m fs v0 * dt +00:07:31 verbose #13197 > > +00:07:31 verbose #13198 > > inl velocity_fv dt m v0 fs t = +00:07:31 verbose #13199 > > stream.iterate (update_velocity dt m fs) v0 +00:07:31 verbose #13200 > > |> stream.try_item (t / dt |> math.round |> abs) +00:07:31 verbose #13201 > > |> optionm'.default_value 0 +00:07:31 verbose #13202 > > +00:07:31 verbose #13203 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13204 > > inl f_air drag rho area v = +00:07:31 verbose #13205 > > -drag * rho * area * abs v * v / 2 +00:07:31 verbose #13206 > > +00:07:31 verbose #13207 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13208 > > //// test +00:07:31 verbose #13209 > > +00:07:31 verbose #13210 > > inl x = am'.init_series 0 60 0.5 +00:07:31 verbose #13211 > > inl y = x |> am.map (velocity_fv 1 70 0f64 [[ fun _ => 100; f_air 2 1.225 0.6 +00:07:31 verbose #13212 > > ]]) +00:07:31 verbose #13213 > > "bike velocity", "time (s)", "", ;[[ "velocity of bike (m/s)", x, y ]] +00:07:31 verbose #13214 > > +00:07:31 verbose #13215 > > ╭─[ 258.40ms - return value ]──────────────────────────────────────────────────╮ +00:07:31 verbose #13216 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:31 verbose #13217 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:31 verbose #13218 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:31 verbose #13219 > > │ stroke="none"/> │ +00:07:31 verbose #13220 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:31 verbose #13221 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:31 verbose #13222 > > │ fill="#FFFFFF"> │ +00:07:31 verbose #13223 > > │ bike velocity │ +00:07:31 verbose #13224 > > │ </text> │ +00:07:31 verbose #13225 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ +00:07:31 verbose #13226 > > │ y2="75"/> │ +00:07:31 verbose #13227 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:31 verbose #13228 > > │ y2="75"/> │ +00:07:31 verbose #13229 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ +00:07:31 verbose #13230 > > │ y2="75"/> │ +00:07:31 verbose #13231 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ +00:07:31 verbose #13232 > > │ y2="75"/> │ +00:07:31 verbose #13233 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ +00:07:31 verbose #13234 > > │ y2="75"/> │ +00:07:31 verbose #13235 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ +00:07:31 verbose #13236 > > │ x2="103" y2="75"/> │ +00:07:31 verbose #13237 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ +00:07:31 verbose #13238 > > │ x2="111" y2="75"/> │ +00:07:31 verbose #13239 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:31 verbose #13240 > > │ x2="119" y2="75"/> │ +00:07:31 verbose #13241 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ +00:07:31 verbose #13242 > > │ x2="128" y2="75"/> │ +00:07:31 verbose #13243 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ +00:07:31 verbose #13244 > > │ x2="136" y2="75"/> │ +00:07:31 verbose #13245 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ +00:07:31 verbose #13246 > > │ x2="144" y2="75"/> │ +00:07:31 verbose #13247 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ +00:07:31 verbose #13248 > > │ x2="153" y2="75"/> │ +00:07:31 verbose #13249 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ +00:07:31 verbose #13250 > > │ x2="161" y2="75"/> │ +00:07:31 verbose #13251 > > │ <line opacity="1" str... │ +00:07:31 verbose #13252 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13253 > > +00:07:31 verbose #13254 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:31 verbose #13255 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:31 verbose #13256 > > │ ## velocity_ftv │ +00:07:31 verbose #13257 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13258 > > +00:07:31 verbose #13259 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13260 > > inl newton_second_tv m fs (t, v0) = +00:07:31 verbose #13261 > > inl f_net = fs |> listm.map (fun f => f (t, v0)) |> listm'.sum +00:07:31 verbose #13262 > > inl acc = f_net / m +00:07:31 verbose #13263 > > 1, acc +00:07:31 verbose #13264 > > +00:07:31 verbose #13265 > > inl update_tv dt m fs (t, v0) = +00:07:31 verbose #13266 > > inl dtdt, dvdt = newton_second_tv m fs (t, v0) +00:07:31 verbose #13267 > > t + dtdt * dt, v0 + dvdt * dt +00:07:31 verbose #13268 > > +00:07:31 verbose #13269 > > inl velocity_ftv dt m tv0 fs t = +00:07:31 verbose #13270 > > stream.iterate (join update_tv dt m fs) tv0 +00:07:31 verbose #13271 > > |> stream.try_item (t / dt |> math.round |> abs) +00:07:31 verbose #13272 > > |> optionm.map snd +00:07:31 verbose #13273 > > |> optionm'.default_value 0 +00:07:31 verbose #13274 > > +00:07:31 verbose #13275 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13276 > > //// test +00:07:31 verbose #13277 > > +00:07:31 verbose #13278 > > inl x = am'.init_series 0 100 0.1 +00:07:31 verbose #13279 > > inl y = +00:07:31 verbose #13280 > > x +00:07:31 verbose #13281 > > |> am.map ( +00:07:31 verbose #13282 > > velocity_ftv 0.1 20 (dyn (0, 0)) [[ fun (t, _) => pedal_coast t; fun (_, +00:07:31 verbose #13283 > > v) => f_air 2 1.225 0.5 v ]] +00:07:31 verbose #13284 > > ) +00:07:31 verbose #13285 > > "pedaling and coasting with air", "time (s)", "", ;[[ "velocity of bike (m/s)", +00:07:31 verbose #13286 > > x, y ]] +00:07:31 verbose #13287 > > +00:07:31 verbose #13288 > > ╭─[ 277.34ms - return value ]──────────────────────────────────────────────────╮ +00:07:31 verbose #13289 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:31 verbose #13290 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:31 verbose #13291 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:31 verbose #13292 > > │ stroke="none"/> │ +00:07:31 verbose #13293 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:31 verbose #13294 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:31 verbose #13295 > > │ fill="#FFFFFF"> │ +00:07:31 verbose #13296 > > │ pedaling and coasting with air │ +00:07:31 verbose #13297 > > │ </text> │ +00:07:31 verbose #13298 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ +00:07:31 verbose #13299 > > │ y2="75"/> │ +00:07:31 verbose #13300 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:31 verbose #13301 > > │ y2="75"/> │ +00:07:31 verbose #13302 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ +00:07:31 verbose #13303 > > │ y2="75"/> │ +00:07:31 verbose #13304 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ +00:07:31 verbose #13305 > > │ y2="75"/> │ +00:07:31 verbose #13306 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ +00:07:31 verbose #13307 > > │ y2="75"/> │ +00:07:31 verbose #13308 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ +00:07:31 verbose #13309 > > │ x2="109" y2="75"/> │ +00:07:31 verbose #13310 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:31 verbose #13311 > > │ x2="119" y2="75"/> │ +00:07:31 verbose #13312 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ +00:07:31 verbose #13313 > > │ x2="129" y2="75"/> │ +00:07:31 verbose #13314 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ +00:07:31 verbose #13315 > > │ x2="139" y2="75"/> │ +00:07:31 verbose #13316 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ +00:07:31 verbose #13317 > > │ x2="149" y2="75"/> │ +00:07:31 verbose #13318 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ +00:07:31 verbose #13319 > > │ x2="159" y2="75"/> │ +00:07:31 verbose #13320 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ +00:07:31 verbose #13321 > > │ x2="169" y2="75"/> │ +00:07:31 verbose #13322 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ +00:07:31 verbose #13323 > > │ x2="179" y2="75"/> │ +00:07:31 verbose #13324 > > │ <lin... │ +00:07:31 verbose #13325 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13326 > > +00:07:31 verbose #13327 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:31 verbose #13328 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:31 verbose #13329 > > │ ## velocity_ftxv │ +00:07:31 verbose #13330 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13331 > > +00:07:31 verbose #13332 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13333 > > nominal state_1d = time * position * velocity +00:07:31 verbose #13334 > > nominal rrr = f64 * f64 * f64 +00:07:31 verbose #13335 > > +00:07:31 verbose #13336 > > inl newton_second_1d m fs (state_1d (t, x0, v0)) = +00:07:31 verbose #13337 > > inl f_net = fs |> listm.map (fun f => f (state_1d (t, x0, v0))) |> +00:07:31 verbose #13338 > > listm'.sum +00:07:31 verbose #13339 > > inl acc = f_net / m +00:07:31 verbose #13340 > > rrr (1f64, v0, acc) +00:07:31 verbose #13341 > > +00:07:31 verbose #13342 > > inl euler_1d dt deriv (state_1d (t0, x0, v0) as t) = +00:07:31 verbose #13343 > > inl (rrr (_, _, dvdt)) = deriv t +00:07:31 verbose #13344 > > inl t1 = t0 + dt +00:07:31 verbose #13345 > > inl x1 = x0 + v0 * dt +00:07:31 verbose #13346 > > inl v1 = v0 + dvdt * dt +00:07:31 verbose #13347 > > state_1d (t1, x1, v1) +00:07:31 verbose #13348 > > +00:07:31 verbose #13349 > > inl update_txv dt m fs = +00:07:31 verbose #13350 > > newton_second_1d m fs |> euler_1d dt +00:07:31 verbose #13351 > > +00:07:31 verbose #13352 > > inl states_txv dt m txv0 fs = +00:07:31 verbose #13353 > > seq.iterate_ (update_txv dt m fs) txv0 +00:07:31 verbose #13354 > > +00:07:31 verbose #13355 > > inl velocity_1d sts t = +00:07:31 verbose #13356 > > inl (state_1d (t0, _, _)) = sts 0 +00:07:31 verbose #13357 > > inl (state_1d (t1, _, _)) = sts 1 +00:07:31 verbose #13358 > > inl dt = t1 - t0 +00:07:31 verbose #13359 > > inl num_steps = t / dt |> math.round |> abs +00:07:31 verbose #13360 > > inl (state_1d (_, _, v0)) = sts num_steps +00:07:31 verbose #13361 > > v0 +00:07:31 verbose #13362 > > +00:07:31 verbose #13363 > > inl velocity_ftxv dt m txv0 fs = +00:07:31 verbose #13364 > > states_txv dt m txv0 fs |> velocity_1d +00:07:31 verbose #13365 > > +00:07:31 verbose #13366 > > inl position_1d sts t = +00:07:31 verbose #13367 > > inl (state_1d (t0, _, _)) = sts 0 +00:07:31 verbose #13368 > > inl (state_1d (t1, _, _)) = sts 1 +00:07:31 verbose #13369 > > inl dt = t1 - t0 +00:07:31 verbose #13370 > > inl num_steps = t / dt |> math.round |> abs +00:07:31 verbose #13371 > > inl (state_1d (_, x0, _)) = sts num_steps +00:07:31 verbose #13372 > > x0 +00:07:31 verbose #13373 > > +00:07:31 verbose #13374 > > inl position_ftxv dt m txv0 fs = +00:07:31 verbose #13375 > > states_txv dt m txv0 fs |> position_1d +00:07:31 verbose #13376 > > +00:07:31 verbose #13377 > > inl spring_force k (state_1d (_, x0, _)) = +00:07:31 verbose #13378 > > -k * x0 +00:07:31 verbose #13379 > > +00:07:31 verbose #13380 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13381 > > //// test +00:07:31 verbose #13382 > > +00:07:31 verbose #13383 > > inl damped_ho_forces () = +00:07:31 verbose #13384 > > [[ +00:07:31 verbose #13385 > > spring_force 0.8 +00:07:31 verbose #13386 > > fun (state_1d (_, _, v0)) => f_air 2 1.225 (pi * math.square 0.02) v0 +00:07:31 verbose #13387 > > fun _ => -0.0027 * 9.80665 +00:07:31 verbose #13388 > > ]] +00:07:31 verbose #13389 > > +00:07:31 verbose #13390 > > inl damped_ho_states () = +00:07:31 verbose #13391 > > states_txv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) +00:07:31 verbose #13392 > > +00:07:31 verbose #13393 > > inl pingpong_position t = +00:07:31 verbose #13394 > > position_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t +00:07:31 verbose #13395 > > +00:07:31 verbose #13396 > > inl x : a _ f64 = am'.init_series 0 3 0.01 +00:07:31 verbose #13397 > > inl y = x |> am.map pingpong_position +00:07:31 verbose #13398 > > "ping pong ball on a slinky", "time (s)", "", ;[[ "position (m)", x, y ]] +00:07:31 verbose #13399 > > +00:07:31 verbose #13400 > > ╭─[ 66.87ms - return value ]───────────────────────────────────────────────────╮ +00:07:31 verbose #13401 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:31 verbose #13402 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:31 verbose #13403 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:31 verbose #13404 > > │ stroke="none"/> │ +00:07:31 verbose #13405 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:31 verbose #13406 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:31 verbose #13407 > > │ fill="#FFFFFF"> │ +00:07:31 verbose #13408 > > │ ping pong ball on a slinky │ +00:07:31 verbose #13409 > > │ </text> │ +00:07:31 verbose #13410 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ +00:07:31 verbose #13411 > > │ y2="75"/> │ +00:07:31 verbose #13412 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:31 verbose #13413 > > │ y2="75"/> │ +00:07:31 verbose #13414 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ +00:07:31 verbose #13415 > > │ y2="75"/> │ +00:07:31 verbose #13416 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ +00:07:31 verbose #13417 > > │ y2="75"/> │ +00:07:31 verbose #13418 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ +00:07:31 verbose #13419 > > │ y2="75"/> │ +00:07:31 verbose #13420 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ +00:07:31 verbose #13421 > > │ x2="103" y2="75"/> │ +00:07:31 verbose #13422 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ +00:07:31 verbose #13423 > > │ x2="111" y2="75"/> │ +00:07:31 verbose #13424 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:31 verbose #13425 > > │ x2="119" y2="75"/> │ +00:07:31 verbose #13426 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ +00:07:31 verbose #13427 > > │ x2="128" y2="75"/> │ +00:07:31 verbose #13428 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ +00:07:31 verbose #13429 > > │ x2="136" y2="75"/> │ +00:07:31 verbose #13430 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ +00:07:31 verbose #13431 > > │ x2="144" y2="75"/> │ +00:07:31 verbose #13432 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ +00:07:31 verbose #13433 > > │ x2="153" y2="75"/> │ +00:07:31 verbose #13434 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ +00:07:31 verbose #13435 > > │ x2="161" y2="75"/> │ +00:07:31 verbose #13436 > > │ <line op... │ +00:07:31 verbose #13437 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13438 > > +00:07:31 verbose #13439 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13440 > > //// test +00:07:31 verbose #13441 > > +00:07:31 verbose #13442 > > inl pingpong_velocity t = +00:07:31 verbose #13443 > > velocity_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t +00:07:31 verbose #13444 > > +00:07:31 verbose #13445 > > inl x = am'.init_series 0 3 0.01 +00:07:31 verbose #13446 > > inl y = x |> am.map pingpong_velocity +00:07:31 verbose #13447 > > "ping pong ball on a slinky", "time (s)", "", ;[[ "velocity (m/s)", x, y ]] +00:07:31 verbose #13448 > > +00:07:31 verbose #13449 > > ╭─[ 76.80ms - return value ]───────────────────────────────────────────────────╮ +00:07:31 verbose #13450 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:31 verbose #13451 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:31 verbose #13452 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:31 verbose #13453 > > │ stroke="none"/> │ +00:07:31 verbose #13454 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:31 verbose #13455 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:31 verbose #13456 > > │ fill="#FFFFFF"> │ +00:07:31 verbose #13457 > > │ ping pong ball on a slinky │ +00:07:31 verbose #13458 > > │ </text> │ +00:07:31 verbose #13459 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ +00:07:31 verbose #13460 > > │ y2="75"/> │ +00:07:31 verbose #13461 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:31 verbose #13462 > > │ y2="75"/> │ +00:07:31 verbose #13463 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ +00:07:31 verbose #13464 > > │ y2="75"/> │ +00:07:31 verbose #13465 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ +00:07:31 verbose #13466 > > │ y2="75"/> │ +00:07:31 verbose #13467 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ +00:07:31 verbose #13468 > > │ y2="75"/> │ +00:07:31 verbose #13469 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ +00:07:31 verbose #13470 > > │ x2="103" y2="75"/> │ +00:07:31 verbose #13471 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ +00:07:31 verbose #13472 > > │ x2="111" y2="75"/> │ +00:07:31 verbose #13473 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:31 verbose #13474 > > │ x2="119" y2="75"/> │ +00:07:31 verbose #13475 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ +00:07:31 verbose #13476 > > │ x2="128" y2="75"/> │ +00:07:31 verbose #13477 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ +00:07:31 verbose #13478 > > │ x2="136" y2="75"/> │ +00:07:31 verbose #13479 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ +00:07:31 verbose #13480 > > │ x2="144" y2="75"/> │ +00:07:31 verbose #13481 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ +00:07:31 verbose #13482 > > │ x2="153" y2="75"/> │ +00:07:31 verbose #13483 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ +00:07:31 verbose #13484 > > │ x2="161" y2="75"/> │ +00:07:31 verbose #13485 > > │ <line op... │ +00:07:31 verbose #13486 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13487 > > +00:07:31 verbose #13488 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:31 verbose #13489 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:31 verbose #13490 > > │ ## shift │ +00:07:31 verbose #13491 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13492 > > +00:07:31 verbose #13493 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13494 > > type update_function s = s -> s +00:07:31 verbose #13495 > > +00:07:31 verbose #13496 > > type differential_equation s ds = s -> ds +00:07:31 verbose #13497 > > +00:07:31 verbose #13498 > > type numerical_method s ds = differential_equation s ds -> update_function s +00:07:31 verbose #13499 > > +00:07:31 verbose #13500 > > +00:07:31 verbose #13501 > > inl solver method = +00:07:31 verbose #13502 > > method >> seq.iterate +00:07:31 verbose #13503 > > inl solver' method = +00:07:31 verbose #13504 > > method >> seq.iterate' +00:07:31 verbose #13505 > > inl solver_ method = +00:07:31 verbose #13506 > > method >> seq.iterate_ +00:07:31 verbose #13507 > > +00:07:31 verbose #13508 > > +00:07:31 verbose #13509 > > inl euler_cromer_1d dt deriv (state_1d (t0, x0, v0) as t) = +00:07:31 verbose #13510 > > inl (rrr (_, _, dvdt)) = deriv t +00:07:31 verbose #13511 > > inl t1 = t0 + dt +00:07:31 verbose #13512 > > inl v1 = v0 + dvdt * dt +00:07:31 verbose #13513 > > inl x1 = x0 + v1 * dt +00:07:31 verbose #13514 > > state_1d (t1, x1, v1) +00:07:31 verbose #13515 > > +00:07:31 verbose #13516 > > inl update_txv_ec dt m fs = +00:07:31 verbose #13517 > > euler_cromer_1d dt (newton_second_1d m fs) +00:07:31 verbose #13518 > > +00:07:31 verbose #13519 > > prototype (+++) ds : ds -> ds -> ds +00:07:31 verbose #13520 > > prototype scale ds : f64 -> ds -> ds +00:07:31 verbose #13521 > > +00:07:31 verbose #13522 > > instance (+++) rrr = fun (rrr (dtdt0, dxdt0, dvdt0)) (rrr (dtdt1, dxdt1, dvdt1)) +00:07:31 verbose #13523 > > => +00:07:31 verbose #13524 > > rrr (dtdt0 + dtdt1, dxdt0 + dxdt1, dvdt0 + dvdt1) +00:07:31 verbose #13525 > > +00:07:31 verbose #13526 > > instance scale rrr = fun w (rrr (dtdt0, dxdt0, dvdt0)) => +00:07:31 verbose #13527 > > rrr (w * dtdt0, w * dxdt0, w * dvdt0) +00:07:31 verbose #13528 > > +00:07:31 verbose #13529 > > prototype shift s : forall ds. f64 -> ds -> s -> s +00:07:31 verbose #13530 > > +00:07:31 verbose #13531 > > instance shift state_1d = fun dt ds (state_1d (t, x, v)) => +00:07:31 verbose #13532 > > inl dtdt, dxdt, dvdt = +00:07:31 verbose #13533 > > real +00:07:31 verbose #13534 > > match ds with +00:07:31 verbose #13535 > > | rrr x => x +00:07:31 verbose #13536 > > | state_1d x => x +00:07:31 verbose #13537 > > state_1d (t + dtdt * dt, x + dxdt * dt, v + dvdt * dt) +00:07:31 verbose #13538 > > +00:07:31 verbose #13539 > > inl euler dt deriv st0 = +00:07:31 verbose #13540 > > shift dt (deriv st0) st0 +00:07:31 verbose #13541 > > +00:07:31 verbose #13542 > > inl runge_kutta_4 dt deriv st0 = +00:07:31 verbose #13543 > > inl m0 = deriv st0 +00:07:31 verbose #13544 > > inl m1 = deriv (shift (dt / 2) m0 st0) +00:07:31 verbose #13545 > > inl m2 = deriv (shift (dt / 2) m1 st0) +00:07:31 verbose #13546 > > inl m3 = deriv (shift dt m2 st0) +00:07:31 verbose #13547 > > shift (dt / 6) (m0 +++ m1 +++ m1 +++ m2 +++ m2 +++ m3) st0 +00:07:31 verbose #13548 > > +00:07:31 verbose #13549 > > inl exponential (_, x0, v0) = +00:07:31 verbose #13550 > > 1f64, v0, x0 +00:07:31 verbose #13551 > > +00:07:31 verbose #13552 > > inl of_state_1d (state_1d (t, x, v)) = +00:07:31 verbose #13553 > > t, x, v +00:07:31 verbose #13554 > > +00:07:31 verbose #13555 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13556 > > //// test +00:07:31 verbose #13557 > > +00:07:31 verbose #13558 > > solver (euler 0.01) (of_state_1d >> exponential >> state_1d) (state_1d (0, 1, +00:07:31 verbose #13559 > > 1)) 800i32 +00:07:31 verbose #13560 > > |> _assert_eq (state_1d (7.999999999999874, 2864.8311229272326, +00:07:31 verbose #13561 > > 2864.8311229272326)) +00:07:31 verbose #13562 > > +00:07:31 verbose #13563 > > solver (euler_cromer_1d 0.1) (of_state_1d >> exponential >> rrr) (state_1d (0, +00:07:31 verbose #13564 > > 1, 1)) 80i32 +00:07:31 verbose #13565 > > |> _assert_eq (state_1d (7.999999999999988, 3043.379244966009, +00:07:31 verbose #13566 > > 2895.0121485099035)) +00:07:31 verbose #13567 > > +00:07:31 verbose #13568 > > solver (runge_kutta_4 1) (of_state_1d >> exponential >> rrr) (state_1d (0, 1, +00:07:31 verbose #13569 > > 1)) 8i32 +00:07:31 verbose #13570 > > |> _assert_eq (state_1d (8.0, 2894.789038540849, 2894.789038540849)) +00:07:31 verbose #13571 > > +00:07:31 verbose #13572 > > ╭─[ 27.81ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:31 verbose #13573 > > │ assert_eq / actual: struct (8.0, 2864.831123, 2864.831123) / expected: │ +00:07:31 verbose #13574 > > │ struct (8.0, 2864.831123, 2864.831123) │ +00:07:31 verbose #13575 > > │ assert_eq / actual: struct (8.0, 3043.379245, 2895.012149) / expected: │ +00:07:31 verbose #13576 > > │ struct (8.0, 3043.379245, 2895.012149) │ +00:07:31 verbose #13577 > > │ assert_eq / actual: struct (8.0, 2894.789039, 2894.789039) / expected: │ +00:07:31 verbose #13578 > > │ struct (8.0, 2894.789039, 2894.789039) │ +00:07:31 verbose #13579 > > │ │ +00:07:31 verbose #13580 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13581 > > +00:07:31 verbose #13582 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:31 verbose #13583 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:31 verbose #13584 > > │ ## vec │ +00:07:31 verbose #13585 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13586 > > +00:07:31 verbose #13587 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13588 > > type vec = +00:07:31 verbose #13589 > > { +00:07:31 verbose #13590 > > x : f64 +00:07:31 verbose #13591 > > y : f64 +00:07:31 verbose #13592 > > z : f64 +00:07:31 verbose #13593 > > } +00:07:31 verbose #13594 > > +00:07:31 verbose #13595 > > inl vec x y z : vec = +00:07:31 verbose #13596 > > { x y z } +00:07:31 verbose #13597 > > +00:07:31 verbose #13598 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13599 > > //// test +00:07:31 verbose #13600 > > +00:07:31 verbose #13601 > > vec 1 2 3 .z +00:07:31 verbose #13602 > > |> _assert_eq 3 +00:07:31 verbose #13603 > > +00:07:31 verbose #13604 > > ╭─[ 13.66ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:31 verbose #13605 > > │ assert_eq / actual: 3.0 / expected: 3.0 │ +00:07:31 verbose #13606 > > │ │ +00:07:31 verbose #13607 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13608 > > +00:07:31 verbose #13609 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:31 verbose #13610 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:31 verbose #13611 > > │ ### consts │ +00:07:31 verbose #13612 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13613 > > +00:07:31 verbose #13614 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13615 > > inl i_hat () = vec 1 0 0 +00:07:31 verbose #13616 > > inl j_hat () = vec 0 1 0 +00:07:31 verbose #13617 > > inl k_hat () = vec 0 0 1 +00:07:31 verbose #13618 > > inl zero_vec () = vec 0 0 0 +00:07:31 verbose #13619 > > +00:07:31 verbose #13620 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:31 verbose #13621 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:31 verbose #13622 > > │ ### ^+^ │ +00:07:31 verbose #13623 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:31 verbose #13624 > > +00:07:31 verbose #13625 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:31 verbose #13626 > > inl (^+^) (a : vec) (b : vec) = +00:07:31 verbose #13627 > > vec (a.x + b.x) (a.y + b.y) (a.z + b.z) +00:07:32 verbose #13628 > > +00:07:32 verbose #13629 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13630 > > //// test +00:07:32 verbose #13631 > > +00:07:32 verbose #13632 > > vec 1 2 3 ^+^ vec 4 5 6 +00:07:32 verbose #13633 > > |> _assert_eq (vec 5 7 9) +00:07:32 verbose #13634 > > +00:07:32 verbose #13635 > > ╭─[ 13.88ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13636 > > │ assert_eq / actual: struct (5.0, 7.0, 9.0) / expected: struct (5.0, 7.0, │ +00:07:32 verbose #13637 > > │ 9.0) │ +00:07:32 verbose #13638 > > │ │ +00:07:32 verbose #13639 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13640 > > +00:07:32 verbose #13641 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13642 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13643 > > │ ### sum_vec │ +00:07:32 verbose #13644 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13645 > > +00:07:32 verbose #13646 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13647 > > inl sum_vec vs = +00:07:32 verbose #13648 > > vs |> listm.fold (^+^) (zero_vec ()) +00:07:32 verbose #13649 > > +00:07:32 verbose #13650 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13651 > > //// test +00:07:32 verbose #13652 > > +00:07:32 verbose #13653 > > [[ vec 1 2 3; vec 4 5 6 ]] +00:07:32 verbose #13654 > > |> sum_vec +00:07:32 verbose #13655 > > |> _assert_eq (vec 5 7 9) +00:07:32 verbose #13656 > > +00:07:32 verbose #13657 > > ╭─[ 17.06ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13658 > > │ assert_eq / actual: struct (5.0, 7.0, 9.0) / expected: struct (5.0, 7.0, │ +00:07:32 verbose #13659 > > │ 9.0) │ +00:07:32 verbose #13660 > > │ │ +00:07:32 verbose #13661 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13662 > > +00:07:32 verbose #13663 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13664 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13665 > > │ ### *^ │ +00:07:32 verbose #13666 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13667 > > +00:07:32 verbose #13668 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13669 > > inl (*^) c { x y z } = +00:07:32 verbose #13670 > > vec (c * x) (c * y) (c * z) +00:07:32 verbose #13671 > > +00:07:32 verbose #13672 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13673 > > //// test +00:07:32 verbose #13674 > > +00:07:32 verbose #13675 > > 5 *^ vec 1 2 3 +00:07:32 verbose #13676 > > |> _assert_eq (vec 5 10 15) +00:07:32 verbose #13677 > > +00:07:32 verbose #13678 > > ╭─[ 13.49ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13679 > > │ assert_eq / actual: struct (5.0, 10.0, 15.0) / expected: struct (5.0, 10.0, │ +00:07:32 verbose #13680 > > │ 15.0) │ +00:07:32 verbose #13681 > > │ │ +00:07:32 verbose #13682 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13683 > > +00:07:32 verbose #13684 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13685 > > //// test +00:07:32 verbose #13686 > > +00:07:32 verbose #13687 > > 3 *^ i_hat () ^+^ 4 *^ k_hat () +00:07:32 verbose #13688 > > |> _assert_eq (vec 3 0 4) +00:07:32 verbose #13689 > > +00:07:32 verbose #13690 > > ╭─[ 16.19ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13691 > > │ assert_eq / actual: struct (3.0, 0.0, 4.0) / expected: struct (3.0, 0.0, │ +00:07:32 verbose #13692 > > │ 4.0) │ +00:07:32 verbose #13693 > > │ │ +00:07:32 verbose #13694 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13695 > > +00:07:32 verbose #13696 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13697 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13698 > > │ ### ^* │ +00:07:32 verbose #13699 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13700 > > +00:07:32 verbose #13701 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13702 > > inl (^*) v c = +00:07:32 verbose #13703 > > (*^) c v +00:07:32 verbose #13704 > > +00:07:32 verbose #13705 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13706 > > //// test +00:07:32 verbose #13707 > > +00:07:32 verbose #13708 > > vec 1 2 3 ^* 5 +00:07:32 verbose #13709 > > |> _assert_eq (vec 5 10 15) +00:07:32 verbose #13710 > > +00:07:32 verbose #13711 > > ╭─[ 13.82ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13712 > > │ assert_eq / actual: struct (5.0, 10.0, 15.0) / expected: struct (5.0, 10.0, │ +00:07:32 verbose #13713 > > │ 15.0) │ +00:07:32 verbose #13714 > > │ │ +00:07:32 verbose #13715 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13716 > > +00:07:32 verbose #13717 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13718 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13719 > > │ ### ^/ │ +00:07:32 verbose #13720 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13721 > > +00:07:32 verbose #13722 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13723 > > inl (^/) { x y z } c = +00:07:32 verbose #13724 > > vec (x / c) (y / c) (z / c) +00:07:32 verbose #13725 > > +00:07:32 verbose #13726 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13727 > > //// test +00:07:32 verbose #13728 > > +00:07:32 verbose #13729 > > vec 1 2 3 ^/ 5 +00:07:32 verbose #13730 > > |> _assert_eq (vec 0.2 0.4 0.6) +00:07:32 verbose #13731 > > +00:07:32 verbose #13732 > > ╭─[ 16.24ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13733 > > │ assert_eq / actual: struct (0.2, 0.4, 0.6) / expected: struct (0.2, 0.4, │ +00:07:32 verbose #13734 > > │ 0.6) │ +00:07:32 verbose #13735 > > │ │ +00:07:32 verbose #13736 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13737 > > +00:07:32 verbose #13738 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13739 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13740 > > │ ### negate_vec │ +00:07:32 verbose #13741 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13742 > > +00:07:32 verbose #13743 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13744 > > inl negate_vec v = +00:07:32 verbose #13745 > > v ^* -1 +00:07:32 verbose #13746 > > +00:07:32 verbose #13747 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13748 > > //// test +00:07:32 verbose #13749 > > +00:07:32 verbose #13750 > > vec 1 2 3 +00:07:32 verbose #13751 > > |> negate_vec +00:07:32 verbose #13752 > > |> _assert_eq (vec -1 -2 -3) +00:07:32 verbose #13753 > > +00:07:32 verbose #13754 > > ╭─[ 13.98ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13755 > > │ assert_eq / actual: struct (-1.0, -2.0, -3.0) / expected: struct (-1.0, │ +00:07:32 verbose #13756 > > │ -2.0, -3.0) │ +00:07:32 verbose #13757 > > │ │ +00:07:32 verbose #13758 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13759 > > +00:07:32 verbose #13760 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13761 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13762 > > │ ### ^-^ │ +00:07:32 verbose #13763 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13764 > > +00:07:32 verbose #13765 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13766 > > inl (^-^) a b = +00:07:32 verbose #13767 > > a ^+^ (negate_vec b) +00:07:32 verbose #13768 > > +00:07:32 verbose #13769 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13770 > > //// test +00:07:32 verbose #13771 > > +00:07:32 verbose #13772 > > vec 1 2 3 ^-^ vec 4 5 6 +00:07:32 verbose #13773 > > |> _assert_eq (vec -3 -3 -3) +00:07:32 verbose #13774 > > +00:07:32 verbose #13775 > > ╭─[ 15.77ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13776 > > │ assert_eq / actual: struct (-3.0, -3.0, -3.0) / expected: struct (-3.0, │ +00:07:32 verbose #13777 > > │ -3.0, -3.0) │ +00:07:32 verbose #13778 > > │ │ +00:07:32 verbose #13779 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13780 > > +00:07:32 verbose #13781 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13782 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13783 > > │ ### <.> │ +00:07:32 verbose #13784 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13785 > > +00:07:32 verbose #13786 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13787 > > inl (<.>) { x = ax y = ay z = az } { x = bx y = by z = bz } = +00:07:32 verbose #13788 > > ax * bx + ay * by + az * bz +00:07:32 verbose #13789 > > +00:07:32 verbose #13790 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13791 > > //// test +00:07:32 verbose #13792 > > +00:07:32 verbose #13793 > > vec 1 2 3 <.> vec 4 5 6 +00:07:32 verbose #13794 > > |> _assert_eq 32 +00:07:32 verbose #13795 > > +00:07:32 verbose #13796 > > ╭─[ 13.78ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13797 > > │ assert_eq / actual: 32.0 / expected: 32.0 │ +00:07:32 verbose #13798 > > │ │ +00:07:32 verbose #13799 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13800 > > +00:07:32 verbose #13801 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13802 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13803 > > │ ### \>\< │ +00:07:32 verbose #13804 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13805 > > +00:07:32 verbose #13806 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13807 > > inl (><) (a : vec) (b : vec) = +00:07:32 verbose #13808 > > vec +00:07:32 verbose #13809 > > (a.y * b.z - a.z * b.y) +00:07:32 verbose #13810 > > (a.z * b.x - a.x * b.z) +00:07:32 verbose #13811 > > (a.x * b.y - a.y * b.x) +00:07:32 verbose #13812 > > +00:07:32 verbose #13813 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13814 > > //// test +00:07:32 verbose #13815 > > +00:07:32 verbose #13816 > > vec 1 2 3 >< vec 4 5 6 +00:07:32 verbose #13817 > > |> _assert_eq (vec -3 6 -3) +00:07:32 verbose #13818 > > +00:07:32 verbose #13819 > > ╭─[ 14.69ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13820 > > │ assert_eq / actual: struct (-3.0, 6.0, -3.0) / expected: struct (-3.0, 6.0, │ +00:07:32 verbose #13821 > > │ -3.0) │ +00:07:32 verbose #13822 > > │ │ +00:07:32 verbose #13823 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13824 > > +00:07:32 verbose #13825 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13826 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13827 > > │ ### magnitude │ +00:07:32 verbose #13828 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13829 > > +00:07:32 verbose #13830 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13831 > > inl magnitude v = +00:07:32 verbose #13832 > > v <.> v |> sqrt +00:07:32 verbose #13833 > > +00:07:32 verbose #13834 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13835 > > //// test +00:07:32 verbose #13836 > > +00:07:32 verbose #13837 > > vec 1 2 3 +00:07:32 verbose #13838 > > |> magnitude +00:07:32 verbose #13839 > > |> _assert_approx_eq None 3.7416573867739413 +00:07:32 verbose #13840 > > +00:07:32 verbose #13841 > > ╭─[ 13.80ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13842 > > │ assert_approx_eq / actual: 3.741657387 / expected: 3.741657387 │ +00:07:32 verbose #13843 > > │ │ +00:07:32 verbose #13844 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13845 > > +00:07:32 verbose #13846 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13847 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13848 > > │ ### v1 │ +00:07:32 verbose #13849 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13850 > > +00:07:32 verbose #13851 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13852 > > inl v1 t = +00:07:32 verbose #13853 > > 2 *^ (t ** 2 *^ i_hat () ^+^ 3 *^ (t ** 3 *^ j_hat () ^+^ t ** 4 *^ k_hat +00:07:32 verbose #13854 > > ())) +00:07:32 verbose #13855 > > +00:07:32 verbose #13856 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13857 > > //// test +00:07:32 verbose #13858 > > +00:07:32 verbose #13859 > > v1 1 +00:07:32 verbose #13860 > > |> _assert_eq (vec 2 6 6) +00:07:32 verbose #13861 > > +00:07:32 verbose #13862 > > ╭─[ 17.40ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13863 > > │ assert_eq / actual: struct (2.0, 6.0, 6.0) / expected: struct (2.0, 6.0, │ +00:07:32 verbose #13864 > > │ 6.0) │ +00:07:32 verbose #13865 > > │ │ +00:07:32 verbose #13866 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13867 > > +00:07:32 verbose #13868 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13869 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13870 > > │ ### vec_derivative │ +00:07:32 verbose #13871 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13872 > > +00:07:32 verbose #13873 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13874 > > type vec_derivative = (f64 -> vec) -> f64 -> vec +00:07:32 verbose #13875 > > +00:07:32 verbose #13876 > > inl vec_derivative dt : vec_derivative = +00:07:32 verbose #13877 > > fun v t => +00:07:32 verbose #13878 > > (v (t + dt / 2) ^-^ v (t - dt / 2)) ^/ dt +00:07:32 verbose #13879 > > +00:07:32 verbose #13880 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13881 > > //// test +00:07:32 verbose #13882 > > +00:07:32 verbose #13883 > > vec_derivative 0.01 v1 3 .x +00:07:32 verbose #13884 > > |> _assert_approx_eq None (derivative 0.01 (v1 >> fun v => v.x) 3) +00:07:32 verbose #13885 > > +00:07:32 verbose #13886 > > ╭─[ 14.31ms - stdout ]─────────────────────────────────────────────────────────╮ +00:07:32 verbose #13887 > > │ assert_approx_eq / actual: 12.0 / expected: 12.0 │ +00:07:32 verbose #13888 > > │ │ +00:07:32 verbose #13889 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13890 > > +00:07:32 verbose #13891 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:32 verbose #13892 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:32 verbose #13893 > > │ ## states_ps │ +00:07:32 verbose #13894 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:32 verbose #13895 > > +00:07:32 verbose #13896 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13897 > > nominal particle_state = +00:07:32 verbose #13898 > > { +00:07:32 verbose #13899 > > mass : f64 +00:07:32 verbose #13900 > > charge : f64 +00:07:32 verbose #13901 > > time : f64 +00:07:32 verbose #13902 > > pos_vec : vec +00:07:32 verbose #13903 > > velocity : vec +00:07:32 verbose #13904 > > } +00:07:32 verbose #13905 > > +00:07:32 verbose #13906 > > inl default_particle_state () : particle_state = +00:07:32 verbose #13907 > > particle_state { +00:07:32 verbose #13908 > > mass = 1 +00:07:32 verbose #13909 > > charge = 0 +00:07:32 verbose #13910 > > time = 0 +00:07:32 verbose #13911 > > pos_vec = zero_vec () +00:07:32 verbose #13912 > > velocity = zero_vec () +00:07:32 verbose #13913 > > } +00:07:32 verbose #13914 > > +00:07:32 verbose #13915 > > type one_body_force = particle_state -> vec +00:07:32 verbose #13916 > > +00:07:32 verbose #13917 > > nominal d_particle_state = +00:07:32 verbose #13918 > > { +00:07:32 verbose #13919 > > dmdt : f64 +00:07:32 verbose #13920 > > dqdt : f64 +00:07:32 verbose #13921 > > dtdt : f64 +00:07:32 verbose #13922 > > drdt : vec +00:07:32 verbose #13923 > > dvdt : vec +00:07:32 verbose #13924 > > } +00:07:32 verbose #13925 > > +00:07:32 verbose #13926 > > inl newton_second_ps (fs : list one_body_force) (st : particle_state) : +00:07:32 verbose #13927 > > d_particle_state = +00:07:32 verbose #13928 > > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec +00:07:32 verbose #13929 > > d_particle_state { +00:07:32 verbose #13930 > > dmdt = 0 +00:07:32 verbose #13931 > > dqdt = 0 +00:07:32 verbose #13932 > > dtdt = 1 +00:07:32 verbose #13933 > > drdt = st.velocity +00:07:32 verbose #13934 > > dvdt = f_net ^/ st.mass +00:07:32 verbose #13935 > > } +00:07:32 verbose #13936 > > +00:07:32 verbose #13937 > > inl earth_surface_gravity (st : particle_state) = +00:07:32 verbose #13938 > > inl g = 9.80665 +00:07:32 verbose #13939 > > -st.mass * g *^ k_hat () +00:07:32 verbose #13940 > > +00:07:32 verbose #13941 > > inl air_resistance drag rho area (st : particle_state) = +00:07:32 verbose #13942 > > -0.5 * drag * rho * area * magnitude st.velocity *^ st.velocity +00:07:32 verbose #13943 > > +00:07:32 verbose #13944 > > inl euler_cromer_ps dt (deriv : particle_state -> d_particle_state) +00:07:32 verbose #13945 > > (particle_state st) = +00:07:32 verbose #13946 > > inl dst : d_particle_state = deriv (particle_state st) +00:07:32 verbose #13947 > > inl v' = st.velocity ^+^ dst.dvdt ^* dt +00:07:32 verbose #13948 > > particle_state { st with +00:07:32 verbose #13949 > > time = st.time + dt +00:07:32 verbose #13950 > > pos_vec = st.pos_vec ^+^ v' ^* dt +00:07:32 verbose #13951 > > velocity = st.velocity ^+^ dst.dvdt ^* dt +00:07:32 verbose #13952 > > } +00:07:32 verbose #13953 > > +00:07:32 verbose #13954 > > instance (+++) d_particle_state = fun (dps : d_particle_state) (dps' : +00:07:32 verbose #13955 > > d_particle_state) => +00:07:32 verbose #13956 > > d_particle_state { +00:07:32 verbose #13957 > > dmdt = dps.dmdt + dps'.dmdt +00:07:32 verbose #13958 > > dqdt = dps.dqdt + dps'.dqdt +00:07:32 verbose #13959 > > dtdt = dps.dtdt + dps'.dtdt +00:07:32 verbose #13960 > > drdt = dps.drdt ^+^ dps'.drdt +00:07:32 verbose #13961 > > dvdt = dps.dvdt ^+^ dps'.dvdt +00:07:32 verbose #13962 > > } +00:07:32 verbose #13963 > > +00:07:32 verbose #13964 > > instance scale d_particle_state = fun w (dps : d_particle_state) => +00:07:32 verbose #13965 > > d_particle_state { +00:07:32 verbose #13966 > > dmdt = w * dps.dmdt +00:07:32 verbose #13967 > > dqdt = w * dps.dqdt +00:07:32 verbose #13968 > > dtdt = w * dps.dtdt +00:07:32 verbose #13969 > > drdt = w *^ dps.drdt +00:07:32 verbose #13970 > > dvdt = w *^ dps.dvdt +00:07:32 verbose #13971 > > } +00:07:32 verbose #13972 > > +00:07:32 verbose #13973 > > instance shift particle_state = fun dt dps (particle_state st) => +00:07:32 verbose #13974 > > inl (d_particle_state dps) = +00:07:32 verbose #13975 > > real +00:07:32 verbose #13976 > > match dps with +00:07:32 verbose #13977 > > | d_particle_state _ => dps +00:07:32 verbose #13978 > > particle_state { st with +00:07:32 verbose #13979 > > time = st.time + dps.dtdt * dt +00:07:32 verbose #13980 > > pos_vec = st.pos_vec ^+^ dps.drdt ^* dt +00:07:32 verbose #13981 > > velocity = st.velocity ^+^ dps.dvdt ^* dt +00:07:32 verbose #13982 > > } +00:07:32 verbose #13983 > > +00:07:32 verbose #13984 > > inl states_ps (method : numerical_method particle_state d_particle_state) : _ -> +00:07:32 verbose #13985 > > _ -> i32 -> particle_state = +00:07:32 verbose #13986 > > newton_second_ps >> method >> seq.iterate_ +00:07:32 verbose #13987 > > +00:07:32 verbose #13988 > > inl z_ge0 sts = +00:07:32 verbose #13989 > > sts +00:07:32 verbose #13990 > > |> seq.take_while_ (fun (particle_state st) _ => st.pos_vec.z >= 0) +00:07:32 verbose #13991 > > +00:07:32 verbose #13992 > > inl trajectory sts = +00:07:32 verbose #13993 > > sts |> listm.map (fun (particle_state st) => st.pos_vec.y, st.pos_vec.z) +00:07:32 verbose #13994 > > +00:07:32 verbose #13995 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #13996 > > //// test +00:07:32 verbose #13997 > > +00:07:32 verbose #13998 > > inl update_ps (method : numerical_method particle_state d_particle_state) = +00:07:32 verbose #13999 > > newton_second_ps >> method +00:07:32 verbose #14000 > > +00:07:32 verbose #14001 > > inl position_ps (method : numerical_method particle_state d_particle_state) fs +00:07:32 verbose #14002 > > st t = +00:07:32 verbose #14003 > > inl states : i32 -> particle_state = states_ps method fs st +00:07:32 verbose #14004 > > inl dt = (states 1).time - (states 0).time +00:07:32 verbose #14005 > > inl num_steps = t / dt |> math.round |> abs +00:07:32 verbose #14006 > > inl st1 = solver' method (newton_second_ps fs) st num_steps +00:07:32 verbose #14007 > > st1.pos_vec +00:07:32 verbose #14008 > > +00:07:32 verbose #14009 > > inl sun_gravity (st : particle_state) : vec = +00:07:32 verbose #14010 > > inl big_g = 0.0000000000667408 +00:07:32 verbose #14011 > > inl sun_mass = 1988480000000000000000000000000 +00:07:32 verbose #14012 > > -big_g * sun_mass * st.mass *^ st.pos_vec ^/ magnitude st.pos_vec ** 3 +00:07:32 verbose #14013 > > +00:07:32 verbose #14014 > > inl wind_force v_wind drag rho area (st : particle_state) = +00:07:32 verbose #14015 > > inl v_rel = st.velocity ^-^ v_wind +00:07:32 verbose #14016 > > -0.5 * drag * rho * area * magnitude v_rel *^ v_rel +00:07:32 verbose #14017 > > +00:07:32 verbose #14018 > > inl rock_state () = +00:07:32 verbose #14019 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:32 verbose #14020 > > particle_state { default_particle_state' with +00:07:32 verbose #14021 > > mass = 2 +00:07:32 verbose #14022 > > velocity = vec 3 0 4 +00:07:32 verbose #14023 > > } +00:07:32 verbose #14024 > > +00:07:32 verbose #14025 > > inl halley_update dt = +00:07:32 verbose #14026 > > update_ps (euler_cromer_ps dt) [[ sun_gravity ]] +00:07:32 verbose #14027 > > +00:07:32 verbose #14028 > > inl halley_initial () = +00:07:32 verbose #14029 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:32 verbose #14030 > > particle_state { default_particle_state' with +00:07:32 verbose #14031 > > mass = 220000000000000 +00:07:32 verbose #14032 > > pos_vec = 87660000000 *^ i_hat () +00:07:32 verbose #14033 > > velocity = 54569 *^ j_hat () +00:07:32 verbose #14034 > > } +00:07:32 verbose #14035 > > +00:07:32 verbose #14036 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:32 verbose #14037 > > //// test +00:07:32 verbose #14038 > > +00:07:32 verbose #14039 > > inl baseball_forces () = +00:07:32 verbose #14040 > > inl area = pi * (0.074 / 2) ** 2 +00:07:32 verbose #14041 > > [[ +00:07:32 verbose #14042 > > earth_surface_gravity +00:07:32 verbose #14043 > > air_resistance 0.3 1.225 area +00:07:32 verbose #14044 > > ]] +00:07:32 verbose #14045 > > +00:07:32 verbose #14046 > > inl baseball_trajectory dt v0 theta_deg = +00:07:32 verbose #14047 > > inl theta_rad = theta_deg * pi / 180 +00:07:32 verbose #14048 > > inl vy0 = v0 * cos theta_rad +00:07:32 verbose #14049 > > inl vz0 = v0 * sin theta_rad +00:07:32 verbose #14050 > > inl initial_state = +00:07:32 verbose #14051 > > particle_state { +00:07:32 verbose #14052 > > mass = 0.145 +00:07:32 verbose #14053 > > charge = 0 +00:07:32 verbose #14054 > > time = 0 +00:07:32 verbose #14055 > > pos_vec = zero_vec () +00:07:32 verbose #14056 > > velocity = vec 0 vy0 vz0 +00:07:32 verbose #14057 > > } +00:07:32 verbose #14058 > > states_ps (euler_cromer_ps dt) (baseball_forces ()) initial_state +00:07:32 verbose #14059 > > >> Some +00:07:32 verbose #14060 > > |> z_ge0 +00:07:32 verbose #14061 > > |> trajectory +00:07:32 verbose #14062 > > +00:07:32 verbose #14063 > > inl baseball_range dt v0 theta_deg = +00:07:32 verbose #14064 > > baseball_trajectory dt v0 theta_deg +00:07:32 verbose #14065 > > |> listm.fold (fun _ (y, _) => y) 0 +00:07:32 verbose #14066 > > +00:07:32 verbose #14067 > > inl x : a _ f64 = am'.init_series 10 80 1 +00:07:32 verbose #14068 > > inl y = x |> am.map (baseball_range 0.01 45) +00:07:32 verbose #14069 > > "range for a baseball hit at 45 m/s", +00:07:32 verbose #14070 > > "angle above horizontal (degrees)", +00:07:32 verbose #14071 > > "", +00:07:32 verbose #14072 > > ;[[ "horizontal range (m)", x, y ]] +00:07:33 verbose #14073 > > +00:07:33 verbose #14074 > > ╭─[ 768.37ms - return value ]──────────────────────────────────────────────────╮ +00:07:33 verbose #14075 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:33 verbose #14076 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:33 verbose #14077 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:33 verbose #14078 > > │ stroke="none"/> │ +00:07:33 verbose #14079 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:33 verbose #14080 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:33 verbose #14081 > > │ fill="#FFFFFF"> │ +00:07:33 verbose #14082 > > │ range for a baseball hit at 45 m/s │ +00:07:33 verbose #14083 > > │ </text> │ +00:07:33 verbose #14084 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="55" y1="424" x2="55" │ +00:07:33 verbose #14085 > > │ y2="75"/> │ +00:07:33 verbose #14086 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │ +00:07:33 verbose #14087 > > │ y2="75"/> │ +00:07:33 verbose #14088 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:33 verbose #14089 > > │ y2="75"/> │ +00:07:33 verbose #14090 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │ +00:07:33 verbose #14091 > > │ y2="75"/> │ +00:07:33 verbose #14092 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="84" y1="424" x2="84" │ +00:07:33 verbose #14093 > > │ y2="75"/> │ +00:07:33 verbose #14094 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="91" y1="424" x2="91" │ +00:07:33 verbose #14095 > > │ y2="75"/> │ +00:07:33 verbose #14096 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="98" y1="424" x2="98" │ +00:07:33 verbose #14097 > > │ y2="75"/> │ +00:07:33 verbose #14098 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="105" y1="424" │ +00:07:33 verbose #14099 > > │ x2="105" y2="75"/> │ +00:07:33 verbose #14100 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="112" y1="424" │ +00:07:33 verbose #14101 > > │ x2="112" y2="75"/> │ +00:07:33 verbose #14102 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:33 verbose #14103 > > │ x2="119" y2="75"/> │ +00:07:33 verbose #14104 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="127" y1="424" │ +00:07:33 verbose #14105 > > │ x2="127" y2="75"/> │ +00:07:33 verbose #14106 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="134" y1="424" │ +00:07:33 verbose #14107 > > │ x2="134" y2="75"/> │ +00:07:33 verbose #14108 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="141" y1="424" │ +00:07:33 verbose #14109 > > │ x2="141" y2="75"/> │ +00:07:33 verbose #14110 > > │ <lin... │ +00:07:33 verbose #14111 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:33 verbose #14112 > > +00:07:33 verbose #14113 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:33 verbose #14114 > > //// test +00:07:33 verbose #14115 > > +00:07:33 verbose #14116 > > inl best_angle (min, max) = +00:07:33 verbose #14117 > > let rec loop theta_deg (best_range, best_theta_deg) = +00:07:33 verbose #14118 > > if theta_deg > max +00:07:33 verbose #14119 > > then best_range, best_theta_deg +00:07:33 verbose #14120 > > else +00:07:33 verbose #14121 > > inl range = baseball_range 0.01 45 theta_deg +00:07:33 verbose #14122 > > loop +00:07:33 verbose #14123 > > (theta_deg + 1) +00:07:33 verbose #14124 > > (if range > best_range +00:07:33 verbose #14125 > > then range, theta_deg +00:07:33 verbose #14126 > > else best_range, best_theta_deg) +00:07:33 verbose #14127 > > loop min (0f64, min) +00:07:33 verbose #14128 > > +00:07:33 verbose #14129 > > best_angle (30f64, 60f64) +00:07:33 verbose #14130 > > |> _assert_eq (116.77499158246208, 41) +00:07:33 verbose #14131 > > +00:07:33 verbose #14132 > > ╭─[ 406.88ms - stdout ]────────────────────────────────────────────────────────╮ +00:07:33 verbose #14133 > > │ assert_eq / actual: struct (116.7749916, 41.0) / expected: struct │ +00:07:33 verbose #14134 > > │ (116.7749916, 41.0) │ +00:07:33 verbose #14135 > > │ │ +00:07:33 verbose #14136 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:33 verbose #14137 > > +00:07:33 verbose #14138 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:33 verbose #14139 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:33 verbose #14140 > > │ ## relativity_ps │ +00:07:33 verbose #14141 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:33 verbose #14142 > > +00:07:33 verbose #14143 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:33 verbose #14144 > > inl relativity_ps fs (st : particle_state) = +00:07:33 verbose #14145 > > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec +00:07:33 verbose #14146 > > inl c = 299792458 +00:07:33 verbose #14147 > > inl u = st.velocity ^/ c +00:07:33 verbose #14148 > > inl acc = sqrt (1 - (u <.> u)) *^ (f_net ^-^ (f_net <.> u) *^ u) ^/ st.mass +00:07:33 verbose #14149 > > d_particle_state { +00:07:33 verbose #14150 > > dmdt = 0 +00:07:33 verbose #14151 > > dqdt = 0 +00:07:33 verbose #14152 > > dtdt = 1 +00:07:33 verbose #14153 > > drdt = st.velocity +00:07:33 verbose #14154 > > dvdt = acc +00:07:33 verbose #14155 > > } +00:07:33 verbose #14156 > > +00:07:33 verbose #14157 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:33 verbose #14158 > > //// test +00:07:33 verbose #14159 > > +00:07:33 verbose #14160 > > inl year = 365.25 * 24 * 60 * 60 +00:07:33 verbose #14161 > > inl c = 299792458 +00:07:33 verbose #14162 > > inl ~method = runge_kutta_4 100000 +00:07:33 verbose #14163 > > inl forces = [[ fun _ => 10 *^ i_hat () ]] +00:07:33 verbose #14164 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:33 verbose #14165 > > inl initial_state = +00:07:33 verbose #14166 > > particle_state { default_particle_state' with +00:07:33 verbose #14167 > > mass = 1 +00:07:33 verbose #14168 > > } +00:07:33 verbose #14169 > > +00:07:33 verbose #14170 > > inl newton_states = solver_ method (newton_second_ps forces) initial_state +00:07:33 verbose #14171 > > inl relativity_states = solver_ method (relativity_ps forces) initial_state +00:07:33 verbose #14172 > > +00:07:33 verbose #14173 > > inl newton_x, newton_y = +00:07:33 verbose #14174 > > newton_states +00:07:33 verbose #14175 > > >> Some +00:07:33 verbose #14176 > > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year) +00:07:33 verbose #14177 > > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c) +00:07:33 verbose #14178 > > |> listm'.unzip +00:07:33 verbose #14179 > > +00:07:33 verbose #14180 > > inl _, relativity_y = +00:07:33 verbose #14181 > > relativity_states +00:07:33 verbose #14182 > > >> Some +00:07:33 verbose #14183 > > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year) +00:07:33 verbose #14184 > > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c) +00:07:33 verbose #14185 > > |> listm'.unzip +00:07:33 verbose #14186 > > +00:07:33 verbose #14187 > > inl newton_x : a i32 _ = newton_x |> listm.toArray +00:07:33 verbose #14188 > > inl newton_y : a i32 _ = newton_y |> listm.toArray +00:07:33 verbose #14189 > > inl relativity_y : a i32 _ = relativity_y |> listm.toArray +00:07:33 verbose #14190 > > +00:07:33 verbose #14191 > > "response to a constant force", +00:07:33 verbose #14192 > > "time (years)", +00:07:33 verbose #14193 > > "velocity (multiples of c)", +00:07:33 verbose #14194 > > ;[[ +00:07:33 verbose #14195 > > "newtonian", newton_x, newton_y +00:07:33 verbose #14196 > > "relativistic", newton_x, relativity_y +00:07:33 verbose #14197 > > ]] +00:07:33 verbose #14198 > > +00:07:33 verbose #14199 > > ╭─[ 398.57ms - return value ]──────────────────────────────────────────────────╮ +00:07:33 verbose #14200 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:33 verbose #14201 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:33 verbose #14202 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:33 verbose #14203 > > │ stroke="none"/> │ +00:07:33 verbose #14204 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:33 verbose #14205 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:33 verbose #14206 > > │ fill="#FFFFFF"> │ +00:07:33 verbose #14207 > > │ response to a constant force │ +00:07:33 verbose #14208 > > │ </text> │ +00:07:33 verbose #14209 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ +00:07:33 verbose #14210 > > │ y2="75"/> │ +00:07:33 verbose #14211 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:33 verbose #14212 > > │ y2="75"/> │ +00:07:33 verbose #14213 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ +00:07:33 verbose #14214 > > │ y2="75"/> │ +00:07:33 verbose #14215 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ +00:07:33 verbose #14216 > > │ y2="75"/> │ +00:07:33 verbose #14217 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ +00:07:33 verbose #14218 > > │ y2="75"/> │ +00:07:33 verbose #14219 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ +00:07:33 verbose #14220 > > │ x2="109" y2="75"/> │ +00:07:33 verbose #14221 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:33 verbose #14222 > > │ x2="119" y2="75"/> │ +00:07:33 verbose #14223 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ +00:07:33 verbose #14224 > > │ x2="129" y2="75"/> │ +00:07:33 verbose #14225 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ +00:07:33 verbose #14226 > > │ x2="139" y2="75"/> │ +00:07:33 verbose #14227 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ +00:07:33 verbose #14228 > > │ x2="149" y2="75"/> │ +00:07:33 verbose #14229 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ +00:07:33 verbose #14230 > > │ x2="159" y2="75"/> │ +00:07:33 verbose #14231 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ +00:07:33 verbose #14232 > > │ x2="169" y2="75"/> │ +00:07:33 verbose #14233 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ +00:07:33 verbose #14234 > > │ x2="179" y2="75"/> │ +00:07:33 verbose #14235 > > │ <line ... │ +00:07:33 verbose #14236 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:33 verbose #14237 > > +00:07:33 verbose #14238 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:33 verbose #14239 > > inl uniform_lorentz_force v_e v_b (st : particle_state) = +00:07:33 verbose #14240 > > st.charge *^ (v_e ^+^ st.velocity >< v_b) +00:07:33 verbose #14241 > > +00:07:33 verbose #14242 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:33 verbose #14243 > > //// test +00:07:33 verbose #14244 > > +00:07:33 verbose #14245 > > inl c : f64 = 299792458 +00:07:33 verbose #14246 > > inl ~method = runge_kutta_4 0.000000001 +00:07:33 verbose #14247 > > inl forces = [[ uniform_lorentz_force (zero_vec ()) (k_hat ()) ]] +00:07:33 verbose #14248 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:33 verbose #14249 > > inl initial_state = +00:07:33 verbose #14250 > > particle_state { default_particle_state' with +00:07:33 verbose #14251 > > mass = 0.000000000000000000000000001672621898 +00:07:33 verbose #14252 > > charge = 0.0000000000000000001602176621 +00:07:33 verbose #14253 > > velocity = 0.8 *^ (c *^ j_hat ()) +00:07:33 verbose #14254 > > } +00:07:33 verbose #14255 > > +00:07:33 verbose #14256 > > inl newton_states = solver_ method (newton_second_ps forces) initial_state +00:07:33 verbose #14257 > > inl relativity_states = solver_ method (relativity_ps forces) initial_state +00:07:33 verbose #14258 > > +00:07:33 verbose #14259 > > inl newton_x, newton_y = +00:07:33 verbose #14260 > > newton_states +00:07:33 verbose #14261 > > >> Some +00:07:33 verbose #14262 > > |> seq.take_while_ (fun (particle_state st) i => i < 100i32) +00:07:33 verbose #14263 > > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y) +00:07:33 verbose #14264 > > |> listm'.unzip +00:07:33 verbose #14265 > > +00:07:33 verbose #14266 > > inl relativity_x, relativity_y = +00:07:33 verbose #14267 > > relativity_states +00:07:33 verbose #14268 > > >> Some +00:07:33 verbose #14269 > > |> seq.take_while_ (fun (particle_state st) i => i < 165i32) +00:07:33 verbose #14270 > > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y) +00:07:33 verbose #14271 > > |> listm'.unzip +00:07:33 verbose #14272 > > +00:07:33 verbose #14273 > > inl newton_x : a i32 _ = newton_x |> listm.toArray +00:07:33 verbose #14274 > > inl newton_y : a i32 _ = newton_y |> listm.toArray +00:07:33 verbose #14275 > > +00:07:33 verbose #14276 > > inl relativity_x : a i32 _ = relativity_x |> listm.toArray +00:07:33 verbose #14277 > > inl relativity_y : a i32 _ = relativity_y |> listm.toArray +00:07:33 verbose #14278 > > +00:07:33 verbose #14279 > > "proton in a 1-t magnetic field", +00:07:33 verbose #14280 > > "x (m)", +00:07:33 verbose #14281 > > "y (m)", +00:07:33 verbose #14282 > > ;[[ +00:07:33 verbose #14283 > > "newtonian", newton_x, newton_y +00:07:33 verbose #14284 > > "relativistic", relativity_x, relativity_y +00:07:33 verbose #14285 > > ]] +00:07:34 verbose #14286 > > +00:07:34 verbose #14287 > > ╭─[ 372.11ms - return value ]──────────────────────────────────────────────────╮ +00:07:34 verbose #14288 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:34 verbose #14289 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:34 verbose #14290 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:34 verbose #14291 > > │ stroke="none"/> │ +00:07:34 verbose #14292 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:34 verbose #14293 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:34 verbose #14294 > > │ fill="#FFFFFF"> │ +00:07:34 verbose #14295 > > │ proton in a 1-t magnetic field │ +00:07:34 verbose #14296 > > │ </text> │ +00:07:34 verbose #14297 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="58" y1="424" x2="58" │ +00:07:34 verbose #14298 > > │ y2="75"/> │ +00:07:34 verbose #14299 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:34 verbose #14300 > > │ y2="75"/> │ +00:07:34 verbose #14301 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="81" y1="424" x2="81" │ +00:07:34 verbose #14302 > > │ y2="75"/> │ +00:07:34 verbose #14303 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │ +00:07:34 verbose #14304 > > │ y2="75"/> │ +00:07:34 verbose #14305 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="105" y1="424" │ +00:07:34 verbose #14306 > > │ x2="105" y2="75"/> │ +00:07:34 verbose #14307 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="117" y1="424" │ +00:07:34 verbose #14308 > > │ x2="117" y2="75"/> │ +00:07:34 verbose #14309 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ +00:07:34 verbose #14310 > > │ x2="129" y2="75"/> │ +00:07:34 verbose #14311 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="141" y1="424" │ +00:07:34 verbose #14312 > > │ x2="141" y2="75"/> │ +00:07:34 verbose #14313 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ +00:07:34 verbose #14314 > > │ x2="153" y2="75"/> │ +00:07:34 verbose #14315 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="165" y1="424" │ +00:07:34 verbose #14316 > > │ x2="165" y2="75"/> │ +00:07:34 verbose #14317 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="177" y1="424" │ +00:07:34 verbose #14318 > > │ x2="177" y2="75"/> │ +00:07:34 verbose #14319 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="189" y1="424" │ +00:07:34 verbose #14320 > > │ x2="189" y2="75"/> │ +00:07:34 verbose #14321 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="201" y1="424" │ +00:07:34 verbose #14322 > > │ x2="201" y2="75"/> │ +00:07:34 verbose #14323 > > │ <l... │ +00:07:34 verbose #14324 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:34 verbose #14325 > > +00:07:34 verbose #14326 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:34 verbose #14327 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:34 verbose #14328 > > │ ### system kinetic energy versus time 1 │ +00:07:34 verbose #14329 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:34 verbose #14330 > > +00:07:34 verbose #14331 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:34 verbose #14332 > > //// test +00:07:34 verbose #14333 > > +00:07:34 verbose #14334 > > inl central_force f (particle_state st1) (particle_state st2) = +00:07:34 verbose #14335 > > inl r1 = st1.pos_vec +00:07:34 verbose #14336 > > inl r2 = st2.pos_vec +00:07:34 verbose #14337 > > inl r21 = r2 ^-^ r1 +00:07:34 verbose #14338 > > inl r21mag = magnitude r21 +00:07:34 verbose #14339 > > f r21mag *^ r21 ^/ r21mag +00:07:34 verbose #14340 > > +00:07:34 verbose #14341 > > inl billiard_force k re = +00:07:34 verbose #14342 > > inl f r = +00:07:34 verbose #14343 > > if r >= re +00:07:34 verbose #14344 > > then 0 +00:07:34 verbose #14345 > > else -k * (r - re) +00:07:34 verbose #14346 > > central_force f +00:07:34 verbose #14347 > > +00:07:34 verbose #14348 > > type force_vector = vec +00:07:34 verbose #14349 > > type two_body_force = particle_state -> particle_state -> force_vector +00:07:34 verbose #14350 > > +00:07:34 verbose #14351 > > union force = +00:07:34 verbose #14352 > > | ExternalForce : i32 * one_body_force +00:07:34 verbose #14353 > > | InternalForce : i32 * i32 * two_body_force +00:07:34 verbose #14354 > > +00:07:34 verbose #14355 > > nominal multi_particle_state = list particle_state +00:07:34 verbose #14356 > > +00:07:34 verbose #14357 > > nominal d_multi_particle_state = list d_particle_state +00:07:34 verbose #14358 > > +00:07:34 verbose #14359 > > inl force_on n sts force = +00:07:34 verbose #14360 > > match force with +00:07:34 verbose #14361 > > | ExternalForce (n0, f_one_body) => +00:07:34 verbose #14362 > > if n = n0 +00:07:34 verbose #14363 > > then f_one_body +00:07:34 verbose #14364 > > else fun _ => zero_vec () +00:07:34 verbose #14365 > > | InternalForce (n0, n1, f_two_body) => +00:07:34 verbose #14366 > > if n = n0 +00:07:34 verbose #14367 > > then f_two_body (sts |> listm'.item n1) +00:07:34 verbose #14368 > > elif n = n1 +00:07:34 verbose #14369 > > then f_two_body (sts |> listm'.item n0) +00:07:34 verbose #14370 > > else fun _ => zero_vec () +00:07:34 verbose #14371 > > +00:07:34 verbose #14372 > > inl forces_on n (multi_particle_state sts) fs = +00:07:34 verbose #14373 > > fs |> listm.map (force_on n sts) +00:07:34 verbose #14374 > > +00:07:34 verbose #14375 > > inl newton_second_mps fs (multi_particle_state sts) : d_multi_particle_state = +00:07:34 verbose #14376 > > inl deriv (n, st) = +00:07:34 verbose #14377 > > newton_second_ps (forces_on n (multi_particle_state sts) fs) st +00:07:34 verbose #14378 > > sts |> listm'.indexed |> listm.map deriv |> d_multi_particle_state +00:07:34 verbose #14379 > > +00:07:34 verbose #14380 > > instance (+++) d_multi_particle_state = fun (d_multi_particle_state dsts1) +00:07:34 verbose #14381 > > (d_multi_particle_state dsts2) => +00:07:34 verbose #14382 > > d_multi_particle_state (listm'.zip_with_ (+++) dsts1 dsts2) +00:07:34 verbose #14383 > > +00:07:34 verbose #14384 > > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) => +00:07:34 verbose #14385 > > d_multi_particle_state (dsts |> listm.map (scale w)) +00:07:34 verbose #14386 > > +00:07:34 verbose #14387 > > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) => +00:07:34 verbose #14388 > > inl (d_multi_particle_state dsts) = +00:07:34 verbose #14389 > > real +00:07:34 verbose #14390 > > match dsts with +00:07:34 verbose #14391 > > | d_multi_particle_state _ => dsts +00:07:34 verbose #14392 > > listm'.zip_with_ (shift dt) dsts sts |> multi_particle_state +00:07:34 verbose #14393 > > +00:07:34 verbose #14394 > > inl euler_cromer_mps dt : numerical_method multi_particle_state +00:07:34 verbose #14395 > > d_multi_particle_state = +00:07:34 verbose #14396 > > fun deriv mpst0 => +00:07:34 verbose #14397 > > inl mpst1 = euler dt deriv mpst0 +00:07:34 verbose #14398 > > inl (multi_particle_state sts0) = mpst0 +00:07:34 verbose #14399 > > inl (multi_particle_state sts1) = mpst1 +00:07:34 verbose #14400 > > sts1 +00:07:34 verbose #14401 > > |> listm'.zip_ sts0 +00:07:34 verbose #14402 > > |> listm.map (fun ((particle_state st0), (particle_state st1)) => +00:07:34 verbose #14403 > > particle_state { +00:07:34 verbose #14404 > > st1 with +00:07:34 verbose #14405 > > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt +00:07:34 verbose #14406 > > } +00:07:34 verbose #14407 > > ) +00:07:34 verbose #14408 > > |> multi_particle_state +00:07:34 verbose #14409 > > +00:07:34 verbose #14410 > > inl update_mps (method : numerical_method multi_particle_state +00:07:34 verbose #14411 > > d_multi_particle_state) = +00:07:34 verbose #14412 > > newton_second_mps >> method +00:07:34 verbose #14413 > > +00:07:34 verbose #14414 > > inl states_mps (method : numerical_method multi_particle_state +00:07:34 verbose #14415 > > d_multi_particle_state) = +00:07:34 verbose #14416 > > newton_second_mps >> method >> seq.iterate_ +00:07:34 verbose #14417 > > +00:07:34 verbose #14418 > > +00:07:34 verbose #14419 > > inl kinetic_energy (particle_state st) = +00:07:34 verbose #14420 > > inl m = st.mass +00:07:34 verbose #14421 > > inl v = magnitude st.velocity +00:07:34 verbose #14422 > > 0.5 * m * v ** 2 +00:07:34 verbose #14423 > > +00:07:34 verbose #14424 > > inl system_ke (multi_particle_state sts) = +00:07:34 verbose #14425 > > sts |> listm.map kinetic_energy |> listm'.sum +00:07:34 verbose #14426 > > +00:07:34 verbose #14427 > > inl linear_spring_pe k re (particle_state st1) (particle_state st2) = +00:07:34 verbose #14428 > > inl r1 = st1.pos_vec +00:07:34 verbose #14429 > > inl r2 = st2.pos_vec +00:07:34 verbose #14430 > > inl r21 = r2 ^-^ r1 +00:07:34 verbose #14431 > > inl r21mag = magnitude r21 +00:07:34 verbose #14432 > > k * (r21mag - re) ** 2 / 2 +00:07:34 verbose #14433 > > +00:07:34 verbose #14434 > > inl earth_surface_gravity_pe (particle_state st) = +00:07:34 verbose #14435 > > inl g = 9.80665 +00:07:34 verbose #14436 > > inl m = st.mass +00:07:34 verbose #14437 > > inl z = st.pos_vec.z +00:07:34 verbose #14438 > > m * g * z +00:07:34 verbose #14439 > > +00:07:34 verbose #14440 > > inl two_springs_pe (multi_particle_state sts) = +00:07:34 verbose #14441 > > inl st0 = sts |> listm'.item 0i32 +00:07:34 verbose #14442 > > inl st1 = sts |> listm'.item 1i32 +00:07:34 verbose #14443 > > linear_spring_pe 100 0.5 (default_particle_state ()) st0 +00:07:34 verbose #14444 > > + linear_spring_pe 100 0.5 st0 st1 +00:07:34 verbose #14445 > > + earth_surface_gravity_pe st0 +00:07:34 verbose #14446 > > + earth_surface_gravity_pe st1 +00:07:34 verbose #14447 > > +00:07:34 verbose #14448 > > inl two_springs_me mpst = +00:07:34 verbose #14449 > > system_ke mpst + two_springs_pe mpst +00:07:34 verbose #14450 > > +00:07:34 verbose #14451 > > inl ball_radius () = 0.03 +00:07:34 verbose #14452 > > +00:07:34 verbose #14453 > > inl billiard_forces k = +00:07:34 verbose #14454 > > [[ InternalForce (0, 1, billiard_force k (2 * ball_radius ())) ]] +00:07:34 verbose #14455 > > +00:07:34 verbose #14456 > > inl billiard_update n_method k dt = +00:07:34 verbose #14457 > > update_mps (n_method dt) (billiard_forces k) +00:07:34 verbose #14458 > > +00:07:34 verbose #14459 > > inl billiard_initial () = +00:07:34 verbose #14460 > > inl ball_mass = 0.160 +00:07:34 verbose #14461 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:34 verbose #14462 > > multi_particle_state [[ +00:07:34 verbose #14463 > > particle_state { +00:07:34 verbose #14464 > > default_particle_state' with +00:07:34 verbose #14465 > > mass = ball_mass +00:07:34 verbose #14466 > > pos_vec = zero_vec () +00:07:34 verbose #14467 > > velocity = 0.2 *^ i_hat () +00:07:34 verbose #14468 > > } +00:07:34 verbose #14469 > > particle_state { +00:07:34 verbose #14470 > > default_particle_state' with +00:07:34 verbose #14471 > > mass = ball_mass +00:07:34 verbose #14472 > > pos_vec = i_hat () ^+^ 0.02 *^ j_hat () +00:07:34 verbose #14473 > > velocity = zero_vec () +00:07:34 verbose #14474 > > } +00:07:34 verbose #14475 > > ]] +00:07:34 verbose #14476 > > +00:07:34 verbose #14477 > > inl billiard_states ~n_method k dt = +00:07:34 verbose #14478 > > states_mps (n_method dt) (billiard_forces k) (billiard_initial ()) +00:07:34 verbose #14479 > > +00:07:34 verbose #14480 > > inl billiard_states_finite n_method k dt = +00:07:34 verbose #14481 > > billiard_states n_method k dt +00:07:34 verbose #14482 > > >> Some +00:07:34 verbose #14483 > > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) => +00:07:34 verbose #14484 > > (mpst |> listm'.item 0i32).time <= 10 +00:07:34 verbose #14485 > > ) +00:07:34 verbose #14486 > > +00:07:34 verbose #14487 > > inl momentum (particle_state st) = +00:07:34 verbose #14488 > > inl m = st.mass +00:07:34 verbose #14489 > > inl v = st.velocity +00:07:34 verbose #14490 > > m *^ v +00:07:34 verbose #14491 > > +00:07:34 verbose #14492 > > inl system_p (multi_particle_state sts) = +00:07:34 verbose #14493 > > sts |> listm.map momentum |> sum_vec +00:07:34 verbose #14494 > > +00:07:34 verbose #14495 > > +00:07:34 verbose #14496 > > inl time_ke_ec_x, time_ke_ec_y = +00:07:34 verbose #14497 > > billiard_states_finite euler_cromer_mps 30 0.03 +00:07:34 verbose #14498 > > |> listm.map (fun (multi_particle_state mpst) => +00:07:34 verbose #14499 > > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst) +00:07:34 verbose #14500 > > ) +00:07:34 verbose #14501 > > |> listm'.unzip +00:07:34 verbose #14502 > > +00:07:34 verbose #14503 > > inl time_ke_rk4_x, time_ke_rk4_y = +00:07:34 verbose #14504 > > billiard_states_finite runge_kutta_4 30 0.03 +00:07:34 verbose #14505 > > |> listm.map (fun (multi_particle_state mpst) => +00:07:34 verbose #14506 > > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst) +00:07:34 verbose #14507 > > ) +00:07:34 verbose #14508 > > |> listm'.unzip +00:07:34 verbose #14509 > > +00:07:34 verbose #14510 > > inl time_ke_ec_x : a i32 _ = time_ke_ec_x |> listm.toArray +00:07:34 verbose #14511 > > inl time_ke_ec_y : a i32 _ = time_ke_ec_y |> listm.toArray +00:07:34 verbose #14512 > > +00:07:34 verbose #14513 > > inl time_ke_rk4_x : a i32 _ = time_ke_rk4_x |> listm.toArray +00:07:34 verbose #14514 > > inl time_ke_rk4_y : a i32 _ = time_ke_rk4_y |> listm.toArray +00:07:34 verbose #14515 > > +00:07:34 verbose #14516 > > "system kinetic energy versus time", +00:07:34 verbose #14517 > > "time (s)", +00:07:34 verbose #14518 > > "system kinetic energy (j)", +00:07:34 verbose #14519 > > ;[[ +00:07:34 verbose #14520 > > "euler-cromer", time_ke_ec_x, time_ke_ec_y +00:07:34 verbose #14521 > > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y +00:07:34 verbose #14522 > > ]] +00:07:35 verbose #14523 > > +00:07:35 verbose #14524 > > ╭─[ 1.43s - return value ]─────────────────────────────────────────────────────╮ +00:07:35 verbose #14525 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:35 verbose #14526 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:35 verbose #14527 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:35 verbose #14528 > > │ stroke="none"/> │ +00:07:35 verbose #14529 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:35 verbose #14530 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:35 verbose #14531 > > │ fill="#FFFFFF"> │ +00:07:35 verbose #14532 > > │ system kinetic energy versus time │ +00:07:35 verbose #14533 > > │ </text> │ +00:07:35 verbose #14534 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ +00:07:35 verbose #14535 > > │ y2="75"/> │ +00:07:35 verbose #14536 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:35 verbose #14537 > > │ y2="75"/> │ +00:07:35 verbose #14538 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ +00:07:35 verbose #14539 > > │ y2="75"/> │ +00:07:35 verbose #14540 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ +00:07:35 verbose #14541 > > │ y2="75"/> │ +00:07:35 verbose #14542 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ +00:07:35 verbose #14543 > > │ y2="75"/> │ +00:07:35 verbose #14544 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ +00:07:35 verbose #14545 > > │ x2="109" y2="75"/> │ +00:07:35 verbose #14546 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:35 verbose #14547 > > │ x2="119" y2="75"/> │ +00:07:35 verbose #14548 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ +00:07:35 verbose #14549 > > │ x2="129" y2="75"/> │ +00:07:35 verbose #14550 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ +00:07:35 verbose #14551 > > │ x2="139" y2="75"/> │ +00:07:35 verbose #14552 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ +00:07:35 verbose #14553 > > │ x2="149" y2="75"/> │ +00:07:35 verbose #14554 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ +00:07:35 verbose #14555 > > │ x2="159" y2="75"/> │ +00:07:35 verbose #14556 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ +00:07:35 verbose #14557 > > │ x2="169" y2="75"/> │ +00:07:35 verbose #14558 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ +00:07:35 verbose #14559 > > │ x2="179" y2="75"/> │ +00:07:35 verbose #14560 > > │ <... │ +00:07:35 verbose #14561 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:35 verbose #14562 > > +00:07:35 verbose #14563 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:35 verbose #14564 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:35 verbose #14565 > > │ ### wave 1 │ +00:07:35 verbose #14566 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:35 verbose #14567 > > +00:07:35 verbose #14568 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:35 verbose #14569 > > //// test +00:07:35 verbose #14570 > > +00:07:35 verbose #14571 > > inl linear_spring k re (particle_state st1) (particle_state st2) = +00:07:35 verbose #14572 > > inl r1 = st1.pos_vec +00:07:35 verbose #14573 > > inl r2 = st2.pos_vec +00:07:35 verbose #14574 > > inl r21 = r2 ^-^ r1 +00:07:35 verbose #14575 > > inl r21mag = magnitude r21 +00:07:35 verbose #14576 > > -k * (r21mag - re) *^ r21 ^/ r21mag +00:07:35 verbose #14577 > > +00:07:35 verbose #14578 > > inl fixed_linear_spring k re r1 = +00:07:35 verbose #14579 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:35 verbose #14580 > > linear_spring k re (particle_state { default_particle_state' with pos_vec = +00:07:35 verbose #14581 > > r1 }) +00:07:35 verbose #14582 > > +00:07:35 verbose #14583 > > inl forces_string () = +00:07:35 verbose #14584 > > [[ +00:07:35 verbose #14585 > > ExternalForce (0, fixed_linear_spring 5384 0 (zero_vec ())) +00:07:35 verbose #14586 > > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ())) +00:07:35 verbose #14587 > > ]] ++ ( +00:07:35 verbose #14588 > > listm'.init_series 0 59 1 +00:07:35 verbose #14589 > > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0)) +00:07:35 verbose #14590 > > ) +00:07:35 verbose #14591 > > +00:07:35 verbose #14592 > > inl string_update dt = +00:07:35 verbose #14593 > > update_mps (runge_kutta_4 dt) (forces_string ()) +00:07:35 verbose #14594 > > +00:07:35 verbose #14595 > > inl string_initial_overtone n = +00:07:35 verbose #14596 > > inl ball_mass = 0.0008293 * 0.65 / 64 +00:07:35 verbose #14597 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:35 verbose #14598 > > listm'.init_series 0.01 0.64 0.01 +00:07:35 verbose #14599 > > |> listm.map (fun x => +00:07:35 verbose #14600 > > inl y = 0.005 * sin (conv n * pi * x / 0.65) +00:07:35 verbose #14601 > > particle_state { +00:07:35 verbose #14602 > > default_particle_state' with +00:07:35 verbose #14603 > > mass = ball_mass +00:07:35 verbose #14604 > > pos_vec = x *^ i_hat () ^+^ y *^ j_hat () +00:07:35 verbose #14605 > > velocity = zero_vec () +00:07:35 verbose #14606 > > } +00:07:35 verbose #14607 > > ) +00:07:35 verbose #14608 > > |> multi_particle_state +00:07:35 verbose #14609 > > +00:07:35 verbose #14610 > > inl string_initial_pluck () = +00:07:35 verbose #14611 > > inl ball_mass = 0.0008293 * 0.65 / 64 +00:07:35 verbose #14612 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:35 verbose #14613 > > listm'.init_series 0.01 0.64 0.01 +00:07:35 verbose #14614 > > |> listm.map (fun x => +00:07:35 verbose #14615 > > inl y = +00:07:35 verbose #14616 > > inl n = if x <= 0.51 then 0 else 0.65 +00:07:35 verbose #14617 > > 0.005 / (0.51 - n) * (x - n) +00:07:35 verbose #14618 > > particle_state { +00:07:35 verbose #14619 > > default_particle_state' with +00:07:35 verbose #14620 > > mass = ball_mass +00:07:35 verbose #14621 > > pos_vec = x *^ i_hat () ^+^ y *^ j_hat () +00:07:35 verbose #14622 > > velocity = zero_vec () +00:07:35 verbose #14623 > > } +00:07:35 verbose #14624 > > ) +00:07:35 verbose #14625 > > |> multi_particle_state +00:07:35 verbose #14626 > > +00:07:35 verbose #14627 > > let main () = +00:07:35 verbose #14628 > > inl ~frames = listm'.init_series 0 9 1f64 +00:07:35 verbose #14629 > > inl initial_state = string_initial_overtone 3i32 +00:07:35 verbose #14630 > > inl frames = +00:07:35 verbose #14631 > > frames +00:07:35 verbose #14632 > > |> listm.map (fun n => +00:07:35 verbose #14633 > > inl (multi_particle_state sts) = +00:07:35 verbose #14634 > > seq.iterate' (string_update 0.000025) initial_state |> fun f => +00:07:35 verbose #14635 > > f 0f64 +00:07:35 verbose #14636 > > inl rs = +00:07:35 verbose #14637 > > [[ zero_vec () ]] +00:07:35 verbose #14638 > > ++ (sts |> listm.map (fun (particle_state st) => st.pos_vec)) +00:07:35 verbose #14639 > > ++ [[ 0.65 *^ i_hat () ]] +00:07:35 verbose #14640 > > inl x, y = +00:07:35 verbose #14641 > > rs +00:07:35 verbose #14642 > > |> listm.map (fun r => r.x, r.y) +00:07:35 verbose #14643 > > |> listm'.unzip +00:07:35 verbose #14644 > > inl x : a i32 _ = x |> listm.toArray +00:07:35 verbose #14645 > > inl y : a i32 _ = y |> listm.toArray +00:07:35 verbose #14646 > > x, y +00:07:35 verbose #14647 > > ) +00:07:35 verbose #14648 > > |> listm.toArray : a i32 _ +00:07:35 verbose #14649 > > +00:07:35 verbose #14650 > > inl n = 0i32 +00:07:35 verbose #14651 > > +00:07:35 verbose #14652 > > inl x, y = index frames n +00:07:35 verbose #14653 > > +00:07:35 verbose #14654 > > "wave", +00:07:35 verbose #14655 > > "position (m)", +00:07:35 verbose #14656 > > "displacement (m)", +00:07:35 verbose #14657 > > ;[[ +00:07:35 verbose #14658 > > ($"$\"{!n}\"" : string), x, y +00:07:35 verbose #14659 > > ]] +00:07:35 verbose #14660 > > +00:07:35 verbose #14661 > > ╭─[ 154.46ms - return value ]──────────────────────────────────────────────────╮ +00:07:35 verbose #14662 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:35 verbose #14663 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:35 verbose #14664 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:35 verbose #14665 > > │ stroke="none"/> │ +00:07:35 verbose #14666 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:35 verbose #14667 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:35 verbose #14668 > > │ fill="#FFFFFF"> │ +00:07:35 verbose #14669 > > │ wave │ +00:07:35 verbose #14670 > > │ </text> │ +00:07:35 verbose #14671 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │ +00:07:35 verbose #14672 > > │ y2="75"/> │ +00:07:35 verbose #14673 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:35 verbose #14674 > > │ y2="75"/> │ +00:07:35 verbose #14675 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │ +00:07:35 verbose #14676 > > │ y2="75"/> │ +00:07:35 verbose #14677 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │ +00:07:35 verbose #14678 > > │ y2="75"/> │ +00:07:35 verbose #14679 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │ +00:07:35 verbose #14680 > > │ y2="75"/> │ +00:07:35 verbose #14681 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="100" y1="424" │ +00:07:35 verbose #14682 > > │ x2="100" y2="75"/> │ +00:07:35 verbose #14683 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="108" y1="424" │ +00:07:35 verbose #14684 > > │ x2="108" y2="75"/> │ +00:07:35 verbose #14685 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="116" y1="424" │ +00:07:35 verbose #14686 > > │ x2="116" y2="75"/> │ +00:07:35 verbose #14687 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="123" y1="424" │ +00:07:35 verbose #14688 > > │ x2="123" y2="75"/> │ +00:07:35 verbose #14689 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="131" y1="424" │ +00:07:35 verbose #14690 > > │ x2="131" y2="75"/> │ +00:07:35 verbose #14691 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ +00:07:35 verbose #14692 > > │ x2="139" y2="75"/> │ +00:07:35 verbose #14693 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="146" y1="424" │ +00:07:35 verbose #14694 > > │ x2="146" y2="75"/> │ +00:07:35 verbose #14695 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="154" y1="424" │ +00:07:35 verbose #14696 > > │ x2="154" y2="75"/> │ +00:07:35 verbose #14697 > > │ <line opacity="1" stroke="#323... │ +00:07:35 verbose #14698 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:35 verbose #14699 > > +00:07:35 verbose #14700 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:35 verbose #14701 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:35 verbose #14702 > > │ ### system kinetic energy versus time 2 │ +00:07:35 verbose #14703 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:35 verbose #14704 > > +00:07:35 verbose #14705 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:35 verbose #14706 > > //// test +00:07:35 verbose #14707 > > +00:07:35 verbose #14708 > > inl central_force f (particle_state st1) (particle_state st2) = +00:07:35 verbose #14709 > > inl r1 = st1.pos_vec +00:07:35 verbose #14710 > > inl r2 = st2.pos_vec +00:07:35 verbose #14711 > > inl r21 = r2 ^-^ r1 +00:07:35 verbose #14712 > > inl r21mag = magnitude r21 +00:07:35 verbose #14713 > > f r21mag *^ r21 ^/ r21mag +00:07:35 verbose #14714 > > +00:07:35 verbose #14715 > > inl billiard_force k re = +00:07:35 verbose #14716 > > inl f r = +00:07:35 verbose #14717 > > if r >= re +00:07:35 verbose #14718 > > then 0 +00:07:35 verbose #14719 > > else -k * (r - re) +00:07:35 verbose #14720 > > central_force f +00:07:35 verbose #14721 > > +00:07:35 verbose #14722 > > type force_vector = vec +00:07:35 verbose #14723 > > type two_body_force = particle_state -> particle_state -> force_vector +00:07:35 verbose #14724 > > +00:07:35 verbose #14725 > > union force t = +00:07:35 verbose #14726 > > | ExternalForce : t * one_body_force +00:07:35 verbose #14727 > > | InternalForce : t * t * two_body_force +00:07:35 verbose #14728 > > +00:07:35 verbose #14729 > > nominal multi_particle_state = stream.stream particle_state +00:07:35 verbose #14730 > > +00:07:35 verbose #14731 > > nominal d_multi_particle_state = stream.stream d_particle_state +00:07:35 verbose #14732 > > +00:07:35 verbose #14733 > > inl force_on n s force = +00:07:35 verbose #14734 > > match force with +00:07:35 verbose #14735 > > | ExternalForce (n0, f_one_body) => +00:07:35 verbose #14736 > > if n = n0 +00:07:35 verbose #14737 > > then f_one_body +00:07:35 verbose #14738 > > else fun _ => zero_vec () +00:07:35 verbose #14739 > > | InternalForce (n0, n1, f_two_body) => +00:07:35 verbose #14740 > > if n = n0 +00:07:35 verbose #14741 > > then s |> stream.try_item n1 |> optionm.map f_two_body +00:07:35 verbose #14742 > > elif n = n1 +00:07:35 verbose #14743 > > then s |> stream.try_item n0 |> optionm.map f_two_body +00:07:35 verbose #14744 > > else None +00:07:35 verbose #14745 > > |> optionm'.default_value (fun _ => zero_vec ()) +00:07:35 verbose #14746 > > +00:07:35 verbose #14747 > > inl forces_on n (multi_particle_state sts) fs = +00:07:35 verbose #14748 > > fs +00:07:35 verbose #14749 > > |> listm.map (force_on n sts) +00:07:35 verbose #14750 > > +00:07:35 verbose #14751 > > inl newton_second_mps fs ((multi_particle_state sts) as mpst) = +00:07:35 verbose #14752 > > inl deriv (n, st) = +00:07:35 verbose #14753 > > newton_second_ps (forces_on n mpst fs) st +00:07:35 verbose #14754 > > sts |> stream.indexed |> stream.map deriv |> d_multi_particle_state +00:07:35 verbose #14755 > > +00:07:35 verbose #14756 > > instance (+++) d_multi_particle_state = +00:07:35 verbose #14757 > > fun (d_multi_particle_state dsts1) (d_multi_particle_state dsts2) => +00:07:35 verbose #14758 > > (dsts1, dsts2) +00:07:35 verbose #14759 > > ||> stream.zip_with (+++) +00:07:35 verbose #14760 > > |> d_multi_particle_state +00:07:35 verbose #14761 > > +00:07:35 verbose #14762 > > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) => +00:07:35 verbose #14763 > > dsts +00:07:35 verbose #14764 > > |> stream.map (scale w) +00:07:35 verbose #14765 > > |> d_multi_particle_state +00:07:35 verbose #14766 > > +00:07:35 verbose #14767 > > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) => +00:07:35 verbose #14768 > > inl (d_multi_particle_state dsts) = +00:07:35 verbose #14769 > > real +00:07:35 verbose #14770 > > match dsts with +00:07:35 verbose #14771 > > | d_multi_particle_state _ => dsts +00:07:35 verbose #14772 > > (dsts, sts) +00:07:35 verbose #14773 > > ||> stream.zip_with (shift dt) +00:07:35 verbose #14774 > > |> stream.memoize +00:07:35 verbose #14775 > > |> fun x => x () +00:07:35 verbose #14776 > > |> multi_particle_state +00:07:35 verbose #14777 > > +00:07:35 verbose #14778 > > inl euler_cromer_mps dt : numerical_method multi_particle_state +00:07:35 verbose #14779 > > d_multi_particle_state = +00:07:35 verbose #14780 > > fun deriv ((multi_particle_state sts0) as mpst0) => +00:07:35 verbose #14781 > > inl (multi_particle_state sts1) = euler dt deriv mpst0 +00:07:35 verbose #14782 > > (sts0, sts1) +00:07:35 verbose #14783 > > ||> stream.zip +00:07:35 verbose #14784 > > |> stream.map (fun ((particle_state st0), (particle_state st1)) => +00:07:35 verbose #14785 > > particle_state { +00:07:35 verbose #14786 > > st1 with +00:07:35 verbose #14787 > > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt +00:07:35 verbose #14788 > > } +00:07:35 verbose #14789 > > ) +00:07:35 verbose #14790 > > |> multi_particle_state +00:07:35 verbose #14791 > > +00:07:35 verbose #14792 > > inl update_mps (method : numerical_method multi_particle_state +00:07:35 verbose #14793 > > d_multi_particle_state) = +00:07:35 verbose #14794 > > newton_second_mps >> method +00:07:35 verbose #14795 > > +00:07:35 verbose #14796 > > inl states_mps (method : numerical_method multi_particle_state +00:07:35 verbose #14797 > > d_multi_particle_state) = +00:07:35 verbose #14798 > > newton_second_mps +00:07:35 verbose #14799 > > >> method +00:07:35 verbose #14800 > > >> (fun x (multi_particle_state y) => +00:07:35 verbose #14801 > > y +00:07:35 verbose #14802 > > |> stream.memoize +00:07:35 verbose #14803 > > |> (fun x => x ()) +00:07:35 verbose #14804 > > |> multi_particle_state |> x +00:07:35 verbose #14805 > > ) +00:07:35 verbose #14806 > > // >> stream.iterate +00:07:35 verbose #14807 > > >> seq.iterate' +00:07:35 verbose #14808 > > +00:07:35 verbose #14809 > > inl kinetic_energy (particle_state st) = +00:07:35 verbose #14810 > > inl m = st.mass +00:07:35 verbose #14811 > > inl v = magnitude st.velocity +00:07:35 verbose #14812 > > 0.5 * m * v ** 2 +00:07:35 verbose #14813 > > +00:07:35 verbose #14814 > > inl system_ke (multi_particle_state sts) = +00:07:35 verbose #14815 > > sts +00:07:35 verbose #14816 > > |> stream.map kinetic_energy +00:07:35 verbose #14817 > > |> stream.sum +00:07:35 verbose #14818 > > +00:07:35 verbose #14819 > > inl linear_spring_pe k re (particle_state st1) (particle_state st2) = +00:07:35 verbose #14820 > > inl r1 = st1.pos_vec +00:07:35 verbose #14821 > > inl r2 = st2.pos_vec +00:07:35 verbose #14822 > > inl r21 = r2 ^-^ r1 +00:07:35 verbose #14823 > > inl r21mag = magnitude r21 +00:07:35 verbose #14824 > > k * (r21mag - re) ** 2 / 2 +00:07:35 verbose #14825 > > +00:07:35 verbose #14826 > > inl earth_surface_gravity_pe (particle_state st) = +00:07:35 verbose #14827 > > inl g = 9.80665 +00:07:35 verbose #14828 > > inl m = st.mass +00:07:35 verbose #14829 > > inl z = st.pos_vec.z +00:07:35 verbose #14830 > > m * g * z +00:07:35 verbose #14831 > > +00:07:35 verbose #14832 > > inl ball_radius () = 0.03 +00:07:35 verbose #14833 > > +00:07:35 verbose #14834 > > inl billiard_forces k = +00:07:35 verbose #14835 > > [[ InternalForce (0i32, 1, billiard_force k (2 * ball_radius ())) ]] +00:07:35 verbose #14836 > > +00:07:35 verbose #14837 > > inl billiard_initial () = +00:07:35 verbose #14838 > > inl ball_mass = 0.160 +00:07:35 verbose #14839 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:35 verbose #14840 > > [[ +00:07:35 verbose #14841 > > particle_state { +00:07:35 verbose #14842 > > default_particle_state' with +00:07:35 verbose #14843 > > mass = ball_mass +00:07:35 verbose #14844 > > pos_vec = zero_vec () +00:07:35 verbose #14845 > > velocity = 0.2 *^ i_hat () +00:07:35 verbose #14846 > > } +00:07:35 verbose #14847 > > particle_state { +00:07:35 verbose #14848 > > default_particle_state' with +00:07:35 verbose #14849 > > mass = ball_mass +00:07:35 verbose #14850 > > pos_vec = i_hat () ^+^ 0.02 *^ j_hat () +00:07:35 verbose #14851 > > velocity = zero_vec () +00:07:35 verbose #14852 > > } +00:07:35 verbose #14853 > > ]] +00:07:35 verbose #14854 > > |> stream.from_list +00:07:35 verbose #14855 > > |> multi_particle_state +00:07:35 verbose #14856 > > +00:07:35 verbose #14857 > > inl billiard_states ~n_method k dt = +00:07:35 verbose #14858 > > states_mps (n_method dt) (billiard_forces k) (billiard_initial ()) +00:07:35 verbose #14859 > > +00:07:35 verbose #14860 > > inl billiard_states_finite n_method k dt = +00:07:35 verbose #14861 > > billiard_states n_method k dt +00:07:35 verbose #14862 > > >> Some +00:07:35 verbose #14863 > > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) => +00:07:35 verbose #14864 > > match mpst |> stream.try_item 0i32 with +00:07:35 verbose #14865 > > | Some st => +00:07:35 verbose #14866 > > st.time <= 10 +00:07:35 verbose #14867 > > | None => false +00:07:35 verbose #14868 > > ) +00:07:35 verbose #14869 > > +00:07:35 verbose #14870 > > inl momentum (particle_state st) = +00:07:35 verbose #14871 > > inl m = st.mass +00:07:35 verbose #14872 > > inl v = st.velocity +00:07:35 verbose #14873 > > m *^ v +00:07:35 verbose #14874 > > +00:07:35 verbose #14875 > > inl system_p (multi_particle_state sts) = +00:07:35 verbose #14876 > > sts +00:07:35 verbose #14877 > > |> stream.map momentum +00:07:35 verbose #14878 > > |> stream.fold (^+^) (zero_vec ()) +00:07:35 verbose #14879 > > +00:07:35 verbose #14880 > > inl time_ke_ec_x, time_ke_ec_y = +00:07:35 verbose #14881 > > billiard_states_finite euler_cromer_mps 30 0.03 +00:07:35 verbose #14882 > > |> listm.map (fun (multi_particle_state mpst) => +00:07:35 verbose #14883 > > mpst |> stream.try_item 0i32 +00:07:35 verbose #14884 > > |> optionm.map (fun st => +00:07:35 verbose #14885 > > st.time, system_ke (multi_particle_state mpst) +00:07:35 verbose #14886 > > ) +00:07:35 verbose #14887 > > ) +00:07:35 verbose #14888 > > // |> stream.to_list +00:07:35 verbose #14889 > > |> listm'.choose id +00:07:35 verbose #14890 > > |> listm'.unzip +00:07:35 verbose #14891 > > +00:07:35 verbose #14892 > > inl time_ke_rk4_x, time_ke_rk4_y = +00:07:35 verbose #14893 > > billiard_states_finite runge_kutta_4 30 0.03 +00:07:35 verbose #14894 > > |> listm.map (fun (multi_particle_state mpst) => +00:07:35 verbose #14895 > > mpst |> stream.try_item 0i32 +00:07:35 verbose #14896 > > |> optionm.map (fun st => +00:07:35 verbose #14897 > > st.time, system_ke (multi_particle_state mpst) +00:07:35 verbose #14898 > > ) +00:07:35 verbose #14899 > > ) +00:07:35 verbose #14900 > > // |> stream.to_list +00:07:35 verbose #14901 > > |> listm'.choose id +00:07:35 verbose #14902 > > |> listm'.unzip +00:07:35 verbose #14903 > > +00:07:35 verbose #14904 > > inl time_ke_ec_x : a i32 _ = time_ke_ec_x |> listm.toArray +00:07:35 verbose #14905 > > inl time_ke_ec_y : a i32 _ = time_ke_ec_y |> listm.toArray +00:07:35 verbose #14906 > > +00:07:35 verbose #14907 > > inl time_ke_rk4_x : a i32 _ = time_ke_rk4_x |> listm.toArray +00:07:35 verbose #14908 > > inl time_ke_rk4_y : a i32 _ = time_ke_rk4_y |> listm.toArray +00:07:35 verbose #14909 > > +00:07:35 verbose #14910 > > "system kinetic energy versus time", +00:07:35 verbose #14911 > > "time (s)", +00:07:35 verbose #14912 > > "system kinetic energy (j)", +00:07:35 verbose #14913 > > ;[[ +00:07:35 verbose #14914 > > "euler-cromer", time_ke_ec_x, time_ke_ec_y +00:07:35 verbose #14915 > > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y +00:07:35 verbose #14916 > > ]] +00:07:37 verbose #14917 > > +00:07:37 verbose #14918 > > ╭─[ 1.98s - return value ]─────────────────────────────────────────────────────╮ +00:07:37 verbose #14919 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:37 verbose #14920 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:37 verbose #14921 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:37 verbose #14922 > > │ stroke="none"/> │ +00:07:37 verbose #14923 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:37 verbose #14924 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:37 verbose #14925 > > │ fill="#FFFFFF"> │ +00:07:37 verbose #14926 > > │ system kinetic energy versus time │ +00:07:37 verbose #14927 > > │ </text> │ +00:07:37 verbose #14928 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ +00:07:37 verbose #14929 > > │ y2="75"/> │ +00:07:37 verbose #14930 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:37 verbose #14931 > > │ y2="75"/> │ +00:07:37 verbose #14932 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ +00:07:37 verbose #14933 > > │ y2="75"/> │ +00:07:37 verbose #14934 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ +00:07:37 verbose #14935 > > │ y2="75"/> │ +00:07:37 verbose #14936 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ +00:07:37 verbose #14937 > > │ y2="75"/> │ +00:07:37 verbose #14938 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ +00:07:37 verbose #14939 > > │ x2="109" y2="75"/> │ +00:07:37 verbose #14940 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ +00:07:37 verbose #14941 > > │ x2="119" y2="75"/> │ +00:07:37 verbose #14942 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ +00:07:37 verbose #14943 > > │ x2="129" y2="75"/> │ +00:07:37 verbose #14944 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ +00:07:37 verbose #14945 > > │ x2="139" y2="75"/> │ +00:07:37 verbose #14946 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ +00:07:37 verbose #14947 > > │ x2="149" y2="75"/> │ +00:07:37 verbose #14948 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ +00:07:37 verbose #14949 > > │ x2="159" y2="75"/> │ +00:07:37 verbose #14950 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ +00:07:37 verbose #14951 > > │ x2="169" y2="75"/> │ +00:07:37 verbose #14952 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ +00:07:37 verbose #14953 > > │ x2="179" y2="75"/> │ +00:07:37 verbose #14954 > > │ <... │ +00:07:37 verbose #14955 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:37 verbose #14956 > > +00:07:37 verbose #14957 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:37 verbose #14958 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:37 verbose #14959 > > │ ### wave 2 │ +00:07:37 verbose #14960 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:37 verbose #14961 > > +00:07:37 verbose #14962 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:37 verbose #14963 > > //// test +00:07:37 verbose #14964 > > +00:07:37 verbose #14965 > > inl linear_spring k re (particle_state st1) (particle_state st2) = +00:07:37 verbose #14966 > > inl r1 = st1.pos_vec +00:07:37 verbose #14967 > > inl r2 = st2.pos_vec +00:07:37 verbose #14968 > > inl r21 = r2 ^-^ r1 +00:07:37 verbose #14969 > > inl r21mag = magnitude r21 +00:07:37 verbose #14970 > > -k * (r21mag - re) *^ r21 ^/ r21mag +00:07:37 verbose #14971 > > +00:07:37 verbose #14972 > > inl fixed_linear_spring k re r1 = +00:07:37 verbose #14973 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:37 verbose #14974 > > linear_spring k re (particle_state { default_particle_state' with pos_vec = +00:07:37 verbose #14975 > > r1 }) +00:07:37 verbose #14976 > > +00:07:37 verbose #14977 > > inl forces_string () = +00:07:37 verbose #14978 > > [[ +00:07:37 verbose #14979 > > ExternalForce (0i32, fixed_linear_spring 5384 0 (zero_vec ())) +00:07:37 verbose #14980 > > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ())) +00:07:37 verbose #14981 > > ]] ++ ( +00:07:37 verbose #14982 > > listm'.init_series 0 59 1 +00:07:37 verbose #14983 > > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0)) +00:07:37 verbose #14984 > > ) +00:07:37 verbose #14985 > > +00:07:37 verbose #14986 > > inl string_update dt = +00:07:37 verbose #14987 > > update_mps (join runge_kutta_4 dt) (join forces_string ()) +00:07:37 verbose #14988 > > +00:07:37 verbose #14989 > > inl string_initial_overtone n = +00:07:37 verbose #14990 > > inl ball_mass = 0.0008293 * 0.65 / 64 +00:07:37 verbose #14991 > > inl (particle_state default_particle_state') = default_particle_state () +00:07:37 verbose #14992 > > listm'.init_series 0.01 0.64 0.01 +00:07:37 verbose #14993 > > |> listm.map (fun x => +00:07:37 verbose #14994 > > inl y = 0.005 * sin (conv n * pi * x / 0.65) +00:07:37 verbose #14995 > > particle_state { +00:07:37 verbose #14996 > > default_particle_state' with +00:07:37 verbose #14997 > > mass = ball_mass +00:07:37 verbose #14998 > > pos_vec = x *^ i_hat () ^+^ y *^ j_hat () +00:07:37 verbose #14999 > > velocity = zero_vec () +00:07:37 verbose #15000 > > } +00:07:37 verbose #15001 > > ) +00:07:37 verbose #15002 > > |> stream.from_list +00:07:37 verbose #15003 > > |> multi_particle_state +00:07:37 verbose #15004 > > +00:07:37 verbose #15005 > > let main () = +00:07:37 verbose #15006 > > inl ~frames = listm'.init_series 0 65 1f64 |> stream.from_list +00:07:37 verbose #15007 > > inl ~initial_state = string_initial_overtone 3i32 +00:07:37 verbose #15008 > > inl frames = +00:07:37 verbose #15009 > > frames +00:07:37 verbose #15010 > > |> stream.map (fun n => +00:07:37 verbose #15011 > > inl (multi_particle_state sts) = +00:07:37 verbose #15012 > > stream.iterate (string_update 0.000025) initial_state |> +00:07:37 verbose #15013 > > stream.item n +00:07:37 verbose #15014 > > inl x, y = +00:07:37 verbose #15015 > > [[ zero_vec () ]] +00:07:37 verbose #15016 > > ++ (sts |> stream.map (fun (particle_state st) => st.pos_vec) |> +00:07:37 verbose #15017 > > stream.to_list) +00:07:37 verbose #15018 > > ++ [[ 0.65 *^ i_hat () ]] +00:07:37 verbose #15019 > > |> listm.map (fun r => r.x, r.y) +00:07:37 verbose #15020 > > |> stream.from_list +00:07:37 verbose #15021 > > |> stream.unzip +00:07:37 verbose #15022 > > inl x : a i32 _ = x |> stream.to_list |> listm.toArray +00:07:37 verbose #15023 > > inl y : a i32 _ = y |> stream.to_list |> listm.toArray +00:07:37 verbose #15024 > > x, y +00:07:37 verbose #15025 > > ) +00:07:37 verbose #15026 > > +00:07:37 verbose #15027 > > inl plots = +00:07:37 verbose #15028 > > frames +00:07:37 verbose #15029 > > |> stream.indexed +00:07:37 verbose #15030 > > |> stream.map (fun ((n : i32), (x, y)) => +00:07:37 verbose #15031 > > "wave", +00:07:37 verbose #15032 > > "position (m)", +00:07:37 verbose #15033 > > "displacement (m)", +00:07:37 verbose #15034 > > ;[[ +00:07:37 verbose #15035 > > ($"$\"{!n}\"" : string), x, y +00:07:37 verbose #15036 > > ]] +00:07:37 verbose #15037 > > ) +00:07:37 verbose #15038 > > +00:07:37 verbose #15039 > > plots |> stream.to_list |> listm.toArray : a i32 _ +00:07:44 verbose #15040 > > +00:07:44 verbose #15041 > > ╭─[ 6.26s - return value ]─────────────────────────────────────────────────────╮ +00:07:44 verbose #15042 > > │ <table><thead><tr><th><i>index</i></th><th>value</th></tr></thead><tbody><tr │ +00:07:44 verbose #15043 > > │ ><td>0</td><td><svg width="640" height="480" viewBox="0 0 640 480" │ +00:07:44 verbose #15044 > > │ xmlns="http://www.w3.org/2000/svg"> │ +00:07:44 verbose #15045 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ +00:07:44 verbose #15046 > > │ stroke="none"/> │ +00:07:44 verbose #15047 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ +00:07:44 verbose #15048 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ +00:07:44 verbose #15049 > > │ fill="#FFFFFF"> │ +00:07:44 verbose #15050 > > │ wave │ +00:07:44 verbose #15051 > > │ </text> │ +00:07:44 verbose #15052 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │ +00:07:44 verbose #15053 > > │ y2="75"/> │ +00:07:44 verbose #15054 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ +00:07:44 verbose #15055 > > │ y2="75"/> │ +00:07:44 verbose #15056 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │ +00:07:44 verbose #15057 > > │ y2="75"/> │ +00:07:44 verbose #15058 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │ +00:07:44 verbose #15059 > > │ y2="75"/> │ +00:07:44 verbose #15060 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │ +00:07:44 verbose #15061 > > │ y2="75"/> │ +00:07:44 verbose #15062 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="100" y1="424" │ +00:07:44 verbose #15063 > > │ x2="100" y2="75"/> │ +00:07:44 verbose #15064 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="108" y1="424" │ +00:07:44 verbose #15065 > > │ x2="108" y2="75"/> │ +00:07:44 verbose #15066 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="116" y1="424" │ +00:07:44 verbose #15067 > > │ x2="116" y2="75"/> │ +00:07:44 verbose #15068 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="123" y1="424" │ +00:07:44 verbose #15069 > > │ x2="123" y2="75"/> │ +00:07:44 verbose #15070 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="131" y1="424" │ +00:07:44 verbose #15071 > > │ x2="131" y2="75"/> │ +00:07:44 verbose #15072 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ +00:07:44 verbose #15073 > > │ x2="139" y2="75"/> │ +00:07:44 verbose #15074 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="146" y1="424" │ +00:07:44 verbose #15075 > > │ x2="146" y2="75"/> │ +00:07:44 verbose #15076 > > │ <line opacity="1" stroke="#3... │ +00:07:44 verbose #15077 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:44 verbose #15078 > > +00:07:44 verbose #15079 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:44 verbose #15080 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:44 verbose #15081 > > │ ## end │ +00:07:44 verbose #15082 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:44 verbose #15083 > 00:00:32 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 138747 +00:07:44 verbose #15084 > 00:00:32 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:07:46 verbose #15085 > 00:00:34 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/physics.dib.ipynb to html +00:07:46 verbose #15086 > 00:00:34 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:07:46 verbose #15087 > 00:00:34 verbose #7 ! validate(nb) +00:07:50 verbose #15088 > 00:00:38 verbose #8 ! [NbConvertApp] Writing 2510796 bytes to c:\home\git\polyglot\lib\spiral\physics.dib.html +00:07:50 verbose #15089 > 00:00:38 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 646 +00:07:50 verbose #15090 > 00:00:38 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 646 +00:07:50 verbose #15091 > 00:00:38 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/physics.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/physics.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:07:51 verbose #15092 > 00:00:39 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:07:51 verbose #15093 > 00:00:39 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:07:52 verbose #15094 > 00:00:40 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 139452 +00:07:52 debug #15095 execute_with_options_async / exit_code: 0 / output.Length: 148124 +00:07:52 debug #23 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path physics.dib --retries 3 +00:07:52 debug #15096 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path benchmark.dib --retries 3", [||], None, None, true, None) -00:17:45 verbose #13495 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "physics.dib", "--retries", "3"]) -00:17:45 verbose #13496 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/physics.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/physics.dib" --output-path "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:18:22 verbose #13497 > -00:18:22 verbose #13498 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #13499 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #13500 > │ # physics │ -00:18:22 verbose #13501 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #13502 > -00:18:22 verbose #13503 > ── fsharp ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #13504 > #!import ../../lib/fsharp/Plotting.dib -00:18:22 verbose #13505 > -00:18:22 verbose #13506 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13507 > #r -00:18:22 verbose #13508 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A -00:18:22 verbose #13509 > spNetCore.Html.Abstractions.dll" -00:18:22 verbose #13510 > #r -00:18:22 verbose #13511 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:18:22 verbose #13512 > otNet.Interactive.dll" -00:18:22 verbose #13513 > #r -00:18:22 verbose #13514 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:18:22 verbose #13515 > otNet.Interactive.FSharp.dll" -00:18:22 verbose #13516 > #r -00:18:22 verbose #13517 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:18:22 verbose #13518 > otNet.Interactive.Formatting.dll" -00:18:22 verbose #13519 > open System -00:18:22 verbose #13520 > open System.IO -00:18:22 verbose #13521 > open System.Text -00:18:22 verbose #13522 > open Microsoft.DotNet.Interactive.Formatting -00:18:22 verbose #13523 > -00:18:22 verbose #13524 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13525 > #r -00:18:22 verbose #13526 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:18:22 verbose #13527 > otNet.Interactive.FSharp.dll" -00:18:22 verbose #13528 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers -00:18:22 verbose #13529 > #r -00:18:22 verbose #13530 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:18:22 verbose #13531 > otNet.Interactive.dll" -00:18:22 verbose #13532 > open type Microsoft.DotNet.Interactive.Kernel -00:18:22 verbose #13533 > -00:18:22 verbose #13534 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13535 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) -00:18:22 verbose #13536 > -00:18:22 verbose #13537 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13538 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: -00:18:22 verbose #13539 > TextWriter)->fprintfn writer "%120A" x) -00:18:22 verbose #13540 > -00:18:22 verbose #13541 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13542 > #r -00:18:22 verbose #13543 > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan -00:18:22 verbose #13544 > dard2.1/FSharp.Control.AsyncSeq.dll" -00:18:22 verbose #13545 > #r -00:18:22 verbose #13546 > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. -00:18:22 verbose #13547 > 0/System.Reactive.dll" -00:18:22 verbose #13548 > #r -00:18:22 verbose #13549 > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib -00:18:22 verbose #13550 > netstandard2.0/System.Reactive.Linq.dll" -00:18:22 verbose #13551 > #r -00:18:22 verbose #13552 > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" -00:18:22 verbose #13553 > #r -00:18:22 verbose #13554 > @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha -00:18:22 verbose #13555 > rp.Json.dll" -00:18:22 verbose #13556 > -00:18:22 verbose #13557 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13558 > //// test -00:18:22 verbose #13559 > -00:18:22 verbose #13560 > Formatter.ListExpansionLimit <- 100 -00:18:22 verbose #13561 > -00:18:22 verbose #13562 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13563 > #if FABLE_COMPILER -00:18:22 verbose #13564 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] -00:18:22 verbose #13565 > #endif -00:18:22 verbose #13566 > type std_env_VarError = class end -00:18:22 verbose #13567 > #if FABLE_COMPILER -00:18:22 verbose #13568 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:18:22 verbose #13569 > #endif -00:18:22 verbose #13570 > type Any = class end -00:18:22 verbose #13571 > #if FABLE_COMPILER -00:18:22 verbose #13572 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:18:22 verbose #13573 > #endif -00:18:22 verbose #13574 > type Func0<'T> = class end -00:18:22 verbose #13575 > #if FABLE_COMPILER -00:18:22 verbose #13576 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:18:22 verbose #13577 > #endif -00:18:22 verbose #13578 > type Func0<'T, 'U> = class end -00:18:22 verbose #13579 > #if FABLE_COMPILER -00:18:22 verbose #13580 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:18:22 verbose #13581 > #endif -00:18:22 verbose #13582 > type Box<'T> = class end -00:18:22 verbose #13583 > #if FABLE_COMPILER -00:18:22 verbose #13584 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:18:22 verbose #13585 > #endif -00:18:22 verbose #13586 > type Dyn<'T> = class end -00:18:22 verbose #13587 > #if FABLE_COMPILER -00:18:22 verbose #13588 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] -00:18:22 verbose #13589 > #endif -00:18:22 verbose #13590 > type Send<'T> = class end -00:18:22 verbose #13591 > #if FABLE_COMPILER -00:18:22 verbose #13592 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] -00:18:22 verbose #13593 > #endif -00:18:22 verbose #13594 > type Fn<'T> = class end -00:18:22 verbose #13595 > #if FABLE_COMPILER -00:18:22 verbose #13596 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] -00:18:22 verbose #13597 > #endif -00:18:22 verbose #13598 > type FnUnit = class end -00:18:22 verbose #13599 > #if FABLE_COMPILER -00:18:22 verbose #13600 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] -00:18:22 verbose #13601 > #endif -00:18:22 verbose #13602 > type FnOnce<'T> = class end -00:18:22 verbose #13603 > #if FABLE_COMPILER -00:18:22 verbose #13604 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] -00:18:22 verbose #13605 > #endif -00:18:22 verbose #13606 > type ActionFn<'T> = class end -00:18:22 verbose #13607 > #if FABLE_COMPILER -00:18:22 verbose #13608 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] -00:18:22 verbose #13609 > #endif -00:18:22 verbose #13610 > type ActionFn2<'T, 'U> = class end -00:18:22 verbose #13611 > #if FABLE_COMPILER -00:18:22 verbose #13612 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] -00:18:22 verbose #13613 > #endif -00:18:22 verbose #13614 > type Impl<'T> = class end -00:18:22 verbose #13615 > #if FABLE_COMPILER -00:18:22 verbose #13616 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] -00:18:22 verbose #13617 > #endif -00:18:22 verbose #13618 > type Mut<'T> = class end -00:18:22 verbose #13619 > #if FABLE_COMPILER -00:18:22 verbose #13620 > [[<Fable.Core.Erase; Fable.Co... -00:18:22 verbose #13621 > -00:18:22 verbose #13622 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13623 > #if FABLE_COMPILER -00:18:22 verbose #13624 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:18:22 verbose #13625 > #endif -00:18:22 verbose #13626 > type Any = class end -00:18:22 verbose #13627 > #if FABLE_COMPILER -00:18:22 verbose #13628 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:18:22 verbose #13629 > #endif -00:18:22 verbose #13630 > type Func0<'T> = class end -00:18:22 verbose #13631 > #if FABLE_COMPILER -00:18:22 verbose #13632 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:18:22 verbose #13633 > #endif -00:18:22 verbose #13634 > type Func0<'T, 'U> = class end -00:18:22 verbose #13635 > #if FABLE_COMPILER -00:18:22 verbose #13636 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:18:22 verbose #13637 > #endif -00:18:22 verbose #13638 > type Box<'T> = class end -00:18:22 verbose #13639 > #if FABLE_COMPILER -00:18:22 verbose #13640 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:18:22 verbose #13641 > #endif -00:18:22 verbose #13642 > type Dyn<'T> = class end -00:18:22 verbose #13643 > #if FABLE_COMPILER -00:18:22 verbose #13644 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] -00:18:22 verbose #13645 > #endif -00:18:22 verbose #13646 > type Send<'T> = class end -00:18:22 verbose #13647 > #if FABLE_COMPILER -00:18:22 verbose #13648 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] -00:18:22 verbose #13649 > #endif -00:18:22 verbose #13650 > type Fn<'T> = class end -00:18:22 verbose #13651 > #if FABLE_COMPILER -00:18:22 verbose #13652 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] -00:18:22 verbose #13653 > #endif -00:18:22 verbose #13654 > type FnUnit = class end -00:18:22 verbose #13655 > #if FABLE_COMPILER -00:18:22 verbose #13656 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] -00:18:22 verbose #13657 > #endif -00:18:22 verbose #13658 > type FnOnce<'T> = class end -00:18:22 verbose #13659 > #if FABLE_COMPILER -00:18:22 verbose #13660 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] -00:18:22 verbose #13661 > #endif -00:18:22 verbose #13662 > type ActionFn<'T> = class end -00:18:22 verbose #13663 > #if FABLE_COMPILER -00:18:22 verbose #13664 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] -00:18:22 verbose #13665 > #endif -00:18:22 verbose #13666 > type ActionFn2<'T, 'U> = class end -00:18:22 verbose #13667 > #if FABLE_COMPILER -00:18:22 verbose #13668 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] -00:18:22 verbose #13669 > #endif -00:18:22 verbose #13670 > type Impl<'T> = class end -00:18:22 verbose #13671 > #if FABLE_COMPILER -00:18:22 verbose #13672 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] -00:18:22 verbose #13673 > #endif -00:18:22 verbose #13674 > type Mut<'T> = class end -00:18:22 verbose #13675 > #if FABLE_COMPILER -00:18:22 verbose #13676 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]] -00:18:22 verbose #13677 > #endif -00:18:22 verbose #13678 > type Ref<'T> = class end -00:18:22 verbose #13679 > #if FABLE_COMPILER -00:18:22 verbose #13680 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]... -00:18:22 verbose #13681 > -00:18:22 verbose #13682 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13683 > #if FABLE_COMPILER -00:18:22 verbose #13684 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] -00:18:22 verbose #13685 > #endif -00:18:22 verbose #13686 > type std_future_Future<'T> = class end -00:18:22 verbose #13687 > #if FABLE_COMPILER -00:18:22 verbose #13688 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] -00:18:22 verbose #13689 > #endif -00:18:22 verbose #13690 > type futures_future_TryJoinAll<'T> = class end -00:18:22 verbose #13691 > #if FABLE_COMPILER -00:18:22 verbose #13692 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] -00:18:22 verbose #13693 > #endif -00:18:22 verbose #13694 > type rayon_vec_IntoIter<'T> = class end -00:18:22 verbose #13695 > #if FABLE_COMPILER -00:18:22 verbose #13696 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] -00:18:22 verbose #13697 > #endif -00:18:22 verbose #13698 > type rayon_iter_Map<'T> = class end -00:18:22 verbose #13699 > #if FABLE_COMPILER -00:18:22 verbose #13700 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] -00:18:22 verbose #13701 > #endif -00:18:22 verbose #13702 > type futures_lite_stream_StreamExt = class end -00:18:22 verbose #13703 > let rec closure0 () (v0 : System.Threading.CancellationToken) : -00:18:22 verbose #13704 > Async<System.Threading.CancellationToken> = -00:18:22 verbose #13705 > let v1 : bool = true -00:18:22 verbose #13706 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None -00:18:22 verbose #13707 > -00:18:22 verbose #13708 > #if FABLE_COMPILER || WASM || CONTRACT -00:18:22 verbose #13709 > -00:18:22 verbose #13710 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT -00:18:22 verbose #13711 > let v2 : Async<System.Threading.CancellationToken> = null |> -00:18:22 verbose #13712 > unbox<Async<System.Threading.CancellationToken>> -00:18:22 verbose #13713 > v2 -00:18:22 verbose #13714 > #endif -00:18:22 verbose #13715 > #if FABLE_COMPILER_RUST && WASM -00:18:22 verbose #13716 > let v3 : Async<System.Threading.CancellationToken> = null |> -00:18:22 verbose #13717 > unbox<Async<System.Threading.CancellationToken>> -00:18:22 verbose #13718 > v3 -00:18:22 verbose #13719 > #endif -00:18:22 verbose #13720 > #if FABLE_COMPILER_RUST && CONTRACT -00:18:22 verbose #13721 > let v4 : Async<System.Threading.CancellationToken> = null |> -00:18:22 verbose #13722 > unbox<Async<System.Threading.CancellationToken>> -00:18:22 verbose #13723 > v4 -00:18:22 verbose #13724 > #endif -00:18:22 verbose #13725 > #if FABLE_COMPILER_TYPESCRIPT -00:18:22 verbose #13726 > le... -00:18:22 verbose #13727 > -00:18:22 verbose #13728 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13729 > #if FABLE_COMPILER -00:18:22 verbose #13730 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] -00:18:22 verbose #13731 > #endif -00:18:22 verbose #13732 > type std_thread_JoinHandle<'T> = class end -00:18:22 verbose #13733 > #if FABLE_COMPILER -00:18:22 verbose #13734 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] -00:18:22 verbose #13735 > #endif -00:18:22 verbose #13736 > type std_sync_Arc<'T> = class end -00:18:22 verbose #13737 > #if FABLE_COMPILER -00:18:22 verbose #13738 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] -00:18:22 verbose #13739 > #endif -00:18:22 verbose #13740 > type std_sync_Mutex<'T> = class end -00:18:22 verbose #13741 > #if FABLE_COMPILER -00:18:22 verbose #13742 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] -00:18:22 verbose #13743 > #endif -00:18:22 verbose #13744 > type std_sync_MutexGuard<'T> = class end -00:18:22 verbose #13745 > #if FABLE_COMPILER -00:18:22 verbose #13746 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] -00:18:22 verbose #13747 > #endif -00:18:22 verbose #13748 > type std_sync_PoisonError<'T> = class end -00:18:22 verbose #13749 > type Disposable (f : unit -> unit) = interface System.IDisposable with member -00:18:22 verbose #13750 > _.Dispose () = f () -00:18:22 verbose #13751 > type [[<Struct>]] US0 = -00:18:22 verbose #13752 > | US0_0 of f0_0 : System.Threading.CancellationToken -00:18:22 verbose #13753 > | US0_1 -00:18:22 verbose #13754 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = -00:18:22 verbose #13755 > let v1 : bool = true -00:18:22 verbose #13756 > let mutable _v1 : unit option = None -00:18:22 verbose #13757 > -00:18:22 verbose #13758 > #if FABLE_COMPILER || WASM || CONTRACT -00:18:22 verbose #13759 > -00:18:22 verbose #13760 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT -00:18:22 verbose #13761 > null |> unbox<unit> -00:18:22 verbose #13762 > () -00:18:22 verbose #13763 > #endif -00:18:22 verbose #13764 > #if FABLE_COMPILER_RUST && WASM -00:18:22 verbose #13765 > null |> unbox<unit> -00:18:22 verbose #13766 > () -00:18:22 verbose #13767 > #endif -00:18:22 verbose #13768 > #if FABLE_COMPILER_RUST && CONTRACT -00:18:22 verbose #13769 > null |> unbox<unit> -00:18:22 verbose #13770 > () -00:18:22 verbose #13771 > #endif -00:18:22 verbose #13772 > #if FABLE_COMPILER_TYPESCRIPT -00:18:22 verbose #13773 > null |> unbox<unit> -00:18:22 verbose #13774 > () -00:18:22 verbose #13775 > #endif -00:18:22 verbose #13776 > #if FABLE_COMPILER_PYTHON -00:18:22 verbose #13777 > null |> unbox<unit> -00:18:22 verbose #13778 > () -00:18:22 verbose #13779 > #endif -00:18:22 verbose #13780 > #else -00:18:22 verbose #13781 > let v2 : (unit -> unit) = v0.Cancel -00:18:22 verbose #13782 > v2 () -00:18:22 verbose #13783 > () -00:18:22 verbose #13784 > #endif -00:18:22 verbose #13785 > |>... -00:18:22 verbose #13786 > -00:18:22 verbose #13787 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13788 > #if FABLE_COMPILER -00:18:22 verbose #13789 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] -00:18:22 verbose #13790 > #endif -00:18:22 verbose #13791 > type reqwest_Error = class end -00:18:22 verbose #13792 > #if FABLE_COMPILER -00:18:22 verbose #13793 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] -00:18:22 verbose #13794 > #endif -00:18:22 verbose #13795 > type reqwest_RequestBuilder = class end -00:18:22 verbose #13796 > #if FABLE_COMPILER -00:18:22 verbose #13797 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] -00:18:22 verbose #13798 > #endif -00:18:22 verbose #13799 > type reqwest_Response = class end -00:18:22 verbose #13800 > #if FABLE_COMPILER -00:18:22 verbose #13801 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] -00:18:22 verbose #13802 > #endif -00:18:22 verbose #13803 > type std_env_VarError = class end -00:18:22 verbose #13804 > #if FABLE_COMPILER -00:18:22 verbose #13805 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:18:22 verbose #13806 > #endif -00:18:22 verbose #13807 > type Any = class end -00:18:22 verbose #13808 > #if FABLE_COMPILER -00:18:22 verbose #13809 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:18:22 verbose #13810 > #endif -00:18:22 verbose #13811 > type Func0<'T> = class end -00:18:22 verbose #13812 > #if FABLE_COMPILER -00:18:22 verbose #13813 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:18:22 verbose #13814 > #endif -00:18:22 verbose #13815 > type Func0<'T, 'U> = class end -00:18:22 verbose #13816 > #if FABLE_COMPILER -00:18:22 verbose #13817 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:18:22 verbose #13818 > #endif -00:18:22 verbose #13819 > type Box<'T> = class end -00:18:22 verbose #13820 > #if FABLE_COMPILER -00:18:22 verbose #13821 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:18:22 verbose #13822 > #endif -00:18:22 verbose #13823 > type Dyn<'T> = class end -00:18:22 verbose #13824 > #if FABLE_COMPILER -00:18:22 verbose #13825 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] -00:18:22 verbose #13826 > #endif -00:18:22 verbose #13827 > type Send<'T> = class end -00:18:22 verbose #13828 > #if FABLE_COMPILER -00:18:22 verbose #13829 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] -00:18:22 verbose #13830 > #endif -00:18:22 verbose #13831 > type Fn<'T> = class end -00:18:22 verbose #13832 > #if FABLE_COMPILER -00:18:22 verbose #13833 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] -00:18:22 verbose #13834 > #endif -00:18:22 verbose #13835 > type FnUnit = class end -00:18:22 verbose #13836 > #if FABLE_COMPILER -00:18:22 verbose #13837 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] -00:18:22 verbose #13838 > #endif -00:18:22 verbose #13839 > type FnOnce<'T> = class end -00:18:22 verbose #13840 > #if FABLE_COMPILER -00:18:22 verbose #13841 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] -00:18:22 verbose #13842 > #endif -00:18:22 verbose #13843 > type ActionF... -00:18:22 verbose #13844 > -00:18:22 verbose #13845 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13846 > #if FABLE_COMPILER -00:18:22 verbose #13847 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] -00:18:22 verbose #13848 > #endif -00:18:22 verbose #13849 > type clap_Arg = class end -00:18:22 verbose #13850 > #if FABLE_COMPILER -00:18:22 verbose #13851 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] -00:18:22 verbose #13852 > #endif -00:18:22 verbose #13853 > type clap_ArgAction = class end -00:18:22 verbose #13854 > #if FABLE_COMPILER -00:18:22 verbose #13855 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] -00:18:22 verbose #13856 > #endif -00:18:22 verbose #13857 > type clap_Command = class end -00:18:22 verbose #13858 > #if FABLE_COMPILER -00:18:22 verbose #13859 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] -00:18:22 verbose #13860 > #endif -00:18:22 verbose #13861 > type clap_ArgMatches = class end -00:18:22 verbose #13862 > #if FABLE_COMPILER -00:18:22 verbose #13863 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] -00:18:22 verbose #13864 > #endif -00:18:22 verbose #13865 > type clap_builder_ValueRange = class end -00:18:22 verbose #13866 > #if FABLE_COMPILER -00:18:22 verbose #13867 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] -00:18:22 verbose #13868 > #endif -00:18:22 verbose #13869 > type clap_builder_ValueParser = class end -00:18:22 verbose #13870 > #if FABLE_COMPILER -00:18:22 verbose #13871 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] -00:18:22 verbose #13872 > #endif -00:18:22 verbose #13873 > type clap_builder_PossibleValue = class end -00:18:22 verbose #13874 > #if FABLE_COMPILER -00:18:22 verbose #13875 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] -00:18:22 verbose #13876 > #endif -00:18:22 verbose #13877 > type std_process_Child = class end -00:18:22 verbose #13878 > #if FABLE_COMPILER -00:18:22 verbose #13879 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] -00:18:22 verbose #13880 > #endif -00:18:22 verbose #13881 > type std_process_ChildStderr = class end -00:18:22 verbose #13882 > #if FABLE_COMPILER -00:18:22 verbose #13883 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] -00:18:22 verbose #13884 > #endif -00:18:22 verbose #13885 > type std_process_ChildStdout = class end -00:18:22 verbose #13886 > #if FABLE_COMPILER -00:18:22 verbose #13887 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] -00:18:22 verbose #13888 > #endif -00:18:22 verbose #13889 > type std_process_ChildStdin = class end -00:18:22 verbose #13890 > #if FABLE_COMPILER -00:18:22 verbose #13891 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] -00:18:22 verbose #13892 > #endif -00:18:22 verbose #13893 > type std_process_Command = class ... -00:18:22 verbose #13894 > -00:18:22 verbose #13895 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13896 > #if FABLE_COMPILER -00:18:22 verbose #13897 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] -00:18:22 verbose #13898 > #endif -00:18:22 verbose #13899 > type std_fs_File = class end -00:18:22 verbose #13900 > #if FABLE_COMPILER -00:18:22 verbose #13901 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] -00:18:22 verbose #13902 > #endif -00:18:22 verbose #13903 > type std_fs_FileType = class end -00:18:22 verbose #13904 > #if FABLE_COMPILER -00:18:22 verbose #13905 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] -00:18:22 verbose #13906 > #endif -00:18:22 verbose #13907 > type std_path_Display = class end -00:18:22 verbose #13908 > #if FABLE_COMPILER -00:18:22 verbose #13909 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] -00:18:22 verbose #13910 > #endif -00:18:22 verbose #13911 > type std_path_Path = class end -00:18:22 verbose #13912 > #if FABLE_COMPILER -00:18:22 verbose #13913 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] -00:18:22 verbose #13914 > #endif -00:18:22 verbose #13915 > type std_path_PathBuf = class end -00:18:22 verbose #13916 > #if FABLE_COMPILER -00:18:22 verbose #13917 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] -00:18:22 verbose #13918 > #endif -00:18:22 verbose #13919 > type async_walkdir_DirEntry = class end -00:18:22 verbose #13920 > #if FABLE_COMPILER -00:18:22 verbose #13921 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] -00:18:22 verbose #13922 > #endif -00:18:22 verbose #13923 > type async_walkdir_Filtering = class end -00:18:22 verbose #13924 > #if FABLE_COMPILER -00:18:22 verbose #13925 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] -00:18:22 verbose #13926 > #endif -00:18:22 verbose #13927 > type async_walkdir_WalkDir = class end -00:18:22 verbose #13928 > #if FABLE_COMPILER -00:18:22 verbose #13929 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] -00:18:22 verbose #13930 > #endif -00:18:22 verbose #13931 > type Any = class end -00:18:22 verbose #13932 > #if FABLE_COMPILER -00:18:22 verbose #13933 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] -00:18:22 verbose #13934 > #endif -00:18:22 verbose #13935 > type Func0<'T> = class end -00:18:22 verbose #13936 > #if FABLE_COMPILER -00:18:22 verbose #13937 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] -00:18:22 verbose #13938 > #endif -00:18:22 verbose #13939 > type Func0<'T, 'U> = class end -00:18:22 verbose #13940 > #if FABLE_COMPILER -00:18:22 verbose #13941 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] -00:18:22 verbose #13942 > #endif -00:18:22 verbose #13943 > type Box<'T> = class end -00:18:22 verbose #13944 > #if FABLE_COMPILER -00:18:22 verbose #13945 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] -00:18:22 verbose #13946 > #endif -00:18:22 verbose #13947 > type Dyn<'T> = class end -00:18:22 verbose #13948 > #if FABLE_COMPILER -00:18:22 verbose #13949 > [[... -00:18:22 verbose #13950 > -00:18:22 verbose #13951 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #13952 > module SpiralTrace = -00:18:22 verbose #13953 > let trace x = -00:18:22 verbose #13954 > #if !INTERACTIVE -00:18:22 verbose #13955 > Trace.trace x -00:18:22 verbose #13956 > #else -00:18:22 verbose #13957 > trace x -00:18:22 verbose #13958 > #endif -00:18:22 verbose #13959 > -00:18:22 verbose #13960 > type TraceLevel = -00:18:22 verbose #13961 > #if !INTERACTIVE -00:18:22 verbose #13962 > Trace.US0 -00:18:22 verbose #13963 > #else -00:18:22 verbose #13964 > US0 -00:18:22 verbose #13965 > #endif -00:18:22 verbose #13966 > -00:18:22 verbose #13967 > module SpiralCrypto = -00:18:22 verbose #13968 > let hash_text x = -00:18:22 verbose #13969 > #if !INTERACTIVE -00:18:22 verbose #13970 > Crypto.hash_text x -00:18:22 verbose #13971 > #else -00:18:22 verbose #13972 > hash_text x -00:18:22 verbose #13973 > #endif -00:18:22 verbose #13974 > -00:18:22 verbose #13975 > #if !FABLE_COMPILER && !WASM && !CONTRACT -00:18:22 verbose #13976 > -00:18:22 verbose #13977 > module SpiralAsync = -00:18:22 verbose #13978 > let merge_cancellation_token_with_default_async x = -00:18:22 verbose #13979 > #if !INTERACTIVE -00:18:22 verbose #13980 > Async_.merge_cancellation_token_with_default_async x -00:18:22 verbose #13981 > #else -00:18:22 verbose #13982 > merge_cancellation_token_with_default_async x -00:18:22 verbose #13983 > #endif -00:18:22 verbose #13984 > -00:18:22 verbose #13985 > module SpiralThreading = -00:18:22 verbose #13986 > let new_disposable_token x = -00:18:22 verbose #13987 > #if !INTERACTIVE -00:18:22 verbose #13988 > Threading.new_disposable_token x -00:18:22 verbose #13989 > #else -00:18:22 verbose #13990 > new_disposable_token x -00:18:22 verbose #13991 > #endif -00:18:22 verbose #13992 > -00:18:22 verbose #13993 > module SpiralNetworking = -00:18:22 verbose #13994 > let test_port_open x = -00:18:22 verbose #13995 > #if !INTERACTIVE -00:18:22 verbose #13996 > Networking.test_port_open x -00:18:22 verbose #13997 > #else -00:18:22 verbose #13998 > test_port_open x -00:18:22 verbose #13999 > #endif -00:18:22 verbose #14000 > -00:18:22 verbose #14001 > let test_port_open_timeout x = -00:18:22 verbose #14002 > #if !INTERACTIVE -00:18:22 verbose #14003 > Networking.test_port_open_timeout x -00:18:22 verbose #14004 > #else -00:18:22 verbose #14005 > test_port_open_timeout x -00:18:22 verbose #14006 > #endif -00:18:22 verbose #14007 > -00:18:22 verbose #14008 > let wait_for_port_access x = -00:18:22 verbose #14009 > #if !INTERACTIVE -00:18:22 verbose #14010 > Networking.wait_for_port_access x -00:18:22 verbose #14011 > #else -00:18:22 verbose #14012 > wait_for_port_access x -00:18:22 verbose #14013 > #endif -00:18:22 verbose #14014 > -00:18:22 verbose #14015 > let get_available_port x = -00:18:22 verbose #14016 > #if !INTERACTIVE -00:18:22 verbose #14017 > Networking.get_available_port x -00:18:22 verbose #14018 > #else -00:18:22 verbose #14019 > get_available_port x -00:18:22 verbose #14020 > #endif -00:18:22 verbose #14021 > -00:18:22 verbose #14022 > module SpiralRuntime = -00:18:22 verbose #14023 > let get_executable_suffix () = -00:18:22 verbose #14024 > #if !INTERACTIVE -00:18:22 verbose #14025 > Runtime.get_executable_suffix () -00:18:22 verbose #14026 > #else -00:18:22 verbose #14027 > get_executable_suffix () -00:18:22 verbose #14028 > #endif -00:18:22 verbose #14029 > -00:18:22 verbose #14030 > let is_windows () = -00:18:22 verbose #14031 > #if !INTERACTIVE -00:18:22 verbose #14032 > ... -00:18:22 verbose #14033 > -00:18:22 verbose #14034 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #14035 > #if !INTERACTIVE -00:18:22 verbose #14036 > namespace Polyglot -00:18:22 verbose #14037 > #endif -00:18:22 verbose #14038 > -00:18:22 verbose #14039 > module Common = -00:18:22 verbose #14040 > -00:18:22 verbose #14041 > #if !INTERACTIVE -00:18:22 verbose #14042 > open Lib -00:18:22 verbose #14043 > #endif -00:18:22 verbose #14044 > -00:18:22 verbose #14045 > let nl = System.Environment.NewLine -00:18:22 verbose #14046 > let q = @"""" -00:18:22 verbose #14047 > -00:18:22 verbose #14048 > let inline cons head tail = head :: tail -00:18:22 verbose #14049 > -00:18:22 verbose #14050 > /// ## memoize -00:18:22 verbose #14051 > let inline memoize fn = -00:18:22 verbose #14052 > let result = lazy fn () -00:18:22 verbose #14053 > fun () -> result.Value -00:18:22 verbose #14054 > -00:18:22 verbose #14055 > /// ## TraceLevel -00:18:22 verbose #14056 > type TraceLevel = -00:18:22 verbose #14057 > | Verbose -00:18:22 verbose #14058 > | Debug -00:18:22 verbose #14059 > | Info -00:18:22 verbose #14060 > | Warning -00:18:22 verbose #14061 > | Critical -00:18:22 verbose #14062 > -00:18:22 verbose #14063 > let inline _locals () = "" -00:18:22 verbose #14064 > -00:18:22 verbose #14065 > /// ## trace -00:18:22 verbose #14066 > let to_trace_level = function -00:18:22 verbose #14067 > | Verbose -> SpiralTrace.TraceLevel.US0_0 -00:18:22 verbose #14068 > | Debug -> SpiralTrace.TraceLevel.US0_1 -00:18:22 verbose #14069 > | Info -> SpiralTrace.TraceLevel.US0_2 -00:18:22 verbose #14070 > | Warning -> SpiralTrace.TraceLevel.US0_3 -00:18:22 verbose #14071 > | Critical -> SpiralTrace.TraceLevel.US0_4 -00:18:22 verbose #14072 > -00:18:22 verbose #14073 > let trace level fn locals = -00:18:22 verbose #14074 > let level = level |> to_trace_level -00:18:22 verbose #14075 > SpiralTrace.trace level fn locals -00:18:22 verbose #14076 > -00:18:22 verbose #14077 > -00:18:22 verbose #14078 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #14079 > #if !INTERACTIVE -00:18:22 verbose #14080 > namespace Polyglot -00:18:22 verbose #14081 > #endif -00:18:22 verbose #14082 > -00:18:22 verbose #14083 > module CommonFSharp = -00:18:22 verbose #14084 > -00:18:22 verbose #14085 > open Common -00:18:22 verbose #14086 > -00:18:22 verbose #14087 > /// ## getUnionCaseName -00:18:22 verbose #14088 > let inline getUnionCaseName<'T> (x: 'T) = -00:18:22 verbose #14089 > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with -00:18:22 verbose #14090 > | case, _ -> case.Name -00:18:22 verbose #14091 > -00:18:22 verbose #14092 > -00:18:22 verbose #14093 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #14094 > #if !INTERACTIVE -00:18:22 verbose #14095 > namespace Polyglot -00:18:22 verbose #14096 > #endif -00:18:22 verbose #14097 > -00:18:22 verbose #14098 > module Async = -00:18:22 verbose #14099 > -00:18:22 verbose #14100 > #if !INTERACTIVE -00:18:22 verbose #14101 > open Lib -00:18:22 verbose #14102 > #endif -00:18:22 verbose #14103 > -00:18:22 verbose #14104 > open Common -00:18:22 verbose #14105 > -00:18:22 verbose #14106 > /// ## choice -00:18:22 verbose #14107 > let inline choice asyncs = async { -00:18:22 verbose #14108 > let e = Event<_> () -00:18:22 verbose #14109 > use cts = new System.Threading.CancellationTokenSource () -00:18:22 verbose #14110 > let fn = -00:18:22 verbose #14111 > asyncs -00:18:22 verbose #14112 > |> Seq.map (fun a -> async { -00:18:22 verbose #14113 > let! x = a -00:18:22 verbose #14114 > e.Trigger x -00:18:22 verbose #14115 > }) -00:18:22 verbose #14116 > |> Async.Parallel -00:18:22 verbose #14117 > |> Async.Ignore -00:18:22 verbose #14118 > Async.Start (fn, cts.Token) -00:18:22 verbose #14119 > let! result = Async.AwaitEvent e.Publish -00:18:22 verbose #14120 > cts.Cancel () -00:18:22 verbose #14121 > return result -00:18:22 verbose #14122 > } -00:18:22 verbose #14123 > -00:18:22 verbose #14124 > /// ## map -00:18:22 verbose #14125 > let inline map fn a = async { -00:18:22 verbose #14126 > let! x = a -00:18:22 verbose #14127 > return fn x -00:18:22 verbose #14128 > } -00:18:22 verbose #14129 > -00:18:22 verbose #14130 > /// ## catch -00:18:22 verbose #14131 > let inline catch a = -00:18:22 verbose #14132 > a -00:18:22 verbose #14133 > |> Async.Catch -00:18:22 verbose #14134 > |> map (function -00:18:22 verbose #14135 > | Choice1Of2 result -> Ok result -00:18:22 verbose #14136 > | Choice2Of2 ex -> Error ex -00:18:22 verbose #14137 > ) -00:18:22 verbose #14138 > -00:18:22 verbose #14139 > /// ## runWithTimeoutChoiceAsync -00:18:22 verbose #14140 > let inline runWithTimeoutChoiceAsync (timeout : int) fn = -00:18:22 verbose #14141 > let _locals () = $"timeout: {timeout} / {_locals ()}" -00:18:22 verbose #14142 > -00:18:22 verbose #14143 > let timeoutTask = async { -00:18:22 verbose #14144 > do! Async.Sleep timeout -00:18:22 verbose #14145 > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals -00:18:22 verbose #14146 > return None -00:18:22 verbose #14147 > } -00:18:22 verbose #14148 > -00:18:22 verbose #14149 > let task = async { -00:18:22 verbose #14150 > try -00:18:22 verbose #14151 > let! result = fn -00:18:22 verbose #14152 > return Some result -00:18:22 verbose #14153 > with -00:18:22 verbose #14154 > | :? System.AggregateException as ex when -00:18:22 verbose #14155 > ex.InnerExceptions -00:18:22 verbose #14156 > |> Seq.exists (function :? Sys... -00:18:22 verbose #14157 > -00:18:22 verbose #14158 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #14159 > #if !INTERACTIVE -00:18:22 verbose #14160 > namespace Polyglot -00:18:22 verbose #14161 > #endif -00:18:22 verbose #14162 > -00:18:22 verbose #14163 > module AsyncSeq = -00:18:22 verbose #14164 > -00:18:22 verbose #14165 > #if !INTERACTIVE -00:18:22 verbose #14166 > open Lib -00:18:22 verbose #14167 > #endif -00:18:22 verbose #14168 > -00:18:22 verbose #14169 > open Common -00:18:22 verbose #14170 > -00:18:22 verbose #14171 > /// ## subscribeEvent -00:18:22 verbose #14172 > let inline subscribeEvent (event: IEvent<'H, 'A>) map = -00:18:22 verbose #14173 > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, -00:18:22 verbose #14174 > 'A>(event.AddHandler, event.RemoveHandler) -00:18:22 verbose #14175 > System.Reactive.Linq.Observable.Select (observable, fun event -> map -00:18:22 verbose #14176 > event.EventArgs) -00:18:22 verbose #14177 > |> FSharp.Control.AsyncSeq.ofObservableBuffered -00:18:22 verbose #14178 > -00:18:22 verbose #14179 > /// ## subscribeToken -00:18:22 verbose #14180 > let subscribeToken (token : System.Threading.CancellationToken) = -00:18:22 verbose #14181 > let tcs = new System.Threading.Tasks.TaskCompletionSource () -00:18:22 verbose #14182 > System.Action tcs.SetResult |> token.Register |> ignore -00:18:22 verbose #14183 > let start = System.DateTime.Now.Ticks -00:18:22 verbose #14184 > FSharp.Control.AsyncSeq.unfoldAsync -00:18:22 verbose #14185 > (fun () -> async { -00:18:22 verbose #14186 > do! tcs.Task |> Async.AwaitTask -00:18:22 verbose #14187 > return Some (System.DateTime.Now.Ticks - start, ()) -00:18:22 verbose #14188 > }) -00:18:22 verbose #14189 > () -00:18:22 verbose #14190 > -00:18:22 verbose #14191 > -00:18:22 verbose #14192 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #14193 > #if !INTERACTIVE -00:18:22 verbose #14194 > namespace Polyglot -00:18:22 verbose #14195 > #endif -00:18:22 verbose #14196 > -00:18:22 verbose #14197 > module Runtime = -00:18:22 verbose #14198 > -00:18:22 verbose #14199 > #if !INTERACTIVE -00:18:22 verbose #14200 > open Lib -00:18:22 verbose #14201 > #endif -00:18:22 verbose #14202 > -00:18:22 verbose #14203 > open Common -00:18:22 verbose #14204 > -00:18:22 verbose #14205 > /// ## parseArgs -00:18:22 verbose #14206 > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = -00:18:22 verbose #14207 > let assemblyName = -00:18:22 verbose #14208 > System.Reflection.Assembly.GetEntryAssembly().GetName().Name -00:18:22 verbose #14209 > let errorHandler : Argu.IExiter = -00:18:22 verbose #14210 > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> -00:18:22 verbose #14211 > List.contains assemblyName -00:18:22 verbose #14212 > then Argu.ExceptionExiter () -00:18:22 verbose #14213 > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | -00:18:22 verbose #14214 > _ -> Some System.ConsoleColor.Red) -00:18:22 verbose #14215 > -00:18:22 verbose #14216 > let parser = -00:18:22 verbose #14217 > Argu.ArgumentParser.Create<'T> ( -00:18:22 verbose #14218 > programName = -00:18:22 verbose #14219 > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", -00:18:22 verbose #14220 > errorHandler = errorHandler -00:18:22 verbose #14221 > ) -00:18:22 verbose #14222 > -00:18:22 verbose #14223 > parser.ParseCommandLine args -00:18:22 verbose #14224 > -00:18:22 verbose #14225 > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = -00:18:22 verbose #14226 > args -00:18:22 verbose #14227 > |> parseArgs<'T> -00:18:22 verbose #14228 > |> fun results -> results.GetAllResults () -00:18:22 verbose #14229 > -00:18:22 verbose #14230 > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = -00:18:22 verbose #14231 > args -00:18:22 verbose #14232 > |> parseAllArgs<'T> -00:18:22 verbose #14233 > |> List.groupBy CommonFSharp.getUnionCaseName<'T> -00:18:22 verbose #14234 > |> Map.ofList -00:18:22 verbose #14235 > -00:18:22 verbose #14236 > -00:18:22 verbose #14237 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #14238 > #if !INTERACTIVE -00:18:22 verbose #14239 > namespace Polyglot -00:18:22 verbose #14240 > #endif -00:18:22 verbose #14241 > -00:18:22 verbose #14242 > module FileSystem = -00:18:22 verbose #14243 > -00:18:22 verbose #14244 > #if !INTERACTIVE -00:18:22 verbose #14245 > open Lib -00:18:22 verbose #14246 > #endif -00:18:22 verbose #14247 > -00:18:22 verbose #14248 > open Common -00:18:22 verbose #14249 > open SpiralFileSystem.Operators -00:18:22 verbose #14250 > -00:18:22 verbose #14251 > /// ## watchDirectory -00:18:22 verbose #14252 > [[<RequireQualifiedAccess>]] -00:18:22 verbose #14253 > type FileSystemChangeType = -00:18:22 verbose #14254 > | Failure -00:18:22 verbose #14255 > | Changed -00:18:22 verbose #14256 > | Created -00:18:22 verbose #14257 > | Deleted -00:18:22 verbose #14258 > | Renamed -00:18:22 verbose #14259 > -00:18:22 verbose #14260 > [[<RequireQualifiedAccess>]] -00:18:22 verbose #14261 > type FileSystemChange = -00:18:22 verbose #14262 > | Failure of exn: exn -00:18:22 verbose #14263 > | Changed of path: string * content: string option -00:18:22 verbose #14264 > | Created of path: string * content: string option -00:18:22 verbose #14265 > | Deleted of path: string -00:18:22 verbose #14266 > | Renamed of oldPath: string * (string * string option) -00:18:22 verbose #14267 > -00:18:22 verbose #14268 > -00:18:22 verbose #14269 > let inline watchDirectoryWithFilter filter shouldReadContent path = -00:18:22 verbose #14270 > let fullPath = path |> System.IO.Path.GetFullPath -00:18:22 verbose #14271 > let _locals () = $"filter: {filter} / {_locals ()}" -00:18:22 verbose #14272 > -00:18:22 verbose #14273 > let watcher = -00:18:22 verbose #14274 > new System.IO.FileSystemWatcher ( -00:18:22 verbose #14275 > Path = fullPath, -00:18:22 verbose #14276 > NotifyFilter = filter, -00:18:22 verbose #14277 > EnableRaisingEvents = true, -00:18:22 verbose #14278 > IncludeSubdirectories = true -00:18:22 verbose #14279 > ) -00:18:22 verbose #14280 > -00:18:22 verbose #14281 > let inline getEventPath (path : string) = -00:18:22 verbose #14282 > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> -00:18:22 verbose #14283 > SpiralSm.trim_start [[| '/'; '\\' |]] -00:18:22 verbose #14284 > -00:18:22 verbose #14285 > let inline ticks () = -00:18:22 verbose #14286 > System.DateTime.UtcNow.Ticks -00:18:22 verbose #14287 > -00:18:22 verbose #14288 > let changedStream = -00:18:22 verbose #14289 > AsyncSeq.subscribeEvent -00:18:22 verbose #14290 > watcher.Changed -00:18:22 verbose #14291 > (fun event -> -00:18:22 verbose #14292 > ticks (), -00:18:22 verbose #14293 > [[ FileSystemChange... -00:18:22 verbose #14294 > -00:18:22 verbose #14295 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #14296 > #if !INTERACTIVE -00:18:22 verbose #14297 > open Lib -00:18:22 verbose #14298 > #endif -00:18:22 verbose #14299 > -00:18:22 verbose #14300 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #14301 > open Common -00:18:22 verbose #14302 > open SpiralFileSystem.Operators -00:18:22 verbose #14303 > -00:18:22 verbose #14304 > ── fsharp - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #14305 > let workspaceRoot = SpiralFileSystem.get_workspace_root () -00:18:22 verbose #14306 > let tmpSpiralPath = workspaceRoot </> "target/polyglot/plotting" -00:18:22 verbose #14307 > let linePlotsDataPath = tmpSpiralPath </> "line_data" -00:18:22 verbose #14308 > let linePlotsSvgPath = tmpSpiralPath </> "line_svg" -00:18:22 verbose #14309 > -00:18:22 verbose #14310 > [[ tmpSpiralPath; linePlotsDataPath; linePlotsSvgPath ]] -00:18:22 verbose #14311 > |> List.iter (fun dir -> if Directory.Exists dir |> not then -00:18:22 verbose #14312 > Directory.CreateDirectory dir |> ignore) -00:18:22 verbose #14313 > -00:18:22 verbose #14314 > Formatter.Register<struct (string * string * string * struct (string * float -00:18:22 verbose #14315 > array * float array) array)> ( -00:18:22 verbose #14316 > (fun struct (caption, x_desc, y_desc, ys) -> -00:18:22 verbose #14317 > let json = (caption, x_desc, y_desc, ys) |> FSharp.Json.Json.serialize -00:18:22 verbose #14318 > async { -00:18:22 verbose #14319 > let hashHex = json |> SpiralCrypto.hash_text -00:18:22 verbose #14320 > let svgPath = linePlotsSvgPath </> $"{hashHex}.svg" -00:18:22 verbose #14321 > -00:18:22 verbose #14322 > if System.IO.File.Exists svgPath |> not then -00:18:22 verbose #14323 > do! json |> SpiralFileSystem.write_all_text_async -00:18:22 verbose #14324 > $"{linePlotsDataPath </> hashHex}.json" -00:18:22 verbose #14325 > -00:18:22 verbose #14326 > let ct = -00:18:22 verbose #14327 > Microsoft.DotNet.Interactive.KernelInvocationContext.Current.CancellationToken -00:18:22 verbose #14328 > -00:18:22 verbose #14329 > let oldLevel = get_trace_level () -00:18:22 verbose #14330 > SpiralTrace.TraceLevel.US0_2 -00:18:22 verbose #14331 > |> set_trace_level -00:18:22 verbose #14332 > use _ = (new_disposable (fun () -> -00:18:22 verbose #14333 > oldLevel |> set_trace_level -00:18:22 verbose #14334 > )) -00:18:22 verbose #14335 > -00:18:22 verbose #14336 > let plotExePath = workspaceRoot </> -00:18:22 verbose #14337 > $"target/release/plot{SpiralRuntime.get_executable_suffix ()}" -00:18:22 verbose #14338 > let! exitCode, result = -00:18:22 verbose #14339 > SpiralRuntime.execution_options (fun x -> -00:18:22 verbose #14340 > ... -00:18:22 verbose #14341 > -00:18:22 verbose #14342 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14343 > //// test -00:18:22 verbose #14344 > -00:18:22 verbose #14345 > open testing -00:18:22 verbose #14346 > -00:18:22 verbose #14347 > ── spiral - import ───────────────────────────────────────────────────────────── -00:18:22 verbose #14348 > #r -00:18:22 verbose #14349 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:18:22 verbose #14350 > otNet.Interactive.Spiral.dll" -00:18:22 verbose #14351 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:18:22 verbose #14352 > #r -00:18:22 verbose #14353 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:18:22 verbose #14354 > otNet.Interactive.dll" -00:18:22 verbose #14355 > open type Microsoft.DotNet.Interactive.Kernel -00:18:22 verbose #14356 > -00:18:22 verbose #14357 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #14358 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #14359 > │ ## init_series │ -00:18:22 verbose #14360 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14361 > -00:18:22 verbose #14362 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14363 > //// test -00:18:22 verbose #14364 > -00:18:22 verbose #14365 > inl x : a _ f64 = am'.init_series -3 3 0.01 -00:18:22 verbose #14366 > inl y = x |> am.map math.square -00:18:22 verbose #14367 > "square", "x", "y", ;[[ "square", x, y ]] -00:18:22 verbose #14368 > -00:18:22 verbose #14369 > ╭─[ 121.36ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #14370 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #14371 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #14372 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #14373 > │ stroke="none"/> │ -00:18:22 verbose #14374 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #14375 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #14376 > │ fill="#FFFFFF"> │ -00:18:22 verbose #14377 > │ square │ -00:18:22 verbose #14378 > │ </text> │ -00:18:22 verbose #14379 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ -00:18:22 verbose #14380 > │ y2="75"/> │ -00:18:22 verbose #14381 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #14382 > │ y2="75"/> │ -00:18:22 verbose #14383 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ -00:18:22 verbose #14384 > │ y2="75"/> │ -00:18:22 verbose #14385 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ -00:18:22 verbose #14386 > │ y2="75"/> │ -00:18:22 verbose #14387 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ -00:18:22 verbose #14388 > │ y2="75"/> │ -00:18:22 verbose #14389 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ -00:18:22 verbose #14390 > │ x2="103" y2="75"/> │ -00:18:22 verbose #14391 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ -00:18:22 verbose #14392 > │ x2="111" y2="75"/> │ -00:18:22 verbose #14393 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #14394 > │ x2="119" y2="75"/> │ -00:18:22 verbose #14395 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ -00:18:22 verbose #14396 > │ x2="128" y2="75"/> │ -00:18:22 verbose #14397 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ -00:18:22 verbose #14398 > │ x2="136" y2="75"/> │ -00:18:22 verbose #14399 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ -00:18:22 verbose #14400 > │ x2="144" y2="75"/> │ -00:18:22 verbose #14401 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ -00:18:22 verbose #14402 > │ x2="153" y2="75"/> │ -00:18:22 verbose #14403 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ -00:18:22 verbose #14404 > │ x2="161" y2="75"/> │ -00:18:22 verbose #14405 > │ <line opacity="1" stroke="#3... │ -00:18:22 verbose #14406 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14407 > -00:18:22 verbose #14408 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14409 > //// test -00:18:22 verbose #14410 > -00:18:22 verbose #14411 > inl x : a _ f64 = am'.init_series -10 10 0.1 -00:18:22 verbose #14412 > inl y_sin = x |> am.map sin -00:18:22 verbose #14413 > inl y_cos = x |> am.map cos -00:18:22 verbose #14414 > "sin cos", "x", "y", ;[[ "sin", x, y_sin; "cos", x, y_cos ]] -00:18:22 verbose #14415 > -00:18:22 verbose #14416 > ╭─[ 173.19ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #14417 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #14418 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #14419 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #14420 > │ stroke="none"/> │ -00:18:22 verbose #14421 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #14422 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #14423 > │ fill="#FFFFFF"> │ -00:18:22 verbose #14424 > │ sin cos │ -00:18:22 verbose #14425 > │ </text> │ -00:18:22 verbose #14426 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │ -00:18:22 verbose #14427 > │ y2="75"/> │ -00:18:22 verbose #14428 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #14429 > │ y2="75"/> │ -00:18:22 verbose #14430 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │ -00:18:22 verbose #14431 > │ y2="75"/> │ -00:18:22 verbose #14432 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ -00:18:22 verbose #14433 > │ y2="75"/> │ -00:18:22 verbose #14434 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │ -00:18:22 verbose #14435 > │ x2="107" y2="75"/> │ -00:18:22 verbose #14436 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #14437 > │ x2="119" y2="75"/> │ -00:18:22 verbose #14438 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="132" y1="424" │ -00:18:22 verbose #14439 > │ x2="132" y2="75"/> │ -00:18:22 verbose #14440 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ -00:18:22 verbose #14441 > │ x2="144" y2="75"/> │ -00:18:22 verbose #14442 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="157" y1="424" │ -00:18:22 verbose #14443 > │ x2="157" y2="75"/> │ -00:18:22 verbose #14444 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ -00:18:22 verbose #14445 > │ x2="169" y2="75"/> │ -00:18:22 verbose #14446 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="182" y1="424" │ -00:18:22 verbose #14447 > │ x2="182" y2="75"/> │ -00:18:22 verbose #14448 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="194" y1="424" │ -00:18:22 verbose #14449 > │ x2="194" y2="75"/> │ -00:18:22 verbose #14450 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="207" y1="424" │ -00:18:22 verbose #14451 > │ x2="207" y2="75"/> │ -00:18:22 verbose #14452 > │ <line opacity="1" stroke=... │ -00:18:22 verbose #14453 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14454 > -00:18:22 verbose #14455 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14456 > //// test -00:18:22 verbose #14457 > -00:18:22 verbose #14458 > inl y_pos y0 vy0 ay t = -00:18:22 verbose #14459 > y0 + vy0 * t + ay * (t |> math.square) / 2 -00:18:22 verbose #14460 > -00:18:22 verbose #14461 > inl x : a _ f64 = am'.init_series 0 5 0.01 -00:18:22 verbose #14462 > inl y = x |> am.map (y_pos 0 20 -9.8) -00:18:22 verbose #14463 > "projectile motion", "time (s)", "", ;[[ "height of projectile (m)", x, y ]] -00:18:22 verbose #14464 > -00:18:22 verbose #14465 > ╭─[ 86.28ms - return value ]───────────────────────────────────────────────────╮ -00:18:22 verbose #14466 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #14467 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #14468 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #14469 > │ stroke="none"/> │ -00:18:22 verbose #14470 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #14471 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #14472 > │ fill="#FFFFFF"> │ -00:18:22 verbose #14473 > │ projectile motion │ -00:18:22 verbose #14474 > │ </text> │ -00:18:22 verbose #14475 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ -00:18:22 verbose #14476 > │ y2="75"/> │ -00:18:22 verbose #14477 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #14478 > │ y2="75"/> │ -00:18:22 verbose #14479 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ -00:18:22 verbose #14480 > │ y2="75"/> │ -00:18:22 verbose #14481 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ -00:18:22 verbose #14482 > │ y2="75"/> │ -00:18:22 verbose #14483 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ -00:18:22 verbose #14484 > │ y2="75"/> │ -00:18:22 verbose #14485 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ -00:18:22 verbose #14486 > │ x2="109" y2="75"/> │ -00:18:22 verbose #14487 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #14488 > │ x2="119" y2="75"/> │ -00:18:22 verbose #14489 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ -00:18:22 verbose #14490 > │ x2="129" y2="75"/> │ -00:18:22 verbose #14491 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ -00:18:22 verbose #14492 > │ x2="139" y2="75"/> │ -00:18:22 verbose #14493 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ -00:18:22 verbose #14494 > │ x2="149" y2="75"/> │ -00:18:22 verbose #14495 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ -00:18:22 verbose #14496 > │ x2="159" y2="75"/> │ -00:18:22 verbose #14497 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ -00:18:22 verbose #14498 > │ x2="169" y2="75"/> │ -00:18:22 verbose #14499 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ -00:18:22 verbose #14500 > │ x2="179" y2="75"/> │ -00:18:22 verbose #14501 > │ <line opacity="1"... │ -00:18:22 verbose #14502 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14503 > -00:18:22 verbose #14504 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #14505 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #14506 > │ ## velocity_cf │ -00:18:22 verbose #14507 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14508 > -00:18:22 verbose #14509 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14510 > type mass = f64 -00:18:22 verbose #14511 > type time = f64 -00:18:22 verbose #14512 > type position = f64 -00:18:22 verbose #14513 > type velocity = f64 -00:18:22 verbose #14514 > type force = f64 -00:18:22 verbose #14515 > -00:18:22 verbose #14516 > type velocity_cf = mass -> velocity -> list force -> (time -> velocity) -00:18:22 verbose #14517 > -00:18:22 verbose #14518 > inl velocity_cf m v0 fs = -00:18:22 verbose #14519 > inl f_net = fs |> listm'.sum -00:18:22 verbose #14520 > inl a0 = f_net / m -00:18:22 verbose #14521 > inl v t = v0 + a0 * t -00:18:22 verbose #14522 > v -00:18:22 verbose #14523 > -00:18:22 verbose #14524 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14525 > //// test -00:18:22 verbose #14526 > -00:18:22 verbose #14527 > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 0 -00:18:22 verbose #14528 > |> _assert_eq 0.6 -00:18:22 verbose #14529 > -00:18:22 verbose #14530 > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 1 -00:18:22 verbose #14531 > |> _assert_eq 0.2 -00:18:22 verbose #14532 > -00:18:22 verbose #14533 > ╭─[ 43.33ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #14534 > │ assert_eq / actual: 0.6 / expected: 0.6 │ -00:18:22 verbose #14535 > │ assert_eq / actual: 0.2 / expected: 0.2 │ -00:18:22 verbose #14536 > │ │ -00:18:22 verbose #14537 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14538 > -00:18:22 verbose #14539 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14540 > //// test -00:18:22 verbose #14541 > -00:18:22 verbose #14542 > inl x = am'.init_series 0 4 0.1 -00:18:22 verbose #14543 > inl y = x |> am.map (velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]]) -00:18:22 verbose #14544 > "car on an air track", "time (s)", "", ;[[ "velocity of car (m/s)", x, y ]] -00:18:22 verbose #14545 > -00:18:22 verbose #14546 > ╭─[ 63.39ms - return value ]───────────────────────────────────────────────────╮ -00:18:22 verbose #14547 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #14548 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #14549 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #14550 > │ stroke="none"/> │ -00:18:22 verbose #14551 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #14552 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #14553 > │ fill="#FFFFFF"> │ -00:18:22 verbose #14554 > │ car on an air track │ -00:18:22 verbose #14555 > │ </text> │ -00:18:22 verbose #14556 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │ -00:18:22 verbose #14557 > │ y2="75"/> │ -00:18:22 verbose #14558 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #14559 > │ y2="75"/> │ -00:18:22 verbose #14560 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │ -00:18:22 verbose #14561 > │ y2="75"/> │ -00:18:22 verbose #14562 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ -00:18:22 verbose #14563 > │ y2="75"/> │ -00:18:22 verbose #14564 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │ -00:18:22 verbose #14565 > │ x2="107" y2="75"/> │ -00:18:22 verbose #14566 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #14567 > │ x2="119" y2="75"/> │ -00:18:22 verbose #14568 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="132" y1="424" │ -00:18:22 verbose #14569 > │ x2="132" y2="75"/> │ -00:18:22 verbose #14570 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ -00:18:22 verbose #14571 > │ x2="144" y2="75"/> │ -00:18:22 verbose #14572 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="157" y1="424" │ -00:18:22 verbose #14573 > │ x2="157" y2="75"/> │ -00:18:22 verbose #14574 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ -00:18:22 verbose #14575 > │ x2="169" y2="75"/> │ -00:18:22 verbose #14576 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="182" y1="424" │ -00:18:22 verbose #14577 > │ x2="182" y2="75"/> │ -00:18:22 verbose #14578 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="194" y1="424" │ -00:18:22 verbose #14579 > │ x2="194" y2="75"/> │ -00:18:22 verbose #14580 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="207" y1="424" │ -00:18:22 verbose #14581 > │ x2="207" y2="75"/> │ -00:18:22 verbose #14582 > │ <line opacity... │ -00:18:22 verbose #14583 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14584 > -00:18:22 verbose #14585 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #14586 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #14587 > │ ## derivative │ -00:18:22 verbose #14588 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14589 > -00:18:22 verbose #14590 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14591 > type derivative = (f64 -> f64) -> f64 -> f64 -00:18:22 verbose #14592 > -00:18:22 verbose #14593 > inl derivative dt : derivative = -00:18:22 verbose #14594 > fun x t => -00:18:22 verbose #14595 > (x (t + dt / 2) - x (t - dt / 2)) / dt -00:18:22 verbose #14596 > -00:18:22 verbose #14597 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14598 > //// test -00:18:22 verbose #14599 > -00:18:22 verbose #14600 > derivative 1 (fun x => x ** 4 / 4) 1 - 1 -00:18:22 verbose #14601 > |> _assert_approx_eq None 0.25 -00:18:22 verbose #14602 > -00:18:22 verbose #14603 > derivative 0.001 (fun x => x ** 4 / 4) 1 - 1 -00:18:22 verbose #14604 > |> _assert_approx_eq None 0.0000002499998827953931 -00:18:22 verbose #14605 > -00:18:22 verbose #14606 > derivative 0.000001 (fun x => x ** 4 / 4) 1 - 1 -00:18:22 verbose #14607 > |> _assert_approx_eq None 0.000000000001000088900582341 -00:18:22 verbose #14608 > -00:18:22 verbose #14609 > derivative 0.000000001 (fun x => x ** 4 / 4) 1 - 1 -00:18:22 verbose #14610 > |> _assert_approx_eq None 0.00000008274037099909037 -00:18:22 verbose #14611 > -00:18:22 verbose #14612 > derivative 0.000000000001 (fun x => x ** 4 / 4) 1 - 1 -00:18:22 verbose #14613 > |> _assert_approx_eq None 0.00008890058234101161 -00:18:22 verbose #14614 > -00:18:22 verbose #14615 > derivative 0.000000000000001 (fun x => x ** 4 / 4) 1 - 1 -00:18:22 verbose #14616 > |> _assert_approx_eq None -0.0007992778373592246 -00:18:22 verbose #14617 > -00:18:22 verbose #14618 > derivative 0.000000000000000001 (fun x => x ** 4 / 4) 1 - 1 -00:18:22 verbose #14619 > |> _assert_approx_eq None -1 -00:18:22 verbose #14620 > -00:18:22 verbose #14621 > ╭─[ 50.58ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #14622 > │ assert_approx_eq / actual: 0.25 / expected: 0.25 │ -00:18:22 verbose #14623 > │ assert_approx_eq / actual: 2.499998828e-07 / expected: 2.499998828e-07 │ -00:18:22 verbose #14624 > │ assert_approx_eq / actual: 1.000088901e-12 / expected: 1.000088901e-12 │ -00:18:22 verbose #14625 > │ assert_approx_eq / actual: 8.2740371e-08 / expected: 8.2740371e-08 │ -00:18:22 verbose #14626 > │ assert_approx_eq / actual: 8.890058234e-05 / expected: 8.890058234e-05 │ -00:18:22 verbose #14627 > │ assert_approx_eq / actual: -0.0007992778374 / expected: -0.0007992778374 │ -00:18:22 verbose #14628 > │ assert_approx_eq / actual: -1.0 / expected: -1.0 │ -00:18:22 verbose #14629 > │ │ -00:18:22 verbose #14630 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14631 > -00:18:22 verbose #14632 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #14633 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #14634 > │ ## integration │ -00:18:22 verbose #14635 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14636 > -00:18:22 verbose #14637 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14638 > type integration = (f64 -> f64) -> f64 -> f64 -> f64 -00:18:22 verbose #14639 > -00:18:22 verbose #14640 > inl integral dt : integration = -00:18:22 verbose #14641 > fun f a b => -00:18:22 verbose #14642 > inl rec loop t y = -00:18:22 verbose #14643 > if t < b -00:18:22 verbose #14644 > then loop (t + dt) (y + f t * dt) -00:18:22 verbose #14645 > else t, y -00:18:22 verbose #14646 > loop (a + dt / 2) 0 -00:18:22 verbose #14647 > |> snd -00:18:22 verbose #14648 > -00:18:22 verbose #14649 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14650 > //// test -00:18:22 verbose #14651 > -00:18:22 verbose #14652 > integral 0.01 math.square 0 1 -00:18:22 verbose #14653 > |> _assert_approx_eq None 0.33332500000000004 -00:18:22 verbose #14654 > -00:18:22 verbose #14655 > ╭─[ 28.72ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #14656 > │ assert_approx_eq / actual: 0.333325 / expected: 0.333325 │ -00:18:22 verbose #14657 > │ │ -00:18:22 verbose #14658 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14659 > -00:18:22 verbose #14660 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14661 > inl integral' dt : integration = -00:18:22 verbose #14662 > fun f a b => -00:18:22 verbose #14663 > listm'.init_series (a + dt / 2) (b - dt / 2) dt -00:18:22 verbose #14664 > |> listm.map (f >> (*) dt) -00:18:22 verbose #14665 > |> listm'.sum -00:18:22 verbose #14666 > -00:18:22 verbose #14667 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14668 > //// test -00:18:22 verbose #14669 > -00:18:22 verbose #14670 > integral' 0.1 math.square 0 1 -00:18:22 verbose #14671 > |> _assert_approx_eq None (integral 0.1 math.square 0 1) -00:18:22 verbose #14672 > -00:18:22 verbose #14673 > ╭─[ 31.93ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #14674 > │ assert_approx_eq / actual: 0.3325 / expected: 0.3325 │ -00:18:22 verbose #14675 > │ │ -00:18:22 verbose #14676 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14677 > -00:18:22 verbose #14678 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14679 > inl integral'' dt : integration = -00:18:22 verbose #14680 > fun f a b => -00:18:22 verbose #14681 > am'.init_series (a + dt / 2) (b - dt / 2) dt -00:18:22 verbose #14682 > |> am.map (f >> (*) dt) -00:18:22 verbose #14683 > |> am'.sum -00:18:22 verbose #14684 > -00:18:22 verbose #14685 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14686 > //// test -00:18:22 verbose #14687 > -00:18:22 verbose #14688 > integral'' 0.01 math.square 0 1 -00:18:22 verbose #14689 > |> _assert_approx_eq None (integral 0.01 math.square 0 1) -00:18:22 verbose #14690 > -00:18:22 verbose #14691 > ╭─[ 88.95ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #14692 > │ assert_approx_eq / actual: 0.333325 / expected: 0.333325 │ -00:18:22 verbose #14693 > │ │ -00:18:22 verbose #14694 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14695 > -00:18:22 verbose #14696 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #14697 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #14698 > │ ## anti_derivative │ -00:18:22 verbose #14699 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14700 > -00:18:22 verbose #14701 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14702 > inl anti_derivative dt v0 a t = -00:18:22 verbose #14703 > v0 + integral' dt a 0 t -00:18:22 verbose #14704 > -00:18:22 verbose #14705 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #14706 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #14707 > │ ## velocity_ft │ -00:18:22 verbose #14708 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14709 > -00:18:22 verbose #14710 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14711 > type velocity_ft = mass -> velocity -> list (time -> force) -> (time -> -00:18:22 verbose #14712 > velocity) -00:18:22 verbose #14713 > -00:18:22 verbose #14714 > inl velocity_ft dt : velocity_ft = -00:18:22 verbose #14715 > fun m v0 fs => -00:18:22 verbose #14716 > inl f_net t = fs |> listm.map (fun f => f t) |> listm'.sum -00:18:22 verbose #14717 > inl a t = f_net t / m -00:18:22 verbose #14718 > anti_derivative dt v0 a -00:18:22 verbose #14719 > -00:18:22 verbose #14720 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #14721 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #14722 > │ ## position_ft │ -00:18:22 verbose #14723 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14724 > -00:18:22 verbose #14725 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14726 > type position_ft = mass -> position -> velocity -> list (time -> force) -> (time -00:18:22 verbose #14727 > -> position) -00:18:22 verbose #14728 > -00:18:22 verbose #14729 > inl position_ft dt : position_ft = -00:18:22 verbose #14730 > fun m x0 v0 fs => -00:18:22 verbose #14731 > velocity_ft dt m v0 fs -00:18:22 verbose #14732 > |> anti_derivative dt x0 -00:18:22 verbose #14733 > -00:18:22 verbose #14734 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14735 > //// test -00:18:22 verbose #14736 > -00:18:22 verbose #14737 > inl pedal_coast (t : time) : force = -00:18:22 verbose #14738 > inl t_cycle = 20 -00:18:22 verbose #14739 > inl n_complete : i32 = t / t_cycle |> conv -00:18:22 verbose #14740 > inl remainder = t - conv n_complete * t_cycle -00:18:22 verbose #14741 > if remainder > 0 && remainder < 10 -00:18:22 verbose #14742 > then 10 -00:18:22 verbose #14743 > else 0 -00:18:22 verbose #14744 > -00:18:22 verbose #14745 > inl x = am'.init_series -5 45 0.1 -00:18:22 verbose #14746 > inl y = x |> am.map pedal_coast -00:18:22 verbose #14747 > "child pedaling then coasting", "time (s)", "", ;[[ "force on bike (N)", x, y ]] -00:18:22 verbose #14748 > -00:18:22 verbose #14749 > ╭─[ 76.96ms - return value ]───────────────────────────────────────────────────╮ -00:18:22 verbose #14750 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #14751 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #14752 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #14753 > │ stroke="none"/> │ -00:18:22 verbose #14754 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #14755 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #14756 > │ fill="#FFFFFF"> │ -00:18:22 verbose #14757 > │ child pedaling then coasting │ -00:18:22 verbose #14758 > │ </text> │ -00:18:22 verbose #14759 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ -00:18:22 verbose #14760 > │ y2="75"/> │ -00:18:22 verbose #14761 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #14762 > │ y2="75"/> │ -00:18:22 verbose #14763 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ -00:18:22 verbose #14764 > │ y2="75"/> │ -00:18:22 verbose #14765 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ -00:18:22 verbose #14766 > │ y2="75"/> │ -00:18:22 verbose #14767 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ -00:18:22 verbose #14768 > │ y2="75"/> │ -00:18:22 verbose #14769 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ -00:18:22 verbose #14770 > │ x2="109" y2="75"/> │ -00:18:22 verbose #14771 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #14772 > │ x2="119" y2="75"/> │ -00:18:22 verbose #14773 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ -00:18:22 verbose #14774 > │ x2="129" y2="75"/> │ -00:18:22 verbose #14775 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ -00:18:22 verbose #14776 > │ x2="139" y2="75"/> │ -00:18:22 verbose #14777 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ -00:18:22 verbose #14778 > │ x2="149" y2="75"/> │ -00:18:22 verbose #14779 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ -00:18:22 verbose #14780 > │ x2="159" y2="75"/> │ -00:18:22 verbose #14781 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ -00:18:22 verbose #14782 > │ x2="169" y2="75"/> │ -00:18:22 verbose #14783 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ -00:18:22 verbose #14784 > │ x2="179" y2="75"/> │ -00:18:22 verbose #14785 > │ <line ... │ -00:18:22 verbose #14786 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14787 > -00:18:22 verbose #14788 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14789 > //// test -00:18:22 verbose #14790 > -00:18:22 verbose #14791 > inl x = am'.init_series -5 45 1 -00:18:22 verbose #14792 > inl y = x |> am.map (position_ft 0.1f64 20 0 0 [[ pedal_coast ]]) -00:18:22 verbose #14793 > "child pedaling then coasting", "time (s)", "", ;[[ "position of bike (m)", x, y -00:18:22 verbose #14794 > ]] -00:18:22 verbose #14795 > -00:18:22 verbose #14796 > ╭─[ 346.20ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #14797 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #14798 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #14799 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #14800 > │ stroke="none"/> │ -00:18:22 verbose #14801 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #14802 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #14803 > │ fill="#FFFFFF"> │ -00:18:22 verbose #14804 > │ child pedaling then coasting │ -00:18:22 verbose #14805 > │ </text> │ -00:18:22 verbose #14806 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ -00:18:22 verbose #14807 > │ y2="75"/> │ -00:18:22 verbose #14808 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #14809 > │ y2="75"/> │ -00:18:22 verbose #14810 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ -00:18:22 verbose #14811 > │ y2="75"/> │ -00:18:22 verbose #14812 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ -00:18:22 verbose #14813 > │ y2="75"/> │ -00:18:22 verbose #14814 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ -00:18:22 verbose #14815 > │ y2="75"/> │ -00:18:22 verbose #14816 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ -00:18:22 verbose #14817 > │ x2="109" y2="75"/> │ -00:18:22 verbose #14818 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #14819 > │ x2="119" y2="75"/> │ -00:18:22 verbose #14820 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ -00:18:22 verbose #14821 > │ x2="129" y2="75"/> │ -00:18:22 verbose #14822 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ -00:18:22 verbose #14823 > │ x2="139" y2="75"/> │ -00:18:22 verbose #14824 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ -00:18:22 verbose #14825 > │ x2="149" y2="75"/> │ -00:18:22 verbose #14826 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ -00:18:22 verbose #14827 > │ x2="159" y2="75"/> │ -00:18:22 verbose #14828 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ -00:18:22 verbose #14829 > │ x2="169" y2="75"/> │ -00:18:22 verbose #14830 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ -00:18:22 verbose #14831 > │ x2="179" y2="75"/> │ -00:18:22 verbose #14832 > │ <line ... │ -00:18:22 verbose #14833 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14834 > -00:18:22 verbose #14835 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #14836 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #14837 > │ ## velocity_fv │ -00:18:22 verbose #14838 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14839 > -00:18:22 verbose #14840 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14841 > inl newton_second_v m fs v0 = -00:18:22 verbose #14842 > fs |> listm.map (fun f => f v0) |> listm'.sum |> fun x => x / m -00:18:22 verbose #14843 > -00:18:22 verbose #14844 > inl update_velocity dt m fs v0 = -00:18:22 verbose #14845 > v0 + newton_second_v m fs v0 * dt -00:18:22 verbose #14846 > -00:18:22 verbose #14847 > inl velocity_fv dt m v0 fs t = -00:18:22 verbose #14848 > stream.iterate (update_velocity dt m fs) v0 -00:18:22 verbose #14849 > |> stream.try_item (t / dt |> math.round |> abs) -00:18:22 verbose #14850 > |> optionm'.default_value 0 -00:18:22 verbose #14851 > -00:18:22 verbose #14852 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14853 > inl f_air drag rho area v = -00:18:22 verbose #14854 > -drag * rho * area * abs v * v / 2 -00:18:22 verbose #14855 > -00:18:22 verbose #14856 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14857 > //// test -00:18:22 verbose #14858 > -00:18:22 verbose #14859 > inl x = am'.init_series 0 60 0.5 -00:18:22 verbose #14860 > inl y = x |> am.map (velocity_fv 1 70 0f64 [[ fun _ => 100; f_air 2 1.225 0.6 -00:18:22 verbose #14861 > ]]) -00:18:22 verbose #14862 > "bike velocity", "time (s)", "", ;[[ "velocity of bike (m/s)", x, y ]] -00:18:22 verbose #14863 > -00:18:22 verbose #14864 > ╭─[ 304.20ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #14865 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #14866 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #14867 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #14868 > │ stroke="none"/> │ -00:18:22 verbose #14869 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #14870 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #14871 > │ fill="#FFFFFF"> │ -00:18:22 verbose #14872 > │ bike velocity │ -00:18:22 verbose #14873 > │ </text> │ -00:18:22 verbose #14874 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ -00:18:22 verbose #14875 > │ y2="75"/> │ -00:18:22 verbose #14876 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #14877 > │ y2="75"/> │ -00:18:22 verbose #14878 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ -00:18:22 verbose #14879 > │ y2="75"/> │ -00:18:22 verbose #14880 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ -00:18:22 verbose #14881 > │ y2="75"/> │ -00:18:22 verbose #14882 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ -00:18:22 verbose #14883 > │ y2="75"/> │ -00:18:22 verbose #14884 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ -00:18:22 verbose #14885 > │ x2="103" y2="75"/> │ -00:18:22 verbose #14886 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ -00:18:22 verbose #14887 > │ x2="111" y2="75"/> │ -00:18:22 verbose #14888 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #14889 > │ x2="119" y2="75"/> │ -00:18:22 verbose #14890 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ -00:18:22 verbose #14891 > │ x2="128" y2="75"/> │ -00:18:22 verbose #14892 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ -00:18:22 verbose #14893 > │ x2="136" y2="75"/> │ -00:18:22 verbose #14894 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ -00:18:22 verbose #14895 > │ x2="144" y2="75"/> │ -00:18:22 verbose #14896 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ -00:18:22 verbose #14897 > │ x2="153" y2="75"/> │ -00:18:22 verbose #14898 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ -00:18:22 verbose #14899 > │ x2="161" y2="75"/> │ -00:18:22 verbose #14900 > │ <line opacity="1" str... │ -00:18:22 verbose #14901 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14902 > -00:18:22 verbose #14903 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #14904 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #14905 > │ ## velocity_ftv │ -00:18:22 verbose #14906 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14907 > -00:18:22 verbose #14908 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14909 > inl newton_second_tv m fs (t, v0) = -00:18:22 verbose #14910 > inl f_net = fs |> listm.map (fun f => f (t, v0)) |> listm'.sum -00:18:22 verbose #14911 > inl acc = f_net / m -00:18:22 verbose #14912 > 1, acc -00:18:22 verbose #14913 > -00:18:22 verbose #14914 > inl update_tv dt m fs (t, v0) = -00:18:22 verbose #14915 > inl dtdt, dvdt = newton_second_tv m fs (t, v0) -00:18:22 verbose #14916 > t + dtdt * dt, v0 + dvdt * dt -00:18:22 verbose #14917 > -00:18:22 verbose #14918 > inl velocity_ftv dt m tv0 fs t = -00:18:22 verbose #14919 > stream.iterate (join update_tv dt m fs) tv0 -00:18:22 verbose #14920 > |> stream.try_item (t / dt |> math.round |> abs) -00:18:22 verbose #14921 > |> optionm.map snd -00:18:22 verbose #14922 > |> optionm'.default_value 0 -00:18:22 verbose #14923 > -00:18:22 verbose #14924 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14925 > //// test -00:18:22 verbose #14926 > -00:18:22 verbose #14927 > inl x = am'.init_series 0 100 0.1 -00:18:22 verbose #14928 > inl y = -00:18:22 verbose #14929 > x -00:18:22 verbose #14930 > |> am.map ( -00:18:22 verbose #14931 > velocity_ftv 0.1 20 (dyn (0, 0)) [[ fun (t, _) => pedal_coast t; fun (_, -00:18:22 verbose #14932 > v) => f_air 2 1.225 0.5 v ]] -00:18:22 verbose #14933 > ) -00:18:22 verbose #14934 > "pedaling and coasting with air", "time (s)", "", ;[[ "velocity of bike (m/s)", -00:18:22 verbose #14935 > x, y ]] -00:18:22 verbose #14936 > -00:18:22 verbose #14937 > ╭─[ 313.38ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #14938 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #14939 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #14940 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #14941 > │ stroke="none"/> │ -00:18:22 verbose #14942 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #14943 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #14944 > │ fill="#FFFFFF"> │ -00:18:22 verbose #14945 > │ pedaling and coasting with air │ -00:18:22 verbose #14946 > │ </text> │ -00:18:22 verbose #14947 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ -00:18:22 verbose #14948 > │ y2="75"/> │ -00:18:22 verbose #14949 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #14950 > │ y2="75"/> │ -00:18:22 verbose #14951 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ -00:18:22 verbose #14952 > │ y2="75"/> │ -00:18:22 verbose #14953 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ -00:18:22 verbose #14954 > │ y2="75"/> │ -00:18:22 verbose #14955 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ -00:18:22 verbose #14956 > │ y2="75"/> │ -00:18:22 verbose #14957 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ -00:18:22 verbose #14958 > │ x2="109" y2="75"/> │ -00:18:22 verbose #14959 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #14960 > │ x2="119" y2="75"/> │ -00:18:22 verbose #14961 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ -00:18:22 verbose #14962 > │ x2="129" y2="75"/> │ -00:18:22 verbose #14963 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ -00:18:22 verbose #14964 > │ x2="139" y2="75"/> │ -00:18:22 verbose #14965 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ -00:18:22 verbose #14966 > │ x2="149" y2="75"/> │ -00:18:22 verbose #14967 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ -00:18:22 verbose #14968 > │ x2="159" y2="75"/> │ -00:18:22 verbose #14969 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ -00:18:22 verbose #14970 > │ x2="169" y2="75"/> │ -00:18:22 verbose #14971 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ -00:18:22 verbose #14972 > │ x2="179" y2="75"/> │ -00:18:22 verbose #14973 > │ <lin... │ -00:18:22 verbose #14974 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14975 > -00:18:22 verbose #14976 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #14977 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #14978 > │ ## velocity_ftxv │ -00:18:22 verbose #14979 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #14980 > -00:18:22 verbose #14981 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #14982 > nominal state_1d = time * position * velocity -00:18:22 verbose #14983 > nominal rrr = f64 * f64 * f64 -00:18:22 verbose #14984 > -00:18:22 verbose #14985 > inl newton_second_1d m fs (state_1d (t, x0, v0)) = -00:18:22 verbose #14986 > inl f_net = fs |> listm.map (fun f => f (state_1d (t, x0, v0))) |> -00:18:22 verbose #14987 > listm'.sum -00:18:22 verbose #14988 > inl acc = f_net / m -00:18:22 verbose #14989 > rrr (1f64, v0, acc) -00:18:22 verbose #14990 > -00:18:22 verbose #14991 > inl euler_1d dt deriv (state_1d (t0, x0, v0) as t) = -00:18:22 verbose #14992 > inl (rrr (_, _, dvdt)) = deriv t -00:18:22 verbose #14993 > inl t1 = t0 + dt -00:18:22 verbose #14994 > inl x1 = x0 + v0 * dt -00:18:22 verbose #14995 > inl v1 = v0 + dvdt * dt -00:18:22 verbose #14996 > state_1d (t1, x1, v1) -00:18:22 verbose #14997 > -00:18:22 verbose #14998 > inl update_txv dt m fs = -00:18:22 verbose #14999 > newton_second_1d m fs |> euler_1d dt -00:18:22 verbose #15000 > -00:18:22 verbose #15001 > inl states_txv dt m txv0 fs = -00:18:22 verbose #15002 > seq.iterate_ (update_txv dt m fs) txv0 -00:18:22 verbose #15003 > -00:18:22 verbose #15004 > inl velocity_1d sts t = -00:18:22 verbose #15005 > inl (state_1d (t0, _, _)) = sts 0 -00:18:22 verbose #15006 > inl (state_1d (t1, _, _)) = sts 1 -00:18:22 verbose #15007 > inl dt = t1 - t0 -00:18:22 verbose #15008 > inl num_steps = t / dt |> math.round |> abs -00:18:22 verbose #15009 > inl (state_1d (_, _, v0)) = sts num_steps -00:18:22 verbose #15010 > v0 -00:18:22 verbose #15011 > -00:18:22 verbose #15012 > inl velocity_ftxv dt m txv0 fs = -00:18:22 verbose #15013 > states_txv dt m txv0 fs |> velocity_1d -00:18:22 verbose #15014 > -00:18:22 verbose #15015 > inl position_1d sts t = -00:18:22 verbose #15016 > inl (state_1d (t0, _, _)) = sts 0 -00:18:22 verbose #15017 > inl (state_1d (t1, _, _)) = sts 1 -00:18:22 verbose #15018 > inl dt = t1 - t0 -00:18:22 verbose #15019 > inl num_steps = t / dt |> math.round |> abs -00:18:22 verbose #15020 > inl (state_1d (_, x0, _)) = sts num_steps -00:18:22 verbose #15021 > x0 -00:18:22 verbose #15022 > -00:18:22 verbose #15023 > inl position_ftxv dt m txv0 fs = -00:18:22 verbose #15024 > states_txv dt m txv0 fs |> position_1d -00:18:22 verbose #15025 > -00:18:22 verbose #15026 > inl spring_force k (state_1d (_, x0, _)) = -00:18:22 verbose #15027 > -k * x0 -00:18:22 verbose #15028 > -00:18:22 verbose #15029 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15030 > //// test -00:18:22 verbose #15031 > -00:18:22 verbose #15032 > inl damped_ho_forces () = -00:18:22 verbose #15033 > [[ -00:18:22 verbose #15034 > spring_force 0.8 -00:18:22 verbose #15035 > fun (state_1d (_, _, v0)) => f_air 2 1.225 (pi * math.square 0.02) v0 -00:18:22 verbose #15036 > fun _ => -0.0027 * 9.80665 -00:18:22 verbose #15037 > ]] -00:18:22 verbose #15038 > -00:18:22 verbose #15039 > inl damped_ho_states () = -00:18:22 verbose #15040 > states_txv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) -00:18:22 verbose #15041 > -00:18:22 verbose #15042 > inl pingpong_position t = -00:18:22 verbose #15043 > position_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t -00:18:22 verbose #15044 > -00:18:22 verbose #15045 > inl x : a _ f64 = am'.init_series 0 3 0.01 -00:18:22 verbose #15046 > inl y = x |> am.map pingpong_position -00:18:22 verbose #15047 > "ping pong ball on a slinky", "time (s)", "", ;[[ "position (m)", x, y ]] -00:18:22 verbose #15048 > -00:18:22 verbose #15049 > ╭─[ 111.35ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #15050 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #15051 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #15052 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #15053 > │ stroke="none"/> │ -00:18:22 verbose #15054 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #15055 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #15056 > │ fill="#FFFFFF"> │ -00:18:22 verbose #15057 > │ ping pong ball on a slinky │ -00:18:22 verbose #15058 > │ </text> │ -00:18:22 verbose #15059 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ -00:18:22 verbose #15060 > │ y2="75"/> │ -00:18:22 verbose #15061 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #15062 > │ y2="75"/> │ -00:18:22 verbose #15063 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ -00:18:22 verbose #15064 > │ y2="75"/> │ -00:18:22 verbose #15065 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ -00:18:22 verbose #15066 > │ y2="75"/> │ -00:18:22 verbose #15067 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ -00:18:22 verbose #15068 > │ y2="75"/> │ -00:18:22 verbose #15069 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ -00:18:22 verbose #15070 > │ x2="103" y2="75"/> │ -00:18:22 verbose #15071 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ -00:18:22 verbose #15072 > │ x2="111" y2="75"/> │ -00:18:22 verbose #15073 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #15074 > │ x2="119" y2="75"/> │ -00:18:22 verbose #15075 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ -00:18:22 verbose #15076 > │ x2="128" y2="75"/> │ -00:18:22 verbose #15077 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ -00:18:22 verbose #15078 > │ x2="136" y2="75"/> │ -00:18:22 verbose #15079 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ -00:18:22 verbose #15080 > │ x2="144" y2="75"/> │ -00:18:22 verbose #15081 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ -00:18:22 verbose #15082 > │ x2="153" y2="75"/> │ -00:18:22 verbose #15083 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ -00:18:22 verbose #15084 > │ x2="161" y2="75"/> │ -00:18:22 verbose #15085 > │ <line op... │ -00:18:22 verbose #15086 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15087 > -00:18:22 verbose #15088 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15089 > //// test -00:18:22 verbose #15090 > -00:18:22 verbose #15091 > inl pingpong_velocity t = -00:18:22 verbose #15092 > velocity_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t -00:18:22 verbose #15093 > -00:18:22 verbose #15094 > inl x = am'.init_series 0 3 0.01 -00:18:22 verbose #15095 > inl y = x |> am.map pingpong_velocity -00:18:22 verbose #15096 > "ping pong ball on a slinky", "time (s)", "", ;[[ "velocity (m/s)", x, y ]] -00:18:22 verbose #15097 > -00:18:22 verbose #15098 > ╭─[ 109.78ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #15099 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #15100 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #15101 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #15102 > │ stroke="none"/> │ -00:18:22 verbose #15103 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #15104 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #15105 > │ fill="#FFFFFF"> │ -00:18:22 verbose #15106 > │ ping pong ball on a slinky │ -00:18:22 verbose #15107 > │ </text> │ -00:18:22 verbose #15108 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ -00:18:22 verbose #15109 > │ y2="75"/> │ -00:18:22 verbose #15110 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #15111 > │ y2="75"/> │ -00:18:22 verbose #15112 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ -00:18:22 verbose #15113 > │ y2="75"/> │ -00:18:22 verbose #15114 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ -00:18:22 verbose #15115 > │ y2="75"/> │ -00:18:22 verbose #15116 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ -00:18:22 verbose #15117 > │ y2="75"/> │ -00:18:22 verbose #15118 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ -00:18:22 verbose #15119 > │ x2="103" y2="75"/> │ -00:18:22 verbose #15120 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ -00:18:22 verbose #15121 > │ x2="111" y2="75"/> │ -00:18:22 verbose #15122 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #15123 > │ x2="119" y2="75"/> │ -00:18:22 verbose #15124 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ -00:18:22 verbose #15125 > │ x2="128" y2="75"/> │ -00:18:22 verbose #15126 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ -00:18:22 verbose #15127 > │ x2="136" y2="75"/> │ -00:18:22 verbose #15128 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ -00:18:22 verbose #15129 > │ x2="144" y2="75"/> │ -00:18:22 verbose #15130 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ -00:18:22 verbose #15131 > │ x2="153" y2="75"/> │ -00:18:22 verbose #15132 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ -00:18:22 verbose #15133 > │ x2="161" y2="75"/> │ -00:18:22 verbose #15134 > │ <line op... │ -00:18:22 verbose #15135 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15136 > -00:18:22 verbose #15137 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15138 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15139 > │ ## shift │ -00:18:22 verbose #15140 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15141 > -00:18:22 verbose #15142 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15143 > type update_function s = s -> s -00:18:22 verbose #15144 > -00:18:22 verbose #15145 > type differential_equation s ds = s -> ds -00:18:22 verbose #15146 > -00:18:22 verbose #15147 > type numerical_method s ds = differential_equation s ds -> update_function s -00:18:22 verbose #15148 > -00:18:22 verbose #15149 > -00:18:22 verbose #15150 > inl solver method = -00:18:22 verbose #15151 > method >> seq.iterate -00:18:22 verbose #15152 > inl solver' method = -00:18:22 verbose #15153 > method >> seq.iterate' -00:18:22 verbose #15154 > inl solver_ method = -00:18:22 verbose #15155 > method >> seq.iterate_ -00:18:22 verbose #15156 > -00:18:22 verbose #15157 > -00:18:22 verbose #15158 > inl euler_cromer_1d dt deriv (state_1d (t0, x0, v0) as t) = -00:18:22 verbose #15159 > inl (rrr (_, _, dvdt)) = deriv t -00:18:22 verbose #15160 > inl t1 = t0 + dt -00:18:22 verbose #15161 > inl v1 = v0 + dvdt * dt -00:18:22 verbose #15162 > inl x1 = x0 + v1 * dt -00:18:22 verbose #15163 > state_1d (t1, x1, v1) -00:18:22 verbose #15164 > -00:18:22 verbose #15165 > inl update_txv_ec dt m fs = -00:18:22 verbose #15166 > euler_cromer_1d dt (newton_second_1d m fs) -00:18:22 verbose #15167 > -00:18:22 verbose #15168 > prototype (+++) ds : ds -> ds -> ds -00:18:22 verbose #15169 > prototype scale ds : f64 -> ds -> ds -00:18:22 verbose #15170 > -00:18:22 verbose #15171 > instance (+++) rrr = fun (rrr (dtdt0, dxdt0, dvdt0)) (rrr (dtdt1, dxdt1, dvdt1)) -00:18:22 verbose #15172 > => -00:18:22 verbose #15173 > rrr (dtdt0 + dtdt1, dxdt0 + dxdt1, dvdt0 + dvdt1) -00:18:22 verbose #15174 > -00:18:22 verbose #15175 > instance scale rrr = fun w (rrr (dtdt0, dxdt0, dvdt0)) => -00:18:22 verbose #15176 > rrr (w * dtdt0, w * dxdt0, w * dvdt0) -00:18:22 verbose #15177 > -00:18:22 verbose #15178 > prototype shift s : forall ds. f64 -> ds -> s -> s -00:18:22 verbose #15179 > -00:18:22 verbose #15180 > instance shift state_1d = fun dt ds (state_1d (t, x, v)) => -00:18:22 verbose #15181 > inl dtdt, dxdt, dvdt = -00:18:22 verbose #15182 > real -00:18:22 verbose #15183 > match ds with -00:18:22 verbose #15184 > | rrr x => x -00:18:22 verbose #15185 > | state_1d x => x -00:18:22 verbose #15186 > state_1d (t + dtdt * dt, x + dxdt * dt, v + dvdt * dt) -00:18:22 verbose #15187 > -00:18:22 verbose #15188 > inl euler dt deriv st0 = -00:18:22 verbose #15189 > shift dt (deriv st0) st0 -00:18:22 verbose #15190 > -00:18:22 verbose #15191 > inl runge_kutta_4 dt deriv st0 = -00:18:22 verbose #15192 > inl m0 = deriv st0 -00:18:22 verbose #15193 > inl m1 = deriv (shift (dt / 2) m0 st0) -00:18:22 verbose #15194 > inl m2 = deriv (shift (dt / 2) m1 st0) -00:18:22 verbose #15195 > inl m3 = deriv (shift dt m2 st0) -00:18:22 verbose #15196 > shift (dt / 6) (m0 +++ m1 +++ m1 +++ m2 +++ m2 +++ m3) st0 -00:18:22 verbose #15197 > -00:18:22 verbose #15198 > inl exponential (_, x0, v0) = -00:18:22 verbose #15199 > 1f64, v0, x0 -00:18:22 verbose #15200 > -00:18:22 verbose #15201 > inl of_state_1d (state_1d (t, x, v)) = -00:18:22 verbose #15202 > t, x, v -00:18:22 verbose #15203 > -00:18:22 verbose #15204 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15205 > //// test -00:18:22 verbose #15206 > -00:18:22 verbose #15207 > solver (euler 0.01) (of_state_1d >> exponential >> state_1d) (state_1d (0, 1, -00:18:22 verbose #15208 > 1)) 800i32 -00:18:22 verbose #15209 > |> _assert_eq (state_1d (7.999999999999874, 2864.8311229272326, -00:18:22 verbose #15210 > 2864.8311229272326)) -00:18:22 verbose #15211 > -00:18:22 verbose #15212 > solver (euler_cromer_1d 0.1) (of_state_1d >> exponential >> rrr) (state_1d (0, -00:18:22 verbose #15213 > 1, 1)) 80i32 -00:18:22 verbose #15214 > |> _assert_eq (state_1d (7.999999999999988, 3043.379244966009, -00:18:22 verbose #15215 > 2895.0121485099035)) -00:18:22 verbose #15216 > -00:18:22 verbose #15217 > solver (runge_kutta_4 1) (of_state_1d >> exponential >> rrr) (state_1d (0, 1, -00:18:22 verbose #15218 > 1)) 8i32 -00:18:22 verbose #15219 > |> _assert_eq (state_1d (8.0, 2894.789038540849, 2894.789038540849)) -00:18:22 verbose #15220 > -00:18:22 verbose #15221 > ╭─[ 57.38ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15222 > │ assert_eq / actual: struct (8.0, 2864.831123, 2864.831123) / expected: │ -00:18:22 verbose #15223 > │ struct (8.0, 2864.831123, 2864.831123) │ -00:18:22 verbose #15224 > │ assert_eq / actual: struct (8.0, 3043.379245, 2895.012149) / expected: │ -00:18:22 verbose #15225 > │ struct (8.0, 3043.379245, 2895.012149) │ -00:18:22 verbose #15226 > │ assert_eq / actual: struct (8.0, 2894.789039, 2894.789039) / expected: │ -00:18:22 verbose #15227 > │ struct (8.0, 2894.789039, 2894.789039) │ -00:18:22 verbose #15228 > │ │ -00:18:22 verbose #15229 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15230 > -00:18:22 verbose #15231 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15232 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15233 > │ ## vec │ -00:18:22 verbose #15234 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15235 > -00:18:22 verbose #15236 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15237 > type vec = -00:18:22 verbose #15238 > { -00:18:22 verbose #15239 > x : f64 -00:18:22 verbose #15240 > y : f64 -00:18:22 verbose #15241 > z : f64 -00:18:22 verbose #15242 > } -00:18:22 verbose #15243 > -00:18:22 verbose #15244 > inl vec x y z : vec = -00:18:22 verbose #15245 > { x y z } -00:18:22 verbose #15246 > -00:18:22 verbose #15247 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15248 > //// test -00:18:22 verbose #15249 > -00:18:22 verbose #15250 > vec 1 2 3 .z -00:18:22 verbose #15251 > |> _assert_eq 3 -00:18:22 verbose #15252 > -00:18:22 verbose #15253 > ╭─[ 32.87ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15254 > │ assert_eq / actual: 3.0 / expected: 3.0 │ -00:18:22 verbose #15255 > │ │ -00:18:22 verbose #15256 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15257 > -00:18:22 verbose #15258 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15259 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15260 > │ ### consts │ -00:18:22 verbose #15261 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15262 > -00:18:22 verbose #15263 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15264 > inl i_hat () = vec 1 0 0 -00:18:22 verbose #15265 > inl j_hat () = vec 0 1 0 -00:18:22 verbose #15266 > inl k_hat () = vec 0 0 1 -00:18:22 verbose #15267 > inl zero_vec () = vec 0 0 0 -00:18:22 verbose #15268 > -00:18:22 verbose #15269 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15270 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15271 > │ ### ^+^ │ -00:18:22 verbose #15272 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15273 > -00:18:22 verbose #15274 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15275 > inl (^+^) (a : vec) (b : vec) = -00:18:22 verbose #15276 > vec (a.x + b.x) (a.y + b.y) (a.z + b.z) -00:18:22 verbose #15277 > -00:18:22 verbose #15278 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15279 > //// test -00:18:22 verbose #15280 > -00:18:22 verbose #15281 > vec 1 2 3 ^+^ vec 4 5 6 -00:18:22 verbose #15282 > |> _assert_eq (vec 5 7 9) -00:18:22 verbose #15283 > -00:18:22 verbose #15284 > ╭─[ 32.24ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15285 > │ assert_eq / actual: struct (5.0, 7.0, 9.0) / expected: struct (5.0, 7.0, │ -00:18:22 verbose #15286 > │ 9.0) │ -00:18:22 verbose #15287 > │ │ -00:18:22 verbose #15288 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15289 > -00:18:22 verbose #15290 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15291 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15292 > │ ### sum_vec │ -00:18:22 verbose #15293 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15294 > -00:18:22 verbose #15295 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15296 > inl sum_vec vs = -00:18:22 verbose #15297 > vs |> listm.fold (^+^) (zero_vec ()) -00:18:22 verbose #15298 > -00:18:22 verbose #15299 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15300 > //// test -00:18:22 verbose #15301 > -00:18:22 verbose #15302 > [[ vec 1 2 3; vec 4 5 6 ]] -00:18:22 verbose #15303 > |> sum_vec -00:18:22 verbose #15304 > |> _assert_eq (vec 5 7 9) -00:18:22 verbose #15305 > -00:18:22 verbose #15306 > ╭─[ 36.26ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15307 > │ assert_eq / actual: struct (5.0, 7.0, 9.0) / expected: struct (5.0, 7.0, │ -00:18:22 verbose #15308 > │ 9.0) │ -00:18:22 verbose #15309 > │ │ -00:18:22 verbose #15310 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15311 > -00:18:22 verbose #15312 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15313 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15314 > │ ### *^ │ -00:18:22 verbose #15315 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15316 > -00:18:22 verbose #15317 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15318 > inl (*^) c { x y z } = -00:18:22 verbose #15319 > vec (c * x) (c * y) (c * z) -00:18:22 verbose #15320 > -00:18:22 verbose #15321 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15322 > //// test -00:18:22 verbose #15323 > -00:18:22 verbose #15324 > 5 *^ vec 1 2 3 -00:18:22 verbose #15325 > |> _assert_eq (vec 5 10 15) -00:18:22 verbose #15326 > -00:18:22 verbose #15327 > ╭─[ 32.91ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15328 > │ assert_eq / actual: struct (5.0, 10.0, 15.0) / expected: struct (5.0, 10.0, │ -00:18:22 verbose #15329 > │ 15.0) │ -00:18:22 verbose #15330 > │ │ -00:18:22 verbose #15331 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15332 > -00:18:22 verbose #15333 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15334 > //// test -00:18:22 verbose #15335 > -00:18:22 verbose #15336 > 3 *^ i_hat () ^+^ 4 *^ k_hat () -00:18:22 verbose #15337 > |> _assert_eq (vec 3 0 4) -00:18:22 verbose #15338 > -00:18:22 verbose #15339 > ╭─[ 37.02ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15340 > │ assert_eq / actual: struct (3.0, 0.0, 4.0) / expected: struct (3.0, 0.0, │ -00:18:22 verbose #15341 > │ 4.0) │ -00:18:22 verbose #15342 > │ │ -00:18:22 verbose #15343 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15344 > -00:18:22 verbose #15345 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15346 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15347 > │ ### ^* │ -00:18:22 verbose #15348 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15349 > -00:18:22 verbose #15350 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15351 > inl (^*) v c = -00:18:22 verbose #15352 > (*^) c v -00:18:22 verbose #15353 > -00:18:22 verbose #15354 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15355 > //// test -00:18:22 verbose #15356 > -00:18:22 verbose #15357 > vec 1 2 3 ^* 5 -00:18:22 verbose #15358 > |> _assert_eq (vec 5 10 15) -00:18:22 verbose #15359 > -00:18:22 verbose #15360 > ╭─[ 32.99ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15361 > │ assert_eq / actual: struct (5.0, 10.0, 15.0) / expected: struct (5.0, 10.0, │ -00:18:22 verbose #15362 > │ 15.0) │ -00:18:22 verbose #15363 > │ │ -00:18:22 verbose #15364 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15365 > -00:18:22 verbose #15366 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15367 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15368 > │ ### ^/ │ -00:18:22 verbose #15369 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15370 > -00:18:22 verbose #15371 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15372 > inl (^/) { x y z } c = -00:18:22 verbose #15373 > vec (x / c) (y / c) (z / c) -00:18:22 verbose #15374 > -00:18:22 verbose #15375 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15376 > //// test -00:18:22 verbose #15377 > -00:18:22 verbose #15378 > vec 1 2 3 ^/ 5 -00:18:22 verbose #15379 > |> _assert_eq (vec 0.2 0.4 0.6) -00:18:22 verbose #15380 > -00:18:22 verbose #15381 > ╭─[ 43.55ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15382 > │ assert_eq / actual: struct (0.2, 0.4, 0.6) / expected: struct (0.2, 0.4, │ -00:18:22 verbose #15383 > │ 0.6) │ -00:18:22 verbose #15384 > │ │ -00:18:22 verbose #15385 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15386 > -00:18:22 verbose #15387 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15388 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15389 > │ ### negate_vec │ -00:18:22 verbose #15390 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15391 > -00:18:22 verbose #15392 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15393 > inl negate_vec v = -00:18:22 verbose #15394 > v ^* -1 -00:18:22 verbose #15395 > -00:18:22 verbose #15396 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15397 > //// test -00:18:22 verbose #15398 > -00:18:22 verbose #15399 > vec 1 2 3 -00:18:22 verbose #15400 > |> negate_vec -00:18:22 verbose #15401 > |> _assert_eq (vec -1 -2 -3) -00:18:22 verbose #15402 > -00:18:22 verbose #15403 > ╭─[ 35.87ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15404 > │ assert_eq / actual: struct (-1.0, -2.0, -3.0) / expected: struct (-1.0, │ -00:18:22 verbose #15405 > │ -2.0, -3.0) │ -00:18:22 verbose #15406 > │ │ -00:18:22 verbose #15407 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15408 > -00:18:22 verbose #15409 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15410 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15411 > │ ### ^-^ │ -00:18:22 verbose #15412 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15413 > -00:18:22 verbose #15414 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15415 > inl (^-^) a b = -00:18:22 verbose #15416 > a ^+^ (negate_vec b) -00:18:22 verbose #15417 > -00:18:22 verbose #15418 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15419 > //// test -00:18:22 verbose #15420 > -00:18:22 verbose #15421 > vec 1 2 3 ^-^ vec 4 5 6 -00:18:22 verbose #15422 > |> _assert_eq (vec -3 -3 -3) -00:18:22 verbose #15423 > -00:18:22 verbose #15424 > ╭─[ 35.70ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15425 > │ assert_eq / actual: struct (-3.0, -3.0, -3.0) / expected: struct (-3.0, │ -00:18:22 verbose #15426 > │ -3.0, -3.0) │ -00:18:22 verbose #15427 > │ │ -00:18:22 verbose #15428 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15429 > -00:18:22 verbose #15430 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15431 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15432 > │ ### <.> │ -00:18:22 verbose #15433 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15434 > -00:18:22 verbose #15435 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15436 > inl (<.>) { x = ax y = ay z = az } { x = bx y = by z = bz } = -00:18:22 verbose #15437 > ax * bx + ay * by + az * bz -00:18:22 verbose #15438 > -00:18:22 verbose #15439 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15440 > //// test -00:18:22 verbose #15441 > -00:18:22 verbose #15442 > vec 1 2 3 <.> vec 4 5 6 -00:18:22 verbose #15443 > |> _assert_eq 32 -00:18:22 verbose #15444 > -00:18:22 verbose #15445 > ╭─[ 34.03ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15446 > │ assert_eq / actual: 32.0 / expected: 32.0 │ -00:18:22 verbose #15447 > │ │ -00:18:22 verbose #15448 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15449 > -00:18:22 verbose #15450 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15451 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15452 > │ ### \>\< │ -00:18:22 verbose #15453 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15454 > -00:18:22 verbose #15455 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15456 > inl (><) (a : vec) (b : vec) = -00:18:22 verbose #15457 > vec -00:18:22 verbose #15458 > (a.y * b.z - a.z * b.y) -00:18:22 verbose #15459 > (a.z * b.x - a.x * b.z) -00:18:22 verbose #15460 > (a.x * b.y - a.y * b.x) -00:18:22 verbose #15461 > -00:18:22 verbose #15462 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15463 > //// test -00:18:22 verbose #15464 > -00:18:22 verbose #15465 > vec 1 2 3 >< vec 4 5 6 -00:18:22 verbose #15466 > |> _assert_eq (vec -3 6 -3) -00:18:22 verbose #15467 > -00:18:22 verbose #15468 > ╭─[ 36.35ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15469 > │ assert_eq / actual: struct (-3.0, 6.0, -3.0) / expected: struct (-3.0, 6.0, │ -00:18:22 verbose #15470 > │ -3.0) │ -00:18:22 verbose #15471 > │ │ -00:18:22 verbose #15472 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15473 > -00:18:22 verbose #15474 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15475 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15476 > │ ### magnitude │ -00:18:22 verbose #15477 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15478 > -00:18:22 verbose #15479 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15480 > inl magnitude v = -00:18:22 verbose #15481 > v <.> v |> sqrt -00:18:22 verbose #15482 > -00:18:22 verbose #15483 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15484 > //// test -00:18:22 verbose #15485 > -00:18:22 verbose #15486 > vec 1 2 3 -00:18:22 verbose #15487 > |> magnitude -00:18:22 verbose #15488 > |> _assert_approx_eq None 3.7416573867739413 -00:18:22 verbose #15489 > -00:18:22 verbose #15490 > ╭─[ 33.00ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15491 > │ assert_approx_eq / actual: 3.741657387 / expected: 3.741657387 │ -00:18:22 verbose #15492 > │ │ -00:18:22 verbose #15493 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15494 > -00:18:22 verbose #15495 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15496 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15497 > │ ### v1 │ -00:18:22 verbose #15498 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15499 > -00:18:22 verbose #15500 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15501 > inl v1 t = -00:18:22 verbose #15502 > 2 *^ (t ** 2 *^ i_hat () ^+^ 3 *^ (t ** 3 *^ j_hat () ^+^ t ** 4 *^ k_hat -00:18:22 verbose #15503 > ())) -00:18:22 verbose #15504 > -00:18:22 verbose #15505 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15506 > //// test -00:18:22 verbose #15507 > -00:18:22 verbose #15508 > v1 1 -00:18:22 verbose #15509 > |> _assert_eq (vec 2 6 6) -00:18:22 verbose #15510 > -00:18:22 verbose #15511 > ╭─[ 36.80ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15512 > │ assert_eq / actual: struct (2.0, 6.0, 6.0) / expected: struct (2.0, 6.0, │ -00:18:22 verbose #15513 > │ 6.0) │ -00:18:22 verbose #15514 > │ │ -00:18:22 verbose #15515 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15516 > -00:18:22 verbose #15517 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15518 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15519 > │ ### vec_derivative │ -00:18:22 verbose #15520 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15521 > -00:18:22 verbose #15522 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15523 > type vec_derivative = (f64 -> vec) -> f64 -> vec -00:18:22 verbose #15524 > -00:18:22 verbose #15525 > inl vec_derivative dt : vec_derivative = -00:18:22 verbose #15526 > fun v t => -00:18:22 verbose #15527 > (v (t + dt / 2) ^-^ v (t - dt / 2)) ^/ dt -00:18:22 verbose #15528 > -00:18:22 verbose #15529 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15530 > //// test -00:18:22 verbose #15531 > -00:18:22 verbose #15532 > vec_derivative 0.01 v1 3 .x -00:18:22 verbose #15533 > |> _assert_approx_eq None (derivative 0.01 (v1 >> fun v => v.x) 3) -00:18:22 verbose #15534 > -00:18:22 verbose #15535 > ╭─[ 32.07ms - stdout ]─────────────────────────────────────────────────────────╮ -00:18:22 verbose #15536 > │ assert_approx_eq / actual: 12.0 / expected: 12.0 │ -00:18:22 verbose #15537 > │ │ -00:18:22 verbose #15538 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15539 > -00:18:22 verbose #15540 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15541 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15542 > │ ## states_ps │ -00:18:22 verbose #15543 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15544 > -00:18:22 verbose #15545 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15546 > nominal particle_state = -00:18:22 verbose #15547 > { -00:18:22 verbose #15548 > mass : f64 -00:18:22 verbose #15549 > charge : f64 -00:18:22 verbose #15550 > time : f64 -00:18:22 verbose #15551 > pos_vec : vec -00:18:22 verbose #15552 > velocity : vec -00:18:22 verbose #15553 > } -00:18:22 verbose #15554 > -00:18:22 verbose #15555 > inl default_particle_state () : particle_state = -00:18:22 verbose #15556 > particle_state { -00:18:22 verbose #15557 > mass = 1 -00:18:22 verbose #15558 > charge = 0 -00:18:22 verbose #15559 > time = 0 -00:18:22 verbose #15560 > pos_vec = zero_vec () -00:18:22 verbose #15561 > velocity = zero_vec () -00:18:22 verbose #15562 > } -00:18:22 verbose #15563 > -00:18:22 verbose #15564 > type one_body_force = particle_state -> vec -00:18:22 verbose #15565 > -00:18:22 verbose #15566 > nominal d_particle_state = -00:18:22 verbose #15567 > { -00:18:22 verbose #15568 > dmdt : f64 -00:18:22 verbose #15569 > dqdt : f64 -00:18:22 verbose #15570 > dtdt : f64 -00:18:22 verbose #15571 > drdt : vec -00:18:22 verbose #15572 > dvdt : vec -00:18:22 verbose #15573 > } -00:18:22 verbose #15574 > -00:18:22 verbose #15575 > inl newton_second_ps (fs : list one_body_force) (st : particle_state) : -00:18:22 verbose #15576 > d_particle_state = -00:18:22 verbose #15577 > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec -00:18:22 verbose #15578 > d_particle_state { -00:18:22 verbose #15579 > dmdt = 0 -00:18:22 verbose #15580 > dqdt = 0 -00:18:22 verbose #15581 > dtdt = 1 -00:18:22 verbose #15582 > drdt = st.velocity -00:18:22 verbose #15583 > dvdt = f_net ^/ st.mass -00:18:22 verbose #15584 > } -00:18:22 verbose #15585 > -00:18:22 verbose #15586 > inl earth_surface_gravity (st : particle_state) = -00:18:22 verbose #15587 > inl g = 9.80665 -00:18:22 verbose #15588 > -st.mass * g *^ k_hat () -00:18:22 verbose #15589 > -00:18:22 verbose #15590 > inl air_resistance drag rho area (st : particle_state) = -00:18:22 verbose #15591 > -0.5 * drag * rho * area * magnitude st.velocity *^ st.velocity -00:18:22 verbose #15592 > -00:18:22 verbose #15593 > inl euler_cromer_ps dt (deriv : particle_state -> d_particle_state) -00:18:22 verbose #15594 > (particle_state st) = -00:18:22 verbose #15595 > inl dst : d_particle_state = deriv (particle_state st) -00:18:22 verbose #15596 > inl v' = st.velocity ^+^ dst.dvdt ^* dt -00:18:22 verbose #15597 > particle_state { st with -00:18:22 verbose #15598 > time = st.time + dt -00:18:22 verbose #15599 > pos_vec = st.pos_vec ^+^ v' ^* dt -00:18:22 verbose #15600 > velocity = st.velocity ^+^ dst.dvdt ^* dt -00:18:22 verbose #15601 > } -00:18:22 verbose #15602 > -00:18:22 verbose #15603 > instance (+++) d_particle_state = fun (dps : d_particle_state) (dps' : -00:18:22 verbose #15604 > d_particle_state) => -00:18:22 verbose #15605 > d_particle_state { -00:18:22 verbose #15606 > dmdt = dps.dmdt + dps'.dmdt -00:18:22 verbose #15607 > dqdt = dps.dqdt + dps'.dqdt -00:18:22 verbose #15608 > dtdt = dps.dtdt + dps'.dtdt -00:18:22 verbose #15609 > drdt = dps.drdt ^+^ dps'.drdt -00:18:22 verbose #15610 > dvdt = dps.dvdt ^+^ dps'.dvdt -00:18:22 verbose #15611 > } -00:18:22 verbose #15612 > -00:18:22 verbose #15613 > instance scale d_particle_state = fun w (dps : d_particle_state) => -00:18:22 verbose #15614 > d_particle_state { -00:18:22 verbose #15615 > dmdt = w * dps.dmdt -00:18:22 verbose #15616 > dqdt = w * dps.dqdt -00:18:22 verbose #15617 > dtdt = w * dps.dtdt -00:18:22 verbose #15618 > drdt = w *^ dps.drdt -00:18:22 verbose #15619 > dvdt = w *^ dps.dvdt -00:18:22 verbose #15620 > } -00:18:22 verbose #15621 > -00:18:22 verbose #15622 > instance shift particle_state = fun dt dps (particle_state st) => -00:18:22 verbose #15623 > inl (d_particle_state dps) = -00:18:22 verbose #15624 > real -00:18:22 verbose #15625 > match dps with -00:18:22 verbose #15626 > | d_particle_state _ => dps -00:18:22 verbose #15627 > particle_state { st with -00:18:22 verbose #15628 > time = st.time + dps.dtdt * dt -00:18:22 verbose #15629 > pos_vec = st.pos_vec ^+^ dps.drdt ^* dt -00:18:22 verbose #15630 > velocity = st.velocity ^+^ dps.dvdt ^* dt -00:18:22 verbose #15631 > } -00:18:22 verbose #15632 > -00:18:22 verbose #15633 > inl states_ps (method : numerical_method particle_state d_particle_state) : _ -> -00:18:22 verbose #15634 > _ -> i32 -> particle_state = -00:18:22 verbose #15635 > newton_second_ps >> method >> seq.iterate_ -00:18:22 verbose #15636 > -00:18:22 verbose #15637 > inl z_ge0 sts = -00:18:22 verbose #15638 > sts -00:18:22 verbose #15639 > |> seq.take_while_ (fun (particle_state st) _ => st.pos_vec.z >= 0) -00:18:22 verbose #15640 > -00:18:22 verbose #15641 > inl trajectory sts = -00:18:22 verbose #15642 > sts |> listm.map (fun (particle_state st) => st.pos_vec.y, st.pos_vec.z) -00:18:22 verbose #15643 > -00:18:22 verbose #15644 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15645 > //// test -00:18:22 verbose #15646 > -00:18:22 verbose #15647 > inl update_ps (method : numerical_method particle_state d_particle_state) = -00:18:22 verbose #15648 > newton_second_ps >> method -00:18:22 verbose #15649 > -00:18:22 verbose #15650 > inl position_ps (method : numerical_method particle_state d_particle_state) fs -00:18:22 verbose #15651 > st t = -00:18:22 verbose #15652 > inl states : i32 -> particle_state = states_ps method fs st -00:18:22 verbose #15653 > inl dt = (states 1).time - (states 0).time -00:18:22 verbose #15654 > inl num_steps = t / dt |> math.round |> abs -00:18:22 verbose #15655 > inl st1 = solver' method (newton_second_ps fs) st num_steps -00:18:22 verbose #15656 > st1.pos_vec -00:18:22 verbose #15657 > -00:18:22 verbose #15658 > inl sun_gravity (st : particle_state) : vec = -00:18:22 verbose #15659 > inl big_g = 0.0000000000667408 -00:18:22 verbose #15660 > inl sun_mass = 1988480000000000000000000000000 -00:18:22 verbose #15661 > -big_g * sun_mass * st.mass *^ st.pos_vec ^/ magnitude st.pos_vec ** 3 -00:18:22 verbose #15662 > -00:18:22 verbose #15663 > inl wind_force v_wind drag rho area (st : particle_state) = -00:18:22 verbose #15664 > inl v_rel = st.velocity ^-^ v_wind -00:18:22 verbose #15665 > -0.5 * drag * rho * area * magnitude v_rel *^ v_rel -00:18:22 verbose #15666 > -00:18:22 verbose #15667 > inl rock_state () = -00:18:22 verbose #15668 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #15669 > particle_state { default_particle_state' with -00:18:22 verbose #15670 > mass = 2 -00:18:22 verbose #15671 > velocity = vec 3 0 4 -00:18:22 verbose #15672 > } -00:18:22 verbose #15673 > -00:18:22 verbose #15674 > inl halley_update dt = -00:18:22 verbose #15675 > update_ps (euler_cromer_ps dt) [[ sun_gravity ]] -00:18:22 verbose #15676 > -00:18:22 verbose #15677 > inl halley_initial () = -00:18:22 verbose #15678 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #15679 > particle_state { default_particle_state' with -00:18:22 verbose #15680 > mass = 220000000000000 -00:18:22 verbose #15681 > pos_vec = 87660000000 *^ i_hat () -00:18:22 verbose #15682 > velocity = 54569 *^ j_hat () -00:18:22 verbose #15683 > } -00:18:22 verbose #15684 > -00:18:22 verbose #15685 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15686 > //// test -00:18:22 verbose #15687 > -00:18:22 verbose #15688 > inl baseball_forces () = -00:18:22 verbose #15689 > inl area = pi * (0.074 / 2) ** 2 -00:18:22 verbose #15690 > [[ -00:18:22 verbose #15691 > earth_surface_gravity -00:18:22 verbose #15692 > air_resistance 0.3 1.225 area -00:18:22 verbose #15693 > ]] -00:18:22 verbose #15694 > -00:18:22 verbose #15695 > inl baseball_trajectory dt v0 theta_deg = -00:18:22 verbose #15696 > inl theta_rad = theta_deg * pi / 180 -00:18:22 verbose #15697 > inl vy0 = v0 * cos theta_rad -00:18:22 verbose #15698 > inl vz0 = v0 * sin theta_rad -00:18:22 verbose #15699 > inl initial_state = -00:18:22 verbose #15700 > particle_state { -00:18:22 verbose #15701 > mass = 0.145 -00:18:22 verbose #15702 > charge = 0 -00:18:22 verbose #15703 > time = 0 -00:18:22 verbose #15704 > pos_vec = zero_vec () -00:18:22 verbose #15705 > velocity = vec 0 vy0 vz0 -00:18:22 verbose #15706 > } -00:18:22 verbose #15707 > states_ps (euler_cromer_ps dt) (baseball_forces ()) initial_state -00:18:22 verbose #15708 > >> Some -00:18:22 verbose #15709 > |> z_ge0 -00:18:22 verbose #15710 > |> trajectory -00:18:22 verbose #15711 > -00:18:22 verbose #15712 > inl baseball_range dt v0 theta_deg = -00:18:22 verbose #15713 > baseball_trajectory dt v0 theta_deg -00:18:22 verbose #15714 > |> listm.fold (fun _ (y, _) => y) 0 -00:18:22 verbose #15715 > -00:18:22 verbose #15716 > inl x : a _ f64 = am'.init_series 10 80 1 -00:18:22 verbose #15717 > inl y = x |> am.map (baseball_range 0.01 45) -00:18:22 verbose #15718 > "range for a baseball hit at 45 m/s", -00:18:22 verbose #15719 > "angle above horizontal (degrees)", -00:18:22 verbose #15720 > "", -00:18:22 verbose #15721 > ;[[ "horizontal range (m)", x, y ]] -00:18:22 verbose #15722 > -00:18:22 verbose #15723 > ╭─[ 843.80ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #15724 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #15725 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #15726 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #15727 > │ stroke="none"/> │ -00:18:22 verbose #15728 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #15729 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #15730 > │ fill="#FFFFFF"> │ -00:18:22 verbose #15731 > │ range for a baseball hit at 45 m/s │ -00:18:22 verbose #15732 > │ </text> │ -00:18:22 verbose #15733 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="55" y1="424" x2="55" │ -00:18:22 verbose #15734 > │ y2="75"/> │ -00:18:22 verbose #15735 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │ -00:18:22 verbose #15736 > │ y2="75"/> │ -00:18:22 verbose #15737 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #15738 > │ y2="75"/> │ -00:18:22 verbose #15739 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │ -00:18:22 verbose #15740 > │ y2="75"/> │ -00:18:22 verbose #15741 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="84" y1="424" x2="84" │ -00:18:22 verbose #15742 > │ y2="75"/> │ -00:18:22 verbose #15743 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="91" y1="424" x2="91" │ -00:18:22 verbose #15744 > │ y2="75"/> │ -00:18:22 verbose #15745 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="98" y1="424" x2="98" │ -00:18:22 verbose #15746 > │ y2="75"/> │ -00:18:22 verbose #15747 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="105" y1="424" │ -00:18:22 verbose #15748 > │ x2="105" y2="75"/> │ -00:18:22 verbose #15749 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="112" y1="424" │ -00:18:22 verbose #15750 > │ x2="112" y2="75"/> │ -00:18:22 verbose #15751 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #15752 > │ x2="119" y2="75"/> │ -00:18:22 verbose #15753 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="127" y1="424" │ -00:18:22 verbose #15754 > │ x2="127" y2="75"/> │ -00:18:22 verbose #15755 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="134" y1="424" │ -00:18:22 verbose #15756 > │ x2="134" y2="75"/> │ -00:18:22 verbose #15757 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="141" y1="424" │ -00:18:22 verbose #15758 > │ x2="141" y2="75"/> │ -00:18:22 verbose #15759 > │ <lin... │ -00:18:22 verbose #15760 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15761 > -00:18:22 verbose #15762 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15763 > //// test -00:18:22 verbose #15764 > -00:18:22 verbose #15765 > inl best_angle (min, max) = -00:18:22 verbose #15766 > let rec loop theta_deg (best_range, best_theta_deg) = -00:18:22 verbose #15767 > if theta_deg > max -00:18:22 verbose #15768 > then best_range, best_theta_deg -00:18:22 verbose #15769 > else -00:18:22 verbose #15770 > inl range = baseball_range 0.01 45 theta_deg -00:18:22 verbose #15771 > loop -00:18:22 verbose #15772 > (theta_deg + 1) -00:18:22 verbose #15773 > (if range > best_range -00:18:22 verbose #15774 > then range, theta_deg -00:18:22 verbose #15775 > else best_range, best_theta_deg) -00:18:22 verbose #15776 > loop min (0f64, min) -00:18:22 verbose #15777 > -00:18:22 verbose #15778 > best_angle (30f64, 60f64) -00:18:22 verbose #15779 > |> _assert_eq (116.77499158246208, 41) -00:18:22 verbose #15780 > -00:18:22 verbose #15781 > ╭─[ 446.78ms - stdout ]────────────────────────────────────────────────────────╮ -00:18:22 verbose #15782 > │ assert_eq / actual: struct (116.7749916, 41.0) / expected: struct │ -00:18:22 verbose #15783 > │ (116.7749916, 41.0) │ -00:18:22 verbose #15784 > │ │ -00:18:22 verbose #15785 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15786 > -00:18:22 verbose #15787 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15788 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15789 > │ ## relativity_ps │ -00:18:22 verbose #15790 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15791 > -00:18:22 verbose #15792 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15793 > inl relativity_ps fs (st : particle_state) = -00:18:22 verbose #15794 > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec -00:18:22 verbose #15795 > inl c = 299792458 -00:18:22 verbose #15796 > inl u = st.velocity ^/ c -00:18:22 verbose #15797 > inl acc = sqrt (1 - (u <.> u)) *^ (f_net ^-^ (f_net <.> u) *^ u) ^/ st.mass -00:18:22 verbose #15798 > d_particle_state { -00:18:22 verbose #15799 > dmdt = 0 -00:18:22 verbose #15800 > dqdt = 0 -00:18:22 verbose #15801 > dtdt = 1 -00:18:22 verbose #15802 > drdt = st.velocity -00:18:22 verbose #15803 > dvdt = acc -00:18:22 verbose #15804 > } -00:18:22 verbose #15805 > -00:18:22 verbose #15806 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15807 > //// test -00:18:22 verbose #15808 > -00:18:22 verbose #15809 > inl year = 365.25 * 24 * 60 * 60 -00:18:22 verbose #15810 > inl c = 299792458 -00:18:22 verbose #15811 > inl ~method = runge_kutta_4 100000 -00:18:22 verbose #15812 > inl forces = [[ fun _ => 10 *^ i_hat () ]] -00:18:22 verbose #15813 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #15814 > inl initial_state = -00:18:22 verbose #15815 > particle_state { default_particle_state' with -00:18:22 verbose #15816 > mass = 1 -00:18:22 verbose #15817 > } -00:18:22 verbose #15818 > -00:18:22 verbose #15819 > inl newton_states = solver_ method (newton_second_ps forces) initial_state -00:18:22 verbose #15820 > inl relativity_states = solver_ method (relativity_ps forces) initial_state -00:18:22 verbose #15821 > -00:18:22 verbose #15822 > inl newton_x, newton_y = -00:18:22 verbose #15823 > newton_states -00:18:22 verbose #15824 > >> Some -00:18:22 verbose #15825 > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year) -00:18:22 verbose #15826 > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c) -00:18:22 verbose #15827 > |> listm'.unzip -00:18:22 verbose #15828 > -00:18:22 verbose #15829 > inl _, relativity_y = -00:18:22 verbose #15830 > relativity_states -00:18:22 verbose #15831 > >> Some -00:18:22 verbose #15832 > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year) -00:18:22 verbose #15833 > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c) -00:18:22 verbose #15834 > |> listm'.unzip -00:18:22 verbose #15835 > -00:18:22 verbose #15836 > inl newton_x : a i32 _ = newton_x |> listm.toArray -00:18:22 verbose #15837 > inl newton_y : a i32 _ = newton_y |> listm.toArray -00:18:22 verbose #15838 > inl relativity_y : a i32 _ = relativity_y |> listm.toArray -00:18:22 verbose #15839 > -00:18:22 verbose #15840 > "response to a constant force", -00:18:22 verbose #15841 > "time (years)", -00:18:22 verbose #15842 > "velocity (multiples of c)", -00:18:22 verbose #15843 > ;[[ -00:18:22 verbose #15844 > "newtonian", newton_x, newton_y -00:18:22 verbose #15845 > "relativistic", newton_x, relativity_y -00:18:22 verbose #15846 > ]] -00:18:22 verbose #15847 > -00:18:22 verbose #15848 > ╭─[ 436.08ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #15849 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #15850 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #15851 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #15852 > │ stroke="none"/> │ -00:18:22 verbose #15853 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #15854 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #15855 > │ fill="#FFFFFF"> │ -00:18:22 verbose #15856 > │ response to a constant force │ -00:18:22 verbose #15857 > │ </text> │ -00:18:22 verbose #15858 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ -00:18:22 verbose #15859 > │ y2="75"/> │ -00:18:22 verbose #15860 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #15861 > │ y2="75"/> │ -00:18:22 verbose #15862 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ -00:18:22 verbose #15863 > │ y2="75"/> │ -00:18:22 verbose #15864 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ -00:18:22 verbose #15865 > │ y2="75"/> │ -00:18:22 verbose #15866 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ -00:18:22 verbose #15867 > │ y2="75"/> │ -00:18:22 verbose #15868 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ -00:18:22 verbose #15869 > │ x2="109" y2="75"/> │ -00:18:22 verbose #15870 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #15871 > │ x2="119" y2="75"/> │ -00:18:22 verbose #15872 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ -00:18:22 verbose #15873 > │ x2="129" y2="75"/> │ -00:18:22 verbose #15874 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ -00:18:22 verbose #15875 > │ x2="139" y2="75"/> │ -00:18:22 verbose #15876 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ -00:18:22 verbose #15877 > │ x2="149" y2="75"/> │ -00:18:22 verbose #15878 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ -00:18:22 verbose #15879 > │ x2="159" y2="75"/> │ -00:18:22 verbose #15880 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ -00:18:22 verbose #15881 > │ x2="169" y2="75"/> │ -00:18:22 verbose #15882 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ -00:18:22 verbose #15883 > │ x2="179" y2="75"/> │ -00:18:22 verbose #15884 > │ <line ... │ -00:18:22 verbose #15885 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15886 > -00:18:22 verbose #15887 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15888 > inl uniform_lorentz_force v_e v_b (st : particle_state) = -00:18:22 verbose #15889 > st.charge *^ (v_e ^+^ st.velocity >< v_b) -00:18:22 verbose #15890 > -00:18:22 verbose #15891 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15892 > //// test -00:18:22 verbose #15893 > -00:18:22 verbose #15894 > inl c : f64 = 299792458 -00:18:22 verbose #15895 > inl ~method = runge_kutta_4 0.000000001 -00:18:22 verbose #15896 > inl forces = [[ uniform_lorentz_force (zero_vec ()) (k_hat ()) ]] -00:18:22 verbose #15897 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #15898 > inl initial_state = -00:18:22 verbose #15899 > particle_state { default_particle_state' with -00:18:22 verbose #15900 > mass = 0.000000000000000000000000001672621898 -00:18:22 verbose #15901 > charge = 0.0000000000000000001602176621 -00:18:22 verbose #15902 > velocity = 0.8 *^ (c *^ j_hat ()) -00:18:22 verbose #15903 > } -00:18:22 verbose #15904 > -00:18:22 verbose #15905 > inl newton_states = solver_ method (newton_second_ps forces) initial_state -00:18:22 verbose #15906 > inl relativity_states = solver_ method (relativity_ps forces) initial_state -00:18:22 verbose #15907 > -00:18:22 verbose #15908 > inl newton_x, newton_y = -00:18:22 verbose #15909 > newton_states -00:18:22 verbose #15910 > >> Some -00:18:22 verbose #15911 > |> seq.take_while_ (fun (particle_state st) i => i < 100i32) -00:18:22 verbose #15912 > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y) -00:18:22 verbose #15913 > |> listm'.unzip -00:18:22 verbose #15914 > -00:18:22 verbose #15915 > inl relativity_x, relativity_y = -00:18:22 verbose #15916 > relativity_states -00:18:22 verbose #15917 > >> Some -00:18:22 verbose #15918 > |> seq.take_while_ (fun (particle_state st) i => i < 165i32) -00:18:22 verbose #15919 > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y) -00:18:22 verbose #15920 > |> listm'.unzip -00:18:22 verbose #15921 > -00:18:22 verbose #15922 > inl newton_x : a i32 _ = newton_x |> listm.toArray -00:18:22 verbose #15923 > inl newton_y : a i32 _ = newton_y |> listm.toArray -00:18:22 verbose #15924 > -00:18:22 verbose #15925 > inl relativity_x : a i32 _ = relativity_x |> listm.toArray -00:18:22 verbose #15926 > inl relativity_y : a i32 _ = relativity_y |> listm.toArray -00:18:22 verbose #15927 > -00:18:22 verbose #15928 > "proton in a 1-t magnetic field", -00:18:22 verbose #15929 > "x (m)", -00:18:22 verbose #15930 > "y (m)", -00:18:22 verbose #15931 > ;[[ -00:18:22 verbose #15932 > "newtonian", newton_x, newton_y -00:18:22 verbose #15933 > "relativistic", relativity_x, relativity_y -00:18:22 verbose #15934 > ]] -00:18:22 verbose #15935 > -00:18:22 verbose #15936 > ╭─[ 380.29ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #15937 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #15938 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #15939 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #15940 > │ stroke="none"/> │ -00:18:22 verbose #15941 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #15942 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #15943 > │ fill="#FFFFFF"> │ -00:18:22 verbose #15944 > │ proton in a 1-t magnetic field │ -00:18:22 verbose #15945 > │ </text> │ -00:18:22 verbose #15946 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="58" y1="424" x2="58" │ -00:18:22 verbose #15947 > │ y2="75"/> │ -00:18:22 verbose #15948 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #15949 > │ y2="75"/> │ -00:18:22 verbose #15950 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="81" y1="424" x2="81" │ -00:18:22 verbose #15951 > │ y2="75"/> │ -00:18:22 verbose #15952 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │ -00:18:22 verbose #15953 > │ y2="75"/> │ -00:18:22 verbose #15954 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="105" y1="424" │ -00:18:22 verbose #15955 > │ x2="105" y2="75"/> │ -00:18:22 verbose #15956 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="117" y1="424" │ -00:18:22 verbose #15957 > │ x2="117" y2="75"/> │ -00:18:22 verbose #15958 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ -00:18:22 verbose #15959 > │ x2="129" y2="75"/> │ -00:18:22 verbose #15960 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="141" y1="424" │ -00:18:22 verbose #15961 > │ x2="141" y2="75"/> │ -00:18:22 verbose #15962 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ -00:18:22 verbose #15963 > │ x2="153" y2="75"/> │ -00:18:22 verbose #15964 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="165" y1="424" │ -00:18:22 verbose #15965 > │ x2="165" y2="75"/> │ -00:18:22 verbose #15966 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="177" y1="424" │ -00:18:22 verbose #15967 > │ x2="177" y2="75"/> │ -00:18:22 verbose #15968 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="189" y1="424" │ -00:18:22 verbose #15969 > │ x2="189" y2="75"/> │ -00:18:22 verbose #15970 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="201" y1="424" │ -00:18:22 verbose #15971 > │ x2="201" y2="75"/> │ -00:18:22 verbose #15972 > │ <l... │ -00:18:22 verbose #15973 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15974 > -00:18:22 verbose #15975 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #15976 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #15977 > │ ### system kinetic energy versus time 1 │ -00:18:22 verbose #15978 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #15979 > -00:18:22 verbose #15980 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #15981 > //// test -00:18:22 verbose #15982 > -00:18:22 verbose #15983 > inl central_force f (particle_state st1) (particle_state st2) = -00:18:22 verbose #15984 > inl r1 = st1.pos_vec -00:18:22 verbose #15985 > inl r2 = st2.pos_vec -00:18:22 verbose #15986 > inl r21 = r2 ^-^ r1 -00:18:22 verbose #15987 > inl r21mag = magnitude r21 -00:18:22 verbose #15988 > f r21mag *^ r21 ^/ r21mag -00:18:22 verbose #15989 > -00:18:22 verbose #15990 > inl billiard_force k re = -00:18:22 verbose #15991 > inl f r = -00:18:22 verbose #15992 > if r >= re -00:18:22 verbose #15993 > then 0 -00:18:22 verbose #15994 > else -k * (r - re) -00:18:22 verbose #15995 > central_force f -00:18:22 verbose #15996 > -00:18:22 verbose #15997 > type force_vector = vec -00:18:22 verbose #15998 > type two_body_force = particle_state -> particle_state -> force_vector -00:18:22 verbose #15999 > -00:18:22 verbose #16000 > union force = -00:18:22 verbose #16001 > | ExternalForce : i32 * one_body_force -00:18:22 verbose #16002 > | InternalForce : i32 * i32 * two_body_force -00:18:22 verbose #16003 > -00:18:22 verbose #16004 > nominal multi_particle_state = list particle_state -00:18:22 verbose #16005 > -00:18:22 verbose #16006 > nominal d_multi_particle_state = list d_particle_state -00:18:22 verbose #16007 > -00:18:22 verbose #16008 > inl force_on n sts force = -00:18:22 verbose #16009 > match force with -00:18:22 verbose #16010 > | ExternalForce (n0, f_one_body) => -00:18:22 verbose #16011 > if n = n0 -00:18:22 verbose #16012 > then f_one_body -00:18:22 verbose #16013 > else fun _ => zero_vec () -00:18:22 verbose #16014 > | InternalForce (n0, n1, f_two_body) => -00:18:22 verbose #16015 > if n = n0 -00:18:22 verbose #16016 > then f_two_body (sts |> listm'.item n1) -00:18:22 verbose #16017 > elif n = n1 -00:18:22 verbose #16018 > then f_two_body (sts |> listm'.item n0) -00:18:22 verbose #16019 > else fun _ => zero_vec () -00:18:22 verbose #16020 > -00:18:22 verbose #16021 > inl forces_on n (multi_particle_state sts) fs = -00:18:22 verbose #16022 > fs |> listm.map (force_on n sts) -00:18:22 verbose #16023 > -00:18:22 verbose #16024 > inl newton_second_mps fs (multi_particle_state sts) : d_multi_particle_state = -00:18:22 verbose #16025 > inl deriv (n, st) = -00:18:22 verbose #16026 > newton_second_ps (forces_on n (multi_particle_state sts) fs) st -00:18:22 verbose #16027 > sts |> listm'.indexed |> listm.map deriv |> d_multi_particle_state -00:18:22 verbose #16028 > -00:18:22 verbose #16029 > instance (+++) d_multi_particle_state = fun (d_multi_particle_state dsts1) -00:18:22 verbose #16030 > (d_multi_particle_state dsts2) => -00:18:22 verbose #16031 > d_multi_particle_state (listm'.zip_with_ (+++) dsts1 dsts2) -00:18:22 verbose #16032 > -00:18:22 verbose #16033 > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) => -00:18:22 verbose #16034 > d_multi_particle_state (dsts |> listm.map (scale w)) -00:18:22 verbose #16035 > -00:18:22 verbose #16036 > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) => -00:18:22 verbose #16037 > inl (d_multi_particle_state dsts) = -00:18:22 verbose #16038 > real -00:18:22 verbose #16039 > match dsts with -00:18:22 verbose #16040 > | d_multi_particle_state _ => dsts -00:18:22 verbose #16041 > listm'.zip_with_ (shift dt) dsts sts |> multi_particle_state -00:18:22 verbose #16042 > -00:18:22 verbose #16043 > inl euler_cromer_mps dt : numerical_method multi_particle_state -00:18:22 verbose #16044 > d_multi_particle_state = -00:18:22 verbose #16045 > fun deriv mpst0 => -00:18:22 verbose #16046 > inl mpst1 = euler dt deriv mpst0 -00:18:22 verbose #16047 > inl (multi_particle_state sts0) = mpst0 -00:18:22 verbose #16048 > inl (multi_particle_state sts1) = mpst1 -00:18:22 verbose #16049 > sts1 -00:18:22 verbose #16050 > |> listm'.zip_ sts0 -00:18:22 verbose #16051 > |> listm.map (fun ((particle_state st0), (particle_state st1)) => -00:18:22 verbose #16052 > particle_state { -00:18:22 verbose #16053 > st1 with -00:18:22 verbose #16054 > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt -00:18:22 verbose #16055 > } -00:18:22 verbose #16056 > ) -00:18:22 verbose #16057 > |> multi_particle_state -00:18:22 verbose #16058 > -00:18:22 verbose #16059 > inl update_mps (method : numerical_method multi_particle_state -00:18:22 verbose #16060 > d_multi_particle_state) = -00:18:22 verbose #16061 > newton_second_mps >> method -00:18:22 verbose #16062 > -00:18:22 verbose #16063 > inl states_mps (method : numerical_method multi_particle_state -00:18:22 verbose #16064 > d_multi_particle_state) = -00:18:22 verbose #16065 > newton_second_mps >> method >> seq.iterate_ -00:18:22 verbose #16066 > -00:18:22 verbose #16067 > -00:18:22 verbose #16068 > inl kinetic_energy (particle_state st) = -00:18:22 verbose #16069 > inl m = st.mass -00:18:22 verbose #16070 > inl v = magnitude st.velocity -00:18:22 verbose #16071 > 0.5 * m * v ** 2 -00:18:22 verbose #16072 > -00:18:22 verbose #16073 > inl system_ke (multi_particle_state sts) = -00:18:22 verbose #16074 > sts |> listm.map kinetic_energy |> listm'.sum -00:18:22 verbose #16075 > -00:18:22 verbose #16076 > inl linear_spring_pe k re (particle_state st1) (particle_state st2) = -00:18:22 verbose #16077 > inl r1 = st1.pos_vec -00:18:22 verbose #16078 > inl r2 = st2.pos_vec -00:18:22 verbose #16079 > inl r21 = r2 ^-^ r1 -00:18:22 verbose #16080 > inl r21mag = magnitude r21 -00:18:22 verbose #16081 > k * (r21mag - re) ** 2 / 2 -00:18:22 verbose #16082 > -00:18:22 verbose #16083 > inl earth_surface_gravity_pe (particle_state st) = -00:18:22 verbose #16084 > inl g = 9.80665 -00:18:22 verbose #16085 > inl m = st.mass -00:18:22 verbose #16086 > inl z = st.pos_vec.z -00:18:22 verbose #16087 > m * g * z -00:18:22 verbose #16088 > -00:18:22 verbose #16089 > inl two_springs_pe (multi_particle_state sts) = -00:18:22 verbose #16090 > inl st0 = sts |> listm'.item 0i32 -00:18:22 verbose #16091 > inl st1 = sts |> listm'.item 1i32 -00:18:22 verbose #16092 > linear_spring_pe 100 0.5 (default_particle_state ()) st0 -00:18:22 verbose #16093 > + linear_spring_pe 100 0.5 st0 st1 -00:18:22 verbose #16094 > + earth_surface_gravity_pe st0 -00:18:22 verbose #16095 > + earth_surface_gravity_pe st1 -00:18:22 verbose #16096 > -00:18:22 verbose #16097 > inl two_springs_me mpst = -00:18:22 verbose #16098 > system_ke mpst + two_springs_pe mpst -00:18:22 verbose #16099 > -00:18:22 verbose #16100 > inl ball_radius () = 0.03 -00:18:22 verbose #16101 > -00:18:22 verbose #16102 > inl billiard_forces k = -00:18:22 verbose #16103 > [[ InternalForce (0, 1, billiard_force k (2 * ball_radius ())) ]] -00:18:22 verbose #16104 > -00:18:22 verbose #16105 > inl billiard_update n_method k dt = -00:18:22 verbose #16106 > update_mps (n_method dt) (billiard_forces k) -00:18:22 verbose #16107 > -00:18:22 verbose #16108 > inl billiard_initial () = -00:18:22 verbose #16109 > inl ball_mass = 0.160 -00:18:22 verbose #16110 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #16111 > multi_particle_state [[ -00:18:22 verbose #16112 > particle_state { -00:18:22 verbose #16113 > default_particle_state' with -00:18:22 verbose #16114 > mass = ball_mass -00:18:22 verbose #16115 > pos_vec = zero_vec () -00:18:22 verbose #16116 > velocity = 0.2 *^ i_hat () -00:18:22 verbose #16117 > } -00:18:22 verbose #16118 > particle_state { -00:18:22 verbose #16119 > default_particle_state' with -00:18:22 verbose #16120 > mass = ball_mass -00:18:22 verbose #16121 > pos_vec = i_hat () ^+^ 0.02 *^ j_hat () -00:18:22 verbose #16122 > velocity = zero_vec () -00:18:22 verbose #16123 > } -00:18:22 verbose #16124 > ]] -00:18:22 verbose #16125 > -00:18:22 verbose #16126 > inl billiard_states ~n_method k dt = -00:18:22 verbose #16127 > states_mps (n_method dt) (billiard_forces k) (billiard_initial ()) -00:18:22 verbose #16128 > -00:18:22 verbose #16129 > inl billiard_states_finite n_method k dt = -00:18:22 verbose #16130 > billiard_states n_method k dt -00:18:22 verbose #16131 > >> Some -00:18:22 verbose #16132 > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) => -00:18:22 verbose #16133 > (mpst |> listm'.item 0i32).time <= 10 -00:18:22 verbose #16134 > ) -00:18:22 verbose #16135 > -00:18:22 verbose #16136 > inl momentum (particle_state st) = -00:18:22 verbose #16137 > inl m = st.mass -00:18:22 verbose #16138 > inl v = st.velocity -00:18:22 verbose #16139 > m *^ v -00:18:22 verbose #16140 > -00:18:22 verbose #16141 > inl system_p (multi_particle_state sts) = -00:18:22 verbose #16142 > sts |> listm.map momentum |> sum_vec -00:18:22 verbose #16143 > -00:18:22 verbose #16144 > -00:18:22 verbose #16145 > inl time_ke_ec_x, time_ke_ec_y = -00:18:22 verbose #16146 > billiard_states_finite euler_cromer_mps 30 0.03 -00:18:22 verbose #16147 > |> listm.map (fun (multi_particle_state mpst) => -00:18:22 verbose #16148 > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst) -00:18:22 verbose #16149 > ) -00:18:22 verbose #16150 > |> listm'.unzip -00:18:22 verbose #16151 > -00:18:22 verbose #16152 > inl time_ke_rk4_x, time_ke_rk4_y = -00:18:22 verbose #16153 > billiard_states_finite runge_kutta_4 30 0.03 -00:18:22 verbose #16154 > |> listm.map (fun (multi_particle_state mpst) => -00:18:22 verbose #16155 > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst) -00:18:22 verbose #16156 > ) -00:18:22 verbose #16157 > |> listm'.unzip -00:18:22 verbose #16158 > -00:18:22 verbose #16159 > inl time_ke_ec_x : a i32 _ = time_ke_ec_x |> listm.toArray -00:18:22 verbose #16160 > inl time_ke_ec_y : a i32 _ = time_ke_ec_y |> listm.toArray -00:18:22 verbose #16161 > -00:18:22 verbose #16162 > inl time_ke_rk4_x : a i32 _ = time_ke_rk4_x |> listm.toArray -00:18:22 verbose #16163 > inl time_ke_rk4_y : a i32 _ = time_ke_rk4_y |> listm.toArray -00:18:22 verbose #16164 > -00:18:22 verbose #16165 > "system kinetic energy versus time", -00:18:22 verbose #16166 > "time (s)", -00:18:22 verbose #16167 > "system kinetic energy (j)", -00:18:22 verbose #16168 > ;[[ -00:18:22 verbose #16169 > "euler-cromer", time_ke_ec_x, time_ke_ec_y -00:18:22 verbose #16170 > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y -00:18:22 verbose #16171 > ]] -00:18:22 verbose #16172 > -00:18:22 verbose #16173 > ╭─[ 1.55s - return value ]─────────────────────────────────────────────────────╮ -00:18:22 verbose #16174 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #16175 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #16176 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #16177 > │ stroke="none"/> │ -00:18:22 verbose #16178 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #16179 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #16180 > │ fill="#FFFFFF"> │ -00:18:22 verbose #16181 > │ system kinetic energy versus time │ -00:18:22 verbose #16182 > │ </text> │ -00:18:22 verbose #16183 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ -00:18:22 verbose #16184 > │ y2="75"/> │ -00:18:22 verbose #16185 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #16186 > │ y2="75"/> │ -00:18:22 verbose #16187 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ -00:18:22 verbose #16188 > │ y2="75"/> │ -00:18:22 verbose #16189 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ -00:18:22 verbose #16190 > │ y2="75"/> │ -00:18:22 verbose #16191 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ -00:18:22 verbose #16192 > │ y2="75"/> │ -00:18:22 verbose #16193 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ -00:18:22 verbose #16194 > │ x2="109" y2="75"/> │ -00:18:22 verbose #16195 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #16196 > │ x2="119" y2="75"/> │ -00:18:22 verbose #16197 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ -00:18:22 verbose #16198 > │ x2="129" y2="75"/> │ -00:18:22 verbose #16199 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ -00:18:22 verbose #16200 > │ x2="139" y2="75"/> │ -00:18:22 verbose #16201 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ -00:18:22 verbose #16202 > │ x2="149" y2="75"/> │ -00:18:22 verbose #16203 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ -00:18:22 verbose #16204 > │ x2="159" y2="75"/> │ -00:18:22 verbose #16205 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ -00:18:22 verbose #16206 > │ x2="169" y2="75"/> │ -00:18:22 verbose #16207 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ -00:18:22 verbose #16208 > │ x2="179" y2="75"/> │ -00:18:22 verbose #16209 > │ <... │ -00:18:22 verbose #16210 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #16211 > -00:18:22 verbose #16212 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #16213 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #16214 > │ ### wave 1 │ -00:18:22 verbose #16215 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #16216 > -00:18:22 verbose #16217 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #16218 > //// test -00:18:22 verbose #16219 > -00:18:22 verbose #16220 > inl linear_spring k re (particle_state st1) (particle_state st2) = -00:18:22 verbose #16221 > inl r1 = st1.pos_vec -00:18:22 verbose #16222 > inl r2 = st2.pos_vec -00:18:22 verbose #16223 > inl r21 = r2 ^-^ r1 -00:18:22 verbose #16224 > inl r21mag = magnitude r21 -00:18:22 verbose #16225 > -k * (r21mag - re) *^ r21 ^/ r21mag -00:18:22 verbose #16226 > -00:18:22 verbose #16227 > inl fixed_linear_spring k re r1 = -00:18:22 verbose #16228 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #16229 > linear_spring k re (particle_state { default_particle_state' with pos_vec = -00:18:22 verbose #16230 > r1 }) -00:18:22 verbose #16231 > -00:18:22 verbose #16232 > inl forces_string () = -00:18:22 verbose #16233 > [[ -00:18:22 verbose #16234 > ExternalForce (0, fixed_linear_spring 5384 0 (zero_vec ())) -00:18:22 verbose #16235 > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ())) -00:18:22 verbose #16236 > ]] ++ ( -00:18:22 verbose #16237 > listm'.init_series 0 59 1 -00:18:22 verbose #16238 > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0)) -00:18:22 verbose #16239 > ) -00:18:22 verbose #16240 > -00:18:22 verbose #16241 > inl string_update dt = -00:18:22 verbose #16242 > update_mps (runge_kutta_4 dt) (forces_string ()) -00:18:22 verbose #16243 > -00:18:22 verbose #16244 > inl string_initial_overtone n = -00:18:22 verbose #16245 > inl ball_mass = 0.0008293 * 0.65 / 64 -00:18:22 verbose #16246 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #16247 > listm'.init_series 0.01 0.64 0.01 -00:18:22 verbose #16248 > |> listm.map (fun x => -00:18:22 verbose #16249 > inl y = 0.005 * sin (conv n * pi * x / 0.65) -00:18:22 verbose #16250 > particle_state { -00:18:22 verbose #16251 > default_particle_state' with -00:18:22 verbose #16252 > mass = ball_mass -00:18:22 verbose #16253 > pos_vec = x *^ i_hat () ^+^ y *^ j_hat () -00:18:22 verbose #16254 > velocity = zero_vec () -00:18:22 verbose #16255 > } -00:18:22 verbose #16256 > ) -00:18:22 verbose #16257 > |> multi_particle_state -00:18:22 verbose #16258 > -00:18:22 verbose #16259 > inl string_initial_pluck () = -00:18:22 verbose #16260 > inl ball_mass = 0.0008293 * 0.65 / 64 -00:18:22 verbose #16261 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #16262 > listm'.init_series 0.01 0.64 0.01 -00:18:22 verbose #16263 > |> listm.map (fun x => -00:18:22 verbose #16264 > inl y = -00:18:22 verbose #16265 > inl n = if x <= 0.51 then 0 else 0.65 -00:18:22 verbose #16266 > 0.005 / (0.51 - n) * (x - n) -00:18:22 verbose #16267 > particle_state { -00:18:22 verbose #16268 > default_particle_state' with -00:18:22 verbose #16269 > mass = ball_mass -00:18:22 verbose #16270 > pos_vec = x *^ i_hat () ^+^ y *^ j_hat () -00:18:22 verbose #16271 > velocity = zero_vec () -00:18:22 verbose #16272 > } -00:18:22 verbose #16273 > ) -00:18:22 verbose #16274 > |> multi_particle_state -00:18:22 verbose #16275 > -00:18:22 verbose #16276 > let main () = -00:18:22 verbose #16277 > inl ~frames = listm'.init_series 0 9 1f64 -00:18:22 verbose #16278 > inl initial_state = string_initial_overtone 3i32 -00:18:22 verbose #16279 > inl frames = -00:18:22 verbose #16280 > frames -00:18:22 verbose #16281 > |> listm.map (fun n => -00:18:22 verbose #16282 > inl (multi_particle_state sts) = -00:18:22 verbose #16283 > seq.iterate' (string_update 0.000025) initial_state |> fun f => -00:18:22 verbose #16284 > f 0f64 -00:18:22 verbose #16285 > inl rs = -00:18:22 verbose #16286 > [[ zero_vec () ]] -00:18:22 verbose #16287 > ++ (sts |> listm.map (fun (particle_state st) => st.pos_vec)) -00:18:22 verbose #16288 > ++ [[ 0.65 *^ i_hat () ]] -00:18:22 verbose #16289 > inl x, y = -00:18:22 verbose #16290 > rs -00:18:22 verbose #16291 > |> listm.map (fun r => r.x, r.y) -00:18:22 verbose #16292 > |> listm'.unzip -00:18:22 verbose #16293 > inl x : a i32 _ = x |> listm.toArray -00:18:22 verbose #16294 > inl y : a i32 _ = y |> listm.toArray -00:18:22 verbose #16295 > x, y -00:18:22 verbose #16296 > ) -00:18:22 verbose #16297 > |> listm.toArray : a i32 _ -00:18:22 verbose #16298 > -00:18:22 verbose #16299 > inl n = 0i32 -00:18:22 verbose #16300 > -00:18:22 verbose #16301 > inl x, y = index frames n -00:18:22 verbose #16302 > -00:18:22 verbose #16303 > "wave", -00:18:22 verbose #16304 > "position (m)", -00:18:22 verbose #16305 > "displacement (m)", -00:18:22 verbose #16306 > ;[[ -00:18:22 verbose #16307 > ($"$\"{!n}\"" : string), x, y -00:18:22 verbose #16308 > ]] -00:18:22 verbose #16309 > -00:18:22 verbose #16310 > ╭─[ 173.08ms - return value ]──────────────────────────────────────────────────╮ -00:18:22 verbose #16311 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #16312 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #16313 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #16314 > │ stroke="none"/> │ -00:18:22 verbose #16315 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #16316 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #16317 > │ fill="#FFFFFF"> │ -00:18:22 verbose #16318 > │ wave │ -00:18:22 verbose #16319 > │ </text> │ -00:18:22 verbose #16320 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │ -00:18:22 verbose #16321 > │ y2="75"/> │ -00:18:22 verbose #16322 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #16323 > │ y2="75"/> │ -00:18:22 verbose #16324 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │ -00:18:22 verbose #16325 > │ y2="75"/> │ -00:18:22 verbose #16326 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │ -00:18:22 verbose #16327 > │ y2="75"/> │ -00:18:22 verbose #16328 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │ -00:18:22 verbose #16329 > │ y2="75"/> │ -00:18:22 verbose #16330 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="100" y1="424" │ -00:18:22 verbose #16331 > │ x2="100" y2="75"/> │ -00:18:22 verbose #16332 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="108" y1="424" │ -00:18:22 verbose #16333 > │ x2="108" y2="75"/> │ -00:18:22 verbose #16334 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="116" y1="424" │ -00:18:22 verbose #16335 > │ x2="116" y2="75"/> │ -00:18:22 verbose #16336 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="123" y1="424" │ -00:18:22 verbose #16337 > │ x2="123" y2="75"/> │ -00:18:22 verbose #16338 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="131" y1="424" │ -00:18:22 verbose #16339 > │ x2="131" y2="75"/> │ -00:18:22 verbose #16340 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ -00:18:22 verbose #16341 > │ x2="139" y2="75"/> │ -00:18:22 verbose #16342 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="146" y1="424" │ -00:18:22 verbose #16343 > │ x2="146" y2="75"/> │ -00:18:22 verbose #16344 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="154" y1="424" │ -00:18:22 verbose #16345 > │ x2="154" y2="75"/> │ -00:18:22 verbose #16346 > │ <line opacity="1" stroke="#323... │ -00:18:22 verbose #16347 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #16348 > -00:18:22 verbose #16349 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #16350 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #16351 > │ ### system kinetic energy versus time 2 │ -00:18:22 verbose #16352 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #16353 > -00:18:22 verbose #16354 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #16355 > //// test -00:18:22 verbose #16356 > -00:18:22 verbose #16357 > inl central_force f (particle_state st1) (particle_state st2) = -00:18:22 verbose #16358 > inl r1 = st1.pos_vec -00:18:22 verbose #16359 > inl r2 = st2.pos_vec -00:18:22 verbose #16360 > inl r21 = r2 ^-^ r1 -00:18:22 verbose #16361 > inl r21mag = magnitude r21 -00:18:22 verbose #16362 > f r21mag *^ r21 ^/ r21mag -00:18:22 verbose #16363 > -00:18:22 verbose #16364 > inl billiard_force k re = -00:18:22 verbose #16365 > inl f r = -00:18:22 verbose #16366 > if r >= re -00:18:22 verbose #16367 > then 0 -00:18:22 verbose #16368 > else -k * (r - re) -00:18:22 verbose #16369 > central_force f -00:18:22 verbose #16370 > -00:18:22 verbose #16371 > type force_vector = vec -00:18:22 verbose #16372 > type two_body_force = particle_state -> particle_state -> force_vector -00:18:22 verbose #16373 > -00:18:22 verbose #16374 > union force t = -00:18:22 verbose #16375 > | ExternalForce : t * one_body_force -00:18:22 verbose #16376 > | InternalForce : t * t * two_body_force -00:18:22 verbose #16377 > -00:18:22 verbose #16378 > nominal multi_particle_state = stream.stream particle_state -00:18:22 verbose #16379 > -00:18:22 verbose #16380 > nominal d_multi_particle_state = stream.stream d_particle_state -00:18:22 verbose #16381 > -00:18:22 verbose #16382 > inl force_on n s force = -00:18:22 verbose #16383 > match force with -00:18:22 verbose #16384 > | ExternalForce (n0, f_one_body) => -00:18:22 verbose #16385 > if n = n0 -00:18:22 verbose #16386 > then f_one_body -00:18:22 verbose #16387 > else fun _ => zero_vec () -00:18:22 verbose #16388 > | InternalForce (n0, n1, f_two_body) => -00:18:22 verbose #16389 > if n = n0 -00:18:22 verbose #16390 > then s |> stream.try_item n1 |> optionm.map f_two_body -00:18:22 verbose #16391 > elif n = n1 -00:18:22 verbose #16392 > then s |> stream.try_item n0 |> optionm.map f_two_body -00:18:22 verbose #16393 > else None -00:18:22 verbose #16394 > |> optionm'.default_value (fun _ => zero_vec ()) -00:18:22 verbose #16395 > -00:18:22 verbose #16396 > inl forces_on n (multi_particle_state sts) fs = -00:18:22 verbose #16397 > fs -00:18:22 verbose #16398 > |> listm.map (force_on n sts) -00:18:22 verbose #16399 > -00:18:22 verbose #16400 > inl newton_second_mps fs ((multi_particle_state sts) as mpst) = -00:18:22 verbose #16401 > inl deriv (n, st) = -00:18:22 verbose #16402 > newton_second_ps (forces_on n mpst fs) st -00:18:22 verbose #16403 > sts |> stream.indexed |> stream.map deriv |> d_multi_particle_state -00:18:22 verbose #16404 > -00:18:22 verbose #16405 > instance (+++) d_multi_particle_state = -00:18:22 verbose #16406 > fun (d_multi_particle_state dsts1) (d_multi_particle_state dsts2) => -00:18:22 verbose #16407 > (dsts1, dsts2) -00:18:22 verbose #16408 > ||> stream.zip_with (+++) -00:18:22 verbose #16409 > |> d_multi_particle_state -00:18:22 verbose #16410 > -00:18:22 verbose #16411 > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) => -00:18:22 verbose #16412 > dsts -00:18:22 verbose #16413 > |> stream.map (scale w) -00:18:22 verbose #16414 > |> d_multi_particle_state -00:18:22 verbose #16415 > -00:18:22 verbose #16416 > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) => -00:18:22 verbose #16417 > inl (d_multi_particle_state dsts) = -00:18:22 verbose #16418 > real -00:18:22 verbose #16419 > match dsts with -00:18:22 verbose #16420 > | d_multi_particle_state _ => dsts -00:18:22 verbose #16421 > (dsts, sts) -00:18:22 verbose #16422 > ||> stream.zip_with (shift dt) -00:18:22 verbose #16423 > |> stream.memoize -00:18:22 verbose #16424 > |> fun x => x () -00:18:22 verbose #16425 > |> multi_particle_state -00:18:22 verbose #16426 > -00:18:22 verbose #16427 > inl euler_cromer_mps dt : numerical_method multi_particle_state -00:18:22 verbose #16428 > d_multi_particle_state = -00:18:22 verbose #16429 > fun deriv ((multi_particle_state sts0) as mpst0) => -00:18:22 verbose #16430 > inl (multi_particle_state sts1) = euler dt deriv mpst0 -00:18:22 verbose #16431 > (sts0, sts1) -00:18:22 verbose #16432 > ||> stream.zip -00:18:22 verbose #16433 > |> stream.map (fun ((particle_state st0), (particle_state st1)) => -00:18:22 verbose #16434 > particle_state { -00:18:22 verbose #16435 > st1 with -00:18:22 verbose #16436 > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt -00:18:22 verbose #16437 > } -00:18:22 verbose #16438 > ) -00:18:22 verbose #16439 > |> multi_particle_state -00:18:22 verbose #16440 > -00:18:22 verbose #16441 > inl update_mps (method : numerical_method multi_particle_state -00:18:22 verbose #16442 > d_multi_particle_state) = -00:18:22 verbose #16443 > newton_second_mps >> method -00:18:22 verbose #16444 > -00:18:22 verbose #16445 > inl states_mps (method : numerical_method multi_particle_state -00:18:22 verbose #16446 > d_multi_particle_state) = -00:18:22 verbose #16447 > newton_second_mps -00:18:22 verbose #16448 > >> method -00:18:22 verbose #16449 > >> (fun x (multi_particle_state y) => -00:18:22 verbose #16450 > y -00:18:22 verbose #16451 > |> stream.memoize -00:18:22 verbose #16452 > |> (fun x => x ()) -00:18:22 verbose #16453 > |> multi_particle_state |> x -00:18:22 verbose #16454 > ) -00:18:22 verbose #16455 > // >> stream.iterate -00:18:22 verbose #16456 > >> seq.iterate' -00:18:22 verbose #16457 > -00:18:22 verbose #16458 > inl kinetic_energy (particle_state st) = -00:18:22 verbose #16459 > inl m = st.mass -00:18:22 verbose #16460 > inl v = magnitude st.velocity -00:18:22 verbose #16461 > 0.5 * m * v ** 2 -00:18:22 verbose #16462 > -00:18:22 verbose #16463 > inl system_ke (multi_particle_state sts) = -00:18:22 verbose #16464 > sts -00:18:22 verbose #16465 > |> stream.map kinetic_energy -00:18:22 verbose #16466 > |> stream.sum -00:18:22 verbose #16467 > -00:18:22 verbose #16468 > inl linear_spring_pe k re (particle_state st1) (particle_state st2) = -00:18:22 verbose #16469 > inl r1 = st1.pos_vec -00:18:22 verbose #16470 > inl r2 = st2.pos_vec -00:18:22 verbose #16471 > inl r21 = r2 ^-^ r1 -00:18:22 verbose #16472 > inl r21mag = magnitude r21 -00:18:22 verbose #16473 > k * (r21mag - re) ** 2 / 2 -00:18:22 verbose #16474 > -00:18:22 verbose #16475 > inl earth_surface_gravity_pe (particle_state st) = -00:18:22 verbose #16476 > inl g = 9.80665 -00:18:22 verbose #16477 > inl m = st.mass -00:18:22 verbose #16478 > inl z = st.pos_vec.z -00:18:22 verbose #16479 > m * g * z -00:18:22 verbose #16480 > -00:18:22 verbose #16481 > inl ball_radius () = 0.03 -00:18:22 verbose #16482 > -00:18:22 verbose #16483 > inl billiard_forces k = -00:18:22 verbose #16484 > [[ InternalForce (0i32, 1, billiard_force k (2 * ball_radius ())) ]] -00:18:22 verbose #16485 > -00:18:22 verbose #16486 > inl billiard_initial () = -00:18:22 verbose #16487 > inl ball_mass = 0.160 -00:18:22 verbose #16488 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #16489 > [[ -00:18:22 verbose #16490 > particle_state { -00:18:22 verbose #16491 > default_particle_state' with -00:18:22 verbose #16492 > mass = ball_mass -00:18:22 verbose #16493 > pos_vec = zero_vec () -00:18:22 verbose #16494 > velocity = 0.2 *^ i_hat () -00:18:22 verbose #16495 > } -00:18:22 verbose #16496 > particle_state { -00:18:22 verbose #16497 > default_particle_state' with -00:18:22 verbose #16498 > mass = ball_mass -00:18:22 verbose #16499 > pos_vec = i_hat () ^+^ 0.02 *^ j_hat () -00:18:22 verbose #16500 > velocity = zero_vec () -00:18:22 verbose #16501 > } -00:18:22 verbose #16502 > ]] -00:18:22 verbose #16503 > |> stream.from_list -00:18:22 verbose #16504 > |> multi_particle_state -00:18:22 verbose #16505 > -00:18:22 verbose #16506 > inl billiard_states ~n_method k dt = -00:18:22 verbose #16507 > states_mps (n_method dt) (billiard_forces k) (billiard_initial ()) -00:18:22 verbose #16508 > -00:18:22 verbose #16509 > inl billiard_states_finite n_method k dt = -00:18:22 verbose #16510 > billiard_states n_method k dt -00:18:22 verbose #16511 > >> Some -00:18:22 verbose #16512 > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) => -00:18:22 verbose #16513 > match mpst |> stream.try_item 0i32 with -00:18:22 verbose #16514 > | Some st => -00:18:22 verbose #16515 > st.time <= 10 -00:18:22 verbose #16516 > | None => false -00:18:22 verbose #16517 > ) -00:18:22 verbose #16518 > -00:18:22 verbose #16519 > inl momentum (particle_state st) = -00:18:22 verbose #16520 > inl m = st.mass -00:18:22 verbose #16521 > inl v = st.velocity -00:18:22 verbose #16522 > m *^ v -00:18:22 verbose #16523 > -00:18:22 verbose #16524 > inl system_p (multi_particle_state sts) = -00:18:22 verbose #16525 > sts -00:18:22 verbose #16526 > |> stream.map momentum -00:18:22 verbose #16527 > |> stream.fold (^+^) (zero_vec ()) -00:18:22 verbose #16528 > -00:18:22 verbose #16529 > inl time_ke_ec_x, time_ke_ec_y = -00:18:22 verbose #16530 > billiard_states_finite euler_cromer_mps 30 0.03 -00:18:22 verbose #16531 > |> listm.map (fun (multi_particle_state mpst) => -00:18:22 verbose #16532 > mpst |> stream.try_item 0i32 -00:18:22 verbose #16533 > |> optionm.map (fun st => -00:18:22 verbose #16534 > st.time, system_ke (multi_particle_state mpst) -00:18:22 verbose #16535 > ) -00:18:22 verbose #16536 > ) -00:18:22 verbose #16537 > // |> stream.to_list -00:18:22 verbose #16538 > |> listm'.choose id -00:18:22 verbose #16539 > |> listm'.unzip -00:18:22 verbose #16540 > -00:18:22 verbose #16541 > inl time_ke_rk4_x, time_ke_rk4_y = -00:18:22 verbose #16542 > billiard_states_finite runge_kutta_4 30 0.03 -00:18:22 verbose #16543 > |> listm.map (fun (multi_particle_state mpst) => -00:18:22 verbose #16544 > mpst |> stream.try_item 0i32 -00:18:22 verbose #16545 > |> optionm.map (fun st => -00:18:22 verbose #16546 > st.time, system_ke (multi_particle_state mpst) -00:18:22 verbose #16547 > ) -00:18:22 verbose #16548 > ) -00:18:22 verbose #16549 > // |> stream.to_list -00:18:22 verbose #16550 > |> listm'.choose id -00:18:22 verbose #16551 > |> listm'.unzip -00:18:22 verbose #16552 > -00:18:22 verbose #16553 > inl time_ke_ec_x : a i32 _ = time_ke_ec_x |> listm.toArray -00:18:22 verbose #16554 > inl time_ke_ec_y : a i32 _ = time_ke_ec_y |> listm.toArray -00:18:22 verbose #16555 > -00:18:22 verbose #16556 > inl time_ke_rk4_x : a i32 _ = time_ke_rk4_x |> listm.toArray -00:18:22 verbose #16557 > inl time_ke_rk4_y : a i32 _ = time_ke_rk4_y |> listm.toArray -00:18:22 verbose #16558 > -00:18:22 verbose #16559 > "system kinetic energy versus time", -00:18:22 verbose #16560 > "time (s)", -00:18:22 verbose #16561 > "system kinetic energy (j)", -00:18:22 verbose #16562 > ;[[ -00:18:22 verbose #16563 > "euler-cromer", time_ke_ec_x, time_ke_ec_y -00:18:22 verbose #16564 > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y -00:18:22 verbose #16565 > ]] -00:18:22 verbose #16566 > -00:18:22 verbose #16567 > ╭─[ 2.08s - return value ]─────────────────────────────────────────────────────╮ -00:18:22 verbose #16568 > │ <svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #16569 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #16570 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #16571 > │ stroke="none"/> │ -00:18:22 verbose #16572 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #16573 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #16574 > │ fill="#FFFFFF"> │ -00:18:22 verbose #16575 > │ system kinetic energy versus time │ -00:18:22 verbose #16576 > │ </text> │ -00:18:22 verbose #16577 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ -00:18:22 verbose #16578 > │ y2="75"/> │ -00:18:22 verbose #16579 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #16580 > │ y2="75"/> │ -00:18:22 verbose #16581 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ -00:18:22 verbose #16582 > │ y2="75"/> │ -00:18:22 verbose #16583 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ -00:18:22 verbose #16584 > │ y2="75"/> │ -00:18:22 verbose #16585 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ -00:18:22 verbose #16586 > │ y2="75"/> │ -00:18:22 verbose #16587 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ -00:18:22 verbose #16588 > │ x2="109" y2="75"/> │ -00:18:22 verbose #16589 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ -00:18:22 verbose #16590 > │ x2="119" y2="75"/> │ -00:18:22 verbose #16591 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ -00:18:22 verbose #16592 > │ x2="129" y2="75"/> │ -00:18:22 verbose #16593 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ -00:18:22 verbose #16594 > │ x2="139" y2="75"/> │ -00:18:22 verbose #16595 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ -00:18:22 verbose #16596 > │ x2="149" y2="75"/> │ -00:18:22 verbose #16597 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ -00:18:22 verbose #16598 > │ x2="159" y2="75"/> │ -00:18:22 verbose #16599 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ -00:18:22 verbose #16600 > │ x2="169" y2="75"/> │ -00:18:22 verbose #16601 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ -00:18:22 verbose #16602 > │ x2="179" y2="75"/> │ -00:18:22 verbose #16603 > │ <... │ -00:18:22 verbose #16604 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #16605 > -00:18:22 verbose #16606 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #16607 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #16608 > │ ### wave 2 │ -00:18:22 verbose #16609 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #16610 > -00:18:22 verbose #16611 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:22 verbose #16612 > //// test -00:18:22 verbose #16613 > -00:18:22 verbose #16614 > inl linear_spring k re (particle_state st1) (particle_state st2) = -00:18:22 verbose #16615 > inl r1 = st1.pos_vec -00:18:22 verbose #16616 > inl r2 = st2.pos_vec -00:18:22 verbose #16617 > inl r21 = r2 ^-^ r1 -00:18:22 verbose #16618 > inl r21mag = magnitude r21 -00:18:22 verbose #16619 > -k * (r21mag - re) *^ r21 ^/ r21mag -00:18:22 verbose #16620 > -00:18:22 verbose #16621 > inl fixed_linear_spring k re r1 = -00:18:22 verbose #16622 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #16623 > linear_spring k re (particle_state { default_particle_state' with pos_vec = -00:18:22 verbose #16624 > r1 }) -00:18:22 verbose #16625 > -00:18:22 verbose #16626 > inl forces_string () = -00:18:22 verbose #16627 > [[ -00:18:22 verbose #16628 > ExternalForce (0i32, fixed_linear_spring 5384 0 (zero_vec ())) -00:18:22 verbose #16629 > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ())) -00:18:22 verbose #16630 > ]] ++ ( -00:18:22 verbose #16631 > listm'.init_series 0 59 1 -00:18:22 verbose #16632 > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0)) -00:18:22 verbose #16633 > ) -00:18:22 verbose #16634 > -00:18:22 verbose #16635 > inl string_update dt = -00:18:22 verbose #16636 > update_mps (join runge_kutta_4 dt) (join forces_string ()) -00:18:22 verbose #16637 > -00:18:22 verbose #16638 > inl string_initial_overtone n = -00:18:22 verbose #16639 > inl ball_mass = 0.0008293 * 0.65 / 64 -00:18:22 verbose #16640 > inl (particle_state default_particle_state') = default_particle_state () -00:18:22 verbose #16641 > listm'.init_series 0.01 0.64 0.01 -00:18:22 verbose #16642 > |> listm.map (fun x => -00:18:22 verbose #16643 > inl y = 0.005 * sin (conv n * pi * x / 0.65) -00:18:22 verbose #16644 > particle_state { -00:18:22 verbose #16645 > default_particle_state' with -00:18:22 verbose #16646 > mass = ball_mass -00:18:22 verbose #16647 > pos_vec = x *^ i_hat () ^+^ y *^ j_hat () -00:18:22 verbose #16648 > velocity = zero_vec () -00:18:22 verbose #16649 > } -00:18:22 verbose #16650 > ) -00:18:22 verbose #16651 > |> stream.from_list -00:18:22 verbose #16652 > |> multi_particle_state -00:18:22 verbose #16653 > -00:18:22 verbose #16654 > let main () = -00:18:22 verbose #16655 > inl ~frames = listm'.init_series 0 65 1f64 |> stream.from_list -00:18:22 verbose #16656 > inl ~initial_state = string_initial_overtone 3i32 -00:18:22 verbose #16657 > inl frames = -00:18:22 verbose #16658 > frames -00:18:22 verbose #16659 > |> stream.map (fun n => -00:18:22 verbose #16660 > inl (multi_particle_state sts) = -00:18:22 verbose #16661 > stream.iterate (string_update 0.000025) initial_state |> -00:18:22 verbose #16662 > stream.item n -00:18:22 verbose #16663 > inl x, y = -00:18:22 verbose #16664 > [[ zero_vec () ]] -00:18:22 verbose #16665 > ++ (sts |> stream.map (fun (particle_state st) => st.pos_vec) |> -00:18:22 verbose #16666 > stream.to_list) -00:18:22 verbose #16667 > ++ [[ 0.65 *^ i_hat () ]] -00:18:22 verbose #16668 > |> listm.map (fun r => r.x, r.y) -00:18:22 verbose #16669 > |> stream.from_list -00:18:22 verbose #16670 > |> stream.unzip -00:18:22 verbose #16671 > inl x : a i32 _ = x |> stream.to_list |> listm.toArray -00:18:22 verbose #16672 > inl y : a i32 _ = y |> stream.to_list |> listm.toArray -00:18:22 verbose #16673 > x, y -00:18:22 verbose #16674 > ) -00:18:22 verbose #16675 > -00:18:22 verbose #16676 > inl plots = -00:18:22 verbose #16677 > frames -00:18:22 verbose #16678 > |> stream.indexed -00:18:22 verbose #16679 > |> stream.map (fun ((n : i32), (x, y)) => -00:18:22 verbose #16680 > "wave", -00:18:22 verbose #16681 > "position (m)", -00:18:22 verbose #16682 > "displacement (m)", -00:18:22 verbose #16683 > ;[[ -00:18:22 verbose #16684 > ($"$\"{!n}\"" : string), x, y -00:18:22 verbose #16685 > ]] -00:18:22 verbose #16686 > ) -00:18:22 verbose #16687 > -00:18:22 verbose #16688 > plots |> stream.to_list |> listm.toArray : a i32 _ -00:18:22 verbose #16689 > -00:18:22 verbose #16690 > ╭─[ 7.12s - return value ]─────────────────────────────────────────────────────╮ -00:18:22 verbose #16691 > │ <table><thead><tr><th><i>index</i></th><th>value</th></tr></thead><tbody><tr │ -00:18:22 verbose #16692 > │ ><td>0</td><td><svg width="640" height="480" viewBox="0 0 640 480" │ -00:18:22 verbose #16693 > │ xmlns="http://www.w3.org/2000/svg"> │ -00:18:22 verbose #16694 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ -00:18:22 verbose #16695 > │ stroke="none"/> │ -00:18:22 verbose #16696 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ -00:18:22 verbose #16697 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ -00:18:22 verbose #16698 > │ fill="#FFFFFF"> │ -00:18:22 verbose #16699 > │ wave │ -00:18:22 verbose #16700 > │ </text> │ -00:18:22 verbose #16701 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │ -00:18:22 verbose #16702 > │ y2="75"/> │ -00:18:22 verbose #16703 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ -00:18:22 verbose #16704 > │ y2="75"/> │ -00:18:22 verbose #16705 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │ -00:18:22 verbose #16706 > │ y2="75"/> │ -00:18:22 verbose #16707 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │ -00:18:22 verbose #16708 > │ y2="75"/> │ -00:18:22 verbose #16709 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │ -00:18:22 verbose #16710 > │ y2="75"/> │ -00:18:22 verbose #16711 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="100" y1="424" │ -00:18:22 verbose #16712 > │ x2="100" y2="75"/> │ -00:18:22 verbose #16713 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="108" y1="424" │ -00:18:22 verbose #16714 > │ x2="108" y2="75"/> │ -00:18:22 verbose #16715 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="116" y1="424" │ -00:18:22 verbose #16716 > │ x2="116" y2="75"/> │ -00:18:22 verbose #16717 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="123" y1="424" │ -00:18:22 verbose #16718 > │ x2="123" y2="75"/> │ -00:18:22 verbose #16719 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="131" y1="424" │ -00:18:22 verbose #16720 > │ x2="131" y2="75"/> │ -00:18:22 verbose #16721 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ -00:18:22 verbose #16722 > │ x2="139" y2="75"/> │ -00:18:22 verbose #16723 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="146" y1="424" │ -00:18:22 verbose #16724 > │ x2="146" y2="75"/> │ -00:18:22 verbose #16725 > │ <line opacity="1" stroke="#3... │ -00:18:22 verbose #16726 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #16727 > -00:18:22 verbose #16728 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:22 verbose #16729 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:22 verbose #16730 > │ ## end │ -00:18:22 verbose #16731 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:22 verbose #16732 > 00:00:36 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 138739 -00:18:22 verbose #16733 > 00:00:36 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:18:29 verbose #16734 > 00:00:43 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/physics.dib.ipynb to html\e[0m -00:18:29 verbose #16735 > 00:00:43 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:18:29 verbose #16736 > 00:00:43 verbose #7 \e[4;7m validate(nb)\e[0m -00:18:29 verbose #16737 > 00:00:43 verbose #8 \e[4;7m[NbConvertApp] Writing 2510796 bytes to c:\home\git\polyglot\lib\spiral\physics.dib.html\e[0m -00:18:29 verbose #16738 > 00:00:43 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 606 -00:18:29 verbose #16739 > 00:00:43 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 606 -00:18:29 verbose #16740 > 00:00:43 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/physics.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/physics.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:18:30 verbose #16741 > 00:00:44 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:18:30 verbose #16742 > 00:00:44 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:18:30 verbose #16743 > 00:00:45 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 139404 -00:18:30 debug #16744 execute_with_options_async / exit_code: 0 / output.Length: 141724 -00:18:30 debug #24 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path physics.dib --retries 3 -00:18:30 debug #16745 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path benchmark.dib --retries 3", +00:07:52 verbose #15097 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "benchmark.dib", "--retries", "3"]) +00:07:52 verbose #15098 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/benchmark.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/benchmark.dib" --output-path "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:07:54 verbose #15099 > > +00:07:54 verbose #15100 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:54 verbose #15101 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:54 verbose #15102 > > │ ## benchmark (Polyglot) │ +00:07:54 verbose #15103 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:54 verbose #15104 > > +00:07:54 verbose #15105 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:54 verbose #15106 > > //// test +00:07:54 verbose #15107 > > +00:07:54 verbose #15108 > > open testing +00:07:54 verbose #15109 > > +00:07:54 verbose #15110 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:07:54 verbose #15111 > > #r +00:07:54 verbose #15112 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:54 verbose #15113 > > otNet.Interactive.Spiral.dll" +00:07:54 verbose #15114 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:07:54 verbose #15115 > > #r +00:07:54 verbose #15116 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:07:54 verbose #15117 > > otNet.Interactive.dll" +00:07:54 verbose #15118 > > open type Microsoft.DotNet.Interactive.Kernel +00:07:58 verbose #15119 > > +00:07:58 verbose #15120 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:58 verbose #15121 > > inl gc_collect () = +00:07:58 verbose #15122 > > run_target function +00:07:58 verbose #15123 > > | Fsharp _ => fun () => $"System.GC.Collect ()" +00:07:58 verbose #15124 > > | _ => fun () => () +00:07:58 verbose #15125 > > +00:07:58 verbose #15126 > > inl printfn x = +00:07:58 verbose #15127 > > console.write_line x +00:07:58 verbose #15128 > > +00:07:58 verbose #15129 > > nominal stopwatch = $"System.Diagnostics.Stopwatch" +00:07:58 verbose #15130 > > +00:07:58 verbose #15131 > > inl stopwatch () : stopwatch = +00:07:58 verbose #15132 > > $"`stopwatch" () +00:07:58 verbose #15133 > > +00:07:58 verbose #15134 > > inl stopwatch_elapsed_milliseconds (stopwatch : stopwatch) : i64 = +00:07:58 verbose #15135 > > $"!stopwatch.ElapsedMilliseconds" +00:07:58 verbose #15136 > > +00:07:58 verbose #15137 > > inl stopwatch_start (stopwatch : stopwatch) : () = +00:07:58 verbose #15138 > > $"!stopwatch.Start ()" +00:07:58 verbose #15139 > > +00:07:58 verbose #15140 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:58 verbose #15141 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:58 verbose #15142 > > │ ## test_case_result │ +00:07:58 verbose #15143 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:58 verbose #15144 > > +00:07:58 verbose #15145 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:58 verbose #15146 > > type test_case_result = +00:07:58 verbose #15147 > > { +00:07:58 verbose #15148 > > Input : string +00:07:58 verbose #15149 > > Expected : string +00:07:58 verbose #15150 > > Result : string +00:07:58 verbose #15151 > > TimeList : a u64 i64 +00:07:58 verbose #15152 > > } +00:07:58 verbose #15153 > > +00:07:58 verbose #15154 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:58 verbose #15155 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:58 verbose #15156 > > │ ## run │ +00:07:58 verbose #15157 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:58 verbose #15158 > > +00:07:58 verbose #15159 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:58 verbose #15160 > > inl run forall input expected. +00:07:58 verbose #15161 > > count +00:07:58 verbose #15162 > > (solutions : list (string * (input -> expected))) +00:07:58 verbose #15163 > > ((input, expected) : (input * expected)) +00:07:58 verbose #15164 > > : test_case_result +00:07:58 verbose #15165 > > = +00:07:58 verbose #15166 > > inl input_str = input |> sm'.format_debug +00:07:58 verbose #15167 > > +00:07:58 verbose #15168 > > printfn "" +00:07:58 verbose #15169 > > printfn ($"$\"Solution: {!input_str} \"" : string) +00:07:58 verbose #15170 > > +00:07:58 verbose #15171 > > inl performance_invoke (fn : () -> expected) = +00:07:58 verbose #15172 > > gc_collect () +00:07:58 verbose #15173 > > inl stopwatch = stopwatch () +00:07:58 verbose #15174 > > stopwatch |> stopwatch_start +00:07:58 verbose #15175 > > inl time1 = stopwatch |> stopwatch_elapsed_milliseconds +00:07:58 verbose #15176 > > inl result : expected = +00:07:58 verbose #15177 > > am'.init_series 0 count 1i32 +00:07:58 verbose #15178 > > |> am'.parallel_map fun _n => fn () +00:07:58 verbose #15179 > > |> am'.last +00:07:58 verbose #15180 > > inl time2 = (stopwatch |> stopwatch_elapsed_milliseconds) - time1 +00:07:58 verbose #15181 > > result, time2 +00:07:58 verbose #15182 > > +00:07:58 verbose #15183 > > inl results_with_time : a u64 _ = +00:07:58 verbose #15184 > > solutions +00:07:58 verbose #15185 > > |> listm'.indexed +00:07:58 verbose #15186 > > |> listm.toArray +00:07:58 verbose #15187 > > |> am.map fun ((i : i32), (test_name, solution)) => +00:07:58 verbose #15188 > > inl result, time = performance_invoke fun () => solution input +00:07:58 verbose #15189 > > printfn ($"$\"Test case {!i + 1}. {!test_name}. Time: {!time} \"" : +00:07:58 verbose #15190 > > string) +00:07:58 verbose #15191 > > result, time +00:07:58 verbose #15192 > > +00:07:58 verbose #15193 > > match results_with_time |> am.map fst with +00:07:58 verbose #15194 > > | array when length array <= 1 => () +00:07:58 verbose #15195 > > | array when array |> am.forall' ((=) (index array 0)) => () +00:07:58 verbose #15196 > > | results => failwith ($"$\"Challenge error: {!results}\"" : string) +00:07:58 verbose #15197 > > +00:07:58 verbose #15198 > > { +00:07:58 verbose #15199 > > Input = input_str +00:07:58 verbose #15200 > > Expected = expected |> sm'.format_debug +00:07:58 verbose #15201 > > Result = results_with_time |> am.map fst |> fun array => index array 0 +00:07:58 verbose #15202 > > |> sm'.format_debug +00:07:58 verbose #15203 > > TimeList = results_with_time |> am.map snd +00:07:58 verbose #15204 > > } +00:07:58 verbose #15205 > > +00:07:58 verbose #15206 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:58 verbose #15207 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:58 verbose #15208 > > │ ## run_all │ +00:07:58 verbose #15209 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:58 verbose #15210 > > +00:07:58 verbose #15211 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:58 verbose #15212 > > inl run_all forall input expected. +00:07:58 verbose #15213 > > test_name +00:07:58 verbose #15214 > > count +00:07:58 verbose #15215 > > (solutions : list (string * (input -> expected))) +00:07:58 verbose #15216 > > test_cases +00:07:58 verbose #15217 > > = +00:07:58 verbose #15218 > > printfn "" +00:07:58 verbose #15219 > > printfn "" +00:07:58 verbose #15220 > > printfn ($"$\"Test: {!test_name}\"" : string) +00:07:58 verbose #15221 > > test_cases +00:07:58 verbose #15222 > > |> listm.toArray +00:07:58 verbose #15223 > > |> am.map (run count solutions) +00:07:58 verbose #15224 > > +00:07:58 verbose #15225 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:58 verbose #15226 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:58 verbose #15227 > > │ ## sort_result_list │ +00:07:58 verbose #15228 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:58 verbose #15229 > > +00:07:58 verbose #15230 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:58 verbose #15231 > > inl sort_result_list results = +00:07:58 verbose #15232 > > inl table = +00:07:58 verbose #15233 > > inl rows = +00:07:58 verbose #15234 > > results +00:07:58 verbose #15235 > > |> am.map fun (result : test_case_result) => +00:07:58 verbose #15236 > > inl best = +00:07:58 verbose #15237 > > result.TimeList +00:07:58 verbose #15238 > > |> am'.indexed +00:07:58 verbose #15239 > > |> am.map fun (i, time) => +00:07:58 verbose #15240 > > i + 1i64, time +00:07:58 verbose #15241 > > |> am'.sort_by snd +00:07:58 verbose #15242 > > |> fun array => index array 0i32 +00:07:58 verbose #15243 > > |> sm'.format_debug +00:07:58 verbose #15244 > > inl row = +00:07:58 verbose #15245 > > [[ +00:07:58 verbose #15246 > > result.Input +00:07:58 verbose #15247 > > result.Expected +00:07:58 verbose #15248 > > result.Result +00:07:58 verbose #15249 > > best +00:07:58 verbose #15250 > > ]] +00:07:58 verbose #15251 > > inl color : option console.console_color = +00:07:58 verbose #15252 > > open console +00:07:58 verbose #15253 > > match result.Expected = result.Result with +00:07:58 verbose #15254 > > | true => Some $"`console_color.DarkGreen" +00:07:58 verbose #15255 > > | false => Some $"`console_color.DarkRed" +00:07:58 verbose #15256 > > row, color +00:07:58 verbose #15257 > > +00:07:58 verbose #15258 > > inl header = +00:07:58 verbose #15259 > > [[ +00:07:58 verbose #15260 > > [[ +00:07:58 verbose #15261 > > "Input" +00:07:58 verbose #15262 > > "Expected" +00:07:58 verbose #15263 > > "Result" +00:07:58 verbose #15264 > > "Best" +00:07:58 verbose #15265 > > ]] +00:07:58 verbose #15266 > > [[ +00:07:58 verbose #15267 > > "---" +00:07:58 verbose #15268 > > "---" +00:07:58 verbose #15269 > > "---" +00:07:58 verbose #15270 > > "---" +00:07:58 verbose #15271 > > ]] +00:07:58 verbose #15272 > > ]] +00:07:58 verbose #15273 > > |> listm.map fun row => row, None +00:07:58 verbose #15274 > > |> listm.toArray +00:07:58 verbose #15275 > > rows |> am.append header +00:07:58 verbose #15276 > > +00:07:58 verbose #15277 > > inl formattedTable = +00:07:58 verbose #15278 > > inl lengthMap : mapm.map i32 i64 = +00:07:58 verbose #15279 > > table +00:07:58 verbose #15280 > > |> am.map (fst >> listm.toArray) +00:07:58 verbose #15281 > > |> am'.transpose +00:07:58 verbose #15282 > > |> am.map fun column => +00:07:58 verbose #15283 > > column +00:07:58 verbose #15284 > > |> am.map sm.length +00:07:58 verbose #15285 > > |> am'.sort_descending +00:07:58 verbose #15286 > > |> am'.try_item 0i32 +00:07:58 verbose #15287 > > |> optionm'.default_value 0i64 +00:07:58 verbose #15288 > > |> am'.indexed +00:07:58 verbose #15289 > > |> fun (x : a i32 _) => x +00:07:58 verbose #15290 > > |> mapm.of_array +00:07:58 verbose #15291 > > table +00:07:58 verbose #15292 > > |> am.map fun (row, color) => +00:07:58 verbose #15293 > > inl newRow = +00:07:58 verbose #15294 > > row +00:07:58 verbose #15295 > > |> listm'.indexed +00:07:58 verbose #15296 > > |> listm.map fun (i, cell) => +00:07:58 verbose #15297 > > cell |> sm'.pad_right (lengthMap |> mapm.item i |> conv) ' ' +00:07:58 verbose #15298 > > |> listm.toArray +00:07:58 verbose #15299 > > newRow, color +00:07:58 verbose #15300 > > +00:07:58 verbose #15301 > > printfn "" +00:07:58 verbose #15302 > > formattedTable +00:07:58 verbose #15303 > > |> am.iter fun ((row : a i32 string), color) => +00:07:58 verbose #15304 > > match color with +00:07:58 verbose #15305 > > | Some color => color |> console.set_foreground_color +00:07:58 verbose #15306 > > | None => console.reset_color () +00:07:58 verbose #15307 > > +00:07:58 verbose #15308 > > printfn (row |> sm'.join' "\t| ") +00:07:58 verbose #15309 > > +00:07:58 verbose #15310 > > console.reset_color () +00:07:58 verbose #15311 > > +00:07:58 verbose #15312 > > inl averages : a u64 _ = +00:07:58 verbose #15313 > > results +00:07:58 verbose #15314 > > |> am.map fun result => +00:07:58 verbose #15315 > > result.TimeList +00:07:58 verbose #15316 > > |> am.map ($"float" : i64 -> f64) +00:07:58 verbose #15317 > > |> am'.transpose +00:07:58 verbose #15318 > > |> am.map am'.average +00:07:58 verbose #15319 > > |> am.map ($"int64" : f64 -> i64) +00:07:58 verbose #15320 > > |> am'.indexed +00:07:58 verbose #15321 > > +00:07:58 verbose #15322 > > printfn "" +00:07:58 verbose #15323 > > printfn "Average Ranking " +00:07:58 verbose #15324 > > averages +00:07:58 verbose #15325 > > |> am'.sort_by snd +00:07:58 verbose #15326 > > |> am.iter fun ((i : i32), avg) => +00:07:58 verbose #15327 > > printfn ($"$\"Test case %d{!i + 1}. Average Time: %A{!avg} \"" : +00:07:58 verbose #15328 > > string) +00:07:58 verbose #15329 > > +00:07:58 verbose #15330 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:58 verbose #15331 > > //// test +00:07:58 verbose #15332 > > +00:07:58 verbose #15333 > > inl is_fast () = +00:07:58 verbose #15334 > > false +00:07:58 verbose #15335 > > +00:07:58 verbose #15336 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:58 verbose #15337 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:58 verbose #15338 > > │ ## empty2Tests │ +00:07:58 verbose #15339 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:58 verbose #15340 > > +00:07:58 verbose #15341 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:07:58 verbose #15342 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:07:58 verbose #15343 > > │ Test: Empty2 │ +00:07:58 verbose #15344 > > │ │ +00:07:58 verbose #15345 > > │ Solution: (a, a) │ +00:07:58 verbose #15346 > > │ Test case 1. A. Time: 59L │ +00:07:58 verbose #15347 > > │ │ +00:07:58 verbose #15348 > > │ Solution: (a, a) │ +00:07:58 verbose #15349 > > │ Test case 1. A. Time: 53L │ +00:07:58 verbose #15350 > > │ │ +00:07:58 verbose #15351 > > │ Input | Expected | Result | Best │ +00:07:58 verbose #15352 > > │ --- | --- | --- | --- │ +00:07:58 verbose #15353 > > │ (a, a) | a | a | (1, 59) │ +00:07:58 verbose #15354 > > │ (a, a) | a | a | (1, 53) │ +00:07:58 verbose #15355 > > │ │ +00:07:58 verbose #15356 > > │ Averages │ +00:07:58 verbose #15357 > > │ Test case 1. Average Time: 56L │ +00:07:58 verbose #15358 > > │ │ +00:07:58 verbose #15359 > > │ Ranking │ +00:07:58 verbose #15360 > > │ Test case 1. Average Time: 56L │ +00:07:58 verbose #15361 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:07:58 verbose #15362 > > +00:07:58 verbose #15363 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:07:58 verbose #15364 > > //// test +00:07:58 verbose #15365 > > +00:07:58 verbose #15366 > > inl get_solutions () = +00:07:58 verbose #15367 > > [[ +00:07:58 verbose #15368 > > "A", +00:07:58 verbose #15369 > > fun (a, _b) => +00:07:58 verbose #15370 > > a +00:07:58 verbose #15371 > > +00:07:58 verbose #15372 > > "B", +00:07:58 verbose #15373 > > fun (_a, b) => +00:07:58 verbose #15374 > > b +00:07:58 verbose #15375 > > ]] +00:07:58 verbose #15376 > > +00:07:58 verbose #15377 > > inl rec empty_2_tests () = +00:07:58 verbose #15378 > > inl test_cases = [[ +00:07:58 verbose #15379 > > ("a", "a"), "a" +00:07:58 verbose #15380 > > ("b", "b"), "b" +00:07:58 verbose #15381 > > ]] +00:07:58 verbose #15382 > > +00:07:58 verbose #15383 > > inl solutions = get_solutions () +00:07:58 verbose #15384 > > +00:07:58 verbose #15385 > > // inl is_fast () = true +00:07:58 verbose #15386 > > +00:07:58 verbose #15387 > > inl count = +00:07:58 verbose #15388 > > if is_fast () +00:07:58 verbose #15389 > > then 1000i32 +00:07:58 verbose #15390 > > else 2000000i32 +00:07:58 verbose #15391 > > +00:07:58 verbose #15392 > > run_all (nameof empty_2_tests) count solutions test_cases +00:07:58 verbose #15393 > > |> sort_result_list +00:07:58 verbose #15394 > > +00:07:58 verbose #15395 > > empty_2_tests () +00:08:07 verbose #15396 > > +00:08:07 verbose #15397 > > ╭─[ 8.80s - stdout ]───────────────────────────────────────────────────────────╮ +00:08:07 verbose #15398 > > │ │ +00:08:07 verbose #15399 > > │ │ +00:08:07 verbose #15400 > > │ Test: v0 │ +00:08:07 verbose #15401 > > │ │ +00:08:07 verbose #15402 > > │ Solution: struct ("a", "a") │ +00:08:07 verbose #15403 > > │ Test case 1. A. Time: 93 │ +00:08:07 verbose #15404 > > │ Test case 2. B. Time: 78 │ +00:08:07 verbose #15405 > > │ │ +00:08:07 verbose #15406 > > │ Solution: struct ("b", "b") │ +00:08:07 verbose #15407 > > │ Test case 1. A. Time: 88 │ +00:08:07 verbose #15408 > > │ Test case 2. B. Time: 91 │ +00:08:07 verbose #15409 > > │ │ +00:08:07 verbose #15410 > > │ Input | Expected | Result | Best │ +00:08:07 verbose #15411 > > │ --- | --- | --- | --- │ +00:08:07 verbose #15412 > > │ struct ("a", "a") | "a" | "a" | struct (2L, 78L) │ +00:08:07 verbose #15413 > > │ struct ("b", "b") | "b" | "b" | struct (1L, 88L) │ +00:08:07 verbose #15414 > > │ │ +00:08:07 verbose #15415 > > │ Average Ranking │ +00:08:07 verbose #15416 > > │ Test case 2. Average Time: 84L │ +00:08:07 verbose #15417 > > │ Test case 1. Average Time: 90L │ +00:08:07 verbose #15418 > > │ │ +00:08:07 verbose #15419 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:07 verbose #15420 > > +00:08:07 verbose #15421 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:07 verbose #15422 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:07 verbose #15423 > > │ ## emptyTests │ +00:08:07 verbose #15424 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:07 verbose #15425 > > +00:08:07 verbose #15426 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:07 verbose #15427 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:07 verbose #15428 > > │ Test: Empty │ +00:08:07 verbose #15429 > > │ │ +00:08:07 verbose #15430 > > │ Solution: 0 │ +00:08:07 verbose #15431 > > │ Test case 1. A. Time: 61L │ +00:08:07 verbose #15432 > > │ │ +00:08:07 verbose #15433 > > │ Solution: 2 │ +00:08:07 verbose #15434 > > │ Test case 1. A. Time: 62L │ +00:08:07 verbose #15435 > > │ │ +00:08:07 verbose #15436 > > │ Solution: 5 │ +00:08:07 verbose #15437 > > │ Test case 1. A. Time: 70L │ +00:08:07 verbose #15438 > > │ │ +00:08:07 verbose #15439 > > │ Input | Expected | Result | Best │ +00:08:07 verbose #15440 > > │ --- | --- | --- | --- │ +00:08:07 verbose #15441 > > │ 0 | 0 | 0 | (1, 61) │ +00:08:07 verbose #15442 > > │ 2 | 2 | 2 | (1, 62) │ +00:08:07 verbose #15443 > > │ 5 | 5 | 5 | (1, 70) │ +00:08:07 verbose #15444 > > │ │ +00:08:07 verbose #15445 > > │ Averages │ +00:08:07 verbose #15446 > > │ Test case 1. Average Time: 64L │ +00:08:07 verbose #15447 > > │ │ +00:08:07 verbose #15448 > > │ Ranking │ +00:08:07 verbose #15449 > > │ Test case 1. Average Time: 64L │ +00:08:07 verbose #15450 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:07 verbose #15451 > > +00:08:07 verbose #15452 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:07 verbose #15453 > > //// test +00:08:07 verbose #15454 > > +00:08:07 verbose #15455 > > inl get_solutions () = +00:08:07 verbose #15456 > > [[ +00:08:07 verbose #15457 > > "A", +00:08:07 verbose #15458 > > fun n => +00:08:07 verbose #15459 > > n + 1f64 +00:08:07 verbose #15460 > > ]] +00:08:07 verbose #15461 > > +00:08:07 verbose #15462 > > inl rec empty_1_tests () = +00:08:07 verbose #15463 > > inl test_cases = [[ +00:08:07 verbose #15464 > > 0, 1 +00:08:07 verbose #15465 > > 2, 3 +00:08:07 verbose #15466 > > 5, 6 +00:08:07 verbose #15467 > > ]] +00:08:07 verbose #15468 > > +00:08:07 verbose #15469 > > inl solutions = get_solutions () +00:08:07 verbose #15470 > > +00:08:07 verbose #15471 > > // inl is_fast () = true +00:08:07 verbose #15472 > > +00:08:07 verbose #15473 > > inl count = +00:08:07 verbose #15474 > > if is_fast () +00:08:07 verbose #15475 > > then 1000i32 +00:08:07 verbose #15476 > > else 2000000i32 +00:08:07 verbose #15477 > > +00:08:07 verbose #15478 > > run_all (nameof empty_1_tests) count solutions test_cases +00:08:07 verbose #15479 > > |> sort_result_list +00:08:07 verbose #15480 > > +00:08:07 verbose #15481 > > empty_1_tests () +00:08:12 verbose #15482 > > +00:08:12 verbose #15483 > > ╭─[ 4.77s - stdout ]───────────────────────────────────────────────────────────╮ +00:08:12 verbose #15484 > > │ │ +00:08:12 verbose #15485 > > │ │ +00:08:12 verbose #15486 > > │ Test: v0 │ +00:08:12 verbose #15487 > > │ │ +00:08:12 verbose #15488 > > │ Solution: 0.0 │ +00:08:12 verbose #15489 > > │ Test case 1. A. Time: 27 │ +00:08:12 verbose #15490 > > │ │ +00:08:12 verbose #15491 > > │ Solution: 2.0 │ +00:08:12 verbose #15492 > > │ Test case 1. A. Time: 13 │ +00:08:12 verbose #15493 > > │ │ +00:08:12 verbose #15494 > > │ Solution: 5.0 │ +00:08:12 verbose #15495 > > │ Test case 1. A. Time: 12 │ +00:08:12 verbose #15496 > > │ │ +00:08:12 verbose #15497 > > │ Input | Expected | Result | Best │ +00:08:12 verbose #15498 > > │ --- | --- | --- | --- │ +00:08:12 verbose #15499 > > │ 0.0 | 1.0 | 1.0 | struct (1L, 27L) │ +00:08:12 verbose #15500 > > │ 2.0 | 3.0 | 3.0 | struct (1L, 13L) │ +00:08:12 verbose #15501 > > │ 5.0 | 6.0 | 6.0 | struct (1L, 12L) │ +00:08:12 verbose #15502 > > │ │ +00:08:12 verbose #15503 > > │ Average Ranking │ +00:08:12 verbose #15504 > > │ Test case 1. Average Time: 17L │ +00:08:12 verbose #15505 > > │ │ +00:08:12 verbose #15506 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:12 verbose #15507 > 00:00:20 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 17494 +00:08:12 verbose #15508 > 00:00:20 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:08:14 verbose #15509 > 00:00:22 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb to html +00:08:14 verbose #15510 > 00:00:22 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:08:14 verbose #15511 > 00:00:22 verbose #7 ! validate(nb) +00:08:15 verbose #15512 > 00:00:23 verbose #8 ! [NbConvertApp] Writing 310589 bytes to c:\home\git\polyglot\lib\spiral\benchmark.dib.html +00:08:15 verbose #15513 > 00:00:23 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 649 +00:08:15 verbose #15514 > 00:00:23 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 649 +00:08:15 verbose #15515 > 00:00:23 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/benchmark.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/benchmark.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:08:16 verbose #15516 > 00:00:24 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:08:16 verbose #15517 > 00:00:24 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:08:17 verbose #15518 > 00:00:24 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 18202 +00:08:17 debug #15519 execute_with_options_async / exit_code: 0 / output.Length: 21274 +00:08:17 debug #24 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path benchmark.dib --retries 3 +00:08:17 debug #15520 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path file_system.dib --retries 3", [||], None, None, true, None) -00:18:30 verbose #16746 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "benchmark.dib", "--retries", "3"]) -00:18:30 verbose #16747 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/benchmark.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/benchmark.dib" --output-path "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:18:52 verbose #16748 > -00:18:52 verbose #16749 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:52 verbose #16750 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:52 verbose #16751 > │ ## benchmark (Polyglot) │ -00:18:52 verbose #16752 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #16753 > -00:18:52 verbose #16754 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:52 verbose #16755 > //// test -00:18:52 verbose #16756 > -00:18:52 verbose #16757 > open testing -00:18:52 verbose #16758 > -00:18:52 verbose #16759 > ── spiral - import ───────────────────────────────────────────────────────────── -00:18:52 verbose #16760 > #r -00:18:52 verbose #16761 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:18:52 verbose #16762 > otNet.Interactive.Spiral.dll" -00:18:52 verbose #16763 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:18:52 verbose #16764 > #r -00:18:52 verbose #16765 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:18:52 verbose #16766 > otNet.Interactive.dll" -00:18:52 verbose #16767 > open type Microsoft.DotNet.Interactive.Kernel -00:18:52 verbose #16768 > -00:18:52 verbose #16769 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:52 verbose #16770 > inl gc_collect () = -00:18:52 verbose #16771 > run_target function -00:18:52 verbose #16772 > | Fsharp _ => fun () => $"System.GC.Collect ()" -00:18:52 verbose #16773 > | _ => fun () => () -00:18:52 verbose #16774 > -00:18:52 verbose #16775 > inl printfn x = -00:18:52 verbose #16776 > console.write_line x -00:18:52 verbose #16777 > -00:18:52 verbose #16778 > nominal stopwatch = $"System.Diagnostics.Stopwatch" -00:18:52 verbose #16779 > -00:18:52 verbose #16780 > inl stopwatch () : stopwatch = -00:18:52 verbose #16781 > $"`stopwatch" () -00:18:52 verbose #16782 > -00:18:52 verbose #16783 > inl stopwatch_elapsed_milliseconds (stopwatch : stopwatch) : i64 = -00:18:52 verbose #16784 > $"!stopwatch.ElapsedMilliseconds" -00:18:52 verbose #16785 > -00:18:52 verbose #16786 > inl stopwatch_start (stopwatch : stopwatch) : () = -00:18:52 verbose #16787 > $"!stopwatch.Start ()" -00:18:52 verbose #16788 > -00:18:52 verbose #16789 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:52 verbose #16790 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:52 verbose #16791 > │ ## test_case_result │ -00:18:52 verbose #16792 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #16793 > -00:18:52 verbose #16794 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:52 verbose #16795 > type test_case_result = -00:18:52 verbose #16796 > { -00:18:52 verbose #16797 > Input : string -00:18:52 verbose #16798 > Expected : string -00:18:52 verbose #16799 > Result : string -00:18:52 verbose #16800 > TimeList : a u64 i64 -00:18:52 verbose #16801 > } -00:18:52 verbose #16802 > -00:18:52 verbose #16803 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:52 verbose #16804 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:52 verbose #16805 > │ ## run │ -00:18:52 verbose #16806 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #16807 > -00:18:52 verbose #16808 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:52 verbose #16809 > inl run forall input expected. -00:18:52 verbose #16810 > count -00:18:52 verbose #16811 > (solutions : list (string * (input -> expected))) -00:18:52 verbose #16812 > ((input, expected) : (input * expected)) -00:18:52 verbose #16813 > : test_case_result -00:18:52 verbose #16814 > = -00:18:52 verbose #16815 > inl input_str = input |> sm'.format_debug -00:18:52 verbose #16816 > -00:18:52 verbose #16817 > printfn "" -00:18:52 verbose #16818 > printfn ($"$\"Solution: {!input_str} \"" : string) -00:18:52 verbose #16819 > -00:18:52 verbose #16820 > inl performance_invoke (fn : () -> expected) = -00:18:52 verbose #16821 > gc_collect () -00:18:52 verbose #16822 > inl stopwatch = stopwatch () -00:18:52 verbose #16823 > stopwatch |> stopwatch_start -00:18:52 verbose #16824 > inl time1 = stopwatch |> stopwatch_elapsed_milliseconds -00:18:52 verbose #16825 > inl result : expected = -00:18:52 verbose #16826 > am'.init_series 0 count 1i32 -00:18:52 verbose #16827 > |> am'.parallel_map fun _n => fn () -00:18:52 verbose #16828 > |> am'.last -00:18:52 verbose #16829 > inl time2 = (stopwatch |> stopwatch_elapsed_milliseconds) - time1 -00:18:52 verbose #16830 > result, time2 -00:18:52 verbose #16831 > -00:18:52 verbose #16832 > inl results_with_time : a u64 _ = -00:18:52 verbose #16833 > solutions -00:18:52 verbose #16834 > |> listm'.indexed -00:18:52 verbose #16835 > |> listm.toArray -00:18:52 verbose #16836 > |> am.map fun ((i : i32), (test_name, solution)) => -00:18:52 verbose #16837 > inl result, time = performance_invoke fun () => solution input -00:18:52 verbose #16838 > printfn ($"$\"Test case {!i + 1}. {!test_name}. Time: {!time} \"" : -00:18:52 verbose #16839 > string) -00:18:52 verbose #16840 > result, time -00:18:52 verbose #16841 > -00:18:52 verbose #16842 > match results_with_time |> am.map fst with -00:18:52 verbose #16843 > | array when length array <= 1 => () -00:18:52 verbose #16844 > | array when array |> am.forall' ((=) (index array 0)) => () -00:18:52 verbose #16845 > | results => failwith ($"$\"Challenge error: {!results}\"" : string) -00:18:52 verbose #16846 > -00:18:52 verbose #16847 > { -00:18:52 verbose #16848 > Input = input_str -00:18:52 verbose #16849 > Expected = expected |> sm'.format_debug -00:18:52 verbose #16850 > Result = results_with_time |> am.map fst |> fun array => index array 0 -00:18:52 verbose #16851 > |> sm'.format_debug -00:18:52 verbose #16852 > TimeList = results_with_time |> am.map snd -00:18:52 verbose #16853 > } -00:18:52 verbose #16854 > -00:18:52 verbose #16855 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:52 verbose #16856 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:52 verbose #16857 > │ ## run_all │ -00:18:52 verbose #16858 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #16859 > -00:18:52 verbose #16860 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:52 verbose #16861 > inl run_all forall input expected. -00:18:52 verbose #16862 > test_name -00:18:52 verbose #16863 > count -00:18:52 verbose #16864 > (solutions : list (string * (input -> expected))) -00:18:52 verbose #16865 > test_cases -00:18:52 verbose #16866 > = -00:18:52 verbose #16867 > printfn "" -00:18:52 verbose #16868 > printfn "" -00:18:52 verbose #16869 > printfn ($"$\"Test: {!test_name}\"" : string) -00:18:52 verbose #16870 > test_cases -00:18:52 verbose #16871 > |> listm.toArray -00:18:52 verbose #16872 > |> am.map (run count solutions) -00:18:52 verbose #16873 > -00:18:52 verbose #16874 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:52 verbose #16875 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:52 verbose #16876 > │ ## sort_result_list │ -00:18:52 verbose #16877 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #16878 > -00:18:52 verbose #16879 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:52 verbose #16880 > inl sort_result_list results = -00:18:52 verbose #16881 > inl table = -00:18:52 verbose #16882 > inl rows = -00:18:52 verbose #16883 > results -00:18:52 verbose #16884 > |> am.map fun (result : test_case_result) => -00:18:52 verbose #16885 > inl best = -00:18:52 verbose #16886 > result.TimeList -00:18:52 verbose #16887 > |> am'.indexed -00:18:52 verbose #16888 > |> am.map fun (i, time) => -00:18:52 verbose #16889 > i + 1i64, time -00:18:52 verbose #16890 > |> am'.sort_by snd -00:18:52 verbose #16891 > |> fun array => index array 0i32 -00:18:52 verbose #16892 > |> sm'.format_debug -00:18:52 verbose #16893 > inl row = -00:18:52 verbose #16894 > [[ -00:18:52 verbose #16895 > result.Input -00:18:52 verbose #16896 > result.Expected -00:18:52 verbose #16897 > result.Result -00:18:52 verbose #16898 > best -00:18:52 verbose #16899 > ]] -00:18:52 verbose #16900 > inl color : option console.console_color = -00:18:52 verbose #16901 > open console -00:18:52 verbose #16902 > match result.Expected = result.Result with -00:18:52 verbose #16903 > | true => Some $"`console_color.DarkGreen" -00:18:52 verbose #16904 > | false => Some $"`console_color.DarkRed" -00:18:52 verbose #16905 > row, color -00:18:52 verbose #16906 > -00:18:52 verbose #16907 > inl header = -00:18:52 verbose #16908 > [[ -00:18:52 verbose #16909 > [[ -00:18:52 verbose #16910 > "Input" -00:18:52 verbose #16911 > "Expected" -00:18:52 verbose #16912 > "Result" -00:18:52 verbose #16913 > "Best" -00:18:52 verbose #16914 > ]] -00:18:52 verbose #16915 > [[ -00:18:52 verbose #16916 > "---" -00:18:52 verbose #16917 > "---" -00:18:52 verbose #16918 > "---" -00:18:52 verbose #16919 > "---" -00:18:52 verbose #16920 > ]] -00:18:52 verbose #16921 > ]] -00:18:52 verbose #16922 > |> listm.map fun row => row, None -00:18:52 verbose #16923 > |> listm.toArray -00:18:52 verbose #16924 > rows |> am.append header -00:18:52 verbose #16925 > -00:18:52 verbose #16926 > inl formattedTable = -00:18:52 verbose #16927 > inl lengthMap : mapm.map i32 i64 = -00:18:52 verbose #16928 > table -00:18:52 verbose #16929 > |> am.map (fst >> listm.toArray) -00:18:52 verbose #16930 > |> am'.transpose -00:18:52 verbose #16931 > |> am.map fun column => -00:18:52 verbose #16932 > column -00:18:52 verbose #16933 > |> am.map sm.length -00:18:52 verbose #16934 > |> am'.sort_descending -00:18:52 verbose #16935 > |> am'.try_item 0i32 -00:18:52 verbose #16936 > |> optionm'.default_value 0i64 -00:18:52 verbose #16937 > |> am'.indexed -00:18:52 verbose #16938 > |> fun (x : a i32 _) => x -00:18:52 verbose #16939 > |> mapm.of_array -00:18:52 verbose #16940 > table -00:18:52 verbose #16941 > |> am.map fun (row, color) => -00:18:52 verbose #16942 > inl newRow = -00:18:52 verbose #16943 > row -00:18:52 verbose #16944 > |> listm'.indexed -00:18:52 verbose #16945 > |> listm.map fun (i, cell) => -00:18:52 verbose #16946 > cell |> sm'.pad_right (lengthMap |> mapm.item i |> conv) ' ' -00:18:52 verbose #16947 > |> listm.toArray -00:18:52 verbose #16948 > newRow, color -00:18:52 verbose #16949 > -00:18:52 verbose #16950 > printfn "" -00:18:52 verbose #16951 > formattedTable -00:18:52 verbose #16952 > |> am.iter fun ((row : a i32 string), color) => -00:18:52 verbose #16953 > match color with -00:18:52 verbose #16954 > | Some color => color |> console.set_foreground_color -00:18:52 verbose #16955 > | None => console.reset_color () -00:18:52 verbose #16956 > -00:18:52 verbose #16957 > printfn (row |> sm'.join' "\t| ") -00:18:52 verbose #16958 > -00:18:52 verbose #16959 > console.reset_color () -00:18:52 verbose #16960 > -00:18:52 verbose #16961 > inl averages : a u64 _ = -00:18:52 verbose #16962 > results -00:18:52 verbose #16963 > |> am.map fun result => -00:18:52 verbose #16964 > result.TimeList -00:18:52 verbose #16965 > |> am.map ($"float" : i64 -> f64) -00:18:52 verbose #16966 > |> am'.transpose -00:18:52 verbose #16967 > |> am.map am'.average -00:18:52 verbose #16968 > |> am.map ($"int64" : f64 -> i64) -00:18:52 verbose #16969 > |> am'.indexed -00:18:52 verbose #16970 > -00:18:52 verbose #16971 > printfn "" -00:18:52 verbose #16972 > printfn "Average Ranking " -00:18:52 verbose #16973 > averages -00:18:52 verbose #16974 > |> am'.sort_by snd -00:18:52 verbose #16975 > |> am.iter fun ((i : i32), avg) => -00:18:52 verbose #16976 > printfn ($"$\"Test case %d{!i + 1}. Average Time: %A{!avg} \"" : -00:18:52 verbose #16977 > string) -00:18:52 verbose #16978 > -00:18:52 verbose #16979 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:52 verbose #16980 > //// test -00:18:52 verbose #16981 > -00:18:52 verbose #16982 > inl is_fast () = -00:18:52 verbose #16983 > false -00:18:52 verbose #16984 > -00:18:52 verbose #16985 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:52 verbose #16986 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:52 verbose #16987 > │ ## empty2Tests │ -00:18:52 verbose #16988 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #16989 > -00:18:52 verbose #16990 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:52 verbose #16991 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:52 verbose #16992 > │ Test: Empty2 │ -00:18:52 verbose #16993 > │ │ -00:18:52 verbose #16994 > │ Solution: (a, a) │ -00:18:52 verbose #16995 > │ Test case 1. A. Time: 59L │ -00:18:52 verbose #16996 > │ │ -00:18:52 verbose #16997 > │ Solution: (a, a) │ -00:18:52 verbose #16998 > │ Test case 1. A. Time: 53L │ -00:18:52 verbose #16999 > │ │ -00:18:52 verbose #17000 > │ Input | Expected | Result | Best │ -00:18:52 verbose #17001 > │ --- | --- | --- | --- │ -00:18:52 verbose #17002 > │ (a, a) | a | a | (1, 59) │ -00:18:52 verbose #17003 > │ (a, a) | a | a | (1, 53) │ -00:18:52 verbose #17004 > │ │ -00:18:52 verbose #17005 > │ Averages │ -00:18:52 verbose #17006 > │ Test case 1. Average Time: 56L │ -00:18:52 verbose #17007 > │ │ -00:18:52 verbose #17008 > │ Ranking │ -00:18:52 verbose #17009 > │ Test case 1. Average Time: 56L │ -00:18:52 verbose #17010 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #17011 > -00:18:52 verbose #17012 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:52 verbose #17013 > //// test -00:18:52 verbose #17014 > -00:18:52 verbose #17015 > inl get_solutions () = -00:18:52 verbose #17016 > [[ -00:18:52 verbose #17017 > "A", -00:18:52 verbose #17018 > fun (a, _b) => -00:18:52 verbose #17019 > a -00:18:52 verbose #17020 > -00:18:52 verbose #17021 > "B", -00:18:52 verbose #17022 > fun (_a, b) => -00:18:52 verbose #17023 > b -00:18:52 verbose #17024 > ]] -00:18:52 verbose #17025 > -00:18:52 verbose #17026 > inl rec empty_2_tests () = -00:18:52 verbose #17027 > inl test_cases = [[ -00:18:52 verbose #17028 > ("a", "a"), "a" -00:18:52 verbose #17029 > ("b", "b"), "b" -00:18:52 verbose #17030 > ]] -00:18:52 verbose #17031 > -00:18:52 verbose #17032 > inl solutions = get_solutions () -00:18:52 verbose #17033 > -00:18:52 verbose #17034 > // inl is_fast () = true -00:18:52 verbose #17035 > -00:18:52 verbose #17036 > inl count = -00:18:52 verbose #17037 > if is_fast () -00:18:52 verbose #17038 > then 1000i32 -00:18:52 verbose #17039 > else 2000000i32 -00:18:52 verbose #17040 > -00:18:52 verbose #17041 > run_all (nameof empty_2_tests) count solutions test_cases -00:18:52 verbose #17042 > |> sort_result_list -00:18:52 verbose #17043 > -00:18:52 verbose #17044 > empty_2_tests () -00:18:52 verbose #17045 > -00:18:52 verbose #17046 > ╭─[ 9.19s - stdout ]───────────────────────────────────────────────────────────╮ -00:18:52 verbose #17047 > │ │ -00:18:52 verbose #17048 > │ │ -00:18:52 verbose #17049 > │ Test: v0 │ -00:18:52 verbose #17050 > │ │ -00:18:52 verbose #17051 > │ Solution: struct ("a", "a") │ -00:18:52 verbose #17052 > │ Test case 1. A. Time: 99 │ -00:18:52 verbose #17053 > │ Test case 2. B. Time: 89 │ -00:18:52 verbose #17054 > │ │ -00:18:52 verbose #17055 > │ Solution: struct ("b", "b") │ -00:18:52 verbose #17056 > │ Test case 1. A. Time: 98 │ -00:18:52 verbose #17057 > │ Test case 2. B. Time: 102 │ -00:18:52 verbose #17058 > │ │ -00:18:52 verbose #17059 > │ Input | Expected | Result | Best │ -00:18:52 verbose #17060 > │ --- | --- | --- | --- │ -00:18:52 verbose #17061 > │ struct ("a", "a") | "a" | "a" | struct (2L, 89L) │ -00:18:52 verbose #17062 > │ struct ("b", "b") | "b" | "b" | struct (1L, 98L) │ -00:18:52 verbose #17063 > │ │ -00:18:52 verbose #17064 > │ Average Ranking │ -00:18:52 verbose #17065 > │ Test case 2. Average Time: 95L │ -00:18:52 verbose #17066 > │ Test case 1. Average Time: 98L │ -00:18:52 verbose #17067 > │ │ -00:18:52 verbose #17068 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #17069 > -00:18:52 verbose #17070 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:52 verbose #17071 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:52 verbose #17072 > │ ## emptyTests │ -00:18:52 verbose #17073 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #17074 > -00:18:52 verbose #17075 > ── markdown ──────────────────────────────────────────────────────────────────── -00:18:52 verbose #17076 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:18:52 verbose #17077 > │ Test: Empty │ -00:18:52 verbose #17078 > │ │ -00:18:52 verbose #17079 > │ Solution: 0 │ -00:18:52 verbose #17080 > │ Test case 1. A. Time: 61L │ -00:18:52 verbose #17081 > │ │ -00:18:52 verbose #17082 > │ Solution: 2 │ -00:18:52 verbose #17083 > │ Test case 1. A. Time: 62L │ -00:18:52 verbose #17084 > │ │ -00:18:52 verbose #17085 > │ Solution: 5 │ -00:18:52 verbose #17086 > │ Test case 1. A. Time: 70L │ -00:18:52 verbose #17087 > │ │ -00:18:52 verbose #17088 > │ Input | Expected | Result | Best │ -00:18:52 verbose #17089 > │ --- | --- | --- | --- │ -00:18:52 verbose #17090 > │ 0 | 0 | 0 | (1, 61) │ -00:18:52 verbose #17091 > │ 2 | 2 | 2 | (1, 62) │ -00:18:52 verbose #17092 > │ 5 | 5 | 5 | (1, 70) │ -00:18:52 verbose #17093 > │ │ -00:18:52 verbose #17094 > │ Averages │ -00:18:52 verbose #17095 > │ Test case 1. Average Time: 64L │ -00:18:52 verbose #17096 > │ │ -00:18:52 verbose #17097 > │ Ranking │ -00:18:52 verbose #17098 > │ Test case 1. Average Time: 64L │ -00:18:52 verbose #17099 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #17100 > -00:18:52 verbose #17101 > ── spiral ────────────────────────────────────────────────────────────────────── -00:18:52 verbose #17102 > //// test -00:18:52 verbose #17103 > -00:18:52 verbose #17104 > inl get_solutions () = -00:18:52 verbose #17105 > [[ -00:18:52 verbose #17106 > "A", -00:18:52 verbose #17107 > fun n => -00:18:52 verbose #17108 > n + 1f64 -00:18:52 verbose #17109 > ]] -00:18:52 verbose #17110 > -00:18:52 verbose #17111 > inl rec empty_1_tests () = -00:18:52 verbose #17112 > inl test_cases = [[ -00:18:52 verbose #17113 > 0, 1 -00:18:52 verbose #17114 > 2, 3 -00:18:52 verbose #17115 > 5, 6 -00:18:52 verbose #17116 > ]] -00:18:52 verbose #17117 > -00:18:52 verbose #17118 > inl solutions = get_solutions () -00:18:52 verbose #17119 > -00:18:52 verbose #17120 > // inl is_fast () = true -00:18:52 verbose #17121 > -00:18:52 verbose #17122 > inl count = -00:18:52 verbose #17123 > if is_fast () -00:18:52 verbose #17124 > then 1000i32 -00:18:52 verbose #17125 > else 2000000i32 -00:18:52 verbose #17126 > -00:18:52 verbose #17127 > run_all (nameof empty_1_tests) count solutions test_cases -00:18:52 verbose #17128 > |> sort_result_list -00:18:52 verbose #17129 > -00:18:52 verbose #17130 > empty_1_tests () -00:18:52 verbose #17131 > -00:18:52 verbose #17132 > ╭─[ 5.69s - stdout ]───────────────────────────────────────────────────────────╮ -00:18:52 verbose #17133 > │ │ -00:18:52 verbose #17134 > │ │ -00:18:52 verbose #17135 > │ Test: v0 │ -00:18:52 verbose #17136 > │ │ -00:18:52 verbose #17137 > │ Solution: 0.0 │ -00:18:52 verbose #17138 > │ Test case 1. A. Time: 26 │ -00:18:52 verbose #17139 > │ │ -00:18:52 verbose #17140 > │ Solution: 2.0 │ -00:18:52 verbose #17141 > │ Test case 1. A. Time: 11 │ -00:18:52 verbose #17142 > │ │ -00:18:52 verbose #17143 > │ Solution: 5.0 │ -00:18:52 verbose #17144 > │ Test case 1. A. Time: 14 │ -00:18:52 verbose #17145 > │ │ -00:18:52 verbose #17146 > │ Input | Expected | Result | Best │ -00:18:52 verbose #17147 > │ --- | --- | --- | --- │ -00:18:52 verbose #17148 > │ 0.0 | 1.0 | 1.0 | struct (1L, 26L) │ -00:18:52 verbose #17149 > │ 2.0 | 3.0 | 3.0 | struct (1L, 11L) │ -00:18:52 verbose #17150 > │ 5.0 | 6.0 | 6.0 | struct (1L, 14L) │ -00:18:52 verbose #17151 > │ │ -00:18:52 verbose #17152 > │ Average Ranking │ -00:18:52 verbose #17153 > │ Test case 1. Average Time: 17L │ -00:18:52 verbose #17154 > │ │ -00:18:52 verbose #17155 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:18:52 verbose #17156 > 00:00:21 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 17494 -00:18:52 verbose #17157 > 00:00:21 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:18:56 verbose #17158 > 00:00:25 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb to html\e[0m -00:18:56 verbose #17159 > 00:00:25 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:18:56 verbose #17160 > 00:00:25 verbose #7 \e[4;7m validate(nb)\e[0m -00:18:56 verbose #17161 > 00:00:25 verbose #8 \e[4;7m[NbConvertApp] Writing 310590 bytes to c:\home\git\polyglot\lib\spiral\benchmark.dib.html\e[0m -00:18:56 verbose #17162 > 00:00:25 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 609 -00:18:56 verbose #17163 > 00:00:25 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 609 -00:18:56 verbose #17164 > 00:00:25 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/benchmark.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/benchmark.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:18:57 verbose #17165 > 00:00:26 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:18:57 verbose #17166 > 00:00:26 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:18:57 verbose #17167 > 00:00:26 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 18162 -00:18:57 debug #17168 execute_with_options_async / exit_code: 0 / output.Length: 20498 -00:18:57 debug #25 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path benchmark.dib --retries 3 -00:18:57 debug #17169 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path networking.dib --retries 3", +00:08:17 verbose #15521 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "file_system.dib", "--retries", "3"]) +00:08:17 verbose #15522 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/file_system.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/file_system.dib" --output-path "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:08:18 verbose #15523 > > +00:08:18 verbose #15524 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:18 verbose #15525 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:18 verbose #15526 > > │ # file_system │ +00:08:18 verbose #15527 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:19 verbose #15528 > > +00:08:19 verbose #15529 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:19 verbose #15530 > > open sm'_operators +00:08:19 verbose #15531 > > open rust_operators +00:08:19 verbose #15532 > > +00:08:19 verbose #15533 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:08:19 verbose #15534 > > #r +00:08:19 verbose #15535 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:08:19 verbose #15536 > > otNet.Interactive.Spiral.dll" +00:08:19 verbose #15537 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:08:19 verbose #15538 > > #r +00:08:19 verbose #15539 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:08:19 verbose #15540 > > otNet.Interactive.dll" +00:08:19 verbose #15541 > > open type Microsoft.DotNet.Interactive.Kernel +00:08:22 verbose #15542 > > +00:08:22 verbose #15543 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:22 verbose #15544 > > //// test +00:08:22 verbose #15545 > > +00:08:22 verbose #15546 > > open testing +00:08:22 verbose #15547 > > +00:08:22 verbose #15548 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:22 verbose #15549 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:22 verbose #15550 > > │ ## types │ +00:08:22 verbose #15551 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:22 verbose #15552 > > +00:08:22 verbose #15553 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:22 verbose #15554 > > inl types () = +00:08:22 verbose #15555 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:08:22 verbose #15556 > > Fable.Core.Emit(\"std::fs::File\")>]]\n#endif\ntype std_fs_File = class end" +00:08:22 verbose #15557 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:08:22 verbose #15558 > > Fable.Core.Emit(\"std::fs::FileType\")>]]\n#endif\ntype std_fs_FileType = class +00:08:22 verbose #15559 > > end" +00:08:22 verbose #15560 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:08:22 verbose #15561 > > Fable.Core.Emit(\"std::path::Display\")>]]\n#endif\ntype std_path_Display = +00:08:22 verbose #15562 > > class end" +00:08:22 verbose #15563 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:08:22 verbose #15564 > > Fable.Core.Emit(\"std::path::Path\")>]]\n#endif\ntype std_path_Path = class end" +00:08:22 verbose #15565 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:08:22 verbose #15566 > > Fable.Core.Emit(\"std::path::PathBuf\")>]]\n#endif\ntype std_path_PathBuf = +00:08:22 verbose #15567 > > class end" +00:08:22 verbose #15568 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:08:22 verbose #15569 > > Fable.Core.Emit(\"async_walkdir::DirEntry\")>]]\n#endif\ntype +00:08:22 verbose #15570 > > async_walkdir_DirEntry = class end" +00:08:22 verbose #15571 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:08:22 verbose #15572 > > Fable.Core.Emit(\"async_walkdir::Filtering\")>]]\n#endif\ntype +00:08:22 verbose #15573 > > async_walkdir_Filtering = class end" +00:08:22 verbose #15574 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:08:22 verbose #15575 > > Fable.Core.Emit(\"async_walkdir::WalkDir\")>]]\n#endif\ntype +00:08:22 verbose #15576 > > async_walkdir_WalkDir = class end" +00:08:22 verbose #15577 > > +00:08:22 verbose #15578 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:22 verbose #15579 > > inl types () = +00:08:22 verbose #15580 > > types () +00:08:22 verbose #15581 > > date_time.types () +00:08:22 verbose #15582 > > env.types () +00:08:22 verbose #15583 > > rust.types () +00:08:22 verbose #15584 > > sm'.types () +00:08:22 verbose #15585 > > stream.types () +00:08:22 verbose #15586 > > +00:08:22 verbose #15587 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:22 verbose #15588 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:22 verbose #15589 > > │ ## file_mode │ +00:08:22 verbose #15590 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:22 verbose #15591 > > +00:08:22 verbose #15592 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:22 verbose #15593 > > nominal file_mode' = $'System.IO.FileMode' +00:08:22 verbose #15594 > > +00:08:22 verbose #15595 > > union file_mode = +00:08:22 verbose #15596 > > | ModeCreateNew +00:08:22 verbose #15597 > > | ModeCreate +00:08:22 verbose #15598 > > | ModeOpen +00:08:22 verbose #15599 > > | ModeOpenOrCreate +00:08:22 verbose #15600 > > | Truncate +00:08:22 verbose #15601 > > | Append +00:08:22 verbose #15602 > > +00:08:22 verbose #15603 > > inl file_mode = function +00:08:22 verbose #15604 > > | ModeCreateNew => $'System.IO.FileMode.CreateNew' : file_mode' +00:08:22 verbose #15605 > > | ModeCreate => $'System.IO.FileMode.Create' : file_mode' +00:08:22 verbose #15606 > > | ModeOpen => $'System.IO.FileMode.Open' : file_mode' +00:08:22 verbose #15607 > > | ModeOpenOrCreate => $'System.IO.FileMode.OpenOrCreate' : file_mode' +00:08:22 verbose #15608 > > | Truncate => $'System.IO.FileMode.Truncate' : file_mode' +00:08:22 verbose #15609 > > | Append => $'System.IO.FileMode.Append' : file_mode' +00:08:23 verbose #15610 > > +00:08:23 verbose #15611 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15612 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15613 > > │ ## file_access │ +00:08:23 verbose #15614 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15615 > > +00:08:23 verbose #15616 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15617 > > nominal file_access' = $'System.IO.FileAccess' +00:08:23 verbose #15618 > > +00:08:23 verbose #15619 > > union file_access = +00:08:23 verbose #15620 > > | AccessRead +00:08:23 verbose #15621 > > | AccessWrite +00:08:23 verbose #15622 > > | AccessReadWrite +00:08:23 verbose #15623 > > +00:08:23 verbose #15624 > > inl file_access = function +00:08:23 verbose #15625 > > | AccessRead => $'System.IO.FileAccess.Read' : file_access' +00:08:23 verbose #15626 > > | AccessWrite => $'System.IO.FileAccess.ReadWrite' : file_access' +00:08:23 verbose #15627 > > | AccessReadWrite => $'System.IO.FileAccess.ReadWrite' : file_access' +00:08:23 verbose #15628 > > +00:08:23 verbose #15629 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15630 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15631 > > │ ## file_share │ +00:08:23 verbose #15632 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15633 > > +00:08:23 verbose #15634 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15635 > > nominal file_share' = $'System.IO.FileShare' +00:08:23 verbose #15636 > > +00:08:23 verbose #15637 > > union file_share = +00:08:23 verbose #15638 > > | ShareNone +00:08:23 verbose #15639 > > | ShareRead +00:08:23 verbose #15640 > > | ShareWrite +00:08:23 verbose #15641 > > | ShareReadWrite +00:08:23 verbose #15642 > > | ShareDelete +00:08:23 verbose #15643 > > +00:08:23 verbose #15644 > > inl file_share = function +00:08:23 verbose #15645 > > | ShareNone => $'System.IO.FileShare.None' : file_share' +00:08:23 verbose #15646 > > | ShareRead => $'System.IO.FileShare.Read' : file_share' +00:08:23 verbose #15647 > > | ShareWrite => $'System.IO.FileShare.Write' : file_share' +00:08:23 verbose #15648 > > | ShareReadWrite => $'System.IO.FileShare.ReadWrite' : file_share' +00:08:23 verbose #15649 > > | ShareDelete => $'System.IO.FileShare.Delete' : file_share' +00:08:23 verbose #15650 > > +00:08:23 verbose #15651 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15652 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15653 > > │ ## file_stream │ +00:08:23 verbose #15654 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15655 > > +00:08:23 verbose #15656 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15657 > > nominal file_stream' = $'System.IO.FileStream' +00:08:23 verbose #15658 > > +00:08:23 verbose #15659 > > inl file_stream (path : string) mode access share : file_stream' = +00:08:23 verbose #15660 > > run_target function +00:08:23 verbose #15661 > > | Fsharp (Native) => fun () => +00:08:23 verbose #15662 > > inl mode = mode |> file_mode +00:08:23 verbose #15663 > > inl access = access |> file_access +00:08:23 verbose #15664 > > inl share = share |> file_share +00:08:23 verbose #15665 > > $'new System.IO.FileStream (!path, !mode, !access, !share)' +00:08:23 verbose #15666 > > | _ => fun () => null () +00:08:23 verbose #15667 > > +00:08:23 verbose #15668 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15669 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15670 > > │ ## display │ +00:08:23 verbose #15671 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15672 > > +00:08:23 verbose #15673 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15674 > > nominal display = $'std_path_Display' +00:08:23 verbose #15675 > > +00:08:23 verbose #15676 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15677 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15678 > > │ ## path │ +00:08:23 verbose #15679 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15680 > > +00:08:23 verbose #15681 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15682 > > nominal path = $'std_path_Path' +00:08:23 verbose #15683 > > nominal path = $'std_path_Path' +00:08:23 verbose #15684 > > nominal path_buf = $'std_path_PathBuf' +00:08:23 verbose #15685 > > +00:08:23 verbose #15686 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15687 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15688 > > │ ## new_path_buf │ +00:08:23 verbose #15689 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15690 > > +00:08:23 verbose #15691 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15692 > > inl new_path_buf (path : sm'.std_string) : path_buf = +00:08:23 verbose #15693 > > open rust_operators +00:08:23 verbose #15694 > > !\\(path, $'"std::path::PathBuf::from($0)"') +00:08:23 verbose #15695 > > +00:08:23 verbose #15696 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15697 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15698 > > │ ## path_buf_from │ +00:08:23 verbose #15699 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15700 > > +00:08:23 verbose #15701 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15702 > > inl path_buf_from (path : rust.box path) : path_buf = +00:08:23 verbose #15703 > > open rust_operators +00:08:23 verbose #15704 > > !\\(path, $'"std::path::PathBuf::from($0)"') +00:08:23 verbose #15705 > > +00:08:23 verbose #15706 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15707 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15708 > > │ ## path_buf_join │ +00:08:23 verbose #15709 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15710 > > +00:08:23 verbose #15711 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15712 > > inl path_buf_join (s : string) (path_buf : path_buf) : path_buf = +00:08:23 verbose #15713 > > open rust_operators +00:08:23 verbose #15714 > > !\\((path_buf, s |> sm'.to_std_string), $'"$0.join($1)"') +00:08:23 verbose #15715 > > +00:08:23 verbose #15716 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15717 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15718 > > │ ## path_buf_strip_prefix │ +00:08:23 verbose #15719 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15720 > > +00:08:23 verbose #15721 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15722 > > inl path_buf_strip_prefix (s : string) (path_buf : path_buf) : path_buf = +00:08:23 verbose #15723 > > open rust_operators +00:08:23 verbose #15724 > > !\\((path_buf, s |> sm'.to_std_string), +00:08:23 verbose #15725 > > $'"$0.strip_prefix($1).unwrap().to_path_buf()"') +00:08:23 verbose #15726 > > +00:08:23 verbose #15727 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15728 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15729 > > │ ## path_display │ +00:08:23 verbose #15730 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15731 > > +00:08:23 verbose #15732 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15733 > > inl path_display (path : rust.ref' path) : display = +00:08:23 verbose #15734 > > open rust_operators +00:08:23 verbose #15735 > > !\\(path, $'"$0.display()"') +00:08:23 verbose #15736 > > +00:08:23 verbose #15737 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15738 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15739 > > │ ## path_buf_display │ +00:08:23 verbose #15740 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15741 > > +00:08:23 verbose #15742 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15743 > > inl path_buf_display (path_buf : path_buf) : display = +00:08:23 verbose #15744 > > open rust_operators +00:08:23 verbose #15745 > > !\\(path_buf, $'"$0.display()"') +00:08:23 verbose #15746 > > +00:08:23 verbose #15747 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15748 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15749 > > │ ## path_buf_file_name │ +00:08:23 verbose #15750 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15751 > > +00:08:23 verbose #15752 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15753 > > inl path_buf_file_name (path : path_buf) : optionm'.option' (rust.ref' +00:08:23 verbose #15754 > > sm'.os_str) = +00:08:23 verbose #15755 > > open rust_operators +00:08:23 verbose #15756 > > !\($'"!path.file_name()"') +00:08:23 verbose #15757 > > +00:08:23 verbose #15758 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15759 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15760 > > │ ## path_buf_exists │ +00:08:23 verbose #15761 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15762 > > +00:08:23 verbose #15763 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15764 > > inl path_buf_exists (path_buf : path_buf) : bool = +00:08:23 verbose #15765 > > open rust_operators +00:08:23 verbose #15766 > > !\\(path_buf, $'"$0.exists()"') +00:08:23 verbose #15767 > > +00:08:23 verbose #15768 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15769 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15770 > > │ ## path_buf_is_dir │ +00:08:23 verbose #15771 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15772 > > +00:08:23 verbose #15773 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15774 > > inl path_buf_is_dir (path_buf : path_buf) : bool = +00:08:23 verbose #15775 > > open rust_operators +00:08:23 verbose #15776 > > !\\(path_buf, $'"$0.is_dir()"') +00:08:23 verbose #15777 > > +00:08:23 verbose #15778 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15779 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15780 > > │ ## path_buf_is_file │ +00:08:23 verbose #15781 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15782 > > +00:08:23 verbose #15783 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15784 > > inl path_buf_is_file (path_buf : path_buf) : bool = +00:08:23 verbose #15785 > > open rust_operators +00:08:23 verbose #15786 > > !\\(path_buf, $'"$0.is_file()"') +00:08:23 verbose #15787 > > +00:08:23 verbose #15788 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15789 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15790 > > │ ## path_buf_parent │ +00:08:23 verbose #15791 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15792 > > +00:08:23 verbose #15793 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15794 > > inl path_buf_parent (path_buf : path_buf) : optionm'.option' path_buf = +00:08:23 verbose #15795 > > open rust_operators +00:08:23 verbose #15796 > > !\\(path_buf, $'"$0.parent().map(std::path::PathBuf::from)"') +00:08:23 verbose #15797 > > +00:08:23 verbose #15798 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15799 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15800 > > │ ## ts_path_join │ +00:08:23 verbose #15801 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15802 > > +00:08:23 verbose #15803 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15804 > > inl ts_path_join (b : string) (a : string) : string = +00:08:23 verbose #15805 > > open ts_operators +00:08:23 verbose #15806 > > global "type IPathJoin = abstract join: [[<System.ParamArray>]] paths: +00:08:23 verbose #15807 > > string[[]] -> string" +00:08:23 verbose #15808 > > inl path : $'IPathJoin' = ts.import_all "path" +00:08:23 verbose #15809 > > +00:08:23 verbose #15810 > > inl a = join a +00:08:23 verbose #15811 > > inl b = join b +00:08:23 verbose #15812 > > !\($'"!path.join(!a, !b)"') +00:08:23 verbose #15813 > > +00:08:23 verbose #15814 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15815 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15816 > > │ ## (< />) │ +00:08:23 verbose #15817 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15818 > > +00:08:23 verbose #15819 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15820 > > let (</>) (a : string) (b : string) : string = +00:08:23 verbose #15821 > > run_target function +00:08:23 verbose #15822 > > | Fsharp (Native) => fun () => +00:08:23 verbose #15823 > > $'System.IO.Path.Combine (!a, !b)' +00:08:23 verbose #15824 > > | Rust (Native) => fun () => +00:08:23 verbose #15825 > > a +00:08:23 verbose #15826 > > |> sm'.to_std_string +00:08:23 verbose #15827 > > |> new_path_buf +00:08:23 verbose #15828 > > |> path_buf_join b +00:08:23 verbose #15829 > > |> path_buf_display +00:08:23 verbose #15830 > > |> sm'.format' +00:08:23 verbose #15831 > > |> sm'.from_std_string +00:08:23 verbose #15832 > > | TypeScript _ => fun () => +00:08:23 verbose #15833 > > a |> ts_path_join b +00:08:23 verbose #15834 > > | _ => fun () => null () +00:08:23 verbose #15835 > > +00:08:23 verbose #15836 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15837 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15838 > > │ ## directory_info │ +00:08:23 verbose #15839 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15840 > > +00:08:23 verbose #15841 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15842 > > nominal directory_info = $'System.IO.DirectoryInfo' +00:08:23 verbose #15843 > > +00:08:23 verbose #15844 > > inl directory_info (path : string) : directory_info = +00:08:23 verbose #15845 > > path |> $'`directory_info ' +00:08:23 verbose #15846 > > +00:08:23 verbose #15847 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15848 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15849 > > │ ## directory_info_exists │ +00:08:23 verbose #15850 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15851 > > +00:08:23 verbose #15852 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15853 > > inl directory_info_exists (info : directory_info) : bool = +00:08:23 verbose #15854 > > run_target function +00:08:23 verbose #15855 > > | Fsharp (Native) => fun () => +00:08:23 verbose #15856 > > $'!info.Exists' +00:08:23 verbose #15857 > > | _ => fun () => null () +00:08:23 verbose #15858 > > +00:08:23 verbose #15859 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15860 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15861 > > │ ## directory_info_creation_time │ +00:08:23 verbose #15862 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15863 > > +00:08:23 verbose #15864 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15865 > > inl directory_info_creation_time (info : directory_info) : date_time.date_time = +00:08:23 verbose #15866 > > run_target function +00:08:23 verbose #15867 > > | Fsharp (Native) => fun () => +00:08:23 verbose #15868 > > $'!info.CreationTime' +00:08:23 verbose #15869 > > | _ => fun () => null () +00:08:23 verbose #15870 > > +00:08:23 verbose #15871 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15872 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15873 > > │ ## directory_info_name │ +00:08:23 verbose #15874 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15875 > > +00:08:23 verbose #15876 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15877 > > inl directory_info_name (info : directory_info) : string = +00:08:23 verbose #15878 > > run_target function +00:08:23 verbose #15879 > > | Fsharp (Native) => fun () => +00:08:23 verbose #15880 > > $'!info.Name' +00:08:23 verbose #15881 > > | _ => fun () => null () +00:08:23 verbose #15882 > > +00:08:23 verbose #15883 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15884 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15885 > > │ ## directory_info_full_name │ +00:08:23 verbose #15886 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15887 > > +00:08:23 verbose #15888 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15889 > > inl directory_info_full_name (info : directory_info) : string = +00:08:23 verbose #15890 > > run_target function +00:08:23 verbose #15891 > > | Fsharp (Native) => fun () => +00:08:23 verbose #15892 > > $'!info.FullName' +00:08:23 verbose #15893 > > | _ => fun () => null () +00:08:23 verbose #15894 > > +00:08:23 verbose #15895 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15896 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15897 > > │ ## dir_entry │ +00:08:23 verbose #15898 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15899 > > +00:08:23 verbose #15900 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15901 > > nominal dir_entry = $'async_walkdir_DirEntry' +00:08:23 verbose #15902 > > +00:08:23 verbose #15903 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15904 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15905 > > │ ## walk_dir │ +00:08:23 verbose #15906 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15907 > > +00:08:23 verbose #15908 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15909 > > nominal walk_dir = $'async_walkdir_WalkDir' +00:08:23 verbose #15910 > > +00:08:23 verbose #15911 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15912 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15913 > > │ ## async_walkdir_filtering │ +00:08:23 verbose #15914 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15915 > > +00:08:23 verbose #15916 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15917 > > nominal async_walkdir_filtering = $'async_walkdir_Filtering' +00:08:23 verbose #15918 > > +00:08:23 verbose #15919 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15920 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15921 > > │ ## filtering │ +00:08:23 verbose #15922 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15923 > > +00:08:23 verbose #15924 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15925 > > union filtering = +00:08:23 verbose #15926 > > | Ignore +00:08:23 verbose #15927 > > | IgnoreDir +00:08:23 verbose #15928 > > | Continue +00:08:23 verbose #15929 > > +00:08:23 verbose #15930 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15931 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15932 > > │ ## stream_filter_map │ +00:08:23 verbose #15933 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15934 > > +00:08:23 verbose #15935 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15936 > > inl stream_filter_map forall t. +00:08:23 verbose #15937 > > (fn : resultm.result' dir_entry stream.io_error -> optionm'.option' t) +00:08:23 verbose #15938 > > (stream : walk_dir) +00:08:23 verbose #15939 > > : am'.vec t = +00:08:23 verbose #15940 > > +00:08:23 verbose #15941 > > inl fn = join fn +00:08:23 verbose #15942 > > inl result : am'.vec t = +00:08:23 verbose #15943 > > +00:08:23 verbose #15944 > > !\($'"futures_lite::stream::StreamExt::collect(futures_lite::stream::StreamExt:: +00:08:23 verbose #15945 > > filter_map(!stream, |x| !fn(x))).await"') +00:08:23 verbose #15946 > > result +00:08:23 verbose #15947 > > +00:08:23 verbose #15948 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15949 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15950 > > │ ## new_walk_dir │ +00:08:23 verbose #15951 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15952 > > +00:08:23 verbose #15953 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15954 > > inl new_walk_dir (dir : string) : walk_dir = +00:08:23 verbose #15955 > > !\\(dir, $'"async_walkdir::WalkDir::new(&*$0)"') +00:08:23 verbose #15956 > > // inl walk_dir : walk_dir = walk_dir |> rust.to_mut +00:08:23 verbose #15957 > > // (!\($'"true; let mut !walk_dir = !walk_dir"') : bool) |> ignore +00:08:23 verbose #15958 > > +00:08:23 verbose #15959 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15960 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15961 > > │ ## walk_dir_filter │ +00:08:23 verbose #15962 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15963 > > +00:08:23 verbose #15964 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15965 > > inl walk_dir_filter (fn : dir_entry -> async.future_pin_send filtering) +00:08:23 verbose #15966 > > (walk_dir : walk_dir) : walk_dir = +00:08:23 verbose #15967 > > inl fn entry = async.future_init_send (2, 1) 0 fun () => +00:08:23 verbose #15968 > > inl result = fn entry |> async.await_send +00:08:23 verbose #15969 > > inl filtering : async_walkdir_filtering = +00:08:23 verbose #15970 > > match result with +00:08:23 verbose #15971 > > | Ignore => !\($'"async_walkdir::Filtering::Ignore"') +00:08:23 verbose #15972 > > | IgnoreDir => !\($'"async_walkdir::Filtering::IgnoreDir"') +00:08:23 verbose #15973 > > | Continue => !\($'"async_walkdir::Filtering::Continue"') +00:08:23 verbose #15974 > > filtering +00:08:23 verbose #15975 > > !\\((walk_dir, fn), $'"async_walkdir::WalkDir::filter($0, |x| $1(x))"') +00:08:23 verbose #15976 > > +00:08:23 verbose #15977 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15978 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15979 > > │ ## file_type │ +00:08:23 verbose #15980 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15981 > > +00:08:23 verbose #15982 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15983 > > nominal file_type = $'std_fs_FileType' +00:08:23 verbose #15984 > > +00:08:23 verbose #15985 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15986 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15987 > > │ ## dir_entry_file_type │ +00:08:23 verbose #15988 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #15989 > > +00:08:23 verbose #15990 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #15991 > > inl dir_entry_file_type (dir_entry : dir_entry) : async.future_pin_send +00:08:23 verbose #15992 > > (resultm.result' file_type stream.io_error) = +00:08:23 verbose #15993 > > inl dir_entry = join dir_entry +00:08:23 verbose #15994 > > !\($'"Box::pin(async_walkdir::DirEntry::file_type(&!dir_entry))"') +00:08:23 verbose #15995 > > +00:08:23 verbose #15996 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #15997 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #15998 > > │ ## file_type_is_dir │ +00:08:23 verbose #15999 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #16000 > > +00:08:23 verbose #16001 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #16002 > > inl file_type_is_dir (file_type : file_type) : bool = +00:08:23 verbose #16003 > > inl file_type = join file_type +00:08:23 verbose #16004 > > !\($'"std::fs::FileType::is_dir(&!file_type)"') +00:08:23 verbose #16005 > > +00:08:23 verbose #16006 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #16007 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #16008 > > │ ## file │ +00:08:23 verbose #16009 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #16010 > > +00:08:23 verbose #16011 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #16012 > > nominal file = $'std_fs_File' +00:08:23 verbose #16013 > > +00:08:23 verbose #16014 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #16015 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #16016 > > │ ## file_open │ +00:08:23 verbose #16017 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #16018 > > +00:08:23 verbose #16019 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #16020 > > inl file_open (path : string) : resultm.result' file stream.io_error = +00:08:23 verbose #16021 > > !\($'"std::fs::File::open(&*!path)"') +00:08:23 verbose #16022 > > +00:08:23 verbose #16023 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #16024 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #16025 > > │ ## dir_entry_path │ +00:08:23 verbose #16026 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #16027 > > +00:08:23 verbose #16028 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #16029 > > inl dir_entry_path (dir_entry : dir_entry) : path_buf = +00:08:23 verbose #16030 > > !\\(dir_entry, $'"async_walkdir::DirEntry::path(&$0)"') +00:08:23 verbose #16031 > > +00:08:23 verbose #16032 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #16033 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #16034 > > │ ## get_temp_path │ +00:08:23 verbose #16035 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #16036 > > +00:08:23 verbose #16037 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #16038 > > inl get_temp_path () : string = +00:08:23 verbose #16039 > > run_target function +00:08:23 verbose #16040 > > | Fsharp (Native) => fun () => +00:08:23 verbose #16041 > > $'System.IO.Path.GetTempPath' () +00:08:23 verbose #16042 > > | Rust (Native) => fun () => +00:08:23 verbose #16043 > > open rust_operators +00:08:23 verbose #16044 > > !\($'"std::env::temp_dir()"') +00:08:23 verbose #16045 > > |> path_buf_display +00:08:23 verbose #16046 > > |> sm'.format' +00:08:23 verbose #16047 > > |> sm'.from_std_string +00:08:23 verbose #16048 > > | _ => fun () => null () +00:08:23 verbose #16049 > > +00:08:23 verbose #16050 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #16051 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #16052 > > │ ## get_file_name │ +00:08:23 verbose #16053 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #16054 > > +00:08:23 verbose #16055 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #16056 > > inl get_file_name (path : string) : string = +00:08:23 verbose #16057 > > run_target function +00:08:23 verbose #16058 > > | Fsharp (Native) => fun () => +00:08:23 verbose #16059 > > path |> $'System.IO.Path.GetFileName' +00:08:23 verbose #16060 > > | Rust (Native) => fun () => +00:08:23 verbose #16061 > > open rust_operators +00:08:23 verbose #16062 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf +00:08:23 verbose #16063 > > !\\(path_buf, $'"$0.file_name()"') +00:08:23 verbose #16064 > > |> optionm'.unwrap +00:08:23 verbose #16065 > > |> sm'.from_os_str_ref +00:08:23 verbose #16066 > > | _ => fun () => null () +00:08:23 verbose #16067 > > +00:08:23 verbose #16068 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #16069 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #16070 > > │ ## get_current_directory │ +00:08:23 verbose #16071 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #16072 > > +00:08:23 verbose #16073 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #16074 > > inl get_current_directory () : string = +00:08:23 verbose #16075 > > run_target function +00:08:23 verbose #16076 > > | Fsharp (Native) => fun () => +00:08:23 verbose #16077 > > $'System.IO.Directory.GetCurrentDirectory' () +00:08:23 verbose #16078 > > | Rust (Native) => fun () => +00:08:23 verbose #16079 > > open rust_operators +00:08:23 verbose #16080 > > inl current_dir = !\($'"std::env::current_dir()"') : resultm.result' +00:08:23 verbose #16081 > > path_buf stream.io_error +00:08:23 verbose #16082 > > current_dir +00:08:23 verbose #16083 > > |> resultm.unwrap' +00:08:23 verbose #16084 > > |> path_buf_display +00:08:23 verbose #16085 > > |> sm'.format' +00:08:23 verbose #16086 > > |> sm'.from_std_string +00:08:23 verbose #16087 > > | _ => fun () => null () +00:08:23 verbose #16088 > > +00:08:23 verbose #16089 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #16090 > > //// test +00:08:23 verbose #16091 > > +00:08:23 verbose #16092 > > get_current_directory () +00:08:23 verbose #16093 > > +00:08:23 verbose #16094 > > ╭─[ 523.39ms - return value ]──────────────────────────────────────────────────╮ +00:08:23 verbose #16095 > > │ C:\home\git\polyglot\lib\spiral │ +00:08:23 verbose #16096 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #16097 > > +00:08:23 verbose #16098 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:23 verbose #16099 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:23 verbose #16100 > > │ ## directory_separator_char │ +00:08:23 verbose #16101 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:23 verbose #16102 > > +00:08:23 verbose #16103 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:23 verbose #16104 > > inl directory_separator_char () : char = +00:08:23 verbose #16105 > > run_target function +00:08:23 verbose #16106 > > | Fsharp (Native) => fun () => +00:08:23 verbose #16107 > > $'System.IO.Path.DirectorySeparatorChar' +00:08:23 verbose #16108 > > | Rust (Native) => fun () => +00:08:23 verbose #16109 > > open rust_operators +00:08:23 verbose #16110 > > !\($'"std::path::MAIN_SEPARATOR"') +00:08:23 verbose #16111 > > | _ => fun () => null () +00:08:24 verbose #16112 > > +00:08:24 verbose #16113 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:24 verbose #16114 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:24 verbose #16115 > > │ ## normalize_path │ +00:08:24 verbose #16116 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:24 verbose #16117 > > +00:08:24 verbose #16118 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:24 verbose #16119 > > inl normalize_path (path : string) : string = +00:08:24 verbose #16120 > > inl path = path |> sm'.replace_regex @"^\\\\\?\\" "" +00:08:24 verbose #16121 > > $'$"{!path.[[0]] |> string |> _.ToLower()}{!path.[[1..]]}"' |> sm'.replace +00:08:24 verbose #16122 > > "\\" "/" +00:08:24 verbose #16123 > > +00:08:24 verbose #16124 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:24 verbose #16125 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:24 verbose #16126 > > │ ## get_full_path │ +00:08:24 verbose #16127 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:24 verbose #16128 > > +00:08:24 verbose #16129 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:24 verbose #16130 > > inl get_full_path (path : string) : string = +00:08:24 verbose #16131 > > run_target function +00:08:24 verbose #16132 > > | Fsharp (Native) => fun () => +00:08:24 verbose #16133 > > inl path = join path +00:08:24 verbose #16134 > > path |> $'System.IO.Path.GetFullPath' +00:08:24 verbose #16135 > > | Rust (Native) => fun () => +00:08:24 verbose #16136 > > inl path = join path +00:08:24 verbose #16137 > > open rust_operators +00:08:24 verbose #16138 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf +00:08:24 verbose #16139 > > if path_buf |> path_buf_exists |> not then +00:08:24 verbose #16140 > > inl current_dir = get_current_directory () +00:08:24 verbose #16141 > > current_dir </> path +00:08:24 verbose #16142 > > |> normalize_path +00:08:24 verbose #16143 > > |> sm'.split "/" +00:08:24 verbose #16144 > > |> fun x => +00:08:24 verbose #16145 > > ((a x : _ i32 _), (0i32, (a ;[[]] : _ i32 _))) +00:08:24 verbose #16146 > > ||> am.foldBack fun x level, acc => +00:08:24 verbose #16147 > > match x, level with +00:08:24 verbose #16148 > > | "..", _ => level + 1, acc +00:08:24 verbose #16149 > > | ".", _ => level, acc +00:08:24 verbose #16150 > > | _, 0 when x |> sm'.ends_with ":" => 0, a ;[[ +00:08:24 verbose #16151 > > $'$"{!current_dir.[[0]]}:"' ]] ++ acc +00:08:24 verbose #16152 > > | _, 0 => 0, a ;[[ x ]] ++ acc +00:08:24 verbose #16153 > > | _ => level - 1, acc +00:08:24 verbose #16154 > > |> snd +00:08:24 verbose #16155 > > |> seq.of_array' +00:08:24 verbose #16156 > > |> sm'.concat (directory_separator_char () |> sm'.obj_to_string) +00:08:24 verbose #16157 > > else +00:08:24 verbose #16158 > > inl path = !\\(path, $'"std::fs::canonicalize(&*$0)"') : +00:08:24 verbose #16159 > > resultm.result' path_buf stream.io_error +00:08:24 verbose #16160 > > path +00:08:24 verbose #16161 > > |> resultm.unwrap' +00:08:24 verbose #16162 > > |> path_buf_display +00:08:24 verbose #16163 > > |> sm'.format' +00:08:24 verbose #16164 > > |> sm'.from_std_string +00:08:24 verbose #16165 > > | _ => fun () => null () +00:08:24 verbose #16166 > > +00:08:24 verbose #16167 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:24 verbose #16168 > > //// test +00:08:24 verbose #16169 > > +00:08:24 verbose #16170 > > "." +00:08:24 verbose #16171 > > |> get_full_path +00:08:24 verbose #16172 > > |> directory_info +00:08:24 verbose #16173 > > |> directory_info_name +00:08:24 verbose #16174 > > |> _assert_eq "spiral" +00:08:24 verbose #16175 > > +00:08:24 verbose #16176 > > ╭─[ 597.31ms - stdout ]────────────────────────────────────────────────────────╮ +00:08:24 verbose #16177 > > │ assert_eq / actual: "spiral" / expected: "spiral" │ +00:08:24 verbose #16178 > > │ │ +00:08:24 verbose #16179 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:24 verbose #16180 > > +00:08:24 verbose #16181 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:24 verbose #16182 > > //// test +00:08:24 verbose #16183 > > +00:08:24 verbose #16184 > > "dir/.././._file" +00:08:24 verbose #16185 > > |> get_full_path +00:08:24 verbose #16186 > > |> _assert_eq (get_current_directory () </> "._file") +00:08:24 verbose #16187 > > +00:08:24 verbose #16188 > > ╭─[ 95.92ms - stdout ]─────────────────────────────────────────────────────────╮ +00:08:24 verbose #16189 > > │ assert_eq / actual: "C:\home\git\polyglot\lib\spiral\._file" / expected: │ +00:08:24 verbose #16190 > > │ "C:\home\git\polyglot\lib\spiral\._file" │ +00:08:24 verbose #16191 > > │ │ +00:08:24 verbose #16192 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:24 verbose #16193 > > +00:08:24 verbose #16194 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:24 verbose #16195 > > //// test +00:08:24 verbose #16196 > > ///! rust -d regex +00:08:24 verbose #16197 > > +00:08:24 verbose #16198 > > types () +00:08:24 verbose #16199 > > "." +00:08:24 verbose #16200 > > |> get_full_path +00:08:24 verbose #16201 > > |> sm'.to_std_string +00:08:24 verbose #16202 > > |> new_path_buf +00:08:24 verbose #16203 > > |> path_buf_file_name +00:08:24 verbose #16204 > > |> optionm'.unwrap +00:08:24 verbose #16205 > > |> sm'.from_os_str_ref +00:08:24 verbose #16206 > > |> _assert_eq "spiral" +00:08:29 verbose #16207 > > +00:08:29 verbose #16208 > > ╭─[ 5.28s - return value ]─────────────────────────────────────────────────────╮ +00:08:29 verbose #16209 > > │ assert_eq / actual: "spiral" / expected: "spiral" │ +00:08:29 verbose #16210 > > │ │ +00:08:29 verbose #16211 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:29 verbose #16212 > > +00:08:29 verbose #16213 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:30 verbose #16214 > > //// test +00:08:30 verbose #16215 > > ///! rust -d regex +00:08:30 verbose #16216 > > +00:08:30 verbose #16217 > > types () +00:08:30 verbose #16218 > > "dir/.././._file" +00:08:30 verbose #16219 > > |> get_full_path +00:08:30 verbose #16220 > > |> _assert_eq (get_current_directory () </> "._file") +00:08:34 verbose #16221 > > +00:08:34 verbose #16222 > > ╭─[ 4.52s - return value ]─────────────────────────────────────────────────────╮ +00:08:34 verbose #16223 > > │ assert_eq / actual: "C:\home\git\polyglot\lib\spiral\._file" / expected: │ +00:08:34 verbose #16224 > > │ "C:\home\git\polyglot\lib\spiral\._file" │ +00:08:34 verbose #16225 > > │ │ +00:08:34 verbose #16226 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:34 verbose #16227 > > +00:08:34 verbose #16228 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:34 verbose #16229 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:34 verbose #16230 > > │ ## create_temp_directory_name │ +00:08:34 verbose #16231 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:34 verbose #16232 > > +00:08:34 verbose #16233 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:34 verbose #16234 > > inl create_temp_directory_name () = +00:08:34 verbose #16235 > > run_target function +00:08:34 verbose #16236 > > | Fsharp (Native) +00:08:34 verbose #16237 > > | Rust (Native) => fun () => +00:08:34 verbose #16238 > > inl assembly_name = env.get_entry_assembly_name () +00:08:34 verbose #16239 > > get_temp_path () +00:08:34 verbose #16240 > > </> ($'$"\!{!assembly_name}"' : string) +00:08:34 verbose #16241 > > </> (date_time.now () |> date_time.new_guid_from_date_time |> +00:08:34 verbose #16242 > > sm'.obj_to_string) +00:08:34 verbose #16243 > > | _ => fun () => null () +00:08:34 verbose #16244 > > +00:08:34 verbose #16245 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:34 verbose #16246 > > //// test +00:08:34 verbose #16247 > > +00:08:34 verbose #16248 > > types () +00:08:34 verbose #16249 > > create_temp_directory_name () +00:08:34 verbose #16250 > > |> _assert_contains (directory_separator_char ()) +00:08:35 verbose #16251 > > +00:08:35 verbose #16252 > > ╭─[ 613.65ms - stdout ]────────────────────────────────────────────────────────╮ +00:08:35 verbose #16253 > > │ assert_contains / actual: │ +00:08:35 verbose #16254 > > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-0446-4411-1144-1004 │ +00:08:35 verbose #16255 > > │ 00810a35" / expected: '\\' │ +00:08:35 verbose #16256 > > │ │ +00:08:35 verbose #16257 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:35 verbose #16258 > > +00:08:35 verbose #16259 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:35 verbose #16260 > > //// test +00:08:35 verbose #16261 > > ///! rust -d chrono +00:08:35 verbose #16262 > > +00:08:35 verbose #16263 > > types () +00:08:35 verbose #16264 > > create_temp_directory_name () +00:08:35 verbose #16265 > > |> _assert_contains (directory_separator_char ()) +00:08:39 verbose #16266 > > +00:08:39 verbose #16267 > > ╭─[ 4.22s - return value ]─────────────────────────────────────────────────────╮ +00:08:39 verbose #16268 > > │ assert_contains / actual: │ +00:08:39 verbose #16269 > > │ "C:\Users\i574n\AppData\Local\Temp\!spiral_builder_f2a4c5708e10d674480a39308 │ +00:08:39 verbose #16270 > > │ 8a7f26a13ebdd3f2be1575fb9e39d48c7ecb65a\20240520-0446-4823-0655-000000588891 │ +00:08:39 verbose #16271 > > │ " / expected: '\\' │ +00:08:39 verbose #16272 > > │ │ +00:08:39 verbose #16273 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16274 > > +00:08:39 verbose #16275 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16276 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16277 > > │ ## get_source_directory │ +00:08:39 verbose #16278 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16279 > > +00:08:39 verbose #16280 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16281 > > inl get_source_directory () = +00:08:39 verbose #16282 > > $'__SOURCE_DIRECTORY__' : string +00:08:39 verbose #16283 > > +00:08:39 verbose #16284 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16285 > > //// test +00:08:39 verbose #16286 > > +00:08:39 verbose #16287 > > get_source_directory () +00:08:39 verbose #16288 > > |> directory_info +00:08:39 verbose #16289 > > |> directory_info_name +00:08:39 verbose #16290 > > |> _assert_eq "spiral" +00:08:39 verbose #16291 > > +00:08:39 verbose #16292 > > ╭─[ 21.25ms - stdout ]─────────────────────────────────────────────────────────╮ +00:08:39 verbose #16293 > > │ assert_eq / actual: "spiral" / expected: "spiral" │ +00:08:39 verbose #16294 > > │ │ +00:08:39 verbose #16295 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16296 > > +00:08:39 verbose #16297 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16298 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16299 > > │ ## create_dir_all │ +00:08:39 verbose #16300 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16301 > > +00:08:39 verbose #16302 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16303 > > inl create_dir_all (path : string) : resultm.result' () stream.io_error = +00:08:39 verbose #16304 > > !\\(path, $'"std::fs::create_dir_all(&*$0)"') +00:08:39 verbose #16305 > > +00:08:39 verbose #16306 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16307 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16308 > > │ ## create_directory │ +00:08:39 verbose #16309 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16310 > > +00:08:39 verbose #16311 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16312 > > inl create_directory (path : string) : directory_info = +00:08:39 verbose #16313 > > run_target function +00:08:39 verbose #16314 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16315 > > path |> $'System.IO.Directory.CreateDirectory' +00:08:39 verbose #16316 > > | _ => fun () => null () +00:08:39 verbose #16317 > > +00:08:39 verbose #16318 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16319 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16320 > > │ ## directory_get_files │ +00:08:39 verbose #16321 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16322 > > +00:08:39 verbose #16323 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16324 > > inl directory_get_files (path : string) : array_base string = +00:08:39 verbose #16325 > > run_target function +00:08:39 verbose #16326 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16327 > > path |> $'System.IO.Directory.GetFiles' +00:08:39 verbose #16328 > > | _ => fun () => null () +00:08:39 verbose #16329 > > +00:08:39 verbose #16330 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16331 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16332 > > │ ## directory_exists │ +00:08:39 verbose #16333 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16334 > > +00:08:39 verbose #16335 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16336 > > inl directory_exists (path : string) : bool = +00:08:39 verbose #16337 > > run_target function +00:08:39 verbose #16338 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16339 > > path |> $'System.IO.Directory.Exists' +00:08:39 verbose #16340 > > | Rust (Native) => fun () => +00:08:39 verbose #16341 > > inl path = path |> sm'.to_std_string |> new_path_buf +00:08:39 verbose #16342 > > path_buf_exists path && path_buf_is_dir path +00:08:39 verbose #16343 > > | TypeScript (Native) => fun () => +00:08:39 verbose #16344 > > global "type IFsExistsSync = abstract existsSync: path: string -> +00:08:39 verbose #16345 > > bool" +00:08:39 verbose #16346 > > open ts_operators +00:08:39 verbose #16347 > > inl fs : $'IFsExistsSync' = ts.import_all "fs" +00:08:39 verbose #16348 > > !\\((fs, path), $'"$0.existsSync($1)"') +00:08:39 verbose #16349 > > | _ => fun () => null () +00:08:39 verbose #16350 > > +00:08:39 verbose #16351 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16352 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16353 > > │ ## directory_get_parent │ +00:08:39 verbose #16354 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16355 > > +00:08:39 verbose #16356 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16357 > > inl directory_get_parent (path : string) : optionm'.option' string = +00:08:39 verbose #16358 > > run_target function +00:08:39 verbose #16359 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16360 > > inl parent : directory_info = path |> +00:08:39 verbose #16361 > > $'System.IO.Directory.GetParent' +00:08:39 verbose #16362 > > if parent =. null () +00:08:39 verbose #16363 > > then None +00:08:39 verbose #16364 > > else parent |> directory_info_full_name |> Some +00:08:39 verbose #16365 > > | Rust (Native) => fun () => +00:08:39 verbose #16366 > > path +00:08:39 verbose #16367 > > |> sm'.to_std_string +00:08:39 verbose #16368 > > |> new_path_buf +00:08:39 verbose #16369 > > |> path_buf_parent +00:08:39 verbose #16370 > > |> optionm'.try' +00:08:39 verbose #16371 > > |> path_buf_display +00:08:39 verbose #16372 > > |> sm'.format' +00:08:39 verbose #16373 > > |> sm'.from_std_string +00:08:39 verbose #16374 > > |> Some +00:08:39 verbose #16375 > > | TypeScript _ => fun () => +00:08:39 verbose #16376 > > global "type IPathDirname = abstract dirname: path: string -> +00:08:39 verbose #16377 > > string" +00:08:39 verbose #16378 > > inl fs : $'IPathDirname' = ts.import_all "path" +00:08:39 verbose #16379 > > ts.emit_expr path $'"!fs.dirname($0)"' |> Some +00:08:39 verbose #16380 > > | _ => fun () => null () +00:08:39 verbose #16381 > > |> optionm'.box +00:08:39 verbose #16382 > > +00:08:39 verbose #16383 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16384 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16385 > > │ ## file_delete │ +00:08:39 verbose #16386 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16387 > > +00:08:39 verbose #16388 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16389 > > inl file_delete (path : string) : () = +00:08:39 verbose #16390 > > run_target function +00:08:39 verbose #16391 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16392 > > path |> $'System.IO.File.Delete' +00:08:39 verbose #16393 > > | _ => fun () => null () +00:08:39 verbose #16394 > > +00:08:39 verbose #16395 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16396 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16397 > > │ ## file_move │ +00:08:39 verbose #16398 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16399 > > +00:08:39 verbose #16400 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16401 > > inl file_move (new_path : string) (old_path : string) : () = +00:08:39 verbose #16402 > > run_target function +00:08:39 verbose #16403 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16404 > > $'System.IO.File.Move (!old_path, !new_path)' +00:08:39 verbose #16405 > > | _ => fun () => null () +00:08:39 verbose #16406 > > +00:08:39 verbose #16407 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16408 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16409 > > │ ## file_copy │ +00:08:39 verbose #16410 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16411 > > +00:08:39 verbose #16412 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16413 > > inl file_copy (new_path : string) (old_path : string) : () = +00:08:39 verbose #16414 > > run_target function +00:08:39 verbose #16415 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16416 > > $'System.IO.File.Copy (!old_path, !new_path, true)' +00:08:39 verbose #16417 > > | Rust (Native) => fun () => +00:08:39 verbose #16418 > > open rust_operators +00:08:39 verbose #16419 > > inl new_path = join new_path +00:08:39 verbose #16420 > > !\\(old_path, $'"std::fs::copy(&*$0, &*!new_path)"') +00:08:39 verbose #16421 > > |> fun x => x : _ u64 stream.io_error +00:08:39 verbose #16422 > > |> resultm.unwrap' +00:08:39 verbose #16423 > > |> ignore +00:08:39 verbose #16424 > > | _ => fun () => null () +00:08:39 verbose #16425 > > +00:08:39 verbose #16426 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16427 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16428 > > │ ## file_exists │ +00:08:39 verbose #16429 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16430 > > +00:08:39 verbose #16431 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16432 > > inl file_exists (path : string) : bool = +00:08:39 verbose #16433 > > run_target function +00:08:39 verbose #16434 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16435 > > path |> $'System.IO.File.Exists' +00:08:39 verbose #16436 > > | Rust (Native) => fun () => +00:08:39 verbose #16437 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf +00:08:39 verbose #16438 > > path_buf_exists path_buf && path_buf_is_file path_buf +00:08:39 verbose #16439 > > | TypeScript (Native) => fun () => +00:08:39 verbose #16440 > > open ts_operators +00:08:39 verbose #16441 > > global "type IFsExistsSync = abstract existsSync: path: string -> +00:08:39 verbose #16442 > > bool" +00:08:39 verbose #16443 > > inl fs : $'IFsExistsSync' = ts.import_all "fs" +00:08:39 verbose #16444 > > !\\((fs, path), $'"$0.existsSync($1)"') +00:08:39 verbose #16445 > > | _ => fun () => null () +00:08:39 verbose #16446 > > +00:08:39 verbose #16447 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16448 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16449 > > │ ## directory_delete │ +00:08:39 verbose #16450 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16451 > > +00:08:39 verbose #16452 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16453 > > inl directory_delete recursive (path : string) : () = +00:08:39 verbose #16454 > > run_target function +00:08:39 verbose #16455 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16456 > > $'System.IO.Directory.Delete (!path, !recursive)' +00:08:39 verbose #16457 > > | Rust (Native) => fun () => +00:08:39 verbose #16458 > > inl path = join path +00:08:39 verbose #16459 > > if path |> directory_exists then +00:08:39 verbose #16460 > > open rust_operators +00:08:39 verbose #16461 > > if recursive +00:08:39 verbose #16462 > > then !\\(path, $'"std::fs::remove_dir_all(&*$0).unwrap()"') +00:08:39 verbose #16463 > > else !\\(path, $'"std::fs::remove_dir(&*$0).unwrap()"') +00:08:39 verbose #16464 > > | _ => fun () => null () +00:08:39 verbose #16465 > > +00:08:39 verbose #16466 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16467 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16468 > > │ ## read_all_text_async │ +00:08:39 verbose #16469 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16470 > > +00:08:39 verbose #16471 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16472 > > inl read_all_text_async (path : string) : _ string = +00:08:39 verbose #16473 > > run_target function +00:08:39 verbose #16474 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16475 > > path |> $'System.IO.File.ReadAllTextAsync' |> async.await_task +00:08:39 verbose #16476 > > | _ => fun () => null () +00:08:39 verbose #16477 > > +00:08:39 verbose #16478 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16479 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16480 > > │ ## file_exists_content │ +00:08:39 verbose #16481 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16482 > > +00:08:39 verbose #16483 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16484 > > inl file_exists_content path content : _ bool = +00:08:39 verbose #16485 > > run_target function +00:08:39 verbose #16486 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16487 > > fun () => +00:08:39 verbose #16488 > > fix_condition +00:08:39 verbose #16489 > > fun () => path |> file_exists |> not +00:08:39 verbose #16490 > > fun () => false |> return +00:08:39 verbose #16491 > > fun () => +00:08:39 verbose #16492 > > inl existing_content = path |> read_all_text_async |> +00:08:39 verbose #16493 > > async.let' +00:08:39 verbose #16494 > > content = existing_content |> return +00:08:39 verbose #16495 > > |> async.new_async_unit +00:08:39 verbose #16496 > > | _ => fun () => null () +00:08:39 verbose #16497 > > +00:08:39 verbose #16498 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16499 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16500 > > │ ## write_all_text │ +00:08:39 verbose #16501 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16502 > > +00:08:39 verbose #16503 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16504 > > inl write_all_text (path : string) (text : string) : () = +00:08:39 verbose #16505 > > run_target function +00:08:39 verbose #16506 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16507 > > inl text = join text +00:08:39 verbose #16508 > > $'System.IO.File.WriteAllText (!path, !text)' +00:08:39 verbose #16509 > > | Rust (Native) => fun () => +00:08:39 verbose #16510 > > open rust_operators +00:08:39 verbose #16511 > > !\\((path, text), $'"std::fs::write(&*$0, &*$1).unwrap()"') +00:08:39 verbose #16512 > > | _ => fun () => null () +00:08:39 verbose #16513 > > +00:08:39 verbose #16514 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16515 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16516 > > │ ## read_all_bytes │ +00:08:39 verbose #16517 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16518 > > +00:08:39 verbose #16519 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16520 > > inl read_all_bytes (path : string) : am'.vec u8 = +00:08:39 verbose #16521 > > run_target function +00:08:39 verbose #16522 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16523 > > $'!path |> System.IO.File.ReadAllBytes' +00:08:39 verbose #16524 > > |> am'.to_vec +00:08:39 verbose #16525 > > | Rust (Native) => fun () => +00:08:39 verbose #16526 > > open rust_operators +00:08:39 verbose #16527 > > !\\(path, $'"std::fs::read(&*$0).unwrap()"') +00:08:39 verbose #16528 > > | _ => fun () => null () +00:08:39 verbose #16529 > > +00:08:39 verbose #16530 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16531 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16532 > > │ ## read_all_text │ +00:08:39 verbose #16533 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16534 > > +00:08:39 verbose #16535 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16536 > > inl read_all_text (path : string) : string = +00:08:39 verbose #16537 > > run_target function +00:08:39 verbose #16538 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16539 > > $'!path |> System.IO.File.ReadAllText' +00:08:39 verbose #16540 > > | Rust (Native) => fun () => +00:08:39 verbose #16541 > > path +00:08:39 verbose #16542 > > |> read_all_bytes +00:08:39 verbose #16543 > > |> sm'.string_from_utf8 +00:08:39 verbose #16544 > > |> resultm.unwrap' +00:08:39 verbose #16545 > > |> sm'.from_std_string +00:08:39 verbose #16546 > > | _ => fun () => null () +00:08:39 verbose #16547 > > +00:08:39 verbose #16548 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16549 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16550 > > │ ## write_all_text_async │ +00:08:39 verbose #16551 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16552 > > +00:08:39 verbose #16553 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16554 > > inl write_all_text_async (path : string) (text : string) : _ () = +00:08:39 verbose #16555 > > run_target function +00:08:39 verbose #16556 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16557 > > $'System.IO.File.WriteAllTextAsync (!path, !text)' |> +00:08:39 verbose #16558 > > async.await_task +00:08:39 verbose #16559 > > | _ => fun () => null () +00:08:39 verbose #16560 > > +00:08:39 verbose #16561 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16562 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16563 > > │ ## write_all_text_exists │ +00:08:39 verbose #16564 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16565 > > +00:08:39 verbose #16566 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16567 > > inl write_all_text_exists path contents = +00:08:39 verbose #16568 > > fun () => +00:08:39 verbose #16569 > > inl exists' = contents |> file_exists_content path |> async.let' +00:08:39 verbose #16570 > > if not exists' +00:08:39 verbose #16571 > > then contents |> write_all_text_async path |> async.do +00:08:39 verbose #16572 > > |> async.new_async +00:08:39 verbose #16573 > > +00:08:39 verbose #16574 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16575 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16576 > > │ ## delete_directory_async │ +00:08:39 verbose #16577 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16578 > > +00:08:39 verbose #16579 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16580 > > inl delete_directory_async path : _ i64 = +00:08:39 verbose #16581 > > run_target function +00:08:39 verbose #16582 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16583 > > let rec loop (retry : i64) = +00:08:39 verbose #16584 > > fun () => +00:08:39 verbose #16585 > > try_unit +00:08:39 verbose #16586 > > fun () => +00:08:39 verbose #16587 > > path |> directory_delete true +00:08:39 verbose #16588 > > retry |> return +00:08:39 verbose #16589 > > fun ex => +00:08:39 verbose #16590 > > if retry % 100i64 = 0 then +00:08:39 verbose #16591 > > inl ex = ex |> sm'.format_exception +00:08:39 verbose #16592 > > trace Debug +00:08:39 verbose #16593 > > fun () => +00:08:39 verbose #16594 > > "file_system.delete_directory_async" +00:08:39 verbose #16595 > > fun () => $'$"path: {!path |> +00:08:39 verbose #16596 > > !get_file_name} / ex: {!ex} / {!_locals ()}"' +00:08:39 verbose #16597 > > async.sleep 10i32 |> async.do +00:08:39 verbose #16598 > > loop (retry + 1) |> async.return_await +00:08:39 verbose #16599 > > |> async.new_async +00:08:39 verbose #16600 > > loop 0 +00:08:39 verbose #16601 > > | _ => fun () => null () +00:08:39 verbose #16602 > > +00:08:39 verbose #16603 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16604 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16605 > > │ ## create_directory' │ +00:08:39 verbose #16606 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16607 > > +00:08:39 verbose #16608 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16609 > > inl create_directory' dir = +00:08:39 verbose #16610 > > run_target function +00:08:39 verbose #16611 > > | Fsharp (Native) => fun () => +00:08:39 verbose #16612 > > inl directory_info = dir |> create_directory +00:08:39 verbose #16613 > > +00:08:39 verbose #16614 > > inl exists' = directory_info |> directory_info_exists +00:08:39 verbose #16615 > > if not exists' then +00:08:39 verbose #16616 > > inl creation_time = directory_info |> +00:08:39 verbose #16617 > > directory_info_creation_time +00:08:39 verbose #16618 > > inl result = ($'{| Exists = !exists'; CreationTime = +00:08:39 verbose #16619 > > !creation_time |}' : any) |> sm'.format_debug +00:08:39 verbose #16620 > > trace Debug +00:08:39 verbose #16621 > > fun () => "file_system.create_directory" +00:08:39 verbose #16622 > > fun () => $'$"dir: {!dir} / result: {!result} {!_locals +00:08:39 verbose #16623 > > ()}"' +00:08:39 verbose #16624 > > inl disposable : _ () = new_disposable fun () => +00:08:39 verbose #16625 > > dir +00:08:39 verbose #16626 > > |> delete_directory_async +00:08:39 verbose #16627 > > |> async.ignore +00:08:39 verbose #16628 > > |> async.run_synchronously +00:08:39 verbose #16629 > > disposable +00:08:39 verbose #16630 > > | Rust (Native) => fun () => +00:08:39 verbose #16631 > > inl dir = join dir +00:08:39 verbose #16632 > > match dir |> create_dir_all |> resultm.map_error' sm'.format' |> +00:08:39 verbose #16633 > > resultm.unbox with +00:08:39 verbose #16634 > > | Ok () => +00:08:39 verbose #16635 > > trace Verbose +00:08:39 verbose #16636 > > fun () => "file_system.create_directory" +00:08:39 verbose #16637 > > fun () => $'$"dir: {!dir} / {!_locals ()}"' +00:08:39 verbose #16638 > > | Error error => +00:08:39 verbose #16639 > > trace Critical +00:08:39 verbose #16640 > > fun () => "file_system.create_directory" +00:08:39 verbose #16641 > > fun () => $'$"dir: {!dir} / error: {!error} / {!_locals +00:08:39 verbose #16642 > > ()}"' +00:08:39 verbose #16643 > > inl disposable : _ () = new_disposable fun () => +00:08:39 verbose #16644 > > dir +00:08:39 verbose #16645 > > |> directory_delete true +00:08:39 verbose #16646 > > disposable +00:08:39 verbose #16647 > > | _ => fun () => null () +00:08:39 verbose #16648 > > +00:08:39 verbose #16649 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:39 verbose #16650 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:39 verbose #16651 > > │ ## create_temp_directory │ +00:08:39 verbose #16652 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:39 verbose #16653 > > +00:08:39 verbose #16654 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16655 > > inl create_temp_directory () = +00:08:39 verbose #16656 > > inl dir = create_temp_directory_name () +00:08:39 verbose #16657 > > dir, dir |> create_directory' +00:08:39 verbose #16658 > > +00:08:39 verbose #16659 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:39 verbose #16660 > > //// test +00:08:39 verbose #16661 > > +00:08:39 verbose #16662 > > types () +00:08:39 verbose #16663 > > inl path, disposable = create_temp_directory () +00:08:39 verbose #16664 > > disposable |> use |> ignore +00:08:39 verbose #16665 > > path +00:08:39 verbose #16666 > > |> directory_exists +00:08:39 verbose #16667 > > |> _assert_eq true +00:08:40 verbose #16668 > > +00:08:40 verbose #16669 > > ╭─[ 675.39ms - stdout ]────────────────────────────────────────────────────────╮ +00:08:40 verbose #16670 > > │ assert_eq / actual: true / expected: true │ +00:08:40 verbose #16671 > > │ │ +00:08:40 verbose #16672 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:40 verbose #16673 > > +00:08:40 verbose #16674 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:40 verbose #16675 > > //// test +00:08:40 verbose #16676 > > ///! rust -d chrono +00:08:40 verbose #16677 > > +00:08:40 verbose #16678 > > types () +00:08:40 verbose #16679 > > inl path, disposable = create_temp_directory () +00:08:40 verbose #16680 > > path +00:08:40 verbose #16681 > > |> directory_exists +00:08:40 verbose #16682 > > |> _assert_eq true +00:08:40 verbose #16683 > > disposable |> use |> ignore +00:08:40 verbose #16684 > > path +00:08:40 verbose #16685 > > |> directory_exists +00:08:40 verbose #16686 > > |> _assert_eq false +00:08:45 verbose #16687 > > +00:08:45 verbose #16688 > > ╭─[ 4.94s - return value ]─────────────────────────────────────────────────────╮ +00:08:45 verbose #16689 > > │ 00:00:00 verbose #1 file_system.create_directory / dir: │ +00:08:45 verbose #16690 > > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_cb118497526386c187d0c81caf │ +00:08:45 verbose #16691 > > │ e3ce9e1f2dafe424a06284e7d41c6389d8b3b4\20240520-0446-5410-0906-0000000189cc │ +00:08:45 verbose #16692 > > │ assert_eq / actual: true / expected: true │ +00:08:45 verbose #16693 > > │ assert_eq / actual: false / expected: false │ +00:08:45 verbose #16694 > > │ │ +00:08:45 verbose #16695 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:45 verbose #16696 > > +00:08:45 verbose #16697 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:45 verbose #16698 > > //// test +00:08:45 verbose #16699 > > +00:08:45 verbose #16700 > > inl lock_directory path = +00:08:45 verbose #16701 > > fun () => +00:08:45 verbose #16702 > > trace Debug (fun () => "_1") _locals +00:08:45 verbose #16703 > > "0" |> write_all_text_async (path </> "test.txt") |> async.do +00:08:45 verbose #16704 > > file_stream +00:08:45 verbose #16705 > > (path </> "test.txt") +00:08:45 verbose #16706 > > ModeOpen +00:08:45 verbose #16707 > > AccessReadWrite +00:08:45 verbose #16708 > > ShareNone +00:08:45 verbose #16709 > > |> use +00:08:45 verbose #16710 > > |> ignore +00:08:45 verbose #16711 > > trace Debug (fun () => "_2") _locals +00:08:45 verbose #16712 > > async.sleep 2000 |> async.do +00:08:45 verbose #16713 > > trace Debug (fun () => "_3") _locals +00:08:45 verbose #16714 > > () |> return +00:08:45 verbose #16715 > > |> async.new_async +00:08:45 verbose #16716 > > +00:08:45 verbose #16717 > > types () +00:08:45 verbose #16718 > > inl temp_dir, disposable = create_temp_directory () +00:08:45 verbose #16719 > > disposable |> use |> ignore +00:08:45 verbose #16720 > > inl path = temp_dir </> "test" +00:08:45 verbose #16721 > > +00:08:45 verbose #16722 > > fun () => +00:08:45 verbose #16723 > > trace Debug (fun () => "1") _locals +00:08:45 verbose #16724 > > path |> create_directory |> ignore +00:08:45 verbose #16725 > > trace Debug (fun () => "2") _locals +00:08:45 verbose #16726 > > inl child = path |> lock_directory |> async.start_child |> async.let' +00:08:45 verbose #16727 > > trace Debug (fun () => "3") _locals +00:08:45 verbose #16728 > > async.sleep 60 |> async.do +00:08:45 verbose #16729 > > trace Debug (fun () => "4") _locals +00:08:45 verbose #16730 > > inl retries = path |> delete_directory_async |> async.let' +00:08:45 verbose #16731 > > trace Debug (fun () => "5") _locals +00:08:45 verbose #16732 > > child |> async.do +00:08:45 verbose #16733 > > trace Debug (fun () => "6") _locals +00:08:45 verbose #16734 > > retries |> return +00:08:45 verbose #16735 > > |> async.new_async_unit +00:08:45 verbose #16736 > > |> async.run_with_timeout 3000 +00:08:45 verbose #16737 > > |> fun x => x : _ i64 +00:08:45 verbose #16738 > > |> function +00:08:45 verbose #16739 > > | Some (retries : i64) => +00:08:45 verbose #16740 > > retries +00:08:45 verbose #16741 > > |> _assert_between +00:08:45 verbose #16742 > > (if runtime.is_windows () then 50 else 0) +00:08:45 verbose #16743 > > (if runtime.is_windows () then 150 else 0) +00:08:45 verbose #16744 > > +00:08:45 verbose #16745 > > true +00:08:45 verbose #16746 > > | _ => false +00:08:45 verbose #16747 > > |> _assert_eq true +00:08:47 verbose #16748 > > +00:08:47 verbose #16749 > > ╭─[ 2.65s - stdout ]───────────────────────────────────────────────────────────╮ +00:08:47 verbose #16750 > > │ 00:00:00 debug #1 1 │ +00:08:47 verbose #16751 > > │ 00:00:00 debug #2 2 │ +00:08:47 verbose #16752 > > │ 00:00:00 debug #3 _1 │ +00:08:47 verbose #16753 > > │ 00:00:00 debug #4 3 │ +00:08:47 verbose #16754 > > │ 00:00:00 debug #5 _2 │ +00:08:47 verbose #16755 > > │ 00:00:00 debug #6 4 │ +00:08:47 verbose #16756 > > │ 00:00:00 debug #7 file_system.delete_directory_async / path: test / ex: │ +00:08:47 verbose #16757 > > │ System.IO.IOException: The process cannot access the file 'test.txt' because │ +00:08:47 verbose #16758 > > │ it is being used by another process. │ +00:08:47 verbose #16759 > > │ 00:00:01 debug #8 file_system.delete_directory_async / path: test / ex: │ +00:08:47 verbose #16760 > > │ System.IO.IOException: The process cannot access the file 'test.txt' because │ +00:08:47 verbose #16761 > > │ it is being used by another process. │ +00:08:47 verbose #16762 > > │ 00:00:02 debug #9 _3 │ +00:08:47 verbose #16763 > > │ 00:00:02 debug #10 5 │ +00:08:47 verbose #16764 > > │ 00:00:02 debug #11 6 │ +00:08:47 verbose #16765 > > │ assert_between / actual: 124L / expected: struct (50L, 150L) │ +00:08:47 verbose #16766 > > │ assert_eq / actual: true / expected: true │ +00:08:47 verbose #16767 > > │ │ +00:08:47 verbose #16768 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:47 verbose #16769 > > +00:08:47 verbose #16770 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:47 verbose #16771 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:47 verbose #16772 > > │ ## wait_for_file_access │ +00:08:47 verbose #16773 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:47 verbose #16774 > > +00:08:47 verbose #16775 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:47 verbose #16776 > > inl wait_for_file_access access path = +00:08:47 verbose #16777 > > run_target function +00:08:47 verbose #16778 > > | Fsharp (Native) => fun () => +00:08:47 verbose #16779 > > inl file_access, file_share = +00:08:47 verbose #16780 > > access +00:08:47 verbose #16781 > > |> optionm'.default_value (AccessReadWrite, ShareRead) +00:08:47 verbose #16782 > > let rec loop (retry : i64) : _ i64 = +00:08:47 verbose #16783 > > fun () => +00:08:47 verbose #16784 > > try_unit +00:08:47 verbose #16785 > > fun () => +00:08:47 verbose #16786 > > file_stream +00:08:47 verbose #16787 > > path +00:08:47 verbose #16788 > > ModeOpen +00:08:47 verbose #16789 > > file_access +00:08:47 verbose #16790 > > file_share +00:08:47 verbose #16791 > > |> use +00:08:47 verbose #16792 > > |> ignore +00:08:47 verbose #16793 > > retry |> return +00:08:47 verbose #16794 > > fun ex => +00:08:47 verbose #16795 > > if retry > 0 && retry % 100i64 = 0 then +00:08:47 verbose #16796 > > inl ex = ex |> sm'.format_exception +00:08:47 verbose #16797 > > trace Debug +00:08:47 verbose #16798 > > fun () => "file_system.wait_for_file_access" +00:08:47 verbose #16799 > > fun () => $'$"path: {!path |> +00:08:47 verbose #16800 > > !get_file_name} / retry: {!retry} / ex: {!ex} / {!_locals ()}"' +00:08:47 verbose #16801 > > async.sleep 10i32 |> async.do +00:08:47 verbose #16802 > > loop (retry + 1) |> async.return_await +00:08:47 verbose #16803 > > |> async.new_async +00:08:47 verbose #16804 > > loop 0 +00:08:47 verbose #16805 > > | _ => fun () => null () +00:08:47 verbose #16806 > > +00:08:47 verbose #16807 > > inl wait_for_file_access_read path = +00:08:47 verbose #16808 > > path +00:08:47 verbose #16809 > > |> wait_for_file_access (Some ( +00:08:47 verbose #16810 > > AccessRead, +00:08:47 verbose #16811 > > ShareRead +00:08:47 verbose #16812 > > )) +00:08:47 verbose #16813 > > +00:08:47 verbose #16814 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:47 verbose #16815 > > //// test +00:08:47 verbose #16816 > > +00:08:47 verbose #16817 > > inl lock_file path = +00:08:47 verbose #16818 > > fun () => +00:08:47 verbose #16819 > > trace Debug (fun () => "_1") _locals +00:08:47 verbose #16820 > > inl stream : file_stream' = +00:08:47 verbose #16821 > > file_stream +00:08:47 verbose #16822 > > path +00:08:47 verbose #16823 > > ModeOpen +00:08:47 verbose #16824 > > AccessReadWrite +00:08:47 verbose #16825 > > ShareNone +00:08:47 verbose #16826 > > |> use +00:08:47 verbose #16827 > > trace Debug (fun () => "_2") _locals +00:08:47 verbose #16828 > > async.sleep 2000 |> async.do +00:08:47 verbose #16829 > > trace Debug (fun () => "_3") _locals +00:08:47 verbose #16830 > > ($'!stream.Seek (0L, System.IO.SeekOrigin.Begin)' : i64) |> ignore +00:08:47 verbose #16831 > > trace Debug (fun () => "_4") _locals +00:08:47 verbose #16832 > > $'!stream.WriteByte' 49u8 +00:08:47 verbose #16833 > > trace Debug (fun () => "_5") _locals +00:08:47 verbose #16834 > > stream |> $'_.Flush()' +00:08:47 verbose #16835 > > trace Debug (fun () => "_6") _locals +00:08:47 verbose #16836 > > |> async.new_async +00:08:47 verbose #16837 > > +00:08:47 verbose #16838 > > types () +00:08:47 verbose #16839 > > inl temp_dir, disposable = create_temp_directory () +00:08:47 verbose #16840 > > disposable |> use |> ignore +00:08:47 verbose #16841 > > inl path = temp_dir </> "test.txt" +00:08:47 verbose #16842 > > +00:08:47 verbose #16843 > > fun () => +00:08:47 verbose #16844 > > trace Debug (fun () => "1") _locals +00:08:47 verbose #16845 > > "0" |> write_all_text_async path |> async.do +00:08:47 verbose #16846 > > trace Debug (fun () => "2") _locals +00:08:47 verbose #16847 > > inl child = path |> lock_file |> async.start_child |> async.let' +00:08:47 verbose #16848 > > trace Debug (fun () => "3") _locals +00:08:47 verbose #16849 > > async.sleep 1 |> async.do +00:08:47 verbose #16850 > > trace Debug (fun () => "4") _locals +00:08:47 verbose #16851 > > inl retries = path |> wait_for_file_access None |> async.let' +00:08:47 verbose #16852 > > trace Debug (fun () => "5") _locals +00:08:47 verbose #16853 > > inl text = path |> read_all_text_async |> async.let' +00:08:47 verbose #16854 > > trace Debug (fun () => "6") _locals +00:08:47 verbose #16855 > > child |> async.do +00:08:47 verbose #16856 > > trace Debug (fun () => "7") _locals +00:08:47 verbose #16857 > > (retries, text) |> return +00:08:47 verbose #16858 > > |> async.new_async_unit +00:08:47 verbose #16859 > > |> async.run_with_timeout 3000 +00:08:47 verbose #16860 > > |> function +00:08:47 verbose #16861 > > | Some ((retries : i64), text) => +00:08:47 verbose #16862 > > retries +00:08:47 verbose #16863 > > |> _assert_between +00:08:47 verbose #16864 > > (if runtime.is_windows () then 50 else 100) +00:08:47 verbose #16865 > > (if runtime.is_windows () then 150 else 200) +00:08:47 verbose #16866 > > +00:08:47 verbose #16867 > > text |> _assert_eq (join "1") +00:08:47 verbose #16868 > > +00:08:47 verbose #16869 > > true +00:08:47 verbose #16870 > > | _ => false +00:08:47 verbose #16871 > > |> _assert_eq true +00:08:50 verbose #16872 > > +00:08:50 verbose #16873 > > ╭─[ 2.70s - stdout ]───────────────────────────────────────────────────────────╮ +00:08:50 verbose #16874 > > │ 00:00:00 debug #1 1 │ +00:08:50 verbose #16875 > > │ 00:00:00 debug #2 2 │ +00:08:50 verbose #16876 > > │ 00:00:00 debug #3 3 │ +00:08:50 verbose #16877 > > │ 00:00:00 debug #4 _1 │ +00:08:50 verbose #16878 > > │ 00:00:00 debug #5 _2 │ +00:08:50 verbose #16879 > > │ 00:00:00 debug #6 4 │ +00:08:50 verbose #16880 > > │ 00:00:01 debug #7 file_system.wait_for_file_access / path: test.txt / │ +00:08:50 verbose #16881 > > │ retry: 100 / ex: System.IO.IOException: The process cannot access the file │ +00:08:50 verbose #16882 > > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-0446-5754-5467-5004 │ +00:08:50 verbose #16883 > > │ 00c7364e\test.txt' because it is being used by another process. │ +00:08:50 verbose #16884 > > │ 00:00:02 debug #8 _3 │ +00:08:50 verbose #16885 > > │ 00:00:02 debug #9 _4 │ +00:08:50 verbose #16886 > > │ 00:00:02 debug #10 _5 │ +00:08:50 verbose #16887 > > │ 00:00:02 debug #11 _6 │ +00:08:50 verbose #16888 > > │ 00:00:02 debug #12 5 │ +00:08:50 verbose #16889 > > │ 00:00:02 debug #13 6 │ +00:08:50 verbose #16890 > > │ 00:00:02 debug #14 7 │ +00:08:50 verbose #16891 > > │ assert_between / actual: 128L / expected: struct (50L, 150L) │ +00:08:50 verbose #16892 > > │ assert_eq / actual: "1" / expected: "1" │ +00:08:50 verbose #16893 > > │ assert_eq / actual: true / expected: true │ +00:08:50 verbose #16894 > > │ │ +00:08:50 verbose #16895 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:50 verbose #16896 > > +00:08:50 verbose #16897 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:50 verbose #16898 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:50 verbose #16899 > > │ ## read_all_text_retry_async │ +00:08:50 verbose #16900 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:50 verbose #16901 > > +00:08:50 verbose #16902 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:50 verbose #16903 > > inl read_all_text_retry_async full_path : async.async (optionm'.option' string) +00:08:50 verbose #16904 > > = +00:08:50 verbose #16905 > > run_target function +00:08:50 verbose #16906 > > | Fsharp (Native) => fun () => +00:08:50 verbose #16907 > > let rec loop (retry : i64) = +00:08:50 verbose #16908 > > fun () => +00:08:50 verbose #16909 > > try_unit +00:08:50 verbose #16910 > > fun () => +00:08:50 verbose #16911 > > if retry > 0 +00:08:50 verbose #16912 > > then +00:08:50 verbose #16913 > > full_path +00:08:50 verbose #16914 > > |> wait_for_file_access_read +00:08:50 verbose #16915 > > |> async.run_with_timeout_async 1000 +00:08:50 verbose #16916 > > |> async.ignore +00:08:50 verbose #16917 > > |> async.do +00:08:50 verbose #16918 > > full_path |> read_all_text_async |> async.map (Some +00:08:50 verbose #16919 > > >> optionm'.box) |> async.return_await +00:08:50 verbose #16920 > > fun ex => +00:08:50 verbose #16921 > > fix_condition +00:08:50 verbose #16922 > > fun () => retry <> 0 +00:08:50 verbose #16923 > > fun () => +00:08:50 verbose #16924 > > inl ex = ex |> sm'.format_exception +00:08:50 verbose #16925 > > let _locals () = $'$"retry: {!retry} / ex: +00:08:50 verbose #16926 > > {!ex} / {!_locals ()}"' +00:08:50 verbose #16927 > > trace Debug (fun () => +00:08:50 verbose #16928 > > $'"read_all_text_retry_async"' : string) _locals +00:08:50 verbose #16929 > > (None : _ string) |> optionm'.box |> return +00:08:50 verbose #16930 > > fun () => +00:08:50 verbose #16931 > > loop (retry + 1) |> async.return_await +00:08:50 verbose #16932 > > |> async.new_async +00:08:50 verbose #16933 > > loop 0 +00:08:50 verbose #16934 > > | _ => fun () => null () +00:08:50 verbose #16935 > > +00:08:50 verbose #16936 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:50 verbose #16937 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:50 verbose #16938 > > │ ## delete_file_async │ +00:08:50 verbose #16939 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:50 verbose #16940 > > +00:08:50 verbose #16941 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:50 verbose #16942 > > inl delete_file_async path : _ i64 = +00:08:50 verbose #16943 > > run_target function +00:08:50 verbose #16944 > > | Fsharp (Native) => fun () => +00:08:50 verbose #16945 > > let rec loop (retry : i64) = +00:08:50 verbose #16946 > > fun () => +00:08:50 verbose #16947 > > try_unit +00:08:50 verbose #16948 > > fun () => +00:08:50 verbose #16949 > > path |> file_delete +00:08:50 verbose #16950 > > return retry +00:08:50 verbose #16951 > > fun ex => +00:08:50 verbose #16952 > > if retry % 100 = 0 then +00:08:50 verbose #16953 > > trace Warning +00:08:50 verbose #16954 > > fun () => "delete_file_async" +00:08:50 verbose #16955 > > fun () => +00:08:50 verbose #16956 > > inl ex = ex |> sm'.format_exception +00:08:50 verbose #16957 > > $'$"path: {!path |> !get_file_name} +00:08:50 verbose #16958 > > ex: {!ex} / {!_locals ()}"' +00:08:50 verbose #16959 > > async.sleep 10 |> async.do +00:08:50 verbose #16960 > > loop (retry + 1) |> async.return_await +00:08:50 verbose #16961 > > |> async.new_async +00:08:50 verbose #16962 > > loop 0 +00:08:50 verbose #16963 > > | _ => fun () => null () +00:08:50 verbose #16964 > > +00:08:50 verbose #16965 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:50 verbose #16966 > > //// test +00:08:50 verbose #16967 > > +00:08:50 verbose #16968 > > inl lock_file path = +00:08:50 verbose #16969 > > fun () => +00:08:50 verbose #16970 > > trace Debug (fun () => "_1") _locals +00:08:50 verbose #16971 > > file_stream +00:08:50 verbose #16972 > > path +00:08:50 verbose #16973 > > ModeOpen +00:08:50 verbose #16974 > > AccessReadWrite +00:08:50 verbose #16975 > > ShareNone +00:08:50 verbose #16976 > > |> use +00:08:50 verbose #16977 > > |> ignore +00:08:50 verbose #16978 > > trace Debug (fun () => "_2") _locals +00:08:50 verbose #16979 > > async.sleep 2000 |> async.do +00:08:50 verbose #16980 > > trace Debug (fun () => "_3") _locals +00:08:50 verbose #16981 > > |> async.new_async +00:08:50 verbose #16982 > > +00:08:50 verbose #16983 > > types () +00:08:50 verbose #16984 > > inl temp_dir, disposable = create_temp_directory () +00:08:50 verbose #16985 > > disposable |> use |> ignore +00:08:50 verbose #16986 > > inl path = temp_dir </> "test.txt" +00:08:50 verbose #16987 > > +00:08:50 verbose #16988 > > fun () => +00:08:50 verbose #16989 > > trace Debug (fun () => "1") _locals +00:08:50 verbose #16990 > > "0" |> write_all_text_async path |> async.do +00:08:50 verbose #16991 > > trace Debug (fun () => "2") _locals +00:08:50 verbose #16992 > > inl child = lock_file path |> async.start_child |> async.let' +00:08:50 verbose #16993 > > trace Debug (fun () => "3") _locals +00:08:50 verbose #16994 > > async.sleep 1 |> async.do +00:08:50 verbose #16995 > > trace Debug (fun () => "4") _locals +00:08:50 verbose #16996 > > inl retries = delete_file_async path |> async.let' +00:08:50 verbose #16997 > > trace Debug (fun () => "5") _locals +00:08:50 verbose #16998 > > child |> async.do +00:08:50 verbose #16999 > > trace Debug (fun () => "6") _locals +00:08:50 verbose #17000 > > return retries +00:08:50 verbose #17001 > > |> async.new_async_unit +00:08:50 verbose #17002 > > |> async.run_with_timeout 3000 +00:08:50 verbose #17003 > > |> function +00:08:50 verbose #17004 > > | Some (retries : i64) => +00:08:50 verbose #17005 > > retries +00:08:50 verbose #17006 > > |> _assert_between +00:08:50 verbose #17007 > > (if runtime.is_windows () then 50 else 0) +00:08:50 verbose #17008 > > (if runtime.is_windows () then 150 else 0) +00:08:50 verbose #17009 > > +00:08:50 verbose #17010 > > true +00:08:50 verbose #17011 > > | _ => false +00:08:50 verbose #17012 > > |> _assert_eq true +00:08:53 verbose #17013 > > +00:08:53 verbose #17014 > > ╭─[ 2.71s - stdout ]───────────────────────────────────────────────────────────╮ +00:08:53 verbose #17015 > > │ 00:00:00 debug #1 1 │ +00:08:53 verbose #17016 > > │ 00:00:00 debug #2 2 │ +00:08:53 verbose #17017 > > │ 00:00:00 debug #3 3 │ +00:08:53 verbose #17018 > > │ 00:00:00 debug #4 _1 │ +00:08:53 verbose #17019 > > │ 00:00:00 debug #5 _2 │ +00:08:53 verbose #17020 > > │ 00:00:00 debug #6 4 │ +00:08:53 verbose #17021 > > │ 00:00:00 warning #7 delete_file_async / path: test.txt / ex: │ +00:08:53 verbose #17022 > > │ System.IO.IOException: The process cannot access the file │ +00:08:53 verbose #17023 > > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-0447-0025-2564-2004 │ +00:08:53 verbose #17024 > > │ 005c48d7\test.txt' because it is being used by another process. │ +00:08:53 verbose #17025 > > │ 00:00:01 warning #8 delete_file_async / path: test.txt / ex: │ +00:08:53 verbose #17026 > > │ System.IO.IOException: The process cannot access the file │ +00:08:53 verbose #17027 > > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240520-0447-0025-2564-2004 │ +00:08:53 verbose #17028 > > │ 005c48d7\test.txt' because it is being used by another process. │ +00:08:53 verbose #17029 > > │ 00:00:02 debug #9 _3 │ +00:08:53 verbose #17030 > > │ 00:00:02 debug #10 5 │ +00:08:53 verbose #17031 > > │ 00:00:02 debug #11 6 │ +00:08:53 verbose #17032 > > │ assert_between / actual: 129L / expected: struct (50L, 150L) │ +00:08:53 verbose #17033 > > │ assert_eq / actual: true / expected: true │ +00:08:53 verbose #17034 > > │ │ +00:08:53 verbose #17035 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:53 verbose #17036 > > +00:08:53 verbose #17037 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:53 verbose #17038 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:53 verbose #17039 > > │ ## move_file_async │ +00:08:53 verbose #17040 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:53 verbose #17041 > > +00:08:53 verbose #17042 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:53 verbose #17043 > > inl move_file_async new_path old_path : _ i64 = +00:08:53 verbose #17044 > > run_target function +00:08:53 verbose #17045 > > | Fsharp (Native) => fun () => +00:08:53 verbose #17046 > > let rec loop (retry : i64) = +00:08:53 verbose #17047 > > fun () => +00:08:53 verbose #17048 > > try_unit +00:08:53 verbose #17049 > > fun () => +00:08:53 verbose #17050 > > old_path |> file_move new_path +00:08:53 verbose #17051 > > return retry +00:08:53 verbose #17052 > > fun ex => +00:08:53 verbose #17053 > > if retry % 100 = 0 then +00:08:53 verbose #17054 > > inl _locals () = +00:08:53 verbose #17055 > > inl ex = ex |> sm'.format_exception +00:08:53 verbose #17056 > > $'$"old_path: {!old_path |> !get_file_name} +00:08:53 verbose #17057 > > / new_path: {!new_path |> !get_file_name} / ex: {!ex} / {!_locals ()}"' +00:08:53 verbose #17058 > > trace Warning (fun () => "move_file_async") +00:08:53 verbose #17059 > > _locals +00:08:53 verbose #17060 > > async.sleep 10 |> async.do +00:08:53 verbose #17061 > > loop (retry + 1) |> async.return_await +00:08:53 verbose #17062 > > |> async.new_async_unit +00:08:53 verbose #17063 > > loop 0 +00:08:53 verbose #17064 > > | _ => fun () => null () +00:08:53 verbose #17065 > > +00:08:53 verbose #17066 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:53 verbose #17067 > > //// test +00:08:53 verbose #17068 > > +00:08:53 verbose #17069 > > inl lock_file path = +00:08:53 verbose #17070 > > fun () => +00:08:53 verbose #17071 > > trace Debug (fun () => "_1") _locals +00:08:53 verbose #17072 > > file_stream +00:08:53 verbose #17073 > > path +00:08:53 verbose #17074 > > ModeOpen +00:08:53 verbose #17075 > > AccessReadWrite +00:08:53 verbose #17076 > > ShareNone +00:08:53 verbose #17077 > > |> use +00:08:53 verbose #17078 > > |> ignore +00:08:53 verbose #17079 > > trace Debug (fun () => "_2") _locals +00:08:53 verbose #17080 > > async.sleep 2000 |> async.do +00:08:53 verbose #17081 > > trace Debug (fun () => "_3") _locals +00:08:53 verbose #17082 > > |> async.new_async +00:08:53 verbose #17083 > > +00:08:53 verbose #17084 > > types () +00:08:53 verbose #17085 > > inl temp_dir, disposable = create_temp_directory () +00:08:53 verbose #17086 > > disposable |> use |> ignore +00:08:53 verbose #17087 > > let path = temp_dir </> "test.txt" +00:08:53 verbose #17088 > > let new_path = temp_dir </> "test2.txt" +00:08:53 verbose #17089 > > +00:08:53 verbose #17090 > > fun () => +00:08:53 verbose #17091 > > trace Debug (fun () => "1") _locals +00:08:53 verbose #17092 > > "0" |> write_all_text_async path |> async.do +00:08:53 verbose #17093 > > trace Debug (fun () => "2") _locals +00:08:53 verbose #17094 > > inl child = lock_file path |> async.start_child |> async.let' +00:08:53 verbose #17095 > > trace Debug (fun () => "3") _locals +00:08:53 verbose #17096 > > async.sleep 1 |> async.do +00:08:53 verbose #17097 > > trace Debug (fun () => "4") _locals +00:08:53 verbose #17098 > > inl retries1 = path |> move_file_async new_path |> async.let' +00:08:53 verbose #17099 > > trace Debug (fun () => "5") _locals +00:08:53 verbose #17100 > > inl retries2 = new_path |> wait_for_file_access None |> async.let' +00:08:53 verbose #17101 > > trace Debug (fun () => "6") _locals +00:08:53 verbose #17102 > > inl text = new_path |> read_all_text_async |> async.let' +00:08:53 verbose #17103 > > trace Debug (fun () => "7") _locals +00:08:53 verbose #17104 > > child |> async.do +00:08:53 verbose #17105 > > trace Debug (fun () => "8") _locals +00:08:53 verbose #17106 > > (retries1, retries2, text) |> return +00:08:53 verbose #17107 > > |> async.new_async_unit +00:08:53 verbose #17108 > > |> async.run_with_timeout 3000 +00:08:53 verbose #17109 > > |> function +00:08:53 verbose #17110 > > | Some (retries1, retries2, text) => +00:08:53 verbose #17111 > > retries1 +00:08:53 verbose #17112 > > |> _assert_between +00:08:53 verbose #17113 > > (if runtime.is_windows () then 50i64 else 0) +00:08:53 verbose #17114 > > (if runtime.is_windows () then 150 else 0) +00:08:53 verbose #17115 > > +00:08:53 verbose #17116 > > retries2 +00:08:53 verbose #17117 > > |> _assert_between +00:08:53 verbose #17118 > > (if runtime.is_windows () then 0i64 else 100) +00:08:53 verbose #17119 > > (if runtime.is_windows () then 0 else 200) +00:08:53 verbose #17120 > > +00:08:53 verbose #17121 > > text |> _assert_eq (join "0") +00:08:53 verbose #17122 > > +00:08:53 verbose #17123 > > true +00:08:53 verbose #17124 > > | _ => false +00:08:53 verbose #17125 > > |> _assert_eq true +00:08:56 verbose #17126 > > +00:08:56 verbose #17127 > > ╭─[ 2.99s - stdout ]───────────────────────────────────────────────────────────╮ +00:08:56 verbose #17128 > > │ 00:00:00 debug #1 1 │ +00:08:56 verbose #17129 > > │ 00:00:00 debug #2 2 │ +00:08:56 verbose #17130 > > │ 00:00:00 debug #3 3 │ +00:08:56 verbose #17131 > > │ 00:00:00 debug #4 _1 │ +00:08:56 verbose #17132 > > │ 00:00:00 debug #5 _2 │ +00:08:56 verbose #17133 > > │ 00:00:00 debug #6 4 │ +00:08:56 verbose #17134 > > │ 00:00:00 warning #7 move_file_async / old_path: test.txt / new_path: │ +00:08:56 verbose #17135 > > │ test2.txt / ex: System.IO.IOException: The process cannot access the file │ +00:08:56 verbose #17136 > > │ because it is being used by another process. │ +00:08:56 verbose #17137 > > │ 00:00:01 warning #8 move_file_async / old_path: test.txt / new_path: │ +00:08:56 verbose #17138 > > │ test2.txt / ex: System.IO.IOException: The process cannot access the file │ +00:08:56 verbose #17139 > > │ because it is being used by another process. │ +00:08:56 verbose #17140 > > │ 00:00:02 debug #9 _3 │ +00:08:56 verbose #17141 > > │ 00:00:02 debug #10 5 │ +00:08:56 verbose #17142 > > │ 00:00:02 debug #11 6 │ +00:08:56 verbose #17143 > > │ 00:00:02 debug #12 7 │ +00:08:56 verbose #17144 > > │ 00:00:02 debug #13 8 │ +00:08:56 verbose #17145 > > │ assert_between / actual: 128L / expected: struct (50L, 150L) │ +00:08:56 verbose #17146 > > │ assert_between / actual: 0L / expected: struct (0L, 0L) │ +00:08:56 verbose #17147 > > │ assert_eq / actual: "0" / expected: "0" │ +00:08:56 verbose #17148 > > │ assert_eq / actual: true / expected: true │ +00:08:56 verbose #17149 > > │ │ +00:08:56 verbose #17150 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:56 verbose #17151 > > +00:08:56 verbose #17152 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:08:56 verbose #17153 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:08:56 verbose #17154 > > │ ## find_parent │ +00:08:56 verbose #17155 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:56 verbose #17156 > > +00:08:56 verbose #17157 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:56 verbose #17158 > > inl find_parent name is_file root_dir = +00:08:56 verbose #17159 > > let rec loop dir = +00:08:56 verbose #17160 > > if dir </> name |> (if is_file then file_exists else directory_exists) +00:08:56 verbose #17161 > > then dir +00:08:56 verbose #17162 > > else +00:08:56 verbose #17163 > > inl result = dir |> (join directory_get_parent) +00:08:56 verbose #17164 > > match result |> optionm'.unbox with +00:08:56 verbose #17165 > > | Some parent => parent |> loop +00:08:56 verbose #17166 > > | None => failwith $'$"""No parent for {if !is_file then "file" else +00:08:56 verbose #17167 > > "dir"} \'{!name}\' at \'{!root_dir}\' (until \'{!dir}\')"""' +00:08:56 verbose #17168 > > loop root_dir +00:08:56 verbose #17169 > > +00:08:56 verbose #17170 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:56 verbose #17171 > > //// test +00:08:56 verbose #17172 > > +00:08:56 verbose #17173 > > a ;[[ ".paket", false; "paket.dependencies", true ]] +00:08:56 verbose #17174 > > |> am.map fun (file, is_file) => +00:08:56 verbose #17175 > > get_source_directory () +00:08:56 verbose #17176 > > |> find_parent file is_file +00:08:56 verbose #17177 > > |> directory_info +00:08:56 verbose #17178 > > |> directory_info_name +00:08:56 verbose #17179 > > |> am'.distinct +00:08:56 verbose #17180 > > |> _assert_eq (a ;[[ "polyglot" ]] : _ i32 _) +00:08:56 verbose #17181 > > +00:08:56 verbose #17182 > > ╭─[ 101.66ms - stdout ]────────────────────────────────────────────────────────╮ +00:08:56 verbose #17183 > > │ assert_eq / actual: [|"polyglot"|] / expected: [|"polyglot"|] │ +00:08:56 verbose #17184 > > │ │ +00:08:56 verbose #17185 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:08:56 verbose #17186 > > +00:08:56 verbose #17187 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:08:56 verbose #17188 > > //// test +00:08:56 verbose #17189 > > ///! rust +00:08:56 verbose #17190 > > +00:08:56 verbose #17191 > > types () +00:08:56 verbose #17192 > > a ;[[ ".paket", false; "paket.dependencies", true ]] +00:08:56 verbose #17193 > > |> am.map fun (file, is_file) => +00:08:56 verbose #17194 > > fun () => +00:08:56 verbose #17195 > > join +00:08:56 verbose #17196 > > get_source_directory () +00:08:56 verbose #17197 > > |> find_parent file is_file +00:08:56 verbose #17198 > > |> sm'.to_std_string +00:08:56 verbose #17199 > > |> new_path_buf +00:08:56 verbose #17200 > > |> path_buf_file_name +00:08:56 verbose #17201 > > |> optionm'.try' +00:08:56 verbose #17202 > > |> sm'.from_os_str_ref +00:08:56 verbose #17203 > > |> Some +00:08:56 verbose #17204 > > |> optionm'.box +00:08:56 verbose #17205 > > |> fun x => x () |> optionm'.unbox +00:08:56 verbose #17206 > > |> optionm'.default_value "" +00:08:56 verbose #17207 > > |> am'.distinct +00:08:56 verbose #17208 > > |> fun result => +00:08:56 verbose #17209 > > result |> am'.length |> _assert_eq 1i32 +00:08:56 verbose #17210 > > index result 0i32 |> _assert_eq "polyglot" +00:09:01 verbose #17211 > > +00:09:01 verbose #17212 > > ╭─[ 4.59s - return value ]─────────────────────────────────────────────────────╮ +00:09:01 verbose #17213 > > │ assert_eq / actual: 1 / expected: 1 │ +00:09:01 verbose #17214 > > │ assert_eq / actual: "polyglot" / expected: "polyglot" │ +00:09:01 verbose #17215 > > │ │ +00:09:01 verbose #17216 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:01 verbose #17217 > > +00:09:01 verbose #17218 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:01 verbose #17219 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:01 verbose #17220 > > │ ## get_workspace_root │ +00:09:01 verbose #17221 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:01 verbose #17222 > > +00:09:01 verbose #17223 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:01 verbose #17224 > > inl get_workspace_root () = +00:09:01 verbose #17225 > > get_source_directory () +00:09:01 verbose #17226 > > |> find_parent ("polyglot" </> ".paket") false +00:09:01 verbose #17227 > > |> fun root => root </> "polyglot" +00:09:01 verbose #17228 > > +00:09:01 verbose #17229 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:01 verbose #17230 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:01 verbose #17231 > > │ ## standardize_path │ +00:09:01 verbose #17232 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:01 verbose #17233 > > +00:09:01 verbose #17234 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:01 verbose #17235 > > let standardize_path path = +00:09:01 verbose #17236 > > path |> get_full_path |> normalize_path +00:09:01 verbose #17237 > > +00:09:01 verbose #17238 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:01 verbose #17239 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:01 verbose #17240 > > │ ## absolute_path │ +00:09:01 verbose #17241 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:01 verbose #17242 > > +00:09:01 verbose #17243 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:01 verbose #17244 > > let absolute_path path = +00:09:01 verbose #17245 > > inl current_dir = get_current_directory () +00:09:01 verbose #17246 > > current_dir </> path |> standardize_path +00:09:01 verbose #17247 > > +00:09:01 verbose #17248 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:01 verbose #17249 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:01 verbose #17250 > > │ ## new_file_uri │ +00:09:01 verbose #17251 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:01 verbose #17252 > > +00:09:01 verbose #17253 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:01 verbose #17254 > > inl new_file_uri (path : string) : string = +00:09:01 verbose #17255 > > inl path = path |> sm'.trim_start ;[[ '/' ]] +00:09:01 verbose #17256 > > $'$"file:///{!path}"' +00:09:01 verbose #17257 > > +00:09:01 verbose #17258 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:01 verbose #17259 > > //// test +00:09:01 verbose #17260 > > +00:09:01 verbose #17261 > > @"\\?\C:\test" +00:09:01 verbose #17262 > > |> normalize_path +00:09:01 verbose #17263 > > |> new_file_uri +00:09:01 verbose #17264 > > |> _assert_eq "file:///c:/test" +00:09:01 verbose #17265 > > +00:09:01 verbose #17266 > > ╭─[ 31.47ms - stdout ]─────────────────────────────────────────────────────────╮ +00:09:01 verbose #17267 > > │ assert_eq / actual: "file:///c:/test" / expected: "file:///c:/test" │ +00:09:01 verbose #17268 > > │ │ +00:09:01 verbose #17269 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:01 verbose #17270 > > +00:09:01 verbose #17271 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:01 verbose #17272 > > //// test +00:09:01 verbose #17273 > > ///! rust -d regex +00:09:01 verbose #17274 > > +00:09:01 verbose #17275 > > types () +00:09:01 verbose #17276 > > @"\\?\C:\test" +00:09:01 verbose #17277 > > |> normalize_path +00:09:01 verbose #17278 > > |> new_file_uri +00:09:01 verbose #17279 > > |> _assert_eq "file:///c:/test" +00:09:05 verbose #17280 > > +00:09:05 verbose #17281 > > ╭─[ 4.41s - return value ]─────────────────────────────────────────────────────╮ +00:09:05 verbose #17282 > > │ assert_eq / actual: "file:///c:/test" / expected: "file:///c:/test" │ +00:09:05 verbose #17283 > > │ │ +00:09:05 verbose #17284 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:05 verbose #17285 > > +00:09:05 verbose #17286 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:05 verbose #17287 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:05 verbose #17288 > > │ ## trace_file │ +00:09:05 verbose #17289 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:05 verbose #17290 > > +00:09:05 verbose #17291 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:05 verbose #17292 > > let rec trace_file text = +00:09:05 verbose #17293 > > run_target function +00:09:05 verbose #17294 > > | Fsharp (Native) => fun () => +00:09:05 verbose #17295 > > try_unit +00:09:05 verbose #17296 > > fun () => +00:09:05 verbose #17297 > > inl assembly_name = env.get_entry_assembly_name () +00:09:05 verbose #17298 > > inl guid = date_time.now () |> date_time.new_guid_from_date_time +00:09:05 verbose #17299 > > inl file_name = $'$"{!assembly_name}_{!guid}.txt"' +00:09:05 verbose #17300 > > +00:09:05 verbose #17301 > > inl workspace_root = get_workspace_root () +00:09:05 verbose #17302 > > inl trace_dir = workspace_root </> "target/polyglot/trace" +00:09:05 verbose #17303 > > trace_dir |> create_directory |> ignore +00:09:05 verbose #17304 > > inl path = trace_dir </> file_name +00:09:05 verbose #17305 > > text |> write_all_text_async path |> async.run_synchronously +00:09:05 verbose #17306 > > fun ex => +00:09:05 verbose #17307 > > trace_file $'$"file_system.trace_file / ex: %A{!ex}"' +00:09:05 verbose #17308 > > | _ => fun () => () +00:09:05 verbose #17309 > > +00:09:05 verbose #17310 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:05 verbose #17311 > > //// test +00:09:05 verbose #17312 > > +00:09:05 verbose #17313 > > inl get_count dir : i64 = +00:09:05 verbose #17314 > > inl files = dir |> file_system.directory_get_files +00:09:05 verbose #17315 > > a files |> am'.length +00:09:05 verbose #17316 > > +00:09:05 verbose #17317 > > types () +00:09:05 verbose #17318 > > inl trace_dir = file_system.get_workspace_root () </> "target/polyglot/trace" +00:09:05 verbose #17319 > > trace_dir |> file_system.create_directory |> ignore +00:09:05 verbose #17320 > > +00:09:05 verbose #17321 > > inl count = get_count trace_dir +00:09:05 verbose #17322 > > +00:09:05 verbose #17323 > > trace_file "test" +00:09:05 verbose #17324 > > +00:09:05 verbose #17325 > > get_count trace_dir +00:09:05 verbose #17326 > > |> _assert_eq (count + 1) +00:09:06 verbose #17327 > > +00:09:06 verbose #17328 > > ╭─[ 383.04ms - stdout ]────────────────────────────────────────────────────────╮ +00:09:06 verbose #17329 > > │ assert_eq / actual: 74L / expected: 74L │ +00:09:06 verbose #17330 > > │ │ +00:09:06 verbose #17331 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:06 verbose #17332 > > +00:09:06 verbose #17333 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:06 verbose #17334 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:06 verbose #17335 > > │ ## init_trace_file │ +00:09:06 verbose #17336 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:06 verbose #17337 > > +00:09:06 verbose #17338 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:06 verbose #17339 > > inl init_trace_file enabled = +00:09:06 verbose #17340 > > inl state_trace_file = get_trace_state_or_init None .trace_file +00:09:06 verbose #17341 > > state_trace_file <- if enabled then trace_file else ignore +00:09:06 verbose #17342 > > +00:09:06 verbose #17343 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:06 verbose #17344 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:06 verbose #17345 > > │ ## main │ +00:09:06 verbose #17346 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:06 verbose #17347 > > +00:09:06 verbose #17348 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:06 verbose #17349 > > inl main () = +00:09:06 verbose #17350 > > types () +00:09:06 verbose #17351 > > init_trace_state None +00:09:06 verbose #17352 > > $"let delete_directory_async x = !delete_directory_async x" : () +00:09:06 verbose #17353 > > $"let wait_for_file_access x = !wait_for_file_access x" : () +00:09:06 verbose #17354 > > $"let wait_for_file_access_read x = !wait_for_file_access_read x" : () +00:09:06 verbose #17355 > > $"let read_all_text_async x = !read_all_text_async x" : () +00:09:06 verbose #17356 > > $"let file_exists_content x = !file_exists_content x" : () +00:09:06 verbose #17357 > > $"let write_all_text_async x = !write_all_text_async x" : () +00:09:06 verbose #17358 > > $"let write_all_text_exists x = !write_all_text_exists x" : () +00:09:06 verbose #17359 > > $"let delete_file_async x = !delete_file_async x" : () +00:09:06 verbose #17360 > > $"let move_file_async x = !move_file_async x" : () +00:09:06 verbose #17361 > > $"let read_all_text_retry_async x = !read_all_text_retry_async x" : () +00:09:06 verbose #17362 > > $"let create_temp_directory_name () = !create_temp_directory_name ()" : () +00:09:06 verbose #17363 > > $"let create_temp_directory () = !create_temp_directory ()" : () +00:09:06 verbose #17364 > > $"let get_source_directory () = !get_source_directory ()" : () +00:09:06 verbose #17365 > > $"let find_parent x = !find_parent x" : () +00:09:06 verbose #17366 > > $"let normalize_path x = !normalize_path x" : () +00:09:06 verbose #17367 > > $"let new_file_uri x = !new_file_uri x" : () +00:09:06 verbose #17368 > > $"let get_workspace_root () = !get_workspace_root ()" : () +00:09:06 verbose #17369 > > $"let init_trace_file x = !init_trace_file x" : () +00:09:06 verbose #17370 > > inl combine x = (</>) x +00:09:06 verbose #17371 > > $"let (</>) x = !combine x" : () +00:09:07 verbose #17372 > 00:00:50 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 85761 +00:09:07 verbose #17373 > 00:00:50 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:09:09 verbose #17374 > 00:00:52 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb to html +00:09:09 verbose #17375 > 00:00:52 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:09:09 verbose #17376 > 00:00:52 verbose #7 ! validate(nb) +00:09:11 verbose #17377 > 00:00:54 verbose #8 ! [NbConvertApp] Writing 539163 bytes to c:\home\git\polyglot\lib\spiral\file_system.dib.html +00:09:11 verbose #17378 > 00:00:54 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 653 +00:09:11 verbose #17379 > 00:00:54 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 653 +00:09:11 verbose #17380 > 00:00:54 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/file_system.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/file_system.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:09:12 verbose #17381 > 00:00:55 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:09:12 verbose #17382 > 00:00:55 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:09:13 verbose #17383 > 00:00:56 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 86473 +00:09:13 debug #17384 execute_with_options_async / exit_code: 0 / output.Length: 92445 +00:09:13 debug #25 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path file_system.dib --retries 3 +00:09:13 debug #17385 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, + "../../workspace/target/release/spiral_builder.exe dib --path networking.dib --retries 3", [||], None, None, true, None) -00:18:57 verbose #17170 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "networking.dib", "--retries", "3"]) -00:18:57 verbose #17171 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/networking.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/networking.dib" --output-path "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:19:27 verbose #17172 > 00:19:26 debug #184 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/31f733f71b61befc0b78d3a89d957e083f77c210d34c3bf2d8ec518c92195e11/main.spi -00:19:31 verbose #17173 > -00:19:31 verbose #17174 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17175 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17176 > │ # networking │ -00:19:31 verbose #17177 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17178 > -00:19:31 verbose #17179 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17180 > open rust_operators -00:19:31 verbose #17181 > -00:19:31 verbose #17182 > ── spiral - import ───────────────────────────────────────────────────────────── -00:19:31 verbose #17183 > #r -00:19:31 verbose #17184 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:19:31 verbose #17185 > otNet.Interactive.Spiral.dll" -00:19:31 verbose #17186 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:19:31 verbose #17187 > #r -00:19:31 verbose #17188 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:19:31 verbose #17189 > otNet.Interactive.dll" -00:19:31 verbose #17190 > open type Microsoft.DotNet.Interactive.Kernel -00:19:31 verbose #17191 > -00:19:31 verbose #17192 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17193 > //// test -00:19:31 verbose #17194 > -00:19:31 verbose #17195 > open testing -00:19:31 verbose #17196 > -00:19:31 verbose #17197 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17198 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17199 > │ ## types │ -00:19:31 verbose #17200 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17201 > -00:19:31 verbose #17202 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17203 > inl types () = -00:19:31 verbose #17204 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:19:31 verbose #17205 > Fable.Core.Emit(\"reqwest_wasm::Error\")>]]\n#endif\ntype reqwest_Error = class -00:19:31 verbose #17206 > end" -00:19:31 verbose #17207 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:19:31 verbose #17208 > Fable.Core.Emit(\"reqwest_wasm::RequestBuilder\")>]]\n#endif\ntype -00:19:31 verbose #17209 > reqwest_RequestBuilder = class end" -00:19:31 verbose #17210 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:19:31 verbose #17211 > Fable.Core.Emit(\"reqwest_wasm::Response\")>]]\n#endif\ntype reqwest_Response = -00:19:31 verbose #17212 > class end" -00:19:31 verbose #17213 > -00:19:31 verbose #17214 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17215 > inl types () = -00:19:31 verbose #17216 > types () -00:19:31 verbose #17217 > env.types () -00:19:31 verbose #17218 > rust.types () -00:19:31 verbose #17219 > sm'.types () -00:19:31 verbose #17220 > -00:19:31 verbose #17221 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17222 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17223 > │ ## reqwest_response │ -00:19:31 verbose #17224 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17225 > -00:19:31 verbose #17226 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17227 > nominal reqwest_response = $"reqwest_Response" -00:19:31 verbose #17228 > -00:19:31 verbose #17229 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17230 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17231 > │ ## reqwest_error │ -00:19:31 verbose #17232 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17233 > -00:19:31 verbose #17234 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17235 > nominal reqwest_error = $"reqwest_Error" -00:19:31 verbose #17236 > -00:19:31 verbose #17237 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17238 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17239 > │ ## request_builder │ -00:19:31 verbose #17240 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17241 > -00:19:31 verbose #17242 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17243 > nominal request_builder = $"reqwest_RequestBuilder" -00:19:31 verbose #17244 > -00:19:31 verbose #17245 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17246 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17247 > │ ## request_type │ -00:19:31 verbose #17248 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17249 > -00:19:31 verbose #17250 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17251 > union request_type = -00:19:31 verbose #17252 > | Get -00:19:31 verbose #17253 > | Post -00:19:31 verbose #17254 > -00:19:31 verbose #17255 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17256 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17257 > │ ## request │ -00:19:31 verbose #17258 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17259 > -00:19:31 verbose #17260 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17261 > type request = -00:19:31 verbose #17262 > { -00:19:31 verbose #17263 > url : string -00:19:31 verbose #17264 > request_type : request_type -00:19:31 verbose #17265 > body : string -00:19:31 verbose #17266 > json : bool -00:19:31 verbose #17267 > auto_refresh : bool -00:19:31 verbose #17268 > } -00:19:31 verbose #17269 > -00:19:31 verbose #17270 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17271 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17272 > │ ## new_request_get │ -00:19:31 verbose #17273 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17274 > -00:19:31 verbose #17275 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17276 > inl new_request_get (url : string) : request_builder = -00:19:31 verbose #17277 > inl url = join url -00:19:31 verbose #17278 > inl url = url |> sm'.to_std_string -00:19:31 verbose #17279 > inl url = join url -00:19:31 verbose #17280 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err| -00:19:31 verbose #17281 > err.to_string())?.get(!url)"') -00:19:31 verbose #17282 > -00:19:31 verbose #17283 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17284 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17285 > │ ## new_request_post │ -00:19:31 verbose #17286 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17287 > -00:19:31 verbose #17288 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17289 > inl new_request_post (url : string) : request_builder = -00:19:31 verbose #17290 > inl url = join url -00:19:31 verbose #17291 > inl url = url |> sm'.to_std_string -00:19:31 verbose #17292 > inl url = join url -00:19:31 verbose #17293 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err| -00:19:31 verbose #17294 > err.to_string())?.post(!url)"') -00:19:31 verbose #17295 > -00:19:31 verbose #17296 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17297 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17298 > │ ## request_send │ -00:19:31 verbose #17299 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17300 > -00:19:31 verbose #17301 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17302 > inl request_send (request : request_builder) : async.future_pin (resultm.result' -00:19:31 verbose #17303 > reqwest_response reqwest_error) = -00:19:31 verbose #17304 > inl request = join request -00:19:31 verbose #17305 > !\($'"Box::pin(reqwest_wasm::RequestBuilder::send(!request))"') -00:19:31 verbose #17306 > -00:19:31 verbose #17307 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17308 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17309 > │ ## request_body │ -00:19:31 verbose #17310 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17311 > -00:19:31 verbose #17312 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17313 > inl request_body (body : string) (request : request_builder) : request_builder = -00:19:31 verbose #17314 > inl body = body |> sm'.to_std_string -00:19:31 verbose #17315 > !\($'"reqwest_wasm::RequestBuilder::body(!request, !body)"') -00:19:31 verbose #17316 > -00:19:31 verbose #17317 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17318 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17319 > │ ## request_header │ -00:19:31 verbose #17320 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17321 > -00:19:31 verbose #17322 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17323 > inl request_header (key : string) (value : string) (request : request_builder) : -00:19:31 verbose #17324 > request_builder = -00:19:31 verbose #17325 > inl request = join request -00:19:31 verbose #17326 > inl key = key |> sm'.to_std_string -00:19:31 verbose #17327 > inl value = value |> sm'.to_std_string -00:19:31 verbose #17328 > !\($'"reqwest_wasm::RequestBuilder::header(!request, !key, !value)"') -00:19:31 verbose #17329 > -00:19:31 verbose #17330 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17331 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17332 > │ ## request_json │ -00:19:31 verbose #17333 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17334 > -00:19:31 verbose #17335 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17336 > inl request_json forall t. (obj : t) (request : request_builder) : -00:19:31 verbose #17337 > request_builder = -00:19:31 verbose #17338 > !\($'"reqwest_wasm::RequestBuilder::json(!request, &!obj)"') -00:19:31 verbose #17339 > -00:19:31 verbose #17340 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17341 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17342 > │ ## response_text │ -00:19:31 verbose #17343 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17344 > -00:19:31 verbose #17345 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17346 > inl response_text (response : reqwest_response) : async.future_pin -00:19:31 verbose #17347 > (resultm.result' sm'.std_string reqwest_error) = -00:19:31 verbose #17348 > !\($'"Box::pin(reqwest_wasm::Response::text(!response))"') -00:19:31 verbose #17349 > -00:19:31 verbose #17350 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17351 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17352 > │ ## tcp_client │ -00:19:31 verbose #17353 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17354 > -00:19:31 verbose #17355 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17356 > nominal tcp_client = $'System.Net.Sockets.TcpClient' -00:19:31 verbose #17357 > -00:19:31 verbose #17358 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17359 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17360 > │ ## new_tcp_client │ -00:19:31 verbose #17361 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17362 > -00:19:31 verbose #17363 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17364 > inl new_tcp_client () : tcp_client = -00:19:31 verbose #17365 > $'new `tcp_client ()' -00:19:31 verbose #17366 > -00:19:31 verbose #17367 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17368 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17369 > │ ## ip_address │ -00:19:31 verbose #17370 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17371 > -00:19:31 verbose #17372 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17373 > nominal ip_address = $'System.Net.IPAddress' -00:19:31 verbose #17374 > -00:19:31 verbose #17375 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17376 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17377 > │ ## ip_address_parse │ -00:19:31 verbose #17378 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17379 > -00:19:31 verbose #17380 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17381 > inl ip_address_parse (s : string) : ip_address = -00:19:31 verbose #17382 > s |> $'`ip_address.Parse' -00:19:31 verbose #17383 > -00:19:31 verbose #17384 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17385 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17386 > │ ## tcp_listener │ -00:19:31 verbose #17387 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17388 > -00:19:31 verbose #17389 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17390 > nominal tcp_listener = $'System.Net.Sockets.TcpListener' -00:19:31 verbose #17391 > -00:19:31 verbose #17392 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17393 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17394 > │ ## new_tcp_listener │ -00:19:31 verbose #17395 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17396 > -00:19:31 verbose #17397 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17398 > inl new_tcp_listener (ip_address : ip_address) (port : i32) : tcp_listener = -00:19:31 verbose #17399 > $'new `tcp_listener (!ip_address, !port)' -00:19:31 verbose #17400 > -00:19:31 verbose #17401 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17402 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17403 > │ ## listener_start │ -00:19:31 verbose #17404 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17405 > -00:19:31 verbose #17406 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17407 > inl listener_start (listener : tcp_listener) : () = -00:19:31 verbose #17408 > $'!listener.Start' () -00:19:31 verbose #17409 > -00:19:31 verbose #17410 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17411 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17412 > │ ## listener_stop │ -00:19:31 verbose #17413 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17414 > -00:19:31 verbose #17415 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17416 > inl listener_stop (listener : tcp_listener) : () = -00:19:31 verbose #17417 > $'!listener.Stop' () -00:19:31 verbose #17418 > -00:19:31 verbose #17419 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17420 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17421 > │ ## client_connect_async │ -00:19:31 verbose #17422 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17423 > -00:19:31 verbose #17424 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17425 > inl client_connect_async -00:19:31 verbose #17426 > (host : string) -00:19:31 verbose #17427 > (port : i32) -00:19:31 verbose #17428 > (ct : threading.cancellation_token) -00:19:31 verbose #17429 > (client : tcp_client) -00:19:31 verbose #17430 > : async.value_task -00:19:31 verbose #17431 > = -00:19:31 verbose #17432 > $'!client.ConnectAsync (!host, !port, !ct)' -00:19:31 verbose #17433 > -00:19:31 verbose #17434 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17435 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17436 > │ ## test_port_open │ -00:19:31 verbose #17437 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17438 > -00:19:31 verbose #17439 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17440 > inl test_port_open host port : _ bool = async.new_async fun () => -00:19:31 verbose #17441 > inl ct = async.cancellation_token () |> async.let' -00:19:31 verbose #17442 > inl client = new_tcp_client () |> use -00:19:31 verbose #17443 > try_unit -00:19:31 verbose #17444 > fun () => -00:19:31 verbose #17445 > client |> client_connect_async host port ct |> -00:19:31 verbose #17446 > async.await_value_task_unit |> async.do -00:19:31 verbose #17447 > return true -00:19:31 verbose #17448 > fun ex => -00:19:31 verbose #17449 > inl ex = ex |> sm'.format_exception -00:19:31 verbose #17450 > trace Verbose (fun () => $'$"networking.test_port_open / port: -00:19:31 verbose #17451 > {!port} / ex: {!ex}"') _locals -00:19:31 verbose #17452 > return false -00:19:31 verbose #17453 > -00:19:31 verbose #17454 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17455 > //// test -00:19:31 verbose #17456 > -00:19:31 verbose #17457 > test_port_open "127.0.0.1" 65536 -00:19:31 verbose #17458 > |> async.run_with_timeout 120 -00:19:31 verbose #17459 > |> _assert_eq (Some false) -00:19:31 verbose #17460 > -00:19:31 verbose #17461 > ╭─[ 1.99s - stdout ]───────────────────────────────────────────────────────────╮ -00:19:31 verbose #17462 > │ 00:00:00 verbose #1 networking.test_port_open / port: 65536 / ex: │ -00:19:31 verbose #17463 > │ System.ArgumentOutOfRangeException: Specified argument was out of the range │ -00:19:31 verbose #17464 > │ of valid values. (Parameter 'port') │ -00:19:31 verbose #17465 > │ assert_eq / actual: US2_0 false / expected: US2_0 false │ -00:19:31 verbose #17466 > │ │ -00:19:31 verbose #17467 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17468 > -00:19:31 verbose #17469 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17470 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17471 > │ ## test_port_open_timeout │ -00:19:31 verbose #17472 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17473 > -00:19:31 verbose #17474 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17475 > inl test_port_open_timeout timeout host port : _ bool = async.new_async_unit fun -00:19:31 verbose #17476 > () => -00:19:31 verbose #17477 > test_port_open host port -00:19:31 verbose #17478 > |> async.run_with_timeout_async timeout -00:19:31 verbose #17479 > |> async.let' -00:19:31 verbose #17480 > |> function -00:19:31 verbose #17481 > | None => false -00:19:31 verbose #17482 > | Some result => result -00:19:31 verbose #17483 > |> return -00:19:31 verbose #17484 > -00:19:31 verbose #17485 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17486 > //// test -00:19:31 verbose #17487 > -00:19:31 verbose #17488 > test_port_open_timeout 120 "127.0.0.1" 65535 -00:19:31 verbose #17489 > |> async.run_synchronously -00:19:31 verbose #17490 > |> _assert_eq false -00:19:31 verbose #17491 > -00:19:31 verbose #17492 > ╭─[ 700.84ms - stdout ]────────────────────────────────────────────────────────╮ -00:19:31 verbose #17493 > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 120 │ -00:19:31 verbose #17494 > │ assert_eq / actual: false / expected: false │ -00:19:31 verbose #17495 > │ │ -00:19:31 verbose #17496 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17497 > -00:19:31 verbose #17498 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17499 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17500 > │ ## wait_for_port_access │ -00:19:31 verbose #17501 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17502 > -00:19:31 verbose #17503 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17504 > inl wait_for_port_access timeout status host port : _ i64 = -00:19:31 verbose #17505 > let rec loop retry : _ i64 = async.new_async_unit fun () => -00:19:31 verbose #17506 > inl isPortOpen = -00:19:31 verbose #17507 > match timeout |> optionm'.unbox with -00:19:31 verbose #17508 > | None => test_port_open host port -00:19:31 verbose #17509 > | Some timeout => test_port_open_timeout timeout host port -00:19:31 verbose #17510 > |> async.let' -00:19:31 verbose #17511 > -00:19:31 verbose #17512 > fix_condition -00:19:31 verbose #17513 > fun () => isPortOpen = status -00:19:31 verbose #17514 > fun () => retry |> return -00:19:31 verbose #17515 > fun () => -00:19:31 verbose #17516 > if retry % 100 = 0 then -00:19:31 verbose #17517 > inl _locals () = $'$"port: {!port} / retry: {!retry} -00:19:31 verbose #17518 > timeout: %A{!timeout} / status: {!status} / {!_locals ()}"' -00:19:31 verbose #17519 > trace Verbose (fun () => "networking.wait_for_port_access") -00:19:31 verbose #17520 > _locals -00:19:31 verbose #17521 > async.sleep 10 |> async.do -00:19:31 verbose #17522 > loop (retry + 1) |> async.return_await -00:19:31 verbose #17523 > loop 0i64 -00:19:31 verbose #17524 > -00:19:31 verbose #17525 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17526 > //// test -00:19:31 verbose #17527 > -00:19:31 verbose #17528 > inl lock_port host port = async.new_async fun () => -00:19:31 verbose #17529 > trace Debug (fun () => "_1") _locals -00:19:31 verbose #17530 > async.sleep 5000 |> async.do -00:19:31 verbose #17531 > inl listener = new_tcp_listener (host |> ip_address_parse) port |> use -00:19:31 verbose #17532 > trace Debug (fun () => "_2") _locals -00:19:31 verbose #17533 > listener |> listener_start -00:19:31 verbose #17534 > trace Debug (fun () => "_3") _locals -00:19:31 verbose #17535 > async.sleep 2000 |> async.do -00:19:31 verbose #17536 > trace Debug (fun () => "_4") _locals -00:19:31 verbose #17537 > $'!listener.Stop' () -00:19:31 verbose #17538 > trace Debug (fun () => "_5") _locals -00:19:31 verbose #17539 > -00:19:31 verbose #17540 > inl host = "127.0.0.1" -00:19:31 verbose #17541 > inl port = 5555i32 -00:19:31 verbose #17542 > -00:19:31 verbose #17543 > fun () => -00:19:31 verbose #17544 > trace Debug (fun () => "1") _locals -00:19:31 verbose #17545 > inl child = lock_port host port |> async.start_child |> async.let' -00:19:31 verbose #17546 > trace Debug (fun () => "2") _locals -00:19:31 verbose #17547 > async.sleep 1 |> async.do -00:19:31 verbose #17548 > trace Debug (fun () => "3") _locals -00:19:31 verbose #17549 > inl retries1 = wait_for_port_access (None |> optionm'.box) true host port |> -00:19:31 verbose #17550 > async.let' -00:19:31 verbose #17551 > trace Debug (fun () => "4") _locals -00:19:31 verbose #17552 > inl retries2 = wait_for_port_access (None |> optionm'.box) false host port -00:19:31 verbose #17553 > |> async.let' -00:19:31 verbose #17554 > trace Debug (fun () => "5") _locals -00:19:31 verbose #17555 > child |> async.do -00:19:31 verbose #17556 > trace Debug (fun () => "6") _locals -00:19:31 verbose #17557 > (retries1, retries2) |> return -00:19:31 verbose #17558 > |> async.new_async_unit -00:19:31 verbose #17559 > |> async.run_with_timeout 20000 -00:19:31 verbose #17560 > |> function -00:19:31 verbose #17561 > | Some (retries1, retries2) => -00:19:31 verbose #17562 > retries1 -00:19:31 verbose #17563 > |> _assert_between -00:19:31 verbose #17564 > if runtime.is_windows () then 2i64 else 2 -00:19:31 verbose #17565 > if runtime.is_windows () then 5 else 1500 -00:19:31 verbose #17566 > -00:19:31 verbose #17567 > retries2 -00:19:31 verbose #17568 > |> _assert_between -00:19:31 verbose #17569 > if runtime.is_windows () then 80i64 else 80 -00:19:31 verbose #17570 > if runtime.is_windows () then 150 else 600 -00:19:31 verbose #17571 > -00:19:31 verbose #17572 > true -00:19:31 verbose #17573 > | _ => false -00:19:31 verbose #17574 > |> _assert_eq true -00:19:31 verbose #17575 > -00:19:31 verbose #17576 > ╭─[ 10.54s - stdout ]──────────────────────────────────────────────────────────╮ -00:19:31 verbose #17577 > │ 00:00:00 debug #1 1 │ -00:19:31 verbose #17578 > │ 00:00:00 debug #2 _1 │ -00:19:31 verbose #17579 > │ 00:00:00 debug #3 2 │ -00:19:31 verbose #17580 > │ 00:00:00 debug #4 3 │ -00:19:31 verbose #17581 > │ 00:00:02 verbose #5 networking.test_port_open / port: 5555 / ex: │ -00:19:31 verbose #17582 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:19:31 verbose #17583 > │ be made because the target machine actively refused it.) │ -00:19:31 verbose #17584 > │ 00:00:02 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #17585 > │ / timeout: None / status: True │ -00:19:31 verbose #17586 > │ 00:00:04 verbose #7 networking.test_port_open / port: 5555 / ex: │ -00:19:31 verbose #17587 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:19:31 verbose #17588 > │ be made because the target machine actively refused it.) │ -00:19:31 verbose #17589 > │ 00:00:05 debug #8 _2 │ -00:19:31 verbose #17590 > │ 00:00:05 debug #9 _3 │ -00:19:31 verbose #17591 > │ 00:00:05 debug #10 4 │ -00:19:31 verbose #17592 > │ 00:00:05 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #17593 > │ / timeout: None / status: False │ -00:19:31 verbose #17594 > │ 00:00:06 verbose #12 networking.wait_for_port_access / port: 5555 / retry: │ -00:19:31 verbose #17595 > │ 100 / timeout: None / status: False │ -00:19:31 verbose #17596 > │ 00:00:07 debug #13 _4 │ -00:19:31 verbose #17597 > │ 00:00:07 debug #14 _5 │ -00:19:31 verbose #17598 > │ 00:00:09 verbose #15 networking.test_port_open / port: 5555 / ex: │ -00:19:31 verbose #17599 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:19:31 verbose #17600 > │ be made because the target machine actively refused it.) │ -00:19:31 verbose #17601 > │ 00:00:09 debug #16 5 │ -00:19:31 verbose #17602 > │ 00:00:09 debug #17 6 │ -00:19:31 verbose #17603 > │ assert_between / actual: 2L / expected: struct (2L, 5L) │ -00:19:31 verbose #17604 > │ assert_between / actual: 112L / expected: struct (80L, 150L) │ -00:19:31 verbose #17605 > │ assert_eq / actual: true / expected: true │ -00:19:31 verbose #17606 > │ │ -00:19:31 verbose #17607 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17608 > -00:19:31 verbose #17609 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17610 > //// test -00:19:31 verbose #17611 > -00:19:31 verbose #17612 > inl lock_port host port = async.new_async_unit fun () => -00:19:31 verbose #17613 > trace Debug (fun () => "_1") _locals -00:19:31 verbose #17614 > async.sleep 500 |> async.do -00:19:31 verbose #17615 > inl listener = new_tcp_listener (ip_address_parse host) port |> use -00:19:31 verbose #17616 > trace Debug (fun () => "_2") _locals -00:19:31 verbose #17617 > listener |> listener_start -00:19:31 verbose #17618 > trace Debug (fun () => "_3") _locals -00:19:31 verbose #17619 > async.sleep 200 |> async.do -00:19:31 verbose #17620 > trace Debug (fun () => "_4") _locals -00:19:31 verbose #17621 > listener |> listener_stop -00:19:31 verbose #17622 > trace Debug (fun () => "_5") _locals -00:19:31 verbose #17623 > -00:19:31 verbose #17624 > inl host = "127.0.0.1" -00:19:31 verbose #17625 > inl port = 5555 -00:19:31 verbose #17626 > -00:19:31 verbose #17627 > fun () => -00:19:31 verbose #17628 > trace Debug (fun () => "1") _locals -00:19:31 verbose #17629 > inl child = lock_port host port |> async.start_child |> async.let' -00:19:31 verbose #17630 > trace Debug (fun () => "2") _locals -00:19:31 verbose #17631 > async.sleep 1 |> async.do -00:19:31 verbose #17632 > trace Debug (fun () => "3") _locals -00:19:31 verbose #17633 > inl retries1 = wait_for_port_access (Some 60 |> optionm'.box) true host port -00:19:31 verbose #17634 > |> async.let' -00:19:31 verbose #17635 > trace Debug (fun () => "4") _locals -00:19:31 verbose #17636 > inl retries2 = wait_for_port_access (Some 60 |> optionm'.box) false host -00:19:31 verbose #17637 > port |> async.let' -00:19:31 verbose #17638 > trace Debug (fun () => "5") _locals -00:19:31 verbose #17639 > child |> async.do -00:19:31 verbose #17640 > trace Debug (fun () => "6") _locals -00:19:31 verbose #17641 > (retries1, retries2) |> return -00:19:31 verbose #17642 > |> async.new_async_unit -00:19:31 verbose #17643 > |> async.run_with_timeout 2000 -00:19:31 verbose #17644 > |> function -00:19:31 verbose #17645 > | Some (retries1, retries2) => -00:19:31 verbose #17646 > retries1 -00:19:31 verbose #17647 > |> _assert_between -00:19:31 verbose #17648 > if runtime.is_windows () then 4i64 else 2 -00:19:31 verbose #17649 > if runtime.is_windows () then 15 else 150 -00:19:31 verbose #17650 > -00:19:31 verbose #17651 > retries2 -00:19:31 verbose #17652 > |> _assert_between -00:19:31 verbose #17653 > if runtime.is_windows () then 5i64 else 0 -00:19:31 verbose #17654 > if runtime.is_windows () then 20 else 60 -00:19:31 verbose #17655 > -00:19:31 verbose #17656 > true -00:19:31 verbose #17657 > | _ => false -00:19:31 verbose #17658 > |> _assert_eq true -00:19:31 verbose #17659 > -00:19:31 verbose #17660 > ╭─[ 2.08s - stdout ]───────────────────────────────────────────────────────────╮ -00:19:31 verbose #17661 > │ 00:00:00 debug #1 1 │ -00:19:31 verbose #17662 > │ 00:00:00 debug #2 2 │ -00:19:31 verbose #17663 > │ 00:00:00 debug #3 _1 │ -00:19:31 verbose #17664 > │ 00:00:00 debug #4 3 │ -00:19:31 verbose #17665 > │ 00:00:00 debug #5 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #17666 > │ 00:00:00 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #17667 > │ / timeout: Some 60 / status: True │ -00:19:31 verbose #17668 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #17669 > │ 00:00:00 debug #8 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #17670 > │ 00:00:00 debug #9 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #17671 > │ 00:00:00 debug #10 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #17672 > │ 00:00:00 debug #11 _2 │ -00:19:31 verbose #17673 > │ 00:00:00 debug #12 _3 │ -00:19:31 verbose #17674 > │ 00:00:00 debug #13 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #17675 > │ 00:00:00 debug #14 4 │ -00:19:31 verbose #17676 > │ 00:00:00 verbose #15 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #17677 > │ / timeout: Some 60 / status: False │ -00:19:31 verbose #17678 > │ 00:00:00 debug #16 _4 │ -00:19:31 verbose #17679 > │ 00:00:00 debug #17 _5 │ -00:19:31 verbose #17680 > │ 00:00:00 debug #18 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #17681 > │ 00:00:00 debug #19 5 │ -00:19:31 verbose #17682 > │ 00:00:00 debug #20 6 │ -00:19:31 verbose #17683 > │ assert_between / actual: 6L / expected: struct (4L, 15L) │ -00:19:31 verbose #17684 > │ assert_between / actual: 9L / expected: struct (5L, 20L) │ -00:19:31 verbose #17685 > │ assert_eq / actual: true / expected: true │ -00:19:31 verbose #17686 > │ │ -00:19:31 verbose #17687 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17688 > -00:19:31 verbose #17689 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17690 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17691 > │ ## get_available_port │ -00:19:31 verbose #17692 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17693 > -00:19:31 verbose #17694 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17695 > inl get_available_port timeout host initial_port : _ i32 = -00:19:31 verbose #17696 > let rec loop port = async.new_async_unit fun () => -00:19:31 verbose #17697 > inl is_port_open = -00:19:31 verbose #17698 > match timeout |> optionm'.unbox with -00:19:31 verbose #17699 > | None => test_port_open host port -00:19:31 verbose #17700 > | Some timeout => test_port_open_timeout timeout host port -00:19:31 verbose #17701 > |> async.let' -00:19:31 verbose #17702 > fix_condition -00:19:31 verbose #17703 > fun () => is_port_open |> not -00:19:31 verbose #17704 > fun () => port |> return -00:19:31 verbose #17705 > fun () => loop (port + 1) |> async.return_await -00:19:31 verbose #17706 > loop initial_port -00:19:31 verbose #17707 > -00:19:31 verbose #17708 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17709 > //// test -00:19:31 verbose #17710 > -00:19:31 verbose #17711 > inl lock_ports host port = async.new_async_unit fun () => -00:19:31 verbose #17712 > trace Debug (fun () => "_1") _locals -00:19:31 verbose #17713 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use -00:19:31 verbose #17714 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use -00:19:31 verbose #17715 > trace Debug (fun () => "_2") _locals -00:19:31 verbose #17716 > listener1 |> listener_start -00:19:31 verbose #17717 > listener2 |> listener_start -00:19:31 verbose #17718 > trace Debug (fun () => "_3") _locals -00:19:31 verbose #17719 > async.sleep 4000 |> async.do -00:19:31 verbose #17720 > trace Debug (fun () => "_4") _locals -00:19:31 verbose #17721 > listener1 |> listener_stop -00:19:31 verbose #17722 > listener2 |> listener_stop -00:19:31 verbose #17723 > trace Debug (fun () => "_5") _locals -00:19:31 verbose #17724 > -00:19:31 verbose #17725 > inl host = "127.0.0.1" -00:19:31 verbose #17726 > inl port = 5555 -00:19:31 verbose #17727 > -00:19:31 verbose #17728 > fun () => -00:19:31 verbose #17729 > trace Debug (fun () => "1") _locals -00:19:31 verbose #17730 > inl child = lock_ports host port |> async.start_child |> async.let' -00:19:31 verbose #17731 > trace Debug (fun () => "2") _locals -00:19:31 verbose #17732 > async.sleep 240 |> async.do -00:19:31 verbose #17733 > trace Debug (fun () => "3") _locals -00:19:31 verbose #17734 > inl available_port = get_available_port (None |> optionm'.box) host port |> -00:19:31 verbose #17735 > async.let' -00:19:31 verbose #17736 > trace Debug (fun () => "4") _locals -00:19:31 verbose #17737 > inl retries = wait_for_port_access (None |> optionm'.box) false host port |> -00:19:31 verbose #17738 > async.let' -00:19:31 verbose #17739 > trace Debug (fun () => "5") _locals -00:19:31 verbose #17740 > child |> async.do -00:19:31 verbose #17741 > trace Debug (fun () => "6") _locals -00:19:31 verbose #17742 > (available_port, retries) |> return -00:19:31 verbose #17743 > |> async.new_async_unit -00:19:31 verbose #17744 > |> async.run_with_timeout 15000 -00:19:31 verbose #17745 > |> function -00:19:31 verbose #17746 > | Some (available_port, retries) => -00:19:31 verbose #17747 > available_port |> _assert_eq (port + 2) -00:19:31 verbose #17748 > -00:19:31 verbose #17749 > retries -00:19:31 verbose #17750 > |> _assert_between -00:19:31 verbose #17751 > if runtime.is_windows () then 100i64 else 100 -00:19:31 verbose #17752 > if runtime.is_windows () then 150 else 1200 -00:19:31 verbose #17753 > -00:19:31 verbose #17754 > true -00:19:31 verbose #17755 > | _ => false -00:19:31 verbose #17756 > |> _assert_eq true -00:19:31 verbose #17757 > -00:19:31 verbose #17758 > ╭─[ 7.27s - stdout ]───────────────────────────────────────────────────────────╮ -00:19:31 verbose #17759 > │ 00:00:00 debug #1 1 │ -00:19:31 verbose #17760 > │ 00:00:00 debug #2 _1 │ -00:19:31 verbose #17761 > │ 00:00:00 debug #3 2 │ -00:19:31 verbose #17762 > │ 00:00:00 debug #4 _2 │ -00:19:31 verbose #17763 > │ 00:00:00 debug #5 _3 │ -00:19:31 verbose #17764 > │ 00:00:00 debug #6 3 │ -00:19:31 verbose #17765 > │ 00:00:02 verbose #7 networking.test_port_open / port: 5557 / ex: │ -00:19:31 verbose #17766 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:19:31 verbose #17767 > │ be made because the target machine actively refused it.) │ -00:19:31 verbose #17768 > │ 00:00:02 debug #8 4 │ -00:19:31 verbose #17769 > │ 00:00:02 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #17770 > │ / timeout: None / status: False │ -00:19:31 verbose #17771 > │ 00:00:03 verbose #10 networking.wait_for_port_access / port: 5555 / retry: │ -00:19:31 verbose #17772 > │ 100 / timeout: None / status: False │ -00:19:31 verbose #17773 > │ 00:00:04 debug #11 _4 │ -00:19:31 verbose #17774 > │ 00:00:04 debug #12 _5 │ -00:19:31 verbose #17775 > │ 00:00:06 verbose #13 networking.test_port_open / port: 5555 / ex: │ -00:19:31 verbose #17776 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:19:31 verbose #17777 > │ be made because the target machine actively refused it.) │ -00:19:31 verbose #17778 > │ 00:00:06 debug #14 5 │ -00:19:31 verbose #17779 > │ 00:00:06 debug #15 6 │ -00:19:31 verbose #17780 > │ assert_eq / actual: 5557 / expected: 5557 │ -00:19:31 verbose #17781 > │ assert_between / actual: 102L / expected: struct (100L, 150L) │ -00:19:31 verbose #17782 > │ assert_eq / actual: true / expected: true │ -00:19:31 verbose #17783 > │ │ -00:19:31 verbose #17784 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17785 > -00:19:31 verbose #17786 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17787 > //// test -00:19:31 verbose #17788 > -00:19:31 verbose #17789 > inl lock_ports host port = async.new_async_unit fun () => -00:19:31 verbose #17790 > trace Debug (fun () => "_1") _locals -00:19:31 verbose #17791 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use -00:19:31 verbose #17792 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use -00:19:31 verbose #17793 > trace Debug (fun () => "_2") _locals -00:19:31 verbose #17794 > listener1 |> listener_start -00:19:31 verbose #17795 > listener2 |> listener_start -00:19:31 verbose #17796 > trace Debug (fun () => "_3") _locals -00:19:31 verbose #17797 > async.sleep 400 |> async.do -00:19:31 verbose #17798 > trace Debug (fun () => "_4") _locals -00:19:31 verbose #17799 > listener1 |> listener_stop -00:19:31 verbose #17800 > listener2 |> listener_stop -00:19:31 verbose #17801 > trace Debug (fun () => "_5") _locals -00:19:31 verbose #17802 > -00:19:31 verbose #17803 > inl host = "127.0.0.1" -00:19:31 verbose #17804 > inl port = 5555 -00:19:31 verbose #17805 > -00:19:31 verbose #17806 > fun () => -00:19:31 verbose #17807 > trace Debug (fun () => "1") _locals -00:19:31 verbose #17808 > inl child = lock_ports host port |> async.start_child |> async.let' -00:19:31 verbose #17809 > trace Debug (fun () => "2") _locals -00:19:31 verbose #17810 > async.sleep 240 |> async.do -00:19:31 verbose #17811 > trace Debug (fun () => "3") _locals -00:19:31 verbose #17812 > inl available_port = get_available_port (Some 60 |> optionm'.box) host port -00:19:31 verbose #17813 > |> async.let' -00:19:31 verbose #17814 > trace Debug (fun () => "4") _locals -00:19:31 verbose #17815 > inl retries = wait_for_port_access (Some 60 |> optionm'.box) false host port -00:19:31 verbose #17816 > |> async.let' -00:19:31 verbose #17817 > trace Debug (fun () => "5") _locals -00:19:31 verbose #17818 > child |> async.do -00:19:31 verbose #17819 > trace Debug (fun () => "6") _locals -00:19:31 verbose #17820 > (available_port, retries) |> return -00:19:31 verbose #17821 > |> async.new_async_unit -00:19:31 verbose #17822 > |> async.run_with_timeout 1500 -00:19:31 verbose #17823 > |> function -00:19:31 verbose #17824 > | Some (available_port, retries) => -00:19:31 verbose #17825 > available_port |> _assert_eq (port + 2) -00:19:31 verbose #17826 > -00:19:31 verbose #17827 > retries -00:19:31 verbose #17828 > |> _assert_between -00:19:31 verbose #17829 > (if runtime.is_windows () then 2i64 else 1) -00:19:31 verbose #17830 > (if runtime.is_windows () then 10 else 120) -00:19:31 verbose #17831 > -00:19:31 verbose #17832 > true -00:19:31 verbose #17833 > | _ => false -00:19:31 verbose #17834 > |> _assert_eq true -00:19:31 verbose #17835 > -00:19:31 verbose #17836 > ╭─[ 2.46s - stderr ]───────────────────────────────────────────────────────────╮ -00:19:31 verbose #17837 > │ 00:00:00 debug #1 1 │ -00:19:31 verbose #17838 > │ 00:00:00 debug #2 2 │ -00:19:31 verbose #17839 > │ 00:00:00 debug #3 _1 │ -00:19:31 verbose #17840 > │ 00:00:00 debug #4 _2 │ -00:19:31 verbose #17841 > │ 00:00:00 debug #5 _3 │ -00:19:31 verbose #17842 > │ 00:00:00 debug #6 3 │ -00:19:31 verbose #17843 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #17844 > │ 00:00:00 debug #8 4 │ -00:19:31 verbose #17845 > │ 00:00:00 debug #9 _4 │ -00:19:31 verbose #17846 > │ 00:00:00 debug #10 _5 │ -00:19:31 verbose #17847 > │ 00:00:00 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #17848 > │ / timeout: Some 60 / status: False │ -00:19:31 verbose #17849 > │ 00:00:00 debug #12 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #17850 > │ 00:00:00 debug #13 5 │ -00:19:31 verbose #17851 > │ 00:00:00 debug #14 6 │ -00:19:31 verbose #17852 > │ assert_eq / actual: 5557 / expected: 5557 │ -00:19:31 verbose #17853 > │ │ -00:19:31 verbose #17854 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17855 > Exiting... -00:19:31 verbose #17856 > 00:00:34 verbose #3 runtime.execute_with_options / result / exit_code: -1 / std_trace.Length: 33479 -00:19:31 verbose #17857 > 00:00:34 debug #4 spiral_builder.run / repl error / exit_code: -1 / retry: 1/3 / repl_result: -00:19:31 verbose #17858 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17859 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17860 > │ # networking │ -00:19:31 verbose #17861 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17862 > -00:19:31 verbose #17863 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17864 > open rust_operators -00:19:31 verbose #17865 > -00:19:31 verbose #17866 > ── spiral - import ───────────────────────────────────────────────────────────── -00:19:31 verbose #17867 > #r -00:19:31 verbose #17868 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:19:31 verbose #17869 > otNet.Interactive.Spiral.dll" -00:19:31 verbose #17870 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:19:31 verbose #17871 > #r -00:19:31 verbose #17872 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:19:31 verbose #17873 > otNet.Interactive.dll" -00:19:31 verbose #17874 > open type Microsoft.DotNet.Interactive.Kernel -00:19:31 verbose #17875 > -00:19:31 verbose #17876 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17877 > //// test -00:19:31 verbose #17878 > -00:19:31 verbose #17879 > open testing -00:19:31 verbose #17880 > -00:19:31 verbose #17881 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17882 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17883 > │ ## types │ -00:19:31 verbose #17884 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17885 > -00:19:31 verbose #17886 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17887 > inl types () = -00:19:31 verbose #17888 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:19:31 verbose #17889 > Fable.Core.Emit(\"reqwest_wasm::Error\")>]]\n#endif\ntype reqwest_Error = class -00:19:31 verbose #17890 > end" -00:19:31 verbose #17891 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:19:31 verbose #17892 > Fable.Core.Emit(\"reqwest_wasm::RequestBuilder\")>]]\n#endif\ntype -00:19:31 verbose #17893 > reqwest_RequestBuilder = class end" -00:19:31 verbose #17894 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:19:31 verbose #17895 > Fable.Core.Emit(\"reqwest_wasm::Response\")>]]\n#endif\ntype reqwest_Response = -00:19:31 verbose #17896 > class end" -00:19:31 verbose #17897 > -00:19:31 verbose #17898 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17899 > inl types () = -00:19:31 verbose #17900 > types () -00:19:31 verbose #17901 > env.types () -00:19:31 verbose #17902 > rust.types () -00:19:31 verbose #17903 > sm'.types () -00:19:31 verbose #17904 > -00:19:31 verbose #17905 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17906 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17907 > │ ## reqwest_response │ -00:19:31 verbose #17908 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17909 > -00:19:31 verbose #17910 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17911 > nominal reqwest_response = $"reqwest_Response" -00:19:31 verbose #17912 > -00:19:31 verbose #17913 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17914 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17915 > │ ## reqwest_error │ -00:19:31 verbose #17916 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17917 > -00:19:31 verbose #17918 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17919 > nominal reqwest_error = $"reqwest_Error" -00:19:31 verbose #17920 > -00:19:31 verbose #17921 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17922 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17923 > │ ## request_builder │ -00:19:31 verbose #17924 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17925 > -00:19:31 verbose #17926 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17927 > nominal request_builder = $"reqwest_RequestBuilder" -00:19:31 verbose #17928 > -00:19:31 verbose #17929 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17930 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17931 > │ ## request_type │ -00:19:31 verbose #17932 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17933 > -00:19:31 verbose #17934 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17935 > union request_type = -00:19:31 verbose #17936 > | Get -00:19:31 verbose #17937 > | Post -00:19:31 verbose #17938 > -00:19:31 verbose #17939 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17940 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17941 > │ ## request │ -00:19:31 verbose #17942 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17943 > -00:19:31 verbose #17944 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17945 > type request = -00:19:31 verbose #17946 > { -00:19:31 verbose #17947 > url : string -00:19:31 verbose #17948 > request_type : request_type -00:19:31 verbose #17949 > body : string -00:19:31 verbose #17950 > json : bool -00:19:31 verbose #17951 > auto_refresh : bool -00:19:31 verbose #17952 > } -00:19:31 verbose #17953 > -00:19:31 verbose #17954 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17955 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17956 > │ ## new_request_get │ -00:19:31 verbose #17957 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17958 > -00:19:31 verbose #17959 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17960 > inl new_request_get (url : string) : request_builder = -00:19:31 verbose #17961 > inl url = join url -00:19:31 verbose #17962 > inl url = url |> sm'.to_std_string -00:19:31 verbose #17963 > inl url = join url -00:19:31 verbose #17964 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err| -00:19:31 verbose #17965 > err.to_string())?.get(!url)"') -00:19:31 verbose #17966 > -00:19:31 verbose #17967 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17968 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17969 > │ ## new_request_post │ -00:19:31 verbose #17970 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17971 > -00:19:31 verbose #17972 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17973 > inl new_request_post (url : string) : request_builder = -00:19:31 verbose #17974 > inl url = join url -00:19:31 verbose #17975 > inl url = url |> sm'.to_std_string -00:19:31 verbose #17976 > inl url = join url -00:19:31 verbose #17977 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err| -00:19:31 verbose #17978 > err.to_string())?.post(!url)"') -00:19:31 verbose #17979 > -00:19:31 verbose #17980 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17981 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17982 > │ ## request_send │ -00:19:31 verbose #17983 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17984 > -00:19:31 verbose #17985 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17986 > inl request_send (request : request_builder) : async.future_pin (resultm.result' -00:19:31 verbose #17987 > reqwest_response reqwest_error) = -00:19:31 verbose #17988 > inl request = join request -00:19:31 verbose #17989 > !\($'"Box::pin(reqwest_wasm::RequestBuilder::send(!request))"') -00:19:31 verbose #17990 > -00:19:31 verbose #17991 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #17992 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #17993 > │ ## request_body │ -00:19:31 verbose #17994 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #17995 > -00:19:31 verbose #17996 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #17997 > inl request_body (body : string) (request : request_builder) : request_builder = -00:19:31 verbose #17998 > inl body = body |> sm'.to_std_string -00:19:31 verbose #17999 > !\($'"reqwest_wasm::RequestBuilder::body(!request, !body)"') -00:19:31 verbose #18000 > -00:19:31 verbose #18001 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18002 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18003 > │ ## request_header │ -00:19:31 verbose #18004 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18005 > -00:19:31 verbose #18006 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18007 > inl request_header (key : string) (value : string) (request : request_builder) : -00:19:31 verbose #18008 > request_builder = -00:19:31 verbose #18009 > inl request = join request -00:19:31 verbose #18010 > inl key = key |> sm'.to_std_string -00:19:31 verbose #18011 > inl value = value |> sm'.to_std_string -00:19:31 verbose #18012 > !\($'"reqwest_wasm::RequestBuilder::header(!request, !key, !value)"') -00:19:31 verbose #18013 > -00:19:31 verbose #18014 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18015 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18016 > │ ## request_json │ -00:19:31 verbose #18017 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18018 > -00:19:31 verbose #18019 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18020 > inl request_json forall t. (obj : t) (request : request_builder) : -00:19:31 verbose #18021 > request_builder = -00:19:31 verbose #18022 > !\($'"reqwest_wasm::RequestBuilder::json(!request, &!obj)"') -00:19:31 verbose #18023 > -00:19:31 verbose #18024 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18025 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18026 > │ ## response_text │ -00:19:31 verbose #18027 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18028 > -00:19:31 verbose #18029 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18030 > inl response_text (response : reqwest_response) : async.future_pin -00:19:31 verbose #18031 > (resultm.result' sm'.std_string reqwest_error) = -00:19:31 verbose #18032 > !\($'"Box::pin(reqwest_wasm::Response::text(!response))"') -00:19:31 verbose #18033 > -00:19:31 verbose #18034 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18035 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18036 > │ ## tcp_client │ -00:19:31 verbose #18037 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18038 > -00:19:31 verbose #18039 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18040 > nominal tcp_client = $'System.Net.Sockets.TcpClient' -00:19:31 verbose #18041 > -00:19:31 verbose #18042 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18043 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18044 > │ ## new_tcp_client │ -00:19:31 verbose #18045 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18046 > -00:19:31 verbose #18047 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18048 > inl new_tcp_client () : tcp_client = -00:19:31 verbose #18049 > $'new `tcp_client ()' -00:19:31 verbose #18050 > -00:19:31 verbose #18051 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18052 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18053 > │ ## ip_address │ -00:19:31 verbose #18054 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18055 > -00:19:31 verbose #18056 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18057 > nominal ip_address = $'System.Net.IPAddress' -00:19:31 verbose #18058 > -00:19:31 verbose #18059 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18060 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18061 > │ ## ip_address_parse │ -00:19:31 verbose #18062 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18063 > -00:19:31 verbose #18064 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18065 > inl ip_address_parse (s : string) : ip_address = -00:19:31 verbose #18066 > s |> $'`ip_address.Parse' -00:19:31 verbose #18067 > -00:19:31 verbose #18068 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18069 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18070 > │ ## tcp_listener │ -00:19:31 verbose #18071 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18072 > -00:19:31 verbose #18073 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18074 > nominal tcp_listener = $'System.Net.Sockets.TcpListener' -00:19:31 verbose #18075 > -00:19:31 verbose #18076 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18077 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18078 > │ ## new_tcp_listener │ -00:19:31 verbose #18079 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18080 > -00:19:31 verbose #18081 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18082 > inl new_tcp_listener (ip_address : ip_address) (port : i32) : tcp_listener = -00:19:31 verbose #18083 > $'new `tcp_listener (!ip_address, !port)' -00:19:31 verbose #18084 > -00:19:31 verbose #18085 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18086 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18087 > │ ## listener_start │ -00:19:31 verbose #18088 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18089 > -00:19:31 verbose #18090 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18091 > inl listener_start (listener : tcp_listener) : () = -00:19:31 verbose #18092 > $'!listener.Start' () -00:19:31 verbose #18093 > -00:19:31 verbose #18094 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18095 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18096 > │ ## listener_stop │ -00:19:31 verbose #18097 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18098 > -00:19:31 verbose #18099 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18100 > inl listener_stop (listener : tcp_listener) : () = -00:19:31 verbose #18101 > $'!listener.Stop' () -00:19:31 verbose #18102 > -00:19:31 verbose #18103 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18104 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18105 > │ ## client_connect_async │ -00:19:31 verbose #18106 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18107 > -00:19:31 verbose #18108 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18109 > inl client_connect_async -00:19:31 verbose #18110 > (host : string) -00:19:31 verbose #18111 > (port : i32) -00:19:31 verbose #18112 > (ct : threading.cancellation_token) -00:19:31 verbose #18113 > (client : tcp_client) -00:19:31 verbose #18114 > : async.value_task -00:19:31 verbose #18115 > = -00:19:31 verbose #18116 > $'!client.ConnectAsync (!host, !port, !ct)' -00:19:31 verbose #18117 > -00:19:31 verbose #18118 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18119 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18120 > │ ## test_port_open │ -00:19:31 verbose #18121 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18122 > -00:19:31 verbose #18123 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18124 > inl test_port_open host port : _ bool = async.new_async fun () => -00:19:31 verbose #18125 > inl ct = async.cancellation_token () |> async.let' -00:19:31 verbose #18126 > inl client = new_tcp_client () |> use -00:19:31 verbose #18127 > try_unit -00:19:31 verbose #18128 > fun () => -00:19:31 verbose #18129 > client |> client_connect_async host port ct |> -00:19:31 verbose #18130 > async.await_value_task_unit |> async.do -00:19:31 verbose #18131 > return true -00:19:31 verbose #18132 > fun ex => -00:19:31 verbose #18133 > inl ex = ex |> sm'.format_exception -00:19:31 verbose #18134 > trace Verbose (fun () => $'$"networking.test_port_open / port: -00:19:31 verbose #18135 > {!port} / ex: {!ex}"') _locals -00:19:31 verbose #18136 > return false -00:19:31 verbose #18137 > -00:19:31 verbose #18138 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18139 > //// test -00:19:31 verbose #18140 > -00:19:31 verbose #18141 > test_port_open "127.0.0.1" 65536 -00:19:31 verbose #18142 > |> async.run_with_timeout 120 -00:19:31 verbose #18143 > |> _assert_eq (Some false) -00:19:31 verbose #18144 > -00:19:31 verbose #18145 > ╭─[ 1.99s - stdout ]───────────────────────────────────────────────────────────╮ -00:19:31 verbose #18146 > │ 00:00:00 verbose #1 networking.test_port_open / port: 65536 / ex: │ -00:19:31 verbose #18147 > │ System.ArgumentOutOfRangeException: Specified argument was out of the range │ -00:19:31 verbose #18148 > │ of valid values. (Parameter 'port') │ -00:19:31 verbose #18149 > │ assert_eq / actual: US2_0 false / expected: US2_0 false │ -00:19:31 verbose #18150 > │ │ -00:19:31 verbose #18151 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18152 > -00:19:31 verbose #18153 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18154 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18155 > │ ## test_port_open_timeout │ -00:19:31 verbose #18156 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18157 > -00:19:31 verbose #18158 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18159 > inl test_port_open_timeout timeout host port : _ bool = async.new_async_unit fun -00:19:31 verbose #18160 > () => -00:19:31 verbose #18161 > test_port_open host port -00:19:31 verbose #18162 > |> async.run_with_timeout_async timeout -00:19:31 verbose #18163 > |> async.let' -00:19:31 verbose #18164 > |> function -00:19:31 verbose #18165 > | None => false -00:19:31 verbose #18166 > | Some result => result -00:19:31 verbose #18167 > |> return -00:19:31 verbose #18168 > -00:19:31 verbose #18169 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18170 > //// test -00:19:31 verbose #18171 > -00:19:31 verbose #18172 > test_port_open_timeout 120 "127.0.0.1" 65535 -00:19:31 verbose #18173 > |> async.run_synchronously -00:19:31 verbose #18174 > |> _assert_eq false -00:19:31 verbose #18175 > -00:19:31 verbose #18176 > ╭─[ 700.84ms - stdout ]────────────────────────────────────────────────────────╮ -00:19:31 verbose #18177 > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 120 │ -00:19:31 verbose #18178 > │ assert_eq / actual: false / expected: false │ -00:19:31 verbose #18179 > │ │ -00:19:31 verbose #18180 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18181 > -00:19:31 verbose #18182 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18183 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18184 > │ ## wait_for_port_access │ -00:19:31 verbose #18185 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18186 > -00:19:31 verbose #18187 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18188 > inl wait_for_port_access timeout status host port : _ i64 = -00:19:31 verbose #18189 > let rec loop retry : _ i64 = async.new_async_unit fun () => -00:19:31 verbose #18190 > inl isPortOpen = -00:19:31 verbose #18191 > match timeout |> optionm'.unbox with -00:19:31 verbose #18192 > | None => test_port_open host port -00:19:31 verbose #18193 > | Some timeout => test_port_open_timeout timeout host port -00:19:31 verbose #18194 > |> async.let' -00:19:31 verbose #18195 > -00:19:31 verbose #18196 > fix_condition -00:19:31 verbose #18197 > fun () => isPortOpen = status -00:19:31 verbose #18198 > fun () => retry |> return -00:19:31 verbose #18199 > fun () => -00:19:31 verbose #18200 > if retry % 100 = 0 then -00:19:31 verbose #18201 > inl _locals () = $'$"port: {!port} / retry: {!retry} -00:19:31 verbose #18202 > timeout: %A{!timeout} / status: {!status} / {!_locals ()}"' -00:19:31 verbose #18203 > trace Verbose (fun () => "networking.wait_for_port_access") -00:19:31 verbose #18204 > _locals -00:19:31 verbose #18205 > async.sleep 10 |> async.do -00:19:31 verbose #18206 > loop (retry + 1) |> async.return_await -00:19:31 verbose #18207 > loop 0i64 -00:19:31 verbose #18208 > -00:19:31 verbose #18209 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18210 > //// test -00:19:31 verbose #18211 > -00:19:31 verbose #18212 > inl lock_port host port = async.new_async fun () => -00:19:31 verbose #18213 > trace Debug (fun () => "_1") _locals -00:19:31 verbose #18214 > async.sleep 5000 |> async.do -00:19:31 verbose #18215 > inl listener = new_tcp_listener (host |> ip_address_parse) port |> use -00:19:31 verbose #18216 > trace Debug (fun () => "_2") _locals -00:19:31 verbose #18217 > listener |> listener_start -00:19:31 verbose #18218 > trace Debug (fun () => "_3") _locals -00:19:31 verbose #18219 > async.sleep 2000 |> async.do -00:19:31 verbose #18220 > trace Debug (fun () => "_4") _locals -00:19:31 verbose #18221 > $'!listener.Stop' () -00:19:31 verbose #18222 > trace Debug (fun () => "_5") _locals -00:19:31 verbose #18223 > -00:19:31 verbose #18224 > inl host = "127.0.0.1" -00:19:31 verbose #18225 > inl port = 5555i32 -00:19:31 verbose #18226 > -00:19:31 verbose #18227 > fun () => -00:19:31 verbose #18228 > trace Debug (fun () => "1") _locals -00:19:31 verbose #18229 > inl child = lock_port host port |> async.start_child |> async.let' -00:19:31 verbose #18230 > trace Debug (fun () => "2") _locals -00:19:31 verbose #18231 > async.sleep 1 |> async.do -00:19:31 verbose #18232 > trace Debug (fun () => "3") _locals -00:19:31 verbose #18233 > inl retries1 = wait_for_port_access (None |> optionm'.box) true host port |> -00:19:31 verbose #18234 > async.let' -00:19:31 verbose #18235 > trace Debug (fun () => "4") _locals -00:19:31 verbose #18236 > inl retries2 = wait_for_port_access (None |> optionm'.box) false host port -00:19:31 verbose #18237 > |> async.let' -00:19:31 verbose #18238 > trace Debug (fun () => "5") _locals -00:19:31 verbose #18239 > child |> async.do -00:19:31 verbose #18240 > trace Debug (fun () => "6") _locals -00:19:31 verbose #18241 > (retries1, retries2) |> return -00:19:31 verbose #18242 > |> async.new_async_unit -00:19:31 verbose #18243 > |> async.run_with_timeout 20000 -00:19:31 verbose #18244 > |> function -00:19:31 verbose #18245 > | Some (retries1, retries2) => -00:19:31 verbose #18246 > retries1 -00:19:31 verbose #18247 > |> _assert_between -00:19:31 verbose #18248 > if runtime.is_windows () then 2i64 else 2 -00:19:31 verbose #18249 > if runtime.is_windows () then 5 else 1500 -00:19:31 verbose #18250 > -00:19:31 verbose #18251 > retries2 -00:19:31 verbose #18252 > |> _assert_between -00:19:31 verbose #18253 > if runtime.is_windows () then 80i64 else 80 -00:19:31 verbose #18254 > if runtime.is_windows () then 150 else 600 -00:19:31 verbose #18255 > -00:19:31 verbose #18256 > true -00:19:31 verbose #18257 > | _ => false -00:19:31 verbose #18258 > |> _assert_eq true -00:19:31 verbose #18259 > -00:19:31 verbose #18260 > ╭─[ 10.54s - stdout ]──────────────────────────────────────────────────────────╮ -00:19:31 verbose #18261 > │ 00:00:00 debug #1 1 │ -00:19:31 verbose #18262 > │ 00:00:00 debug #2 _1 │ -00:19:31 verbose #18263 > │ 00:00:00 debug #3 2 │ -00:19:31 verbose #18264 > │ 00:00:00 debug #4 3 │ -00:19:31 verbose #18265 > │ 00:00:02 verbose #5 networking.test_port_open / port: 5555 / ex: │ -00:19:31 verbose #18266 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:19:31 verbose #18267 > │ be made because the target machine actively refused it.) │ -00:19:31 verbose #18268 > │ 00:00:02 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #18269 > │ / timeout: None / status: True │ -00:19:31 verbose #18270 > │ 00:00:04 verbose #7 networking.test_port_open / port: 5555 / ex: │ -00:19:31 verbose #18271 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:19:31 verbose #18272 > │ be made because the target machine actively refused it.) │ -00:19:31 verbose #18273 > │ 00:00:05 debug #8 _2 │ -00:19:31 verbose #18274 > │ 00:00:05 debug #9 _3 │ -00:19:31 verbose #18275 > │ 00:00:05 debug #10 4 │ -00:19:31 verbose #18276 > │ 00:00:05 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #18277 > │ / timeout: None / status: False │ -00:19:31 verbose #18278 > │ 00:00:06 verbose #12 networking.wait_for_port_access / port: 5555 / retry: │ -00:19:31 verbose #18279 > │ 100 / timeout: None / status: False │ -00:19:31 verbose #18280 > │ 00:00:07 debug #13 _4 │ -00:19:31 verbose #18281 > │ 00:00:07 debug #14 _5 │ -00:19:31 verbose #18282 > │ 00:00:09 verbose #15 networking.test_port_open / port: 5555 / ex: │ -00:19:31 verbose #18283 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:19:31 verbose #18284 > │ be made because the target machine actively refused it.) │ -00:19:31 verbose #18285 > │ 00:00:09 debug #16 5 │ -00:19:31 verbose #18286 > │ 00:00:09 debug #17 6 │ -00:19:31 verbose #18287 > │ assert_between / actual: 2L / expected: struct (2L, 5L) │ -00:19:31 verbose #18288 > │ assert_between / actual: 112L / expected: struct (80L, 150L) │ -00:19:31 verbose #18289 > │ assert_eq / actual: true / expected: true │ -00:19:31 verbose #18290 > │ │ -00:19:31 verbose #18291 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18292 > -00:19:31 verbose #18293 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18294 > //// test -00:19:31 verbose #18295 > -00:19:31 verbose #18296 > inl lock_port host port = async.new_async_unit fun () => -00:19:31 verbose #18297 > trace Debug (fun () => "_1") _locals -00:19:31 verbose #18298 > async.sleep 500 |> async.do -00:19:31 verbose #18299 > inl listener = new_tcp_listener (ip_address_parse host) port |> use -00:19:31 verbose #18300 > trace Debug (fun () => "_2") _locals -00:19:31 verbose #18301 > listener |> listener_start -00:19:31 verbose #18302 > trace Debug (fun () => "_3") _locals -00:19:31 verbose #18303 > async.sleep 200 |> async.do -00:19:31 verbose #18304 > trace Debug (fun () => "_4") _locals -00:19:31 verbose #18305 > listener |> listener_stop -00:19:31 verbose #18306 > trace Debug (fun () => "_5") _locals -00:19:31 verbose #18307 > -00:19:31 verbose #18308 > inl host = "127.0.0.1" -00:19:31 verbose #18309 > inl port = 5555 -00:19:31 verbose #18310 > -00:19:31 verbose #18311 > fun () => -00:19:31 verbose #18312 > trace Debug (fun () => "1") _locals -00:19:31 verbose #18313 > inl child = lock_port host port |> async.start_child |> async.let' -00:19:31 verbose #18314 > trace Debug (fun () => "2") _locals -00:19:31 verbose #18315 > async.sleep 1 |> async.do -00:19:31 verbose #18316 > trace Debug (fun () => "3") _locals -00:19:31 verbose #18317 > inl retries1 = wait_for_port_access (Some 60 |> optionm'.box) true host port -00:19:31 verbose #18318 > |> async.let' -00:19:31 verbose #18319 > trace Debug (fun () => "4") _locals -00:19:31 verbose #18320 > inl retries2 = wait_for_port_access (Some 60 |> optionm'.box) false host -00:19:31 verbose #18321 > port |> async.let' -00:19:31 verbose #18322 > trace Debug (fun () => "5") _locals -00:19:31 verbose #18323 > child |> async.do -00:19:31 verbose #18324 > trace Debug (fun () => "6") _locals -00:19:31 verbose #18325 > (retries1, retries2) |> return -00:19:31 verbose #18326 > |> async.new_async_unit -00:19:31 verbose #18327 > |> async.run_with_timeout 2000 -00:19:31 verbose #18328 > |> function -00:19:31 verbose #18329 > | Some (retries1, retries2) => -00:19:31 verbose #18330 > retries1 -00:19:31 verbose #18331 > |> _assert_between -00:19:31 verbose #18332 > if runtime.is_windows () then 4i64 else 2 -00:19:31 verbose #18333 > if runtime.is_windows () then 15 else 150 -00:19:31 verbose #18334 > -00:19:31 verbose #18335 > retries2 -00:19:31 verbose #18336 > |> _assert_between -00:19:31 verbose #18337 > if runtime.is_windows () then 5i64 else 0 -00:19:31 verbose #18338 > if runtime.is_windows () then 20 else 60 -00:19:31 verbose #18339 > -00:19:31 verbose #18340 > true -00:19:31 verbose #18341 > | _ => false -00:19:31 verbose #18342 > |> _assert_eq true -00:19:31 verbose #18343 > -00:19:31 verbose #18344 > ╭─[ 2.08s - stdout ]───────────────────────────────────────────────────────────╮ -00:19:31 verbose #18345 > │ 00:00:00 debug #1 1 │ -00:19:31 verbose #18346 > │ 00:00:00 debug #2 2 │ -00:19:31 verbose #18347 > │ 00:00:00 debug #3 _1 │ -00:19:31 verbose #18348 > │ 00:00:00 debug #4 3 │ -00:19:31 verbose #18349 > │ 00:00:00 debug #5 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #18350 > │ 00:00:00 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #18351 > │ / timeout: Some 60 / status: True │ -00:19:31 verbose #18352 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #18353 > │ 00:00:00 debug #8 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #18354 > │ 00:00:00 debug #9 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #18355 > │ 00:00:00 debug #10 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #18356 > │ 00:00:00 debug #11 _2 │ -00:19:31 verbose #18357 > │ 00:00:00 debug #12 _3 │ -00:19:31 verbose #18358 > │ 00:00:00 debug #13 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #18359 > │ 00:00:00 debug #14 4 │ -00:19:31 verbose #18360 > │ 00:00:00 verbose #15 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #18361 > │ / timeout: Some 60 / status: False │ -00:19:31 verbose #18362 > │ 00:00:00 debug #16 _4 │ -00:19:31 verbose #18363 > │ 00:00:00 debug #17 _5 │ -00:19:31 verbose #18364 > │ 00:00:00 debug #18 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #18365 > │ 00:00:00 debug #19 5 │ -00:19:31 verbose #18366 > │ 00:00:00 debug #20 6 │ -00:19:31 verbose #18367 > │ assert_between / actual: 6L / expected: struct (4L, 15L) │ -00:19:31 verbose #18368 > │ assert_between / actual: 9L / expected: struct (5L, 20L) │ -00:19:31 verbose #18369 > │ assert_eq / actual: true / expected: true │ -00:19:31 verbose #18370 > │ │ -00:19:31 verbose #18371 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18372 > -00:19:31 verbose #18373 > ── markdown ──────────────────────────────────────────────────────────────────── -00:19:31 verbose #18374 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:19:31 verbose #18375 > │ ## get_available_port │ -00:19:31 verbose #18376 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18377 > -00:19:31 verbose #18378 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18379 > inl get_available_port timeout host initial_port : _ i32 = -00:19:31 verbose #18380 > let rec loop port = async.new_async_unit fun () => -00:19:31 verbose #18381 > inl is_port_open = -00:19:31 verbose #18382 > match timeout |> optionm'.unbox with -00:19:31 verbose #18383 > | None => test_port_open host port -00:19:31 verbose #18384 > | Some timeout => test_port_open_timeout timeout host port -00:19:31 verbose #18385 > |> async.let' -00:19:31 verbose #18386 > fix_condition -00:19:31 verbose #18387 > fun () => is_port_open |> not -00:19:31 verbose #18388 > fun () => port |> return -00:19:31 verbose #18389 > fun () => loop (port + 1) |> async.return_await -00:19:31 verbose #18390 > loop initial_port -00:19:31 verbose #18391 > -00:19:31 verbose #18392 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18393 > //// test -00:19:31 verbose #18394 > -00:19:31 verbose #18395 > inl lock_ports host port = async.new_async_unit fun () => -00:19:31 verbose #18396 > trace Debug (fun () => "_1") _locals -00:19:31 verbose #18397 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use -00:19:31 verbose #18398 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use -00:19:31 verbose #18399 > trace Debug (fun () => "_2") _locals -00:19:31 verbose #18400 > listener1 |> listener_start -00:19:31 verbose #18401 > listener2 |> listener_start -00:19:31 verbose #18402 > trace Debug (fun () => "_3") _locals -00:19:31 verbose #18403 > async.sleep 4000 |> async.do -00:19:31 verbose #18404 > trace Debug (fun () => "_4") _locals -00:19:31 verbose #18405 > listener1 |> listener_stop -00:19:31 verbose #18406 > listener2 |> listener_stop -00:19:31 verbose #18407 > trace Debug (fun () => "_5") _locals -00:19:31 verbose #18408 > -00:19:31 verbose #18409 > inl host = "127.0.0.1" -00:19:31 verbose #18410 > inl port = 5555 -00:19:31 verbose #18411 > -00:19:31 verbose #18412 > fun () => -00:19:31 verbose #18413 > trace Debug (fun () => "1") _locals -00:19:31 verbose #18414 > inl child = lock_ports host port |> async.start_child |> async.let' -00:19:31 verbose #18415 > trace Debug (fun () => "2") _locals -00:19:31 verbose #18416 > async.sleep 240 |> async.do -00:19:31 verbose #18417 > trace Debug (fun () => "3") _locals -00:19:31 verbose #18418 > inl available_port = get_available_port (None |> optionm'.box) host port |> -00:19:31 verbose #18419 > async.let' -00:19:31 verbose #18420 > trace Debug (fun () => "4") _locals -00:19:31 verbose #18421 > inl retries = wait_for_port_access (None |> optionm'.box) false host port |> -00:19:31 verbose #18422 > async.let' -00:19:31 verbose #18423 > trace Debug (fun () => "5") _locals -00:19:31 verbose #18424 > child |> async.do -00:19:31 verbose #18425 > trace Debug (fun () => "6") _locals -00:19:31 verbose #18426 > (available_port, retries) |> return -00:19:31 verbose #18427 > |> async.new_async_unit -00:19:31 verbose #18428 > |> async.run_with_timeout 15000 -00:19:31 verbose #18429 > |> function -00:19:31 verbose #18430 > | Some (available_port, retries) => -00:19:31 verbose #18431 > available_port |> _assert_eq (port + 2) -00:19:31 verbose #18432 > -00:19:31 verbose #18433 > retries -00:19:31 verbose #18434 > |> _assert_between -00:19:31 verbose #18435 > if runtime.is_windows () then 100i64 else 100 -00:19:31 verbose #18436 > if runtime.is_windows () then 150 else 1200 -00:19:31 verbose #18437 > -00:19:31 verbose #18438 > true -00:19:31 verbose #18439 > | _ => false -00:19:31 verbose #18440 > |> _assert_eq true -00:19:31 verbose #18441 > -00:19:31 verbose #18442 > ╭─[ 7.27s - stdout ]───────────────────────────────────────────────────────────╮ -00:19:31 verbose #18443 > │ 00:00:00 debug #1 1 │ -00:19:31 verbose #18444 > │ 00:00:00 debug #2 _1 │ -00:19:31 verbose #18445 > │ 00:00:00 debug #3 2 │ -00:19:31 verbose #18446 > │ 00:00:00 debug #4 _2 │ -00:19:31 verbose #18447 > │ 00:00:00 debug #5 _3 │ -00:19:31 verbose #18448 > │ 00:00:00 debug #6 3 │ -00:19:31 verbose #18449 > │ 00:00:02 verbose #7 networking.test_port_open / port: 5557 / ex: │ -00:19:31 verbose #18450 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:19:31 verbose #18451 > │ be made because the target machine actively refused it.) │ -00:19:31 verbose #18452 > │ 00:00:02 debug #8 4 │ -00:19:31 verbose #18453 > │ 00:00:02 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #18454 > │ / timeout: None / status: False │ -00:19:31 verbose #18455 > │ 00:00:03 verbose #10 networking.wait_for_port_access / port: 5555 / retry: │ -00:19:31 verbose #18456 > │ 100 / timeout: None / status: False │ -00:19:31 verbose #18457 > │ 00:00:04 debug #11 _4 │ -00:19:31 verbose #18458 > │ 00:00:04 debug #12 _5 │ -00:19:31 verbose #18459 > │ 00:00:06 verbose #13 networking.test_port_open / port: 5555 / ex: │ -00:19:31 verbose #18460 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:19:31 verbose #18461 > │ be made because the target machine actively refused it.) │ -00:19:31 verbose #18462 > │ 00:00:06 debug #14 5 │ -00:19:31 verbose #18463 > │ 00:00:06 debug #15 6 │ -00:19:31 verbose #18464 > │ assert_eq / actual: 5557 / expected: 5557 │ -00:19:31 verbose #18465 > │ assert_between / actual: 102L / expected: struct (100L, 150L) │ -00:19:31 verbose #18466 > │ assert_eq / actual: true / expected: true │ -00:19:31 verbose #18467 > │ │ -00:19:31 verbose #18468 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18469 > -00:19:31 verbose #18470 > ── spiral ────────────────────────────────────────────────────────────────────── -00:19:31 verbose #18471 > //// test -00:19:31 verbose #18472 > -00:19:31 verbose #18473 > inl lock_ports host port = async.new_async_unit fun () => -00:19:31 verbose #18474 > trace Debug (fun () => "_1") _locals -00:19:31 verbose #18475 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use -00:19:31 verbose #18476 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use -00:19:31 verbose #18477 > trace Debug (fun () => "_2") _locals -00:19:31 verbose #18478 > listener1 |> listener_start -00:19:31 verbose #18479 > listener2 |> listener_start -00:19:31 verbose #18480 > trace Debug (fun () => "_3") _locals -00:19:31 verbose #18481 > async.sleep 400 |> async.do -00:19:31 verbose #18482 > trace Debug (fun () => "_4") _locals -00:19:31 verbose #18483 > listener1 |> listener_stop -00:19:31 verbose #18484 > listener2 |> listener_stop -00:19:31 verbose #18485 > trace Debug (fun () => "_5") _locals -00:19:31 verbose #18486 > -00:19:31 verbose #18487 > inl host = "127.0.0.1" -00:19:31 verbose #18488 > inl port = 5555 -00:19:31 verbose #18489 > -00:19:31 verbose #18490 > fun () => -00:19:31 verbose #18491 > trace Debug (fun () => "1") _locals -00:19:31 verbose #18492 > inl child = lock_ports host port |> async.start_child |> async.let' -00:19:31 verbose #18493 > trace Debug (fun () => "2") _locals -00:19:31 verbose #18494 > async.sleep 240 |> async.do -00:19:31 verbose #18495 > trace Debug (fun () => "3") _locals -00:19:31 verbose #18496 > inl available_port = get_available_port (Some 60 |> optionm'.box) host port -00:19:31 verbose #18497 > |> async.let' -00:19:31 verbose #18498 > trace Debug (fun () => "4") _locals -00:19:31 verbose #18499 > inl retries = wait_for_port_access (Some 60 |> optionm'.box) false host port -00:19:31 verbose #18500 > |> async.let' -00:19:31 verbose #18501 > trace Debug (fun () => "5") _locals -00:19:31 verbose #18502 > child |> async.do -00:19:31 verbose #18503 > trace Debug (fun () => "6") _locals -00:19:31 verbose #18504 > (available_port, retries) |> return -00:19:31 verbose #18505 > |> async.new_async_unit -00:19:31 verbose #18506 > |> async.run_with_timeout 1500 -00:19:31 verbose #18507 > |> function -00:19:31 verbose #18508 > | Some (available_port, retries) => -00:19:31 verbose #18509 > available_port |> _assert_eq (port + 2) -00:19:31 verbose #18510 > -00:19:31 verbose #18511 > retries -00:19:31 verbose #18512 > |> _assert_between -00:19:31 verbose #18513 > (if runtime.is_windows () then 2i64 else 1) -00:19:31 verbose #18514 > (if runtime.is_windows () then 10 else 120) -00:19:31 verbose #18515 > -00:19:31 verbose #18516 > true -00:19:31 verbose #18517 > | _ => false -00:19:31 verbose #18518 > |> _assert_eq true -00:19:31 verbose #18519 > -00:19:31 verbose #18520 > ╭─[ 2.46s - stderr ]───────────────────────────────────────────────────────────╮ -00:19:31 verbose #18521 > │ 00:00:00 debug #1 1 │ -00:19:31 verbose #18522 > │ 00:00:00 debug #2 2 │ -00:19:31 verbose #18523 > │ 00:00:00 debug #3 _1 │ -00:19:31 verbose #18524 > │ 00:00:00 debug #4 _2 │ -00:19:31 verbose #18525 > │ 00:00:00 debug #5 _3 │ -00:19:31 verbose #18526 > │ 00:00:00 debug #6 3 │ -00:19:31 verbose #18527 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #18528 > │ 00:00:00 debug #8 4 │ -00:19:31 verbose #18529 > │ 00:00:00 debug #9 _4 │ -00:19:31 verbose #18530 > │ 00:00:00 debug #10 _5 │ -00:19:31 verbose #18531 > │ 00:00:00 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:19:31 verbose #18532 > │ / timeout: Some 60 / status: False │ -00:19:31 verbose #18533 > │ 00:00:00 debug #12 run_with_timeout_async / timeout: 60 │ -00:19:31 verbose #18534 > │ 00:00:00 debug #13 5 │ -00:19:31 verbose #18535 > │ 00:00:00 debug #14 6 │ -00:19:31 verbose #18536 > │ assert_eq / actual: 5557 / expected: 5557 │ -00:19:31 verbose #18537 > │ │ -00:19:31 verbose #18538 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:19:31 verbose #18539 > Exiting... -00:19:31 verbose #18540 > 00:00:34 debug #5 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/networking.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/networking.dib" --output-path "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:20:02 verbose #18541 > 00:20:01 debug #185 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ac69d12347c190a8d2c2a1f8afda9fdaabaa84df07d734f0578ca8e30423283a/main.spi -00:20:03 verbose #18542 > -00:20:03 verbose #18543 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18544 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18545 > │ # networking │ -00:20:03 verbose #18546 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18547 > -00:20:03 verbose #18548 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18549 > open rust_operators -00:20:03 verbose #18550 > -00:20:03 verbose #18551 > ── spiral - import ───────────────────────────────────────────────────────────── -00:20:03 verbose #18552 > #r -00:20:03 verbose #18553 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:20:03 verbose #18554 > otNet.Interactive.Spiral.dll" -00:20:03 verbose #18555 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:20:03 verbose #18556 > #r -00:20:03 verbose #18557 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:20:03 verbose #18558 > otNet.Interactive.dll" -00:20:03 verbose #18559 > open type Microsoft.DotNet.Interactive.Kernel -00:20:03 verbose #18560 > -00:20:03 verbose #18561 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18562 > //// test -00:20:03 verbose #18563 > -00:20:03 verbose #18564 > open testing -00:20:03 verbose #18565 > -00:20:03 verbose #18566 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18567 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18568 > │ ## types │ -00:20:03 verbose #18569 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18570 > -00:20:03 verbose #18571 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18572 > inl types () = -00:20:03 verbose #18573 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:20:03 verbose #18574 > Fable.Core.Emit(\"reqwest_wasm::Error\")>]]\n#endif\ntype reqwest_Error = class -00:20:03 verbose #18575 > end" -00:20:03 verbose #18576 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:20:03 verbose #18577 > Fable.Core.Emit(\"reqwest_wasm::RequestBuilder\")>]]\n#endif\ntype -00:20:03 verbose #18578 > reqwest_RequestBuilder = class end" -00:20:03 verbose #18579 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; -00:20:03 verbose #18580 > Fable.Core.Emit(\"reqwest_wasm::Response\")>]]\n#endif\ntype reqwest_Response = -00:20:03 verbose #18581 > class end" -00:20:03 verbose #18582 > -00:20:03 verbose #18583 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18584 > inl types () = -00:20:03 verbose #18585 > types () -00:20:03 verbose #18586 > env.types () -00:20:03 verbose #18587 > rust.types () -00:20:03 verbose #18588 > sm'.types () -00:20:03 verbose #18589 > -00:20:03 verbose #18590 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18591 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18592 > │ ## reqwest_response │ -00:20:03 verbose #18593 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18594 > -00:20:03 verbose #18595 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18596 > nominal reqwest_response = $"reqwest_Response" -00:20:03 verbose #18597 > -00:20:03 verbose #18598 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18599 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18600 > │ ## reqwest_error │ -00:20:03 verbose #18601 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18602 > -00:20:03 verbose #18603 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18604 > nominal reqwest_error = $"reqwest_Error" -00:20:03 verbose #18605 > -00:20:03 verbose #18606 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18607 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18608 > │ ## request_builder │ -00:20:03 verbose #18609 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18610 > -00:20:03 verbose #18611 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18612 > nominal request_builder = $"reqwest_RequestBuilder" -00:20:03 verbose #18613 > -00:20:03 verbose #18614 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18615 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18616 > │ ## request_type │ -00:20:03 verbose #18617 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18618 > -00:20:03 verbose #18619 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18620 > union request_type = -00:20:03 verbose #18621 > | Get -00:20:03 verbose #18622 > | Post -00:20:03 verbose #18623 > -00:20:03 verbose #18624 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18625 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18626 > │ ## request │ -00:20:03 verbose #18627 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18628 > -00:20:03 verbose #18629 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18630 > type request = -00:20:03 verbose #18631 > { -00:20:03 verbose #18632 > url : string -00:20:03 verbose #18633 > request_type : request_type -00:20:03 verbose #18634 > body : string -00:20:03 verbose #18635 > json : bool -00:20:03 verbose #18636 > auto_refresh : bool -00:20:03 verbose #18637 > } -00:20:03 verbose #18638 > -00:20:03 verbose #18639 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18640 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18641 > │ ## new_request_get │ -00:20:03 verbose #18642 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18643 > -00:20:03 verbose #18644 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18645 > inl new_request_get (url : string) : request_builder = -00:20:03 verbose #18646 > inl url = join url -00:20:03 verbose #18647 > inl url = url |> sm'.to_std_string -00:20:03 verbose #18648 > inl url = join url -00:20:03 verbose #18649 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err| -00:20:03 verbose #18650 > err.to_string())?.get(!url)"') -00:20:03 verbose #18651 > -00:20:03 verbose #18652 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18653 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18654 > │ ## new_request_post │ -00:20:03 verbose #18655 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18656 > -00:20:03 verbose #18657 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18658 > inl new_request_post (url : string) : request_builder = -00:20:03 verbose #18659 > inl url = join url -00:20:03 verbose #18660 > inl url = url |> sm'.to_std_string -00:20:03 verbose #18661 > inl url = join url -00:20:03 verbose #18662 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err| -00:20:03 verbose #18663 > err.to_string())?.post(!url)"') -00:20:03 verbose #18664 > -00:20:03 verbose #18665 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18666 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18667 > │ ## request_send │ -00:20:03 verbose #18668 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18669 > -00:20:03 verbose #18670 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18671 > inl request_send (request : request_builder) : async.future_pin (resultm.result' -00:20:03 verbose #18672 > reqwest_response reqwest_error) = -00:20:03 verbose #18673 > inl request = join request -00:20:03 verbose #18674 > !\($'"Box::pin(reqwest_wasm::RequestBuilder::send(!request))"') -00:20:03 verbose #18675 > -00:20:03 verbose #18676 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18677 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18678 > │ ## request_body │ -00:20:03 verbose #18679 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18680 > -00:20:03 verbose #18681 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18682 > inl request_body (body : string) (request : request_builder) : request_builder = -00:20:03 verbose #18683 > inl body = body |> sm'.to_std_string -00:20:03 verbose #18684 > !\($'"reqwest_wasm::RequestBuilder::body(!request, !body)"') -00:20:03 verbose #18685 > -00:20:03 verbose #18686 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18687 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18688 > │ ## request_header │ -00:20:03 verbose #18689 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18690 > -00:20:03 verbose #18691 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18692 > inl request_header (key : string) (value : string) (request : request_builder) : -00:20:03 verbose #18693 > request_builder = -00:20:03 verbose #18694 > inl request = join request -00:20:03 verbose #18695 > inl key = key |> sm'.to_std_string -00:20:03 verbose #18696 > inl value = value |> sm'.to_std_string -00:20:03 verbose #18697 > !\($'"reqwest_wasm::RequestBuilder::header(!request, !key, !value)"') -00:20:03 verbose #18698 > -00:20:03 verbose #18699 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18700 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18701 > │ ## request_json │ -00:20:03 verbose #18702 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18703 > -00:20:03 verbose #18704 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18705 > inl request_json forall t. (obj : t) (request : request_builder) : -00:20:03 verbose #18706 > request_builder = -00:20:03 verbose #18707 > !\($'"reqwest_wasm::RequestBuilder::json(!request, &!obj)"') -00:20:03 verbose #18708 > -00:20:03 verbose #18709 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18710 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18711 > │ ## response_text │ -00:20:03 verbose #18712 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18713 > -00:20:03 verbose #18714 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18715 > inl response_text (response : reqwest_response) : async.future_pin -00:20:03 verbose #18716 > (resultm.result' sm'.std_string reqwest_error) = -00:20:03 verbose #18717 > !\($'"Box::pin(reqwest_wasm::Response::text(!response))"') -00:20:03 verbose #18718 > -00:20:03 verbose #18719 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18720 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18721 > │ ## tcp_client │ -00:20:03 verbose #18722 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18723 > -00:20:03 verbose #18724 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18725 > nominal tcp_client = $'System.Net.Sockets.TcpClient' -00:20:03 verbose #18726 > -00:20:03 verbose #18727 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18728 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18729 > │ ## new_tcp_client │ -00:20:03 verbose #18730 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18731 > -00:20:03 verbose #18732 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18733 > inl new_tcp_client () : tcp_client = -00:20:03 verbose #18734 > $'new `tcp_client ()' -00:20:03 verbose #18735 > -00:20:03 verbose #18736 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18737 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18738 > │ ## ip_address │ -00:20:03 verbose #18739 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18740 > -00:20:03 verbose #18741 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18742 > nominal ip_address = $'System.Net.IPAddress' -00:20:03 verbose #18743 > -00:20:03 verbose #18744 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18745 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18746 > │ ## ip_address_parse │ -00:20:03 verbose #18747 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18748 > -00:20:03 verbose #18749 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18750 > inl ip_address_parse (s : string) : ip_address = -00:20:03 verbose #18751 > s |> $'`ip_address.Parse' -00:20:03 verbose #18752 > -00:20:03 verbose #18753 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18754 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18755 > │ ## tcp_listener │ -00:20:03 verbose #18756 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18757 > -00:20:03 verbose #18758 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18759 > nominal tcp_listener = $'System.Net.Sockets.TcpListener' -00:20:03 verbose #18760 > -00:20:03 verbose #18761 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18762 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18763 > │ ## new_tcp_listener │ -00:20:03 verbose #18764 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18765 > -00:20:03 verbose #18766 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18767 > inl new_tcp_listener (ip_address : ip_address) (port : i32) : tcp_listener = -00:20:03 verbose #18768 > $'new `tcp_listener (!ip_address, !port)' -00:20:03 verbose #18769 > -00:20:03 verbose #18770 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18771 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18772 > │ ## listener_start │ -00:20:03 verbose #18773 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18774 > -00:20:03 verbose #18775 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18776 > inl listener_start (listener : tcp_listener) : () = -00:20:03 verbose #18777 > $'!listener.Start' () -00:20:03 verbose #18778 > -00:20:03 verbose #18779 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18780 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18781 > │ ## listener_stop │ -00:20:03 verbose #18782 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18783 > -00:20:03 verbose #18784 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18785 > inl listener_stop (listener : tcp_listener) : () = -00:20:03 verbose #18786 > $'!listener.Stop' () -00:20:03 verbose #18787 > -00:20:03 verbose #18788 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18789 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18790 > │ ## client_connect_async │ -00:20:03 verbose #18791 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18792 > -00:20:03 verbose #18793 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18794 > inl client_connect_async -00:20:03 verbose #18795 > (host : string) -00:20:03 verbose #18796 > (port : i32) -00:20:03 verbose #18797 > (ct : threading.cancellation_token) -00:20:03 verbose #18798 > (client : tcp_client) -00:20:03 verbose #18799 > : async.value_task -00:20:03 verbose #18800 > = -00:20:03 verbose #18801 > $'!client.ConnectAsync (!host, !port, !ct)' -00:20:03 verbose #18802 > -00:20:03 verbose #18803 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18804 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18805 > │ ## test_port_open │ -00:20:03 verbose #18806 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18807 > -00:20:03 verbose #18808 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18809 > inl test_port_open host port : _ bool = async.new_async fun () => -00:20:03 verbose #18810 > inl ct = async.cancellation_token () |> async.let' -00:20:03 verbose #18811 > inl client = new_tcp_client () |> use -00:20:03 verbose #18812 > try_unit -00:20:03 verbose #18813 > fun () => -00:20:03 verbose #18814 > client |> client_connect_async host port ct |> -00:20:03 verbose #18815 > async.await_value_task_unit |> async.do -00:20:03 verbose #18816 > return true -00:20:03 verbose #18817 > fun ex => -00:20:03 verbose #18818 > inl ex = ex |> sm'.format_exception -00:20:03 verbose #18819 > trace Verbose (fun () => $'$"networking.test_port_open / port: -00:20:03 verbose #18820 > {!port} / ex: {!ex}"') _locals -00:20:03 verbose #18821 > return false -00:20:03 verbose #18822 > -00:20:03 verbose #18823 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18824 > //// test -00:20:03 verbose #18825 > -00:20:03 verbose #18826 > test_port_open "127.0.0.1" 65536 -00:20:03 verbose #18827 > |> async.run_with_timeout 120 -00:20:03 verbose #18828 > |> _assert_eq (Some false) -00:20:03 verbose #18829 > -00:20:03 verbose #18830 > ╭─[ 1.79s - stdout ]───────────────────────────────────────────────────────────╮ -00:20:03 verbose #18831 > │ 00:00:00 verbose #1 networking.test_port_open / port: 65536 / ex: │ -00:20:03 verbose #18832 > │ System.ArgumentOutOfRangeException: Specified argument was out of the range │ -00:20:03 verbose #18833 > │ of valid values. (Parameter 'port') │ -00:20:03 verbose #18834 > │ assert_eq / actual: US2_0 false / expected: US2_0 false │ -00:20:03 verbose #18835 > │ │ -00:20:03 verbose #18836 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18837 > -00:20:03 verbose #18838 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18839 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18840 > │ ## test_port_open_timeout │ -00:20:03 verbose #18841 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18842 > -00:20:03 verbose #18843 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18844 > inl test_port_open_timeout timeout host port : _ bool = async.new_async_unit fun -00:20:03 verbose #18845 > () => -00:20:03 verbose #18846 > test_port_open host port -00:20:03 verbose #18847 > |> async.run_with_timeout_async timeout -00:20:03 verbose #18848 > |> async.let' -00:20:03 verbose #18849 > |> function -00:20:03 verbose #18850 > | None => false -00:20:03 verbose #18851 > | Some result => result -00:20:03 verbose #18852 > |> return -00:20:03 verbose #18853 > -00:20:03 verbose #18854 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18855 > //// test -00:20:03 verbose #18856 > -00:20:03 verbose #18857 > test_port_open_timeout 120 "127.0.0.1" 65535 -00:20:03 verbose #18858 > |> async.run_synchronously -00:20:03 verbose #18859 > |> _assert_eq false -00:20:03 verbose #18860 > -00:20:03 verbose #18861 > ╭─[ 615.44ms - stdout ]────────────────────────────────────────────────────────╮ -00:20:03 verbose #18862 > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 120 │ -00:20:03 verbose #18863 > │ assert_eq / actual: false / expected: false │ -00:20:03 verbose #18864 > │ │ -00:20:03 verbose #18865 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18866 > -00:20:03 verbose #18867 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #18868 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #18869 > │ ## wait_for_port_access │ -00:20:03 verbose #18870 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18871 > -00:20:03 verbose #18872 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18873 > inl wait_for_port_access timeout status host port : _ i64 = -00:20:03 verbose #18874 > let rec loop retry : _ i64 = async.new_async_unit fun () => -00:20:03 verbose #18875 > inl isPortOpen = -00:20:03 verbose #18876 > match timeout |> optionm'.unbox with -00:20:03 verbose #18877 > | None => test_port_open host port -00:20:03 verbose #18878 > | Some timeout => test_port_open_timeout timeout host port -00:20:03 verbose #18879 > |> async.let' -00:20:03 verbose #18880 > -00:20:03 verbose #18881 > fix_condition -00:20:03 verbose #18882 > fun () => isPortOpen = status -00:20:03 verbose #18883 > fun () => retry |> return -00:20:03 verbose #18884 > fun () => -00:20:03 verbose #18885 > if retry % 100 = 0 then -00:20:03 verbose #18886 > inl _locals () = $'$"port: {!port} / retry: {!retry} -00:20:03 verbose #18887 > timeout: %A{!timeout} / status: {!status} / {!_locals ()}"' -00:20:03 verbose #18888 > trace Verbose (fun () => "networking.wait_for_port_access") -00:20:03 verbose #18889 > _locals -00:20:03 verbose #18890 > async.sleep 10 |> async.do -00:20:03 verbose #18891 > loop (retry + 1) |> async.return_await -00:20:03 verbose #18892 > loop 0i64 -00:20:03 verbose #18893 > -00:20:03 verbose #18894 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18895 > //// test -00:20:03 verbose #18896 > -00:20:03 verbose #18897 > inl lock_port host port = async.new_async fun () => -00:20:03 verbose #18898 > trace Debug (fun () => "_1") _locals -00:20:03 verbose #18899 > async.sleep 5000 |> async.do -00:20:03 verbose #18900 > inl listener = new_tcp_listener (host |> ip_address_parse) port |> use -00:20:03 verbose #18901 > trace Debug (fun () => "_2") _locals -00:20:03 verbose #18902 > listener |> listener_start -00:20:03 verbose #18903 > trace Debug (fun () => "_3") _locals -00:20:03 verbose #18904 > async.sleep 2000 |> async.do -00:20:03 verbose #18905 > trace Debug (fun () => "_4") _locals -00:20:03 verbose #18906 > $'!listener.Stop' () -00:20:03 verbose #18907 > trace Debug (fun () => "_5") _locals -00:20:03 verbose #18908 > -00:20:03 verbose #18909 > inl host = "127.0.0.1" -00:20:03 verbose #18910 > inl port = 5555i32 -00:20:03 verbose #18911 > -00:20:03 verbose #18912 > fun () => -00:20:03 verbose #18913 > trace Debug (fun () => "1") _locals -00:20:03 verbose #18914 > inl child = lock_port host port |> async.start_child |> async.let' -00:20:03 verbose #18915 > trace Debug (fun () => "2") _locals -00:20:03 verbose #18916 > async.sleep 1 |> async.do -00:20:03 verbose #18917 > trace Debug (fun () => "3") _locals -00:20:03 verbose #18918 > inl retries1 = wait_for_port_access (None |> optionm'.box) true host port |> -00:20:03 verbose #18919 > async.let' -00:20:03 verbose #18920 > trace Debug (fun () => "4") _locals -00:20:03 verbose #18921 > inl retries2 = wait_for_port_access (None |> optionm'.box) false host port -00:20:03 verbose #18922 > |> async.let' -00:20:03 verbose #18923 > trace Debug (fun () => "5") _locals -00:20:03 verbose #18924 > child |> async.do -00:20:03 verbose #18925 > trace Debug (fun () => "6") _locals -00:20:03 verbose #18926 > (retries1, retries2) |> return -00:20:03 verbose #18927 > |> async.new_async_unit -00:20:03 verbose #18928 > |> async.run_with_timeout 20000 -00:20:03 verbose #18929 > |> function -00:20:03 verbose #18930 > | Some (retries1, retries2) => -00:20:03 verbose #18931 > retries1 -00:20:03 verbose #18932 > |> _assert_between -00:20:03 verbose #18933 > if runtime.is_windows () then 2i64 else 2 -00:20:03 verbose #18934 > if runtime.is_windows () then 5 else 1500 -00:20:03 verbose #18935 > -00:20:03 verbose #18936 > retries2 -00:20:03 verbose #18937 > |> _assert_between -00:20:03 verbose #18938 > if runtime.is_windows () then 80i64 else 80 -00:20:03 verbose #18939 > if runtime.is_windows () then 150 else 600 -00:20:03 verbose #18940 > -00:20:03 verbose #18941 > true -00:20:03 verbose #18942 > | _ => false -00:20:03 verbose #18943 > |> _assert_eq true -00:20:03 verbose #18944 > -00:20:03 verbose #18945 > ╭─[ 10.40s - stdout ]──────────────────────────────────────────────────────────╮ -00:20:03 verbose #18946 > │ 00:00:00 debug #1 1 │ -00:20:03 verbose #18947 > │ 00:00:00 debug #2 _1 │ -00:20:03 verbose #18948 > │ 00:00:00 debug #3 2 │ -00:20:03 verbose #18949 > │ 00:00:00 debug #4 3 │ -00:20:03 verbose #18950 > │ 00:00:02 verbose #5 networking.test_port_open / port: 5555 / ex: │ -00:20:03 verbose #18951 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:20:03 verbose #18952 > │ be made because the target machine actively refused it.) │ -00:20:03 verbose #18953 > │ 00:00:02 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:20:03 verbose #18954 > │ / timeout: None / status: True │ -00:20:03 verbose #18955 > │ 00:00:04 verbose #7 networking.test_port_open / port: 5555 / ex: │ -00:20:03 verbose #18956 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:20:03 verbose #18957 > │ be made because the target machine actively refused it.) │ -00:20:03 verbose #18958 > │ 00:00:05 debug #8 _2 │ -00:20:03 verbose #18959 > │ 00:00:05 debug #9 _3 │ -00:20:03 verbose #18960 > │ 00:00:05 debug #10 4 │ -00:20:03 verbose #18961 > │ 00:00:05 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:20:03 verbose #18962 > │ / timeout: None / status: False │ -00:20:03 verbose #18963 > │ 00:00:06 verbose #12 networking.wait_for_port_access / port: 5555 / retry: │ -00:20:03 verbose #18964 > │ 100 / timeout: None / status: False │ -00:20:03 verbose #18965 > │ 00:00:07 debug #13 _4 │ -00:20:03 verbose #18966 > │ 00:00:07 debug #14 _5 │ -00:20:03 verbose #18967 > │ 00:00:09 verbose #15 networking.test_port_open / port: 5555 / ex: │ -00:20:03 verbose #18968 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:20:03 verbose #18969 > │ be made because the target machine actively refused it.) │ -00:20:03 verbose #18970 > │ 00:00:09 debug #16 5 │ -00:20:03 verbose #18971 > │ 00:00:09 debug #17 6 │ -00:20:03 verbose #18972 > │ assert_between / actual: 2L / expected: struct (2L, 5L) │ -00:20:03 verbose #18973 > │ assert_between / actual: 111L / expected: struct (80L, 150L) │ -00:20:03 verbose #18974 > │ assert_eq / actual: true / expected: true │ -00:20:03 verbose #18975 > │ │ -00:20:03 verbose #18976 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #18977 > -00:20:03 verbose #18978 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #18979 > //// test -00:20:03 verbose #18980 > -00:20:03 verbose #18981 > inl lock_port host port = async.new_async_unit fun () => -00:20:03 verbose #18982 > trace Debug (fun () => "_1") _locals -00:20:03 verbose #18983 > async.sleep 500 |> async.do -00:20:03 verbose #18984 > inl listener = new_tcp_listener (ip_address_parse host) port |> use -00:20:03 verbose #18985 > trace Debug (fun () => "_2") _locals -00:20:03 verbose #18986 > listener |> listener_start -00:20:03 verbose #18987 > trace Debug (fun () => "_3") _locals -00:20:03 verbose #18988 > async.sleep 200 |> async.do -00:20:03 verbose #18989 > trace Debug (fun () => "_4") _locals -00:20:03 verbose #18990 > listener |> listener_stop -00:20:03 verbose #18991 > trace Debug (fun () => "_5") _locals -00:20:03 verbose #18992 > -00:20:03 verbose #18993 > inl host = "127.0.0.1" -00:20:03 verbose #18994 > inl port = 5555 -00:20:03 verbose #18995 > -00:20:03 verbose #18996 > fun () => -00:20:03 verbose #18997 > trace Debug (fun () => "1") _locals -00:20:03 verbose #18998 > inl child = lock_port host port |> async.start_child |> async.let' -00:20:03 verbose #18999 > trace Debug (fun () => "2") _locals -00:20:03 verbose #19000 > async.sleep 1 |> async.do -00:20:03 verbose #19001 > trace Debug (fun () => "3") _locals -00:20:03 verbose #19002 > inl retries1 = wait_for_port_access (Some 60 |> optionm'.box) true host port -00:20:03 verbose #19003 > |> async.let' -00:20:03 verbose #19004 > trace Debug (fun () => "4") _locals -00:20:03 verbose #19005 > inl retries2 = wait_for_port_access (Some 60 |> optionm'.box) false host -00:20:03 verbose #19006 > port |> async.let' -00:20:03 verbose #19007 > trace Debug (fun () => "5") _locals -00:20:03 verbose #19008 > child |> async.do -00:20:03 verbose #19009 > trace Debug (fun () => "6") _locals -00:20:03 verbose #19010 > (retries1, retries2) |> return -00:20:03 verbose #19011 > |> async.new_async_unit -00:20:03 verbose #19012 > |> async.run_with_timeout 2000 -00:20:03 verbose #19013 > |> function -00:20:03 verbose #19014 > | Some (retries1, retries2) => -00:20:03 verbose #19015 > retries1 -00:20:03 verbose #19016 > |> _assert_between -00:20:03 verbose #19017 > if runtime.is_windows () then 4i64 else 2 -00:20:03 verbose #19018 > if runtime.is_windows () then 15 else 150 -00:20:03 verbose #19019 > -00:20:03 verbose #19020 > retries2 -00:20:03 verbose #19021 > |> _assert_between -00:20:03 verbose #19022 > if runtime.is_windows () then 5i64 else 0 -00:20:03 verbose #19023 > if runtime.is_windows () then 20 else 60 -00:20:03 verbose #19024 > -00:20:03 verbose #19025 > true -00:20:03 verbose #19026 > | _ => false -00:20:03 verbose #19027 > |> _assert_eq true -00:20:03 verbose #19028 > -00:20:03 verbose #19029 > ╭─[ 2.04s - stdout ]───────────────────────────────────────────────────────────╮ -00:20:03 verbose #19030 > │ 00:00:00 debug #1 1 │ -00:20:03 verbose #19031 > │ 00:00:00 debug #2 2 │ -00:20:03 verbose #19032 > │ 00:00:00 debug #3 _1 │ -00:20:03 verbose #19033 > │ 00:00:00 debug #4 3 │ -00:20:03 verbose #19034 > │ 00:00:00 debug #5 run_with_timeout_async / timeout: 60 │ -00:20:03 verbose #19035 > │ 00:00:00 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:20:03 verbose #19036 > │ / timeout: Some 60 / status: True │ -00:20:03 verbose #19037 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │ -00:20:03 verbose #19038 > │ 00:00:00 debug #8 run_with_timeout_async / timeout: 60 │ -00:20:03 verbose #19039 > │ 00:00:00 debug #9 run_with_timeout_async / timeout: 60 │ -00:20:03 verbose #19040 > │ 00:00:00 debug #10 run_with_timeout_async / timeout: 60 │ -00:20:03 verbose #19041 > │ 00:00:00 debug #11 run_with_timeout_async / timeout: 60 │ -00:20:03 verbose #19042 > │ 00:00:00 debug #12 _2 │ -00:20:03 verbose #19043 > │ 00:00:00 debug #13 _3 │ -00:20:03 verbose #19044 > │ 00:00:00 debug #14 4 │ -00:20:03 verbose #19045 > │ 00:00:00 verbose #15 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:20:03 verbose #19046 > │ / timeout: Some 60 / status: False │ -00:20:03 verbose #19047 > │ 00:00:00 debug #16 _4 │ -00:20:03 verbose #19048 > │ 00:00:00 debug #17 _5 │ -00:20:03 verbose #19049 > │ 00:00:00 debug #18 run_with_timeout_async / timeout: 60 │ -00:20:03 verbose #19050 > │ 00:00:00 debug #19 5 │ -00:20:03 verbose #19051 > │ 00:00:00 debug #20 6 │ -00:20:03 verbose #19052 > │ assert_between / actual: 6L / expected: struct (4L, 15L) │ -00:20:03 verbose #19053 > │ assert_between / actual: 10L / expected: struct (5L, 20L) │ -00:20:03 verbose #19054 > │ assert_eq / actual: true / expected: true │ -00:20:03 verbose #19055 > │ │ -00:20:03 verbose #19056 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #19057 > -00:20:03 verbose #19058 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #19059 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #19060 > │ ## get_available_port │ -00:20:03 verbose #19061 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #19062 > -00:20:03 verbose #19063 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #19064 > inl get_available_port timeout host initial_port : _ i32 = -00:20:03 verbose #19065 > let rec loop port = async.new_async_unit fun () => -00:20:03 verbose #19066 > inl is_port_open = -00:20:03 verbose #19067 > match timeout |> optionm'.unbox with -00:20:03 verbose #19068 > | None => test_port_open host port -00:20:03 verbose #19069 > | Some timeout => test_port_open_timeout timeout host port -00:20:03 verbose #19070 > |> async.let' -00:20:03 verbose #19071 > fix_condition -00:20:03 verbose #19072 > fun () => is_port_open |> not -00:20:03 verbose #19073 > fun () => port |> return -00:20:03 verbose #19074 > fun () => loop (port + 1) |> async.return_await -00:20:03 verbose #19075 > loop initial_port -00:20:03 verbose #19076 > -00:20:03 verbose #19077 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #19078 > //// test -00:20:03 verbose #19079 > -00:20:03 verbose #19080 > inl lock_ports host port = async.new_async_unit fun () => -00:20:03 verbose #19081 > trace Debug (fun () => "_1") _locals -00:20:03 verbose #19082 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use -00:20:03 verbose #19083 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use -00:20:03 verbose #19084 > trace Debug (fun () => "_2") _locals -00:20:03 verbose #19085 > listener1 |> listener_start -00:20:03 verbose #19086 > listener2 |> listener_start -00:20:03 verbose #19087 > trace Debug (fun () => "_3") _locals -00:20:03 verbose #19088 > async.sleep 4000 |> async.do -00:20:03 verbose #19089 > trace Debug (fun () => "_4") _locals -00:20:03 verbose #19090 > listener1 |> listener_stop -00:20:03 verbose #19091 > listener2 |> listener_stop -00:20:03 verbose #19092 > trace Debug (fun () => "_5") _locals -00:20:03 verbose #19093 > -00:20:03 verbose #19094 > inl host = "127.0.0.1" -00:20:03 verbose #19095 > inl port = 5555 -00:20:03 verbose #19096 > -00:20:03 verbose #19097 > fun () => -00:20:03 verbose #19098 > trace Debug (fun () => "1") _locals -00:20:03 verbose #19099 > inl child = lock_ports host port |> async.start_child |> async.let' -00:20:03 verbose #19100 > trace Debug (fun () => "2") _locals -00:20:03 verbose #19101 > async.sleep 240 |> async.do -00:20:03 verbose #19102 > trace Debug (fun () => "3") _locals -00:20:03 verbose #19103 > inl available_port = get_available_port (None |> optionm'.box) host port |> -00:20:03 verbose #19104 > async.let' -00:20:03 verbose #19105 > trace Debug (fun () => "4") _locals -00:20:03 verbose #19106 > inl retries = wait_for_port_access (None |> optionm'.box) false host port |> -00:20:03 verbose #19107 > async.let' -00:20:03 verbose #19108 > trace Debug (fun () => "5") _locals -00:20:03 verbose #19109 > child |> async.do -00:20:03 verbose #19110 > trace Debug (fun () => "6") _locals -00:20:03 verbose #19111 > (available_port, retries) |> return -00:20:03 verbose #19112 > |> async.new_async_unit -00:20:03 verbose #19113 > |> async.run_with_timeout 15000 -00:20:03 verbose #19114 > |> function -00:20:03 verbose #19115 > | Some (available_port, retries) => -00:20:03 verbose #19116 > available_port |> _assert_eq (port + 2) -00:20:03 verbose #19117 > -00:20:03 verbose #19118 > retries -00:20:03 verbose #19119 > |> _assert_between -00:20:03 verbose #19120 > if runtime.is_windows () then 100i64 else 100 -00:20:03 verbose #19121 > if runtime.is_windows () then 150 else 1200 -00:20:03 verbose #19122 > -00:20:03 verbose #19123 > true -00:20:03 verbose #19124 > | _ => false -00:20:03 verbose #19125 > |> _assert_eq true -00:20:03 verbose #19126 > -00:20:03 verbose #19127 > ╭─[ 7.22s - stdout ]───────────────────────────────────────────────────────────╮ -00:20:03 verbose #19128 > │ 00:00:00 debug #1 1 │ -00:20:03 verbose #19129 > │ 00:00:00 debug #2 _1 │ -00:20:03 verbose #19130 > │ 00:00:00 debug #3 2 │ -00:20:03 verbose #19131 > │ 00:00:00 debug #4 _2 │ -00:20:03 verbose #19132 > │ 00:00:00 debug #5 _3 │ -00:20:03 verbose #19133 > │ 00:00:00 debug #6 3 │ -00:20:03 verbose #19134 > │ 00:00:02 verbose #7 networking.test_port_open / port: 5557 / ex: │ -00:20:03 verbose #19135 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:20:03 verbose #19136 > │ be made because the target machine actively refused it.) │ -00:20:03 verbose #19137 > │ 00:00:02 debug #8 4 │ -00:20:03 verbose #19138 > │ 00:00:02 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:20:03 verbose #19139 > │ / timeout: None / status: False │ -00:20:03 verbose #19140 > │ 00:00:03 verbose #10 networking.wait_for_port_access / port: 5555 / retry: │ -00:20:03 verbose #19141 > │ 100 / timeout: None / status: False │ -00:20:03 verbose #19142 > │ 00:00:04 debug #11 _4 │ -00:20:03 verbose #19143 > │ 00:00:04 debug #12 _5 │ -00:20:03 verbose #19144 > │ 00:00:06 verbose #13 networking.test_port_open / port: 5555 / ex: │ -00:20:03 verbose #19145 > │ System.AggregateException: One or more errors occurred. (No connection could │ -00:20:03 verbose #19146 > │ be made because the target machine actively refused it.) │ -00:20:03 verbose #19147 > │ 00:00:06 debug #14 5 │ -00:20:03 verbose #19148 > │ 00:00:06 debug #15 6 │ -00:20:03 verbose #19149 > │ assert_eq / actual: 5557 / expected: 5557 │ -00:20:03 verbose #19150 > │ assert_between / actual: 105L / expected: struct (100L, 150L) │ -00:20:03 verbose #19151 > │ assert_eq / actual: true / expected: true │ -00:20:03 verbose #19152 > │ │ -00:20:03 verbose #19153 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #19154 > -00:20:03 verbose #19155 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #19156 > //// test -00:20:03 verbose #19157 > -00:20:03 verbose #19158 > inl lock_ports host port = async.new_async_unit fun () => -00:20:03 verbose #19159 > trace Debug (fun () => "_1") _locals -00:20:03 verbose #19160 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use -00:20:03 verbose #19161 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use -00:20:03 verbose #19162 > trace Debug (fun () => "_2") _locals -00:20:03 verbose #19163 > listener1 |> listener_start -00:20:03 verbose #19164 > listener2 |> listener_start -00:20:03 verbose #19165 > trace Debug (fun () => "_3") _locals -00:20:03 verbose #19166 > async.sleep 400 |> async.do -00:20:03 verbose #19167 > trace Debug (fun () => "_4") _locals -00:20:03 verbose #19168 > listener1 |> listener_stop -00:20:03 verbose #19169 > listener2 |> listener_stop -00:20:03 verbose #19170 > trace Debug (fun () => "_5") _locals -00:20:03 verbose #19171 > -00:20:03 verbose #19172 > inl host = "127.0.0.1" -00:20:03 verbose #19173 > inl port = 5555 -00:20:03 verbose #19174 > -00:20:03 verbose #19175 > fun () => -00:20:03 verbose #19176 > trace Debug (fun () => "1") _locals -00:20:03 verbose #19177 > inl child = lock_ports host port |> async.start_child |> async.let' -00:20:03 verbose #19178 > trace Debug (fun () => "2") _locals -00:20:03 verbose #19179 > async.sleep 240 |> async.do -00:20:03 verbose #19180 > trace Debug (fun () => "3") _locals -00:20:03 verbose #19181 > inl available_port = get_available_port (Some 60 |> optionm'.box) host port -00:20:03 verbose #19182 > |> async.let' -00:20:03 verbose #19183 > trace Debug (fun () => "4") _locals -00:20:03 verbose #19184 > inl retries = wait_for_port_access (Some 60 |> optionm'.box) false host port -00:20:03 verbose #19185 > |> async.let' -00:20:03 verbose #19186 > trace Debug (fun () => "5") _locals -00:20:03 verbose #19187 > child |> async.do -00:20:03 verbose #19188 > trace Debug (fun () => "6") _locals -00:20:03 verbose #19189 > (available_port, retries) |> return -00:20:03 verbose #19190 > |> async.new_async_unit -00:20:03 verbose #19191 > |> async.run_with_timeout 1500 -00:20:03 verbose #19192 > |> function -00:20:03 verbose #19193 > | Some (available_port, retries) => -00:20:03 verbose #19194 > available_port |> _assert_eq (port + 2) -00:20:03 verbose #19195 > -00:20:03 verbose #19196 > retries -00:20:03 verbose #19197 > |> _assert_between -00:20:03 verbose #19198 > (if runtime.is_windows () then 2i64 else 1) -00:20:03 verbose #19199 > (if runtime.is_windows () then 10 else 120) -00:20:03 verbose #19200 > -00:20:03 verbose #19201 > true -00:20:03 verbose #19202 > | _ => false -00:20:03 verbose #19203 > |> _assert_eq true -00:20:03 verbose #19204 > -00:20:03 verbose #19205 > ╭─[ 1.32s - stdout ]───────────────────────────────────────────────────────────╮ -00:20:03 verbose #19206 > │ 00:00:00 debug #1 1 │ -00:20:03 verbose #19207 > │ 00:00:00 debug #2 2 │ -00:20:03 verbose #19208 > │ 00:00:00 debug #3 _1 │ -00:20:03 verbose #19209 > │ 00:00:00 debug #4 _2 │ -00:20:03 verbose #19210 > │ 00:00:00 debug #5 _3 │ -00:20:03 verbose #19211 > │ 00:00:00 debug #6 3 │ -00:20:03 verbose #19212 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │ -00:20:03 verbose #19213 > │ 00:00:00 debug #8 4 │ -00:20:03 verbose #19214 > │ 00:00:00 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │ -00:20:03 verbose #19215 > │ / timeout: Some 60 / status: False │ -00:20:03 verbose #19216 > │ 00:00:00 debug #10 _4 │ -00:20:03 verbose #19217 > │ 00:00:00 debug #11 _5 │ -00:20:03 verbose #19218 > │ 00:00:00 debug #12 run_with_timeout_async / timeout: 60 │ -00:20:03 verbose #19219 > │ 00:00:00 debug #13 5 │ -00:20:03 verbose #19220 > │ 00:00:00 debug #14 6 │ -00:20:03 verbose #19221 > │ assert_eq / actual: 5557 / expected: 5557 │ -00:20:03 verbose #19222 > │ assert_between / actual: 4L / expected: struct (2L, 10L) │ -00:20:03 verbose #19223 > │ assert_eq / actual: true / expected: true │ -00:20:03 verbose #19224 > │ │ -00:20:03 verbose #19225 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #19226 > -00:20:03 verbose #19227 > ── markdown ──────────────────────────────────────────────────────────────────── -00:20:03 verbose #19228 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:20:03 verbose #19229 > │ ## main │ -00:20:03 verbose #19230 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:20:03 verbose #19231 > -00:20:03 verbose #19232 > ── spiral ────────────────────────────────────────────────────────────────────── -00:20:03 verbose #19233 > inl main () = -00:20:03 verbose #19234 > types () -00:20:03 verbose #19235 > init_trace_state None -00:20:03 verbose #19236 > $"let test_port_open x = !test_port_open x" : () -00:20:03 verbose #19237 > $"let test_port_open_timeout x = !test_port_open_timeout x" : () -00:20:03 verbose #19238 > $"let wait_for_port_access x = !wait_for_port_access x" : () -00:20:03 verbose #19239 > $"let get_available_port x = !get_available_port x" : () -00:20:03 verbose #19240 > 00:01:05 verbose #6 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 34338 -00:20:03 verbose #19241 > 00:01:05 debug #7 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:20:07 verbose #19242 > 00:01:09 verbose #8 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/networking.dib.ipynb to html\e[0m -00:20:07 verbose #19243 > 00:01:09 verbose #9 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:20:07 verbose #19244 > 00:01:09 verbose #10 \e[4;7m validate(nb)\e[0m -00:20:07 verbose #19245 > 00:01:09 verbose #11 \e[4;7m[NbConvertApp] Writing 367383 bytes to c:\home\git\polyglot\lib\spiral\networking.dib.html\e[0m -00:20:07 verbose #19246 > 00:01:09 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 611 -00:20:07 verbose #19247 > 00:01:09 debug #13 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 611 -00:20:07 verbose #19248 > 00:01:09 debug #14 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/networking.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/networking.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:20:07 verbose #19249 > 00:01:10 verbose #15 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:20:07 verbose #19250 > 00:01:10 debug #16 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:20:08 verbose #19251 > 00:01:10 debug #17 spiral_builder.run / dib / exit_code: 0 / result.Length: 35008 -00:20:08 debug #19252 execute_with_options_async / exit_code: 0 / output.Length: 105026 -00:20:08 debug #26 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path networking.dib --retries 3 -00:20:08 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False -00:20:08 debug #7 run_with_timeout_async / timeout: 100 -00:00:00 debug #4 writeDibCode / output: Spi / path: common.dib -00:00:00 debug #4 writeDibCode / output: Spi / path: runtime.dib -00:00:00 debug #4 writeDibCode / output: Spi / path: async.dib -00:00:00 debug #4 writeDibCode / output: Spi / path: networking.dib -00:00:00 debug #4 writeDibCode / output: Spi / path: threading.dib -00:00:00 debug #4 writeDibCode / output: Spi / path: testing.dib -00:00:00 debug #4 writeDibCode / output: Spi / path: trace.dib -00:00:00 debug #4 writeDibCode / output: Spi / path: crypto.dib -00:00:00 debug #7 parseDibCode / output: Spi / file: networking.dib -00:00:00 debug #8 parseDibCode / output: Spi / file: testing.dib -00:00:00 debug #6 parseDibCode / output: Spi / file: common.dib -00:00:00 debug #6 parseDibCode / output: Spi / file: async.dib -00:00:00 debug #10 parseDibCode / output: Spi / file: trace.dib -00:00:00 debug #9 parseDibCode / output: Spi / file: runtime.dib -00:00:00 debug #11 parseDibCode / output: Spi / file: crypto.dib -00:00:00 debug #11 parseDibCode / output: Spi / file: threading.dib -00:00:00 debug #14 writeDibCode / output: Spi / path: console.dib -00:00:00 debug #13 writeDibCode / output: Spi / path: resultm.dib -00:00:00 debug #16 writeDibCode / output: Spi / path: file_system.dib -00:00:00 debug #15 writeDibCode / output: Spi / path: date_time.dib +00:09:13 verbose #17386 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "networking.dib", "--retries", "3"]) +00:09:13 verbose #17387 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/networking.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/networking.dib" --output-path "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) +00:09:15 verbose #17388 > > +00:09:15 verbose #17389 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:15 verbose #17390 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:15 verbose #17391 > > │ # networking │ +00:09:15 verbose #17392 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:15 verbose #17393 > > +00:09:15 verbose #17394 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:15 verbose #17395 > > open rust_operators +00:09:15 verbose #17396 > > +00:09:15 verbose #17397 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:09:15 verbose #17398 > > #r +00:09:15 verbose #17399 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:09:15 verbose #17400 > > otNet.Interactive.Spiral.dll" +00:09:15 verbose #17401 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:09:15 verbose #17402 > > #r +00:09:15 verbose #17403 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:09:15 verbose #17404 > > otNet.Interactive.dll" +00:09:15 verbose #17405 > > open type Microsoft.DotNet.Interactive.Kernel +00:09:19 verbose #17406 > > +00:09:19 verbose #17407 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17408 > > //// test +00:09:19 verbose #17409 > > +00:09:19 verbose #17410 > > open testing +00:09:19 verbose #17411 > > +00:09:19 verbose #17412 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17413 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17414 > > │ ## types │ +00:09:19 verbose #17415 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17416 > > +00:09:19 verbose #17417 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17418 > > inl types () = +00:09:19 verbose #17419 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:09:19 verbose #17420 > > Fable.Core.Emit(\"reqwest_wasm::Error\")>]]\n#endif\ntype reqwest_Error = class +00:09:19 verbose #17421 > > end" +00:09:19 verbose #17422 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:09:19 verbose #17423 > > Fable.Core.Emit(\"reqwest_wasm::RequestBuilder\")>]]\n#endif\ntype +00:09:19 verbose #17424 > > reqwest_RequestBuilder = class end" +00:09:19 verbose #17425 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; +00:09:19 verbose #17426 > > Fable.Core.Emit(\"reqwest_wasm::Response\")>]]\n#endif\ntype reqwest_Response = +00:09:19 verbose #17427 > > class end" +00:09:19 verbose #17428 > > +00:09:19 verbose #17429 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17430 > > inl types () = +00:09:19 verbose #17431 > > types () +00:09:19 verbose #17432 > > env.types () +00:09:19 verbose #17433 > > rust.types () +00:09:19 verbose #17434 > > sm'.types () +00:09:19 verbose #17435 > > +00:09:19 verbose #17436 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17437 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17438 > > │ ## reqwest_response │ +00:09:19 verbose #17439 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17440 > > +00:09:19 verbose #17441 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17442 > > nominal reqwest_response = $"reqwest_Response" +00:09:19 verbose #17443 > > +00:09:19 verbose #17444 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17445 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17446 > > │ ## reqwest_error │ +00:09:19 verbose #17447 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17448 > > +00:09:19 verbose #17449 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17450 > > nominal reqwest_error = $"reqwest_Error" +00:09:19 verbose #17451 > > +00:09:19 verbose #17452 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17453 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17454 > > │ ## request_builder │ +00:09:19 verbose #17455 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17456 > > +00:09:19 verbose #17457 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17458 > > nominal request_builder = $"reqwest_RequestBuilder" +00:09:19 verbose #17459 > > +00:09:19 verbose #17460 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17461 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17462 > > │ ## request_type │ +00:09:19 verbose #17463 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17464 > > +00:09:19 verbose #17465 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17466 > > union request_type = +00:09:19 verbose #17467 > > | Get +00:09:19 verbose #17468 > > | Post +00:09:19 verbose #17469 > > +00:09:19 verbose #17470 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17471 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17472 > > │ ## request │ +00:09:19 verbose #17473 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17474 > > +00:09:19 verbose #17475 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17476 > > type request = +00:09:19 verbose #17477 > > { +00:09:19 verbose #17478 > > url : string +00:09:19 verbose #17479 > > request_type : request_type +00:09:19 verbose #17480 > > body : string +00:09:19 verbose #17481 > > json : bool +00:09:19 verbose #17482 > > auto_refresh : bool +00:09:19 verbose #17483 > > } +00:09:19 verbose #17484 > > +00:09:19 verbose #17485 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17486 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17487 > > │ ## new_request_get │ +00:09:19 verbose #17488 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17489 > > +00:09:19 verbose #17490 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17491 > > inl new_request_get (url : string) : request_builder = +00:09:19 verbose #17492 > > inl url = join url +00:09:19 verbose #17493 > > inl url = url |> sm'.to_std_string +00:09:19 verbose #17494 > > inl url = join url +00:09:19 verbose #17495 > > !\($'"reqwest_wasm::Client::builder().build().map_err(|err| +00:09:19 verbose #17496 > > err.to_string())?.get(!url)"') +00:09:19 verbose #17497 > > +00:09:19 verbose #17498 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17499 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17500 > > │ ## new_request_post │ +00:09:19 verbose #17501 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17502 > > +00:09:19 verbose #17503 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17504 > > inl new_request_post (url : string) : request_builder = +00:09:19 verbose #17505 > > inl url = join url +00:09:19 verbose #17506 > > inl url = url |> sm'.to_std_string +00:09:19 verbose #17507 > > inl url = join url +00:09:19 verbose #17508 > > !\($'"reqwest_wasm::Client::builder().build().map_err(|err| +00:09:19 verbose #17509 > > err.to_string())?.post(!url)"') +00:09:19 verbose #17510 > > +00:09:19 verbose #17511 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17512 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17513 > > │ ## request_send │ +00:09:19 verbose #17514 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17515 > > +00:09:19 verbose #17516 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17517 > > inl request_send (request : request_builder) : async.future_pin (resultm.result' +00:09:19 verbose #17518 > > reqwest_response reqwest_error) = +00:09:19 verbose #17519 > > inl request = join request +00:09:19 verbose #17520 > > !\($'"Box::pin(reqwest_wasm::RequestBuilder::send(!request))"') +00:09:19 verbose #17521 > > +00:09:19 verbose #17522 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17523 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17524 > > │ ## request_body │ +00:09:19 verbose #17525 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17526 > > +00:09:19 verbose #17527 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17528 > > inl request_body (body : string) (request : request_builder) : request_builder = +00:09:19 verbose #17529 > > inl body = body |> sm'.to_std_string +00:09:19 verbose #17530 > > !\($'"reqwest_wasm::RequestBuilder::body(!request, !body)"') +00:09:19 verbose #17531 > > +00:09:19 verbose #17532 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17533 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17534 > > │ ## request_header │ +00:09:19 verbose #17535 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17536 > > +00:09:19 verbose #17537 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17538 > > inl request_header (key : string) (value : string) (request : request_builder) : +00:09:19 verbose #17539 > > request_builder = +00:09:19 verbose #17540 > > inl request = join request +00:09:19 verbose #17541 > > inl key = key |> sm'.to_std_string +00:09:19 verbose #17542 > > inl value = value |> sm'.to_std_string +00:09:19 verbose #17543 > > !\($'"reqwest_wasm::RequestBuilder::header(!request, !key, !value)"') +00:09:19 verbose #17544 > > +00:09:19 verbose #17545 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17546 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17547 > > │ ## request_json │ +00:09:19 verbose #17548 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17549 > > +00:09:19 verbose #17550 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17551 > > inl request_json forall t. (obj : t) (request : request_builder) : +00:09:19 verbose #17552 > > request_builder = +00:09:19 verbose #17553 > > !\($'"reqwest_wasm::RequestBuilder::json(!request, &!obj)"') +00:09:19 verbose #17554 > > +00:09:19 verbose #17555 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17556 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17557 > > │ ## response_text │ +00:09:19 verbose #17558 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17559 > > +00:09:19 verbose #17560 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17561 > > inl response_text (response : reqwest_response) : async.future_pin +00:09:19 verbose #17562 > > (resultm.result' sm'.std_string reqwest_error) = +00:09:19 verbose #17563 > > !\($'"Box::pin(reqwest_wasm::Response::text(!response))"') +00:09:19 verbose #17564 > > +00:09:19 verbose #17565 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17566 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17567 > > │ ## tcp_client │ +00:09:19 verbose #17568 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17569 > > +00:09:19 verbose #17570 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17571 > > nominal tcp_client = $'System.Net.Sockets.TcpClient' +00:09:19 verbose #17572 > > +00:09:19 verbose #17573 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17574 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17575 > > │ ## new_tcp_client │ +00:09:19 verbose #17576 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17577 > > +00:09:19 verbose #17578 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17579 > > inl new_tcp_client () : tcp_client = +00:09:19 verbose #17580 > > $'new `tcp_client ()' +00:09:19 verbose #17581 > > +00:09:19 verbose #17582 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17583 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17584 > > │ ## ip_address │ +00:09:19 verbose #17585 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17586 > > +00:09:19 verbose #17587 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17588 > > nominal ip_address = $'System.Net.IPAddress' +00:09:19 verbose #17589 > > +00:09:19 verbose #17590 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17591 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17592 > > │ ## ip_address_parse │ +00:09:19 verbose #17593 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17594 > > +00:09:19 verbose #17595 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17596 > > inl ip_address_parse (s : string) : ip_address = +00:09:19 verbose #17597 > > s |> $'`ip_address.Parse' +00:09:19 verbose #17598 > > +00:09:19 verbose #17599 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17600 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17601 > > │ ## tcp_listener │ +00:09:19 verbose #17602 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17603 > > +00:09:19 verbose #17604 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17605 > > nominal tcp_listener = $'System.Net.Sockets.TcpListener' +00:09:19 verbose #17606 > > +00:09:19 verbose #17607 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17608 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17609 > > │ ## new_tcp_listener │ +00:09:19 verbose #17610 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17611 > > +00:09:19 verbose #17612 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17613 > > inl new_tcp_listener (ip_address : ip_address) (port : i32) : tcp_listener = +00:09:19 verbose #17614 > > $'new `tcp_listener (!ip_address, !port)' +00:09:19 verbose #17615 > > +00:09:19 verbose #17616 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17617 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17618 > > │ ## listener_start │ +00:09:19 verbose #17619 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17620 > > +00:09:19 verbose #17621 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17622 > > inl listener_start (listener : tcp_listener) : () = +00:09:19 verbose #17623 > > $'!listener.Start' () +00:09:19 verbose #17624 > > +00:09:19 verbose #17625 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17626 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17627 > > │ ## listener_stop │ +00:09:19 verbose #17628 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17629 > > +00:09:19 verbose #17630 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17631 > > inl listener_stop (listener : tcp_listener) : () = +00:09:19 verbose #17632 > > $'!listener.Stop' () +00:09:19 verbose #17633 > > +00:09:19 verbose #17634 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17635 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17636 > > │ ## client_connect_async │ +00:09:19 verbose #17637 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17638 > > +00:09:19 verbose #17639 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17640 > > inl client_connect_async +00:09:19 verbose #17641 > > (host : string) +00:09:19 verbose #17642 > > (port : i32) +00:09:19 verbose #17643 > > (ct : threading.cancellation_token) +00:09:19 verbose #17644 > > (client : tcp_client) +00:09:19 verbose #17645 > > : async.value_task +00:09:19 verbose #17646 > > = +00:09:19 verbose #17647 > > $'!client.ConnectAsync (!host, !port, !ct)' +00:09:19 verbose #17648 > > +00:09:19 verbose #17649 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:19 verbose #17650 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:19 verbose #17651 > > │ ## test_port_open │ +00:09:19 verbose #17652 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:19 verbose #17653 > > +00:09:19 verbose #17654 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17655 > > inl test_port_open host port : _ bool = async.new_async fun () => +00:09:19 verbose #17656 > > inl ct = async.cancellation_token () |> async.let' +00:09:19 verbose #17657 > > inl client = new_tcp_client () |> use +00:09:19 verbose #17658 > > try_unit +00:09:19 verbose #17659 > > fun () => +00:09:19 verbose #17660 > > client |> client_connect_async host port ct |> +00:09:19 verbose #17661 > > async.await_value_task_unit |> async.do +00:09:19 verbose #17662 > > return true +00:09:19 verbose #17663 > > fun ex => +00:09:19 verbose #17664 > > inl ex = ex |> sm'.format_exception +00:09:19 verbose #17665 > > trace Verbose (fun () => $'$"networking.test_port_open / port: +00:09:19 verbose #17666 > > {!port} / ex: {!ex}"') _locals +00:09:19 verbose #17667 > > return false +00:09:19 verbose #17668 > > +00:09:19 verbose #17669 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:19 verbose #17670 > > //// test +00:09:19 verbose #17671 > > +00:09:19 verbose #17672 > > test_port_open "127.0.0.1" 65536 +00:09:19 verbose #17673 > > |> async.run_with_timeout 120 +00:09:19 verbose #17674 > > |> _assert_eq (Some false) +00:09:21 verbose #17675 > > +00:09:21 verbose #17676 > > ╭─[ 1.79s - stdout ]───────────────────────────────────────────────────────────╮ +00:09:21 verbose #17677 > > │ 00:00:00 verbose #1 networking.test_port_open / port: 65536 / ex: │ +00:09:21 verbose #17678 > > │ System.ArgumentOutOfRangeException: Specified argument was out of the range │ +00:09:21 verbose #17679 > > │ of valid values. (Parameter 'port') │ +00:09:21 verbose #17680 > > │ assert_eq / actual: US2_0 false / expected: US2_0 false │ +00:09:21 verbose #17681 > > │ │ +00:09:21 verbose #17682 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:21 verbose #17683 > > +00:09:21 verbose #17684 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:21 verbose #17685 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:21 verbose #17686 > > │ ## test_port_open_timeout │ +00:09:21 verbose #17687 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:21 verbose #17688 > > +00:09:21 verbose #17689 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:21 verbose #17690 > > inl test_port_open_timeout timeout host port : _ bool = async.new_async_unit fun +00:09:21 verbose #17691 > > () => +00:09:21 verbose #17692 > > test_port_open host port +00:09:21 verbose #17693 > > |> async.run_with_timeout_async timeout +00:09:21 verbose #17694 > > |> async.let' +00:09:21 verbose #17695 > > |> function +00:09:21 verbose #17696 > > | None => false +00:09:21 verbose #17697 > > | Some result => result +00:09:21 verbose #17698 > > |> return +00:09:21 verbose #17699 > > +00:09:21 verbose #17700 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:21 verbose #17701 > > //// test +00:09:21 verbose #17702 > > +00:09:21 verbose #17703 > > test_port_open_timeout 120 "127.0.0.1" 65535 +00:09:21 verbose #17704 > > |> async.run_synchronously +00:09:21 verbose #17705 > > |> _assert_eq false +00:09:21 verbose #17706 > > +00:09:21 verbose #17707 > > ╭─[ 607.68ms - stdout ]────────────────────────────────────────────────────────╮ +00:09:21 verbose #17708 > > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 120 │ +00:09:21 verbose #17709 > > │ assert_eq / actual: false / expected: false │ +00:09:21 verbose #17710 > > │ │ +00:09:21 verbose #17711 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:21 verbose #17712 > > +00:09:21 verbose #17713 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:21 verbose #17714 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:21 verbose #17715 > > │ ## wait_for_port_access │ +00:09:21 verbose #17716 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:21 verbose #17717 > > +00:09:21 verbose #17718 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:21 verbose #17719 > > inl wait_for_port_access timeout status host port : _ i64 = +00:09:21 verbose #17720 > > let rec loop retry : _ i64 = async.new_async_unit fun () => +00:09:21 verbose #17721 > > inl isPortOpen = +00:09:21 verbose #17722 > > match timeout |> optionm'.unbox with +00:09:21 verbose #17723 > > | None => test_port_open host port +00:09:21 verbose #17724 > > | Some timeout => test_port_open_timeout timeout host port +00:09:21 verbose #17725 > > |> async.let' +00:09:21 verbose #17726 > > +00:09:21 verbose #17727 > > fix_condition +00:09:21 verbose #17728 > > fun () => isPortOpen = status +00:09:21 verbose #17729 > > fun () => retry |> return +00:09:21 verbose #17730 > > fun () => +00:09:21 verbose #17731 > > if retry % 100 = 0 then +00:09:21 verbose #17732 > > inl _locals () = $'$"port: {!port} / retry: {!retry} +00:09:21 verbose #17733 > > timeout: %A{!timeout} / status: {!status} / {!_locals ()}"' +00:09:21 verbose #17734 > > trace Verbose (fun () => "networking.wait_for_port_access") +00:09:21 verbose #17735 > > _locals +00:09:21 verbose #17736 > > async.sleep 10 |> async.do +00:09:21 verbose #17737 > > loop (retry + 1) |> async.return_await +00:09:21 verbose #17738 > > loop 0i64 +00:09:21 verbose #17739 > > +00:09:21 verbose #17740 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:21 verbose #17741 > > //// test +00:09:21 verbose #17742 > > +00:09:21 verbose #17743 > > inl lock_port host port = async.new_async fun () => +00:09:21 verbose #17744 > > trace Debug (fun () => "_1") _locals +00:09:21 verbose #17745 > > async.sleep 5000 |> async.do +00:09:21 verbose #17746 > > inl listener = new_tcp_listener (host |> ip_address_parse) port |> use +00:09:21 verbose #17747 > > trace Debug (fun () => "_2") _locals +00:09:21 verbose #17748 > > listener |> listener_start +00:09:21 verbose #17749 > > trace Debug (fun () => "_3") _locals +00:09:21 verbose #17750 > > async.sleep 2000 |> async.do +00:09:21 verbose #17751 > > trace Debug (fun () => "_4") _locals +00:09:21 verbose #17752 > > $'!listener.Stop' () +00:09:21 verbose #17753 > > trace Debug (fun () => "_5") _locals +00:09:21 verbose #17754 > > +00:09:21 verbose #17755 > > inl host = "127.0.0.1" +00:09:21 verbose #17756 > > inl port = 5555i32 +00:09:21 verbose #17757 > > +00:09:21 verbose #17758 > > fun () => +00:09:21 verbose #17759 > > trace Debug (fun () => "1") _locals +00:09:21 verbose #17760 > > inl child = lock_port host port |> async.start_child |> async.let' +00:09:21 verbose #17761 > > trace Debug (fun () => "2") _locals +00:09:21 verbose #17762 > > async.sleep 1 |> async.do +00:09:21 verbose #17763 > > trace Debug (fun () => "3") _locals +00:09:21 verbose #17764 > > inl retries1 = wait_for_port_access (None |> optionm'.box) true host port |> +00:09:21 verbose #17765 > > async.let' +00:09:21 verbose #17766 > > trace Debug (fun () => "4") _locals +00:09:21 verbose #17767 > > inl retries2 = wait_for_port_access (None |> optionm'.box) false host port +00:09:21 verbose #17768 > > |> async.let' +00:09:21 verbose #17769 > > trace Debug (fun () => "5") _locals +00:09:21 verbose #17770 > > child |> async.do +00:09:21 verbose #17771 > > trace Debug (fun () => "6") _locals +00:09:21 verbose #17772 > > (retries1, retries2) |> return +00:09:21 verbose #17773 > > |> async.new_async_unit +00:09:21 verbose #17774 > > |> async.run_with_timeout 20000 +00:09:21 verbose #17775 > > |> function +00:09:21 verbose #17776 > > | Some (retries1, retries2) => +00:09:21 verbose #17777 > > retries1 +00:09:21 verbose #17778 > > |> _assert_between +00:09:21 verbose #17779 > > if runtime.is_windows () then 2i64 else 2 +00:09:21 verbose #17780 > > if runtime.is_windows () then 5 else 1500 +00:09:21 verbose #17781 > > +00:09:21 verbose #17782 > > retries2 +00:09:21 verbose #17783 > > |> _assert_between +00:09:21 verbose #17784 > > if runtime.is_windows () then 80i64 else 80 +00:09:21 verbose #17785 > > if runtime.is_windows () then 150 else 600 +00:09:21 verbose #17786 > > +00:09:21 verbose #17787 > > true +00:09:21 verbose #17788 > > | _ => false +00:09:21 verbose #17789 > > |> _assert_eq true +00:09:32 verbose #17790 > > +00:09:32 verbose #17791 > > ╭─[ 10.29s - stdout ]──────────────────────────────────────────────────────────╮ +00:09:32 verbose #17792 > > │ 00:00:00 debug #1 1 │ +00:09:32 verbose #17793 > > │ 00:00:00 debug #2 _1 │ +00:09:32 verbose #17794 > > │ 00:00:00 debug #3 2 │ +00:09:32 verbose #17795 > > │ 00:00:00 debug #4 3 │ +00:09:32 verbose #17796 > > │ 00:00:02 verbose #5 networking.test_port_open / port: 5555 / ex: │ +00:09:32 verbose #17797 > > │ System.AggregateException: One or more errors occurred. (No connection could │ +00:09:32 verbose #17798 > > │ be made because the target machine actively refused it.) │ +00:09:32 verbose #17799 > > │ 00:00:02 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │ +00:09:32 verbose #17800 > > │ / timeout: None / status: True │ +00:09:32 verbose #17801 > > │ 00:00:04 verbose #7 networking.test_port_open / port: 5555 / ex: │ +00:09:32 verbose #17802 > > │ System.AggregateException: One or more errors occurred. (No connection could │ +00:09:32 verbose #17803 > > │ be made because the target machine actively refused it.) │ +00:09:32 verbose #17804 > > │ 00:00:05 debug #8 _2 │ +00:09:32 verbose #17805 > > │ 00:00:05 debug #9 _3 │ +00:09:32 verbose #17806 > > │ 00:00:05 debug #10 4 │ +00:09:32 verbose #17807 > > │ 00:00:05 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │ +00:09:32 verbose #17808 > > │ / timeout: None / status: False │ +00:09:32 verbose #17809 > > │ 00:00:06 verbose #12 networking.wait_for_port_access / port: 5555 / retry: │ +00:09:32 verbose #17810 > > │ 100 / timeout: None / status: False │ +00:09:32 verbose #17811 > > │ 00:00:07 debug #13 _4 │ +00:09:32 verbose #17812 > > │ 00:00:07 debug #14 _5 │ +00:09:32 verbose #17813 > > │ 00:00:09 verbose #15 networking.test_port_open / port: 5555 / ex: │ +00:09:32 verbose #17814 > > │ System.AggregateException: One or more errors occurred. (No connection could │ +00:09:32 verbose #17815 > > │ be made because the target machine actively refused it.) │ +00:09:32 verbose #17816 > > │ 00:00:09 debug #16 5 │ +00:09:32 verbose #17817 > > │ 00:00:09 debug #17 6 │ +00:09:32 verbose #17818 > > │ assert_between / actual: 2L / expected: struct (2L, 5L) │ +00:09:32 verbose #17819 > > │ assert_between / actual: 121L / expected: struct (80L, 150L) │ +00:09:32 verbose #17820 > > │ assert_eq / actual: true / expected: true │ +00:09:32 verbose #17821 > > │ │ +00:09:32 verbose #17822 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:32 verbose #17823 > > +00:09:32 verbose #17824 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:32 verbose #17825 > > //// test +00:09:32 verbose #17826 > > +00:09:32 verbose #17827 > > inl lock_port host port = async.new_async_unit fun () => +00:09:32 verbose #17828 > > trace Debug (fun () => "_1") _locals +00:09:32 verbose #17829 > > async.sleep 500 |> async.do +00:09:32 verbose #17830 > > inl listener = new_tcp_listener (ip_address_parse host) port |> use +00:09:32 verbose #17831 > > trace Debug (fun () => "_2") _locals +00:09:32 verbose #17832 > > listener |> listener_start +00:09:32 verbose #17833 > > trace Debug (fun () => "_3") _locals +00:09:32 verbose #17834 > > async.sleep 200 |> async.do +00:09:32 verbose #17835 > > trace Debug (fun () => "_4") _locals +00:09:32 verbose #17836 > > listener |> listener_stop +00:09:32 verbose #17837 > > trace Debug (fun () => "_5") _locals +00:09:32 verbose #17838 > > +00:09:32 verbose #17839 > > inl host = "127.0.0.1" +00:09:32 verbose #17840 > > inl port = 5555 +00:09:32 verbose #17841 > > +00:09:32 verbose #17842 > > fun () => +00:09:32 verbose #17843 > > trace Debug (fun () => "1") _locals +00:09:32 verbose #17844 > > inl child = lock_port host port |> async.start_child |> async.let' +00:09:32 verbose #17845 > > trace Debug (fun () => "2") _locals +00:09:32 verbose #17846 > > async.sleep 1 |> async.do +00:09:32 verbose #17847 > > trace Debug (fun () => "3") _locals +00:09:32 verbose #17848 > > inl retries1 = wait_for_port_access (Some 60 |> optionm'.box) true host port +00:09:32 verbose #17849 > > |> async.let' +00:09:32 verbose #17850 > > trace Debug (fun () => "4") _locals +00:09:32 verbose #17851 > > inl retries2 = wait_for_port_access (Some 60 |> optionm'.box) false host +00:09:32 verbose #17852 > > port |> async.let' +00:09:32 verbose #17853 > > trace Debug (fun () => "5") _locals +00:09:32 verbose #17854 > > child |> async.do +00:09:32 verbose #17855 > > trace Debug (fun () => "6") _locals +00:09:32 verbose #17856 > > (retries1, retries2) |> return +00:09:32 verbose #17857 > > |> async.new_async_unit +00:09:32 verbose #17858 > > |> async.run_with_timeout 2000 +00:09:32 verbose #17859 > > |> function +00:09:32 verbose #17860 > > | Some (retries1, retries2) => +00:09:32 verbose #17861 > > retries1 +00:09:32 verbose #17862 > > |> _assert_between +00:09:32 verbose #17863 > > if runtime.is_windows () then 4i64 else 2 +00:09:32 verbose #17864 > > if runtime.is_windows () then 15 else 150 +00:09:32 verbose #17865 > > +00:09:32 verbose #17866 > > retries2 +00:09:32 verbose #17867 > > |> _assert_between +00:09:32 verbose #17868 > > if runtime.is_windows () then 5i64 else 0 +00:09:32 verbose #17869 > > if runtime.is_windows () then 20 else 60 +00:09:32 verbose #17870 > > +00:09:32 verbose #17871 > > true +00:09:32 verbose #17872 > > | _ => false +00:09:32 verbose #17873 > > |> _assert_eq true +00:09:34 verbose #17874 > > +00:09:34 verbose #17875 > > ╭─[ 2.04s - stdout ]───────────────────────────────────────────────────────────╮ +00:09:34 verbose #17876 > > │ 00:00:00 debug #1 1 │ +00:09:34 verbose #17877 > > │ 00:00:00 debug #2 2 │ +00:09:34 verbose #17878 > > │ 00:00:00 debug #3 _1 │ +00:09:34 verbose #17879 > > │ 00:00:00 debug #4 3 │ +00:09:34 verbose #17880 > > │ 00:00:00 debug #5 run_with_timeout_async / timeout: 60 │ +00:09:34 verbose #17881 > > │ 00:00:00 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │ +00:09:34 verbose #17882 > > │ / timeout: Some 60 / status: True │ +00:09:34 verbose #17883 > > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │ +00:09:34 verbose #17884 > > │ 00:00:00 debug #8 run_with_timeout_async / timeout: 60 │ +00:09:34 verbose #17885 > > │ 00:00:00 debug #9 run_with_timeout_async / timeout: 60 │ +00:09:34 verbose #17886 > > │ 00:00:00 debug #10 run_with_timeout_async / timeout: 60 │ +00:09:34 verbose #17887 > > │ 00:00:00 debug #11 run_with_timeout_async / timeout: 60 │ +00:09:34 verbose #17888 > > │ 00:00:00 debug #12 _2 │ +00:09:34 verbose #17889 > > │ 00:00:00 debug #13 _3 │ +00:09:34 verbose #17890 > > │ 00:00:00 debug #14 4 │ +00:09:34 verbose #17891 > > │ 00:00:00 verbose #15 networking.wait_for_port_access / port: 5555 / retry: 0 │ +00:09:34 verbose #17892 > > │ / timeout: Some 60 / status: False │ +00:09:34 verbose #17893 > > │ 00:00:00 debug #16 _4 │ +00:09:34 verbose #17894 > > │ 00:00:00 debug #17 _5 │ +00:09:34 verbose #17895 > > │ 00:00:00 debug #18 run_with_timeout_async / timeout: 60 │ +00:09:34 verbose #17896 > > │ 00:00:00 debug #19 5 │ +00:09:34 verbose #17897 > > │ 00:00:00 debug #20 6 │ +00:09:34 verbose #17898 > > │ assert_between / actual: 6L / expected: struct (4L, 15L) │ +00:09:34 verbose #17899 > > │ assert_between / actual: 13L / expected: struct (5L, 20L) │ +00:09:34 verbose #17900 > > │ assert_eq / actual: true / expected: true │ +00:09:34 verbose #17901 > > │ │ +00:09:34 verbose #17902 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:34 verbose #17903 > > +00:09:34 verbose #17904 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:34 verbose #17905 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:34 verbose #17906 > > │ ## get_available_port │ +00:09:34 verbose #17907 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:34 verbose #17908 > > +00:09:34 verbose #17909 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:34 verbose #17910 > > inl get_available_port timeout host initial_port : _ i32 = +00:09:34 verbose #17911 > > let rec loop port = async.new_async_unit fun () => +00:09:34 verbose #17912 > > inl is_port_open = +00:09:34 verbose #17913 > > match timeout |> optionm'.unbox with +00:09:34 verbose #17914 > > | None => test_port_open host port +00:09:34 verbose #17915 > > | Some timeout => test_port_open_timeout timeout host port +00:09:34 verbose #17916 > > |> async.let' +00:09:34 verbose #17917 > > fix_condition +00:09:34 verbose #17918 > > fun () => is_port_open |> not +00:09:34 verbose #17919 > > fun () => port |> return +00:09:34 verbose #17920 > > fun () => loop (port + 1) |> async.return_await +00:09:34 verbose #17921 > > loop initial_port +00:09:34 verbose #17922 > > +00:09:34 verbose #17923 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:34 verbose #17924 > > //// test +00:09:34 verbose #17925 > > +00:09:34 verbose #17926 > > inl lock_ports host port = async.new_async_unit fun () => +00:09:34 verbose #17927 > > trace Debug (fun () => "_1") _locals +00:09:34 verbose #17928 > > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use +00:09:34 verbose #17929 > > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use +00:09:34 verbose #17930 > > trace Debug (fun () => "_2") _locals +00:09:34 verbose #17931 > > listener1 |> listener_start +00:09:34 verbose #17932 > > listener2 |> listener_start +00:09:34 verbose #17933 > > trace Debug (fun () => "_3") _locals +00:09:34 verbose #17934 > > async.sleep 4000 |> async.do +00:09:34 verbose #17935 > > trace Debug (fun () => "_4") _locals +00:09:34 verbose #17936 > > listener1 |> listener_stop +00:09:34 verbose #17937 > > listener2 |> listener_stop +00:09:34 verbose #17938 > > trace Debug (fun () => "_5") _locals +00:09:34 verbose #17939 > > +00:09:34 verbose #17940 > > inl host = "127.0.0.1" +00:09:34 verbose #17941 > > inl port = 5555 +00:09:34 verbose #17942 > > +00:09:34 verbose #17943 > > fun () => +00:09:34 verbose #17944 > > trace Debug (fun () => "1") _locals +00:09:34 verbose #17945 > > inl child = lock_ports host port |> async.start_child |> async.let' +00:09:34 verbose #17946 > > trace Debug (fun () => "2") _locals +00:09:34 verbose #17947 > > async.sleep 240 |> async.do +00:09:34 verbose #17948 > > trace Debug (fun () => "3") _locals +00:09:34 verbose #17949 > > inl available_port = get_available_port (None |> optionm'.box) host port |> +00:09:34 verbose #17950 > > async.let' +00:09:34 verbose #17951 > > trace Debug (fun () => "4") _locals +00:09:34 verbose #17952 > > inl retries = wait_for_port_access (None |> optionm'.box) false host port |> +00:09:34 verbose #17953 > > async.let' +00:09:34 verbose #17954 > > trace Debug (fun () => "5") _locals +00:09:34 verbose #17955 > > child |> async.do +00:09:34 verbose #17956 > > trace Debug (fun () => "6") _locals +00:09:34 verbose #17957 > > (available_port, retries) |> return +00:09:34 verbose #17958 > > |> async.new_async_unit +00:09:34 verbose #17959 > > |> async.run_with_timeout 15000 +00:09:34 verbose #17960 > > |> function +00:09:34 verbose #17961 > > | Some (available_port, retries) => +00:09:34 verbose #17962 > > available_port |> _assert_eq (port + 2) +00:09:34 verbose #17963 > > +00:09:34 verbose #17964 > > retries +00:09:34 verbose #17965 > > |> _assert_between +00:09:34 verbose #17966 > > if runtime.is_windows () then 100i64 else 100 +00:09:34 verbose #17967 > > if runtime.is_windows () then 150 else 1200 +00:09:34 verbose #17968 > > +00:09:34 verbose #17969 > > true +00:09:34 verbose #17970 > > | _ => false +00:09:34 verbose #17971 > > |> _assert_eq true +00:09:41 verbose #17972 > > +00:09:41 verbose #17973 > > ╭─[ 7.19s - stdout ]───────────────────────────────────────────────────────────╮ +00:09:41 verbose #17974 > > │ 00:00:00 debug #1 1 │ +00:09:41 verbose #17975 > > │ 00:00:00 debug #2 _1 │ +00:09:41 verbose #17976 > > │ 00:00:00 debug #3 2 │ +00:09:41 verbose #17977 > > │ 00:00:00 debug #4 _2 │ +00:09:41 verbose #17978 > > │ 00:00:00 debug #5 _3 │ +00:09:41 verbose #17979 > > │ 00:00:00 debug #6 3 │ +00:09:41 verbose #17980 > > │ 00:00:02 verbose #7 networking.test_port_open / port: 5557 / ex: │ +00:09:41 verbose #17981 > > │ System.AggregateException: One or more errors occurred. (No connection could │ +00:09:41 verbose #17982 > > │ be made because the target machine actively refused it.) │ +00:09:41 verbose #17983 > > │ 00:00:02 debug #8 4 │ +00:09:41 verbose #17984 > > │ 00:00:02 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │ +00:09:41 verbose #17985 > > │ / timeout: None / status: False │ +00:09:41 verbose #17986 > > │ 00:00:03 verbose #10 networking.wait_for_port_access / port: 5555 / retry: │ +00:09:41 verbose #17987 > > │ 100 / timeout: None / status: False │ +00:09:41 verbose #17988 > > │ 00:00:04 debug #11 _4 │ +00:09:41 verbose #17989 > > │ 00:00:04 debug #12 _5 │ +00:09:41 verbose #17990 > > │ 00:00:06 verbose #13 networking.test_port_open / port: 5555 / ex: │ +00:09:41 verbose #17991 > > │ System.AggregateException: One or more errors occurred. (No connection could │ +00:09:41 verbose #17992 > > │ be made because the target machine actively refused it.) │ +00:09:41 verbose #17993 > > │ 00:00:06 debug #14 5 │ +00:09:41 verbose #17994 > > │ 00:00:06 debug #15 6 │ +00:09:41 verbose #17995 > > │ assert_eq / actual: 5557 / expected: 5557 │ +00:09:41 verbose #17996 > > │ assert_between / actual: 111L / expected: struct (100L, 150L) │ +00:09:41 verbose #17997 > > │ assert_eq / actual: true / expected: true │ +00:09:41 verbose #17998 > > │ │ +00:09:41 verbose #17999 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:41 verbose #18000 > > +00:09:41 verbose #18001 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:41 verbose #18002 > > //// test +00:09:41 verbose #18003 > > +00:09:41 verbose #18004 > > inl lock_ports host port = async.new_async_unit fun () => +00:09:41 verbose #18005 > > trace Debug (fun () => "_1") _locals +00:09:41 verbose #18006 > > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use +00:09:41 verbose #18007 > > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use +00:09:41 verbose #18008 > > trace Debug (fun () => "_2") _locals +00:09:41 verbose #18009 > > listener1 |> listener_start +00:09:41 verbose #18010 > > listener2 |> listener_start +00:09:41 verbose #18011 > > trace Debug (fun () => "_3") _locals +00:09:41 verbose #18012 > > async.sleep 400 |> async.do +00:09:41 verbose #18013 > > trace Debug (fun () => "_4") _locals +00:09:41 verbose #18014 > > listener1 |> listener_stop +00:09:41 verbose #18015 > > listener2 |> listener_stop +00:09:41 verbose #18016 > > trace Debug (fun () => "_5") _locals +00:09:41 verbose #18017 > > +00:09:41 verbose #18018 > > inl host = "127.0.0.1" +00:09:41 verbose #18019 > > inl port = 5555 +00:09:41 verbose #18020 > > +00:09:41 verbose #18021 > > fun () => +00:09:41 verbose #18022 > > trace Debug (fun () => "1") _locals +00:09:41 verbose #18023 > > inl child = lock_ports host port |> async.start_child |> async.let' +00:09:41 verbose #18024 > > trace Debug (fun () => "2") _locals +00:09:41 verbose #18025 > > async.sleep 240 |> async.do +00:09:41 verbose #18026 > > trace Debug (fun () => "3") _locals +00:09:41 verbose #18027 > > inl available_port = get_available_port (Some 60 |> optionm'.box) host port +00:09:41 verbose #18028 > > |> async.let' +00:09:41 verbose #18029 > > trace Debug (fun () => "4") _locals +00:09:41 verbose #18030 > > inl retries = wait_for_port_access (Some 60 |> optionm'.box) false host port +00:09:41 verbose #18031 > > |> async.let' +00:09:41 verbose #18032 > > trace Debug (fun () => "5") _locals +00:09:41 verbose #18033 > > child |> async.do +00:09:41 verbose #18034 > > trace Debug (fun () => "6") _locals +00:09:41 verbose #18035 > > (available_port, retries) |> return +00:09:41 verbose #18036 > > |> async.new_async_unit +00:09:41 verbose #18037 > > |> async.run_with_timeout 1500 +00:09:41 verbose #18038 > > |> function +00:09:41 verbose #18039 > > | Some (available_port, retries) => +00:09:41 verbose #18040 > > available_port |> _assert_eq (port + 2) +00:09:41 verbose #18041 > > +00:09:41 verbose #18042 > > retries +00:09:41 verbose #18043 > > |> _assert_between +00:09:41 verbose #18044 > > (if runtime.is_windows () then 2i64 else 1) +00:09:41 verbose #18045 > > (if runtime.is_windows () then 10 else 120) +00:09:41 verbose #18046 > > +00:09:41 verbose #18047 > > true +00:09:41 verbose #18048 > > | _ => false +00:09:41 verbose #18049 > > |> _assert_eq true +00:09:42 verbose #18050 > > +00:09:42 verbose #18051 > > ╭─[ 1.29s - stdout ]───────────────────────────────────────────────────────────╮ +00:09:42 verbose #18052 > > │ 00:00:00 debug #1 1 │ +00:09:42 verbose #18053 > > │ 00:00:00 debug #2 _1 │ +00:09:42 verbose #18054 > > │ 00:00:00 debug #3 2 │ +00:09:42 verbose #18055 > > │ 00:00:00 debug #4 _2 │ +00:09:42 verbose #18056 > > │ 00:00:00 debug #5 _3 │ +00:09:42 verbose #18057 > > │ 00:00:00 debug #6 3 │ +00:09:42 verbose #18058 > > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │ +00:09:42 verbose #18059 > > │ 00:00:00 debug #8 4 │ +00:09:42 verbose #18060 > > │ 00:00:00 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │ +00:09:42 verbose #18061 > > │ / timeout: Some 60 / status: False │ +00:09:42 verbose #18062 > > │ 00:00:00 debug #10 _4 │ +00:09:42 verbose #18063 > > │ 00:00:00 debug #11 _5 │ +00:09:42 verbose #18064 > > │ 00:00:00 debug #12 run_with_timeout_async / timeout: 60 │ +00:09:42 verbose #18065 > > │ 00:00:00 debug #13 5 │ +00:09:42 verbose #18066 > > │ 00:00:00 debug #14 6 │ +00:09:42 verbose #18067 > > │ assert_eq / actual: 5557 / expected: 5557 │ +00:09:42 verbose #18068 > > │ assert_between / actual: 2L / expected: struct (2L, 10L) │ +00:09:42 verbose #18069 > > │ assert_eq / actual: true / expected: true │ +00:09:42 verbose #18070 > > │ │ +00:09:42 verbose #18071 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:42 verbose #18072 > > +00:09:42 verbose #18073 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:09:42 verbose #18074 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:09:42 verbose #18075 > > │ ## main │ +00:09:42 verbose #18076 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:09:42 verbose #18077 > > +00:09:42 verbose #18078 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:09:42 verbose #18079 > > inl main () = +00:09:42 verbose #18080 > > types () +00:09:42 verbose #18081 > > init_trace_state None +00:09:42 verbose #18082 > > $"let test_port_open x = !test_port_open x" : () +00:09:42 verbose #18083 > > $"let test_port_open_timeout x = !test_port_open_timeout x" : () +00:09:42 verbose #18084 > > $"let wait_for_port_access x = !wait_for_port_access x" : () +00:09:42 verbose #18085 > > $"let get_available_port x = !get_available_port x" : () +00:09:43 verbose #18086 > 00:00:30 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 34338 +00:09:43 verbose #18087 > 00:00:30 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:09:45 verbose #18088 > 00:00:32 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/networking.dib.ipynb to html +00:09:45 verbose #18089 > 00:00:32 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:09:45 verbose #18090 > 00:00:32 verbose #7 ! validate(nb) +00:09:47 verbose #18091 > 00:00:33 verbose #8 ! [NbConvertApp] Writing 367383 bytes to c:\home\git\polyglot\lib\spiral\networking.dib.html +00:09:47 verbose #18092 > 00:00:33 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 651 +00:09:47 verbose #18093 > 00:00:33 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 651 +00:09:47 verbose #18094 > 00:00:33 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/networking.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/networking.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:09:48 verbose #18095 > 00:00:34 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:09:48 verbose #18096 > 00:00:34 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:09:48 verbose #18097 > 00:00:35 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 35048 +00:09:48 debug #18098 execute_with_options_async / exit_code: 0 / output.Length: 38709 +00:09:48 debug #26 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path networking.dib --retries 3 +00:09:48 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False +00:09:48 debug #8 run_with_timeout_async / timeout: 100 +00:00:00 debug #3 writeDibCode / output: Spi / path: testing.dib +00:00:00 debug #3 writeDibCode / output: Spi / path: runtime.dib +00:00:00 debug #3 writeDibCode / output: Spi / path: threading.dib +00:00:00 debug #3 writeDibCode / output: Spi / path: common.dib +00:00:00 debug #3 writeDibCode / output: Spi / path: async.dib +00:00:00 debug #3 writeDibCode / output: Spi / path: networking.dib +00:00:00 debug #3 writeDibCode / output: Spi / path: crypto.dib +00:00:00 debug #3 writeDibCode / output: Spi / path: trace.dib +00:00:00 debug #8 parseDibCode / output: Spi / file: common.dib +00:00:00 debug #9 parseDibCode / output: Spi / file: trace.dib +00:00:00 debug #10 parseDibCode / output: Spi / file: testing.dib +00:00:00 debug #5 parseDibCode / output: Spi / file: threading.dib +00:00:00 debug #11 parseDibCode / output: Spi / file: async.dib +00:00:00 debug #5 parseDibCode / output: Spi / file: networking.dib +00:00:00 debug #7 parseDibCode / output: Spi / file: crypto.dib +00:00:00 debug #7 parseDibCode / output: Spi / file: runtime.dib +00:00:00 debug #16 writeDibCode / output: Spi / path: resultm.dib +00:00:00 debug #16 writeDibCode / output: Spi / path: console.dib +00:00:00 debug #15 writeDibCode / output: Spi / path: iter.dib +00:00:00 debug #16 writeDibCode / output: Spi / path: date_time.dib 00:00:00 debug #12 writeDibCode / output: Spi / path: base.dib -00:00:00 debug #17 parseDibCode / output: Spi / file: console.dib +00:00:00 debug #17 writeDibCode / output: Spi / path: file_system.dib +00:00:00 debug #19 parseDibCode / output: Spi / file: console.dib +00:00:00 debug #20 parseDibCode / output: Spi / file: iter.dib +00:00:00 debug #22 parseDibCode / output: Spi / file: base.dib +00:00:00 debug #22 parseDibCode / output: Spi / file: date_time.dib +00:00:00 debug #23 parseDibCode / output: Spi / file: file_system.dib 00:00:00 debug #18 parseDibCode / output: Spi / file: resultm.dib -00:00:00 debug #19 parseDibCode / output: Spi / file: file_system.dib -00:00:00 debug #21 parseDibCode / output: Spi / file: base.dib -00:00:00 debug #20 parseDibCode / output: Spi / file: date_time.dib -00:00:00 debug #22 writeDibCode / output: Spi / path: guid.dib -00:00:00 debug #23 writeDibCode / output: Spi / path: math.dib -00:00:00 debug #24 parseDibCode / output: Spi / file: guid.dib -00:00:00 debug #25 parseDibCode / output: Spi / file: math.dib -00:00:00 debug #26 writeDibCode / output: Spi / path: optionm'.dib -00:00:00 debug #27 parseDibCode / output: Spi / file: optionm'.dib +00:00:00 debug #24 writeDibCode / output: Spi / path: guid.dib +00:00:00 debug #25 parseDibCode / output: Spi / file: guid.dib +00:00:00 debug #26 writeDibCode / output: Spi / path: math.dib +00:00:00 debug #27 parseDibCode / output: Spi / file: math.dib +00:00:00 debug #28 writeDibCode / output: Spi / path: optionm'.dib +00:00:00 debug #30 parseDibCode / output: Spi / file: optionm'.dib 00:00:00 debug #29 writeDibCode / output: Spi / path: am'.dib -00:00:00 debug #29 writeDibCode / output: Spi / path: sm'.dib -00:00:00 debug #30 parseDibCode / output: Spi / file: am'.dib -00:00:00 debug #31 parseDibCode / output: Spi / file: sm'.dib -00:00:00 debug #32 writeDibCode / output: Spi / path: listm'.dib -00:00:00 debug #33 parseDibCode / output: Spi / file: listm'.dib -00:00:00 debug #34 writeDibCode / output: Spi / path: benchmark.dib -00:00:00 debug #35 parseDibCode / output: Spi / file: benchmark.dib -00:00:00 debug #36 writeDibCode / output: Spi / path: stream.dib -00:00:00 debug #37 parseDibCode / output: Spi / file: stream.dib -00:00:00 debug #38 writeDibCode / output: Spi / path: seq.dib -00:00:00 debug #39 parseDibCode / output: Spi / file: seq.dib -00:00:00 debug #40 writeDibCode / output: Spi / path: util.dib -00:00:00 debug #41 parseDibCode / output: Spi / file: util.dib -00:00:00 debug #42 writeDibCode / output: Spi / path: rust.dib -00:00:00 debug #43 writeDibCode / output: Spi / path: physics.dib -00:00:00 debug #44 parseDibCode / output: Spi / file: rust.dib -00:00:00 debug #45 parseDibCode / output: Spi / file: physics.dib +00:00:00 debug #31 parseDibCode / output: Spi / file: am'.dib +00:00:00 debug #32 writeDibCode / output: Spi / path: sm'.dib +00:00:00 debug #33 parseDibCode / output: Spi / file: sm'.dib +00:00:00 debug #35 writeDibCode / output: Spi / path: listm'.dib +00:00:00 debug #35 writeDibCode / output: Spi / path: benchmark.dib +00:00:00 debug #36 parseDibCode / output: Spi / file: listm'.dib +00:00:00 debug #37 parseDibCode / output: Spi / file: benchmark.dib +00:00:00 debug #38 writeDibCode / output: Spi / path: stream.dib +00:00:00 debug #39 parseDibCode / output: Spi / file: stream.dib +00:00:00 debug #40 writeDibCode / output: Spi / path: seq.dib +00:00:00 debug #41 parseDibCode / output: Spi / file: seq.dib +00:00:00 debug #42 writeDibCode / output: Spi / path: util.dib +00:00:00 debug #43 parseDibCode / output: Spi / file: util.dib +00:00:00 debug #44 writeDibCode / output: Spi / path: rust.dib +00:00:00 debug #45 parseDibCode / output: Spi / file: rust.dib +00:00:00 debug #46 writeDibCode / output: Spi / path: physics.dib +00:00:00 debug #47 parseDibCode / output: Spi / file: physics.dib 00:00:00 debug #1 run_with_timeout_async / timeout: 500 00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64", @@ -57216,68 +55767,56 @@ 00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval 00:00:01 debug #2 run_with_timeout_async / timeout: 100 00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True -00:00:01 debug #4 run_with_timeout_async / timeout: 100 -00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805 -00:00:01 debug #5 run_with_timeout_async / timeout: 100 +00:00:02 debug #4 run_with_timeout_async / timeout: 100 +00:00:02 debug #5 run_with_timeout_async / timeout: 100 +00:00:02 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805 +00:00:02 debug #6 run_with_timeout_async / timeout: 100 00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result: 00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0 00:00:02 verbose #6 > Server bound to: http://localhost:13805 -00:00:02 debug #7 run_with_timeout_async / timeout: 500 -00:00:02 debug #7 run_with_timeout_async / timeout: 500 -00:00:02 debug #9 run_with_timeout_async / timeout: 500 -00:00:02 debug #9 run_with_timeout_async / timeout: 500 -00:00:02 debug #10 run_with_timeout_async / timeout: 500 -00:00:02 debug #7 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:02 debug #6 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:02 debug #4 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:02 debug #4 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:02 debug #5 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:02 debug #11 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:02 debug #12 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:02 debug #11 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:02 debug #11 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:02 debug #11 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:02 verbose #17 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # trace\n\n/// ## types\ninl types () =\n rust.types ()\n sm\u0027...0022let trace x = !trace x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result: -00:00:02 verbose #13 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # threading\nopen rust_operators\n\n/// ## types\ninl types () =\n gl...new_disposable_token x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result: -00:00:02 verbose #16 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # async\nopen rust_operators\n\n/// ## types\ninl types () =\n global...token_with_default_async x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result: -00:00:02 verbose #14 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # networking\nopen rust_operators\n\n/// ## types\ninl types () =\n g...!get_available_port x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result: -00:00:02 verbose #15 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # runtime\nopen rust_operators\nopen sm\u0027_operators\n\n/// ## types\...t_args x = !split_args x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result: -00:00:02 verbose #18 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result: -00:00:02 verbose #21 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result: -00:00:02 verbose #22 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result: -00:00:02 verbose #19 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result: -00:00:02 verbose #20 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result: -00:00:03 verbose #7 > 00:00:02 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/runtime.spi -00:00:03 verbose #8 > 00:00:02 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/async.spi -00:00:03 verbose #9 > 00:00:02 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/threading.spi -00:00:03 verbose #10 > 00:00:02 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/networking.spi -00:00:03 verbose #11 > 00:00:02 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/trace.spi -00:00:03 debug #24 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:03 debug #24 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:03 debug #24 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:03 debug #24 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:03 debug #24 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:04 debug #25 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:04 debug #26 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:04 debug #27 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:04 debug #28 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:04 debug #29 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:04 debug #30 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: #if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("_")>] -#endif -type Any = class end -#if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>] -#endif -type Func0<'T> = class end -#if FA...osure0() -let v1 : US0 = US0_0 -if State.trace_state.IsNone then State.trace_state <- v0 v1 |> Some -let v2 : (US0 -> ((unit -> string) -> ((unit -> string) -> unit))) = closure2() -let trace x = v2 x -() - / errors: [] / typeErrorCount: 0 -00:00:04 debug #31 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: #if FABLE_COMPILER +00:00:03 debug #9 run_with_timeout_async / timeout: 500 +00:00:03 debug #10 run_with_timeout_async / timeout: 500 +00:00:03 debug #9 run_with_timeout_async / timeout: 500 +00:00:03 debug #9 run_with_timeout_async / timeout: 500 +00:00:03 debug #11 run_with_timeout_async / timeout: 500 +00:00:03 debug #5 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:03 debug #4 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:03 debug #7 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:03 debug #4 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:03 debug #7 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:03 debug #10 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:03 debug #10 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:03 debug #10 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:03 debug #11 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:03 debug #10 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:03 verbose #12 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # networking\nopen rust_operators\n\n/// ## types\ninl types () =\n g...!get_available_port x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result: +00:00:03 verbose #13 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # threading\nopen rust_operators\n\n/// ## types\ninl types () =\n gl...new_disposable_token x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result: +00:00:03 verbose #14 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # trace\n\n/// ## types\ninl types () =\n rust.types ()\n sm\u0027...0022let trace x = !trace x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result: +00:00:03 verbose #15 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # async\nopen rust_operators\n\n/// ## types\ninl types () =\n global...token_with_default_async x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result: +00:00:03 verbose #16 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # runtime\nopen rust_operators\nopen sm\u0027_operators\n\n/// ## types\...t_args x = !split_args x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result: +00:00:03 verbose #7 > 00:00:02 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/trace.spi +00:00:03 verbose #18 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result: +00:00:03 verbose #20 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result: +00:00:03 verbose #20 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result: +00:00:03 verbose #18 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result: +00:00:03 verbose #21 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result: +00:00:03 verbose #8 > 00:00:02 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/threading.spi +00:00:03 verbose #9 > 00:00:02 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/networking.spi +00:00:03 verbose #10 > 00:00:02 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/async.spi +00:00:03 verbose #11 > 00:00:02 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/runtime.spi +00:00:04 debug #22 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:04 debug #23 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:04 debug #24 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:04 debug #25 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:04 debug #26 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:05 debug #28 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:05 debug #27 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:05 debug #29 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:05 debug #30 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:05 debug #31 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:06 debug #32 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:06 debug #33 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:06 debug #34 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>] #endif type reqwest_Error = class end @@ -57288,9 +55827,9 @@ let get_available_port x = v5 x () / errors: [] / typeErrorCount: 0 -00:00:05 debug #33 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:05 debug #33 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:05 debug #35 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: #if FABLE_COMPILER +00:00:06 debug #35 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:06 debug #36 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:06 debug #37 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>] #endif type std_thread_JoinHandle<'T> = class end @@ -57301,20 +55840,36 @@ let new_disposable_token x = v0 x () / errors: [] / typeErrorCount: 0 -00:00:05 debug #35 buildFile / takeWhileInclusive / path: async.spi / fsxContent: #if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>] +00:00:07 debug #38 buildFile / takeWhileInclusive / path: async.spi / fsxContent: #if FABLE_COMPILER +[<Fable.Core.Erase; Fable.Core.Emit("async_std::task::JoinHandle<$0>")>] #endif -type std_future_Future<'T> = class end +type async_std_task_JoinHandle<'T> = class end #if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("futur...cellationToken> = _v1.Value +[<Fable.Core.Erase; Fable.Core.Emit...cellationToken> = _v1.Value v23 let v0 : (System.Threading.CancellationToken -> Async<System.Threading.CancellationToken>) = closure0() let merge_cancellation_token_with_default_async x = v0 x () / errors: [] / typeErrorCount: 0 -00:00:05 debug #36 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:05 debug #37 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:05 debug #38 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: #if FABLE_COMPILER +00:00:07 debug #41 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: #if FABLE_COMPILER +[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>] +#endif +type core_any_Any = class end +#if FABLE_COMPILER +[<Fable.Core.Erase; Fable.Core.Emit("_")>] +#endif +type core_ops_Try<'...osure0() +let v1 : US0 = US0_0 +if State.trace_state.IsNone then State.trace_state <- v0 v1 |> Some +let v2 : (US0 -> ((unit -> string) -> ((unit -> string) -> unit))) = closure2() +let trace x = v2 x +() + / errors: [] / typeErrorCount: 0 +00:00:07 debug #40 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:07 debug #40 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:07 debug #42 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:07 debug #43 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:07 debug #44 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>] #endif type clap_Arg = class end @@ -57327,61 +55882,78 @@ let split_args x = v7 x () / errors: [] / typeErrorCount: 0 -00:00:05 debug #39 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:05 debug #14 run_with_timeout_async / timeout: 500 -00:00:05 debug #14 run_with_timeout_async / timeout: 500 -00:00:05 debug #14 run_with_timeout_async / timeout: 500 -00:00:05 debug #14 run_with_timeout_async / timeout: 500 -00:00:05 debug #42 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:05 debug #42 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:05 debug #42 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:05 debug #43 buildFile / takeWhileInclusive / path: common.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:05 debug #45 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:05 debug #45 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:05 debug #46 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:05 debug #47 buildFile / takeWhileInclusive / path: common.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:05 verbose #48 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # common\n\n/// ## types\ninl types () =\n env.types ()\n rust.typ...et memoize x = !memoize x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result: -00:00:05 verbose #50 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # date_time\nopen rust_operators\nopen sm\u0027_operators\n\n/// ## type... x = !format_iso8601 x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result: -00:00:05 verbose #50 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # crypto\nopen rust_operators\n\n/// ## types\ninl types () =\n globa...ash_text x = !hash_text x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result: -00:00:05 verbose #51 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # file_system\nopen sm\u0027_operators\nopen rust_operators\n\n/// ## ty...003E) x = !combine x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result: -00:00:05 debug #15 run_with_timeout_async / timeout: 500 -00:00:05 verbose #12 > 00:00:04 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/date_time.spi -00:00:05 verbose #13 > 00:00:04 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/file_system.spi -00:00:05 verbose #14 > 00:00:04 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/crypto.spi -00:00:05 verbose #52 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result: -00:00:05 verbose #53 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result: -00:00:05 verbose #54 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result: -00:00:05 debug #55 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:05 debug #56 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:05 verbose #15 > 00:00:04 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/common.spi -00:00:05 verbose #57 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result: -00:00:05 verbose #58 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # guid\n\n/// ## guid\nnominal guid = $\u0022System.Guid\u0022\n\n/// ##...aw_guid x = !new_raw_guid x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/guid.spi"}} / result: -00:00:05 verbose #16 > 00:00:04 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/guid.spi -00:00:05 verbose #59 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/guid.spi"}} / result: -00:00:05 debug #60 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: #if FABLE_COMPILER +00:00:07 debug #45 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:07 debug #14 run_with_timeout_async / timeout: 500 +00:00:07 debug #15 run_with_timeout_async / timeout: 500 +00:00:07 debug #14 run_with_timeout_async / timeout: 500 +00:00:07 debug #14 run_with_timeout_async / timeout: 500 +00:00:07 debug #47 buildFile / takeWhileInclusive / path: common.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:07 debug #47 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:07 debug #48 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:07 debug #49 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:07 debug #50 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:07 debug #51 buildFile / takeWhileInclusive / path: common.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:07 debug #52 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:07 debug #53 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:07 verbose #54 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # crypto\nopen rust_operators\n\n/// ## types\ninl types () =\n globa...ash_text x = !hash_text x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result: +00:00:07 verbose #55 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # common\n\n/// ## types\ninl types () =\n env.types ()\n rust.typ...et memoize x = !memoize x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result: +00:00:07 verbose #56 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # date_time\nopen rust_operators\nopen sm\u0027_operators\n\n/// ## type... x = !format_iso8601 x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result: +00:00:07 verbose #57 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # file_system\nopen sm\u0027_operators\nopen rust_operators\n\n/// ## ty...003E) x = !combine x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result: +00:00:07 verbose #12 > 00:00:06 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/crypto.spi +00:00:07 debug #16 run_with_timeout_async / timeout: 500 +00:00:07 verbose #58 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result: +00:00:07 verbose #13 > 00:00:06 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/date_time.spi +00:00:07 verbose #14 > 00:00:06 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/common.spi +00:00:07 verbose #59 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result: +00:00:07 verbose #60 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result: +00:00:07 verbose #61 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result: +00:00:07 verbose #15 > 00:00:06 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/file_system.spi +00:00:08 debug #62 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: #if FABLE_COMPILER +[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>] +#endif +type core_any_Any = class end +#if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("_")>] #endif -type Any = class end +type core_ops_Try<'... = v36 v35 + let v38 : string = v37 v34 + v38 + #endif + |> fun x -> _v1 <- Some x + let v39 : string = _v1.Value + v39 +let v0 : (string -> string) = closure0() +let hash_text x = v0 x +() + / errors: [] / typeErrorCount: 0 +00:00:08 debug #63 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:08 debug #64 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: #if FABLE_COMPILER +[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>] +#endif +type core_any_Any = class end #if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>] +[<Fable.Core.Erase; Fable.Core.Emit("_")>] #endif -type Func0<'T> = class end -#if FA...t new_guid_from_timestamp x = v5 x +type core_ops_Try<'...t new_guid_from_timestamp x = v5 x let v6 : (string -> (System.DateTime -> string)) = closure11() let format x = v6 x let v7 : (System.DateTime -> string) = closure13() let format_iso8601 x = v7 x () / errors: [] / typeErrorCount: 0 -00:00:05 debug #61 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:05 debug #62 buildFile / takeWhileInclusive / path: common.spi / fsxContent: #if FABLE_COMPILER +00:00:08 debug #65 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:08 debug #66 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:08 debug #67 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:08 debug #68 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:08 debug #69 buildFile / takeWhileInclusive / path: common.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:08 debug #17 run_with_timeout_async / timeout: 500 +00:00:08 debug #70 buildFile / takeWhileInclusive / path: common.spi / fsxContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>] #endif type std_env_VarError = class end #if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("_")>] -#endif -type Any = ...() +[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>] +#endi...() let new_disposable x = v2 x let v3 : (int32 -> ((unit -> unit) -> unit option)) = closure3() let retry_fn x = v3 x @@ -57389,7 +55961,15 @@ let memoize x = v4 x () / errors: [] / typeErrorCount: 0 -00:00:05 debug #63 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: let rec closure0 () (v0 : string) : System.Guid = +00:00:08 verbose #71 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # guid\n\n/// ## guid\nnominal guid = $\u0022System.Guid\u0022\n\n/// ##...aw_guid x = !new_raw_guid x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/guid.spi"}} / result: +00:00:08 debug #72 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:09 debug #73 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:09 debug #74 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:09 verbose #16 > 00:00:07 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/guid.spi +00:00:09 verbose #75 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/guid.spi"}} / result: +00:00:09 verbose #76 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # sm\u0027\nopen rust_operators\n\n/// ## types\ninl types () =\n glo...tring std_string = from_std_string\n","uri":"file:///c:/home/git/polyglot/lib/spiral/sm\u0027.spi"}} / result: +00:00:09 verbose #17 > 00:00:07 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/sm'.spi +00:00:09 debug #77 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: let rec closure0 () (v0 : string) : System.Guid = let v1 : System.Guid = System.Guid v0 v1 and closure1 () () : System.Guid = @@ -57401,29 +55981,26 @@ let new_raw_guid x = v1 x () / errors: [] / typeErrorCount: 0 -00:00:05 debug #64 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:05 debug #65 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: #if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("_")>] +00:00:09 verbose #78 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/sm\u0027.spi"}} / result: +00:00:09 debug #79 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:09 debug #80 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: / errors: [] / typeErrorCount: 0 +00:00:09 debug #81 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: #if FABLE_COMPILER +[<Fable.Core.Erase; Fable.Core.Emit("core::any::Any")>] #endif -type Any = class end +type core_any_Any = class end #if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>] +[<Fable.Core.Erase; Fable.Core.Emit("_")>] #endif -type Func0<'T> = class end -#if FA... = v36 v35 - let v38 : string = v37 v34 - v38 - #endif - |> fun x -> _v1 <- Some x - let v39 : string = _v1.Value - v39 -let v0 : (string -> string) = closure0() -let hash_text x = v0 x +type core_ops_Try<'...tring)) = closure42() +let concat x = v20 x +let v21 : (string -> ((string []) -> string)) = closure44() +let join' x = v21 x +let v22 : (string -> (char [])) = closure46() +let to_char_array x = v22 x () / errors: [] / typeErrorCount: 0 -00:00:05 debug #66 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:05 debug #67 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:06 debug #68 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: #if FABLE_COMPILER +00:00:09 debug #82 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:09 debug #83 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>] #endif type std_fs_File = class end @@ -57438,32 +56015,9 @@ let (</>) x = v20 x () / errors: [] / typeErrorCount: 0 -00:00:06 debug #69 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:06 debug #16 run_with_timeout_async / timeout: 500 -00:00:06 debug #70 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:06 debug #71 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: / errors: [] / typeErrorCount: 0 -00:00:06 verbose #72 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # sm\u0027\nopen rust_operators\n\n/// ## types\ninl types () =\n glo...tring std_string = from_std_string\n","uri":"file:///c:/home/git/polyglot/lib/spiral/sm\u0027.spi"}} / result: -00:00:06 verbose #17 > 00:00:05 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/sm'.spi -00:00:06 verbose #73 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/sm\u0027.spi"}} / result: -00:00:06 debug #74 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: #if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("_")>] -#endif -type Any = class end -#if FABLE_COMPILER -[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>] -#endif -type Func0<'T> = class end -#if FA...tring)) = closure42() -let concat x = v20 x -let v21 : (string -> ((string []) -> string)) = closure44() -let join' x = v21 x -let v22 : (string -> (char [])) = closure46() -let to_char_array x = v22 x -() - / errors: [] / typeErrorCount: 0 -00:00:06 debug #75 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite -00:00:06 verbose #17 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False -00:00:06 debug #18 run_with_timeout_async / timeout: 100 +00:00:09 debug #84 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite +00:00:09 verbose #18 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False +00:00:10 debug #19 run_with_timeout_async / timeout: 100 @@ -57506,311 +56060,311 @@ 00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0 00:00:02 verbose #6 > Server bound to: http://localhost:13805 00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken, - "../../target/release/spiral_builder.exe dib --path Tasks.dib --retries 3", + "../../workspace/target/release/spiral_builder.exe dib --path Tasks.dib --retries 3", [||], None, None, true, None) 00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Tasks.dib", "--retries", "3"]) 00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/scheduler/Tasks.dib", "--output-path", "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/scheduler/Tasks.dib" --output-path "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) -00:00:44 verbose #10 > -00:00:44 verbose #11 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #12 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #13 > │ ## Tasks (Polyglot) │ -00:00:44 verbose #14 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #15 > -00:00:44 verbose #16 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #17 > //// test -00:00:44 verbose #18 > -00:00:44 verbose #19 > open testing -00:00:44 verbose #20 > -00:00:44 verbose #21 > ── spiral - import ───────────────────────────────────────────────────────────── -00:00:44 verbose #22 > #r -00:00:44 verbose #23 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:00:44 verbose #24 > otNet.Interactive.Spiral.dll" -00:00:44 verbose #25 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers -00:00:44 verbose #26 > #r -00:00:44 verbose #27 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D -00:00:44 verbose #28 > otNet.Interactive.dll" -00:00:44 verbose #29 > open type Microsoft.DotNet.Interactive.Kernel -00:00:44 verbose #30 > -00:00:44 verbose #31 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #32 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #33 > │ ## types │ -00:00:44 verbose #34 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #35 > -00:00:44 verbose #36 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #37 > inl types () = -00:00:44 verbose #38 > rust.types () -00:00:44 verbose #39 > sm'.types () -00:00:44 verbose #40 > -00:00:44 verbose #41 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #42 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #43 > │ ## task_name │ -00:00:44 verbose #44 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #45 > -00:00:44 verbose #46 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #47 > nominal task_name = string -00:00:44 verbose #48 > -00:00:44 verbose #49 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #50 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #51 > │ ## manual_scheduling │ -00:00:44 verbose #52 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #53 > -00:00:44 verbose #54 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #55 > union manual_scheduling = -00:00:44 verbose #56 > | WithSuggestion -00:00:44 verbose #57 > | WithoutSuggestion -00:00:44 verbose #58 > -00:00:44 verbose #59 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #60 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #61 > │ ## recurrency_offset │ -00:00:44 verbose #62 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #63 > -00:00:44 verbose #64 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #65 > union recurrency_offset = -00:00:44 verbose #66 > | Days : i32 -00:00:44 verbose #67 > | Weeks : i32 -00:00:44 verbose #68 > | Months : i32 -00:00:44 verbose #69 > -00:00:44 verbose #70 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #71 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #72 > │ ## day_of_week │ -00:00:44 verbose #73 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #74 > -00:00:44 verbose #75 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #76 > union day_of_week = -00:00:44 verbose #77 > | Sunday -00:00:44 verbose #78 > | Monday -00:00:44 verbose #79 > | Tuesday -00:00:44 verbose #80 > | Wednesday -00:00:44 verbose #81 > | Thursday -00:00:44 verbose #82 > | Friday -00:00:44 verbose #83 > | Saturday -00:00:44 verbose #84 > -00:00:44 verbose #85 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #86 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #87 > │ ## month │ -00:00:44 verbose #88 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #89 > -00:00:44 verbose #90 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #91 > union month = -00:00:44 verbose #92 > | January -00:00:44 verbose #93 > | February -00:00:44 verbose #94 > | March -00:00:44 verbose #95 > | April -00:00:44 verbose #96 > | May -00:00:44 verbose #97 > | June -00:00:44 verbose #98 > | July -00:00:44 verbose #99 > | August -00:00:44 verbose #100 > | September -00:00:44 verbose #101 > | October -00:00:44 verbose #102 > | November -00:00:44 verbose #103 > | December -00:00:44 verbose #104 > -00:00:44 verbose #105 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #106 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #107 > │ ## day │ -00:00:44 verbose #108 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #109 > -00:00:44 verbose #110 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #111 > nominal day = i32 -00:00:44 verbose #112 > -00:00:44 verbose #113 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #114 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #115 > │ ## year │ -00:00:44 verbose #116 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #117 > -00:00:44 verbose #118 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #119 > nominal year = i32 -00:00:44 verbose #120 > -00:00:44 verbose #121 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #122 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #123 > │ ## fixed_recurrency │ -00:00:44 verbose #124 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #125 > -00:00:44 verbose #126 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #127 > union fixed_recurrency = -00:00:44 verbose #128 > | Weekly : day_of_week -00:00:44 verbose #129 > | Monthly : day -00:00:44 verbose #130 > | Yearly : day * month -00:00:44 verbose #131 > -00:00:44 verbose #132 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #133 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #134 > │ ## recurrency │ -00:00:44 verbose #135 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #136 > -00:00:44 verbose #137 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #138 > union recurrency = -00:00:44 verbose #139 > | Offset : recurrency_offset -00:00:44 verbose #140 > | Fixed : list fixed_recurrency -00:00:44 verbose #141 > -00:00:44 verbose #142 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #143 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #144 > │ ## scheduling │ -00:00:44 verbose #145 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #146 > -00:00:44 verbose #147 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #148 > union scheduling = -00:00:44 verbose #149 > | Manual : manual_scheduling -00:00:44 verbose #150 > | Recurrent : recurrency -00:00:44 verbose #151 > -00:00:44 verbose #152 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #153 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #154 > │ ## task │ -00:00:44 verbose #155 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #156 > -00:00:44 verbose #157 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #158 > type task = -00:00:44 verbose #159 > { -00:00:44 verbose #160 > name : task_name -00:00:44 verbose #161 > scheduling : scheduling -00:00:44 verbose #162 > } -00:00:44 verbose #163 > -00:00:44 verbose #164 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #165 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #166 > │ ## date │ -00:00:44 verbose #167 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #168 > -00:00:44 verbose #169 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #170 > type date = -00:00:44 verbose #171 > { -00:00:44 verbose #172 > year : year -00:00:44 verbose #173 > month : month -00:00:44 verbose #174 > day : day -00:00:44 verbose #175 > } -00:00:44 verbose #176 > -00:00:44 verbose #177 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #178 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #179 > │ ## status │ -00:00:44 verbose #180 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #181 > -00:00:44 verbose #182 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #183 > union status = -00:00:44 verbose #184 > | Postponed : option () -00:00:44 verbose #185 > -00:00:44 verbose #186 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #187 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #188 > │ ## event │ -00:00:44 verbose #189 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #190 > -00:00:44 verbose #191 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #192 > type event = -00:00:44 verbose #193 > { -00:00:44 verbose #194 > date : date -00:00:44 verbose #195 > status : status -00:00:44 verbose #196 > } -00:00:44 verbose #197 > -00:00:44 verbose #198 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #199 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #200 > │ ## task_template │ -00:00:44 verbose #201 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #202 > -00:00:44 verbose #203 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #204 > type task_template = -00:00:44 verbose #205 > { -00:00:44 verbose #206 > task : task -00:00:44 verbose #207 > events : list event -00:00:44 verbose #208 > } -00:00:44 verbose #209 > -00:00:44 verbose #210 > ── markdown ──────────────────────────────────────────────────────────────────── -00:00:44 verbose #211 > ╭──────────────────────────────────────────────────────────────────────────────╮ -00:00:44 verbose #212 > │ ## get_tasks (test) │ -00:00:44 verbose #213 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #214 > -00:00:44 verbose #215 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #216 > //// test -00:00:44 verbose #217 > -00:00:44 verbose #218 > inl get_tasks () : list task_template = -00:00:44 verbose #219 > [[ -00:00:44 verbose #220 > { -00:00:44 verbose #221 > task = -00:00:44 verbose #222 > { -00:00:44 verbose #223 > name = task_name "01" -00:00:44 verbose #224 > scheduling = Manual WithSuggestion -00:00:44 verbose #225 > } -00:00:44 verbose #226 > events = [[]] -00:00:44 verbose #227 > } -00:00:44 verbose #228 > { -00:00:44 verbose #229 > task = -00:00:44 verbose #230 > { -00:00:44 verbose #231 > name = task_name "02" -00:00:44 verbose #232 > scheduling = Manual WithSuggestion -00:00:44 verbose #233 > } -00:00:44 verbose #234 > events = [[]] -00:00:44 verbose #235 > } -00:00:44 verbose #236 > { -00:00:44 verbose #237 > task = -00:00:44 verbose #238 > { -00:00:44 verbose #239 > name = task_name "03" -00:00:44 verbose #240 > scheduling = Manual WithSuggestion -00:00:44 verbose #241 > } -00:00:44 verbose #242 > events = [[]] -00:00:44 verbose #243 > } -00:00:44 verbose #244 > ]] -00:00:44 verbose #245 > -00:00:44 verbose #246 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #247 > //// test -00:00:44 verbose #248 > ///! rust -00:00:44 verbose #249 > -00:00:44 verbose #250 > types () -00:00:44 verbose #251 > get_tasks () -00:00:44 verbose #252 > |> sm'.format_pretty' -00:00:44 verbose #253 > |> sm'.from_std_string -00:00:44 verbose #254 > |> _assert_string_contains "01" -00:00:44 verbose #255 > -00:00:44 verbose #256 > ╭─[ 17.85s - return value ]────────────────────────────────────────────────────╮ -00:00:44 verbose #257 > │ assert_string_contains / actual: "01" / expected: "UH2_1( │ -00:00:44 verbose #258 > │ UH0_0, │ -00:00:44 verbose #259 > │ "01", │ -00:00:44 verbose #260 > │ US4_0( │ -00:00:44 verbose #261 > │ US3_0, │ -00:00:44 verbose #262 > │ ), │ -00:00:44 verbose #263 > │ UH2_1( │ -00:00:44 verbose #264 > │ UH0_0, │ -00:00:44 verbose #265 > │ "02", │ -00:00:44 verbose #266 > │ US4_0( │ -00:00:44 verbose #267 > │ US3_0, │ -00:00:44 verbose #268 > │ ), │ -00:00:44 verbose #269 > │ UH2_1( │ -00:00:44 verbose #270 > │ UH0_0, │ -00:00:44 verbose #271 > │ "03", │ -00:00:44 verbose #272 > │ US4_0( │ -00:00:44 verbose #273 > │ US3_0, │ -00:00:44 verbose #274 > │ ), │ -00:00:44 verbose #275 > │ UH2_0, │ -00:00:44 verbose #276 > │ ), │ -00:00:44 verbose #277 > │ ), │ -00:00:44 verbose #278 > │ )" │ -00:00:44 verbose #279 > │ │ -00:00:44 verbose #280 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #281 > -00:00:44 verbose #282 > ── spiral ────────────────────────────────────────────────────────────────────── -00:00:44 verbose #283 > //// test -00:00:44 verbose #284 > ///! rust -00:00:44 verbose #285 > -00:00:44 verbose #286 > get_tasks () -00:00:44 verbose #287 > |> listm'.try_item 0i32 -00:00:44 verbose #288 > |> fun (Some task) => task.task.name -00:00:44 verbose #289 > |> _assert_eq (task_name "01") -00:00:44 verbose #290 > -00:00:44 verbose #291 > ╭─[ 17.06s - return value ]────────────────────────────────────────────────────╮ -00:00:44 verbose #292 > │ assert_eq / actual: "01" / expected: "01" │ -00:00:44 verbose #293 > │ │ -00:00:44 verbose #294 > ╰──────────────────────────────────────────────────────────────────────────────╯ -00:00:44 verbose #295 > 00:00:41 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 12363 -00:00:44 verbose #296 > 00:00:41 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) -00:00:47 verbose #297 > 00:00:45 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb to html\e[0m -00:00:47 verbose #298 > 00:00:45 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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.\e[0m -00:00:47 verbose #299 > 00:00:45 verbose #7 \e[4;7m validate(nb)\e[0m -00:00:47 verbose #300 > 00:00:45 verbose #8 \e[4;7m[NbConvertApp] Writing 299994 bytes to c:\home\git\polyglot\apps\scheduler\Tasks.dib.html\e[0m -00:00:47 verbose #301 > 00:00:45 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 609 -00:00:47 verbose #302 > 00:00:45 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 609 -00:00:47 verbose #303 > 00:00:45 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/scheduler/Tasks.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/scheduler/Tasks.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) -00:00:48 verbose #304 > 00:00:46 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 -00:00:48 verbose #305 > 00:00:46 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 -00:00:49 verbose #306 > 00:00:46 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 13031 -00:00:49 debug #307 execute_with_options_async / exit_code: 0 / output.Length: 15363 -00:00:49 debug #3 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path Tasks.dib --retries 3 -00:00:49 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False -00:00:49 debug #7 run_with_timeout_async / timeout: 100 +00:00:06 verbose #10 > > +00:00:06 verbose #11 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:06 verbose #12 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:06 verbose #13 > > │ ## Tasks (Polyglot) │ +00:00:06 verbose #14 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:06 verbose #15 > > +00:00:06 verbose #16 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:06 verbose #17 > > //// test +00:00:06 verbose #18 > > +00:00:06 verbose #19 > > open testing +00:00:06 verbose #20 > > +00:00:06 verbose #21 > > ── spiral - import ───────────────────────────────────────────────────────────── +00:00:06 verbose #22 > > #r +00:00:06 verbose #23 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:06 verbose #24 > > otNet.Interactive.Spiral.dll" +00:00:06 verbose #25 > > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers +00:00:06 verbose #26 > > #r +00:00:06 verbose #27 > > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D +00:00:06 verbose #28 > > otNet.Interactive.dll" +00:00:06 verbose #29 > > open type Microsoft.DotNet.Interactive.Kernel +00:00:11 verbose #30 > > +00:00:11 verbose #31 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #32 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #33 > > │ ## types │ +00:00:11 verbose #34 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #35 > > +00:00:11 verbose #36 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #37 > > inl types () = +00:00:11 verbose #38 > > rust.types () +00:00:11 verbose #39 > > sm'.types () +00:00:11 verbose #40 > > +00:00:11 verbose #41 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #42 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #43 > > │ ## task_name │ +00:00:11 verbose #44 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #45 > > +00:00:11 verbose #46 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #47 > > nominal task_name = string +00:00:11 verbose #48 > > +00:00:11 verbose #49 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #50 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #51 > > │ ## manual_scheduling │ +00:00:11 verbose #52 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #53 > > +00:00:11 verbose #54 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #55 > > union manual_scheduling = +00:00:11 verbose #56 > > | WithSuggestion +00:00:11 verbose #57 > > | WithoutSuggestion +00:00:11 verbose #58 > > +00:00:11 verbose #59 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #60 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #61 > > │ ## recurrency_offset │ +00:00:11 verbose #62 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #63 > > +00:00:11 verbose #64 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #65 > > union recurrency_offset = +00:00:11 verbose #66 > > | Days : i32 +00:00:11 verbose #67 > > | Weeks : i32 +00:00:11 verbose #68 > > | Months : i32 +00:00:11 verbose #69 > > +00:00:11 verbose #70 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #71 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #72 > > │ ## day_of_week │ +00:00:11 verbose #73 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #74 > > +00:00:11 verbose #75 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #76 > > union day_of_week = +00:00:11 verbose #77 > > | Sunday +00:00:11 verbose #78 > > | Monday +00:00:11 verbose #79 > > | Tuesday +00:00:11 verbose #80 > > | Wednesday +00:00:11 verbose #81 > > | Thursday +00:00:11 verbose #82 > > | Friday +00:00:11 verbose #83 > > | Saturday +00:00:11 verbose #84 > > +00:00:11 verbose #85 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #86 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #87 > > │ ## month │ +00:00:11 verbose #88 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #89 > > +00:00:11 verbose #90 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #91 > > union month = +00:00:11 verbose #92 > > | January +00:00:11 verbose #93 > > | February +00:00:11 verbose #94 > > | March +00:00:11 verbose #95 > > | April +00:00:11 verbose #96 > > | May +00:00:11 verbose #97 > > | June +00:00:11 verbose #98 > > | July +00:00:11 verbose #99 > > | August +00:00:11 verbose #100 > > | September +00:00:11 verbose #101 > > | October +00:00:11 verbose #102 > > | November +00:00:11 verbose #103 > > | December +00:00:11 verbose #104 > > +00:00:11 verbose #105 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #106 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #107 > > │ ## day │ +00:00:11 verbose #108 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #109 > > +00:00:11 verbose #110 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #111 > > nominal day = i32 +00:00:11 verbose #112 > > +00:00:11 verbose #113 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #114 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #115 > > │ ## year │ +00:00:11 verbose #116 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #117 > > +00:00:11 verbose #118 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #119 > > nominal year = i32 +00:00:11 verbose #120 > > +00:00:11 verbose #121 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #122 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #123 > > │ ## fixed_recurrency │ +00:00:11 verbose #124 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #125 > > +00:00:11 verbose #126 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #127 > > union fixed_recurrency = +00:00:11 verbose #128 > > | Weekly : day_of_week +00:00:11 verbose #129 > > | Monthly : day +00:00:11 verbose #130 > > | Yearly : day * month +00:00:11 verbose #131 > > +00:00:11 verbose #132 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #133 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #134 > > │ ## recurrency │ +00:00:11 verbose #135 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #136 > > +00:00:11 verbose #137 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #138 > > union recurrency = +00:00:11 verbose #139 > > | Offset : recurrency_offset +00:00:11 verbose #140 > > | Fixed : list fixed_recurrency +00:00:11 verbose #141 > > +00:00:11 verbose #142 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #143 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #144 > > │ ## scheduling │ +00:00:11 verbose #145 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #146 > > +00:00:11 verbose #147 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #148 > > union scheduling = +00:00:11 verbose #149 > > | Manual : manual_scheduling +00:00:11 verbose #150 > > | Recurrent : recurrency +00:00:11 verbose #151 > > +00:00:11 verbose #152 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #153 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #154 > > │ ## task │ +00:00:11 verbose #155 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #156 > > +00:00:11 verbose #157 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #158 > > type task = +00:00:11 verbose #159 > > { +00:00:11 verbose #160 > > name : task_name +00:00:11 verbose #161 > > scheduling : scheduling +00:00:11 verbose #162 > > } +00:00:11 verbose #163 > > +00:00:11 verbose #164 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #165 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #166 > > │ ## date │ +00:00:11 verbose #167 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #168 > > +00:00:11 verbose #169 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #170 > > type date = +00:00:11 verbose #171 > > { +00:00:11 verbose #172 > > year : year +00:00:11 verbose #173 > > month : month +00:00:11 verbose #174 > > day : day +00:00:11 verbose #175 > > } +00:00:11 verbose #176 > > +00:00:11 verbose #177 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #178 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #179 > > │ ## status │ +00:00:11 verbose #180 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #181 > > +00:00:11 verbose #182 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #183 > > union status = +00:00:11 verbose #184 > > | Postponed : option () +00:00:11 verbose #185 > > +00:00:11 verbose #186 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #187 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #188 > > │ ## event │ +00:00:11 verbose #189 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #190 > > +00:00:11 verbose #191 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #192 > > type event = +00:00:11 verbose #193 > > { +00:00:11 verbose #194 > > date : date +00:00:11 verbose #195 > > status : status +00:00:11 verbose #196 > > } +00:00:11 verbose #197 > > +00:00:11 verbose #198 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #199 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #200 > > │ ## task_template │ +00:00:11 verbose #201 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #202 > > +00:00:11 verbose #203 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #204 > > type task_template = +00:00:11 verbose #205 > > { +00:00:11 verbose #206 > > task : task +00:00:11 verbose #207 > > events : list event +00:00:11 verbose #208 > > } +00:00:11 verbose #209 > > +00:00:11 verbose #210 > > ── markdown ──────────────────────────────────────────────────────────────────── +00:00:11 verbose #211 > > ╭──────────────────────────────────────────────────────────────────────────────╮ +00:00:11 verbose #212 > > │ ## get_tasks (test) │ +00:00:11 verbose #213 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:11 verbose #214 > > +00:00:11 verbose #215 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #216 > > //// test +00:00:11 verbose #217 > > +00:00:11 verbose #218 > > inl get_tasks () : list task_template = +00:00:11 verbose #219 > > [[ +00:00:11 verbose #220 > > { +00:00:11 verbose #221 > > task = +00:00:11 verbose #222 > > { +00:00:11 verbose #223 > > name = task_name "01" +00:00:11 verbose #224 > > scheduling = Manual WithSuggestion +00:00:11 verbose #225 > > } +00:00:11 verbose #226 > > events = [[]] +00:00:11 verbose #227 > > } +00:00:11 verbose #228 > > { +00:00:11 verbose #229 > > task = +00:00:11 verbose #230 > > { +00:00:11 verbose #231 > > name = task_name "02" +00:00:11 verbose #232 > > scheduling = Manual WithSuggestion +00:00:11 verbose #233 > > } +00:00:11 verbose #234 > > events = [[]] +00:00:11 verbose #235 > > } +00:00:11 verbose #236 > > { +00:00:11 verbose #237 > > task = +00:00:11 verbose #238 > > { +00:00:11 verbose #239 > > name = task_name "03" +00:00:11 verbose #240 > > scheduling = Manual WithSuggestion +00:00:11 verbose #241 > > } +00:00:11 verbose #242 > > events = [[]] +00:00:11 verbose #243 > > } +00:00:11 verbose #244 > > ]] +00:00:11 verbose #245 > > +00:00:11 verbose #246 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:11 verbose #247 > > //// test +00:00:11 verbose #248 > > ///! rust +00:00:11 verbose #249 > > +00:00:11 verbose #250 > > types () +00:00:11 verbose #251 > > get_tasks () +00:00:11 verbose #252 > > |> sm'.format_pretty' +00:00:11 verbose #253 > > |> sm'.from_std_string +00:00:11 verbose #254 > > |> _assert_string_contains "01" +00:00:17 verbose #255 > > +00:00:17 verbose #256 > > ╭─[ 5.67s - return value ]─────────────────────────────────────────────────────╮ +00:00:17 verbose #257 > > │ assert_string_contains / actual: "01" / expected: "UH2_1( │ +00:00:17 verbose #258 > > │ UH0_0, │ +00:00:17 verbose #259 > > │ "01", │ +00:00:17 verbose #260 > > │ US4_0( │ +00:00:17 verbose #261 > > │ US3_0, │ +00:00:17 verbose #262 > > │ ), │ +00:00:17 verbose #263 > > │ UH2_1( │ +00:00:17 verbose #264 > > │ UH0_0, │ +00:00:17 verbose #265 > > │ "02", │ +00:00:17 verbose #266 > > │ US4_0( │ +00:00:17 verbose #267 > > │ US3_0, │ +00:00:17 verbose #268 > > │ ), │ +00:00:17 verbose #269 > > │ UH2_1( │ +00:00:17 verbose #270 > > │ UH0_0, │ +00:00:17 verbose #271 > > │ "03", │ +00:00:17 verbose #272 > > │ US4_0( │ +00:00:17 verbose #273 > > │ US3_0, │ +00:00:17 verbose #274 > > │ ), │ +00:00:17 verbose #275 > > │ UH2_0, │ +00:00:17 verbose #276 > > │ ), │ +00:00:17 verbose #277 > > │ ), │ +00:00:17 verbose #278 > > │ )" │ +00:00:17 verbose #279 > > │ │ +00:00:17 verbose #280 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:17 verbose #281 > > +00:00:17 verbose #282 > > ── spiral ────────────────────────────────────────────────────────────────────── +00:00:17 verbose #283 > > //// test +00:00:17 verbose #284 > > ///! rust +00:00:17 verbose #285 > > +00:00:17 verbose #286 > > get_tasks () +00:00:17 verbose #287 > > |> listm'.try_item 0i32 +00:00:17 verbose #288 > > |> fun (Some task) => task.task.name +00:00:17 verbose #289 > > |> _assert_eq (task_name "01") +00:00:21 verbose #290 > > +00:00:21 verbose #291 > > ╭─[ 4.28s - return value ]─────────────────────────────────────────────────────╮ +00:00:21 verbose #292 > > │ assert_eq / actual: "01" / expected: "01" │ +00:00:21 verbose #293 > > │ │ +00:00:21 verbose #294 > > ╰──────────────────────────────────────────────────────────────────────────────╯ +00:00:21 verbose #295 > 00:00:19 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 12363 +00:00:21 verbose #296 > 00:00:19 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) +00:00:23 verbose #297 > 00:00:21 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb to html +00:00:23 verbose #298 > 00:00:21 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code 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:23 verbose #299 > 00:00:21 verbose #7 ! validate(nb) +00:00:25 verbose #300 > 00:00:22 verbose #8 ! [NbConvertApp] Writing 299994 bytes to c:\home\git\polyglot\apps\scheduler\Tasks.dib.html +00:00:25 verbose #301 > 00:00:22 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 649 +00:00:25 verbose #302 > 00:00:22 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 649 +00:00:25 verbose #303 > 00:00:22 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/scheduler/Tasks.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/scheduler/Tasks.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) +00:00:26 verbose #304 > 00:00:23 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 +00:00:26 verbose #305 > 00:00:23 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 +00:00:26 verbose #306 > 00:00:24 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 13071 +00:00:26 debug #307 execute_with_options_async / exit_code: 0 / output.Length: 15893 +00:00:26 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Tasks.dib --retries 3 +00:00:26 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False +00:00:26 debug #7 run_with_timeout_async / timeout: 100 00:00:00 debug #1 writeDibCode / output: Spi / path: Tasks.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: Tasks.dib @@ -57839,22 +56393,194 @@