SolidOak, an IDE written in Rust
github.com
github.com
> It's just a standalone executable that will run anywhere without being installed. See the Releases page for pre-built Linux x64 binaries (you need Rust and GTK+ 3.10 or above installed).
Is this not contradictory? Granted, statically linking GTK, 2 or 3, must be ridiculous, but would this still be considered a standalone binary? Granted, I think this might be a variant of libc needs to link to and I am just confused, but I am curious what more knowledgeable people think.
Anyway, I am not dismissing this project though. It sounds very cool. I might give it a shot.
FYI to everyone, racer is also a core component of making Rust hacking on Emacs wonderful, from what I hear. I have yet to be Rustacean.
Still I applaud you and other Rustaceans. It is nice to see fully formed GUI apps in Rust, because it makes it look to outsiders that news of stabilizing releases means people are really investing building useful tools.
Looks like there's no obstacles in getting this to run on Windows, GTK and all the other components behind this should run just fine on Windows. It just takes some effort from a Windows dev to set up builds and port whatever minor incompatibilities there are.
The problem with Windows is that non-Windows devs don't find supporting that platform pleasant (to put it mildly) and in my experience, there's a very limited number of Windows devs who actually contribute back to open source projects (this may be a cultural thing coming from a proprietary OS).
Additionally, supporting Windows is a bit painful because there isn't as much free tooling available, e.g. doing automated Windows testing in travis-ci is not an option AFAIK.
I believe the second influences the first, plus the project maintainer needs to share the opinion that releasing on Windows is worth the inevitable project changes required to do so. I have seen more than my fair share of pull requests sit idle because "meh, can't be bothered".
Regarding the travis-ci item separately, I am hoping that the work that Vagrant is doing toward being able to provision fresh virtual machine instances on Windows will provide some hope. I do fully appreciate that just provisioning them isn't the whole story, but it's a major hurdle IMHO.
On the other hand, it's probably because of people like me: I really don't like using Windows. Everything is weird and designed for people not like me (not to mention the lack of F/OSS). :-/
See e.g. line 14 in https://github.com/oakes/SolidOak/blob/master/src/ffi.rs :
let mut fds : [c_int; 2] = [0; 2];
Why not declare the array type as c_int[2]? And why use semicolons instead of commas?There are enough such "wtf?" moments that it causes pause and a sense of weirdness while reading Rust code, if the reader is familiar with other C-like languages (which is not to say that Rust itself is C-like).
Because a design decision was made that the type should look like the instantiation of that type. Same with structs and enums.
> And why use semicolons instead of commas?
Because this is "two elements both containing 0", not the array [0, 2]. Semicolons are used for that.
I like to think that Rust wants you to be familiar with C and ML syntax and philosophies before getting comfortable :)
The array type syntax you quoted is a bit like Haskell's `[Char]` syntax with a fixed-length property bolted on. You are right, though, that semicolon looks a bit weird. I guess using commas was not an option because the same syntax on the right hand side of the `=` means `[0, 0]`, i.e. two elements which are 0.
http://doc.rust-lang.org/reference.html#array-expressions
I suggest learning the language before making an attempt to criticize it.
I will learn it.
I like the semantics of Rust, it's a thing which needed to be attempted. What I am suggesting is, that for a language to be popular and accepted in already existing communities, it should have as little syntactic differences from the standards already present in those communities (or more elaborate: that things with similar semantics should have similar syntax). This does not preclude adding both new semantics and new syntax to the language.
In this case, I think the "target audience" for Rust is the crowd already familiar with C and C++, and languages (which are in many cases superior to C and C++) with significant differences such as LISP, Haskell, Erlang are vastly less popular compared to C, C++, C#, Java, JavaScript.
As a counter-example to my claim I recognize Python, which succeeded even if it was radically different and even today has some serious issues (for me, it is its performance and the GIL in CPython). IMO, it succeeded precisely because it was radically different than mainstream languages before it, so it didn't cause "mind crosstalk" issues you get when you encounter something which seems familiar but actually isn't.
Of course, this is inconsequential, it really boils down to arguing about personal taste and preferences. And even if I am right, if the semantics of Rust become popular, I'm sure that a more C-like language will evolve from it (maybe called Crust? :D ). If I am wrong, Rust will live long and prosper as it is.
Go is intended to be syntactically very C-like, you may find it more comfortable than Rust in that regard.
There are lots of competing ideologies about syntax in the rust community. Not everybody thinks the same way.
This is sorta kinda true. A long time ago, Rust used `[]`s. Then, at some point, it changed to `<>`s. When the discussion you're referring to came up, it was determined that there wasn't a good enough reason to switch back to `[]`s, as that also introduced other problems, and so wasn't clearly better, and would introduce a lot of churn.
Rust's choice of <> ignored the lessons from all the language which made that choice before (Java, C#, C++) and from there, other bad ideas just snowballed on top of it.
Lots of people were clamoring for the change, and the only unaddressed opposition to it was from those that explicitly wanted to cater to the c++ familiarity.
let element: i32 = some_integer_array(i);
let reference: &i32 = &some_integer_array(i);
work. In particular, the second one should give a reference to the element inside the array. I believe Scala doesn't have to deal with this subtlety, since everything is a pointer and generally the precise location of things in memory isn't so important.This issue is definitely not insurmountable, but it is also definitely not a simple direct replacement.
some_integer_array.at(i) let integer: i32 = some_integer_array.at(i);
let reference: &i32 = &some_integer_array.at(i);
with the desired semantics, without introducing new language concepts.In any case, we did use methods for indexing vectors for a while and it was quite annoying; the shorter syntax is nice.
But can you explain it to me? Because his explanation makes sense to me: they can't support that syntax, including getting references, without introducing new concepts. How does what your proposing get around introducing those new concepts?
When I said "some_integer_array.at(i)" I certainly didn't mean "rename both things".
Alternatively, having one additional magic kind/trait/... to denote "addressable" would be more manageable than shoe-horning things into the language's syntax which can – at this change – not be fixed anymore.
other bad ideas just snowballed on top of it
It still baffles me how people can invent two separate ways to invoke something, () and [], and pretend that's a good idea.If they used [] for types, they wouldn't have needed to consider such a bad idea.
Now, Rust has to deal with all the random syntax quirks caused by misusing <> for Generics, and it does it pretty badly: As an example, the Foo::<Bar>:: syntax is even worse than Java's Fuz.<Baz>Meth() hack.
In any case, I plan to propose a backwards-compatible extension to Rust's grammar post-1.0 which will make `Foo<Bar>` possible.
Finally, I should note that personally I prefer D's syntax for generics, though I'm ambivalent about the particular sigil used (Rust already uses `!` for a fine purpose).
Because the "&" reference operator goes before types, not after. (Rust makes the same decision as, for example, Go does.) This would lead to ambiguity when combined with postfix array type notation. What does "&c_int[2]" mean: is it "(&c_int)[2]" or "&(c_int[2])"?
It'll be interesting to see how many IDE features will be implemented. Currently it seems like a distribution of NeoVim + directory tree + Racer (Rust Autocompletion).
error: could not find native static library `nvim`, perhaps an -L flag is missing?
.. guess I'll have a go at fixing this. Scanning dependencies of target stable-busted-deps
[ 93%] Generating usr/lib/luarocks/rocks/stable-busted-deps
PANIC: unprotected error in call to Lua API (.../rust/neovim/.deps/usr/share/lua/5.1/luarocks/fs/lua.lua:3 68: cannot open /Users/fit2rule/.cache/luarocks/https___rocks.moonscript.org/manifest-5.1: No such file or directory)
make[3]: *** [usr/lib/luarocks/rocks/stable-busted-deps] Error
.. seems like a conflict resulting from having lua5.2 installed alongside lua5.1 .. if I figure it out, I'll update.Update: for reasons I don't understand, the manifest-5.1 file is .zip'ed up .. so:
$ cd /Users/fit2rule/.cache/luarocks/https___rocks.moonscript.org/
$ unzip manifest-5.1.zip
.. fixed the issue, and now libnvim can be built properly. Seems like there are issues with having lua5.2 and lua5.1 side by side as maintained by homebrew on OSX .. so if others run into this issue, there's the facts.Update2: SolidOak still refuses to build, this time getting further but still reporting build failure:
Compiling glib-sys v0.1.0 (https://github.com/oakes/rgtk#01b611cf)
Build failed, waiting for other jobs to finish...
EDIT: Never mind, I neglected to set PKG_CONFIG_PATH again in a new shell session, as per the README .. I'm now running SolidOak just fine and proceeding to use it to learn me some rust ... So .. leaving all the above for historical purposes ..Although, ahem, I expect that I'll just integrate Racer into emacs. :-)