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

Comments

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

Local Journalism Is How Democracy Shows Up Close to Home

https://buckscountybeacon.com/2026/01/opinion-local-journalism-is-how-democracy-shows-up-close-to...
90•mooreds•1h ago•30 comments

Apple Creator Studio

https://www.apple.com/newsroom/2026/01/introducing-apple-creator-studio-an-inspiring-collection-o...
121•lemonlime227•49m ago•116 comments

Cowork: Claude Code for the rest of your work

https://claude.com/blog/cowork-research-preview
1100•adocomplete•19h ago•484 comments

Why Stoicism is one of the best mind hacks ever devised

https://aeon.co/essays/why-stoicism-is-one-of-the-best-mind-hacks-ever-devised
48•suioir•51m ago•31 comments

Show HN: SnackBase – Open-source, GxP-compliant back end for Python teams

https://snackbase.dev
22•lalitgehani•2h ago•0 comments

Text-based web browsers

https://cssence.com/2026/text-based-web-browsers/
171•pabs3•9h ago•67 comments

TimeCapsuleLLM: LLM trained only on data from 1800-1875

https://github.com/haykgrigo3/TimeCapsuleLLM
671•admp•22h ago•274 comments

Designing an IPv6-native P2P transport – lessons from building I6P

https://theushen.medium.com/designing-an-ipv6-native-p2p-transport-lessons-from-building-i6p-b8ca...
43•TheusHen•3d ago•36 comments

Owners, not renters: Mozilla's open source AI strategy

https://blog.mozilla.org/en/mozilla/mozilla-open-source-ai-strategy/
72•nalinidash•3h ago•42 comments

FOSS in times of war, scarcity and (adversarial) AI [video]

https://fosdem.org/2026/schedule/event/FE7ULY-foss-in-times-of-war-scarcity-and-ai/
111•maelito•5h ago•68 comments

Postal Arbitrage

https://walzr.com/postal-arbitrage
464•The28thDuck•21h ago•239 comments

Floppy disks turn out to be the greatest TV remote for kids

https://blog.smartere.dk/2026/01/floppy-disks-the-best-tv-remote-for-kids/
691•mchro•1d ago•393 comments

Git Rebase for the Terrified

https://www.brethorsting.com/blog/2026/01/git-rebase-for-the-terrified/
73•aaronbrethorst•5d ago•80 comments

The UK is shaping a future of Precrime and dissent management

https://freedomnews.org.uk/2025/04/11/how-the-uk-is-shaping-a-future-of-precrime-and-dissent-mana...
124•robtherobber•2h ago•97 comments

The chess bot on Delta Air Lines will destroy you (2024) [video]

https://www.youtube.com/watch?v=c0mLhHDcY3I
283•cjaackie•19h ago•247 comments

NASA topples towers used to test Saturn rockets, space shuttle

https://arstechnica.com/space/2026/01/nasa-topples-towers-used-to-test-saturn-rockets-space-shuttle/
19•bookofjoe•1h ago•2 comments

Unauthenticated remote code execution in OpenCode

https://cy.md/opencode-rce/
379•CyberShadow•1d ago•124 comments

Date is out, Temporal is in

https://piccalil.li/blog/date-is-out-and-temporal-is-in/
422•alexanderameye•23h ago•175 comments

Some ecologists fear their field is losing touch with nature

https://www.nature.com/articles/d41586-025-04150-w
138•Growtika•5d ago•67 comments

Fabrice Bellard's TS Zip (2024)

https://www.bellard.org/ts_zip/
193•everlier•18h ago•79 comments

The Cray-1 Computer System (1977) [pdf]

https://s3data.computerhistory.org/brochures/cray.cray1.1977.102638650.pdf
112•LordGrey•3d ago•64 comments

LLVM: The bad parts

https://www.npopov.com/2026/01/11/LLVM-The-bad-parts.html
361•vitaut•1d ago•74 comments

Implementing a web server in a single printf() call (2014)

https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/
67•nateb2022•4d ago•8 comments

Apple picks Gemini to power Siri

https://www.cnbc.com/2026/01/12/apple-google-ai-siri-gemini.html
941•stygiansonic•23h ago•578 comments

Chromium Has Merged JpegXL

https://chromium-review.googlesource.com/c/chromium/src/+/7184969
234•thunderbong•8h ago•71 comments

Robotopia: A 3D, first-person, talking simulator

https://elbowgreasegames.substack.com/p/introducing-robotopia-a-3d-first
69•psawaya•4d ago•32 comments

Thirteen Months That Changed IBM

https://newsroom.ibm.com/Thirteen-Months-That-Changed-IBM
4•vednig•3h ago•0 comments

Anthropic made a mistake in cutting off third-party clients

https://archaeologist.dev/artifacts/anthropic
335•codesparkle•1d ago•222 comments

Show HN: AI in SolidWorks

https://www.trylad.com
177•WillNickols•22h ago•95 comments

F2 (YC S25) Is Hiring

https://www.ycombinator.com/companies/f2/jobs/cJsc7Fe-product-designer
1•arctech•16h ago