forked from ghlian/qib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b472f8d
commit a0ad577
Showing
8 changed files
with
35 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[paper] | ||
port: 4002 | ||
|
||
[DEFAULT] | ||
host: 127.0.0.1 | ||
so: ./bin/qib.0.0.2 | ||
load: ib.q | ||
cast: `host`so`port!"SSJ" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/ q ini.q [initfile] [section] | ||
.utl.require"qutil/opts.q" | ||
.utl.require"qutil/config_parse.q" | ||
|
||
.utl.addArg["S";".ini";0; / [initfile] cmdline arg | ||
(`x;{.utl.parseConfig hsym x})] | ||
.utl.addArg["*";"";0; / [section] cmdline arg: selects section of file or first section | ||
{.[`x;();@;] $[count x;x;first key get `x]}] | ||
.utl.parseArgs[] / parse declarations above | ||
|
||
x:{ / cast: keys as symbols, values according to "cast" key | ||
`cast _x!$[99h=type z;"*"^z x;"*"]$y | ||
}[`$key x;value x;eval parse x"cast"] | ||
|
||
if[count x`load; / load files, if provided via "load" key | ||
{system"l ",x}each " " vs x`load]; | ||
|
||
|
||
/ output: global var x holding a dictionary of typed program parameters |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters