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.

Cloudflare acquires Deno

https://deno.com/blog/cloudflare
881•ilreb•7h ago•477 comments

Show HN: Carrier-Explode: iPhone, Pixel and Galaxy carrier settings decoded

https://carrierexplode.com/
100•simplyalec•2h ago•13 comments

Our $445M Series D

https://oxide.computer/blog/our-445m-series-d
490•ahlCVA•7h ago•203 comments

Triple-A Minesweeper

https://minesweeper.mikelacher.com/
251•robin_reala•4h ago•60 comments

Typesafe AI raises $870M at $7.5B

https://typesafe.ai/blog/series-ai
134•tosh•3h ago•103 comments

No Man Is an Island

https://borretti.me/article/no-man-is-an-island
11•zetalyrae•23m ago•0 comments

Pointing AI at archives found a forgotten meteorite, lost rhinos, and more

https://jessewaites.com/blog/post/i-pointed-ai-at-400-years-of-archives/
55•piratebroadcast•8h ago•28 comments

Sorry, I'm in a meeting

https://iminafleeting.com/
623•splintersio•11h ago•202 comments

Ideas aren't getting harder to find, anyone who tells you otherwise is a coward

https://www.experimental-history.com/p/ideas-arent-getting-harder-to-find
36•rafaelc•2h ago•13 comments

Show HN: Let your AI agents paint big arrows, boxes and text on your screen

https://github.com/franzenzenhofer/big-arrow-on-the-screen
335•franze•9h ago•144 comments

Nobel Peace Prize for 2026 to Navanethem Pillay

https://www.nobelprize.org/prizes/peace/2026/press-release/
386•Anon84•10h ago•194 comments

M7.6 Earthquake in Panama

https://earthquake.usgs.gov/earthquakes/eventpage/us6000u18k/executive
85•gslin•2h ago•31 comments

'Wallace and Gromit,' 90% Alone

https://animationobsessive.substack.com/p/wallace-and-gromit-90-alone
90•vinhnx•6h ago•10 comments

A statement on the Tor Project's relationship with Mullvad

https://blog.torproject.org/on-tor-relationship-with-mullvad/
61•runtimewire•4h ago•106 comments

Why isn't the industry freaking out about DeepSeek 4.1 Flash?

https://www.dgt.is/blog/2026-10-07-deepseek-freek-out/
1041•jonotime•1d ago•928 comments

Germany transforms former coal mines into Europe's largest lake landscape

https://www.euronews.com/2026/04/14/almost-like-lake-como-germany-transforms-former-coal-mines-in...
152•ohjeez•5h ago•80 comments

The reciprocal sum of the prime-prefix-free numbers converges [pdf]

https://jdb19937.github.io/prime-prefix-free/ppf.pdf
5•jdb1729•4d ago•7 comments

Whistle: Speech to Text in 16.9 MB

https://cactuscompute.com/blog/whistle
902•gmays•1d ago•174 comments

You might want to try being less creative

https://blog.bawolf.com/p/you-might-want-to-try-being-less
36•bryantwolf•1h ago•19 comments

Microsoft-Decision-1, our model for fast decision-making

https://commandline.microsoft.com/microsoft-decision-1-model-foundry/
41•lisajaloza•1h ago•14 comments

I hired an illustrator to draw my house. Now it's my Home Assistant dashboard

https://antonfrolov.substack.com/p/i-hired-an-illustrator-to-draw-my
877•soheilpro•2d ago•196 comments

Training Text-to-Image Models Without a VAE

https://www.linum.ai/field-notes/pyramid-jit
34•schopra909•3d ago•14 comments

Yes, and

https://htmx.org/essays/yes-and/
699•Michelangelo11•1d ago•277 comments

OpenAI fires three safety researchers for "mishandling research information"

https://techcrunch.com/2026/10/08/fired-openai-safety-researchers-dispute-misconduct-claims-warn-...
267•trakkstar•10h ago•169 comments

Keyboard differences between Windows and Macs

https://unsung.aresluna.org/deeper-dive-keyboard-differences-between-windows-and-macs/
293•sohkamyung•17h ago•244 comments

MXC - a sandboxed code execution system

https://github.com/microsoft/mxc
156•nreece•14h ago•76 comments

Programming Isn't Special

https://blog.glyph.im/2026/10/programming-isnt-special.html
140•ingve•12h ago•154 comments

Theranos.world

https://www.theranos.world/
536•kbyatnal•1d ago•198 comments

Once: Cache CLI commands

https://github.com/alex0ptr/once
78•baquero•10h ago•36 comments

Show HN: The rarest tech books and docs you've probably never read

https://readrare.com/
4•miletus•2h ago•1 comments