GithubHelp home page GithubHelp logo

docopt / docopt.nim Goto Github PK

View Code? Open in Web Editor NEW
211.0 211.0 24.0 124 KB

Command line arguments parser that will make you smile (port of docopt to Nim)

License: MIT License

Nim 100.00%
docopt nim option-parser

docopt.nim's Introduction

docopt creates beautiful command-line interfaces

https://travis-ci.org/docopt/docopt.svg?branch=master

Video introduction to docopt: PyCon UK 2012: Create *beautiful* command-line interfaces with Python

New in version 0.6.1:

  • Fix issue #85 which caused improper handling of [options] shortcut if it was present several times.

New in version 0.6.0:

  • New argument options_first, disallows interspersing options and arguments. If you supply options_first=True to docopt, it will interpret all arguments as positional arguments after first positional argument.
  • If option with argument could be repeated, its default value will be interpreted as space-separated list. E.g. with [default: ./here ./there] will be interpreted as ['./here', './there'].

Breaking changes:

  • Meaning of [options] shortcut slightly changed. Previously it meant "any known option". Now it means "any option not in usage-pattern". This avoids the situation when an option is allowed to be repeated unintentionally.
  • argv is None by default, not sys.argv[1:]. This allows docopt to always use the latest sys.argv, not sys.argv during import time.

Isn't it awesome how optparse and argparse generate help messages based on your code?!

Hell no! You know what's awesome? It's when the option parser is generated based on the beautiful help message that you write yourself! This way you don't need to write this stupid repeatable parser-code, and instead can write only the help message--the way you want it.

docopt helps you create most beautiful command-line interfaces easily:

"""Naval Fate.

Usage:
  naval_fate.py ship new <name>...
  naval_fate.py ship <name> move <x> <y> [--speed=<kn>]
  naval_fate.py ship shoot <x> <y>
  naval_fate.py mine (set|remove) <x> <y> [--moored | --drifting]
  naval_fate.py (-h | --help)
  naval_fate.py --version

Options:
  -h --help     Show this screen.
  --version     Show version.
  --speed=<kn>  Speed in knots [default: 10].
  --moored      Moored (anchored) mine.
  --drifting    Drifting mine.

"""
from docopt import docopt


if __name__ == '__main__':
    arguments = docopt(__doc__, version='Naval Fate 2.0')
    print(arguments)

Beat that! The option parser is generated based on the docstring above that is passed to docopt function. docopt parses the usage pattern ("Usage: ...") and option descriptions (lines starting with dash "-") and ensures that the program invocation matches the usage pattern; it parses options, arguments and commands based on that. The basic idea is that a good help message has all necessary information in it to make a parser.

Also, PEP 257 recommends putting help message in the module docstrings.

Installation

Use pip or easy_install:

pip install docopt==0.6.2

Alternatively, you can just drop docopt.py file into your project--it is self-contained.

docopt is tested with Python 2.7, 3.4, 3.5, and 3.6.

Testing

You can run unit tests using the command:

python setup.py test

API

from docopt import docopt
docopt(doc, argv=None, help=True, version=None, options_first=False)

docopt takes 1 required and 4 optional arguments:

  • doc could be a module docstring (__doc__) or some other string that contains a help message that will be parsed to create the option parser. The simple rules of how to write such a help message are given in next sections. Here is a quick example of such a string:
"""Usage: my_program.py [-hso FILE] [--quiet | --verbose] [INPUT ...]

-h --help    show this
-s --sorted  sorted output
-o FILE      specify output file [default: ./test.txt]
--quiet      print less text
--verbose    print more text

"""
  • argv is an optional argument vector; by default docopt uses the argument vector passed to your program (sys.argv[1:]). Alternatively you can supply a list of strings like ['--verbose', '-o', 'hai.txt'].

  • help, by default True, specifies whether the parser should automatically print the help message (supplied as doc) and terminate, in case -h or --help option is encountered (options should exist in usage pattern, more on that below). If you want to handle -h or --help options manually (as other options), set help=False.

  • version, by default None, is an optional argument that specifies the version of your program. If supplied, then, (assuming --version option is mentioned in usage pattern) when parser encounters the --version option, it will print the supplied version and terminate. version could be any printable object, but most likely a string, e.g. "2.1.0rc1".

    Note, when docopt is set to automatically handle -h, --help and --version options, you still need to mention them in usage pattern for this to work. Also, for your users to know about them.

  • options_first, by default False. If set to True will disallow mixing options and positional argument. I.e. after first positional argument, all arguments will be interpreted as positional even if the look like options. This can be used for strict compatibility with POSIX, or if you want to dispatch your arguments to other programs.

