I Wrote a High-Frequency Trading Platform in D
dlang.org
dlang.org
When I have strings on performance-critical paths, unless they’re too long for a good reason, I sometimes pad them with \0 and limiting them to 16- or 32-bytes length. This way I can pass strings in a vector register by value (i.e. __m128i or __m256i data type in C++), and they’re very efficient to deal with. For instance, comparing them for equality only takes two instructions, vpxor and vptest (_mm_xor_si128 and _mm_testz_si128 intrinsics for 16-byte vectors), that’s 3-4 cycles of latency, an order of magnitude better than comparing traditional C or C++ strings.
I don’t have any experience with dlang though, not sure how easy or hard to implement that in D.
https://github.com/dlang-community/awesome-d
If you insist dissecting existing code, the Hunt library is well commented and seems more approachable. It uses OOP and some templates.
Anyway D is a good language. It pays my bills.
You take from D what you bring. If you basically want to write C++ with nicer OOP you can, if you want to write heavy-metaprogramming functional code then you can as well.
The only thing I would say is that D is a language that does take a little programming experience to really appreciate.
> Woke companies
Having met people from most D companies I'm not sure I know what you mean.
'Woke' may be the wrong term, although that is a component. Initially, the idea of being 'woke' comes from The Matrix, where it's positive, meaning being clued in to what's really going on in the world; i.e. that everything is a lie and illusion. (The movie is highly symbolic of the times we're living in.) Recently however, the term has been hijacked, and is now used in reference to extremely toxic, divisive ideology, like 'critical race theory' to name one particular example, which I refuse to come even within a hundred miles of, as it's so corrosive. I'm not a goosestepper or Kool-aid drinker, of any flavor.
In reference to tech stacks, many of these companies use stacks that I just find completely repellant, like anything to do with Javascript, for example. As a C guy, I like to keep to the low level basics, and avoid all these big, heavy, bloated frameworks. That's why D is looking interesting, as I can stay at a lower level while avoiding the sometimes drudgery of C.
Truth be told, I'm not even a 'programmer' per se, if the word is taken to mean only doing that One Thing, as a specialist. I'm a polymath, and my fingers are in just about every pie. I feel just as comfortable rebuilding an automobile, or doing plumbing or electrical work, or any number of other things, besides just programming. (Specialists are ubiquitous these days, and they often look down on generalists who do more than Just One Thing, as if we are somehow inferior.)
Computing is what I have been doing for the longest; among other things I developed my own Linux 'distro' from scratch, which is lightweight, clean, and fast, even on old hardware. Right now I'm in the middle of switching it over to Musl Libc, and setting it up for cross compiling to x86-64, i686, and ARM.
Is your company still actively hiring right now? I see they have at least in the past been in search of technical writers to create documentation. Writing and breaking down technical things to explain them to other technical people or end users is one of my strong points. I've done that in the past as a satellite communications engineer. Seems like a job I'd really enjoy. I'm currently self employed in fertilizer sales, although COVID has wrecked my business; thus me kicking around the idea of applying somewhere.
I also dabble in stock and options trading BTW, although I'm not very good at it; that's what caught my eye on this article, since it's about D and HFT.
Symmetry is always looking for new talent. I'm not involved in hiring though.
Job listings are posted on the HN "who's hiring thread" regularly.