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.

Claude Opus 5

https://www.anthropic.com/news/claude-opus-5
1320•alvis•9h ago•711 comments

Postgres LISTEN/NOTIFY actually scales

https://www.dbos.dev/blog/postgres-listen-notify-scalability
206•KraftyOne•7h ago•37 comments

Opus 5 is currently #1 on Artificial Analysis Intelligence Leaderboard

https://artificialanalysis.ai/models
146•aarondong•6h ago•87 comments

Sperm Whales blow bubbles to achieve restful, vertical sleep

https://news.st-andrews.ac.uk/archive/sperm-whales-blow-bubbles-to-achieve-restful-vertical-sleep/
31•hhs•2h ago•1 comments

Show HN: I simulated closing the Strait of Hormuz on real oil trade data

https://globaloilnetwork.staffinganalytics.io/
103•eliotho•1d ago•44 comments

My security camera shipped a GitHub admin token in its login page

https://hhh.hn/hanwha-github-token/
512•hhh•14h ago•178 comments

India's first privately-developed rocket reaches orbit on debut launch

https://arstechnica.com/space/2026/07/indias-first-privately-developed-rocket-reaches-orbit-on-dr...
496•sohkamyung•4d ago•144 comments

Designing an Ethernet Switch ASIC

https://essenceia.github.io/projects/ethernet_switch_asic/
111•random__duck•4d ago•34 comments

If coding has been solved, why does software keep getting worse?

https://ptrchm.com/posts/nothing-works-and-everyone-is-euphoric/
540•pchm•17h ago•420 comments

An old patent inspired the new "Y-zipper", a three-sided fastener

https://news.mit.edu/2026/three-sided-y-zipper-design-0504
134•crescit_eundo•2d ago•30 comments

Nvidia, Microsoft, Meta warn against overregulating open-weight models

https://www.cnbc.com/2026/07/24/nvidia-microsoft-meta-open-weight-ai-models.html
505•louiereederson•12h ago•231 comments

Fil-C: Garbage In, Memory Safety Out [video]

https://www.youtube.com/watch?v=5F-2Y1LPRek
107•Bootvis•1d ago•99 comments

Kimi K3 exploited the latest Redis server

https://twitter.com/fried_rice/status/2080059356322918777
141•Alifatisk•1d ago•40 comments

Half-Life 2 running natively on HaikuOS

https://discuss.haiku-os.org/t/haiku-nvidia-porting-nvidia-driver-for-turing-gpus/16520?page=18
273•m0do1•13h ago•52 comments

Firefox Containers Preview

https://blog.mozilla.org/en/firefox/firefox-containers-preview/
227•twapi•3d ago•80 comments

Don't Take the Black Pill [video]

https://www.youtube.com/watch?v=zLZwpH5lCD4
127•signa11•9h ago•89 comments

Marimo now runs in PyCharm

https://marimo.io/blog/pycharm
78•cantdutchthis•2d ago•16 comments

IRGC claims it destroyed Amazon's Bahrain data center

https://houseofsaud.com/irgc-claims-destroyed-amazon-bahrain-data-center/
245•thisislife2•16h ago•309 comments

Gsxui – Shadcn-style components for Go

https://ui.gsxhq.dev/
56•jackielii•8h ago•8 comments

Future euro banknote design proposals

https://www.ecb.europa.eu/euro/banknotes/future_banknotes/html/all-design-proposals.en.html
129•robin_reala•16h ago•122 comments

Be skeptical of OpenAI's rogue hacker agent story

https://www.theguardian.com/technology/2026/jul/24/openai-rogue-hacker
428•rwmj•9h ago•232 comments

The case for MUDs in modern times (2018)

https://www.andrewzigler.com/feed/the-case-for-muds-in-modern-times
81•bw86•14h ago•69 comments

The road to epsilon-zero: Nim always ends, even with infinite ordinals

https://blog.plover.com/math/ordinals/02-wellfoundedness.html
11•pavel_lishin•4d ago•2 comments

Unitree As2-W

https://www.unitree.com/As2-W/
96•MehrdadKhnzd•9h ago•40 comments

Government orders GitHub to remove Bluetooth-based chat app Bitchat: Jack Dorsey

https://www.thehindu.com/news/national/government-orders-github-to-remove-bluetooth-based-chat-ap...
379•rootkea•11h ago•278 comments

Show HN: Lucen a Python compiler that parallelizes for-loops via comment pragmas

https://github.com/fcmv/lucen
4•soumik15630m•3d ago•0 comments

The footprints of every building in NYC

https://www.beautifulpublicdata.com/the-footprints-of-every-building-in-nyc/
49•jonathanmkeegan•4d ago•5 comments

Show HN: Max Studio Tools – C++ DSP Modules for Max and Ableton Live

https://github.com/apresta/max-studio-tools
20•apresta•5h ago•0 comments

Programming language file extensions that match ISO 3166-1 alpha-2 country codes

https://www.bruh.ltd/blog/programming-language-file-extensions-that-match-an-iso-3166-1-alpha-2-c...
39•speckx•13h ago•21 comments

Buz – A fork of Bun using modern Zig, with sub-1s incremental builds

https://ziggit.dev/t/buz-a-drop-in-replacement-for-bun-using-modern-zig-with-sub-1s-incremental-b...
226•kristoff_it•16h ago•162 comments