What kinds of Software do you create in D.
H. S. Teoh
hsteoh at quickfur.ath.cx
Mon Nov 1 21:51:31 UTC 2021
On Mon, Nov 01, 2021 at 08:33:22PM +0000, harakim via Digitalmars-d wrote:
> On Monday, 1 November 2021 at 20:32:04 UTC, harakim wrote:
> > On Saturday, 30 October 2021 at 01:48:25 UTC, harakim wrote:
> > > I'm curious: Is there a poll somewhere that asks what kind of
> > > software projects people write in D? If not, what does everyone
> > > write using the D Language?
> >
> > This is definitely not a research-journal-worth analysis but I quickly
> > went through and summarized the usages in this thread
> >
> > Developer Tools: 7
> > Productivity Tools: 6
> > Multimedia Desktop Applications: 3
> > Other Desktop Apps: 3
> > Games: 3
> > Data Processing (including signals and bioinformatics): 3
> > Web Development: 2
> > Embedded Development : 2
>
> I made a correction.
Late to this, but I use D for a wide variety of purposes (all personal,
unfortunately -- currently I'm unable to use D at work for various
reasons). Here are some of the projects I've used it for:
CLI:
- As a sophisticated substitute for shell scripts (i.e., anything that
requires more than simple if-then-else shell scripts, D is much more
suitable, thanks to proper typing, arrays, an awesome std.process,
etc..). Various convenience wrappers around backup programs like tar
and rsync, etc..
- A scheduling program for assigning people to slots in recurring
events on a rotational basis.
- A simple CLI-based TODO list manager.
- A replacement for the BSD `cal` program that I recently started using
exclusively (see: https://github.com/quickfur/dcal )
Math-related:
- A geometric calculator for computing convex hulls and other geometric
operations, for exploration of higher-dimensional geometry and
generating visualizations, containing:
- A not-bad double-description convex hull implementation written
entirely in D;
- A D implementation of Kaibel's algorithm for face lattice
enumeration from vertex incidences;
- A wrapper around the MPFR arbitrary-precision floating point
library;
- A fit-to-grid algebraic number identifier / guesser;
- A permutation factorization utility (for identifying permutation
sets given a set of n-dimensional points);
- An external test utility (as a complement to built-in unittests;
this one uses std.process's awesome convenient API for running
canned tests on user-specified command-lines, and Phobos' awesome
Levenshtein distance algorithm for reporting unexpected outputs in
a minimal way).
- A math exploration tool for rendering images of 2D equations that can
handle arbitrary equations in 2 variables. Does both PNG output and
on-the-spot OpenGL rendition. Contains a minimal wrapper around
libfreetype for font rendering.
- A Gröbner basis solver (toy version only, though; I lack the skill to
write an industrial-strength one).
- A simple Monte Carlo springs-and-sticks model solver.
- A library for performing exact computations with quadratic irrationals
(see: https://github.com/quickfur/qrat )
- Various ad hoc solvers for various geometric problems, counting
problems, etc..
Music:
- A management program for automating the generation of boilerplate for
large music typesetting projects in Lilypond.
- A program for dissecting midi files (incomplete).
Web:
- A CGI utility for generating HTML interlinears given text input.
- Various maintenance utilities for managing a website and scripted
generation of content updates.
Casual games:
- An experimental GLES2 Android game (incomplete) with an on-PC X11 test
harness. Contains D utilities for auto-generation of GLES boilerplate
plus the associated D-facing interfaces.
- Various casual text-based games (incomplete; basically they only get
worked on when I have spare time, which I have rather little of),
which use an ECS-like object storage system and a minimalistic
serialization / deserialization module (both with super nice APIs
thanks for D's compile-time introspection).
- A game simulation program for generating 2D terrains with some degree
of realism by simulating wind/water erosion over a 2D grid.
- Various puzzle game solvers (sliding block puzzles, etc.).
- A terminal output recorder / replayer for programs that use Adam
Ruppe's arsd.terminal for output. (Basically, for recording and
replaying terminal-based game playthroughs.)
//
Basically, anything that needs programming to solve, I reach for D.
Except perhaps for trivial (<10-15 line) shell scripts, which are still
easier to write in shell than in D. But anything more complex than
trivial shell scripts, I reach for D for better expressivity and
control. (The shell's promiscuous tendency to expand variables in
strings everywhere it's not wanted is extremely frustrating; I prefer
D's much cleaner syntax and predictable semantics.)
T
--
Insanity is doing the same thing over and over again and expecting different results.
More information about the Digitalmars-d
mailing list