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.

14-year-old Miles Wu folded origami pattern that holds 10k times its own weight

https://www.smithsonianmag.com/innovation/this-14-year-old-is-using-origami-to-design-emergency-s...
607•bookofjoe•13h ago•115 comments

Four Column ASCII (2017)

https://garbagecollected.org/2017/01/31/four-column-ascii/
47•tempodox•1d ago•11 comments

Rise of the Triforce

https://dolphin-emu.org/blog/2026/02/16/rise-of-the-triforce/
228•max-m•10h ago•28 comments

A deep dive into Apple's .car file format

https://dbg.re/posts/car-file-format/
52•MrFinch•2d ago•0 comments

Evaluating AGENTS.md: are they helpful for coding agents?

https://arxiv.org/abs/2602.11988
71•mustaphah•19h ago•36 comments

What your Bluetooth devices reveal

https://blog.dmcc.io/journal/2026-bluetooth-privacy-bluehood/
392•ssgodderidge•17h ago•148 comments

Visual introduction to PyTorch

https://0byte.io/articles/pytorch_introduction.html
219•0bytematt•3d ago•14 comments

Poor Deming never stood a chance

https://surfingcomplexity.blog/2026/02/16/poor-deming-never-stood-a-chance/
40•todsacerdoti•5h ago•2 comments

Show HN: Free alternative to Wispr Flow, Superwhisper, and Monologue

https://github.com/zachlatta/freeflow
170•zachlatta•10h ago•78 comments

Dark web agent spotted bedroom wall clue to rescue girl from abuse

https://www.bbc.com/news/articles/cx2gn239exlo
364•colinprince•6h ago•187 comments

Show HN: Scanned 1927-1945 Daily USFS Work Diary

https://forestrydiary.com/
85•dogline•8h ago•16 comments

Thinking hard burns almost no calories but destroys your next workout

https://vo2maxpro.com/blog/thinking-hard-burns-no-calories-destroys-workout
82•GoodluckH•5h ago•25 comments

SvarDOS – an open-source DOS distribution

http://svardos.org/
26•d_silin•1h ago•2 comments

DBASE on the Kaypro II

https://stonetools.ghost.io/dbase-cpm/
38•TMWNN•3d ago•14 comments

Rendering the Visible Spectrum

https://brandonli.net/spectra/doc/
13•signa11•2d ago•3 comments

Building for an audience of one: starting and finishing side projects with AI

https://codemade.net/blog/building-for-one/
49•lorisdev•7h ago•20 comments

Ghidra by NSA

https://github.com/NationalSecurityAgency/ghidra
354•handfuloflight•3d ago•190 comments

Hear the "Amati King Cello", the Oldest Known Cello in Existence

https://www.openculture.com/2021/06/hear-the-amati-king-cello-the-oldest-known-cello-in-existence...
41•tesserato•3d ago•19 comments

State of Show HN: 2025

https://blog.sturdystatistics.com/posts/show_hn/
90•kianN•11h ago•15 comments

"Token anxiety", a slot machine by any other name

https://jkap.io/token-anxiety-or-a-slot-machine-by-any-other-name/
102•presbyterian•13h ago•80 comments

Running NanoClaw in a Docker Shell Sandbox

https://www.docker.com/blog/run-nanoclaw-in-docker-shell-sandboxes/
97•four_fifths•9h ago•47 comments

Show HN: Wildex – Pokémon Go for real wildlife

https://apps.apple.com/us/app/wildex-identify-plants-animals/id6748092158
74•AnujNayyar•10h ago•49 comments

Show HN: Jemini – Gemini for the Epstein Files

https://jmail.world/jemini
338•dvrp•1d ago•65 comments

Neurons outside the brain

https://essays.debugyourpain.com/p/you-are-not-just-your-brain
83•yichab0d•12h ago•34 comments

What every compiler writer should know about programmers (2015) [pdf]

https://www.complang.tuwien.ac.at/kps2015/proceedings/KPS_2015_submission_29.pdf
63•tosh•3d ago•46 comments

SkillsBench: Benchmarking how well agent skills work across diverse tasks

https://arxiv.org/abs/2602.12670
327•mustaphah•10h ago•138 comments

Turing Labs (YC W20) Is Hiring – Founding GTM Sales Hacker

1•turinglabs•10h ago

PCB Rework and Repair Guide [pdf]

https://www.intertronics.co.uk/wp-content/uploads/2017/05/PCB-Rework-and-Repair-Guide.pdf
126•varjag•2d ago•36 comments

Instagram boss says 16 hours of daily use is 'problematic' not addiction

https://www.bbc.com/news/articles/cn71mgmzljlo
45•pseudolus•6h ago•29 comments

Testing Postgres race conditions with synchronization barriers

https://www.lirbank.com/harnessing-postgres-race-conditions
82•lirbank•11h ago•46 comments