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.

IBM Announces Strategic Collaboration with Arm

https://newsroom.ibm.com/2026-04-02-ibm-announces-strategic-collaboration-with-arm-to-shape-the-f...
37•bonzini•1h ago•9 comments

Bringing Clojure programming to Enterprise (2021)

https://blogit.michelin.io/clojure-programming/
36•smartmic•1h ago•7 comments

Live: Artemis II Launch Day Updates

https://www.nasa.gov/blogs/missions/2026/04/01/live-artemis-ii-launch-day-updates/
922•apitman•16h ago•789 comments

Gone (Almost) Phishin'

https://ma.tt/2026/03/gone-almost-phishin/
21•luu•2d ago•5 comments

Email obfuscation: What works in 2026?

https://spencermortensen.com/articles/email-obfuscation/
130•jaden•6h ago•32 comments

Steam on Linux Use Skyrocketed Above 5% in March

https://www.phoronix.com/news/Steam-On-Linux-Tops-5p
374•hkmaxpro•6h ago•169 comments

Mercor says it was hit by cyberattack tied to compromise LiteLLM

https://techcrunch.com/2026/03/31/mercor-says-it-was-hit-by-cyberattack-tied-to-compromise-of-ope...
41•jackson-mcd•1d ago•14 comments

Quantum computing bombshells that are not April Fools

https://scottaaronson.blog/?p=9665
173•Strilanc•9h ago•59 comments

EmDash – A spiritual successor to WordPress that solves plugin security

https://blog.cloudflare.com/emdash-wordpress/
570•elithrar•17h ago•416 comments

AI Perfected Chess. Humans Made It Unpredictable Again

https://www.bloomberg.com/news/articles/2026-03-27/ai-changed-chess-grandmasters-now-win-with-unp...
41•GMoromisato•4d ago•35 comments

A new C++ back end for ocamlc

https://github.com/ocaml/ocaml/pull/14701
182•glittershark•10h ago•15 comments

Telli (YC F24) is hiring engineers, designers, and more [on-site, Berlin]

http://hi.telli.com/join-us
1•sebselassie•2h ago

DRAM pricing is killing the hobbyist SBC market

https://www.jeffgeerling.com/blog/2026/dram-pricing-is-killing-the-hobbyist-sbc-market/
475•ingve•12h ago•400 comments

Show HN: NASA Artemis II Mission Timeline Tracker

https://www.sunnywingsvirtual.com/artemis2/timeline.html
55•AustinDev•6h ago•11 comments

Fast and Gorgeous Erosion Filter

https://blog.runevision.com/2026/03/fast-and-gorgeous-erosion-filter.html
160•runevision•2d ago•15 comments

Show HN: Git bayesect – Bayesian Git bisection for non-deterministic bugs

https://github.com/hauntsaninja/git_bayesect
278•hauntsaninja•4d ago•41 comments

New laws to make it easier to cancel subscriptions and get refunds

https://www.bbc.co.uk/news/articles/cvg0v36ek2go
19•chrisjj•1h ago•1 comments

What Gödel Discovered (2020)

https://stopa.io/post/269
56•qnleigh•2d ago•7 comments

Subscription bombing and how to mitigate it

https://bytemash.net/posts/subscription-bombing-your-signup-form-is-a-weapon/
151•homelessdino•5h ago•107 comments

AI for American-produced cement and concrete

https://engineering.fb.com/2026/03/30/data-center-engineering/ai-for-american-produced-cement-and...
194•latchkey•16h ago•113 comments

Built a cheap DIY fan controller because my motherboard never had working PWM

https://www.himthe.dev/blog/msi-forgot-my-fans
17•bobsterlobster•2d ago•7 comments

Ask HN: Who is hiring? (April 2026)

240•whoishiring•19h ago•207 comments

Signing data structures the wrong way

https://blog.foks.pub/posts/domain-separation-in-idl/
104•malgorithms•14h ago•45 comments

Show HN: Dull – Instagram Without Reels, YouTube Without Shorts (iOS)

https://getdull.app
86•kasparnoor•13h ago•70 comments

Weather.com/Retro

https://weather.com/retro/
206•typeofhuman•8h ago•34 comments

Reverse Engineering Crazy Taxi, Part 2

https://wretched.computer/post/crazytaxi2
41•wgreenberg•2d ago•3 comments

Trinity Large Thinking

https://openrouter.ai/arcee-ai/trinity-large-thinking
37•kristianp•7h ago•15 comments

The revenge of the data scientist

https://hamel.dev/blog/posts/revenge/
142•hamelsmu•4d ago•28 comments

SpaceX files to go public

https://www.nytimes.com/2026/04/01/technology/spacex-ipo-elon-musk.html
315•nutjob2•16h ago•421 comments

StepFun 3.5 Flash is #1 cost-effective model for OpenClaw tasks (300 battles)

https://app.uniclaw.ai/arena?tab=costEffectiveness&via=hn
158•skysniper•17h ago•74 comments