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.

Google will expand age checks on Android worldwide till the end of the year

https://android-developers.googleblog.com/2026/07/google-play-age-signals-api-safer-experiences.html
13•dmantis•25m ago•5 comments

AI's top startups are barely publishing their research

https://www.science.org/content/article/ai-s-top-startups-are-barely-publishing-their-research
485•YeGoblynQueenne•13h ago•248 comments

The coolest use for the Vision Pro

https://christianselig.com/2026/07/vision-pro-house/
686•robbiet480•13h ago•266 comments

Gpiozero Flow

https://bennuttall.com/blog/2026/07/gpiozero-flow/
4•benn_88•6m ago•0 comments

Show HN: Open-source engine running Gemma 4 26B in 2 GB RAM on any M-series Mac

https://github.com/drumih/turbo-fieldfare
812•gitpusher42•19h ago•284 comments

Superlogical

https://www.superlogical.com/
708•yan•18h ago•417 comments

LLM Honeypot

https://llm2human.pages.dev/
263•8thom•11h ago•73 comments

Concurrency, interactivity, mutability, choose two

https://www.n16f.net/blog/concurrency-interactivity-mutability-choose-two/
31•billiob•3d ago•12 comments

The Productivity Mirage

https://frantic.im/mirage/
256•msephton•11h ago•100 comments

Keychron announces first open-source firmware for gaming mice

https://www.digitalfoundry.net/news/2026/07/keychron-announces-first-open-source-firmware-for-gam...
384•JLO64•18h ago•155 comments

The first watch featuring computer functions

https://by.seiko-design.com/140th/en/topic/58.html
15•stefanv•3d ago•0 comments

Anatomy of a Frontier Lab Agent Intrusion: A Timeline of the July 2026 Incident

https://huggingface.co/blog/agent-intrusion-technical-timeline
391•artninja1988•1d ago•215 comments

The Cold Email

https://zachholman.com/posts/cold-email
224•holman•13h ago•86 comments

Logic for Programmers

https://logicforprogrammers.com/
131•_doctor_love•9h ago•25 comments

ESP32-C6 Power Consumption: Arduino vs. Zephyr vs. ESP-IDF Comparison

https://www.qoitech.com/blog/esp32-c6-power-consumption-comparison/
32•hasheddan•4d ago•7 comments

A.I. companies are recruiting electricians and carpenters by the thousands

https://www.nytimes.com/2026/07/29/business/economy/data-center-electricians-training.html
289•thm•19h ago•360 comments

Kuna: Decompiler Development in the Age of Coding Agents

https://noelo.org/blog/kuna-release/
45•matt_d•7h ago•10 comments

Kimi K3-256k

https://www.kimi.com/code/docs/en/kimi-code/models
444•monneyboi•15h ago•129 comments

Show HN: CheapFoodMap – A map of good meals under $10

https://cheapfoodmap.com/
216•jaep1•17h ago•195 comments

SalesPatriot (YC W25) Is Hiring FDEs

https://www.ycombinator.com/companies/salespatriot/jobs/M46X6YX-forward-deployed-engineer
1•maciejSz•13h ago

Turning a dumb AC unit smart (without losing my security deposit)

https://prilik.com/blog/post/automating-ac-nyc/
172•austinallegro•16h ago•139 comments

Angels in Coptic Magic I: Introduction

https://www.coptic-magic.phil.uni-wuerzburg.de/index.php/2026/01/16/angels-in-coptic-magic-i-intr...
47•jruohonen•3d ago•5 comments

Some thoughts about Anthropic's new cryptanalysis results

https://blog.cryptographyengineering.com/2026/07/29/some-notes-about-anthropics-new-results/
159•supermatou•17h ago•86 comments

The Rust on ESP Book

https://docs.espressif.com/projects/rust/book/
164•AlexeyBrin•4d ago•18 comments

London’s most equidistant pub

https://equidistance.io/londons-most-equidistant-pub/
43•lambfruit•4d ago•22 comments

Hamburg's Stadtpark: A Park Built to Be Used

https://alsterrunde.com/hamburgs-stadtpark-a-park-built-to-be-used/
159•mertbio•3d ago•48 comments

Why the future is local app

https://getapps.cafe/blog/why-the-future-is-local-app
34•knlam•6h ago•36 comments

A Trampoline

https://dogdogfish.com/blog/2026/07/29/a-trampoline/
110•matthewsharpe3•14h ago•64 comments

Launch HN: Tokenless (YC S26) – Automatic model switching to save money

https://usetokenless.com/
63•rohaga•18h ago•57 comments

Man and the Computer by John G. Kemeny (1972 book by the co-creator of BASIC)

https://archive.org/details/mancomputerbyjoh0000john
51•MilnerRoute•11h ago•13 comments