The OpenD Programming Language

arsd

This package contains a variety of independent modules that I have written over my years of using D.

You can usually use them independently, with few or no dependencies, so it is easy to use raw, or you can use dub packages as well.

See arsd.docs for top-level documents in addition to what is below.

What are you working with? (minimal starting points now but im working on it)

Articles

Overviews, concepts, and tutorials
module arsd.docs

This section of the documentation has bigger picture documents.

Modules

apng
module arsd.apng

Support for animated png files.

archive
module arsd.archive

Provides LZMA (aka .xz), gzip (.gz) and .tar file read-only support. Combine to read .tar.xz and .tar.gz files, or use in conjunction with other libraries to read other kinds of files.

argon2
module arsd.argon2

My minimal interface to https://github.com/p-h-c/phc-winner-argon2

audio
module arsd.audio

Part of my old D1 game library along with arsd.screen and arsd.engine. Do not use in new projects.

blendish
module arsd.blendish

Blendish is a small collection of drawing functions for NanoVega, designed to replicate the look of the Blender 2.5+ User Interface. You can use these functions to theme your UI library. Several metric constants for faithful reproduction are also included.

bmp
module arsd.bmp

Basic .bmp file format implementation for arsd.color.MemoryImage. Compare with arsd.png basic functionality.

calendar
module arsd.calendar

OpenD could use automatic mixin to child class...

cgi
module arsd.cgi

Provides a uniform server-side API for CGI, FastCGI, SCGI, and HTTP web applications. Offers both lower- and higher- level api options among other common (optional) things like websocket and event source serving support, session management, and job scheduling.

characterencodings
module arsd.characterencodings

This is meant to help get data from the wild into utf8 strings so you can work with them easily inside D.

cidr
module arsd.cidr

Some helper functions for using CIDR format network ranges.

color
module arsd.color

Base module for working with colors and in-memory image pixmaps.

com
module arsd.com

Code for COM interop on Windows. You can use it to consume COM objects (including several objects from .net assemblies) and to create COM servers with a natural D interface.

comhelpers
module arsd.comhelpers

My old com helper code. I haven't used it for years.

core
module arsd.core
Please note: the api and behavior of this module is not externally stable at this time. See the documentation on specific functions for details.
csv
module arsd.csv

My old csv code. Extremely basic functionality.

curl
module arsd.curl

My old curl wrapper. Use arsd.http2 instead on newer projects, or std.net.curl in Phobos if you don't trust my homemade implementations :)

database
module arsd.database

Generic interface for RDBMS access. Use with one of the implementations in arsd.mysql, arsd.sqlite, arsd.postgres, or arsd.mssql. I'm sorry the docs are not good, but a little bit goes a long way:

database_generation
module arsd.database_generation

Helper functions for generating database stuff.

dbus
module arsd.dbus

A module mostly copied from https://github.com/trishume/ddbus to help access the C dbus library on Linux.

declarativeloader
module arsd.declarativeloader

A declarative file/stream loader/saver. You define structs with a handful of annotations, this read and writes them to/from files.

discord
module arsd.discord

Module for interacting with the Discord chat service. I use it to run a discord bot providing some slash commands.

dom
module arsd.dom

This is an html DOM implementation, started with cloning what the browser offers in Javascript, but going well beyond it in convenience.

email
module arsd.email

Create MIME emails with things like HTML, attachments, and send with convenience wrappers around std.net.curl's SMTP function, or read email from an mbox file.

engine
module arsd.engine

Part of my old D 1.0 game helper code that used SDL. I keep it compiling on new D compilers too, but it is not meant to be used in new projects.

english
module arsd.english

A few helper functions for manipulating English words. Extremely basic.

eventloop
module arsd.eventloop

My old event loop helper library for Linux. Not recommended for new projects.

exception
module arsd.exception
Undocumented in source.
fibersocket
module arsd.fibersocket

Fiber-based socket i/o built on Phobos' std.socket and Socket.select without any other dependencies.

game
module arsd.game

An add-on for simpledisplay.d, joystick.d, and simpleaudio.d that includes helper functions for writing simple games (and perhaps other multimedia programs). Whereas simpledisplay works with an event-driven framework, arsd.game always uses a consistent timer for updates.

gamehelpers
module arsd.gamehelpers

Note: much of the functionality of gamehelpers was moved to arsd.game on May 3, 2020. If you used that code, change import arsd.gamehelpers; to import arsd.game; and add game.d to your build (in addition to gamehelpers.d; the new game.d still imports this module) and you should be good to go.

