General Development Archive

LLVM 8.0 released

LLVM 8.0 has been released. This release contains the work on trunk up to Subversion revision r351319, plus work on the release branch. It’s the result of the LLVM community’s work over the past six months, including: speculative load hardening, concurrent compilation in the ORC JIT API, no longer experimental WebAssembly target, a Clang option to initialize automatic variables, improved pre-compiled header support in clang-cl, the /Zc:dllexportInlines- flag, RISC-V support in lld. And as usual, many bug fixes, optimization and diagnostics improvements, etc.

Swift 5 released

Swift 5 is a major milestone in the evolution of the language. Thanks to ABI stability, the Swift runtime is now included in current and future versions of Apple’s platform operating systems: macOS, iOS, tvOS and watchOS. Swift 5 also introduces new capabilities that are building blocks for future versions, including a reimplementation of String, enforcement of exclusive access to memory during runtime, new data types, and support for dynamically callable types. You can test the new features and changes in an Xcode playground.

Is computer code a foreign language?

Maryland’s legislature is considering a bill to allow computer coding courses to fulfill the foreign language graduation requirement for high school. A similar bill passed the Florida State Senate in 2017 (but was ultimately rejected by the full Legislature), and a federal version proposed by Senators Bill Cassidy, Republican of Louisiana, and Maria Cantwell, Democrat of Washington, is being considered in Congress. The animating idea behind these bills is that computer coding has become a valuable skill. This is certainly true. But the proposal that foreign language learning can be replaced by computer coding knowledge is misguided: It stems from a widely held but mistaken belief that science and technology education should take precedence over subjects like English, history and foreign languages. This is silly. Programming is certainly not a replacement for foreign language skills. That being said, it’s somewhat defensible considering this is an American story, and since they speak English as their first or second language anyway, they can get by in the world pretty well as it is.

Wine 4.0 released

This release represents a year of development effort and over 6,000 individual changes. It contains a large number of improvements that are listed in the release notes below. The main new features in Wine 4.0 are Vulkan support, Direct3D 12 support, game controllers support, and high-DPI support on Android.

The Virtual Apollo Guidance Computer

This repository is associated with the website of the Virtual AGC project, which provides a virtual machine which simulates the AGC, the DSKY, and some other portions of the guidance system. In other words, if the virtual machine—which we call yaAGC—is given the same software which was originally run by the real AGCs, and is fed the same input signals encountered by the real AGCs during Apollo missions, then it will respond in the same way as the real AGCs did. The Virtual AGC software is open source code so that it can be studied or modified. The repository contains the actual assembly-language source code for the AGC, for as many missions as we’ve been able to acquire, along with software for processing that AGC code. Principal tools are an assembler (to create executable code from the source code) and a CPU simulator (to run the executable code), as well as simulated peripherals (such as the DSKY). Similar source code and tools are provided for the very-different abort computer that resided in the Lunar Module. Finally, any supplemental software material we have been able to find or create for the Saturn rocket’s LVDC computer or for the Gemini on-board computer (OBC) are provided, though these materials are minimal at present. The Apollo moonlanding project is probably one of the greatest – if not the greatest – technological achievement of mankind. Making sure we have all the tools and code necessary to study the code used is a vital project.

Go 2, here we come!

A major difference between Go 1 and Go 2 is who is going to influence the design and how decisions are made. Go 1 was a small team effort with modest outside influence; Go 2 will be much more community-driven. After almost 10 years of exposure, we have learned a lot about the language and libraries that we didn't know in the beginning, and that was only possible through feedback from the Go community.

The Go team s revealing some things about the future of the programming language.

Fortran is still a thing

In 2017 NASA announced a code optimization competition only to cancel it shortly after. The rules were simple. There is a Navier-Stokes equations solver used to model aerodynamics, and basically, the one who makes it run the fastest on the Pleiades supercomputer wins the first prize.

There were a few caveats though. The applicant had to be a US citizen at least 18 years of age, and the code to optimize had to be in Fortran.

Running Windows software on ARM with Wine

The concept of running Wine on ARM devices isn't new. StarCraft (as well as Diablo 1 & 2) is playable on ARM through Wine thanks to the insanely hard work of the Lithuanian hacker notaz. But while working on my project I couldn't find anything but scattered bits of information and sometimes there was even nothing at all. So this guide will walk you trough the steps required to execute Windows software with Wine on ARM devices running *nix. I specifically focus on a Raspberry Pi 3B+ running Raspbian and here's a screenshot of Notepad++ running there.

