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.

EU Open Sources Ten-Year Network Development Planning Tools

https://github.com/open-energy-transition/open-tyndp
22•lyoncy•36m ago•3 comments

A way to exclude sensitive files issue still open for OpenAI Codex

https://github.com/openai/codex/issues/2847
66•pikseladam•2h ago•49 comments

The curious case of the disappearing Polish S

https://aresluna.org/the-curious-case-of-the-disappearing-polish-s/
41•colinprince•1h ago•13 comments

Greece Is Richer. So Why Do So Many Greeks Still Feel Poor?

https://www.dnews.gr/eidhseis/news-in-english/596650/greece-is-richer-so-why-do-so-many-greeks-st...
22•theanonymousone•1h ago•38 comments

Marfa Public Radio Puts You to Sleep

https://www.marfapublicradio.org/podcast/marfa-public-radio-puts-you-to-sleep
319•reaperducer•12h ago•88 comments

DLL that was not present in memory despite not being formally unloaded

https://devblogs.microsoft.com/oldnewthing/20260625-00/?p=112467
62•ibobev•4h ago•24 comments

The MUMPS 76 Primer – anniversary edition

https://github.com/rochus-keller/MUMPS/blob/main/docs/MUMPS_Primer.adoc
15•Rochus•2h ago•6 comments

Google limits Meta's use of its Gemini AI models

https://www.cnbc.com/2026/06/28/google-limits-metas-use-of-its-gemini-ai-models-ft-reports.html
25•root-parent•1h ago•8 comments

Ask HN: Is there a bad employers (who have a records of not paying) list?

5•trowa159•20m ago•3 comments

Bringing Swift to the Apple ][

https://yeokhengmeng.com/2026/06/swift-on-apple-ii/
21•LucidLynx•3d ago•1 comments

Austria Lobbies EU to Host Anthropic After US Access Curbs

https://www.bloomberg.com/news/articles/2026-06-28/austria-lobbies-eu-to-host-anthropic-after-us-...
29•root-parent•1h ago•17 comments

Bashblog – a single bash script to create blogs

https://github.com/cfenollosa/bashblog
77•ludicrousdispla•9h ago•56 comments

The origins of the school system aimed to produce independent, critical thinkers

https://www.cbc.ca/radio/ideas/humboldt-education-system-bildung-1.7172093
29•pseudolus•1h ago•12 comments

AMD Strix Halo RDMA Cluster Setup Guide

https://github.com/kyuz0/amd-strix-halo-vllm-toolboxes/blob/main/rdma_cluster/setup_guide.md
189•jakogut•13h ago•59 comments

Anonymous GitHub account mass-dropping undisclosed 0-days

https://github.com/bikini/exploitarium
882•binyu•1d ago•345 comments

Wayfinder Router: deterministic routing of queries between local and hosted LLM

https://github.com/itsthelore/wayfinder-router
89•handfuloflight•10h ago•44 comments

Choosing a Public DNS Resolver

https://evilbit.de/dns-resolver-guide.html
220•pawal•16h ago•95 comments

Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

https://decomp-academy.dev
159•jackpriceburns•13h ago•64 comments

Flock cameras track more than your license plate, and they're spreading fast

https://www.engadget.com/2203000/flock-cameras-recording-license-plate/
5•SanjayMehta•6m ago•0 comments

A stray "j" ruined my evening

https://napkins.mtmn.name/posts/stray-jay.html
35•birdculture•4d ago•21 comments

Mobile Web Computing Before Smartphones. (University of Liverpool, ~2010) [pdf]

https://cgi.csc.liv.ac.uk/~trp/Teaching_Resources/COMP327/327-Lecture4-MobileWeb.pdf
6•rfmoz•3d ago•1 comments

Engineering for Bounded Cognition

https://shapeofthesystem.com/posts/2026/02/03/bounded-cognition
81•supermatt•2d ago•18 comments

Regular expressions that work “everywhere”

https://www.johndcook.com/blog/2026/06/23/regex-everywhere/
79•ColinWright•3d ago•30 comments

WAL-RUS: a Rust Rewrite of WAL-G for PostgreSQL Backups

https://clickhouse.com/blog/walrus-postgres-backups-in-rust
105•saisrirampur•15h ago•12 comments

Space Shuttle Endeavour's 20-story vertical display

https://californiasciencecenter.org/about-us/samuel-oschin-air-and-space-center/go-for-stack
81•uticus•2d ago•13 comments

Turn your site into a place people can bump into each other

https://cauenapier.com/blog/townsquare_release/
271•eustoria•21h ago•120 comments

More evidence of life on Mars but still no life (2025)

https://www.cbc.ca/radio/quirks/more-evidence-of-life-on-mars-but-still-no-life-1.7649645
24•pseudolus•2h ago•33 comments

From Hallmark to neon signs: A look at Jim Parkinson's career in letter art

https://typographica.org/on-typography/jim-parkinson-1941-2025/
22•whiteblossom•1d ago•1 comments

AI learns the “dark art” of RFIC design

https://spectrum.ieee.org/ai-radio-chip-design
252•Brajeshwar•4d ago•162 comments

Turning music into a chore is how I became a musician (2022)

https://the.scapegoat.dev/turning-music-into-a-chore-is-what-made-me-an-artist/
65•herbertl•13h ago•24 comments