frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Anthropic's open-source framework for AI-powered vulnerability discovery

https://github.com/anthropics/defending-code-reference-harness
97•binyu•1h ago•29 comments

VoidZero Is Joining Cloudflare

https://blog.cloudflare.com/voidzero-joins-cloudflare/
516•coloneltcb•8h ago•236 comments

When AI Builds Itself: Our progress toward recursive self-improvement

https://www.anthropic.com/institute/recursive-self-improvement
172•meetpateltech•5h ago•209 comments

Castor: CERN Advanced STORage Manager

https://castor.web.cern.ch/content/home.html
32•naves•1h ago•6 comments

Show HN: FFmpeg WebCLI – Full FFmpeg in Browser, Offline PWA, No Uploads(WASM)

https://github.com/tejaswigowda/ffmpeg-webCLI
20•tejaswigowda•52m ago•4 comments

Ian's Secure Shoelace Knot

https://www.fieggen.com/shoelace/secureknot.htm
424•mooreds•10h ago•161 comments

Retro-Tech Parenting

https://havenweb.org/2026/05/28/retro-tech.html
192•mawise•5h ago•131 comments

KVarN: Native vLLM backend for KV-cache quantization by Huawei

https://github.com/huawei-csl/KVarN
95•theanonymousone•6h ago•8 comments

JLink JTAG Access on the Pinecil

https://danielmangum.com/posts/jlink-jtag-pinecil/
23•hasheddan•2d ago•0 comments

They’re made out of weights

https://maxleiter.com/blog/weights
1357•MaxLeiter•21h ago•592 comments

Meta's ships facial recognition on smart glasses

https://www.buchodi.com/meta-glasses-facial-recognition/
126•buchodi•1h ago•108 comments

Samurai City

https://worksinprogress.co/issue/samurai-city/
51•zdw•2d ago•4 comments

Making Debian or Fedora persistent live images

https://sigwait.org/~alex/blog/2026/05/28/smdBC8.html
39•henry_flower•3d ago•3 comments

Failing grades soar with AI usage, dwindling math skills in Berkeley CS classes

https://www.dailycal.org/news/campus/academics/failing-grades-soar-as-professors-see-greater-ai-u...
698•littlexsparkee•21h ago•650 comments

Zettascale (YC S24) Is Hiring Founding FPGA Engineers

https://www.ycombinator.com/companies/zettascale/jobs/O9S1vqO-founding-engineer-fpga-rtl-asic-arc...
1•el_al•4h ago

Sum-product, unit distances, and number fields

https://www.erdosproblems.com/forum/thread/blog:6
45•robinhouston•3d ago•5 comments

U.S. Army Corps of Engineers Bay Model

https://en.wikipedia.org/wiki/U.S._Army_Corps_of_Engineers_Bay_Model
195•tosh•2d ago•49 comments

NSA using Anthropic's Mythos for cyber attacks

https://www.ft.com/content/d02d91b3-2636-454e-9442-dc7e69f51815
22•jawiggins•52m ago•0 comments

AI, Ashby Engineering, and the future

https://www.ashbyhq.com/blog/engineering/ai-ashby-engineering-and-the-future
24•fredley•6h ago•14 comments

Gaussian Point Splatting

https://momentsingraphics.de/Siggraph2026.html
166•ibobev•10h ago•61 comments

Show HN: Uruky (EU-based Kagi alternative) now has Image Search and URL Rewrites

https://uruky.com/?il=en
191•BrunoBernardino•12h ago•180 comments

Elixir v1.20: Now a gradually typed language

https://elixir-lang.org/blog/2026/06/03/elixir-v1-20-0-released/
945•cloud8421•1d ago•377 comments

Mornings and nights no longer exist at 47C: A day in the hottest place in India

https://www.bbc.co.uk/news/articles/crmp0krp98ro
35•mellosouls•2d ago•4 comments

3D-printed book turns its own G-code into raised lettering

https://www.designboom.com/design/3d-printed-book-manual-darius-ou-benson-chong/
64•surprisetalk•2d ago•24 comments

Gemma 4 12B: A unified, encoder-free multimodal model

https://blog.google/innovation-and-ai/technology/developers-tools/introducing-gemma-4-12b/
1005•rvz•1d ago•377 comments

Iran Shock Jolts Asia and Europe to Speed Up Energy Transition

https://www.bloomberg.com/graphics/2026-energy-transition-iran-war/
22•toomuchtodo•1h ago•0 comments

Show HN: Cost.dev (YC W21) – making agents cost-aware and cheaper to call

https://cost.dev/
15•akh•9h ago•6 comments

The desperation of NYTimes

