HNHacker News
TopNewBestAskShowJobs

retrodaredevil

114 karma · joined May 6, 2022

Software dev https://github.com/retrodaredevil
submissionscomments
retrodaredevil··on Aider in Your IDE
I've been giving this a try for the past day and thought I'd talk about my experience setting it up in IntelliJ's terminal.

First, if you're going to use this in the IntelliJ terminal, make sure to use the dark-mode flag. Honestly the IntelliJ terminal doesn't do the best at rendering Aider's output because IntelliJ's terminal doesn't really like things that update frequently. It still works pretty well and Aider has nicely formatted output in general.

Using llama3.1 8B locally is OK at best, and makes incorrect changes at worst (the 8B model isn't really recommended in Aider's documentation, anyway). I only have 8GB of vram, so I can't really run any better models locally. I gave gpt-4o a try and it works pretty well at editing code. I probably won't pay for OpenAI access forever, though. https://aider.chat/docs/llms.html says that Gemini 1.5 Pro can be accessed for free and works decently, so maybe I'll give that a try next.

The git integration is useful, but I don't really like that Aider will commit to my current branch to make it easy to undo its changes. I like changes being easy to undo, but I don't really want to have to squash these changes before pushing. I disabled the auto commits, and now I just have to make sure that I don't let Aider run wild on any file with a bunch of changes on it.

Maybe the automatic commits work for others' workflow, but it won't work for mine. I'll keep playing with this because it seems really cool.

retrodaredevil··on My Favorite Self-Hosted Apps Launched in 2024
I don't find debugging in docker containers difficult, but maybe that's only because I've been doing selfhosted stuff in docker for a few years. Usually exec'ing into a bash she'll inside the container satisfies my need to easily run commands inside the container.

What about debugging is difficult for you when docker containers are involved?

retrodaredevil··on Go Is a Well-Designed Language
Not sure how I didn't find this before, but https://github.com/zyedidia/generic looks like a decent library.

Although there are some decent libraries out there for this kind of thing, my complaint mostly stems from the fact that a lot of existing code doesn't involve generics yet.

I think I remember skimming an article about for range loops on Hacker News a while back, but again, my main complaint is still that existing code exists in a way that doesn't incorporate all these new features yet.

retrodaredevil··on How do non-software engineers feel upon reflection, about their degrees?
I ended up doing more actual programming in two of my Computer Engineering classes than I did in most of my computer science classes. We actually learned about structuring programs and adding useful abstractions to our microcontroller code, something that was only touched on in some of my early CS assignments.

I feel like so many CS classes are all about theory while a good chunk of CE classes actually have you writing code. I should have taken more CE classes, but I at least feel like I got to take some of the fun ones.

retrodaredevil··on Go Is a Well-Designed Language
I like simple languages without bells and whistles but for me, Go has some flaws that I cannot look past.

Specifically the map type. Unlike some Map implementations in Java, maps in Go are not ordered and there is no way to order them unless you want to keep a slice representing the order of the keys. Keys in these maps must be comparable, which means that unlike Java, you can't just implement equals() and hashCode() to make your type comparable. Maps and slices are not comparable, so if you use either in a struct, that struct is no longer comparable. Since map keys must be comparable, you'll have to convert your struct to a comparable type like a string if you want to use it as a key to a map.

You can always look for a third party library for more data structures, but the last time I looked those libraries didn't support generics yet.

Sometimes you'll find a standard library function that takes an interface{} and might panic if you give it a value it doesn't like. This is especially the case for library functions that want to operate on slices. Slices can be generic, but you'll still find many functions that accept interface{}, so you're left with library functions and third party libraries that take any as the type of an argument and expect you to read the documentation so that you don't accidentally pass the wrong type.

interface{}s are comparable sometimes, and if you compare two types that aren't actually comparable, you'll get a panic.

