Announcement

Collapse
No announcement yet.

SixtyFPS 0.1 Released As A Rust-Focused Graphical Toolkit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • krzyzowiec
    replied
    Originally posted by kpedersen View Post
    Qt... So what the project is saying that they are still 100% dependent on C++ and the Rust is basically a "safe" sprinkling on top of layers of potentially memory unsafe code.

    Annoyingly Rust is currently such a dependent language. I suppose this is a toss up between safety vs a mess of dependencies.

    Hopefully one day a language will appear where we can shed dependencies *and* have safety.
    Not possible. Any new language will have to create replacements for what software already exists, or layer atop existing software. Rust is "dependent" to the extent that C and C++ have defined the computing world. It will take many decades if ever to replace them. What I wonder is why the builder pattern became so popular within the Rust community. Default parameters completely eliminate that pattern, as you can see in Kotlin. It's not terrible for a user, but it's a lot of boilerplate to write for such a simple feature.

    Oh well. No language is perfect I suppose.

    Leave a comment:


  • Ironmask
    replied
    Originally posted by krzyzowiec View Post

    Well you know what they say about writing bug free C/C++ code: Anyone who thinks they can, can’t.
    Designing software isn't about not writing bugs, it's about planning everything out, the design and tooling, so that the likelihood of writing/designing bugs is reduced. The idea behind climbing a mountain isn't about being skilled enough to not fall off, it's about being prepared enough to not fall off, and accounting for what will happen if you do. This is why I follow methodologies like fail-fast, an incorrect program shouldn't even try to run in the first place.

    Leave a comment:


  • Emmanuel Deloget
    replied
    Originally posted by krzyzowiec View Post

    Well you know what they say about writing bug free C/C++ code: Anyone who thinks they can, can’t.
    You don't have to name a language for that. Any programming language allow the creation of bugs so it does not matter if the language protects anyone from blatant errors, bugs will happen anyway (not to mention that programs runs on top of buggy OSes who runs on top of buggy CPUs who are soldered on less-than-stellar motherboards who are feeded by failing alimentations that are receiving current from problematic grids. So...).

    [1] as in "you, not you in particular, but, you [2] know..."
    [2] as in "and I mean you, personnally".

    Leave a comment:


  • tobias
    replied
    Originally posted by kpedersen View Post
    Honestly, memory leaks are the least of my worries. It is usually the fact that many wrappers just churn out a raw pointer and just expect me to guess at its lifespan. Sure, my guess might be educated but the fact still remains it can't be verified.
    RAII certainly helps to prevent memory leaks, but they also help with issues like locking/unlocking some resource and similar issues that effect the correctness of a program. It (and other concepts in C++) can prevent classes of errors a C programmer has to watch out for.

    Rust adds some more classes of errors on top of what C++ protects against. E.g. ownership of things and transfer of ownership tends to be way more expressive in rust than in C++. That does of course not prevent every error you can have in your code, but it adds on top of what C++ adds over C.

    E.g. you can still leak memory in rust (which is a perfectly safe thing to do;-), but you do not have to think about dangling pointers very much in safe rust -- and safe rust is the fast majority of the code.

    I really found it very enlightening to look into rust a bit: Learning rust definitely made me a better C++ programmer! The rust compiler is a very patient teacher about memory issues you run into using C++ as well -- and which usually do not cause any trouble at all ;-)

    Leave a comment:


  • kpedersen
    replied
    Originally posted by tobias View Post
    Have you ever seen C++ wrappers around C libraries? Those shield a programmer from some of the pits a C programmer could fall into. E.g. RAII allows to make sure cleanup code is run in C++, that a C programmer needs to remember to put in manually.
    Honestly, memory leaks are the least of my worries. It is usually the fact that many wrappers just churn out a raw pointer and just expect me to guess at its lifespan. Sure, my guess might be educated but the fact still remains it can't be verified.

    Basically what I want is shared_ptr / weak_ptr counterparts everywhere but this is not really feasible due to overhead / mentality. Not to mention shared_ptr do not protect against dangling "this" in very poorly formed programs. Sure these programs need to be fixed but when you are given a massive program to maintain, C++ certainly doesn't help you find the flaws.

    Leave a comment:


  • krzyzowiec
    replied
    Originally posted by Ironmask
    I love Rust, but I can't stop thinking about a comment someone once said, it was only made by Mozilla because their programmers were too incompetent to not write memory leaks.
    Well you know what they say about writing bug free C/C++ code: Anyone who thinks they can, can’t.

    Leave a comment:


  • onlyLinuxLuvUBack
    replied
    Originally posted by kpedersen View Post

    Hehe, I could believe it (admittedly as a Firefox user. Their developers have "good" days and "bad" it seems ). Nothing can really prevent code from being bad and designing a language for a lowest common denominator of mentally-challenged people is certainly not ideal (same with DEs!). Though I do prefer languages that can be verified memory safe *and* portable. C has the latter but not the former whereas Rust has the former (if pure which is rare) but with the number of dependencies that get dragged in for the most trivial of things, I certainly can't say it is portable.
    Though then there is the debate of if the added verification makes people sloppy. I personally feel I *need* to know my code has some semblance of safety but it is impossible to 100% guarantee.

    (Python and Java are safe though decades of testing but they certainly aren't portable. The very idea of trying to get the JVM to run on a novel architecture makes me shudder).

    I have some pretty good solutions for C these days actually providing better results than AddressSanitizer in some areas (C++ is much more nasty to verify) and have yet to ever see a single project in pure Rust so can't really comment on its perceived safety.
    100% rust pastel.... https://github.com/sharkdp/pastel

    Leave a comment:


  • MadeUpName
    replied
    So it has buttons and underlined buttons, comes it multiple licenses, you can use multiple languages. Only question is does it actually do any thing?

    Leave a comment:


  • tobias
    replied
    Originally posted by kpedersen View Post
    Qt... So what the project is saying that they are still 100% dependent on C++ and the Rust is basically a "safe" sprinkling on top of layers of potentially memory unsafe code.
    Well, Qt is a way to get nativ-looking widgets now and it will get replaced over time. It is _already_ optional -- if you are happy to have non-nativ widgets in your application.

    Have you ever seen C++ wrappers around C libraries? Those shield a programmer from some of the pits a C programmer could fall into. E.g. RAII allows to make sure cleanup code is run in C++, that a C programmer needs to remember to put in manually. Are those wrappers useless as they rely on less safe C code? No, they are actually really helpful: A users of that wrapper has less chances to cause bugs! And any successful library has way less code than there is code using that library.

    A Rust wrapper around a C or C++ library does pretty much the same: It covers some sharp edges that somebody using the bare library could cut themselves on.

    Leave a comment:


  • kpedersen
    replied
    Originally posted by Ironmask View Post
    I love Rust, but I can't stop thinking about a comment someone once said, it was only made by Mozilla because their programmers were too incompetent to not write memory leaks. I appreciate Rust for the power and respect it gives me as a very modern and fresh language built on the decades of language research we've done, not because it's the low-level programmer's equivalent of a soft-spot helmet. If "safety" was all you cared about then you may as well use languages made for actually mentally-challenged people like Python or Java.
    Hehe, I could believe it (admittedly as a Firefox user. Their developers have "good" days and "bad" it seems ). Nothing can really prevent code from being bad and designing a language for a lowest common denominator of mentally-challenged people is certainly not ideal (same with DEs!). Though I do prefer languages that can be verified memory safe *and* portable. C has the latter but not the former whereas Rust has the former (if pure which is rare) but with the number of dependencies that get dragged in for the most trivial of things, I certainly can't say it is portable.
    Though then there is the debate of if the added verification makes people sloppy. I personally feel I *need* to know my code has some semblance of safety but it is impossible to 100% guarantee.

    (Python and Java are safe though decades of testing but they certainly aren't portable. The very idea of trying to get the JVM to run on a novel architecture makes me shudder).

    I have some pretty good solutions for C these days actually providing better results than AddressSanitizer in some areas (C++ is much more nasty to verify) and have yet to ever see a single project in pure Rust so can't really comment on its perceived safety.
    Last edited by kpedersen; 20 August 2021, 03:56 PM.

    Leave a comment:

Working...
X