D and AI / dub registry and AI
Laeeth Isharc
laeeth at nospam.laeeth.com
Fri Feb 20 16:33:09 UTC 2026
On Wednesday, 11 February 2026 at 09:10:25 UTC, Lars Johansson
wrote:
> I’m learning D, and as an experiment I asked Claude.ai to
> convert a C connector to SAP ERP system to D.
Very cool experiment.
Something which may be obvious or not is that many of the larger
coding models can be quite resourceful. So - without being told
- they will happily use gdb to debug segfaults when creating
bindings. Ask it if it missed anything out, and it might use nm
to inspect the libX.so and see if any exported dynamic library
functions were not wrapped. I haven't had much need to write
networking code, but presumably it takes away much of the pain
there too.
I think that quite quickly the availability of libraries for a
programming language start to become much less relevant to
decisions made about choices from a first-principles rather than
copying others perspective.
If you think about choice of language as an economic problem,
LLMs mean that the cost of porting over any library you don't
have in that language falls, but especially the chance that you
are in a mess that you can't solve collapses. Since many people
in corporations today are not part-owners of the business but
hired hands and that often leads to a maximin type
decision-making process then in time this might have some effect.
Probably languages like Ocaml and Rust benefit the most from this
change in cost, but it should help D at least a bit.
I think another change - not just driven by AI but everything
that's happened over the past decade (especially relating to
security) - is that the cost of having dependencies - especially
dependencies that you do not control or really understand -
rises. This happens at a time when the cost of rolling your own
has collapsed (especially if the original library has a
comprehensive test suite). At the margin, companies probably
will move more towards internalizing dependencies more than
before.
Inspired by Robert Schadek and his talk where he mentioned
'stealing' JS libraries, I ported an SVG charting library from
typescript to D. Pretty automated and at least to get basics
working not too many bugs to fix. (And it could compare the
results, look at the differences and fix the code itself).
When I started my career there were no libraries to speak of. If
you were doing a reconciliation then you had to write quicksort
yourself (unless your firm had a library already written).
People would use books like Numerical Recipes in C. In a way
that's what libraries become more than code that's taken
wholesale. Obviously, people _ought_ to respect licences, and I
hope they will.
I think enterprise vendors - especially in in finance - are going
to start to have interesting conversations with clients. The
default is that you eat what you get, and it's a very slow
process to incorporate new features or bug fixes - months and
maybe years. The cost structure has changed so much, that eg
with DLLs I think people will start to decompile them and patch
them - initially to fix bugs, and later to do much more. Vendors
won't like it, but ultimately they probably won't have much of a
choice
On a different note, it should be pretty easy now to do what had
been discussed some time back - to give dub projects a quality
score and to adopt the good ones that have been semi-abandoned up
to scratch.
More information about the Digitalmars-d
mailing list