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

Comments

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

Coarse Is Better

https://borretti.me/article/coarse-is-better
47•_dain_•2h ago•16 comments

Show HN: Shittp – Volatile Dotfiles over SSH

https://github.com/FOBshippingpoint/shittp
66•sdovan1•2h ago•24 comments

Three Ways to Solve Problems

https://andreasfragner.com/writing/three-ways-to-solve-problems
15•42point2•32m ago•0 comments

Show HN: Jmail – Google Suite for Epstein files

https://www.jmail.world
1088•lukeigel•18h ago•238 comments

Ruby website redesigned

https://www.ruby-lang.org/en/
202•psxuaw•8h ago•68 comments

Backing up Spotify

https://annas-archive.li/blog/backing-up-spotify.html
1479•vitplister•20h ago•497 comments

Measuring AI Ability to Complete Long Tasks

https://metr.org/blog/2025-03-19-measuring-ai-ability-to-complete-long-tasks/
180•spicypete•11h ago•117 comments

Indoor tanning makes youthful skin much older on a genetic level

https://www.ucsf.edu/news/2025/12/431206/indoor-tanning-makes-youthful-skin-much-older-genetic-level
111•SanjayMehta•9h ago•56 comments

Show HN: The Official National Train Map Sucked, So I Made My Own

https://www.bdzmap.com/
16•Pavlinbg•2h ago•3 comments

Go ahead, self-host Postgres

https://pierce.dev/notes/go-ahead-self-host-postgres#user-content-fn-1
590•pavel_lishin•23h ago•340 comments

Claude in Chrome

https://claude.com/chrome
237•ianrahman•17h ago•123 comments

Inca Stone Masonry

https://www.earthasweknowit.com/pages/inca_construction
88•jppope•7h ago•26 comments

Ireland’s Diarmuid Early wins world Microsoft Excel title

https://www.bbc.com/news/articles/cj4qzgvxxgvo
265•1659447091•19h ago•89 comments

The uncertain origins of aspirin

https://www.asimov.press/p/aspirin
29•dearwell•4d ago•5 comments

Isengard in Oxford

https://lareviewofbooks.org/article/isengard-in-oxford/
75•lermontov•9h ago•9 comments

Log level 'error' should mean that something needs to be fixed

https://utcc.utoronto.ca/~cks/space/blog/programming/ErrorsShouldRequireFixing
418•todsacerdoti•4d ago•268 comments

Pure Silicon Demo Coding: No CPU, No Memory, Just 4k Gates

https://www.a1k0n.net/2025/12/19/tiny-tapeout-demo.html
379•a1k0n•22h ago•60 comments

Modalz Modalz Modalz (2018)

https://modalzmodalzmodalz.com/
18•iamwil•5d ago•6 comments

OpenSCAD is kinda neat

https://nuxx.net/blog/2025/12/20/openscad-is-kinda-neat/
271•c0nsumer•21h ago•205 comments

Big GPUs don't need big PCs

https://www.jeffgeerling.com/blog/2025/big-gpus-dont-need-big-pcs
244•mikece•21h ago•104 comments

Decompiling the New C# 14 field Keyword

https://blog.ivankahl.com/decompiling-the-new-csharp-14-field-keyword/
19•ivankahl•4d ago•4 comments

New mathematical framework reshapes debate over simulation hypothesis

https://www.santafe.edu/news-center/news/new-mathematical-framework-reshapes-debate-over-simulati...
44•Gooblebrai•3h ago•53 comments

Feds order Washington power plant to keep burning coal

https://washingtonstatestandard.com/2025/12/18/feds-order-wa-power-plant-to-keep-burning-coal-set...
14•geox•1h ago•2 comments

William Golding's Island of Savagery

https://www.historytoday.com/archive/portrait-author-historian/william-goldings-island-savagery
10•samclemens•11h ago•7 comments

Show HN: HN Wrapped 2025 - an LLM reviews your year on HN

https://hn-wrapped.kadoa.com?year=2025
234•hubraumhugo•1d ago•127 comments

I made a network throttle tool controlled by a Chrome extension

https://github.com/harrylincoln/taper
12•hazzamanazza•5d ago•4 comments

Flock and Cyble Inc. weaponize “cybercrime” takedowns to silence critics

https://haveibeenflocked.com/news/cyble-downtime
511•_a9•13h ago•96 comments

Gemini 3 Pro vs. 2.5 Pro in Pokemon Crystal

https://blog.jcz.dev/gemini-3-pro-vs-25-pro-in-pokemon-crystal
297•alphabetting•5d ago•89 comments

From devastation to wonder as Kangaroo Island bushfires lead to cave discoveries

https://www.abc.net.au/news/2025-12-13/more-than-150-caves-discovered-in-ki-after-devastating-bus...
69•speckx•5d ago•14 comments

Why do people leave comments on OpenBenches?

https://shkspr.mobi/blog/2025/12/why-do-people-leave-comments-on-openbenches/
187•sedboyz•22h ago•17 comments