frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Euro-Office – Your sovereign office

https://github.com/Euro-Office
35•XzetaU8•51m ago•8 comments

Show HN: I built a tiny LLM to demystify how language models work

https://github.com/arman-bd/guppylm
446•armanified•9h ago•41 comments

Gemma 4 on iPhone

https://apps.apple.com/nl/app/google-ai-edge-gallery/id6749645337
630•janandonly•14h ago•168 comments

France pulls last gold held in US for $15B gain

https://www.mining.com/france-pulls-last-gold-held-in-us-for-15b-gain/
65•teleforce•1h ago•43 comments

An open-source 240-antenna array to bounce signals off the Moon

https://moonrf.com/
102•hillcrestenigma•6h ago•12 comments

The 1987 game “The Last Ninja” was 40 kilobytes

https://twitter.com/exQUIZitely/status/2040777977521398151
103•keepamovin•6h ago•54 comments

Microsoft hasn't had a coherent GUI strategy since Petzold

https://www.jsnover.com/blog/2026/03/13/microsoft-hasnt-had-a-coherent-gui-strategy-since-petzold/
438•naves•16h ago•265 comments

Signals, the push-pull based algorithm

https://willybrauner.com/journal/signal-the-push-pull-based-algorithm
48•mpweiher•2d ago•13 comments

LÖVE: 2D Game Framework for Lua

https://github.com/love2d/love
304•cl3misch•2d ago•123 comments

Show HN: I made a YouTube search form with advanced filters

https://playlists.at/youtube/search/
219•nevernothing•9h ago•135 comments

Show HN: Gemma Gem – AI model embedded in a browser – no API keys, no cloud

https://github.com/kessler/gemma-gem
76•ikessler•9h ago•14 comments

One ant for $220: The new frontier of wildlife trafficking

https://www.bbc.com/news/articles/cg4g44zv37qo
29•gmays•3d ago•0 comments

Sheets Spreadsheets in Your Terminal

https://github.com/maaslalani/sheets
76•_____k•2d ago•16 comments

Show HN: Real-time AI (audio/video in, voice out) on an M3 Pro with Gemma E2B

https://github.com/fikrikarim/parlor
84•karimf•15h ago•5 comments

Case study: recovery of a corrupted 12 TB multi-device pool

https://github.com/kdave/btrfs-progs/issues/1107
61•salt4034•7h ago•18 comments

Jobs Being Created by AI

https://www.wsj.com/tech/ai/wanted-head-of-human-ai-solutions-the-new-jobs-being-created-by-ai-87...
10•Jimmc414•3d ago•6 comments

Why Switzerland has 25 Gbit internet and America doesn't

https://sschueller.github.io/posts/the-free-market-lie/
481•sschueller•15h ago•365 comments

Running Gemma 4 locally with LM Studio's new headless CLI and Claude Code

https://ai.georgeliu.com/p/running-google-gemma-4-locally-with
275•vbtechguy•16h ago•66 comments

Drop, formerly Massdrop, ends most collaborations and rebrands under Corsair

https://drop.com/
16•stevebmark•5h ago•2 comments

Does coding with LLMs mean more microservices?

https://ben.page/microservices
23•jer0me•6h ago•6 comments

Show HN: Modo – I built an open-source alternative to Kiro, Cursor, and Windsurf

https://github.com/mohshomis/modo
46•mohshomis•9h ago•10 comments

Music for Programming

https://musicforprogramming.net
194•merusame•15h ago•83 comments

Employers use your personal data to figure out the lowest salary you'll accept

https://www.marketwatch.com/story/employers-are-using-your-personal-data-to-figure-out-the-lowest...
213•thisislife2•9h ago•113 comments

Usenet Archives

https://usenetarchives.com
48•myth_drannon•7h ago•13 comments

Media scraper Gallery-dl is moving to Codeberg after receiving a DMCA notice

https://github.com/mikf/gallery-dl/discussions/9304
139•MoltenMonster•6h ago•47 comments

A tail-call interpreter in (nightly) Rust

https://www.mattkeeter.com/blog/2026-04-05-tailcall/
159•g0xA52A2A•18h ago•38 comments

Eight years of wanting, three months of building with AI

https://lalitm.com/post/building-syntaqlite-ai/
774•brilee•20h ago•233 comments

Computational Physics (2nd Edition) (2025)

https://websites.umich.edu/~mejn/cp2/
139•teleforce•17h ago•20 comments

Caveman: Why use many token when few token do trick

https://github.com/JuliusBrussee/caveman
763•tosh•1d ago•335 comments

Artemis II crew see first glimpse of far side of Moon [video]

https://www.bbc.com/news/videos/ce3d5gkd2geo
481•mooreds•19h ago•367 comments
Open in hackernews

Elliptical Python Programming

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

Comments

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

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

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

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