D Project Updates

This website is meant to be something between a chat and a blog post. You talk about stuff you are doing without the expected effort of a blog post, but also without the expected real-time answer of a chatroom.

Just write a few words (or more if you feel like it) about what you are doing or thinking about doing with D! Don't worry if you talk about something that goes nowhere, this is just a brainstream from the D community.


Post your own update

You will be automatically logged in if already registered, or automatically registered if not.

The registration is just to help search and to give you edit and me a bit of spam control. You should just use a random password you don't mind losing if it leaks; this website is probably not secure. Let your browser remember it for convenience.

The email address is not currently used but might be later for emailed updates or something. Totally optional.

D Programming Language. Put those words in the following box to pass my primitive captcha.

Recent updates

Adam D. Ruppe 2020-11-03 14:41:09.920337-05

Declarative gui in D: http://dpldocs.info/this-week-in-d/Blog.Posted_2020_11_02.html

0 comments
Adam D. Ruppe 2020-10-21 17:14:34.042115-04

http://dpldocs.info/this-week-in-d/Blog.Posted_2020_10_19.html
I'm on the DConf Online 2020 schedule! Here, I'll give some behind-the-scenes preview on what I plan to talk about.

0 comments
Adam D. Ruppe 2020-10-21 17:14:06.918427-04

Off topic jrpg video game review
http://dpldocs.info/this-week-in-d/Blog.Posted_2020_10_12.html

0 comments
ttk 2020-10-10 23:42:22.202683-04

I thought Python was bad about burdening sleep() with boilerplate, but D's core.thread.Thread.sleep() takes the cake ;-)

Wrote a wrapper function to make it more like Perl's Time::HiRes sleep:

void sleep(double seconds) {
long usec = roundTo!long(1000000 * seconds);
if (usec <= 0) return;
core.thread.Thread.sleep(usec.usecs);
}

12 comments
Adam D. Ruppe 2020-10-05 23:06:43.977084-04

On breakage and versioning:

http://dpldocs.info/this-week-in-d/Blog.Posted_2020_10_05.html

2 comments
Adam D. Ruppe 2020-10-04 12:35:58.129797-04

Finally had the chance to write up my long-form blog showing how the terminal.d stdout thing was implemented

http://dpldocs.info/this-week-in-d/Blog.Posted_2020_09_28.html

0 comments
Adam D. Ruppe 2020-10-02 23:34:15.085113-04

terminal.d is gaining the ability to hijack `stdout`. Especially useful for Windows GUI applications who might want to writeln but don't want it to throw invalid file descriptor.

0 comments
Adam D. Ruppe 2020-09-26 22:57:26.280243-04

And in just one hour of code time, I fixed the evented backend for cgi.d's thread mode... and indeed it corrects the 99th percentile problem in the benchmark, even without distributing the workload across its threads yet!

