Google are making a Python to Go cross compiler

The idea here is that Google have a lot of Python to run, but Python’s Virtual Machines (especially with the Global Interpreter Lock) aren’t all that good for high-performance parallelism.

OTOH built Go! and the Go target machine for this. So they want to make a drop-in replacement that lets them run existing Python code on this infrastructure.

This is good news for Python. I wonder how long it will take to become the GAE python-hosting infrastructure. Perhaps this is Python’s answer to Elixir.

A comment I made over on The End of Dynamic Languages

The problem with the static / dynamic debate is that the problems / costs appear in different places.

In static languages, the compiler is a gatekeeper. Code that gets past the gatekeeper is almost certainly less buggy than code that doesn’t get past the gatekeeper. So if you count bugs in production code, you’ll find fewer in statically typed languages.

But in static languages less code makes it past the compiler in the first place. Anecdotally, I’ve abandoned more “let’s just try this to see if its useful” experiments in Haskell where I fought the compiler and lost, than in Clojure, where the compiler is more lenient. (Which has the knock on effect of my trying fewer experiments in Haskell in the first place, and writing more Clojure overall.)

Static typing ensures that certain code runs correctly 100% of the time, or not at all.

But sometimes it’s acceptable for code to run 90% of the time, and to have a secondary system compensate for the 10% when it fails. There might even be cases where 90% failure and 10% success can still be useful. But only dynamic languages give you access to this space of “half-programs” that “work ok, most of the time”. Static languages lock you out of it entirely. They oblige you to deal correctly with all the edge cases.

Now that’s very good, you’ve dealt with the edge cases. But what if there’s an edge case that turns up extremely rarely, but costs three months of programmer time to fix. In a nuclear power station, that’s crucial. On a bog-standard commercial web-site, that’s something that can safely be put off until next year or the year after. But a static language won’t allow you that flexibility.

The costs of static and dynamic languages turn up in different places. Which is why empirical comparisons are still hard.

Ian Bicking’s post on Conway’s Corollary is a must-read thought on isomorphisms between the organization and product structures.

What, asks Bicking, if we don’t fight this, but embrace it. Organizational structures are allegedly for our benefit. Why not allow them to shape product? Or when this is inappropriate why not recognize that the two MUST be aligned and if product can’t follow organization, we should refactor organization to reflect and support product.

Im sure my answer / comment on What is Gradle in Android Studio? will get downvoted into oblivion with short-shrift fairly soon. (Maybe deservedly).

But I’ll make it here :

[quote]

At the risk of being discursive I think behind this is the question of why the Android Studio / Gradle experience is so bad.

Typical Clojure experience :

* download project with dependencies listed in project.clj.
* Leiningen gets the dependencies thanks to Clojars and Maven.
* Project compiles.

Typical Android Studio / Gradle experience :

* “Import my Eclipse project”.
* OK project imported.
* Gradle is doing it’s thang … wait … wait … wait … Gradle has finished.
* Compile … can’t compile because I don’t know what an X is / can’t find Y library.

I’m not sure this is Gradle’s fault exactly. But the “import from Eclipse project” seems pretty flaky. For all of Gradle’s alleged sophistication and the virtues of a build-system, Android Studio just doesn’t seem to import the build dependencies or build-process from Eclipse very well.

It doesn’t tell you when it’s failed to import a complete dependency graph. The Android Studio gives no useful help or tips as to how to solve the problem. It doesn’t tell you where you can manually look in the Eclipse folders. It doesn’t tell you which library seems to be missing. Or help you search Maven etc. for them.

In 2016 things like Leiningen / Clojars, or node’s npm, or Python’s pip, or the Debian apkg (and I’m sure many similar package managers for other languages and systems) all work beautifully … missing dependencies are thing of the past.

Except with Android. Android Studio is now the only place where I still seem to experience missing-dependency hell.

I’m inclined to say this is Google’s fault. They broke the Android ecosystem (and thousands of existing Android projects / online tutorials) when they cavalierly decided to shift from Eclipse to Android Studio / Gradle without producing a robust conversion process. People whose projects work in Eclipse aren’t adapting them to AS (presumably because it’s a pain for them). And people trying to use those projects in AS are hitting the same issues.

And anyway, if Gradle is this super-powerful build system, why am I still managing a whole lot of other dependencies in the sdk manager? Why can’t a project that needs, say, the ndk specify this in its Gradle file so that it gets automatically installed and built-against when needed? Why is NDK special? Similarly for target platforms? Why am I installing them explicitly in the IDE rather than just checking my project against them and having this all sorted for me behind the scenes?

[/quote]

qzhuyan responds to me tweeting Emacs on PocketCHIP.

Which is, er, very true. And wonderful.

But this haunts me continuously, as I explore the Mind Traffic Geometry of tools that support me tracking tasks and outlining ideas.

Will I one day end up simply falling into Emacs Org Mode? Isn’t that basically everything I really want?

Am I wasting my time with quixotic effort of writing my own software for this stuff when I could be writing something newer and more important?

Another thing that’s pushing me to think about this : this week I’ve been playing with Faust. A wonderful language for writing signal processing networks (ie. synthesizers, audio FX etc.) that compiles to multiple back-ends … including PureData, Supercollider, VST plugins and stand-alone programs.

It’s basically where I imagined Gates of Dawn eventually going.

But rather than a Python library, its a very nice “little-language”, with great operators for describing composition of data-flow blocks. It’s well developed and supported. I’m trying it out for writing small synths / FX units I can run on small boards like CHIP and Raspberry Pi.

I can see myself doing a lot with this. But it’s basically going to kill Gates of Dawn. Maybe there’s room for a Python library for those who don’t want to learn Faust. But for me, Faust is looking extremely viable.

So … another wasted project?

Perhaps I need to look at this positively. I’m not old. But I’m not as young as I used to be. I don’t have so many projects left ahead that I can afford to squander them. Perhaps its time to pivot. Time for a cull. A “spring-clean”. To remove some more cruft projects that occupy too much of my mind, but are actually just weak “me-too” versions of existing things that I would use perfectly happily if I made the effort to learn them. Enough with the Not Invented Here syndrome.

I’m not saying that OWL or MTC are going anywhere yet. I use them, and they work for me. And they are DIFFERENT from OrgMode, or todo.txt or any similar thing out there. They are what I want.

But I need to embrace this change. There are so many exciting NEW opportunities, there’s no point getting hung up on the old stuff.

Dawn is over. For me it’s 2PM. And there’s plenty of work to be done.

OK. So someone has made a Pocket-style Raspberry Pi case.

Very nice. Hope someone starts commercializing these as I think they’ll be very important for the RasPi ecosystem.

mobipre2 shared on YouTube: Raspberry Pi – Pocket Chip

 

Source: DIY 3D Printed Raspberry Pi Pocket Chip « Adafruit Industries – Makers, hackers, artists, designers and engineers!

You all probably knew where this was going, right?

Mind Traffic Control (Racket version) running on PocketCHIP
Mind Traffic Control (Racket version) running on PocketCHIP.

Of course, it’s been my priority to run the new MTC on the PocketCHIP. And it runs fine, without any special conversion; just needed to figure out how to install a library it depended on without going through drracket.

Now I’m off for my celebratory bike ride. 🙂

 

 

Save