One thing I didn’t like about Go’s default embed.FS mechanism is that it didn’t support pipelining processing operations on the files it embeds.
That’s why I created this assets package which allows you to add something like minification for static files, or possibly even an encryption step.
This is something a build system should be able to help with. I use Bazel to generate files that are then presented to the go compiler for embedding, but even tools like make, cmake, etc. should be able to do this. Neat to have an in-go package as well though!
I prefer my build pipeline to not depend on tools that have complicated setups. I’m using this package in a project that only uses make and a go compiler for all the steps.
Planning a blog post on this, but briefly:
Very similar to my setup, except:
Oh, and files named like 2020-01-31-Event-Name-001.RAW
CMake is even more horrifying than I thought, after several years of using it! (;,;) <- a Cthulu emoticon. The author does do a good job of capturing the way I feel about CMake, so +1.
I feel like I’m stuck with it, though. My project requires a systems level programming language. I chose C++ because of the library ecosystem: I depend on some unique, domain-specific libraries that are written in C++: no equivalents exist in other languages. And these other libraries are built using CMake.
Is there an alternative? I feel the same way about C++ that I do about CMake. For me, the alternative might be Rust + Cargo, rather than yet another C++ build system.
CMake made me realize I actually like autotools; though perhaps out of Stockholm syndrome.
Try Meson. It can even find dependencies using CMake!
Well, get ready to write C APIs to all your unique C++ libraries :)
(there’s Swig though I guess)
As to Rust, I’ve recently tried it in a hobby project, having a fairly long C++ background & love affair (which I left in panic, after eventually glimpsing the eldritch horrors lurking therein). My very subjective thoughts:
I was afraid to start experimenting with Rust because of learning curve and fear of struggling with borrow checker. What pushed me to try were two things: Rust 2018 edition (I have a feeling this is “The Actual Rust 1.0”), and some blog post I read which made me realize: “it’s totally OK, and you don’t need to feel bad, to just use heap/boxing if you struggle too much with borrow checker, esp. when learning; also even if you theoretically might lose some teeny bit of performance then, let’s be honest, you’re probably not even going to notice”. The Rust 2018 Edition was indeed what I thought it to be (it fixes a LOT of extreme frustrations you don’t even have to realize were there just a few months ago).
Compared to any C++ build systems, cargo is a bliss. At least for my simple app/library, it was 100% transparent and “out of the way”. The basic commands after cargo init are: cargo check, cargo test, cargo build, cargo fmt.
I didn’t read The Rust Book. I tried, but I found it too long and still too messy, unfortunately. So I finally decided to go with a hands-on/deep-dive approach, just trying to write an app. Against all recommendations, this worked for me.
But then, maybe because of no Rust Book reading, or maybe just because The Learning Curve, it was painful and a lot of teeth gnashing. But there are good parts there:
However, as of now, I’m starting to think I’m going to try something else for my app (in particular, Nim; but if not it, I’d probably stay with Rust). The not-so-good parts for me in this case were:
Some closing thoughts:
Bazel is great for C++ applications. I’ve rarely successfully integrated a third party library’s own CMake project into my own, so accepted rewriting it to make it work. Bazel (despite its flaws) makes that easy.
Meson looks promising for integrating into the wider OSS world
Doesn’t Bazel need a specific directory structure so it can work? Can it be used to write build systems for existing projects?
Not particularly. Basically you write rules in a BUILD file for a single directory (“package” in bazel terminology), and that refers to files in that dir or in subdirs if the subdirs don’t have their own BUILD files (rules). So failrly straightforward to wrap libraries.
Nice! Now I have a reason to try https://github.com/Lochnair/vyatta-wireguard on my EdgeRouter.
And now I’ve tried it. Just works. Pretty slick on both ends. Took me a moment to realise I need to specify the client IP on both ends, but after I did that the packets flowed.
I’ve been eyeing this for a while. I’ve been meaning to get a VPN set up for over a year now, but I’m becoming more and more allergic to complex software at home. On the other hand, WG has seemed like an endless beta to me. Maybe it’s time to give it a shot.
Weekly library run with my son, swimming, repairing a gas range igniter, and hopefully get out to do some photography.
Meaningful work to me means something that lets me challenge my skills, interact with good people, and do overall more good than harm to the world (human and natural).
My current and previous jobs have been deeply meaningful.
I currently work on autonomous vehicle software. I work with great people, am constantly challenged to deepen and expand my skills and knowledge, and I personally believe this is a place technology will improve and save human lives and decrease our stress on the environment. It is only “overall” improvement, because there will be a generation of displaced workers who will suffer, as there has been with most large economic shifts. We as a society, and I as an engineer, still don’t have an answer for them.
Previously I worked in a “personal robotics” research lab, where the goal was primarily assistive care robots and robotic arms for the people with disabilities. I found that work deeply meaningful on all counts as well.
Earlier jobs were much less meaningful. The companies were uninspiring and sometimes monopolistic, the work quickly became humdrum, and many coworkers would sooner throw you under a bus than help you, or simply did not care about the work they were doing. Like you, I realized I wasn’t satisfied.
I was able to move to more meaningful work because of three things:
I usually can’t speak about my work, but this week I’m giving a talk to a university robotics club about motion planning. Trying to do more talks in general.
I usually can’t speak about my work
I usually can’t speak about my work
Man, that sucks. I hope you’re keeping secrets for the right moral reasons. Too often people do unkind things when they have secrecy.
Could I get a link to your materials? I’ve been writing a blog series on control theory, so I’m curious to see how others teach somewhat similar topics.
Sure. I don’t have them collected yet, but I plan to provide a collection to the students so I’ll send it along.
This is important for hiring experienced developers from different fields, specialties, and language backgrounds as well. Hire good people and they will learn or can be taught your domain and technology. I just passed a year transitioning from enterprise development to robotics. I absolutely love it, and am providing a lot of value, and it’s all because someone gave me a chance.