mcc Profile picture
4 Jun, 9 tweets, 3 min read
I really, really hate using software that doesn't come with documentation
UPDATE: After a *lot* of fiddling I have managed to get to reduce the "unknown function code" from 0x935 to 0x7a. Is that better? It's going down. Is going down better?
What I'm trying to do is call this function. This is all the docs I have. Note the lack of a type on "key". In fact, the key MUST be a very special object created by an entirely other npm package, which can itself only be constructed with the output of a third npm package
I've got a 256-byte data blob. I want to pass it to this network function. But it doesn't know how to take data. It only knows how to take fucked up specially formatted *strings* that encode binary as base64 with some two letter header. I can't make the string. I am miserable.
I found an explanation by searching node_modules for "new CID" and finding this weird link. "That's it". What do you mean "That's it"?? Not a goddamn word of this made sense!! Why can't I just give you a byte buffer?!
I solved the difficult and interesting problem at the core of this project last December. I put it aside for 6 months because js made a crash caused by a one-letter typo impossible to debug. Now the project is at risk of failing because nobody in js world documents their shit
So in retrospect, here's what was happening in the above thread.

1. NPM package X publishes an object. This object simultaneously satisfies 3 interfaces simultaneously.
2. The README on github has 5 links. A link to itself, 3 images linking to the 3 interfaces, and a "summary"
3. The "summary" lists the combined information for the 3 separate pages linked by the 3 interfaces, but without certain data, like types.

I couldn't figure out what to do because I couldn't figure out I was supposed to click each banner image until I found the function I wanted
This is infuriating because I suspect if I submitted a bug report offering ways to improve the README it would be accepted, but I'm not actually sure what should be done to improve this. It's clearly a bad approach which tripped me up for a full day, but I can't find a better one

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with mcc

mcc Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @mcclure111

3 Jun
So… this is odd.
Sublime Text did an update.
Now it is running like mud and pegging the CPU at 100%.
I eventually realized it was doing this "indexing" task.
Indexing… what?
I think it might be doing some parsing operation on multi-megabyte webpack-generated js files D: D: D:
Also the dock icon updated and now it follows the new Mac OS HI standards, which suck :/ They made every icon a rounded rectangle and now I can't distinguish them by shape anymore
It is SUCH an awful feeling trying to type on a MacBook which is overheating. The keys are made of lava
Read 16 tweets
2 Jun
Hey Javascript people. Let's say I'm sitting here and going "I need to sign a binary blob then later verify that signature... I know, I'll use SubtleCrypto.sign". Do you feel a need to fling my laptop aside and yell "NO! You fool!! Use ____ from NPM!!" instead?
Also:
- How do I know which of the four crypto.subtle.sign algorithms to use?
- subtle.sign and subtle.encrypt use a totally different. Is there a way to use one key for both signing and encryption?
- I don't see nothin in the docs about like... IVs. Isn't choice of IV important
This is really hard maybe I'll just use TweetNacl :(
Read 4 tweets
2 Jun
Hey so uh if this is for real: What are the chances we could successfully run a boycott threat campaign against Square and Sega demanding they cancel their planned NFT releases this summer
Sega and Square both made similar announcements around the same time (NFTs coming at a vague time this summer); the similarity suggests to me some specific common NFT vendor (in Japan?) got to them. But the lead time creates a sliver of a chance for organizing
(The logic of a boycott is hope Sega/Square may be willing to drop the thing if they realize profits are no longer worth the cost. But if a 3p vendor is driving the NFT campaigns, that might not matter—maybe Sega/Square get a fixed $N million regardless of what the NFTs sell for)
Read 4 tweets
2 Jun
TypeScript is basically the only reason I'm able to write JavaScript. At all. Everytime I interact with a JS library that doesn't have typings I'm reminded of this at a deep level. "protocol.include()" "protocol.include" is not a function" How the hell was I supposed to know that
Anyway just lost a day or two of time because
1. Writing callbacks/async functions
2. Something in the guts of the system calling the callbacks was catching exceptions and not printing the errors
3. Called a nonexistent function in a callback because there's no typings or docs
4. Invalid function call throws an exception, callback caller throws away the exception, my debug printf on the line after the invalid function is not printed
5. I assume, because the debug printf isn't seen, that the entire function is not being called

THIS HAS HAPPENED BEFORE
Read 7 tweets
2 Jun
So: I want to talk about Returnal.

What I want to convince you is *this is the Metroid Prime game you have been waiting for for years*. Assuming you've been waiting for a Metroid Prime game. There's elements of Hades and other stuff in there, but Metroid Prime sets the gamefeel.
Combat is pure MP. A combination of hitscan-for-you, projectiles-for-enemies and homing elements make shooting feel like the MP lockon. Since enemy projectiles are slow moving, you're mostly dodging while maneuvering terrain like you were in MP. Dash feels like target-jump.
You crawl a rainy alien planet while progressively unlocking upgrades. Instead of backtracking there's a sort of forward-tracking— you encounter rooms you can't solve yet, until you get an upgrade in the metagame and think "ah! I can now solve [x room] when it comes up at random"
Read 6 tweets
24 May
This game I have been working on for three years, slowly calcifying around what started as a rapid-prototyping demo, has a very important function that draws a scene. The function takes two arguments, a scene, and "realBig". If "realBig" is true, the scene is drawn 4 times larger
I don't... I don't remember why realBig is there. I can't fathom why I'd need to sometimes draw it bigger than other times, much less by precisely a factor of 4. This function is called in three places, in two realBig is true, in the third it is false.

What.
This project has basically been me going in with a well-honed, carefully-thought-out mental list of mistakes to never make in a long-running game project, and then committing all of them
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(