Preferences

bikeshaving
Joined 702 karma

  1. My guess is this is a subset of the halting problem (does this program accept data with non-halting decompression), and is therefore beautifully undecidable. You are free to leave zip/tgz/whatever fork bombs as little mines for live-off-the-land advanced persistent threats in your filesystems.
  2. This isn’t science fiction anymore. CIA is using chatbot simulations of world leaders to inform analysts. https://archive.ph/9KxkJ
  3. You know when Claude Code for Terminal starts scroll-looping and doom-scrolling through the entire conversation in an uninterruptible fashion? Just try reading as much as of it as you can. It strengthens your ability to read code in an instant and keeps you alert. And if people watch you pretend to understand your screen, it makes you look like a mentat.

    It’s actually a feature, not a bug.

  4. https://github.com/Gricha/macro-photo/blob/highest-quality/l...

    The logger library which Claude created is actually pretty simple, highly approachable code, with utilities for logging the timings of async code and the ability to emit automatic performance warnings.

    I have been using LogTape (https://logtape.org) for JavaScript logging, and the inherited, category-focused logging with different sinks has been pretty great.

  5. This is interesting. The argument which I’m gleaning from the essay is that the old proposed API of having an intermediary new Sanitizer() class with a sanitize(input) method which returns a string is actually insecure because of mutated XSS (MXSS) bugs.

    The theory is that the parse->serialize->parse round-trip is not idempotent and that sanitization is element context-dependent, so having a pure string->string function opens a new class of vulnerabilities. Having a stateful setHTML() function defined on elements means the HTML context-specific rules for tables, SVG, MathML etc. are baked in, and eliminates double-parsing errors.

    Are MXSS errors actually that common?

  6. I’m guessing they chose $512,000 because “512” is a power of 2 and systems programmers love that sort of shit, but 2^19 is 524,288. I mean $12,288 is not insignificant but it would have been cooler.
  7. If you want adventurous fonts, try:

    Open Dyslexic: https://opendyslexic.org Using this font will make you brain look at similarly shaped sans serifs in strange ways. You can configure Claude Web to use this font.

    Atkinson Hyperlegible: https://www.brailleinstitute.org/freefont/ Pushing aging eyes with smaller display fonts in the terminal. I found the Braille Institute’s Atkinson Hyperlegible to have very good readability in small sizes.

  8. I don’t think people here understand the pricing for this market category. This is not a phone case or a container, it is a handbag/shoulder bag, which can go for $100-500+ (do not underestimate the long tail for this market). The prominent display of Issey Miyake branding is indicative that this is a foray into fashion. Whether it looks good, or whether the Apple Pocket will be fashionable, is an open question, but it would be stupid and brand damaging for Apple to price this item lower.
  9. Geographically speaking, over 80% of Iran’s land is classified as arid or semi-arid, and it is likely to face over 5°C of warming by the end of the century: the impacts of climate change will likely be more severe in Iran than the regional average. The region suffers from extreme weather including both droughts and flooding, seismic activity in the form tectonic uplift, particularly near the Makran coast, and constant attacks: economic attack by sanction, cyber attack on energy infrastructure, and lately even kinetic attack from neighbors. The fact that the regime hasn’t collapsed is a testament to Persian, Iranian and Islamic culture, and I hope its people find ways to prosper when the deck is so stacked against them.
  10. It’s funny when engineers accidentally create/recreate weapons of war to scratch an itch. Like when Mark Rober et al tried to do an egg drop from space only to realize they were essentially creating precision-guided missiles.

    https://youtu.be/BYVZh5kqaFg?si=Ml6e24BO9iiUL6d6&t=650

  11. 2.4% relative error is not bad.
  12. Does this mean we’ll finally get empirical proof for the aphorism “a picture is worth a thousand words”?

    https://en.wikipedia.org/wiki/A_picture_is_worth_a_thousand_...

  13. I would love to see a blogpost about the advantages of different Zig allocators (page, arena, fixed buffer, more?) and practical use-cases. Right now, I’m just thinking “this is the thing I pass through all my functions,” and it’s usually just the std.heap.page_allocator. Imagine we get to a period where people are writing games, web UIs, servers directly in Zig. I think the way allocators are used is likely to be the most interesting part.
  14. Crank.js uses generator functions for stateful components, where you yield instead of returning, and the scope is preserved for the lifetime of the component. You could technically use `while (true)`, but `for (props of this)` is the idiomatic way to get new props. The `this` object is an iterable of the latest props, and if the component doesn’t have props, `for ({} of this)` is the idiomatic way to loop over props without needing another variable assignment.
  15. The example is a fun one-page TodoMVC alternative. Here’s Crank.js:

        // Adapted from https://backbonenotbad.hyperclay.com/
        // https://gist.github.com/panphora/8f4d620ae92e8b28dcb4f20152185749
        function* PasswordStrength() {
          const requirements = [
            {label: '8+ characters', check: (pwd) => pwd.length >= 8},
            {label: '12+ characters', check: (pwd) => pwd.length >= 12},
            {label: 'Lowercase letter', check: (pwd) => /[a-z]/.test(pwd)},
            {label: 'Uppercase letter', check: (pwd) => /[A-Z]/.test(pwd)},
            {label: 'Number', check: (pwd) => /\d/.test(pwd)},
            {label: 'Special character', check: (pwd) => /[^a-zA-Z0-9]/.test(pwd)},
          ];
    
          let password = '';
    
          for ({} of this) {
            yield (
              <div class="w-80 p-6 bg-white rounded-xl shadow-lg space-y-4">
                <input
                  type="password"
                  value={password}
                  oninput={(e) => this.refresh(() => password = e.target.value)}
                  placeholder="Enter password"
                  class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2"
                />
                <div class="space-y-2">
                  {requirements.map((req, idx) => {
                    const isMet = req.check(password);
                    return (
                      <div key={idx} class="flex items-center gap-2">
                        <div class={`w-5 h-5 rounded-full flex items-center justify-center text-xs font-bold ${isMet ? 'bg-green-500 text-white' : 'bg-gray-200 text-gray-400'}`}>
                          {isMet ? '' : ''}
                        </div>
                        <span class={`text-sm ${isMet ? 'text-green-600 font-medium' : 'text-gray-500'}`}>
                          {req.label}
                        </span>
                      </div>
                    );
                  })}
                </div>
              </div>
            );
          }
        }
    
        renderer.render(<PasswordStrength />, document.body);
    
    I wish it used an HTML form instead of divs and Tailwind, but implementation per framework shouldn’t be more than 100 lines.

    https://github.com/bikeshaving/crank/blob/main/examples/pass...

  16. I don’t think I’m using it as a metaphor? To “have interesting latent spaces” just means you have access to the actual weights and biases, the artifact produced by fine-tuning/training models, or you can somehow “see” activations as you feed input through the model. This can be turned into interesting 3D visualizations and reveal “latent” connections in the data which often align with and allow us to articulate similarities in the actual phenomena which these “spaces” classify.

    Not many people have the privilege of access to these artifacts, or the skill to interpret these abstract, multi-dimensional spaces. I want more of these visualizations, with more spaces which encode different modalities.

    https://en.wikipedia.org/wiki/Latent_space

  17. Yes the Spanish spoken in Spain, especially the one that’s like /ˈɡɾaθjas/ and /baɾθeˈlona/.
  18. Spanish is one of those languages I would love to see as a breakdown by country. I’m sure Chilean Spanish looks very different from Catalonian Spanish.
  19. The source code for this is unminified and very readable if you’re one of the rare few who has interesting latent spaces to visualize.

    https://accent-explorer.boldvoice.com/script.js?v=5

This user hasn’t submitted anything.