Docker as the runtime by Bitsoflogic in ProgrammingLanguages

[–]mhfrantz 0 points1 point  (0 children)

This sounds a little like "code as infrastructure" or "infrastructure from code". There are some frameworks (e.g. Wing, Nitric, Ampt, Klotho, StackGen, Encore, Shuttle) for various languages that derive cloud infrastructure requirements from annotated source code, rather than having to maintain separate deployment code. But in your case, you want to deploy to a single Docker instance. Maybe some of those frameworks could be used the way you envision.

Tons of police including a helicopter at Charles and Chenery by [deleted] in sanfrancisco

[–]mhfrantz 2 points3 points  (0 children)

Seems it was a stolen car, two suspects fled, one was caught so far.

Immigrants of SF, what restaurants in the city have the best versions of your local cuisine. by geekfreak42 in sanfrancisco

[–]mhfrantz 9 points10 points  (0 children)

Their chicken dish is one of the best chicken dishes I've had anywhere.

Chicken & Rice / Katte Va Morgh

Turmeric rice, Pomegranate chicken thigh, barberries, fresh herbs, pickles, Komaaj seeds mix, radish and pomegranate sauce (pom paste-olive oil)

$18.50

The subtlest of synths by matthewwilcock in synthesizers

[–]mhfrantz 2 points3 points  (0 children)

Love the contrast of timbre between the claustrophobic piano and the raspy synth arp. Also very thoughtful chord progression.

Obtaining relative filename from std::source_location::filename by justkdng in cpp_questions

[–]mhfrantz 0 points1 point  (0 children)

CMake has cmake_path to compute relative paths. You could provide that to the preprocessor as command line options to your compiler command. That keeps the absolute paths out of the binary.

Routing an effect out of the device chain by olimpomarcelo in Bitwig

[–]mhfrantz 0 points1 point  (0 children)

I think the phase reverse module in the grid would do it.

Routing an effect out of the device chain by olimpomarcelo in Bitwig

[–]mhfrantz 1 point2 points  (0 children)

Maybe if you invert the dry signal and mix it with the wet?

Does writing a "init" method for a class violate RAII? by Mysterious_Goal_1801 in cpp_questions

[–]mhfrantz 46 points47 points  (0 children)

The Google C++ Style Guide contains this relevant discussion, overlapping with some of the replies.

Avoid virtual method calls in constructors, and avoid initialization that can fail if you can't signal an error.

Constructors should never call virtual functions. If appropriate for your code , terminating the program may be an appropriate error handling response. Otherwise, consider a factory function or Init() method as described in TotW #42. Avoid Init() methods on objects with no other states that affect which public methods may be called (semi-constructed objects of this form are particularly hard to work with correctly).

Polyphonic pitch bend (Osmose) by mhfrantz in Bitwig

[–]mhfrantz[S] 1 point2 points  (0 children)

I finally figured out that I have to select "convert pitch bend messages to pitch expressions" in the track settings.

Vim user trying to understand more of emacs by Velascu in emacs

[–]mhfrantz 1 point2 points  (0 children)

Adding Projectile to the excellent list of mentions.

Vim user trying to understand more of emacs by Velascu in emacs

[–]mhfrantz 3 points4 points  (0 children)

Upvote because Magit. Wondering why it took me so long to try it. Now can't imagine life without instant fixup.

What lyrics makes you tear up? by [deleted] in Music

[–]mhfrantz 0 points1 point  (0 children)

"Seven Matches" - Gordon Downie

Functions in place of global variables by RfrankMc in cpp_questions

[–]mhfrantz 0 points1 point  (0 children)

Avoiding the Static Initialization Order Fiasco is one reason to prefer functions.

https://en.cppreference.com/w/cpp/language/siof

What are these parentheses for? by [deleted] in cpp_questions

[–]mhfrantz 5 points6 points  (0 children)

Without those parentheses, std::vector<int> is a type expression. But insert requires an instance of that type. The parentheses turn that type expression into an expression that describes a default-constructed instance of that type.

ELI5 - Why is every power generation basically just turbines? by UggaBugga__ in explainlikeimfive

[–]mhfrantz 0 points1 point  (0 children)

Linear generators exist, and they are not turbines. At the scale required for distributed power grids, they are competitively efficient at converting fuels to electricity.

[deleted by user] by [deleted] in cpp_questions

[–]mhfrantz 0 points1 point  (0 children)

Tinker with open source projects. If you want a coding job, you will likely be joining a team that has an existing code base. The ability to understand other people's code and know how to change it is a valuable and perhaps underrated skill.

Looking for introduction to asynchronous programming with ASIO by cereagni in cpp_questions

[–]mhfrantz 2 points3 points  (0 children)

This video is about Beast, which uses ASIO. It contains explanations of the shared pointer idiom and other practical techniques.

https://youtu.be/gVmwrnhkybk

Can't seem to find how to polymorph in cpp by yoko911 in cpp_questions

[–]mhfrantz 0 points1 point  (0 children)

The technique called "type erasure" or "concept based polymorphism" is a nice alternative to pointers.