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

Comments

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

https://marler8997.github.io/blog/fixed-windows/
343•deevus•5h ago•177 comments

An Enslaved Gardener Transformed the Pecan into a Cash Crop

https://lithub.com/how-an-enslaved-gardener-transformed-the-pecan-into-a-cash-crop/
23•PaulHoule•1h ago•11 comments

I love the work of the ArchWiki maintainers

https://k7r.eu/i-love-the-work-of-the-archwiki-maintainers/
731•panic•15h ago•122 comments

Hideki Sato, designer of all Sega's consoles, has died

https://www.videogameschronicle.com/news/hideki-sato-designer-of-segas-consoles-dies-age-75/
31•magoghm•36m ago•0 comments

Flashpoint Archive – Over 200k web games and animations preserved

https://flashpointarchive.org
240•helloplanets•11h ago•54 comments

Amazon, Google Unwittingly Reveal the Severity of the U.S. Surveillance State

https://greenwald.substack.com/p/amazons-ring-and-googles-nest-unwittingly
343•mikece•4h ago•218 comments

Reversed engineered game Starflight (1986)

https://github.com/s-macke/starflight-reverse
48•tosh•5h ago•22 comments

Two different tricks for fast LLM inference

https://www.seangoedecke.com/fast-llm-inference/
114•swah•7h ago•46 comments

Oat – Ultra-lightweight, semantic, zero-dependency HTML UI component library

https://oat.ink/
263•twapi•8h ago•75 comments

RynnBrain

https://github.com/alibaba-damo-academy/RynnBrain
38•jsemrau•4d ago•0 comments

How Is Data Stored?

https://www.makingsoftware.com/chapters/how-is-data-stored
45•tzury•5d ago•2 comments

My smart sleep mask broadcasts users' brainwaves to an open MQTT broker

https://aimilios.bearblog.dev/reverse-engineering-sleep-mask/
540•minimalthinker•1d ago•231 comments

A practical guide to observing the night sky for real skies and real equipment

https://stargazingbuddy.com/
88•constantinum•3d ago•15 comments

Constraint Propagation for Fun

https://eli.li/constraint-propagation-for-fun
29•rickcarlino•5d ago•0 comments

Build Gaussian Splat Experiences with SuperSplat Studio

https://blog.playcanvas.com/build-gaussian-splat-experiences-with-supersplat-studio/
9•ovenchips•3d ago•0 comments

Inner-Platform Effect

https://en.wikipedia.org/wiki/Inner-platform_effect
18•tosh•2h ago•1 comments

Zvec: A lightweight, fast, in-process vector database

https://github.com/alibaba/zvec
194•dvrp•2d ago•35 comments

Interference Pattern Formed in a Finger Gap Is Not Single Slit Diffraction

https://note.com/hydraenids/n/nbe89030deaba
77•uolmir•2d ago•10 comments

Instagram's URL Blackhole

https://medium.com/@shredlife/instagrams-url-blackhole-c1733e081664
270•tkp-415•2d ago•44 comments

The seam through the center of things

https://usefulfictions.substack.com/p/the-seam-through-the-center-of-things
4•surprisetalk•2d ago•0 comments

DjVu and its connection to Deep Learning (2023)

https://scottlocklin.wordpress.com/2023/05/31/djvu-and-its-connection-to-deep-learning/
39•tosh•7h ago•4 comments

uBlock filter list to hide all YouTube Shorts

https://github.com/i5heu/ublock-hide-yt-shorts/
1038•i5heu•23h ago•307 comments

5,300-year-old 'bow drill' rewrites story of ancient Egyptian tools

https://www.ncl.ac.uk/press/articles/latest/2026/02/ancientegyptiandrillbit/
147•geox•4d ago•60 comments

Guitars of the USSR and the Jolana Special in Azerbaijani Music (2012)

https://caucascapades.wordpress.com/2012/06/14/guitars-of-the-ussr-and-the-jolana-special-in-azer...
77•bpierre•13h ago•12 comments

Amsterdam Compiler Kit

https://github.com/davidgiven/ack
150•andsoitis•1d ago•54 comments

Show HN: Copy-and-patch compiler for hard real-time Python

https://github.com/Nonannet/copapy
39•Saloc•4d ago•2 comments

A Visual Source for Shakespeare's 'Tempest'

https://profadamroberts.substack.com/p/a-visual-source-for-shakespeares
26•seegodanddie•3d ago•3 comments

News publishers limit Internet Archive access due to AI scraping concerns

https://www.niemanlab.org/2026/01/news-publishers-limit-internet-archive-access-due-to-ai-scrapin...
536•ninjagoo•22h ago•339 comments

OpenAI should build Slack

https://www.latent.space/p/ainews-why-openai-should-build-slack
224•swyx•1d ago•271 comments

Breaking the spell of vibe coding

https://www.fast.ai/posts/2026-01-28-dark-flow/
360•arjunbanker•1d ago•289 comments