frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Do not download the app, use the website

https://idiallo.com/blog/dont-download-apps
171•foxfired•2h ago•110 comments

It's time for modern CSS to kill the SPA

https://www.jonoalderson.com/conjecture/its-time-for-modern-css-to-kill-the-spa/
195•tambourine_man•3h ago•123 comments

Vanilla JavaScript support for Tailwind Plus

https://tailwindcss.com/blog/vanilla-js-support-for-tailwind-plus
188•ulrischa•5h ago•68 comments

It's a DE9, not a DB9 (but we know what you mean)

https://news.sparkfun.com/14298
317•jgrahamc•10h ago•209 comments

Experimental surgery performed by AI-driven surgical robot

https://arstechnica.com/science/2025/07/experimental-surgery-performed-by-ai-driven-surgical-robot/
49•horseradish•3h ago•54 comments

Why MIT switched from Scheme to Python (2009)

https://www.wisdomandwonder.com/link/2110/why-mit-switched-from-scheme-to-python
158•borski•7h ago•158 comments

Efficient Computer's Electron E1 CPU – 100x more efficient than Arm?

https://morethanmoore.substack.com/p/efficient-computers-electron-e1-cpu
137•rpiguy•7h ago•46 comments

Animated Cursors

https://tattoy.sh/news/animated-cursors/
107•speckx•6h ago•27 comments

Developing our position on AI

https://www.recurse.com/blog/191-developing-our-position-on-ai
144•jakelazaroff•2d ago•39 comments

Never write your own date parsing library

https://www.zachleat.com/web/adventures-in-date-parsing/
122•ulrischa•6h ago•147 comments

Steam, Itch.io are pulling ‘porn’ games. Critics say it's a slippery slope

https://www.wired.com/story/steam-itchio-are-pulling-porn-games-censorship/
343•6d6b73•7h ago•473 comments

Ask HN: How many of you are working in tech without a STEM degree?

26•zebproj•2d ago•30 comments

CO2 Battery

https://energydome.com/co2-battery/
99•xnx•7h ago•94 comments

Running PostmarketOS on Android Termux proot without a custom ROM (2024)

https://ivonblog.com/en-us/posts/postmarketos-in-termux-proot/
21•user070223•2d ago•1 comments

Windsurf employee #2: I was given a payout of only 1% what my shares where worth

https://twitter.com/premqnair/status/1948420769945682413
320•rfurmani•1d ago•185 comments

The future is not self-hosted

https://www.drewlyton.com/story/the-future-is-not-self-hosted/
208•drew_lytle•12h ago•233 comments

Programming vehicles in games

https://wassimulator.com/blog/programming/programming_vehicles_in_games.html
230•Bogdanp•9h ago•52 comments

Internet Archive is now a federal depository library

https://www.kqed.org/news/12049420/sf-based-internet-archive-is-now-a-federal-depository-library-what-does-that-mean
203•XnoiVeX•7h ago•39 comments

Show HN: Price Per Token – LLM API Pricing Data

https://pricepertoken.com/
278•alexellman•11h ago•116 comments

Women dating safety app 'Tea' breached, users' IDs posted to 4chan

https://www.404media.co/women-dating-safety-app-tea-breached-users-ids-posted-to-4chan/
289•gloxkiqcza•8h ago•418 comments

Why is there a date of 1968 in the Intel Chipset Device Software Utility?

https://www.intel.com/content/www/us/en/support/articles/000095169/processors.html
24•vegadw•2d ago•8 comments

Who has the fastest F1 website (2021)

https://jakearchibald.com/2021/f1-perf-part-3/
174•tosh•10h ago•57 comments

Researchers value null results, but struggle to publish them

https://www.nature.com/articles/d41586-025-02312-4
71•Bluestein•2d ago•31 comments

Trucking's uneasy relationship with new tech

https://www.bbc.com/news/articles/c5yeyn4gl80o
24•fidotron•4d ago•17 comments

Show HN: Apple Health MCP Server

https://github.com/neiltron/apple-health-mcp
144•_neil•2d ago•31 comments

Implementing a functional language with graph reduction (2021)

https://thma.github.io/posts/2021-12-27-Implementing-a-functional-language-with-Graph-Reduction.html
41•Bogdanp•6h ago•2 comments

SRAM Has No Chill: Exploiting Power Domain Separation to Steal On-Chip Secrets

https://cacm.acm.org/research-highlights/sram-has-no-chill-exploiting-power-domain-separation-to-steal-on-chip-secrets/
6•zdw•1h ago•0 comments

Dwl: Dwm for Wayland

https://codeberg.org/dwl/dwl
91•theycallhermax•10h ago•67 comments

Celebrating 20 Years of MDN

https://developer.mozilla.org/en-US/blog/mdn-turns-20/
360•soheilpro•22h ago•52 comments

How to configure X11 in a simple way

https://eugene-andrienko.com/en/it/2025/07/24/x11-configuration-simple.html
36•speckx•7h ago•17 comments
Open in hackernews

RE#: High performance derivative-based regular expression matching (2024)

https://arxiv.org/abs/2407.20479
54•fanf2•4d ago

Comments