The return value is a simple dictionary with options, arguments and commands as keys, spelled exactly like in your help message. Long versions of options are given priority. For example, if you invoke the top example as:

naval_fate.py ship Guardian move 100 150 --speed=15

the return dictionary will be:

{'--drifting': False,    'mine': False,
 '--help': False,        'move': True,
 '--moored': False,      'new': False,
 '--speed': '15',        'remove': False,
 '--version': False,     'set': False,
 '<name>': ['Guardian'], 'ship': True,
 '<x>': '100',           'shoot': False,
 '<y>': '150'}

Help message format

Help message consists of 2 parts:

  • Usage pattern, e.g.:

    Usage: my_program.py [-hso FILE] [--quiet | --verbose] [INPUT ...]
    
  • Option descriptions, e.g.:

    -h --help    show this
    -s --sorted  sorted output
    -o FILE      specify output file [default: ./test.txt]
    --quiet      print less text
    --verbose    print more text
    

Their format is described below; other text is ignored.

Usage pattern format

Usage pattern is a substring of doc that starts with usage: (case insensitive) and ends with a visibly empty line. Minimum example:

"""Usage: my_program.py

"""

The first word after usage: is interpreted as your program's name. You can specify your program's name several times to signify several exclusive patterns:

"""Usage: my_program.py FILE
          my_program.py COUNT FILE

"""

Each pattern can consist of the following elements:

  • <arguments>, ARGUMENTS. Arguments are specified as either upper-case words, e.g. my_program.py CONTENT-PATH or words surrounded by angular brackets: my_program.py <content-path>.
  • --options. Options are words started with dash (-), e.g. --output, -o. You can "stack" several of one-letter options, e.g. -oiv which will be the same as -o -i -v. The options can have arguments, e.g. --input=FILE or -i FILE or even -iFILE. However it is important that you specify option descriptions if you want your option to have an argument, a default value, or specify synonymous short/long versions of the option (see next section on option descriptions).
  • commands are words that do not follow the described above conventions of --options or <arguments> or ARGUMENTS, plus two special commands: dash "-" and double dash "--" (see below).

Use the following constructs to specify patterns:

  • [ ] (brackets) optional elements. e.g.: my_program.py [-hvqo FILE]
  • ( ) (parens) required elements. All elements that are not put in [ ] are also required, e.g.: my_program.py --path=<path> <file>... is the same as my_program.py (--path=<path> <file>...). (Note, "required options" might be not a good idea for your users).
  • | (pipe) mutually exclusive elements. Group them using ( ) if one of the mutually exclusive elements is required: my_program.py (--clockwise | --counter-clockwise) TIME. Group them using [ ] if none of the mutually-exclusive elements are required: my_program.py [--left | --right].
  • ... (ellipsis) one or more elements. To specify that arbitrary number of repeating elements could be accepted, use ellipsis (...), e.g. my_program.py FILE ... means one or more FILE-s are accepted. If you want to accept zero or more elements, use brackets, e.g.: my_program.py [FILE ...]. Ellipsis works as a unary operator on the expression to the left.
  • [options] (case sensitive) shortcut for any options. You can use it if you want to specify that the usage pattern could be provided with any options defined below in the option-descriptions and do not want to enumerate them all in usage-pattern.
  • "[--]". Double dash "--" is used by convention to separate positional arguments that can be mistaken for options. In order to support this convention add "[--]" to your usage patterns.
  • "[-]". Single dash "-" is used by convention to signify that stdin is used instead of a file. To support this add "[-]" to your usage patterns. "-" acts as a normal command.

If your pattern allows to match argument-less option (a flag) several times:

Usage: my_program.py [-v | -vv | -vvv]

then number of occurrences of the option will be counted. I.e. args['-v'] will be 2 if program was invoked as my_program -vv. Same works for commands.

If your usage patterns allows to match same-named option with argument or positional argument several times, the matched arguments will be collected into a list:

Usage: my_program.py <file> <file> --path=<path>...

I.e. invoked with my_program.py file1 file2 --path=./here --path=./there the returned dict will contain args['<file>'] == ['file1', 'file2'] and args['--path'] == ['./here', './there'].

Option descriptions format

Option descriptions consist of a list of options that you put below your usage patterns.

It is necessary to list option descriptions in order to specify:

  • synonymous short and long options,
  • if an option has an argument,
  • if option's argument has a default value.

