Tux Machines
Posted by Roy Schestowitz on Aug 13, 2022
=> Arduino Projects: Nicla Vision and Snake Robot | Security Leftovers
=> ↺ The pervasive effects of C's malloc() and free() on C APIs
If this structure is dynamically allocated by gethostbyname() and returned to the caller, either you need an additional API function to free it or you have to commit to what fields in the structure have to be freed separately, and how (ie, this is part of the API). Having the caller free things is also not all that simple. Since this structure contains embedded pointers (including two that point to arrays of pointers), there could be quite a lot of things for the caller to call free() on (and in the right order).
This issue isn't unique to gethostbyname(); it affects any C API that wants to return (in a conceptual sense) anything more complicated than a basic type or a simple structure (even in old C, simple structures can be 'returned' by passing a pointer to the structure to the function, as is done in stat()). C offers no good solution to the problem; either you add one or more 'free' functions to your API (one per dynamically allocated structure you're returning), or you document and thus freeze the process for freeing what you return, or you do what BSD opted to in gethostbyname() and return a pointer to something static.
(Documenting what callers have to free implies that you can't later add extra fields to what you return unless they don't have to be freed separately.)
React, and other component-based JavaScript libraries have historically been used for web development – building a frontend site, whether it be statically generated or server-side rendering. But there's an interesting trend to reuse UI components in environments that have been generated by templates or by hand before.
=> ↺ Jussi Pakkanen: Making decision without all the information is tricky, a case study
In a recent blog post, Michal Catanzaro wrote about choosing proper configurations for your build, especially the buildtype attribute. As noted in the text, Meson's build type setup is not the greatest in the world., so I figured I'd write why that is, what would a better design look like and why we don't use that (and probably won't for the foreseeable future).
The concept of build types was copied almost directly from CMake. The main thing that they do is to set compiler flags like -g and -O2. Quite early in the development process of Meson I planned on adding top level options for debug info and optimization but the actual implementation for those was done much later. I copied the build types and flags almost directly except for build types RelWithDebInfo and Release. Having these two as separate build types did not make sense to me, because you always need debug info for releases. If you don't have it, you can't debug crash dumps coming from users. Thus I renamed them to debugoptimized and release.
So far so good, except there was one major piece of information I was missing. The word "debug" has two different meaning. On most platforms it means "debug info" but on Windows (or, specifically, with the MSVC toolchain) "debug" means a special build type that uses the "debug runtime" that has additional runtime checks that are useful during development. More info can be found e.g. here. This made the word "debug" doubly problematic. Not only do people on Windows want it to refer to the debug runtime but then some (but not all) people on Linux think that "debugoptimized" means that it should only be used during development. Originally that was not the case, it was supposed to mean "build a binary with the default optimizations and debug info". What I originally wanted was that distros would build packages with buildtype set to debugoptimized as opposed to living in the roaring 90s, passing a random collection of flags via CFLAGS and hoping for the best.
=> ↺ Feedback from @Tubsta, @Crosse3, Paul Traylor
I try hard to generate clean pages, feeds, and headers, even though I know almost nobody notices or cares. Messy source code has always existed, but I do miss the day when people took as much pride in how their stuff was presented under the covers as above.
=> ↺ Queueing Systems 2: Percentiles and Simulation
In response to the previous article on Markov chains to model queueing systems I received a lot of requests on how to compute percentiles.
I’m happy about that! More people need to realise that the upper percentiles is where it’s at. That’s what you need to know to evaluate most systems. The average is useful for things like capacity planning and resource allocation, but not to determine user experience.
As some of you guessed already, analytically figuring out percentiles for anything but a trivial queueing system is difficult.
=> ↺ Tencent Rhino-bird Open-source Training Program 2022 – SunEC sm2p256v1 Key Pairs Generation
=> ↺ My Summer of Bitcoin 2022 Project – CI for CADR | ↺ this person is connected to Microsoft | ↺ other such stuff
Before the Summer of Bitcoin project, Cryptoanarchy Debian Repo (CADR) lacked Continuous Integration (CI), which troubles the new coming contributors because setting up the developing environment can be complex. I finally successfully implemented the CI using GitHub Actions default runners. The CI can be triggered manually, or by sending PRs as well as pushing directly to the master branch.
=> ↺ Terraform Route53 And DNS Fun
In my previous article about terraform I moved my lambda and all related infrastructure to Terraform. I even tested things by destroying everything and then recreating it.
=> ↺ Migrating from WooCommerce to Shopify? - LinuxTechLab
WooCommerce is a free and open-source e-commerce plugin for WordPress with over 38 million downloads. Built to integrate seamlessly with WordPress, WooCommerce is the world’s most popular e-commerce solution that gives both store owners and developers complete control. Whether you’re selling your own products, or those of others, WooCommerce is the perfect platform.
WooCommerce was created in 2010 by three people: Jigar Shah (CEO), Mike Little (CTO) and Margot Schmorak (Lead Designer). It was originally designed as an add-on to Jigar Shah's online store called "WooThemes".
=> ↺ E45: Creating Resilient Applications with Temporal (pt 2) by Open Source Startup Podcast
Maxim Fateev is Co-Founder & CEO and Dominik Tornow is Principal Engineer at Temporal, the workflow platform for building resilient applications.
Temporal is the company centered on the open source orchestration engine Temporal which is a fork of the project Cadence first created at Uber. The Temporal project and company have seen tremendous interest and the cloud service for Temporal will be GA later this year.
The company is valued at $1.5B and raised from investors including Sequoia, Index, and Amplify.
In this episode, we discuss the origins of Temporal at Uber, use cases for their resilient workflow engine, how the company's messaging and positioning have evolved over the past year, and the company's upcoming developer experience conference Replay which will be in-person in Seattle from August 25 - 26.
=> ↺ Rubenerd: An obstinate port-forwarding router
I had reason to port forward through my home router’s NAT to our bhyve box this weekend. There are some updates to Minecraft and Plex, and I wanted to do my Sunday maintenance from a coffee shop over SSH, like a gentleman.
Before I left, I opened the requisite port and enabled the port forward on the router. I tested it from an external IP and… nothing. I rebooted it to confirm the setting was correct and had been committed… still nothing. OpenSSH dutifully timed out each time.
I was in a hurry and couldn’t be bothered doing a port scan or any further troubleshooting, so I opened a remote SSH tunnel to my external jump box and left.
You know the saying that the cobbler’s son walks barefoot? Well we use the crappy home router our ISP gave us when we moved; albeit one I keep regularly patched. Its Wi-Fi range is more than sufficient for our tiny apartment, and I haven’t ever been bothered to replace it because if it ain’t broke, don’t fix it. But the fact I couldn’t get a console up or even do basic troubleshooting in a pinch may be enough to convince me otherwise.
=> gemini.tuxmachines.org This content has been proxied by September (3851b).Proxy Information
text/gemini;lang=en-GB