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.

US Government directive to suspend access to Fable 5 and Mythos 5

https://www.anthropic.com/news/fable-mythos-access
531•Dylan1312•58m ago•303 comments

Renault: Electric motors with no rare earths

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

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

https://innovativegenomics.org/news/crispr-technique-selectively-shreds-cancer-cells/
697•gmays•10h ago•174 comments

Twenty One Zero-Days in FFmpeg

https://depthfirst.com/research/21-zero-days-in-ffmpeg
95•redbell•3h ago•43 comments

Swift at Apple: Migrating the TrueType hinting interpreter

https://www.swift.org/blog/migrating-truetype-hinting-to-swift/
132•DASD•5h ago•60 comments

Show HN: Putt.day a daily mini golf game

https://putt.day/
67•ellg•2h ago•50 comments

How to setup a local coding agent on macOS

https://ikyle.me/blog/2026/how-to-setup-a-local-coding-agent-on-macos
257•kkm•8h ago•71 comments

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

https://twitter.com/jsrailton/status/2064661778978533571
304•marc__1•1d ago•188 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...
118•Cider9986•2d ago•29 comments

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

https://piwodlaiwo.github.io/pirates/
193•iweczek•8h ago•73 comments

As a result of a US Government directive, we are suspending access to Fable 5

https://twitter.com/ClaudeDevs/status/2065597942602531163
23•plonkus•47m ago•1 comments

Palantir loses legal challenge against Swiss investigative magazine

https://www.ft.com/content/7ffcace7-9dc0-4e7e-9912-895ac073f979
194•sschueller•5h ago•44 comments

/architect: Reduce Fable tokens by 80%, Fable orchestrates/reviews, Codex builds

https://github.com/DanMcInerney/architect-loop
45•DanMcInerney•5h ago•25 comments

Slightly reducing the sloppiness of AI generated front end

https://envs.net/~volpe/blog/posts/reduce-slop.html
165•FergusArgyll•11h ago•110 comments

"Don't You Just Upload It to ChatGPT?"

https://correresmidestino.com/dont-you-just-upload-it-to-chatgpt/
308•speckx•7h ago•266 comments

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

https://bitboard.work/
35•arcb•8h ago•19 comments

AMD Stiffs Researcher $10k Bug Bounty

https://www.gadgetreview.com/amd-stiffs-researcher-10000-bug-bounty-after-critical-security-flaw-...
51•worik•2h ago•2 comments

Where Did Earth Get Its Oceans? Maybe It Made Them Itself

https://www.quantamagazine.org/where-did-earth-get-its-oceans-maybe-it-made-them-itself-20260612/
105•ibobev•10h ago•60 comments

Introduction to UEFI HTTP(s) Boot with QEMU/OVMF

https://blog.yadutaf.fr/2026/06/12/introduction-to-uefi-https-boot-qemu-ovmf/
78•jtlebigot•11h ago•26 comments

SkillSpector

https://github.com/NVIDIA/SkillSpector
15•taubek•4h ago•3 comments

If you are asking for human attention, demonstrate human effort

https://tombedor.dev/human-attention-and-human-effort/
1502•jjfoooo4•1d ago•461 comments

DNI Gabbard Reveals Evidence of U.S. Taxpayer-Funded Global Biolab Program

https://www.dni.gov/index.php/newsroom/press-releases/press-releases-2026/4163-pr-10-26
8•bookofjoe•3h ago•2 comments

Adaptive PDFs

https://sgaud.com/texts/pdf
118•SarthakGaud•9h ago•63 comments

A key remapping daemon for Linux

https://github.com/rvaiya/keyd
10•joooscha•2d ago•4 comments

The forgotten Scots who gave Kafka his voice

https://engelsbergideas.com/reviews/the-forgotten-scots-who-gave-kafka-his-voice/
8•the-mitr•1d ago•0 comments

Maxproof

https://arxiv.org/abs/2606.13473
127•ilreb•13h ago•12 comments

Most Beautiful Will Ever Made (1936)

https://paperspast.natlib.govt.nz/newspapers/DOM19360307.2.43
43•cf100clunk•7h ago•12 comments

There Is Life Before Main in Rust

https://grack.com/blog/2026/06/11/life-before-main/
70•mmastrac•1d ago•18 comments

Show HN: Turn your name into a tree in an infinite procedural shanshui landscape

https://landscape.bairui.dev/
17•subairui•2d ago•6 comments

Hazel (YC W24) Is Hiring a Full Stack Engineer

https://www.ycombinator.com/companies/hazel-2/jobs/3epPWgu-full-stack-engineer-ts-sci
1•augustschen•12h ago