Nimrod renamed to Nim

This commit is contained in:
Araq 2014-08-28 09:50:51 +02:00
commit d05df2173b
56 changed files with 116 additions and 116 deletions

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright.
#
## `Actor`:idx: support for Nimrod. An actor is implemented as a thread with
## `Actor`:idx: support for Nim. An actor is implemented as a thread with
## a channel as its inbox. This module requires the ``--threads:on``
## command line switch.
##

View file

@ -151,11 +151,11 @@ proc merge[T](a, b: var openArray[T], lo, m, hi: int,
proc sort*[T](a: var openArray[T],
cmp: proc (x, y: T): int {.closure.},
order = SortOrder.Ascending) =
## Default Nimrod sort. The sorting is guaranteed to be stable and
## Default Nim sort. The sorting is guaranteed to be stable and
## the worst case is guaranteed to be O(n log n).
## The current implementation uses an iterative
## mergesort to achieve this. It uses a temporary sequence of
## length ``a.len div 2``. Currently Nimrod does not support a
## length ``a.len div 2``. Currently Nim does not support a
## sensible default argument for ``cmp``, so you have to provide one
## of your own. However, the ``system.cmp`` procs can be used:
##

View file

@ -325,7 +325,7 @@ proc setTestData*(keysvalues: varargs[string]) =
## This can only simulate the 'GET' request method. `keysvalues` should
## provide embedded (name, value)-pairs. Example:
##
## .. code-block:: Nimrod
## .. code-block:: Nim
## setTestData("name", "Hanz", "password", "12345")
putEnv("REQUEST_METHOD", "GET")
var i = 0
@ -342,7 +342,7 @@ proc writeContentType*() =
## call this before starting to send your HTML data to `stdout`. This
## implements this part of the CGI protocol:
##
## .. code-block:: Nimrod
## .. code-block:: Nim
## write(stdout, "Content-type: text/html\n\n")
write(stdout, "Content-type: text/html\n\n")
@ -366,11 +366,11 @@ proc writeErrorMessage*(data: string) =
stdout.write(data)
proc setStackTraceStdout*() =
## Makes Nimrod output stacktraces to stdout, instead of server log.
## Makes Nim output stacktraces to stdout, instead of server log.
errorMessageWriter = writeErrorMessage
proc setStackTraceNewLine*() {.deprecated.} =
## Makes Nimrod output stacktraces to stdout, instead of server log.
## Makes Nim output stacktraces to stdout, instead of server log.
## Depracated alias for setStackTraceStdout.
setStackTraceStdout()

View file

@ -1,6 +1,6 @@
#
#
# Nimrod's Runtime Library
# Nim's Runtime Library
# (c) Copyright 2014 Andreas Rumpf
#
# See the file "copying.txt", included in this

View file

@ -189,7 +189,7 @@ proc nimFlowVarSignal(fv: FlowVarBase) {.compilerProc.} =
proc awaitAndThen*[T](fv: FlowVar[T]; action: proc (x: T) {.closure.}) =
## blocks until the ``fv`` is available and then passes its value
## to ``action``. Note that due to Nimrod's parameter passing semantics this
## to ``action``. Note that due to Nim's parameter passing semantics this
## means that ``T`` doesn't need to be copied and so ``awaitAndThen`` can
## sometimes be more efficient than ``^``.
await(fv)

View file

@ -39,7 +39,7 @@ type
csock: Socket # Command connection socket
dsock: Socket # Data connection socket
else:
dummyA, dummyB: pointer # workaround a Nimrod API issue
dummyA, dummyB: pointer # workaround a Nim API issue
asyncCSock: AsyncSocket
asyncDSock: AsyncSocket
handleEvent*: proc (ftp: AsyncFTPClient, ev: FTPEvent){.closure,gcsafe.}

View file

@ -9,7 +9,7 @@
## The ``gentabs`` module implements an efficient hash table that is a
## key-value mapping. The keys are required to be strings, but the values
## may be any Nimrod or user defined type. This module supports matching
## may be any Nim or user defined type. This module supports matching
## of keys in case-sensitive, case-insensitive and style-insensitive modes.
{.deprecated.}

View file

@ -1,6 +1,6 @@
#
#
# Nimrod's Runtime Library
# Nim's Runtime Library
# (c) Copyright 2012 Andreas Rumpf, Dominik Picheta
#
# See the file "copying.txt", included in this

View file

@ -30,15 +30,15 @@ const
E* = 2.71828182845904523536028747 ## Euler's number
MaxFloat64Precision* = 16 ## maximum number of meaningful digits
## after the decimal point for Nimrod's
## after the decimal point for Nim's
## ``float64`` type.
MaxFloat32Precision* = 8 ## maximum number of meaningful digits
## after the decimal point for Nimrod's
## after the decimal point for Nim's
## ``float32`` type.
MaxFloatPrecision* = MaxFloat64Precision ## maximum number of
## meaningful digits
## after the decimal point
## for Nimrod's ``float`` type.
## for Nim's ``float`` type.
type
FloatClass* = enum ## describes the class a floating point value belongs to.

View file

@ -1,7 +1,7 @@
#
#
# Nim's Runtime Library
# (c) Copyright 2014 Nimrod Contributors
# (c) Copyright 2014 Nim Contributors
#
# See the file "copying.txt", included in this
# distribution, for details about the copyright.

View file

@ -1245,7 +1245,7 @@ iterator walkDir*(dir: string): tuple[kind: TPathComponent, path: string] {.
##
## and this code:
##
## .. code-block:: Nimrod
## .. code-block:: Nim
## for kind, path in walkDir("dirA"):
## echo(path)
##
@ -1657,7 +1657,7 @@ when defined(nimdoc):
## # Do something else!
elif defined(windows):
# Since we support GUI applications with Nimrod, we sometimes generate
# Since we support GUI applications with Nim, we sometimes generate
# a WinMain entry proc. But a WinMain proc has no access to the parsed
# command line arguments. The way to get them differs. Thus we parse them
# ourselves. This has the additional benefit that the program's behaviour

View file

@ -287,7 +287,7 @@ proc execProcesses*(cmds: openArray[string],
close(p)
proc select*(readfds: var seq[PProcess], timeout = 500): int
## `select` with a sensible Nimrod interface. `timeout` is in miliseconds.
## `select` with a sensible Nim interface. `timeout` is in miliseconds.
## Specify -1 for no timeout. Returns the number of processes that are
## ready to read from. The processes that are ready to be read from are
## removed from `readfds`.

View file

@ -11,7 +11,7 @@
## 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 quoted string literals are supported
## as in the Nimrod programming language.
## as in the Nim programming language.
## This is an example of how a configuration file may look like:
##

View file

@ -10,7 +10,7 @@
## This module contains support for a `rope`:idx: data type.
## Ropes can represent very long strings efficiently; especially concatenation
## is done in O(1) instead of O(n). They are essentially concatenation
## trees that are only flattened when converting to a native Nimrod
## trees that are only flattened when converting to a native Nim
## string. The empty string is represented by ``nil``. Ropes are immutable and
## subtrees can be shared without copying.
## Leaves can be cached for better memory efficiency at the cost of

View file

@ -9,7 +9,7 @@
## This module provides a stream interface and two implementations thereof:
## the `FileStream` and the `StringStream` which implement the stream
## interface for Nimrod file objects (`File`) and strings. Other modules
## interface for Nim file objects (`File`) and strings. Other modules
## may provide other implementations for this standard stream interface.
include "system/inclrtl"
@ -98,7 +98,7 @@ proc writeData*(s, unused: Stream, buffer: pointer,
proc write*[T](s: Stream, x: T) =
## generic write procedure. Writes `x` to the stream `s`. Implementation:
##
## .. code-block:: Nimrod
## .. code-block:: Nim
##
## s.writeData(s, addr(x), sizeof(x))
var y: T

View file

@ -117,7 +117,7 @@ proc normalize*(s: string): string {.noSideEffect, procvar,
## Normalizes the string `s`.
##
## That means to convert it to lower case and remove any '_'. This is needed
## for Nimrod identifiers for example.
## for Nim identifiers for example.
result = newString(s.len)
var j = 0
for i in 0..len(s) - 1:
@ -1155,7 +1155,7 @@ proc formatBiggestFloat*(f: BiggestFloat, format: FloatFormatMode = ffDefault,
## If ``format == ffScientific`` then precision is the maximum number
## of significant digits to be printed.
## `precision`'s default value is the maximum number of meaningful digits
## after the decimal point for Nimrod's ``biggestFloat`` type.
## after the decimal point for Nim's ``biggestFloat`` type.
##
## If ``precision == 0``, it tries to format it nicely.
const floatFormatToChar: array[FloatFormatMode, char] = ['g', 'f', 'e']
@ -1186,7 +1186,7 @@ proc formatFloat*(f: float, format: FloatFormatMode = ffDefault,
## If ``format == ffScientific`` then precision is the maximum number
## of significant digits to be printed.
## `precision`'s default value is the maximum number of meaningful digits
## after the decimal point for Nimrod's ``float`` type.
## after the decimal point for Nim's ``float`` type.
result = formatBiggestFloat(f, format, precision)
proc formatSize*(bytes: BiggestInt, decimalSep = '.'): string =

View file

@ -1,7 +1,7 @@
#
#
# Nim's Runtime Library
# (c) Copyright 2012 Nimrod Contributors
# (c) Copyright 2012 Nim Contributors
#
# See the file "copying.txt", included in this
# distribution, for details about the copyright.

View file

@ -1,7 +1,7 @@
#
#
# Nim's Runtime Library
# (c) Copyright 2012 Nimrod Contributors
# (c) Copyright 2012 Nim Contributors
#
# See the file "copying.txt", included in this
# distribution, for details about the copyright.

View file

@ -276,11 +276,11 @@ macro `<>`*(x: expr): expr {.immediate.} =
## Constructor macro for XML. Example usage:
##
## .. code-block:: nimrod
## <>a(href="http://nimrod-code.org", newText("Nimrod rules."))
## <>a(href="http://nimrod-code.org", newText("Nim rules."))
##
## Produces an XML tree for::
##
## <a href="http://nimrod-code.org">Nimrod rules.</a>
## <a href="http://nimrod-code.org">Nim rules.</a>
##
let x = callsite()
result = xmlConstructor(x)
@ -339,5 +339,5 @@ proc findAll*(n: XmlNode, tag: string): seq[XmlNode] =
findAll(n, tag, result)
when isMainModule:
assert """<a href="http://nimrod-code.org">Nimrod rules.</a>""" ==
$(<>a(href="http://nimrod-code.org", newText("Nimrod rules.")))
assert """<a href="http://nimrod-code.org">Nim rules.</a>""" ==
$(<>a(href="http://nimrod-code.org", newText("Nim rules.")))