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.

Filing the corners off my MacBooks

https://kentwalters.com/posts/corners/
554•normanvalentine•6h ago•296 comments

Artemis II safely splashes down

https://www.cbsnews.com/live-updates/artemis-ii-splashdown-return/
636•areoform•4h ago•238 comments

1D Chess

https://rowan441.github.io/1dchess/chess.html
729•burnt-resistor•13h ago•133 comments

Chimpanzees in Uganda locked in eight-year 'civil war', say researchers

https://www.bbc.com/news/articles/cr71lkzv49po
277•neversaydie•9h ago•142 comments

Installing every* Firefox extension

https://jack.cab/blog/every-firefox-extension
237•RohanAdwankar•7h ago•27 comments

Bevy game development tutorials and in-depth resources

https://taintedcoders.com/
37•GenericCanadian•2d ago•2 comments

WireGuard makes new Windows release following Microsoft signing resolution

https://lists.zx2c4.com/pipermail/wireguard/2026-April/009561.html
428•zx2c4•13h ago•113 comments

Industrial design files for Keychron keyboards and mice

https://github.com/Keychron/Keychron-Keyboards-Hardware-Design
337•stingraycharles•12h ago•106 comments

AI assistance when contributing to the Linux kernel

https://github.com/torvalds/linux/blob/master/Documentation/process/coding-assistants.rst
233•hmokiguess•10h ago•157 comments

A practical guide for setting up Zettelkasten method in Obsidian

https://desktopcommander.app/blog/zettelkasten-obsidian/
19•rkrizanovskis•1d ago•4 comments

Investigating Split Locks on x86-64

https://chipsandcheese.com/p/investigating-split-locks-on-x86
38•ingve•2d ago•8 comments

JSON formatter Chrome plugin now closed and injecting adware

https://github.com/callumlocke/json-formatter
180•jkl5xx•10h ago•98 comments

Italo Calvino: A traveller in a world of uncertainty

https://www.historytoday.com/archive/portrait-author-historian/italo-calvino-traveller-world-unce...
51•lermontov•5h ago•11 comments

Helium is hard to replace

https://www.construction-physics.com/p/helium-is-hard-to-replace
276•JumpCrisscross•13h ago•190 comments

CPU-Z and HWMonitor compromised

https://www.theregister.com/2026/04/10/cpuid_site_hijacked/
289•pashadee•15h ago•85 comments

Starfling: A one-tap endless orbital slingshot game in a single HTML file

https://playstarfling.com
9•iceberger2001•2d ago•3 comments

What is RISC-V and why it matters to Canonical

https://ubuntu.com/blog/risc-v-101-what-is-it-and-what-does-it-mean-for-canonical
110•fork-bomber•2d ago•70 comments

Sam Altman's response to Molotov cocktail incident

https://blog.samaltman.com/2279512
246•jack_hanford•5h ago•499 comments

The Bra-and-Girdle Maker That Fashioned the Impossible for NASA

https://thereader.mitpress.mit.edu/the-bra-and-girdle-maker-that-fashioned-the-impossible-for-nasa/
62•sohkamyung•1d ago•4 comments

Launch HN: Twill.ai (YC S25) – Delegate to cloud agents, get back PRs

https://twill.ai
63•danoandco•12h ago•56 comments

Watgo – A WebAssembly Toolkit for Go

https://eli.thegreenplace.net/2026/watgo-a-webassembly-toolkit-for-go/
84•ibobev•10h ago•6 comments

PGLite Evangelism

https://substack.com/home/post/p-193415720
42•surprisetalk•1d ago•5 comments

A compelling title that is cryptic enough to get you to take action on it

https://ericwbailey.website/published/a-compelling-title-that-is-cryptic-enough-to-get-you-to-tak...
185•mooreds•12h ago•105 comments

Intel 486 CPU announced April 10, 1989

https://dfarq.homeip.net/intel-486-cpu-announced-april-10-1989/
153•jnord•17h ago•146 comments

Nowhere is safe

https://steveblank.com/2026/04/09/nowhere-is-safe/
160•sblank•9h ago•198 comments

OpenClaw’s memory is unreliable, and you don’t know when it will break

https://blog.nishantsoni.com/p/ive-seen-a-thousand-openclaw-deploys
85•sonink•10h ago•98 comments

Quien – A better WHOIS lookup tool

https://github.com/retlehs/quien/
10•bretthopper•1h ago•1 comments

Show HN: FluidCAD – Parametric CAD with JavaScript

https://fluidcad.io/
119•maouida•10h ago•21 comments

Bild AI (YC W25) Is Hiring a Founding Product Engineer

https://www.ycombinator.com/companies/bild-ai/jobs/dDMaxVN-founding-product-engineer
1•rooppal•12h ago

Clojure on Fennel Part One: Persistent Data Structures

https://andreyor.st/posts/2026-04-07-clojure-on-fennel-part-one-persistent-data-structures/
140•roxolotl•4d ago•11 comments