• 15 Posts
  • 658 Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle
  • Hmm, thinking about it now, I actually don’t have much beyond the Breeze (Light/Dark) themes preinstalled either. I have the openSUSE themes, because I am on openSUSE.
    Aside from that:

    • In Window Decorations, there’s the Plastik theme.
    • In Application Style, there’s “Fusion” and “MS Windows 9x”.
    • In System Sounds, I’ve got “Ocean” and “FreeDesktop”.
    • And in “Login Screen (SDDM)”, I have “Elarun” and “Maldives”.

    I believe, the Oxygen themes got removed from the default themes, possibly with Plasma 6.
    But yeah, maybe you also just had additional theme packages installed. The Arch Wiki lists some of those, too.




  • Ephera@lemmy.mltoProgrammer Humor@programming.devTariffs
    link
    fedilink
    English
    arrow-up
    2
    ·
    8 days ago

    Oh yeah, I was merely complaining about the syntax. Coming from other languages, I interpreted that import statement to mean essentially this:

    import { double, exponent /*...*/ } as operations from "Math";
    

    …and as such, it took me a few seconds to understand what’s being aliased by as operations.

    As for importing all symbols of a module, I do think it’s more harm than good in non-compiled languages. But when it comes to compiled languages, I’d say it depends on the language.

    In Rust, for example, I can easily throw down an inline module with one-way isolation, so that it can transparently access everything in its parent module via use super::*;, while the parent module can’t access what’s in the module (unless it’s been marked pub). That can reduce mental complexity of the code (and is actually used a lot, because unit tests are typically put into such an inline module).
    It’s also useful in Rust, because you can re-export symbols in different modules, so you can break up a file without breaking the imports by throwing a pub use my_sub_module::*; into the original module.

    But yeah, on the flipside, I really wouldn’t miss it, if it didn’t exist in Java. It was rather even annoying, because the popular IDEs have a rule to replace explicit imports with an asterisk as soon as it reached 5 symbols imported from the same module.
    It’s not as bad as one might think, because you can’t declare top-level functions or variables in Java (everything has to be in a class), but it still sometimes led to those asterisk imports bringing in the wrong class names, so I’d have to manually add the import I wanted underneath them…


  • Ephera@lemmy.mltoProgrammer Humor@programming.devTariffs
    link
    fedilink
    English
    arrow-up
    3
    ·
    9 days ago

    import * as operations from "Math";

    Wow, I knew import syntax with a separate from statement could be awkward, but that’s a new one for me.

    Apparently, the * cannot be used to import all symbols underneath a module (you always have to specify the as moduleName), so I guess, that makes it somewhat less weird for referring to the module itself.

    From what I can tell, there’s also no obvious other keyword they could’ve used:

    • package is only a keyword in strict mode.
    • self is not a keyword.
    • this is kind of awkward.
    • Leaving out the keyword is kind of awkward (import as operations from "Math";).
    • Changing up the whole syntax for this one case is awkward, too (import from "Math" as operations;).

    So, I guess, I’ll allow it, but I’m still not happy about it…




  • Ephera@lemmy.mltoMemes@lemmy.mlBig F'N TV
    link
    fedilink
    English
    arrow-up
    10
    ·
    16 days ago

    I mean, yes, but I was rather wondering, if that extra space was maybe why it couldn’t find it. Maybe you had to manually enter the SSID and accidentally put in that extra space? Then again, I don’t even know, if you took that photo…




  • Personal pet theory that may also play into it: Trans people are also often in information security roles. Potentially, because when you have to hide your real identity, you start to get good at it.
    And Rust also has various security benefits, especially when compared to C, but also when compared to garbage-collected languages (race conditions are largely prevented).






  • Well, part of the problem is that web apps themselves are kind of alien on the web. The web is generally document-based. Web apps take the document format and try to turn it into something it’s not.
    There’s a way to not do the JavaScript, but it doesn’t fix things being document-based and it can be argued that it makes other things worse in some respects.

    I’m talking about WebAssembly. Basically, you can write your web app in HTML+CSS+Rust and then the Rust part is compiled to WebAssembly, which then takes the role that JavaScript would normally take. It does not have to be Rust, lots of languages can be compiled to WebAssembly, but Rust has the most mature ecosystem for that, as far as I’m aware.

    In principle, it is also possible to use WebAssembly to render directly to a pixel buffer, but that’s really rather heavyweight and not terribly responsive, so not generally done, unless you implement a game¹ or similar.
    Alright, so back to the document mangling approach. There’s various frameworks available for Rust. I’ve used Leptos so far. There’s also Dioxus and Yew and probably others.

    Advantages:

    • Don’t have to write JS.
    • Can write Rust. Rust has some concepts that mesh really well with frontend dev, like the Result and Option types for error handling, which you can pass directly to your rendering stack and it can show either the data or the error (or nothing).
    • Can use the same language in backend and frontend and therefore also get compile-time checks that the two work together.

    Disadvantages:

    • The ecosystem is young. You will find barely a fraction of the component libraries as you can find for JS.
    • Rust also has concepts which don’t mesh well with frontend dev, like the whole memory management concept. Those frameworks bypass that or make use of it in clever ways, but things can be a bit peculiar or overly complex at times.
    • WebAssembly is sent to the browser in one big blob, because it’s a compiled program. This means you get somewhat of a loading time when first loading the web app. There’s ways to mitigate that with “hydration” strategies, but yeah, still a thing.
    • While JS is often minimized/uglified and therefore not readable anyways, WebAssembly makes that even more of a reality, because it is essentially assembly code that’s sent to the browser. It does still call the same APIs under the hood as JS does, so content blocking shouldn’t be affected, but yeah, can’t try to understand the code itself. This can also make debugging during development somewhat more painful.
    • Well, and it’s also yet another web standard that browsers have to support. It doesn’t make browsers simpler in the sense that suckless would like.

    I’ve listed a lot of disadvantages, so just to point out that, yes, to me, the advantages are absolutely worth it. But I can totally understand, if others see that differently.

    ¹) See, for example, Bevy and this UI example in particular.



  • As a software engineer, I’d say statistics is more useful for journalism. If in doubt, you could be analysing papers about entirely different fields, like physics or biology or whatever. Those also deal with statistics.

    But I also just feel like there’s not terribly much journalism to be done surrounding computer science. There’s the bog standard news cycle of tool XYZ had a new release, but beyond that, it’s more a field where techies try out or build things and then they tell each other about it.
    I guess, you could also consider some of the jobs adjacent to computer science / software engineering, like technical writer or requirements engineer or project/product owner. In some sense, the latter two involve interviewing customers and their domain experts to figure out what’s actually needed.
    Having said that, to my knowledge you typically get into these roles by being a software engineer and then just taking on those tasks regularly enough until someone notices…


  • Ephera@lemmy.mltolinuxmemes@lemmy.worldRust? Like what's on some metals?
    link
    fedilink
    English
    arrow-up
    111
    arrow-down
    1
    ·
    edit-2
    22 days ago

    It’s a programming language, which is particularly relevant for Linux, because it doesn’t require a runtime (separate program that runs the code). This allows it to be used in the kernel.

    But it also means that it’s very good for building libraries. With a small bit of extra work, virtually any other programming language can call libraries implemented in Rust (like you can with libraries implemented in C).
    Add to that, that Rust allows for performance similar to C and makes lots of typical C bugs impossible, and suddenly you’ve got folks rewriting all kinds of C libraries and applications in Rust, which is something you might have also heard about.