frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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•11mo ago

Comments

yxhuvud•11mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•11mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•11mo 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•11mo 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•11mo 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•11mo 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.

Small models also found the vulnerabilities that Mythos found

https://aisle.com/blog/ai-cybersecurity-after-mythos-the-jagged-frontier
1016•dominicq•14h ago•275 comments

The End of Eleventy

https://brennan.day/the-end-of-eleventy/
136•ValentineC•5h ago•82 comments

I run multiple $10K MRR companies on a $20/month tech stack

https://stevehanov.ca/blog/how-i-run-multiple-10k-mrr-companies-on-a-20month-tech-stack
28•tradertef•1h ago•6 comments

Tofolli gates are all you need

https://www.johndcook.com/blog/2026/04/06/tofolli-gates/
25•ibobev•4d ago•0 comments

US appeals court declares 158-year-old home distilling ban unconstitutional

https://www.theguardian.com/law/2026/apr/11/appeals-court-ruling-home-distilling-ban-unconstituti...
97•Jimmc414•2h ago•59 comments

How We Broke Top AI Agent Benchmarks: And What Comes Next

https://rdi.berkeley.edu/blog/trustworthy-benchmarks-cont/
347•Anon84•12h ago•88 comments

How Complex is my Code?

https://philodev.one/posts/2026-04-code-complexity/
99•speckx•4d ago•18 comments

447 TB/cm² at zero retention energy – atomic-scale memory on fluorographane

https://zenodo.org/records/19513269
201•iliatoli•11h ago•99 comments

Dark Castle

https://darkcastle.co.uk/
176•evo_9•11h ago•23 comments

Pijul a FOSS distributed version control system

https://pijul.org/
132•kouosi•4d ago•22 comments

Simplest Hash Functions

https://purplesyringa.moe/blog/simplest-hash-functions/
30•ibobev•4d ago•21 comments

Apple Silicon and Virtual Machines: Beating the 2 VM Limit (2023)

https://khronokernel.com/macos/2023/08/08/AS-VM.html
189•krackers•10h ago•129 comments

How a dancer with ALS used brainwaves to perform live

https://www.electronicspecifier.com/products/sensors/how-a-dancer-with-als-used-brainwaves-to-per...
34•1659447091•5h ago•4 comments

Advanced Mac Substitute is an API-level reimplementation of 1980s-era Mac OS

https://www.v68k.org/advanced-mac-substitute/
232•zdw•16h ago•61 comments

Cirrus Labs to join OpenAI

https://cirruslabs.org/
261•seekdeep•18h ago•126 comments

Surelock: Deadlock-Free Mutexes for Rust

https://notes.brooklynzelenka.com/Blog/Surelock
204•codetheweb•3d ago•66 comments

Show HN: Pardonned.com – A searchable database of US Pardons

420•vidluther•1d ago•231 comments

How to build a `Git diff` driver

https://www.jvt.me/posts/2026/04/11/how-git-diff-driver/
107•zdw•13h ago•12 comments

Software Preservation Group: C++ History Collection

https://softwarepreservation.computerhistory.org/c_plus_plus/
19•quuxplusone•6h ago•2 comments

Why meaningful days look like nothing while you are living them

https://pilgrima.ge/p/the-grand-line
26•momentmaker•4h ago•13 comments

The Soul of an Old Machine

https://skalski.dev/the-soul-of-an-old-machine/
50•mskalski•4d ago•10 comments

Who was "Not Even Wrong" first? [2023]

https://www.math.columbia.edu/~woit/wordpress/?p=13455
5•bookofjoe•4d ago•2 comments

High-Level Rust: Getting 80% of the Benefits with 20% of the Pain

https://hamy.xyz/blog/2026-01_high-level-rust
26•maxloh•8h ago•12 comments

What is a property?

https://alperenkeles.com/posts/what-is-a-property/
70•alpaylan•4d ago•19 comments

Optimal Strategy for Connect 4

https://2swap.github.io/WeakC4/explanation/
286•marvinborner•3d ago•31 comments

Every plane you see in the sky – you can now follow it from the cockpit in 3D

https://flight-viz.com/cockpit.html?lat=40.64&lon=-73.78&alt=3000&hdg=220&spd=130&cs=DAL123
319•coolwulf•3d ago•59 comments

Building a Z-Machine in the worst possible language – Whitebeard's Realm

https://whitebeard.blog/posts/building-a-z-machine-in-elm/
22•techbelly•4h ago•2 comments

The Problem That Built an Industry

https://ajitem.com/blog/iron-core-part-1-the-problem-that-built-an-industry/
123•ShaggyHotDog•17h ago•44 comments

The APL programming language source code (2012)

https://computerhistory.org/blog/the-apl-programming-language-source-code/
66•tosh•14h ago•22 comments

Keeping a Postgres Queue Healthy

https://planetscale.com/blog/keeping-a-postgres-queue-healthy
94•tanelpoder•15h ago•25 comments