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.

Nitter is unarchived and will continue

https://github.com/zedeus/nitter/commit/1428b4c2b4246f92a7e5b2673438e5fb39fcc4a3
143•zImPatrick•1h ago•35 comments

Your intellectual fly is open (2025)

https://bcantrill.dtrace.org/2025/12/05/your-intellectual-fly-is-open/
362•cyb0rg0•7h ago•246 comments

NetBSD 9.5 released and EOL for NetBSD-9

https://blog.netbsd.org/tnf/entry/netbsd_9_5_released_and
77•jaypatelani•3h ago•4 comments

Finder is so frustrating and has been since day one

https://kepter.app/finder
44•maltch•36m ago•33 comments

An Alien Mind

https://openai.com/index/an-alien-mind/
168•tosh•3h ago•112 comments

Isar Aerospace reaches orbit and deploys payloads on second flight

https://isaraerospace.com/press/history-for-european-spaceflight-isar-aerospace-reaches-orbit-and...
476•mpweiher•12h ago•152 comments

Research carried out using NetBSD

https://www.netbsd.org/gallery/research.html
43•Bluestein•3h ago•9 comments

A/I shuts down – Stay human

https://keepitfree.ai/announcements/a/i-shuts-down-stay-human/
376•captainmuon•5h ago•255 comments

Recreating Minecraft Is Not a Benchmark

https://kuber.studio/blog/Reflections/Recreating-Minecraft-is-Not-a-Benchmark
46•kuberwastaken•4h ago•34 comments

Following legal advice, the Nitter project will continue

https://github.com/zedeus/nitter
209•Cider9986•1h ago•48 comments

Opalite Health (YC W26) Is Hiring – Founding GTM

https://www.ycombinator.com/companies/opalite-health/jobs/bNedVAD-founding-gtm
1•ckuo9•2h ago

Doomscrolling Ourselves to Death

https://www.edwest.co.uk/p/doomscrolling-ourselves-to-death
277•shubhamjain•7h ago•193 comments

Research acceleration: The view inside OpenAI

https://openai.com/index/research-acceleration-view-inside-openai
60•iamsyr•4h ago•38 comments

Electronic skin for prosthetics to sense temperature and pressure

https://news.wsu.edu/press-release/2026/08/20/researchers-develop-electronic-skin-for-prosthetics...
19•gmays•4d ago•3 comments

Is There I/O After Death? What Happens to Io_uring When a Process Dies

https://blog.ydb.tech/is-there-i-o-after-death-what-happens-to-io-uring-when-a-process-dies-92c65...
42•porridgeraisin•3d ago•11 comments

M-DISC – DVD/Blu-ray compatible discs that may last up to 1000 years

https://en.wikipedia.org/wiki/M-DISC
156•gurjeet•4d ago•70 comments

Babylonian Lamb Stew with Beets (1750–1730 BCE)

https://babylonian-collection.yale.edu/about/babylonian-cooking
24•yubblegum•3d ago•17 comments

The revolt of the reader

https://bcantrill.dtrace.org/2026/09/05/the-revolt-of-the-reader/
538•chmaynard•22h ago•252 comments

Cloud in a Bottle: making self-hosting accessible to everyone

https://cloudinabottle.org/blog/launch-post
577•zplizzi•19h ago•283 comments

Asahi Linux Now Officially Supports Apple M3 Macs – With Caveats

https://www.phoronix.com/news/Asahi-Linux-Official-M3
209•mdp2021•5h ago•131 comments

I'm teaching an introductory 12 week course on Quantum Oracle Engineering

https://shukla.io/quantum-oracle-engineering/
41•BinRoo•6h ago•17 comments

QBittorrent breaks out of sandbox to commit crimes

https://beige.party/@intransitivelie/117057396732763183
1117•mraniki•6h ago•223 comments

The many mysteries and lessons of the Bayeux tapestry

https://economist.com/interactive/culture/2026/09/03/the-many-mysteries-and-lessons-of-the-bayeux...
50•andsoitis•6h ago•7 comments

Show HN: Kadō – open-source habit tracker, with non-binary habit score, for iOS

https://github.com/scastiel/kado
46•scastiel•5h ago•28 comments

Music Theory for Programmers

https://runjs.app/blog/music-theory-for-programmers
315•birdculture•3d ago•206 comments

IBM Quantum Nighthawk R2

https://www.ibm.com/quantum/blog/nighthawk-r2
68•fuglede_•3d ago•34 comments

The pencil case model of creativity

https://dub.uu.nl/en/column/pencil-case-model-creativity
50•jruohonen•7h ago•15 comments

Ganon's Mysterious Origins (Revisited)

https://www.thrillingtalesofoldvideogames.com/blog/ganon-name-origin-kamen-rider
19•tobr•23h ago•5 comments

Ask HN: UK Rescue Rocket Sheds/Houses Information

3•burnt-resistor•35m ago•1 comments

The ColorChecker, photography's most important 24 squares, turns 50

https://www.dpreview.com/news/the-colorchecker-photographys-most-important-24-squares-turns-50/
116•sohkamyung•4d ago•22 comments