• 0 Posts
  • 21 Comments
Joined 1 year ago
cake
Cake day: July 3rd, 2023

help-circle



  • Read through the Readme and it’s definitely a good tool to know about. It doesn’t fit the needs of my current problem, but I’m certain I’ll use it in the future for context sensitive searching, since grep/awk/sed/tr have definitely fallen flat for me in the past. I might also be able to study how they utilized tree-sitter CLI when I explore my own implementation.

    For my purposes, I want to take a group of similar-yet-different YAML file sets (though file type should be arbitrary), and feed them through a tool that will spit out a YAML template containing everything that is shared between multiple sets.

    Then, I want it to create a file for each YAML which defines which parts to pull from the template file and a list of variables to be inserted into holes in the templates. Basically creating a madlib that can recreate any file in the original group given the right list of variables to insert.

    For example, if I have a hundred YAML files that are mostly similar but contain different project names, have different server types provisioned, and are pulling different product versions, I would want this script to parse all hundred files and spit out a template that could be used as the basis to build any of the hundred files. The template would be combined with a hundred variable trees that would insert each unique part of each file into the right place.

    In effect, I could have a small variables file that gives only the unique portions of the equivalent YAML - in this case, it would contain only the project name, the server type, the product version. Then, these small files could be combined with the universal template to recreate the original hundred YAML files. But unlike using a simple override mechanism, I would be able to change elements of the template YAML including broad structural changes, and after some processing, the change would affect all one hundred output YAMLs.

    One could track things like environment variables that are specific to a certain project version and require that whenever a project version has a particular value to insert a particular environment variable into the output YAML. Or a centralized file could be made specifying which product versions correspond to which projects, allowing the engineer to change all product versions for a given set of projects in one go. Or one could create a universal template of IaC code that’s applicable to a broad swath of use cases and quickly build out a full set of YAML manifests and Terraform files using a small file that specifies what components will be needed and where to authenticate to the server.

    I’m not aware of any tool that does this, but I think tree-sitter gets me much of the way there. If I can use it to parse any given file into a context aware tree, I would then need to make a script that combines the shared features of many context trees and splits the unique features out into small variable files. Then a script to merge them back together as needed. And something to manage file system structure, such as whether to parse every file individually or to strategically merge some sets so you have one variable file that produces multiple output YAML.

    Sorry I’m brainstorming at you, just trying to figure out if the tool I’m envisioning is even feasible. Seems like it is, but I’ll have to figure out how to use tree-sitter CLI before I begin.



  • Just built my first fully dedicated Linux machine. Still keeping my old Windows desktop around purely because I play League of Legends and they use a kernel level anticheat, so it won’t run on VM.

    Fun fact, ever since Riot made it mandatory to install their rootkit if you want to play their games, every time I try to eject a flash drive, it says it can’t eject because it’s in use - even if I just plugged it in. And that’s super comforting.


  • This is super cool. Watched the talks from Max Brunsfeld, surprised this has been around since 2018 and I haven’t heard of it.

    I actually tried some complex parsing myself lately. I had a bunch of YAML I needed to maintain for various deployments in a CI/CD system. I really wanted to have one YAML template to generate the files, plus a file for each project with unique elements to be injected into that project’s generated YAML.

    Probably was more of an indication that we needed to clean up the overrides we were putting on top of our Helm charts, but I wanted a way to generate our lengthy override files without having to manually keep track of where the differences were between projects. And maybe even stage changes to deployment files for when new product versions are released.

    This is exciting. I’m going to look into Tree Sitter more and maybe try to contact the dev. It seems like it does everything I’m looking for, just for an entirely different use case.


  • I used to work for a company that did various kinds of biometric recognition. I unfortunately was paraded past these cameras many times for testing purposes, so my face was compromised many moons ago.

    We had two kinds of products we installed in airports. When looking at large crowds most airports wanted cameras that would monitor the flow of traffic, determining if there were any bottlenecks causing people to arrive at their gate (or baggage claim) after their luggage.

    The other product was facial recognition for identification purposes. These are the machines you have to stand right next to. There are various legal reasons airports did not want to use any crowd-level cameras for identification. They hadn’t obtained consent, but also, the low resolution per face would lead to many more false positives. It was also too costly.

    But we did have high def cameras installed in strategic locations at large music halls. These private companies were less concerned with privacy and more concerned with keeping banned individuals out of their property. In those cases, we registered faces of people who were kicked out for various reasons and ignored all other faces.

    My point I guess is twofold: first, you might not be facially tracked in as many places as you think you are. Second, eventually you will be and there’s not a whole lot we can do to stop it. For many years, Target has identified people with their payment card, used facial recognition to detect when they return to the store, and used crowd tracking to see where in the store you go (and sometimes they have even changed ad displays based on the demographics of people standing nearby).

    Mostly, you will be identified and tracked when there is financial incentive to do so.



  • I finally got fed up with my Windows machine and upon seeing symptoms of motherboard failure, I’ve ordered all the parts for a new rig and intend on installing Linux as my primary OS.

    Haven’t decided on a distro yet. I’m a DevOps engineer with a few passion projects, so I plan on setting up a couple of kubernetes clusters where I can play. I do all the usual things (word processing, gaming, web browsing, multimedia, etc), plus some AI stuff (stable diffusion, local LLMs, OpenCV). Ideally don’t want to have to fuss with drivers too much, but I don’t mind getting my hands dirty every now and then.

    Is Chimera the kind of distro I should be looking at, or should I pick something else for my first go at full-time Linux?









  • My favorite games on Android:

    1. Shattered Pixel Dungeon
    • [Endlessly replayable roguelike. Clear each floor, identify potions, drink the right one to level up so you can use better weapons and armor, keep your health high and see how deep you can get in the dungeon. Game time only advances when you move.]
    1. Slay the Spire
    • [Deck building game. Use attack, skill, and power cards to beat enemies and earn new cards, use your choice of cards, relics, potions, and card upgrades to create synergies in your deck and make it past all three acts to win the game. Deck resets when you lose (or win).]
    1. Infinitode 2
    • [Tower defense game. Stop enemy shapes from advancing to earn gold, use gold to buy new towers, upgrade your towers, and swap out various types of tower to maximize your efficiency. Keep an eye on how close enemies are getting to your base or it will be overrun before you notice.]
    1. Super Auto Pets
    • [Pocket monster-style battling game. Use a limited amount of resources each turn to buy new bitmoji animals and watch your team face off against a random opponent at the same stage of the game, keep hearts if you win, lose hearts if you lose, get better quality pets each round you progress. See if you can win ten rounds to claim victory.]
    1. Tomb of the Mask
    • [Classic-style 2D arcade game. Use the four directional controls to zip past moving obstacles, collect all the dots on your way to the exit if you can, enjoy the snappy movements and fun retro sound effects. Very reflex-driven.]
    1. Antiyoy
    • [Turn-based hexagon-tiled conquest game. Buy houses to get more income, buy soldiers and towers to protect your land, upgrade soldiers and towers to face off against enemy assets, careful you don’t upgrade them more than your income supports, enjoy the many hundreds of user-submitted maps. Single player by default, or get Antiyoy Online to compete against other players.]
    1. Mindustry
    • [Realtime strategy. Research new technologies, build mining drills, create weapons, face off against enemy forces to control the map. Steep learning curve.]
    1. Dungeon Cards
    • [Tile-based strategy game. Pick a card, help your card survive on a 3x3 grid by using the four directional controls to swap places with any adjacent card, while being careful not to pick fights you can’t win, be strategic about when you pick up weapons and potions. Don’t get caught surrounded by poisons, explosives, or enemies at the wrong moment.]
    1. Atomas
    • [Science-themed matching game. Distribute atoms around a ring, watch atoms merge and transform into larger atoms when they match, set up chain reactions of many atoms each finding their mates at the same time, careful not to fill the ring beyond its capacity. Learn the periodic table in the process.]
    1. I Love Hue
    • [Relaxing color matching game. Get a mess of jumbled tiles on a grid and swap tiles around until they form pleasing gradients along both the y and x axes. Breathe in. Hold… Breathe out.]

    Honorable classic game mentions:

    • Chess [It’s chess.]
    • Rummikub [“Rummy-cube”, compete against other players, using tiles from your hand to form “runs” (red3, red4, red5) and “sets” (red3, blue3, black3) in the playing area until a player wins by using all their tiles. At least 3 tiles per set/run, must play 30 points from your own hand on the same turn before manipulating tiles played by others.]
    • Rommy’s Gauntlet [Level-for-level remake of the Windows 95 “Best of Windows Entertainment Pack” classic, Chip’s Challenge. Tile-based puzzle game.]


  • It’s an uphill battle for sure. We gain resiliency from decentralization, but you’re right that there is a cost in efficiency. Long-term, we should work to achieve collective ownership of centralized data centers, to literally seize the means of our content production.

    But we can’t currently afford the upfront cost such an endeavor takes, even collectively. The ruling class has gone far to ensure our collective means reach not much further than the ends of our own tables. But I still have hope for what we can achieve.

    Even if we don’t yet have the resources or the efficiency, one thing we can start working on already is the political infrastructure. Obviously, the official government is laden with corruption. And we can dream about overturning Citizens United, but we shouldn’t be holding our breath. While we must keep fighting that fight, we can simultaneously devote time to learning how to govern ourselves.

    What is fair? What are rights? What is the value of a person’s time? Of a person’s life? What is a person? When does an idea stop belonging to an individual and start belonging to everyone?

    We can codify these things, and we can even make algorithms that compare our opinions on these subjects and build up logical governing rules over time to maximize fulfillment for everyone. But one thing that’s almost impossible to do is to protect our new society from corruption. We can make the perfect voting system and even if we manage to successfully detect and remove bots, the influence of capitalist ideology penetrates our zeitgeist deeply. Our TV, music, religions, and games while often poking fun at the beast are all intrinsically part of it.

    So, what do we do? I think we should accept that part of ourselves. The part that corrupts us, that loves the wars, the pollution, the lack of education. The side of our society that glorifies the billionaire class and will lash out if in mortal danger.

    Because I think you’re absolutely right. The more of a threat we appear to be, the more they will come after us. So, we need to make our endeavors look and act like theirs. Real businesses with a real regard for efficiency and profit margins.

    But instead of a CEO and a board of directors, we place an artificial intelligence. And instead of trying to maximize profits for investors, we train our AI to maximize profits for workers. And each worker gets a say in the design of the AI, in proportion to the amount of work they do for the company. The work they do is measured as a calculation of how much success they make for the company. Success being a combined metric of estimated financial profit merged with quantifiable improvement in quality of life for our customers.

    It’s not a corruption-proof system, but I think allowing real workers to collectively train an AI boss is a good way of combating the effects of corruption in realtime. If I were a worker in such a system, I would implore our AI CEO to classify any livestock in our farms as customers and workers with rights proportional to their brain sizes when compared with our own. So, making lives better for cattle on farms would directly affect the perceived value of the worker who made those changes. This might make our products more expensive when compared to a capitalist model, but if a worker implements the innovation of livestreams from all our livestock to show how fulfilled they are, and the biodiversity/ carbon capture solutions we have crafted into their environments, customers may be willing to pay for a food with less attached guilt, especially if they are entitled to larger profit shares from their own AI employers than in the capitalist model. And if our customers are perceived to be happier as a result, the workers who implemented the livestreams would be rewarded in kind.

    If capitalists can game that system by creating bots which produce quantifiable work and are compensated in kind, we can still utilize that labor. If we set the initial conditions correctly, this should result in a workless society where no human has or needs money. Because at the end of that road, no humans can find any appreciable amount of work to do, so the only purpose they serve is to be customers for the perfected AI companies. And because all efficiencies have already been carved out by the capitalist bots, the only way for the bots to make additional profit is to make quality of life improvements for the customers. We become the livestock, with all our needs met. The rich become the workers, toiling to find something to do with their money.

    And that may not seem like the perfect end, but maybe it’s the best we can hope for. The capitalists finally have all the money. But they’ve unwittingly taken part in our utopia. And we didn’t have to eat them after all. We just have to find a way of quantifying fairness.

    If we can train an AI to determine what compensation is a fair reward for any given task, both now and in the future, everything else falls in line. But maybe that’s as tautological as saying if we could only root out corruption from the US government, we could get rid of Citizens United. The horse isn’t anywhere near that cart. But hey, it’s fun to dream.