• 0 Posts
  • 40 Comments
Joined 2 months ago
cake
Cake day: June 23rd, 2026

help-circle

  • Zarobi@aussie.zonetoAnimemes@ani.socialPorco Rosso
    link
    fedilink
    English
    arrow-up
    6
    ·
    10 days ago

    She appears and acts 12–14, ostensibly is 16 according to the wiki; though kid Goku is supposed to be 12 somehow, so the canonical age numbers really don’t make sense.

    Overall, just a lot of gross sexual stuff targeted towards her. Practically every male character she meets either aggressively flirts with her, or straight up sexually harasses her. As just one example, Goku only gets the Flying Nimbus from Master Roshi in exchange for Bulma full-body flashing the old man with no undergarments. Early Dragon Ball has a lot of really uncomfortable moments lol









  • JavaScript is a bit funny and doesn’t actually have native integers… every number is a floating point, which means even whole number math gets weird sometimes. Not often, but enough that cents were lost and people were upset.

    I haven’t looked at how Dinero works under the hood, but I never had any problems at all with it after we started using it. Front end works in cents, back end works in decimal, is what I’d suggest for anyone else reading this. Statically typed languages are much easier to control and you don’t need a library at all if you’re careful.


  • As far as I understand, it seems to sacrifice accuracy at larger numbers, for more accuracy at smaller numbers. As they say, that seems like a reasonable tradeoff, because we tend to mostly use smaller numbers in our software.

    In my honest opinion though, if accuracy is a concern, I reach for decimal or integer based mathematical libraries. For example, in a JavaScript project that needed to handle currency, I used Dinero, because $0.1 + $0.2 needs to actually work properly. As far as I understand, it just does all math in integers, and then you can display it as a string in the UI or export it as an integer for storage as a realised decimal in the database.


  • Can you explain how this works exactly? Do you mean you have like a “third type” or “fraction”: 3 and you just store 00 for 0/3, 01 for 1/3, 10 for 2/3, 11 for 3/3? If it’s an object, struct, or class type to store the context, then it’s not a primative and has a lot of overhead for arithmetic and I don’t see how you could possibly even do simple things like 1/3 + 2/6



  • Sure, I’m typing it out on my phone though so excuse any mistakes:

    Tap for build.sh
    # build.sh
    php build.php
    
    Tap for build.php
    // build.php
    <?php
    
    // Just contains all the directory definitions and utilities in one place
    require once __DIR__ . './bootstrap.php';
    require once __DIR__ . './utils.php';
    
    // Static assets
    ensureDir(DIST_DIR);
    copy_all_files(ASSETS_DIR, DIST_DIR);
    
    $files = new RecursiveIteratorIterator(
        new RecursiveDirectoryIterator(PAGES_DIR)
    );
    
    // Build each page
    foreach ($files as $file) {
        if ($file->isDir()) continue;
        $path = $file->getPathname();
    
        // only build .php pages (skip partials)
        if (!str_ends_with($path, '.php')) continue;
    
        $relative = str_replace('pages/', '', str_replace(SRC_DIR . '/', '', $path));
        $output = str_replace('.php', '/index.html', $relative);
    
        echo $relative . "\n";
        if ($relative == 'index.php') {
            $outputPath = DIST_DIR . '/index.html';
        }
        else if (str_ends_with($output, 'index/index.html')) {
            $output = str_replace('index/index.html', 'index.html', $output);
            $outputPath = DIST_DIR . '/' . $output;
        }
        else {
            $outputPath = DIST_DIR . '/' . $output;
        }
    
        ensureDir(dirname($outputPath));
        ob_start();
        include $path;
        $html = ob_get_clean();
    
        echo $outputPath . "\n";
        file_put_contents($outputPath, $html);
    }
    
    echo "Build complete\n";
    
    Tap for utils.php
    // utils.php
    
    function ensureDir($path) {
        if (!is_dir($path)) {
            mkdir($path, 0777, true);
        }
    }
    
    function copy_all_files($source_dir, $target_dir) {
        $dir_obj = opendir($source_dir);
        @mkdir($target_dir);
        while ($file = readdir($dir_obj)) {
            if ($file != "." && $file != "..") {
                if (is_dir($source_dir . "/" . $file)) {
                    copy_all_files($source_dir . "/" . $file, $target_dir . "/" . $file);
                } else {
                    copy($source_dir . "/" . $file, $target_dir . "/" . $file);
                }
            }
        }
        closedir($dir_obj);
    }
    
    Tap for bootstrap.php
    <?php
    define('ROOT_DIR', __DIR__);
        define('DIST_DIR',  ROOT_DIR . '/dist');
        define('SRC_DIR',   ROOT_DIR . '/src');
            define('PAGES_DIR',     SRC_DIR . '/pages');
    // etc
    

    I stripped out all the database stuff because as my site grew I kept expanding on it and I needed a database.

    Mine will also probably be longer than average because I wanted fancy stuff like my source pages being just “about.php” instead of “about/index.php”, but I wanted the output to be “about/index.html” so it got way more complicated than it needed to be. But again most of those lines in the for loop are just me being obsessive compulsive about my own directory structure 😂. I also didn’t count the utilities functions in my original line count because to me that’s equivalent of importing a module; I didn’t write that file, I just copy pasted it from online. You could probably find a simpler build script online.

    Tap for example.php
    <?php
    $pageTitle = 'Example';
    ?>
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <?php include PARTIALS_DIR . '/head.php'; ?>
        <link rel="stylesheet" href="/styles/example.css" />
    </head>
    <body>
        <?php include PARTIALS_DIR . '/header.php'; ?>
        <?php include PARTIALS_DIR . '/noscript.php'; ?>
        <main>
            <h1>example</h1>
        </main>
    
        <?php include PARTIALS_DIR . '/footer.php'; ?>
        <?php include PARTIALS_DIR . '/global-scripts.php'; ?>
    </body>
    </html>
    




  • Oh yeah I guess… but in my experience non-tech people can’t even manage a .txt file asset directory, so Markdown is far too complicated for them.

    The original article was advocating for manually typing out your .html .js and .css files. Like just complete raw dog it 90’s style, which is even harder for most people, so I kind of just assumed tech knowledge.

    Anything short of a clicky-draggy online interface or asking Claude to do it is generally outside the reach of most non-tech people. I don’t think any average bloggers are going to become front-end developers just to start their blog; I basically just completely ignored that part of the article because it’s kind of insane. So my comments have been targeted towards people with at least mild programming knowledge.

    If you’re hand typing out .html anyway, it’s like a 5 minute additional process to set up PHP and copy a build script online. That way you’re still sticking to the “fundamentals” as closely as possible, in this context raw assets, but now you have the power of imports and other cool stuff if you need it. I do agree with that part of the article. People are too willing to jump in to any which framework because they’re popular, when in most cases the amount of frameworks you need is zero. Just write some articles and you’ll know what you need after 10.

    My problem with stuff like 11ty is that, in theory, it’s good. It abstracts away the HTML. But to actually use it, you have to understand HTML anyway; and at that point, why the middleman? Just write HTML. The second you need an <article> tag or a <section> or an <aside> or a <nav> or a <ul> of <a>nchor tags but some of them are external so they need the noref shit… you get my drift. You end up writing HTML inside your markdown, but now you are finagling two different languages. I don’t really see how # is much simpler than <h1> anyway.


  • That’s what I said. Use PHP as a static site generator. You write .php files which are almost exactly semantically the same as .html files, then you have a 10 lines of code build.php script which outputs it all to raw html and assets, but with the power of being able to import your navbar and such more easily. It’s like master pages in ASP.NET if you’ve ever used that, but that may be dating myself lol. You generally don’t need a framework at all. I can give an example of what I use for my own website if needed, but I’m too tired to get my laptop until tomorrow