Need A New Programming Language? Try Zig

Maybe you’ve heard of it, maybe you haven’t. Zig is a new programming language that seems to be growing in popularity. Let’s do a quick dive into what it is, why it’s unique, and what sort of things you would use it for. (Ed Note: Other than “for great justice“, naturally.)

What Is It?

You’ve likely heard of Rust as it has made significant inroads in critical low-level infrastructures such as operating systems and embedded microcontrollers. As a gross oversimplification, it offers memory safety and many traditional runtime checks pushed to compile time. It has been the darling of many posts here at Hackaday as it offers some unique advantages. With Rust on the rise, it makes sense that there might be some space for some new players. Languages like Julia, Go, Swift, and even Racket are all relative newcomers vying for the highly coveted mindshare of software engineers everywhere.

So let’s talk Zig. In a broad sense, Zig is really trying to provide some of the safety of Rust with the simplicity and ease of C. It touts a few core features such as:

  • No hidden control flow
  • No hidden memory allocations
  • No preprocessor, no macros
  • First-class support for optional standard library
  • Interoperable by design
  • Adjustable Runtime Safety
  • Compile-time code-execution

Continue reading “Need A New Programming Language? Try Zig”

How Does A Sail Drone Bring Home Hurricane Footage In Record Time?

It is unlikely that as a young lad [Richard Jenkins] would had have visions of sailing into the eye of a Category-4 hurricane. Yet that’s exactly what he’s done with the Explorer 1045, an uncrewed sailing vehicle built by his company, Saildrone. If that weren’t enough, footage from the vessel enduring greater than 120 MPH (almost 200 km/h) winds and 50 foot (15 M) waves was posted online the very next day, and you can see it below the break.  We’re going to take a quick look at just two of the technologies that made this possible: Advanced sails and satellite communication. Both are visible on Explorer 1045’s sibling 1048 as seen below:

Saildrone Explorer 1048, a sibling of Explorer 1045, each one of five vessels equipped with a "hurricane wing"
Saildrone Explorer 1048, a sibling of Explorer 1045, each one of five vessels equipped with a “hurricane wing”

The most prominent feature of course is the lack of a traditional sail. You see, from 1999-2009, [Richard Jenkins] was focused on setting the land world speed record for a wind powered vehicle. He set that record at 126.1 mph by maturing existing sail wing technology. [Richard] did away with conventional rigging and added a boom with a control surface on it, much like the fuselage and empennage of a sailplane.

Instead of adjusting rigging, the control surface could be utilized to fly the wing into its optimal position while using very little energy. [Richard] has been able to apply this technology at his company, Saildrone. The 23 foot Explorer vessel and its big brothers are the result.

How is it that the world was treated to the view from inside the eye of a hurricane only a day after the video was recorded? If you look at the stern of the vessel, you can see a domed white cylinder. It is a satellite communication base station called the Thales VesseLINK. Thales is one of the partner companies that built the satellites for the Iridium NEXT fleet, which has 66 operational satellites in Low Earth Orbit. The Iridium Certus service uses its L-Band (1.6 GHz) signal to provide up to 352 kbps of upload speed and 704 kbps down. While not blazing fast, the service is available anywhere in the world and is reliable because it is not prone to rain fade and other weather based interference.

With just these two recent innovations, the Explorer 1045 was able to sail to the eye of a hurricane, record footage and gather data, and then ship it home just hours later. And we’re hardly exploring the tip of the iceberg. More than just sailboat based cameras, these scientific instruments are designed to survive some of the harshest environments on the planet for over a year at a time. They are a marvel of applied engineering, and we’re positive that there are some brilliant hacks hiding under that bright orange exterior.

If uncrewed sailing vessels float your boat, you might also enjoy this autonomous solar powered tugboat, or that time a submarine ran out of fuel and sailed home on bed sheets.

Continue reading “How Does A Sail Drone Bring Home Hurricane Footage In Record Time?”

Hackable Smart Watch Is Also Open Source

When they first came to market, many detractors thought that smart watches would be a flop or that there wouldn’t be much use for them. Over the past few years, though, their sales continue to increase as people find more and more niche uses for them that weren’t previously considered. The one downside to most of these watches is unsurprisingly their lack of openness and hackability, but with some willpower and small circuit components there are a few options available for those of us who like to truly own our technology.

This smartwatch is the SMA Q3, the next version of this smartwatch that we saw at the beginning of last year. Like its predecessor, it boasts a sunlight-readible display powered by a Bluetooth SoC, but this time uses the upgraded nRF52840. All of the standard smartwatch features are available, but this version also includes SWD pins on the back, and additionally has support for Bangle.js and can run some of the apps from the app loader. Some details still need to be worked out for this specific hardware, but there are some workarounds available for the known problems.

The project is also on Kickstarter right now but is well past its funding goals. We’re excited to see adoption of an open-source smartwatch like this, and to that end all of the hardware details and software are freely available on the project’s page, provided you can order some of the needed parts from overseas. If you’re looking for something a little more BASIC, though, we have you covered there as well.