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.

A low-carbon computing platform from your retired phones

https://research.google/blog/a-low-carbon-computing-platform-from-your-retired-phones/
59•vikas-sharma•3h ago•26 comments

Leaving Mozilla

https://blog.unitedheroes.net/5751
294•martey•6h ago•169 comments

Show HN: 2 Weeks of Hallucinate – The Photo Gallery

https://hallucinate.site/gallery
17•stagas•29m ago•2 comments

Electric motors with no rare earths

https://www.renaultgroup.com/en/magazine/energy-and-powertrains/all-about-electric-motors-with-no...
531•bestouff•14h ago•153 comments

The state of building user interfaces in Rust

https://areweguiyet.com/#ecosystem
28•mahirsaid•2d ago•14 comments

Statement on US government directive to suspend access to Fable 5 and Mythos 5

https://www.anthropic.com/news/fable-mythos-access
2572•Dylan1312•11h ago•1849 comments

CRISPR tech selectively shreds cancer cells, including "undruggable" cancers

https://innovativegenomics.org/news/crispr-technique-selectively-shreds-cancer-cells/
861•gmays•21h ago•192 comments

Thoughts on AI and Jobs

https://blog.keyvan.net/p/thoughts-on-ai-and-jobs
6•k1m•20m ago•3 comments

Show HN: Paca – Lightweight Jira alternative for human-AI collaboration

https://github.com/Paca-AI/paca
37•pikann22•2h ago•21 comments

Arch Linux Now Believes Malware Incident Under Control: More Than 1,500 Packages

https://www.phoronix.com/news/Arch-Linux-AUR-More-Than-1500
33•qwertox•46m ago•3 comments

Open source AI must win

https://opensourceaimustwin.com/?share=v2
1118•vednig•10h ago•350 comments

How to setup a local coding agent on macOS

https://ikyle.me/blog/2026/how-to-setup-a-local-coding-agent-on-macos
398•kkm•19h ago•101 comments

There is a shadow hanging over this Fable thing

https://12gramsofcarbon.com/p/tech-things-there-is-a-massive-shadow
324•theahura•7h ago•291 comments

Show HN: Putt.day a daily mini golf game

https://putt.day/
206•ellg•13h ago•88 comments

The computer science degree isn’t dead

https://spectrum.ieee.org/computer-science-degree-isnt-dead
116•jnord•3d ago•106 comments

Malware developers added nuclear and biological weapons text to to their spyware

https://twitter.com/jsrailton/status/2064661778978533571
411•marc__1•1d ago•225 comments

Twenty One Zero-Days in FFmpeg

https://depthfirst.com/research/21-zero-days-in-ffmpeg
236•redbell•14h ago•151 comments

Swift at Apple: Migrating the TrueType hinting interpreter

https://www.swift.org/blog/migrating-truetype-hinting-to-swift/
210•DASD•16h ago•97 comments

Israeli firm BlackCore suspected of meddling in New York and Scotland votes

https://www.reuters.com/world/israeli-firm-blackcore-also-suspected-meddling-nyc-scotland-votes-f...
249•pera•4h ago•122 comments

The Riemann Hypothesis – interactive explanation

https://riemann.adilmoujahid.com
5•lifty•2d ago•0 comments

Shepherd's Dog: A Game by the Most Dangerous AI Model

https://koenvangilst.nl/lab/claude-fable-shepherds-dog
106•vnglst•6h ago•93 comments

Launch HN: BitBoard (YC P25) – Analytics Workspace for Agents

https://bitboard.work/
46•arcb•19h ago•21 comments

H.R. 6028 would fundamentally change the U.S. Copyright Office

https://www.eff.org/deeplinks/2026/06/congress-just-rushed-through-disastrous-copyright-office-ov...
231•Cider9986•2d ago•81 comments

Pirates, a naval warfare game inspired by Sid Meier's Pirates

https://piwodlaiwo.github.io/pirates/
282•iweczek•19h ago•82 comments

Show HN: Lightweight Task queue on Erlang/OTP, SQLite-backed, no overengineering

https://github.com/entGriff/ezra
49•ent1c3d•2d ago•9 comments

Automating Myself Out of Development

https://www.thoughtfultechnologist.com/p/automating-myself-out-of-development
39•nisabek•3d ago•22 comments

Tectonic: A modernized, complete, self-contained TeX/LaTeX engine

https://tectonic-typesetting.github.io/en-US/
66•maxloh•3d ago•31 comments

On CPU Physics and CPU Cycles

https://6it.dev/blog/on-cpu-physics-and-cpu-cycles-80730
53•signa11•8h ago•7 comments

Fudgetown, USA (2024)

https://tastecooking.com/fudgetown-usa/
8•NaOH•1d ago•0 comments

Slightly reducing the sloppiness of AI generated front end

https://envs.net/~volpe/blog/posts/reduce-slop.html
201•FergusArgyll•21h ago•122 comments