Person interested in programming, languages, culture, and human flourishing.

  • 6 Posts
  • 67 Comments
Joined 3 years ago
cake
Cake day: June 17th, 2023

help-circle
  • For what it’s worth, the Popover documentation is very explicit that <dialog> is the only right tool for the job when you want a modal:

    • modal, meaning that while a popover is being shown, the rest of the page is rendered non-interactive until the popover is actioned in some way (for example an important choice is made).

    • non-modal, meaning that the rest of the page can be interacted with while the popover is being shown.

    Popovers created using the Popover API are always non-modal. If you want to create a modal popover, a <dialog> element is the right way to go.



  • This is such an exciting proposal for the web. From what I understand, this would be one of the final hurdles to having WASM “just work” in browsers the way people always expected it to (i.e. having standardized support for directly interacting with Web APIs/the DOM, without any janky glue code and skipping the huge inefficiencies of intermediary JS).

    The end result would be developers having a much easier path to implementing huge parts of their applications with native-like speeds in any language they want. Some people will want to do their whole application this way, and others will have specific modules that can benefit hugely from this while still making considered use of the rest of the web platform.

    As they say in the article, the current status quo is that this is possible but that ad-hoc/custom WASM modules are out of reach for all but the largest developers because of the cliff of complexity involved in moving beyond the most well-trod paths.




  • How long has it been since you used Teams? I’m no apologist, I have plenty of gripes with that piece of crap software, but this seems like a crazy stretch. Teams makes it almost trivial to embed code blocks with syntax highlighting for a wide array of languages, which can be easily copied out of Teams or opened in a separate viewer for easier reading.



  • Congratulations, you’ve illustrated the difference between syntax and semantics. But any competent compiler also handles semantics (just in a separate phase of compilation), because that’s necessary for any useful conversion to machine code, not to mention optimizations.



  • Microsoft produces a plethora of good learning materials if you’re struggling with the basics or specific concepts. I recommend their C# for Beginners course to get a good overview of real C#.

    Once you have a good handle on the basics, I would echo others’ advice that having some kind of project or goal to work towards is the surest path to learning, because you have external motivation to use what you’re learning and look up things as you need them. Is there some reason you chose C# specifically as your next language, maybe for game dev, web dev, or Windows apps?










  • I mean, the simple proof is that Rust has been growing by leaps and bounds in the embedded world, which is the closest to bare metal you get. It’s also being used in the Linux kernel and Windows, and there are several projects building new kernels in pure Rust. So yeah, it’s safe to say that it’s as close to the metal as C.

    Also, the comparison to Java is understandable if you’ve only been exposed to Rust by the memes, but it doesn’t hold up in practice. Rust has a lot more syntax than C (although that’s not saying much), but it’s one of the most expressive languages on the market today.