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.

GPU World

https://www.gpuworld.org/
156•simonpure•4h ago•68 comments

Fastpotify

https://fastpotify.rocks/
297•nreece•5h ago•134 comments

Tmp.0ut Volume 5

https://tmpout.sh/5/
21•ghuntley•8h ago•16 comments

Restroom Archive

https://restroomarchive.com
98•jcalx•4h ago•22 comments

I turned my security cameras into an automatic bird identification system

https://jasontucker.blog/how-i-turned-my-security-cameras-into-an-automatic-bird-identification-s...
472•speckx•15h ago•113 comments

Playa Phone

https://playaphone.com/
602•cutoff•17h ago•209 comments

A walkable ASCII cyberpunk city in one HTML file [video]

https://www.youtube.com/watch?v=3YtygAx_C6A
309•keithcarolus•13h ago•37 comments

CollectWise (YC F24) Is Hiring

https://www.ycombinator.com/companies/collectwise/jobs/7U500pP-founding-customer-success-engineer
1•OBrien_1107•59m ago

Terence Tao explains 6 essential mathematical concepts [video]

https://www.youtube.com/watch?v=OOMx2BHHWtE
389•matthewsinclair•1d ago•50 comments

Dwarf Fortress is getting the mother of all magic updates

https://www.rockpapershotgun.com/dwarf-fortress-is-getting-the-mother-of-all-magic-updates-extend...
394•Tomte•4d ago•157 comments

Evidence of Fraud in an Influential Study About Procrastination

https://datacolada.org/138
202•Anon84•8h ago•134 comments

RotaryCell: Making an unmodified rotary phone work over LTE with an ESP32-S3

https://github.com/fregacmols/RotaryCell
45•jombib•5h ago•4 comments

Borges Labyrinth in Venice reopens to the public

https://www.wallpaper.com/design-interiors/labirinto-borges-venice-reopening
61•gone35•3d ago•24 comments

Flat vs. segmented memory – it's recursive

https://www.humprog.org/~stephen/blog/2026/08/25/#flat-vs-segmented
17•signa11•5d ago•0 comments

Apple caught off guard by AI demand for Mac Mini and Mac Studio

https://www.macrumors.com/2026/08/30/apple-unexpected-mac-mini-and-studio-demand/
390•thm•19h ago•437 comments

Show HN: Laser Graffiti

https://laser.consti.de
184•con•2d ago•36 comments

Roget's Thesaurus

https://artflsrv04.uchicago.edu/roget-thesaurus/
10•gregsadetsky•1d ago•0 comments

Vermell – Minimal, dependency-free C++ web framework using epoll

https://github.com/vermellcc/vermell
19•standar-donkey•3h ago•8 comments

I think the military commissary's freezers were hacked

https://signalandsilence.substack.com/p/i-think-someone-hacked-the-commissary
328•jcurbo•20h ago•184 comments

Cheap GPS jammers are filling the world with navigation dead zones

https://www.wsj.com/tech/gps-jammers-dead-zones-e76f3261
129•vinnyglennon•1d ago•128 comments

Interactive pattern discovery in binaries (FF-16-TUI)

https://github.com/HexLasso/FF-16-TUI
31•HexLasso•3d ago•3 comments

2004 RuneScape fit a multiplayer RPG into 56k dial-up

https://jkm.dev/posts/how-2004-runescape-fit-a-multiplayer-rpg-into-56k-dialup/
101•fagnerbrack•7h ago•52 comments

Smartphone LED detects hidden cameras with AI

https://www.chosun.com/english/industry-en/2026/08/30/SBFXUIJQYZEARKP5T4FBAY25HQ/
203•geox•2d ago•57 comments

Lion-man

https://en.wikipedia.org/wiki/Lion-man
102•gurjeet•2d ago•50 comments

DoltLite: A SQLite fork with Git-style version control, built with 2k agent PRs

https://www.dolthub.com/blog/2026-08-31-doltlite-beta/
30•lbw1215•6h ago•18 comments

Reverse engineering my ADHD test

https://nullpt.rs/reverse-engineering-adhd-test
208•hazebooth•4d ago•123 comments

RavynOS: Pre-alpha open-source OS based on Darwin, FreeBSD, Apple open-source

https://ravynos.com/
197•Bluestein•15h ago•113 comments

AI Can Make You Suck Faster Too

https://www.hermit-tech.com/blog/ai-can-make-you-suck-faster-too
74•degamad•2h ago•81 comments

ChatGPT Work Tool and Skill Reference

https://codex-tool-reference.simonw.chatgpt.site/
214•ijidak•17h ago•52 comments

Run macOS Software on Linux

https://www.darlinghq.org/
218•Bluestein•9h ago•69 comments