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.

Roblox downloaded 145GB models from us (including adult content) without asking

https://open3dlab.com/news/roblox-downloaded-145-gb-of-models-from-our-sites/
77•choult•57m ago•36 comments

Three new discoveries in mathematics, computer science, and physics

https://openai.com/index/building-scientific-understanding-with-academic-communities/
947•jonluca•13h ago•478 comments

The Mythical Man-Month in the Age of AI

https://j11g.com/the-mythical-man-month-in-the-age-of-ai
184•ilreb•5h ago•134 comments

The Exponential Time Hypothesis Is False [pdf]

https://github.com/openai/math/blob/main/preprints/The-Exponential-Time-Hypothesis-is-False-Octob...
648•vok•13h ago•241 comments

Show HN: Encarta 95 Web

https://benwinding.github.io/encarta_95_web/#/article/Art
65•gitgud•3d ago•30 comments

Gforth 1.0

https://gforth.org/manual/1.0/NEWS.html
12•joshcsimmons•1h ago•1 comments

I will no longer upload to NEW

https://lists.debian.org/debian-devel/2026/10/msg00263.html
78•edward•1h ago•22 comments

Sebastian Raschka's from-scratch video course on building reasoning models

https://magazine.sebastianraschka.com/p/building-reasoning-models
726•sgiannopoulos•20h ago•101 comments

Oldest GUI application that still runs on Windows 11

https://blog.enlyth.com/posts/oldest-windows-gui-app-win-11/
453•enlyth•17h ago•260 comments

Writing about pratt parsing so I remember it

https://www.unix.dog/~yosh/blog/2026-10-25_pratt-parsing.html
41•dverlaeckt80•5h ago•5 comments

I still teach OpenGL ES 3.0

https://eliasfarhan.ch/graphics/cpp/2026/01/27/why-i-teach-opengles.html
74•majorchord•9h ago•45 comments

Solar power is becoming bigger than nuclear

https://www.bbc.com/future/article/20261023-how-solar-became-bigger-than-nuclear
354•geox•19h ago•526 comments

Type Server Protocol

https://github.com/microsoft/pylance-release/blob/main/docs/tsp/type-server-protocol.md
248•adamnemecek•17h ago•166 comments

CSS-Tricks has a new owner

https://css-tricks.com/css-tricks-has-a-new-owner/
490•edent•19h ago•106 comments

Cross-request KV cache exposure in the GLM-5.3 Workers AI model (155 responses)

https://blog.cloudflare.com/kv-cache-exposure-remediation/
142•wondersky•12h ago•46 comments

A Printer Printing onto Paper

https://twitter.com/macrofying/status/2112904628509528219
143•MrBuddyCasino•4d ago•32 comments

16-bit Windows (Windows 1.x, 2.x, 3.0, 3.1, etc.) on 64-bit Windows

https://github.com/otya128/winevdm
94•doener•10h ago•25 comments

How to grow a cacao tree at home (2024)

https://www.cocoterra.com/guide-on-how-to-grow-chocolate-at-home/
81•felipevb•1d ago•27 comments

New iPad mini

https://www.apple.com/newsroom/2026/10/apple-gives-ipad-mini-its-biggest-update-ever/
214•soheilpro•22h ago•526 comments

New 'Circadian' Subtype of Depression Affecting 1 in 4 Patients

https://www.sciencealert.com/researchers-identify-new-circadian-subtype-of-depression-affecting-1...
72•gmays•4d ago•42 comments

Websites Should Be Printable

https://brennenputh.me/blog/printable-websites/
351•bagatelle•1d ago•203 comments

LimonOS Custom x86-64 Kernel

https://github.com/AnonimusShamshiAlex/LimonOS
15•DrMoris•2d ago•1 comments

A Man from the Future: Why Johnny Can't Stop Abstracting

http://muratbuffalo.blogspot.com/2026/10/the-man-from-future-why-johnny-cant.html
181•aray07•17h ago•83 comments

Blaise Pascal invented fixed route public transport (2024)

https://humantransit.org/2024/12/one-of-the-greatest-inventions-in-the-history-of-human-transport...
295•skadamat•4d ago•150 comments

Anthropic S-1

https://www.sec.gov/Archives/edgar/data/2130357/000162828026067168/anthropicpbc-sx1.htm
1627•SiNTEx•22h ago•1553 comments

Txoko: Basques' traditional feast a gastronomic peek into a culture (2024)

https://johnhendersontravel.com/txoko/
26•jxub•3d ago•10 comments

APC says let there be light, with standards to speed up photonics manufacturing

https://www.nextplatform.com/connect/2026/10/23/apc-says-let-there-be-light-with-raft-of-standard...
38•rbanffy•1d ago•8 comments

Nietzschian Debugger

https://github.com/DilawarShafiq/nietzschian-debugger
185•dilawargopang•18h ago•53 comments

SIMD-accelerated computer vision on a $2 microcontroller

https://shraiwi.com/blog/simd-fast-esp32s3/
213•zdw•1d ago•61 comments

LISPy things you can do in 64K bytes of core (2019)

https://t3x.org/lisp64k/index.html
63•andsoitis•1d ago•13 comments