The rules are as follows:

  • Every line in doc that starts with - or -- (not counting spaces) is treated as an option description, e.g.:

    Options:
      --verbose   # GOOD
      -o FILE     # GOOD
    Other: --bad  # BAD, line does not start with dash "-"
    
  • To specify that option has an argument, put a word describing that argument after space (or equals "=" sign) as shown below. Follow either <angular-brackets> or UPPER-CASE convention for options' arguments. You can use comma if you want to separate options. In the example below, both lines are valid, however you are recommended to stick to a single style.:

    -o FILE --output=FILE       # without comma, with "=" sign
    -i <file>, --input <file>   # with comma, without "=" sign
    
  • Use two spaces to separate options with their informal description:

    --verbose More text.   # BAD, will be treated as if verbose option had
                           # an argument "More", so use 2 spaces instead
    -q        Quit.        # GOOD
    -o FILE   Output file. # GOOD
    --stdout  Use stdout.  # GOOD, 2 spaces
    
  • If you want to set a default value for an option with an argument, put it into the option-description, in form [default: <my-default-value>]:

    --coefficient=K  The K coefficient [default: 2.95]
    --output=FILE    Output file [default: test.txt]
    --directory=DIR  Some directory [default: ./]
    
  • If the option is not repeatable, the value inside [default: ...] will be interpreted as string. If it is repeatable, it will be splited into a list on whitespace:

    Usage: my_program.py [--repeatable=<arg> --repeatable=<arg>]
                         [--another-repeatable=<arg>]...
                         [--not-repeatable=<arg>]
    
    # will be ['./here', './there']
    --repeatable=<arg>          [default: ./here ./there]
    
    # will be ['./here']
    --another-repeatable=<arg>  [default: ./here]
    
    # will be './here ./there', because it is not repeatable
    --not-repeatable=<arg>      [default: ./here ./there]
    

Examples

We have an extensive list of examples which cover every aspect of functionality of docopt. Try them out, read the source if in doubt.

Subparsers, multi-level help and huge applications (like git)

If you want to split your usage-pattern into several, implement multi-level help (with separate help-screen for each subcommand), want to interface with existing scripts that don't use docopt, or you're building the next "git", you will need the new options_first parameter (described in API section above). To get you started quickly we implemented a subset of git command-line interface as an example: examples/git

Data validation

docopt does one thing and does it well: it implements your command-line interface. However it does not validate the input data. On the other hand there are libraries like python schema which make validating data a breeze. Take a look at validation_example.py which uses schema to validate data and report an error to the user.

Using docopt with config-files

Often configuration files are used to provide default values which could be overriden by command-line arguments. Since docopt returns a simple dictionary it is very easy to integrate with config-files written in JSON, YAML or INI formats. config_file_example.py provides and example of how to use docopt with JSON or INI config-file.

Development

We would love to hear what you think about docopt on our issues page

Make pull requests, report bugs, suggest ideas and discuss docopt. You can also drop a line directly to <[email protected]>.

Porting docopt to other languages

We think docopt is so good, we want to share it beyond the Python community! All official docopt ports to other languages can be found under the docopt organization page on GitHub.

If your favourite language isn't among then, you can always create a port for it! You are encouraged to use the Python version as a reference implementation. A Language-agnostic test suite is bundled with Python implementation.

Porting discussion is on issues page.

Changelog

docopt follows semantic versioning. The first release with stable API will be 1.0.0 (soon). Until then, you are encouraged to specify explicitly the version in your dependency tools, e.g.:

pip install docopt==0.6.2
  • 0.6.2 Bugfix release.
  • 0.6.1 Bugfix release.
  • 0.6.0 options_first parameter. Breaking changes: Corrected [options] meaning. argv defaults to None.
  • 0.5.0 Repeated options/commands are counted or accumulated into a list.
  • 0.4.2 Bugfix release.
  • 0.4.0 Option descriptions become optional, support for "--" and "-" commands.
  • 0.3.0 Support for (sub)commands like git remote add. Introduce [options] shortcut for any options. Breaking changes: docopt returns dictionary.
  • 0.2.0 Usage pattern matching. Positional arguments parsing based on usage patterns. Breaking changes: docopt returns namespace (for arguments), not list. Usage pattern is formalized.
  • 0.1.0 Initial release. Options-parsing only (based on options description).

docopt.nim's People

Contributors

aravindavk avatar brentp avatar def- avatar hendrikgit avatar hoijui avatar kierdavis avatar nigredo-tori avatar oprypin avatar pmunch avatar reactormonk avatar ringabout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docopt.nim's Issues

`docopt` does not compile with latest `devel` branch of the Nim compiler

I am having problems compiling an application using docopt and the latest devel branch of the Nim compiler. The problem can be reproduced by simply trying to compile docopt.nim itself:

