frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ggml v1.0.0

https://github.com/ggml-org/ggml/releases/tag/v1.0.0
203•cobychapple•5h ago•32 comments

Nvidia allegedly engineered scarcity by funding AI startups to buy its GPUs

https://www.techpowerup.com/354814/nvidia-allegedly-engineered-scarcity-by-funding-ai-startups-to...
423•speckx•5h ago•225 comments

The Invention of Islamic Invention

https://www.cremieux.xyz/p/the-invention-of-islamic-invention
10•curtisblaine•15m ago•0 comments

Terminal borders that don't cost a cell

https://www.joshka.net/cell-borders/
210•vinhnx•8h ago•87 comments

FAA issues national ground stop – lifted 4.5 hours later

https://www.nbcnews.com/news/us-news/faa-orders-nationwide-ground-stop-departing-flights-reasons-...
1505•zulln•10h ago•1151 comments

Unsloth Qwen3.8-27B Quantizations – Dynamic v3.1 Update

https://unsloth.ai/docs/models/qwen3.8
108•Retro_Dev•7h ago•20 comments

What happened to 3Com?

https://dfarq.homeip.net/what-happened-to-3com/
123•gvieri•8h ago•63 comments

Show HN: Live map of U.S. flights during tonight's FAA nationwide ground stop

https://grounds.top/
128•gvsi•8h ago•16 comments

Live airband on all frequencies from KORS. Victoria, CA also ground stopped

https://orcasairband.com/
255•mmaunder•9h ago•60 comments

Found: A protein that drives ageing without unleashing inflammation

https://www.nature.com/articles/d41586-026-03638-3
179•gumby•12h ago•27 comments

FM-1 Workbench

https://open.m-vave.com/fm1-workbench
227•simonebrunozzi•12h ago•154 comments

Jonathan Blow – If AI solved coding, why is my software still the same? [video]

https://www.youtube.com/watch?v=IRK8h67ol7Q
259•helloplanets•16h ago•266 comments

After 600 experiments, here's what I discovered about JEPA world models

https://haddyalchaer.com/jepa
248•halcdev•13h ago•41 comments

Monkey Island: all 13 versions side by side

https://monkeyisland.pages.dev/
15•maximilianburke•3h ago•2 comments

How Not to Build a Music Player

https://alichraghi.github.io/blog/how-not-to-build-a-music-player/
84•vinhnx•8h ago•36 comments

Extending LLDB to Debug Applications That Span CPUs and GPUs

https://engineering.fb.com/2026/11/09/developer-tools/extending-lldb-to-debug-applications-that-s...
4•JDevlieghere•3d ago•0 comments

Elephants found to be increasingly isolated leading to fractured social networks

https://today.ucsd.edu/story/elephants-found-to-be-increasingly-isolated-leading-to-fractured-soc...
121•gmays•5h ago•21 comments

Perplexity Decider v1.3: Training, eval, and use cases

https://www.perplexity.ai/hub/blog/perplexity-decider
122•gmays•12h ago•21 comments

Show HN: Isometric SF – A pixel-art map of the SF Bay Area

https://isometricsf.com/
200•juscha1•13h ago•69 comments

Amtrak booking system experiencing major issues amid nationwide FAA ground stop

https://www.fox5dc.com/news/amtrak-outage-ticket-booking-faa-ground-stop-november-13-2026
163•snow_mac•7h ago•50 comments

Live-migration support in FreeBSD and bhyve coming

https://gyptazy.com/blog/freebsd-bhyve-live-migration-support-rfc/
95•JohnDohnBohn•11h ago•23 comments

A technical vision for the Haskell ecosystem

https://discourse.haskell.org/t/a-technical-vision-for-the-haskell-ecosystem/15078
199•cosmic_quanta•17h ago•107 comments

Minnesota guitarist's "palmfrets" invention strikes a new chord

https://www.echopress.com/business/minnesota-guitarists-invention-strikes-a-new-chord
163•bookofjoe•16h ago•94 comments

Reverse engineering my Coway air purifier to ditch the cloud

https://scottjg.com/posts/2026-11-11-reverse-engineering-my-coway-air-purifier-to-ditch-the-cloud/
736•scottjg•1d ago•211 comments

Philip Roth and David Remnick getting personal (2001)

https://salmagundi.skidmore.edu/articles/2001-philip-roth-david-remnick
14•Caiero•7h ago•0 comments

Security Agencies Worldwide Found to Use Ad-Based Surveillance System

https://citizenlab.ca/security-agencies-worldwide-found-to-use-ad-based-surveillance-system/
74•billybuckwheat•5h ago•5 comments

Autonomous (YC F25) is hiring MTS to build AI agents that manage your wealth

https://atg.science/careers
1•dkobran•10h ago

The Other Nefertiti (2015)

https://alloversky.com/puzzlepieces/the-other-nefertiti
11•dmbche•2d ago•1 comments

Ctrl+C, Ctrl+v, Ctrl+cve: Bypassing Android's Clipboard Read Security Measures

https://toninoble.com/post/ctrlc-ctrlv-ctrlcve
81•dethmasque•13h ago•38 comments

Cabo Pulmo, John Steinbeck, and the village that wouldn't give up

https://blue-continuum.com/the-village-that-gave-back-its-sea
5•dnetesn•1d ago•1 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.