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.

Jepsen: NATS 2.12.1

https://jepsen.io/analyses/nats-2.12.1
137•aphyr•2h ago•30 comments

Deep dive on Nvidia circular funding

https://philippeoger.com/pages/deep-dive-into-nvidias-virtuous-cycle
165•jeanloolz•2h ago•92 comments

Strong earthquake hits northern Japan, tsunami warning issued

https://www3.nhk.or.jp/nhkworld/en/news/20251209_02/
189•lattis•6h ago•101 comments

AMD GPU Debugger

https://thegeeko.me/blog/amd-gpu-debugging/
159•ibobev•4h ago•22 comments

Let's put Tailscale on a jailbroken Kindle

https://tailscale.com/blog/tailscale-jailbroken-kindle
144•Quizzical4230•4h ago•36 comments

Launch HN: Nia (YC S25) – Give better context to coding agents

https://www.trynia.ai/
66•jellyotsiro•3h ago•52 comments

Hunting for North Korean Fiber Optic Cables

https://nkinternet.com/2025/12/08/hunting-for-north-korean-fiber-optic-cables/
152•Bezod•4h ago•15 comments

IBM to acquire Confluent

https://www.confluent.io/blog/ibm-to-acquire-confluent/
272•abd12•7h ago•218 comments

AI should only run as fast as we can catch up

https://higashi.blog/2025/12/07/ai-verification/
53•yuedongze•3h ago•63 comments

A series of tricks and techniques I learned doing tiny GLSL demos

https://blog.pkh.me/p/48-a-series-of-tricks-and-techniques-i-learned-doing-tiny-glsl-demos.html
76•ibobev•4h ago•4 comments

We collected 10k hours of neuro-language data in our basement

https://condu.it/thought/10k-hours
49•nee1r•3h ago•38 comments

Microsoft Download Center Archive

https://legacyupdate.net/download-center/
63•luu•3d ago•4 comments

Microsoft increases Office 365 and Microsoft 365 license prices

https://office365itpros.com/2025/12/08/microsoft-365-pricing-increase/
150•taubek•7h ago•191 comments

Legion Health (YC S21) is hiring a founding engineer (SF, in-person)

1•the_danny_g•4h ago

Spaces between words only started in the 7th century in Ireland

https://en.wikipedia.org/wiki/Word_spacing
18•doener•3d ago•8 comments

Show HN: DuckDB for Kafka Stream Processing

https://sql-flow.com/docs/tutorials/intro/
35•dm03514•3h ago•11 comments

Flow: Actor-based language for C++, used by FoundationDB

https://github.com/apple/foundationdb/tree/main/flow
144•SchwKatze•7h ago•39 comments

Paramount launches hostile bid for Warner Bros

https://www.cnbc.com/2025/12/08/paramount-skydance-hostile-bid-wbd-netflix.html
135•gniting•6h ago•122 comments

GitHub no longer uses Toasts

https://primer.style/accessibility/toasts/
14•samsolomon•1h ago•2 comments

Quanta to publish popular math and physics books by Terence Tao and David Tong

https://www.simonsfoundation.org/2025/12/08/quanta-books-to-publish-popular-math-and-physics-titl...
78•digital55•3h ago•18 comments

No more O'Reilly subscriptions for me

https://zerokspot.com/weblog/2025/12/05/no-more-oreilly-subscriptions-for-me/
63•speckx•4h ago•68 comments

GitHub Actions has a package manager, and it might be the worst

https://nesbitt.io/2025/12/06/github-actions-package-manager.html
330•robin_reala•12h ago•206 comments

Trials avoid high risk patients and underestimate drug harms

https://www.nber.org/papers/w34534
7•bikenaga•1h ago•2 comments

Alignment is capability

https://www.off-policy.com/alignment-is-capability/
88•drctnlly_crrct•7h ago•76 comments

Google confirms Android attacks; no fix for most Samsung users

https://www.forbes.com/sites/zakdoffman/2025/12/08/google-confirms-android-attacks-no-fix-for-mos...
101•mohi-kalantari•4h ago•85 comments

Uber is turning data about trips and takeout into insights for marketers

https://www.businessinsider.com/uber-ads-launches-intelligence-insights-trips-takeout-data-market...
210•sethops1•6h ago•198 comments

Colors of Growth

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5804462
47•mhb•7h ago•16 comments

Cancer is surging, bringing a debate about whether to look for it

https://www.nytimes.com/2025/12/08/health/cancer-young-people-deaths.html
28•brandonb•1h ago•7 comments

Wayland Nvidia

https://kextcache.com/wayland-nvidia-a-definite-2025-guide/
36•breve•4d ago•66 comments

Nova Programming Language

https://nova-lang.net
66•surprisetalk•6h ago•35 comments