home/tomasi/.nimble/pkgs/docopt-0.6.1/docopt.nim(131, 15) Error: type mismatch: got (seq[seq[Pattern]])
but expected one of: 
system.delete(x: var seq[T], i: Natural)
sequtils.delete(s: var seq[T], first: Natural, last: Natural)
strutils.delete(s: var string, first: int, last: int)

(plus, a lot of "Regexp is deprecated" warning are produced).

Unpack macro

The result of the docopt call seems a bit unwieldy to use. What about a macro to unpack the table into pretty and readly usable variables, kinda like commandeer?

unpack args:
  variable_name, type, "table-key"

It would be good if the table key can optionally be omitted if the variable name unambiguously refer to one of the table keys. From the front page example:

import docopt

let args = docopt(doc, version = "Naval Fate 2.0")

unpack args:
  name, seq[string], "<name>"  # table-key unnecessary
  x, float
  y, float
  speed, float, "--speed"  # other unnecessary example
  morred, bool
  mineSet, bool, "set"  # a classical case where table-key is necessary

ships[name[0]].move(x, y, speed=speed)

I think it is much better if the typing info is centralized like that, instead of scattered along the code with parseFloat() and such.

The syntax is debatable. And it might be better to make an alternative docopt call to do that directly, w/o the need to create an args table. But of course, one should retain the old way for backwards compatibility/whoever likes it.

Always "Exit in case user invoked program with incorrect arguments"

If I am using the nimble install version, docopt always returns "Usage: my_program etc", even on the examples provided. If I copy docopt.nim from the git clone version and overwrite docopt.nim in the nimble pkgs docopt-0.6.2 everything seems to work fine. I want to add that I am using nim v 0.14.3.

Remove pcre dependency

This might be hard to do but it would be nice if the PCRE dependency could be removed. On Windows this is quite inconvenient because it forces you to distribute the pcre64.dll or pcre32.dll with your compiled binary. This breaks the nice "single file executable" property of many nim programs, which for small command line utilities is quite nice.

Latest release doesn't work on Nim 0.19

New to Nim, so I can't do a deep dive into whether or not this is a good idea. However, it looks like you released V0.6.6, then merged in a PR that makes this work on Nim v0.18 and newer.

Would it be a good idea to release V0.7 with this change? I just attempted to build something that uses this library and it failed:

        ... ../../../../../../home/nolan/.nimble/pkgs/docopt-0.6.6/docopt/util.nim(36, 16) template/generic instantiation from here
        ... ../../../../../../home/nolan/.choosenim/toolchains/nim-0.19.0/lib/system.nim(414, 10) Error: 'nil' is now invalid for 'string'; compile with --nilseqs:on for a migration period; usage of '==' is a user-defined error

Thanks.

docopt crashing in runtime with `devel` nim

So docopt.nim is broken again after changes in Nim: https://travis-ci.org/docopt/docopt.nim/jobs/216903139 .

git bisect on Nim led me to this commit: nim-lang/Nim@1268ca7 . The mentioned issue concerns behaviour of methods on nil references. It seems that previously in this case the dispatcher did nothing. This seems wrong and dangerous to me due to my background (any method could silently return a default value/nil!), but some ObjC folks might have been okay with it. Anyway, now in this case a NilAccessError is raised.

However a part of docopt turned out to be triggering this branch of execution, namely a call to str method inside a == method.

As an aside, I don't think ignoring errors for devel Nim branch in CI config is a way to go. Due to Nim's (im)maturity, plenty of people use devel branch with all the fresh fixes, features (and bugs). I understand that sometimes a build failure would be a result of some temporary bug, however quite often the changes causing it are there to stay, and need to be dealt with.

Warning at compile time: [ObservableStores]

Not sure if this is a real issue, so just reporting and in the case can be ignored :)

I'm currently using Version 1.2.6:

{path}/.nimble/pkgs/docopt-0.6.8/docopt.nim(113, 1) Warning: observable stores to 'result' [ObservableStores]

Most tests failing under Nim v0.11, OS X

nim compile --run test/test under OS X with Nim v0.11 (installed yesterday), errors with the following message:

Tests passed: 52/164
Error: execution of an external program failed

Notably, I don't see any compiler warnings under v0.10.2 or v0.11 – but it does appear that some breaking change is substantially affecting this module.

could not import: pcre_free_study

Whenever I try to run a script with docopt in it, this error appears:

could not import: pcre_free_study

Is this on my side or your side? I tried to install the package with nimble and it said it didn't exist.

Does not work under nim 0.20.0