https://rozumem.xyz/posts/16
262•rozumem•3h ago•253 comments

Artificial intelligence is not conscious – Ted Chiang

https://www.theatlantic.com/philosophy/2026/06/no-artificial-intelligence-is-not-conscious/687378/
711•lordleft•1d ago•1227 comments

I built a vulnerable app and spent $1,500 seeing if LLMs could hack it

https://kasra.blog/blog/i-spent-1500-seeing-if-llms-could-hack-my-app/
365•jc4p•20h ago•197 comments
Open in hackernews

Detecting if an expression is constant in C

https://nrk.neocities.org/articles/c-constexpr-macro#detecting-if-an-expression-is-constant-in-c
49•signa11•1y ago

Comments

wahern•1y ago
> This works. But both gcc and clang warn about the enum being anonymous... even though that's exactly what I wanted to do. And this cannot be silenced with #pragma since it's a macro, so the warning occurs at the location where the macro is invoked.

You can use _Pragma instead of #pragma. E.g.

  #define C(x) ( \
    _Pragma("clang diagnostic push") \
    _Pragma("clang diagnostic ignored \"-Wvisibility\"") \
    (x) + 0*sizeof(void (*)(enum { tmp = (int)(x) })) \
    _Pragma("clang diagnostic pop") \
  )
EDIT: Alas, GCC is a little pickier about where _Pragma is allowed so you may need to use a statement expression. Also, it seems GCC 14 doesn't have a -W switch that will disable the anonymous enum warning.
pjc50•1y ago
It's remarkable that people will say that doing this kind of thing is better than learning a language which actually lets you enforce this with the type system.

(or even just insist that users use the version of the language which supports "constexpr"!)

oguz-ismail•1y ago
What language is that? Is it available everywhere (everywhere) C is?
mitthrowaway2•1y ago
Indeed, usually if I'm using C these days it's because I only have access to a c compiler for my target platform, or because I'm modifying an existing C codebase.
uecker•1y ago
I do not think anybody said this. The point is that these macros work for early versions of C. If you need to support early versions of C, learning another language is not a solution. If you don't have to, you can use C23's constexpr.
trealira•1y ago
C used to seem like a beautiful and simple language to me, but as I used it and learned more about it, it seemed more complex under the surface, and kind of janky as well. It's just utilitarian.
wat10000•1y ago
Learning such a language doesn’t mean I can use it.
o11c•1y ago
The problem is that no such language exists.

There are many languages that provide one particular feature that C doesn't provide, but they do this at the cost of excluding numerous other features that C widely relies on.

kjs3•1y ago
"I have no idea what problem you're trying to solve, what the constraints are, what the use cases might be, what tools are available on the platform, what the job or regulations require, what the skillsets of the people involved are, what the timeline is...but I'm absolutely, unshakably certain that I have a magic bullet that will make all your problems go away."

FTFY.

sleirsgoevy•1y ago
The Linux kernel has even a way to determine whether the expression is compile-time, WITHOUT aborting compilation in either case.

The trick is this (copied vebratim from Linux):

#define __is_constexpr(x) (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))

Explanation: if x is a constant expression, then multiplying it by zero yields a constant 0, and casting a constant 0 to void* makes a null pointer constant. And the ternary expression, if one of its sides is a null pointer constant, collapses to the type of the other side (thus the type of the returned pointer will be int*, and the sizeof will match). And if x was not constant, then the lefthand side would not be considered a null pointer constant by type inference, the type of the ternary expression will be void*, and the sizeof check will not match.

With a few more clever tricks, it's even possible to implement a compile-time "type ternary expression", like this: TYPE_IF(2 * 2 == 4, int, long). This is left as an exercise for the reader.

amelius•1y ago
This reminds me of the days when Boost was a thing. It was full of tricks like this.
usrnm•1y ago
It still is a thing, though.
cperciva•1y ago
With a few more clever tricks...

I did this with my PARSENUM macro (https://github.com/Tarsnap/libcperciva/blob/master/util/pars...) to parse strings into floating-point, unsigned integer, or signed integer types (and check bounds) using a single interface.

bobbyi•1y ago
I thought this would work:

#define C(x) (sizeof(char[x]), x)

sizeof is a compile-time operation so x need to be known at compile time.

It didn't work as expected. It turns out there is an exception and the standard says that sizeof is actually calculated at runtime specifically for variable length arrays:

> The sizeof operator yields the size (in bytes) of its operand, which may be an expression or the parenthesized name of a type. The size is determined from the type of the operand. The result is an integer. If the type of the operand is a variable length array type, the operand is evaluated; otherwise, the operand is not evaluated and the result is an integer constant.