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.

HackerTube: YouTube built from videos recommended by HN

https://karpathy.bearblog.dev/hacker-tube/
1029•karpathy•10h ago•312 comments

An Italian farmer found some unknown seeds in his attic and planted them

https://www.smithsonianmag.com/science-nature/italian-farmer-found-unknown-seeds-attic-with-nothi...
296•ecares•7h ago•82 comments

Brazilian Court Sanctions Lawyers for Prompt Injection in Court Filing

https://jetstream.security/insights/brazilian-court-sanctions-prompt-injection-filing/
68•doodlesdev•4h ago•25 comments

TCP Use-After-Free: CVE-2026-98432 / CVSS 9.8

https://atlasum.net/blog/cve-2026-98432-linux-ipv4-tcp-uaf
446•oger•11h ago•206 comments

Memdoor: A team of 5 Qwen3.8-27B models beats Fable 5 on LiveCodeBench Hard

https://github.com/guregodevo/memdoor/tree/main/examples/workflows/team-solve
169•guregodevo•7h ago•92 comments

Leaking Secrets from Air-Gap Computers by Spelling Radio Signals from RAM (2024)

https://arxiv.org/abs/2409.02292
52•hapax_legomena•4h ago•23 comments

Pilot-wave hydrodynamics (Quantum phenomena in macroscopic hydrodynamic systems)

http://thales.mit.edu/bush/index.php/4801-2/
12•peter_d_sherman•1d ago•0 comments

Altoids Project

https://uvdn7.github.io/altoids-project/
86•uvdn7•7h ago•4 comments

Zinc creep in cable spelter sockets brought down the Arecibo telescope in 2020

https://maketecheasier.com/arecibo-zinc-creep-collapse/
79•ohjeez•1d ago•17 comments

It's the memory latency, stupid

https://pivotlake.io/blog/its-the-memory-latency-stupid/
174•ntur1337•11h ago•48 comments

A 1580 Map Shows Why Data Visualization Is Never Neutral

https://thereader.mitpress.mit.edu/a-1580-map-shows-why-data-visualization-is-never-neutral/
23•the-mitr•1d ago•1 comments

A brief history of just-in-time: forty years of JIT work, from 1960–2000

https://dl.acm.org/doi/10.1145/857076.857077
15•gjvc•2d ago•0 comments

Surviving "The Graduate"

https://www.newyorker.com/culture/the-weekend-essay/dustin-hoffman-on-surviving-the-graduate
99•samizdis•10h ago•31 comments

ChatGPT and Codex usage limits merging

https://help.openai.com/en/articles/20001625-understanding-chatgpt-and-codex-usage-limits
64•Zariel•8h ago•25 comments

Jepsen: ParticleDB 1.1.4

https://jepsen.io/analyses/particledb-1.1.4
238•aphyr•16h ago•134 comments

Show HN: NES Contra (1987) port (ASM –> C and then C –> WebAssembly)

https://epoyraz.github.io/nes-contra-us/
79•tevlon•11h ago•48 comments

Edgar Allan Poe, Quintessential American Writer

https://slate.com/culture/2026/10/edgar-allan-poe-poems-stories-most-influential-american-writer-...
22•samclemens•3d ago•0 comments

Electrification Could Cut Global Energy Use in Half

https://fullycharged.show/podcasts/podcast-361-why-electrification-could-cut-global-energy-use-in...
73•toomuchtodo•11h ago•17 comments

Do the math: How we took over ChatGPT accounts

https://www.parameter.ai/labs/we-found-a-gap-at-openai
318•armcat•19h ago•157 comments

The Duty of a Scholar

https://www.daemonology.net/blog/2026-10-31-The-Duty-of-a-Scholar.html
108•gslin•11h ago•31 comments

OTape

https://www.otape.org/
10•dotmanish•4h ago•1 comments

Simple circuits can create complex behaviors

https://aatishb.com/myriad/lets-build-a-brain/
234•aatish•4d ago•75 comments

Anthropic blocks users for anything touching training larger models

https://twitter.com/jiahaoshao1/status/2116475922190922088
298•pretext•10h ago•166 comments

Show HN: BBRouter – Ben Eater's 8-bit computer, simulated on 3D breadboards

https://bbrouter.com/bbrouter/ben-eater-sap-1
21•creack•6h ago•6 comments

Constructing a Quine from Kleene's Second Recursion Theorem

https://emarzion.github.io/KSRT/
15•mkckto•6h ago•1 comments

Decode kernel panic from QR Code photo

https://gist.github.com/skorotkiewicz/c59e591c26661cb52b06afc42d8ac546
20•modinfo•1d ago•8 comments

Reading and writing are less symmetric than you (probably) think

https://fgiesen.wordpress.com/2015/10/25/reading-and-writing-are-less-symmetric-than-you-probably...
103•luu•3d ago•24 comments

Show HN: A language model that lives in a boot sector

https://github.com/kerlenton/bootgpt
74•kerlenton•17h ago•3 comments

AI text watermarking and quality loss

https://blog.keyvan.net/p/ai-text-watermarking-and-quality
43•danielfoster•8h ago•8 comments

Sculpture re-creates odd optical effects of famed Lycurgus Cup

https://arstechnica.com/science/2026/10/scientists-recreate-the-1600-year-old-recipe-of-lycurgus-...
34•dverlaeckt80•1d ago•2 comments