frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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•7mo ago

Comments

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

A “frozen” dictionary for Python

https://lwn.net/SubscriberLink/1047238/25c270b077849dc0/
79•jwilk•3h ago•46 comments

Size of Life

https://neal.fun/size-of-life/
2175•eatonphil•21h ago•241 comments

Meta shuts down global accounts linked to abortion advice and queer content

https://www.theguardian.com/global-development/2025/dec/11/meta-shuts-down-global-accounts-linked...
180•ta988•2h ago•102 comments

Show HN: Local Privacy Firewall-blocks PII and secrets before ChatGPT sees them

https://github.com/privacyshield-ai/privacy-firewall
18•arnabkarsarkar•1d ago•1 comments

The Cost of a Closure in C

https://thephd.dev/the-cost-of-a-closure-in-c-c2y
102•ingve•6h ago•33 comments

Getting a Gemini API key is an exercise in frustration

https://ankursethi.com/blog/gemini-api-key-frustration/
617•speckx•17h ago•247 comments

Patterns.dev

https://www.patterns.dev/
362•handfuloflight•12h ago•83 comments

Australia begins enforcing world-first teen social media ban

https://www.reuters.com/legal/litigation/australia-social-media-ban-takes-effect-world-first-2025...
832•chirau•1d ago•1268 comments

Why Startups Die

https://www.techfounderstack.com/p/why-startups-die
54•makle•3d ago•35 comments

Show HN: oeis-tui – A TUI to search OEIS integer sequences in the terminal

https://github.com/hako/oeis-tui
9•wesleyhill•1w ago•0 comments

Helldivers 2 on-disk size 85% reduction

https://store.steampowered.com/news/app/553850/view/491583942944621371
74•SergeAx•1w ago•53 comments

How the Brain Parses Language

https://www.quantamagazine.org/the-polyglot-neuroscientist-resolving-how-the-brain-parses-languag...
47•mylifeandtimes•3d ago•14 comments

Auto-grading decade-old Hacker News discussions with hindsight

https://karpathy.bearblog.dev/auto-grade-hn/
474•__rito__•20h ago•213 comments

Booting Linux in QEMU and Writing PID 1 in Go to Illustrate Kernel as Program

https://serversfor.dev/linux-inside-out/the-linux-kernel-is-just-a-program/
159•birdculture•6d ago•40 comments

South Korea – A Cautionary Tale for the Rest of Humanity

https://worksinprogress.co/issue/two-is-already-too-many/
6•barry-cotter•1h ago•4 comments

How Google Maps allocates survival across London's restaurants

https://laurenleek.substack.com/p/how-google-maps-quietly-allocates
307•justincormack•2d ago•151 comments

Python Workers redux: fast cold starts, packages, and a uv-first workflow

https://blog.cloudflare.com/python-workers-advancements/
77•dom96•2d ago•28 comments

Go's escape analysis and why my function return worked

https://bonniesimon.in/blog/go-escape-analysis
23•bonniesimon•6d ago•11 comments

VCMI: An open-source engine for Heroes III

https://vcmi.eu/
130•eamag•4d ago•15 comments

How can I read the standard output of an already-running process?

https://devblogs.microsoft.com/oldnewthing/20251204-00/?p=111841
4•ibobev•5d ago•0 comments

Rubio stages font coup: Times New Roman ousts Calibri

https://www.reuters.com/world/us/rubio-stages-font-coup-times-new-roman-ousts-calibri-2025-12-09/
317•italophil•1d ago•527 comments

Show HN: Wirebrowser – A JavaScript debugger with breakpoint-driven heap search

https://github.com/fcavallarin/wirebrowser
43•fcavallarin•23h ago•10 comments

Super Mario 64 for the PS1

https://github.com/malucard/sm64-psx
249•LaserDiscMan•18h ago•97 comments

Flow Where You Want – Guidance for Flow Models

https://drscotthawley.github.io/blog/posts/FlowWhereYouWant.html
27•rundigen12•5d ago•1 comments

Qwen3-Omni-Flash-2025-12-01:a next-generation native multimodal large model

https://qwen.ai/blog?id=qwen3-omni-flash-20251201
280•pretext•21h ago•95 comments

Show HN: Automated license plate reader coverage in the USA

https://alpranalysis.com
198•sodality2•19h ago•116 comments

Incomplete list of mistakes in the design of CSS

https://wiki.csswg.org/ideas/mistakes
141•OuterVale•9h ago•93 comments

Fossils reveal anacondas have been giants for over 12 million years

https://www.cam.ac.uk/stories/twelve-million-years-of-giant-anacondas
54•ashishgupta2209•1w ago•24 comments

Scientists create ultra fast memory using light

https://www.isi.edu/news/81186/scientists-create-ultra-fast-memory-using-light/
106•giuliomagnifico•6d ago•24 comments

Common Lisp, ASDF, and Quicklisp: packaging explained

https://cdegroot.com/programming/commonlisp/2025/11/26/cl-ql-asdf.html
92•todsacerdoti•1d ago•24 comments