While the package builds, attempting to use it (including in the example files), gives the following error:

/home/squattingmonk/.nimble/pkgs/regex-0.10.0/regex.nim(2838, 45) template/generic instantiation from here
/home/squattingmonk/.choosenim/toolchains/nim-0.20.0/lib/pure/parseutils.nim(452, 54) Error: can raise an unlisted exception: ValueError

Docopt isn't thread safe - cannot use within spawn

docopt-0.6.4\docopt.nim(569, 6) Warning: 'docopt_exc' is not GC-safe as it calls 'fix' [GcUnsafe2]
docopt-0.6.4\docopt.nim(602, 6) Warning: 'docopt' is not GC-safe as it calls 'docopt_exc' [GcUnsafe2]

Docopt fails to run on OS X and Nim v0.12.0 – could not import: pcre_free_study

Example:

let doc = """
Usage: counted --help
       counted -v...
       counted go [go]
       counted (--path=<path>)...
       counted <file> <file>
Try: counted -vvvvvvvvvv
     counted go go
     counted --path ./here --path ./there
     counted this.txt that.txt
"""

import strutils
import docopt


let args = docopt(doc)
echo args

if args["-v"]:
    echo capitalize(repeat("very ", args["-v"].len - 1) & "verbose")

for path in @(args["--path"]):
    echo read_file(path)

Compiles fine, but returns the following error when you run it:

could not import: pcre_free_study

lock level warnings

.nimble/pkgs/docopt-0.1.0/docopt.nim(291, 7) Warning: method has lock level <unknown>, but another method has 0 [LockLevel]
.nimble/pkgs/docopt-0.1.0/docopt.nim(351, 7) Warning: method has lock level <unknown>, but another method has 0 [LockLevel]
.nimble/pkgs/docopt-0.1.0/docopt.nim(385, 7) Warning: method has lock level 0, but another method has <unknown> [LockLevel]

nimble warning

Hello,

I was building a different package using nimble build, and that installed docopt as a dependency. But in that process, nimble printed these warnings related to docopt.

Warning: Package 'docopt' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'docopt', but file 'value.nim' is in a directory named 'private' instead. This will be an error in the future.
Hint: If 'private' contains source files for building 'docopt', rename it to 'docopt'. Otherwise, prevent its installation by adding skipDirs = @["private"] to the .nimble file.

Can you please fix them?

Does not compile with ARC or ORC GCs

My program:

let doc = """
Naval Fate.

Usage:
  naval_fate ship new <name>...
  naval_fate ship <name> move <x> <y> [--speed=<kn>]
  naval_fate ship shoot <x> <y>
  naval_fate mine (set|remove) <x> <y> [--moored | --drifting]
  naval_fate (-h | --help)
  naval_fate --version

Options:
  -h --help     Show this screen.
  --version     Show version.
  --speed=<kn>  Speed in knots [default: 10].
  --moored      Moored (anchored) mine.
  --drifting    Drifting mine.
"""

import docopt

let args = docopt(doc, version = "Naval Fate 2.0")
echo args

It works with 0.6.7:

~/D/P/R/viroid-search ❯❯❯ nimble c --gc:arc -d:danger src/play                                                                 (viroid-search)
  Verifying dependencies for [email protected]
      Info: Dependency on [email protected] already satisfied
  Verifying dependencies for [email protected]
  Compiling src/play (from package viroid_search) using c backend
