frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Why some clothes shrink in the wash – and how to 'unshrink' them

https://www.swinburne.edu.au/news/2025/08/why-some-clothes-shrink-in-the-wash-and-how-to-unshrink...
108•OptionOfT•3d ago•53 comments

FBI raids Washington Post reporter's home in 'highly unusual and aggressive' act

https://www.theguardian.com/us-news/2026/jan/14/fbi-raid-washington-post-hannah-natanson
394•echelon_musk•1h ago•210 comments

Maggots, an Efficient Source of Protein, May Become Next Superfood for Humans

https://www.smithsonianmag.com/science-nature/maggots-incredibly-efficient-source-protein-may-mak...
19•bookofjoe•1h ago•13 comments

Edge of Emulation: Game Boy Sewing Machines (2020)

https://shonumi.github.io/articles/art22.html
33•mosura•1h ago•1 comments

There's a ridiculous amount of tech in a disposable vape

https://blog.jgc.org/2026/01/theres-ridiculous-amount-of-tech-in.html
615•abnercoimbre•1d ago•525 comments

SparkFun Officially Dropping AdaFruit due to CoC Violation

https://www.sparkfun.com/official-response
235•yaleman•1h ago•194 comments

I’m leaving Redis for SolidQueue

https://www.simplethread.com/redis-solidqueue/
217•amalinovic•7h ago•90 comments

India's Electric Two-Wheeler Market: Rise, Reset and What Comes Next

https://micromobility.io/news/indias-electric-two-wheeler-market-rise-reset-and-what-comes-next
41•prabinjoel•4d ago•33 comments

I Hate GitHub Actions with Passion

https://xlii.space/eng/i-hate-github-actions-with-passion/
209•xlii•5h ago•177 comments

Show HN: Tiny FOSS Compass and Navigation App (<2MB)

https://github.com/CompassMB/MBCompass
88•nativeforks•5h ago•30 comments

1000 Blank White Cards

https://en.wikipedia.org/wiki/1000_Blank_White_Cards
296•eieio•13h ago•50 comments

System Programming in Linux: A Hands-On Introduction "Demo" Programs

https://github.com/stewartweiss/intro-linux-sys-prog
49•teleforce•6h ago•3 comments

Never-before-seen Linux malware is "more advanced than typical"

https://arstechnica.com/security/2026/01/never-before-seen-linux-malware-is-far-more-advanced-tha...
48•Brajeshwar•1h ago•11 comments

Lago (Open-Source Billing) is hiring across teams and geos

1•Rafsark•4h ago

Every GitHub object has two IDs

https://www.greptile.com/blog/github-ids
296•dakshgupta•1d ago•67 comments

Government drops plans for mandatory digital ID to work in UK

https://www.bbc.com/news/articles/c3385zrrx73o
15•FridayoLeary•1h ago•0 comments

Why NUKEMAP isn't on Google Maps anymore (2019)

https://blog.nuclearsecrecy.com/2019/12/13/why-nukemap-isnt-on-google-maps-anymore/
104•fanf2•3h ago•15 comments

ASCII Clouds

https://caidan.dev/portfolio/ascii_clouds/
288•majkinetor•14h ago•52 comments

A 40-line fix eliminated a 400x performance gap

https://questdb.com/blog/jvm-current-thread-user-time/
325•bluestreak•17h ago•68 comments

A Brief Introduction to the Basics of Game Theory

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1968579
11•7777777phil•2d ago•1 comments

Show HN: OSS AI agent that indexes and searches the Epstein files

https://epstein.trynia.ai/
165•jellyotsiro•14h ago•78 comments

Systematically generating tests that would have caught Anthropic's top‑K bug

https://theorem.dev/blog/anthropic-bug-test/
47•jasongross•2d ago•13 comments

Putting the "You" in CPU (2023)

https://cpu.land/
81•vinhnx•5d ago•12 comments

The Gleam Programming Language

https://gleam.run/
217•Alupis•13h ago•129 comments

No management needed: anti-patterns in early-stage engineering teams

https://www.ablg.io/blog/no-management-needed
271•tonioab•21h ago•284 comments

The truth behind the 2026 J.P. Morgan Healthcare Conference

https://www.owlposting.com/p/the-truth-behind-the-2026-jp-morgan
301•abhishaike•22h ago•74 comments

How Iran Switched Off the Internet

https://www.ft.com/content/5d848323-84a9-4512-abd2-dd09e0a786a3
24•ViktorRay•54m ago•2 comments

vLLM large scale serving: DeepSeek 2.2k tok/s/h200 with wide-ep

https://blog.vllm.ai/2025/12/17/large-scale-serving.html
138•robertnishihara•1d ago•46 comments

Are two heads better than one?

https://eieio.games/blog/two-heads-arent-better-than-one/
195•evakhoury•1d ago•57 comments

Servo 2025 Stats

https://blogs.igalia.com/mrego/servo-2025-stats/
147•todsacerdoti•4h ago•41 comments
Open in hackernews

Elliptical Python Programming

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

Comments

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

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

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

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