Readit News logoReadit News
asguy commented on Scpptool – a tool to enforce a memory and data race safe subset of C++   github.com/duneroadrunner... · Posted by u/coffeeaddict1
asguy · 2 years ago
What's rust's C++ interop like?

Deleted Comment

asguy commented on Compile-time JSON deserialization in C++   medium.com/@abdulgh/compi... · Posted by u/dctwin
nikki93 · 2 years ago
I use this static reflection hack in C++ -- https://godbolt.org/z/enh8za4ja

You do have to tag struct fields with a macro, but you can attach contexpr-visitable attributes. There's also a static limit to how many reflectable fields you can have, all reflectable fields need to be at the front of the struct, and the struct needs to be an aggregate.

asguy · 2 years ago
Holy crap; that's pretty epic. Did you come up with that yourself?
asguy commented on As you learn Forth, it learns from you (1981)   jupiter-ace.co.uk/Forth_g... · Posted by u/hggh
nequo · 2 years ago
What are your main lessons from Forth for API design? Is it something you could summarize?
asguy · 2 years ago
There have been some great responses that cover the gist of it, but to add a couple more mundane specifics:

- Build up the thinnest abstraction that lets you express a solution in the problem domain.

- Allow the API user to express their intent, and not be focused on mechanics they don't need to understand to get the job done.

- Focus on getting the interfaces right before the implementation is perfect.

- A clean interface will allow you to make drastic changes to the implementation without the API consumer becoming aware.

asguy commented on As you learn Forth, it learns from you (1981)   jupiter-ace.co.uk/Forth_g... · Posted by u/hggh
asguy · 2 years ago
Programming Forth caused the most massive change in my programming mindset (the LSD of programming languages). Even more so than Lisp. Thinking of the rapid rise of the base language to the problem domain (i.e. it's a DSL construction kit) opened my eyes to how to design useful and extensible APIs.

https://thinking-forth.sourceforge.net is worth reading, even if you have no desire to ever program any Forth.

asguy commented on SPI Flash   trmm.net/SPI_flash/... · Posted by u/todsacerdoti
amelius · 2 years ago
Side question. Does anyone have a good method of attaching 4 wires (say for a programmer) to the middle of a board, preferably without soldering any connector on the board? (Edge connectors are too bulky and inconvenient).

I'm thinking of something that locks through a hole in the board and then pushes 4 pins onto 4 pads on the board.

asguy · 2 years ago
Something like a Tag Connect would work well, if you can spare the footprint space: https://www.tag-connect.com/product/tc2030-fp-footprint
asguy commented on Nitrogen dioxide exposure due to gas and propane combustion by U.S. stoves   science.org/doi/10.1126/s... · Posted by u/rntn
kemiller2002 · 2 years ago
Having used a plethora of stoves over my life, I can absolutely say I am convinced gas stoves are on their way out. I have not seen anything that an induction stove cannot do as well as a gas one. Even commercial establishments are switching to it. Will there be changes in how to use if effectively? Of course. That's to be expected. I can't see how the liability of an open flame won't outweigh changing.
asguy · 2 years ago
> I have not seen anything that an induction stove cannot do as well as a gas one.

Char peppers for peeling.

asguy commented on How Figma's databases team lived to tell the scale   figma.com/blog/how-figmas... · Posted by u/pinser98
nightpool · 2 years ago
Figma has millions of customers. The idea of having a Postgres pod for each one would be nearly impossible without completely overhauling their DB choice.
asguy · 2 years ago
Thousands of directories over thousands of installations? It’s not that far fetched.
asguy commented on The X Files – how Elon Musk's new rules allow hate to flourish   businesspost.ie/news/excl... · Posted by u/mindracer
pupppet · 2 years ago
> The real power of Community Notes is that anyone can get called out. Even Elon's own posts have gotten Community Notes a couple times.

And promptly pointed out how community notes are being gamed when this happens.

Call me crazy but I don’t think the guy who routinely converses with Nazis will be applying his “free speech absolutist” ideals uniformly.

asguy · 2 years ago
> the guy who routinely converses with Nazis

Elon routinely converses with Nazis? Which ones?

asguy commented on The X Files – how Elon Musk's new rules allow hate to flourish   businesspost.ie/news/excl... · Posted by u/mindracer
asguy · 2 years ago
This is exactly the problem. Have /you/ contemplated what would happen if you applied that reasoning to any other group (e.g. Jews, Blacks, Oracle employees)?

u/asguy

KarmaCake day699August 5, 2019View Original