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

Comments

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

Show HN: Channel Surfer – Watch YouTube like it’s cable TV

https://channelsurfer.tv
165•kilroy123•2d ago•76 comments

Can I run AI locally?

https://www.canirun.ai/
428•ricardbejarano•6h ago•111 comments

Show HN: Context Gateway – Compress agent context before it hits the LLM

https://github.com/Compresr-ai/Context-Gateway
20•ivzak•1h ago•10 comments

Hammerspoon

https://github.com/Hammerspoon/hammerspoon
17•tosh•45m ago•4 comments

TUI Studio – visual terminal UI design tool

https://tui.studio/
432•mipselaer•8h ago•249 comments

Qatar helium shutdown puts chip supply chain on a two-week clock

https://www.tomshardware.com/tech-industry/qatar-helium-shutdown-puts-chip-supply-chain-on-a-two-...
156•johnbarron•6h ago•132 comments

Parallels confirms MacBook Neo can run Windows in a virtual machine

https://www.macrumors.com/2026/03/13/macbook-neo-runs-windows-11-vm/
66•tosh•5h ago•93 comments

Your Phone Is an Entire Computer

https://medhir.com/blog/your-phone-is-an-entire-computer
76•medhir•1h ago•70 comments

Launch HN: Captain (YC W26) – Automated RAG for Files

https://www.runcaptain.com/
34•CMLewis•3h ago•13 comments

The Wyden Siren Goes Off Again: We'll Be "Stunned" by NSA Under Section 702

https://www.techdirt.com/2026/03/12/the-wyden-siren-goes-off-again-well-be-stunned-by-what-the-ns...
179•cf100clunk•3h ago•57 comments

Willingness to look stupid

https://sharif.io/looking-stupid
684•Samin100•4d ago•234 comments

Launch HN: Spine Swarm (YC S23) – AI agents that collaborate on a visual canvas

https://www.getspine.ai/
68•a24venka•5h ago•58 comments

The Accidental Room (2018)

https://99percentinvisible.org/episode/the-accidental-room/
11•blewboarwastake•1h ago•0 comments

Bucketsquatting is (finally) dead

https://onecloudplease.com/blog/bucketsquatting-is-finally-dead
277•boyter•10h ago•146 comments

Lost Doctor Who Episodes Found

https://www.bbc.co.uk/news/articles/c4g7kwq1k11o
124•edent•14h ago•35 comments

Meta Platforms: Lobbying, dark money, and the App Store Accountability Act

https://github.com/upper-up/meta-lobbying-and-other-findings
1064•shaicoleman•9h ago•459 comments

John Carmack about open source and anti-AI activists

https://twitter.com/id_aa_carmack/status/2032460578669691171
72•tzury•1h ago•56 comments

E2E encrypted messaging on Instagram will no longer be supported after 8 May

https://help.instagram.com/491565145294150
299•mindracer•6h ago•158 comments

Okmain: How to pick an OK main colour of an image

https://dgroshev.com/blog/okmain/
196•dgroshev•4d ago•39 comments

The Mrs Fractal: Mirror, Rotate, Scale (2025)

https://www.4rknova.com//blog/2025/06/22/mrs-fractal
34•ibobev•4d ago•3 comments

Removing recursion via explicit callstack simulation

https://jnkr.tech/blog/removing-recursion
14•todsacerdoti•4d ago•1 comments

Gvisor on Raspbian

https://nubificus.co.uk/blog/gvisor-rpi5/
50•_ananos_•9h ago•10 comments

Show HN: Svglib a SVG parser and renderer for Windows

https://github.com/bibhas2/svglib
5•leopoldj•3d ago•1 comments

Executing programs inside transformers with exponentially faster inference

https://www.percepta.ai/blog/can-llms-be-computers
265•u1hcw9nx•1d ago•103 comments

The Bovadium Fragments: Together with The Origin of Bovadium

https://kirkcenter.org/reviews/monster-is-the-machine/
37•freediver•5d ago•16 comments

Show HN: What was the world listening to? Music charts, 20 countries (1940–2025)

https://88mph.fm/
90•matteocantiello•3d ago•42 comments

Dijkstra's Crisis: The End of Algol and Beginning of Software Engineering (2010) [pdf]

https://www.tomandmaria.com/Tom/Writing/DijkstrasCrisis_LeidenDRAFT.pdf
55•ipnon•4d ago•18 comments

“This is not the computer for you”

https://samhenri.gold/blog/20260312-this-is-not-the-computer-for-you/
899•MBCook•17h ago•333 comments

Revealed: Face of 75,000-year-old female Neanderthal from cave

https://www.cam.ac.uk/stories/shanidar-z-face-revealed
32•thunderbong•2h ago•18 comments

What we learned from a 22-Day storage bug (and how we fixed it)

https://www.mux.com/blog/22-day-storage-bug
36•mmcclure•4d ago•7 comments