Codex Library

Reader

Read the latest posts from Codex Library.

from noirscape

Annoying dog/Toby Fox

So... Pokemon Sword and Shield is out. It's proving to be divisive, with fans pissed at Game Freak for cutting out the National Dex. This post isn't about that though. Instead, let's talk about it's music. Specifically, let's talk about how Toby Fox is a fucking masterful shitposter.

Toby Fox is a music composer and indie game developer that is mainly known for his work on Undertale, a charming game reminiscent of the JRPG Earthbound in it's style with bullet hell elements. Currently he's working on what appears to be a spiritual successor called Deltarune, which managed to grab the internet.

That said, this isn't his only work or even the thing that put him on the map. No, what put Toby on the map was his work on the Homestuck discography, for which he has provided around 70% of all tracks.

He also composed a track for Pokemon Sword and Shield, which is the subject of this little post.

Preamble: How Toby Fox got into contact with Nintendo

But before we talk about that, I should probably explain how Toby Fox managed to get into a collaboration with Nintendo to begin with. At it's simplest, whilst Toby was on a trip to Japan, he happened to run into Sakurai (from Kirby and Super Smash Bros.), who invited him over to his house to play video games, notably Smash Brothers.

The result of these events caused what appears to have been a friendship between the two, causing Toby to remix Megalovania for the fourth time and having Sakurai put Sans in Super Smash Bros. Ultimate.

Later, Toby was also invited to compose music for Little Town Hero, a game which didn't do so well, but it establishes that a connection with Toby and Nintendo has been formed.

And now... Pokemon Sword and Shield has a tune composed by Toby Fox in it.

The thing is though... the track is a reference to a shitpost Toby Fox made 9 years ago. How? Well, uh... let's talk about that.

Homestuck and MSPA forums

Most people have heard in some form of the webcomic slash internet phenomenon Homestuck. Whether you've read it or not, most people are at least to some extent aware of the... rabidness of some of it's more notorious fans.

Whilst I won't go into detail on the comic itself, the fanbase for Homestuck is... unique. People love to ship characters together (shipping being the act of putting two fictional characters into a relationship), and Homestuck is probably the ur-example of this being taken to it's extreme, with every character being paired up with another character in whatever way you could imagine.

The comics author, Andrew Hussie has mostly encouraged this and takes great delight in making fun of his rabid fanbase. Except... in one element.

You see, before Viz Media bought Homestuck and hosted the comic on homestuck.com, the comic was hosted on Hussies personal site, known as mspaintadventures. Attached to this site was a forum that was intended to discuss the comic.

Because the Homestuck fanbase can best be described as “every horrible and good thing from every single other fanbase out there blended into one” (which is only contributed to by the fact that the comic makes extreme use of pop culture, both obscure and not-obscure), the administrators of these forums inevitably ended up dealing with the worst elements, notably shippers who would pair up underage characters.

In an attempt to curb this, they added a rule to the forums, prohibiting the posting of art involving “pregnant kids”. The rule of course proved to be completely ineffective at stopping the rabid fans and was mocked all around.

And then Toby Fox took a go at it. Taking the forum rule to it's most bizarre form, he created an album called The Baby Is You which very clearly was intended to make light of the rule in question.

It's... its a treat. To explain for those who haven't read the comic: The album is about the character Dave, who is pregnant (note: Dave is male) with his best friend John (who is the protagonist of the webcomic and is also male). It's by all accounts something closely resembling a protest album and the songs very clearly take shots at the ineffectiveness of the rule and is great if you like absurdist humor.

