frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Dropbox Paper mobile App Discontinuation

https://help.dropbox.com/installs/paper-mobile-discontinuation
69•mercenario•1h ago•43 comments

Claude can now create and edit files

https://www.anthropic.com/news/create-files
298•meetpateltech•5h ago•174 comments

The Dying Dream of a Decentralized Web

https://spectrum.ieee.org/web3-hardware-security
26•warrenm•45m ago•12 comments

We all dodged a bullet

https://xeiaso.net/notes/2025/we-dodged-a-bullet/
374•WhyNotHugo•4h ago•228 comments

Memory Integrity Enforcement

https://security.apple.com/blog/memory-integrity-enforcement/
64•circuit•1h ago•9 comments

A new experimental Go API for JSON

https://go.dev/blog/jsonv2-exp
113•darccio•4h ago•23 comments

Mistral AI raises 1.7B€, enters strategic partnership with ASML

https://mistral.ai/news/mistral-ai-raises-1-7-b-to-accelerate-technological-progress-with-ai
664•TechTechTech•13h ago•359 comments

ICE Is Using Fake Cell Towers to Spy on People's Phones

https://www.forbes.com/sites/the-wiretap/2025/09/09/how-ice-is-using-fake-cell-towers-to-spy-on-p...
286•coloneltcb•3h ago•97 comments

Building a DOOM-like multiplayer shooter in pure SQL

https://cedardb.com/blog/doomql/
83•lvogel•4h ago•8 comments

E-Paper Display Refresh Rate Reaches New Heights

https://spectrum.ieee.org/e-paper-display-modos
21•rbanffy•1h ago•1 comments

Weave (YC W25) is hiring a founding AI engineer

https://www.ycombinator.com/companies/weave-3/jobs/SqFnIFE-founding-ai-engineer
1•adchurch•2h ago

X open sourced their latest algorithm

https://github.com/twitter/the-algorithm
199•mxstbr•4h ago•112 comments

Go for Bash Programmers – Part II: CLI Tools

https://github.com/go-monk/from-bash-to-go-part-ii
42•reisinge•1d ago•3 comments

A clickable visual guide to the Rust type system

https://rustcurious.com/elements/
207•stmw•4d ago•37 comments

I solved a distributed queue problem after 15 years

https://www.dbos.dev/blog/durable-queues
58•Bogdanp•1d ago•16 comments

You too can run malware from NPM (I mean without consequences)

https://github.com/naugtur/running-qix-malware
156•naugtur•9h ago•94 comments

An attacker’s blunder gave us a look into their operations

https://www.huntress.com/blog/rare-look-inside-attacker-operation
89•mellosouls•3h ago•63 comments

Judge: Anthropic's $1.5B settlement is being shoved "down the throat of authors"

https://arstechnica.com/tech-policy/2025/09/judge-anthropics-1-5b-settlement-is-being-shoved-down...
37•pier25•1h ago•13 comments

Microserfs ordered back to the office, given 10 days to appeal

https://www.theregister.com/2025/09/09/microsoft_return_to_work/
29•rntn•42m ago•6 comments

Show HN: An Open Source XR(AR/VR) Operating System

https://www.getxeneva.com/
5•ayush_xeneva•2d ago•1 comments

How can England possibly be running out of water?

https://www.theguardian.com/news/ng-interactive/2025/aug/17/how-can-england-possibly-be-running-o...
299•xrayarx•3d ago•453 comments

Tomorrow's Emoji, Today: Unicode 17.0

https://jenniferdaniel.substack.com/p/tomorrows-emoji-today-unicode-170
46•ChrisArchitect•1h ago•43 comments

Anscombe's Quartet

https://en.wikipedia.org/wiki/Anscombe%27s_quartet
95•gidellav•1d ago•24 comments

Yet Another TypeSafe and Generic Programming Candidate for C

https://github.com/brightprogrammer/MisraStdC
42•brightprogramer•3d ago•3 comments

U.S. Added 911,000 Fewer Jobs in the Year Ended in March

https://www.wsj.com/economy/jobs/us-job-growth-revision-a9777d98
116•JumpCrisscross•3h ago•10 comments

Disrupting the DRAM roadmap with capacitor-less IGZO-DRAM technology

https://www.imec-int.com/en/articles/disrupting-dram-roadmap-capacitor-less-igzo-dram-technology
26•ksec•5h ago•16 comments

William James at CERN (1995)

http://bactra.org/wm-james-at-cern/
23•benbreen•3d ago•4 comments

Synthesizing Object-Oriented and Functional Design to Promote Re-Use

https://cs.brown.edu/~sk/Publications/Papers/Published/kff-synth-fp-oo/
31•andsoitis•2d ago•4 comments

New Mexico is first state in US to offer universal child care

https://www.governor.state.nm.us/2025/09/08/new-mexico-is-first-state-in-nation-to-offer-universa...
681•toomuchtodo•5h ago•536 comments

