frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

AI overly affirms users asking for personal advice

https://news.stanford.edu/stories/2026/03/ai-advice-sycophantic-models-research
285•oldfrenchfries•3h ago•223 comments

Spanish legislation as a Git repo

https://github.com/EnriqueLop/legalize-es
554•enriquelop•5h ago•172 comments

I Built an Open-World Engine for the N64 [video]

https://www.youtube.com/watch?v=lXxmIw9axWw
191•msephton•5h ago•24 comments

Show HN: Free, in-browser PDF editor

https://breezepdf.com/?v=2
33•philjohnson•1h ago•15 comments

Cocoa-Way – Native macOS Wayland compositor for running Linux apps seamlessly

https://github.com/J-x-Z/cocoa-way
207•OJFord•7h ago•70 comments

C++26: A User-Friednly assert() macro

https://www.sandordargo.com/blog/2026/03/25/cpp26-user-friendly-assert
28•jandeboevrie•3d ago•11 comments

CERN uses tiny AI models burned into silicon for real-time LHC data filtering

https://theopenreader.org/Journalism:CERN_Uses_Tiny_AI_Models_Burned_into_Silicon_for_Real-Time_L...
223•TORcicada•9h ago•110 comments

Folk are getting dangerously attached to AI that always tells them they're right

https://www.theregister.com/2026/03/27/sycophantic_ai_risks/
128•Brajeshwar•2h ago•82 comments

Linux Is an Interpreter

https://astrid.tech/2026/03/28/0/linux-is-an-interpreter/
4•frizlab•17m ago•0 comments

StationeryObject

https://stationeryobject.com/archive/
12•NaOH•3d ago•0 comments

ICAO issued new power bank restriction on flight

https://www.icao.int/news/new-power-bank-restrictions-will-safeguard-international-aviation
31•phantomathkg•2h ago•22 comments

rpg.actor Game Jam

https://rpg.actor/jam
5•Kye•51m ago•0 comments

Go hard on agents, not on your filesystem

https://jai.scs.stanford.edu/
510•mazieres•16h ago•279 comments

Improved Git Diffs with Delta, Fzf and a Little Shell Scripting

https://nickjanetakis.com/blog/awesome-git-diffs-with-delta-fzf-and-a-little-shell-scripting
51•nickjj•4d ago•20 comments

Paper Tape Is All You Need – Training a Transformer on a 1976 Minicomputer

https://github.com/dbrll/ATTN-11
81•rahen•3d ago•12 comments

AMD's Ryzen 9 9950X3D2 Dual Edition crams 208MB of cache into a single chip

https://arstechnica.com/gadgets/2026/03/amds-ryzen-9-9950x3d2-dual-edition-crams-208mb-of-cache-i...
246•zdw•15h ago•131 comments

Toma (YC W24) is hiring a Senior/Staff Eng to build AI automotive coworkers

https://www.ycombinator.com/companies/toma/jobs/2lrQI7S-sr-staff-software-engineer
1•anthonykrivonos•5h ago

Circuit-level PDP-11/34 emulator

https://github.com/dbrll/ll-34
3•elvis70•53m ago•0 comments

A single-file C allocator with explicit heaps and tuning knobs

https://github.com/xtellect/spaces
44•enduku•2d ago•27 comments

The bee that everyone wants to save

https://naturalist.bearblog.dev/the-bee-that-everyone-wants-to-save/
208•nivethan•2d ago•67 comments

We built a multi-agent research hub. The waitlist is a reverse-CAPTCHA

https://enlidea.com
10•LZK•2h ago•8 comments

Make macOS consistently bad unironically

https://lr0.org/blog/p/macos/
479•speckx•22h ago•330 comments

Gerard of Cremona

https://en.wikipedia.org/wiki/Gerard_of_Cremona
21•teleforce•2d ago•6 comments

Go Naming Conventions: A Practical Guide

https://www.alexedwards.net/blog/go-naming-conventions
61•yurivish•3d ago•35 comments

I decompiled the White House's new app

https://thereallo.dev/blog/decompiling-the-white-house-app
91•amarcheschi•1h ago•29 comments

Militarized snowflakes: The accidental beauty of Renaissance star forts

https://bigthink.com/strange-maps/star-forts/
19•Brajeshwar•1h ago•1 comments

LG's new 1Hz display is the secret behind a new laptop's battery life

https://www.pcworld.com/article/3096432/lgs-new-1hz-display-is-the-secret-behind-a-new-laptops-ba...
295•robotnikman•4d ago•149 comments

Anatomy of the .claude/ folder

https://blog.dailydoseofds.com/p/anatomy-of-the-claude-folder
555•freedomben•1d ago•240 comments

Arm releases first in-house chip, with Meta as debut customer

https://www.cnbc.com/2026/03/24/arm-launches-its-own-cpu-with-meta-as-first-customer.html
69•goplayoutside•3d ago•19 comments

Iran-linked hackers breach FBI director's personal email

https://www.reuters.com/world/us/iran-linked-hackers-claim-breach-of-fbi-directors-personal-email...
377•m-hodges•1d ago•483 comments
Open in hackernews

Elliptical Python Programming

https://susam.net/elliptical-python-programming.html
184•sebg•11mo ago

Comments

benob•11mo ago
TIL that in python, 1--2==3
seplox•11mo ago
It's not a python thing. 1-(-2), distribute the negative.
qsort•11mo ago
In most C-like languages that would be a syntax error. E.g. in C and C++ as a rule you tokenize "greedily", "1--2" would be tokenized as "1", "unary decrement operator", "2", which is illegal because you're trying to decerment an rvalue.

