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/)T
Posts
0
Comments
422
Joined
3 yr. ago

  • I feel like you have to review new laptops (and the Steam Machine, for that matter) without considering the price these days. Normally, specs without a price means nothing, but no new releases in the space are going to be worth the cost.

    Where this is more interesting, in my opinion, is compatibility with the older Framework 13. If you can buy the individual components from the pro variant that you want, it might be possible to upgrade without draining your bank account. Avoiding the LPCAMM2 modules seems like the best way to do that, which unfortunately means skipping on the mainboard (and processor).

    Hopefully we see prices drop sometime soon. I think at a lower price, it'd be worth considering. At the current price, very few computers are worth buying.

  • This depends, but not because of piracy. If you have to bypass DRM to download the music, you may be violating DMCA §1201 (even if you are otherwise allowed to use the music).

    Edit: This obviously doesn't apply to GitHub, but might to YouTube.

  • The final example just boils down to writing the whole program in assembly, doesn't it? The C function just returns a pointer to a static string, which you might as well do in assembly yourself since it's less code to do it that way (you can omit the whole function signature).

    In any case, the article does a great job introducing the various compilation stages the C program goes through in order to become an executable.

  • A byte can hold one of 256 values (0–255), and luckily there are way more than 256 blocks in Minecraft, so I can hand every single byte its own block.

    This was not always the case. It is now since they moved (many years ago) to their new ID format, but at one point there were less than 256 blocks, and items would start at ID 256 (Iron Shovel). Not super relevant today of course, but just a fun bit of history.

    Anyway, two other things come to mind:

    1. You could encode files directly into NBT data for an item or entity. You might need to split files across multiple tags though. It'd be funny to see armor stands representing files on disk, for example.
    2. You don't need to map bytes 1:1 to blocks. It's possible to have a palette of more than 256 blocks, and encode the data in a different base, like say base 300 or so, to make the encoded data more (spatially) compact.

    Cool project. It's a fun idea.

  • Does your function need to accept &mut self? If you can redesign that function just to take the slice of game objects (fn update(objs: &mut [T])) then you don't need to worry about the aliasing at all. You can pass an index as well if you want to operate on them one at a time.

    This is actually closer to the strategy you'd see with ECS. You'd operate not on individual objects, but on all relevant objects at once.

  • I've had GRUB nuked from installing a BIOS update. Kinda sucks that it happens at all, but it's bound to happen at some point. It's pretty rare though.

    Just keep a live disk on hand somewhere and use it to setup your bootloader again when needed. It's only a few bash commands, generally.

  • Bun specifically called out TigerStyle. Given that they were responding to this article, it's not a surprise they defended TigerBeetle.

    All it takes is one internet search with the words "zig style guide" to find countless examples to pull from online. The Bun devs are entirely to blame for choosing not to create or follow one, and that decision, if I had to guess, stems from their refusal to do any actual software development themselves and instead rely on LLMs to do everything for them.

    Maybe they could have asked robobun to open a PR to add a style guide?

  • To be honest I don't see how a "style guide" is going to help. C++ has had all sorts of guidelines and style guides for decades and it helps a bit but... not really.

    It does help though without requiring a complete rewrite in another language, which is prone to causing entirely new issues and reintroducing old, fixed ones.

    Like I said, Rust does a much better job at avoiding these. "Claude rewrite this in Rust" doesn't give you those benefits for free.

    Is this style guide not a style guide?

    It's a start, but doesn't say much about methods to avoid the memory issues that they supposedly had issues with. If they intended to actually use it, maybe it'd have more than 7 commits from 8 months ago. Maybe they would have updated it with patterns to prevent new bugs in the future based on the bugs they ran into. That didn't happen, though.

  • Yes, that's correct. Whenever you write something in Rust, the license is automatically permissive. In fact, both US and EU copyright law automatically grant an irrevocable, perpetual license to use any and all Rust code that has ever been written for any purpose at all, including for commercial purpose, unless the code was written by a corporation.


    Or, you know, you could just:

     toml
        
    [package]
    license = "GPL-3.0-only"
    
    
      
  • You could have searched for some benchmarks yourself, instead of thinking you're winning an argument in such a stupid manner.

    Why would I do that? I made no claims to its speed. You're the one making claims, so the burden of proof lies with you.

    Note that Jarred himself (bun creator) wouldn't push against this either. Instead, he will sell you the aggregate performance talking point (as another user did), which is why I made my deliberately facetious comment about webshittery.

    I don't really care what Jarred says though. He hasn't exactly left a good impression with the direction he's taken Bun.

  • Are you saying JavaScriptCore is faster than V8?

    No. Are you saying it isn't? Please cite your source if so.

    Bundling a compiler/transpiler and directing inotify at a source directory (for glorious hot-reloading) doesn't a language "runtime" make. Otherwise, I can create "runtimes" for any language in three lines of code right now.

    My bad, they're x86/ARM64 runtimes.

  • Especially after the supposed answer to Bun's memory bugs was "just never dynamically allocate".

    The answer to Bun's memory bugs was to follow a style guide. Not allocating dynamically stems from the style guide used by a mission-critical financial transactions database. Bun didn't have to use that style guide, and honestly it would have been overkill. They could have easily adopted a different one, modified one to suit their needs, or made their own.

    In general, I agree that Rust does a far better job at preventing these kinds of bugs than a style guide does, but Bun didn't even try one and decided instead to ask Claude to rewrite it in Rust.

  • Which part of the statement is wrong? Bun is a TypeScript (and JavaScript) runtime and can execute TypeScript directly. Node.js can also execute TypeScript directly on relatively newish versions.

    Sure, internally they execute JavaScript, but the statement as-is isn't incorrect, unless you're saying that Bun is slower.

  • I want to use AI again, but this time as an assistant – I'll review every change, write tests together, and keep a clear plan.

    Let's overlook the en-dash here and assume good faith. You should review every change from the start. You cannot assume the AI will work correctly or even has a concept of correct vs incorrect (or, despite the marketing, the ability to actually reason, sans a definition of the word that explicitly includes language models).

    Which AI tool would you recommend for this hybrid approach? How do you structure prompts to force the agent to explain before coding?

    Any tool should work. Just ask it questions, and forbid it from modifying or generating code itself.

    Note that all LLMs are prone to hallucinate. While I haven't tried Fable yet, even Opus with maximum reasoning can produce utter bullshit if something isn't in its training data. This means you need to validate everything it says.

    Use the model as a tool to point you in the right direction and help you form good questions or digest things beyond where you currently are. Verify the answers. Read documentation yourself. Go to the source, and learn from there. The LLMs are not omniscient, nor are they going to tell you when they cannot answer a question, so don't rely too heavily on them.

    Also, do you think a couple of weeks is realistic to rebuild the site that has feature parity with Lemmy and a few extra features that the AI managed to build in a single day?

    Let me ask you this: are you familiar with ActivityPub? ActivityStreams? JSON-LD? Do you know how to compact a JSON-LD document using a Lemmy-compatible context? Do you know how to dereference IRIs pointing to other servers?

    Going even higher level, do you know what backend framework you want to use? Frontend framework, if any? Do you know how to use them? How will you store user-generated content, including text, images, and other kinds of media? How will you handle access controls for those users? How will you perform authentication and user sign-ups?

    If you don't know, can you even fill the gaps in your knowledge in under two weeks?

    Two weeks is enough time to build a very basic proof of concept backend. It's enough time to mock out a couple pages on the frontend. You can't build a service in two weeks if you expect to actually understand how it works. You won't learn anything asking a LLM to do it for you.

    Learning takes time. If you skip that step, you will plateau at whatever level the LLM is at. Only by taking the time to learn will you ever actually grow as a developer.

  • Zig's features don't map 1:1 to Rust's features, so translating line-by-line (or file-by-file) doesn't even make much sense. What are you supposed to do with a crazy comptime function full of reflection when translating that? What about custom pointer types (which Bun had to create for Rust), lifetimes, differences in ecosystem library APIs, etc?

    The author actually mentions the challenges they ran into due to breaking the code up across multiple crates. They needed to break cyclic dependencies for it all to compile.

    I agree. 1 year is an underestimate.

  • Eh if they're going to use C, they might as well give Zig a shot.

  • There are a lot of ways to do a terrible job of this. For example, prompting Claude "Rewrite Bun in Rust. Don't make any mistakes." and then praying it would work is not [sic] what I did.

    Adversarial workflows seems like an awesome strategy for burning tokens if your workplace uses a token leaderboard. I'm glad to see that someone discovered a way to game the system!

    I'm really hoping that Boa can compete soon. I'd love an embeddable, Rust-based JS engine that isn't just AI generated unsafe everywhere. I don't think they plan to really fit into the same space as node/deno/bun, but we already have node for that, and an easier to use JS runtime from within Rust would be awesome.

  • As little sympathy as I have for these kinds of people, what Davide is accused of doing is still unacceptable. Still, thanks for the additional context. Makes it easy to decide not to touch OpenMandriva in the future.