Natural Language AI In Your Next Project? It’s Easier Than You Think

Want your next project to trash talk? Dynamically rewrite boring log messages as sci-fi technobabble? Happily (or grudgingly) answer questions? Doing that sort of thing and more can be done with OpenAI’s GPT-3, a natural language prediction model with an API that is probably a lot easier to use than you might think.

In fact, if you have basic Python coding skills, or even just the ability to craft a curl statement, you have just about everything you need to add this ability to your next project. It’s not free in the long run, although initial use is free on signup, but for personal projects the costs will be very small.

Basic Concepts

OpenAI has an API that provides access to GPT-3, a machine learning model with the ability to perform just about any task that involves understanding or generating natural-sounding language.

OpenAI provides some excellent documentation as well as a web tool through which one can experiment interactively. First, however, one must create an account and receive an API key. After that is done, the doors are open.

Creating an account also gives one a number of free credits that can be used to experiment with ideas. Once the free trial is used up or expires, using the API will cost money. How much? Not a lot, frankly. Everything sent to (and received from) the API is broken into tokens, and pricing is from $0.0008 to $0.06 per thousand tokens. A thousand tokens is roughly 750 words, so small projects are really not a big financial commitment. My free trial came with 18 USD of credits, of which I have so far barely managed to spend 5%.

Let’s take a closer look at how it works, and what can be done with it!

Continue reading “Natural Language AI In Your Next Project? It’s Easier Than You Think”

Sunrise Keyboard Looks The Part

If you’ve been to a bar sometime since the 1930s, you’ve probably spied someone drinking a Tequila Sunrise. It’s a drink that mimics the beautiful colors of the dawn. In much the same way, so does this Sunriser keyboard build from [crashl1445].

Built for a high-school engineering project, the build looks resplendent with its yellow case, paired with yellow, orange and pink keycaps to produce the wonderful sunrise aesthetic. The build relies on an Elite-C v4 microcontroller, an off-the-shelf device specifically designed for building custom keyboards. As you might guess from the name, it features a USB-C port, serving as a modernized alternative to the Arduino Pro Micro for custom keyboard builders. KTT Rose switches are used as per [crashl1445’s] own preference, and there’s even a rotary encoder which acts as a volume knob, installed right by the arrow keys. The case is printed in several parts on a Prusa Mk3+, as the keyboard wouldn’t fit entirely on the build plate as a single piece.

The best thing about building your own keyboard is that you can design it entirely to suit your own preferences and aesthetic; we think [crashl1445] did a great job in this regard. If you’re cooking up your own sweet keyboard build, don’t hesitate to let us know!

Color(ing) Computer Needs No Batteries

While Radio Shack did have the Color Computer, we don’t think they had this in mind. [Pepepépepe] has some coloring book pages and simple rules that let you simulate logic circuits using a crayon. The downloadable ‘zine has hand-written instructions and several examples.

Keep in mind, this is a computer in the same way the old logic kits in the 1960s were computers. They are really demonstrations of digital logic circuits. To work the “computers”, you pick two colors, one for a square and the other for a circle. You color pathways until you reach a “nory.” The nory, which looks suspiciously like a slingshot with eyes, has a special rule. If both branches of the nory have your circle color on them, the output of the nory will be the square color. Otherwise, the color coming out is the circle color.

Continue reading “Color(ing) Computer Needs No Batteries”

How The IBM PC Went 8-Bit

If you were around when the IBM PC rolled out, two things probably caught you by surprise. One is that the company that made the Selectric put that ridiculous keyboard on it. The other was that it had an 8-bit CPU onboard.  It was actually even stranger than that. The PC sported an 8088 which was a 16-bit 8086 stripped down to an 8 bit external bus. You have to wonder what caused that, and [Steven Leibson] has a great post that explains what went down all those years ago.

Before the IBM PC, nearly all personal computers were 8-bit and had 16-bit address buses. Although 64K may have seemed enough for anyone, many realized that was going to be a brick wall fairly soon. So the answer was larger address buses and addressing modes.

Intel knew this and was working on the flagship iAPX 432. This was going to represent a radical departure from the 8080-series CPUs designed from the start for high-level languages like Ada. However, the radical design took longer than expected. The project started in 1976 but wouldn’t see the light of day until 1981. It was clear they needed something sooner, so the 8086 — a 16-bit processor clearly derived from the 8080 was born. Continue reading “How The IBM PC Went 8-Bit”

Book Teaches Gaming Math

If we knew how much math goes into writing a video game, we might have paid more attention in math class. If you need a refresher, [Fletcher Dunn] and [Ian Parbery] have their book “3D Math Primer for Graphics and Game Development” available free online. The book was originally a paper book from 2011 with a 2002 first edition but those are out of print now. However, math is math, so regardless of the age of the book, it is worth a look. For now, the online version is a bunch of web pages, but we hear a PDF or E-reader version is forthcoming.

There’s quite a bit of discussion about vectors, matrices, linear transformations, and 3D graphics. The last part of the book covers calculus, kinematics, and parametric curves. Some of these topics will be of interest even if you don’t care about graphics but do want to learn some math with practical examples.

Continue reading “Book Teaches Gaming Math”

Falling Down The Labyrinth With Wooden Microphone Design

It used to be that when we featured one of [Frank Olson]’s DIY ribbon microphone builds, it was natural to focus on the fact that he was building them almost exclusively from wood. But despite how counterintuitive it may seem, and for as many comments as we get that his microphones shouldn’t work without metal in the ribbon motors, microphones like this wooden RCA Model 77 reproduction both look and sound great.

But ironically, this homage features a critical piece that’s actually not made of wood. The 77’s pickup pattern was cardioid, making for a directional mic that picked up sound best from the front, thanks to an acoustic labyrinth that increased the path length for incoming sound waves. [Frank]’s labyrinth was made from epoxy resin poured into a mold made from heavy paper, creating a cylinder with multiple parallel tunnels. The tops and bottoms of adjacent tunnels were connected together, creating an acoustic path over a meter long. The ribbon motor, as close to a duplicate of the original as possible using wood, sits atop the labyrinth block’s output underneath a wood veneer shell that does its best to imitate the classic pill-shaped windscreen of the original. The video below, which of course was narrated using the mic, shows its construction in detail.

If you want to check out [Frank]’s other wooden microphones, and you should, check out the beautiful Model 44 replica that looks ready for [Sinatra], or the Bk-5-like mics he whipped up for drum kit recording.

Continue reading “Falling Down The Labyrinth With Wooden Microphone Design”

Nanovolt Meter Requires Careful Design For Accuracy’s Sake

Measuring voltages is fairly straightforward most of the time. Simply grab any old cheap multimeter, hook up the probes, and read off the answer. If, however, you need to measure very tiny voltages, the problem gets more complex. [Jaromir-Sukuba] designed a nanovoltmeter specifically to deal with this difficult case.

The nanovoltmeter is exactly what it sounds like: a voltmeter that is sensitive and stable enough to measure and report voltages on the scale of nanovolts. Having a tool that can do this reliably can be very useful when it comes to measuring very small resistances or working with ever-so-slight differential voltages. Continue reading “Nanovolt Meter Requires Careful Design For Accuracy’s Sake”