======================= Nimrod Standard Library ======================= :Author: Andreas Rumpf :Version: |nimrodversion| .. contents:: "The good thing about reinventing the wheel is that you can get a round one." Though the Nimrod 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 `_ for a quick overview of the API design. If you can't find here some functionality you are looking for you could try using the 3rd party `package manager Babel `_ and its list of packages. Pure libraries ============== Core ---- * `system `_ 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. * `unsigned `_ This module implements basic arithmetic operators for unsigned integers. To discourage users from using unsigned integers, it's not part of ``system``, but an extra import. * `threads `_ Nimrod thread support. **Note**: This is part of the system module. Do not import it explicitly. * `channels `_ Nimrod message passing support for threads. **Note**: This is part of the system module. Do not import it explicitly. * `locks `_ Locks and condition variables for Nimrod. * `macros `_ Contains the AST API and documentation of Nimrod for writing macros. * `typeinfo `_ Provides (unsafe) access to Nimrod's run time type information. * `actors `_ Actor support for Nimrod; implemented as a layer on top of the threads and channels modules. Collections and algorithms -------------------------- * `algorithm `_ Implements some common generic algorithms like sort or binary search. * `tables `_ Nimrod hash table support. Contains tables, ordered tables and count tables. * `sets `_ Nimrod hash and bit set support. * `lists `_ Nimrod linked list support. Contains singly and doubly linked lists and circular lists ("rings"). * `queues `_ Implementation of a queue. The underlying implementation uses a ``seq``. * `intsets `_ Efficient implementation of a set of ints as a sparse bit set. * `critbits `_ This module implements a *crit bit tree* which is an efficient container for a set or a mapping of strings. * `sequtils `_ This module implements operations for the built-in seq type which were inspired by functional programming languages. String handling --------------- * `strutils `_ This module contains common string handling operations like changing case of a string, splitting a string into substrings, searching for substrings, replacing substrings. * `parseutils `_ This module contains helpers for parsing tokens, numbers, identifiers, etc. * `strtabs `_ 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 mode. An efficient string substitution operator ``%`` for the string table is also provided. * `unicode `_ This module provides support to handle the Unicode UTF-8 encoding. * `encodings `_ Converts between different character e
discard """
  file: "texcsub.nim"
  output: "caught!"
"""
# Test inheritance for exception matching:

try:
  raise newException(EOS, "dummy message")
except E_Base:
  echo "caught!"
except: 
  echo "wtf!?"
  
#OUT caught!
module. Miscellaneous ------------- * `events `_ This module implements an event system that is not dependant on external graphical toolkits. * `oids `_ 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 `_ This module contains helpers that deal with different byte orders. Database support ---------------- * `redis `_ This module implements a redis client. It allows you to connect to a redis-server instance, send commands and receive replies. Modules for JS backend --------------------------- * `dom `_ Declaration of the Document Object Model for the JS backend. Impure libraries ================ Regular expressions ------------------- * `re `_ This module contains procedures and operators for handling regular expressions. The current implementation uses PCRE. Database support ---------------- * `db_postgres `_ A higher level PostgreSQL database wrapper. The same interface is implemented for other databases too. * `db_mysql `_ A higher level MySQL database wrapper. The same interface is implemented for other databases too. * `db_sqlite `_ A higher level SQLite database wrapper. The same interface is implemented for other databases too. * `db_mongo `_ A higher level **mongodb** wrapper. * `mongodb `_ Lower level wrapper for the **mongodb** client C library. Other ----- * `graphics `_ This module implements graphical output for Nimrod; the current implementation uses SDL but the interface is meant to support multiple backends some day. * `dialogs `_ This module implements portable dialogs for Nimrod; the implementation builds on the GTK interface. On Windows, native dialogs are shown if appropriate. * `zipfiles `_ This module implements a zip archive creator/reader/modifier. * `web `_ This module contains simple high-level procedures for dealing with the Web like loading the contents of a Web page from an URL. * `ssl `_ This module provides an easy to use sockets-style Nimrod interface to the OpenSSL library. * `rdstdin `_ This module contains code for reading from `stdin`:idx:. On UNIX the GNU readline library is wrapped and set up. * `zmq `_ Nimrod 0mq wrapper. This file contains the low level C wrappers as well as some higher level constructs. 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 ---------------- * `windows `_ Contains a wrapper for the Win32 API. * `ole2 `_ Contains GUIDs for OLE2 automation support. * `shellapi `_ Contains a wrapper for the ``shellapi.h`` header. * `shfolder `_ Contains a wrapper for the ``shfolder.h`` header. * `mmsystem `_ Contains a wrapper for the ``mmsystem.h`` header. * `nb30 `_ This module contains the definitions for portable NetBIOS 3.0 support. UNIX specific ------------- * `posix `_ Contains a wrapper for the POSIX standard. * `cursorfont `_ Part of the wrapper for X11. * `keysym `_ Part of the wrapper for X11. * `x `_ Part of the wrapper for X11. * `xatom `_ Part of the wrapper for X11. * `xcms `_ Part of the wrapper for X11. * `xf86dga `_ Part of the wrapper for X11. * `xf86vmode `_ Part of the wrapper for X11. * `xi `_ Part of the wrapper for X11. * `xinerama `_ Part of the wrapper for X11. * `xkb `_ Part of the wrapper for X11. * `xkblib `_ Part of the wrapper for X11. * `xlib `_ Part of the wrapper for X11. * `xrandr `_ Part of the wrapper for X11. * `xrender `_ Part of the wrapper for X11. * `xresource `_ Part of the wrapper for X11. * `xshm `_ Part of the wrapper for X11. * `xutil `_ Part of the wrapper for X11. * `xv `_ Part of the wrapper for X11. * `xvlib `_ Part of the wrapper for X11. * `readline `_ Part of the wrapper for the GNU readline library. * `history `_ Part of the wrapper for the GNU readline library. * `rltypedefs `_ Part of the wrapper for the GNU readline library. Regular expressions ------------------- * `pcre `_ Wrapper for the PCRE library. * `tre `_ Wrapper for the TRE library. Graphics libraries ------------------ * `cairo `_ Wrapper for the cairo library. * `cairoft `_ Wrapper for the cairoft library. * `cairowin32 `_ Wrapper for the cairowin32 library. * `cairoxlib `_ Wrapper for the cairoxlib library. * `sdl `_ Part of the wrapper for SDL. * `sdl_gfx `_ Part of the wrapper for SDL. * `sdl_image `_ Part of the wrapper for SDL. * `sdl_mixer `_ Part of the wrapper for SDL. * `sdl_net `_ Part of the wrapper for SDL. * `sdl_ttf `_ Part of the wrapper for SDL. * `smpeg `_ Part of the wrapper for SDL. * `gl `_ Part of the wrapper for OpenGL. * `glext `_ Part of the wrapper for OpenGL. * `glu `_ Part of the wrapper for OpenGL. * `glut `_ Part of the wrapper for OpenGL. * `glx `_ Part of the wrapper for OpenGL. * `wingl `_ Part of the wrapper for OpenGL. * `opengl `_ New wrapper for OpenGL supporting up to version 4.2. GUI libraries ------------- * `atk `_ Wrapper for the atk library. * `gdk2 `_ Wrapper for the gdk2 library. * `gdk2pixbuf `_ Wrapper for the gdk2pixbuf library. * `gdkglext `_ Wrapper for the gdkglext library. * `glib2 `_ Wrapper for the glib2 library. * `gtk2 `_ Wrapper for the gtk2 library. * `gtkglext `_ Wrapper for the gtkglext library. * `gtkhtml `_ Wrapper for the gtkhtml library. * `libglade2 `_ Wrapper for the libglade2 library. * `pango `_ Wrapper for the pango library. * `pangoutils `_ Wrapper for the pangoutils library. * `iup `_ Wrapper of the IUP GUI library. Database support ---------------- * `postgres `_ Contains a wrapper for the PostgreSQL API. * `mysql `_ Contains a wrapper for the mySQL API. * `sqlite3 `_ Contains a wrapper for SQLite 3 API. * `odbcsql `_ interface to the ODBC driver. * `sphinx `_ Nimrod wrapper for ``shpinx``. XML Processing -------------- * `expat `_ Wrapper of the expat XML parser. Network Programming and Internet Protocols ------------------------------------------ * `libuv `_ Wrapper for the libuv library used for async I/O programming. * `joyent_http_parser `_ Wrapper for the joyent's high-performance HTTP parser. * `libcurl `_ Wrapper for the libcurl library. * `openssl `_ Wrapper for OpenSSL. Scripting languages ------------------- * `lua `_ Part of the wrapper for Lua. * `lualib `_ Part of the wrapper for Lua. * `lauxlib `_ Part of the wrapper for Lua. * `tcl `_ Wrapper for the TCL programming language. * `python `_ Wrapper for the Python programming language. Data Compression and Archiving ------------------------------ * `zlib `_ Wrapper for the zlib library. * `libzip `_ Interface to the `lib zip `_ library by Dieter Baron and Thomas Klausner. Scientific computing -------------------- * `libsvm `_ Low level wrapper for `lib svm `_.