Announcement

Collapse
No announcement yet.

Fedora 37 Hopes To Have A Preview Of The New Web-Based Install UI

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

  • undefined
    replied
    Originally posted by win10pwrusr View Post

    Are you sure? I just tested it.

    Java:

    Code:
    public class MyClass {
    static String addTwoNumbers(int a, int b) {
    return String.valueOf(a+b);
    }
    
    public static void main(String args[]) {
    int x= 500000000;
    int y=2000000000;
    
    System.out.println(addTwoNumbers(x, y));
    }
    }
    Result = -1794967296



    JavaScript:

    Code:
    function addTwoNumbers(a, b) {
    return a+b;
    }
    
    let x= 500000000;
    let y=2000000000;
    
    console.log(addTwoNumbers(x, y));
    Result = 2500000000


    I asked 7 people around me what result they expected when adding 500000000 to 2000000000 and not a single one gave Java's result as the answer. Clearly that's not the expected behaviour.
    Do you really want a partition with a size of -1794967296 ? I think not. lol
    Erm, Javascript does exactly the same thing as Java, it just uses a different default numeric type. 9007199254740990 + 3 according to JS is 9007199254740992. Use double in Java instead of int and you will have exactly the same behavior as in JavaScript. Including all these 0.1 + 0.2 equals to 0.30000000000000004. I don't know programming languages where there are no numerical issues and I don't know any language where integer overflow is checked (unfortunately).

    Anyway, it was not my point to say that Java or whatever language is absolute best and has no bad moments. My problem is that the amount of these possible silent bugs is different. In Java you have provided one of the most well-known in CS issues with integer overflow, but this is rather an exception in Java than a rule.

    Leave a comment:


  • Charlie68
    replied
    Originally posted by finalzone View Post

    The current Anaconda installer has that similar simple and advanced powerful mode via network installation and also on Fedora Server by default.
    The problem with Anaconda is that it has a partitioner with a GUI that not even a kindergarten kid could have done worse. It is tremendously complicated to understand how it works, but Yast-install is simple.

    Leave a comment:


  • win10pwrusr
    replied
    Originally posted by undefined View Post
    So, this function will never ever do anything unexpected.
    Are you sure? I just tested it.

    Java:

    Code:
    public class MyClass {
        static String addTwoNumbers(int a, int b) {
            return String.valueOf(a+b);
        }
        
        public static void main(String args[]) {
          int x= 500000000;
          int y=2000000000;
    
          System.out.println(addTwoNumbers(x, y));
        }
    }
    Result = -1794967296



    JavaScript:

    Code:
    function addTwoNumbers(a, b) {
      return a+b;
    }
        
    let x= 500000000;
    let y=2000000000;
    
    console.log(addTwoNumbers(x, y));
    Result = 2500000000


    I asked 7 people around me what result they expected when adding 500000000 to 2000000000 and not a single one gave Java's result as the answer. Clearly that's not the expected behaviour.
    Do you really want a partition with a size of -1794967296 ? I think not. lol

    Leave a comment:


  • undefined
    replied
    Originally posted by krzyzowiec View Post

    It really has nothing to do with dynamic types. You can do dumb things in any language. It’s also trivial to avoid if you actually know them. Then again, you don’t use them so how would you know?
    Actually, you can't avoid it.
    In Java, Go, Rust, and many other languages, if you have a function


    Code:
    String addTwoNumbers(int a, int b) {
        return String.valueOf(a+b);
    }
    it can only be called with two integer numbers a and b passed to it. Otherwise the code will not compile. So, this function will never ever do anything unexpected. It will always take two integer numbers as input and return the sum of them as a string. It doesn't matter where the numbers come from or whatever, you know 100% they always be integer numbers, otherwise Java will not compile.

    Let's imagine for a moment that we are working with javascript and that we are receiving two numbers from a server and we need to compute their sum client-side using a similar function but in JS (sorry if there are mistakes, I am no JS professional, treat is as pseudocode).

    Code:
    function veryImportantFunction() {
        var num1 = getNumber1FromServer();
        var num2 = getNumber2FromServer();
        return addTwoNumbers(num1, num2);
    }
    
    function addTwoNumbers(a, b) {
        var sum =  a+b;
        return sum.toString();
    }
    As long as functions "getNumber1FromServer" and "getNumber2FromServer" return two numbers respectively all is fine. But what if any of them returns not a number? What if "getNumber1FromServer" returns an array for some weird reason? Mistake on the server side or something. This function will happily work with array instead of a number without any issues whatsoever. And it will return "1,2,34" when called with a = [1, 2, 3], b=4. How does documentation help in this case? You need to consciously consider all these cases where JS just ignores errors and check for them. For example, in this case you need to keep in mind that you need to check in the beginning of the function that a and b are integers. Otherwise you have a potential bug that will appear the moment something goes wrong anywhere before. And instead of failing, this bug will carry on, it will go further in the stack.

    Leave a comment:


  • rmnscnce
    replied
    Originally posted by Jedibeeftrix View Post
    What is so important about web based installers to the two big linux enterprise companies?
    Because by doing so, everything regarding the matter of the infra fleet maintenance can be done easily from the web browser. From the installation (which Cockpit + Anaconda is trying to solve), software management, VM management with a web-based viewport, resource monitor, and of course -- your ol' trusty TTY on web.

    Leave a comment:


  • cynic
    replied
    Originally posted by krzyzowiec View Post
    It really has nothing to do with dynamic types. You can do dumb things in any language.
    Nope. Statically typed languages have more predictable behaviour and makes strict check at compile time.

    Originally posted by krzyzowiec View Post
    It’s also trivial to avoid if you actually know them.
    if it were trivial, they would never happend. On the contrary, they always happend.
    Never saw this video?



    Those languages always try to compute whatever absurd thing you ask them to do, and the outcome is not always the one you expect.
    This open a big class of runtime bug.

    Originally posted by krzyzowiec View Post
    Then again, you don’t use them so how would you know?
    Guess what?
    I use software written by other persons!
    Some of my collegues uses python, perl and JS and they often incurr in those kind of bugs.

    Not that my software is bug free, but I least my compilers won't let me add an array to an object and find out at runtime that, after all, that wasn't a good idea.

    Leave a comment:


  • krzyzowiec
    replied
    Originally posted by cynic
    I see this type of bug everyday where dynamic typed languages are used (luckily I care about my work and don't use such languages).
    It really has nothing to do with dynamic types. You can do dumb things in any language. It’s also trivial to avoid if you actually know them. Then again, you don’t use them so how would you know?

    Leave a comment:


  • finalzone
    replied
    Originally posted by Charlie68 View Post

    To tell the truth, openSUSE is the most powerful "install" out there.
    It offers by default a simple and a more advanced powerful mode in which you can choose in detail what to install and what not.
    The current Anaconda installer has that similar simple and advanced powerful mode via network installation and also on Fedora Server by default.

    Leave a comment:


  • cl333r
    replied
    Originally posted by cynic View Post

    no, I was in a complex relationship with the borrow checker, so I stopped programming in Rust
    Huh, I dumped Rust for the same reason. Horrible rules.

    Leave a comment:


  • birdie
    replied
    Originally posted by marios View Post
    Why would anyone create such abomination and inflict it upon this world? In my mind, the definition of the web is "An awful collection of stupid design choices, standards and other garbage, that should only be used as an example of capitalism hindering even technological progress". Let's begin by saying that the design of the web is suboptimal by design, even for web pages (for example it uses text for stuff that is never read or written by humans). But what I hate most about the web, is seeing it metastasized to desktop and mobile applications to waste my cpu cycles and my battery (Either by the means of electron or by having a slow web page as the only option).

    Ok, someone might say "it is OK for an installer to be suboptimal" and I mostly agree with that. What is the upside of migrating an installer to the f-ing web? And also why use this garbage while you already have a working desktop app? Just why are you helping this cancer spread?

    PS: I would not even comment on this thread if it was the only web app. But the trend to move everything to the web is something I despise and this post triggered me (although using web for installation is not nearly as bad as most cases).
    It's all true however what Fedora is looking for, I guess, is for simplifying the development process and reducing the amount of code involved. Whether or not it's actually true I've no idea.

    Leave a comment:

Working...
X