better opengl wrapper; oids and endians modules documented
This commit is contained in:
parent
a4a99ae997
commit
07b355bea4
7 changed files with 2572 additions and 2529 deletions
|
|
@ -289,6 +289,15 @@ Miscellaneous
|
||||||
This module implements an event system that is not dependant on external
|
This module implements an event system that is not dependant on external
|
||||||
graphical toolkits.
|
graphical toolkits.
|
||||||
|
|
||||||
|
* `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.
|
||||||
|
|
||||||
|
|
||||||
Database support
|
Database support
|
||||||
----------------
|
----------------
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@
|
||||||
# distribution, for details about the copyright.
|
# distribution, for details about the copyright.
|
||||||
#
|
#
|
||||||
|
|
||||||
## This module contains helpers that deal with `endian`:idx: changes.
|
## This module contains helpers that deal with different byte orders
|
||||||
|
## (`endian`:idx:).
|
||||||
|
|
||||||
proc swapEndian64*(outp, inp: pointer) =
|
proc swapEndian64*(outp, inp: pointer) =
|
||||||
## copies `inp` to `outp` swapping bytes. Both buffers are supposed to
|
## copies `inp` to `outp` swapping bytes. Both buffers are supposed to
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,12 @@
|
||||||
# distribution, for details about the copyright.
|
# distribution, for details about the copyright.
|
||||||
#
|
#
|
||||||
|
|
||||||
## Nimrod OID support. An OID consists of a timestamp, a unique counter
|
## Nimrod OID support. An OID is a global ID that consists of a timestamp,
|
||||||
## and a random value. This combination should suffice to produce a globally
|
## a unique counter and a random value. This combination should suffice to
|
||||||
## distributed unique ID. This implementation was extracted from the
|
## produce a globally distributed unique ID. This implementation was extracted
|
||||||
## Mongodb interface. This calls ``math.randomize()`` for the first call of
|
## from the Mongodb interface and it thus binary compatible with a Mongo OID.
|
||||||
|
##
|
||||||
|
## This implementation calls ``math.randomize()`` for the first call of
|
||||||
## ``genOid``.
|
## ``genOid``.
|
||||||
|
|
||||||
import times, endians
|
import times, endians
|
||||||
|
|
@ -79,3 +81,6 @@ proc generatedTime*(oid: TOid): TTime =
|
||||||
bigEndian32(addr(tmp), addr(dummy))
|
bigEndian32(addr(tmp), addr(dummy))
|
||||||
result = TTime(tmp)
|
result = TTime(tmp)
|
||||||
|
|
||||||
|
when isMainModule:
|
||||||
|
let xo = genOID()
|
||||||
|
echo xo.generatedTime
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
3
todo.txt
3
todo.txt
|
|
@ -3,6 +3,7 @@ version 0.9.0
|
||||||
|
|
||||||
- test and document AVR/embedded systems better
|
- test and document AVR/embedded systems better
|
||||||
- make GC realtime capable: GC_step(ms: int)
|
- make GC realtime capable: GC_step(ms: int)
|
||||||
|
- make templates hygienic by default
|
||||||
- ``=`` should be overloadable; requires specialization for ``=``
|
- ``=`` should be overloadable; requires specialization for ``=``
|
||||||
- fix remaining generics bugs
|
- fix remaining generics bugs
|
||||||
- fix remaining closure bugs:
|
- fix remaining closure bugs:
|
||||||
|
|
@ -101,7 +102,7 @@ version 0.9.XX
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
- wrappers for mongodb; poppler; libharu
|
- wrappers for mongodb
|
||||||
- suffix trees
|
- suffix trees
|
||||||
- locale support; i18n module
|
- locale support; i18n module
|
||||||
- bignums
|
- bignums
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ Library Additions
|
||||||
- Added ``strutils.parseEnum``.
|
- Added ``strutils.parseEnum``.
|
||||||
- The stdlib can now be avoided to a point where C code generation for 16bit
|
- The stdlib can now be avoided to a point where C code generation for 16bit
|
||||||
micro controllers is feasible.
|
micro controllers is feasible.
|
||||||
|
- Added module ``oids``.
|
||||||
|
- Added module ``endians``.
|
||||||
- Added a new OpenGL wrapper that supports OpenGL up to version 4.2.
|
- Added a new OpenGL wrapper that supports OpenGL up to version 4.2.
|
||||||
- Added a wrapper for ``libsvm``.
|
- Added a wrapper for ``libsvm``.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ srcdoc: "pure/collections/tables;pure/collections/sets;pure/collections/lists"
|
||||||
srcdoc: "pure/collections/intsets;pure/collections/queues;pure/encodings"
|
srcdoc: "pure/collections/intsets;pure/collections/queues;pure/encodings"
|
||||||
srcdoc: "pure/events;pure/collections/sequtils;pure/irc;ecmas/dom"
|
srcdoc: "pure/events;pure/collections/sequtils;pure/irc;ecmas/dom"
|
||||||
srcdoc: "pure/ftpclient;pure/memfiles;pure/subexes;pure/collections/critbits"
|
srcdoc: "pure/ftpclient;pure/memfiles;pure/subexes;pure/collections/critbits"
|
||||||
srcdoc: "pure/asyncio;pure/actors;core/locks"
|
srcdoc: "pure/asyncio;pure/actors;core/locks;pure/oids;pure/endians"
|
||||||
|
|
||||||
webdoc: "wrappers/libcurl;pure/md5;wrappers/mysql;wrappers/iup"
|
webdoc: "wrappers/libcurl;pure/md5;wrappers/mysql;wrappers/iup"
|
||||||
webdoc: "wrappers/sqlite3;wrappers/postgres;wrappers/tinyc"
|
webdoc: "wrappers/sqlite3;wrappers/postgres;wrappers/tinyc"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue