frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Rethinking Syntax: Binding by Adjacency

https://github.com/manifold-systems/manifold/blob/master/docs/articles/binding_exprs.md
28•owlstuffing•1d ago

Comments

owlstuffing•1d ago
What if these were real, type-safe expressions in Java:

    2025 July 19   // → LocalDate  
    300M m/s       // → Velocity  
    1 to 10        // → Range<Int>  
    Schedule Alice Tues 3pm  // → CalendarEvent
That's the idea behind binding expressions — a compiler plugin I built to explore what it would mean if adjacency had operator semantics. It lets adjacent expressions bind based on their static types, forming new expressions through type-directed resolution.

Details here: https://github.com/manifold-systems/manifold/blob/master/doc...

evanb•2h ago
Mathematica has Infix [0], which expresses the adjacency with a ~ (because Mathematica reserves pure blankspace for multiplication). But it works fine to do eg. `"hello"~StringJoin~" world"`; I was always surprised we could only have the predefined operators in many other languages and we couldn't define our own.

This seems like a great attempt. I would be worried about how much parsing and backtracking might be required to infer the infix precedence in a totally general system (like garden-path sentences[1]) or actually ambiguous parse trees (which is cured by adopting some rule like right precedence and parens, but what rule you pick makes some 'natural language' constructions work over others).

[0] https://reference.wolfram.com/language/ref/Infix.html

[1] https://en.wikipedia.org/wiki/Garden-path_sentence

nxobject•26m ago
Similarly, Agda has a well-typed mixfix operator syntax – you define a function like (_foo_bar_baz) and can automatically write "X foo Y bar Z baz". It does mean that the operator parser has to be extensible at runtime, but it's not a huge cost for a dependently-typed language.
measurablefunc•1h ago
Congratulations, you reinvented yet another stack language.
antonvs•9m ago
No, stack languages can’t achieve this as described.

If you added a function to the examples, you could do a few of them, e.g.:

    2025 July 19 date

    299.8 M m / s velocity
But even this breaks down when you get to something like “Meet Alice Tuesday at 3pm”. Sure, you could contort things to make it resemble the concept, but it’d be a stretch at best.
ape4•1h ago
Maybe with a Java string templates:

    var myDate = MAGIC"2025 July 19"
jnpnj•1h ago
Sorry for this sounds absurd, but with diffusion language models, who generate text non-linearly (from the few that I get, they relate terms without a simpler order), I wonder if new syntactic ideas will come up.
layer8•43m ago
The drawback is that building an AST now requires a symbol table and resolving imports, possibly performing type inference and whatnot. It constitutes a higher barrier for various types of tooling. You really want your programming language to avoid becoming context-sensitive in that way.

It’s similar for the human reader: The examples are only intelligible to the reader incidentally, due to the names used and some natural-text conventions. In the general case, you have a seemingly random token sequence where you have no idea what binds to what, without looking up the type definitions or having an IDE present the expression in some structured way again.

Furthermore, in typical code you don’t have the case of constant values so often. You’ll rather have things like:

    nextYear thisMonth.previous() lastDayOf(thisMonth.previous())
    Double.parse(speedInput) m/s
    startPos to (startPos + length - 1)
    Schedule contacts.select(contactId) inputForm.getDateTime()
tgv•15m ago
I don't think this is useful in complex situations/expressions. Structure has to be encoded in the same place as meaning somehow. Natural language does it by using an extraordinarily large set of signifiers. That's not feasible for a formal language.

You could of course affix all lemmata with structural information, as free word order languages do, but that's introducing syntactic structure via the backdoor.

Building a Procedural Hex Map with Wave Function Collapse

https://felixturner.github.io/hex-map-wfc/article/
250•imadr•4h ago•38 comments

JSLinux Now Supports x86_64

https://bellard.org/jslinux/
143•TechTechTech•4h ago•30 comments

Thomas Selfridge: The First Airplane Fatality

https://www.amusingplanet.com/2026/03/thomas-selfridge-first-airplane-fatality.html
11•Hooke•42m ago•1 comments

Is legal the same as legitimate: AI reimplementation and the erosion of copyleft

https://writings.hongminhee.org/2026/03/legal-vs-legitimate/
182•dahlia•6h ago•176 comments

Show HN: The Mog Programming Language

https://moglang.org
75•belisarius222•3h ago•33 comments

Things I've Done with AI

https://sjer.red/blog/2026/built-with-ai/
22•shepherdjerred•1h ago•5 comments

DARPA's new X-76

