frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Adafruit: Arduino’s Rules Are ‘Incompatible With Open Source’

https://thenewstack.io/adafruit-arduinos-rules-are-incompatible-with-open-source/
147•MilnerRoute•14h ago•63 comments

Why proteins fold and how GPUs help us fold

https://aval.bearblog.dev/nvidiaproteins/
60•diginova•2h ago•11 comments

Arborium: Tree-sitter code highlighting with Native and WASM targets

https://arborium.bearcove.eu/
71•zdw•4h ago•11 comments

The Whole App is a Blob

https://drobinin.com/posts/the-whole-app-is-a-blob/
62•valzevul•4h ago•13 comments

Ask HN: What Are You Working On? (December 2025)

247•david927•15h ago•798 comments

Running on Empty: Copper

https://thehonestsorcerer.substack.com/p/running-on-empty-copper
55•the-needful•6d ago•42 comments

How well do you know C++ auto type deduction?

https://www.volatileint.dev/posts/auto-type-deduction-gauntlet/
43•volatileint•5d ago•24 comments

Unscii

http://viznut.fi/unscii/
46•Levitating•4h ago•2 comments

John Varley has died

http://floggingbabel.blogspot.com/2025/12/john-varley-1947-2025.html
54•decimalenough•5h ago•14 comments

The Problem of Teaching Physics in Latin America (1963)

https://calteches.library.caltech.edu/46/2/LatinAmerica.htm
33•rramadass•11h ago•12 comments

$5 whale listening hydrophone making workshop

https://exclav.es/2025/08/03/dinacon-2025-passive-acoustic-listening/
5•gsf_emergency_6•3d ago•2 comments

CapROS: Capability-Based Reliable Operating System

https://www.capros.org/
75•gjvc•7h ago•29 comments

Read Something Wonderful

https://readsomethingwonderful.com/
91•snorbleck•4h ago•14 comments

If AI replaces workers, should it also pay taxes?

https://english.elpais.com/technology/2025-11-30/if-ai-replaces-workers-should-it-also-pay-taxes....
60•PaulHoule•8h ago•100 comments

The History of Xerox

https://www.abortretry.fail/p/the-history-of-xerox
12•rbanffy•3d ago•0 comments

Roomba maker goes bankrupt, Chinese owner emerges

https://news.bloomberglaw.com/bankruptcy-law/robot-vacuum-roomba-maker-files-for-bankruptcy-after...
91•nreece•7h ago•90 comments

Rio de Janeiro's talipot palm trees bloom for the first and only time

https://apnews.com/article/brazil-rio-talipot-palm-flamengo-park-dcfb1ce237af7a10ab72205fc9bbdc02
140•1659447091•1w ago•36 comments

Common Rust Lifetime Misconceptions

https://github.com/pretzelhammer/rust-blog/blob/master/posts/common-rust-lifetime-misconceptions.md
10•CafeRacer•2h ago•0 comments

AI agents are starting to eat SaaS

https://martinalderson.com/posts/ai-agents-are-starting-to-eat-saas/
105•jnord•8h ago•127 comments

Hashcards: A plain-text spaced repetition system

https://borretti.me/article/hashcards-plain-text-spaced-repetition
309•thomascountz•15h ago•145 comments

JSDoc is TypeScript

https://culi.bearblog.dev/jsdoc-is-typescript/
159•culi•12h ago•188 comments

Elevated errors across many models

https://status.claude.com/incidents/9g6qpr72ttbr
295•pablo24602•10h ago•141 comments

An attempt to articulate Forth's practical strengths and eternal usefulness

https://im-just-lee.ing/forth-why-cb234c03.txt
57•todsacerdoti•1w ago•25 comments

In the Beginning was the Command Line (1999)

https://web.stanford.edu/class/cs81n/command.txt
144•wseqyrku•6d ago•65 comments

History of Declarative Programming (2021)

https://shenlanguage.org/TBoS/tbos_15.html
53•measurablefunc•9h ago•15 comments

Microsoft Copilot AI Comes to LG TVs, and Can't Be Deleted

https://www.techpowerup.com/344075/microsoft-copilot-ai-comes-to-lg-tvs-and-cant-be-deleted
156•akyuu•7h ago•124 comments

SoundCloud just banned VPN access

https://old.reddit.com/r/SoundCloudMusic/comments/1pltd19/soundcloud_just_banned_vpn_access/
94•empressplay•5h ago•53 comments

Price of a bot army revealed across online platforms

https://www.cam.ac.uk/stories/price-bot-army-global-index
132•teleforce•16h ago•57 comments

Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

https://trigger.dev/blog/shai-hulud-postmortem
222•nkko•22h ago•136 comments

Rob Reiner has died

https://www.hollywoodreporter.com/movies/movie-news/rob-reiner-dead-harry-met-sally-princess-brid...
40•RickJWagner•4h ago•20 comments
Open in hackernews

How well do you know C++ auto type deduction?

https://www.volatileint.dev/posts/auto-type-deduction-gauntlet/
43•volatileint•5d ago

Comments

CalChris•3h ago
Apparently the C++ standard calls this type deduction. But I've always called it type inference.
plq•2h ago
Type inference is when you try to infer a type from its usage. ``auto`` does no such thing, it just copies a known type from source to target. Target has no influence over source's type.

