home.social

#rustchallenge β€” Public Fediverse posts

Live and recent posts from across the Fediverse tagged #rustchallenge, aggregated by home.social.

  1. πŸ¦€#RustChallenge

    This will throw a compilation error

    Fix this code in a short or better way

    (Btw, this might compile in the future and work. Because, It was said that shortcomings of rustc & will be fixed in future)
    #rustlang #rust

  2. πŸ¦€#RustChallenge

    This will throw a compilation error

    Fix this code in a short or better way

    (Btw, this might compile in the future and work. Because, It was said that shortcomings of rustc & will be fixed in future)
    #rustlang #rust

  3. πŸ¦€#RustChallenge

    This will throw a compilation error

    Fix this code in a short or better way

    (Btw, this might compile in the future and work. Because, It was said that shortcomings of rustc & will be fixed in future)
    #rustlang #rust

  4. πŸ¦€#RustChallenge

    This will throw a compilation error

    Fix this code in a short or better way

    (Btw, this might compile in the future and work. Because, It was said that shortcomings of rustc & will be fixed in future)
    #rustlang #rust

  5. πŸ¦€#RustChallenge

    This will throw a compilation error

    Fix this code in a short or better way

    (Btw, this might compile in the future and work. Because, It was said that shortcomings of rustc & will be fixed in future)
    #rustlang #rust

  6. #RustChallenge

    What will be result?

    A. Both X & Y will give error
    B. Y will give error & X will print "Kernel" and "Astra"
    C. X will print "Kernel" & Y will print "Kernel" and "Astra"
    D. both prints "Kernel" & "Astra"

    (it was shared in ThePrimeagen stream by one of viewers)

    #rustlang #rust

  7. #RustChallenge

    What will be result?

    A. Both X & Y will give error
    B. Y will give error & X will print "Kernel" and "Astra"
    C. X will print "Kernel" & Y will print "Kernel" and "Astra"
    D. both prints "Kernel" & "Astra"

    (it was shared in ThePrimeagen stream by one of viewers)

    #rustlang #rust

  8. #RustChallenge

    What will be result?

    A. Both X & Y will give error
    B. Y will give error & X will print "Kernel" and "Astra"
    C. X will print "Kernel" & Y will print "Kernel" and "Astra"
    D. both prints "Kernel" & "Astra"

    (it was shared in ThePrimeagen stream by one of viewers)

    #rustlang #rust

  9. #RustChallenge

    What will be result?

    A. Both X & Y will give error
    B. Y will give error & X will print "Kernel" and "Astra"
    C. X will print "Kernel" & Y will print "Kernel" and "Astra"
    D. both prints "Kernel" & "Astra"

    (it was shared in ThePrimeagen stream by one of viewers)

    #rustlang #rust

  10. #RustChallenge

    What will be result?

    A. Both X & Y will give error
    B. Y will give error & X will print "Kernel" and "Astra"
    C. X will print "Kernel" & Y will print "Kernel" and "Astra"
    D. both prints "Kernel" & "Astra"

    (it was shared in ThePrimeagen stream by one of viewers)

    #rustlang #rust

  11. πŸ¦€ #RustChallenge

    Will it print Hello World?

    A. No, it will give compilation error

    B. Yes, it will print `Hello World`

    C. No, it will panic at runtime but prints 1

    This challenge was brought to you by @tuxmain

    #rustlang #rust #developer

  12. πŸ¦€ #RustChallenge

    Will it print Hello World?

    A. No, it will give compilation error

    B. Yes, it will print `Hello World`

    C. No, it will panic at runtime but prints 1

    This challenge was brought to you by @tuxmain

    #rustlang #rust #developer

  13. πŸ¦€ #RustChallenge

    Will it print Hello World?

    A. No, it will give compilation error

    B. Yes, it will print `Hello World`

    C. No, it will panic at runtime but prints 1

    This challenge was brought to you by @tuxmain

    #rustlang #rust #developer

  14. πŸ¦€ #RustChallenge

    Will it print Hello World?

    A. No, it will give compilation error

    B. Yes, it will print `Hello World`

    C. No, it will panic at runtime but prints 1

    This challenge was brought to you by @tuxmain

    #rustlang #rust #developer

  15. πŸ¦€ #RustChallenge

    Will it print Hello World?

    A. No, it will give compilation error

    B. Yes, it will print `Hello World`

    C. No, it will panic at runtime but prints 1

    This challenge was brought to you by @tuxmain

    #rustlang #rust #developer

  16. @AstraKernel I have a #RustChallenge for you.

    What will be the output of the following code:

    - A) nothing, it's not valid rust code 😞
    - B) nothing, it will crash runtime πŸ’©
    - D) something nice 😻
    - E) undefined behavior πŸ’€
    #rust #cpp #unsafe #gnu #crablang #imsorry #nice

  17. @AstraKernel I have a #RustChallenge for you.

    What will be the output of the following code:

    - A) nothing, it's not valid rust code 😞
    - B) nothing, it will crash runtime πŸ’©
    - D) something nice 😻
    - E) undefined behavior πŸ’€
    #rust #cpp #unsafe #gnu #crablang #imsorry #nice

  18. @AstraKernel I have a #RustChallenge for you.

    What will be the output of the following code:

    - A) nothing, it's not valid rust code 😞
    - B) nothing, it will crash runtime πŸ’©
    - D) something nice 😻
    - E) undefined behavior πŸ’€
    #rust #cpp #unsafe #gnu #crablang #imsorry #nice

  19. @AstraKernel I have a #RustChallenge for you.

    What will be the output of the following code:

    - A) nothing, it's not valid rust code 😞
    - B) nothing, it will crash runtime πŸ’©
    - D) something nice 😻
    - E) undefined behavior πŸ’€
    #rust #cpp #unsafe #gnu #crablang #imsorry #nice

  20. @AstraKernel I have a #RustChallenge for you.

    What will be the output of the following code:

    - A) nothing, it's not valid rust code 😞
    - B) nothing, it will crash runtime πŸ’©
    - D) something nice 😻
    - E) undefined behavior πŸ’€
    #rust #cpp #unsafe #gnu #crablang #imsorry #nice

  21. πŸ¦€ #RustChallenge

    What will be the output in "Nightly"?

    A. Compilation error (already mentioned nightly so it might run, but will you trust me? 😜)

    B. prints "return"

    C. prints "!"

    D. prints nothing

    It's been a long time since I posted (found this in discord)

    #rustlang #rust

  22. πŸ¦€ #RustChallenge

    What will be the output in "Nightly"?

    A. Compilation error (already mentioned nightly so it might run, but will you trust me? 😜)

    B. prints "return"

    C. prints "!"

    D. prints nothing

    It's been a long time since I posted (found this in discord)

    #rustlang #rust

  23. πŸ¦€ #RustChallenge

    What will be the output in "Nightly"?

    A. Compilation error (already mentioned nightly so it might run, but will you trust me? 😜)

    B. prints "return"

    C. prints "!"

    D. prints nothing

    It's been a long time since I posted (found this in discord)

    #rustlang #rust

  24. πŸ¦€ #RustChallenge

    What will be the output in "Nightly"?

    A. Compilation error (already mentioned nightly so it might run, but will you trust me? 😜)

    B. prints "return"

    C. prints "!"

    D. prints nothing

    It's been a long time since I posted (found this in discord)

    #rustlang #rust

  25. πŸ¦€ #RustChallenge

    What will be the output in "Nightly"?

    A. Compilation error (already mentioned nightly so it might run, but will you trust me? 😜)

    B. prints "return"

    C. prints "!"

    D. prints nothing

    It's been a long time since I posted (found this in discord)

    #rustlang #rust

  26. πŸ¦€ #RustChallenge:

    What is the output?

    A. Both X and Y prints "True" and "False"

    B.
    Only Y prints "True" and "False"
    X just prints "False"

    C. Gives compilation error

    D. Runtime error

    i know i know, sorry... :P

    #rustlang #rust

  27. πŸ¦€ #RustChallenge:

    What is the output?

    A. Both X and Y prints "True" and "False"

    B.
    Only Y prints "True" and "False"
    X just prints "False"

    C. Gives compilation error

    D. Runtime error

    i know i know, sorry... :P

    #rustlang #rust

  28. πŸ¦€ #RustChallenge:

    What is the output?

    A. Both X and Y prints "True" and "False"

    B.
    Only Y prints "True" and "False"
    X just prints "False"

    C. Gives compilation error

    D. Runtime error

    i know i know, sorry... :P

    #rustlang #rust

  29. πŸ¦€ #RustChallenge:

    What is the output?

    A. Both X and Y prints "True" and "False"

    B.
    Only Y prints "True" and "False"
    X just prints "False"

    C. Gives compilation error

    D. Runtime error

    i know i know, sorry... :P

    #rustlang #rust

  30. πŸ¦€ #RustChallenge:

    What is the output?

    A. Both X and Y prints "True" and "False"

    B.
    Only Y prints "True" and "False"
    X just prints "False"

    C. Gives compilation error

    D. Runtime error

    i know i know, sorry... :P

    #rustlang #rust

  31. πŸ¦€#RustChallenge

    What is the output?

    A. Prints memory address 3 times

    B.
    "Rust"
    Memory Address
    Memory Address

    C.
    "R"
    "u"
    "st"

    D.
    "Rust"
    "Rust"
    "Rust"

    #rustlang #rust

  32. πŸ¦€#RustChallenge

    What is the output?

    A. Prints memory address 3 times

    B.
    "Rust"
    Memory Address
    Memory Address

    C.
    "R"
    "u"
    "st"

    D.
    "Rust"
    "Rust"
    "Rust"

    #rustlang #rust

  33. πŸ¦€#RustChallenge

    What is the output?

    A. Prints memory address 3 times

    B.
    "Rust"
    Memory Address
    Memory Address

    C.
    "R"
    "u"
    "st"

    D.
    "Rust"
    "Rust"
    "Rust"

    #rustlang #rust

  34. πŸ¦€#RustChallenge

    What is the output?

    A. Prints memory address 3 times

    B.
    "Rust"
    Memory Address
    Memory Address

    C.
    "R"
    "u"
    "st"

    D.
    "Rust"
    "Rust"
    "Rust"

    #rustlang #rust

  35. πŸ¦€#RustChallenge

    What is the output?

    A. Prints memory address 3 times

    B.
    "Rust"
    Memory Address
    Memory Address

    C.
    "R"
    "u"
    "st"

    D.
    "Rust"
    "Rust"
    "Rust"

    #rustlang #rust

  36. ✨ Rust challenge explained

    Ans: C. It never reaches the prints statement. It goes in an infinite loop 😲

    But, how? Let's break down

    πŸ‘‰ End value is 0xfffffff which is 268435455.0. it is not very important here. So let's remove it and simplify the code with a constant 20,000,000.0 end value

    πŸ‘‰ `f` value stops increasing(round upped) after value 16777216.0 when you add just 1.0 🀯

    πŸ‘‰ To know why,you have to understand how the f32 is stored. Float is not stored as simple as integer

    πŸ‘‰ f32 uses IEEE 754 format to store the value

    πŸ‘‰ Larger f32 number loses accuracy

    In a 32 bit float (any language not just rust):

    πŸ‘‰ 1st bit is used for sign identification (positive or negative)
    πŸ‘‰ Following 8 bits used for exponent
    πŸ‘‰ Next 23 bits used for storing mantissa πŸ™ƒ

    You can see more here, how it is calculated
    youtu.be/8afbTaA-gOQ

    (Continued πŸ‘‡)

    #rustlang #RustChallenge #programmers #rust

  37. ✨ Rust challenge explained

    Ans: C. It never reaches the prints statement. It goes in an infinite loop 😲

    But, how? Let's break down

    πŸ‘‰ End value is 0xfffffff which is 268435455.0. it is not very important here. So let's remove it and simplify the code with a constant 20,000,000.0 end value

    πŸ‘‰ `f` value stops increasing(round upped) after value 16777216.0 when you add just 1.0 🀯

    πŸ‘‰ To know why,you have to understand how the f32 is stored. Float is not stored as simple as integer

    πŸ‘‰ f32 uses IEEE 754 format to store the value

    πŸ‘‰ Larger f32 number loses accuracy

    In a 32 bit float (any language not just rust):

    πŸ‘‰ 1st bit is used for sign identification (positive or negative)
    πŸ‘‰ Following 8 bits used for exponent
    πŸ‘‰ Next 23 bits used for storing mantissa πŸ™ƒ

    You can see more here, how it is calculated
    youtu.be/8afbTaA-gOQ

    (Continued πŸ‘‡)

    #rustlang #RustChallenge #programmers #rust

  38. ✨ Rust challenge explained

    Ans: C. It never reaches the prints statement. It goes in an infinite loop 😲

    But, how? Let's break down

    πŸ‘‰ End value is 0xfffffff which is 268435455.0. it is not very important here. So let's remove it and simplify the code with a constant 20,000,000.0 end value

    πŸ‘‰ `f` value stops increasing(round upped) after value 16777216.0 when you add just 1.0 🀯

    πŸ‘‰ To know why,you have to understand how the f32 is stored. Float is not stored as simple as integer

    πŸ‘‰ f32 uses IEEE 754 format to store the value

    πŸ‘‰ Larger f32 number loses accuracy

    In a 32 bit float (any language not just rust):

    πŸ‘‰ 1st bit is used for sign identification (positive or negative)
    πŸ‘‰ Following 8 bits used for exponent
    πŸ‘‰ Next 23 bits used for storing mantissa πŸ™ƒ

    You can see more here, how it is calculated
    youtu.be/8afbTaA-gOQ

    (Continued πŸ‘‡)

    #rustlang #RustChallenge #programmers #rust

  39. ✨ Rust challenge explained

    Ans: C. It never reaches the prints statement. It goes in an infinite loop 😲

    But, how? Let's break down

    πŸ‘‰ End value is 0xfffffff which is 268435455.0. it is not very important here. So let's remove it and simplify the code with a constant 20,000,000.0 end value

    πŸ‘‰ `f` value stops increasing(round upped) after value 16777216.0 when you add just 1.0 🀯

    πŸ‘‰ To know why,you have to understand how the f32 is stored. Float is not stored as simple as integer

    πŸ‘‰ f32 uses IEEE 754 format to store the value

    πŸ‘‰ Larger f32 number loses accuracy

    In a 32 bit float (any language not just rust):

    πŸ‘‰ 1st bit is used for sign identification (positive or negative)
    πŸ‘‰ Following 8 bits used for exponent
    πŸ‘‰ Next 23 bits used for storing mantissa πŸ™ƒ

    You can see more here, how it is calculated
    youtu.be/8afbTaA-gOQ

    (Continued πŸ‘‡)

    #rustlang #RustChallenge #programmers #rust

  40. ✨ Rust challenge explained

    Ans: C. It never reaches the prints statement. It goes in an infinite loop 😲

    But, how? Let's break down

    πŸ‘‰ End value is 0xfffffff which is 268435455.0. it is not very important here. So let's remove it and simplify the code with a constant 20,000,000.0 end value

    πŸ‘‰ `f` value stops increasing(round upped) after value 16777216.0 when you add just 1.0 🀯

    πŸ‘‰ To know why,you have to understand how the f32 is stored. Float is not stored as simple as integer

    πŸ‘‰ f32 uses IEEE 754 format to store the value

    πŸ‘‰ Larger f32 number loses accuracy

    In a 32 bit float (any language not just rust):

    πŸ‘‰ 1st bit is used for sign identification (positive or negative)
    πŸ‘‰ Following 8 bits used for exponent
    πŸ‘‰ Next 23 bits used for storing mantissa πŸ™ƒ

    You can see more here, how it is calculated
    youtu.be/8afbTaA-gOQ

    (Continued πŸ‘‡)

    #rustlang #RustChallenge #programmers #rust

  41. πŸ¦€ an Interesting #RustChallenge given by @sombrastudios

    What will happen?

    A) prints "Hello World" instantly
    B) prints "Hello World" after 3 seconds
    C) never reaches the print statement
    D) Compilation error

    #rustlang #rust