The polyglot programmer's standard library.
This is a semi-public, pre-alpha, work-in-progress project.
Here be dragons.
Caveat utilitor: assume nothing works, and you may be pleasantly surprised; and when it breaks, you get to keep both pieces.
Language | Typing | Usage |
---|---|---|
C | static | #include "drylib.h" |
C++ | static | #include "drylib.hpp" |
Common Lisp | dynamic | (require :drylib) |
D | static | import dry = drylib; |
Dart | static | |
Elixir | dynamic | |
Go | static | import "github.com/dryproject/drylib.go" |
Java | static | import dry.*; |
JS | dynamic | import * as dry from 'drylib'; |
Julia | dynamic | using DRYlib |
Kotlin | static | import dry.* |
Lua | dynamic | dry = require 'drylib' |
OCaml | static | open DRY |
PHP | dynamic | require_once 'drylib.php'; |
Python | dynamic | import drylib |
Ruby | dynamic | require 'drylib' |
Rust | static | extern crate drylib as dry; |
- Reduces the cognitive load of frequently switching between different programming languages.
- Enables network effects to cross different languages.
- Facilitates code generation for multiple target languages.
To use DRYlib in your favorite programming language(s), refer to the table at the top that links to the specific code repositories for the set of currently supported target languages.
bool
: Boolean (true
orfalse
).char
: Character (21-bit Unicode code point).complex
: Complex number (arbitrary size).float
: Floating-point number (native size).float32
: Floating-point number (32-bit single-precision).float64
: Floating-point number (64-bit double-precision).int
: Integer number (native size).int8
: Integer number (8-bit).int16
: Integer number (16-bit).int32
: Integer number (32-bit).int64
: Integer number (64-bit).int128
: Integer number (128-bit).integer
: Integer number (arbitrary size).natural
: Natural number (arbitrary size).rational
: Rational number (arbitrary size).real
: Real number (arbitrary size).word
: Machine word (native size).word8
: Machine word (8-bit).word16
: Machine word (16-bit).word32
: Machine word (32-bit).word64
: Machine word (64-bit).
location
: GPS location (latitude, longitude, altitude).
port
: Port number (for TCP, UDP, etc).
address
: IPv4 address.
address
: IPv6 address.
iri
: Internationalized Resource Identifier (IRI).uri
: Uniform Resource Identifier (URI).url
: Uniform Resource Locator (URL).urn
: Uniform Resource Name (URN).uuid
: Universally Unique Identifier (UUID).
oid
: Object Identifier (OID).
curie
: Compact URI (CURIE).
duration
: Time duration.instant
: Time instant.