Bridging A Gap Between LLMs And Programming With TypeChat

By now, large language models (LLMs) like OpenAI’s ChatGPT are old news. While not perfect, they can assist with all kinds of tasks like creating efficient Excel spreadsheets, writing cover letters, asking for music references, and putting together functional computer programs in a variety of languages. One thing these LLMs don’t do yet though is integrate well with existing app interfaces. However, that’s where the TypeChat library comes in, bridging the gap between LLMs and programming.

TypeChat is an experimental MIT-licensed library from Microsoft which sits in between a user and a LLM and formats responses from the AI that are type-safe so that they can easily be plugged back in to the original interface. It does this by generating JSON responses based on user input, making it easier to take the user input directly, run it through the LLM, and then use the output directly in another piece of code. It can be used for things like prototyping prompts, validating responses, and handling errors. It’s also not limited to a single LLM and can be fairly easily modified to work with many of the existing models.

The software is still in its infancy but does hope to make it somewhat easier to work between user inputs within existing pieces of software and LLMs which have quickly become all the rage in the computer science world. We expect to see plenty more tools like this become available as more people take up using these new tools, which have plenty of applications beyond just writing code.

Watch A Web Page Fetch Itself Over TLS, Complete With Commentary

TLS, byte by byte performs an unusual and interesting function: it fetches itself over HTTPS, and provides a complete annotation of what’s going on in the process, one byte at a time. Visit the site and give the button a click to watch it happen, it’s neat!

Transport Layer Security (TLS) is what’s responsible for encrypting traffic over the internet, and it’s normally implemented on top of TCP to encrypt an application-layer protocol like HTTP (resulting in HTTPS and the little padlock icon in browsers indicating a connection with a web site is encrypted.) Back in the day, traffic over the internet was commonly unencrypted, but nowadays no communication or hardware is too humble for encryption and methods are easily accessible.

So for what purpose would someone actually need or use such an implementation of TLS? Well, probably no one actually needs it. But it is a userspace TLS implementation in javascript that may fit a niche for someone, and it certainly provides beautifully-indented and annotated binary data in the process. Sound up your alley? The GitHub repository for the project has all the details, so give it a look.

Dittytoy recreation of Jean-Michel Jarre's Oxygene Part IV

Generative Music Created In Minimalistic Javascript Code

Dittytoy user [srtuss] has recreated one of the most influential works of electronic music in an elegant nineteen kilobytes of Javascript code. The recreation of Jean-Michel Jarre’s Oxygene Part IV on the Dittytoy platform, currently in beta, plays live right in your browser. Dittytoy empowers users to create generative music online using a simple Javascript API. Syntax of the API is loosely based on that of Sonic Pi, a code-based music creation and performance tool.

“Oxygene (Part IV)” was recorded by Jean-Michel Jarre in 1976. It was Jarre’s most successful single, charted on the top ten in several countries, and was more recently featured in the Grand Theft Auto IV video game. In the 1990s, famed electronic music innovator Brian Eno used the term “generative music” to describe music generated by an electronic system comprising ever-changing elements that may be algorithmic or random.

Recreation of Jarre’s work required modeling the Korg Minipops 7 drum machine, one of the instruments presented in our slew of open-source synthesizers.

Screenshot of the framework-built app, showing it running through Firefox

Turn A Webpage Into A Desktop App With Gluon

Electron is software for running web-written apps in the same way as native ones, and has gotten plenty of bad press for its RAM appetite around these parts. But while the execution might leave something to be desired, the concept itself is quite solid —  if you’ve already got code written for the web, a quick and easy way to bring it over to the desktop would be very valuable.

Which is why [CanadaHonk] is building a framework called Gluon, which aims to turn your web pages into desktop apps with little to no effort. We’ve seen their work a few months ago with the OpenASAR project, hacking the Discord desktop app to speed it up. Drawing from that experience, Gluon is built to be lean – with apps having low RAM and storage footprints, lightning-speed build times, and a no-nonsense API.

