jclay

Joined 10 years ago

Karma
376
Submissions
96
Member since
Dec 5
Founder @ meldstudio.co
View on Hacker News

Recent submissions

Comment · 5 months ago
It almost appears as if the code was minified. The variable names are short and formatting looks like it's written to minimize whitespace. Did it write it in this compact format all on it's own?
Comment · 8 months ago
Has anyone tackled this for Windows? WSL isn’t ideal when shipping a consumer app to a non-developer target audience since it requires some setup.
Comment · 11 months ago
I thought the macOS notarization process was annoying until we started shipping Windows releases.

It’s basically pay to play to get in the good graces of Windows Defender.

I think all-in it was over $1k upfront to get the various certs. The cert company has to do a pretty invasive verification process for both you and your company.

Then — you are required to use a hardware token to sign the releases. This effectively means we have one team member who can publish a release currently.

The cert company can lock your key as well for arbitrary reasons which prevents you from being able to make a release! Scary if the release you’re putting out is a security patch.

I’ll take the macOS ecosystem any day of the week.

Comment · 11 months ago
Exciting work! I’ve often wondered if an LLM with the right harness could restore and optimize an aging C/C++ codebase. It would be quite compelling to get an old game engine running again on a modern system.

I would expect most of these systems come with very carefully guarded access controls. It also strikes me as a uniquely difficult challenge to track down the decision maker who is willing to take the risk on revamping these systems (AI or not). Curious to hear more about what you’ve learned here.

Also curious to hear how LLMs perform on a language like COBOL that likely doesn’t have many quality samples in the training data.

Comment · 1 year ago
Comment · 1 year ago
This looks great. I would love something that can just incrementally ingest all of the unread messages across various platforms locally and give a summary about what needs a reply most urgently
Comment · 2 years ago
I find the Chromium codebase to be one of the best resources for learning large-scale, high quality modern C++ best practices. They stay on a bleeding edge toolchain: near tip of tree clang, lld and libc++ is used on all platforms. They stay pretty recent on c++ standards — they’re on C++20 for the last year or so.

I think they are also contributing a lot of the new libc++ hardening features that have been landing: https://libcxx.llvm.org/Hardening.html IIRC, production chrome ships with Extensive hardening.

They also roll out massive code changes via automated clang rewrites. Recent examples are replacing all raw pointer members with their raw_ptr wrappers that bring some additional safety. They also switched from absl::optional to std::optional in one swoop.

If you haven’t done it before, take a browse through //base sometime, it’s got a lot of well commented code to learn from. You’ll see they’re already using c++20 concepts and requires clauses in a number of places.

Comment · 2 years ago
I agree. Topics like “how is the lifetime of a QObject exposed to the QML engine managed?” lack coverage and clarity. On the surface it is simple, but in practice it’s an extremely complex topic that has been a source for many bugs in our medium to large QML desktop app.

We contribute upstream a bit and we had documentation updates to clarify the stability of pointers to QHash elements rejected. ¯\_(ツ)_/¯

Personally, we superbuild bleeding edge Qt with the source code in tree so that it’s trivial to go to definition and inspect behavior. Makes the experience substantially better.

Comment · 2 years ago
I'll also add that I was never able to get the instability to show up when running the classic stress testing tools: MemBench, Prime95, and Intel's own stability tests could all run for hours and pass.

There's something unique about the workload of ninja launching a bunch of clang processes that draws this out.

On my machine, a clean build of the llvm-project would consistently fail to complete, so that may be a reasonable workload to A/B test with if you're looking into this.

The user quoted above was running gentoo builds on specific p-cores to test various solutions, ultimately finding that the p-core limit was the only fix that yielded stability.

Comment · 2 years ago
I was seeing constant instability when running basically any large C++ build that was saturating all of the cores. I was getting odd clang segfaults indicating an AST was invalid, that would succeed on a re-run.

This was getting very frustrating, at various points I tried every other option online (including restoring bios to Intel Baseline settings), etc.

I came across Keean's investigations into the matter on the Intel forums:

> I think there is an easy solution for Intel, and that is to limit p-cores with both hyper-threads busy to 5.8GHz and allow cores with only one hyper-thread active to boost up to 5.9/6.2 they would then have a chip that matched advertised multi-core and single-thread performance, and would be stable without any specific power limits.

> I still think the real reason for this problem is that hyper-threading creates a hot-spot somewhere in the address arithmetic part of the core, and this was missed in the design of the chip. Had a thermal sensor been placed there the chip could throttle back the core ratio to remain stable automatically, or perhaps the transistors needed to be bigger for higher current - not sure that would solve the heat problem. Ultimately an extra pipeline stage might be needed, and this would be a problem, because it would slow down when only one hyper-thread is in use too. I wonder if this has something to do with why intel are getting rid hyper-threading in 15th gen?

From: https://community.intel.com/t5/Processors/14900ks-unstable/m...

Based on this, I set a P-Core limit to 5.8 in my bios and after several months of daily-use building Chromium I can say this machine is now completely stable.

If you're seeing instability on an i9 14900k or 13900k see the above forum post for more details, and try setting the all-core limit. I've now seen this fix instability in 3+ build machines we use so far.

Comment · 2 years ago
Comment · 2 years ago
I wrote about a small fraction of this, CFRunLoop: https://blog.meldstudio.co/macos-cfrunloop-internals-schedul...

libdispatch source code is an enlightening read for those interested in diving deeper into the C Runtime powering Swift concurrency.

Comment · 2 years ago
There’s a very minimal example using C++ interop in Qt’s test suite:

https://github.com/qt/qtdeclarative/tree/dev/tests/manual/he...

I’ve kicked around with the C++ interop a few times. Projects like Qt that use raw pointers extensively seem hard to expose. Ended up having to wrap Qt classes to model as a value type which was straight forward but it’s not nearly as seamless as the Objective-C++ experience

Comment · 2 years ago
We build meldstudio.co (a performance oriented desktop app) using Qt/QML and managed to entirely avoid Qt Creator. It’s like traveling back in time coming from a VS Code configured with clangd and LLDB debugger.

Really wish they would invest in getting QML LSP to a working state. It’s been in development for well over a year now and still not used by Qt Creator itself. qmlls is missing proper formatting support, syntax aware highlighting (although we paid a contributor to land this upstream over a year ago, the PR is still pending). It has unusable latency compared to other LSPs, the list goes on.

Comment · 3 years ago
This is the first in a series of posts I have planned about working with low-level run loop APIs provided by the CoreFoundation C library. I demonstrate how they can be used in a C++ app by building up some higher level abstractions and RAII wrappers.

The next post I have planned goes over how to use the CFRunLoop to post cross-thread tasks, and will include some benchmarks comparing with an alternative C++ lock-free SPSC task queue implementation.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton