HNHacker News
TopNewBestAskShowJobs

amjoshuamichael

188 karma · joined April 30, 2023

https://aaaa.sh

i'm looking for work. email me through my university: jjc8794@rit.edu

submissionscomments
amjoshuamichael··on my-new-rust-binary-search
Wow, this binary search implementation is sure to reduce code duplication. It's so elegant! Can I try?! Here's my implementation of a rust program that can do anything!

```

pub trait Program<T> {

    pub fn run(self);
}

pub fn run_program<T: Program>(program: T) {

    program.run();
}

```

Boom. Just look at the code. How could it be simpler? This works for any struct that implements the `Program` trait.

/s

While the code in the original post is elegant, and cool from a "hey look what i can do!" perspective, I really feel like at some point we lost the plot on templates with Rust. When you try to finagle an implementation of a general algorithm, you just end up with a solution that works poorly in all cases, instead of one that works well in most cases.

I've written a lot of Rust, and I definitely know what it's like to get high off of your own template fumes. I once wrote a function with five generics and two trait constraints and I thought it was the coolest shit I'd ever done. But really, I could have just written, like, three discrete functions, and it would have been clearer and smaller.

If someone used something with binary search algorithm other than the Mid implementation shown in the post, that would categorically be bad code from someone who was trying to be too clever. If someone has a unique binary search to do, they should write it themselves. That way, the whole algorithm will be on display, and it will be easier to see ways to make it simpler or improve it in the context of the unique search operation. Also, it will be much clearer.

https://en.wiktionary.org/wiki/thneed

amjoshuamichael··on Transformers in music recommendation
One resource I use a lot that I didn't mention in my comment is https://rateyourmusic.com/. I find it's most helpful for finding the "canonical" albums & artists in a genre you're unfamiliar with. You can search by genre, influences, and year range, and its listings are generally very accurate. It also just has a culture of having more in depth and well written reviews, so if I'm looking at an album I've never heard of, I often get to read a review by someone who's been listening to it their entire lives. Much more helpful thoughts & opinions than someone whose job it is to review music (though I do enjoy reading some music critics blogs).
amjoshuamichael··on Transformers in music recommendation
I sometimes wonder if we're looking in the wrong place with music recommendation systems. I've tried both Apple Music and Spotify; it's rare that I hear a song come through on the linear recommendation stream and think to myself "oh my gosh! that's exactly what I wanted!" For me, discovering new music is a branching experience, where I'm constantly listening to little bits of different things, figuring out what I like, and then looking online on forums and blogs to see what's similar to that. It's surprising that the company that owns YouTube, a platform driven by user choice and 'rabbit-hole discovery', would be looking for a new way to feed users linear song recommendations. I would much rather be able to see several 'similar songs' while listening to something, similar to YouTube's recommendation tab. Alas, no streaming service seems to have implemented this (not even YouTube music, afaik).

https://cosine.club/ is the closest I've seen to the ideal branching system. My understanding is that it uses vector embeddings to search for songs that are similar in sound, and it works shockingly well for that purpose. However, it has a limited song database. Also see https://everynoise.com/, which is no longer updated. These use vector embeddings in similar ways, but the exploration experience is controlled by the user, not by a list-generating ranking model. I definitely think that AI-tech is the future of music recommendation, but I would prefer to see more research by large companies in to these user-driven systems, instead of the 'similar autosuggested list', which is, by its very nature, only ever 'good enough.'

amjoshuamichael··on Ruffle: Flash Player Emulator
Ah, good idea! For those who are curious, here is the completed set of links.

https://www.slaveryinnewyork.org/flash/Gallery2Responses2.fl... https://www.slaveryinnewyork.org/flash/Gallery7Responses2.fl... https://www.slaveryinnewyork.org/flash/Gallery9Responses2.fl...

The videos are densely packed with great insight from many different points of view. I'm very happy I was able to watch them.

amjoshuamichael··on Ruffle: Flash Player Emulator
Discussions about Flash emulation always delve to Flash games, but beyond that, I think one of the big benefits is several informational websites that still rely on flash that haven't been able to catch up. The New York Historical Society exhibit Slavery in New York has a page called [The Merchant's House](https://www.slaveryinnewyork.org/gallery_3_1.htm) where they go through items and explain how "Everything was touched by slavery." The online version of the exhibit has a lot of information bits that rely on flash, but that one was personally my favorite. One of the benefits of a project like Ruffle is that we can maintain these works–now that the exhibit is gone, it's the only way to view this written work, and reap the benefits of the extensive historical research done.

The only thing I've seen it fail with is the [video galleries]https://www.slaveryinnewyork.org/gallery_2_responses.htm) on the same exhibit site. They're supposed to be video clips that people took in dedicated booths after going through the exhibit. I've read about the exhibit extensively and it seems like these videos were a really good insight into the way the New York public viewed slavery at the time: "They have the awkwardness of amateur home videos: background noise, long silences, people looking away from the camera." (taken from The Anger and Shock of a City's Slave Past, New York Times) It's supposed to be a subset of some 400 videos, but I can't get Ruffle to work on these pages specifically. I've had a couple flashes of audio come out of the tab while trying to view one, so I know that something is going on, but I've never been able to watch any of the videos. Does anyone with more knowledge than me know what's going on here? I'd hate to see all that disappear.

← PreviousPage 2 of 2