frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Stop Hiding My Controls: Hidden Interface Controls Are Affecting Usability

https://interactions.acm.org/archive/view/july-august-2025/stop-hiding-my-controls-hidden-interface-controls-are-affecting-usability
57•cxr•1h ago•10 comments

Local-first software (2019)

https://www.inkandswitch.com/essay/local-first/
566•gasull•9h ago•180 comments

Cod Have Been Shrinking for Decades, Scientists Say They've Solved Mystery

https://www.smithsonianmag.com/smart-news/these-cod-have-been-shrinking-dramatically-for-decades-now-scientists-say-theyve-solved-the-mystery-180986920/
88•littlexsparkee•5h ago•26 comments

Optimizing Tool Selection for LLM Workflows with Differentiable Programming

https://viksit.substack.com/p/optimizing-tool-selection-for-llm
38•viksit•3h ago•9 comments

Operators, Not Users and Programmers

https://jyn.dev/operators-not-users-and-programmers/
25•todsacerdoti•1h ago•6 comments

Europe's first geostationary sounder satellite is launched

https://www.eumetsat.int/europes-first-geostationary-sounder-satellite-launched
161•diggan•10h ago•34 comments

Techno-Feudalism and the Rise of AGI: A Future Without Economic Rights?

https://arxiv.org/abs/2503.14283
18•lexandstuff•3h ago•2 comments

How to Network as an Introvert

https://aginfer.bearblog.dev/how-to-network-as-an-introvert/
16•agcat•3h ago•0 comments

Speeding up PostgreSQL dump/restore snapshots

https://xata.io/blog/behind-the-scenes-speeding-up-pgstream-snapshots-for-postgresql
84•tudorg•7h ago•16 comments

macOS Icon History

https://basicappleguy.com/basicappleblog/macos-icon-history
114•ksec•9h ago•45 comments

Atomic "Bomb" Ring from KiX (1947)

https://toytales.ca/atomic-bomb-ring-from-kix-1947/
53•gscott•3d ago•11 comments

X-Clacks-Overhead

https://xclacksoverhead.org/home/about
198•weinzierl•3d ago•41 comments

7-Zip 25.00

https://github.com/ip7z/7zip/releases/tag/25.00
19•pentagrama•1h ago•12 comments

RFK's proposal to let bird flu spread through poultry

https://www.livescience.com/health/flu/rfks-proposal-to-let-bird-flu-spread-through-poultry-could-set-us-up-for-a-pandemic-experts-warn
31•anjel•1h ago•27 comments

What a Hacker Stole from Me

https://mynoise.net/blog.php
12•wonger_•1h ago•2 comments

The Calculator-on-a-Chip (2015)

http://www.vintagecalculators.com/html/the_calculator-on-a-chip.html
21•Bogdanp•7h ago•3 comments

WinUAE 6 Amiga Emulator

https://www.winuae.net/
33•doener•3h ago•5 comments

The Hell of Tetra Master

https://xvw.lol/en/articles/tetra-master.html
3•zdw•3d ago•0 comments

Seine reopens to Paris swimmers after century-long ban

https://www.lemonde.fr/en/france/article/2025/07/05/seine-reopens-to-paris-swimmers-after-century-long-ban_6743058_7.html
105•divbzero•6h ago•54 comments

Haskell, Reverse Polish Notation, and Parsing

https://mattwills.bearblog.dev/haskell-postfix/
37•mw_1•3d ago•6 comments

Parametric shape optimization with differentiable FEM simulation

https://docs.pasteurlabs.ai/projects/tesseract-jax/latest/examples/fem-shapeopt/demo.html
11•dionhaefner•2d ago•2 comments

Is It Cake? How Our Brain Deciphers Materials

https://nautil.us/is-it-cake-how-our-brain-deciphers-materials-1222193/
14•dnetesn•2d ago•3 comments

QSBS Limits Raised

https://www.mintz.com/insights-center/viewpoints/2906/2025-06-25-qsbs-benefits-expanded-under-senate-finance-proposal
55•tomasreimers•13h ago•21 comments

Gecode is an open source C++ toolkit for developing constraint-based systems (2019)

https://www.gecode.org/
60•gjvc•15h ago•13 comments

What 'Project Hail Mary' teaches us about the PlanetScale vs. Neon debate

https://blog.alexoglou.com/posts/database-decisions/
41•konsalexee•12h ago•65 comments

Build Systems à la Carte (2018) [pdf]

https://www.microsoft.com/en-us/research/wp-content/uploads/2018/03/build-systems.pdf
71•djoldman•3d ago•16 comments

Pet ownership and cognitive functioning in later adulthood across pet types

https://www.nature.com/articles/s41598-025-03727-9
50•bookofjoe•5h ago•15 comments

Solve high degree polynomials using Geode numbers

https://www.tandfonline.com/doi/full/10.1080/00029890.2025.2460966
5•somethingsome•3d ago•2 comments

Yet Another Zip Trick

https://hackarcana.com/article/yet-another-zip-trick
9•todsacerdoti•3d ago•2 comments

The Prime Reasons to Avoid Amazon

https://blog.thenewoil.org/the-prime-reasons-to-avoid-amazon
153•DanAtC•3h ago•141 comments
Open in hackernews

Elliptical Python Programming

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

Comments

benob•2mo ago
TIL that in python, 1--2==3
seplox•2mo ago
It's not a python thing. 1-(-2), distribute the negative.
qsort•2mo 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•2mo 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•2mo 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•2mo ago
Also worth noting that `1 - -2` works and produces 3 in C because the space breaks the operator.
plus•2mo 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•2mo 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•2mo 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•2mo ago
Expanding on this a little, I will be replacing all occurrences of 2 with two blobs fighting, with shields:

    >>> 0^((...==...)--++--(...==...))^0
    2
rmah•2mo 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•2mo ago
And apparently string formatting which should have an ever growing number of ways to handle it. :shrug:
elijahbenizzy•2mo ago
Ok do this but for JavaScript
voidUpdate•2mo ago
https://en.wikipedia.org/wiki/JSFuck
mariocesar•2mo ago
If you're curious, the code in ellipsis results in executing:

    print('hello, world')
mturmon•2mo 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•2mo ago
I think we're really starting to over crowd pythons syntax and I'm not a fan.
noddleah•2mo ago
you're telling me you never program in python elliptically??
acbart•2mo ago
Pretty sure this would have been possible in Python 2.6. The Ellipsis object has been around for a very long time.
MadVikingGod•2mo 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•2mo ago
You can do this on JavaScript too.

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