frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Fast(er) regular expression engines in Ruby

https://serpapi.com/blog/faster-regular-expression-engines-in-ruby/
60•davidsojevic•1y ago

Comments

yxhuvud•1y ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•1y ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•1y ago
> Another nuance was found in ruby, which cannot scan the haystack with invalid UTF-8 byte sequences.

This is extremely basic ruby: UTF-8 encoded strings must be valid UTF-8. This is not unique to ruby. If I recall correctly, python 3 does the same thing.

    2.7.1 :001 > haystack = "\xfc\xa1\xa1\xa1\xa1\xa1abc"
    2.7.1 :003 > haystack.force_encoding "ASCII-8BIT"
    => "\xFC\xA1\xA1\xA1\xA1\xA1abc" 
    2.7.1 :004 > haystack.scan(/.+/)
    => ["\xFC\xA1\xA1\xA1\xA1\xA1abc"]
This person is a senior engineer on their Team page. All they had to do was google "ArgumentError: invalid byte sequence in UTF-8". Or ask a coworker... the company has Ruby on Rails applications. headdesk
burntsushi•1y ago
The nuance is specifically relevant here because neither of the other two regex engines benchmarked have this requirement. It's doubly relevant because that means running a regex search doesn't require a UTF-8 validation step, and is therefore likely beneficial from a perf perspective, dependening on the workload.
kayodelycaon•1y ago
That’s a good point. I hadn’t considered it because I’ve hit the validation error long before getting to search. It is possible to avoid string operations with careful coding prior to the search.

Edit: After a little testing, the strings can be read from and written to files without triggering validation. Presumably this applies to sockets as well.

DmitryOlshansky•1y ago
I wonder how std.regex of dlang would fare in such test. Sadly due to a tiny bit of D’s GC use it’s hard to provide as a library for other languages. If there is an interest I might take it through the tests.

Giant trees have no trouble pumping water to top branches: new research

https://news.exeter.ac.uk/faculty-of-environment-science-and-economy/giant-trees-have-no-trouble-...
130•hhs•5h ago•63 comments

Leanstral 1.5: Proof abundance for all

https://mistral.ai/news/leanstral-1-5/
122•programLyrique•5h ago•31 comments

GLM5.2 on AMD MI355X at 2626 tok/s/node at over 2x lower cost than Blackwell

https://www.wafer.ai/blog/glm52-amd
138•latchkey•6h ago•39 comments

MSI Center – How to gain SYSTEM privileges in seconds

https://mrbruh.com/msicenter/
40•MrBruh•3h ago•9 comments

Steam Controller Auto-Charge – pilot to magnetic charging puck using CV

https://github.com/FossPrime/Steam-Controller-Auto-Charge
95•zdw•5h ago•19 comments

SearXNG: A free internet metasearch engine

https://github.com/searxng/searxng
158•theanonymousone•7h ago•47 comments

The circuit that lets your brain think and see

https://www.engineering.columbia.edu/about/news/circuit-lets-your-brain-think-and-see
58•hhs•5h ago•10 comments

Odin, Wikipedia and engagement farming

https://katamari64.se/posts/2026/odin-wikipedia/
65•stock_toaster•4h ago•76 comments

The firefighting system of the Van der Heyden brothers in 17th century Amsterdam

https://worksinprogress.co/issue/how-amsterdam-invented-the-fire-department/
54•zdw•5h ago•12 comments

Synthesis is harder than analysis

https://surfingcomplexity.blog/2026/07/03/synthesis-is-harder-than-analysis/
9•azhenley•1h ago•3 comments

Jamesob's guide to running SOTA LLMs locally

https://github.com/jamesob/local-llm
300•livestyle•12h ago•137 comments

Show HN: A statically typed, cross-platform, easily bootstrappable build system

https://github.com/rochus-keller/BUSY/
20•Rochus•3d ago•6 comments

Soatok's Informal Guide to Threat Models

https://soatok.blog/2026/06/30/soatoks-informal-guide-to-threat-models/
44•zdw•3h ago•3 comments

Applied Category Theory Course (2018)

https://math.ucr.edu/home/baez/act_course/index.html
73•measurablefunc•7h ago•7 comments

New serious vulnerabilities spiked around release of Claude Mythos Preview

https://epoch.ai/data-insights/cve-severity-spike
67•cubefox•6h ago•14 comments

Espionage Against the European Parliament

https://citizenlab.ca/research/member-of-committee-investigating-spyware-hacked-with-pegasus/
296•ledoge•7h ago•71 comments

Gone but Not Forgotten: Recovering the Dead Web

https://blog.archive.org/2026/04/23/gone-but-not-forgotten-recovering-the-dead-web/
35•wslh•3d ago•3 comments

Costco is the anti-Amazon

https://phenomenalworld.org/analysis/the-anti-amazon/
341•bookofjoe•12h ago•320 comments

Infracost (YC W21) Is Hiring a Marketing Lead to Shift FinOps Left

https://www.ycombinator.com/companies/infracost/jobs/YTJcFwr-marketing-lead
1•akh•7h ago

Factories are just rooms

https://interconnected.org/home/2026/07/03/factories
207•arbesman•12h ago•81 comments

International chess federation sanctions Kramnik

https://www.fide.com/fide-ethics-disciplinary-commission-issues-a-decision-in-case-involving-gm-v...
138•DarkContinent•10h ago•76 comments

Dispersion loss counteracts embedding condensation in small language models

https://chenliu-1996.github.io/projects/LM-Dispersion/
26•E-Reverance•5h ago•6 comments

GitFut – Your GitHub stats turned into a World-Cup-style player card

https://gitfut.com
33•redbell•5h ago•18 comments

Hunting a 16-year-old SQLite WAL bug with TLA+

https://ubuntu.com/blog/hunting-a-16-year-old-sqlite-bug-with-tla-is-dqlite-affected
183•peterparker204•3d ago•19 comments

Software, from First Principles

https://fazamhd.com/mental-models/software/
64•faza•6h ago•13 comments

FreeBSD ate my RAM

https://crocidb.com/post/freebsd-ate-my-ram/
96•theanonymousone•8h ago•40 comments

Scientists discover guidance system for migratory songbirds

https://news.exeter.ac.uk/faculty-of-environment-science-and-economy/scientists-discover-guidance...
17•bit_economist•4h ago•5 comments

Wordgard: In-browser rich-text editor from the creator of ProseMirror

https://wordgard.net/
276•indy•19h ago•91 comments

Africans Are Turning to Starlink

https://www.economist.com/middle-east-and-africa/2026/07/02/africans-are-turning-to-starlink
130•bookofjoe•6h ago•142 comments

We put a Redis server inside our runtime

https://encore.dev/blog/redis-runtime
28•eandre•2d ago•9 comments