Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)AR
Posts
25
Comments
164
Joined
1 yr. ago
Web Development @programming.dev
arendjr @programming.dev

Biome is a formatter and linter for JavaScript, TypeScript and other web languages.

With this partnership, we aim to develop TypeScript-compatible type inference that works out of the box for use in our lint rules.

  • Haha, sure thing!

    So, today, TurboPascal isn’t a very popular programming language anymore. But that’s okay! We have new programming languages nowadays. Some of the popular languages that we use today include JavaScript, TypeScript and CSS. You don’t need to know much about these languages, except that they’re commonly used for creating websites and apps that run on the web.

    Now, assume you want to create a website or a webapp, and you were to learn these languages for that purpose. In that case you have quite a learning experience ahead of you, which is great! Learning can be fun! But what’s not so great is that these languages have lots of room to make mistakes. Now, everyone makes mistakes, that’s just a fact of life, but when mistakes can be avoided, that’s generally preferred.

    This is where Biome comes in: It is a tool – we call it a linter – that helps you to detect many kinds of common mistakes. It can show you where these mistakes are, and sometimes even fix them for you. It can also show you possible mistakes, things that are not necessarily a mistake, but things that look suspicious.

    And on top of that, Biome offers you another tool: It’s called a formatter. When you write your code, it automatically takes care for you that the code looks consistent. So it fixes things like indentation and other use of whitespace for you, as well as where to place your parentheses and stuff like that.

    Together, hopefully these two things can make your programming experience a little bit more enjoyable. Cheers!

  • They’re included in the beta!

    Specifically, you can create GritQL plugins for custom linter diagnostics. There’s certainly more we’d like to do on that front, but we’re first going to see how these are being received to decide where to prioritise next.

  • Web Development @programming.dev
    arendjr @programming.dev

    Biome lead here, so feel free to ask anything!

    Biome is an integrated linter and formatter with support for JavaScript, TypeScript, CSS, and more.

    Highlights of the release:

    • Plugins: You can write custom lint rules using GritQL.
    • Domains: Domains help to group lint rules by technology, framework, or well, domain. Thanks to domains, your default set of recommended lint rules will only include those that are relevant to your project.
    • Multi-file analysis: Lint rules can now apply analysis based on information from other files, enabling rules such as noImportCycles.
    • noFloatingPromises: Still a proof-of-concept, but our first type-aware lint rule is making an appearance.
    • Our Import Organizer has seen a major revamp.
    • Assists: Biome Assist can provide actions without diagnostics, such as sorting object keys.
    • Improved suppressions: Suppress a rule in an entire file using // biome-ignore-all, or suppress a range using // biome-ignore-start and `

    Moans

  • I think it’s the latter. I once had to take care of a sick friend who was pretty much puking her guts out. Her moans sounded arousing. Of course she wasn’t intentionally doing that, it’s just our own male brains playing tricks on us.

  • I’m making a case for custom codes, not for using a 200 status code with it. My reply said the 200 didn’t make sense.

    Of course once you use custom codes, the actual HTTP status codes do become less important, because there’s some redundancy there. That’s not an argument to do it wrong, but it is an argument that accurate HTTP status codes are less of a priority. So understandably some people will take shortcuts.

    Apparently you find this very frustrating, but in the end it’s just an implementation detail. But it also sounds like you’re more frustrated with the service API as a whole than the fact it uses custom error codes specifically, so I’m just going to leave it at that.

  • I found the title of that section slightly triggering too, but the argument they lay down actually makes sense. Consistency helps you to achieve correctness in large codebases, because it means you don’t have to reinvent what is correct over and over in separate pockets of the codebase. Such pockets also make incremental improvements to the codebase harder and harder, so they do come back to bite you.

    Your example of vendors doesn’t relate to that, because you don’t control your vendor’s code. But you do control your organisation’s.

  • Well, looking at your example, I think a good case can even be made for it.

    “s23” doesn’t look like an HTTP status code, so including it can make total sense. After all, there’s plenty of reasons why you could want custom error codes that don’t really align with HTTP codes, and customised error messages are also a sensible use case for that.

    Of course duplicating the actual HTTP status code in your body is just silly. And if you use custom error codes, it often still makes sense to use the closest matching HTTP status code in addition to it (so yeah, I agree the 200 in your example doesn’t make a lot of sense). But neither of those preclude good reasons for custom codes.

  • Another data structure that you can consider is the red green tree: https://willspeak.me/2021/11/24/red-green-syntax-trees-an-overview.html

    We use it in Biome too, and it’s great for building trees that are immutable and yet still need frequent updates, as well as traversal in all directions. Its implementation contains quite a bit of unsafe to make it fast, though as a consumer you’re not really exposed to that.

  • Mostly the same reason why democracy worked for quite a while too. As long as people believe in a system and see the benefits to themselves as well, they can go quite a while with it.

    In general I also think most people aren’t out to screw one another, no matter how much it may seem that way sometimes, so as long as that keeps for the monarchs in a majority of districts, the system could balance itself.

    But yeah, I’m not going to say it’s perfect. Sooner or later it would collapse, and when it does my money would be on the same reason as yours.

    So I think the main question is: would it be able to last longer than democracies can, especially in the face of mass media manipulation and other challenges. I can’t prove it, but I suspect it might have a decent shot, mostly because the monarchs would be more agile to respond against unforeseen threats.

  • Your proposal is just an idealistic version of early US.

    Thanks, I guess :)

    You claim that corruption is fundamentally impossible, but assume that magically “the monarchs aren’t allowed to own property” without regard to enforcement.

    I make no such claim, and I don't make assumptions regarding enforcement either. Constitutional enforcement is discussed in quite some detail.

    You claim to have an alternative to democracy but still propose majority voting on replacing rulers and constitutions.

    There is majority voting on deposal of rulers, to be specific. Their replacement isn't voted on by a majority of the population.

    Constitutional changes are voted on through majority, but first require a majority of the monarchs to be on board.

    Both these limitations are intentionally designed to mitigate manipulation of the population.

    You simply assume that monarchs will keep each other in check and not devolve into the conspiring, warmongering tyrants that history is full of.

    There is quite some detail about the enforcement mechanisms. The idea is very much not to assume, but to persuade the monarchs to act in a benevolent manner, by enticement through both the carrot (wealth for as long as they rule), but also the stick (deposal if the majority doesn't vote in favour of their actions, with a threat of assassination if they refuse to be deposed).

    Power can always be abused to get more power and go against all your original ideals. The only way to definitely prevent corruption is to ensure power is never concentrated in the hands of few.

    Ah. So it wasn't me that claimed that corruption is fundamentally impossible, it's you that claim to have the definitive answer.

    For what it's worth, I agree power shouldn't be concentrated in the few. Which is why I split power across districts, and between citizens and monarchs, and why the group of monarchs for each district cannot be too small either. It's all there if you could try to be a little less dismissive.

  • Political Discussion and Commentary @lemmy.world
    arendjr @programming.dev
    arendjr.nl New Monarchy: A Rethinking of the Values of Democracy

    New Monarchy is based on a union of districts, each governed by a monarchy. Monarchies are constrained by a constitution to guarantee citizen rights, including the right to depose unjust or unfit rulers, while districts are sworn to protect each other's constitution.

    Recent events in #politics triggered me to write a manifesto on the values of #Democracy and what we can to do preserve them.

    Web Development @programming.dev
    arendjr @programming.dev

    Biome project lead here, so feel free to ask questions!

    Rust @programming.dev
    arendjr @programming.dev
    Programming @programming.dev
    arendjr @programming.dev
    JavaScript @programming.dev
    arendjr @programming.dev
    Programming @programming.dev
    arendjr @programming.dev
    Programmer Humor @programming.dev
    arendjr @programming.dev

    When happy teams are an issue

    Linux @programming.dev
    arendjr @programming.dev

    DirectX Adopting SPIR-V

    SPIR-V is the intermediate shader target used by Vulkan as well, so it sounds like this may indirectly make DirectX on Linux smoother.

    JavaScript @programming.dev
    arendjr @programming.dev

    Biome v1.9 is out!

    Today we celebrate both the first anniversary of Biome 🎊 and the release of Biome v1.9! Read our blog post for a look back at the first year and the new features of Biome v1.9.

    In a nutshell:

    • Stable CSS formatting and linting. Enabled by default!
    • Stable GraphQL formatting and linting. Enabled by default!
    • .editorconfig support. Opt-in
    • biome search command to search for patterns in your source code.
    • New lint rules for JavaScript and its dialects.
    Rust @programming.dev
    arendjr @programming.dev
    Programming @programming.dev
    arendjr @programming.dev

    With this post I've taken a bit more of a practical turn compared to previous Post-Architecture posts: It's more aimed at providing guidance to keep (early) architecture as simple as possible. Let me know what you think!

    Programming @programming.dev
    arendjr @programming.dev

    After my previous post introducing Post-Architecture, I received a bunch of positive feedback, as well as enquiries from people wanting to know more. So I figured a follow-up was in order. Feel free to ask questions here as well as on Mastodon!

    Programming @programming.dev
    arendjr @programming.dev

    This post highlights my experience working with software architecture in startup environments. I think the approach is different enough from the traditional notion of software architecture that it may warrant its own term: post-architecture.

    JavaScript @programming.dev
    arendjr @programming.dev

    cross-posted from: https://programming.dev/post/12807878

    This new version provides an easy path to migrate from ESLint and Prettier. It also introduces machine-readable reports for the formatter and the linter, new linter rules, and many fixes.

    Rust @programming.dev
    arendjr @programming.dev

    This new version provides an easy path to migrate from ESLint and Prettier. It also introduces machine-readable reports for the formatter and the linter, new linter rules, and many fixes.

    Rust @programming.dev
    arendjr @programming.dev

    Rust Optimization: Vec::into_iter().collect()

    I just had a random thought: a common pattern in Rust is to things such as:

     rs
        
    let vec_a: Vec<String> = /* ... */;
    let vec_b: Vec<String> = vec_a.into_iter().filter(some_filter).collect();
    
      

    Usually, we need to be aware of the fact that Iterator::collect() allocates for the container we are collecting into. But in the snippet above, we've consumed a container of the same type. And since Rust has full ownership of the vector, in theory the memory allocated by vec_a could be reused to store the collected results of vec_b, meaning everything could be done in-place and no additional allocation is necessary.

    It's a highly specific optimization though, so I wonder if such a thing has been implemented in the Rust compiler. Anybody who has an idea about this?

    Programming @programming.dev
    arendjr @programming.dev

    GritQL integration progress · Biome.js

    Just a progress update on a fun open-source project I'm involved with. Biome.js is a web toolchain written in Rust, and it provides a great excuse to play around with parsing technologies and other fun challenges :)

    Rust @programming.dev
    arendjr @programming.dev

    Productivity of Rust teams at Google

    Slide with text: “Rust teams at Google are as productive as ones using Go, and more than twice as productive as teams using C++.”

    In small print it says the data is collected over 2022 and 2023.