ActivityPub Viewer

A small tool to view real-world ActivityPub objects as JSON! Enter a URL or username from Mastodon or a similar service below, and we'll send a request with the right Accept header to the server to view the underlying object.

Open in browser →
{ "@context": [ "https://www.w3.org/ns/activitystreams", "https://clubcyberia.co/schemas/litepub-0.1.jsonld", { "@language": "und" } ], "actor": "https://clubcyberia.co/users/Inginsub", "attachment": [ { "mediaType": "image/png", "name": "", "type": "Document", "url": "https://s3.clubcyberia.co/pleroma/1d68d9c5032443e217a924f9d5c307fdd0b9344333390c823383fd28387fde21.png" } ], "attributedTo": "https://clubcyberia.co/users/Inginsub", "cc": [ "https://clubcyberia.co/users/Inginsub/followers" ], "content": "<pre><code>&gt; typeof NaN\n&lt; &quot;number&quot;\n</code></pre><p>no shit?</p><pre><code>&gt; 9999999999999999\n&lt; 10000000000000000\n</code></pre><p>integers bigger than 9007199254740992 can’t be represented exactly</p><pre><code>&gt; <a href=\"http://0.5+0.1==0.6\" rel=\"ugc\">0.5+0.1==0.6</a>\n&lt; true\n&gt; <a href=\"http://0.1+0.2==0.3\" rel=\"ugc\">0.1+0.2==0.3</a>\n&lt; false\n</code></pre><p>Not a JS problem, floating point comparison is wonky as fuck. As a general rule, you shouldn’t assume that two non-integers will be equal. </p><pre><code>&gt; <a href=\"http://Math.max()\" rel=\"ugc\">Math.max()</a>\n&lt; -Infinity\n&gt; <a href=\"http://Math.min()\" rel=\"ugc\">Math.min()</a>\n&lt; Infinity\n</code></pre><p>so?</p><pre><code>&gt; []+[]\n&lt; &quot;&quot;\n&gt; []+{}\n&lt; &quot;[object Object]&quot;\n</code></pre><p>binary + can’t use number conversion here</p><pre><code>&gt; {}+[]\n&lt; 0\n</code></pre><p>{} is a block declaration, not an object; + is unary here, it always converts its operand to a number </p><pre><code>&gt; true+true+true==3\n&lt; true\n</code></pre><p><code class=\"inline\">(number)true+(number)true+(number)true==3</code>, <code class=\"inline\">true</code> has a value 1</p><pre><code>&gt; true-true\n&lt; 0\n</code></pre><p>same</p><pre><code>&gt; true==1\n&lt; true\n&gt; true===1\n&lt; false\n</code></pre><p>THIS IS LITERALLY THE POINT</p><pre><code>&gt; (!+[]+[]+![]).length\n&lt; 9\n</code></pre><p>this one is intentionally confusing, ! converts its operand to a boolean, any value except 0 is converted to true: <code class=\"inline\">!0+[]+![] -&gt; !false+[]+!true</code>, binary + then converts it to a string “truefalse”</p><pre><code>&gt; 9+&quot;1&quot;\n&lt; &quot;91&quot;\n</code></pre><p>binary + with a string always uses conversion to string</p><pre><code>&gt; 91-&quot;1&quot;\n&lt; 90\n</code></pre><p>binary - always tries number conversion first</p><pre><code>&gt; []==0\n&lt; true\n</code></pre><p>[] is coerced to a number</p>", "context": "https://clubcyberia.co/contexts/306dc5c1-0bd3-4043-89ed-75509d86faaf", "conversation": "https://clubcyberia.co/contexts/306dc5c1-0bd3-4043-89ed-75509d86faaf", "id": "https://clubcyberia.co/objects/e3dfd162-1a18-478f-a8b1-8e5b089470e1", "published": "2023-08-03T18:57:30.727497Z", "replies": { "items": [ "https://clubcyberia.co/objects/dcd5df37-8852-4b18-a60a-ce3d295f0524" ], "type": "Collection" }, "repliesCount": 6, "sensitive": null, "source": { "content": "```\r\n> typeof NaN\r\n< \"number\"\r\n```\r\nno shit?\r\n```\r\n> 9999999999999999\r\n< 10000000000000000\r\n```\r\nintegers bigger than 9007199254740992 can't be represented exactly\r\n```\r\n> 0.5+0.1==0.6\r\n< true\r\n> 0.1+0.2==0.3\r\n< false\r\n```\r\nNot a JS problem, floating point comparison is wonky as fuck. As a general rule, you shouldn't assume that two non-integers will be equal. \r\n```\r\n> Math.max()\r\n< -Infinity\r\n> Math.min()\r\n< Infinity\r\n```\r\nso?\r\n```\r\n> []+[]\r\n< \"\"\r\n> []+{}\r\n< \"[object Object]\"\r\n```\r\nbinary + can't use number conversion here\r\n```\r\n> {}+[]\r\n< 0\r\n```\r\n{} is a block declaration, not an object; + is unary here, it always converts its operand to a number \r\n```\r\n> true+true+true==3\r\n< true\r\n```\r\n`(number)true+(number)true+(number)true==3`, `true` has a value 1\r\n```\r\n> true-true\r\n< 0\r\n```\r\nsame\r\n```\r\n> true==1\r\n< true\r\n> true===1\r\n< false\r\n```\r\nTHIS IS LITERALLY THE POINT\r\n```\r\n> (!+[]+[]+![]).length\r\n< 9\r\n```\r\nthis one is intentionally confusing, ! converts its operand to a boolean, any value except 0 is converted to true:\r\n`!0+[]+![] -> !false+[]+!true`, binary + then converts it to a string \"truefalse\"\r\n```\r\n> 9+\"1\"\r\n< \"91\"\r\n```\r\nbinary + with a string always uses conversion to string\r\n```\r\n> 91-\"1\"\r\n< 90\r\n```\r\nbinary - always tries number conversion first\r\n```\r\n> []==0\r\n< true\r\n```\r\n[] is coerced to a number", "mediaType": "text/markdown" }, "summary": "", "tag": [], "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "type": "Note" }