frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Fast(er) regular expression engines in Ruby

https://serpapi.com/blog/faster-regular-expression-engines-in-ruby/
60•davidsojevic•2mo ago

Comments

yxhuvud•2mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•2mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•2mo 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•2mo 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•2mo 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•2mo 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.

RapidRAW: A non-destructive and GPU-accelerated RAW image editor

https://github.com/CyberTimon/RapidRAW
92•l8rlump•3h ago•18 comments

Where can I see Hokusai's Great Wave today?

https://greatwavetoday.com/
36•colinprince•2h ago•19 comments

Bootstrapping a side project into a profitable seven-figure business

https://projectionlab.com/blog/we-reached-1m-arr-with-zero-funding
417•jonkuipers•1d ago•91 comments

Breaking Git with a carriage return and cloning RCE

https://dgl.cx/2025/07/git-clone-submodule-cve-2025-48384
296•dgl•12h ago•102 comments

Helm local code execution via a malicious chart – CVE-2025-53547

https://github.com/helm/helm/security/advisories/GHSA-557j-xg8c-q2mm
3•irke882•24m ago•0 comments

Phrase origin: Why do we "call" functions?

https://quuxplusone.github.io/blog/2025/04/04/etymology-of-call/
61•todsacerdoti•2h ago•34 comments

Frame of preference A history of Mac settings, 1984–2004

https://aresluna.org/frame-of-preference/
69•K7PJP•6h ago•13 comments

Supabase MCP can leak your entire SQL database

https://www.generalanalysis.com/blog/supabase-mcp-blog
662•rexpository•12h ago•333 comments

Smollm3: Smol, multilingual, long-context reasoner LLM

https://huggingface.co/blog/smollm3
268•kashifr•14h ago•50 comments

I'm Building LLM for Satellite Data EarthGPT.app

https://www.earthgpt.app/
7•sabman•1d ago•1 comments

Bulgaria to join euro area on 1 January 2026

https://www.ecb.europa.eu//press/pr/date/2025/html/ecb.pr250708~b9676a9fa8.en.html
177•toomuchtodo•5h ago•106 comments

Radium Music Editor

http://users.notam02.no/~kjetism/radium/
181•ofalkaed•12h ago•35 comments

Surfing on a Matchbox (1999)

http://news.bbc.co.uk/2/hi/science/nature/276762.stm
13•TMWNN•2d ago•3 comments

Brut: A New Web Framework for Ruby

https://naildrivin5.com/blog/2025/07/08/brut-a-new-web-framework-for-ruby.html
155•onnnon•12h ago•52 comments

Xenharmlib: A music theory library that supports non-western harmonic systems

https://xenharmlib.readthedocs.io/en/latest/
58•retooth•7h ago•5 comments

Libpostal: C library for parsing/normalizing street addresses around the world

https://github.com/openvenues/libpostal
25•nateb2022•4h ago•6 comments

Swahili on the Road

https://www.historytoday.com/archive/behind-times/swahili-road
16•Thevet•5h ago•2 comments

Dynamical origin of Theia, the last giant impactor on Earth

https://arxiv.org/abs/2507.01826
81•bikenaga•12h ago•27 comments

Show HN: OffChess – Offline chess puzzles app

https://offchess.com
310•avadhesh18•21h ago•138 comments

Taking over 60k spyware user accounts with SQL injection

https://ericdaigle.ca/posts/taking-over-60k-spyware-user-accounts/
184•mtlynch•5d ago•58 comments

Rules of good writing (2007)

https://dilbertblog.typepad.com/the_dilbert_blog/2007/06/the_day_you_bec.html
79•santiviquez•1d ago•59 comments

Plants monitor the integrity of their barrier by sensing gas diffusion

https://www.nature.com/articles/s41586-025-09223-4
67•Bluestein•3d ago•31 comments

New Horizons images enable first test of interstellar navigation

https://www.newscientist.com/article/2486823-new-horizons-images-enable-first-test-of-interstellar-navigation/
31•jnord•2d ago•2 comments

Can an email go 500 miles in 2025?

https://flak.tedunangst.com/post/can-an-email-go-500-miles-in-2025
285•zdw•4d ago•106 comments

GlobalFoundries to Acquire MIPS

https://mips.com/press-releases/gf-mips/
198•mshockwave•13h ago•112 comments

At the frontier between two lives–the evolutionary origins of pregnancy

https://phys.org/news/2025-07-frontier-evolutionary-pregnancy.html
10•wglb•2d ago•1 comments

Choosing a Database Schema for Polymorphic Data (2024)

https://www.dolthub.com/blog/2024-06-25-polymorphic-associations/
22•gm678•6h ago•5 comments

Ceramic: A cross-platform and open-source 2D framework in Haxe

https://ceramic-engine.com/
73•-yukari•3d ago•10 comments

Show HN: A rain Pomodoro with brown noise, ASMR, and Middle Eastern music

https://forgetoolz.com/rain-pomodoro
74•ShadowUnknown•12h ago•34 comments

Blind to Disruption – The CEOs Who Missed the Future

https://steveblank.com/2025/07/08/blind-to-disruption-the-ceos-who-missed-the-future/
108•ArmageddonIt•16h ago•127 comments