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.

Steam Machine launches today

https://store.steampowered.com/news/group/45479024/view/685257114654870245
1318•theschwa•10h ago•1190 comments

Runing GLM-5.2 on local hardware

https://unsloth.ai/docs/models/glm-5.2
235•TechTechTech•6h ago•107 comments

In praise of memcached

https://jchri.st/blog/in-praise-of-memcached/
70•j03b•2h ago•24 comments

VibeThinker: 3B param model that beats Opus 4.5 on reasoning with novel SFT+GRPO

https://arxiv.org/abs/2606.16140
35•timhigins•1h ago•12 comments

Cyberdecks, going analog, and convivial technology

https://blog.hydroponictrash.solar/cyberdecks-going-analog-and-convivial-technology/
60•akkartik•3d ago•29 comments

Polymarket has flooded social media with deceptive videos by paid creators

https://www.wsj.com/business/media/polymarket-social-media-bets-prediction-market-441cdeb5?st=HhTZY2
63•Vaslo•2d ago•71 comments

Optocam Zero: a Pi Zero based digital camera made using off the shelf components

https://github.com/dorukkumkumoglu/optocamzero
125•iamnothere•8h ago•24 comments

My Mathematical Regression

https://blog.dahl.dev/posts/my-mathematical-regression/
233•aleda145•3d ago•84 comments

Japanese symbols that speak without words

https://arun.is/blog/japan-symbols/
127•msephton•8h ago•53 comments

An Introduction to YOLO26

https://blog.roboflow.com/yolo26/
8•teleforce•2h ago•0 comments

Windows NT for GameCube/Wii

https://github.com/Wack0/entii-for-workcubes
32•zdw•3d ago•5 comments

1,700 free online courses from top universities

https://www.openculture.com/freeonlinecourses
87•momentmaker•2h ago•17 comments

British Columbia, Time Zones, and Postgres

https://www.crunchydata.com/blog/british-columbia-and-time-zone-changes
122•sprawl_•8h ago•80 comments

Moebius: 0.2B image inpainting model with 10B-level performance

https://hustvl.github.io/Moebius/
248•DSemba•14h ago•65 comments

Is it time for a new Embedded Linux build system?

https://yoebuild.org/blog/time-for-a-new-build-system/
46•cbrake•4d ago•33 comments

Canada plans 'nuclear renaissance' with up to 10 reactors built by 2040

https://www.cbc.ca/news/politics/federal-nuclear-strategy-9.7244509
364•geox•8h ago•217 comments

Show HN: Oak – Git alternative designed for agents

https://oak.space/oak/oak
161•zdgeier•12h ago•152 comments

Canyon HUD helmet for road riding

https://media-centre.canyon.com/en-INT/266866-new-canyon-heads-up-display-helmet-could-be-a-safet...
75•zh3•2d ago•88 comments

Flock-Powered Police Chiefs Stalking Women Shows Why Warrants Are Needed

https://ipvm.com/reports/police-chiefs-track
424•jhonovich•8h ago•168 comments

Kyber (YC W23) Is Hiring a Head of Engineering

https://www.ycombinator.com/companies/kyber/jobs/FGmI8mx-head-of-engineering
1•asontha•6h ago

Ultralytics YOLO26: Unified Real-Time End-to-End Vision Models

https://arxiv.org/abs/2606.03748
8•teleforce•1h ago•0 comments

Package Managers need global hooks

https://captnemo.in/blog/2026/06/17/package-managers-need-hooks/
4•evakhoury•4d ago•0 comments

Show HN: Pagecast – Publish Markdown/HTML Reports to Cloudflare Pages

https://github.com/Amal-David/pagecast
36•amaldavid•4d ago•9 comments

SpaceX sheds $400B in market value as debut rally hits reverse

https://www.ft.com/content/c11d08ed-6668-4678-b829-1d50acbd12d4
37•simonpure•2h ago•20 comments

Job application asked for my SAT scores

https://mrmarket.lol/job-application-asked-for-my-sat-scores/
105•seltzerboys•7h ago•260 comments

Prompt Injection as Role Confusion

https://role-confusion.github.io
164•x312•12h ago•87 comments

Show HN: Got sick of ads, so I made my own logic puzzle site

https://puzzlelair.com/
156•HaxleRose•15h ago•104 comments

Help I accidentally a wigglegram

https://lmao.center/blog/wiggle-accidents/
502•gregsadetsky•3d ago•120 comments

Chevron signs 20-year power agreement with Microsoft for West Texas data center

https://www.chevron.com/newsroom/2026/q2/chevron-signs-20-year-power-agreement-with-microsoft-for...
130•cdrnsf•14h ago•117 comments

ytr: YouTube Radio for Emacs

https://xenodium.com/ytr-youtube-radio-for-emacs
69•xenodium•6h ago•8 comments