upvote
100k lines of clean, bug free, optimized, and vulnerability free code or 100k lines of outsourced slop? Two very different price points.
reply
A compiler that can build linux.

That level of quality should be sufficient.

Do you know any low quality programmers that write C compilers in rust THAT CAN BUILD LINUX?

No you don't. They do not exist.

reply
Do you think this was guided by a low quality Anthropic developer?

You can give a developer the GCC test suite and have them build the compiler backwards, which is how this was done. They literally brute forced it, most developers can brute force. It also literally uses GCC in the background... Maybe try reading the article.

reply
HEH... I'm sorry man but I truly don't understand what point you're trying to make, other than change the subject and get nasty.

You take care now.

reply
The trick to not be confused is to read more than the title of the article.
reply
It's a shame that there's no way to block obnoxious people on HN.

I think I'll ask codex to write me a Chrome extension to censor you. :)

EDIT: Done!

(() => { "use strict";

  const BLOCKED_USER = "bopbopbop7";

  // -------- helpers --------

  /** True if the node (or its descendants) contain a user link matching blocked user */
  function containsBlockedUserLink(root) {
    if (!root || !(root instanceof Element)) return false;
    const sel = `a[href^="user?id="], a[href*="user?id="]`;
    const links = root.querySelectorAll(sel);
    for (const a of links) {
      const href = a.getAttribute("href") || "";
      // HN uses relative href like "user?id=pg"
      // Algolia uses full/relative links; check query portion.
      if (href.includes(`user?id=${BLOCKED_USER}`)) return true;
      if ((a.textContent || "").trim() === BLOCKED_USER && href.includes("user?id=")) return true;
    }
    return false;
  }

  /** Remove the closest HN listing block (table row pairs) for a story */
  function removeHNStoryFromListing(anchorUserLink) {
    // On HN listings, a story is typically 2 consecutive <tr>:
    // 1) title row (class="athing"), 2) subtext row.
    const userTr = anchorUserLink.closest("tr");
    if (!userTr) return;

    // If we are in the subtext row, the associated title row is usually previousElementSibling
    // The title row has class "athing".
    const maybeTitleTr = userTr.previousElementSibling;
    const titleTr = maybeTitleTr && maybeTitleTr.classList && maybeTitleTr.classList.contains("athing")
      ? maybeTitleTr
      : userTr.classList && userTr.classList.contains("athing")
        ? userTr
        : null;

    if (titleTr) {
      const subtextTr = titleTr.nextElementSibling;
      titleTr.remove();
      if (subtextTr && subtextTr.tagName === "TR") subtextTr.remove();

      // Sometimes there is a spacing row after; remove if it's just spacing
      const spacer = (subtextTr && subtextTr.nextElementSibling) || null;
      if (spacer && spacer.tagName === "TR" && spacer.textContent.trim() === "") {
        spacer.remove();
      }
    } else {
      // Fallback: remove just the row containing the user link
      userTr.remove();
    }
  }

  /** Collapse/remove comments by the blocked user on item pages */
  function collapseHNComment(anchorUserLink) {
    // HN comments are in <tr class="athing comtr"> (or similar)
    const comtr = anchorUserLink.closest("tr.athing.comtr, tr.comtr");
    if (!comtr) return;

    // Remove the comment row plus the following "spacer" row if present
    const next = comtr.nextElementSibling;
    comtr.remove();
    if (next && next.tagName === "TR" && next.textContent.trim() === "") {
      next.remove();
    }
  }

  /** Algolia results: remove the result item container */
  function removeAlgoliaResult(anchorUserLink) {
    // Algolia HN search commonly uses .item-title-and-infos or .Story or .Comment containers.
    // We'll just walk up to a reasonable container.
    const container =
      anchorUserLink.closest("li, .item, .Story, .Comment, .SearchResults__item, .search-result, article, .result") ||
      anchorUserLink.parentElement;

    if (container) container.remove();
  }

  function handleUserLink(a) {
    const href = a.getAttribute("href") || "";
    const isBlocked =
      href.includes(`user?id=${BLOCKED_USER}`) || (a.textContent || "").trim() === BLOCKED_USER;

    if (!isBlocked) return;

    const host = location.hostname;

    if (host === "news.ycombinator.com") {
      // Distinguish listing pages vs item pages by presence of "item?id="
      const isItemPage = location.pathname === "/item";
      if (isItemPage) {
        collapseHNComment(a);
        // Also on item page: if OP is blocked, remove the top submission block.
        // We can try removing the whole "athing" story block if the subtext shows blocked user.
        const topStoryTr = document.querySelector("tr.athing");
        if (topStoryTr && containsBlockedUserLink(topStoryTr.nextElementSibling)) {
          topStoryTr.remove();
          const sub = topStoryTr.nextElementSibling;
          if (sub && sub.tagName === "TR") sub.remove();
        }
      } else {
        removeHNStoryFromListing(a);
      }
    } else if (host === "hn.algolia.com") {
      removeAlgoliaResult(a);
    }
  }

  function scanAndRemove(root = document) {
    const links = root.querySelectorAll(`a[href*="user?id=${BLOCKED_USER}"]`);
    for (const a of links) handleUserLink(a);

    // Extra safety: sometimes the link text is present but href format differs.
    // Catch those too.
    const maybeTextLinks = root.querySelectorAll(`a`);
    for (const a of maybeTextLinks) {
      if ((a.textContent || "").trim() === BLOCKED_USER && (a.getAttribute("href") || "").includes("user?id=")) {
        handleUserLink(a);
      }
    }
  }

  // Initial sweep
  scanAndRemove(document);

  // Keep it working with infinite scroll / dynamic loads
  const obs = new MutationObserver((mutations) => {
    for (const m of mutations) {
      for (const node of m.addedNodes) {
        if (node instanceof Element) scanAndRemove(node);
      }
    }
  });

  obs.observe(document.documentElement, { childList: true, subtree: true });
})();
reply
Speaking of obnoxious
reply
Yep. Building a working C compiler that compiles Linux is an impossible task for all but the top 1% of developers. And the ones that could do it have better things to do, plus they’d want a lot more than 20K for the trouble.
reply
You wouldn’t pay a human to write 100k LOC. Or at least you shouldn’t. You’d pay a human to write a working useful compiler that isn’t riddled with copyright issues.

If you didn’t care about copying code, usefulness, or correctness you could probably get a human to whip you up a C compiler for a lot less than $20k.

reply
Are you trolling me? Companies (made of humans) write 100,000 LOC all the time.

And it's really expensive, despite your suspicions.

reply
No, companies don’t pay people to write 100k LOC. They pay people to write useful software.

We figured out that LOC was a useless productivity metric in the 80s.

reply
deleted
reply
Dude.

Microsoft paid my company a lot of money to write code. And in the end you were able to count it, and the LOC is a perfectly fine metric which is still used today to measure complexity of a project.

If you actually work in software you know this.

I have no idea what point you're trying to make - but I've grown very tired of all the trolls attacking me. Good night.

EDIT: OH. You mean that people don't cite LOC in contract deliverables. Yeah, I know. I never said that, and it's irrelevant to my point.

reply