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

Comments

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

Google Safe Browsing missed 84% of phishing sites we found in February

https://www.norn-labs.com/blog/huginn-report-feb-2026
76•jdup7•1h ago•31 comments

Show HN: Jido 2.0, Elixir Agent Framework

https://jido.run/blog/jido-2-0-is-here
40•mikehostetler•34m ago•5 comments

Judge Orders Government to Begin Refunding More Than $130B in Tariffs

https://www.wsj.com/politics/policy/judge-orders-government-to-begin-refunding-more-than-130-bill...
461•JumpCrisscross•2h ago•361 comments

Good software knows when to stop

https://ogirardot.writizzy.com/p/good-software-knows-when-to-stop
57•ssaboum•2h ago•29 comments

Nvidia PersonaPlex 7B on Apple Silicon: Full-Duplex Speech-to-Speech in Swift

https://blog.ivan.digital/nvidia-personaplex-7b-on-apple-silicon-full-duplex-speech-to-speech-in-...
267•ipotapov•8h ago•85 comments

Fast-Servers

https://geocar.sdf1.org/fast-servers.html
28•tosh•2h ago•13 comments

Google Workspace CLI

https://github.com/googleworkspace/cli
781•gonzalovargas•16h ago•257 comments

Relicensing with AI-Assisted Rewrite

https://tuananh.net/2026/03/05/relicensing-with-ai-assisted-rewrite/
285•tuananh•11h ago•285 comments

World-first gigabit laser link between aircraft and geostationary satellite

https://www.esa.int/Applications/Connectivity_and_Secure_Communications/World-first_gigabit-per-s...
87•giuliomagnifico•3d ago•36 comments

The L in "LLM" Stands for Lying

https://acko.net/blog/the-l-in-llm-stands-for-lying/
496•LorenDB•12h ago•318 comments

The Man Who Broke into Jail

https://www.newyorker.com/magazine/2026/03/09/alexander-friedmann-profile-prison-reform
25•fortran77•1d ago•10 comments

Intelligence is a commodity. Context is the real AI Moat

https://adlrocha.substack.com/p/adlrocha-intelligence-is-a-commodity
41•adlrocha•4d ago•4 comments

Poor Man's Polaroid

https://boxart.lt/blog/poor_mans_polaroid
122•ZacnyLos•8h ago•42 comments

Smalltalk's Browser: Unbeatable, yet Not Enough

https://blog.lorenzano.eu/smalltalks-browser-unbeatable-yet-not-enough/
99•mpweiher•8h ago•35 comments

AMD will bring its “Ryzen AI” processors to standard desktop PCs for first time

https://arstechnica.com/gadgets/2026/03/amd-ryzen-ai-400-cpus-will-bring-upgraded-graphics-to-soc...
168•Bender•3d ago•143 comments

Building a new Flash

https://bill.newgrounds.com/news/post/1607118
639•TechPlasma•20h ago•209 comments

Arabic document from 17th-cent. rubbish heap confirms semi-legendary Nubian king

https://phys.org/news/2026-02-arabic-document-17th-century-rubbish.html
101•wglb•2d ago•31 comments

Jails for NetBSD – Kernel Enforced Isolation and Native Resource Control

https://netbsd-jails.petermann-digital.de/
69•vermaden•8h ago•16 comments

Billy bookshelves as a retro motherboard "rack"

https://rubenerd.com/billy-bookcase-as-a-retro-motherboard-rack/
40•ingve•4d ago•31 comments

Something is afoot in the land of Qwen

https://simonwillison.net/2026/Mar/4/qwen/
748•simonw•1d ago•319 comments

OpenBSD on SGI: A Rollercoaster Story

http://miod.online.fr/software/openbsd/stories/sgiall.html
61•brynet•10h ago•2 comments

The IRIX 6.5.7M (sgi) source code

https://github.com/calmsacibis995/irix-657m-src
17•reconnecting•1h ago•7 comments

MacBook Neo

https://www.apple.com/newsroom/2026/03/say-hello-to-macbook-neo/
1873•dm•1d ago•2174 comments

No right to relicense this project

https://github.com/chardet/chardet/issues/327
379•robin_reala•7h ago•244 comments

Earth Garden: Field Recordings Around the World

https://earth-garden.alen.ro/
33•alentodorov•1d ago•10 comments

BMW Group to deploy humanoid robots in production in Germany for the first time

https://www.press.bmwgroup.com/global/article/detail/T0455864EN/bmw-group-to-deploy-humanoid-robo...
193•JeanKage•19h ago•210 comments

US tech firms pledge at White House to bear costs of energy for datacenters

https://www.theguardian.com/us-news/2026/mar/04/us-tech-companies-energy-cost-pledge-white-house
135•geox•14h ago•159 comments

Rising carbon dioxide levels now detected in human blood

https://phys.org/news/2026-02-carbon-dioxide-human-blood.html
82•wkrsz•1h ago•86 comments

Picking Up a Zillion Pieces of Litter

https://www.sixstepstobetterhealth.com/litter.html
180•colinbartlett•3d ago•63 comments

Dulce et Decorum Est (1921)

https://www.poetryfoundation.org/poems/46560/dulce-et-decorum-est
178•bikeshaving•18h ago•89 comments