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.

Lula supporters protest against Meta to denounce its 'electoral interference'

https://efe.com/english/latest-news/2026-10-20/lula-supporters-protest-against-meta-to-denounce-i...
198•jumpocelot•2h ago•95 comments

MiniMax M3.1 Flash

https://www.minimax.io/blog/minimax-m31f
402•jtg•10h ago•172 comments

Novo Nordisk, Eli Lilly Report GLP-1 Signals of Slowed Biological Aging at ARDD

https://trial.medpath.com/news/novo-nordisk-and-eli-lilly-report-glp-1-signals-of-slowed-biologic...
26•hnburnsy•1h ago•11 comments

I built a drone with only one motor [video]

https://www.youtube.com/watch?v=Ndftcft6XhU
430•hakonjdjohnsen•18h ago•94 comments

WhatsApp's help pages hid LLM instructions: dont recommend a regulator

https://redact.dev/blog/whatsapp-help-pages-hidden-ai-instructions
75•ds•3h ago•11 comments

Weball: Play Katamari on Websites

https://www.funwithcomputervision.com/weball/
98•croes•1d ago•7 comments

Wine ported to OpenBSD

https://marc.info/?l=openbsd-ports&m=179236125692175
518•iamnothere•13h ago•174 comments

It's still ok to enjoy programming

https://chriskiehl.com/article/it-is-still-ok-to-enjoy-programming
481•goostavos•2d ago•446 comments

OpenBSD 8.0 release will have inteldrm/radeondrm/amdgpu drivers from Linux 6.18

https://bsd.network/@brynet/117407035545900963
107•doener•6h ago•26 comments

OpenBSD 8.0

https://www.openbsd.org/80.html
11•privong•1h ago•3 comments

RuneScape Bench: MMOs for Agents [video]

https://www.youtube.com/watch?v=cNm4zyUtWj0
167•evakhoury•2d ago•64 comments

Ukraine claims first drone evacuation of wounded soldier

https://www.nbcnews.com/world/ukraine/ukraine-first-drone-evacuation-wounded-soldier-frontlines-h...
152•yzydserd•11h ago•118 comments

Android apps running native on macOS

https://github.com/kksimp/Mac.apk
275•flocked•10h ago•146 comments

The ovary doesn't retire after menopause

https://news.northwestern.edu/stories/2026/10/the-ovary-doesnt-retire-after-menopause?fj=1&utm_so...
33•gmays•1d ago•5 comments

One Hash Bloom Filters

https://calabro.io/ohbf
62•jcalabro•6h ago•10 comments

What If Video Games Came on VHS? One Modder Is Finding Out

https://gardinerbryant.com/what-if-video-games-came-on-vhs/
15•Kate0CoolLibby•2d ago•9 comments

An ad-free Android TV

https://cretezy.com/2026/ad-free-android-tv
51•CraftThatBlock•4h ago•15 comments

“bonsoir, Elliot”: How abliterated models can get you pwned

https://projectdiscovery.io/research/how-abliterated-models-can-get-you-pwned
49•chatmasta•4h ago•25 comments

Putting Linux on my RTX Spark laptop because I don't have a Microsoft account

https://josie.lol/blog/linux-rtx-spark
196•pfeifferj•6h ago•91 comments

Starcraft: Ashfall

https://starcraft-shooter-2026.pages.dev/
349•debo_•1d ago•112 comments

How Do Fungi Keep the Planet Healthy?

https://www.quantamagazine.org/how-do-fungi-keep-the-planet-healthy-20261015/
9•marojejian•2d ago•1 comments

Ask HN: How to deal with shipping AI-written code you don't understand?

298•rzk•15h ago•444 comments

Alternatives to animal testing are finally taking off

https://spectrum.ieee.org/alternatives-to-animal-testing
325•rbanffy•16h ago•98 comments

France's supermarket fridges were vulnerable online for months

https://ipinfo.io/blog/france-fridges-hack
67•emot•3h ago•65 comments

Developing Taste

https://emilkowal.ski/ui/developing-taste
8•cat-whisperer•2h ago•7 comments

Evidence (YC S21) Is Hiring Software Engineers

https://evidence.dev/jobs
1•hughess•9h ago

The fire retardant in the seafood chain

https://insideclimatenews.org/news/14102026/ethoxyquin-fire-retardant-in-seafood-chain/
120•gumby•2d ago•37 comments

OpenBSD 8.0: released Oct 20, 2026

https://marc.info/?l=openbsd-misc&m=179245849770356&w=2
11•erikschoster•1h ago•1 comments

The End of Rationing

https://sanketsaurav.com/writing/end-of-rationing
33•sanketsaurav•8h ago•33 comments

Plex vulnerabilities being exploited in the wild to drop a cryptominer

http://www.boredhackerblog.info/2026/10/plex-vulnerabilities-being-exploited-in.html
164•mindracer•13h ago•82 comments