Below you will find pages that utilize the taxonomy term “Rust”
10 PRINT in Rust vs C
Introduction
We’ve done 10PRINT on a lot of machines.
But we haven’t done a comparison between Rust and C.
For no particular reason, I thought it would be fun to compare the two languages side by side.
A race? Yes, please.
10 PRINT Quick review
10 PRINT is a one-liner program that generates a maze-like pattern using the characters /
and \
.
The program is based on a one-liner BASIC program from the late 70s and 80s. There’s even been a book written about it called: “10 PRINT CHR$(205.5+RND(1)); : GOTO 10”.
A Gentle Introduction to LFSRs
What is an LFSR?
An LFSR is a Linear Feedback Shift Register. It’s a simple way of generating a sequence of numbers that look random.
Used in cryptography and in generating pseudo-random numbers, they are interesting because they are so simple. Shift bits and feed a few of them back into the sequence. That’s it.
Important note: LFSRs are not cryptographically secure on their own. ESPECIALLY 8-bit LFSRs. More on that in the next post on this topic.
A gentle introduction to two's complement
I was recently on a video call with a friend, throwing around some ideas for a new product. I mentioned adding large signed numbers in assembly and using two’s complement. He asked me what two’s complement was. I was a little surprised that he didn’t know. He’s been a Java programmer for more than 30 years. Java and Python programmers (and others like gasp Commodore / MicroSoft BASIC) don’t have a native unsigned integer type. The language takes care of the details for you.