about summary refs log tree commit diff stats
path: root/dwm.png
blob: b1f9ba7e5f4cc7350ee2392ebcea5fcbe00fb49b (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 c0 00 00 00 50 08 02 00 00 00 c0 d8 ed .PNG........IHDR.......P........
0020 13 00 00 00 06 62 4b 47 44 00 ff 00 ff 00 ff a0 bd a7 93 00 00 00 09 70 48 59 73 00 00 0b 13 00 .....bKGD..............pHYs.....
0040 00 0b 13 01 00 9a 9c 18 00 00 00 07 74 49 4d 45 07 d6 07 13 0c 31 06 de 1b 2a 10 00 00 00 1d 74 ............tIME.....1...*.....t
0060 45 58 74 43 6f 6d 6d 65 6e 74 00 43 72 65 61 74 65 64 20 77 69 74 68 20 54 68 65 20 47 49 4d 50 EXtComment.Created.with.The.GIMP
0080 ef 64 25 6e 00 00 00 d9 49 44 41 54 78 da ed dd 41 0a 80 30 0c 00 41 23 fe ff cb f1 0d 81 06 52 .d%n....IDATx...A..0..A#.......R
00a0 32 73 56 51 59 da 4b d0 c8 cc 67 92 88 28 1d 3f ed fe b7 79 bd 02 04 84 80 10 10 02 02 01 21 20 2sVQY.K...g..(.?...y..........!.
00c0 04 84 80 40 40 08 08 01 21 20 10 10 02 42 40 08 08 04 84 80 10 10 02 42 40 20 20 04 84 80 10 10 ...@@...!....B@........B@.......
00e0 08 08 01 21 20 04 04 02 a2 43 dc fe 00 d5 ef 03 75 7f 7f a8 7a 7d 2b 10 b6 30 10 10 02 42 40 08 ...!.....C......u...z}+..0...B@.
0100 08 04 84 80 10 10 02 02 01 21 20 04 84 80 40 40 1c f4 55 4f e8 fe 3f d7 b6 79 9a db e7 99 ac 40 .........!....@@..UO..?..y.....@
0120 d8 c2 10 10 02 42 40 20 20 04 84 80 10 10 08 08 01 21 20 04 04 02 42 40 8c 52 9e 07 9a 36 af d3 .....B@..........!....B@.R...6..
0140 7d 3f db e6 93 ac 40 08 08 01 21 20 10 10 02 42 40 08 08 04 84 80 10 10 02 02 01 21 20 04 c4 d5 }?....@...!....B@..........!....
0160 7e 8b c2 15 a9 b3 6f d5 23 00 00 00 00 49 45 4e 44 ae 42 60 82 ~.....o.#....IEND.B`.
90'>90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
====================
Nim Standard Library
====================

:Author: Andreas Rumpf
:Version: |nimversion|

.. contents::

  "The good thing about reinventing the wheel is that you can get a round one."

Though the Nim Standard Library is still evolving, it is already quite
usable. It is divided into *pure libraries*, *impure libraries* and *wrappers*.

Pure libraries do not depend on any external ``*.dll`` or ``lib*.so`` binary
while impure libraries do. A wrapper is an impure library that is a very
low-level interface to a C library.

Read this `document <apis.html>`_ for a quick overview of the API design.

In addition to the modules in the standard library, third-party packages
created by the Nim community can be used via `Nimble <#nimble>`_, Nim's
package manager.


Pure libraries
==============

Core
----

* `system <system.html>`_
  Basic procs and operators that every program needs. It also provides IO
  facilities for reading and writing text and binary files. It is imported
  implicitly by the compiler. Do not import it directly. It relies on compiler
  magic to work.

* `threads <threads.html>`_
  Nim thread support. **Note**: This is part of the system module. Do not
  import it explicitly.

* `channels <channels.html>`_
  Nim message passing support for threads. **Note**: This is part of the
  system module. Do not import it explicitly.

* `locks <locks.html>`_
  Locks and condition variables for Nim.

* `rlocks <rlocks.html>`_
  Reentrant locks for Nim.

* `macros <macros.html>`_
  Contains the AST API and documentation of Nim for writing macros.

* `typeinfo <typeinfo.html>`_
  Provides (unsafe) access to Nim's run time type information.

* `typetraits <typetraits.html>`_
  This module defines compile-time reflection procs for working with types.

* `threadpool <threadpool.html>`_
  Implements Nim's `spawn <manual.html#parallel-amp-spawn>`_.

* `cpuinfo <cpuinfo.html>`_
  This module implements procs to determine the number of CPUs / cores.