kazinator•23h ago
> The first industrial implementation of derivatives for standard regexes in an imperative language (C#) materialized a decade later [Saarikivi et al. 2019]

Nope; I did it in TXR in early 2010:

  b839b5a212fdd77c5dc95b684d7e6790292bb3dc    Wed Jan 13 12:24:00 2010 -0800    Impelement derivative-based regular expressions.
def-lkb•22h ago
https://sourceforge.net/projects/libre/ dates back to 2001. (One could object it is not imperative enough, whatever that means :))
burntsushi•10h ago
The claim here wasn't just "first implementation of derivatives." It was a far more precise "first industrial implementation of derivatives for standard regexes in an imperative language."
high_na_euv•12h ago
Whats TXR
gjm11•11h ago
It isn't clear to me what exactly OP means by "industrial" but it seems possible that they might not consider it to apply to TXR.
kazinator•5h ago
I implemented it as a committed feature in a programming language designed to be used for solving problems in the real world, rather than accompanying academic research into the topic.

No different from what was done in C#.

burntsushi•10h ago
What is TXR? Was this implementation really "industrial"? Did it have the caching present in RE# to avoid worst case exponential compile times? Did it support Unicode? Did it have prefilters? What kind of match semantics did it support?

"industrial" in this context to me means something like, "suitable for production usage in a broad number of scenarios."

IDK if RE# lives up to that, but their benchmark results are impressive. This paper is a year old. In which production systems is RE# used?

kazinator•23h ago
> The match semantics supported in RE# is leftmost-longest (POSIX) rather than leftmost-greedy (a.k.a., backtracking or PCRE) semantics. It is unclear how to support extended Boolean operators in backtracking in the first place and what their intended semantics would be – this is primarily related to that | is non-commutative in the backtracking semantics and therefore some key distributivity laws such as (|) ≡ | no longer preserve match semantics.

Non commutative A|B in regex is broken garbage. Bravo for calling it out!

The issue is that backtracking "greedy match" regex engines, when they deal with the disjunction, simply evaluate the cases left to right and stop on the first match: A|B|C|D is interpreted as "try regex A; if that matches, then stop, else try B ...". So if A matches, it's as if B, C and D don't exist.

Say we have the regex "c.r|carp.t", the input "carpet-odor" and are doing a prefix match. Greedy semantics will try "c.r" which matches "car", and stop there, declaring a three character match. Longest match semantics matches all branches simultaneously, picking the longest match. (This is closely related to the "maximal munch" principle in tokenizing.) That semantics will match see that the "carp.t" branch can match more characters after the "c.r" branch no longer matches, and report the six character match "carpet".

Longest match semantics jibes with a set-theoretical interpretation of regex, and that's why the | operator commutes. R1|R2 means the union of the strings matched by R1 and R2, and so R1|R2 is the same as R2|R1.

o11c•22h ago
Well, technically ... if your dialect supports capturing groups, there's technically a non-commutativity anyway.

Assuming input is "ab",

  /(a)b|a(b)/ produces \1=a, \2=<missing>
  /a(b)|(a)b/ produces \2=<missing>, \1=b
Probably the easiest way to test this yourself is with GNU sed.
cvoss•20h ago
What you say is not only technically untrue, it's just plain untrue. It's a choice of the language designer whether capturing groups break commutativity.

Sed makes one choice. I'd guess that GP would call this broken garbage too, and I'd agree. Regular expressions have all these nice theoretical properties like closure under all the boolean operations and linear-time matching, but these nice properties get trashed by features that don't mesh or aren't fully thought through.

In this case (thinking about capturing groups and commutativity), one property of regular expressions is that for each one there is a machine that can do the linear-time matching -- a DFA. Even if the regular expression contains not-mutually-exclusive alternations, when it gets compiled to a DFA, the matching procedure is deterministic by construction. I can imagine a way to integrate capturing start and end actions into the transition edges of the DFA. The right thing to do is to perform capturing on all the matching alternands, not just the first. You lose the ability to number the capturing groups left to right, but instead you should lay them out in a tree that follows the concatenation/alternation structure of the expression.

burntsushi•10h ago
I find your certainty here quite odd. You claim to know what the "right thing" is, but there is no implementation of it and it gives up an incredibly useful feature of capturing that general purpose regex engines all utilize.
HelloNurse•14h ago
This is a broken regexp, with deliberate ambiguity: nondeterministically choosing the groups according to one of several matching alternatives is an implementation-defined ambiguity "resolution" that should not happen.

Just write /(a)b/ or /a(b)/ or /ab/ or /(ab)/ or /(a)(b)/ which mean five slightly different things.

o11c•7h ago
It's called a minimal example. You can easily get nontrivial real-world versions, such as "All vowels or all uppercase" or "Three letters, at least two of which are A's".

It is not reasonable to expect the user to manually disambiguate every regex.

jonstewart•22h ago
With Perl/PCRE matching semantics with alternation, I always think of it in terms of preference, and therefore as a feature (perhaps of dubious worth).

It is possible to support these semantics with an automata-based engine (see RE2; and pity junyer isn’t here to read this article, he loved derivatives), but I can’t say I recommend it. The benefit, of course, is then you can peg your test suite to PCRE.

omgtehlion•14h ago
Source repository (https://github.com/ieviev/resharp) seems to be deleted. Does anyone have a link to the actual code?

Edit: answering myself, this seems to be (at least partially) merged into the dotnet itself https://github.com/dotnet/runtime/pull/102655