201 points · by aturley · 5y ago · 175 comments
This is nothing new, it is also a reason why languages like C and C++ won the systems programming wars from the 1990's.
After a while one gets tired to write wrapper libraries, or having to pay extra for an additional compiler that isn't part of the platform SDKs.
Hence why successful languages always need some kind of killer feature, or a company with deep enough pockets willing to push it into the mainstream no matter what.
Same applies to new OS architecture ideas as well.
These days, Zig seems to be explicitly trying to do the same thing, but without paying the backwards compatibility tax:
https://ziglang.org/documentation/master/#Import-from-C-Head...
https://www.welton.it/articles/programming_language_economic...
I like the Tcl example, that is how we worked at a .com startup I was part of.
There's a third strategy: hitching your wagon to an already-successful ecosystem, like languages such as Kotlin do.
Using Kotlin as example, its initial selling point was Java compatibility, now it wants to be everywhere, and its Java compatibility story is also constrained for what Android Java is capable of.
So the tooling attrition increases, with KMM, wrapping FFI stuff to be called from Java like coroutines, and everything that is coming with Loom, Panama and Valhala.
* Most existing libraries are kind of bad anyway so you're not missing out much by not using them
* If you write everything yourself you get system expertise "for free", and gaining expertise in something that already exists is hard
* You can tailor everything to your business requirements
* Writing libraries is "fun work" so it's easier to be productive while doing it
If you were to do a similar company now, you'd have to recruit people who still write code like in the 90's: emacs/vim hackers who can write their own libraries and don't need no stinking IDE. Except you now have a significantly smaller advantage because a lot of the languages have caught up and while your god tier programmers can write their own custom serialization library, that's still more developer time than using serde.
Which is why a lot of people are moving to Rust I suppose. You still get the hip factor but responsibly. It's the Foo Fighters of languages. Cool, but not irresponsible.
[1]: I was in a very famous tv show: https://www.youtube.com/watch?v=FBw-Z8ULwcc
> If you were to do a similar company now, you'd have to recruit people who still write code like in the 90's: emacs/vim hackers who can write their own libraries and don't need no stinking IDE.
IDE support is getting there with OCaml. In VSCode, it's not as good as TypeScript but it's usable.
> Except you now have a significantly smaller advantage because a lot of the languages have caught up and while your god tier programmers can write their own custom serialization library, that's still more developer time than using serde.
There are a few libraries that you can use. Serde also tends to make the already long compilation time blow up.
Eventually I also got into Turbo C, Turbo C++, and then upgraded myself into Borland C++, used Visual Basic 3.0 in 1994, and a couple of years later Visual C++ 5.0 was my first MS C++ IDE.
Mac OS MPW was an IDE and stuff like AMOS and DevPac were IDEs as well.
Java IDEs started to show up around 1998, like Visual Cafe and the first Eclipse, after being ported from IBM's Visual Age.
Visual Age, which were the IDEs for Smalltalk and C++ from IBM for OS/2 and Aix.
The only group that wasn't using IDEs were the UNIX folks, thankfully XEmacs was around to bring some back sanity when I had to code in UNIX.
These days, you don’t need to build an IDE from scratch - you can just build some language server support for your language and plug into existing IDEs. It’s much less work!
Also, as an aside that’s not really germane to the argument, it’s possible (and IMO preferable) to write code without using an IDE. It forces you to write code that’s broken up into contexts small enough to fit in human working memory. This pays off in the long run. However, once people in your company start writing code with an IDE, it requires more context and becomes almost impossible to edit without an IDE.
Haskell is another language besides OCaml that doesn’t have a ton of MEGACORP backing but nonetheless forms the basis for several very successful companies and groups within MEGACORPs, and where many developers prefer the experience of using it despite not having a $10M IDE like you would for Java. And speaking of that, all the ludicrously expensive and complicated IDEs mostly suck anyway!
> you'd have to recruit people who still write code like in the 90's: emacs/vim hackers who can write their own libraries and don't need no stinking IDE
I wasn’t writing code in the 90s, but I’ve worked at places like this and I would take it any day over “people who copy/paste from stack overflow and get lost without autocomplete” - unless the novel alternative you have in mind is something better than that?
> Which is why a lot of people are moving to Rust I suppose. You still get the hip factor but responsibly
Rust does seem to be in the schelling point of “better enough than C++ to get us off our asses, but no so much better as to scare the devs”. Not sure I’d say it’s especially “responsible” though.
While it's true that there are lots of bad libraries and many libraries are easy, you really isolate yourself from the broader ecosystem by doing this. Vendors and 3rd party solutions are now much harder to use, and when you use them you'll probably only use them at a surface level instead of using all the features.
And some things are so mature and vast you don't have a chance of building them yourself. If what you are doing can be done well in very mature ecosystems like React or PyTorch, the effort to recreate them will dwarf the time spend on important work.
Sometimes that's effort that's not really necessary. At work we had a team build a dashboard with React and a few graphs recently. It clocks at 2000 unique dependencies. That's not a typo, it's two thousands dependencies for a few graphs. Reimplementing all of that would take many man-years of work, but I think it wouldn't be necessary in the first place. Chart.js doesn't use any runtime dependencies, and could probably fill most of our needs. Chart.js is 50k of Javascript, which is a lot but probably more than we need. I don't know how much time it would take to make a reimplementation to have the API we need, but I think it's doable. Why would we want to do that? Because those 2000 dependencies are a liability. Last time I checked 165 were looking for funding. It would be easy to imagine a malicious actor paying a few people to contribute to low profile but widely used JS libraries, and take over the maintenance when the original maintainer becomes tired. I don't know if this is a worse liability than developing our own chart library. I don't know much about security and the tradeoff involved.
All of that to say, isolation from the broader ecosystem may be a good thing.
Code is code: both models (3rd party vs no 3rd party) can work and the time spent reinventing the wheel is not necessarily business breaking.
That said, you're right it is fun, and people like doing it so its good to keep your work mixed up and you team motivated.
It's a good lever to pull IMHO, but not always.
As long as learning the basics of a 3rd-party library takes a relatively short time, those who use it have an advantage: they ship faster. Certainly mastering it may take as long as writing one's own. But you can do that while writing more production code and shipping features. Also, you get improvements made by other people for free (because likely you're using an OSS library anyway).
Though I think the "fun work" point is really interesting and worth a broader discussion
I've seen this save tons of dollars in cloud setups (100,000's) in my career in more than one place. Safe multi-threading was marketed as part of the advantage of functional programming to many people; which IMO why I find it strange that OcAML didn't have it for so long. Lightweight threads (e.g. Tasks, Channels, etc) use less system resources than processes as well.
You can do anything with anything but you usually pay some price of inefficiency to do so. That may be small, but sometimes it is large enough to matter.
* extremely costly
* hard to make portable cross-platform
* hard to make secure (since data external to the process can't be trusted like shared-memory data can).
* requires constantly validating, serializing, and deserializing data, wasting developer time on something irrelevant to their problem domain
* adds a bunch of new failure modes due to the aforementioned plus having to worry about independent processes crashing
* fails to integrate into the type system of your language (relevant for something like Rust that can track things like uniqueness / immutability for you)
* cannot handle proper sharing of non-memory resources, except on a finicky case-by-case basis that is even more limited and hard to make cross-platform than the original communication (so now you need to stream events to specific "main" processes etc., which is a giant headache).
* Can cause significant additional performance problems due to things like extra context switching, scheduler stupidity, etc.
* Can result in huge memory bloat due to needing redundant copies of data structures and resources, even if they're not actually supposed to be different per thread.
Make no mistake here, when you're not just running multiple copies of something that don't communicate with each other, "just use processes" is a massive pain in the ass and performance and productivity loss for the developers using it, as well as hurting user experience with things like memory bloat. The only reason to go multiprocess when you have threads is in order to create a security boundary for defense in depth, like the Chromium does--and even they are starting to reach the limits of how far you can push the multiprocess model before things become unusably slow / unworkable for the developers.
On the other hand this is like "Wallaroo moves from the Cadillac of languages nobody uses, to the Chevy Equinox of languages nobody uses." Like, totally fine, you grew older and had kids and needed an SUV to keep up with home life, no shame in that... but there is a wistful "ah when we were young" to the transition, no?
It also makes me think of CircleCI where they stayed in Clojure for quite some time - it really didn't have that much need for libraries (and the ones it did need, such as AWS, were provided by Java).
When evaluating whether to use a non-mainstream language, the rule I use now is:
- will I need to interact significantly with the outside world in a way that can only be done with libraries?
- if not, do I gain a lot with this non-mainstream language?
That contrasts against how I used to do it, where I viewed it as a trade-off between the ecosystem and the advantage of the non-mainstream language.
A language that does NOT have as many features and limits more what you can do is NOT a strictly worse language. You can never say a language is worse than another, anyway, in general: it's always relative to what usage you have in mind. Your apparent disdain for a language just on the basis of the language features shows that you have a lot to learn about language economics, mentioned in other threads here.
This is in contrast with Kotlin, that tries to gain popularity by including many features, but always feeling “just sugar syntax over Java” to me.
Could you please elaborate on that? It was my understanding that Kotlin did everything that Java did (or any JVM-based language) but actually added first-class support for basic features missing from Java that required magic sauce like Lombok to fill in the gaps.
It's never had working error highlighting for Scala. I filed a bug where using a parameterized member type was incorrectly highlighted as an error, the next version using a parameterized member types was never highlighted as an error. I filed a bug with a case that should have been an error wasn't, the next version my original bug was back. I gave up at that point.
and having a big ecosystem doesn't mean it's a good or a healthy one either.
Like, the only reason are computers are remotely working fine is that great deal of abstractions.
https://corecursive.com/055-unproven-with-sean-allen/#consid...
We are a little volunteer driven project and will be here whenever you find the time. Stop by the Zulip sometime and chat!
https://ponylang.zulipchat.com/
-Sean-
- garbage collection - no mechanism for synchronous access to actors
We ended up building a C++ actor model, with it's associated headaches. Yes, we still have race conditions and some developers invoke the function directly instead of using messages, and yes, sometimes we will grab a locking mechanism to do synchronous access, but at the end of the day, the performance of real code (embedded gaming system) is all that matters, and we did meet our performance goals.
Having said that, I've given up looking for an actor programming language and started building my own. Essentially, C++ like with Actors and compiler validated tracking of resources across actors (so the compiler knows about locks and actors). Still working on the compiler (compiles to C++20) and maybe 18 months away from public reveal. But the initial batch of test apps look very nice (but without compiler validation of resource sharing at this point in time). Very terse code, and implementing a compiler that outputs C++ was much easier than I originally feared. And no, there are no forward declarations or header files, compilers are run on modern workstations that have the grunt to produce the necessary scaffolding (from the project dependency script).
That is presumably intentional, since if you could access actor state synchronously it wouldn't really be much of an actor. This sounds a lot like a "doing it wrong" kinda problem.
> (but without compiler validation of resource sharing at this point in time)
Not sure how you'll do this without garbage collection (like reference counting, which is what Pony uses iirc).
Honestly I suspect if you continue forward you'll probably walk away with much more appreciation for Pony's design decisions.
It's still a fair bit away, I just got the proof of concept compiler which outputs C++ working (and the compiler is written in the language itself, so I'm dog fooding the project).
Rusts compilation model is projects (called crates) that compile source files in batches.
But also, this feels like a minor implementation detail...
Maybe I'm missing your point?
Rust has no headers or forward declarations, and compiles the whole project ("crate") as a single unit.
That said, I don't think we ever got any business as a result of folks having heard of Wallaroo from any of the promotion we tried to do around technical decisions.
We did however attract interest from investors who would notice when our technical content did well on HN. It certainly didn't hurt during fundraising.
Our decision to go with Pony for the original product we were building (high performance, finance focused, stream processing) was in a large part driven by time to market. We didn't have runway to build our own high-performance runtime for the product and using Pony got us that runtime.
You can hear me talking more about the decision process here:
https://corecursive.com/055-unproven-with-sean-allen/
There was more to it than that, but the "we get a runtime that can meet our needs" was a huge, huge part of why we picked Pony. I have often told people that we didn't so much pick a language as we picked the runtime and the language came along with it. That's not really true, but it's not really wrong either.
My experience is quite similar : I either end up working with clients who are already using Spark etc, or they don’t have a mature data engineering lab. In both cases, deploying a model to production is always the most challenging.
I hope their MLOps strategy is better, than just binding to MLFlow. This tool is absolutely not ready for prime time, and plagued by bad product decisions.
There's no rewrite here.
The description and outcome statistics make it sound _excellent_ and their technology stack makes their claims seem viable. However, and I say this as someone that is currently running an MLOps RFP, after looking at every page of their site and all their open job postings I have no idea what it's actually like to use their product.
I’m sure some devs would love to learn a new language at a new job, but many would see it as a career mistake. Your career income increases the more you master a certain discipline like a certain language. If you’re a jack of all trades (and adding Pony developer to your resume), you’re probably limiting your future income potential.
Were these run on CPUs or GPUs? How many of them? Last I looked at running Tensorflow models on CPUs it was really slow, so slow we had to abandon it.
Rightly, around the time I left the company, they pivoted and started a new product that they thought would have better product market fit and they started over with a new codebase as it is a rather different product than what we first built.
>Pony [...] has a smaller community, and as a small startup we were better off not having to solve problems outside our core domain
>wealth of available libraries
>access to a large community that will guarantee ongoing future support
>a wide variety of tools
>much larger pool of engineers who are eager to learn and work in Rust, or who already have significant Rust experience
>more resources available for learning Rust, and more opportunities for participation in conferences, etc.
Didn't say that Pony was bad for some technical reason. It was/is bad choice for a startup to use due to being a relatively new, niche language.
I've never heard of Pony before - is it any good, or worth playing around with?
I think at worst, you would get something out of learning Pony (although that can take some time, it's one of the harder languages to learn).
Feel free to stop by our Zulip and chat more as folks from the Pony community are rarely on HN, but are on the Zulip all the time.
> in the meantime data science and machine learning continued to explode ... With the increasing focus on MLOps, Rust became a better fit
This sounds like, "Our business goals shifted, as did the industry around data science, and Rust's maturity improved such that it made sense for us to migrate our stack."
I think it's fair to say looking back it was a mistake to pick Pony on the assumptions it provided marginal benefit for the exact needs of the business day 1 but at the same time I think it's fair to say that picking Pony was not a mistake as it allowed them to get where they are today.
Groupon was prototyped in Wordpress.
Ruby on Rails was created for Basecamp.
[edit: oops, thanks for the heads up on the spelling :)]
It's just OCaml by the way, for Objective Caml. Unless you're talking about the secret Irish fork /s.
There's a nice page on the official website about the history: https://ocaml.org/learn/history.html.
Not really. Outside of Jane Street OCaml has scarcely been proven to work in the industry now. As a big OCaml fan and former OCaml professional, I say this lovingly: it was (and remains) popular in academia and that's mostly it. And Pony is roughly as old now as OCaml was when Jane Street started using it.
The actual reason OCaml's risk profile was much lower was because it effectively has the backing of the French government and academy, which is quite the boon.
IIRC Jane Street chose OCaml basically because Yaron Minsky was brought on as CTO, he had worked with it in school and was a fan of it, and they knew that for the sort of work they were doing OCaml would give them an edge (speed of development and runtime efficiency) and they calculated that its relative obscurity and poor community support wouldn't be a liability for the sort of work they were doing. And remember that it was the year 2000 - Perl was basically the only language with the sort of library ecosystem (CPAN) that is expected of languages now: poor community support was much less of a liability then.
You'd also learn that this is a different product with different requirements.
There's no such thing as the "best language" - there's the "best language that fits your problem domain".
"Furthermore, the existing Apache tools depended on Java - specifically the JVM - where it's really hard to get predictable, very low latency results."
"From a purely performance perspective, C or C++ would have been a good choice. However, from past experience we knew that building highly distributed data processing applications in C/C++ was no easy task. We ruled out C++ because we wanted better safety guarantees around memory and concurrency."
very strange and odd.