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

Comments

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

Hosting a website on a disposable vape

https://bogdanthegeek.github.io/blog/projects/vapeserver/
762•BogdanTheGeek•10h ago•386 comments

William Gibson Reads Neuromancer (2004)

http://bearcave.com/bookrev/neuromancer/neuromancer_audio.html
174•exvi•6h ago•39 comments

React is winning by default and slowing innovation

https://www.lorenstew.art/blog/react-won-by-default/
338•dbushell•10h ago•355 comments

macOS Tahoe

https://www.apple.com/os/macos/
322•Wingy•10h ago•444 comments

Wanted to spy on my dog, ended up spying on TP-Link

https://kennedn.com/blog/posts/tapo/
345•kennedn•11h ago•120 comments

Addendum to GPT-5 system card: GPT-5-Codex

https://openai.com/index/gpt-5-system-card-addendum-gpt-5-codex/
192•wertyk•9h ago•114 comments

I feel Apple has lost its alignment with me and other long-time customers

https://morrick.me/archives/10137
130•mgrayson•3h ago•126 comments

Linux phones are more important now than ever

https://feddit.org/post/18353777
230•wicket•3h ago•134 comments

PayPal to support Ethereum and Bitcoin

https://newsroom.paypal-corp.com/2025-09-15-PayPal-Ushers-in-a-New-Era-of-Peer-to-Peer-Payments,-...
391•DocFeind•14h ago•305 comments

GPT-5-Codex

https://openai.com/index/introducing-upgrades-to-codex/
244•meetpateltech•11h ago•74 comments

Why do we keep gravitating toward complexity?

https://kyrylo.org/software/2025/08/21/why-do-software-developers-love-complexity.html
50•PaulHoule•5h ago•74 comments

People Who Hunt Down Old TVs

https://www.bbc.com/future/article/20250911-the-people-who-hunt-down-old-tvs
42•tmendez•3d ago•18 comments

How big a solar battery do I need to store all my home's electricity?

https://shkspr.mobi/blog/2025/09/how-big-a-solar-battery-do-i-need-to-store-all-my-homes-electric...
276•FromTheArchives•15h ago•388 comments

Ghost kitchens are dying

https://davidrmann3.substack.com/p/ghost-kitchens-are-dying-heres-the
87•mooreds•7h ago•79 comments

From unit tests to whole universe tests (with will wilson of antithesis) [video]

https://www.youtube.com/watch?v=_xJ4maWhSNU
18•zdw•2d ago•5 comments

Launch HN: Trigger.dev (YC W23) – Open-source platform to build reliable AI apps

129•eallam•12h ago•52 comments

I wish my web server were in the corner of my room (2022)

https://interconnected.org/home/2022/10/10/servers
47•jonassaid•3d ago•21 comments

Massive Attack turns concert into facial recognition surveillance experiment

https://www.gadgetreview.com/massive-attack-turns-concert-into-facial-recognition-surveillance-ex...
182•loteck•6h ago•88 comments

CubeSats are fascinating learning tools for space

https://www.jeffgeerling.com/blog/2025/cubesats-are-fascinating-learning-tools-space
171•warrenm•14h ago•73 comments

Debian Upgrade Marathon: 3.1 Sarge

https://wrongthink.link/posts/debian-upgrade-marathon-sarge/
23•zdw•3d ago•3 comments

The Mac app flea market

https://blog.jim-nielsen.com/2025/mac-app-flea-market/
365•ingve•20h ago•136 comments

Show HN: Pooshit – Sync local code to remote Docker containers

49•marktolson•6h ago•39 comments

How People Use ChatGPT [pdf]

https://cdn.openai.com/pdf/a253471f-8260-40c6-a2cc-aa93fe9f142e/economic-research-chatgpt-usage-p...
74•nycdatasci•8h ago•50 comments

Removing newlines in FASTA file increases ZSTD compression ratio by 10x

https://log.bede.im/2025/09/12/zstandard-long-range-genomes.html
246•bede•3d ago•97 comments

How to self-host a web font from Google Fonts

https://blog.velocifyer.com/Posts/3,0,0,2025-8-13,+how+to+self+host+a+font+from+google+fonts.html
124•Velocifyer•13h ago•105 comments

When Your Father Is a Magician, What Do You Believe?

https://thereader.mitpress.mit.edu/when-your-father-is-a-magician-what-do-you-believe/
45•pseudolus•4d ago•11 comments

Boring work needs tension

https://iaziz786.com/blog/boring-work-needs-tension/
105•iaziz786•12h ago•55 comments

RustGPT: A pure-Rust transformer LLM built from scratch

https://github.com/tekaratzas/RustGPT
339•amazonhut•18h ago•162 comments

GuitarPie: Electric Guitar Fretboard Pie Menus

https://andreasfender.com/publications.php
33•DonHopkins•13h ago•4 comments

Dinosaurs to supercrocs: Niger's bone keepers preserve its ancient fossils

https://www.aljazeera.com/features/2025/9/12/dinosaurs-to-supercrocs-nigers-bone-keepers-preserve...
4•Qem•3d ago•0 comments