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.

The RAM Shortage Comes for Us All

https://www.jeffgeerling.com/blog/2025/ram-shortage-comes-us-all
53•speckx•24m ago•26 comments

Multivox: Volumetric Display

https://github.com/AncientJames/multivox
69•jk_tech•2h ago•10 comments

Transparent leadership beats servant leadership

https://entropicthoughts.com/transparent-leadership-beats-servant-leadership
260•ibobev•6h ago•122 comments

Why are 38 percent of Stanford students saying they're disabled?

https://reason.com/2025/12/04/why-are-38-percent-of-stanford-students-saying-theyre-disabled/
99•delichon•1h ago•135 comments

It’s time to free JavaScript (2024)

https://javascript.tm/letter
562•pavelai•10h ago•297 comments

Feynman vs. Computer

https://entropicthoughts.com/feynman-vs-computer
31•cgdl•3h ago•16 comments

Launch HN: Browser Buddy (YC W24) – A recommendation system for Internet writing

https://www.browserbuddy.com/
25•alien0006•2h ago•22 comments

I ignore the spotlight as a staff engineer

https://lalitm.com/software-engineering-outside-the-spotlight/
330•todsacerdoti•8h ago•140 comments

Show HN: Onlyrecipe 2.0 – I added all features HN requested – 4 years later

https://onlyrecipeapp.com/?url=https://www.allrecipes.com/turkish-pasta-recipe-8754903
63•AwkwardPanda•4h ago•50 comments

A lost Amazon world just reappeared in Bolivia

https://www.sciencedaily.com/releases/2025/11/251130205421.htm
76•ashishgupta2209•3d ago•15 comments

Converge (YC S23) is hiring a martech expert in NYC

https://www.runconverge.com/careers/technical-customer-success-manager
1•janhenr•2h ago

The long wait is over, Ganymede has arrived

https://endeavouros.com/news/the-long-wait-is-over-ganymede-has-arrived/
17•doener•4d ago•18 comments

Functional Quadtrees

https://lbjgruppen.com/en/posts/functional-quadtree-clojure
91•lbj•6h ago•33 comments

PGlite – Embeddable Postgres

https://pglite.dev/
431•dsego•8h ago•96 comments

Fighting the age-gated internet

https://www.wired.com/story/age-verification-is-sweeping-the-us-activists-are-fighting-back/
72•geox•6h ago•72 comments

RAM is so expensive, Samsung won't even sell it to Samsung

https://www.pcworld.com/article/2998935/ram-is-so-expensive-samsung-wont-even-sell-it-to-samsung....
277•sethops1•6h ago•257 comments

Show HN: Chess on a Donut/Torus and Deep-Dive

https://mchess.io/donut
8•mannymakes•5d ago•0 comments

Microsoft drops AI sales targets in half after salespeople miss their quotas

https://arstechnica.com/ai/2025/12/microsoft-slashes-ai-sales-growth-targets-as-customers-resist-...
230•OptionOfT•4h ago•175 comments

PyTogether: Collaborative lightweight real-time Python IDE for teachers/learners

https://github.com/SJRiz/pytogether
9•indigodaddy•1h ago•0 comments

Bootloader Unlock Wall of Shame

https://github.com/zenfyrdev/bootloader-unlock-wall-of-shame
101•thunderbong•3h ago•42 comments

What Is "Open Recursion"?

https://journal.stuffwithstuff.com/2013/08/26/what-is-open-recursion/
31•andsoitis•2d ago•6 comments

The differences between an IndyCar and a F1 car

https://www.openwheelworld.net/en/indycar101/76/IndyCar_vs_Formula_1_cars
88•1659447091•3d ago•79 comments

Uncloud - Tool for deploying containerised apps across servers without k8s

https://uncloud.run/
297•rgun•13h ago•131 comments

Show HN: MTXT – Music Text Format

https://github.com/Daninet/mtxt
82•daninet•4d ago•32 comments

Tunnl.gg

https://tunnl.gg
104•klipitkas•9h ago•64 comments

Show HN: Walrus – a Kafka alternative written in Rust

https://github.com/nubskr/walrus
121•janicerk•3d ago•36 comments

Autism should not be treated as a single condition

https://www.economist.com/science-and-technology/2025/12/03/why-autism-should-not-be-treated-as-a...
97•bookofjoe•3h ago•138 comments

Building optimistic UI in Rails (and learn custom elements)

https://railsdesigner.com/custom-elements/
71•amalinovic•8h ago•9 comments

Proxmox Datacenter Manager 1.0 available

https://www.proxmox.com/en/about/company-details/press-releases/proxmox-datacenter-manager-1-0
84•speckx•4h ago•23 comments

Unreal Tournament 2004 is back

https://old.reddit.com/r/unrealtournament/comments/1pdbe69/breaking_unreal_tournament_2004_is_back/
394•keithoffer•9h ago•167 comments