frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

The curious case of retro demo scene graphics

https://www.datagubbe.se/aipixels/
183•zdw•5h ago•42 comments

ChatGPT won't let you type until Cloudflare reads your React state

https://www.buchodi.com/chatgpt-wont-let-you-type-until-cloudflare-reads-your-react-state-i-decry...
664•alberto-m•14h ago•426 comments

I use excalidraw to manage my diagrams for my blog

https://blog.lysk.tech/excalidraw-frame-export/
59•mlysk•3h ago•24 comments

Hamilton-Jacobi-Bellman Equation: Reinforcement Learning and Diffusion Models

https://dani2442.github.io/posts/continuous-rl/
38•sebzuddas•3h ago•11 comments

VHDL's Crown Jewel

https://www.sigasi.com/opinion/jan/vhdls-crown-jewel/
61•cokernel_hacker•5h ago•28 comments

Voyager 1 runs on 69 KB of memory and an 8-track tape recorder

https://techfixated.com/a-1977-time-capsule-voyager-1-runs-on-69-kb-of-memory-and-an-8-track-tape...
549•speckx•18h ago•208 comments

Copilot edited an ad into my PR

https://notes.zachmanson.com/copilot-edited-an-ad-into-my-pr/
603•pavo-etc•6h ago•184 comments

15 Years of Forking

https://www.waterfox.com/blog/15-years-of-forking/
178•MrAlex94•2d ago•30 comments

Coding agents could make free software matter again

https://www.gjlondon.com/blog/ai-agents-could-make-free-software-matter-again/
194•rogueleaderr•12h ago•183 comments

Ninja is a small build system with a focus on speed

https://github.com/ninja-build/ninja
21•tosh•3d ago•2 comments

C++26 is done: ISO C++ standards meeting Trip Report

https://herbsutter.com/2026/03/29/c26-is-done-trip-report-march-2026-iso-c-standards-meeting-lond...
240•pjmlp•16h ago•209 comments

Philly courts will ban all smart eyeglasses starting next week

https://www.inquirer.com/news/philadelphia/smart-glasses-ai-meta-courts-20260326.html
258•Philadelphia•8h ago•96 comments

Hardware Image Compression

https://www.ludicon.com/castano/blog/2026/03/hardware-image-compression/
27•luu•1d ago•5 comments

Douglas Lenat's Automated Mathematician Source Code

https://github.com/white-flame/am
24•hydrolox•4d ago•4 comments

Pretext: TypeScript library for multiline text measurement and layout

https://github.com/chenglou/pretext
313•emersonmacro•1d ago•59 comments

Eclipse GlassFish: This Isn't Your Father's GlassFish

https://foojay.io/today/eclipse-glassfish-this-isnt-your-fathers-glassfish/
22•henk53•4d ago•11 comments

My MacBook keyboard is broken and it's insanely expensive to fix

https://tobiasberg.net/posts/my-macbook-keyboard-is-broken-and-its-insanely-expensive-to-fix/
199•TobiasBerg•15h ago•239 comments

When Coupled Volcanoes Talk, These Researchers Listen

https://www.quantamagazine.org/when-coupled-volcanoes-talk-these-researchers-listen-20260327/
6•ibobev•2d ago•0 comments

Midnight train from GA: A view of America from the tracks as airports struggle

https://apnews.com/article/airports-shutdown-long-lines-train-travel-amtrak-e4d8ea591b3b036142c2b...
100•walterbell•14h ago•82 comments

15 years, one server, 8GB RAM and 500k users – how Webminal refuses to die

https://community.webminal.org/t/15-years-one-server-8gb-ram-and-500k-users-how-webminal-refuses-...
110•giis•4h ago•22 comments

Stripe is down

https://status.stripe.com/
28•tompccs•1h ago•12 comments

The Cognitive Dark Forest

https://ryelang.org/blog/posts/cognitive-dark-forest/
446•kaycebasques•15h ago•196 comments

"Roadrunner": a bipedal, wheeled robot for multi-modal locomotion [video]

https://www.youtube.com/watch?v=9kae-UAME1U
39•surprisetalk•4d ago•16 comments

Gonon: Building a Clock with No Numerals

https://tonygaeta.com/perceptor/code/gonon
32•nullpath•3d ago•23 comments

Interview: Nobonoko, Master of the Minimal Sequencer

https://fi-le.net/nobo/
34•fi-le•2d ago•3 comments

The First Video Game Was Just a Box in the Corner of a Bar

https://lithub.com/the-very-first-video-game-was-just-a-box-in-the-corner-of-a-bar/
5•PaulHoule•3d ago•2 comments

The road signs that teach travellers about France

https://www.bbc.com/travel/article/20260327-the-road-signs-that-teach-travellers-about-france
110•1659447091•14h ago•51 comments

I am definitely missing the pre-AI writing era

https://www.lesswrong.com/posts/BJ4pnropWdnzzgeJc/i-am-definitely-missing-the-pre-ai-writing-era
63•joozio•3h ago•46 comments

About the Atmosphere

https://toni.org/2026/03/27/about-the-atmosphere/
60•Kye•2d ago•11 comments

The RISE RISC-V Runners: free, native RISC-V CI on GitHub

https://riseproject.dev/2026/03/24/announcing-the-rise-risc-v-runners-free-native-risc-v-ci-on-gi...
134•thebeardisred•3d ago•37 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/