diff --git a/.zed/keymap.json b/.zed/keymap.json new file mode 100644 index 00000000..f4d87d49 --- /dev/null +++ b/.zed/keymap.json @@ -0,0 +1,6 @@ +{ + "context": "Workspace", + "bindings": { + "cmd-r": ["task::Spawn", { "task_name": "ET", "reveal_target": "center" }] + } +} diff --git a/.zed/tasks.json b/.zed/tasks.json new file mode 100644 index 00000000..70301c35 --- /dev/null +++ b/.zed/tasks.json @@ -0,0 +1,47 @@ +[ + { + "label": "ET", + "command": "for i in {1..5}; do echo \"Hello $i/5\"; sleep 1; done", + //"args": [], + // Env overrides for the command, will be appended to the terminal's environment from the settings. + "env": { "foo": "bar" }, + // Current working directory to spawn the command into, defaults to current project root. + //"cwd": "/path/to/working/directory", + // Whether to use a new terminal tab or reuse the existing one to spawn the process, defaults to `false`. + "use_new_terminal": true, + // Whether to allow multiple instances of the same task to be run, or rather wait for the existing ones to finish, defaults to `false`. + "allow_concurrent_runs": false, + // What to do with the terminal pane and tab, after the command was started: + // * `always` — always show the task's pane, and focus the corresponding tab in it (default) + // * `no_focus` — always show the task's pane, add the task's tab in it, but don't focus it + // * `never` — do not alter focus, but still add/reuse the task's tab in its pane + "reveal": "always", + // What to do with the terminal pane and tab, after the command has finished: + // * `never` — Do nothing when the command finishes (default) + // * `always` — always hide the terminal tab, hide the pane also if it was the last tab in it + // * `on_success` — hide the terminal tab on task success only, otherwise behaves similar to `always` + "hide": "never", + // Which shell to use when running a task inside the terminal. + // May take 3 values: + // 1. (default) Use the system's default terminal configuration in /etc/passwd + // "shell": "system" + // 2. A program: + // "shell": { + // "program": "sh" + // } + // 3. A program with arguments: + // "shell": { + // "with_arguments": { + // "program": "/bin/bash", + // "args": ["--login"] + // } + // } + "shell": "system", + // Whether to show the task line in the output of the spawned task, defaults to `true`. + "show_summary": true, + // Whether to show the command line in the output of the spawned task, defaults to `true`. + // "show_output": true, + // Represents the tags for inline runnable indicators, or spawning multiple tasks at once. + "tags": ["DODO"] + } +] diff --git a/examples/osal/tmux.vsh b/examples/osal/tmux.vsh new file mode 100755 index 00000000..0521c49e --- /dev/null +++ b/examples/osal/tmux.vsh @@ -0,0 +1,10 @@ +#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run + + +import freeflowuniverse.herolib.osal.tmux + +mut t := tmux.new()! +t.session_delete('main')! +println(t) +t.window_new(name: 'test', cmd: 'mc', reset: true)! +println(t) diff --git a/examples/tools/tmux/examples/.gitignore b/examples/tools/tmux/examples/.gitignore deleted file mode 100644 index b80ce066..00000000 --- a/examples/tools/tmux/examples/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tmux diff --git a/examples/tools/tmux/examples/tmux.v b/examples/tools/tmux/examples/tmux.v deleted file mode 100644 index bac1ff97..00000000 --- a/examples/tools/tmux/examples/tmux.v +++ /dev/null @@ -1,15 +0,0 @@ -module main - -import freeflowuniverse.herolib.osal.tmux - -fn do() ! { - mut t := tmux.new()! - t.session_delete('main')! - println(t) - t.window_new(name: 'test', cmd: 'mc', reset: true)! - println(t) -} - -fn main() { - do() or { panic(err) } -} diff --git a/examples/tools/vault/examples/easy/.vault/meta b/examples/tools/vault/examples/easy/.vault/meta deleted file mode 100644 index e69de29b..00000000 diff --git a/examples/tools/vault/examples/easy/subdir/.vault/meta b/examples/tools/vault/examples/easy/subdir/.vault/meta deleted file mode 100644 index 3d69a3c7..00000000 --- a/examples/tools/vault/examples/easy/subdir/.vault/meta +++ /dev/null @@ -1,2 +0,0 @@ -0263829989b6fd954f72baaf2fc64bc2e2f01d692d4de72986ea808f6e99813f|1662456738|1|test2.md -87428fc522803d31065e7bce3cf03fe475096631e5e07bbd7a0fde60c4cf25c7|1662456738|1|test.md \ No newline at end of file diff --git a/examples/tools/vault/examples/easy/subdir/.vault/test.1.md b/examples/tools/vault/examples/easy/subdir/.vault/test.1.md deleted file mode 100644 index 78981922..00000000 --- a/examples/tools/vault/examples/easy/subdir/.vault/test.1.md +++ /dev/null @@ -1 +0,0 @@ -a diff --git a/examples/tools/vault/examples/easy/subdir/.vault/test2.1.md b/examples/tools/vault/examples/easy/subdir/.vault/test2.1.md deleted file mode 100644 index 61780798..00000000 --- a/examples/tools/vault/examples/easy/subdir/.vault/test2.1.md +++ /dev/null @@ -1 +0,0 @@ -b diff --git a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/meta b/examples/tools/vault/examples/easy/subdir/subsudir/.vault/meta deleted file mode 100644 index d4260fd6..00000000 --- a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/meta +++ /dev/null @@ -1,5 +0,0 @@ -a3a5e715f0cc574a73c3f9bebb6bc24f32ffd5b67b387244c2c909da779a1478|1662456738|1|test3.md -ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d|1662456824|2|test3.md -e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683|1662456824|3|test3.md -ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d|1662457271|4|test3.md -ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb|1662457271|5|test3.md \ No newline at end of file diff --git a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.1.md b/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.1.md deleted file mode 100644 index f2ad6c76..00000000 --- a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.1.md +++ /dev/null @@ -1 +0,0 @@ -c diff --git a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.2.md b/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.2.md deleted file mode 100644 index 7813681f..00000000 --- a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.2.md +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.3.md b/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.3.md deleted file mode 100644 index 62f94575..00000000 --- a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.3.md +++ /dev/null @@ -1 +0,0 @@ -6 \ No newline at end of file diff --git a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.4.md b/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.4.md deleted file mode 100644 index 7813681f..00000000 --- a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.4.md +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.5.md b/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.5.md deleted file mode 100644 index 2e65efe2..00000000 --- a/examples/tools/vault/examples/easy/subdir/subsudir/.vault/test3.5.md +++ /dev/null @@ -1 +0,0 @@ -a \ No newline at end of file diff --git a/examples/tools/vault/examples/easy/subdir/subsudir/test3.md b/examples/tools/vault/examples/easy/subdir/subsudir/test3.md deleted file mode 100644 index 2e65efe2..00000000 --- a/examples/tools/vault/examples/easy/subdir/subsudir/test3.md +++ /dev/null @@ -1 +0,0 @@ -a \ No newline at end of file diff --git a/examples/tools/vault/examples/easy/subdir/test.md b/examples/tools/vault/examples/easy/subdir/test.md deleted file mode 100644 index 78981922..00000000 --- a/examples/tools/vault/examples/easy/subdir/test.md +++ /dev/null @@ -1 +0,0 @@ -a diff --git a/examples/tools/vault/examples/easy/subdir/test2.md b/examples/tools/vault/examples/easy/subdir/test2.md deleted file mode 100644 index 61780798..00000000 --- a/examples/tools/vault/examples/easy/subdir/test2.md +++ /dev/null @@ -1 +0,0 @@ -b diff --git a/examples/tools/vault/examples/simple.v b/examples/tools/vault/examples/simple.v deleted file mode 100644 index b0a1fb31..00000000 --- a/examples/tools/vault/examples/simple.v +++ /dev/null @@ -1,33 +0,0 @@ -module main - -import freeflowuniverse.herolib.vault -import freeflowuniverse.herolib.core.pathlib -import os - -const testdir2 = os.dir(@FILE) + '/easy' - -fn do() ? { - mut v := vault.do(testdir2)? - - remember := v.hash() - - mut p := pathlib.get('${testdir2}/subdir/subsudir/test3.md') - p.write('5')? - mut v2 := vault.do(testdir2)? // will remember the change - p.write('a')? - mut v3 := vault.do(testdir2)? // will remember the change - - println(v3.superlist()) - println(v3.hash()) - - // restore to the original scan - mut v4 := vault.restore(0)? - remember3 := v.hash() - assert remember == remember3 - - v3.delete()? -} - -fn main() { - do() or { panic(err) } -} diff --git a/examples/tools/vault/examples/vault_example.v b/examples/tools/vault/examples/vault_example.v deleted file mode 100644 index bc01e4a5..00000000 --- a/examples/tools/vault/examples/vault_example.v +++ /dev/null @@ -1,26 +0,0 @@ -module main - -import freeflowuniverse.herolib.core.pathlib -import freeflowuniverse.herolib.vault -import os - -const testdir = os.dir(@FILE) + '/../../pathlib/examples/test_path' - -fn do() ? { - // just to check it exists - mut p := pathlib.get_dir(testdir, false)? - p.absolute() - println(p) - // will load the vault, doesn't process files yet - // mut vault1 := vault.scan('myvault', mut p)? - // println(vault) - // vault1.delete()? - mut vault2 := vault.scan('myvault', mut p)? - vault2.shelve()? - // println(vault2) - vault2.delete()? -} - -fn main() { - do() or { panic(err) } -} diff --git a/lib/develop/gittools/gittools_do.v b/lib/develop/gittools/gittools_do.v index 2f801069..aa5a152a 100644 --- a/lib/develop/gittools/gittools_do.v +++ b/lib/develop/gittools/gittools_do.v @@ -237,7 +237,7 @@ pub fn (mut gs GitStructure) do(args_ ReposActionsArgs) !string { need_commit_repo := need_push_repo || need_pull_repo || (need_commit0 && g.need_commit()!) - // console.print_debug(" --- git_do ${g.cache_key()} \n need_commit_repo:${need_commit_repo} \n need_pull_repo:${need_pull_repo} \n need_push_repo:${need_push_repo}") + // console.print_debug(" --- git_do ${g.cache_key()} \n need_commit_repo:${need_commit_repo} \n need_pull_repo:${need_pull_repo} \n need_push_repo:${need_push_repo}") if need_commit_repo { mut msg := args.msg diff --git a/lib/threefold/grid4/datamodel/model_slice_compute.v b/lib/threefold/grid4/datamodel/model_slice_compute.v deleted file mode 100644 index b407ecec..00000000 --- a/lib/threefold/grid4/datamodel/model_slice_compute.v +++ /dev/null @@ -1,22 +0,0 @@ -module datamodel - - - -// typically 1GB of memory, but can be adjusted based based on size of machine -@[heap] -pub struct ComputeSlice { -pub mut: - nodeid u32 // the node in the grid, there is an object describing the node - id int // the id of the slice in the node - mem_gb f64 - storage_gb f64 - passmark int - vcores int - cpu_oversubscription int - storage_oversubscription int - price_range []f64 = [0.0, 0.0] - gpus u8 // nr of GPU's see node to know what GPU's are - price_cc f64 // price per slice (even if the grouped one) - pricing_policy PricingPolicy - sla_policy SLAPolicy -} diff --git a/lib/threefold/grid4/datamodel/model_slice_storage.v b/lib/threefold/grid4/datamodel/model_slice_storage.v deleted file mode 100644 index 24a1d00e..00000000 --- a/lib/threefold/grid4/datamodel/model_slice_storage.v +++ /dev/null @@ -1,16 +0,0 @@ -module datamodel - - -// 1GB of storage -@[heap] -pub struct StorageSlice { -pub mut: - nodeid u32 // the node in the grid - id int // the id of the slice in the node, are tracked in the node itself - price_cc f64 // price per slice (even if the grouped one) - pricing_policy PricingPolicy //copied from node which is part of nodegroup - sla_policy SLAPolicy -} - - -