* `lenientops <lenientops.html>`_
  Provides binary operators for mixed integer/float expressions for convenience.

* `bitops <bitops.html>`_
  Provides a series of low level methods for bit manipulation.


Collections and algorithms
--------------------------

* `algorithm <algorithm.html>`_
  Implements some common generic algorithms like sort or binary search.

* `tables <tables.html>`_
  Nim hash table support. Contains tables, ordered tables and count tables.

* `sets <sets.html>`_
  Nim hash and bit set support.

* `lists <lists.html>`_
  Nim linked list support. Contains singly and doubly linked lists and
  circular lists ("rings").

* `deques <deques.html>`_
  Implementation of a double-ended queue.
  The underlying implementation uses a ``seq``.

* `heapqueue <heapqueue.html>`_
  Implementation of a heap data structure that can be used as a priority queue.

* `intsets <intsets.html>`_
  Efficient implementation of a set of ints as a sparse bit set.

* `critbits <critbits.html>`_
  This module implements a *crit bit tree* which is an efficient
  container for a sorted set of strings, or for a sorted mapping of strings.

* `sequtils <sequtils.html>`_
  This module implements operations for the built-in seq type
  which were inspired by functional programming languages.

* `sharedtables <sharedtables.html>`_
  Nim shared hash table support. Contains shared tables.

* `sharedlist <sharedlist.html>`_
  Nim shared linked list support. Contains shared singly linked list.


String handling
---------------

* `strutils <strutils.html>`_
  This module contains common string handling operations like changing
  case of a string, splitting a string into substrings, searching for
  substrings, replacing substrings.

* `strformat <strformat.html>`_
  Macro based standard string interpolation / formatting. Inspired by
  Python's ``f``-strings.

* `strmisc <strmisc.html>`_
  This module contains uncommon string handling operations that do not
  fit with the commonly used operations in strutils.

* `parseutils <parseutils.html>`_
  This module contains helpers for parsing tokens, numbers, identifiers, etc.

* `strscans <strscans.html>`_
  This module contains a ``scanf`` macro for convenient parsing of mini languages.

* `strtabs <strtabs.html>`_
  The ``strtabs`` module implements an efficient hash table that is a mapping
  from strings to strings. Supports a case-sensitive, case-insensitive and
  style-insensitive modes.

* `unicode <unicode.html>`_
  This module provides support to handle the Unicode UTF-8 encoding.

* `unidecode <unidecode.html>`_
  It provides a single proc that does Unicode to ASCII transliterations.
  Based on Python's Unidecode module.

* `punycode <punycode.html>`_
  Implements a representation of Unicode with the limited ASCII character subset.

* `encodings <encodings.html>`_
  Converts between different character encodings. On UNIX, this uses
  the ``iconv`` library, on Windows the Windows API.

* `pegs <pegs.html>`_
  This module contains procedures and operators for handling PEGs.

* `ropes <ropes.html>`_
  This module contains support for a *rope* data type.
  Ropes can represent very long strings efficiently; especially concatenation
  is done in O(1) instead of O(n).

* `std/editdistance <editdistance.html>`_
  This module contains an algorithm to compute the edit distance between two
  Unicode strings.

* `std/wordwrap <wordwrap.html>`_
  This module contains an algorithm to wordwrap a Unicode string.

* `experimental/diff <diff.html>`_
  This module contains an algorithm to compute the famous "diff"
  of two texts by line.


Generic Operating System Services
---------------------------------

* `os <os.html>`_
  Basic operating system facilities like retrieving environment variables,
  reading command line arguments, working with directories, running shell
  commands, etc.

* `osproc <osproc.html>`_
  Module for process communication beyond ``os.execShellCmd``.

* `times <times.html>`_
  The ``times`` module contains basic support for working with time.

* `dynlib <dynlib.html>`_
  This module implements the ability to access symbols from shared libraries.

* `streams <streams.html>`_
  This module provides a stream interface and two implementations thereof:
  the `FileStream` and the `StringStream` which implement the stream
  interface for Nim file objects (`File`) and strings. Other modules
  may provide other implementations for this standard stream interface.

* `marshal <marshal.html>`_
  Contains procs for serialization and deseralization of arbitrary Nim
  data structures.

* `terminal <terminal.html>`_
  This module contains a few procedures to control the *terminal*
  (also called *console*). The implementation simply uses ANSI escape
  sequences and does not depend on any other module.