Requests per second: 13657.25 [#/sec] (mean)
100% 35 (longest request)

That was kinda easy!

4 comments
Adam D. Ruppe 2020-09-26 15:17:57.745492-04

On my computer now, cgi's default main impl now looks like this:

void cgiMainImpl(alias fun, CustomCgi = Cgi, long maxContentLength = defaultMaxContentLength)(string[] args)
if(is(CustomCgi : Cgi)) {
        if(tryAddonServers(args))
                return;

        if(trySimulatedRequest!(fun, CustomCgi)(args))
                return;

        RequestServer server;
        // you can change the port here if you like
        // server.listeningPort = 9000;

        // then call this to let the command line args override your default
        server.configureFromCommandLine(args);

        // and serve the request(s).
        server.serve!(fun, CustomCgi, maxContentLength)();
}

Been refactoring so people can pick and choose their own mains more than before.

0 comments
dylan_g0 2020-09-26 14:18:02.21203-04

Hi. I've been using D (asBetterC) in an automotive environment. At the moment, I'm using it to control a GM 6 speed automatic gearbox and emulate some functionality of the outgoing gearbox. D's fluid interfacing to C, GDB support, and its easy to use metaprogramming features have made using it incredibly productive compared to C or C++, far more expressive and infinitely more enjoyable.

My customers are more rev heads and car enthusiasts, so this is a niche product that gets installed in some swift and exciting cars.

In the future, I will be using D to control hydrogen-powered engines, meaning that D will be used for an entire car's powertrain.

Here are some really old videos on the previous iteration of hardware. I don't have anything newer since the Victorian lockdown means I can't go out.
[1] https://youtu.be/dwqyCGmvRq8
[2] https://youtu.be/tyRuq3pgebI

This is the new hardware: https://imgur.com/a/FMKxOij
This is controller display (powered by D) for the transmission: https://imgur.com/a/dbdo0zf
This running the D powered transmission controller's hardware test routines: https://imgur.com/a/LOB0BHV
Here's the electronics D controls: https://imgur.com/a/RBi6v6A
A mess: https://imgur.com/a/JdqXlbr

All in all, I found D to great for use in the automotive world. The tuning software for my transmission controller is also written in D. As my business grows, so will my use of D. I have donated to the foundation and I'm excited for D's future.

1 comment
Lance Bachmeier 2020-09-26 10:59:49.012924-04

Not a project really, but I'm working on lectures to show grad students how they can incorporate D into their research when they need speed. No, I'm not going to use Rust.

1 comment
Adam D. Ruppe 2020-09-25 23:26:28.979871-04

Baby finally let me blog some musings about cgi.d's showing in that http benchmark. It did better than I expected in one place, about as poorly as I expected in another - but that poor performance got me thinking about why, then I think I realized a solution that isn't that hard. Just gotta find time to code it up and see if it works as well in computer as it does in my head.

http://dpldocs.info/this-week-in-d/Blog.Posted_2020_09_21.html

0 comments
CrazyPython 2020-09-25 22:18:54.635181-04

I made a rudimentary Python AST -> D converter.
It handles Python's dynamic typing with std.variant.
And it handles Python's static typing using D types.
It was fun to make.

0 comments
spoofer3 2020-09-16 21:23:19.495142-04

I had several itches to scratch. Play with Forth, Pandoc, github user pages, etc. Adam's numbers code inspired me.
https://samaxe.github.io/puzzle15.html

1 comment
Adam D. Ruppe 2020-09-15 22:23:13.997651-04

And my minesweeper on webassembly too: http://webassembly.arsdnet.net/minesweeper and with it came mouse support. These simple games are pretty easy to run on it now.

0 comments
Adam D. Ruppe 2020-09-15 14:40:09.132626-04

New webassembly program! The 15 puzzle number sliding game: http://webassembly.arsdnet.net/number

Took me just a few minutes to port over since it uses most the same functions as the tetris game.

0 comments
Adam D. Ruppe 2020-09-14 12:50:28.209431-04

I'm finally in the process of refactoring cgi.d's api to make it work not only with string[] args, but a config struct as well.

0 comments
CrazyPython 2020-09-12 10:53:23.88731-04

Getting new users for Dwidder.

Currently the link to Dwidder is deeply linked in a forum post.

Announcements and D Twitter could be places to post Dwidder at.

2 comments
CrazyPython 2020-09-12 10:28:11.244729-04

I made a userstyle for D Forums which uses a quattrospace font, which is a balance between monospace fonts (good for close reading) and variable width fonts (good for reading quickly).

Screenshots and code at:
https://userstyles.org/styles/189300/ia-writer-quattro

Let me know if you use it.

0 comments
Adam D. Ruppe 2020-09-11 23:31:03.117999-04

What I'm considering for the next draft of the tuple interpolation dip:

/++
        The interpolation spec is represented by a value of a unique type with a compile-time accessible property, `strings`, that lists all the string-literal parts of the
        interpolation spec. This list has a property `.length` and can be indexed with the [] operator. All elements are of type `string`.

        It is guaranteed that `strings.length == args.length + 1`. Exactly one arg goes after each string, except the last.

        n.b.: if we add support for wstring and dstring, then those will be the types of `strings[x]`.
+/
struct InterpList(Strings...) {
        alias strings = Strings;
}

struct InterpObject(strings, Args...) {
        Args args;
        this(Args args) {
                this.args = args;
        }

        string toString() {
                return idup(strings(), args);
        }

        alias toString this;
}

/++
        isInterpList is a guaranteed public symbol given by `core.interpolation`.

        n.b.: if we add support for wstring and dstring, its second parameter would be used to
        specify which kind we want to use. Passing `void` will allow any.
        (we may remove this if not concerned about forward compat)
+/
template isInterpList(I, ElementType = string) {
        static if(is(I == InterpList!T, T...))
                enum isInterpList = is(ElementType == void) || is(typeof(T[0]) == ElementType);
        else
                enum isInterpList = false;
}


auto idup(InterpList, Args...)(InterpList interp, Args args, char[] buffer = null) if(isInterpList!InterpList) {
        // implementation note: without the format strings of the old version,
        // we need not pull Phobos anymore for most cases. easy to do quite a few types in druntime.
        import std.conv;
        string ret;
        foreach(idx, arg; args) {
                ret ~= interp.strings[idx];
                ret ~= to!string(arg);
        }
        ret ~= interp.strings[args.length];
        return ret;
}

void main() {
        import std.stdio;
        import std.string;
        // writeln(idup(i"hello ${"my"} ${"friend"}")) would translate to this:
        writeln(idup(InterpList!("hello ", " ", "")(), "my", "friend"));
        writeln(replace(InterpObject!(InterpList!("hello ", " ", ""), string, string)("my", "friend"), "friend", "enemy"));
}

4 comments
CrazyPython 2020-09-11 10:51:02.312901-04

I submitted my talk proposal on JavaScript's fast compilation and some thoughts on how Dlang can learn from it. EEK! So cringe. Would appreciate help on how to give a talk. I wish the talk was live, so I could ask questions like "Raise your hand, how many of you think Node.js is a horrible and slow programming language?" then sit to correct misconceptions.

4 comments
Jacob Carlborg 2020-09-10 11:23:29.794074-04

I'm currently working on implementing support for Objective-C protocols. Most of it is implemented, just finishing up a few final things.

4 comments
ttk 2020-09-10 01:02:31.866008-04

I'm still a D newbie, and don't get to practice it as much as I'd like, but have really enjoyed acquainting myself with it so far. I originally sought D to find a happy middle ground between my two favorite languages: C (highly performant) and Perl (highly expressive, comparable to Python). I've been thinking more recently that I'd like to make D my go-to language instead of Perl.

To get from here to there, I'll need to learn D better, and close the practical expressiveness gap between it and Perl. Fortunately Adam's arsd repo already implements some of the things I'd need for that -- arsd.jsvar, arsd.cgi, etc

Beyond that, there are about a dozen other modules I'll want to port over, add regular expressions to arsd.jsvar, and maybe write something that makes for convenient functionality equivalent to perl's bash-like builtins.

Beyond that, I also want to port my "select" ETL utility from Perl to D. It needs a performance boost, and could benefit tremendously from D's multithreading support (Perl kind of sucks for threads). http://ciar.org/ttk/codecloset/select/

I have some open-source projects, but "select" is the only one with any users to speak of (besides myself). It is in dire need of a redesign, having started life as a throwaway script and evolved organically into the highly useful monstrosity it is today. Perl has the features that makes implementing it easy, but not performant. C would be fast and allow use of pthreads, but implementing it in C proved too painful. Hopefully D will prove the best of both worlds.

6 comments
ThisIsNotSpencer 2020-09-09 21:32:11.719599-04

I'm Not Sure.

0 comments
ponce 2020-09-09 10:21:02.634735-04

Started work on ARM support for intel-intrinsics: https://github.com/AuburnSounds/intel-intrinsics/issues/45

0 comments
Adam D. Ruppe 2020-09-08 20:14:50.564504-04

Making of this website on my blog:

http://dpldocs.info/this-week-in-d/Blog.Posted_2020_09_07.html#my-d-updates-website

0 comments
Steven Schveighoffer 2020-09-08 12:57:59.066483-04

Working on an SQL builder. Essentially, to make it so I don't have to build SQL when the damn compiler already knows enough to build it for me. An example usage:

   auto ds = DataSet!SomeRow
   auto query = select(ds, ds.otherset) // otherset defined declaratively
      .where(ds.id, " = " id.param)
      .orderBy(ds.otherset.date);
   foreach(somerow, otherrow; connection.fetch(query))
   {
      writeln("somerow: ", somerow, " otherrow: ", otherrow);
   }

in that code sample, somerow is typed as SomeRow, and otherrow is a relation that is declared inside SomeRow, and is typed as that relationship's row type.

I have this working with mysql-native, and intend for it to work for any SQL-based system, just by importing the right dialect (current targets are PostgreSQL and SQLite).

I have inserts, updates, and deletes working too. There is also the potential to define more complex table relationships, but haven't got that far yet.

3 comments
aberba 2020-09-08 11:16:52.027914-04

Hello, working on validation library for web development called nnipa on dub. More validation functions will be added. Pull requests are welcomed

1 comment
Adam D. Ruppe 2020-09-08 10:11:41.221958-04

Adding overload resolution to script.d broke tons of code. ugh.

0 comments
CrazyPython 2020-09-08 10:01:37.713582-04

I'm working on a talk proposal, but I observe that the rest of my life is pretty demanding, so I feel stressed to get the proposal right without the rest of my life for the proposal or vice versa.

1 comment
Next Page