gpio
module arsd.gpio

PRERELEASE EXPERIMENTAL MODULE / SUBJECT TO CHANGE WITHOUT WARNING / LIKELY TO CONTAIN BUGS

hmac
module arsd.hmac

Implementation of the HMAC algorithm. Do not use on new things because std.digest.hmac now exists in Phobos.

html
module arsd.html

This module includes functions to work with HTML and CSS in a more specialized manner than arsd.dom. Most of this is obsolete from my really old D web stuff, but there's still some useful stuff. View source before you decide to use it, as the implementations may suck more than you want to use.

htmltotext
module arsd.htmltotext

Converts HTML to plain text. Can also output VT escape sequences for terminal output.

htmlwidget
module arsd.htmlwidget

My old toy html widget build out of my libraries. Not great, you probably don't want to use it.

http
module arsd.http

OBSOLETE: Old version of my http implementation. Do not use this, instead use arsd.http2.

http2
module arsd.http2

This is version 2 of my http/1.1 client implementation.

ico
module arsd.ico

Load and save support for Windows .ico icon files. It also supports .cur files, but I've not actually tested them yet.

image
module arsd.image

This file imports all available image decoders in the arsd library, and provides convenient functions to load image regardless of it's format. Main functions: loadImageFromFile and loadImageFromMemory.

imageresize
module arsd.imageresize

Image resizing support for arsd.color.MemoryImage. Handles up and down scaling. See imageResize for the main function, all others are lower level if you need more control.

jni
module arsd.jni

Provides easy interoperability with Java code through JNI.

joystick
module arsd.joystick

Provides a polling-based API to use gamepads/joysticks on Linux and Windows.

jpeg
module arsd.jpeg

Loads a JPEG image from a memory buffer or a file.

jpg
module arsd.jpg

Reads a jpg header without reading the rest of the file. Use arsd.jpeg for an actual image loader if you need actual data, but this is kept around for times when you only care about basic info like image dimensions.

jsvar
module arsd.jsvar

jsvar provides a D type called var that works similarly to the same in Javascript.

libssh2
module arsd.libssh2

