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.

AMD Strix Halo RDMA Cluster Setup Guide

https://github.com/kyuz0/amd-strix-halo-vllm-toolboxes/blob/main/rdma_cluster/setup_guide.md
25•jakogut•1h ago•1 comments

Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

https://decomp-academy.dev
20•jackpriceburns•54m ago•7 comments

Anonymous GitHub account mass-dropping undisclosed 0-days

https://github.com/bikini/exploitarium
675•binyu•11h ago•268 comments

Choosing a Public DNS Resolver

https://evilbit.de/dns-resolver-guide.html
60•pawal•4h ago•18 comments

OpenRA

https://www.openra.net/
588•tosh•14h ago•115 comments

AI learns the “dark art” of RFIC design

https://spectrum.ieee.org/ai-radio-chip-design
191•Brajeshwar•3d ago•124 comments

Enhancing X11 Application Security with LXC

https://dobrowolski.dev/article/enhancing-x11-application-security-with-lxc/
33•shirozuki•4h ago•7 comments

Fintech Engineering Handbook

https://w.pitula.me/fintech-engineering-handbook/
484•signa11•15h ago•159 comments

Space Shuttle Endeavour's 20-story vertical display

https://californiasciencecenter.org/about-us/samuel-oschin-air-and-space-center/go-for-stack
9•uticus•1d ago•0 comments

Regular expressions that work "everywhere"

https://www.johndcook.com/blog/2026/06/23/regex-everywhere/
17•ColinWright•2d ago•6 comments

The case for physical media ownership

https://dervis.de/physical/
374•cemdervis•14h ago•247 comments

Turn your site into a place people can bump into each other

https://cauenapier.com/blog/townsquare_release/
161•eustoria•9h ago•74 comments

Suspicious Discontinuities (2020)

https://danluu.com/discontinuities/
214•tosh•12h ago•62 comments

How do you keep Web MIDI from crashing a 1983 synthesizer?

https://knob.monster/how-do-you-keep-web-midi-from-crashing-a-1983-synthesizer
26•halfradaition•3d ago•9 comments

Asian AI startups launch Mythos-like models

https://techcrunch.com/2026/06/27/asian-ai-startups-launch-mythos-like-models-as-anthropics-expor...
146•bogdiyan•13h ago•136 comments

IP Crawl: Living atlas of open webcams discovered on the public internet

https://ipcrawl.com/
246•arm32•7h ago•128 comments

Reducing tick density along recreational trails in Ottawa, Canada

https://www.sciencedirect.com/science/article/pii/S1877959X26000476
160•bushwart•3d ago•89 comments

Paradise Revisited: What Darwin Saw in the Galápagos

https://www.theatlantic.com/magazine/2026/08/writers-way-galapagos-charles-darwin-travel/687480/
37•benbreen•3d ago•1 comments

Response to AI slop is from Robin Williams

https://jayacunzo.com/blog/your-move-chief
12•herbertl•47m ago•1 comments

Post-Mythos Cybersecurity: Keep calm and carry on

https://cephalosec.com/blog/cybersecurity-in-the-post-mythos-era-keep-calm-and-carry-on/
135•Versipelle•11h ago•40 comments

DSpark: Speculative decoding accelerates LLM inference [pdf]

https://github.com/deepseek-ai/DeepSpec/blob/main/DSpark_paper.pdf
726•aurenvale•16h ago•300 comments

Supabase (YC S20) Is Hiring for Multigres

https://jobs.ashbyhq.com/supabase/2e718684-4f75-4a99-8d6b-3b6bd44e4228
1•awalias•9h ago

Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work

https://github.com/kageroumado/adrafinil
90•kageroumado•5h ago•55 comments

What Ozempic does to the gut-brain axis

https://www.psychologytoday.com/au/blog/mood-by-microbe/202606/what-ozempic-does-to-the-gut-brain...
77•randycupertino•4h ago•158 comments

Michigan spent $1.8B and only created 602 jobs

https://www.msn.com/en-us/money/general/michigan-spent-1-8-billion-and-only-created-602-jobs/ar-A...
120•littlexsparkee•4h ago•49 comments

One man, two kernels, and a lot of RISC-V

https://www.theregister.com/software/2026/06/26/one-man-two-kernels-and-a-lot-of-risc-v/5262858
80•LorenDB•1d ago•6 comments

The eerie interface of man and machine (Life Magazine, October 1967)

https://blog.jgc.org/2026/06/the-eerie-interface-of-man-and-machine.html
29•Brajeshwar•3d ago•1 comments

Show HN: Starglyphs - A constellation puzzle game based on Euler paths

https://starglyphs.com
11•telman17•4h ago•3 comments

How H-E-B became Texas' most beloved brand (2024)

https://texashighways.com/culture/how-heb-became-texas-most-beloved-brand/
94•NaOH•3d ago•92 comments

Why does kinetic energy increase quadratically, not linearly, with speed? (2011)

https://physics.stackexchange.com/questions/535/why-does-kinetic-energy-increase-quadratically-no...
351•ProxyTracer•1d ago•195 comments