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.

Qwen-Image-3.0: Rich Content, Authentic Details, Deep Knowledge

https://qwen.ai/blog?id=qwen-image-3.0
69•ilreb•1h ago•36 comments

Incremental – A library for incremental computations

https://github.com/janestreet/incremental
199•handfuloflight•6h ago•34 comments

Who's afraid of Chinese models?

https://stratechery.com/2026/whos-afraid-of-chinese-models/
643•mfiguiere•22h ago•443 comments

Arduino Launches Plug-and-Play Modules for Long-Range Sensor Projects

https://www.allaboutcircuits.com/news/arduino-launches-plug-and-play-modules-for-long-range-senso...
15•WaitWaitWha•3d ago•0 comments

Linux kernel will support $ORIGIN, sort of

https://fzakaria.com/2026/07/20/linux-kernel-will-support-origin-sort-of
46•ingve•3h ago•22 comments

Kimi Work

https://www.kimi.com/products/kimi-work
557•ms7892•16h ago•238 comments

Running Doom on Our Custom CPU and Going Viral

https://www.armaangomes.com/blogs/doom/
70•arghunter•6h ago•13 comments

Jelly UI: Soft-body physics for native HTML form controls

https://jelly-ui.com/
498•baldvinmar•16h ago•155 comments

Human mathematicians are being outcounterexampled

https://xenaproject.wordpress.com/2026/07/20/human-mathematicians-are-being-outcounterexampled/
347•artninja1988•14h ago•142 comments

How to pack ternary numbers in 8-bit bytes

https://compilade.net/blog/ternary-packing
13•JoshTriplett•6d ago•8 comments

A Koi Pond Mosaic Made from 10 Pounds of 3D Printer Waste

https://www.instructables.com/A-Koi-Pond-Mosaic-Made-From-10-Pounds-of-3D-Printe/
35•sudo_cowsay•6h ago•28 comments

Nativ: Run frontier open models locally on your Mac

https://blaizzy.github.io/nativ/
281•aratahikaru5•15h ago•91 comments

VTubing: How a Japanese Phenomenon Is Going Worldwide

https://www.tokyodev.com/articles/vtubing-how-a-japanese-phenomenon-is-going-worldwide
30•pwim•6h ago•12 comments

Show HN: Immersive Gaussian Splat tour of grace cathedral, San Francisco

https://vincentwoo.com/3d/grace_cathedral/
167•akanet•13h ago•39 comments

I wrote an bash enumerator because I was sick of xargs

https://numerlab.org/2025/07/20/bashumerate-enumerator/
133•wallach-game•13h ago•108 comments

Show HN: Ex Situ – Open-source spatial index of displaced cultural artifacts

https://exsitu.app/map
34•hbyel•5h ago•20 comments

Agent swarms and the new model economics

https://cursor.com/blog/agent-swarm-model-economics
196•jlaneve•15h ago•87 comments

The Psychology of Software Teams

https://www.routledge.com/The-Psychology-of-Software-Teams/Hicks/p/book/9781032963389
97•dcre•5d ago•27 comments

Launch HN: Bloomy (YC S26) – AI-powered mastery learning for K-12

88•alexsouthmayd•17h ago•87 comments

China’s open-weights AI strategy is winning

https://werd.io/american-ai-is-locked-down-and-proprietary-its-losing/
1111•benwerd•19h ago•839 comments

You only need the frontier model for one single edit

https://stencil.so/blog/prewalk
147•jxmorris12•6d ago•46 comments

The Power of Awareness: Overcoming Surveillance Capitalism

https://www.scottrlarson.com/presentations/overcoming-surveillance-capitalism-with-awareness/
110•trinsic2•13h ago•17 comments

Shinjuku Station in 3D

https://satoshi7190.github.io/Shinjuku-indoor-threejs-demo/
225•Gecko4072•20h ago•50 comments

My two year old taught me constraint solving

https://thecomputersciencebook.com/posts/how-my-2yo-taught-me-constraint-solving/
77•bambataa•1w ago•27 comments

Jellyfin founder Andrew leaves team

https://forum.jellyfin.org/t-project-leadership-changes
248•swat535•10h ago•193 comments

I Stopped “Creating Content”

https://refactoringenglish.com/blog/why-i-stopped-creating-content/
173•mtlynch•18h ago•129 comments

How we measured AI writing across arXiv, and where the measurement breaks

https://unslop.run/blog/measuring-ai-writing-on-arxiv
224•dopamine_daddy•17h ago•154 comments

Perfection is not over-engineering

https://var0.xyz/posts/perfection-is-not-over-engineering.html
241•var0xyz•19h ago•102 comments

Hacker wipes Romania's land registry database

https://news.risky.biz/risky-bulletin-hacker-wipes-romanias-entire-land-registry-database/
645•speckx•20h ago•356 comments

Corners Don't Look Like That: Regarding Screenspace Ambient Occlusion (2012)

https://nothings.org/gamedev/ssao/
170•firephox•18h ago•72 comments