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•11mo ago

Comments

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

Thoughts and feelings around Claude Design

https://samhenri.gold/blog/20260418-claude-design/
112•cdrnsf•2h ago•56 comments

The electromechanical angle computer inside the B-52 bomber's star tracker

https://www.righto.com/2026/04/B-52-star-tracker-angle-computer.html
196•NelsonMinar•5h ago•60 comments

College instructor turns to typewriters to curb AI-written work

https://sentinelcolorado.com/uncategorized/a-college-instructor-turns-to-typewriters-to-curb-ai-w...
51•gnabgib•2h ago•23 comments

Migrating from DigitalOcean to Hetzner

https://isayeter.com/posts/digitalocean-to-hetzner-migration/
607•yusufusta•8h ago•320 comments

Optimizing Ruby Path Methods

https://byroot.github.io/ruby/performance/2026/04/18/faster-paths.html
6•weaksauce•1h ago•0 comments

State of Kdenlive

https://kdenlive.org/news/2026/state-2026/
298•f_r_d•10h ago•103 comments

Any Color You Like: NIST Scientists Create 'Any Wavelength' Lasers

https://www.nist.gov/news-events/news/2026/04/any-color-you-nist-scientists-create-any-wavelength...
5•rbanffy•49m ago•0 comments

Show HN: MDV – a Markdown superset for docs, dashboards, and slides with data

https://github.com/drasimwagan/mdv
65•drasim•6h ago•27 comments

Floating Point Fun on Cortex-M Processors

https://danielmangum.com/posts/floating-point-cortex-m/
13•hasheddan•1d ago•1 comments

Michael Rabin has died

https://en.wikipedia.org/wiki/Michael_O._Rabin
359•tkhattra•3d ago•75 comments

Modern Common Lisp with FSET

https://fset.common-lisp.dev/Modern-CL/Top_html/index.html
25•larve•3d ago•0 comments

Scientists discover "cleaner ants" that groom giant ants in Arizona desert

https://www.sciencedaily.com/releases/2026/04/260414075641.htm
58•t-3•3d ago•25 comments

Sumida Aquarium Posts 2026 Penguin Relationship Chart, with Drama and Breakups

https://www.sumida-aquarium.com/special/sokanzu/en/2026/
135•Lwrless•3d ago•5 comments

Opus 4.7 to 4.6 Inflation is ~45%

https://tokens.billchambers.me/leaderboard
364•anabranch•5h ago•381 comments

UpCodes (YC S17) is hiring SDRs to help make construction more productive

https://up.codes/careers?utm_source=HN
1•Old_Thrashbarg•4h ago

Show HN: AI Subroutines – Run automation scripts inside your browser tab

https://www.rtrvr.ai/blog/ai-subroutines-zero-token-deterministic-automation
13•arjunchint•1d ago•2 comments

Show HN: Remoroo. trying to fix memory in long-running coding agents

https://www.remoroo.com
18•adhamghazali•4d ago•2 comments

Graphs that explain the state of AI in 2026

https://spectrum.ieee.org/state-of-ai-index-2026
50•bryanrasmussen•4h ago•33 comments

80386 Memory Pipeline

https://nand2mario.github.io/posts/2026/80386_memory_pipeline/
69•wicket•4d ago•10 comments

Fuzix OS

https://www.fuzix.org/
57•DeathArrow•6h ago•24 comments

4-bit floating point FP4

https://www.johndcook.com/blog/2026/04/17/fp4/
20•chmaynard•4h ago•10 comments

PostgreSQL production incident caused by transaction ID wraparound

https://www.sqlservercentral.com/articles/i-too-have-a-production-story-a-downtime-caused-by-post...
7•tcp_handshaker•1h ago•2 comments

Understanding the FFT Algorithm (2013)

https://jakevdp.github.io/blog/2013/08/28/understanding-the-fft/
37•peter_d_sherman•3d ago•4 comments

Amiga Graphics Archive

https://amiga.lychesis.net/
218•sph•15h ago•63 comments

PgQue: Zero-Bloat Postgres Queue

https://github.com/NikolayS/pgque
32•gmcabrita•4h ago•0 comments

Category Theory Illustrated – Orders

https://abuseofnotation.github.io/category-theory-illustrated/04_order/
214•boris_m•15h ago•57 comments

It's OK to compare floating-points for equality

https://lisyarus.github.io/blog/posts/its-ok-to-compare-floating-points-for-equality.html
159•coinfused•4d ago•109 comments

Traders placed over $1B in perfectly timed bets on the Iran war

https://www.theguardian.com/world/2026/apr/18/iran-war-bets-ethics-concerns
83•trocado•3h ago•69 comments

Show HN: I made a calculator that works over disjoint sets of intervals

https://victorpoughon.github.io/interval-calculator/
280•fouronnes3•20h ago•48 comments

Why Japan has such good railways

https://worksinprogress.co/issue/why-japan-has-such-good-railways/
253•RickJWagner•9h ago•258 comments