https://news.ycombinator.com/item?id=11604474

Maxatar•2h ago
Type deduction is a form of type inference, a very restricted/crude form of type inference that only considers the type of the immediate expression. The term is used in C++ because it predates the use of auto and was the term used to determine how to implicitly instantiate templates. auto uses exactly the same rules (with 1 single exception) as template type deduction, so the name was kept for familiarity. If instead of initializing a variable, you went through the examples on this website and passed the expression into a template function, the type would be deduced in exactly the same way with the exception of initializer lists.

Type inference is usually reserved for more general algorithms that can inspect not only how a variable is initialized, but how the variable used, such as what functions it's passed into, etc...

zarzavat•1h ago
> Type inference is usually reserved for more general algorithms that can inspect not only how a variable is initialized, but how the variable used, such as what functions it's passed into, etc...

In a modern context, both would be called "type inference" because unidirectional type inference is quite a bit more common now than the bidirectional kind, given that many major languages adopted it.

If you want to specify constraint-based type inference then you can say global HM (e.g. Haskell), local HM (e.g. Rust), or just bidirectional type inference.

jb1991•25m ago
The same general concepts often have different terminology between different languages. For example, which is better, a parent class or a super class? Or a method function or a member function? Initializer or constructor? Long list of these synonyms.
112233•2h ago
Saving this to use as an argument when C++ comes up in a discussion. This toxic swamp cannot be fixed and anyone chosing to jump into it needs a warning.
OneDeuxTriSeiGo•2h ago
Most of the relevance of this is limited to C++ library authors doing metaprogramming.

Most of the "ugly" of these examples only really matters for library authors and even then most of the time you'd be hard pressed to put yourself in these situations. Otherwise it "just works".

Basically any adherence to a modicum of best practices avoids the bulk of the warts that come with type deduction or at worst reduces them to a compile error.

112233•1h ago
I see this argument often. It is valid right until you get first multipage error message from a code that uses stl (which is all c++ code, because it is impossible to use c++ without standard library).
flakes•2h ago
Auto has really made c++ unapproachable to me. It's hard enough to reason about anything templated, and now I frequently see code where every method returns auto. How is any one supposed to do a code review without loading the patch into their IDE?
themafia•2h ago
The pain of lisp without any of the joy.
OneDeuxTriSeiGo•2h ago
I'd suppose this really depends on how you are developing your codebase but most code should probably be using a trailing return type or using an auto (or template) return type with a concept/requires constraint on the return type.

For any seriously templated or metaprogrammed code nowadays a concept/requires is going to make it a lot more obvious what your code is actually doing and give you actually useful errors in the event someone is misusing your code.

jjmarr•2h ago
I don't understand why anyone would use auto and a trailing return type for their functions. The syntax is annoying and breaks too much precedent.
dataflow•1h ago
Generally, you don't. I'm not sure why the parent suggested you should normally do this. However, there are occasional specific situations in which it's helpful, and that's when you use it.
rovingeye•1h ago
Consistency (lambdas, etc.)
Rucadi•16m ago
it makes function declarations/instantiations much more grep-able.
dataflow•1h ago
This makes things seem more complicated than they already are, I feel?

There's nothing special about auto here. It deduces the same type as a template parameter, with the same collapsing rules.

decltype(auto) is a different beast and it's much more confusing. It means, more or less, "preserve the type of the expression, unless given a simple identifier, in which case use the type of the identifier."

jandrewrogers•1h ago
I knew the answer to most of these intuitively but the story isn’t great. Regardless of the programming language, I’ve always been an “auto” minimalist. There are relatively few contexts where relying on inference is justified by the expedience. Ignoring the issues raises by the article, explicitness simplifies things and reduces bugs.

That said, there are some contexts in which “auto” definitely improves the situation.

jb1991•27m ago
You will typically find bugs go up when you do not use auto in most average C++ code bases because, as noted by another comment, a lot of C++ developers have the bad habit of writing uninitialized variables, which auto prevents.
antonvs•1h ago
“How well do you know Latin grammar rules?”
Surac•1h ago
I always try to avoid auto in c++ or var in C#. On the paper it is a nice was to save you from typing out the type but this is only true if you have tool support and can use your mouse to obtain the type. In printouts or even in a text snippet I’m am lost. I think auto inC++ was the try to shorten some overburden type constructs and make it a little more friendly to use heavy templating. Please forgive my bad English. I’m no native speaker
majoe•1h ago
I came to like auto over the years, although I also use it sparingly. Sometimes the concrete types only add visual noise and not much helpful information, e.g. iterators:

auto it = some_container.begin();

Not even once have I wished to know the actual type of the iterator.

samdoesnothing•56m ago
Odd, it's not a problem in dynamically typed languages or languages like Kotlin, Swift, etc. I think it's more just what you're used to.
Rucadi•41m ago
auto has a good perk, it prevents uninitialized values (Which is a source of bugs).

For example:

auto a;

will always fail to compile not matter what flags.

int a;

is valid.

Also it prevents implicit type conversions, what you get as type on auto is the type you put at the right.

That's good.

jb1991•29m ago
This is indeed exactly correct. Probably on its own this is the most important reason for most people to use it, as I think most of the millions of C++ developers in the world (and yes there are apparently millions) are not messing with compiler flags to get the checks that probably should be there by default anyway. The keyword auto gives you that.