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•1y ago

Comments

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

CUDA-oxide: Nvidia's official Rust to CUDA compiler

https://nvlabs.github.io/cuda-oxide/index.html
123•adamnemecek•1h ago•22 comments

Nullsoft, 1997-2004 AOL kills off the last maverick tech company (2004)

https://slate.com/technology/2004/11/the-death-of-the-last-maverick-tech-company.html
69•downbad_•3d ago•22 comments

Ratty – A terminal emulator with inline 3D graphics

https://ratty-term.org/
479•orhunp_•7h ago•166 comments

Training an LLM in Swift, Part 1: Taking matrix mult from Gflop/s to Tflop/s

https://www.cocoawithlove.com/blog/matrix-multiplications-swift.html
135•zdw•1d ago•8 comments

Show HN: TikTok but for Scientific Papers

https://andreaturchet.github.io/website/index.html
23•ciwrl•1h ago•13 comments

Bild AI (YC W25) Is Hiring Founding Product Engineers

https://bild.ai/jobs
1•rooppal•8m ago

Gmail registration now requires scanning a QR code and sending a text message

https://discuss.privacyguides.net/t/google-account-registration-now-requires-sending-an-sms-via-p...
332•negura•10h ago•193 comments

AMÁLIA and the future of European Portuguese LLMs

https://duarteocarmo.com/blog/amalia-and-the-future-of-european-portuguese-llms
59•johnbarron•3d ago•25 comments

Interfaze: A new model architecture built for high accuracy at scale

https://interfaze.ai/blog/interfaze-a-new-model-architecture-built-for-high-accuracy-at-scale
14•yoeven•1h ago•3 comments

Venom and Hot Peppers Offer a Key to Killing Resistant Bacteria

https://www.wired.com/story/mexican-science-transforms-scorpion-venom-and-habanero-chile-into-ant...
116•littlexsparkee•2d ago•28 comments

I'm going back to writing code by hand

https://blog.k10s.dev/im-going-back-to-writing-code-by-hand/
784•dropbox_miner•16h ago•451 comments

Building a web server in aarch64 assembly to give my life (a lack of) meaning

https://imtomt.github.io/ymawky/
51•theanonymousone•3d ago•17 comments

Holding Community Space

https://supernuclear.substack.com/p/building-a-space-people-never-want
8•surprisetalk•3d ago•2 comments

Software engineering may no longer be a lifetime career

https://www.seangoedecke.com/software-engineering-may-no-longer-be-a-lifetime-career/
125•movis•3h ago•212 comments

Running local models on an M4 with 24GB memory

https://jola.dev/posts/running-local-models-on-m4
488•shintoist•18h ago•146 comments

Guitar tuner that uses phone accelerometer

https://tautme.github.io/phone-sensors/accel-tuner.html
120•adm4•3d ago•67 comments

The greatest shot in television: James Burke had one chance to nail this scene (2024)

https://www.openculture.com/2024/10/the-greatest-shot-in-television.html
290•susam•15h ago•172 comments

Should you leave red herrings about yourself online?

https://blog.alcazarsec.com/posts/should-you-leave-red-herrings-about-yourself-online
11•alcazar•2h ago•7 comments

Hardware Attestation as Monopoly Enabler

https://grapheneos.social/@GrapheneOS/116550899908879585
1989•ChuckMcM•23h ago•671 comments

Why we lose our friends as we age (2023)

https://www.theatlantic.com/newsletters/archive/2023/02/friendship-aging/673026/
45•paulpauper•1h ago•28 comments

An AI coding agent, used to write code, needs to reduce your maintenance costs

https://www.jamesshore.com/v2/blog/2026/you-need-ai-that-reduces-your-maintenance-costs
308•cratermoon•18h ago•88 comments

Local AI needs to be the norm

https://unix.foo/posts/local-ai-needs-to-be-norm/
1646•cylo•1d ago•643 comments

Obsidian plugin was abused to deploy a remote access trojan

https://cyber.netsecops.io/articles/obsidian-plugin-abused-in-campaign-to-deploy-phantom-pulse-rat/
315•cmbailey•19h ago•188 comments

Students Boo Commencement Speaker After She Calls AI Next Industrial Revolution

https://www.404media.co/ucf-ai-commencement-speaker-booed/
38•cdrnsf•1h ago•6 comments

Scaffold a 1990s Geocities-themed static website

https://pypi.org/project/create-geocities-app/
36•whatsupdog•4h ago•15 comments

Classification of amino acids

https://www.khanacademy.org/test-prep/mcat/chemical-processes/amino-acids-peptides-proteins-5d/v/...
50•kamaraju•2d ago•2 comments

Mythos Finds a Curl Vulnerability

https://daniel.haxx.se/blog/2026/05/11/mythos-finds-a-curl-vulnerability/
502•TangerineDream•11h ago•211 comments

Bliss (Photograph)

https://en.wikipedia.org/wiki/Bliss_(photograph)
85•cainxinth•3d ago•39 comments

A.I. note takers are making lawyers nervous

https://www.nytimes.com/2026/05/09/business/dealbook/ai-notetakers-legal-risk.html
161•JumpCrisscross•7h ago•120 comments

The Adventure Family Tree (2024)

https://mipmip.org/advfamily/advfamily.html
46•exvi•9h ago•7 comments