Hint: used config file '/usr/local/Cellar/nim/1.2.0/nim/config/nim.cfg' [Conf]
Hint: used config file '/Users/BenjaminLee/Desktop/Python/Research/viroid-search/nim.cfg' [Conf]
Hint: system [Processing]
Hint: repr_v2 [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: play [Processing]
Hint: docopt [Processing]
Hint: nre [Processing]
Hint: pcre [Processing]
Hint: util [Processing]
Hint: tables [Processing]
Hint: hashes [Processing]
Hint: math [Processing]
Hint: bitops [Processing]
Hint: macros [Processing]
Hint: algorithm [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: unicode [Processing]
Hint: options [Processing]
Hint: typetraits [Processing]
Hint: os [Processing]
Hint: pathnorm [Processing]
Hint: osseps [Processing]
Hint: posix [Processing]
Hint: times [Processing]
Hint: sequtils [Processing]
Hint: util [Processing]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(578, 41) Hint: passing 'doc' to a sink parameter introduces an implicit copy; use 'move(doc)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(580, 34) Hint: passing 'doc' to a sink parameter introduces an implicit copy; use 'move(doc)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(587, 42) Hint: passing 'doc' to a sink parameter introduces an implicit copy; use 'move(doc)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(597, 31) Hint: passing 'a.value' to a sink parameter introduces an implicit copy; use 'move(a.value)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(599, 31) Hint: passing 'a.value' to a sink parameter introduces an implicit copy; use 'move(a.value)' to prevent it [Performance]
/usr/local/Cellar/nim/1.2.0/nim/lib/impure/nre.nim(565, 13) Hint: passing 'str' to a sink parameter introduces an implicit copy; use 'move(str)' to prevent it [Performance]
/usr/local/Cellar/nim/1.2.0/nim/lib/impure/nre.nim(492, 54) Hint: passing 'str' to a sink parameter introduces an implicit copy; use 'move(str)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(65, 48) Hint: passing 'value' to a sink parameter introduces an implicit copy; use 'move(value)' to prevent it [Performance]
/usr/local/Cellar/nim/1.2.0/nim/lib/impure/nre.nim(565, 13) Hint: passing 'str' to a sink parameter introduces an implicit copy; use 'move(str)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(368, 42) Hint: passing 'it.long' to a sink parameter introduces an implicit copy; use 'move(it.long)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(378, 30) Hint: passing 'similar[0].short' to a sink parameter introduces an implicit copy; use 'move(similar[0].short)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(378, 48) Hint: passing 'similar[0].long' to a sink parameter introduces an implicit copy; use 'move(similar[0].long)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(379, 51) Hint: passing 'similar[0].value' to a sink parameter introduces an implicit copy; use 'move(similar[0].value)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(416, 41) Hint: passing 'similar[0].long' to a sink parameter introduces an implicit copy; use 'move(similar[0].long)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.7/docopt.nim(417, 55) Hint: passing 'similar[0].value' to a sink parameter introduces an implicit copy; use 'move(similar[0].value)' to prevent it [Performance]
Hint:  [Link]
Hint: 47868 LOC; 0.958 sec; 72.492MiB peakmem; Dangerous Release build; proj: /Users/BenjaminLee/Desktop/Python/Research/viroid-search/src/play; out: /Users/BenjaminLee/Desktop/Python/Research/viroid-search/src/play [SuccessX]
   Success: Execution finished
~/D/P/R/viroid-search ❯❯❯

But not 0.6.8:

~/D/P/R/viroid-search ❯❯❯ nimble c --gc:arc -d:danger src/play                                                                 (viroid-search)
  Verifying dependencies for [email protected]
      Info: Dependency on [email protected] already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on regex@>= 0.7.4 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on unicodedb@>= 0.7.2 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on unicodeplus@>= 0.5.0 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on unicodedb@>= 0.8 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on segmentation@>= 0.1 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on unicodedb@>= 0.8.0 already satisfied
  Verifying dependencies for [email protected]
  Compiling src/play (from package viroid_search) using c backend
Hint: used config file '/usr/local/Cellar/nim/1.2.0/nim/config/nim.cfg' [Conf]
Hint: used config file '/Users/BenjaminLee/Desktop/Python/Research/viroid-search/nim.cfg' [Conf]
Hint: system [Processing]
Hint: repr_v2 [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: play [Processing]
Hint: docopt [Processing]
Hint: regex [Processing]
Hint: tables [Processing]
Hint: hashes [Processing]
Hint: math [Processing]
Hint: bitops [Processing]
Hint: macros [Processing]
Hint: algorithm [Processing]
Hint: sequtils [Processing]
Hint: unicode [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: nodetype [Processing]
Hint: sets [Processing]
Hint: properties [Processing]
Hint: properties_data [Processing]
Hint: common [Processing]
Hint: parser [Processing]
Hint: scanner [Processing]
Hint: exptransformation [Processing]
Hint: nfatype [Processing]
Hint: nfa [Processing]
Hint: deques [Processing]
Hint: nfamatch [Processing]
Hint: nodematch [Processing]
Hint: types [Processing]
Hint: types_data [Processing]
Hint: unicodeplus [Processing]
Hint: casing [Processing]
Hint: casing_data [Processing]
Hint: segmentation [Processing]
Hint: segmentation [Processing]
Hint: segmentation_data [Processing]
Hint: nfamacro [Processing]
Hint: options [Processing]
Hint: typetraits [Processing]
Hint: os [Processing]
Hint: pathnorm [Processing]
Hint: osseps [Processing]
Hint: posix [Processing]
Hint: times [Processing]
Hint: util [Processing]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.8/docopt.nim(598, 31) Hint: passing 'a.value' to a sink parameter introduces an implicit copy; use 'move(a.value)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.8/docopt.nim(600, 31) Hint: passing 'a.value' to a sink parameter introduces an implicit copy; use 'move(a.value)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/nfa.nim(245, 20) Hint: passing 'eNfa[z]' to a sink parameter introduces an implicit copy; use 'move(eNfa[z])' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/nfa.nim(247, 27) Hint: passing 'zc' to a sink parameter introduces an implicit copy; use 'move(zc)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/nfa.nim(102, 18) Hint: passing 'n' to a sink parameter introduces an implicit copy; use 'move(n)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/nfa.nim(115, 18) Hint: passing 'n' to a sink parameter introduces an implicit copy; use 'move(n)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/nfa.nim(127, 18) Hint: passing 'n' to a sink parameter introduces an implicit copy; use 'move(n)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/exptransformation.nim(408, 19) Hint: passing 'ops[len(ops) - i]' to a sink parameter introduces an implicit copy; use 'move(ops[len(ops) - i])' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/exptransformation.nim(206, 20) Hint: passing 'n' to a sink parameter introduces an implicit copy; use 'move(n)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/exptransformation.nim(213, 22) Hint: passing 'n.flags' to a sink parameter introduces an implicit copy; use 'move(n.flags)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/exptransformation.nim(215, 18) Hint: passing 'n.flags' to a sink parameter introduces an implicit copy; use 'move(n.flags)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/exptransformation.nim(223, 16) Hint: passing 'n' to a sink parameter introduces an implicit copy; use 'move(n)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/exptransformation.nim(36, 16) Hint: passing 'n' to a sink parameter introduces an implicit copy; use 'move(n)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/exptransformation.nim(61, 23) Hint: passing 'n.name' to a sink parameter introduces an implicit copy; use 'move(n.name)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/scanner.nim(22, 10) Hint: passing 'raw' to a sink parameter introduces an implicit copy; use 'move(raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(207, 41) Hint: passing 'name' to a sink parameter introduces an implicit copy; use 'move(name)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(401, 13) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(412, 11) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0/regex/parser.nim(51, 32) Hint: passing 'sc.raw' to a sink parameter introduces an implicit copy; use 'move(sc.raw)' to prevent it [Performance]
fatal.nim(49)            sysFatal
Error: unhandled exception: ccgexprs.nim(777, 11) `ty.kind in {tyTuple, tyObject}`  [AssertionError]
       Tip: 15 messages have been suppressed, use --verbose to show them.
     Error: Execution failed with exit code 256
        ... Command: "/usr/local/Cellar/nim/1.2.0/nim/bin/nim" c --noNimblePath -d:NimblePkgVersion=0.1.0 --path:"/Users/BenjaminLee/.nimble/pkgs/docopt-0.6.8" --path:"/Users/BenjaminLee/.nimble/pkgs/regex-0.15.0" --path:"/Users/BenjaminLee/.nimble/pkgs/unicodedb-0.9.0" --path:"/Users/BenjaminLee/.nimble/pkgs/unicodeplus-0.6.0" --path:"/Users/BenjaminLee/.nimble/pkgs/unicodedb-0.9.0" --path:"/Users/BenjaminLee/.nimble/pkgs/segmentation-0.1.0" --path:"/Users/BenjaminLee/.nimble/pkgs/unicodedb-0.9.0" "--gc:arc" "-d:danger"  "src/play"

Broken with Nim devel, Windows

I get the following when running docopt tests (Win 7, Nim devel branch, docopt.nim master):

> nim c -r test.nim
Hint: used config file 'c:\dev\Nim\config\nim.cfg' [Conf]
-------- TEST NOT PASSED --------
Usage: prog [options]

--version
--verbose

"
$ prog --version
{"--version": true,
 "--verbose": false}
!= {--version: true, --verbose: nil}
---------------------------------
-------- TEST NOT PASSED --------
Usage: prog [options]

--version
--verbose

"
$ prog --verbose
{"--version": false,
 "--verbose": true}
DocoptExit on valid input
---------------------------------
-------- TEST NOT PASSED --------
Usage: prog [options]

--version
--verbose

"
$ prog --verb
{"--version": false,
 "--verbose": true}
DocoptExit on valid input
---------------------------------
Traceback (most recent call last)
test.nim(64)             test
test.nim(11)             test
docopt.nim(662)          docopt
docopt.nim(578)          docopt_exc
docopt.nim(436)          parse_pattern
docopt.nim(447)          parse_expr
docopt.nim(465)          parse_seq
docopt.nim(490)          parse_atom
docopt.nim(349)          move
system.nim(1427)         delete
system.nim(2544)         sysFatal
Error: unhandled exception: value out of range: -1 [RangeError]
Error: execution of an external program failed: 'c:\dev\tmp\docopt.nim\test\test.exe '

Everything works OK in Linux, though.

Build failure with gcc 14

Hello,

GCC14 changed some warning into errors. This affects this package. I have found this error while building mosdepth:

/build/.cache/nim/mosdepth_d/@m..@s..@[email protected]@[email protected]@sdocopt.nim.c: In function ‘single_match__OOZOOZOOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u2684’:
/build/.cache/nim/mosdepth_d/@m..@s..@[email protected]@[email protected]@sdocopt.nim.c:6103:51: error: assignment to ‘tyObject_PatterncolonObjectType___6EsHdno9aUDLhFZb13CV9bjg *’ from incompatible pointer type ‘tyObject_ArgumentcolonObjectType___5mOF6yv6X1hpdSvzT9bHwag *’ [-Wincompatible-pointer-types]
 6103 |                                         colontmp_ = argument__OOZOOZOOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u263(colontmpD__2, (*pattern).value);
      |                                                   ^
/build/.cache/nim/mosdepth_d/@m..@s..@[email protected]@[email protected]@sdocopt.nim.c: In function ‘single_match__OOZOOZOOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u2696’:
/build/.cache/nim/mosdepth_d/@m..@s..@[email protected]@[email protected]@sdocopt.nim.c:6328:59: error: assignment to ‘tyObject_PatterncolonObjectType___6EsHdno9aUDLhFZb13CV9bjg *’ from incompatible pointer type ‘tyObject_CommandcolonObjectType___d0p03CWXIC0dvrbxEPp3tw *’ [-Wincompatible-pointer-types]
 6328 |                                                 colontmp_ = command__OOZOOZOOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u569(colontmpD__4, colontmpD__5);
      |                                                           ^
Error: execution of an external compiler program 'gcc -c  -w -fmax-errors=3 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -pthread   -I/usr/lib/nim/lib -I/build/mosdepth/src/mosdepth-0.3.8 -o /build/.cache/nim/mosdepth_d/@m..@s..@[email protected]@[email protected]@sdocopt.nim.c.o /build/.cache/nim/mosdepth_d/@m..@s..@[email protected]@[email protected]@sdocopt.nim.c' failed with exit code: 1


       Tip: 100 messages have been suppressed, use --verbose to show them.
nimble.nim(229)          buildFromDir

    Error:  Build failed for the package: mosdepth

This can be worked around by using --passC:-Wno-error=incompatible-pointer-types.

docopt is broken in Nim's devel branch

Docopt seems to be completely broken in current Nim devel branch (as of commit nim-lang/Nim@d7e172). Most of the tests fail.
Works OK with v0.14.2 though.

Doesn't work with Nim 0.15.0

Even the basic example doesn't work. The args aren't parsed.

Testing with Nim 0.15.0 on Windows.

let doc = """
Naval Fate.

Usage:
  naval_fate ship new <name>...
  naval_fate (-h | --help)
  naval_fate --version

Options:
  -h --help     Show this screen.
  --version     Show version.
"""

import strutils
import docopt

let args = docopt(doc, version = "Naval Fate 2.0")

if args["new"]:
  for name in @(args["<name>"]):
    echo "Creating ship $#" % name
$ nim c naval_fate.nim
...
$ .\naval_fate.exe ship new foo
Usage:
  naval_fate ship new <name>...
  naval_fate (-h | --help)
  naval_fate --version

Can't compile with current Nim devel branch

Seeing some instances of

.nimble/pkgs/docopt-0.6.5/private/util.nim(36, 16) template/generic instantiation from here
lib/system.nim(396, 10) Error: usage of '==' is a user-defined error

I guess the comparison to nil is not necessary anymore. (But didn't check)

When installed, warning "Package 'docopt' has an incorrect structure." appears

Hello!

I'm trying out Nim and this package was suggested in the How I Start guide. I encountered the below warning when installing docopt, with Nim 0.17.2 and Nimble v0.8.8, which seem to be current versions. Is there maybe something that needs to be updated in this package? Thanks!

$ nimble install docopt
Downloading https://github.com/docopt/docopt.nim using git
   Warning: Package 'docopt' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'docopt', but file 'util.nim' is in a directory named 'private' instead. This will be an error in the future.
      Hint: If 'private' contains source files for building 'docopt', rename it to 'docopt'. Otherwise, prevent its installation by adding `skipDirs = @["private"]` to the .nimble file.
  Verifying dependencies for [email protected]
 Installing [email protected]
   Success: docopt installed successfully.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.