profile
viewpoint
Kristjan Kongas kongaskristjan near Tallinn, Estonia

kongaskristjan/fire-hpp 380

Fire for C++: Create fully functional CLIs using function signatures

kongaskristjan/PhaseTransition 19

A 2d particle physics simulator with good visualization and high-performance integrator

kongaskristjan/rubik 1

Solving a Rubik's Cube with neural networks.

kongaskristjan/matplotlib-backend-kitty 0

show matplotlib plots directly in your kitty terminal

pull request commentkongaskristjan/fire-hpp

Standard cpp structure

If that sounds good to you all, should we change this PR to match? Yes, this should be changed fire-hpp/.

cxkoda

comment created time in 2 days

pull request commentkongaskristjan/fire-hpp

Standard cpp structure

I agree with the recent arguments made here. The reason I like fire.hpp at root level is purely aesthetic, but having different paths depending on installation can really be a pain in the neck. I'll have more time in the weekend, if everything is fine I'll probably merge this during the weekend. I'll then look into #7 also.

cxkoda

comment created time in 2 days

PullRequestEvent

startedmilesial/Pytorch-UNet

started time in 6 days

startedfmtlib/fmt

started time in 16 days

delete branch kongaskristjan/fire-hpp

delete branch : positionalInFire

delete time in a month

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 18664e5d153745eae51d03dac7b5415766c70bd3

fire::arg::vector() -> fire::arg(fire::variadic())

view details

push time in a month

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 286fd5c954927d929a49e2a68a58098dfce96831

Reprioritize roadmap: functional changes (especially API changes) should come earlier, testing impovements later

view details

push time in a month

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 1092002adb04a84f8820a954b05a987fa0cd89b3

Invalid positional argument message: show argument itself instead of misleading argument index

view details

push time in a month

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 2ed4d7a278dfe7d42df1e8f3110bb56c3975e9a1

Refactor log_elem::type from std::string to enum class

view details

Kristjan Kongas

commit sha 71b611714d3b412bb204fd326eaa8358a44ec11b

Add non-functional introspection (+ refactor)

view details

Kristjan Kongas

commit sha 0e715219d03f276ef937a15515ac8928349b9ace

Use introspection to correctly parse named/positional arguments with FIRE(...)

view details

Kristjan Kongas

commit sha b7b96360d0e359836ef2719bc9b2a62bbde15b34

Remove exceptions in FIRE_NO_SPACE_ASSIGNMENT(...) (Windows tests probably don't work)

view details

Kristjan Kongas

commit sha 65fffafc7868b09750e3ccea4ca794f5749b30a4

Merge branch 'positional_arguments_with_Fire' into master

view details

push time in a month

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 0e715219d03f276ef937a15515ac8928349b9ace

Use introspection to correctly parse named/positional arguments with FIRE(...)

view details

Kristjan Kongas

commit sha b7b96360d0e359836ef2719bc9b2a62bbde15b34

Remove exceptions in FIRE_NO_SPACE_ASSIGNMENT(...) (Windows tests probably don't work)

view details

push time in a month

PR closed kongaskristjan/fire-hpp

Standard cpp structure

Move fire.hpp to include/fire/fire.hpp in order to make it consistent with the inofficial standard. Introduce a fire target to simplify the test and example compilation.

+34 -18

4 comments

14 changed files

cxkoda

pr closed time in a month

pull request commentkongaskristjan/fire-hpp

Standard cpp structure

In the end the include/fire/fire.hpp is only a matter of taste.

I guess my taste likes the current structure more :D, and exporting the target was done in your other PR anyway. Thus I'll close this PR for now, but feel free to comment if you think I missed something important.

cxkoda

comment created time in a month

push eventkongaskristjan/fire-hpp

David Huber

commit sha ae5b69d4211004267b6d069826708f8137687fc9

Add option to disable examples and tests

view details

David Huber

commit sha 6ec24d54e46962aea7bd6eba6e892d266fb2ea68

add fire cmake target

view details

David Huber

commit sha 1abc062addc5909faa79dffc90fe6352e023c642

update readme

view details

Kristjan Kongas

commit sha d529360e00b453c7f6b1c5d378e4f83fc709790a

Merge pull request #4 from cxkoda/cmake-integration Cmake integrability

view details

push time in a month

PR merged kongaskristjan/fire-hpp

Cmake integrability

Improve the integrability in other CMake projects by exporting a fire target and disabling the compilation of tests and examples if included as sub-project.

+55 -2

3 comments

2 changed files

cxkoda

pr closed time in a month

pull request commentkongaskristjan/fire-hpp

Cmake integrability

Sorry, my fault. I used the standard-cpp-structure tag. I'll try to be more careful in the future.

Btw, great feature, I'll merge this.

cxkoda

comment created time in a month

pull request commentkongaskristjan/fire-hpp

Cmake integrability

I tried the FetchContent_declare method. The compilation worked, but for some reason all tests and examples were still compiled. If you fix that, could you also disable googletest fetching in tests/CMakeLists.txt if tests are not built.

cxkoda

comment created time in a month

pull request commentkongaskristjan/fire-hpp

Standard cpp structure

Thanks for interest in contributing!

However, this structure makes sense for larger projects, while this is (and remains for the foreseeable future), a single-header library. Currently it just hides fire.hpp behind two directories.

Also, as the change only adds/changes lines of code, it's a little hard to see it as a simplification.

cxkoda

comment created time in a month

push eventkongaskristjan/CameraMod

Kristjan Kongas

commit sha 202b1b3836adaee4337a82ac71338b3e291d6ab1

Update README.md

view details

push time in 2 months

starteddustinkirkland/byobu

started time in 2 months

startedpickhardt/maintainers-wanted

started time in 2 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 71b611714d3b412bb204fd326eaa8358a44ec11b

Add non-functional introspection (+ refactor)

view details

push time in 2 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 7e5f808dbbcb68883d4ae99249da61289bdcd36c

Add non-functional introspection

view details

push time in 2 months

create barnchkongaskristjan/fire-hpp

branch : positionalInFire

created branch time in 2 months

delete branch kongaskristjan/fire-hpp

delete branch : kongaskristjan

delete time in 2 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha cf81d448129ef31ad428cf2800cd036ac9b77dc9

Remove all exceptions (for now)

view details

push time in 2 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha fe3168e765b4f8c4a4508b9bef6a9ed9012ab2d9

Update TODO list

view details

push time in 2 months

startedtimqian/star-history

started time in 3 months

startedtzutalin/labelImg

started time in 3 months

startedtmux/tmux

started time in 3 months

issue closedkongaskristjan/fire-hpp

The description string does not work as documented

When I provide a help description string, it is used as a default instead of a description:

int fired_main(std::string file = fire::arg(0, "<first>"))

When I run this as of commit 2a562ff, I get:

$ ./build/colormapper.exe --help

Usage:
  C:\git\maph\submodules\colormapper\build\colormapper.exe [<0>]

Options:
  [<0> STRING]   [default: <first>]

<first> becomes the default value instead of the description. I tried this with an int positional argument as well std::string and it has the same problem.

Thank you for the header! This is an interesting project and it looks promising to reduce boilerplate.

closed time in 3 months

JeffIrwin

issue commentkongaskristjan/fire-hpp

The description string does not work as documented

Fixed the doc in 10c1d57a2f0f8746390b964890ebd49bfdd7f062

JeffIrwin

comment created time in 3 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 10c1d57a2f0f8746390b964890ebd49bfdd7f062

Update README about identifier

view details

push time in 3 months

startedkongaskristjan/rubik

started time in 3 months

issue commentkongaskristjan/fire-hpp

The description string does not work as documented

Indeed, there are currently bugs in the documentation and the logic is not very well explained. I'll look into it later today.

For the fire::arg constructor, the first argument is always the name/position/description etc. Second argument is the default value. If you need to specify for example the position, name and description, add braces around the first argument:

int fired_main(std::string file = fire::arg({0, "<name of argument>", "description of argument"}))

First argument elements are interpreted according to this logic:

  • "-s" shorthand name for argument
  • "--multicharacter-name"
  • 0 index in positional argument
  • "<name of the positional argument>"
  • everything else: "description of any argument"
JeffIrwin

comment created time in 3 months

issue closedkongaskristjan/fire-hpp

What about "--" to separate positional arguments?

Ideally a command line parsing library should support -- to separate positional arguments from options., to support CLI interface like this:

$ touch -- -actual-file-with-dash-prefix
$ ls -l -- -actual-file-with-dash-prefix
-rw-r--r-- 1 bronek users 0 Aug  8 19:03 -actual-file-with-dash-prefix
$ rm -- -actual-file-with-dash-prefix

BTW, this is lovely library, thank you for doing it!

closed time in 3 months

Bronek

issue commentkongaskristjan/fire-hpp

What about "--" to separate positional arguments?

Fixed in 95a7587!

Bronek

comment created time in 3 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 95a75870eda2ccd81f6369fc28e0aa8570d7a60d

Interpret arguments after '--' as positional

view details

push time in 3 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 1c345934ceef72928a204353892efc76e8cd804d

Add github link to fire.hpp

view details

Kristjan Kongas

commit sha 2a562ffa897cb2c3a05404765cdd4b38120249a6

Remove double underscores to comply with C++ standard

view details

push time in 3 months

create barnchkongaskristjan/fire-hpp

branch : kongaskristjan

created branch time in 3 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 85bebd4f425fa7ecad9ecea97a31e0b9c0661281

Update README

view details

push time in 3 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 5b0f2bd2dfa198c4541a572be8e3a39e4400e3f2

Fix tests with ambiguous optional<> in C++17

view details

push time in 3 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 65864b7ffffc2fb0ba54b9e9922b069e7d51919b

Add names to positional arguments

view details

push time in 3 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 46d7e3e28d8361beb35032e3c8d9f1cc0b730242

Change '=' to ' ' with positional arguments to signify that usage requires no equation sign

view details

push time in 3 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha a937a999fb5771be6a74b37554e7453acb5a6ef4

Improve help message: -i=<INTEGER> -> -i=INTEGER

view details

push time in 3 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha 253b1eb91a9d8c6303850b82b3e762833ea227a9

Reorder arguments in help message to ensure positional arguments always come before named arguments

view details

push time in 3 months

startedfastai/course-v4

started time in 3 months

push eventkongaskristjan/rubik

Kristjan Kongas

commit sha 2e6809c5f983f37b4b9ef0e6aaacf32919ebb356

Add README

view details

push time in 3 months

push eventkongaskristjan/rubik

Kristjan Kongas

commit sha 082063eef69f17fb54fc34cf1ee9a41c1b1e5155

Add README

view details

push time in 3 months

push eventkongaskristjan/rubik

Kristjan Kongas

commit sha ae26093a913e1767ecc35f0742107309c0c166f2

Add README

view details

push time in 3 months

push eventkongaskristjan/fire-hpp

Kristjan Kongas

commit sha f8f9afacc67985d3d5e99d8f91fb2dced8f781be

Specify arguments with hyphens, move description to identifier, refactor

view details

push time in 3 months

more