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.

Iceland votes on whether to restart talks on joining EU

https://www.bbc.com/news/articles/cn45vdxyvvlo
211•tosh•2h ago•239 comments

Samsung's Processing-in-Memory (PIM)

https://chipsandcheese.com/p/hot-chips-2026-samsungs-processing
166•ingve•8h ago•52 comments

GUIs should be fully keyboard-driven

https://ckardaris.com/blog/2026/08/28/keyboard-driven-guis.html
905•ckardaris•23h ago•449 comments

Boot a Virtual iPhone via Apple's Virtualization.framework

https://github.com/Lakr233/vphone-cli
325•hentrep•15h ago•83 comments

Glacier Mice

https://en.wikipedia.org/wiki/Glacier_mice
77•ostacke•4d ago•11 comments

Creating the Aetheryte Radio

https://haz.ee/posts/aetheryte-radio.html
9•wonger_•23h ago•0 comments

Htmx 4.0

https://four.htmx.org/announcements/2026-08-28-htmx-4.0.0-is-released
726•rmsaksida•1d ago•178 comments

Hunting Down a Go Runtime Bug on 32-Bit Embedded Systems

https://sigma-star.at/blog/2026/08/go-runtime-netpoll-bug/
60•birdculture•2d ago•5 comments

Europe's last regular standard-gauge steam passenger service

https://parowozowniawolsztyn.pl/?page_id=2141
71•GungulSurm•2d ago•19 comments

Show HN: Galaxium, an experimental WebGPU space explorer

https://galaxium.app
32•guillaumec•4d ago•13 comments

U.S. sanctions against the A/I Collective

https://www.inventati.org/
646•exiguus•1d ago•640 comments

StemDeck, a free, open-source and local AI stem separator

https://github.com/stemdeckapp/stemdeck
152•thclpr•12h ago•37 comments

EVE Online moves to Python 3

https://www.eveonline.com/news/view/the-move-to-python-3-begins
80•TylerJaacks•4d ago•27 comments

I accidentally turned LLM memory into program analysis

https://pwning.systems/posts/llm-memory-program-analysis/
198•matt_d•14h ago•57 comments

Inception-style curved map for turn-by-turn directions

https://www.orbify.eu/demo/
550•smoser•1d ago•182 comments

TurboKV: Insanely fast Rust key-value store

https://github.com/kingroryg/turbokv
136•rgbimbochamp•11h ago•64 comments

Just the rumour of a bug is enough to find an exploit these days

https://anil.recoil.org/notes/rumour-is-the-exploit
351•avsm•22h ago•115 comments

Show HN: Typebase – A single-folder back end you write in TypeScript

https://typebase.io
5•andrewww-dev•3d ago•0 comments

Time complexity of operations on Python's built-in types

https://docs.python.org/3.16/library/time-complexity.html
34•theanonymousone•3d ago•6 comments

Queen Caroline turned King Arthur into an 18C royal PR strategy

https://theconversation.com/how-queen-caroline-turned-king-arthur-into-an-18th-century-royal-pr-s...
29•samizdis•4d ago•6 comments

Monzo Stand-In

https://monzo.com/blog/tolerating-full-cloud-outages-with-monzo-stand-in
101•coffeefuel•5d ago•43 comments

Our decision on Cursor following its acquisition by SpaceX

https://openai.com/index/our-decision-on-cursor-following-its-acquisition-by-spacex/
648•meetpateltech•12h ago•370 comments

Does the Sumerian King List Align with Paleoclimate Events?

https://www.vectorian.be/articles/2026-06-07/sumerian-king-list-paleoclimate-alignment-explorer/
112•dev_l1x_be•14h ago•63 comments

Experiments with Plotter Art

https://sometimes.digital/posts/experiments-with-plotter-art/
78•surprisetalk•5d ago•7 comments

The Twelve-Factor App (2025)

https://12factor.net/
285•jxmorris12•1d ago•159 comments

Curvature Beziers: Improving on a timeless recipe

https://acko.net/blog/curvature-beziers/
133•leephillips•4d ago•17 comments

Box of 300 Love Letters Showed Up, What Whimsical WWII Soldier Who Wrote Them?

https://www.smithsonianmag.com/history/this-box-of-300-love-letters-showed-up-out-of-the-blue-who...
32•gmays•4d ago•7 comments

Visual Analysis of Binary Files

https://binvis.io/#/
96•vismit2000•3d ago•25 comments

EasyEffects can improve laptop speaker sound quality

https://www.osnews.com/story/145883/easyeffects-should-be-part-of-every-linux-distribution-and-de...
178•birdculture•22h ago•75 comments

GLM-5.3 is now open-weight

https://huggingface.co/zai-org/GLM-5.3
739•jeudesprits•23h ago•249 comments