Better HN
topnewbestaskshowjobs
Log inSign up

SeanCline

24 karma · joined Jan 9, 2017 (9y ago) · 6 submissions

Submissions

comment 1y ago · link · parent

Specifically, you'll find his name in the C++ Standard Library headers. Microsoft licensed their standard library from Dinkumware. https://en.wikipedia.org/wiki/P._J._Plauger#Dinkumware

comment 2y ago · link · parent

  > not hobbyist home soldering friendly for custom board designs
I assume by home soldering friendly, you mean too small. I'll make a case for why this isn't a bad thing...

If it's difficult to solder a QFN package, then it will be equally difficult to solder the passives and flash it requires. Its price, availability, and good documentation make up for the package by creating an ecosystem of cheap boards hobbyists can use instead.

For example, I designed a keyboard around the Solder Party RP2040 Stamp (https://www.solder.party/docs/rp2040-stamp/). It integrated all the difficult components in a package that fit between the arrow keys and delete key.

comment 5y ago · link · parent

You're right that the FTL has some durability concerns which, in addition to performance, is why it's typically cached in DRAM. Older DRAM-less SSDs were unreliable in the long-term but that's been improving with the adoption of HMB, which lets the SSD controller carve out some system RAM to store FTL data.

comment 9y ago · link · parent

We use one in the office to monitor the Jenkins build status of our dev branch. https://github.com/SeanCline/build-indicator/

Hardware-wise, it's just a Pi and UnicornHat. I wanted to use off-the-shelf components since it's in an office environment with rather strict rules about what can be plugged into the wall.

comment 9y ago · link · parent

Well, that isn't a flaw in the implementation of value_ptr. The example, as provided, won't compile because the the copy constructor, assignment operator, and destructor are declared `= default` in the header. This causes any translation units that include value_ptr_example_pimpl.hpp to attempt to stamp out the default implementation, which does require knowing `sizeof(Foo::Pimpl)`.

Moving those methods to value_ptr_example_pimpl.cpp, just as you'd normally do for PIMPL makes the compiler happy.

This works for me in VS2017 but should work on any C++11 compliant compiler: https://gist.github.com/SeanCline/55d700d4fbf8cc1bdaeb44b547...

comment 9y ago · link · parent

The idea of a value_ptr is something that's been around in C++ for quite some time, now. It usually goes by the name clone_ptr or copy_ptr. (Googling for either will yield several implementations.)

Looking at the author's code on GitHub, this implementation seems decent.

One thing to note about this implementation is that it doesn't address the other big reason for doing dynamic allocations: polymorphic types. Value semantics are preserved so faithfully that objects are sliced just as they would be if they weren't dynamically allocated.

Consider this example: https://gist.github.com/SeanCline/c81218e4c0208ccb871268aecd...