frontpage.
newsnewestaskshowjobs

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.

KetchUp – Open-source SketchUp alternative built with Rust and WebGPU

https://ketchup3d.github.io/app/
263•dcoulmbe•4h ago•79 comments

Unlocking any car from X brand in most of the world

https://shubs.io/unlocking-any-car-from-x-brand-in-most-of-the-world/
116•infosecau•3h ago•37 comments

Chimera Vocal Synth

https://chimera-vocal-synth.vercel.app/
125•nmstoker•4h ago•17 comments

RIP, Harvest

https://aphyr.com/posts/427-rip-harvest
26•zdw•1h ago•3 comments

Declarative Dragging

https://declarative-dragging.github.io/
392•smusamashah•4d ago•48 comments

Dux: Free, open-source Wayland desktop shell with file manager and theming

https://duxlabs.dev/
214•indigodaddy•8h ago•66 comments

Outlook.com Is Quietly Rejecting Email from Domains Without DMARC

https://mailroute.net/blog/outlook-rejecting-email-without-dmarc
278•xmddmx•8h ago•201 comments

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

153•david927•6h ago•535 comments

Herb Sutter: When a language's creator and its owners strongly disagree [pdf]

https://isocpp.org/files/papers/P4454R0.pdf
85•acossta•3h ago•66 comments

The Web Is More Than Enough, by Paul Ford

https://ftrain.com/aboard-the-web-is-more-than-enough
93•edward•7h ago•52 comments

Goldman Sachs is pulling Claude Code from its bankers and traders

https://www.thestateofai.com/news/goldman-sachs-claude-code-traders-bankers
643•TheWiggles•9h ago•364 comments

Ask HN: How do you manage your AI agents' context across clients and projects?

8•Michel_Aventin•1d ago•2 comments

Taco: The Tensor Algebra Compiler

http://tensor-compiler.org/
10•measurablefunc•5d ago•0 comments

Llama-modchip: 284B DeepSeek on 64GB RAM, no GPU

https://github.com/synchopate/llama-modchip
380•joshcsimmons•17h ago•167 comments

Writing as a thinking tool

http://muratbuffalo.blogspot.com/2026/11/writing-as-thinking-tool.html
298•jruohonen•16h ago•83 comments

Air holes turn silicon wafers into flat UV focusing mirrors for compact optics

https://phys.org/news/2026-11-air-holes-silicon-wafers-flat.html
33•bookofjoe•1d ago•3 comments

The History of Djgpp (1998)

https://www.delorie.com/djgpp/history.html
55•atan2•5d ago•18 comments

Playing with the STM32MP2

https://serd.es/2026/11/08/playing-with-stm32mp2.html
44•dverlaeckt80•8h ago•30 comments

How I Fight AI Brain Fry

https://sergeykuhne.com/blog/fighting-ai-brain-fry
171•kyunez•7h ago•137 comments

Edward Hopper's Iconic Painting, "Nighthawks

https://lithub.com/the-story-behind-edward-hoppers-iconic-painting-nighthawks/
81•prismatic•4d ago•28 comments

Goodbye Claude, hello Pi

https://caleb.software/posts/claude-to-pi.html
709•karagenit•1d ago•441 comments

Show HN: Vegetable Gardening for Engineers

https://jrcpl.us/contrib/2020/gardening-for-engineers/
175•jrcplus•4d ago•34 comments

Are big problems more difficult to solve?

https://paulitaylor.com/2026/09/11/are-big-problems-really-more-difficult-to-solve/
4•andsoitis•1d ago•0 comments

I'm not a fan of Deno's security model (2024)

https://goldstein.lol/posts/deno-security/
90•maxloh•12h ago•45 comments

Claude Code's "Don't Ask Again" exposes passwords in 1,122 public GitHub files

https://apiiro.com/blog/coding-agents-leaking-secrets-github-dont-ask-again
595•shmulc•1d ago•403 comments

A Little Snitch for Windows

https://packethound.app/
101•BadBoyBubby•10h ago•47 comments

Nvidia Board of Directors Is Investigating Jensen Huang

https://nvidianews.nvidia.com/news/statement-from-nvidia-board-of-directors
423•vincentchau•6h ago•311 comments

The Kekulé Problem – Cormac McCarthy

https://nautil.us/the-kekul-problem-236574
8•bearseascape•3d ago•5 comments

Porting Android 16 to my blind mother's keypad phone

https://z1x.us/blog/four-hundred-bucks-of-e-waste
162•z1xus•4d ago•50 comments

Playing Zork 1 on a CP/M emulator on Linux (2021)

https://kevinboone.me/cpmzork.html
32•linuxkernal•8h ago•14 comments