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

Comments

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

Claude mixes up who said what and that's not OK

https://dwyer.co.za/static/claude-mixes-up-who-said-what-and-thats-not-ok.html
43•sixhobbits•56m ago•24 comments

LittleSnitch for Linux

https://obdev.at/products/littlesnitch-linux/index.html
754•pluc•9h ago•245 comments

Open Source Security at Astral

https://astral.sh/blog/open-source-security-at-astral
195•vinhnx•6h ago•38 comments

I ported Mac OS X to the Nintendo Wii

https://bryankeller.github.io/2026/04/08/porting-mac-os-x-nintendo-wii.html
1590•blkhp19•18h ago•282 comments

Creating the Futurescape for the Fifth Element [2019]

https://theasc.com/articles/fantastic-voyage-creating-the-futurescape-for-the-fifth-element
22•nixass•1h ago•5 comments

Help Keep Thunderbird Alive

https://updates.thunderbird.net/en-US/thunderbird/140.0/apr26-1e/donate/
45•playfultones•2h ago•27 comments

C# in Unity 2026: Features Most Developers Still Don't Use

https://darkounity.com/blog/c-in-unity-2026-features-most-developers-still-dont-use
22•hacker_13•2d ago•5 comments

Haunted Paper Toys

http://ravensblight.com/papertoys.html
93•exvi•3d ago•6 comments

Reallocating $100/Month Claude Code Spend to Zed and OpenRouter

https://braw.dev/blog/2026-04-06-reallocating-100-month-claude-spend/
11•kisamoto•1h ago•5 comments

Dr. Dobb's Developer Library DVD 6

https://archive.org/details/DDJDVD6
45•kristianp•4d ago•12 comments

Process Manager for Autonomous AI Agents

https://botctl.dev/
39•ankitg12•4h ago•9 comments

USB for Software Developers: An introduction to writing userspace USB drivers

https://werwolv.net/posts/usb_for_sw_devs/
308•WerWolv•14h ago•38 comments

Understanding the Kalman filter with a simple radar example

https://kalmanfilter.net
349•alex_be•17h ago•45 comments

They're made out of meat (1991)

http://www.terrybisson.com/theyre-made-out-of-meat-2/
550•surprisetalk•23h ago•150 comments

Who is Satoshi Nakamoto? My quest to unmask Bitcoin's creator

https://www.nytimes.com/2026/04/08/business/bitcoin-satoshi-nakamoto-identity-adam-back.html
497•jfirebaugh•1d ago•588 comments

The Importance of Being Idle

https://theamericanscholar.org/the-importance-of-being-idle/
187•Caiero•2d ago•111 comments

ML promises to be profoundly weird

https://aphyr.com/posts/411-the-future-of-everything-is-lies-i-guess
506•pabs3•21h ago•496 comments

Improving storage efficiency in Magic Pocket, Dropbox's immutable blob store

https://dropbox.tech/infrastructure/improving-storage-efficiency-in-magic-pocket-our-immutable-bl...
12•laluser•5d ago•0 comments

Git commands I run before reading any code

https://piechowski.io/post/git-commands-before-reading-code/
2055•grepsedawk•1d ago•445 comments

Show HN: Moon simulator game, ray-casting

https://mooncraft2000.com
4•JKCalhoun•2d ago•1 comments

Muse Spark: Scaling towards personal superintelligence

https://ai.meta.com/blog/introducing-muse-spark-msl/?_fb_noscript=1
345•chabons•18h ago•330 comments

Six (and a half) intuitions for KL divergence

https://www.perfectlynormal.co.uk/blog-kl-divergence
84•jxmorris12•1d ago•11 comments

MegaTrain: Full Precision Training of 100B+ Parameter LLMs on a Single GPU

https://arxiv.org/abs/2604.05091
300•chrsw•22h ago•54 comments

I imported the full Linux kernel git history into pgit

https://oseifert.ch/blog/linux-kernel-pgit
132•ImGajeed76•3d ago•21 comments

Expanding Swift's IDE Support

https://swift.org/blog/expanding-swift-ide-support/
118•frizlab•15h ago•56 comments

Map Gesture Controls - Control maps with your hands

https://sanderdesnaijer.github.io/map-gesture-controls/
29•hebelehubele•4d ago•5 comments

Understanding Traceroute

https://tech.stonecharioteer.com/posts/2026/traceroute/
131•stonecharioteer•3d ago•22 comments

Ask HN: Any interesting niche hobbies?

371•e-topy•3d ago•551 comments

Show HN: A (marginally) useful x86-64 ELF executable in 301 bytes

https://github.com/meribold/btry
48•meribold•2d ago•10 comments

John Deere to pay $99M in right-to-repair settlement

https://www.thedrive.com/news/john-deere-to-pay-99-million-in-monumental-right-to-repair-settlement
317•CharlesW•13h ago•103 comments