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

Comments

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

I miss thinking hard

https://www.jernesto.com/articles/thinking_hard
79•jernestomg•1h ago•52 comments

Lessons learned shipping 500 units of my first hardware product

https://www.simonberens.com/p/lessons-learned-shipping-500-units
443•sberens•2d ago•201 comments

Data centers in space makes no sense

https://civai.org/blog/space-data-centers
372•ajyoon•9h ago•498 comments

Show HN: Craftplan – I built my wife a production management tool for her bakery

https://github.com/puemos/craftplan
175•deofoo•2d ago•21 comments

The largest zip tie is nearly 4 feet long and $75

https://www.thedrive.com/news/youll-have-that-on-those-big-jobs-the-worlds-largest-zip-tie-is-nea...
50•PaulHoule•5d ago•18 comments

Deno Sandbox

https://deno.com/blog/introducing-deno-sandbox
365•johnspurlock•11h ago•126 comments

Resurrecting Crimsonland – Decompiling and preserving a cult 2003 classic game

https://banteg.xyz/posts/crimsonland/
69•banteg•2d ago•20 comments

Xcode 26.3 – Developers can leverage coding agents directly in Xcode

https://www.apple.com/newsroom/2026/02/xcode-26-point-3-unlocks-the-power-of-agentic-coding/
269•davidbarker•10h ago•221 comments

Agent Skills

https://agentskills.io/home
407•mooreds•14h ago•218 comments

AliSQL: Alibaba's open-source MySQL with vector and DuckDB engines

https://github.com/alibaba/AliSQL
168•baotiao•10h ago•22 comments

New York’s budget bill would require “blocking technology” on all 3D printers

https://blog.adafruit.com/2026/02/03/new-york-wants-to-ctrlaltdelete-your-3d-printer/
316•ptorrone•13h ago•343 comments

221 Cannon is Not For Sale

https://fredbenenson.com/blog/2026/02/03/221-cannon-is-not-for-sale/
208•mecredis•12h ago•166 comments

Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust

https://github.com/j178/prek
207•fortuitous-frog•12h ago•100 comments

FlashAttention-T: Towards Tensorized Attention

https://dl.acm.org/doi/10.1145/3774934.3786425
85•matt_d•7h ago•46 comments

Y Combinator will let founders receive funds in stablecoins

https://fortune.com/2026/02/03/famed-startup-incubator-y-combinator-to-let-founders-receive-funds...
101•shscs911•10h ago•132 comments

1,400-year-old tomb featuring giant owl sculpture discovered in Mexico

https://www.cnn.com/2026/01/29/science/zapotec-tomb-mexico-scli-intl
73•breve•4d ago•10 comments

Qwen3-Coder-Next

https://qwen.ai/blog?id=qwen3-coder-next
604•danielhanchen•12h ago•375 comments

Notepad++ supply chain attack breakdown

https://securelist.com/notepad-supply-chain-attack/118708/
219•natebc•6h ago•102 comments

France dumps Zoom and Teams as Europe seeks digital autonomy from the US

https://apnews.com/article/europe-digital-sovereignty-big-tech-9f5388b68a0648514cebc8d92f682060
843•AareyBaba•12h ago•450 comments

Reimplementing Tor from Scratch for a Single-Hop Proxy

https://foxmoss.com/blog/kurrat/
4•Agreed3750•2d ago•0 comments

X offices raided in France as UK opens fresh investigation into Grok

https://www.bbc.com/news/articles/ce3ex92557jo
255•vikaveri•18h ago•462 comments

Puget Systems Most Reliable Hardware of 2025

https://www.pugetsystems.com/labs/articles/puget-systems-most-reliable-hardware-of-2025/
103•zdw•4d ago•40 comments

Bunny Database

https://bunny.net/blog/meet-bunny-database-the-sql-service-that-just-works/
263•dabinat•16h ago•110 comments

Reference Target: having your encapsulation and eating it too

https://blogs.igalia.com/alice/reference-target-having-your-encapsulation-and-eating-it-too/
10•todsacerdoti•3d ago•0 comments

Heritability of intrinsic human life span is about 50%

https://www.science.org/doi/10.1126/science.adz1187
147•XzetaU8•2d ago•96 comments

Launch HN: Modelence (YC S25) – App Builder with TypeScript / MongoDB Framework

67•eduardpi•12h ago•39 comments

Machinery and English Style (1904)

https://www.theatlantic.com/magazine/archive/1904/10/machinery-and-english-style/637506/
6•danidiaz•2d ago•1 comments

1 kilobyte is precisely 1000 bytes?

https://waspdev.com/articles/2026-01-11/kilobyte-is-1000-bytes
82•surprisetalk•12h ago•258 comments

Flying Around the World in under 80 Days

https://pinchito.es/2026/avis-lxxx
46•alexfernandez•2d ago•11 comments

China Moon Mission: Aiming for 2030 lunar landing

https://spectrum.ieee.org/china-moon-mission-mengzhou-artemis
122•rbanffy•9h ago•131 comments