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.

Popping the GPU Bubble

https://moondream.ai/blog/popping-the-gpu-bubble
36•radq•45m ago•5 comments

Qwen 3.6 27B is the sweet spot for local development

https://quesma.com/blog/qwen-36-is-awesome/
778•stared•12h ago•562 comments

.self: A new top-level domain designed to support self-hosting

https://hccf.onmy.cloud/2026/06/21/reclaiming-our-digital-selves-hccfs-vision-for-a-human-centere...
418•HumanCCF•10h ago•242 comments

Free the Icons

https://weblog.rogueamoeba.com/2026/06/26/free-the-icons/
353•zdw•2d ago•93 comments

Study suggests most Americans would be healthier without daylight saving time

https://med.stanford.edu/news/all-news/2025/09/daylight-saving-time.html
30•andsoitis•2h ago•10 comments

Memory Safe Context Switching

https://fil-c.org/context_switches
84•modeless•5h ago•22 comments

Old Computer Challenge

http://occ.sdf.org/
39•wrxd•2d ago•7 comments

LongCat-2.0, a large-scale MoE model with 1.6T total and 48B Active

https://longcat.chat/blog/longcat-2.0/
81•benjiro29•5h ago•22 comments

Exploring PDP-1 Lisp (1960)

https://obsolescence.dev/pdp1-lisp-introduction.html
45•ozymandiax•5h ago•16 comments

Rocketlab acquires Iridium

https://investors.rocketlabcorp.com/news-releases/news-release-details/rocket-lab-acquire-iridium...
390•everfrustrated•15h ago•255 comments

Linux for the Sega MegaDrive

https://github.com/LinuxMD/linuxmd
61•HardwareLust•14h ago•7 comments

30-year sentence for transporting zines is a five-alarm fire for free speech

https://theintercept.com/2026/06/26/daniel-sanchez-estrada-zines-prairieland-free-speech/
488•xrd•1d ago•294 comments

Ornith-1.0: self-improving open-source models for agentic coding

https://github.com/deepreinforce-ai/Ornith-1
186•danboarder•12h ago•37 comments

How to corrupt an SQLite database file

https://www.sqlite.org/howtocorrupt.html
42•tosh•3d ago•12 comments

US Supreme Court rules geofence warrants require constitutional protections

https://www.theguardian.com/us-news/2026/jun/29/supreme-court-geofence-warrants-case-decision
503•cdrnsf•14h ago•232 comments

Zig – SPIR-V Backend Progress

https://ziglang.org/devlog/2026/#2026-06-26
41•Retro_Dev•4d ago•14 comments

One million passports leaked online

https://www.theverge.com/tech/947157/passports-data-breach-cannabis-club-systems-nefos-puffpal
204•jruohonen•1d ago•115 comments

Kb – Prolog Knowledge Base

https://github.com/mat-mgm/kb-prolog
62•triska•2d ago•6 comments

A native graphical shell for SSH

https://probablymarcus.com/blocks/2026/06/28/native-graphical-shell-for-SSH.html
278•mrcslws•14h ago•143 comments

Apple Neural Engine: Architecture, Programming, and Performance

https://arxiv.org/abs/2606.22283
147•Jimmc414•2d ago•20 comments

Philae's extraordinary comet landing relived (2024)

https://www.esa.int/Science_Exploration/Space_Science/Rosetta/Philae_s_extraordinary_comet_landin...
15•1970-01-01•5d ago•1 comments

South Korea to spend $1T on more memory chip production and humanoid robots

https://arstechnica.com/ai/2026/06/south-korea-to-spend-1t-on-more-memory-chip-production-and-hum...
192•jnord•7h ago•107 comments

WATaBoy: JIT-Ing Game Boy Instructions to WASM Beats a Native Interpreter

https://humphri.es/blog/WATaBoy/
198•energeticbark•14h ago•31 comments

Dark Sky Lighting

https://www.savingourstars.org/darkskylighting#whatisdarkskylighting
185•alexandrehtrb•4d ago•31 comments

Wallace the 6 inch f/2.8 telescope, building it, and hiking with it

https://lucassifoni.info/blog/hiking-with-wallace/
127•chantepierre•3d ago•20 comments

Walter S. Arnold–Sculptor/Stone Carver

https://stonecarver.com/
8•NaOH•2d ago•1 comments

What happens when you run a CUDA kernel?

https://fergusfinn.com/blog/what-happens-when-you-run-a-gpu-kernel/
234•mezark•16h ago•28 comments

Alan Kay on the meaning of "object-oriented programming" (2003)

https://notes.shixiangxi.com/en/docs/appendix/alan-kay-on-oop/
38•sxx0•2d ago•9 comments

Working With AI: A concrete example

https://htmx.org/essays/working-with-ai/
124•comma_at•15h ago•41 comments

A Fake Shell for Pangenomics

https://www.cs.cornell.edu/~asampson/blog/flash.html
5•matt_d•3d ago•0 comments