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.

Livenerf: Has Opus 5.5 been nerfed yet?

https://github.com/ninjahawk/livenerf
431•bryan0•7h ago•181 comments

Dots: Always-on agents

https://openai.com/index/introducing-dots/
530•alvis•12h ago•397 comments

Tesla takes on $30B in credit as it approaches unprofitability

https://electrek.co/2026/09/29/tesla-takes-on-30-billion-in-credit-as-it-approaches-unprofitability/
46•ciconia•1h ago•33 comments

PSSA: A non-transformer language model written from scratch in Rust

https://github.com/Sparticle62ops/pssa
47•sparticle62•2h ago•12 comments

Responsible Release of AI-Generated Mathematics

https://agmai.org/general-sep29/
23•aureianimus•3h ago•15 comments

U.S. postal inspectors shut down website selling counterfeit postage labels

https://postalemployeenetwork.com/news/2026/09/26/u-s-postal-inspectors-shut-down-website-selling...
201•ilamont•10h ago•119 comments

NASA asked several former SR-71A staffers to help secret restart

https://aviationweek.com/defense/aircraft-propulsion/nasa-asked-several-former-sr-71a-staffers-he...
110•ilamont•19h ago•101 comments

Vermont replacing power plants with home batteries

https://www.bbc.com/future/article/20260928-a-virtual-power-plant-hidden-in-vermont-homes-is-keep...
141•devonnull•11h ago•114 comments

America.gov

https://america.gov/
485•plesiv•15h ago•394 comments

Show HN: Real-time Solar System with 526k asteroids and all tracked satellites

https://space.bl2.net/
178•wanick•10h ago•40 comments

How Delhi cut electricity loss from 50 to 5 percent

https://spectrum.ieee.org/delhi-electricity-loss
485•rbanffy•17h ago•276 comments

GPT 6.1 Sol: Near-Astra intelligence for a fifth of the price

https://openai.com/index/introducing-gpt-6-1-sol/
866•crorella•12h ago•785 comments

RSS Feeds for Last.fm

https://lfm.xiffy.nl/
17•Baljhin•2h ago•4 comments

Backblaze drive stats for Q2 2026

https://www.backblaze.com/blog/backblaze-drive-stats-for-q2-2026/
143•HieronymusBosch•16h ago•34 comments

PS5 Relapse Exploit

https://github.com/ntfargo/Relapse-Exploit
269•therepanic•14h ago•152 comments

Needed 1+1, built a functional programming language

https://hereticpleb.vercel.app/blog/needed-one-plus-one/
67•birdculture•13h ago•16 comments

Testing WebGPU data layouts with Facet

https://www.mattkeeter.com/blog/2026-08-23-wgpu-facet/
6•luu•1d ago•0 comments

Language models for text classification: From bag-of-words to Jev

https://magazine.sebastianraschka.com/p/classifier-history-and-jev
69•Anon84•18h ago•2 comments

Phyllotaxis: An audio-reactive LED display

https://jagi.studio/posts/phyllotaxis/
273•evakhoury•1d ago•45 comments

When oil prices spike, where does the money go?

https://theconversation.com/when-oil-prices-spike-where-does-the-money-go-280763
59•thelastgallon•1d ago•49 comments

We’re forgetting what darkness feels like

https://www.theguardian.com/environment/2026/sep/29/night-sky-darkness-city-regulation
126•pseudolus•11h ago•68 comments

NAND-16: a computer built from 277,248 NAND gates

https://somethingbig.ai/computer
121•rossant•2d ago•68 comments

LinkedIn Larpmaxxing

https://hereticpleb.vercel.app/blog/linkedin-larpmaxxing/
40•BurnerBurner•1h ago•38 comments

Ask HN: What are you reading?

216•dan-bailey•16h ago•468 comments

A Staff Engineer's Guide to Inventing Work

https://sujithjay.com/inventing-work
233•amortize•1d ago•47 comments

Ballmer Peak

https://en.wikipedia.org/wiki/Ballmer_Peak
32•thunderbong•3h ago•1 comments

Show HN: A working 3D model of an Enigma machine

https://enigma.design
53•primitivesuave•12h ago•18 comments

Show HN: NSL – WSL for Linux

https://frostyard.github.io/nsl/
110•bketelsen•15h ago•75 comments

Strange Parodies of Atari 2600 Video Game Box Cover Art (2008)

https://mightygodking.com/2008/04/21/fun-from-yesterday/
29•peter_d_sherman•4h ago•21 comments

Tcl/Tk 9.1

https://www.tcl-lang.org/software/tcltk/9.1.html
260•dmux•12h ago•101 comments