Readit News logoReadit News
boulevard commented on I Built a One File Edge Probe to Tell Me When Time Is Lying   physical-ai.ghost.io/a-on... · Posted by u/boulevard
gschizas · 4 months ago
A simple (and stupid) /time.aspx in VB.NET, because that's what was easily available:

    <%
    Dim epochMilliseconds As Long = CLng((DateTime.UtcNow - New DateTime(1970, 1, 1)).TotalMilliseconds)
    Response.Write("{ ""epoch_ms"": " & epochMilliseconds & " }")
    %>
(you need to change "/time" to "/time.aspx" for the original HTML page to work)

boulevard · 4 months ago
This is perfect, for completeness, you can extend it with CORS + no-store and ms epoch.
boulevard commented on I Built a One File Edge Probe to Tell Me When Time Is Lying   physical-ai.ghost.io/a-on... · Posted by u/boulevard
withinboredom · 4 months ago
Cross-origin stuff doesn’t always let you get access to those headers and they may not always be there. Some web servers don’t put that there, some do. Some frameworks add them, some don’t.
boulevard · 4 months ago
This is also why I lean on a tiny JSON route with simple CORS. For anyone wiring this up, they can add

Access-Control-Allow-Origin: * (or site origin), and Cache-Control: no-store

Also, watch for mixed content (HTTPS page trying to fetch HTTP gateway), either serve the probe from the gateway or expose /time over HTTPS.

boulevard commented on I Built a One File Edge Probe to Tell Me When Time Is Lying   physical-ai.ghost.io/a-on... · Posted by u/boulevard
withinboredom · 4 months ago
Cross-origin stuff doesn’t always let you get access to those headers and they may not always be there. Some web servers don’t put that there, some do. Some frameworks add them, some don’t.
boulevard · 4 months ago
Yes, many servers don’t expose Date to browsers (Access-Control-Expose-Headers), so you can’t read it cross-origin. Also, CDNs/proxies can cache or rewrite headers, my goal was a boring, local /time on the same gateway the tech is testing. Another thing was that Date is seconds-resolution, I want ms and a stable JSON shape. I have found Cloudflare trace to be handy in past, but it’s not my box, it may rate-limit, and adds an extra network hop. For the core question "Is it me or the edge box" I wanted the box itself to answer.
boulevard commented on I built 10k robots simulation with collision avoidance in WebGPU (HTML)   physical-ai.ghost.io/10-0... · Posted by u/boulevard
boulevard · 4 months ago
I wanted to see how far WebGPU could go without build steps or frameworks. I simulated 10k robots with collision avoidance entirely on the GPU via HTML hitting ~120 FPS on an M1 Mac.
boulevard commented on I Built a One File Edge Probe to Tell Me When Time Is Lying   physical-ai.ghost.io/a-on... · Posted by u/boulevard
boulevard · 4 months ago
Note: This is a sanity probe, not a time discipline tool. rtt/2 and browser timers can be noisy, so treat green/red as a hint, not truth, especially on congested factory networks.
boulevard commented on Why don't you use dependent types?   lawrencecpaulson.github.i... · Posted by u/baruchel
boulevard · 4 months ago
The real skill is knowing when not to make something dependent otherwise you just slow yourself down.
boulevard commented on Is Your Bluetooth Chip Leaking Secrets via RF Signals?   semanticscholar.org/paper... · Posted by u/transpute
sitzkrieg · 4 months ago
people are finally aware everything leaks, it's just a matter of how closely you look
boulevard · 4 months ago
Everything leaks if you stare at it long enough

u/boulevard

KarmaCake day66August 10, 2013View Original