Ballerina, a language with structural type system
v1-0.ballerina.io
v1-0.ballerina.io
> That obviously starts with the Enterprise Integrator team as that is where this baby was flirted with, dated and then conceived;
This is what happens when people think that coding is hard but writing is easy.
WSO2: Please, on behalf of innocent eyeball-owners everywhere, hire a dedicated content editor.
Look, real ballerinas are totally hardcore badass atheletes who could easily kick all our flabby nerd asses while standing on one toe, and I take my hat off to them for what they do. But how many professional software developers will really want to self-identify as “ballerinas” when discussing between themselves, never mind pitching to board rooms?
(Outside of the programmers-who-already-happily-self-identify-as-bronies subset, of course.)
Doubly so when the actual product looks as agile and graceful as a household broom.
Triply so when they can’t even do simple web pages right. (Just try the inline links on the Community page.) Or try the learn-by-example page, which spends seconds looking completely blank until some pointless Web 2.0 crap eventually loads in a perfectly static TOC.
I mean, I was prepared to overlook the marketing catastrophe just to read about their much vaunted take on structural typing (which is highly relevant to my interests), but this simple lack of technical competence means I am not going to waste any more time.
Money says the whole thing immediately sinks without trace, and none involved will ever be any the wiser why. What a pointless waste of effort.
The problem is that you should not use a widely used word for the name of your product/software/tools. It's hard for everyone who tries to get involved.
A good name IMO is Typescript if you want to compare.
Why not? What is wrong with "Ballerina"? If it's too feminine for you, that's a problem with you, and not the name.
Yes.
> who could easily kick all our flabby nerd asses while standing on one toe
For the most part, no, though if both parties have to try to stand one toe during the exercise, maybe.
> But how many professional software developers will really want to self-identify as “ballerinas” when discussing between themselves, never mind pitching to board rooms?
Uh, I don't usually identify, or want to identify, as name of tool when doing any of those things, whether the tool is Python, Ruby, C#, Docker, etc. Why would my lack of desire to do so when the tool is Ballerina be differentiating?
Identifying as user-of-toolname is different than identifying as toolname (and I actually prefer to minimize the former, too: when I'm dancing—contemporary or, less often these days, ballroom/swing, not classical ballet—I don't identify as a user of a particular brand of shoe, either.)
What do you call a bunch of google employees? Googlers (and they self-identify with that label). The same thing goes for a bunch of companies.
What do you call the people at a go meetup? Gophers. Ruby meetup? Rubyists.
There's a bunch of collective nouns. In the software community, they particularly pop up around companies we belong to, and programming languages we use.
It's about 50/50 with programming languages really. A bunch of C programmers isn't a "Unit of Eunuchs", but a bunch of python programmers are a "Plethora of Pythonists".
Rust programmers are a "Corrosion of Rustaceans, but java programmers aren't an "Orientation of Objects".
Collective nouns are somewhat random, but I assure you that when the programming language name makes it easy to create them, they will be created. Ballerina makes it very easy any of a number of collective nouns to form, and they totally would if the language took off.
Granted though I can't see where the name is coming from.
People nitpicking the gender of the programmer in a cartoon here is a great example of what I despise about modern tech discourse. The gender of the cartoon programmer isn't even that clear, it's so highly stylized. But I wonder if it was a woman giving another woman a massage instead, they'd be lambasted for pandering to the male fantasy of lesbianism.
https://en.wikipedia.org/wiki/The_Muse_(Star_Trek:_Deep_Spac...
Ballerina -> Baller. Problem solved.
That said:
1. This is bikeshedding, but you cannot make a statement like "diagram is the code, code is the diagram" and not show how to actually do that. The home page even has a sequence diagram. If you meant that the written code looks like a sequence diagram if you squint, then say that.
2. What makes this a Perlis language? I knew every term in the by example summary [1]. Is it annotating functions as services with metadata, or in-language support for xml/json, websockets/http2, etc? How is that different from other batteries-included languages like wolfram, for example?
3. Related: the problem with a batteries included language is that it gets bigger and bigger over time; hence the idea of "small language, large library base". What will you do with the language when its usage pivots over time - add more batteries as standard?
4. Minor: Many links to GH on the community guide page [2] end in 404s.
[1] https://v1-0.ballerina.io/learn/by-example/ [2] https://v1-0.ballerina.io/community/
The two biggest things that are different about Ballerina in my view are the language abstractions for providing and consuming network services, and the correspondence with sequence diagrams.
To be clear: I'm not critical; its good that ballerina attempts to bridge the visualization and the implementation. I'd like to see an actual sample, though.
Edit: Never mind, found the other poster who discovered your IDE plugin that shows the sequence diagram equivalent. Not sure how this is part of the language, though.
I'm speechless at the sheer amount of documentation and tooling that already exists. Editor plugins, a code formatter, a style guide, a build tool, a doc tool, a package manager, a package repository, a language spec, a standard library, a framework for writing services, deployment guides, and maybe 200 example programs.
I am a major TypeScript fan and former major JVM fan, and I can see the appeal of mashing them up. I think my problem is that the front page is the only interesting page on the entire site, the only one that gives me some sense of why I might care about this obscure language, let alone use it.
We will soon publish a playground widget which will let you run the same code in the browser so you can see source and the diagram as you wish (or not!).
His suggestion of "Ballet" is very good, it still conveys all of the grace, elegance and beauty of ballet. Also, ballet dancers of all genders are pretty kickass athletes as well as incredible artists and performers.
Come to think about it, maybe I shouldn't recomend them changing from "Ballerina" to "Ballet", because if I came up with a new language, "Ballet" would definitely be pretty cool, and I'd want to use it myself!
> That obviously starts with the Enterprise Integrator team as that is where this baby was flirted with, dated and then conceived
This is really damaging: the Ballerina in question is referred to as "baby", she is flirted with and then conceived—weird because that's an unusual order of events, but I guess this means you knocked her up and then had a baby with her? I can't continue, even dissecting this sentence feels creepy. Just don't do this. It's weird and disturbing and it will put off most women and many men who might otherwise consider using or contributing to your language.
Consider renaming the language to "Ballet", which is distinctly non-gendered and doesn't have these issues but still suggests the grace and beauty you are inspired by and aspiring to. Seriously, consider this. Yes, it's late in the game (post 1.0) and you like the name you have, but it's close enough to the current name that you won't lose much branding and you can keep the same nice logo that you already have.
If you are going keep the name Ballerina, you cannot sexualize the name and you should have a rule that others in the community not do so either. Julia has a specific rule in the code of conduct saying "do not sexualize the name of the project"—we didn't originally think we'd need to say that, but it turns out people just cannot resist saying creepy, sexual shit about anything they perceive to be feminine.
I'm sorry but I cannot accept the argument that because its a feminine word its not an appropriate name for the language. Gender balance has been a problem for this industry and making it so all names are male so people won't feel bad to say they like it is ridiculous. I worked hard in WSO2 to create an open workplace for women and 30% engineers are women - so it is possible to make it better if you try hard. Isolating tech to male-only names is not the solution.
As James noted, I updated the blog I wrote (even though the words were not meant the way you presented them) to remove that offending bit. And indeed your points about incorporating "do not sexualize the name" are great and we'll put them into our terms of conduct.
I'm not sure it's a feature I'm missing in current languages, but I sure am curious about this. Maybe "ballerina by example" should implement a toggle between diagram and code views?
(I think it means that the code does clearly enough the interactions that you don't need a separate diagram, rather than that there's built in tooling to generate one, if that's the confusion.)
I'm not certain it's unique, but it's pretty neat, and I can see how designing the whole language around servicing network requests would make it easier to implement / more reliably work.
Please, if the makers are reading this, just make it look like it does in your editor, when you're reading and writing it.
We'll work on it.
If you're considering spending 5 mins to write a comment on why we don't need this language, please consider spending that time with their examples page instead. Its pretty impressive in breadth and depth.
I do think that the whole diagram bit is noise, and I could never really get it to work as expected in VScode. Its just a solid language for service development.
I think that languages like this don't go mainstream because people like/want to write code, and anything that does not help to actually write code is seen as an hindrance. The main feedback I've heard about this kind of tool is "it's clunky, it's a pain to write code with". Guess what ? It's a good thing IMO.
For this to go mainstream, the whole software industry would have to go through a major revolution by shifting its focus from "writing code" to "deliver a working product". We should acknowledge that "writing code" is one tool among others, and may be not even the primary one (I personally think that specification engineering is the most important one).
In the field of critical embedded software, this has happened that's why it took off.
Another clue of that is for instance the Event-B/Atelier B that is intensively used in the railway/metro world (Paris line 14 was made with it, 2 bugs found in 15 years). While doing B, you get a broad specification you refine along the way into smaller problems. Writing code is actually the last step you do, when you are sure that all pieces fit together.
"Visual language" doesn't have to mean low-bandwidth interactions.
It seems to me that when creating a visual programming language for a particular class of programs, you probably find that making this translator is the same hard mental work that would let you make a text-based programming language instead. Once you have a good mapping from thoughts to code, the visual part doesn't add much. I was talking to a non-programmer recently who had tried Scratch and gotten tired of the visual layer very quickly. It's rare to see a visual -> code mapping that retains value after you've used it the first time, i.e. value beyond teaching.
I like the general idea of going the other direction, from code to diagram. I'm not interested in editing the diagram, but it's great for reading the code and sanity checking. But it doesn't have to be the actual code. A great many projects would benefit from having a GraphViz generator instead of hundreds of printlns. I was talking today about adding a GraphViz .dot visualisation to the salsa-rs incremental computation database, because I was reading the documentation on garbage collection and just wanted to see it in action. I know the rustc folks have been doing this for ages.
I think in addition to generating graphviz, it would be cool to have a log viewer that can render it.
$ my-program
normal logs
viz:"digraph {\n0 -> 1..."
more normal logs
^C
$ my-program | logviz
normal logs
more normal logs
... and a window pops up that animates changes between each graph that appears in the logs. Or even better, a tool that takes regular printlns of edges, nodes, etc, interprets them as an append-only variant (with deletion, etc) of graphviz, and assembles them into a graphical representation that changes on the fly. So you don't need to have a graph implementation in every language you want to do it with.Having the visual representation readily available is indeed "great for reading the code and sanity checking". Writing code (here meaning text or visual) involves reading code, both the code you're currently writing and anything that is connected to it. Thus the visual representation is also good for writing code.
I'm not advocating a low bandwidth interaction model. I can certainly see why some people might quickly grow tired of Scratch, but I'd argue that's a problem with the specific language/editor, not something that is universally applicable to anything that tries to go beyond "text". Structured editors can beat text editors in interaction speed.
However, after you're done, if to see the flow of your entire program (not just one function) as a sequence diagram then you can get that done.
The language syntax is "normal" syntax and has all the power o a modern language. Try it and see- feedback welcome.
Disclaimer: I'm the one who started the project and leading it as the product manager now.
EDIT: I found a link to using the graphical editor in the comments here.
https://v1-0.ballerina.io/learn/tools-ides/vscode-plugin/gra...
As I see it, they can hire dozens of coders in Sri Lanka, but don't have a good product management team that can turn a 95% complete feature into a market-ready one.
Ballerina is in its first GA release. Please elaborate on what features you see as "almost complete"?
And regards to your comment about WSO2's inability to produce market-ready products, we have 500+ customers from all over the world for our products. What do we need to become "market-ready"?
This first use-case I could think of involves XML processing. You have "native" xml types. Neat.
After reading the language spec, all the xml examples, and the documentation for the 'xml' and 'xmlutils' module, I have no idea how to read in a xml file and get an 'xml' value from it. I also don't know how to extract a record type from some XML, except by writing a manual mapper from the DOM node to the record.
The actual methods available on the 'xml' type seems kind of unfamiliar, even after working with XML in a lot of different languages. 'getName' and 'getElementName' seems to do the same thing for elements. For some reason. To determine the type of a node, you call 'getItemType'. But 'getItemType' does not document what happens with CDATA sections, document elements or document type elements. Why re-invent the wheel? what's wrong with getNodeName and getNodeType?
The 'slice' method is really weird. It expects numeric child indexes. I mean, you sometimes know the document order of the stuff you're working with, but that's not really XML-ish.
It looks like there's a lot of amazing work put into Ballerina, but I don't think I'll use it for this prototype.
The XML programming model is rather different from DOM and others for a lot of reasons. I hope reading this proposal will help.
Java really needs a safe structurally typed product. What are the major differences to Scala?
What are the major differences to Scala with Akka?
"Sri Lanka comes in at number one in its preference for Java" source : https://blog.hackerrank.com/which-country-would-win-in-the-p...
This is not a bad thing per se. If I make a diagram, I want to be able to understand it.
WTF is the sequence diagram for request hedging going to look like?
My understanding is that the primary motivation all of this is consultancy work in India.
WSO2 is an enterprise software product company with 500+ customers in 70+ countries and 600 employees globally.
We promoted Ballerina like that because we are proud of the work we do and wanted to show it off to people. You may not like the work we produce but trying to say its to get "consultancy work in India" is rather racist.
Congrats and thank you!
> We promoted Ballerina like that because we are proud of the work we do and wanted to show it off to people.
And rightly proud!
> You may not like the work we produce but trying to say its to get "consultancy work in India" is rather racist.
Saying it's to get "consultancy work in India" might be wrong (you promote Ballerina because you're proud of your work), but I fail to see how it's racist. Even if it was true, it wouldn't be racist.
We can do both, just like anyone else in any country.
Thus, I am not sure that this marketing does not backfire.
One of the primary reasons, we need a general purpose programming language focused on both "better developer experience" and "flexibility" that would cover almost all ecosystems.
I don't do cloud stuff but I can't wait to give this a spin and see if there's any way I can use it to my benefit.
A Go-like full screen online playground is coming.
This is now widely considered a terrible idea because it encourages software that doesn't conform to specifications, e.g. HTML's "quirks mode". https://i.stack.imgur.com/teQdv.png
The modern Web is the product of people who have so deeply and comprehensively misinterpreted and misunderstood every single facet that they are Not Even Wrong; then standardized, ratified, and protelyzed their own utter brokenness as The Right Way To Do It, and congratulated themselves on this marvellous job they have done.
Just Yahoos all the way down.
returns @tainted json
made me cringe a bit for some reason.langauge -> language
BTW why is not there in the By Examples page?