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.

GitHub Incident with Git Operations, Pull Requests and Actions

https://www.githubstatus.com/incidents/djlmxz2zd0j7
146•gagan2020•1h ago•110 comments

Navier–Stokes Lost in Translation

https://arxiv.org/abs/2610.08144
45•nill0•1h ago•20 comments

Shipping JPEG XL in Chrome

https://developer.chrome.com/blog/jpeg-xl-in-chrome
325•AshleysBrain•5h ago•194 comments

A font recreated from photographs of classic Commodore 64 keycaps

https://github.com/szabadkai/c64-keyboard-font/
274•sohkamyung•7h ago•49 comments

Nobel Prize in Chemistry 2026 to Henri B. Kagan and Kenso Soai

https://www.nobelprize.org/prizes/chemistry/2026/press-release/
210•sasvari•6h ago•35 comments

Animated ASCII Art for Web Pages

https://ascii.rest/
43•turrini•1h ago•6 comments

Show HN: A walkable 3D art history museum built from Wikipedia

https://artmuseum.artfrompixels.com/
84•jasontr•3h ago•42 comments

AI-assisted proof of optimal packing for 11 squares

https://github.com/Queuingtheorydotcom/11SquaresFormalized
33•bluepeter•2h ago•24 comments

Reverse Engineering of the M-VAVE FM-1 Pocket Synthesizer Firmware

https://github.com/AL-255/FM-1-RE
15•0bytes•1h ago•2 comments

Visa, Mastercard, Major Banks Facing New Litigation over 'Anticompetitive' Fees

https://www.classaction.org/news/visa-mastercard-major-banks-facing-new-litigation-over-anticompe...
24•DeepLogin•1h ago•6 comments

Anti-Patterns in Software Blogging

https://refactoringenglish.com/blog/anti-patterns-software-blogging/
47•ilreb•3h ago•14 comments

Write Like It's 1866: LLMs Relearn Telegraphese

https://fiveminutesforward.com/post/2026-10-04-telegraph-test/
60•Theory42•4h ago•38 comments

Mallet Head Angle

http://www.timberframe-tools.com/tools/mallet-head-angle/
49•frogulis•1d ago•15 comments

Google Playground

https://labs.google/playground
97•trollied•2h ago•71 comments

Across the Globe, People Increasingly Say Social Media Is Harming Democracy

https://www.pewresearch.org/global/2026/10/01/across-the-globe-people-increasingly-say-social-med...
43•karakoram•1h ago•25 comments

Vecos – A windows-like operating system for the Vectrex for the UVMC2 [video]

https://www.youtube.com/watch?v=9ranfp_vz30
4•CharlesW•18h ago•2 comments

Rust's derive often implies inline

https://yossarian.net/til/post/rust-s-derive-often-implies-inline/
80•woodruffw•3d ago•13 comments

Study: Claude, ChatGPT Offer Different Shopping Prices Based on Wealth

https://www.bloomberg.com/news/newsletters/2026-10-07/study-claude-chatgpt-ai-bots-offer-differen...
23•sbulaev•34m ago•1 comments

The Auditor's Opinion

https://www.cringely.com/2026/07/16/the-auditors-opinion/
7•colinprince•2d ago•1 comments

Wood Tape (2004)

http://gamesbyemail.com/WoodTape/Default.htm
31•NaOH•1d ago•4 comments

Paramount, Warner Bros Formally Merge, Form Giant Mountain of Disastrous Debt

https://www.techdirt.com/2026/10/07/paramount-warner-bros-formally-merge-form-giant-mountain-of-d...
21•cdrnsf•30m ago•1 comments

Show HN: Procinsh – A 3D Linux process inspector

https://github.com/akawashiro/procinsh
32•a_kawashiro•3h ago•6 comments

ShinyHunters Extorted Boeing Spin-Off Prior to Arrests

https://krebsonsecurity.com/2026/10/shinyhunters-extorted-boeing-spin-off-prior-to-arrests/
8•speckx•1h ago•0 comments

God of War on PSP, recompiled to WebAssembly and running in the browser

https://github.com/snuri00/psp-web-recomp
42•sn001•5h ago•22 comments

Strands Decider 2B: a small, open-source, decision model

https://strandsagents.com/blog/introducing-strands-decider/
256•gmays•14h ago•71 comments

Show HN: AstroHelm – Use your phone camera to aim a telescope or telephoto lens

https://astrohelm.app/
72•HeavenFox•3d ago•22 comments

Sharing AI progress in mathematics

https://openai.com/index/sharing-ai-progress-in-mathematics/
1140•OfficialTurkey•18h ago•1250 comments

SynthID Detector

https://synthid.com/
60•ilreb•2h ago•57 comments

Mistral Large 4

https://mistral.ai/news/mistral-large-4/\
1961•Philpax•1d ago•1170 comments

Tell HN: GitHub refuses to remove cracked copies of my software after a month

462•IvanK_net•21h ago•249 comments