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.

Show HN: An e-ink frame that hears birds and draws them as 1800s illustrations

https://github.com/arnegiacomo/fugleramme
599•arnemunthekaas•4h ago•94 comments

Swift 6.4 Released

https://www.swift.org/blog/swift-6.4-released/
82•timsneath•59m ago•31 comments

Cartesian – AI 3D Modeling for Design

https://www.formas.ai/cartesian
32•eustoria•1h ago•19 comments

Show HN: Capsule – Single-file web apps that save their data into SQLite

https://withcapsule.app/
123•bashtian•3h ago•65 comments

Show HN: Hacking a $20 4G wireless hotspot into a texting device

https://bkovac.github.io/modem-thing/
99•bobili1234•3h ago•14 comments

I can't stop thinking about Papua New Guinea

https://notnottalmud.substack.com/p/why-i-cant-stop-thinking-about-papua
697•networked•10h ago•301 comments

Java 27 Released

https://mail.openjdk.org/archives/list/announce@openjdk.org/thread/ORGGLMN75HFEWP7YL3ZLGHLYHVIBJDYT/
237•mkurz•3h ago•178 comments

Giving up on smart rings

https://notesbylex.com/giving-up-on-smart-rings
16•lexandstuff•2d ago•19 comments

A Man Archiving Pirate Radio Station Kool FM

https://londonist.com/london/music/kool-fm-archives
36•rdmuser•1d ago•14 comments

The CSS Zen Garden dream shipped

https://josprague.com/blog/the-css-zen-garden-dream-finally-shipped/
20•yosito•1h ago•6 comments

25 Years of Mass Surveillance Is Enough

https://www.schneier.com/blog/archives/2026/09/25-years-of-mass-surveillance-is-enough.html
487•iamnothere•5h ago•148 comments

Closing the IPv6 First-Packet Gap with Grand

https://labs.ripe.net/author/pouria/closing-the-ipv6-first-packet-gap-with-grand/
9•m_montazeri•1h ago•0 comments

Sony's First Computer – The SMC-70 from 1982 [video]

https://www.youtube.com/watch?v=cT2-7KkPkBc
37•ksymph•2d ago•3 comments

Show HN: Panel – A research workspace where the agent can build its own panes

https://github.com/greentfrapp/panel
28•greentfrapp•2h ago•4 comments

Alternatives to MinIO for single-node local S3

https://rmoff.net/2026/01/14/alternatives-to-minio-for-single-node-local-s3/
170•rmoff•8h ago•75 comments

Splash-free urinals: Design through physics and differential equations

https://academic.oup.com/pnasnexus/article/4/4/pgaf087/8098745
3•gradus_ad•27m ago•1 comments

CSS-Tricks in Limbo

https://vale.rocks/micros/20260915-0135
193•edent•9h ago•73 comments

Show HN: Ordewell – turn one goal into an ordered plan of coding-agent tasks

https://github.com/ordewell/ordewell
29•ac-ciano•3h ago•24 comments

The bitter lesson of browser agents

https://browser-use.com/posts/bitter-lesson-browser-agents
8•gregpr07•1h ago•2 comments

Inverse-Square Law

https://blog.coredump.cx/p/inverse-square-law
38•surprisetalk•1d ago•7 comments

What we have learned at OpenShell applying formal methods to control AI agents

https://nvidia.github.io/OpenShell-Research/dev-notes/posts/2026-09-10-learning-formal-methods-ag...
10•alexwatson405•1h ago•4 comments

OpenArm: An open-source 7DOF humanoid arm

https://github.com/enactic/OpenArm
189•Lwrless•2d ago•39 comments

Suspected sabotage causes major Netherlands rail disruption

https://www.bbc.com/news/articles/c8ly49w9g1edo
345•choult•6h ago•338 comments

Lingo.dev (YC F24) is hiring a senior content engineer (Remote, worldwide)

https://lingo.dev/en/careers/ff88132a-cb79-4d35-a6a0-a6230de7a013
1•maxpr•9h ago

25 Years of Mass Surveillance Is Enough [Auth: Cindy Cohn; Bruce Schneier]

https://www.lawfaremedia.org/article/25-years-of-mass-surveillance-is-enough
117•mdp2021•4h ago•6 comments

US confirms for first time it has deployed space weapons

https://www.bbc.com/news/articles/ck790xg41ygro
268•harporoeder•12h ago•169 comments

The k-server conjecture is true

https://arxiv.org/abs/2609.15979
82•iamsyr•8h ago•35 comments

Global bond yields hit 2008 highs, raising stakes for big borrowers

https://www.reuters.com/world/asia-pacific/bond-selloff-drives-us-benchmark-beyond-5-stocks-rattl...
121•kaycebasques•2h ago•118 comments

OpenAI buys smartphone camera maker Glass Imaging for $300M

https://techcrunch.com/2026/09/14/openai-buys-smartphone-camera-maker-glass-imaging-for-300-milli...
108•myth_drannon•4h ago•74 comments

GRP-Obliteration: Unaligning LLMs with a Single Unlabeled Prompt

https://arxiv.org/abs/2602.06258
6•vital101•2h ago•0 comments