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.

GPT-5.6 Sol Ultra will be in Codex

https://twitter.com/thsottiaux/status/2073933490513752151
172•mfiguiere•4h ago•111 comments

OpenPrinter

https://www.opentools.studio/
611•bouh•8h ago•147 comments

Has_not_been_viewed_much

https://iamwillwang.com/notes/has-not-been-viewed-much/
164•wxw•5h ago•43 comments

Organic Maps

https://organicmaps.app/
876•tosh•15h ago•256 comments

Building relationships with customers through support didn't turn out as hoped

https://www.uncommonapps.nyc/p/castro-podcasts-things-i-got-wrong-support
55•dabluck•3h ago•29 comments

Does code cleanliness affect coding agents? A controlled minimal-pair study

https://arxiv.org/abs/2605.20049
77•softwaredoug•6h ago•37 comments

Show HN: Homegames. An open-source game platform I've been making for 8 years

https://homegames.io
122•homegamesjoseph•8h ago•35 comments

The Age of Personalized Hardware Is Coming

https://geastack.com/blog-the-age-of-personalized-hardware-is-coming
27•arbayi•3d ago•15 comments

Completing a computer science degree on Coursera

https://notesbylex.com/completing-a-computer-science-degree-on-coursera
155•lexandstuff•8h ago•108 comments

It's not about physical vs. digital games, it's about ownership

https://popcar.bearblog.dev/its-about-ownership/
377•popcar2•14h ago•275 comments

Mr. Baby Paint and accidentally discovering a new cellular automata

https://tekstien-marginaalien-keskus.aalto.fi/residenssi/heikki/blog/004-december-2/
144•jfil•3d ago•30 comments

The future of Flipper Zero development

https://blog.flipper.net/future-of-flipper-zero-development/
276•croes•11h ago•113 comments

New AI tutor achieves 0.71-1.30 SD effect size in Dartmouth course [pdf]

https://intextbooks.science.uu.nl/workshop2026/files/itb26_s1s2.pdf
149•jonahbard•10h ago•90 comments

Delta flight hit by firework while landing at Midway Airport on Fourth of July

https://www.nbcchicago.com/news/local/delta-flight-hit-by-firework-while-landing-at-midway-airpor...
104•randycupertino•10h ago•143 comments

Composite Video on the NES: Why's it so wobbly?

https://nicole.express/2026/phase-altering-by-line.html
75•zdw•7h ago•7 comments

Starring the Computer

https://www.starringthecomputer.com/computers.html
189•gitowiec•12h ago•43 comments

Zuckerberg says AI agent development going slower than expected

https://www.reuters.com/business/zuckerberg-says-ai-agent-development-going-slower-than-expected-...
148•cwwc•3d ago•294 comments

Modernizing a 25-year-old minimal C++ unit testing framework (Part 2)

https://freshsources.com/code-capsules/test-part2/
4•chuckallison•3d ago•0 comments

The Private Capture of Public Genius

https://www.wysr.xyz/p/the-private-capture-of-public-genius
66•martialg•5h ago•32 comments

The Sneakerweb

https://sneakerweb.org/
36•GalaxyNova•4h ago•7 comments

Connections in Math: the two kinds of random

https://stillthinking.net/posts/connections-in-math-two-kinds-of-random/
32•pcael•6h ago•24 comments

DNSGlobe – Rust TUI to watch DNS propagate around the world

https://github.com/514-labs/dnsglobe
42•Callicles•7h ago•26 comments

Platonic Hydrocarbons

https://en.wikipedia.org/wiki/Platonic_hydrocarbon
6•chriskw•3d ago•0 comments

Cursed circuits #5: capacitance multiplier

https://lcamtuf.substack.com/p/cursed-circuits-capacitance-multiplier
76•surprisetalk•9h ago•6 comments

An Ordinary Mind on an Ordinary Day

https://www.laphamsquarterly.org/roundtable/ordinary-mind-ordinary-day
10•tintinnabula•3d ago•0 comments

Dungeon Proof Crawler: learn how to write proofs with RPG

https://dhilst.github.io/algae/game/index.html
50•SchwKatze•8h ago•13 comments

Shrimple – A Simpler, Nicer Markdown

https://qount25.dev/Shrimple/
8•usrbinenv•3h ago•13 comments

The Writers Who Wrote the Most in History

https://brennan.day/compulsion-the-writers-who-wrote-the-most-in-history/
25•bookofjoe•4d ago•12 comments

You need a webring

https://shub.club/writings/2026/july/you-need-a-webring/
74•forthwall•10h ago•50 comments

Al Vigier: Canada's AI strategy shouldn't include secret Palantir bills

https://www.readtheline.ca/p/al-vigier-canadas-ai-strategy-shouldnt
128•ClearwayLaw•5h ago•53 comments