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.

NVIDIA Announces CEO Transition

https://nvidianews.nvidia.com/news/nvidia-announces-ceo-transition
1546•lldb•3h ago•1633 comments

Anthropic IPO

https://ipo.anthropic.com/us/
591•josephljohnston•6h ago•610 comments

Abandoned Quake 4 expansion finished by modders and now playable

https://www.moddb.com/mods/openq4/downloads/openq4-0141-windows-x64
129•klaussilveira•3h ago•46 comments

I'm making LLMs work on small and old devices

https://github.com/hyperionaidev/smolmaxxing/
85•mrashad74•2h ago•22 comments

Talking Zen 6 with Mike Clark at AMD In-Depth

https://chipsandcheese.com/p/talking-zen-6-with-mike-clark-at
104•dverlaeckt80•3h ago•1 comments

ExcalidrawZ: Local Native Excalidraw on macOS/iOS

https://github.com/chocoford/ExcalidrawZ
44•Qision•2h ago•9 comments

Why Writing Correct Software Is Hard

https://pron.github.io/posts/correctness-and-complexity
274•AriFordsham•7h ago•118 comments

Libreagi – Save OSS Models

https://libreagi.com/
69•satuke•3h ago•16 comments

Running web sites makes me not want to

https://lowkey.party/running-web-sites-makes-me-not-want-to
47•speckx•3h ago•27 comments

Fitting Four 32 GB Resizable Bars Behind a PCIe Switch on Linux

https://doug.sh/posts/gpu-bars-behind-a-pcie-switch/
38•dougcalobrisi•2h ago•15 comments

Nintendo Takes Down Emulators and Firmware in Massive GitHub DMCA Sweep

https://www.ign.com/articles/nintendo-takes-down-switch-emulators-and-mod-chip-firmware-in-massiv...
71•CharlesW•1h ago•31 comments

Socratic Tutor

https://github.com/janestreet/agent_skills/blob/master/socratic-tutor/SKILL.md
548•tosh•2d ago•129 comments

AWS Lambda Web Functions keep billing memory ~7 minutes after the last request

https://www.easel.sh/blog/lambda-web-functions-idle-memory
24•seanw265•50m ago•8 comments

Paths in Pieces

https://stoppels.ch/2026/11/12/paths-in-pieces.html
6•acossta•30m ago•0 comments

Electric Ship Batteries Promise Compact, Cooler Power

https://spectrum.ieee.org/electric-ship-batteries
40•rbanffy•3h ago•34 comments

A live tree of systemd jobs on the boot console

https://codeberg.org/wvhulle/bootvine
283•orhunp_•3d ago•108 comments

Researchers discover rare star system that emits radio signals every 8 minutes

https://www.curtin.edu.au/news/media-release/researchers-discover-rare-star-system-that-emits-rad...
82•giuliomagnifico•7h ago•45 comments

93% of paint splatters are valid Perl programs (2019)

https://www.mcmillen.dev/sigbovik/
548•zenincognito•19h ago•73 comments

Decoding REXPaint Files in Odin

https://tylerelton.com/posts/decoding-rexpaint-files-in-odin/
8•tylerelton•2d ago•1 comments

Pulling the Lever in a Subway Problem

https://www.jefftk.com/p/pulling-the-lever-in-a-subway-problem
16•NaOH•22h ago•16 comments

Critical RCE Vulnerability in Apache HTTP Server

https://www.wiz.io/blog/cve-2026-119618-rce-apache-http-server-vulnerability
333•soheilpro•15h ago•171 comments

Creating Worlds: Runes and Spells Prototype

https://www.fractalkitty.com/creating-worlds-runes-and-spells/
4•evakhoury•2d ago•1 comments

AWS emulator

https://github.com/aws/aws-emulator
944•super_linear•23h ago•259 comments

Making a €40 USB-C hub work as a Nintendo Switch 2 dock

http://blog.nozomi.space/posts/sw2_dock/
119•mkopec•2d ago•38 comments

Show HN: AI Red Lines – write down what would make you act on AI

https://yourairedlines.com
17•ap11071•3h ago•10 comments

Show HN: Build a PC in 3D in the Browser

https://www.buildcores.com
35•ozaiworld•4d ago•12 comments

Research taste in history: the importance of learning Babylonian math

https://resobscura.substack.com/p/research-taste-in-history-the-importance
50•benbreen•1d ago•6 comments

A false smoke alarm almost drowned Jane Street's only NYC datacenter

https://michael.bacarella.com/2026/11/10/false-smoke-alarm-jane-street-datacenter/
557•mbac32768•1d ago•261 comments

Show HN: Fable52.games – Play and inspect Fable 5.2 single-file HTML games

https://fable52.games
51•felixne•2h ago•45 comments

Gemini Decisions API

https://blog.google/innovation-and-ai/technology/developers-tools/gemini-decisions-api/
534•iamdelirium•23h ago•154 comments