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.

The case against geometric algebra (2024)

https://alexkritchevsky.com/2024/02/28/geometric-algebra.html
25•Hbruz0•1h ago•3 comments

Beyond All Reason (Free Total Annihilation Inspired RTS)

https://www.beyondallreason.info
16•mosiuerbarso•1h ago•3 comments

A 3D voxel game engine written in APL

https://github.com/namgyaaal/avoxelgame
75•sph•4h ago•7 comments

Google Hits 50% IPv6

https://blog.apnic.net/2026/04/28/google-hits-50-ipv6/
190•barqawiz•4h ago•188 comments

Loupe – A iOS app that raises awareness about what native apps can see

https://github.com/mysk-research/loupe
356•Cider9986•1d ago•140 comments

Running MicroVMs in Proxmox VE, the Easy Way

https://taoofmac.com/space/blog/2026/06/18/1845
104•zdw•1d ago•9 comments

Zigzag Decoding with AVX-512

https://zeux.io/2026/06/17/zigzag-decoding-avx512/
91•luu•3d ago•17 comments

Windows UI evolution: Clicking an unassociated file

https://movq.de/blog/postings/2026-06-20/0/POSTING-en.html
59•jandeboevrie•6h ago•31 comments

Renting a sewing machine from the library

https://www.bbc.com/future/article/20260618-the-weird-and-wonderful-libraries-of-finland
256•sohkamyung•13h ago•146 comments

Epoll vs. io_uring in Linux

https://sibexi.co/posts/epoll-vs-io_uring/
188•Sibexico•13h ago•46 comments

A tale of two path separators

https://alexwlchan.net/2021/slashes/
23•dbaupp•4d ago•6 comments

Slow breathing modulates brain function and risk behavior

https://www.cell.com/neuron/fulltext/S0896-6273(26)00339-9
238•croes•14h ago•68 comments

Developers don't understand CORS (2019)

https://fosterelli.co/developers-dont-understand-cors
242•toilet•11h ago•168 comments

15-minute at-home Lyme disease tick test

https://www.bostonglobe.com/2026/06/17/business/lyme-disease-tick-test/
139•bookofjoe•3d ago•91 comments

Rare medieval bookmark exceeds expectations at auction

https://www.thehistoryblog.com/archives/76314
13•speckx•4d ago•4 comments

SMPTE Makes Its Standards Freely Accessible

https://www.smpte.org/blog/smpte-makes-its-standards-freely-accessible-openingstandards-library-t...
267•zdw•19h ago•90 comments

Cosmodial Sky Atlas

https://frankforce.com/cosmodial-sky-atlas/
5•surprisetalk•4d ago•2 comments

Proportional-Integral-Derivative Controllers

https://en.wikipedia.org/wiki/PID_controller
42•dhorthy•1d ago•17 comments

DOS Game "F-15 Strike Eagle II" reversing project needs DOS test pilots

https://neuviemeporte.github.io/f15-se2/2026/06/20/needyou.html
262•LowLevelMahn•21h ago•68 comments

UHF X11: X11 Built for VisionOS and Apple Vision Pro

https://www.lispm.net/apps/uhf-x11/
211•zdw•19h ago•45 comments

Unauthorized alert sent to cell phones across Brazil

https://www.cnn.com/2026/06/20/americas/brazil-hackers-unauthorized-alert-latam
146•zdw•16h ago•111 comments

Show HN: TownSquare, a tiny presence layer for websites

https://townsquare.cauenapier.com/
202•cauenapier•1d ago•109 comments

Building reliable agentic AI systems

https://martinfowler.com/articles/reliable-llm-bayer.html
114•sarangk90•8h ago•26 comments

Guide to the TD4 4-bit DIY CPU

https://www.philipzucker.com/td4-4bit-cpu/
45•andrewstuart•2d ago•4 comments

Whole cross-sectional human ultrasound tomography

https://www.nature.com/articles/s41551-026-01660-4
84•lnyan•3d ago•13 comments

100 Greatest Bird Names of All Time

https://birdhistory.substack.com/p/the-100-greatest-bird-names-of-all
5•bookofjoe•52m ago•0 comments

Alice is impatient

https://brooker.co.za/blog/2026/06/19/waiting.html
109•birdculture•16h ago•35 comments

Temporary Cloudflare accounts for AI agents

https://blog.cloudflare.com/temporary-accounts/
223•farhadhf•1d ago•118 comments

Linux eliminates the strncpy API after six years of work, 360 patches

https://www.phoronix.com/news/Linux-7.2-Drops-strncpy
237•simonpure•15h ago•228 comments

Project Fetch: Phase Two

https://www.anthropic.com/research/project-fetch-phase-two
67•stopachka•12h ago•22 comments