retrodaredevil··on Software creators are the new content creators
When I think of content creators, I think of YouTubers and the platform they are tied to: YouTube. I the idea this article brings up: like the short or long form content that content creators make, there will eventually be something analogous to that for software creators.

Arguably, there already is. I mean people make games for entertainment, but to play those games, one usually has to go out of their way to download said game, or at least navigate to another website to play the game on their web browser.

I wonder if there will ever be a platform, like YouTube, that is locked down such that you play or use some piece of software on that website and have all the social features off to the side, along with recommendations for other pieces of software to click on and explore.

I mean, obviously the web is a vast place with a bunch of cool things all over the place, but the discoverability is lacking for software compared to the discoverability of videos on YouTube. I don't necessarily like the idea of the commercialization and centralization of software discovery, but I do wonder if that would ever take off like the author seems to be hinting at.

retrodaredevil··on Blackcandy: Self hosted music streaming server
The cool thing about MusicBrainz Picard is that it puts not only an ISRC metadata tag on each file, but also a UUID for the MusicBrainz recording and for the MusicBrainz album id.

The idea here is that if you use something like MusicBrainz, you can actually retag all of your files in bulk if necessary because MusicBrainz Picard knows exactly what release each file belongs to. You can then configure MusicBrainz Picard to tag your files to your liking. It's a really great piece of software.

If you are tagging files manually, I think an ISRC tag is the bare minimum because it can allowed automations like MusicBrainz Picard to easily identify what each file is.

As for what version of ID3 or ID2, I'm not sure. It might depend on the software you use to play the audio files. The reason I personally use MusicBrainz Picard is because its MusicBrainz specific metadata is read directly by Plex, so even if the other metadata on the file is bad for some reason, Plex will match the MusicBrainz tagging with the correct release. I mean, Plex uses MusicBrainz internally for its metadata, so it's a safe bet for my purposes.

retrodaredevil··on Blackcandy: Self hosted music streaming server
Most self-hosted services metadata is only as good as the metadata on your audio files. I think using something like MusicBrainz Picard or beets to tag your media well is required, along with making sure that all files of a given album are in the same folder. (Plex has what seems like strict file naming conventions for music, but really all you need to do is make sure each album has all its files in one folder).

If you're interested in something more automated than having to use a program to tag your media, then I'm not sure what a good option is. Most people that don't use streaming services and have a digital music collection are tech-savy and don't mind going through the extra effort of tagging the media.

retrodaredevil··on Translating 10M lines of Java to Kotlin
It's safe to say that Android is definitely moving away from Java in terms of new language features. I mean, if you want to support older Android versions and use modern Java features or newer parts of standard libraries, you'll usually have to rely on desugaring or making sure you're using classes that are supported in Android.

IMO, Android is moving away from modern versions of Java. Java and its underlying standard library will always play a big role in Android development.

The way I see it, Kotlin makes a lot of sense for Android development because Kotlin can introduce new things in its standard library that make older versions of Java look ancient. It's not like you can use new Java features in Android, so using Kotlin makes people not care as much about new features of Java that are only available in modern versions of Java.

retrodaredevil··on How we centralized and structured error handling in Golang
Exceptions have a hierarchical nature to them in most languages, or at least have some sort of identity to them. Your correct that the author doesn't try to change the way errors are propagated, but you can see similarities between what the author is creating themselves, and what already exists in languages with exceptions.
retrodaredevil··on Go should sometimes be a no-go
Its generics aren't as advanced as Java's or any other language with generics for that matter. Plus most things are now only adding support for generics, so there's a fragmented ecosystem of code before and after generics were introduced.
retrodaredevil··on A Brazilian CA trusted only by Microsoft has issued a certificate for google.com
Let's assume that some malicious third party has control of the certificate that was created by this fishy CA. The main attack that they could carry out is a man in the middle (MitM) attack. This attack requires this malicious third party to be able to intercept and change the contents of requests being sent to google.com and someone's web browser.

