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.

RipGrep musl binaries occasionally segfault during very-large searches

https://github.com/BurntSushi/ripgrep/issues/3494
33•throwaway2037•27m ago•12 comments

Elevators

https://john.fun/elevators
1388•Jrh0203•21h ago•337 comments

Flint: A Visualization Language for the AI Era

https://microsoft.github.io/flint-chart/
154•vinhnx•10h ago•55 comments

How to Do Great Work (2023)

https://paulgraham.com/greatwork.html
49•tosh•4h ago•33 comments

qm – Multiplayer agent harness for work

https://github.com/yc-software/qm
594•tosh•18h ago•123 comments

Manual: •.,:;?·

https://type.today/en/journal/dots
25•behnamoh•2d ago•1 comments

$0.09 and $290.12 are both the price of 1M output tokens

https://runinfra.ai/news/inference-cost-truth
4•OsamaJaber•1h ago•1 comments

Kontigo (YC S24) Is Hiring

https://www.ycombinator.com/companies/kontigo/jobs/xAo6tMt-founding-engineer
1•jecastillof•1h ago

A tiny holdout building in the middle of Macy’s is back in view

https://ephemeralnewyork.wordpress.com/2026/07/27/hidden-by-billboards-for-over-100-years-the-tin...
63•donohoe•3d ago•12 comments

The development pipeline is a production system

https://sundry.jerryorr.com/2026/07/31/development-pipeline-is-a-production-system
102•firefoxd•9h ago•43 comments

How to Exist

https://www.raptitude.com/2026/07/how-to-exist/
250•walterbell•12h ago•142 comments

Solid Queue 1.6.0 now supports fiber workers

https://github.com/rails/solid_queue/releases/tag/v1.6.0
28•earcar•5h ago•7 comments

G'mic 4.0: Squaring the Pixel, Easier

https://gmic.eu/gmic40/
43•dtschump•3d ago•2 comments

RamenHaus

https://ramen.haus/
121•oler•4h ago•67 comments

Software for One

https://www.ajwaxman.com/writing/software-for-one
145•awaxman11•3d ago•131 comments

Run Kimi K3 using 29 GB of RAM at 0.50 tok/s

https://github.com/sqliteai/waste
270•marcobambini•22h ago•116 comments

The Absurdity of Albert Camus

https://www.historytoday.com/archive/portrait-author-historian/absurdity-albert-camus
146•apollinaire•1d ago•65 comments

AI doesn't generate working products, that's still your job

https://weeraman.com/the-prototype-isnt-the-product/
201•smckk•5h ago•184 comments

The First Idempotency Key

https://hatchet.run/blog/first-idempotency-key
7•abelanger•3d ago•0 comments

Attention Decode on AMD MI450 GPUs: A Gluon Kernel Optimization Guide

https://rocm.blogs.amd.com/software-tools-optimization/gluon-attention-decode-mi450/README.html
48•matt_d•4d ago•4 comments

June in Servo: real world compat, media queries, SharedWorker, and more

https://servo.org/blog/2026/07/31/june-in-servo/
168•iamnothere•18h ago•51 comments

Getting 25 Gbps Thunderbolt Ethernet on My Mac Studio

https://www.jeffgeerling.com/blog/2026/getting-25g-ethernet-mac-thunderbolt/
201•speckx•20h ago•103 comments

Progressive Web Components

https://arielsalminen.com/2026/progressive-web-components/
161•hosteur•1d ago•35 comments

Big Food vs. the People

https://www.lighthousereports.com/investigation/big-food-vs-the-people/
236•jruohonen•20h ago•150 comments

Ten Ways NAS Is Getting Enshitified

https://nascompares.com/2026/07/31/the-10-ways-nas-is-getting-enshitified/
123•giuliomagnifico•7h ago•118 comments

Increasing the lifespan of a bulb makes it worse in every other way

https://maurycyz.com/misc/tungsten/
110•tonyg•1d ago•115 comments

Ten advances in mathematics and theoretical computer science

https://openai.com/index/ten-advances-in-mathematics/
177•milkshakes•5h ago•132 comments

Long Range Wi-Fi – Pushing 2.4 GHz Wi-Fi to the limits (2019)

https://www.phidgets.com/?view=articles&article=LongRangeWifi
64•rzk•3d ago•35 comments

The most official water costs $120k a gallon

https://signoregalilei.com/2026/07/26/the-most-official-water-costs-120000-a-gallon/
205•surprisetalk•22h ago•155 comments

Golang proposal: container/: generic collection types

https://github.com/golang/go/issues/80590
163•jabits•18h ago•139 comments