* `memfiles <memfiles.html>`_
  This module provides support for memory mapped files (Posix's ``mmap``)
  on the different operating systems.

* `asyncfile <asyncfile.html>`_
  This module implements asynchronous file reading and writing using
  ``asyncdispatch``.

* `asyncstreams <asyncstreams.html>`_
  This module provides `FutureStream` - a future that acts as a queue.

* `distros <distros.html>`_
  This module implements the basics for OS distribution ("distro") detection
  and the OS's native package manager.
  Its primary purpose is to produce output for Nimble packages,
  but it also contains the widely used **Distribution** enum
  that is useful for writing platform specific code.

* `volatile <volatile.html>`_
  This module contains code for generating volatile loads and stores,
  which are useful in embedded and systems programming.


Math libraries
--------------

* `math <math.html>`_
  Mathematical operations like cosine, square root.

* `complex <complex.html>`_
  This module implements complex numbers and their mathematical operations.

* `rationals <rationals.html>`_
  This module implements rational numbers and their mathematical operations.

* `fenv <fenv.html>`_
  Floating-point environment. Handling of floating-point rounding and
  exceptions (overflow, zero-devide, etc.).

* `mersenne <mersenne.html>`_
  Mersenne twister random number generator.

* `random <random.html>`_
  Fast and tiny random number generator.

* `stats <stats.html>`_
  Statistical analysis

Internet Protocols and Support
------------------------------

* `cgi <cgi.html>`_
  This module implements helpers for CGI applications.

* `browsers <browsers.html>`_
  This module implements procs for opening URLs with the user's default
  browser.

* `httpclient <httpclient.html>`_
  This module implements a simple HTTP client which supports both synchronous
  and asynchronous retrieval of web pages.

* `smtp <smtp.html>`_
  This module implement a simple SMTP client.

* `cookies <cookies.html>`_
  This module contains helper procs for parsing and generating cookies.

* `mimetypes <mimetypes.html>`_
  This module implements a mimetypes database.

* `uri <uri.html>`_
  This module provides functions for working with URIs.

* `asyncdispatch <asyncdispatch.html>`_
  This module implements an asynchronous dispatcher for IO operations.

* `asyncnet <asyncnet.html>`_
  This module implements asynchronous sockets based on the ``asyncdispatch``
  module.

* `asynchttpserver <asynchttpserver.html>`_
  This module implements an asynchronous HTTP server using the ``asyncnet``
  module.

* `asyncftpclient <asyncftpclient.html>`_
  This module implements an asynchronous FTP client using the ``asyncnet``
  module.

* `net <net.html>`_
  This module implements a high-level sockets API. It replaces the
  ``sockets`` module.

* `nativesockets <nativesockets.html>`_
  This module implements a low-level sockets API.

* `selectors <selectors.html>`_
  This module implements a selector API with backends specific to each OS.
  Currently epoll on Linux and select on other operating systems.


Parsers
-------

* `parseopt <parseopt.html>`_
  The ``parseopt`` module implements a command line option parser.

* `parsecfg <parsecfg.html>`_
  The ``parsecfg`` module implements a high performance configuration file
  parser. The configuration file's syntax is similar to the Windows ``.ini``
  format, but much more powerful, as it is not a line based parser. String
  literals, raw string literals and triple quote string literals are supported
  as in the Nim programming language.

* `parsexml <parsexml.html>`_
  The ``parsexml`` module implements a simple high performance XML/HTML parser.
  The only encoding that is supported is UTF-8. The parser has been designed
  to be somewhat error correcting, so that even some "wild HTML" found on the
  Web can be parsed with it.

* `parsecsv <parsecsv.html>`_
  The ``parsecsv`` module implements a simple high performance CSV parser.

* `parsesql <parsesql.html>`_
  The ``parsesql`` module implements a simple high performance SQL parser.

* `json <json.html>`_
  High performance JSON parser.

* `lexbase <lexbase.html>`_
  This is a low level module that implements an extremely efficient buffering
  scheme for lexers and parsers. This is used by the diverse parsing modules.

* `packages/docutils/highlite <highlite.html>`_
  Source highlighter for programming or markup languages.  Currently
  only few languages are supported, other languages may be added.
  The interface supports one language nested in another.

* `packages/docutils/rst <rst.html>`_
  This module implements a reStructuredText parser. A large subset
  is implemented. Some features of the markdown wiki syntax are
  also supported.

* `packages/docutils/rstast <rstast.html>`_
  This module implements an AST for the reStructuredText parser.

* `packages/docutils/rstgen <rstgen.html>`_
  This module implements a generator of HTML/Latex from reStructuredText.

* `packages/docutils/sexp <sexp.html>`_
  High performance sexp parser and generator, mainly for communication
  with emacs.


XML Processing
--------------

* `xmltree <xmltree.html>`_
  A simple XML tree. More efficient and simpler than the DOM. It also
  contains a macro for XML/HTML code generation.

* `xmlparser <xmlparser.html>`_
  This module parses an XML document and creates its XML tree representation.

* `htmlparser <htmlparser.html>`_
  This module parses an HTML document and creates its XML tree representation.

* `htmlgen <htmlgen.html>`_
  This module implements a simple XML and HTML code
  generator. Each commonly used HTML tag has a corresponding macro
  that generates a string with its HTML representation.

Cryptography and Hashing
------------------------

* `hashes <hashes.html>`_
  This module implements efficient computations of hash values for diverse
  Nim types.

* `md5 <md5.html>`_
  This module implements the MD5 checksum algorithm.

* `base64 <base64.html>`_
  This module implements a base64 encoder and decoder.

* `std/sha1 <sha1.html>`_
  This module implements a sha1 encoder and decoder.


Multimedia support
------------------

* `colors <colors.html>`_
  This module implements color handling for Nim. It is used by
  the ``graphics`` module.


Miscellaneous
-------------

* `oids <oids.html>`_
  An OID is a global ID that consists of a timestamp,
  a unique counter and a random value. This combination should suffice to
  produce a globally distributed unique ID. This implementation was extracted
  from the Mongodb interface and it thus binary compatible with a Mongo OID.

* `endians <endians.html>`_
  This module contains helpers that deal with different byte orders.

* `logging <logging.html>`_
  This module implements a simple logger.

* `options <options.html>`_
  Types which encapsulate an optional value.

* `sugar <sugar.html>`_
  This module implements nice syntactic sugar based on Nim's macro system.

* `coro <coro.html>`_
  This module implements experimental coroutines in Nim.

* `unittest <unittest.html>`_
  Implements a Unit testing DSL.

* `segfaults <segfaults.html>`_
  Turns access violations or segfaults into a ``NilAccessError`` exception.


Modules for JS backend
----------------------

* `dom <dom.html>`_
  Declaration of the Document Object Model for the JS backend.

* `jsffi <jsffi.html>`_
  Types and macros for easier interaction with JavaScript.

* `asyncjs <asyncjs.html>`_
  Types and macros for writing asynchronous procedures in JavaScript.

* `jscore <jscore.html>`_
  Wrapper of core JavaScript functions. For most purposes you should be using
  the ``math``, ``json``, and ``times`` stdlib modules instead of this module.


Impure libraries
================

Regular expressions
-------------------

* `re <re.html>`_
  This module contains procedures and operators for handling regular
  expressions. The current implementation uses PCRE.


Database support
----------------

* `db_postgres <db_postgres.html>`_
  A higher level PostgreSQL database wrapper. The same interface is implemented
  for other databases too.

* `db_mysql <db_mysql.html>`_
  A higher level MySQL database wrapper. The same interface is implemented
  for other databases too.

* `db_sqlite <db_sqlite.html>`_
  A higher level SQLite database wrapper. The same interface is implemented
  for other databases too.


Wrappers
========

The generated HTML for some of these wrappers is so huge that it is
not contained in the distribution. You can then find them on the website.


Windows specific
----------------

* `winlean <winlean.html>`_
  Contains a wrapper for a small subset of the Win32 API.


UNIX specific
-------------

* `posix <posix.html>`_
  Contains a wrapper for the POSIX standard.


Regular expressions
-------------------

* `pcre <pcre.html>`_
  Wrapper for the PCRE library.


GUI libraries
-------------

* `iup <iup.html>`_
  Wrapper of the IUP GUI library.


Database support
----------------

* `postgres <postgres.html>`_
  Contains a wrapper for the PostgreSQL API.
* `mysql <mysql.html>`_
  Contains a wrapper for the mySQL API.
* `sqlite3 <sqlite3.html>`_
  Contains a wrapper for SQLite 3 API.
* `odbcsql <odbcsql.html>`_
  interface to the ODBC driver.


Network Programming and Internet Protocols
------------------------------------------

* `openssl <openssl.html>`_
  Wrapper for OpenSSL.


Nimble
======

Nimble is a package manager for the Nim programming language.
For instructions on how to install Nimble packages see
`its README <https://github.com/nim-lang/nimble#readme>`_.

To see a list of Nimble's packages, check out `<https://nimble.directory/>`_
or the `packages repo <https://github.com/nim-lang/packages>`_ on GitHub.