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.

Introducing System One Models and Jev

https://typesafe.ai/blog/introducing-system-one-models-and-jev
1029•albelfio•10h ago•318 comments

Apple Reference Image: A New Approach for Verified Photography

https://security.apple.com/blog/apple-reference-image/
103•imwally•3h ago•61 comments

Show HN: An e-ink frame that hears birds and draws them as 1800s illustrations

https://github.com/arnegiacomo/fugleramme
1457•arnemunthekaas•16h ago•190 comments

Negativland, Culture Jamming, and the Art of Making Something New

https://blog.archive.org/2026/09/11/negativland-culture-jamming-and-the-art-of-making-something-new/
52•bananaboy•2h ago•16 comments

Show HN: I made a flight simulator, except you're just a passenger

https://inflightsimulator.com
72•rkotcher•1d ago•27 comments

An update on Wayback Machine access

https://blog.archive.org/2026/09/15/an-update-on-wayback-machine-access/
468•ChrisArchitect•11h ago•246 comments

Gemini 3.8 Live and 3.8 Live Extended Thinking

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-8-live-gemini-3-...
362•leumon•11h ago•231 comments

German Rheinmetall open-sources its Battlesuite connected weapon system protcol

https://rheinmetall.github.io/onboardapi-documentation/9.10.0/index.html
170•summarity•8h ago•49 comments

Recreating Voodoo Graphics and a Late-1990s Gaming PC on an FPGA

https://nand2mario.github.io/posts/2026/zsst-voodoo/
79•zdw•6h ago•13 comments

Building a Linux GPU Driver for the M4 Mac Mini in One Month

https://codyho.dev/blog/gpu-driver/
222•ADevWithAnIdea•9h ago•137 comments

Datamimic – don't let your coding agent invent its own test world

https://github.com/rapiddweller/datamimic
4•ake2l•28m ago•0 comments

Saving Jet Fuel

https://tech.marksblogg.com/scikit-decide-openap-optimal-flight-planning.html
67•marklit•6h ago•28 comments

Jean-Pierre Serre turns 100

https://mathshistory.st-andrews.ac.uk/Biographies/Serre/
118•jzox•8h ago•19 comments

We got admin access to Baseten's production GitHub

https://www.strix.ai/blog/baseten-harbor-github-pat-takeover
255•bearsyankees•11h ago•141 comments

Stay discoverable in search while disallowing AI training

https://blog.cloudflare.com/accountable-mixed-use-ai-crawlers/
44•djfergus•3h ago•28 comments

Chopping up books when they're physically too big

https://attainablefelicity.mattkirkland.com/20260915/cut-up-your-books.html
151•matt_kirkland•10h ago•145 comments

An interactive world map of the stories cultures have told

https://originmap.sunnyguha.com/
16•momentmaker•2d ago•0 comments

Learning to solve hard problems in RL for LLMs by never giving up

https://mnoukhov.github.io/posts/ngu/
66•natolambert•10h ago•0 comments

Show HN: Capsule – Single-file web apps that save their data into SQLite

https://withcapsule.app/
312•bashtian•15h ago•123 comments

A single firm is behind OpenAI, Anthropic, and Meta hacking scandals

https://www.effort.news/irregular
553•yusufozkan•1d ago•191 comments

Let's make quality the norm again

https://www.forbrukerradet.no/short-life/
352•ingve•19h ago•368 comments

WangNet – 1.8 MB, zero-dependency Numberwang adjudication in 11 languages

https://github.com/GraafHenk/numberwang
127•Liogra123•9h ago•47 comments

Doing Everyone Else's Job

https://yosefk.com/blog/doing-everyone-elses-job.html
7•luu•1d ago•4 comments

Suspected sabotage causes major Netherlands rail disruption

https://www.bbc.com/news/articles/c8ly49w9g1edo
460•choult•19h ago•404 comments

Sierra digital cameras on the Apple II

https://www.colino.net/wordpress/archives/2026/09/11/sierra-digital-cameras-on-the-apple-ii/
31•ibobev•2d ago•5 comments

Most people prefer traditional architecture

https://www.worksinprogress.news/p/do-people-prefer-traditional-architecture
293•alihm•1d ago•255 comments

Show HN: Hacking a $20 4G wireless hotspot into a texting device

https://bkovac.github.io/modem-thing/
185•bobili1234•16h ago•33 comments

The CSS Zen Garden dream, finally shipped

https://josprague.com/blog/the-css-zen-garden-dream-finally-shipped/
134•yosito•14h ago•75 comments

The Inference Hardware Revolution of 2026

https://spectrum.ieee.org/inference-hardware-revolution
129•vinhnx•15h ago•13 comments

Jiga (YC W21) Is Hiring Product Engineer (Remote/US)

https://jiga.io/about-us/?ashby_jid=0b75d72d-c92b-4dca-8062-09d298ada0bd
1•grmmph•12h ago