Detailed article about running Windows software on ARM Linux using Wine, including how to recompile x86 Windows applications to ARM.

A look at the design of Lua

Lua is a scripting language developed at the Pontifical Catholic University of Rio de Janeiro (PUC-Rio) that has come to be the leading scripting language for video games worldwide. It is also used extensively in embedded devices like set-top boxes and TVs and in other applications like Adobe Photoshop Lightroom and Wikipedia. Its first version was released in 1993. The current version, Lua 5.3, was released in 2015.

Though mainly a procedural language, Lua lends itself to several other paradigms, including object-oriented programming, functional programming, and data-driven programming.5 It also offers good support for data description, in the style of JavaScript and JSON. Data description was indeed one of our main motivations for creating Lua, some years before the appearance of XML and JavaScript.

A minimal C64 Datasette program loader

The Commodore Datasette recording format is heavily optimized for data safety and can compensate for many typical issues of cassette tape, like incorrect speed, inconsistent speed (wow/flutter), and small as well as longer dropouts. This makes the format more complex and way less efficient than, for example, "Turbo Tape" or all other custom formats used by commercial games. Let's explore the format by writing a minimal tape loader for the C64, optimized for size, which can decode correct tapes, but does not support error correction.

I'm no expert, but sometimes I wonder if modern computer classes and schools in general are on the right track by focusing solely on modern systems like Chromebooks and iPads. Wouldn't it be better to teach kids programming in BASIC, with limited resources, on, say, C64 emulators?

What’s the difference between an integer and a pointer?

In an assembly language we typically don't have to worry very much about the distinction between pointers and integers. Some instructions happen to generate addresses whereas others behave arithmetically, but underneath there's a single data type: bitvectors. At the opposite end of the PL spectrum, a high-level language won't offer opportunities for pointer/integer confusion because the abstractions are completely firewalled off from each other. Also, of course, a high-level language may choose not to expose anything that resembles a pointer.

LLVM 7.0.0 released

The release contains the work on trunk up to SVN revision 338536 plus work on the release branch. It is the result of the community's work over the past six months, including: function multiversioning in Clang with the 'target' attribute for ELF-based x86/x86_64 targets, improved PCH support in clang-cl, preliminary DWARF v5 support, basic support for OpenMP 4.5 offloading to NVPTX, OpenCL C++ support, MSan, X-Ray and libFuzzer support for FreeBSD, early UBSan, X-Ray and libFuzzer support for OpenBSD, UBSan checks for implicit conversions, many long-tail compatibility issues fixed in lld which is now production ready for ELF, COFF and MinGW, new tools llvm-exegesis, llvm-mca and diagtool. And as usual, many optimizations, improved diagnostics, and bug fixes.

The release notes have all the details.

On the road to pure Go X11 GUIs

And so I've placed a bet on Go. It is just as conceptually simple as C, sports a friendly BSD-style license, and already has its own parallel ecosystem. No stinky LLVM, in fact no traces of C at all! It's an overlooked revolution! I can follow symbols through packages however deep I want to and I always end up in Go or its assembly. Well, so long as nothing ugly uses Cgo.

Right, now that I've embraced the garbage collector, how do I make an interface that doesn't look like it dates back to the '80s? And can I avoid Cgo?

Learning BASIC like it’s 1983

Now, of course, I tell computers what to do for a living. All the same, I can't help feeling that I missed out on some fundamental insight afforded only to those that grew up programming simpler computers. What would it have been like to encounter computers for the first time in the early 1980s? How would that have been different from the experience of using a computer today?

This post is going to be a little different from the usual Two-Bit History post because I'm going to try to imagine an answer to these questions.

This is a great idea.

x86-64 assembly language programming with Ubuntu

The purpose of this text is to provide a reference for University level assembly language and systems programming courses. Specifically, this text addresses the x86-64 instruction set for the popular x86-64 class of processors using the Ubuntu 64-bit Operating System (OS). While the provided code and various examples should work under any Linux-based 64-bit OS, they have only been tested under Ubuntu 14.04 LTS (64-bit).

Your light reading for the weekend.

Dart 2.0 released

Coming from Dart 1, there's two major developer-facing changes, the largest of which is a stronger type system, including runtime checks to help catch errors that would arise from mismatched or incorrectly labeled types. This type system, originally called "strong mode", has long been the default in Flutter. The other is an interesting quality-of-life change for Flutter developers, which allows creating an instance of a class without the "new" keyword. The goal of this change is to make Flutter code more readable, less clunky, and easier to type, but the principle applies to all Dart code.

The complete list of changes has all the details.