frontpage.
newsnewestaskshowjobs

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•1y ago

Comments

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

Creepy Crawlies

https://people.kernel.org/monsieuricon/creepy-crawlies
266•zdw•22h ago•111 comments

Omarchy: Any User Process Can Escalate to Root

https://0xcc.io/posts/omarchy-root-creds/
38•trap0xcc•44m ago•15 comments

Haiku R1/beta6 has been released

https://www.haiku-os.org/news/2026-08-26_haiku_r1_beta6
41•metrofun•43m ago•6 comments

Hacking IKEA Furniture

https://greenlightning.eu/diy/hacking-ikea-furniture/
148•greenlightning•5h ago•74 comments

Casey Muratori – The Root of the Root of All Evil – BSC 2026 [video]

https://www.youtube.com/watch?v=hpj6r6CjJf8
186•surprisetalk•3d ago•81 comments

European Commission Revives Push for Encryption Backdoors in ProtectEU Strategy

https://reclaimthenet.org/eu-protecteu-strategy-encryption-backdoor-law-enforcement
74•nickslaughter02•1h ago•16 comments

Arbitrary code execution in QubesOS via copy-to-VM error reporting backchannel

https://www.qubes-os.org/news/2026/08/29/qsb-118/
147•vntok•7h ago•61 comments

Coordination Headwind: How Organizations Are Like Slime Molds

https://komoroske.com/slime-mold/
7•rzk•41m ago•1 comments

Longest Straight Line Paths on Water or Land on the Earth (2018)

https://arxiv.org/abs/1804.07389
162•joebig•8h ago•48 comments

Europe's summer drought is so extreme that desertification is a growing threat

https://fortune.com/2026/08/29/europe-summer-drought-desertification-threat-rivers-fish/
79•Brajeshwar•2h ago•68 comments

Dad's Custom Atari Peripherals – By Jim Trageser

https://www.goto10retro.com/p/dads-custom-atari-peripherals
22•rbanffy•2d ago•6 comments

When fruit is scarce, these monkeys hunt animals

https://www.smithsonianmag.com/smart-news/when-fruit-is-scarce-these-monkeys-hunt-animals-the-beh...
26•cisc•1d ago•4 comments

Electric rain can eat through metal

https://www.scientificamerican.com/article/electric-rain-can-eat-through-metal/
5•sohkamyung•3d ago•0 comments

An implementation of Conway's Game of Life for Windows 3.1x and later

https://www.muppetlabs.com/~breadbox/software/windows.html
32•Bluestein•5h ago•4 comments

What my dad taught me about AI coding in the 90s

https://askmike.org/articles/ai-coding-lessons-in-the-90s-from-my-dad/
77•askmike•6d ago•39 comments

Bug Blindness

https://danluu.com/bug-blind/
339•davidmckenna•16h ago•214 comments

Claude Session URL appended to commit messages and PR descriptions by default

https://github.com/anthropics/claude-code/issues/66504
107•sparsesignal•3h ago•130 comments

RISC-V is now officially supported by CPython

https://blog.python.org/2026/08/riscv-now-officially-supported/
257•lumpa•5d ago•45 comments

Building my own network stack

https://blog.lyc8503.net/en/post/dn42-2-dnet/
64•uneven9434•6h ago•61 comments

Automating Immersive Reading

https://smoores.dev/post/automating_immersive_reading/
46•smoores•4h ago•16 comments

monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter

https://github.com/fugue-labs/monty-go
31•networked•4h ago•5 comments

Hy4 preview

https://www.tencent.com/tencent-releases-and-open-sources-tencent-hy4-preview/
361•shenli3514•21h ago•221 comments

JupyterGIS 0.16: a grammar of graphics for maps, and collaborative story maps

https://blog.jupyter.org/jupytergis-0-16-new-visualization-capabilities-collaborative-story-maps-...
76•arjxn-py•5d ago•9 comments

Orbs

https://ampcode.com/notes/orbs-explained
66•tosh•4d ago•26 comments

California lawmakers unanimously pass Linux exemption from age-verification law

https://www.tomshardware.com/software/linux/california-lawmakers-unanimously-pass-linux-exemption...
567•shscs911•13h ago•261 comments

The Einstein-Szilard Refrigerator (2020)

https://invention.si.edu/invention-stories/einstein-szilard-refrigerator
86•EndXA•3d ago•38 comments

One Nix flake to rule them all

https://fzakaria.com/2026/08/28/one-flake-to-rule-them-all
55•ingve•5h ago•5 comments

Zig: Pointer Stability for ArrayLists

https://ziglang.org/devlog/2026/#2026-08-27
5•tosh•2h ago•0 comments

FreeCORE TrueNAS Core – Continued

https://freecore.org/
156•sashk•15h ago•82 comments

Tether: iMessage, SMS, etc. on Linux

https://zackbartel.com/blog/2026/08/tether/
514•zackb•6d ago•206 comments