frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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•11mo ago

Comments

yxhuvud•11mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•11mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•11mo 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•11mo 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•11mo 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•11mo 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.

Amateur armed with ChatGPT solves an Erdős problem

https://www.scientificamerican.com/article/amateur-armed-with-chatgpt-vibe-maths-a-60-year-old-pr...
170•pr337h4m•10h ago•104 comments

Why has there been so little progress on Alzheimer's disease?

https://freakonomics.com/podcast/why-has-there-been-so-little-progress-on-alzheimers-disease/
134•chiefalchemist•4h ago•63 comments

EU Age Control: The trojan horse for digital IDs

https://juraj.bednar.io/en/blog-en/2026/04/17/eu-age-control-the-trojan-horse-for-digital-ids/
18•gasull•52m ago•0 comments

USB Cheat Sheet (2022)

https://fabiensanglard.net/usbcheat/index.html
210•gwerbret•6h ago•49 comments

Mahjong: A Visual Guide

https://themahjong.guide/
13•iamwil•2d ago•2 comments

Flickr: The first and last great photo platform

https://petapixel.com/2026/04/22/flickr-the-first-and-last-great-photo-platform/
88•Nrbelex•3d ago•46 comments

OpenAI Privacy Filter

https://openai.com/index/introducing-openai-privacy-filter/
147•tanelpoder•3d ago•25 comments

The Free Universal Construction Kit

https://fffff.at/free-universal-construction-kit/
293•robinhouston•3d ago•58 comments

1-Bit Hokusai's "The Great Wave" (2023)

https://www.hypertalking.com/2023/05/08/1-bit-pixel-art-of-hokusais-the-great-wave-off-kanagawa/
537•stephen-hill•3d ago•88 comments

Using coding assistance tools to revive projects you never were going to finish

https://blog.matthewbrunelle.com/its-ok-to-use-coding-assistance-tools-to-revive-the-projects-you...
228•speckx•12h ago•122 comments

The Joy of Folding Bikes

https://blog.korny.info/2026/04/19/the-joy-of-folding-bikes
119•pavel_lishin•3d ago•70 comments

Reviving BrowserID in 2026

https://wakamoleguy.com/p/reviving-browserid-in-2026
8•wakamoleguy•1h ago•1 comments

America's Geothermal Breakthrough

https://oilprice.com/Alternative-Energy/Geothermal-Energy/Americas-Geothermal-Breakthrough-Could-...
92•sleepyguy•8h ago•102 comments

Math Is Hard – OpenBSD Stories

http://miod.online.fr/software/openbsd/stories/vaxfp.html
66•signa11•2d ago•1 comments

The Long Reply

https://ironicsans.ghost.io/the-long-reply/
23•NaOH•2d ago•0 comments

Optimizing Datalog for the GPU

https://dl.acm.org/doi/10.1145/3669940.3707274
32•tosh•2d ago•3 comments

New 10 GbE USB adapters are cooler, smaller, cheaper

https://www.jeffgeerling.com/blog/2026/new-10-gbe-usb-adapters-cooler-smaller-cheaper/
560•calcifer•22h ago•334 comments

The George Business, by Roger Zelazny (1980)

https://www.eternal-flame.org/library/oldlibrary/georgebusiness.html
16•xeonmc•2d ago•0 comments

DeepSeek-V4 on Day 0: From Fast Inference to Verified RL with SGLang and Miles

https://www.lmsys.org/blog/2026-04-25-deepseek-v4/
18•mji•4h ago•0 comments

Simulacrum of Knowledge Work

https://blog.happyfellow.dev/simulacrum-of-knowledge-work/
117•thehappyfellow•11h ago•43 comments

The Super Nintendo Cartridges

https://fabiensanglard.net/snes_carts/
15•offbyone42•3h ago•1 comments

Does Internet Advertising Work?

https://freakonomics.com/podcast/does-advertising-actually-work-part-2-digital-ep-441/
11•hackthemack•2h ago•13 comments

What async promised and what it delivered

https://causality.blog/essays/what-async-promised/
180•zdw•3d ago•203 comments

Mine, an IDE for Coalton and Common Lisp

https://coalton-lang.github.io/mine/
81•varjag•10h ago•33 comments

Tell HN: An app is silently installing itself on my iPhone every day

54•_-x-_•3h ago•35 comments

Desmond Morris has died

https://www.bbc.com/news/articles/c51y797v200o
114•martey•5d ago•20 comments

How Hard Is It to Open a File?

https://blog.sebastianwick.net/posts/how-hard-is-it-to-open-a-file/
68•ffin•2d ago•11 comments

Martin Galway's music source files from 1980's Commodore 64 games

https://github.com/MartinGalway/C64_music
169•ingve•17h ago•26 comments

Discret 11, the French TV encryption of the 80s

https://fabiensanglard.net/discret11/
158•adunk•17h ago•29 comments

GPT‑5.5 Bio Bug Bounty

https://openai.com/index/gpt-5-5-bio-bug-bounty/
140•Murfalo•14h ago•99 comments