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

Comments

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

2025: The Year in LLMs

https://simonwillison.net/2025/Dec/31/the-year-in-llms/
397•simonw•7h ago•212 comments

I canceled my book deal

https://austinhenley.com/blog/canceledbookdeal.html
434•azhenley•13h ago•254 comments

Flow5 released to open source

https://flow5.tech/docs/releasenotes.html
57•picture•4h ago•3 comments

Show HN: BusterMQ, Thread-per-core NATS server in Zig with io_uring

https://bustermq.sh/
70•jbaptiste•7h ago•13 comments

Resistance training load does not determine hypertrophy

https://physoc.onlinelibrary.wiley.com/doi/10.1113/JP289684
117•Luc•9h ago•118 comments

Warren Buffett steps down as Berkshire Hathaway CEO after six decades

https://www.latimes.com/business/story/2025-12-31/warren-buffett-steps-down-as-berkshire-hathaway...
537•ValentineC•10h ago•369 comments

Pixar's True Story

https://computerhistory.org/blog/pixars-true-story/
36•kristianp•5h ago•6 comments

Web Browsers have stopped blocking pop-ups

https://www.smokingonabike.com/2025/12/31/web-browsers-have-stopped-blocking-pop-ups/
140•coldpie•14h ago•112 comments

Demystifying DVDs

https://hiddenpalace.org/News/One_Bad_Ass_Hedgehog_-_Shadow_the_Hedgehog#Demystifying_DVDs
156•boltzmann-brain•3d ago•14 comments

Build Software. Build Users

https://dima.day/blog/build-software-build-users/
13•dinerville•3d ago•1 comments

Ÿnsect, a French insect farming startup, has been been placed into liquidation

https://techcrunch.com/2025/12/26/how-reality-crushed-ynsect-the-french-startup-that-had-raised-o...
101•fcpguru•5d ago•106 comments

My role as a founder-CTO: year 8

https://miguelcarranza.es/cto-year-8
124•ridruejo•5d ago•109 comments

Scientists unlock brain's natural clean-up system for new treatments for stroke

https://www.monash.edu/pharm/about/news/news-listing/latest/scientists-unlock-brains-natural-clea...
145•PaulHoule•9h ago•32 comments

Tell HN: Happy New Year

307•schappim•18h ago•170 comments

Reminiscences of a Stock Operator (1923)

https://gutenberg.org/cache/epub/60979/pg60979-images.html
16•thomassmith65•4d ago•8 comments

All-optical synthesis chip for large-scale intelligent semantic vision

https://www.science.org/doi/10.1126/science.adv7434
68•QueensGambit•11h ago•13 comments

GoGoGrandparent (YC S16) Is Hiring Tech Leads

https://www.ycombinator.com/companies/gogograndparent/jobs/w2jGKM7-gogograndparent-yc-s16-is-hiri...
1•davidchl•6h ago

Observed Agent Sandbox Bypasses

https://voratiq.com/blog/yolo-in-the-sandbox/
45•m-hodges•3d ago•31 comments

PyPI in 2025: A Year in Review

https://blog.pypi.org/posts/2025-12-31-pypi-2025-in-review/
63•miketheman•12h ago•19 comments

So I started cloning the Wii U gamepad [video]

https://www.youtube.com/watch?v=jlbcKuDEBw8
29•ingve•4d ago•2 comments

Akin's Laws of Spacecraft Design (2011) [pdf]

https://www.ece.uvic.ca/~elec399/201409/Akin%27s%20Laws%20of%20Spacecraft%20Design.pdf
286•tosh•21h ago•87 comments

The compiler is your best friend

https://blog.daniel-beskin.com/2025-12-22-the-compiler-is-your-best-friend-stop-lying-to-it
154•based2•16h ago•106 comments

Show HN: Use Claude Code to Query 600 GB Indexes over Hacker News, ArXiv, etc.

https://exopriors.com/scry
329•Xyra•1d ago•117 comments

On privacy and control

https://toidiu.com/blog/2025-12-25-privacy-and-control/
161•todsacerdoti•13h ago•91 comments

Iron Beam: Israel's first operational anti drone laser system

https://mod.gov.il/en/press-releases/press-room/israel-mod-and-rafael-deliver-first-operational-h...
128•fork-bomber•17h ago•224 comments

Scaffolding to Superhuman: How Curriculum Learning Solved 2048 and Tetris

https://kywch.github.io/blog/2025/12/curriculum-learning-2048-tetris/
129•a1k0n•16h ago•30 comments

When square pixels aren't square

https://alexwlchan.net/2025/square-pixels/
126•PaulHoule•18h ago•57 comments

Microtonal Spiral Piano

https://shih1.github.io/spiral/
95•phoenix_ashes•5d ago•13 comments

The Delete Act

https://privacy.ca.gov/drop/about-drop-and-the-delete-act/
160•weaksauce•7h ago•66 comments

The most famous transcendental numbers

https://sprott.physics.wisc.edu/pickover/trans.html
153•vismit2000•19h ago•99 comments