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

Comments

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

The struggle of resizing windows on macOS Tahoe

https://noheger.at/blog/2026/01/11/the-struggle-of-resizing-windows-on-macos-tahoe/
529•happosai•2h ago•253 comments

2026 is the year of self-hosting

https://fulghum.io/self-hosting
111•websku•2h ago•70 comments

This game is a single 13 KiB file that runs on Windows, Linux and in the Browser

https://iczelia.net/posts/snake-polyglot/
40•snoofydude•1h ago•13 comments

iCloud Photos Downloader

https://github.com/icloud-photos-downloader/icloud_photos_downloader
249•reconnecting•4h ago•132 comments

I'd tell you a UDP joke…

https://www.codepuns.com/post/805294580859879424/i-would-tell-you-a-udp-joke-but-you-might-not-get
47•redmattred•1h ago•16 comments

I Cannot SSH into My Server Anymore (and That's Fine)

https://soap.coffee/~lthms/posts/i-cannot-ssh-into-my-server-anymore.html
42•TheWiggles•4d ago•5 comments

Sampling at negative temperature

https://cavendishlabs.org/blog/negative-temperature/
95•ag8•3h ago•35 comments

FUSE is All You Need – Giving agents access to anything via filesystems

https://jakobemmerling.de/posts/fuse-is-all-you-need/
35•jakobem•2h ago•14 comments

I'm making a game engine based on dynamic signed distance fields (SDFs) [video]

https://www.youtube.com/watch?v=il-TXbn5iMA
137•imagiro•3d ago•17 comments

A 2026 look at three bio-ML opinions I had in 2024

https://www.owlposting.com/p/a-2026-look-at-three-bio-ml-opinions
14•abhishaike•2h ago•0 comments

Elo – A data expression language which compiles to JavaScript, Ruby, and SQL

https://elo-lang.org/
30•ravenical•4d ago•4 comments

Don't fall into the anti-AI hype

https://antirez.com/news/158
485•todsacerdoti•13h ago•651 comments

The Next Two Years of Software Engineering

https://addyosmani.com/blog/next-two-years/
24•napolux•1h ago•9 comments

Gentoo Linux 2025 Review

https://www.gentoo.org/news/2026/01/05/new-year.html
282•akhuettel•12h ago•136 comments

A set of Idiomatic prod-grade katas for experienced devs transitioning to Go

https://github.com/MedUnes/go-kata
92•medunes•4d ago•11 comments

Ask HN: What are you working on? (January 2026)

128•david927•6h ago•438 comments

Perfectly Replicating Coca Cola [video]

https://www.youtube.com/watch?v=TDkH3EbWTYc
107•HansVanEijsden•3d ago•50 comments

iMessage-kit is an iMessage SDK for macOS

https://github.com/photon-hq/imessage-kit
12•rsync•1h ago•2 comments

Erich von Däniken has died

https://daniken.com/en/startseite-english/
16•Kaibeezy•4h ago•44 comments

BYD's cheapest electric cars to have Lidar self-driving tech

https://thedriven.io/2026/01/11/byds-cheapest-electric-cars-to-have-lidar-self-driving-tech/
78•senti_sentient•2h ago•84 comments

Poison Fountain

https://rnsaffn.com/poison3/
154•atomic128•6h ago•100 comments

Anthropic: Developing a Claude Code competitor using Claude Code is banned

https://twitter.com/SIGKITTEN/status/2009697031422652461
195•behnamoh•4h ago•128 comments

"Scholars Will Call It Nonsense": The Structure of von Däniken's Argument (1987)

https://www.penn.museum/sites/expedition/scholars-will-call-it-nonsense/
46•Kaibeezy•4h ago•5 comments

Insights into Claude Opus 4.5 from Pokémon

https://www.lesswrong.com/posts/u6Lacc7wx4yYkBQ3r/insights-into-claude-opus-4-5-from-pokemon
5•surprisetalk•5d ago•0 comments

"Food JPEGs" in Super Smash Bros. & Kirby Air Riders

https://sethmlarson.dev/food-jpegs-in-super-smash-bros-and-kirby-air-riders
250•SethMLarson•5d ago•60 comments

Show HN: Engineering Schizophrenia: Trusting Yourself Through Byzantine Faults

23•rescrv•1h ago•6 comments

Meta announces nuclear energy projects

https://about.fb.com/news/2026/01/meta-nuclear-energy-projects-power-american-ai-leadership/
222•ChrisArchitect•4h ago•241 comments

I dumped Windows 11 for Linux, and you should too

https://www.notebookcheck.net/I-dumped-Windows-11-for-Linux-and-you-should-too.1190961.0.html
689•smurda•12h ago•676 comments

C++ std::move doesn't move anything: A deep dive into Value Categories

https://0xghost.dev/blog/std-move-deep-dive/
223•signa11•2d ago•180 comments

Quake 1 Single-Player Map Design Theories (2001)

https://www.quaddicted.com/webarchive//teamshambler.planetquake.gamespy.com/theories1.html
30•Lammy•18h ago•1 comments