Minimal bindings for libssh2. (just what I needed for my terminal emulator, but I'd accept more, and even wrappers if you wanted to.)

mailserver
module arsd.mailserver

A bare-bones, dead simple incoming SMTP server with zero outbound mail support. Intended for applications that want to process inbound email on a VM or something.

mangle
module arsd.mangle

a D name mangler. You probably do not need this, use the language's built in .mangleof property instead. I don't even remember why I wrote it.

midi
module arsd.midi

This file is a port of some old C code I had for reading and writing .mid files. Not much docs, but viewing the source may be helpful.

midiplayer
module arsd.midiplayer

An add-on to arsd.simpleaudio that provides a MidiOutputThread that can play files from arsd.midi.

minigui
module arsd.minigui

minigui is a smallish GUI widget library, aiming to be on par with at least HTML4 forms and a few other expected gui components. It uses native controls on Windows and does its own thing on Linux (Mac is not currently supported but may be later, and should use native controls) to keep size down. The Linux appearance is similar to Windows 95 and avoids using images to maintain network efficiency on remote X connections, though you can customize that.

minigui_addons
module arsd.minigui_addons

This package consists of additional widgets for arsd.minigui.

minigui_xml
module arsd.minigui_xml

A small extension module to arsd.minigui that adds functions for creating widgets and windows from short XML descriptions.

mp3
module arsd.mp3

Port of the C library minimp3 to D, with an added high-level API in the form of MP3Decoder.

mssql
module arsd.mssql

Implementation of arsd.database.Database interface for Microsoft SQL Server, via ODBC.

mvd
module arsd.mvd

mvd stands for Multiple Virtual Dispatch. It lets you write functions that take any number of arguments of objects and match based on the dynamic type of each of them.

mysql
module arsd.mysql

Implementation of the arsd.database.Database interface for accessing MySQL (and MariaDB) databases. Uses the official MySQL client library, and thus needs that installed to compile and run.

nanovega
module arsd.nanovega

The NanoVega API is modeled loosely on HTML5 canvas API. If you know canvas, you're up to speed with NanoVega in no time.

nukedopl3
module arsd.nukedopl3

OPL3 (1990's midi chip) emulator.

oauth
module arsd.oauth

Implementations of OAuth 1.0 server and client. You probably don't need this anymore; I haven't used it for years.

pixmappaint
module arsd.pixmappaint

Pixmap image manipulation

pixmappresenter
module arsd.pixmappresenter

Pixmap Presenter is a high-level display library for one specific scenario: Blitting fully-rendered frames to the screen.

pixmaprecorder
module arsd.pixmaprecorder

Pixmap Recorder is an auxiliary library for rendering video files from Pixmap frames by piping them to FFmpeg.

png
module arsd.png

PNG file read and write. Leverages color.d's MemoryImage interfaces for interop.

postgres
module arsd.postgres

Uses libpq implement the arsd.database.Database interface.

qrcode
module arsd.qrcode

This is a port of the C code from https://www.nayuki.io/page/qr-code-generator-library

querygenerator
module arsd.querygenerator

Create SQL queries from string containing D expressions.

random
module arsd.random

A random number generator that can work with std.random but does not have to.

rpc
module arsd.rpc

I never finished this. The idea is to use CT reflection to make calling another process feel as simple as calling in-process objects. Will come eventually but no promises.

rss
module arsd.rss

RSS/Atom feed reading

rtud
module arsd.rtud

OBSOLETE: This provides a kind of real time updates that can be consumed by javascript (and probably other things eventually). Superseded by new functionality built into arsd.cgi.

screen
module arsd.screen

Part of my old D 1.0 game helper code that used SDL. I keep it compiling on new D compilers too, but it is not meant to be used in new projects.

script
module arsd.script

A small script interpreter that builds on arsd.jsvar to be easily embedded inside and to have has easy two-way interop with the host D program. The script language it implements is based on a hybrid of D and Javascript. The type the language uses is based directly on var from arsd.jsvar.

sha
module arsd.sha

Homemade SHA 1 and SHA 2 implementations. Beware of bugs - you should probably use std.digest instead. Kept more for historical curiosity than anything else.

simpleaudio
module arsd.simpleaudio

The purpose of this module is to provide audio functions for things like playback, capture, and volume on both Windows (via the mmsystem calls) and Linux (through ALSA).

simpledisplay
module arsd.simpledisplay

simpledisplay.d (often abbreviated to "sdpy") provides basic cross-platform GUI-related functionality, including creating windows, drawing on them, working with the clipboard, timers, OpenGL, and more. However, it does NOT provide high level GUI widgets. See my minigui.d, an extension to this module, for that functionality.

sqlite
module arsd.sqlite

SQLite implementation of the arsd.database.Database interface.

svg
module arsd.svg

NanoVega.SVG is a simple stupid SVG parser. The output of the parser is a list of drawing commands.

terminal
module arsd.terminal

Module for interacting with the user's terminal, including color output, cursor manipulation, and full-featured real-time mouse and keyboard input. Also includes high-level convenience methods, like Terminal.getline, which gives the user a line editor with history, completion, etc. See the examples.

terminalemulator
module arsd.terminalemulator

This is an extendible unix terminal emulator and some helper functions to help actually implement one.

textlayouter
module arsd.textlayouter

A homemade text layout and editing engine, designed for the needs of minigui's custom widgets to be good enough for me to use. May or may not work for you.

ttf
module arsd.ttf

TrueType Font rendering. Meant to be used with arsd.simpledisplay, but it doesn't actually require that. Port of stb_truetype plus D wrappers for convenience.

vorbis
module arsd.vorbis

Port of stb_vorbis to D. Provides .ogg audio file reading capabilities. See arsd.simpleaudio for code that can use this to actually load and play the file.

wav
module arsd.wav

Basic .wav file reading and writing.

web
module arsd.web

Old magic web wrapper - one of my first applications of CT reflection. Given a class of fairly ordinary D code, it automatically creates HTML pages and forms, a Javascript file to access the functions from the client, and JSON based api responses. I do not recommend it for new projects though, as a replacement is now built into arsd.cgi.

webtemplate
module arsd.webtemplate

This provides a kind of web template support, built on top of arsd.dom and arsd.script, in support of arsd.cgi.

webview
module arsd.webview

A web view wrapper. Uses CEF on Linux and WebView2 on Windows.

wmutil
module arsd.wmutil

Cross platform window manager utilities for interacting with other unknown windows on the OS.

xwindows
module arsd.xwindows

This module is obsolete. Its functionality has been merged into simpledisplay.d. You can use it instead and abandon this.

Detailed Description

Meta