<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nihar Ranjan Das on Medium]]></title>
        <description><![CDATA[Stories by Nihar Ranjan Das on Medium]]></description>
        <link>https://medium.com/@nihardaily?source=rss-63d2c30fb31d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*n3-tJlVKTXvj8O82qyMDsQ.png</url>
            <title>Stories by Nihar Ranjan Das on Medium</title>
            <link>https://medium.com/@nihardaily?source=rss-63d2c30fb31d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 09:39:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nihardaily/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI coding tools hid 15 GB on my Mac. I wrote a CLI to find it.]]></title>
            <link>https://medium.com/@nihardaily/ai-coding-tools-hid-15-gb-on-my-mac-i-wrote-a-cli-to-find-it-bdb4c1e48958?source=rss-63d2c30fb31d------2</link>
            <guid isPermaLink="false">https://medium.com/p/bdb4c1e48958</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Nihar Ranjan Das]]></dc:creator>
            <pubDate>Wed, 28 Oct 2026 07:48:23 GMT</pubDate>
            <atom:updated>2026-10-28T07:52:37.937Z</atom:updated>
            <content:encoded><![CDATA[<p>I noticed that my MacBook was running low on disk space (97% full, ~6GB free) and that my memory pressure was also at a high amount. But I hadn’t really installed any large programs. This was due to the huge amount of caches, session logs and daemons left by AI code tools!</p><p>I developed a free and open source CLI (MIT) called [unclog](<a href="https://github.com/NiharRan/unclog">https://github.com/NiharRan/unclog</a>). It displays what Claude Code, Cursor, VS Code, Windsurf, Ollama, LM Studio, Hugging Face, Docker, MCP servers and your package managers have used. Then it will allow you to clean up whatever you want.</p><p>On my machine:</p><p>15.1 GB of reclaimable files:</p><ul><li>pnpm: 7.78 GiB (safe)</li><li>Claude Code: 2.14 GiB (review)</li><li>npm: 1.66 GiB (safe)</li><li>Go build cache: 1.39 GiB (safe)</li><li>Windsurf: 1.13 GiB (safe)</li><li>VS Code: 0.94 GiB (safe)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v9p6lFZHW_-02zK_lWkcvQ.gif" /></figure><p>When running in dry mode I saw I could delete 12.6 GB from the Trash.<br>Installation:</p><pre>brew install - cask NiharRan/tap/unclog || scoop install unclog<br>unclog scan<br>unclog clean - dry-run<br>unclog clean</pre><p>Note: The clean command will put the files into the OS Trash. You have to use — permanent to permanently delete.</p><p>Orphaned Processes</p><p>A lot of processes like MCP servers, language servers and dev servers can remain after you’ve closed a program. These then take up RAM.</p><pre>unclog ps<br>unclog kill - orphans - dry-run<br>unclog kill - orphans</pre><p>The kill command will first send a SIGTERM. It will not touch any processes not owned by you.</p><p>Why I trust it:</p><ul><li>Only files from detectors can be deleted, no random paths can be entered.</li><li>Strict deny-list containing: Home root, Documents, Desktop, Downloads, .git, .env, SSH/GPG keys and browser profiles.</li><li>Symlinks are resolved. Any files not in the expected root will be denied.</li><li>No config files or auth files are touched.</li><li>Every action is logged into ~/.config/unclog/history.log.</li><li>No network calls or Telemetry!</li></ul><p>Only regenerable caches are automatically selected. Session logs are highlighted as review. Downloaded models are highlighted as careful.</p><p>Full Tutorial</p><p>Flags, risk levels, unclog doctor, config and FAQ can be seen here: [AI coding tools hid 15 GB on my Mac. unclog found it](<a href="https://www.nihardaily.com/posts/ai-coding-tools-hid-15-gb-on-my-mac-unclog-found-it">https://www.nihardaily.com/posts/ai-coding-tools-hid-15-gb-on-my-mac-unclog-found-it</a>).</p><p>You can view the code and issues here: <a href="https://github.com/NiharRan/unclog">https://github.com/NiharRan/unclog</a>. A star helps others find it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bdb4c1e48958" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Five ways a Claude connector fails before anyone uses it]]></title>
            <link>https://medium.com/@nihardaily/five-ways-a-claude-connector-fails-before-anyone-uses-it-1114376cac7e?source=rss-63d2c30fb31d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1114376cac7e</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Nihar Ranjan Das]]></dc:creator>
            <pubDate>Sat, 22 Aug 2026 18:49:24 GMT</pubDate>
            <atom:updated>2026-09-01T17:03:51.564Z</atom:updated>
            <content:encoded><![CDATA[<p>DNS, OAuth registration, directory review, context cost, and whether to ship a UI at all.</p><p>A Model Context Protocol server is easy to write and surprisingly hard to ship. The code is usually fine. What breaks is everything around it: how Anthropic’s infrastructure resolves your hostname, how Claude obtains an OAuth client ID, how the directory reviewer reads your tool descriptions, how much of the user’s context window you spend before they type anything, and whether your tool should be drawing an interface in the first place.</p><p>I spent the past week writing up each of those failure modes in detail. This is the short version — the map, not the territory.</p><p><strong>1. Claude cannot reach a server that you can reach</strong></p><p>The most disorienting bug in the whole stack is the one where your server is demonstrably up. `curl` works. MCP Inspector connects. Claude returns <em>*Couldn’t reach the MCP server*</em> and your access log stays empty, because the request never left Anthropic’s infrastructure.</p><p>Three of the four documented causes are invisible from your own laptop:</p><p>- Claude resolves your hostname before it sends any HTTP request, and drops the connection if <strong>**any**</strong> returned address is not globally routable. Split-horizon DNS, dynamic DNS pointed at a home line behind carrier NAT, and internal corporate names all fail this way while looking healthy from your desk.</p><p>- Connectors are IPv4-only. A hostname with an AAAA record and no A record is unreachable — which is easy to hit in 2026, when several hosting stacks hand out IPv6 by default and sell IPv4 as an extra.</p><p>- A redirect to a different host strips the `Authorization` header on the way, per RFC 9110 §15.4. The redirect target answers 401 and Claude reports an auth failure. This is the reason a connector can work in Claude Code and fail on claude.ai.</p><p>The diagnostic that matters is `dig` run from a network that is not yours. I wrote the full teardown, including the checks for each cause, in <a href="https://www.nihardaily.com/posts/claude-cannot-reach-your-mcp-server-but-curl-can">Claude cannot reach your MCP server, but curl can</a>.</p><p><strong>2. The OAuth error names the wrong fix</strong></p><p><em>&gt; Incompatible auth server: does not support dynamic client registration</em></p><p>Almost every guide answers this by telling you to add a `registration_endpoint`. Anthropic’s own docs now push the other way. Dynamic Client Registration mints a fresh OAuth client on every new connection — a database row per connection, not per customer — so a popular connector fills your identity provider with junk clients.</p><p>There are three ways Claude can get a client identity: DCR, a Client ID Metadata Document, or credentials Anthropic holds for you. CIMD is the one built for public connectors, and it has a trap: Claude selects it only when your metadata advertises `client_id_metadata_document_supported: true` <em>*and*</em> lists `”none”` in `token_endpoint_auth_methods_supported`. Miss the second and Claude silently falls back to registration, then fails.</p><p>One more sharp edge worth knowing before you debug for an hour: setting `registration_endpoint` to `null` fails schema validation rather than being ignored. Drop the field instead. The comparison of all three methods is in <a href="https://www.nihardaily.com/posts/claude-cannot-register-with-your-oauth-server-now-what">Claude cannot register with your OAuth server. Now what?</a></p><p><strong>3. The directory rejects a design most servers ship on day one</strong></p><p>If your server exposes a single `api_request` tool with a `method` parameter, the Claude Connectors Directory will reject it. A tool that accepts GET, HEAD and OPTIONS alongside POST, PUT, PATCH or DELETE is an automatic fail, and no amount of description text saves it. Read and write must be separate tools.</p><p>The other mechanical triggers are equally checkable before a reviewer sees them: freeform query tools must name or link the target API in their description, every tool needs a title plus `readOnlyHint` or `destructiveHint`, and tool names cap at 64 characters. Those hints are not paperwork — they drive auto-permissions, so skipping them makes your connector both non-compliant and slower to use.</p><p>Before any of that: submission happens in Claude.ai org settings, which means you need a Team or Enterprise plan to submit at all. Individual plans have no portal. Desktop extensions go through a separate form. The rest of the rejection triggers, including the prompt-injection language rules and the privacy-policy requirement, are in <a href="https://www.nihardaily.com/posts/what-gets-a-claude-connector-rejected-from-the-directory">What gets a Claude connector rejected from the directory</a>.</p><p><strong>4. The context-cost advice you have read is out of date</strong></p><p>The old rule was that every connected tool gets injected up front, so a big connector spends a chunk of the window before you type a word. That produced a whole workaround culture: split a server into three domain servers, disconnect what you are not using today.</p><p>Tool search now ships on by default in Claude Code. Only tool names and server instructions load at session start; full schemas arrive on demand. Anthropic’s reference is blunt about the effect — adding more servers has minimal impact on the context window, and there is no fixed per-server tool cap.</p><p>The costs that remain are smaller and easier to get wrong. Claude Code truncates each tool description and each server instructions block at 2KB. MCP tool output warns above 10,000 tokens and is capped at 25,000 by default, raised with `MAX_MCP_OUTPUT_TOKENS`. And several conditions turn deferral off entirely, including a non-first-party `ANTHROPIC_BASE_URL` — so if your team runs Claude through a gateway, check that before you debug a context problem with a config cause. The full table of conditions is in <a href="https://www.nihardaily.com/posts/your-mcp-connector-spends-context-before-you-type">Your MCP connector spends context before you type</a>.</p><p><strong>5. Should your connector draw its own UI?</strong></p><p>MCP Apps became the first official MCP extension: a server returns interactive HTML, the client renders it in a sandboxed iframe, and the page talks back over JSON-RPC carried on `postMessage`. It works in Claude, ChatGPT, VS Code and Goose, which makes it a portable investment rather than a single-vendor bet.</p><p>The question is not whether it works. It is whether the extra build and review cost pay off for what your tool returns. A scatter chart you can brush, a globe, a compiled shader — those justify a UI. A tool that returns three fields does not. Directory submission for an MCP App also wants 3 to 5 PNG screenshots at 1000px or wider, and any link destination you have not declared in allowed link URIs makes the user confirm every single click.</p><p>Prototype before you commit a sprint: an example server runs locally in about five minutes. The trade-off, and the setup, are in <a href="https://www.nihardaily.com/posts/should-your-claude-connector-draw-its-own-ui">Should your Claude connector draw its own UI?</a>.</p><p><strong>— -</strong></p><p><strong>The pattern</strong></p><p>Four of these five failures have nothing to do with your server’s logic. They are environment, identity, review criteria, and client-side budget. That is what makes them expensive: the code is right, so you look in the wrong place. Check DNS from outside your network, pick CIMD over DCR if you expect volume, split read from write before you submit, and stop optimizing a context cost the client already handles.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1114376cac7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EU AI Act August 2026: What Changed and What Businesses Must Do]]></title>
            <link>https://medium.com/@nihardaily/eu-ai-act-august-2026-what-changed-and-what-businesses-must-do-8619def46415?source=rss-63d2c30fb31d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8619def46415</guid>
            <category><![CDATA[ai-compliance]]></category>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[ai-regulation]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[eu-ai-act]]></category>
            <dc:creator><![CDATA[Nihar Ranjan Das]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 07:56:59 GMT</pubDate>
            <atom:updated>2026-08-17T07:56:59.362Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3UJoHlqTYLxW4n-BJrmwLA.png" /></figure><p>The EU AI Act reached a key deadline in August 2026. But the story is less simple than many headlines suggest.</p><p>Some rules are now live. Others may shift under proposed amendments. That has left many teams with the same question: <strong>what applies now, and what can wait?</strong></p><p>Here is the practical answer. <strong>The transparency rules are in effect in August 2026.</strong> The bigger compliance duties for many <strong>high-risk AI systems</strong> were originally set for August 2026, but proposed 2026 changes would push parts of that timeline back, with standalone Annex III systems moving to <strong>2 December 2027</strong> and some product safety cases moving to <strong>2 August 2028</strong>. The catch is that these later dates come from reported amendments and legal commentary, while the European Commission’s public AI Act timeline still clearly states that transparency rules apply in August 2026. <a href="https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai">European Commission</a> <a href="https://www.stibbe.com/publications-and-insights/ai-act-reloaded-what-the-latest-ai-act-changes-mean-in-practice">Stibbe</a> <a href="https://www.activemind.legal/guides/changes-ai-act/">activeMind.legal</a></p><p>That gap between the official baseline and the reform discussion is why so many companies are confused.</p><h3>What the August 2026 deadline actually means</h3><p>The cleanest way to read the moment is this:</p><ul><li><strong>Article 50 transparency duties are now the urgent issue</strong> for many teams that use generative AI in customer-facing or content workflows. <a href="https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai">European Commission</a> <a href="https://datamatters.sidley.com/2026/06/24/eu-ai-act-transparency-obligations-preparing-for-compliance-by-2-august-2026/">Sidley</a></li><li><strong>High-risk AI compliance is still the bigger long-term burden</strong>, especially for hiring, credit, law enforcement, and other Annex III use cases. <a href="https://artificialintelligenceact.eu/">artificialintelligenceact.eu</a></li><li><strong>The timeline for some high-risk obligations appears to have been deferred in 2026 reform efforts</strong>, but businesses should be careful about relying on summaries alone until the legal position is fully settled across guidance and implementation. <a href="https://www.stibbe.com/publications-and-insights/ai-act-reloaded-what-the-latest-ai-act-changes-mean-in-practice">Stibbe</a> <a href="https://www.activemind.legal/guides/changes-ai-act/">activeMind.legal</a></li></ul><p>In plain English: <strong>do not treat August 2026 as a non-event</strong>. Even if parts of the high-risk schedule moved, transparency compliance still matters now.</p><h3>The part many AI teams miss: transparency is not a side issue</h3><p>A lot of companies hear “AI Act” and jump straight to the hardest cases: hiring systems, risk scoring, biometrics, or safety components.</p><p>That misses the near-term pressure point.</p><p>If you publish AI-generated text, images, audio, or video in the EU, or use AI systems that interact with people, <strong>transparency can become a live compliance task now</strong>. The practical guidance around Article 50 focuses on disclosure, labeling, and clear responsibility for who handles compliance when third-party tools are involved. <a href="https://datamatters.sidley.com/2026/06/24/eu-ai-act-transparency-obligations-preparing-for-compliance-by-2-august-2026/">Sidley</a> <a href="https://artificialintelligenceact.eu/transparency-rules-article-50">artificialintelligenceact.eu</a></p><p>This matters for marketing teams, publishers, product teams, support teams, and startups that ship AI features fast and sort governance later.</p><p>That is why the August deadline matters even to firms that are nowhere near the strictest high-risk category.</p><h3>Why AI agents make this harder</h3><p>The AI Act gets more complex when you move from a simple chatbot to an <strong>AI agent</strong>.</p><p>An AI agent can plan across steps, connect to tools, retain context, and take actions with limited human input. In business settings, that may include gathering data, analyzing results, drafting recommendations, or updating systems after approval. <a href="https://www.bcg.com/capabilities/artificial-intelligence/ai-agents">BCG</a></p><p>That shift matters because the same base model can look low-risk in one setting and much higher risk in another.</p><p>A generic assistant that drafts internal notes is one thing. An agent that screens job applicants, helps decide credit outcomes, or acts inside a regulated workflow is another. The risk often comes less from the model name and more from <strong>the use case, the data, the autonomy, and the impact on people</strong>.</p><p>That point also lines up with how businesses should think about deployment. The hard question is not “Are AI agents legal in Europe?” The hard question is <strong>what exactly does this agent do, who does it affect, and who stays accountable when it acts?</strong></p><p>For a deeper look at that broader business question, read <a href="https://www.nihardaily.com/posts/can-ai-agents-run-a-business-it-lost-447">Can AI agents run a business? It lost</a>.</p><h3>What changed in 2026</h3><p>The 2026 reform discussion did not scrap the AI Act. It aimed to make it easier to apply.</p><p>The reported changes focus on a few points:</p><ul><li><strong>Later deadlines</strong> for some high-risk systems, especially standalone Annex III systems and certain AI systems tied to product safety law. <a href="https://www.stibbe.com/publications-and-insights/ai-act-reloaded-what-the-latest-ai-act-changes-mean-in-practice">Stibbe</a> <a href="https://www.activemind.legal/guides/changes-ai-act/">activeMind.legal</a></li><li><strong>More support for SMEs and small mid-caps</strong>, including lighter documentation in some cases and more careful treatment on penalties. <a href="https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai">European Commission</a> <a href="https://www.stibbe.com/publications-and-insights/ai-act-reloaded-what-the-latest-ai-act-changes-mean-in-practice">Stibbe</a></li><li><strong>More emphasis on sandboxes and operational guidance</strong>, which suggests regulators know many firms need help turning broad rules into real workflows. <a href="https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai">European Commission</a> <a href="https://artificialintelligenceact.eu/">artificialintelligenceact.eu</a></li></ul><p>This is best read as a sign of <strong>implementation realism</strong>, not retreat. Europe still wants AI rules with teeth. It also knows that a rulebook with no working path to compliance helps no one.</p><h3>What did not change</h3><p>A few core points remain stable.</p><h3>1. The Act still reaches companies outside the EU</h3><p>If your AI system is used in the EU or affects EU users, the Act can still apply even if your company is based elsewhere. <a href="https://stackcyber.com/posts/ai-eu-act">STACK Cybersecurity</a></p><p>That matters for U.S. startups, global SaaS firms, and API companies that assume EU law stops at the border.</p><h3>2. Most AI is not high-risk</h3><p>The European Commission still says most AI systems fall into the <strong>minimal or no-risk</strong> bucket, with examples like spam filters or AI-enabled games. <a href="https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai">European Commission</a></p><p>This is important because a lot of public debate treats all AI as if it sits under one harsh compliance regime. It does not.</p><h3>3. High-risk use cases still matter a lot</h3><p>Recruitment, candidate ranking, credit decisions, and similar systems remain central examples of high-risk AI. <a href="https://artificialintelligenceact.eu/">artificialintelligenceact.eu</a> Even if deadlines move, the compliance burden for these uses is still real.</p><p>That means firms should not confuse <strong>delay</strong> with <strong>disappearance</strong>.</p><h3>The practical mistake companies make</h3><p>The most common mistake is to think in terms of tools instead of <strong>use cases</strong>.</p><p>“Is ChatGPT covered?” is often the wrong first question.</p><p>A better question is: <strong>what task does this system perform in our business, what data does it use, does it shape decisions about people, and how much freedom does it have to act?</strong></p><p>That frame also helps with adjacent debates that muddy the issue:</p><ul><li>No, AI models do not work like drugs that need broad pre-approval from governments before release in every case. But some systems face specific regulatory duties depending on risk and use. This is worth reading alongside <a href="https://www.nihardaily.com/posts/does-the-government-have-to-approve-ai-models-no">Does the government have to approve AI models? No</a>.</li><li>Cheap or free AI access is not the same as low compliance cost. Vendor terms, logging, human review, and process controls may cost more than the model call itself. Related reading: <a href="https://www.nihardaily.com/posts/does-the-free-ai-api-tier-train-on-your-data">Does the free AI API tier train on your data?</a> and <a href="https://www.nihardaily.com/posts/the-cheapest-ai-api-is-not-the-cheapest-to-run">The cheapest AI API is not the cheapest to run</a>.</li><li>Security still matters as much as policy. If an AI tool sits inside a weak software stack, compliance on paper will not save you from real risk. See <a href="https://www.nihardaily.com/posts/chrome-security-update-ai-1072-bugs-then-1442">Chrome security update: AI, 1072 bugs, then 1442</a>.</li></ul><h3>A simple compliance checklist for August 2026</h3><p>If you use AI in products, operations, or content, start here:</p><ol><li><strong>Map your AI use cases.</strong><br>List every place AI shows up in your product, support flow, hiring, marketing, analytics, security, and internal operations.</li><li><strong>Classify by use, not vendor.</strong><br>The same model can support a low-risk writing helper or a high-risk decision system.</li><li><strong>Check transparency triggers first.</strong><br>If users see AI-generated or AI-mediated content, review disclosure and labeling duties now. <a href="https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai">European Commission</a> <a href="https://datamatters.sidley.com/2026/06/24/eu-ai-act-transparency-obligations-preparing-for-compliance-by-2-august-2026/">Sidley</a></li><li><strong>Review human oversight.</strong><br>If AI influences decisions about people, document where a human reviews, approves, or can override the outcome.</li><li><strong>Review vendor contracts.</strong><br>If you rely on third-party models or tools, make sure compliance duties are allocated clearly. <a href="https://datamatters.sidley.com/2026/06/24/eu-ai-act-transparency-obligations-preparing-for-compliance-by-2-august-2026/">Sidley</a></li><li><strong>Track timeline changes with care.</strong><br>Use the current Commission baseline, but monitor confirmed legal updates on any deadline shifts. <a href="https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai">European Commission</a> <a href="https://www.stibbe.com/publications-and-insights/ai-act-reloaded-what-the-latest-ai-act-changes-mean-in-practice">Stibbe</a></li><li><strong>Do not ignore post-market duties.</strong><br>For high-risk systems, compliance is not a one-time filing. It includes monitoring and incident handling over time. <a href="https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai">European Commission</a> <a href="https://www.stibbe.com/publications-and-insights/ai-act-reloaded-what-the-latest-ai-act-changes-mean-in-practice">Stibbe</a></li></ol><h3>What this means for founders, product teams, and operators</h3><p>For most teams, the EU AI Act is not a reason to stop building. It is a reason to <strong>document what you are building, narrow risky use cases, and add oversight before scale makes change harder</strong>.</p><p>That is even more true for agents. An AI agent that reads, decides, and acts across systems can create value fast. It can also create a clean chain of accountability problems if no one defines its limits.</p><p>At the same time, not every AI story is about regulation. Some are about platform control, product strategy, or hardware battles. That broader context matters too, especially as AI products move from software into devices. One example is <a href="https://www.nihardaily.com/posts/apple-wants-a-judge-to-halt-openai-hardware-plans">Apple wants a judge to halt OpenAI hardware plans</a>.</p><h3>Final take</h3><p>The biggest misunderstanding about the EU AI Act in August 2026 is the idea that the deadline either fully hit or fully slipped.</p><p>Reality sits in the middle.</p><p><strong>Transparency rules matter now.</strong><br><strong>High-risk compliance still matters deeply.</strong><br><strong>Some timelines may be moving, but the direction of regulation is not.</strong></p><p>If you run AI systems in or into Europe, the smart move is not to wait for perfect clarity. It is to get clear on your own use cases first.</p><p>For readers who want the short version of the deadline story, this is the companion piece: <a href="https://www.nihardaily.com/posts/the-eu-ai-acts-august-deadline-what-actually-changed">The EU AI Act’s August deadline: what actually changed</a>.</p><h3><strong>#EU_AI_Act #AI_regulation #AI_compliance #AI_agents #Generative_AI</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8619def46415" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PHP Object Manipulation with Magic Methods]]></title>
            <link>https://medium.com/@nihardaily/php-object-manipulation-with-magic-methods-6883292ac17f?source=rss-63d2c30fb31d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6883292ac17f</guid>
            <category><![CDATA[magic-method]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Nihar Ranjan Das]]></dc:creator>
            <pubDate>Sun, 14 May 2023 23:53:20 GMT</pubDate>
            <atom:updated>2026-08-17T08:00:36.147Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sM5Z0mSJNBy8bFyf.jpg" /></figure><p>By <a href="https://nihardaily.com/php-object-manipulation-with-magic-methods">Admin</a>, Published on May 14th, 2023 | 10 mins, 924 words</p><p>In PHP, magic methods are special methods that allow you to define how an object behaves in certain situations. These methods are automatically called by PHP under specific circumstances, such as when you access undefined or inaccessible properties, call undefined methods, or perform certain operations on objects. Magic methods are identified by their reserved method names, prefixed with double underscores.</p><h3>Some special instructions for magic methods:</h3><ol><li>All methods names starting with __ are reserved by PHP</li><li>All magic methods except <a href="https://www.php.net/manual/en/language.oop5.decon.php#object.construct">__construct()</a>, <a href="https://www.php.net/manual/en/language.oop5.decon.php#object.destruct">__destruct()</a>, and <a href="https://www.php.net/manual/en/language.oop5.cloning.php#object.clone">__clone()</a>, need to be declared as public, otherwise, an <strong>E_WARNING</strong> will be thrown. Before to PHP 8.0.0, no diagnostic was emitted for the magic methods <a href="https://www.php.net/manual/en/language.oop5.magic.php#object.sleep">__sleep()</a>, <a href="https://www.php.net/manual/en/language.oop5.magic.php#object.wakeup">__wakeup()</a>, <a href="https://www.php.net/manual/en/language.oop5.magic.php#object.serialize">__serialize()</a>, <a href="https://www.php.net/manual/en/language.oop5.magic.php#object.unserialize">__unserialize()</a>, and <a href="https://www.php.net/manual/en/language.oop5.magic.php#object.set-state">__set_state()</a>.</li><li><a href="https://www.php.net/manual/en/language.oop5.decon.php#object.construct">__construct()</a> and <a href="https://www.php.net/manual/en/language.oop5.decon.php#object.destruct">__destruct()</a> should not have a return type; otherwise a fatal error will be thrown.</li></ol><h3>Here are some commonly used magic methods in PHP:</h3><ol><li><strong>__construct()</strong>: This magic method is called automatically when an object is created from a class. It is used to initialize object properties and perform setup operations.</li><li><strong>__destruct()</strong>: It is called automatically when an object is no longer referenced or explicitly destroyed. It can be used to perform cleanup operations or release resources.</li><li><strong>__get($name)</strong>: This method is called when you attempt to access a non-existent or inaccessible property of an object. It receives the name of the property being accessed as a parameter and allows you to define custom logic to handle such access.</li><li><strong>__set($name, $value)</strong>: It is called when you attempt to assign a value to a non-existent or inaccessible property of an object. It receives the name of the property being set and the value being assigned as parameters, allowing you to define custom logic for handling such assignments.</li><li><strong>__isset($name)</strong>: This method is called when you use the `isset()` or `empty()` functions on an object property. It receives the name of the property as a parameter and allows you to define custom logic to determine if the property is set.</li><li><strong>__unset($name)</strong>: It is called when you use the unset() function on an object property. It receives the name of the property as a parameter and allows you to define custom logic to unset or remove the property.</li><li><strong>__call($name, $arguments)</strong>: This method is called when you try to call a non-existent or inaccessible method of an object. It receives the name of the method being called and an array of arguments passed to the method. It allows you to define custom logic to handle such method calls.</li><li><strong>__callStatic($name, $arguments)</strong>: This method is called when you try to call a non-existent or inaccessible static method of an object. This is the only difference between __callStatic() and __call().</li><li><strong>__toString()</strong>: It is called when you try to treat an object as a string, such as when using `echo` or `print` on an object. It allows you to define custom logic to convert the object to a string representation.</li></ol><p>These are the most important magic methods in PHP. Magic methods provide a way to dynamically handle certain operations and can be useful for implementing behaviors like method overloading, property access control, and object serialization.</p><h3>Here’s an example that utilizes several magic methods in PHP:</h3><pre>class Book { <br>  private string $title; <br>  private string $author; <br>  private array $pages = []; <br>  public static int $age = 15; <br><br>  public function __construct(string $title, string $author) <br>  { <br>    $this-&gt;title = $title; $this-&gt;author = $author; <br>  } <br>  public function __get(string $name): string|array|null <br>  { <br>    if (isset($this-&gt;{$name})) { <br>        return $this-&gt;{$name}; <br>    } <br>    return null; <br>   } <br><br>  public function __set(string $name, string|array $value): void <br>  { <br>    if (isset($this-&gt;{$name})) { <br>        if (is_array($value)) { <br>          $this-&gt;pages = $value; <br>        } else { <br>          $this-&gt;{$name} = $value; <br>        } <br>     } <br>    } <br><br>  public function __isset(string $name): bool <br>  { <br>    return isset($this-&gt;{$name}); <br>  } <br><br>  public function __unset(string $name): void <br>  { <br>    if (isset($this-&gt;{$name})) { <br>      if (is_array($this-&gt;{$name})) { <br>        $this-&gt;pages = []; <br>      } <br>      else { <br>        $this-&gt;{$name} = &#39;&#39;; <br>      } <br>    } <br>  } <br><br>  public function __call(string $name, array $arguments): void <br>  { <br>    if ($name === &#39;addPage&#39;) { <br>      if (isset($arguments[0])) { <br>        $this-&gt;pages[] = $arguments[0]; <br>      } <br>    } <br>  } <br><br>  public static function __callStatic(string $name, array $arguments): void <br>   { <br>      if ($name === &#39;setAge&#39;) {<br>        if (isset($arguments[0])) {<br>           self::$age = $arguments[0]; <br>         } <br>     } <br>   } <br><br>  public function __toString(): string <br>  { <br>    return &quot;Book: {$this-&gt;title} by {$this-&gt;author}&quot;; <br>  } <br>} <br><br>// Usage: <br>$book = new Book(&#39;The Great Gatsby&#39;, &#39;F. Scott Fitzgerald&#39;); <br>echo $book; // Output: Book: The Great Gatsby by F. Scott Fitzgerald <br><br>$book-&gt;addPage(&#39;Chapter 1&#39;); <br>$book-&gt;addPage(&#39;Chapter 2&#39;); <br>echo $book-&gt;pageCount; // Output: 2 <br><br>$book-&gt;pages = [&#39;Introduction&#39;, &#39;Chapter 1&#39;, &#39;Chapter 2&#39;]; <br>echo $book-&gt;pageCount; // Output: 3 <br><br>if (isset($book-&gt;author)) { <br>  echo &quot;Author is set.&quot;; <br>}<br> <br>unset($book-&gt;pages); <br>echo $book-&gt;pageCount; // Output: 0 <br><br>Book::setAge(32); <br>echo Book::$age; // Output: 32</pre><p>In this example, the <strong>Book</strong> class represents a book with properties like title, author, age, and pages. The magic methods are used as follows:</p><ul><li><strong>__construct()</strong>: Initializes the <strong>Book</strong> object with a title and an author.</li><li><strong>__get($name)</strong>: Handles access to the <strong>pageCount</strong> property, returning the number of pages.</li><li><strong>__set($name, $value)</strong>: Handles assignment to the <strong>pages</strong> property, allowing only an array of pages to be assigned.</li><li><strong>__isset($name)</strong>: Handles the check for the existence of the <strong>author</strong> property.</li><li><strong>__unset($name)</strong>: Handles the removal of all pages when the <strong>pages</strong> property is unset.</li><li><strong>__call($name, $arguments)</strong>: Handles the dynamic addition of pages using the <strong>addPage()</strong> method.</li><li><strong>__callStatic($name, $arguments)</strong>: Handles the dynamic age setting using the <strong>setAge()</strong> method.</li><li><strong>__toString()</strong>: Converts the <strong>Book</strong> object into a string representation.</li></ul><p>The usage section demonstrates how to create a <strong>Book</strong> object, add pages, access the page count, check for the existence of the author property, remove pages, and convert the object to a string.</p><p><em>Originally published at </em><a href="https://nihardaily.com/"><em>nihardaily.com</em></a><em> on May 14, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6883292ac17f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Array Methods for Beginners]]></title>
            <link>https://medium.com/@nihardaily/javascript-array-methods-for-beginners-cddf29c9b95b?source=rss-63d2c30fb31d------2</link>
            <guid isPermaLink="false">https://medium.com/p/cddf29c9b95b</guid>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[array-manipulation]]></category>
            <category><![CDATA[frontend-development]]></category>
            <dc:creator><![CDATA[Nihar Ranjan Das]]></dc:creator>
            <pubDate>Sat, 13 May 2023 11:46:00 GMT</pubDate>
            <atom:updated>2026-08-22T05:21:24.454Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qh4ht7B_XAD38fB1.jpg" /></figure><p>By <a href="https://nihardaily.com/javascript-array-methods-for-beginners">Admin</a>, Published on May 13th, 2023 | 18 mins, 1775 words</p><p>In JavaScript, arrays are one of the most powerful and versatile features of the language. They can be used to store a variety of data types, including strings, numbers, objects, and even other arrays. Arrays also have a wide range of methods that can be used to manipulate their contents.</p><p>In this article, we will discuss the most important JavaScript array methods. We will cover how to use each method, as well as provide some examples of how they can be used in real-world applications.</p><p><strong>Here are some of the most important JavaScript array methods:</strong> <strong>These methods can be used to perform a variety of tasks, such as:</strong></p><ul><li>Iterating over the elements of an array</li><li>Creating a new array with the results of a function applied to each element of the original array</li><li>Selecting elements from an array that meet certain criteria</li><li>Combining the elements of an array into a single value</li><li>Reversing the order of the elements in an array</li><li>Sorting the elements in an array</li><li>And much more!</li></ul><p>By learning how to use JavaScript array methods, you can greatly improve your ability to write efficient and effective JavaScript code.</p><p>Let’s dive into and learn</p><h3>forEach</h3><p>The forEach method is used to execute a callback function for each element in the array. The callback function takes the current element as its only argument.</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>fruits.forEach(function(fruit) { <br>  console.log(fruit); <br>});</pre><p>This code will print the following to the console:</p><pre>apple banana orange</pre><h3>map</h3><p>The map method is used to create a new array with the results of calling a callback function for each element in the original array. The callback function takes the current element as its only argument and returns the new value for that element.</p><pre>const numbers = [1, 2, 3, 4, 5]; <br>const squares = numbers.map(function(number) { <br>  return number * number; <br>});</pre><p>This code will create a new array called squares with the following elements:</p><p>This code will print the following to the console:</p><pre>1 4 9 16 25</pre><h3>filter</h3><p>The filter method is used to create a new array with the elements of the original array that pass a certain test. The test is a callback function that takes the current element as its only argument and returns a Boolean value.</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;, &#39;grape&#39;, &#39;cherry&#39;]; <br>const citrusFruits = fruits.filter(function(fruit) { <br>  return fruit.startsWith(&#39;c&#39;); <br>});</pre><p>This code will create a new array called citrusFruits with the following elements:</p><p>This code will print the following to the console:</p><pre>&#39;apple&#39; &#39;orange&#39;</pre><h3>reduce</h3><p>The reduce method is used to reduce the array to a single value by combining the elements using a callback function. The callback function takes two arguments: the current accumulator value and the current element. The accumulator value is initialized to the value of the first element in the array.</p><pre>const prices = [10, 20, 30, 40, 50]; <br>const totalPrice = prices.reduce(function(accumulator, price) { <br>  return accumulator + price; <br>}); <br><br>console.log(totalPrice);</pre><p>This code will calculate the total price of all the items in the prices array. The total price will be stored in the variable totalPrice.</p><p>This code will print the following to the console:</p><pre>150</pre><h3>reduceRight</h3><p>The reduceRight method is similar to the reduce method, but it starts combining the elements from the end of the array.</p><pre>const words = [&#39;This&#39;, &#39;is&#39;, &#39;a&#39;, &#39;sentence&#39;]; <br>const reversedSentence = words.reduceRight(function(accumulator, word) { <br>  return accumulator + word; <br>}); <br><br>console.log(reversedSentence);</pre><p>This code will reverse the order of the words in the words array and store the result in the variable reversedSentence.</p><p>This code will print the following to the console:</p><pre>sentenceaisThis</pre><h3>every</h3><p>Every method is used to test if all of the elements in the array pass a certain test. The test is a callback function that takes the current element as its only argument and returns a Boolean value.</p><pre>const isEven = function(number) { <br>  return number % 2 === 0; <br>}; <br><br>const allEven = [2, 4, 6, 8].every(isEven);</pre><p>This code will check if all of the elements in the allEven array are even. The code will return true because all of the elements in the array are even.</p><p>This code will print the following to the console:</p><pre>true</pre><h3>some</h3><p>The some method is used to test if any of the elements in the array pass a certain test. The test is a callback function that takes the current element as its only argument and returns a Boolean value.</p><pre>const isGreaterThanTen = function(number) { <br>  return number &gt; 10; <br>}; <br>const anyGreaterThanTen = [1, 2, 3, 11, 15, 9].some(isGreaterThanTen); <br><br>console.log(anyGreaterThanTen);</pre><p>This code will print the following to the console:</p><pre>11 15</pre><h3>indexOf</h3><p>The indexOf() method is a JavaScript method that is used to find the index of a specified value in an array. The indexOf() method takes two arguments: the value to search for and the start index. The start index is optional and defaults to 0.</p><p>If the value is found in the array, the indexOf() method returns the index of the value. If the value is not found in the array, the indexOf() method returns -1.</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>const index = fruits.indexOf(&#39;apple&#39;); <br><br>console.log(index);</pre><p>Will output the following:</p><pre>0</pre><h3>lastIndexOf</h3><p>The lastIndexOf() method is a JavaScript method that is used to find the index of the last occurrence of a specified value in an array. The lastIndexOf() method takes two arguments: the value to search for and the start index. The start index is optional and defaults to the length of the array minus 1.</p><p>If the value is found in the array, the lastIndexOf() method returns the index of the value. If the value is not found in the array, the lastIndexOf() method returns -1.</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>const index = fruits.lastIndexOf(&#39;kiwi&#39;); <br><br>console.log(index);</pre><p>Will output the following:</p><pre>-1</pre><h3>join</h3><p>The join() method returns a string that is the result of joining all of the elements of the array, separated by the specified separator. The separator can be a string, a number, or an object. If no separator is specified, the elements of the array will be joined by a comma.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>const joinedFruits = fruits.join(&#39;, &#39;); <br><br>console.log(joinedFruits);</pre><p>Will output the following:</p><pre>apple, banana, orange</pre><h3>slice</h3><p>The slice() method returns a new array that contains a portion of the original array. The slice() method takes three arguments: the start index, the end index, and the optional step value. The start index is the index of the first element to be included in the new array. The end index is the index of the last element to be included in the new array. The step value is the number of elements to skip between each element in the new array.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;, &#39;grape&#39;, &#39;cherry&#39;]; <br>const newFruits = fruits.slice(1, 3); <br><br>console.log(newFruits);</pre><p>Will output the following:</p><pre>banana, orange]</pre><h3>splice</h3><p>The splice() method changes the contents of an array by removing and/or adding elements. The splice() method takes three or four arguments: the start index, the number of elements to remove, and the optional elements to add. The start index is the index of the first element to be removed. The number of elements to remove is the number of elements to be removed from the array. The optional elements to add are the elements to be added to the array.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;, &#39;grape&#39;, &#39;cherry&#39;]; <br>fruits.splice(1, 2, &#39;mango&#39;); <br><br>console.log(fruits);</pre><p>Will output the following:</p><pre>[apple, mango, orange, grape, cherry]</pre><h3>reverse</h3><p>The reverse() method reverses the order of the elements in an array.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>fruits.reverse(); <br><br>console.log(fruits);</pre><p>Will output the following:</p><pre>[orange, banana, apple]</pre><h3>sort</h3><p>The sort() method sorts the elements of an array in place. The default sort order is ascending, but you can specify a different sort order by passing a function as the first argument to the sort() method. The function must take two arguments and return a negative number, zero, or a positive number, depending on whether the first argument is less than, equal to, or greater than the second argument.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>fruits.sort(); <br><br>console.log(fruits);</pre><p>Will output the following:</p><pre>[&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]</pre><h3>copyWithin</h3><p>The copyWithin() method copies a portion of an array to a different location in the array. The copyWithin() method takes four arguments: the start index, the end index, the source index, and the optional target index. The start index is the index of the first element to be copied. The end index is the index of the last element to be copied. The source index is the index of the element in the source array that will be copied to the destination array. The target index is the index of the element in the destination array that will be overwritten by the copied element.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>fruits.copyWithin(1, 2, 0); <br><br>console.log(fruits);</pre><p>Will output the following:</p><pre>[&#39;banana&#39;, &#39;apple&#39;, &#39;orange&#39;]</pre><h3>fill</h3><p>The fill() method fills an array with a specified value. The fill() method takes two arguments: the value to fill the array with, and the optional start index. The start index is the index of the first element to be filled. If no start index is specified, the fill operation will start at the beginning of the array.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>fruits.fill(&#39;*&#39;); <br><br>console.log(fruits);</pre><p>Will output the following:</p><pre>[&#39;*&#39;, &#39;*&#39;, &#39;*&#39;]</pre><h3>entries</h3><p>The entries() method returns an array of arrays, where each inner array contains the key and value of each element in the original array.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>const entries = fruits.entries(); <br><br>console.log(entries);</pre><p>Will output the following:</p><pre>[ [0, &#39;apple&#39;], [1, &#39;banana&#39;], [2, &#39;orange&#39;] ]</pre><h3>keys</h3><p>The keys() method returns an array of the keys of the original array.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>const keys = fruits.keys(); <br><br>console.log(keys);</pre><p>Will output the following:</p><pre>[0, 1, 2]</pre><h3>values</h3><p>The values() method returns an array of the values of the original array.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>const values = fruits.values(); <br><br>console.log(values);</pre><p>Will output the following:</p><pre>[&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]</pre><h3>from</h3><p>The from() method creates a new array from an iterable object. The from() method takes one argument: the iterable object. The iterable object can be an array, an object, a string, or a generator function.</p><p>For example, the following code:</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]; <br>const newFruits = Array.from(fruits); <br><br><br>console.log(newFruits);</pre><p>Will output the following:</p><pre>[&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]</pre><h3>of</h3><p>The of() method creates a new array with the specified elements. The of() method takes one or more arguments, each of which is the element to be added to the array.</p><p>For example, the following code:</p><pre>const fruits = Array.of(&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;); <br><br>console.log(fruits);</pre><p>Will output the following:</p><pre>[&#39;apple&#39;, &#39;banana&#39;, &#39;orange&#39;]</pre><p><em>Originally published at </em><a href="https://nihardaily.com/"><em>https://nihardaily.com</em></a><em> on May 13, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cddf29c9b95b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>