Introducing: What's My Word?

how many megabytes is the word list? how do you paste it without breaking makecode?

It doesn’t take much space; the whole project is only 120 kB. (That’s 120 kilobytes — so, about 1/8 of a megabyte.)

I wrote another program that generated the wordlist in TypeScript (i.e., my program generated the code for the string array) and the strings that represent the buffers. Copy and paste work just fine in MakeCode. I’ve never had a problem with them.

1 Like

am I able to paste characters into makecode like “󠇪”? (that is a 0-width character) (there’s a change I accidentally didn’t type it), basically characters other than 0135geu-#?+`;÷ so that I can do that? also, how many bytes is each character?

(just so you know I know how bytes and kilobytes and etc are made (8byte=1KB, 1024KB=1MB, 1024MB=1GB, etc.))

Can you paste a zero-width character? Sure, if you can copy it. Will it do anything? It depends. Where are you pasting it?

The Monaco editor (used as the basis for the editor for typing languages in MakeCode) accepts the full set of Unicode characters. Each character, then, can be four bytes in length.

No … 8 bytes is … 8 bytes, or 64 bits, or 16 nybbles. 1 kB is 1,024 bytes. Sometimes, you’ll see kiB, which usually means 1,000 bytes. You’ll also see kb, which means 1,024 bits. (See WoofWoof’s post below.)

2 Likes

Oops I typed that wrong, I was tired. So theoretically I could copy paste part of a binary file as 4-byte unicode unicode values (I have notepad and notepad++ if that helps)?

(actually this should probably become is own topic but idk what to name it and idk if it should)

Ah. You finally asked the question that you intended to ask.

Short answer: Not a great idea.

Long answer: Sure, you could paste binary data into the editor … but then what? How are you going to declare it? Are you storing it in a variable? What type of variable?

TypeScript does not have a native “binary” type … not really, anyway So, you will need to translate your binary data into a form that you can use in TypeScript. The safest way to handle binary data is to translate it into a form that you can easily copy and paste. One form is hex-strings, which is how images are automatically stored in MakeCode Arcade. As a hex-string, you could load the data into a buffer and then manipulate it.

let myData: string = 'ADA7A5741A16'
let binaryData: Buffer = Buffer.fromHex(myData)
game.splash(binaryData.getUint8(2))

Now, there is a Buffer.fromUTF8() function, so you could try a copy-and-paste of the binary data as UTF-8 character codes and try to parse it … but you’re putting a lot of trust in the ability of your operating system to copy and paste binary data.

2 Likes

Windows 11? (my dad owns the computer so I don’t know all the details)

also, in the future I’m likely doing PCM sampling (I have a topic with Richard of that), a small mp3 file (around 1 minute at 11025 hz or less) is like maybe a megabyte while still sounding good, so I need to compress that somehow. also, why can’t I make raw unicode the data of a variable?

You got them mixed up. KiB is the one that is 1024, and kb can sometimes be 1024 depending on the situation but is “officially” 1000 bytes.

3 Likes