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.

London–Calcutta Bus Service

https://en.wikipedia.org/wiki/London%E2%80%93Calcutta_bus_service
77•thunderbong•50m ago•31 comments

Kagi releases alpha version of Orion for Linux

https://help.kagi.com/orion/misc/linux-status.html
154•HelloUsername•2h ago•96 comments

Mathematics for Computer Science (2018) [pdf]

https://courses.csail.mit.edu/6.042/spring18/mcs.pdf
243•vismit2000•8h ago•36 comments

Linux Runs on Raspberry Pi RP2350's Hazard3 RISC-V Cores (2024)

https://www.hackster.io/news/jesse-taube-gets-linux-up-and-running-on-the-raspberry-pi-rp2350-s-h...
76•walterbell•5d ago•21 comments

When Kitty Litter Caused a Nuclear Catastrophe

https://practical.engineering/blog/2025/4/15/when-kitty-litter-caused-a-nuclear-catastrophe
37•tape_measure•4d ago•10 comments

How wolves became dogs

https://www.economist.com/christmas-specials/2025/12/18/how-wolves-became-dogs
58•mooreds•3d ago•38 comments

Sorted string tables (SST) from first principles

https://www.bitsxpages.com/p/sorted-string-tables-sst-from-first
24•apurvamehta•3d ago•1 comments

How to Code Claude Code in 200 Lines of Code

https://www.mihaileric.com/The-Emperor-Has-No-Clothes/
622•nutellalover•19h ago•197 comments

How Will the Miracle Happen Today?

https://kk.org/thetechnium/how-will-the-miracle-happen-today/
5•zdw•4d ago•0 comments

Samba Was Written (2003)

https://download.samba.org/pub/tridge/misc/french_cafe.txt
111•tosh•5d ago•41 comments

Hacking a Casio F-91W digital watch (2023)

https://medium.com/infosec-watchtower/how-i-hacked-casio-f-91w-digital-watch-892bd519bd15
152•jollyjerry•4d ago•45 comments

Embassy: Modern embedded framework, using Rust and async

https://github.com/embassy-rs/embassy
261•birdculture•16h ago•117 comments

Sopro TTS: A 169M model with zero-shot voice cloning that runs on the CPU

https://github.com/samuel-vitorino/sopro
299•sammyyyyyyy•19h ago•111 comments

European Commission issues call for evidence on open source

https://lwn.net/Articles/1053107/
329•pabs3•8h ago•224 comments

What happened to WebAssembly

https://emnudge.dev/blog/what-happened-to-webassembly/
237•enz•8h ago•210 comments

Bose has released API docs and opened the API for its EoL SoundTouch speakers

https://arstechnica.com/gadgets/2026/01/bose-open-sources-its-soundtouch-home-theater-smart-speak...
2411•rayrey•1d ago•365 comments

"They Saw a Protest": Cognitive Illiberalism and the Speech-Conduct Distinction [pdf]

https://www.stanfordlawreview.org/wp-content/uploads/sites/3/2012/05/Kahan-64-Stan-L-Rev-851.pdf
5•pcaharrier•1h ago•0 comments

Richard D. James aka Aphex Twin speaks to Tatsuya Takahashi (2017)

https://web.archive.org/web/20180719052026/http://item.warp.net/interview/aphex-twin-speaks-to-ta...
216•lelandfe•18h ago•75 comments

The Jeff Dean Facts

https://github.com/LRitzdorf/TheJeffDeanFacts
508•ravenical•1d ago•174 comments

Show HN: Executable Markdown files with Unix pipes

81•jedwhite•13h ago•62 comments

Photographing the hidden world of slime mould

https://www.bbc.com/news/articles/c9d9409p76qo
73•1659447091•1w ago•18 comments

The unreasonable effectiveness of the Fourier transform

https://joshuawise.com/resources/ofdm/
271•voxadam•20h ago•116 comments

AI coding assistants are getting worse?

https://spectrum.ieee.org/ai-coding-degrades
373•voxadam•1d ago•604 comments

Replit founder Amjad Masad isn’t afraid of Silicon Valley

https://sfstandard.com/2026/01/07/called-terrorist-sympathizer-now-ai-company-valued-3b/
248•newusertoday•21h ago•338 comments

1ML for non-specialists: introduction

https://pithlessly.github.io/1ml-intro
27•birdculture•6d ago•9 comments

Why I left iNaturalist

https://kueda.net/blog/2026/01/06/why-i-left-inat/
230•erutuon•14h ago•129 comments

Anthropic blocks third-party use of Claude Code subscriptions

https://github.com/anomalyco/opencode/issues/7410
475•sergiotapia•11h ago•390 comments

Ushikuvirus: Newly discovered virus may offer clues to the origin of eukaryotes

https://www.tus.ac.jp/en/mediarelations/archive/20251219_9539.html
119•rustoo•1d ago•37 comments

Systematically Improving Espresso: Mathematical Modeling and Experiment (2020)

https://www.cell.com/matter/fulltext/S2590-2385(19)30410-2
58•austinallegro•6d ago•12 comments

Google AI Studio is now sponsoring Tailwind CSS

https://twitter.com/OfficialLoganK/status/2009339263251566902
714•qwertyforce•20h ago•266 comments