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.

Whistle: Speech to Text in 16.9 MB

https://cactuscompute.com/blog/whistle
132•gmays•1h ago•35 comments

Trump administration is suspending Microsoft from a green card program

https://apnews.com/article/h1b-visa-program-vance-microsoft-e7b3a407f822702b269ee277d21343ea
505•alephnerd•3h ago•821 comments

Step 5 Preview, a 1M-context MoE from StepFun, shows up on OpenRouter

https://openrouter.ai/stepfun/step-5-preview
34•AnneWodell•2h ago•11 comments

Beauty in DVD Menus

https://vale.rocks/posts/dvd-menus
186•speckx•5h ago•117 comments

Archaeologists Are Reconstructing the 'Invisible' Technologies of the Stone Age

https://www.smithsonianmag.com/science-nature/archaeologists-are-reconstructing-the-invisible-tec...
59•Hooke•21h ago•20 comments

“Math 2.0” will need to value mathematical progress more holistically

https://mathstodon.xyz/@tao/117395269325940185
560•ent101•13h ago•574 comments

4-hour battery storage is cheaper to install than gas turbines all across globe

https://www.solarpowerworldonline.com/2026/10/4-hour-battery-storage-is-cheaper-to-install-than-g...
143•01-_-•2h ago•61 comments

The Slow Formation of Durable Software

https://newsletter.dancohen.org/archive/the-slow-formation-of-durable-software/
206•benbreen•2d ago•69 comments

Tell HN: I've been paying for a rural Tanzanian's education for 10 years

535•lukehandcool•3h ago•138 comments

OpenAI annualised revenues $20B less than previously signalled

https://www.ft.com/content/b66a9858-f8fb-46cb-b506-44bfe26fca2a
99•mfiguiere•1h ago•41 comments

I gave Opus 5.5 one prompt and six hours to visualize Invisible Cities

https://quesma.com/blog/invisible-cities-one-shot/
271•stared•6h ago•144 comments

Sub-1-Bit LLM Compression via Latent Factorization

https://github.com/SamsungLabs/LittleBit
61•brainless•4h ago•8 comments

The Deeply Impersonal Personalized Recruiter Mail

https://blog.pentlander.com/the-deeply-impersonal-personalized-recruiter-mail/
15•speckx•1h ago•6 comments

Claude Haiku 5.5

https://www.anthropic.com/claude-haiku-5-5
1019•sfkgtbor•1d ago•476 comments

Telnet BBS Guide

https://www.telnetbbsguide.com/
87•kmstout•6h ago•28 comments

15-year search for a band that charted once and vanished

https://shahidhussain.com/writing/search-for-salvage/
318•shahidhussain•3d ago•115 comments

OpenAI withdraws three mathematical results

https://twitter.com/danintheory/status/2108065033070789090
171•sashank_1509•11h ago•472 comments

Time Travel in Braid (2015)

https://qntm.org/braid
87•Ariarule•3d ago•35 comments

Living off-grid: Hundred Rabbits

https://100r.ca/site/home.html
345•Muhammad523•2d ago•152 comments

Show HN: AI SRE Arena, an Open Benchmark for AI SRE Agents on Kubernetes

https://github.com/edgedelta/project-arena
5•emrahsamdan•1h ago•2 comments

Float and integer arithmetic follow two different paradigms

https://blog.pkh.me/p/49-float-and-integer-arithmetic-follow-two-different-paradigms.html
50•ibobev•3d ago•10 comments

2027 Web Platform Feature Ranking

https://interop-rank.fxdx.dev/
44•jaffathecake•4h ago•13 comments

'Jonathan' is the oldest land animal on Earth

https://www.404media.co/oldest-living-land-animal-jonathan-the-tortoise/
255•gumby•22h ago•141 comments

Cleo (Mathematician)

https://en.wikipedia.org/wiki/Cleo_(mathematician)
241•djoldman•1d ago•52 comments

The Mathocalypse

https://scottaaronson.blog/?p=10169
354•6bitquant•22h ago•370 comments

Teams in Vienna and Beijing have built the first thorium nuclear clocks

https://www.nytimes.com/2026/10/07/science/first-nuclear-clocks-thorium-229.html
169•gumby•1d ago•49 comments

Show HN: Bigwords.page – Turn any screen into a sign. The URL is the app

https://bigwords.page/
657•SpeakingOfBrad•1d ago•154 comments

Sharing AI progress in mathematics

https://openai.com/index/sharing-ai-progress-in-mathematics/
1314•OfficialTurkey•1d ago•1486 comments

VECOS – A windows-like operating system for the Vectrex for the UVMC2 [video]

https://www.youtube.com/watch?v=9ranfp_vz30
49•CharlesW•1d ago•11 comments

Docker Agent

https://github.com/docker/docker-agent
290•saikatsg•1d ago•132 comments