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.

Show HN: FablePool – pool money behind a prompt, and Fable builds it in public

https://fablepool.com
211•matthewbarras•3h ago•121 comments

Show HN: Homebrew 6.0.0

https://brew.sh/2026/06/11/homebrew-6.0.0/
941•mikemcquaid•11h ago•221 comments

If you are asking for human attention, demonstrate human effort

https://tombedor.dev/human-attention-and-human-effort/
192•jjfoooo4•1h ago•43 comments

MiMo Code is now released and open-source

https://mimo.xiaomi.com/mimocode
414•apeters•10h ago•233 comments

A jacket that harvests drinking water from the air

https://news.utexas.edu/2026/06/11/this-jacket-pulls-drinking-water-from-thin-air/
24•ilreb•1h ago•6 comments

A greyscale iPhone setup that works in everyday life

https://www.fabianhemmert.com/opinions/a-greyscale-iphone-setup-that-works-in-everyday-life
11•hemmert•17h ago•4 comments

Anthropic apologizes for invisible Claude Fable guardrails

https://www.theverge.com/ai-artificial-intelligence/948280/anthropic-claude-fable-invisible-disti...
287•rarisma•12h ago•290 comments

Petition to Withdraw Canada's Bill C-22

https://www.ourcommons.ca/petitions/en/Petition/Sign/e-7416
342•hmokiguess•9h ago•117 comments

Making a vintage LLM from scratch

https://crlf.link/log/entries/260525-1/
11•croqaz•16h ago•1 comments

Emacs appearances in pop culture

https://ianyepan.github.io/posts/emacs-in-pop-culture/
246•ggcr•1d ago•64 comments

Software is made between commits

https://zed.dev/blog/introducing-deltadb
190•jeremy_k•8h ago•139 comments

Ear Training Practice

https://tonedear.com/
140•mattbit•3d ago•72 comments

The RCE that AMD wouldn't fix

https://mrbruh.com/amd2/
219•MrBruh•8h ago•97 comments

macOS 27 Beta breaks the ability to boot Asahi Linux

https://www.phoronix.com/news/macOS-27-Beta-Breaks-Asahi
227•josephcsible•2d ago•100 comments

Show HN: Boo – Screen-style terminal multiplexer built on libghostty

https://github.com/coder/boo
39•kylecarbs•3h ago•14 comments

Lines of code got a better publicist

https://curlewis.co.nz/posts/lines-of-code-got-a-better-publicist/
349•RyeCombinator•12h ago•246 comments

Claude Fable 5: mid-tier results on coding tasks

https://www.endorlabs.com/learn/claude-fable-5-mythos-grade-hype
213•bugvader•8h ago•90 comments

Developer gets Half-Life running at 30 FPS on a Nokia N95

https://www.tomshardware.com/video-games/handheld-gaming/developer-gets-half-life-running-at-30-f...
209•ljf•3d ago•65 comments

Travel locally, where you are

https://www.ssp.sh/brain/travel-where-you-are/
83•zazuke•4h ago•45 comments

Waymo Premier

https://waymo.com/blog/2026/06/waymo-premier/
146•boulos•8h ago•386 comments

MTG Bench: Testing how well LLMs can play Magic

https://mtgautodeck.com/articles/mtg-bench/
17•CallumFerg•8h ago•7 comments

Reading for pleasure is sharply down among schoolkids, report shows

https://www.nbcnews.com/data-graphics/kids-reading-less-lower-levels-department-education-study-r...
62•freejoe76•1d ago•68 comments

FPS.cob: A first person shooter in COBOL

https://github.com/icitry/FPS.cob
100•MBCook•9h ago•58 comments

Shall we play a game? My AI nuclear simulation

https://www.kennethpayne.uk/p/shall-we-play-a-game
180•nick238•4h ago•171 comments

Apple didn't revolutionize power supplies; new transistors did (2012)

https://www.righto.com/2012/02/apple-didnt-revolutionize-power.html
72•geerlingguy•7h ago•7 comments

How a new DSL may survive in the era of LLMs

https://www.williamcotton.com/articles/how-a-new-dsl-survives-in-the-era-of-llms
7•williamcotton•10h ago•0 comments

Did Ahmes find the best expansions for 2/n?

https://blog.plover.com/2026/03/17/#egyptian-fractions-2
6•surprisetalk•3d ago•0 comments

Open Reproduction of DeepSeek-R1

https://github.com/huggingface/open-r1
191•yogthos•11h ago•17 comments

Tailwind and slop apps

https://briandouglas.ie/llm-tailwind-template/
12•coneonthefloor•3h ago•2 comments

Who Runs the Ransomware Group 'The Gentlemen?'

https://krebsonsecurity.com/2026/06/who-runs-the-ransomware-group-the-gentlemen/
58•Bender•5h ago•5 comments