My journey with Rust in 2017 — The good, the bad, the weird
medium.com
medium.com
2. You're complaining about windows32 API being slow, but blaming it on .NET ("I don’t know if it was attributed to Windows or the application programmers, but I attributed Windows’ built-in functions with being slow and having shitty PDF output, which is why I refused to use anything related to Win32 or .NET").
Windows API is C (or internally C++).
3. Is display a bottleneck? I never developed GIS applications, but your display is 2D and doesn't have to be real-time. I would assume that the "back end" of the program is doing most of the calculations, and the display just outputs it (not like, say, a 3D game where the rendering engine does a significant chunk of its own work).
2. Again, I didn't know at that time if that was the fault of Windows. All that I saw was an application that was extremely slow, written in either C++ (with Win32) or .NET (both of which are possible). Second, the application had very shitty PDF output (ex. a shape with CMYK was "emulated" by four shapes drawn on top of each other, one for black, one for magenta, etc. - lead to a completely bloated PDF). I suspected that it was the fault of the framework they were using and I didn't want to end up in a similar situation.
3. Display is actually the #1 bottleneck. You have to understand that in a real map needs to draw roughly 10000 lines, fonts, and symbols. The old program (which I had to work with), did this using Win32 drawing routines. Every time you zoom in / out, it could take 1 - 5 seconds (if lots of things were on the screen). In OpenGL, I can do it in a sub-millisecond time (using this technique - https://blog.mapbox.com/drawing-antialiased-lines-with-openg... paired with primitive restarting in OpenGL (https://www.khronos.org/opengl/wiki/Vertex_Rendering#Primiti...). ArcGIS, for example, has DirectX acceleration, QGIS uses OpenGL. This is simply a huge annoyance when trying to work with the program.
Back when we decided to build Leaf[0] we were in a situation where we needed a language with the characteristics similar to the ones of C, C++, Rust (embeddable, no runtime, etc.). Before starting development on Leaf we didn't have any extensive experience in any of those languages, and I still think that Rust was the right choice for the project.
I'd guess that the requirements of the MVP were similar. Since he also noted that it's his first time programming full-time, he had to learn _some_ language. Sure, it's not optimal to learn a core competency of your business while founding it, but I can also tell you from personal experience that sometimes that's still a better choice than the alternatives.
> And a fairly involved language such as rust.
I'd say Rust is only as involved as your requirements of it:
- You don't have to deal with raw pointers? -> No need to learn `unsafe`
- You're not particularly worried about extreme performance/memory usage at first? -> Clone now, learn lifetimes later
Windows does not have PDF generation, its support has been recently introduced in Windows 10.
So most likely it was a third party library.
EDIT: It was actually introduced in Windows 10, not 8.
does not compute
Users usually just blame their computer ("it's slow, let's grab a coffee"), but to me this performance is unacceptable.
If I read the article correctly, it would have halved his development time...
QTPDF (used in QGIS) supports it, but the output quality is sub-par when working with Illustrator, at least in my experience. This could be a bug in QGIS, yes. But I didn't want to invest time into something that would probably fail (if the QGIS team failed using it, I would probably do so, too).
I didn't have anything to lose. So if you have the chance to make it perfect (versus taking some off-the-shelf tool and possibly ending up with a PDF that isn't quite what you want), would you risk it?
ANYWHO, I didn't come here to malign the author. I came here to ask a question.
( For clarity, I'm an experience dev, computer science degree, been a developer full time for 6 years out of college and two years while in college )
I see a lot of discussion in here about developing GUIs in Rust. Writing native GUIs with Rust sounds awesome to me, and I'm drawn to it for the obvious benefits.
One of the things I want to do in 2018 is learn a new programming language. Last year I learned groovy, which is terrible, and Elixir, which is great and I highly recommend it.
I'm currently tore between three languages: Rust, Reasonml, and Scala
They have the following requirements:
- EXCELLENT type system - Functional - Productive - Portable
My goal is to write GUI applications that help me design my board games.
* Scala
Scala has a nice type system, runs on the JVM so we get all of that sweet sweet Java interop, is functional with a mutable escape hatch, and is a "boring" language that is used extensively.
Additionally, the story for writing GUI applications for Java isn't as slick as web technologies.
Listen, I'm a millennial. We don't believe in anything. I don't mind opening up a web browser to interact with a graphical user interface, so languages with a better web technologies story is more attractive to me.
Scala is not much of a departure from my previous languages, so I fear I wouldn't learn much.
I already have Elixir for writing restful APIs and GoLang/Hugo for static sites, so Scala over-laps with these use cases making it less productive.
* Reasonml
Reasonml is a newer language from Facebook that compiles to the OCaml syntax tree, and then uses the OCaml compiler to produce the machine code.
Currently, Reason's only target is Javascript, but the community has already written a bunch of back-ends to have reason output to other formats.
There is a Facebook-developed React library called ReactReason, so targeting web technologies is Reasons JAM. A lot of Messenger.com has already been re-written using reason.
Reason has a language server implementation that hooks up to my Emacs config quite nicely, so I'm efficient in my development environment.
Reason uses OCaml's type system, which has 25 years of development and is extremely effective.
Reason has a compiler. After working with dynamic languages for so long, I have learned to love my compiler.
Reason is designed for productive Javascript interop, so I have access to the gigantic nodejs ecosystem.
The humans who are d
Reason ticks a LOT of my boxes, but it has some warts:
- Not a perfect story for async programming. - Does not have a swagger-codegen back-end for stubbing out types based on my API docs. - Special little snowflake language with a small community - Really only good for front-end development - Is the type system and other language primitives THAT MUCH BETTER than Typescript + ImmutableJS?
* Rust
Rust is the language I WANT to learn and use, but I am hesitant for a number of reasons.
I want to learn rust because:
- Aside from a teeny bit of C / C++ usage in college, I've not written in a low level language that requires me to think about garbage collection and I think it would be a useful exercise. - It's extremely fast. - It has some excellent concepts, like the borrow checker, that will expose me to new ways of programming. - Will be nice to have a low-level language in my tool belt. - Quickly growing community, a good opportunity to contribute FOSS.
I'm hesitant because:
- I'm concerned it doesn't fit my use case of writing GUIs. - I want it to be a PRODUCTIVE langauge, and MAKE STUFF, not writing glue to get the stuff I want to work.
I did a bit of Scala in a previous job. I'm not sure i'd call it boring. Not because it's exciting - because it's infuriating. Way too many features, way too much overthinking, way too many clever-dicks in the community. If you want to learn an excellently-typed, functionally-inflected, productive, portable language on the JVM, i'd look at Kotlin. It's like the 20% of Scala that gives you 80% of the power.
Rust is pretty great. I came to Rust from a 95% Java background, and picked it up fairly quickly. I wouldn't say i've mastered it, but i can get things done. I have no idea what it's like for writing GUI apps, though.
I'll take a language with some resemblance of a coherent design like e.g. Kotlin any day over it.