ngn/k
19
63
Fork
You've already forked k
17

help suggestions #52

Open
opened 2023年05月03日 03:25:06 +02:00 by CptJimKirk · 3 comments
`argv[] but no mention of implicit x as used in ngn/k examples. 
`exit is not mentioned in \`. any other `symbol functions missing from the \` documentation would be helpful to add. 
`x explanation in \` is not clear to me. I have an executable k script, which uses `#!k`, runs from the terminal, but I could not determine how to properly execute as a `x command. 
/ example
`x(("path/to/myScript.k";args);"")
`x(,"path/to/myScript.k";args)
/ this was my solution, but not what is happening in ngn/k/l/runparts.k
`x(("path/to/k/k";"path/to/myScript.k");args)
An example of `x that includes how to start another k process would be helpful. 
no mention of \l which uses files in other directories. Is current directory or abs path the only option? No relative path? 
``` `argv[] but no mention of implicit x as used in ngn/k examples. `exit is not mentioned in \`. any other `symbol functions missing from the \` documentation would be helpful to add. `x explanation in \` is not clear to me. I have an executable k script, which uses `#!k`, runs from the terminal, but I could not determine how to properly execute as a `x command. / example `x(("path/to/myScript.k";args);"") `x(,"path/to/myScript.k";args) / this was my solution, but not what is happening in ngn/k/l/runparts.k `x(("path/to/k/k";"path/to/myScript.k");args) An example of `x that includes how to start another k process would be helpful. no mention of \l which uses files in other directories. Is current directory or abs path the only option? No relative path? ```
Owner
Copy link

`x explanation in \` is not clear to me.

the argument is a pair consisting of:

  • a list of strings specifying argv of the new process - *argv is the path to the executable and 1_argv are the arguments
  • a string specifying content to be written to the child process's stdin; it can be empty

so i guess what you want is

`x((,"path/to/myScript.k"),args;"")

\l
No relative path?

relative paths (relative from the current working directory) should work.

btw, it's a bit annoying that built-in libraries (the l directory) are not easily accessible, e.g. with \l l/utf8.k unless you're in the project's root. there are many ideas but no solution for that right now.

> ``` `x ``` explanation in ``` \` ``` is not clear to me. the argument is a pair consisting of: * a list of strings specifying `argv` of the new process - `*argv` is the path to the executable and `1_argv` are the arguments * a string specifying content to be written to the child process's `stdin`; it can be empty so i guess what you want is `x((,"path/to/myScript.k"),args;"") --- > `\l` > No relative path? relative paths (relative from the current working directory) should work. btw, it's a bit annoying that built-in libraries (the `l` directory) are not easily accessible, e.g. with `\l l/utf8.k` unless you're in the project's root. there are many ideas but no solution for that right now.
ngn referenced this issue from a commit 2023年05月03日 20:06:00 +02:00

so if I have

/root
- /dir1
 - file.k
- main.k

then should be able to say
\l ../main.k inside /dir1/file.k?

Or do you mean, if running the program from /root then I should be able to say
\l main.k inside /dir1/file.k?

I don't follow

so if I have ``` /root - /dir1 - file.k - main.k ``` then should be able to say `\l ../main.k` inside `/dir1/file.k`? Or do you mean, if running the program from `/root` then I should be able to say `\l main.k` inside `/dir1/file.k`? I don't follow
Owner
Copy link

if running the program from /root then I should be able to say
\l main.k inside /dir1/file.k?

this

> if running the program from `/root` then I should be able to say `\l main.k` inside `/dir1/file.k`? this
Sign in to join this conversation.
No Branch/Tag specified
master
pages
No results found.
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ngn/k#52
Reference in a new issue
ngn/k
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?