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

Comments

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

What makes Intel Optane stand out (2023)

https://blog.zuthof.nl/2023/06/02/what-makes-intel-optane-stand-out/
111•walterbell•4h ago•86 comments

Separating the Wayland compositor and window manager

https://isaacfreund.com/blog/river-window-management/
89•dpassens•4h ago•40 comments

C++26: The Oxford Variadic Comma

https://www.sandordargo.com/blog/2026/03/11/cpp26-oxford-variadic-comma
40•ingve•4d ago•16 comments

In Memoriam: John W. Addison, my PhD advisor

https://billwadge.com/2026/03/15/in-memoriam-john-w-addison-jr-my-phd-advisor/
27•herodotus•3h ago•2 comments

Glassworm Is Back: A New Wave of Invisible Unicode Attacks Hits Repositories

https://www.aikido.dev/blog/glassworm-returns-unicode-attack-github-npm-vscode
129•robinhouston•6h ago•67 comments

A Visual Introduction to Machine Learning (2015)

https://r2d3.us/visual-intro-to-machine-learning-part-1/
259•vismit2000•8h ago•23 comments

Show HN: GDSL – 800 line kernel: Lisp subset in 500, C subset in 1300

https://firthemouse.github.io/
33•FirTheMouse•3h ago•5 comments

Learning athletic humanoid tennis skills from imperfect human motion data

https://zzk273.github.io/LATENT/
44•danielmorozoff•3h ago•4 comments

Hollywood Enters Oscars Weekend in Existential Crisis

https://www.theculturenewspaper.com/hollywood-enters-oscars-weekend-in-existential-crisis/
67•RickJWagner•6h ago•187 comments

Rack-mount hydroponics

https://sa.lj.am/rack-mount-hydroponics/
311•cdrnsf•14h ago•82 comments

Show HN: Signet – Autonomous wildfire tracking from satellite and weather data

https://signet.watch
87•mapldx•7h ago•26 comments

Show HN: What if your synthesizer was powered by APL (or a dumb K clone)?

https://octetta.github.io/k-synth/
52•octetta•6h ago•27 comments

Grandparents are glued to their phones, families are worried [video]

https://www.bbc.com/reel/video/p0n61dg3/grandparents-are-glued-to-their-phones-families-are-worried
97•tartoran•1h ago•52 comments

Bus travel from Lima to Rio de Janeiro

https://kenschutte.com/lima-to-rio-by-bus/
5•ks2048•4d ago•0 comments

LLM Architecture Gallery

https://sebastianraschka.com/llm-architecture-gallery/
8•tzury•3h ago•1 comments

Kniterate Notes

https://soup.agnescameron.info//2026/03/07/kniterate-notes.html
41•surprisetalk•5d ago•10 comments

IBM, sonic delay lines, and the history of the 80×24 display (2019)

https://www.righto.com/2019/11/ibm-sonic-delay-lines-and-history-of.html
59•rbanffy•8h ago•13 comments

Autoresearch Hub

http://autoresearchhub.com/
4•EvgeniyZh•1d ago•1 comments

$96 3D-printed rocket that recalculates its mid-air trajectory using a $5 sensor

https://github.com/novatic14/MANPADS-System-Launcher-and-Rocket
316•ZacnyLos•8h ago•284 comments

Generating All 32-Bit Primes (Part I)

https://hnlyman.github.io/pages/prime32_I.html
64•hnlyman•7h ago•19 comments

How kernel anti-cheats work

https://s4dbrd.github.io/posts/how-kernel-anti-cheats-work/
319•davikr•18h ago•275 comments

The 100 hour gap between a vibecoded prototype and a working product

https://kanfa.macbudkowski.com/vibecoding-cryptosaurus
183•kiwieater•7h ago•234 comments

A most elegant TCP hole punching algorithm

https://robertsdotpm.github.io/cryptography/tcp_hole_punching.html
190•Uptrenda•15h ago•76 comments

Zipp 2001 Restoration

https://robot-daycare.com/posts/zipp-2001-restoration-part-1/
17•o4c•4d ago•0 comments

Why Mathematica does not simplify sinh(arccosh(x))

https://www.johndcook.com/blog/2026/03/10/sinh-arccosh/
129•ibobev•4d ago•48 comments

UMD Scientists Create 'Smart Underwear' to Measure Human Flatulence

https://cbmg.umd.edu/news-events/news/brantley-hall-umd-scientists-create-smart-underwear-measure...
66•ohjeez•3h ago•40 comments

Treasure hunter freed from jail after refusing to turn over shipwreck gold

https://www.bbc.com/news/articles/cg4g7kn99q3o
156•tartoran•16h ago•212 comments

Allow me to get to know you, mistakes and all

https://sebi.io/posts/2026-03-14-allow-me-to-get-to-know-you-mistakes-and-all/
276•sebi_io•21h ago•130 comments

Human Organ Atlas

https://www.science.org/doi/10.1126/sciadv.adz2240
65•bookofjoe•3d ago•4 comments

Examples for the tcpdump and dig man pages

https://jvns.ca/blog/2026/03/10/examples-for-the-tcpdump-and-dig-man-pages/
76•ibobev•4d ago•7 comments