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.

Linux Sandboxes and Fil-C

https://fil-c.org/seccomp
78•pizlonator•2h ago•17 comments

Closures as Win32 Window Procedures

https://nullprogram.com/blog/2025/12/12/
31•ibobev•1h ago•1 comments

Why Twilio Segment moved from microservices back to a monolith

https://www.twilio.com/en-us/blog/developers/best-practices/goodbye-microservices
159•birdculture•4h ago•112 comments

Recovering Anthony Bourdain's (really) lost Li.st's

https://sandyuraz.com/blogs/bourdain/
94•thecsw•4h ago•31 comments

I fed 24 years of my blog posts to a Markov model

https://susam.net/fed-24-years-of-posts-to-markov-model.html
90•zdw•5h ago•28 comments

VPN location claims don't match real traffic exits

https://ipinfo.io/blog/vpn-location-mismatch-report
232•mmaia•5h ago•143 comments

RemoveWindowsAI

https://github.com/zoicware/RemoveWindowsAI
31•hansmayer•2h ago•32 comments

I tried Gleam for Advent of Code

https://blog.tymscar.com/posts/gleamaoc2025/
235•tymscar•8h ago•132 comments

Cat Gap

https://en.wikipedia.org/wiki/Cat_gap
28•Petiver•3d ago•2 comments

The Rise of Computer Games, Part I: Adventure

https://technicshistory.com/2025/12/13/the-rise-of-computer-games-part-i-adventure/
43•cfmcdonald•5h ago•8 comments

llamafile: Distribute and Run LLMs with a Single File

https://github.com/mozilla-ai/llamafile
19•stefankuehnel•6h ago•0 comments

Useful patterns for building HTML tools

https://simonwillison.net/2025/Dec/10/html-tools/
241•simonw•3d ago•71 comments

Want to sway an election? Here’s how much fake online accounts cost

https://www.science.org/content/article/want-sway-election-here-s-how-much-fake-online-accounts-cost
133•rbanffy•4h ago•81 comments

Ask HN: How can I get better at using AI for programming?

204•lemonlime227•9h ago•243 comments

Cryptids

https://wiki.bbchallenge.org/wiki/Cryptids
89•frozenseven•1w ago•12 comments

Go Proposal: Secret Mode

https://antonz.org/accepted/runtime-secret/
154•enz•4d ago•67 comments

Flat-pack washing machine spins a fairer future

https://www.positive.news/society/flat-pack-washing-machine-spins-a-fairer-future/
46•ohjeez•2h ago•21 comments

Some surprising things about DuckDuckGo

https://gabrielweinberg.com/p/some-surprising-things-about-duckduckgo
53•ArmageddonIt•3h ago•37 comments

From Azure Functions to FreeBSD

https://jmmv.dev/2025/12/from-azure-functions-to-freebsd.html
67•todsacerdoti•5d ago•4 comments

EasyPost (YC S13) Is Hiring

https://www.easypost.com/careers
1•jstreebin•8h ago

A Giant Ball Will Help This Man Survive a Year on an Iceberg

https://www.outsideonline.com/outdoor-adventure/exploration-survival/how-giant-ball-will-help-man...
38•areoform•10h ago•32 comments

TigerBeetle as a File Storage

https://aivarsk.com/2025/12/07/tigerbeetle-blob-storage/
17•aivarsk•6d ago•1 comments

What is the nicest thing a stranger has ever done for you?

https://louplummer.lol/nice-stranger/
291•speckx•2d ago•225 comments

Are we stuck with the same Desktop UX forever? [video]

https://www.youtube.com/watch?v=1fZTOjd_bOQ
104•joelkesler•6h ago•112 comments

Show HN: Listened to your feedback, Critical CSS Generator

https://kigo.studio/tools/critical-css-generator
4•stevenpotts•5d ago•2 comments

Photographer built a medium-format rangefinder

https://petapixel.com/2025/12/06/this-photographer-built-an-awesome-medium-format-rangefinder-and...
161•shinryuu•1w ago•38 comments

Researchers seeking better measures of cognitive fatigue

https://www.nature.com/articles/d41586-025-03974-w
103•bikenaga•3d ago•28 comments

Using Python for Scripting

https://hypirion.com/musings/use-python-for-scripting
91•birdculture•5d ago•70 comments

A Lisp Interpreter Implemented in Conway's Game of Life (2021)

https://woodrush.github.io/blog/posts/2022-01-12-lisp-in-life.html
90•pabs3•22h ago•3 comments

GNU Unifont

https://unifoundry.com/unifont/index.html
323•remywang•1d ago•73 comments