One of the coolest parts is that it’s able to use your system-installed browser, and not a bundled-in one like Electron. Firefox support is firmly on the roadmap, too, currently in experimental stage. Linux support is being worked on as well — the framework is Windows-born, but that’s to change. There’s also room to innovate; [CanadaHonk] recently added a hibernation feature with aggressive RAM and CPU footprint reduction when the app is minimized, something that other frameworks like this aren’t known for.

If you want to write user-facing software, JavaScript’s a decent language, and quite a few of you are going to be familiar with it. You aren’t limited to the software side of the tech world, either — tools like WebUSB and WebSerial will let you write a user interface for a board that you’ve just developed. For instance, here’s a WebSerial-based oscilloscope, a nifty serial terminal, or a hacker conference badge programming toolkit. For all that browsers have gotten wrong, they certainly don’t seem to become less abundant, and if that means you can quickly develop cross-platform hardware-facing apps, it’s certainly a useful addition to one’s toolkit.

Showing the end result car, with mechanum wheels and a green chassis with what seems to be a camera window on top

2022 FPV Contest: ESP32-Powered FPV Car Uses Javascript For VR Magic

You don’t always need much to build an FPV rig – especially if you’re willing to take advantage of the power of modern smartphones. [joe57005] is showing off his VR FPV build – a fully-printable small Mechanum wheels car chassis, equipped with an ESP32-CAM board serving a 720×720 stream through WiFi. The car uses regular 9g servos to drive each wheel, giving you omnidirectional movement wherever you want to go. An ESP32 CPU and a single low-res camera might not sound like much if you’re aiming for a VR view, and all the ESP32 does is stream the video feed over WebSockets – however, the simplicity is well-compensated for on the frontend. Continue reading “2022 FPV Contest: ESP32-Powered FPV Car Uses Javascript For VR Magic”

A persons handing holding a pile of generative, laser cut snowflake ornaments

Laser-Cutting A Flurry Of Generative Snowflakes

It’s the holiday season, and what better way to celebrate than to carve out some generative snowflakes on your laser cutter? [Bleeptrack] has developed a web-based tool that creates generative snowflake ornaments which can be exported to SVG files ready-made for laser or vinyl cutting.

True to their namesake, each generated snowflake ornament is (very likely to be) unique, with multiple layers created that can be stacked on top of each other. [Bleeptrack] has showcased a few realizations, using semitransparent paper sandwiched between two top layer cutouts, made out of wood or cardboard.

The snowflakes are a great balance of minimal design while still being beautiful and rich in detail. They can be easily produced on any laser cutter or vinyl cutter that you might have handy. Source code is available on GitHub for those wanting to dive into the details of the web tool. Cutting one of your own would make a perfect addition to a Neodriver ornament or a tiny DOOM playing ornament. Video after the break!

Continue reading “Laser-Cutting A Flurry Of Generative Snowflakes”

Squish That Stack With Rampart

[P B Richards] and [Aaron Flin] were bemoaning the resource hunger of modern JavaScript environments and planned to produce a system that was much stingier with memory and CPU, that would fit better on lower-end platforms. Think Nginx, NodeJS, and your flavour of database and how much resource that all needs to run properly. Now try wedge that lot onto a Raspberry Pi Zero. Well, they did, creating Rampart: a JavaScript-based complete stack development environment.

The usual web applications have lots of tricks to optimise for speed, but according to the developers, Rampart is still pretty fast. Its reason for existence is purely about resource usage, and looking at a screen grab, the Rampart HTTP server weighs in at less than 10 MB of RAM. It appears to support a decent slew of technologies, such as HTTPS, WebSockets, SQL search, REDIS, as well as various utility and OS functions, so shouldn’t be so lightweight as to make developing non-trivial applications too much work. One interesting point they make is that in making Rampart so frugal when deployed onto modern server farms it could be rather efficient. Anyway, it may be worth a look if you have a reasonable application to wedge onto a small platform.

We’ve seen many JavaScript runtimes over the years, like this recent effort, but there’s always room for one more.