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.

Fable turned reMarkable into Tom Riddle's diary from Harry Potter

https://github.com/MaximeRivest/Riddle
388•modinfo•8h ago•209 comments

OpenWrt One – Open Hardware Router

https://openwrt.org/toh/openwrt/one
561•peter_d_sherman•13h ago•220 comments

CoMaps – FOSS Offline Maps

https://www.comaps.app/
484•basilikum•12h ago•95 comments

GLM 5.2 and the coming AI margin collapse

https://martinalderson.com/posts/the-upcoming-ai-margin-collapse-part-1-glm-5-2/
345•martinald•11h ago•214 comments

How to sequence your own DNA at home

https://bradleywoolf.com/links-1/sequencing-my-own-dna-at-home
168•bilsbie•7h ago•59 comments

Small AI Models Gain Traction In places with unreliable networks

https://spectrum.ieee.org/small-language-models-ai-pharmaceuticals
113•sscaryterry•7h ago•26 comments

Lago (YC S21) Is Hiring for Our GTM Team

https://jobs.ashbyhq.com/lago
1•AnhTho_FR•41m ago

Ternlight – 7 MB embedding model that runs in browser (WASM)

https://ternlight-demo.vercel.app/
194•soycaporal•8h ago•47 comments

Dolosse – a South African invention used over the world

https://thisbugslife.com/2021/11/21/dolosse-a-south-african-invention-used-over-the-world/
23•andsoitis•2d ago•3 comments

A global workspace in language models

https://www.anthropic.com/research/global-workspace
348•in-silico•13h ago•127 comments

Pruning RAG context down to what the answer actually needs

https://www.kapa.ai/blog/how-we-prune-rag-context
95•emil_sorensen•12h ago•15 comments

Resetting Xbox

https://news.xbox.com/en-us/2026/07/06/resetting-xbox/
586•dijksterhuis•17h ago•597 comments

Linux on the Atari Jaguar

https://cakehonolulu.github.io/linux-for-jaguar/
138•cakehonolulu•13h ago•25 comments

AMD Ryzen AI Halo – $4k AI Dev Kit

https://www.lttlabs.com/articles/2026/07/06/amd-ryzen-ai-halo
316•LabsLucas•16h ago•220 comments

OpenSSH 10.4/10.4p1 Released

https://www.openssh.org/txt/release-10.4
65•throw0101a•9h ago•15 comments

OfficeCLI: Office suite for AI agents to read and edit Microsoft Office files

https://github.com/iOfficeAI/OfficeCLI
166•maxloh•14h ago•49 comments

A 2048-spin bulk acoustic wave Ising machine for number partitioning and Sudoku

https://arxiv.org/abs/2607.02112
39•Jimmc414•3d ago•10 comments

Learning to code is still worthwhile

https://stevekrouse.com/learn-to-code
177•stevekrouse•10h ago•182 comments

Rotman Lens

https://en.wikipedia.org/wiki/Rotman_lens
103•thomasjb•5d ago•29 comments

Januscape: Guest-to-Host Escape in KVM/x86 [CVE-2026-53359]

https://github.com/V4bel/Januscape
102•Imustaskforhelp•14h ago•33 comments

M/PC – A Concatenative OS

https://wiki.xxiivv.com/site/m_pc.html
59•caminanteblanco•11h ago•10 comments

Kani: A Model Checker for Rust

https://arxiv.org/abs/2607.01504
141•Jimmc414•15h ago•7 comments

Full Writeup of the Windows GDID

https://github.com/SmtimesIWndr/gdid-reversal
64•typeofhuman•9h ago•30 comments

NSA and IETF: Fairness

https://blog.cr.yp.to/20260706-fairness.html
90•WatchDog•8h ago•80 comments

Evaluation order and nontermination in query languages

https://www.rntz.net/post/2026-06-11-datalog-nontermination.html
34•luu•5d ago•3 comments

EndBASIC 0.14: Are we multimedia yet?

https://www.endbasic.dev/2026/07/endbasic-0.14.html
37•jmmv•2d ago•7 comments

Using precision editing to study human embryo development shows master gene

https://www.cam.ac.uk/research/news/first-use-of-precision-editing-to-study-human-embryo-developm...
56•gmays•4d ago•45 comments

Show HN: InstantVideos.org – short documentaries in ~30 seconds

https://instantvideos.org/
19•pw•7h ago•19 comments

Clojure 1.13 adds support for checked keys

https://clojure.org/news/2026/07/02/clojure-1-13-alpha1
203•FelipeCortez•4d ago•43 comments

Poly/ML – A Standard ML Implementation

https://github.com/polyml/polyml
59•Lyngbakr•9h ago•18 comments