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.

CSSQuake

https://cssquake.com/
111•msalsas•2h ago•20 comments

I Stored a Website in a Favicon

https://www.timwehrle.de/blog/i-stored-a-website-in-a-favicon/
192•theanonymousone•7h ago•75 comments

Where to Find the Colors Your Screen Can't Show You

https://moultano.wordpress.com/2026/06/19/where-to-find-the-colors-your-screen-cant-show-you/
225•moultano•9h ago•53 comments

16-year-old SATA II SSD survives 1 petabyte of writes, 25x the drive's rating

https://www.tomshardware.com/pc-components/ssds/16-year-old-sata-ii-ssd-survives-1-petabyte-of-wr...
40•giuliomagnifico•1h ago•11 comments

The Cold War's Accidental Whale Observatory

https://thereader.mitpress.mit.edu/the-cold-wars-accidental-whale-observatory/
22•pseudolus•3d ago•5 comments

Bootimus – A Self-Contained PXE and HTTP Boot Server

https://bootimus.com
9•car•2h ago•1 comments

Data Compression Explained (2012)

https://mattmahoney.net/dc/dce.html
153•mtdewcmu•3d ago•21 comments

Can you see three trees?

https://www.not-ship.com/can-you-see-three-trees/
187•Pamar•2d ago•94 comments

There are no instances in ATProto

https://overreacted.io/there-are-no-instances-in-atproto/
472•danabramov•22h ago•247 comments

GPT-5.5 hallucinates 3x more than MIT-licensed GLM-5.2

https://arrowtsx.dev/bigger-models/
292•oshrimpton•21h ago•116 comments

The discovery that changed how scientists think about memory

https://www.ibm.com/think/news/discovery-changed-how-scientists-think-about-memory-kavli-prize
82•rbanffy•3d ago•27 comments

Lithuanian startup launches open-source network to detect Shahed-type drones

https://www.lrt.lt/en/news-in-english/19/2965205/lithuanian-startup-launches-open-source-network-...
14•giuliomagnifico•1h ago•6 comments

LLMs Are Complicated Now

https://ianbarber.blog/2026/06/19/llms-are-complicated-now/
67•matt_d•11h ago•15 comments

Surprising economics of load-balanced systems

https://brooker.co.za/blog/2020/08/06/erlang.html
129•KraftyOne•16h ago•30 comments

A 1969 camera operators' strike created Upstairs Downstairs multiverse

https://ironicsans.ghost.io/the-color-strike/
45•ohjeez•3d ago•12 comments

Human Judgment as a Specification

https://blog.brownplt.org/2026/06/09/pick.html
7•surprisetalk•3d ago•1 comments

Hyundai buys Boston Dynamics

https://startupfortune.com/hyundai-takes-full-control-of-boston-dynamics-as-softbank-exits-for-32...
871•ck2•20h ago•371 comments

How many of the 170k English words do you know?

https://vocabowl-870366514258.us-west1.run.app/
413•abnry•23h ago•500 comments

Norway imposes near ban on AI in elementary school

https://www.reuters.com/technology/norway-imposes-near-ban-ai-elementary-school-2026-06-19/
726•ilreb•21h ago•503 comments

Project Valhalla, Explained: How a Decade of Work Arrives in JDK 28

https://www.jvm-weekly.com/p/project-valhalla-explained-how-a
615•philonoist•1d ago•383 comments

Bobby Prince, composer for Doom, Wolfenstein 3D, and Duke Nukem 3D, has died

https://www.legacy.com/legacy/robert-bobby-prince-lll
412•pgrote•17h ago•48 comments

Soccer Arcade Games Through the Years

https://arcadeheroes.com/2026/06/13/world-cup-2026-soccer-arcade/
28•speckx•3d ago•13 comments

A Perceptron in Age of Empires II

https://adewynter.github.io/notes/aoe2-circuits
93•EvgeniyZh•2d ago•38 comments

Satellite reveals immense scale of GPS signal tampering

https://www.space.com/space-exploration/satellites/its-quite-a-bit-more-than-we-expected-satellit...
126•y1n0•9h ago•59 comments

AURpocalypse now: a look at the recent AUR attacks

https://lwn.net/SubscriberLink/1077619/f7b07c5489fdd43a/
100•jwilk•20h ago•68 comments

Egyptian Fractions (2006)

https://blog.plover.com/math/egyptian-fractions.html
100•luu•4d ago•16 comments

Zen and the Art of Machine Learning Research

https://blog.jxmo.io/p/zen-and-the-art-of-machine-learning
269•jxmorris12•4d ago•99 comments

Building a robotics research setup that lives next to my desk

https://dfdxlabs.com/research/2026/robotics-setup/
162•mplappert•1d ago•57 comments

Court Records Should Be Free

https://www.eff.org/deeplinks/2026/06/court-records-should-be-free
416•hn_acker•19h ago•96 comments

Telescope Ranchers

https://kottke.org/26/06/telescope-ranchers
133•bookofjoe•4d ago•51 comments