1. 13

What are you doing this week? Feel free to share!

Keep in mind it’s OK to do nothing at all, too.

  1.  

  2. 7

    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.

    1. 1

      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.

      1. 1

        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.

        1. 1

          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.

          1. 1

            Ah, yes, agreed!

    2. 5

      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.

      1. 1

        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.

        1. 3

          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++.

          1. Ada has much less symbology and has no specialized syntax for “classes” or “traits” namespaces.

          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.

          1. Rust focuses just on memory safety, whereas Ada focuses on correctness as a whole.

          (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.

          1. 1

            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.

            1. 2

              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:

              package P
                  with Pure
              is
              
              end P;
              
      2. 5

        Writing a conference talk that I’m supposed to give next week.

        I, uhhh, procrastinated a bit. :(

        1. 2

          Good luck :)

          1. 1

            Thanks!

          2. 2

            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)

            1. 3

              Don’t we all?

              1. 2

                It takes a while to make some sick memes with pictures I can 100% say I either own or are totally free for use. ;)

                1. 2

                  Can confirm I still was finishing up slides and rehearsing an hour before. ;)

              2. 4
                • Finished updating my awk ebook today. One more book left to update, after which I won’t have excuses left to restart a book I began last year.
                • Been a long time since I published a programming blog post, so hope to write one this week.
                • Planning to read Bulletproof Witch and/or Dragon Mage.
                1. 4

                  Starting to work towards migrating our two large single page apps to old school server rendered web apps.

                  1. 1

                    Server rendered is old school now? Pfft, I’m old.

                    1. 2

                      It was once the only way to do web apps, so if that’s not old-school, what could be?

                      1. 1

                        Well, if you were not born yesterday, then anything about web design you know is outdated.

                    2. 3

                      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.

                      1. 3
                        • Onboarding at new job, meetings, familiarizing myself with the teams and the tools (I have to say that I missed that after six months of job hunt)
                        • Took a Macbook Air as work laptop and learning how to use it after 10y of linux (my private laptop is still on Fedora).
                        • Enjoy seeing friends and family and get back to job routine.
                        1. 2

                          What’s the new job?

                          1. 3

                            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!

                        2. 3

                          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.

                          1. 1

                            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 :)

                            1. 2

                              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.

                              1. 1

                                This looks awesome. Very similar to what I envisioned for our house!

                                Please do ping me a reply when it goes open source.

                          2. 3

                            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

                            1. 2

                              Holiday week for me.

                              • Catch up on jobs around the house
                              • Buy and build some more furniture downstairs
                              • Get out on the bike, as I’ve a cycle sportive in a couple of weeks and haven’t really been training much recently
                              • Sailing booked for a couple of the days, might also investigate wild swimming at a local lake depending on temperatures
                              1. 2
                                • Build garden boxes
                                • Move my saas app’s hosting from Linode to Fly
                                • Demo data/account for said app
                                • Since the box is (probably) going away at Linode look at Dockerizing Stitcherd and getting it’s home page running on Fly.
                                1. 3

                                  Had my eye on Fly for a while, but not used it yet. Would be interested in your thoughts once complete

                                  1. 1

                                    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.

                                    1. 1

                                      What is Fly? I tried googling “fly web host” but couldn’t find anything.

                                      1. 1

                                        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)

                                        1. 1

                                          No worries! Ah interesting, thanks!

                                  2. 2

                                    Gonna try to hack the Gibson :-)

                                    It’s one of those weeks…

                                    1. 2

                                      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.

                                      1. 2

                                        @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.

                                        1. 2

                                          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 needs:

                                          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.

                                          1. 2

                                            Reimplementing https://phiresky.github.io/blog/2021/hosting-sqlite-databases-on-github-pages/ from scratch to learn the details.

                                            1. 1

                                              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.

                                              1. 1

                                                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.

                                                1. 1

                                                  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?

                                                  1. 1

                                                    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.

                                                    1. 1

                                                      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.

                                                2. 1
                                                  • Substitute teaching for a day at a code boot camp.
                                                  • Further fleshing out a framework for building desktop apps with Elm.
                                                  • Trying to find my muse again for writing more content for a sci-fi exploration game I’m making. The game framework is mostly there, just need to write a loooot of content still.
                                                  1. 1

                                                    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

                                                    1. 1

                                                      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.

                                                      1. 1

                                                        Taught an online webinar this morning… now trying to wrap up work before heading out on vacation next week

                                                        1. 1

                                                          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.

                                                          1. 1

                                                            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.

                                                            1. 1

                                                              Going to see how hard it is to translate a project from Python to Javascript, with the result being mostly idiomatic to best js practices.

                                                              1. 1

                                                                Watching 10 hours of computational geometry. Group assignment. Watch 9 hours of logic. Design a couple of algorithms.