frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Monzo wrongly denied refunds to fraud and scam victims

https://www.theguardian.com/money/2026/feb/07/monzo-natwest-hsbc-refunds-fraud-scam-fos-ombudsman
1•tablets•2m ago•0 comments

They were drawn to Korea with dreams of K-pop stardom – but then let down

https://www.bbc.com/news/articles/cvgnq9rwyqno
1•breve•4m ago•0 comments

Show HN: AI-Powered Merchant Intelligence

https://nodee.co
1•jjkirsch•6m ago•0 comments

Bash parallel tasks and error handling

https://github.com/themattrix/bash-concurrent
1•pastage•6m ago•0 comments

Let's compile Quake like it's 1997

https://fabiensanglard.net/compile_like_1997/index.html
1•billiob•7m ago•0 comments

Reverse Engineering Medium.com's Editor: How Copy, Paste, and Images Work

https://app.writtte.com/read/gP0H6W5
1•birdculture•13m ago•0 comments

Go 1.22, SQLite, and Next.js: The "Boring" Back End

https://mohammedeabdelaziz.github.io/articles/go-next-pt-2
1•mohammede•18m ago•0 comments

Laibach the Whistleblowers [video]

https://www.youtube.com/watch?v=c6Mx2mxpaCY
1•KnuthIsGod•20m ago•1 comments

Slop News - HN front page right now hallucinated as 100% AI SLOP

https://slop-news.pages.dev/slop-news
1•keepamovin•24m ago•1 comments

Economists vs. Technologists on AI

https://ideasindevelopment.substack.com/p/economists-vs-technologists-on-ai
1•econlmics•26m ago•0 comments

Life at the Edge

https://asadk.com/p/edge
2•tosh•32m ago•0 comments

RISC-V Vector Primer

https://github.com/simplex-micro/riscv-vector-primer/blob/main/index.md
3•oxxoxoxooo•36m ago•1 comments

Show HN: Invoxo – Invoicing with automatic EU VAT for cross-border services

2•InvoxoEU•36m ago•0 comments

A Tale of Two Standards, POSIX and Win32 (2005)

https://www.samba.org/samba/news/articles/low_point/tale_two_stds_os2.html
2•goranmoomin•40m ago•0 comments

Ask HN: Is the Downfall of SaaS Started?

3•throwaw12•41m ago•0 comments

Flirt: The Native Backend

https://blog.buenzli.dev/flirt-native-backend/
2•senekor•43m ago•0 comments

OpenAI's Latest Platform Targets Enterprise Customers

https://aibusiness.com/agentic-ai/openai-s-latest-platform-targets-enterprise-customers
1•myk-e•45m ago•0 comments

Goldman Sachs taps Anthropic's Claude to automate accounting, compliance roles

https://www.cnbc.com/2026/02/06/anthropic-goldman-sachs-ai-model-accounting.html
3•myk-e•48m ago•5 comments

Ai.com bought by Crypto.com founder for $70M in biggest-ever website name deal

https://www.ft.com/content/83488628-8dfd-4060-a7b0-71b1bb012785
1•1vuio0pswjnm7•49m ago•1 comments

Big Tech's AI Push Is Costing More Than the Moon Landing

https://www.wsj.com/tech/ai/ai-spending-tech-companies-compared-02b90046
4•1vuio0pswjnm7•51m ago•0 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
2•1vuio0pswjnm7•53m ago•0 comments

Suno, AI Music, and the Bad Future [video]

https://www.youtube.com/watch?v=U8dcFhF0Dlk
1•askl•55m ago•2 comments

Ask HN: How are researchers using AlphaFold in 2026?

1•jocho12•57m ago•0 comments

Running the "Reflections on Trusting Trust" Compiler

https://spawn-queue.acm.org/doi/10.1145/3786614
1•devooops•1h ago•0 comments

Watermark API – $0.01/image, 10x cheaper than Cloudinary

https://api-production-caa8.up.railway.app/docs
1•lembergs•1h ago•1 comments

Now send your marketing campaigns directly from ChatGPT

https://www.mail-o-mail.com/
1•avallark•1h ago•1 comments

Queueing Theory v2: DORA metrics, queue-of-queues, chi-alpha-beta-sigma notation

https://github.com/joelparkerhenderson/queueing-theory
1•jph•1h ago•0 comments

Show HN: Hibana – choreography-first protocol safety for Rust

https://hibanaworks.dev/
5•o8vm•1h ago•1 comments

Haniri: A live autonomous world where AI agents survive or collapse

https://www.haniri.com
1•donangrey•1h ago•1 comments

GPT-5.3-Codex System Card [pdf]

https://cdn.openai.com/pdf/23eca107-a9b1-4d2c-b156-7deb4fbc697c/GPT-5-3-Codex-System-Card-02.pdf
1•tosh•1h ago•0 comments
Open in hackernews

Time in C++: Inter-Clock Conversions, Epochs, and Durations

https://www.sandordargo.com/blog/2025/12/24/clocks-part-5-conversions
39•ibobev•1mo ago

