28
votes
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
Just got the MVP of a raspberry pi-based Home Assistant tablet up and running!
It wasn't too bad in the end. I mostly ended up struggling with the poor performance of my model 3B+, but I had an underutilized 4B I've been using for another project. I swapped those out and most of the issues are gone.
Now I need to work on all the details - a dashboard specific to the tablet, a case/stand, etc.
Wish I had something interesting to share in one of these threads, but all I have is not really a project per sé. Recently I dusted off my Codecademy account and thought I'd try learning Lua.
Then I remembered why I never tried it before, except for when I briefly delved into WoW addon development (I tried creating an addon designed for sharing/distributing player blacklists to tackle in-game toxicity, but the amount of tutorials around are dogshit and I could never get my head around the Blizzard API or Ace3 framework.) Installing Lua on anything other than a Unix-based OS is a pain in the arse, and there is no official installer for Windows.
Also, I don't like what Codecademy has become. Every single time you complete a lesson, it keeps trying to upsell you with multiple ads about going for the Pro package and claiming that you could use the site to build a career. Like... bullshit can I pay £200 for an annual Pro subscription and somehow within a matter of months end up good enough to land a tech job. My brother is a software engineer working in a FAANG company, and I know what it took him to get into his career path (years of web dev experience as a teenager, a Computer Science degree and climbing up the corporate ladder.)
How timely. This came across the frontpage HN the other day, it's basically a tool that manages installation, dependencies and project structure. They have mixed opinions, but I'm personally all for it. luarocks is fine for dependencies, but the versioning/installation problem historically requires another layer of abstraction to deal with (which is why we have nvm, conda/uv, etc)
Edit: a word
Edit edit: typos/clarity
This looks really interesting. I'll have a look once I get home from karaoke tonight.
I can't say I'm a huge fan of Codecademy. I've seen it used well as a refresher for syntax of a language or to jumpstart transitioning to a new language, but its value drops off heavily after that.
No idea if it's of interest to you, but I got my introduction to Lua from making some mini-projects with pico-8. I'm certainly no expert with the language, but having something creative to work towards was hugely motivating to practice the basics.
I've seen some good shit made for the pico-8 and it just makes me think I'm not cut out for game dev.
I feel very shy posting about this on a site where I get the impression that many (most?) users have technical/coding backgrounds. I just started learning how to "code" with Godot Script (GDScript) so that I can make a card game in Godot Engine.
It's a spiritual successor to "Underhand" which existed long ago on the Google Play store and I'm not sure how many (if any) folks might remember it. My game will be built from scratch with all new assets but the mechanics will remain largely the same. You are prompted with choices that either reward or take away resource cards with the end goal of summoning a god if you are able to meet all their summoning criteria. That's not the best explanation but I'm trying to keep it brief.
Anyway, from a non-technical background, even opening the engine was very intimidating. There's so many things I don't understand and I haven't found a guide that will help me understand how to do all the things I want. I've considered using AI to explain things to me but I'm worried that it will teach me how to do things incorrectly and I'll have no way to verify it. There are tutorials for understanding the basics of coding but how do I take those things and implement the mechanics I want in my game?
I wrote all the new cards with their options and rewards/penalties in an Excel file because when I started I didn't know what a JSON did and now I'm not sure how to transfer everything I wrote into the format it will need to be...All this to say, it's been a very humbling and frustrating experience haha. I hope I can find a way forward to continue creating while learning.
Hey I just wanna let you know that you can call this programming, coding, even engineering. GDScript is a programming language; you are writing code. Everyone with a technical background started where you are now.
Practice and experimentation! Following a tutorial to make a character jump and move around gives you some insight into how the engine works. Applying that insight to other areas is a lot harder, but don’t be intimidated. You’re learning and it will get easier. Personally I found Brackeys to be a great teacher, and he’s recently started teaching Godot. So give him a try.
I wish you the best with your untitled spiritual successor to Underhand :)
Thank you for your kindness and the recommendation. I've never heard of this person but I just started with his beginner tutorial and it's already been a huge help. I had no idea I could just drag and drop my asset folders into the engine! This makes it feel so much more approachable especially getting to watch someone's screen while learning - thank you again!
Just so you know - a lot of us have started making garbage at first. When I think about my own first Python scripts that I actually used for research there is an incredible sense of cringe and a desire to erase any trace of the code(not the results though, those were useful).
As for using AI to teach you... yeah, I'd recommend to first just try try try, and use a normal search engine. AIs can be useful but it can 'trick' you(with lack of better terms) in thinking you understand something. And developing a sense of what you have to look for is one of the most useful skills in tech.
I started out by tinkering around in Visual Basic. I didn't know what variables were, so I used a hidden textbox to store a string...
Fully agree we all started out by making garbage lol
I think most of us love seeing new people pursue coding as a hobby! It makes us nostalgic for when we started out
For turning the excel file into a JSON file, you could export the excel file into a CSV and then write a script to turn that into JSON (which would be easier as CSVs are a very simple format). I’ve never used GDScript so I don’t know how easy it would be to read/write files, but I can’t imagine it would be too hard
I was considering using the mail-merge tool within Word to get it done haha! I didn't know you could use scripts within Excel to have it format itself within a new document type. I will have to look into this and see if there are some guides online that might help. Thank you!
Excel can do that, but I don’t think I can recommend it. Powerquery is extremely powerful, and could definitely assemble a JSON file for you. But it’s a complicated language to learn, and doesn’t have any use outside of excel and power BI, which isn’t useful in video games.
You should do the csv to JSON part in another language. GDscript might be able to do it, but I have no idea. I would recommend using Python and pandas. Python is pretty simple to learn, and extremely useful for weird tasks (like converting excel to JSON). It actually can read excel natively, depending on the document structure.
Here is a simple article for doing the conversion, but they don’t use pandas. You likely will want to reorganize or restructure the JSON, but this should get you started.
I've been designing my own keyboard layout. Most existing layouts largely assume a one-key one-character correspondence, and there's tons of info on the consequences of the placement of those keys. With seeing keyboard layouts with a thorn key or a magic key with few macros, I wanted to see what a keyboard layout could be like if I embraced the idea of one or two key press(es) entering common sequences of characters - not just bigrams like "th" but perhaps trigrams, 4-grams, etc. (think words ending in "tion" or even common words like "which"). How far can this be taken? How many key strokes can I reduce typing by? Would it even be comfortable to use? There's far fewer resources on this.
So my programming/technical project I've been working on is analyzing a dataset of already tabulated 1-grams through 9-grams. I'm in the process of identifying which N-grams I should consider as definitions of my macros. One idea is to dedicate a thumb key on my Ergodox as a one-shot layer containing the macros. This would open the door for defining something like 30 macros which can each be entered by a sequence of two key presses. I'm also considering demoting some letters to this layer so that I could have some single-key macros (think how the bigram "th" is more common than many single letters). I'm trying to be systematic and thorough though - defining a new "th" key, for example, will reduce the number of occurrences in which I need to use the "t" key. Same applies if I have 29 other macros, some which will overlap. I've been breaking my brain on how to do the math correctly on this recently without having the corpus itself.
To add even more complexity for you, some more ideas to explore:
leader t
becomes "the", butleader b c
becomes "because".b c
just types those two letters, butb+c
together types "because")(hi, I am Tildes's resident Weird Input Device Enjoyer)
Wow, you definitely are giving me some good ideas to explore! I have not heard about leader, seems like a cool feature of QMK (I'm quite new to all of this). It seems much more elegant and powerful than using layers and certainly opens the door for much more than 30 macros. I'm not sure what namespaces are though, what do you mean by this?
I have explored a bit of the tap-hold of multiple keys, not for character n-grams but rather for common multi-word phrases. It's been a bit of hassle to get chording to be not only responsive but robust. I could not strike a good balance there without accidental triggers so ended up disabling it for now. The article you linked is interesting though, it brings up the idea of having modifiers to change the form of words. I really like this idea, having keys to change part of speech, tense, etc.!
Very interesting idea to use circular key caps to fit more in a smaller space. When I first explored steno and chording, I had similar thoughts by making keys snug next to each other to allow a single finger press multiple keys simulataneously. I gave up on the idea when I realize there was quite a bit of lateral movement on my key caps thinking that could be a problem - I could not find any information on lateral movement when I looked into other key switches years ago. If I ever embrace chording, I might return back and think about snug keys or fitting extra keys one day, but not any time soon. Now a foot pedal, that's certainly an interesting idea, haha.
You've definitely given me some things to think about.
That thumb key is an example of a leader key: a key that isn't a hold-down modifier, but you use it as a prefix for sequences of other keys. Doesn't have to specifically be the QMK thing (I think the term originally came from vim?), though QMK does have support for it that's probably easier than setting up a massive layer tree.
Another variant of the same concept is the compose key, where
compose ' e
types é. (The output of compose key sequences is usually a single character, because that's what it's primarily designed for, but doesn't have to be.)"Namespaces" isn't an official term from anywhere; I'm using it to mean well-defined sections out of the whole set of possible key sequences and combinations you could type. "Ctrl-shift-(letter)" is a namespace. If you add a new modifier key, that creates a new namespace. I don't know if people have another word for this.
My thinking, though, was that you could (for example) say
leader a
throughleader m
type words themselves, butleader n
throughleader z
take another key after them.I'm assuming that you are familiar with stenotype? It might be useful to follow a similar design:
https://www.artofchording.com/introduction/how-steno-works.html
I have! I love the idea behind stenography and did try to use one of the variants of it with Plover before. The main issue I had when first trying it was with how frequent my pinky finger was needed - it was much higher than I liked and caused discomfort. I couldn't find any resources on variations on the design of chording layout/methods that explicitly consider ergonomics or comfort. Plus, the learning curve was very large, which was quite the hurdle to overcome. I did dabble with implementing my own version of chording using AutoHotkey for common phrases, and I think I might retain it, but only for sequences of words rather than characters. It's been quite troublesome with accidental triggers so I have it disabled for now but will return to it at some point.
If ergonomics are a concern and you have access to a 3d printer, you could always try your hand at designing your own keyboard!
https://ryanis.cool/cosmos
I've put my design on the back burner, I should iterate on it more...
Wow this is really neat! I feel like there are tons of innovative things out there in the keyboard world for both hardware (physical layout) and software (layout). I don't have a 3D printer but do know someone who does who would likely be willing to have me use it. I don't think I'm quite ready for tackling the idea of custom physical layout and hardware, but I will definitely have to bookmark this and check it out at some point. I really like this idea of customizing the keyboard to one's heart's content, thank you for sharing!
Christian Selig (who developed the Apollo Reddit app before the API fiasco) put out a video last year going over how he designed and made his own custom keyboard:
https://www.youtube.com/watch?v=7UXsD7nSfDY
It's a good video and outline of one way to make a custom keyboard.
I was quite intimidated by the whole physical layout and soldering part. It seems like if I already have an idea on where I want the keys to be, the way to generate it is quite straightforward! I am still intimitade by the soldering part, but the video certainly put my mind at ease. I think I will have to give this a try at some point, lots of room for creative freedom! Thank you so much for the link!
I’m always a little nervous posting here will cause people to deanonymize me but I think this project is broad enough.
I’ve always envied those Linux power users that can boot up a new machine, run a script, and have the operating system customized exactly to their preferences.
However, I’ve tried Linux as my working OS a few times and never could quite click with it; too many good GUI apps on MacOS that I like to daily drive.
Recently, my computer broke and I needed a fresh install of MacOS. So, I’m building a script to do all of my MacOS customizations from the command line.
This project has been involved. Some sidequests include:
Normally, I’d get exhausted learning this much. However, this project has activated my sense of “holy shit, I’m a wizard” in a way no other project has.
Finishing a piece of the project, running it, and watching my OS just transform in front of me is super fun.
I’ve already committed to show my work to a friend by factory resetting my computer when I’m finished. The stakes are high.
My current project revolves around my esoteric programming language, Funciton. It consists of Unicode box-drawing characters. Here's what the factorial function looks like:
I invented the language in 2011 and only posted about it on esolangs.org, but now I'm returning to it and making YouTube videos about it.
My first video series was about the language itself and how I built useful functionality in it (such as addition, multiplication, and yes: the factorial function lol).
I am now doing Advent of Code 2024 in it.
I just watched your introductory video and checked out the esolangs page, and this is super cool! It reminds me a lot of things like NandGame, what with starting with circuits and fundamental operations.
I'll have to find some time to give it a go, but suspect I'll be held back by the input challenges. I've always had huge amounts of respect for people who are wizzes with autohotkey or emacs configs, but I've never been able to pick up those tools naturally.
Another libgen mirror went down earlier this year, and as a result I have been exploring the rabbit hole of "can I download and store all of library genesis for a reasonable cost?". This comes out to around 4TiB of fiction (which I can fit on my current hard drives), 45TiB of nonfiction (which I cannot, but conceivably could), and 81TB of science papers and magazines (which crosses the line into "maybe start looking into alternative storage formats").
So I've landed on LTO-6 tape for now(*), and by spending entirely too much time scrolling through ebay, I have acquired a tape drive, the extra computer-bits required to use a tape drive, and 62.5TiB(**) of blank tapes, for a total of around $400. (Used-but-still-working hard drive prices are usually around $10/TiB, for scale.)
(* At some point in the future, I want to experiment with DIYing optical tape, which is a very cool thing that the industry seems to have abandoned for unclear reasons, but that can be a separate project later.)
(** Uncompressed size. LTO tapes have this bizarre marketing thing going on where they're advertised with sizes that assume some fixed compression ratio, which is Not How Data Compression Works At All. This is 25 tapes, each of which holds 2.5 real TiB or 6.25 imaginary marketing TiB.)
The other side of this is figuring out which things to download. The lazy answer is "literally all of it", but this is a big and messy dataset with a lot of duplicates. If there are five copies of exactly the same book and four are potato-quality scans I see no reason to waste the extra space on them. If there are hardcover and paperback editions with different ISBNs but the same content, those can also be considered equivalent, since I'm only storing the content. I've been playing around with smushing the libgen and openlibrary database dumps together to try to deduplicate to a reasonable level.
I'm glad someone else in my friend group has already taken on the role of Plex Server Person, else this would start to get silly.
I'm also interested in this! Let me know how far you get.
The biggest benefit that I see for tape libraries is that they really force you to come up with a good metadata indexing/lookup-and-retrieval system--even with LTFS you have multiple tapes and frequently searching up to 25 different tapes to find one file is a bit embarrassing ;)
If you could make a deduplicated extract of LG/OL converted into markdown and tar'd zstd? by upload Y-m-d I'd be interested in seeding that!
Oh, absolutely, there'll need to be some sort of index somewhere. I imagine in practice the use will be something like "just use libgen if it still exists at the time, else consult the index and go pull a tape off the bookshelf". (Because of course this needs to be displayed on a bookshelf like a row of paper books.)
The metadata, or contents? I suspect all the contents may be too big to keep on a reasonable set of hard drives even as compressed markdown (as funny as seeding torrents from tape would be, I do not think it would be a good idea), but once I have a decent chunk of them downloaded I'll convert what looks like a representative set and extrapolate and see how it looks.
That may very well be the case. I wonder what the actual overhead is... It's quite common for scanned books to be 30MiB or even 90MiB PDFs. Losing formatting and pictures you could bring these down to 300KiB. If they are picture books then maybe you could convert each page to AVIF and end up with 5MiB. There will be a noticeable loss in quality but it may be worth it to be able to have everything on one 8TiB disk.
500 KB * 2.4 million = 1.2 TB
Also if you group all the markdown content by topic you could use custom dictionaries with zstd to get very extreme levels of compression...
How much would the “overhead” of getting all non-image texts or books OCR’d be?
If someone can reduce a several dozen MiB full scan down to pure text and a handful of smaller images/figures it contains, it’d still save quite a lot of space in the long run. But the difficult thing will probably be getting everything extracted correctly automatically/unsupervised when it’s such a volume.
I tried converting the largest PDF I currently have (The Art of Electronics: The X Chapters) to plain text, reducing 263MiB to 1.7MiB.
But it took a while (long enough that I went off and did other things and stopped counting minutes), and the results are... not what I would choose as reference material.
you can sometimes hear these capacitor and things is the name of my new electronica band
As someone who has basically only ever used SSDs – how much physical space does a collection of 2.5 TiB tapes + drive and computer connection take up?
It sounds like a very cool project, and if I had the time and space commitments available, I’d definitely want to look into archiving books or other data too :-)
Also, (how) do you plan on indexing? (quick edit: should’ve read just one comment further before posting, as usual)
Surely for starters, knowing which tape to go to would already be a help if you wanted to retrieve specific items… So it sounds like you might need a master record, for example in its simplest form a tree list of all files? But then that assumes idiosyncratic or at least semantic/relevant file names, right?
Size comparison of various sorts of storage devices I had lying around: https://i.ibb.co/hRrw5ZHb/disk-sizes.jpg
So I'm already going to the effort of build a database of all the books for deduplication; it seems reasonable to just use this as an index too. I'm treating the tapes as write-once, which means files won't ever move once they're written, so I'm planning to just add
tape_id
andoffset_into_tape
fields to the existing database, and then make that database easily queryable somehow via a "do I have this specific book? if so, where?" lookup tool. Currently that's a 16GB MongoDB database, which is entirely storable on normal media and backupable with my normal backup processes.Very cool stuff. Thanks for the answer!
Been putting in extra hours at work due to deadlines, and it's really eaten into any motivation to work on my side projects even when I have free time. To give you an idea, a lot of video transcoding for a live feature.
Those side projects aren't that interesting, but I've been thinking about getting a flipper zero and tinkering around with it. Anyone have one / have any opinions? I'd be interested to hear what people are doing with them
I’m launching my own thing for the first time. Feel pretty nervous about it, but just gotta go for it.
It’s a DNS-based load balancer (“Global Site Load Balancer”). It does healthchecking of various endpoints you tell it to, and will update DNS based on the results of the health checks. Right now I’ve got weighted round robin implemented, but will be expanding into geolocation-based soon.
As far as I can tell, it’s the only GLSB that is all of: open source, supports IPv6/AAAA records, supports DNSSEC, is dynamically reconfigurable and multi-user.
Anyhow, just started closed beta this week. Nervous and excited!
Sounds awesome! If you need any other testers or feedback, I'm happy to give it a shot.
Thank you so much! You can sign up here: https://www.greenlightedns.net/signup
It’s probably gonna take me a couple days to actually add you in, since I wanna knock out a couple bugs first.
Just signed up and mentioned Tildes, looking forward to giving it a try.
Super! I’ve got your info :)
I should be setting up your account and sending you an email tomorrow, I think.
Still working on my aws hosted pihole for ad blocking. I’ve automated deployment via terraform and a couple scripts. I’ve automated Tailscale auth key rotation every 90 days. And Tailscale api key rotation. Now in working on automating defining it as the nameserver for my tailnet.
Learning a lot of terraform and GitHub actions. Any advice welcome!
Edit: Fudge. Just realized I have no permanent tfstate and therefore cannot destroy.
Interesting!
I’m assuming the cloud part is so that you’ll be able to enjoy blockage from any device anywhere – but would it be shareable with other people (like friends/family, not someone who you’d have to worry about regarding API key leakage)?
Can you estimate costs already?
I can share it with anyone in my tailnet which is anyone in my GitHub org which is everyone in my family. :)
Yeah, I put it in aws to have it accessible from anywhere for free (I’m currently using a pihole on a server in my house and my partner asked me to get rid of the server lol).
Costs are €0 bb! I’m using the smallest ec2 and no other resources atm. So I get 750hrs/mo free ADHD I’m not going to exceed it.
Ooh, you're running on one those fancy instances with the weird custom task scheduler patches. I've found them to make interesting decisions sometimes about when things need to be swapped out of memory, but overall I've learned to work with it.
Oof what an amazing typo. Haha
Funny story, this project is my current hyperfixation! lol
I've never thought of that before... should I be changing my SSH and wireguard keys periodically?
The keys in rotating are auth keys for enabling Tailscale on new servers without logging in. Called auth keys, they expire every 90 days. Tailscale automatically rotates session keys for you unless you tell them not to.
Rotating the ssh key isn’t a bad idea, but it’s not in my road map… yet.
I have used git secret to encrypt the tfstate and commit it to my GitHub repo.
That would be so much easier!!! I just made an S3 bucket to use as my tfstate backend. Not hard, but just an added piece of bs.
I've been working on a music library management Python script. This is my first Python code since university, I've been doing C++ and embedded stuff professionally ever since.
The problem:
My music library is mostly in FLAC format (lossless compressed for those unfamiliar). Lossless media takes up a ton of space, so it isn't ideal for streaming from a home server or keeping on a smartphone. The solution I came up with is to keep a mirror copy of my library, but transcoded (a.k.a. converted) to the Opus* format (lossy compression that is much better than mp3). I'm constantly adding to my library, so I need a good method to mirror any changes I make in the lossless library over to the lossy one. Transcoding the entire library to Opus every time I make a tiny change would take way too long, and I don't want to manually keep track of what changes I've made since I last transcoded.
The solution:
A Python script that scans the lossless library, saving info about each file (e.g. filepath, fingerprint in the form of either the last modification time or a hash, the fingerprint from the last time the file was mirrored to the lossy library, etc.) into a yaml file. Whenever I make a change in my lossless library I can scan it with the script to detect changes and mirror only the changes to the lossy side. All non-FLAC files are copied (or symlinked or hardlinked) and FLAC files are transcoded to Opus. It is multithreaded for extra speed.
It supports libflac, ffmpeg, and opusenc codecs (ffmpeg was very annoying to handle signals for). It can also test FLAC files for corruption.
No third-party libraries were usedscratch that, I forgot about PyYAML. It maybe works cross-platform, though I've only tested with Linux.Comments:
I've used AI at work to help debug embedded issues in the past, but this is the first time I've used AI to help build something from scratch. I started with Gemini since that was the only one I could use without creating an account, then moved to Kagi Assistant recently since it's now available for all tiers. I'm not vibe coding, I'm asking questions to:
This approach has worked well to avoid hallucinations. The answers that AI gives to these kinds of questions are super easy to verify with an internet search. I can tell that if I hadn't used AI I would have burned through all of my Kagi searches in the first few days just learning Python again.
If anyone has an idea for what to name this script I'd love to hear it!
*Opus is awesome. FLAC music typically has a bit rate of 1000-1200 Kbps, while the Opus bit rate that people generally agree is impossible to distinguish from lossless is 96-128 Kbps. That's a 10x reduction with no audible difference. For comparison, an mp3 would have to be 192-320 Kbps to reach approximately the same quality.
Sounds fun! I agree with it’s being kinda magical. I wanted to reencode my audiobook library to opus. The m4b container technically supports the opus codec, so in theory it should have worked fine. The problem is many apps don’t support the combination of m4b and opus, even if they support opus in different containers. So I ended up abandoning that project. But I played around with different bitrates. For a typical spoken audiobook without foley or music, I could get it down to, if I remember correctly, 16 kbps without noticeable quality loss. For the more complicated books, the sweet spot seemed to be around 32 kbps. Even at 32, my entire library, which is normally around 300 GB, only took just over 100 GB. Truly a fantastic audio codec.
I wanted to write a simulation for a deck idea I had for Magic The Gathering.
Gyruda has a trigger that mills 4 cards, and puts an even Mana Value creature into play. Well lots of clones are even Mana Value, so you can re buy the trigger!
I wanted to know how many cards on average I would mill over depending on the density of clones.
There is a point where it becomes "deterministic" which is kind of cool!
I implemented a sparse array with a dense index data structure in Zig, with only three mutations: reserve (appends to the end of the array), release (releases any element in the array, leaving a tombstone in the index) and compact (removes all the tombstone and compacts the index). Release is O(1). When the array is compact, append is O(1). If the index is not compact, append may call compact, becoming O(n),
Because for my application the deletions are mostly batched, the cost of compacting (which is O(n)) can be amortized after deletions in this way. I'd call it once after a deletion pass, and then it would remain compact until the next deletion pass.
The next step is to benchmark it. Specifically, I want to compare it to the solution I use in my game: pool-backed linked lists. Performance is very good for the game already, but I just finished and released it so I have some time to play around with ideas that were harder to justify before release.
I have been starting to develop a playdate game. I have never used Lua before, so I am learning that at the same time. I quite like it, but I wish it had a type and error system as mature as typescript. There have already been multiple times where something wasn't working because I mistyped something. In my past typescript projects, those sorts of errors are nearly impossible, because you will get a ton of warnings that you did something wrong. Despite that, I think I quite enjoy Lua.
Right now, I am building a clone/spiritual successor to Adventure from the Atari. I didn't have an Atari, but I did have some "12 games in one" type systems with a joystick that had RCA connectors you plug into your TV. I really enjoyed adventure, even if I wasn't very good at it as a kid. I know it spawned the entire genre of adventure games, but I don't think anything really does what it did well.
So far, I have just been working on assets and tooling. I am using Aseprite, which is also scripted in Lua. There have already been some interesting challenges, most notably color. Adventure used color to differentiate rooms and castles. That is, of course, not possible on the playdate. I have been drawing castles with different designs, since they can't be differentiated with color. I wanted to play with asymmetrical castle designs, and decided to try making one look like it had fallen into disrepair. Here is what I ended up with. Let me know what you think.
Next up is getting collision working and implementing moving between maps. It has been so fun getting back into programming.
I've just finished repairing our microwave oven. We have it for around 10 years by now. It developed fading 7-segmebt LED display segments right around two years mark (we have 2 year warranty here) and started complaining about door open or just started microwaving on its own out of nowhere. Since I have some background in electronics ad programming and I know enough to open microwave oven, I went in.
I don't encourage anyone to do that! You can kill yourself just by touching bad wire even if the oven is disconnected!
There was one integrated circuit for everything including driving the LEDs of said display directly out of the chip's pins. It was predestined to fail at the time they designed it.
I threw out old electronics, made my own 7-segment LED display (using shift registers as I don't like multiplexing when it's not really needed), wired in Arduino and programmed my own software for the microwave. Luckily all he power electronics is switched by 5V signal to switch relays and there is safety wiring so that you can't run the oven with door open - the wiring is open as well (meaning no current can run through it). This was done 7-8 years ago.
It started misbehaving in the last month or so, so I had to go into the oven once more. Since then I own an oscilloscope which I used as the symptoms were pointing to "signal noise" - false readings of signal when pushing buttons or turning the time set wheel. Indeed, that was the problem. I had to make new protoboard PCB to decouple the signal (make it less noisy, more precise/reliable) and I even manged to find my Arduino sketch if I needed to make software fixes. Debouncing made zhe situation better. Not good, but actually good enough to go with it. I put the oven back together and it's working better - it still gets false reading here and there, but it's more like once every 50 clicks instead of every other one. I still could go for software tweaks but I chose not to (for now).
It's unbelievable how dumb the actuall hardware of the microwave oven is - you could just put a throw switch there and run the whole appliance by one switch manually. The electronics is there only to set/show time and do the defrost or power level stuff (which is actually just PWM but real slow, like 10 seconds on, 5 seconds off). And to break the appliance so you have to buy new one. Not me, though!
This is really cool! I almost want to buy a microwave just to build my own microwave controller. For controlling the magnetron, do you just have to send voltage to a relay or something? I figured there would be some complex driving logic you would have to do.
If you want to improve it, you could add a microphone and make a real popcorn mode.
Yup, in my case it was just that easy. There is also 5V power source on the relay board, so I just wired the Arduino in and power it from the original power supply.
If you go for it, stay safe! You really can kill yourself just touching the bad wire inside! I cannot warn you enough, you really have to know what you are doing and what you shouldn't be doing. This is no fun!
You definitely could wire in microphone that would listen for pops and stop the microwave once there is pause in the pops long enough. Great idea! I'm not doing it though, I'm too lazy :-) EDIT: Oh, and I don't eat popcorn that much...
I've been working with my first client with my new business, and have the project in a pre-launch state I'm starting to be happy with:
Live site: https://TheatreBunch.com/
Dev site: https://dev.theatrebunch.com/ - note that entire sections have placeholder content, it's playing around with the design/colours for the most part.
I'm really happy with where this is going. I have a friend who does graphic design and SEO and I outsourced the logo design to her, then customized and tweaked it. (It was originally a light design and I made it dark, did the text and more).
I've recently started learning how to play the keyboard so I've been building some small web apps that use webmidi to help with that. There's options out there but they're either above my current level of knowledge or covered with ads and frankly I just wanted a project to play around with.
The first one I did over the last few weeks was just to remember the notes by name, it prompts me the note name and times how long it takes me to press the corresponding key on my midi keyboard and gives me some stats to track progress.
It's mostly evolving as my very basic level of piano knowledge improves so the next two enhancements are kind of in line with that:
That sounds pretty cool, if I had a midi keyboard I would want to try it out.
You should consider wording the key prompt like "Press the key for the second note in an E major scale". I think that would help you more.
In the future you could add prompts for scales, triads and chords too, e.g. "E major scale", "E" (as in the triad), "E first inversion", "Emi", "E7".
I decided to sit down and learn zig, starting over the Easter weekend. I was planning to do advent of code 2024 in zig, but life got in the way. Ive gone through the ziglings course, and have started setting up the zig build system for advent of code. Its... not a bad build system, not my favorite so far, but so many leagues ahead of cmake and the like.
I've been learning elisp by making an automatic file namer for emacs. It just cuts each word, sorts them based on frequency, then sorts out the top 100 most common words.
The idea is from this horrid one liner from one of my bash scripts
I'm curious, what do you use the automatic file namer for?
I mean, naming files, obviously, but why though?
For me, it's like a post-it note system. It prevents having a bunch of files in my home directory like: asdfsvf.txt