A MitM attack can be easily carried out by someone in control of an ISP, or someone in control of a WiFi network. So, if you trust your ISP and your WiFi network, realistically you have nothing to worry about.

The reason that this issued certificate could allow an attack like this to happen is because all websites nowadays use HTTPS connections, and certificate authorities are the entities that tell your web browser that certain certificates are legit. They confirm that a website is actually that website.

If you visit some website and someone tries to do a MitM attack between your web browser and that website, the web page should fail to load because if they try to change the certificate, your web browser should reject it because it is invalid.

retrodaredevil··on Discord API Errors
I have individually addressable LEDs, so I created a domain specific language (DSL) to control the LEDs, meaning controlling the pattern of the LEDs is best done by sending a message to it.

Honestly the DSL really isn't that great. I've been meaning to redesign it using something like ANTLR rather than the mess that I made a few years ago.

I do eventually want to have a local-first way to send messages to the program, but creating that isn't worth my time at the moment.

retrodaredevil··on Discord API Errors
Meanwhile I cannot turn my living room LED lights on or off because I control them through discord. I guess that's what I get for relying on a messaging service to control my lights.
retrodaredevil··on I Don't Have Spotify
Additionally, there's no way to buy the Dolby Atmos mixes of most albums yet. Spatial sound mixes might actually have a chance at going mainstream, but you'll have to pay for these subscription services to access them.
retrodaredevil··on Show HN: kew – A Terminal Music Player for Linux
I've been using Plexamp for the past 4 years, and its been great for music on my phone and computer. One thing it lacks is a good offline mode. Recently I started syncing my media to my laptop as a backup, and as a way to locally play 5.1 FLAC audio (Plexamp doesn't support 5.1 audio).

I'll have to check this out. I wonder if it can play 5.1 audio correctly?

retrodaredevil··on CouchDB 3.4.1 Released
I'm using it as a database for my application, SolarThing: http://github.com/wildmountainfarms/solarthing

I was naive when I chose it (I was just starting to program then), but it has served me well. It's replication feature is simple to setup and is robust. It uses a REST API for any calls to the database, and it is a well designed API. I don't use all its features, but I really like it for the ones I use.

retrodaredevil··on Better Dotfiles
Shouldn't you at least put those environment variables in ~/.profile? You'd want to make sure applications like VS Code and whatnot pick up the configurations. ~/.zshrc would only be used for interactive zsh sessions, which not all applications would respect/use.
retrodaredevil··on Firefox rolls out Total Cookie Protection by default to more users (2022)
I use this extension to do just that: https://addons.mozilla.org/en-US/firefox/addon/cookie-autode...
retrodaredevil··on Pi-CI – A RasPi 5 emulator in a Docker image for creating and flashing configs
This seems similar to https://github.com/solo-io/packer-plugin-arm-image

I believe that can also work in non-RPi images, but I didn't get very far in the Pi-CI docs so maybe that does too.

retrodaredevil··on GraphQL Is a Trap?
People seem to be complaining about the server component of GraphQL being too hard to maintain, but I'm curious what language and tools they are using. I find that using a code first approach with a language such as Java can provide pretty much the same maintenance as something like a REST API, but for me it naturally fits into a GraphQL API as well. Plus, possible server side calculations (e.i. asking for Fahrenheit instead of Celsius) just don't get executed if they don't need to be. I find the tooling around all of this quite natural (at least for a code first approach).

Some people want GraphQL to provide more advanced features such as filtering or some part of the query involving some business logic when, you can just create a specialized query for that. You would likely create a specialized query if you were using a REST API, unless of course you decide to needlessly complicate your REST API.

Consuming GraphQL APIs is also very pleasant. In a React web project I was working on I was able to set up some code generation from a GraphQL schema so I could get type checking in my TypeScript code. I'm sure this is all possible using some sort of schema for your REST API, but it's going to be more difficult. Of course, if you are trying to handle everything in the frontend and just want a blob of JSON data, then GraphQL may not be for you.

← PreviousPage 2 of 2