frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Myocardial infarction may be an infectious disease

https://www.tuni.fi/en/news/myocardial-infarction-may-be-infectious-disease
379•DaveZale•8h ago•128 comments

Refurb Weekend: Silicon Graphics Indigo² Impact 10000

http://oldvcr.blogspot.com/2025/09/refurb-weekend-silicon-graphics-indigo.html
22•Bogdanp•1h ago•4 comments

Geedge and MESA leak: Analyzing the great firewall’s largest document leak

https://gfw.report/blog/geedge_and_mesa_leak/en/
62•yourapostasy•14h ago•8 comments

Pass: Unix Password Manager

https://www.passwordstore.org/
143•Bogdanp•7h ago•66 comments

Show HN: A store that generates products from anything you type in search

https://anycrap.shop/
850•kafked•18h ago•265 comments

Why you’d issue a branded stablecoin

https://text-incubation.com/Why+you%27d+issue+a+branded+stablecoin+like+McDonaldsCoin
26•krrishd•3h ago•24 comments

The Socratic Journal Method: A Simple Journaling Method That Works

https://mindthenerd.com/the-socratic-journal-method-a-simple-journaling-method-that-actually-works/
59•surprisetalk•3d ago•15 comments

High Altitude Living – 8,000 ft and above (2021)

https://studioq.com/blog/2021/5/30/high-altitude-living-8000-ft-and-above-2450-meters
22•walterbell•3h ago•20 comments

AMD’s RDNA4 GPU architecture

https://chipsandcheese.com/p/amds-rdna4-gpu-architecture-at-hot
92•rbanffy•9h ago•5 comments

Will AI be the basis of many future industrial fortunes, or a net loser?

https://joincolossus.com/article/ai-will-not-make-you-rich/
86•saucymew•8h ago•105 comments

Two Slice, a font that's only 2px tall

https://joefatula.com/twoslice.html
154•JdeBP•6h ago•43 comments

Recreating the US/* time zone situation

https://rachelbythebay.com/w/2025/09/12/tz/
67•move-on-by•14h ago•34 comments

RIP pthread_cancel

https://eissing.org/icing/posts/rip_pthread_cancel/
178•robin_reala•13h ago•80 comments

Lexy: A parser combinator library for C++17

https://github.com/foonathan/lexy
43•klaussilveira•3d ago•5 comments

George Bernard Shaw by G. K. Chesterton (1909)

https://www.gutenberg.org/ebooks/19535
14•lordleft•3d ago•1 comments

How the restoration of ancient Babylon is drawing tourists back to Iraq

https://www.theartnewspaper.com/2025/09/12/how-the-restoration-of-ancient-babylon-is-helping-to-d...
32•leoh•6h ago•13 comments

486Tang – 486 on a credit-card-sized FPGA board

https://nand2mario.github.io/posts/2025/486tang_486_on_a_credit_card_size_fpga_board/
167•bitbrewer•15h ago•47 comments

Visual programming is stuck on the form

https://interjectedfuture.com/visual-programming-is-stuck-on-the-form/
17•iamwil•4h ago•4 comments

The case against social media is stronger than you think

https://arachnemag.substack.com/p/the-case-against-social-media-is
200•ingve•12h ago•161 comments

Safe C++ proposal is not being continued

https://sibellavia.lol/posts/2025/09/safe-c-proposal-is-not-being-continued/
140•charles_irl•11h ago•109 comments

How Ruby executes JIT code

https://railsatscale.com/2025-09-08-how-ruby-executes-jit-code-the-hidden-mechanics-behind-the-ma...
120•ciconia•4d ago•17 comments

Show HN: UltraPlot. A Succinct Wrapper for Matplotlib

https://github.com/Ultraplot/UltraPlot
6•cvanelteren•3d ago•1 comments

Four-year wedding crasher mystery solved

https://www.theguardian.com/uk-news/2025/sep/12/wedding-crasher-mystery-solved-four-years-bride-s...
287•wallflower•15h ago•87 comments

My first impressions of Gleam

https://mtlynch.io/notes/gleam-first-impressions/
182•AlexeyBrin•17h ago•63 comments

If my kids excel, will they move away?

https://jeffreybigham.com/blog/2025/where-will-my-kids-go.html
185•azhenley•6h ago•93 comments

Orange rivers signal toxic shift in Arctic wilderness

https://news.ucr.edu/articles/2025/09/08/orange-rivers-signal-toxic-shift-arctic-wilderness
79•hbcondo714•2d ago•1 comments

Open Source SDR Ham Transceiver Prototype

https://m17project.org/2025/08/18/first-linht-tests/
99•crcastle•4d ago•10 comments

Show HN: CLAVIER-36 – A programming environment for generative music

https://clavier36.com/p/LtZDdcRP3haTWHErgvdM
117•river_dillon•16h ago•22 comments

Ancient DNA solves Plague of Justinian mystery to rewrite pandemic history

https://phys.org/news/2025-08-ancient-dna-plague-justinian-mystery.html
14•PaulHoule•2d ago•0 comments

How to use Claude Code subagents to parallelize development

https://zachwills.net/how-to-use-claude-code-subagents-to-parallelize-development/
262•zachwills•4d ago•116 comments
Open in hackernews

Elliptical Python Programming

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

Comments

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

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

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

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