4 ms·
> Technical and human pluralism enriches the world. Monocultures do not. Unlike human culture, tech cultures can't communicate to enrich one-another. (The peop
by derefr 12y ago
> Technical and human pluralism enriches the world. Monocultures do not.
Unlike human culture, tech cultures can't communicate to enrich one-another. (The people in them can, but this is a different thing.)
To explain what I mean: you can't import a Ruby library into a Python program. You can import a C library in a Rust program, or vice-versa—but that's a special case. Even then, you can't write a patch for a C library in Rust, or vice-versa, because the original maintainers of the library you want to contribute to are only going to accept contributions in languages they understand and can maintain directly.
I really believe that fixing this—decoupling "runtime/platform" from "language semantics", and "language semantics" from "syntax"—is the single most important thing that will happen in software engineering in the next 20 years.
Imagine a program somewhat like go-fmt(1), that would run on checkout of a source repo, to transform a base-level AST into the syntactic representation of your choice, and pattern-match-decompile any low-level statements with high-level "shape" into the macro-statements in your chosen language that would generate them[1]. Imagine every library being not only available in every language, but able to be contributed to by programmers who know any language. Etc.
The result would be, in one sense, a "monoculture"—a single ecosystem of libraries, rather than 12 ecosystems between the CRT, the JVM, the CLR, the Erlang VM, etc. But it wouldn't disallow competition between versions of said libraries—just allow obvious winners to win once-and-for-all, instead of limiting their success to their technological "country of citizenship."
---
[1] Or, better yet, a FUSE server where an underlying directory of AST files gets mounted as syntaxified files. Much cleaner from the rest of the toolchain's perspective.
- stormbrew 12y ago> Imagine a program somewhat like go-fmt(1), that would run on checkout of a source repo, to transform a base-level AST into the syntactic representation of your choice, and pattern-match-decompile any higher-level structures into the macro-statements in your chosen language that would generate them[1]. People have been imagining this for a long time, and realistically it isn't even all that hard to do. But the result of this would, honestly, probably be about as useful as running Shakespeare through google translate to Chinese and back again [1]. Code is communication, and like all communication it has nuance. It is absolutely not clear that programming as we understand it, without a massive paradigm shift in the entire field, can really work with all that nuance stripped out. [1] https://translate.google.ca/?ie=UTF-8&hl=en&client=tw-ob#zh-CN/en/%E7%94%9F%E5%AD%98%E9%82%84%E6%98%AF%E6%AF%80%E6%BB%85%EF%BC%8C%E9%80%99%E6%98%AF%E5%B0%87%E4%BB%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7%8E%87%EF%BC%8C%E5%BE%9E%E8%80%8C%E5%8E%9F%E4%BD%8F%E6%B0%91%E8%89%B2%E8%AA%BF%0A%E6%98%AFsicklied%E7%9A%84%E5%85%89%E5%BD%A9%EF%BC%8C%E8%88%87%E8%92%BC%E7%99%BD%E6%8A%95%E6%80%9D%E6%83%B3%EF%BC%8C%0A%E5%92%8C%E5%81%89%E5%A4%A7%E7%9A%84%E9%96%93%E8%B7%9D%E5%92%8C%E5%8A%9B%E7%9F%A9%E7%9A%84%E4%BC%81%E6%A5%AD%EF%BC%8C%0A%E6%9C%89%E4%BA%86%E9%80%99%E6%96%B9%E9%9D%A2%E4%B9%9F%E6%9C%83%E9%80%86%E6%B5%81%E8%80%8C%E9%80%80%EF%BC%8C%0A%E5%A4%B1%E5%8E%BB%E4%BA%86%E8%A1%8C%E5%8B%95%E7%9A%84%E5%90%8D%E7%A8%B1%E3%80%82 https://translate.google.ca/?ie=UTF-8&hl=en&client=tw-ob#zh-...
- chubot 12y agoI think the "problem" you describe will get worse, not better. Software will get more fractured indefinitely; I believe it's an economic inevitability. There is plenty of old code that works and nobody has the time or knowledge to rewrite it. Go isn't going to replace Python; you'll have Go AND Python. Moreover you'll have Python 2 and Python 3, and perhaps Go 1 and Go 2. Julia won't replace R or Matlab; you'll have all 3. You're basically advocating a modernist view, which I hear a lot of programmers espouse. I think this is confusing what you want to happen with what will happen. A more accurate picture of the future of software is something like Richard Gabriel's "Design Beyond Human Abilities". It's long so I won't try to summarize it, but it paints a unique picture, and I think an accurate one. https://scholar.google.com/scholar?cluster=5397162041763930663&hl=en&as_sdt=0,5&sciodt=0,5 https://scholar.google.com/scholar?cluster=53971620417639306... We are going to build greater and greater things, but they will be more balkanized and full of conflicting forces. They will look a little more like the evolved human body than a perfect crystal. I think the deep wisdom of Unix goes a long way toward easing the pain. Text is the lowest common denominator; it bridges the gap between all these conflicting systems. There will be no universal model; only localized models and subcultures that talk to each other through sloppy protocols.
- derefr 12y agoYou're probably right. Something like Urbit[1] is more a romantic notion than a way forward—people won't give up the many for the one. Still, though, I'm heartened by the Unified Theory Of Gradual Protocol Ossification—this being the idea that, even though we've ratcheted up from computer networks speaking any kind of IP-based transport protocol to only being able to speak TCP, and then in some places only being able to speak HTTP over TCP—that what this really implies is that HTTP is commoditizing the transport layer, and that, as soon as the abstraction is airtight—which it seems increasingly to be with HTTP2—we'll be able to just sweep the redundancy under the rug by replacing the IP+TCP+HTTP2 mess with a single cleaned-up protocol that presents the same abstraction. In this case, I imagine that the way forward is meta-languages that are effectively DSLs targeting multiple abstract machines, allowing you to mix-and-match semantics in isolated subsets of your programs, and resulting in mixed-target code generation. Once people are on that abstraction—where "language" is not 1:1 with "abstract machine", and "abstract machine" is not 1:1 with deployment platform—then we can come along and sweep the redundancy under the rug. In 20 years or so. [1] http://doc.urbit.org/ http://doc.urbit.org/
- bad_user 12y agoDoesn't work. There are fundamental differences between Haskell and Ruby, or between Java and Clojure, or between Scala and JavaScript. Solutions written in these languages will look vastly different. Nobody is attempting the actor model in Haskell because the actor model is anti static typing, non-deterministic and there's nothing FP about it. You don't see the State or the IO monads in many other languages. Or type-classes and higher-kinded types for that matter. LISP macros are a language feature, not a runtime feature, so you can forget about interoperability. Ditto for Linq in .NET or for scala-async. ActiveRecord / ActiveModel has been a good idea for Ruby on Rails, but would be terrible in Scala. Garbage collection changes everything - for one, building immutable data-structure becomes something you can do. Etc, etc... Point is, programming languages aren't equal and the universe of languages is not unidimensional. And how a library gets implemented is not orthogonal to the picked language.
- derefr 12y agoI answered most of your other objections in a sibling comment, but to this: > Nobody is attempting the actor model in Haskell because the actor model is anti static typing People write servers in Haskell, no? Servers that speak to the internet? If so, they're writing actor-modelled programs; each actor is just an entire OS process. Now, if you want to write several servers at once, and have them scheduled efficiently, you might want a DSL that allows you to write specify the code for several Haskell server processes, and also specify their relationships. Sounds like you're going to be writing some actor-modelled code! Which is all to say, Haskell (and strongly-statically-typed FP et al) works perfectly fine as a language for specifying what goes on within an actor. The actor boundary is precisely where the tradeoff between static typing and dynamic typing is made, because when you want to communicate between actors (where an actor may also represent a socket or somesuch), you have to stop speaking in terms of typed data, and start speaking in terms of pattern-matching on binary messages that a given version of an actor might not recognize the totality of. Haskell could have actors. Erlang could have strong-typing within functions. Both languages would basically look like they're embedding the other by doing so. The right solution probably involves exactly the kind of mixing of semantics that that sounds like.
- 12y ago
- pron 12y agoUnfortunately, that's not how languages work. There may be language equivalence classes (that would put, say, Ruby, Python and JS in the same class, C, C++ and Rust in another, and Java, C# and Go in a third), but languages from different classes can't just be translated from one to the other. First, a program written in one language isn't just a description of an algorithm, but a description of the algorithm plus language-specific information that's supposed to help the particular platform execute the algorithm efficiently. Second, there are essential runtime differences that can't be easily ported, such as a threading model and a memory model -- and those may significantly affect the suitability of an algorithm for a certain language. Finally, there are fundamental differences in the appropriateness of certain algorithms; specifically, imperative algorithms can't be automatically translated to pure-functional algorithms without possibly changing their time and space asymptotic complexity. In short, there's a lot more to a computer program than a description of an algorithm, and even algorithms vary considerably in their suitability depending on the language/runtime executing them. Even if you could solve the first problem, you're still left with the second. I do agree with the premise, though: unless your new language/runtime is so revolutionary that it reduces development cost dramatically, fracturing the ecosystem is often too high a price to pay for merely a "nice" improvement. The problem is that many languages claim dramatic cost reductions, but it usually takes years to learn whether or not they deliver. The reason for that is not just the number of data points, but the fact that the cost of software is spread across a codebase's lifetime (10 years is about the average lifespan of a production system codebase), and how development looks -- and what activities contribute to costs -- in the first and second year is very different from how it looks in the sixth.
- tatterdemalion 12y agoIt is definitely possible (though not trivial in many cases) to detach the language syntax from the language semantics, allowing multiple syntaxes for the same language semantics. But detaching the semantics from the runtime, something you do not describe above, would be a very different thing: the runtime is a /part/ of the language semantics, and while you can definitely create multiple languages that share a runtime (as the JVM languages do, for example), any decision about the shape of the runtime is going to involve tradeoffs in capabilities, so there will never be one runtime environment to rule them all. What's needed are means of easily communicating between runtime environments, which is of course what protocols are.
- omeid2 12y agoSo basically you're advocating a single LLVM like solution over diversity? I don't think that would be able to provide the "prefect" solution to everyone's problem. There are so many solutions because there are so many problems. And to say that programming languages and platforms don't influence each other is no more correct than saying human languages don't influence each other. But maybe I have missed your point?
- MaulingMonkey 12y ago> To explain what I mean: you can't import a Ruby library into a Python program. Not to detract from your overall point, but there's actually a lot of Ruby <-> Python interop stuff out there. At one point I was playing around with importing C++ modules exported via boost::python to consume from Ruby (admittedly only for a toy project.) I'm not sure if I was using RubyPython[1] - searching google turns up multiple options. And I'm not sure how well any of them hold up in production. And then on the CLR there's both IronPython and IronRuby, which might play well together. [1] https://github.com/halostatue/rubypython https://github.com/halostatue/rubypython (EDIT: A 4 emdashes long run on sentence? I can do better...)