What are you doing this week? Feel free to share!
Keep in mind it’s OK to do nothing at all, too.
My plan is to finish writing a program to parse the XML configuration file from my pfSense router and in turn generate config files for OpenBSD (dhcpd.conf, hostname.if, unbound.conf, dns zones, etc). First few lines of code were written in Python, so I’ll most likely just build on that.
So after this you’ll have the ability to snap the pfsense UI on top of openbsd?
At least in your use case, which is a start.
Not what I was planning on doing exactly, just wanted to eliminate the manual task of moving over static DHCP leases and the local DNS zone for my LAN.
Oh you don’t need to finish the project in that direction.
But you’ll have started something which someone else could take in that direction.
Ah, yes, agreed!
I am working on my Comparison Chart of Ada, C++ and Rust. The Rust segment is pretty empty, and I need to add generics and concurrency types for Ada, the Ada Sum Type example is incomplete (it should include a discriminated record definition), I need to fix some formatting issues, and there’s some other typos and such.
It has been a long time since I’ve done anything in Ada. Can you name your top 2 or 3 things you feel that Ada still provides where Rust falls short?
As an aside, I’m forever in favor of := for assignment.
If you haven’t tried Ada 2012, I’d recommend you try it, its a monstrous step up over Ada 2005.
Rust feels like a Haskell version of safer C++.
Ada feels like a Pascal version of a simpler and safer C++.
The language feels very flat and conceptually uniform. You just get types and subprograms (functions/procedures) and you group your library code into syntactic units called packages. This means no class functions, static functions, free functions or associated types, related things are just in the same package and function overloading works with the type system and constraints on types to determine what gets called.
OOP is there if you want it, but multiple concrete parents are forbidden and “member functions” (methods) just look like normal subprograms with the first set of parameters being like “self”, with virtual functions using a “class-wide” parameter.
Generics can operate at the package (module) level, and can have requirements (e.g. “provide a function which I’ll call foo which takes two of generic type X”, “give me an integer type”) so ML-style signatures just naturally arise out of how generics work with how packages normally work. Generics also require explicit instantiation to a type name, so this means no .template or ::<> turbofish, and makes the costs of monomorphism explicit.
(I’m not saying Rust isn’t about correctness, or that it’s hard to write correct code in Rust–it’s not, it’s just that it doesn’t have some of these checks). Built-in preconditions/post-conditions, use-defined checks which automatically inject into code where types are used (type invariants and subtype predicates), ranges on values, access types (similar to pointers) are also themselves typed, do some lifetime checks, have their own run-time checks for validity and allocate from their own storage pools, and a more direct form of creating semantic versions of the same type (e.g. “Don’t let me assign meters to joules.”) in addition to it not allowing implicit float <-> int conversions. There’s also compiler pragmas for large-scale behavior like, “Ensure this package is entirely stateless.” With all of these controls I find Ada programs hard to get wrong.
Not everything is peachy, Ada is super opinionated on how it wants you to write code. You’ll code will end up much more verbose if you’re fighting the language.
Thanks for the detailed reply. That last comment really caught my eye - “ensure this package is entirely stateless.” I am a little curious about how Ada provides all these options without being overwhelming or forcing too much ceremony. I’ll have to take a look at some code.
Ada is a really deep language, but layered very flatly, in a way you can avoid many features unless and until you want to use them.
Aspects make this stuff built-in and compiler checked, many are still done (especially in older library code) with one line pragmas though. They can be applied to packages and also used for attributes of functions like “inline”, “preconditions/post-conditions”, making types as being able to be indexed (think operator in C++), and providing implicit deferencing (think operator* or operator-> in C++). This reduces specialized syntax.
Packages contain code, and Pure is an aspect (it originated as a pragma) you can attach aspects to packages in Ada 2012. Since Ada uses real dependency tracking, rather than a #include with preprocessor, verifying a package doesn’t use another impure package and is stateless itself just looks like:
Writing a conference talk that I’m supposed to give next week.
I, uhhh, procrastinated a bit. :(
Good luck :)
You’re starting one week ahead? That’s like crazy early! :o)
(I’m notorious for pulling all nighters to get them ready in time)
Don’t we all?
It takes a while to make some sick memes with pictures I can 100% say I either own or are totally free for use. ;)
Can confirm I still was finishing up slides and rehearsing an hour before. ;)
Starting to work towards migrating our two large single page apps to old school server rendered web apps.
Server rendered is old school now? Pfft, I’m old.
It was once the only way to do web apps, so if that’s not old-school, what could be?
Well, if you were not born yesterday, then anything about web design you know is outdated.
Me and my partner took this week off and will spend a lot of time just handling grown up stuff. Changing car tires, dentist appointments and so on. For the time between I planned to spend some hours working on a PWA for a friends business.
What’s the new job?
Geospatial Data Analyst in an start up specialized in Health Information Systems called Bluesquare. It is the crossover of my previous jobs and on paper the perfect next job I wanted to consolidate my experience and really grow. Pretty excited by it to be honest!
Writing a home dashboard to include things like lights status, weather, next bin day, whether the fish have been fed, etc.
Edit: also I low-key have a new job (not many folks at work know yet) within the same company but different area. Lots of big data tech to look at and learn so probably trying to pick up what I can.
Writing a home dashboard to include things like lights status, weather, next bin day, whether the fish have been fed, etc.
I’m very interested in how you get on with this. I’ve been coding/designing ‘home dashboard’ things recently :)
It’s here for now, putting some auth in front of tomorrow probably and will share my code at some point. It’s written in Go which has libraries for interfacing with the IKEA hub I’m about to get, and the TP-LINK stuff I already have.
This looks awesome. Very similar to what I envisioned for our house!
Please do ping me a reply when it goes open source.
For funsies: Joined the local hackerspace (which is amazingly open in the pandemic), and ordered a bunch of stuff from Amazon. Planning to build “mothra” - a scaled-up version of my robotic butterfly jewelry prototype.
Prototype is close-ish to life-size(ish). And a bugger to work with because it’s fiddly. Mothra is a scaled up version for testing and development. Planning to 3D print some geared wing struts (CNCed in brass once perfected) and finally understand LiPo battery charge and discharge a bit better (hopefully without too many burns)
Work-wise: Help the team fix up all of our docs and examples at Jina, as well as the usual developer-relations stuff
Holiday week for me.
Had my eye on Fly for a while, but not used it yet. Would be interested in your thoughts once complete
Yep, I am planning a write up on the why and how. I have already brought a copy of my production database over (it’s tiny still - hence this is time to move if it was going to move) and brought an instance of my app up on it which was pretty simple and straight forward to get running. I’ve seen it descibed as a less black-boxy heroku and I would agree with that.
What is Fly? I tried googling “fly web host” but couldn’t find anything.
Ah, sorry I missed this! https://fly.io/ a less black boxy heroku PaaS (I am tending to think about it as a hosted Hashicorp stack though)
No worries! Ah interesting, thanks!
Gonna try to hack the Gibson :-)
It’s one of those weeks…
A mini-project from a week or two back of figuring out the necessary hooks inside Xorg for letting a regular X11 WM manage both X11 and Arcan-sourced windows with Arcan acting as the main display server turned out surprisingly painless – typing this now in a WindowMaker session that mixes windows from both. A bunch of small things to fix, but good enough for a write up.
@work I’m fixing some review comments on a PR and moving on to the next endpoint on the service we’re re-writing. It’s dubious whether we should re-write this service, but it’s going well so far. Unfortunately our product is tied to Centos/RHEL 7 for the foreseeable future, because that’s what our big customers use, but with the rewrite we’re making a point to better support newer platforms as well, so it’s nice not having to test in a Centos7 VM.
@home A while back I picked up a bundle of logic programming and Prolog books, and I need to actually read them. To that end, I started reading “Logic Programming and Knowledge Engineering”. I’ll probably work through some exercises, and think of some projects to apply logic programming. I had this same idea a few years ago, and it didn’t really go anywhere, so this time around I’m hoping to make more progress.
One idea I have is to use Prolog to figure out point-to-point bike navigation using OpenStreetMap data and my own gps tracks downloaded from RideWithGPS. Reading the data is easy enough, but how to actually form routes and create directions is nebulous.
Off the computer, I need to plan a camping trip or a multi-day bike ride.
I’ve recently started a new job and needed a good time tracker to keep track of
my overtime, since Hamster is no longer packaged with Debian and I needed to
script my way around it to make it useful, I decided to create a time tracker for my
The terse time tracker.
It’s mainly a CLI but there’s a small TUI for amending entries and
configuration. It stores everything in a simple SQLite3 database which makes it
easily portable and scriptable.
Lots of gardening also, if I keep track of my overtime its to be able to actually make better use of my time.
Reimplementing https://phiresky.github.io/blog/2021/hosting-sqlite-databases-on-github-pages/ from scratch to learn the details.
Moving into the new place and writing for my AlpineConf talk on systemd/novel when I have the time. I have chapter 1 of my novel mostly blocked out here.
I am researching on literate programming and last week I made a shift to using literate programming completely on a project I am working on. The difference is like day and night and I don’t think I am ever going back. This week I plan to move another project and write a post on literate programming. The most relevant thing I discovered was how utterly pointless files and folders were. The notion of a file is replaced with the notion of a chapter; and each chapter deals with one use-case / feature. It is much easier to remember the context of what I am working on and where I left off. The tests, backend, frontend are all in one section. I can now document my design decisions, inspirations, todos and thoughts right into a single section. I think another way to use literate programming is to document design decisions instead of explaining algorithms - like the genre of history books. You can assume algorithmic literacy before hand.
Love that you listed design decisions and inspirations.
All of my literate programming is done in org-babel. But it’s limited to devops in my org. What is your current tool chain?
Devops and Bugs too. Every bug is a story. I am using this and pandoc, but it does have some limitations. The most useful feature is writing to multiple files from a single file. I am using it to generate the entire source tree after cutting all source code for each feature into 1 chapter each. Reading the source code in the browser is way better than an editor.
It’s nice to see tooling in this space I’m unfamiliar with. Hopefully it’s a sign of adoption.
The fact that GitHub natively renders .org files is a real treasure. My readme.org can be a series of codeblocks that can tangle into different files or execute in place (and display the results).
Coding in the Readme means that the English text is always referring to the latest code. This is so useful for onboarding new people or detailing a CI/CD process that doesn’t always work on every machine. The approach is so useful that it’s hard for me to believe that it’s not standard practice.
I’m rewriting a database migration (Marklogic -> Postures, pray for my soul) and working on doing some formal methods work for a new product offering
Sneezing, while keeping the windows open to cope with the borked AC.
Also, I might have time to work on a new stab at writing a roguelike.
Taught an online webinar this morning… now trying to wrap up work before heading out on vacation next week
I’m excited to write some generative tests in Clojure and then refine the Wikidata queries our application uses to categorize results.
Oh and I’m pretty sure I’m going to pick up a new music sequencer called the NDLR.
So at work this week I am moving a pretty important backend service from using a Rational type for currency calculations, to using BigDecimal (Scala, so JVM). This is a tedious but very essential change as part of an effort to move all our services to use BigDecimal for currency representation, instead of the (in retrospect–before my time) unfortunate choice of Rationals.
Watching 10 hours of computational geometry. Group assignment. Watch 9 hours of logic. Design a couple of algorithms.