The ensuing result is that Toby Fox got temporarily banned from MSPA forums, the album itself was taken down (but as you can see by the link, it's been spread online anyway) and I'm not 100% on this last part but I think the rule has been reversed.

Now why did I ramble on about an (admittedly very funny) incident that happened in 2010 that most people wouldn't know about. Well... the thing is, that protest album made it's way into Pokemon Sword and Shield.

The Baby is You

Specifically, I'm talking about the track “A Baby Legend – The Baby is 2”, which is the final track on the album. It's essentially a sarcastic recap which then ends in a kinda catchy beat.

And guess what beat made it into Sword and Shield. Yes. That one. Below I've embedded a video about it which compares the two tracks.

And... this is hilarious. Toby Fox, you've done it. Congratulations, you win the internet. I tip my hat off to you, I bloody damn salute you.

 
Read more...

from noirscape

DragonInjector store promotional artwork

Note: DragonInjector promo art used under fair use.

So, yours truly got himself an early copy of the DragonInjector.

In exchange for this, I have been asked to give feedback of my copy, and because I like flexing my writing muscle, I have decided to write a full-on review.

What is the DragonInjector?

The DragonInjector is essentially an all-in-one gadget for Switch hacking. It combines an M0 trinket with a jig and it fits in the gamecard slot. It's a device I've been looking forward to for over a year now, and I'm super curious to see what the actual product looks like. It came in with the mail today, so let's give it a look!

Casing

Image of the case front

My copy of the DragonInjector shipped with a case that makes it look like a Nintendo Switch game. There's not much to speak off for the front, but it gives the entire project a sense of legitimacy I never really got from my DS flashcard, which shipped in a shoddy silver box.

Image of the case back

The back however is where the fun for me begins. I love the little attentions to details here, it really feels like a real back blurb for a switch game and reminds me of some recoatings for the game “Cubic Ninja” that advertised the Homebrew Launcher, and it really just helps give a bigger sense of legitimacy to the product.

The casing also came with a small transparent sticker to prevent the case from falling open. Small, but again, loving the attention to detail.

Image of case inside

Inside the case, the aforementioned love for details just keeps continuing. Bundled exclusively in my copy is a smaller version of the case art, with the inside being signed by the creator (benefits of being an early adopter \^–^).

In addition, the inside version of the case art features a beatiful instruction set on the left, rendered as an SSH client. It features a list of features and explains what each of the included tools are for.

On the right, an infographic detailing how the DragonInjector's battery can be replaced and an infographic detailing how to access the injector and the jig from the gamecard is visible. The build number is written in silver pen.

Also bundled are a USB key to change the DragonInjectors firmware, the injector itself (it'd be trash without one!) and a screwdriver that can be used to replace the battery.

All in all, this case just shows the passion behind this project.

The Injector itself

Okay, so let's talk about the actual thing, the reason I spend money on it to begin with.

Build quality

Picture of the front

The DI is a 3d printed object, but if you'd ask me, that really doesn't serve as a degradation of it's quality, but rather as an attest to how far the quality of 3D printing has come.

Picture of the back

Whilst my copy is not stickered (and instead, I've been given stickers so I can choose the color of my injector), I've been told that future injectors will ship with a sticker on the front that will show the build number.

Injector in the switch

The injector fits very well in the gamecard slot, with considerably little effort being needed to make it fit well. There's a little bit of jankiness in fitting it in the Switch, but honestly, it's negliglibe and should be seen as more this being a casing in the shape of a gamecard slot than an actual gamecard. I've had more issues with a Nintendo DS flaschard in my 3DS.

All in all, solid build quality.

Let's talk about the components.

Picture of jig and payload launcher

Jig

A part of the Injector is the Jig. To access the Jig, you have to slide off the top of the injector, then slide out the jig itself. The first time I did this, the jig actually was a bit hindered and I hade to use my nail to get it loose, but I'm pretty sure this is something that will just be worn to something useful over time.

Picture of jig loose

To test the jig, I put my Switch out of AutoRCM for the first time in 1.5 years and booted it normally.

To use the jig, you just slide it down the right joycon rail at a 45 degree angle, then boot the switch while holding Volume Up. The one thing I do wish had been clearer was the fact that I had to turn the transistor facing away from the switch, not towards the switch (one can argue this is a me moment, but hey).

Injector

Picture of injector

The injector is the bottom half after you slide off the top and is easily the highlight for me. To use it, simply put the USB-C end in your Switch and plug it in your Switch.

This takes me to the booter firmware: DragonBoot. One issue I noticed almost immediately was that I got FatFS error 5. Further investigation, this seemed to have occurred because I was missing a payload for DragonBoot to boot from.

One quick trip to Hekate's download page later, and I now have the latest version of Hekate on /dragonboot/ on my SD card and it worked perfectly.

For a future firmware update to DragonBoot, it would be nice if it would be possible for this to show something nicer than a FatFS error.

Other minor stuff

I tested the dongle. It works... kinda fine? I had some issues with connecting it to my computer, but that was ironed out pretty fast.

I didn't test the scewdriver or the battery yet, but it looks super easy and the fact the screwdriver is bundled means I'm unlikely to risk losing it.

Conclusion

The DragonInjector is an absolute must-have for any Switch hacker. There's some minor prerelease issues with DragonBoot that I'm sure will be sorted out by the actual release and I'm super happy with it.

So... yeah, go pick one up. The actual released injectors can eventually be bought here, so keep an eye out for that.

Disclosure: Product was purchased early. Actual product might have minor differences from this review.

 
Read more...

from noirscape

Or: How to improve your asyncio code!

So uh... yeah, this is just a definition. I'll quickly explain why this is. Also, I'll note that I wasn't brought up on this idea on my own, it's essentially something I found online but I think it's important to keep in mind that a lot of people who do asyncio don't use this pattern and spreading awareness of it will help a lot!

(I modeled this design document after the ones on oodesign.com, except y'know, I use Python code instead of Java)

Producer-Consumer-Worker pattern

Intent

When working in asynchronous code, usage of the producer-consumer pattern is common. The producer-consumer-worker pattern builds on this pattern.

The solution provided here is the Producer-Consumer-Worker pattern.

Implementation

This UML is probably wrong, but at it's simplest:

  • The Producer adds a task to the Queue.
  • The Consumers duty is to retrieve a task from the Queue.
  • When the consumer retrieves a task, it starts a Worker.

Applicability and examples

The reasoning for this is that the normal producer-consumer pattern is not useful for asynchronous code, as it is not resistant to potential exceptions. When running asynchronous code, one of the benefits is that even if one part of the event loop crashes, the rest of the loop can keep running. However in a traditional producer-consumer pattern, this means that in the situation the consumer crashes, the producer will aimlessly keep adding tasks to the queue without a consumer to answer it.

Specific problem and implementation

Example involving possibly crashing code

import asyncio
import random

queue = asyncio.Queue()

async def producer():
    task = {}
    task["crash"] = bool(random.getrandbits(1))
    await queue.put(task)

async def consumer():
    while True:
        task = await queue.get()
        loop = asyncio.get_event_loop()
        loop.create_task(task)

async def worker(task):
    if task["crash"]:
        raise Exception("Crashed!")
    print("Didn't crash!")

async def main():
    loop = asyncio.get_event_loop()
    loop.create_task(consumer())
    for _ in range(0, 10):
        loop.create_task(producer())

asyncio.run(main())
Explanation of methods and objects involved
queue

This is an asynchronous Queue, as provided by the asyncio standard library. It provides the queue that both the consumer and the worker use.

producer()

This asynchronous method determines on a random basis if the worker should crash or not, and then adds the output to the queue.

consumer()

This asynchronous method is started when the event loop begins and constantly waits for new input on the queue (This is what the await queue.get() call is for).

After that it creates a new task for the worker with the task as the assignment and adds it to the event loop.

worker(task)

This asynchronous method is created and started by the consumer. It simply runs a check on if it should crash, and if it does, it raises a generic Exception. Otherwise, it prints a message.

main()

Main asynchronous function and the entrypoint. It starts the consumer and creates 10 producers.

asyncio.run

stdlib function that starts main.

Conclusion

Without the worker involved in this task, if the asyncio consumer crashes (even though in this example it's arbitrary, in cases when working with web APIs which might not always be online) the entire consumer portion would be halted and as a result the loop would seemingly be able to continue fine but as the consumer would no longer be running, the producer will just add tasks to the queue without them ever being ran.

This also improves concurrency as the worker is another task on the event loop, which means that the consumer can continously keep retrieving tasks from the queue without it being blocked by the execution of said task.

 
Read more...

from noirscape

I've wanted to write about Stallman for a long time. Countless drafts have turned through my head, considered arguments and article structure, but whenever I actually wound up sitting down to write them out? I just felt mentally too tired to actually write them.

Not right now though. With Stallman having resigned from the FSFs directors position, I think it's important to take a deeper examination as to why Stallman resigned, what the issue is with Stallman as a whole and most importantly: What this means for the future of the FSF/GNU.

Why Stallman resigned

It's been iterated on a lot, but long story short, a few days ago, Stallman made some appaling comments on the MIT/CSAIL mailing list. These comments specifically concerned Marvin Minsky, the creator of the MIT AI lab. Minsky was one of the people that was implicated in the controversial pedophilia case surrounding Jeffrey Epstein as one of the people that Epstein told one of the accussers to sleep with, however as Minsky died in January 2016, this means that he was never accused formally of the crime (accusations against Minsky came to light in August of that same year).

The comments in question have been incorrectly cited by major publications (specifically, the publications went with the narrative that Stallman said that “she [Epsteins victim] would have been entirely willing”, which is a subtle misquote, as the word missing is “have been presented as entirely willing”, but the difference is somewhat minor-ish on the whole, but more on that in a bit).

As a result of this fallout, Stallman has resigned from the FSF and has been let go from MIT/CSAIL as a 'visiting professor'.

Now, one can argue that because the publications went with an incorrect quote, Stallman is essentially absolved from any blame and this is just another call out from “the esjeedoubleyous that want to destroy tech”. However, I would instead argue that the actual difference between what Stallman was claimed to have said and what he actually said is there, but the resulting impact should still have occurred, because the comments are reprehensible either way.

To be precise, what Stallman said was that Epstein likely coerced his victim to appear as “willing” in front of Minsky. Now this if youre debating on Stallmans level seems like an important distinction. If you live in non-crazy land, this distinction barely matters, because, coercion or not, “I didn't know about it” isn't an excuse that holds up on crimes of this magnitude.

It's also quickly forgotten by most comments I see made on the matter that Stallman tossed this up as an hypothesis, with little evidence aside from “Stallman thinks its logical for Epstein to do this”. You know what we call that? An argument that runs on Appeal to Common Sense. Which is a logical fallacy.

I should probably also add in that Stallmans position at MITs CSAIL was entirely because Minsky sponsored Stallman to come on as a visiting professor in the first place (more on this in a bit).

So what we seem to have here is someone who doesn't seem to be able to understand that his best friend likely might have been a sexual predator and is engaging in apologist behavior for said behavior on little ground other than “I think this makes sense”.

This is irrelevant on whether Stallmans hypothesis is true or not (to be clear, even the story Stallman presents would have landed Minsky prison time as a pedophile under the jurisdiction of the Virgin Islands), but his response to the legal argument (which in this case would be decisive) is uh...

“I think it is morally absurd to define “rape” in a way that depends on minor details such as which country it was in or whether the victim was 18 years old or 17.”

I don't think I have to explain this, but... “minor details such as age when it comes to rape”? Are you fucking kidding me? Blegh.

Anyway, the fallout due to this was... well, the usual situation. People got riled up, Stallman attempted to issue a non-apology, later made the utterly baffling statement on his personal political page (more on this page in general later) that sex with minors is a bad thing and that he finally understands that and today he's been let go from CSAIL and the FSF.

Caught up? Good. Now let's see why this is a thing that should have happened a long time ago.

Stallmans political views

No matter how you put it, Stallman is a political figure. FOSS is by design extremely left leaning in it's nature (particularly the copyleft, which is a core element of these licenses). He is also extremely closely tied to the FSF, to the point where I have noted that I see the FSF and GNU Foundation in general of being a personality cult around Stallman to friends.

With that in mind, we oughta talk about Stallmans views, because they're something that propagates heavily throughout the FSF.

To wit:

  • Stallman is a free speech absolutist, with all the core flaws this implies. He'll stick up for any kind of horrific speech and fundamentally misunderstands XKCD 1357 to apply it to corporations.
  • Stallman believes that necrophilia should be legalized, seeing it as the second thing he would want to have happen to his own body after his death (the main thing being used for medical science).
  • Stallman believes that bestiality should be legalized, mainly not seeing the issue because a parrot tried to mate with his arm once and he found it a funny experience after learning what happened and wouldn't mind it occuring again and because some animals try to mate with humans on their own (ignoring the fact that we cannot see what an animal thinks nor can we ask them about it and as a result can't give consent).
  • Stallman believes pedophilia shouldn't be illegal based on the notion that the main issue surrounding it is a social stigma (to be fair to him; due to the incident I described earlier, Stallman has retracted this statement, but he's held it for ~15 years, so it bears mention!)

Feel properly disgusted yet? Well, like I said, these views tend to exist throughout the GNU/FSF, meaning that whenever Stallman gets flak for his political views, there's a large army of defenders for each and every single one of these.

Other things he believes should be legal, but I couldn't find any direct reasons to (although I could deduce the why): Possession of child pornography and incest.

Oh yeah, he also wants weed legalized, but somehow managed to describe it in the most pretentious way possible:

Besides, I often enjoy rhinophytonecrophilia (nasal sex with dead plants).

I uh... that isn't really disgusting (nor bad, legalization of weed for medical purposes I support), but it kinda sets the tone for anything involving him, doesn't it? A pretentious blowhard who says something using complicated words because it makes him look smart.

Moving on.

Personal Hygiene

Do I... do I have to? Okay, I'll spend as little time on this as possible since this is truly disgusting.

Stallman eats gunk from between his toes. I kid you not, there's a YouTube video of him doing this, look it up, I'm not going to for my own sanity.

On computing

Okay, so we've gotten the already weird parts out of the way, now we have to actually talk about Stallmans influence on computing as a whole.

Stallman is oft credited as the founding father of the Free Software movement, it having born from a series of incidents in CSAIL, which saw a large number of those working in it being poached away by larger corporations. Stallman in response made the “heroic” act of leaving CSAIL and starting the GNU Foundation and the FSF.

Why do I put heroic in quotes there? Because yes, the situation at CSAIL from all accounts I could find on the internet was abhorrent, Stallman never really left CSAIL. He formally resigned from CSAIL, but only for a short while, as he later was given an essentially permanent status as Visiting Professor at the lab (this essentially meant that he got a free office, which in Stallmans case also has been his legal address for the past several decades since his house burnt down in the late 1980s and he hasn't bothered to find a new one since.)

Visiting Professor also meant that while he didn't get paid by MIT for being there, he would have full access to all mailing lists and accounts for their faculties. From accounts I have found on the internet, this for the most part meant that Stallman could spend most of his time popping into software lists and complaining that they should license their work under the GPL or asking for projects that used JavaScript in sites to work without them (this because Stallman has an archaic internet setup that means any page he wants to visit gets send to an email daemon, which downloads and reformats the page and then emails it to him). Very impactful work indeed.

It kinda puts things into a different perspective if this hero just turns out to have been in the same place he's been all this time, except now he's free to spend his time to complain at students not following his ideology.

On actual programming now, for realsies!

Let's now get into Stallmans actual relevant work for the Free Software movement. Whilst he deserves credit for y'know, making the GPL and writing the original version of the GNU coreutils... for the past 10 years or so, Stallmans main influences on the movement have been these:

  • Serve as the public figurehead. (with the issues I mentioned in the political views part, so also a PR nightmare)
  • Make PRs to emacs
  • Complain on mailing lists about arbitrary things that irritate him. (GNU/Linux)
  • Abuse his power as the head of the FSF to keep in a dumb joke about abortion that was incredibly Americentric and unfunny to begin with.
  • Use his power as the head of the FSF to forbid merging code that would improve cross-compatability with not-FOSS software.

That's... not good. We've gone from someone who essentially wrote the foundation of Linux's popularity to someone who can at the most positive be described as a grandpa who yells at cloud and at it's most negative as little above a really persistent internet troll who manages to keep in power only because he started with some legitimacy. (The inbetween and the one I subscribe to: Stallman is a demagogue).

In short, Stallmans contributions as of the past decade don't weigh up against his former status as the head of FSF/GNU.

Luckily he's been fired though.

The FSF moving forward

In the numerous drafts I've made of articles of a similar tone to this one, I often conflated the FSF and Stallman, since again, their views share a lot. However, them firing Stallman gives me the idea that either this view was underinformed or perphaps more likely, has shifted over the years.

That said, even though Stallman is now gone, the views that he's permeated over the past decades have not. The FSF will need to get a tight grip on any of Stallmans “followers” that are currently becoming a very vocal minority on the internet that believe that Stallman shouldn't have been let go and that he's the Jesus of programming.

I do express hope here that the dust will settle though, and that moving forward, the FSF can find a better public face for their beliefs than Stallman.

Tackling one common defense

A common defense that I see pop up whenever people address these issues with Stallman (I'm hardly the first to do so) is that we should give him a pass because he says he is neuroatypical (aka has autism).

I very likely have a form of autism. Several of my friends have autism. None of us are even remotely close to the appalling behavior Stallman displays.

Autism means that I fail reading the room sometimes, misinterpret a joke as being a serious statement, fail to understand a social obligation and so on. And I have worked hard to not have it happen as often. I have learned social cues, and so have many of my friends. If you wouldn't spend extensive time with me, you probably wouldn't even know I had it.

Stallman putting his defense here on autism is offensive to autistic people. Even if he has it, the excuse isn't that he's autistic, the issue is that he doesn't bother learning how to deal with it.

Being autistic doesn't excuse you from being an asshole. It gives you some recompense, but a consistent repetition of the same asshole behavior over and over again just means you're a goddamn asshole.

Conclusion

🦀🦀🦀Stallman is gone🦀🦀🦀

Tags: #FOSS #Stallman #FreeSoftware

 
Read more...

from noirscape

Let's talk about that good old boogeyman of internet security: Passwords. No reason, I just want to talk about it.

Why passwords suck

Let's be honest. Passwords suck. Let's go over why:

  • Too many passwords. Every service needs a password these days. There are initiatives like OAuth that help simplify the process by linking it to a different account, but really that's just shifting the issue to a different service.
  • Too many passwords leads to bad password hygiene: Passwords are often reused (by far the biggest sin of password management).
  • Passwords are also commonly reused, sometimes with a single digit altered.

The band-aid: Password managers

Password managers are a band-aid over the problem. They permit you to create long and secure passwords and you only have to remember your master password to get access to all your passwords.

That said, this essentially turns your password manager into your single point of failure. Once an attacker hijacks your manager, they control your entire system. Not good.

The possible solution: 2FA

2FA is probably one of the few solutions that will prove to be viable in the long run, although to realize it's full potential, it needs to see more use in Desktop tools and be longer than just 6 numbers.

The demon: Apple

Apple sucks. No really, they do. Even with passwords. For whatever stupid reason, sites can instruct Safari to refuse the usage of the Keychain app, and many sites do, thereby obstructing the viability of the Keychain app as an automated password manager.

Screw apple.

Nothing too curious this time, I just wanted to vent a little.

 
Read more...