10 ms·
The Vala Programming Language
- voidfunc 4y agoDoes Vala have any use outside of Gnome? I remember my buddy writing it circa 2008ish and it seemed pretty niche back then.
- biggestfan 4y agoElementary OS (https://elementary.io/ https://elementary.io/) probably has the most thorough usage of it, most of their DE and all of their built in apps are written in Vala (as well as most of the 3rd party apps published through their store).
- agumonkey 4y agoI wonder how much of their success is due to vala. I assume they're all gifted but vala seemed to be the right vessel to channel their ideas and reach high goals faster.
- biggestfan 4y agoI would say the greatest strength of Elementary is being very consistent and opinionated, which I imagine the heavy usage of Vala helped with. It really does feel to me like an even more opinionated version of GNOME (heavy usage of Vala and GTK, mandating all apps published to their store also be GTK and open source, having a very specific desktop experience without many customization options).
- silisili 4y agoWell, it's GTK, so take that as you will. Yorba was around for a bit and did a few really ambitious applications in Vala, but never really finished and kinda disappeared. Shotwell and Geary came from them.
- JCWasmx86 4y agoFrida uses it
- pengaru 4y agoThe Yorba Foundation folks [0] liked to write stuff in vala (shotwell, geary, et al). [0] https://en.wikipedia.org/wiki/Yorba_Foundation https://en.wikipedia.org/wiki/Yorba_Foundation
- josephcsible 4y agoNot to be confused with the Vale programming language.
- sylware 4y agoisn't that rust, but better?
- nwah1 4y agoIt is C# for GNOME people
- deaddodo 4y agoThis. Honestly, I’ve always felt that Genie was the better GNOME successor to Boo; but Vala has long since become the “de facto” GNOME language.
- audidude 4y agoC# for GNOME people was Mono, which was started and incubated in GNOME. Including MonoDevelop, which is now Visual Studio for Mac.
- None4U 4y agoMono is C#
- aroman 4y agoMono is much more than just C#. It was created by GNOME folks so they could use .NET to develop GNOME/linux software. In that way, Vala is similar to Mono: they were both created as replacements for using GObject-C to develop desktop Linux softeware. https://en.wikipedia.org/wiki/Mono_(software)#History https://en.wikipedia.org/wiki/Mono_(software)#History https://en.wikipedia.org/wiki/Vala_(programming_language)#History https://en.wikipedia.org/wiki/Vala_(programming_language)#Hi...
- Syzygies 4y agoRob Pike famously explained that C needed its space-insensitive braces and semicolons in case code was transmitted through a channel that mangled whitespace. Those days predate most people reading this, yet many new language syntaxes opt for "familiarity". I wish that all language design went through a filter where every character mattered like the designer was in an episode of Squid Game. Bill Joy famously explained that syntax matters, a dense syntax puts more on screen. This is true even now. I struggle with this; my favorite syntax is a preprocessor that eliminates the need for most Lisp parentheses. The result is code poetry. Nevertheless, Haskell is more expressive. (Here's an easy test: Anyone who proposes a way to minimize Lisp parentheses, who hasn't introduced a symbol for missing outline levels, is just pulling out chunks and hasn't used their system to write thousands of lines of code.) I've written most of my lifetime of code in C, established my career in C, and C syntax is ground glass in my eyes.
- 2143 4y ago> Rob Pike famously explained that C needed its space-insensitive braces and semicolons in case code was transmitted through a channel that mangled whitespace. Interesting. And later when he (along with his collaborators) created Go, he moved with the times and avoided the need for semicolons. Alongside they also shipped a tool that handles formatting so people can stop talking about that.
- darthrupert 4y agoNot only that, afaik they pioneered/popularized a style of coding where the formatter is always correct, not the coder. This made coding on every language much more enjoyable and more efficient. This is not something to write papers about, but a very significant thing anyway.
- MaxLeiter 4y agoAnecdotal of course, but a teacher of mine worked on the original Ada compiler and said each dev had their own formatting rules. The SVN had an unformatted version and everyone could format it locally. Not the exact same, but pretty similar.
- Hayvok 4y agoProps to the language creator for showing us example code right away, at the top of the page. Half the time a new language gets introduced here and I spend 15 minutes hunting for some page somewhere on the site that deigns to share what the code looks like.
- p4bl0 4y agoYes! I also like that a lot. I think Racket has one of the best programming language landing page regarding this criterion: https://racket-lang.org/ https://racket-lang.org/ :).
- summerisle 4y ago> Half the time a new language... Agree with the point, but Vala is pretty old (relatively speaking). It's been around for a while and the whole idea is to have a GTK/GObject-focused C-family language. Last I looked it was a C transpiler and may still be.
- breck 4y agoYup, created in 2006 (https://pldb.pub/languages/vala.html https://pldb.pub/languages/vala.html). This particular website looks new (whois shows domain registered in May 2022)
- pxc 4y agoAnd if you've ever used GNOME, you've probably used some Vala applications! I like to use Cheese, the nice little webcam app, to test a webcam when I first set it up or just take a selfie, even when I'm not on GNOME. That's a Vala application :)
- transfire 4y agoI thought Guile was the preferred Gnome language.
- the-smug-one 4y agoGuile is the (supposed to be) preferred GNU extension language.
- imaltont 4y agoGuile was afaik, until it wasn't anymore and they went with Vala instead, though I can't remember when that happened.
- TekMol 4y agoint main (string[] args) { var app = new Gtk.Application( "com.example.App", ApplicationFlags.FLAGS_NONE ); app.activate.connect(() => { var win = new Gtk.ApplicationWindow(app); var btn = new Gtk.Button.with_label("Hello World"); btn.click.connect(win.close); win.child = btn; win.present(); }) return app.run(args); } Is this the equivalent of this html code? <button onclick="window.close()">Hello World</button>
- deleted 4y ago[deleted]
- bonzini 4y agoYou probably would have to compare with an Electron wrapper of that line, but yes.
- aroman 4y agoNo. The Vala code is creating an entire window and application. Your HTML code is just creating a button inside a window and application that already exists. The equivalent portion is just these two lines: var btn = new Gtk.Button.with_label("Hello World"); btn.click.connect(win.close);
- WoodenChair 4y agoI've always found Vala intriguing but a little too niche for my tastes. That said, if I wanted to write a cross-platform app in it today with a visual GUI builder (Glade?), what is the best IDE/tools on macOS to edit programs of it with? Visual Studio Code with some plugin? Does Glade work okay on macOS and with Vala?
- lonk 4y agoCross platform, visual gui builder, RAD ide: https://www.lazarus-ide.org/ https://www.lazarus-ide.org/
- Tozen 4y agoAlmost hilarious how people overlook Object Pascal and its IDEs, yet it's what many languages wish they had or want to be like.
- pjmlp 4y agoOr companies like Microsoft finally come out with a C++ Builder alternative (C++/CX), and a couple of WinDevs starts a mutiny, brings back the C++ developers experience 20 years back to their beloved VC++ 6.0 COM development tooling, paying customers be dammed.
- mmastrac 4y agoI'd be interested to learn more about this story.
- pjmlp 4y agoTyping on the phone. Short version story, a group of WinDev folks weren't happy with C++/CX and its C++/CLI extensions. So they brought in Kenny Kerr, which was trying to create a C++ library without those extensions. Out of that effort, C++/WinRT was born, they deprecated C++/CX (5 years ago) and told Microsoft customers to suck it up and wait for the day C++ gets reflection, because they couldn't otherwise provide the same level of tooling for C++/WinRT, as C++/CX enjoys on Visual Studio. Nowadays they are having fun with Rust/WinRT, while every customer that has to deal with C++/WinRT enjoys editing IDL files without any VS tooling, and merging the generated C++ code manually, after every IDL change. To the point of that even MFC has better tooling for dealing with COM. A tiny group inside Microsoft is now happy, while all customers deal with the mess they left behind.
- iddan 4y agoI always found it quite odd that the recommended way to start building GTK apps is to use Vala. As a young developer it was pretty intimidating (even though the syntax seemed pretty close to what I already knew) and also it was a little disheartening I can’t use JS because I really wanted to use React. Anyway, I think it’s a cool language, but I kinda wish Swift, Vala, Kotlin etc could have consolidated to one language
- sph 4y agoYou can program GTK (or Gnome actually) in JS. The issue is that it's a very idiosyncratic and not very well documented Javascript engine built on top of SpiderMonkey. Most stuff works as expected, other things like npm packages are an absolute pain or just impossible. https://gjs.guide/ https://gjs.guide/
- rurban 4y ago> Gtk.Application( "com.example.App", ApplicationFlags.FLAGS_NONE ); Don't they have optional arguments? Weird Gtk.Application("com.example.App"); would look much nicer for such a glue language.
- capableweb 4y agoVala does have optional parameters! Maybe it wasn't there in the initial version, and now the core API is stabalized so they don't use it for that call? Here is a random example I found on the interwebs: string greet (string name, string language = "English") { if (language == "English") { return @"Hello, $name!"; } else { return @"Sorry $name, I don't speak $language"; } } greet ("John"); greet ("Jane", "Italian");
- cemuka 4y agoIt looks perfect(as a c# developer standpoint). I wish I could use it to make cross-platform desktop application but it's only gnome distros I guess.
- colinkiama 4y agoYou actually can use it to make cross-platform applications. GTK is cross-platform.
- cemuka 4y agoThey should mention about it on the front page!I mean vala is looking pleasant to work with other than c++. So is there any resource to follow along? Can I create an app in macOS with vala sdk?
- ZuLuuuuuu 4y agoOh, I didn't notice Vala had this new(?) web site, it looks good. From my early experiments with Vala, years and years ago, what I remember is that it had nice error messages and the author was very consistent in releasing new versions even when there wasn't too much momentum.
- LeFantome 4y agoI just learned that the Budgie Desktop is written in Vala. https://github.com/BuddiesOfBudgie/budgie-desktop https://github.com/BuddiesOfBudgie/budgie-desktop Also, on Arch I use Pamac as a GUI for package management and it is written in Vala as well. I have used apps for quite a long time before realizing they were written in Vala. Not great for marketing but otherwise I would consider that one of its strengths.