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.

How I use Claude Code: Separation of planning and execution

https://boristane.com/blog/how-i-use-claude-code/
567•vinhnx•10h ago•347 comments

Show HN: Elecxzy – A lightweight, Lisp-free Emacs-like editor in Electron

https://github.com/kurouna/elecxzy
8•kurouna•22h ago•8 comments

Japanese Woodblock Print Search

https://ukiyo-e.org/
107•curmudgeon22•7h ago•20 comments

Back to FreeBSD: Part 1

https://hypha.pub/back-to-freebsd-part-1
32•enz•3h ago•4 comments

How far back in time can you understand English?

https://www.deadlanguagesociety.com/p/how-far-back-in-time-understand-english
550•spzb•3d ago•301 comments

How Taalas “prints” LLM onto a chip?

https://www.anuragk.com/blog/posts/Taalas.html
149•beAroundHere•15h ago•75 comments

Two Bits Are Better Than One: making bloom filters 2x more accurate

https://floedb.ai/blog/two-bits-are-better-than-one-making-bloom-filters-2x-more-accurate
105•matheusalmeida•5d ago•17 comments

Show HN: Llama 3.1 70B on a single RTX 3090 via NVMe-to-GPU bypassing the CPU

https://github.com/xaskasdf/ntransformer
254•xaskasdf•14h ago•61 comments

Gamedate – A site to revive dead multiplayer games

https://gamedate.org/
125•msuniverse2026•1d ago•13 comments

Evidence of the bouba-kiki effect in naïve baby chicks

https://www.science.org/doi/10.1126/science.adq7188
136•suddenlybananas•13h ago•39 comments

A Botnet Accidentally Destroyed I2P

https://www.sambent.com/a-botnet-accidentally-destroyed-i2p-the-full-story/
113•Cider9986•9h ago•71 comments

Parse, Don't Validate and Type-Driven Design in Rust

https://www.harudagondi.space/blog/parse-dont-validate-and-type-driven-design-in-rust/
195•todsacerdoti•15h ago•46 comments

Show HN: Minimalist Glitch Art Maker (100% client-side)

https://yuyz0112.github.io/glitch-art-maker/
11•yz-yu•5d ago•5 comments

Unreal Numbers

https://lcamtuf.substack.com/p/unreal-numbers
5•surprisetalk•4d ago•0 comments

Claws are now a new layer on top of LLM agents

https://twitter.com/karpathy/status/2024987174077432126
308•Cyphase•1d ago•743 comments

zclaw: personal AI assistant in under 888 KB, running on an ESP32

https://github.com/tnm/zclaw
179•tosh•22h ago•98 comments

CXMT has been offering DDR4 chips at about half the prevailing market rate

https://www.koreaherald.com/article/10679206
209•phront•20h ago•191 comments

Toyota’s hydrogen-powered Mirai has experienced rapid depreciation

https://carbuzz.com/toyota-mirai-massive-depreciation-one-year/
152•iancmceachern•16h ago•341 comments

Coccinelle: Source-to-source transformation tool

https://github.com/coccinelle/coccinelle
101•anon111332142•1d ago•28 comments

Scientists discover recent tectonic activity on the moon

https://phys.org/news/2026-02-scientists-tectonic-moon.html
55•bookmtn•4d ago•3 comments

I verified my LinkedIn identity. Here's what I handed over

https://thelocalstack.eu/posts/linkedin-identity-verification-privacy/
1284•ColinWright•1d ago•439 comments

How I launched 3 consoles and found true love at Babbage's store no. 9 (2013)

https://arstechnica.com/gadgets/2013/01/how-i-launched-3-consoles-and-found-true-love-at-babbages...
17•zepearl•2d ago•8 comments

Canvas_ity: A tiny, single-header <canvas>-like 2D rasterizer for C++

https://github.com/a-e-k/canvas_ity
101•PaulHoule•16h ago•35 comments

Carelessness versus craftsmanship in cryptography

https://blog.trailofbits.com/2026/02/18/carelessness-versus-craftsmanship-in-cryptography/
32•ingve•3d ago•6 comments

A16z partner says that the theory that we’ll vibe code everything is wrong

https://www.aol.com/articles/a16z-partner-says-theory-well-050150534.html
145•paulpauper•1d ago•205 comments

Keep Android Open

https://f-droid.org/2026/02/20/twif.html
2089•LorenDB•1d ago•699 comments

The Human Root of Trust – public domain framework for agent accountability

https://humanrootoftrust.org/
17•3du4rd0v3g4•21h ago•6 comments

Inputlag.science – Repository of knowledge about input lag in gaming

https://inputlag.science
93•akyuu•15h ago•30 comments

Permacomputing

https://wiki.xxiivv.com/site/permacomputing.html
153•tosh•4d ago•38 comments

Don't create .gitkeep files, use .gitignore instead (2023)

https://adamj.eu/tech/2023/09/18/git-dont-create-gitkeep/
151•frou_dh•1d ago•85 comments