Sunday, January 25, 2015

The Rusthon Team


There has been a sudden jump up in activity in development of Rusthon, the C++ backend is starting to work well, and we have a new literate markdown format to assemble and compile multiple languages. Three new developers have joined the project on Github, and are pushing commits at a very fast pace, today we have already reached 19 commits. The new developers are: Kud1ing, Shooza, and James Rubino. The best commit of the day goes to Shooza, who fixed a bug that had me totally stumped, here is his fix for calling C functions from the C++ backend, commit.

Sunday, January 18, 2015

Python Burning

Want to use Python to make high performance mobile games? Forget about it, Python is not even officially supported on iOS. PyPy is not the solution either, its not working on iOS or Android. Python is embarrassingly slow and inefficient compared to compiled languages like C++. Power efficiency is a big concern on mobile, and it should be on the server side as well.

Python has become one of the most popular languages for server side programming. Running applications on perhaps hundreds of thousands of servers world wide. This is having a huge environmental impact, and nobody in the Python community is talking about it. The fact is that if those applications were rewritten in C++, Go or even JavaScript, it would require dramatically less power and less servers.

Save our planet by ditching the CPython interpreter now!

"Facebook, which is getting some negative PR on environmental issues, recently announced several green initiatives. Some of them are intuitive: getting employees to cut down on water usage, a shuttle bus, composting. Most intriguing, though, is one initiative to ensure that the very code written by Facebook's programmers is itself as green as possible, something achieved by converting Facebook's code from one language called PHP to another called C++." http://www.fastcompany.com/1702079/can-computer-code-be-greener-facebook-thinks-so

Thursday, November 27, 2014

Secure Systems


Linux is not secure. C and C++ are not secure. Python is insecure. Your C compiler and entire OS is insecure, with backdoors that go back multiple decades. [shellshock] [the ken thompson attack]

Linus's Law states that "given enough eyeballs, all bugs are shallow". In response to Heartbleed, Eric Raymond gets defensive and says "there weren't any eyeballs". The fact is that there were eyeballs on that code, and it slipped past the eyeballs and C compiler.

In order to run secure programs, we need a system stack that can be quickly read by a single person - from the kernel and hardware drivers, all the way up to the application level. This can not be done with conventional operating systems, libc and the unix stack.

Bare Metal Rust


"even unsafe Rust is safer than C" - 27:15 - Striegel

The video above by Ben Striegel is a great introduction to Rust, and why it is here to replace C/C++. An application written in Rust and running directly on bare metal without an operating system, is the most secure way to run your application.

RustOS by Ryan Rasti, and Tifflin by John Hodge, are just two examples of Rust based operating systems. These are super light systems, and it is possible for one person to read all their source code, including the unsafe parts written in C and assembly, and ensure they are secure.

Introducing Rusthon

Rust is a systems programming language, and too low level for quick prototyping, or simple web backends. It is nice to have all of the low level control so you can fine tune performance later, but it should be optional. Rusthon is a high level Python-like language that compiles to Rust. Rusthon started as a fork of Gython, which is a fork of PythonJS.

The goal of Rusthon is simple and clean syntax inspired by Python. Rusthon will allow you to code at a higher level than normal Rust code, and interoperate well with hand written Rust and the Rust libraries. You can start off writting your application in Rusthon, and drop down to hand written Rust where you need more performance.

Above left: the standard build process is complex and insecure, where source code is scattered among many files along with build script that may need to be run in some order. Above right: the rusthon markdown build process, one or more markdown files contains multiple programs to be compiled, with a single command these are compiled and packaged into a tarfile.