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 Design

https://www.anthropic.com/news/claude-design-anthropic-labs
853•meetpateltech•11h ago•571 comments

A simplified model of Fil-C

https://www.corsix.org/content/simplified-model-of-fil-c
118•aw1621107•4h ago•58 comments

All 12 moonwalkers had "lunar hay fever" from dust smelling like gunpowder (2018)

https://www.esa.int/Science_Exploration/Human_and_Robotic_Exploration/The_toxic_side_of_the_Moon
237•cybermango•7h ago•134 comments

Landmark ancient-genome study shows surprise acceleration of human evolution

https://www.nature.com/articles/d41586-026-01204-5
52•unsuspecting•3h ago•37 comments

Measuring Claude 4.7's tokenizer costs

https://www.claudecodecamp.com/p/i-measured-claude-4-7-s-new-tokenizer-here-s-what-it-costs-you
544•aray07•10h ago•376 comments

Isaac Asimov: The Last Question (1956)

https://hex.ooo/library/last_question.html
625•ColinWright•14h ago•261 comments

Are the costs of AI agents also rising exponentially? (2025)

https://www.tobyord.com/writing/hourly-costs-for-ai-agents
105•louiereederson•2d ago•15 comments

Show HN: Smol machines – subsecond coldstart, portable virtual machines

https://github.com/smol-machines/smolvm
230•binsquare•8h ago•89 comments

NASA Force

https://nasaforce.gov/
235•LorenDB•10h ago•245 comments

Slop Cop

https://awnist.com/slop-cop
86•ericHosick•11h ago•59 comments

Show HN: PanicLock – Close your MacBook lid disable TouchID –> password unlock

https://github.com/paniclock/paniclock/
134•seanieb•9h ago•57 comments

Middle schooler finds coin from Troy in Berlin

https://www.thehistoryblog.com/archives/75848
206•speckx•11h ago•91 comments

Hyperscalers have already outspent most famous US megaprojects

https://twitter.com/finmoorhouse/status/2044933442236776794
130•nowflux•9h ago•107 comments

NIST gives up enriching most CVEs

https://risky.biz/risky-bulletin-nist-gives-up-enriching-most-cves/
176•mooreds•11h ago•37 comments

Introducing: ShaderPad

https://rileyjshaw.com/blog/introducing-shaderpad/
44•evakhoury•2d ago•7 comments

Even "cat readme.txt" is not safe

https://blog.calif.io/p/mad-bugs-even-cat-readmetxt-is-not
96•arkadiyt•7h ago•43 comments

Arc Prize Foundation (YC W26) Is Hiring a Platform Engineer for ARC-AGI-4

https://www.ycombinator.com/companies/arc-prize-foundation/jobs/AKZRZDN-platform-engineer-benchma...
1•gkamradt_•5h ago

I built a 3D printing business and ran it for 8 months

https://www.wespiser.com/posts/2026-04-12-3D-Printing-Biz.html
85•wespiser_2018•2d ago•80 comments

Generating a color spectrum for an image

https://amandahinton.com/blog/generating-a-color-spectrum-for-an-image
18•evakhoury•2d ago•3 comments

The Unix Executable as a Smalltalk Method [video]

https://www.youtube.com/watch?v=sZjPQ7vtLNA
29•surprisetalk•1d ago•1 comments

Casus Belli Engineering

https://marcosmagueta.com/blog/casus-belli-engineering/
4•b-man•1h ago•0 comments

How to Host a Blog on a Subdirectory Instead of a Subdomain

https://www.davidma.org/blog/2025-11-14-host-your-blog-on-a-subdirectory/
16•taikon•3h ago•13 comments

Ban the sale of precise geolocation

https://www.lawfaremedia.org/article/it-is-time-to-ban-the-sale-of-precise-geolocation
608•hn_acker•11h ago•167 comments

Spending 3 months coding by hand

https://miguelconner.substack.com/p/im-coding-by-hand
138•evakhoury•9h ago•145 comments

The GNU libc atanh is correctly rounded

https://inria.hal.science/hal-05591661
49•matt_d•3d ago•8 comments

Show HN: Stage – Putting humans back in control of code review

https://stagereview.app/
103•cpan22•1d ago•91 comments

Nintendo's Empire of Secrets with Keza MacDonald – Factually with Adam Conover

https://art19.com/shows/factually--with-adam-conover/episodes/5154e9af-8885-4149-9721-173c02c46bb7/
17•tpoindex•1d ago•3 comments

Connie Converse was a folk-music genius. Then she vanished

https://www.bbc.com/culture/article/20260413-the-mystery-of-a-missing-folk-music-pioneer
77•mellosouls•2d ago•17 comments

Iceye Open Data

https://www.iceye.com/open-data-initiative
106•marklit•11h ago•14 comments

Webloc: Analysis of Penlink's Ad-Based Geolocation Surveillance Tech

https://citizenlab.ca/research/analysis-of-penlinks-ad-based-geolocation-surveillance-tech/
57•Cider9986•4d ago•0 comments