Strong Eventual Consistency – The Big Idea Behind CRDTs

https://lewiscampbell.tech/blog/250908.html
135•tempodox•14h ago•60 comments
Open in hackernews

A clickable visual guide to the Rust type system

https://rustcurious.com/elements/
248•ashvardanian•1d ago

Comments

craftkiller•1d ago
This is such a small thing, but I love the inclusion of the value ranges for the integers! I can never remember which side can go one deeper ("is it [-128 to 127] or [-127 to 128]"). Bookmarking this for reference later!
throwawaymaths•1d ago
It's always negative. 0xFFFF... Cannot have a two's complement, and the top bit is set.
delusional•1d ago
I find that the easiest way to remember it is to remember that 0 is positive but has no negative counterpart.
high_priest•21h ago
The 0 is positive is not true, but some day you are hopefully going to get it.

The true answer is that negative numbers have the top bit set, which can't be used for positive numbers. Hence positives are one bit short.

delusional•13h ago
Youre literally saying the same thing as me.

All negative numbers have the most significant bit set and 0 is the number with no bits set, ergo 0 must be positive since the most significant bit is not set.

Now arithmatically, this is untrue. We'll usually treat 0 as neither positive nor negative (or in certain cases both negative and positive) but bitwise, In terms of twos-complement implementation, Zero is positive. We know that since it exists in the unsigned version of the types as well.

Hopefully you'll see that some day.

jibal•1d ago
I can't imagine suffering from that. Understanding twos complement representation is an essential programming skill. And a byte value of 128? What is that in hex?
craftkiller•1d ago
Eh, how often are you going down to the bit representation of signed integers? Naturally I learned two's complement ages ago, but all of my bitwise manipulation seems to be on unsigned integers (and frankly I've only used bitwise operations at work once for implementing bloom filters. Normally I only get to do lower level stuff like that in side-projects). So internalizing two's complement has never seemed relevant.

> And a byte value of 128? What is that in hex?

0x80

jibal•15h ago
> 0x80

Which is of course has the sign bit set.

The comments here are educational ... I hadn't realized that the field of programming had become this degraded.

