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.

Windows 8 Desktop Environment for Linux

https://github.com/er-bharat/Win8DE
52•edent•45m ago•28 comments

The struggle of resizing windows on macOS Tahoe

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

Lightpanda migrate DOM implementation to Zig

https://lightpanda.io/blog/posts/migrating-our-dom-to-zig
108•gearnode•4h ago•46 comments

Show HN: 30k IKEA items in flat text (CommerceTXT). 24% smaller than JSON

https://huggingface.co/datasets/tsazan/ikea-us-commercetxt
19•tsazan•4d ago•6 comments

Ai, Japanese chimpanzee who counted and painted dies at 49

https://www.bbc.com/news/articles/cj9r3zl2ywyo
68•reconnecting•4h ago•26 comments

JRR Tolkien reads from The Hobbit for 30 Minutes (1952)

https://www.openculture.com/2026/01/j-r-r-tolkien-reads-from-the-hobbit-for-30-minutes-1952.html
180•bookofjoe•4d ago•58 comments

Launch a Debugging Terminal into GitHub Actions

https://blog.gripdev.xyz/2026/01/10/actions-terminal-on-failure-for-debugging/
31•martinpeck•1h ago•4 comments

CLI agents make self-hosting on a home server easier and fun

https://fulghum.io/self-hosting
635•websku•16h ago•428 comments

Ozempic reduced grocery spending by an average of 5.3% in the US

https://news.cornell.edu/stories/2025/12/ozempic-changing-foods-americans-buy
111•giuliomagnifico•1h ago•156 comments

39c3: In-house electronics manufacturing from scratch: How hard can it be? [video]

https://media.ccc.de/v/39c3-in-house-electronics-manufacturing-from-scratch-how-hard-can-it-be
171•fried-gluttony•3d ago•69 comments

Zen-C: Write like a high-level language, run like C

https://github.com/z-libs/Zen-C
8•simonpure•1h ago•0 comments

iCloud Photos Downloader

https://github.com/icloud-photos-downloader/icloud_photos_downloader
527•reconnecting•18h ago•206 comments

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

https://iczelia.net/posts/snake-polyglot/
242•snoofydude•15h ago•65 comments

Conbini Wars – Map of Japanese convenience store ratios

https://conbini.kikkia.dev/
85•zdw•5d ago•37 comments

XMPP and Metadata

https://blog.mathieui.net/xmpp-and-metadata.html
34•todsacerdoti•5d ago•5 comments

The next two years of software engineering

https://addyosmani.com/blog/next-two-years/
206•napolux•16h ago•199 comments

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

https://www.youtube.com/watch?v=il-TXbn5iMA
379•imagiro•4d ago•56 comments

Show HN: DevicePrint – device fingerprinting without cookies

15•silverrump•5d ago•29 comments

Uncrossy

https://uncrossy.com/
118•dgacmu•12h ago•36 comments

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

https://jakobemmerling.de/posts/fuse-is-all-you-need/
173•jakobem•16h ago•60 comments

Perfectly Replicating Coca Cola [video]

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

Show HN: Shellock, a real-time CLI flag explainer for fish shell

https://github.com/ibehnam/shellock
25•behnamoh•5d ago•8 comments

Anthropic Made a Big Mistake

https://archaeologist.dev/artifacts/anthropic
19•codesparkle•3h ago•16 comments

Sampling at negative temperature

https://cavendishlabs.org/blog/negative-temperature/
185•ag8•18h ago•54 comments

Ireland fast tracks Bill to criminalise harmful voice or image misuse

https://www.irishtimes.com/ireland/2026/01/07/call-to-fast-track-bill-targeting-ai-deepfakes-and-...
4•mooreds•29m ago•0 comments

Climbing the mountain: or, venturing into PL theory

https://techne98.com/blog/climbing-the-mountain/
3•fixedprog•5d ago•0 comments

How to Build Reactive Declarative UI in Vanilla JavaScript

https://jsdev.space/howto/reactive-vanilla-js/
23•javatuts•2h ago•13 comments

Insights into Claude Opus 4.5 from Pokémon

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

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

218•david927•21h ago•694 comments

Don't fall into the anti-AI hype

https://antirez.com/news/158
1093•todsacerdoti•1d ago•1339 comments