Python doesn't have "--", which allows the tokenizer to do something else.

nyrikki•11mo ago
In C, that is really because Unary minus (negation) has precedence over binary operations.

    +a - b; // equivalent to (+a) - b, NOT +(a - b)
    -c + d; // equivalent to (-c) + d, NOT -(c + d)

https://en.cppreference.com/w/cpp/language/operator_arithmet...

    +-e; // equivalent to +(-e), the unary + is a no-op if “e” is a built-in type
     // because any possible promotion is performed during negation already
The same doesn't apply to, !! Which is applied as iterated binary operations (IIRC)

I am pretty sure the decriment operator came around well after that quirk was established.

seanhunter•11mo ago
Peter van der Linden’s book “Expert C Programming” (which is awesome btw) says that one of them (Kernighan, Richie or maybe Ken Thompson I forget) realised early on that the c compiler had the wrong operator precedence for bit twiddling and unary and boolean operators but “at that stage we had a few thousand lines of C code and thought it would be too disruptive to change it”
j2kun•11mo ago
Also worth noting that `1 - -2` works and produces 3 in C because the space breaks the operator.
plus•11mo ago
For those who are curious, `...` is a placeholder value in Python called Ellipsis. I don't believe it serves any real purpose other than being a placeholder. But it is an object and it implements `__eq__`, and is considered equal to itself. So `...==...` evaluates to `True`. When you prefix a `True` with `-`, it is interpreted as a prefix negation operator and implicitly converts the `True` to a `1`, so `-(...==...)` is equal to `-1`. Then, you add another prefix `-` to turn the `-1` back into `1`.

`--(...==...)--(...==...)` evaluates to `2` because the first block evaluates to 1, as previously mentioned, and then the next `-` is interpreted as an infix subtraction operator. The second `-(...==...)` evaluates to `-1`, so you get `1 - -1` or `2`.

When chaining multiple together, you can leave off the initial `--`, because booleans will be implicitly converted to integers if inserted into an arithmetic expression, e.g. `True - -1` -> `1 - -1` -> `2`.

> There should be one-- and preferably only one --obvious way to do it.

This article is obviously completely tongue-in-cheek, but I feel the need to point out that this sentence is not meant to be a complete inversion of the Perl philosophy of TIMTOWTDI. The word "obvious" is crucial here - there can be more than one way, but ideally only one of the ways is obvious.

pletnes•11mo ago
Numpy actively uses … to make slicing multidimensional arrays less verbose. There are also uses in FastAPI along the lines of «go with the default».
abuckenheimer•11mo ago
excellent explanation, to add to this since I was curious about the composition, '%c' is an integer presentation type that tells python to format numbers as their corresponding unicode characters[1] so

'%c' * (length_of_string_to_format) % (number, number, ..., length_of_string_to_format_numbers_later)

is the expression being evaluated here after you collapse all of the 1s + math formatting each number in the tuple as a unicode char for each '%c' escape in the string corresponding to its place in the tuple.

[1] https://docs.python.org/3/library/string.html#format-specifi...

nomel•11mo ago
Expanding on this a little, I will be replacing all occurrences of 2 with two blobs fighting, with shields:

    >>> 0^((...==...)--++--(...==...))^0
    2
rmah•11mo ago
>> There should be one-- and preferably only one --obvious way to do it.

Except for package management, of course. There, we need lots and lots of ways.

blooalien•11mo ago
And apparently string formatting which should have an ever growing number of ways to handle it. :shrug:
elijahbenizzy•11mo ago
Ok do this but for JavaScript
voidUpdate•11mo ago
https://en.wikipedia.org/wiki/JSFuck
mariocesar•11mo ago
If you're curious, the code in ellipsis results in executing:

    print('hello, world')
mturmon•11mo ago
Thank you!

I noticed some ** and * in the thing sent to eval(), which (given that the building blocks are small integers) seemed related to prime factorizations.

The initial %c is duplicated 21 times (3*7, if I read correctly), and then string-interpolated (%c%c%c...) against a long tuple of integers. These integers themselves are composed of products of factors combined using * and **.

There is also one tuple "multiplication" embedded within that long tuple of integers -- (a,b)*2 = (a,b,a,b). That is for the 'l' 'l' in "hello".

It's all very clever and amusingly mathy, with a winking allusion to the construction of natural numbers using sets. It made me Godel.

callamdelaney•11mo ago
I think we're really starting to over crowd pythons syntax and I'm not a fan.
noddleah•11mo ago
you're telling me you never program in python elliptically??
acbart•11mo ago
Pretty sure this would have been possible in Python 2.6. The Ellipsis object has been around for a very long time.
MadVikingGod•11mo ago
This behavior can be replicated with any class that has two special methods: __neg__ that returns -1 and __sub__ that accepts ints and returns 1-other.

For example if you make this class:

  class _:
       def __neg__(self):
           return -1
       def __sub__(self, other):
           return 1-other
You get similar behavior:

  >>> --_()
  1
  >>> _()--_()
  2
Fun python for everyone.
maxloh•11mo ago
You can do this on JavaScript too.

  alert(1)
  // equals to:
  [][(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+[+!+[]]]+[+!+[]]+([]+[]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[!+[]+!+[]]])()
https://jsfuck.com/