1. 24

This is the weekly thread to discuss what you have done recently and are working on this week.

Please be descriptive and don’t hesitate to champion your accomplishments or ask for help, advice or other guidance.

  1.  

  2. 9

    A year ago, I wrote a simple Python script that generates my static website. I used it for several other projects, and it becomes more fledged over time. Now I have to clean it and make it generic enough (a lot of hardcoded strings). I will publish the code on GitHub when done!

    1. 8

      I don’t know why but static site generators are just fun to work on for some reason.

      1. 3

        Relatively simple problem domain with a very fast turnaround time for iterations?

        1. 6

          Nailed it on the head I suspect. Also there’s something inherently fun about parsing something and turning it into something else.

    2. 8

      Continuing my project to datamine the Rust package database, which now looks okay enough that I might as well start spreading it around and getting feedback: https://cargofox.io/ . One of the Rust compiler devs actually pinged me and basically said “Hey if you’re asking the compiler for all this info anyway, can you collect some benchmarks for us and find outliers?”, which is pretty cool. Databases continue to be a serious pain in the rear though.

      Also continuing my duty to keep $HACKERSPACE shambling along, which is usually not actually hard, just a lot of work. Darn it, why does building things made out of people require so much talking?

      1. 2

        This looks very interesting. I have bookmarked it as it will no doubt come in handy in the future.

      2. 7

        I’ve been working on the exercises on nand2tetris. Currently stuck in the second part of the VM Translator implementation, and doing everything in Common Lisp.

        1. 6

          A bit of work on a Smalltalk project for a client, then I’m off to iOS Con in London. I’m speaking on Friday.

          1. 5

            I just recently started a “day job” with a client building scheduling and billing software for small independent professionals. It’s actually built mostly in PHP on an ancient Laravel version and has been struggling to get to market. I hope to help clean it up and bring it to market by summer.

            I’m experienced in PHP and I’ve seen a bit of Laravel, but this really is the wrong technology stack for the domain. I actually got the job by convincing them that I can help make this stack work, which I can, but I’m beginning to think that they would have been better off trashing the code and actually rebuilding in Python or even Go. Has anyone here ever had that thought, that the company would have been better off if we didn’t influence a fundamental decision?

            1. 10

              Having been there a few times before, please just help fix it. Rebuilding it is probably the right “tech” thing to do and surely the wrong “business” thing to do. Help the product succeed or fail as soon as possible. If it takes off you can help them rewrite it.

              1. 3

                Right, that’s what I’m doing. Joel Spolsky had a great article once about rewriting software (just don’t) and I firmly believe that.

                1. 4

                  There was a post with a somewhat different perspective here recently: https://medium.com/@herbcaudill/lessons-from-6-software-rewrite-stories-635e4c8f7c22

                  I thought it was interesting. Rewrites can work in certain situations.

                  1. 1

                    Thank you, that is a terrific article. He even mentions Spolsky’s article that I had referred to.

            2. 4

              Slow-learning React.

              I am slowly learning React from a book called Pure React. I built a tiny reddit clone initially as part of its initial email course. I envisioned finishing this book by this weekend and incorporate rest of the concepts from the book into that tiny clone and write a blog post about it at least the Sunday. Let’s see how much of that becomes real.

              1. 4

                I will be distracting myself from studying by working on a 2D video game in Idris. So far it has been a blast, as creating a video game in a pure language is initially (and at various other points) quite conceptually challenging.

                1. 1

                  I’m very interested in this! I’d love to see blog posts or other writeups about the process. What are you using for 2d graphics APIs - my understanding is that Idris’ support for this is still quite limited.

                  1. 2

                    Thanks:)

                    I’d love to see blog posts or other writeups about the process

                    Yeah, I might do a writeup much later in the process, when the game is at least a bit playable. There’s a lot of work before that, though: I have no art assets and I’ve got no idea how to get them, most of the systems are unfinished, and the semester is slowly picking up the pace. I hope to have a skeleton of the game by the end of this summer, and then to start working on some kind of a level designer and gathering the assets. I’d really like to have a finished thing at some point, however.

                    What are you using for 2d graphics APIs

                    I’m using the idris-sdl2 bindings, and adding the features I need on the fly.

                    my understanding is that Idris’ support for this is still quite limited

                    What makes you say that? There’s a C FFI! Any SDL feature that I lack (which is most of them) I simply add in. My only problem is that I don’t really know how to interact with the Idris VM in the C code, so sharing complex data structures is a hurdle. So far resorting to simpler solutions, like several rendering procedures for different situations, instead of one that takes complex configuration parameters, has been OK. A bit clunky, but the right solution given the time available, I believe.

                    A bigger technical hurdle was making the Box2D bindings: idris-box2d. The code is terrible because I just needed basic features for prototyping. I should’ve probably modeled the SDL bindings, i.e. just exposed basic functionality in IO. But instead I implemented some minor state management as well, which I should probably move to the game code and clean up the bindings.

                2. 3

                  A bunch of 44CON stuff, but what I’m doing in the evenings is writing a django-based app to replace the writefreely instance at chargen.one. Writefreely is great but it’s apparent that very few of the current members are comfortable enough with go to fix the problems and for the community to take it forward. I hope to have some form of MVP ready in a few weeks.

                  1. 3

                    higan (née bsnes) is probably the world’s most accurate Super Nintendo emulator, and its author byuu has done as much as anyone to record and describe the behaviour of the Super Nintendo hardware. However, byuu is focussed on preserving the behaviour of the Super Nintendo (and other consoles), so only the latest and best version of higan is available from the official website.

                    I happen to think that the journey is at least as educational as the destination, so I’ve been collecting all the historical bsnes and higan releases I can find, along with their changelogs, and I’m working on a bunch of scripts to take those artefacts, clean them up, and package them together as a single git repository that will be easier to search and analyse than a bunch of heterogenous tarballs. Of course, I’ll be publishing the scripts as well as the final repo, so people can see what editorial decisions I’ve made and change them around if they want.

                    The raw artefacts, extraction scripts and instructions are the bsnes-history-kit, and an example of the end-product is available as bsnes-history.

                    1. 3

                      Work stuff and unpacking the idea of Prolog as a cloud management language: https://dev.to/davidk01/cloud-management-with-prolog-29d8.

                      1. 3
                        • Got to the point of understanding how terraform providers work internally, and what wrapping of SmartOS tooling I need to do via SSH. This week’s goal is to have the provider able to import an image by uuid, and then provision a zone based on that image. In amongst usual amounts of work and outside work commitments, naturally.
                        • If the weather forecast is anywhere near accurate, lots of gardening to do. Need to finish shredding the remnants of the hedge trimming and get in the garden waste bin, and given it’s getting warmer, probably mow the lawn now.
                        • Very weather dependent, but get out on the push bike for a ride or two.
                        1. 1

                          IMO terraform isn’t perfect but it IS best of breed for infrastructure as code. I’ve been laboring in the salt mines for years using Chef and more recently some Ansible and my employer’s tool I shant mention out of a desire to not violate policy :)

                          I really wish everyone else in this space would recognize that this represents the new bar for this space and that if they’re still shipping a product that’s imperative and doesn’t actually interrogate the environment so it can do state maintenance they need to fix it RIGHT QUICK.

                          1. 1

                            I’ve come to similar conclusions so far. Terraform is far from perfect, but it definitely shifts the bar higher as say. I’ve currently got a ruby wrapper for my SmartOS box that an ex-colleague wrote before terraform came along. It’s lovely and flexible in some ways that tf isn’t, but it’s also not maintained by a community with loads of providers available.

                            I’m now settling for the better supported tool (and adding my own SmartOS wrapper so I can), than maintain/extend a core product to do what tf already does.

                        2. 3

                          I am setting up a build environment for AWS CloudFormation/Lambda applications in VS Code. I’ve worked on all the pieces separately. I think I grok them enough to assemble it all together into a code-build-test-deploy project.

                          I’m starting off with a triple-language lambda – code that does the same thing in Python, C#, and F#. The cloud I set up should call this code on a regular basis. It will poll a website for changes using a RESTFUL API. If it finds any, it’ll grab the new information and put it in a publicly-accessible S3 bucket.

                          I was going to add Route 53 and CloudFront stuff to the build, but I’ve already developed some stuff using that for my first CF stack.

                          I want to say it’s tough, but it’s not. However it’s going quite slowly. I think the reason is that while I know a lot about the separate pieces, trying to assemble them into a AWS Cloud Architect-y kinda workflow is quite painful. There are a zillion little loosely coupled pieces all over the place. And aside from basic ATDD poking around, I’m not really sure what it means to test a cloud architecture.

                          There’s a lot of stuff to learn and I’m having fun. That’s the important part.

                          1. 1

                            I believe CloudFormation will allow you do have CI as part of a deployment for your lambda functions if you change your workflow so the repo’s on AWS. Testing AWS offerings like lambda is a sort of vendor lock in because there’s really no way to do it any other way.

                            1. 1

                              You are correct – and you may be anticipating where I’m going with this.

                              I’ve been writing what I consider to be “true” microservices for many years now: small, pure functional apps that run from the command line. By default they use streams, but any data sync should be fine for them. I don’t use a bus; instead I use various OS features for glue and overall testing.

                              In this environment, lambda really isn’t that big of a deal. I’m getting data via JSON instead of streams. There may be some event/interface work I need to do. That’s part of what I’m figuring out. I know AWS will keep an instance warm for a bit even if you’re not using it, so I need to think about setup vs. processing. Still, I think it’s going to be trivial.

                              I agree with the vendor lock-in concern. I think you can do it without that problem as long as you carefully pack your own picnic box. That is, functions with data streaming in and out that your programmatically join is one thing. Integrating you coding and CI/CD process with your cloud vendor is another thing entirely.

                              There’s the ever-prevalent “video game” danger with AWS: lots of pretty screens with easy to click-and-deploy cool-stuff. I love the ease-of-use part, and I love the offerings. The danger is that you have to be aware of the linkages to Amazon you’re creating. Best keep everything as code, everything in your own repo (GitHub for me), and view where the stuff runs as plug-and-play.

                              This, of course, means honking around with all the little details involved with coding, pipelines, and clouds. That sucks, but I’m okay with that. Great way to actually learn stuff instead of just poking around until it works.

                              1. 2

                                I’ve been working on a similar stack, to avoid any vendor lock it i have started using the LambdaProxy project and now i have a ‘local’ binary which runs a plain http server and is very useful for debugging.

                                I am also going to look into CDK because writing json/yaml for cloudformation isn’t what i want spend my time one.

                                1. 1

                                  My belief is that a parameterized CF stack should work for a bunch of stuff. I already have one for static websites. I’m developing this lambda one. There are probably 3 or 4 others and then I’m done. The entire point is not to rely heavily on AWS, so at some point the more I’m doing CF/Lambda stuff the more I’m headed down the wrong road.

                                  Once you’ve got deployment and execution in, the rest of it is just replicating continuation stuff, right? Sequencing, map-reduce, orchestration – maybe a couple of others. At that point I think you finish up the work with a bit of containerization and K8 scripting.

                                  As an industry, we’re really not that far from true vendor/platform/OS/language-agnostic coding, where we only pay for storage and CPU cycles, ideally at market rates. We’re very, very close.

                          2. 3
                            • Integration of OpenID flow for allowing login via MS creds.

                            • Making an alarm sound continue to play if the user as requested it via a settings page.

                            1. 2

                              Integration of OpenID flow for allowing login via MS creds.

                              I read this quick as “Integration of OpenID flow for allowing login VMS creds”

                              Which was going to elicit an “Awesome!” response, but this looks cool too :)

                              1. 2

                                I wish I was elite enough. No, I spent most of my work day with the alarm thing - haha.

                            2. 3

                              Set up TICK stack for monitoring my personal infrastructure and while doing so compare InfluxDB to Prometheus. At work I’m still looking into OpenShift/OKD.

                              1. 1

                                “TICK” stack. I take it the “I” is InfluxDB?

                                1. 2

                                  That is correct. Further information if you’re interested: https://www.influxdata.com/time-series-platform/

                              2. 3

                                Figuring out how to draw curved lines using Polar curves and doing the cartesian <-> polar conversion in PICO-8

                                1. 3

                                  Technical/Arch documentation, prepping to make some git repos public, implementing better form field validation rules in our outbreak management app, support, working on a book and getting a handle on gtk-rs, cairo, pango and all those bits so I can stop trying to get electron and rust to play ball… somewhere in there I might try sleeping. I hear its a huge productivity booster.

                                  1. 3

                                    As some may have seen, I’m now an observer to rust core (which is basically a trial run for accepting me into core). My first larger task is the planning and implementation of the Governance Working Group, tasked with (re)forming our governance structures.

                                    1. 2

                                      I just put in my two weeks, so I’ll be doing some transition work to other teammates. EXCITING, RIGHT?

                                      1. 2

                                        I am completing the migration from Jekyll to a simple Typescript script for the blog. Jekyll became slower and slower and including custom HTML was becoming cumbersome.

                                        1. 2

                                          Integrating swupdate and building a manufacturing tool for the new product. Design meeting for a new audio amp & pressure-humidity-temp sensor module. Fixing loose ends for EMC compliance.

                                          1. 2

                                            I’m working on an outliner using the same tech as Gills, so that I can use it between my Chromebook, laptop, and phone when I want to. It’s looking like SQLite’s Recursive CTE support will make using adjacency lists quite useful for the basic subtree/path queries.

                                            I’ll also be getting ready to move from using fossil to using Gitea for my repository self-hosting, but I do not know if that will happen this week, or later.

                                            1. 1

                                              Have you looked at Nested Set before? I’m not super sure it’ll work great for an outliner as there are lots of edits. I’ve used it > 10 years ago for eCommerce product categories which didn’t change that often, but it worked really well.

                                              1. 1

                                                Based in the quick-ish research I did, Nested Set would be very write-heavy for an outliner. Using Parent links (also known as adjacency lists, from what I can see) with CTEs should probably work well for the outliner. Though, since this is for single person use, it likely doesn’t matter what I use, as long as it isn’t hard to get right, and I the Parent Link version already working for subtree queries.

                                                Thanks for pointing it out, though.

                                                1. 1

                                                  It looks like there are potentially ways to eliminate the rewrite the whole tree aspect of it, but yeah, the WikiPedia page suggests that Recursive CTEs and Adjacency Lists are a very reasonable approach in most cases.

                                                  Always interesting to think about how to model these types of problems. Like, you can also not use SQL features at all and select all the outline nodes that have the “outline_id” and construct the tree after the fact, in the view, etc. My guess is that this only matters in the really extreme cases, and even those can probably be optimized with something simple like binary search after sorted by “parent_id.” :)

                                                  1. 1

                                                    Indeed, it is interesting to think about how to model these sorts of things. My first thought was to use a predeccessor list, so that I could do a “Select * from Outline where Prefix = ‘1.2.3.%’ and get all the nodes that way, but then I realized that made updating the tree a bit fiddlier, due to needing to rewrite all the nodes in question. At that point I decided to look into what my options were. I think I had previously written off Adjacency lists due to having a CLI binary of SQLite from a version before Recursive CTEs (older server OS, and hadn’t put the time into getting the sqlite3 tool updated yet), but the Go Sqlite lib I was using had support for them.

                                                    The thing that I like about Adjacency lists is that they make it very easy to modify the structure of the tree, and from what I can see, server-side view code doesn’t even really have to worry about the tree nature of things explicitly, it can just read in a nesting value from the query and act accordingly.

                                            2. 2

                                              I’m putting the finishing touches on the CI pipeline for the CLI tool I’m working on, then, if I have time, I’ll get the CI pipeline working for the library that it wraps. I’m also putting the finishing touches on the documentation. If all goes well, I might have this all wrapped up by the weekend so I can start work on something else.

                                              1. 2

                                                After mulling it over a few months, I made a controversial change to my programming language to parse foo -bar differently than foo - bar, reducing the need for parentheses (and more importantly, surprises) — as well as opening the door for new operators (like trailing * and + for building patterns without regex syntax).

                                                I’m in the process of reviewing the first third-party code submission to Advanced Mac Substitute, which adds partial support for Sound Driver output, enabling Lode Runner’s gameplay sounds.

                                                1. 1

                                                  Just a small question: I see that you are developing a language called V. Is your project somehow related to this homonimous language?

                                                  1. 2

                                                    Nope, not related at all.

                                                    Mine’s not the first language called V either, but I did check the search results for “V language” before adopting the name. :-)

                                                2. 2

                                                  At work I’m still working on our terrain plugin. I think there was better progress last week, and I’m pretty happy with how it’s going. The last round of API bugs seem to be fixed, and I think we’re getting close to having it working.

                                                  Outside of work I didn’t make any progress benchmarking my quadtree library, so I’d like to do that this week. I fixed a few bugs and added point-quadtree visualization, so some progress was made. It’s easy to go down a rabbit hole playing with visualization…

                                                  1. 2

                                                    Working on redesigning and rewriting the PHP for my photography site.

                                                    1. 2

                                                      I am also working on a static site generator, one that I’ve been working on for years now, if you consider past prototypes.

                                                      It’s more than just that though, it’s designed to be an updatable, decentralized, portable message board, community board, whatever you may want to use it for.

                                                      If you want to play with it: http://hike.qdb.us/ http://www.github.com/gulkily/hike/

                                                      1. 2

                                                        On a whim I built an asynchronous http client for Lobsters on the weekend. Mostly to practice async Rust. Then I wanted something to demonstrate it so I built a command line UI. It looked good but wasn’t interactive so I set about learning and building a TUI… I’d like to finish that this week. All of this is mostly for learning I’m not sure if it has any practical use.