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 End of Programming

https://pauldix.com/the-end-of-programming
28•kosyooo•33m ago•18 comments

Stalking the Wily Hacker: 40 years later – Cliff Stoll [video]

https://www.youtube.com/watch?v=656058JxTM0
93•zoenolan•4d ago•26 comments

Apple introduces M6 and M5 Ultra

https://www.apple.com/newsroom/2026/08/apple-introduces-m6-and-m5-ultra-for-a-big-leap-in-perform...
1131•interpol_p•20h ago•1092 comments

FDA authorizes first wearable device that monitors ketone and blood sugar levels

https://www.fda.gov/news-events/press-announcements/fda-authorizes-first-wearable-device-continuo...
389•sunnynagra•14h ago•189 comments

Queryable Executables

https://fzakaria.com/2026/08/24/actually-queryable-executables
174•rguiscard•8h ago•42 comments

Harvest (IBM 7950): Supercomputer for cryptanalysis at the NSA in the Cold War

https://spectrum.ieee.org/cold-war-codebreaker-nsa-ibm
34•jnord•4h ago•10 comments

OpenAI Jalapeño: Better than Nvidia Blackwell

https://newsletter.semianalysis.com/p/openai-jalapeno-better-than-nvidia
476•bmulholland•19h ago•304 comments

New Mac Studio with M5 Max and M5 Ultra

https://www.apple.com/newsroom/2026/08/apple-introduces-new-mac-studio-with-m5-max-and-m5-ultra/
768•interpol_p•20h ago•507 comments

Show HN: Buslens – where can I get to by bus? (UK)

https://rupertlinacre.com/buslens/
5•RobinL•1h ago•1 comments

Black hole singularity is a surface not a point

https://arxiv.org/abs/2608.21590
243•raattgift•16h ago•176 comments

Maiao: Gerrit-style code review workflow for GitHub, GitLab, Gitea, others

https://github.com/runetes/maiao
78•zdw•10h ago•44 comments

New Mac mini, featuring M6 and M5 Pro

https://www.apple.com/newsroom/2026/08/apple-unveils-a-more-powerful-mac-mini-featuring-the-all-n...
493•runako•19h ago•304 comments

When str.lower() is a security vulnerability in Python

https://sethmlarson.dev/when-str-lower-is-a-security-vulnerability
119•rbanffy•12h ago•49 comments

Agentic Context Management: Memory and Cost as Architecture Problems

https://arxiv.org/abs/2607.21503
51•gdad•6h ago•17 comments

Nitter and XCancel receive cease and desist notices

https://github.com/zedeus/nitter/issues/1442
916•Banditoz•16h ago•755 comments

C2PA Cameras Do Not Survive Contact with Reality

https://www.da.vidbuchanan.co.uk/blog/android-c2pa.html
148•Retr0id•13h ago•89 comments

More than half of adults in U.S. say they lack basic statistical understanding

https://www.psu.edu/news/research/story/more-half-adults-us-say-they-lack-basic-statistical-under...
84•giuliomagnifico•3h ago•121 comments

Disrupting a new covert influence campaign from Russia

https://openai.com/index/disrupting-malicious-uses-of-ai-influence-campaign-russia/
37•sam_lowry_•1h ago•17 comments

Building a backyard office, the build and cost breakdown

https://www.imkylelambert.com/articles/building-a-backyard-office-the-build-and-cost-breakdown
342•surprisetalk•18h ago•212 comments

Tooltips need a delay, and then they need to skip it

https://blog.master.dev/tooltips-need-a-delay-and-then-they-need-to-skip-it/
173•ibobev•16h ago•45 comments

Bomb fishing is wreaking havoc on Indonesia's coral reefs

https://e360.yale.edu/digest/bomb-fishing-coral-reefs
317•speckx•18h ago•166 comments

Run OpenBSD on DigitalOcean for $4/month

https://nil.wallyjones.com/run-openbsd-on-digitalocean-for-4month/
163•speckx•15h ago•73 comments

Don't Wordle

https://dontwordle.com/
348•Hbruz0•21h ago•121 comments

Show HN: I made a Raspberry with Qwen my local car AI

https://github.com/ThinkOffApp/CarWatch
137•petruspennanen•17h ago•39 comments

Show HN: LatticeDB – Like SQLite but for graph databases

https://github.com/jeffhajewski/latticedb
152•smiths1999•16h ago•39 comments

How credit card rewards became a $9.2B wealth transfer

https://www.library.hbs.edu/working-knowledge/how-credit-card-rewards-became-multibillion-dollar-...
173•conbrian•21h ago•319 comments

Dolly Parton has died

https://www.theguardian.com/music/2026/aug/25/dolly-parton-country-singer-dead
1456•helsinkiandrew•15h ago•222 comments

My Friend Aaron

https://rorz.io/writing/my-friend-aaron
557•sarreph•16h ago•152 comments

Show HN: TeXbrain, a LaTeX editor that runs pdfTeX in the browser via WASM

https://github.com/swimmingbrain/texbrain
92•swimmingbrain•11h ago•21 comments

Clara (YC P26) is hiring a growth engineer to bring AI doctors to market

https://www.ycombinator.com/companies/clara-2/jobs/8snci6k-founding-full-stack-growth-engineer
1•gfavvas•15h ago