https://www.darpa.mil/news/2026/darpa-new-x-76-speed-of-jet-freedom-of-helicopter
93•newer_vienna•4h ago•85 comments

Bluesky CEO Jay Graber is stepping down

https://bsky.social/about/blog/03-09-2026-a-new-chapter-for-bluesky
156•minimaxir•2h ago•154 comments

Launch HN: Terminal Use (YC W26) – Vercel for filesystem-based agents

54•filipbalucha•4h ago•41 comments

Florida judge rules red light camera tickets are unconstitutional

https://cbs12.com/news/local/florida-news-judge-rules-red-light-camera-tickets-unconstitutional
179•1970-01-01•3h ago•272 comments

Fixfest is a global gathering of repairers, tinkerers, and activists

https://fixfest.therestartproject.org/
111•robtherobber•3h ago•11 comments

Fontcrafter: Turn Your Handwriting into a Real Font

https://arcade.pirillo.com/fontcrafter.html
382•rendx•11h ago•126 comments

Rethinking Syntax: Binding by Adjacency

https://github.com/manifold-systems/manifold/blob/master/docs/articles/binding_exprs.md
28•owlstuffing•1d ago•9 comments

Show HN: DenchClaw – Local CRM on Top of OpenClaw

https://github.com/DenchHQ/DenchClaw
58•kumar_abhirup•6h ago•60 comments

Restoring a Sun SPARCstation IPX part 1: PSU and NVRAM (2020)

https://www.rs-online.com/designspark/restoring-a-sun-sparcstation-ipx-part-1-psu-and-nvram
75•ibobev•5h ago•42 comments

The Most Beautiful Freezer in the World: Notes on Baking at the South Pole

https://www.newyorker.com/culture/the-weekend-essay/the-most-beautiful-freezer-in-the-world
12•mitchbob•2h ago•2 comments

Velxio, Arduino Emulator

https://velxio.dev/
20•dmonterocrespo•1d ago•7 comments

Flash media longevity testing – 6 years later

https://old.reddit.com/r/DataHoarder/comments/1q6xnun/flash_media_longevity_testing_6_years_later/
106•1970-01-01•1d ago•51 comments

Durdraw – ANSI art editor for Unix-like systems

https://durdraw.org/
15•caminanteblanco•2h ago•7 comments

Workers report watching Ray-Ban Meta-shot footage of people using the bathroom

https://arstechnica.com/gadgets/2026/03/workers-report-watching-ray-ban-meta-shot-footage-of-peop...
93•randycupertino•2h ago•30 comments

Oracle is building yesterday's data centers with tomorrow's debt

https://www.cnbc.com/2026/03/09/oracle-is-building-yesterdays-data-centers-with-tomorrows-debt.html
18•spenvo•38m ago•3 comments

Ireland shuts last coal plant, becomes 15th coal-free country in Europe (2025)

https://www.pv-magazine.com/2025/06/20/ireland-coal-free-ends-coal-power-generation-moneypoint/
766•robin_reala•10h ago•480 comments

Reverse-engineering the UniFi inform protocol

https://tamarack.cloud/blog/reverse-engineering-unifi-inform-protocol
125•baconomatic•8h ago•52 comments

No leap second will be introduced at the end of June 2026

https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/P6D36VZSZBUSSTSMZKFXKF4T4IXWN23P/
53•speckx•8h ago•58 comments

An opinionated take on how to do important research that matters

https://nicholas.carlini.com/writing/2026/how-to-win-a-best-paper-award.html
43•mad•4h ago•6 comments

Jolla on track to ship new phone with Sailfish OS, user-replaceable battery

https://liliputing.com/the-new-jolla-phone-with-sailfish-os-is-on-track-to-start-shipping-in-the-...
149•heresie-dabord•4h ago•94 comments

FreeBSD Capsicum vs. Linux Seccomp Process Sandboxing

https://vivianvoss.net/blog/capsicum-vs-seccomp
99•vermaden•8h ago•38 comments

US Court of Appeals: TOS may be updated by email, use can imply consent [pdf]

https://cdn.ca9.uscourts.gov/datastore/memoranda/2026/03/03/25-403.pdf
499•dryadin•14h ago•391 comments

What I Always Wanted to Know about Second Class Values

https://dl.acm.org/doi/epdf/10.1145/3759427.3760373
21•todsacerdoti•4h ago•10 comments

Algebraic topology: knots links and braids

https://aeb.win.tue.nl/at/algtop-5.html
53•marysminefnuf•6h ago•4 comments