Comments

barishnamazov•1mo ago
I built a local competitive programming judge a while back where I fell into the exact trap of manually correlating steady_clock and system_clock.

I was timestamping everything using steady_clock to strictly enforce the time limits, and then just applied a calculated offset to convert that to wall time for the "Submission Date" display. It worked in testing, but during a long stress-test session, my laptop did an NTP sync. The logs then showed submissions appearing to happen before the source code file was last modified, which confused the caching logic. I was essentially betting that system_clock was stable relative to steady_clock over the process lifetime.

I eventually refactored to exactly what the article suggests: use steady_clock strictly for the runtime enforcement (is duration < 2.0s?), but capture system_clock::now() explicitly at the submission boundary for the logs, rather than trying to do math on the steady timestamp.

Also, +1 for std::chrono::round in C++20. I’ve seen code where duration_cast was used to "round" execution times to milliseconds for display, but it was silently flooring them. In a competitive programming context, reporting 1000ms when the actual time was 1000.9ms is a misleading difference because the latter gets Time Limit Exceeded error. Explicit rounding makes the intent much clearer.

loeg•1mo ago
The thing I ran into most recently is that std::chrono (weirdly?) only supports clocks with compile-time fixed fractional conversion to reference time (~seconds). E.g., you can't implement a std::chrono clock where the count() unit is the native CPU's cycle counter, which will have some runtime-determined conversion to seconds. The types make it impossible.
mpyne•1mo ago
std::chrono counts the number of ticks of a given periodicity. The periodicity does have to be a known compile-time ratio expressible as a fraction of seconds, but you can use a floating-type type to count the number of ticks.

std::chrono is meant to take advantage of information about periodicity at compile time, but if you want to count in terms of a dynamic periodicity not known until runtime, you can still do things. E.g. use time_t and some wrapper functions, or just pick one (or several) std::chrono base durations such as standardizing on nanoseconds, and then just count floating-point ticks.

loeg•1mo ago
> The periodicity does have to be a known compile-time ratio expressible as a fraction of seconds

Right, that's the problem I'm describing.

> or just pick one (or several) std::chrono base durations such as standardizing on nanoseconds, and then just count floating-point ticks.

None of this really fits well -- the idea is to count in integer ticks (invariant cycles), without doing expensive division or floating point math. It's like steady clock, but in ticks instead of nanos.

maxnoe•1mo ago
But on any modern CPU, clock speed won't be constant. It's not compile time constant, nor a runtime constant. Its variable over time. You'd have to record the clock speed over time and the ticks, so why not just record actual time?
loeg•1mo ago
You missed this key part of my earlier comment:

> (invariant cycles)

All major CPUs have had invariant cycle counters for decades at this point. It is a runtime constant.

adrian_b•1mo ago
The CPU clock varies, but all modern CPUs have some counter that is incremented at a constant frequency, like the Time Stamp Counter (TSC) on Intel/AMD CPUs.

When discussing hardware clock ticks used for time measurement, the ticks from TSC or similar counters are meant and not ticks from some counter that counts cycles of the CPU clock, like provided by the performance counters.

The variable CPU clock frequency can be measured by computing the ratio between the ticks accumulated by the corresponding performance counter and the ticks accumulated by the TSC (or similar counter), for which the clock frequency is constant and known.

cyberax•1mo ago
C++ chrono is weird. It's both over-abstracted and yet has some thoughtless features that just negate this over-abstraction.

I remember not being able to represent the time in fractional units, like tertias (1/60-th of a second) but that was mostly an academic problem. More importantly, it was not possible to express duration as a compound object. I wanted to be able to represent the dates with nanosecond precision, but with more than 250 years of range. I think it is still not possible?

mpyne•1mo ago
Fractional time shouldn't be an issue as long as the ratio is a rational number. It's how durations are already handled behind the scenes.

Likewise it's annoying to cook up your own type, but as long as you can come up with 'number of ticks' type that acts like an arithmetic type then it should work with std::chrono. E.g. if I just Boost's Multiprecision library as a quick example:

    #include <chrono>
    #include <iostream>
    #include <boost/multiprecision/cpp_int.hpp>

    using namespace std::chrono_literals;

    int main()
    {
        using BigInt = boost::multiprecision::uint128_t;
        using BigNanos = std::chrono::duration<BigInt, std::nano>;

        std::cout << "Count for 1s: " << BigNanos(1s).count() << "\n";
        std::cout << "Count for 300 years: " << BigNanos(std::chrono::years(300)).count() << "\n";
    }
Then that code (when compiled with -std=c++20 or better) should output:

Count for 10s: 1000000000 Count for 300 years: 9467085600000000000

If you're willing to use gcc/clang builtins for 128-bit types you won't even need Boost or your own custom type to do basic arithmetic (but serializing the result may be difficult, not sure how gcc/clang handle that for custom 128-bit types).

cyberax•1mo ago
Yes, that was my problem. I could use the emulated uint128_t, but not a seconds+nano seconds pair. I need to re-check why...