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

Comments

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

Gemini 3.1 Pro

https://deepmind.google/models/model-cards/gemini-3-1-pro/
256•PunchTornado•1h ago•125 comments

Dinosaur Food: 100M year old foods we still eat today

https://borischerny.com/food/2022/01/17/Dinosaur-food.html
46•simonebrunozzi•1h ago•29 comments

Pebble Production: February Update

https://repebble.com/blog/february-pebble-production-and-software-updates
172•smig0•4h ago•65 comments

Show HN: Micasa – track your house from the terminal

https://micasa.dev
45•cpcloud•1h ago•13 comments

Paged Out Issue #8 [pdf]

https://pagedout.institute/download/PagedOut_008.pdf
151•SteveHawk27•5h ago•32 comments

America vs. Singapore: You Can't Save Your Way Out of Economic Shocks

https://www.governance.fyi/p/america-vs-singapore-you-cant-save
111•guardianbob•2h ago•116 comments

-fbounds-safety: Enforcing bounds safety for C

https://clang.llvm.org/docs/BoundsSafety.html
73•thefilmore•3d ago•50 comments

Don't Trust the Salt: AI Summarization, Multilingual Safety, and LLM Guardrails

https://royapakzad.substack.com/p/multilingual-llm-evaluation-to-guardrails
140•benbreen•2d ago•54 comments

Gemini 3.1 Pro Preview

https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemini-3.1-pro-preview?...
102•MallocVoidstar•2h ago•51 comments

Arrays in Forth

https://www.forth.org/svfig/Len/arrays.htm
12•tosh•4d ago•0 comments

Coding Tricks Used in the C64 Game Seawolves

https://kodiak64.co.uk/blog/seawolves-technical-tricks
64•atan2•5h ago•4 comments

Show HN: A physically-based GPU ray tracer written in Julia

https://makie.org/website/blogposts/raytracing/
100•simondanisch•6h ago•35 comments

Bridging Elixir and Python with Oban

https://oban.pro/articles/bridging-with-oban
82•sorentwo•6h ago•38 comments

Large Language Models for Mortals: A Practical Guide for Analysts with Python

https://crimede-coder.com/blogposts/2026/LLMsForMortals
37•apwheele•4d ago•8 comments

Sizing chaos

https://pudding.cool/2026/02/womens-sizing/
749•zdw•20h ago•388 comments

Show HN: Mini-Diarium - An encrypted, local, cross-platform journaling app

https://github.com/fjrevoredo/mini-diarium
77•holyknight•5h ago•43 comments

Zero downtime migrations at Petabyte scale

https://planetscale.com/blog/zero-downtime-migrations-at-petabyte-scale
23•Ozzie_osman•2d ago•6 comments

Measuring AI agent autonomy in practice

https://www.anthropic.com/research/measuring-agent-autonomy
21•jbredeche•3h ago•6 comments

The Mongol Khans of Medieval France

https://www.historytoday.com/archive/feature/mongol-khans-medieval-france
74•Thevet•2d ago•29 comments

Against Theory-Motivated Experimentation

https://journals.sagepub.com/doi/10.1177/26339137261421577
17•paraschopra•3h ago•12 comments

27-year-old Apple iBooks can connect to Wi-Fi and download official updates

https://old.reddit.com/r/MacOS/comments/1r8900z/macos_which_officially_supports_27_year_old/
416•surprisetalk•20h ago•238 comments

Famous Signatures Through History

https://signatory.app/#famous-signatures
26•elliotbnvl•3h ago•28 comments

ShannonMax: A Library to Optimize Emacs Keybindings with Information Theory

https://github.com/sstraust/shannonmax
41•sammy0910•6h ago•6 comments

Voith Schneider Propeller

https://en.wikipedia.org/wiki/Voith_Schneider_Propeller
71•Luc•3d ago•17 comments

Old School Visual Effects: The Cloud Tank (2010)

http://singlemindedmovieblog.blogspot.com/2010/04/old-school-effects-cloud-tank.html
71•exvi•10h ago•11 comments

15 years of FP64 segmentation, and why the Blackwell Ultra breaks the pattern

https://nicolasdickenmann.com/blog/the-great-fp64-divide.html
173•fp64enjoyer•15h ago•66 comments

Step 3.5 Flash – Open-source foundation model, supports deep reasoning at speed

https://static.stepfun.com/blog/step-3.5-flash/
172•kristianp•14h ago•76 comments

Anthropic officially bans using subscription auth for third party use

https://code.claude.com/docs/en/legal-and-compliance
555•theahura•14h ago•678 comments

A word processor from 1990s for Atari ST/TOS is still supported by enthusiasts

https://tempus-word.de/en/index
96•muzzy19•2d ago•42 comments

Mark Zuckerberg Grilled on Usage Goals and Underage Users at California Trial

https://www.wsj.com/us-news/law/meta-mark-zuckerberg-social-media-trial-0e9a7fa0
13•1vuio0pswjnm7•1h ago•1 comments