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.

“I just chose words carefully”

https://unsung.aresluna.org/i-just-chose-words-carefully/
608•zdw•8h ago•148 comments

P99 0 ms* autocomplete for 240M domain names

https://ruurtjan.com/articles/p99-0ms-autocomplete-for-240-million-domain-names
64•dbalatero•3h ago•29 comments

Creepy Crawlies

https://people.kernel.org/monsieuricon/creepy-crawlies
1060•zdw•1d ago•520 comments

Transfer files over an Ethernet patch cable

https://maurycyz.com/misc/etherfiles/
44•jllyhill•3h ago•28 comments

It takes 5 cloud services to hear my doorbell

https://blog.vghaisas.com/rube-goldberg-doorbell/
110•vghaisas•2d ago•78 comments

My hobby of building miniatures and taking pretty pictures

https://sandyuraz.com/blogs/tiny-cafe/
65•thecsw•2d ago•6 comments

Why OOP Exists

https://mathspp.com/blog/why-oop-exists
17•lumpa•3d ago•28 comments

Matrox: Graphics for Professionals

https://www.abortretry.fail/p/matrox
83•BirAdam•7h ago•24 comments

Highlighting My Code Based on How Much I Care

https://hank.bond/posts/highlighting-my-code-based-on-how-much-i-care/
10•hankbond•2d ago•2 comments

Haiku R1/beta6 has been released

https://www.haiku-os.org/news/2026-08-26_haiku_r1_beta6
300•metrofun•15h ago•89 comments

OpenClaw 2.0, Accidentally

https://openclaw.ai/blog/openclaw-2-accidentally
61•doppp•3h ago•50 comments

Understanding ChatGPT Work

https://simonwillison.net/2026/Aug/30/understanding-chatgpt-work/
137•gmays•5h ago•48 comments

Internet centralization and the original sin of NAT

https://dreamstation.systems/personal/ntppost.html
42•robinpie•4h ago•23 comments

How to build a diffusion language model

https://kuleshov-group.github.io/blog/blog/2026/how-to-build-a-diffusion-language-model/
57•volodia•7h ago•4 comments

Cores in space: The core memory module from a 1980 Spacelab computer

https://www.righto.com/2026/08/spacelab-core-memory.html
100•pwg•11h ago•17 comments

Show HN: NFC Energy-Harvesting PCB Business Card with an MCU

https://wilsonharper.net/projects/businesscard/
149•WilsonHarper•2d ago•15 comments

A 12TB Steam "teraleak" spills more than a decade of lost PC gaming history

https://arstechnica.com/gaming/2026/08/a-12tb-steam-teraleak-spills-more-than-a-decade-of-lost-pc...
12•WithinReason•54m ago•0 comments

Continuous Diffusion Language Models (CDLM's)

https://sander.ai/2026/08/24/continuous-dlms.html
83•peter_d_sherman•10h ago•33 comments

Sort branches by last commit date

https://ryangreenberg.com/til/git-branches-by-commit-date/
112•speckx•5d ago•42 comments

Hacking IKEA Furniture

https://greenlightning.eu/diy/hacking-ikea-furniture/
298•greenlightning•19h ago•207 comments

Why open source rocks – a new SM750 (Silicon Motion GPU) HDMI Driver

https://github.com/KodeMunkie/sm750hdmifb
98•SillyUsername•12h ago•35 comments

Relm4 makes developing beautiful cross-platform applications idiomatic

https://relm4.org/
30•Bluestein•4d ago•17 comments

Coordination Headwind: How Organizations Are Like Slime Molds

https://komoroske.com/slime-mold/
150•rzk•15h ago•45 comments

Startup Anti-Patterns

https://www.itamarnovick.com/intro-to-startup-anti-pattern-series/
141•rzk•15h ago•72 comments

Commercially Available Bike Generators Are Not Sustainable (2011)

https://solar.lowtechmagazine.com/2011/05/bike-powered-electricity-generators-are-not-sustainable/
43•baud147258•4d ago•39 comments

Show HN: Prove your code produced your claims without making reviewers rerun it

https://github.com/27-GROUP/kveritas-go/
9•Mkld27•4h ago•2 comments

How would you know whether an ancient culture had zero?

https://www.johndcook.com/blog/2026/08/21/ancient-number-system/
50•ibobev•3d ago•22 comments

Racter (1984)

https://www.ubu.com/historical/racter/index.html
22•buescher•2d ago•6 comments

Dad’s Custom Atari Peripherals

https://www.goto10retro.com/p/dads-custom-atari-peripherals
126•rbanffy•3d ago•16 comments

Arbitrary code execution in QubesOS via copy-to-VM error reporting backchannel

https://www.qubes-os.org/news/2026/08/29/qsb-118/
222•vntok•22h ago•89 comments