frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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•8mo ago

Comments

yxhuvud•8mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•8mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•8mo 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•8mo 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•8mo 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•8mo 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.

Gmail is entering the Gemini Era

https://blog.google/products-and-platforms/products/gmail/gmail-is-entering-the-gemini-era/
35•xnx•1h ago•40 comments

Lights and Shadows

https://ciechanow.ski/lights-and-shadows/
126•kg•5d ago•15 comments

The Jeff Dean Facts

https://github.com/LRitzdorf/TheJeffDeanFacts
29•ravenical•1h ago•6 comments

Project Patchouli: Open-source electromagnetic drawing tablet hardware

https://patchouli.readthedocs.io/en/latest/
315•ffin•9h ago•32 comments

A closer look at a BGP anomaly in Venezuela

https://blog.cloudflare.com/bgp-route-leak-venezuela/
238•ChrisArchitect•7h ago•117 comments

Show HN: DeepDream for Video with Temporal Consistency

https://github.com/jeremicna/deepdream-video-pytorch
10•fruitbarrel•1h ago•1 comments

Open Infrastructure Map

https://openinframap.org
252•efskap•11h ago•56 comments

The Napoleon Technique: Postponing things to increase productivity

https://effectiviology.com/napoleon/
147•Khaine•3d ago•72 comments

Kernel bugs hide for 2 years on average. Some hide for 20

https://pebblebed.com/blog/kernel-bugs
212•kmavm•12h ago•91 comments

Eat Real Food

https://realfood.gov
951•atestu•21h ago•1276 comments

Mothers (YC X26) Is Hiring

https://jobs.ashbyhq.com/9-mothers
1•ukd1•2h ago

I program without syntax highlighting

https://hakon.gylterud.net/opinion/syntax-highlighting.html
30•weeber•2d ago•30 comments

Shipmap.org

https://www.shipmap.org/
683•surprisetalk•23h ago•108 comments

The price of fame? Mortality risk among famous singers

https://jech.bmj.com/content/early/2025/11/30/jech-2025-224589
5•ingve•4d ago•0 comments

Anyone have experiences with Audio Induction Loops?

https://en.wikipedia.org/wiki/Audio_induction_loop
39•evolve2k•3d ago•21 comments

Go.sum is not a lockfile

https://words.filippo.io/gosum/
110•pabs3•10h ago•43 comments

Tailscale state file encryption no longer enabled by default

https://tailscale.com/changelog
316•traceroute66•18h ago•122 comments

Lessons from Hash Table Merging

https://gist.github.com/attractivechaos/d2efc77cc1db56bbd5fc597987e73338
43•attractivechaos•6d ago•13 comments

ChatGPT Health

https://openai.com/index/introducing-chatgpt-health/
341•saikatsg•19h ago•451 comments

The Q, K, V Matrices

https://arpitbhayani.me/blogs/qkv-matrices/
153•yashsngh•1d ago•62 comments

How Did TVs Get So Cheap?

https://www.construction-physics.com/p/how-did-tvs-get-so-cheap
50•thelastgallon•1h ago•72 comments

LaTeX Coffee Stains (2021) [pdf]

https://ctan.math.illinois.edu/graphics/pgf/contrib/coffeestains/coffeestains-en.pdf
359•zahrevsky•23h ago•86 comments

The virtual AmigaOS runtime (a.k.a. Wine for Amiga:)

https://github.com/cnvogelg/amitools/blob/main/docs/vamos.md
91•doener•13h ago•21 comments

Play Aardwolf MUD

https://www.aardwolf.com/
149•caminanteblanco•15h ago•72 comments

How Google got its groove back and edged ahead of OpenAI

https://www.wsj.com/tech/ai/google-ai-openai-gemini-chatgpt-b766e160
167•jbredeche•22h ago•206 comments

Musashi: Motorola 680x0 emulator written in C

https://github.com/kstenerud/Musashi
96•doener•13h ago•9 comments

GLSL Web CRT Shader

https://blog.gingerbeardman.com/2026/01/04/glsl-web-crt-shader/
80•msephton•3d ago•30 comments

NPM to implement staged publishing after turbulent shift off classic tokens

https://socket.dev/blog/npm-to-implement-staged-publishing
185•feross•20h ago•88 comments

US will ban Wall Street investors from buying single-family homes

https://www.reuters.com/world/us/us-will-ban-large-institutional-investors-buying-single-family-h...
940•kpw94•19h ago•940 comments

Claude Code CLI was broken

https://github.com/anthropics/claude-code/issues/16673
150•sneilan1•18h ago•152 comments