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.

Nobody Gets Promoted for Simplicity

https://terriblesoftware.org/2026/03/03/nobody-gets-promoted-for-simplicity/
263•aamederen•3h ago•152 comments

Motorola GrapheneOS devices will be bootloader unlockable/relockable

https://grapheneos.social/@GrapheneOS/116160393783585567
983•pabs3•14h ago•392 comments

Glaze by Raycast

https://www.glazeapp.com/
73•romac•1h ago•44 comments

Chimpanzees Are into Crystals

https://www.nytimes.com/2026/03/04/science/chimpanzees-crystals.html
28•jimnotgym•7h ago•9 comments

Qwen3.5 Fine-Tuning Guide – Unsloth Documentation

https://unsloth.ai/docs/models/qwen3.5/fine-tune
32•bilsbie•2h ago•7 comments

RFC 9849. TLS Encrypted Client Hello

https://www.rfc-editor.org/rfc/rfc9849.html
169•P_qRs•7h ago•74 comments

RE#: how we built the fastest regex engine in F#

https://iev.ee/blog/resharp-how-we-built-the-fastest-regex-in-fsharp/
107•exceptione•3d ago•42 comments

Apple Introduces MacBook Neo

https://www.apple.com/newsroom/2026/03/say-hello-to-macbook-neo/
150•dm•44m ago•173 comments

Agentic Engineering Patterns

https://simonwillison.net/guides/agentic-engineering-patterns/
296•r4um•10h ago•151 comments

Libre Solar – Open Hardware for Renewable Energy

https://libre.solar
19•evolve2k•3d ago•5 comments

Charging a three-cell nickel-based battery pack with a Li-Ion charger [pdf]

https://www.ti.com/lit/an/slyt468/slyt468.pdf
10•theblazehen•1d ago•0 comments

Jiga (YC W21) Is Hiring

https://jiga.io/about-us
1•grmmph•2h ago

Elevator Saga: The elevator programming game (2015)

https://play.elevatorsaga.com/index.html
50•xmprt•3d ago•7 comments

A CPU that runs entirely on GPU

https://github.com/robertcprice/nCPU
159•cypres•10h ago•85 comments

Greg Knauss Is Losing Himself

https://shapeof.com/archives/2026/2/greg_knauss_is_losing_himself.html
20•wallflower•2d ago•2 comments

Show HN: Stacked Game of Life

https://stacked-game-of-life.koenvangilst.nl/
94•vnglst•3d ago•17 comments

MacBook Neo

https://www.apple.com/macbook-neo/
150•meetpateltech•44m ago•162 comments

Better JIT for Postgres

https://github.com/vladich/pg_jitter
101•vladich•8h ago•40 comments

Bet on German Train Delays

https://bahn.bet
199•indiantinker•5h ago•140 comments

The JVG algorithm could break RSA-2048 encryption with fewer than 5k qubits

https://briefglance.com/articles/new-quantum-algorithm-warns-of-an-accelerated-crypto-apocalypse
8•giuliomagnifico•2h ago•7 comments

Modern Illustration: Archive of illustration from c.1950-1975

https://www.modernillustration.org
25•eustoria•3d ago•2 comments

Graphics Programming Resources

https://develop--gpvm-website.netlify.app/resources/
144•abetusk•12h ago•13 comments

Claude's Cycles [pdf]

https://www-cs-faculty.stanford.edu/~knuth/papers/claude-cycles.pdf
702•fs123•1d ago•294 comments

Show HN: I made a zero-copy coroutine tracer to find my scheduler's lost wakeups

https://github.com/lixiasky-back/coroTracer
36•lixiasky•1d ago•1 comments

Did Alibaba just kneecap its powerful Qwen AI team?

https://venturebeat.com/technology/did-alibaba-just-kneecap-its-powerful-qwen-ai-team-key-figures...
46•GTP•2h ago•17 comments

Apple Announces Low-Cost 'MacBook Neo' with A18 Pro Chip

https://www.macrumors.com/2026/03/04/apple-announces-low-cost-macbook-neo-with-a18-pro-chip/
30•vanburen•42m ago•7 comments

Weave – A language aware merge algorithm based on entities

https://github.com/Ataraxy-Labs/weave
160•rs545837•13h ago•91 comments

Voxile: A ray-traced game made in its own engine and programming language

https://elbowgreasegames.substack.com/p/voxray-games-pushes-major-update
241•spacemarine1•17h ago•65 comments

On the Design of Programming Languages (1974) [pdf]

https://web.cs.ucdavis.edu/~su/teaching/ecs240-w17/readings/PLHistoryGoodDesign.PDF
64•jruohonen•3d ago•22 comments

Textadept

https://orbitalquark.github.io/textadept/
175•giancarlostoro•3d ago•34 comments