superblas•3h ago
Such needless condescension, jibal.
dzaima•23h ago
You could pretty easily have an integer representation using [-127; 128]; 128 being 0x80 of course (all other values being the same as in two's complement). Still would hold that -n == 1 + ~n, zero is all-zeroes, and the property that add/sub needn't care about signed vs unsigned. Only significant difference being that top bit doesn't determine negativeness, though of course it's still "x < 0" in code. (at the hardware level, sign extension & comparisons might also get very slightly more complicated, but that's far outside what typical programmers would need to know)

For most practical purposes outside of low-level stuff all that really matters about two's complement is Don't Get Near 2^(width-1) Or Bad™ Things Happen. Including +128 would even have the benefit of 1<<7 staying positive.

moefh•22h ago
> Only difference being that you need to do a bit more work to determine negativeness (work which in hardware you'd already likely have the bulk of for determining is-zero).

The work needed to calculate the overflow flag (done in every add/sub operation in most ISAs) is also way more complicated when the high bit does not represent sign.

dzaima•21h ago
Oh, true. Even further down low-level/frequently-unused details though; and RISC-V does without it (/ flags in general) roughly fine.
oconnor663•23h ago
What is your goal for this comment?
koakuma-chan•23h ago
I have no idea what is twos complement representation
koakuma-chan•23h ago
It just means the most significant bit represents the sign?
craftkiller•23h ago
It's a little bit more complicated than that. If only the most significant bit represented the sign then you'd have both positive and negative zero (which is possible with floats), and you'd only be able to go from [-127 to 127]. Instead, it's some incantation where the MSB is the sign but then you flip all the bits and add 1. It is only relevant for signed integers, not unsigned integers.
pests•23h ago
Ben Eater has a really good YT video on this.
lock1•23h ago
That's called "ones complement", the most significant bit represents a sign. Like the sibling post mentioned, it does have a weird quirk of having 2 representations for 0: (-0) and (+0).

While "twos complement" turns the MSB unsigned value to a negative instead of a positive. For example, 4-bit twos complement: 1000 represents -8 (in unsigned 4-bit, this supposed to be +8), 0100 represents 4, 0010 represents 2, 0001 represents 1. Some more numbers: 7 (0111), -7 (1001), 1 (0001), -1 (1111).

Intuitively, "ones complement" MSB represents a multiplication by (-1). While "twos complement" MSB adds (-N), with N = 2^(bit length - 1), in case of 4-bit twos complement it's (-2^3) or (-8). Both representation leave non-MSB bits work exactly like unsigned integer.

harpiaharpyja•7h ago
The other replies do a good job of explaining what 2s complement is.

I find the best way to understand why 2s complement is so desirable is to write down the entire number line for e.g. 3-bit integers.

Using 1s complement, the negative numbers are backwards. 2s complement fixes this, so that arithmetic works and you can do addition and subtraction without any extra steps.

(Remember that negative numbers are less than positive numbers, so the correct way to count them is:

-8 -7 -6 -5 -4 -3 -2 -1 0 +1 +2 +3 +4 +5 +6 +7

Where -1 is the largest possible negative number)

AnIrishDuck•23h ago
> Understanding twos complement representation is an essential programming skill

The field of programming has become so broad that I would argue the opposite. The vast majority of developers will never need to think about let alone understand twos complement as a numerical representation.

wubrr•21h ago
> Understanding twos complement representation is an essential programming skill.

It is completely irrelevant for the vast majority of programming.

newpavlov•22h ago
Tangential note: I sometimes wish that signed integers were symmetrical. i8 would represent the range of [-127 to 127] with 0xFF representing NaN. Any operation which can not be computed (division by zero, overflows, operation with another NaN, etc.) would result in NaN. For further symmetry we could do the same for signed integers as well.

Yes, it's possible to encode such types manually, but it will not be efficient since CPUs do not natively support such operations.

lock1•21h ago
Wouldn't this make CPU flags useless? I think it would complicate branch instructions too, as most modern CPUs tend to use integer operations for branching.

Also, this in-band signaling probably would invite something similar to `null` mess in type systems. I can't wait to tell CPU to JMP NaN.

newpavlov•21h ago
>Wouldn't this make CPU flags useless?

They would, but I agree with RISC-V here, CPUs should not rely on them in the first place.

I do not understand your argument about branches, how would it hinder the jump instructions?

We still would need separate "wrapping" instructions (e.g. for implementing bigints and cryptographic algorithms), but they probably could be limited to unsigned operations only.

>I can't wait to tell CPU to JMP NaN.

How is it different from jumping to null? If you do such jump, it means you have a huge correctness problem with your code.

lock1•21h ago

  > I do not understand your argument about branches, how would it hinder the jump instructions?
Extra set of logic for handling NaN cases? I don't think it's impossible, just kind of less intuitive. Jump instruction using integer w/o NaN always valid, while NaN-able integer sometimes invalid (ignoring whether the memory address can be accessed).
newpavlov•21h ago
For absolute jumps you don't need extra logic, since CPUs could declare the last page always unmapped, so such jumps would always result in a page fault (similarly to the null page on most systems).

For relative non-immediate jumps the added logic is extremely simple (hardware exception on NaN) and should not (AFAIK) hinder performance of jumps in any way.

zokier•21h ago
That sounds surprisingly reasonable idea for signeds. Less so for unsigneds though. Has there been any architecture doing anything like that?
newpavlov•21h ago
I can not name an ISA with such instructions out of my head.

As for unsigned integers, as I mentioned in the other comment, we probably need two separate instruction sets for "wrapping" and NaN-able operations on unsigned integers.

smj-edison•1d ago
I really like how it scrolls left-to-right on mobile, instead of collapsing down.
goku12•1d ago
Adding another resource I use frequently: https://cheats.rs/

One part that I love especially about it is that it represents lifetimes [1] and memory layout [2] of data structures in graphical format. They're as invaluable as API references. I would love to see it included in other documentation as well.

[1] https://cheats.rs/#memory-lifetimes

[2] https://cheats.rs/#memory-layout

6r17•1d ago
There aren't that much of them actually ! Almost feel like an element table
adastra22•1d ago
Why is PhantomData in the unsafe support group?
john-h-k•23h ago
It obviously can be used for other things but it principally was designed for unsafe support (allowing dropck to understand unsafe types that own a value through a pointer). See https://doc.rust-lang.org/nomicon/phantom-data.html
saghm•23h ago
Interesting, I've had to use it a number of times over the years despite never really doing much unsafe. At least to me, it seems pretty well-scoped as a workaround from the requirements that the compiler has around needing to use generic type parameters in type definitions, which certainly isn't something you need to be writing unsafe code to run into. I wouldn't be shocked if it used unsafe under the hood, but then again, so does Vec.
afdbcreid•22h ago
The original reason to design it (instead of the previously inferred bivariance) was so that unsafe code that really does not want bivariance, and will be unsound if it will be used, will remember to consider that.

It doesn't use unsafe under the hood, rather it's compiler magic.

john-h-k•21h ago
> At least to me, it seems pretty well-scoped as a workaround from the requirements that the compiler has around needing to use generic type parameters in type definitions

The reason those requirements exist is (primarily) to do with unsafe code. Specifically it’s about deciding the variance of the type (which doesn’t matter for a truely unused type parameter).

stmw•19h ago
It's very good, thanks for getting it some attention. Also - to show how much I agree - https://news.ycombinator.com/item?id=45140572
shmerl•17h ago
Really nice and concise presentation!
mattlutze•5h ago
I love a page that doesn't react to my browser width.