frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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•11mo ago

Comments

yxhuvud•11mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•11mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•11mo 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•11mo 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•11mo 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•11mo 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.

New 10 GbE USB adapters are cooler, smaller, cheaper

https://www.jeffgeerling.com/blog/2026/new-10-gbe-usb-adapters-cooler-smaller-cheaper/
94•calcifer•2h ago•22 comments

Google plans to invest up to $40B in Anthropic

https://www.bloomberg.com/news/articles/2026-04-24/google-plans-to-invest-up-to-40-billion-in-ant...
557•elffjs•16h ago•540 comments

A 3D Body from Eight Questions – No Photo, No GPU

https://clad.you/blog/posts/questionnaire-mlp/
44•arkadiuss•2d ago•7 comments

Paraloid B-72

https://en.wikipedia.org/wiki/Paraloid_B-72
169•Ariarule•3d ago•25 comments

Humpback whales are forming super-groups

https://www.bbc.com/future/article/20260416-the-humpback-super-groups-swarming-the-seas
94•andsoitis•3d ago•43 comments

"Plain text has been around for decades and it's here to stay." – Unsung

https://unsung.aresluna.org/plain-text-has-been-around-for-decades-and-its-here-to-stay/
77•rbanffy•7h ago•15 comments

My audio interface has SSH enabled by default

https://hhh.hn/rodecaster-duo-fw/
232•hhh•12h ago•76 comments

Replace IBM Quantum back end with /dev/urandom

https://github.com/yuvadm/quantumslop/blob/25ad2e76ae58baa96f6219742459407db9dd17f5/URANDOM_DEMO.md
138•pigeons•7h ago•16 comments

Turbo Vision 2.0 – a modern port

https://github.com/magiblot/tvision
101•andsoitis•4h ago•19 comments

Sabotaging projects by overthinking, scope creep, and structural diffing

https://kevinlynagh.com/newsletter/2026_04_overthinking/
419•alcazar•17h ago•106 comments

Iliad fragment found in Roman-era mummy

https://www.thehistoryblog.com/archives/75877
168•wise_blood•2d ago•48 comments

(Blender) Cosmology with Geometry Nodes

https://www.blender.org/user-stories/cosmology-with-geometry-nodes/
47•shankysingh•7h ago•1 comments

The Classic American Diner

https://blogs.loc.gov/picturethis/2026/04/the-classic-american-diner/
214•NaOH•13h ago•129 comments

There Will Be a Scientific Theory of Deep Learning

https://arxiv.org/abs/2604.21691
221•jamie-simon•14h ago•93 comments

A Powerful New 'QR Code' Untangles Math's Knottiest Knots

https://www.quantamagazine.org/a-powerful-new-qr-code-untangles-maths-knottiest-knots-20260422/
6•defrost•2d ago•0 comments

Work with the garage door up (2024)

https://notes.andymatuschak.org/Work_with_the_garage_door_up
155•jxmorris12•3d ago•113 comments

Firefox Has Integrated Brave's Adblock Engine

https://itsfoss.com/news/firefox-ships-brave-adblock-engine/
193•nreece•6h ago•95 comments

Education must go beyond the mere production of words

https://www.ncregister.com/commentaries/schnell-repairing-the-ruins
54•signor_bosco•8h ago•16 comments

The mail sent to a video game publisher

https://www.gamefile.news/p/panic-mail-arco-despelote-time-flies-thank-goodness-teeth
18•colinprince•3d ago•0 comments

MacBook Neo and how the iPad should be

https://craigmod.com/essays/ipad_neo/
264•jen729w•2d ago•147 comments

Email could have been X.400 times better

https://buttondown.com/blog/x400-vs-smtp-email
168•maguay•2d ago•148 comments

ENIAC's Architects Wove Stories Through Computing

https://spectrum.ieee.org/eniac-80th-anniversary-weaving
10•sohkamyung•3d ago•0 comments

Open source memory layer so any AI agent can do what Claude.ai and ChatGPT do

https://alash3al.github.io/stash?_v01
25•alash3al•7h ago•6 comments

DeepSeek v4

https://api-docs.deepseek.com/news/news260424
1888•impact_sy•1d ago•1473 comments

Show HN: I've built a nice home server OS

https://lightwhale.asklandd.dk/
112•Zta77•10h ago•45 comments

You don't want long-lived keys

https://argemma.com/blog/long-lived-keys/
53•kkl•3d ago•34 comments

Reverse-engineering infrared-based electronic shelf labels

https://www.furrtek.org/?a=esl
21•pabs3•3d ago•2 comments

Diatec, known for its mechanical keyboard brand FILCO, has ceased operations

https://gigazine.net/gsc_news/en/20260424-filco-diatec/
116•gslin•16h ago•42 comments

The Overtom Chess Computer Museum

https://tluif.home.xs4all.nl/chescom/Engindex.html
33•semyonsh•2d ago•6 comments

PCR is a surprisingly near-optimal technology

https://nikomc.com/2026/04/22/pcr/
11•mailyk•2d ago•0 comments