今日已更新 257 条资讯 | 累计 40702 条内容
关于我们

今日精选

HOT

最新资讯

共 40702 篇
第 1739/2036 页
AI 资讯 Dev.to

Typed Eloquent boundaries without building a second ORM

Most Laravel teams do not need to "fix" Eloquent. They need to stop letting raw model state leak too far into code that makes real business decisions. That is the practical version of this debate. Typed objects around Eloquent can be a big improvement, but only when they are used as boundaries . If you push the pattern too far, you end up with a second object model shadowing the first one. At that point you are not improving Laravel. You are building a parallel ORM that adds mapping code, cognitive load, and friction on every change. So the right question is not, "Should we replace Eloquent with typed objects?" The right question is, where does untyped Eloquent stop being cheap? Once you frame it that way, the migration path becomes much clearer. Keep Eloquent where it is good at persistence, hydration, scopes, relationships, and query composition. Introduce typed objects where the shape is messy, the values carry business meaning, or invalid combinations are too easy to represent. That is the version that pays off. The Core Recommendation If you only remember one thing from this article, make it this: add typed boundaries around unstable or meaningful data, not around every model . That usually means one of four cases: a JSON column that multiple parts of the app interpret differently domain values like money, status, addresses, or billing configuration data crossing from Eloquent into services, jobs, or integrations code paths where stringly typed state has already caused confusion or bugs Everything else should be guilty until proven useful. This is where a lot of teams go wrong. They see a good example of typed objects and immediately generalize it into an architecture rule. Then every model gets a FooData , FooView , FooState , FooRecord , and FooMapper . The app becomes more "designed" and less understandable. A Laravel codebase does not get better because it has more classes. It gets better because responsibility becomes clearer . Why Raw Eloquent Starts Hurt

Saqueib Ansari 2026-06-08 14:10 14 原文
AI 资讯 Dev.to

BTC collateral vaults: how an agent posts native Bitcoin against an obligation without a custodian

Most "Bitcoin in DeFi" stories quietly route through a custodian or a wrapped representation. You send BTC somewhere, someone (or some bridge multisig) holds it, and you get an IOU on another chain. That works until the thing holding your BTC is the thing that fails. For an autonomous agent that has to post collateral against an obligation it can't babysit, "trust the custodian" is exactly the assumption we're trying to delete. This post is about the alternative: a BTC collateral vault where native Bitcoin backs an obligation on another chain, the release is gated by a hashlock, and the worst case is a refund — not a loss. It's one of the primitives underneath Hashlock's settlement layer. I'll walk through the timelock ordering that makes it safe, the Bitcoin script that enforces it, and the failure modes you design around. Honest status up front: this is signet-validated, not BTC mainnet . The problem in one sentence An agent wants to commit BTC as collateral backing an action on Ethereum — settling a forward, anchoring one leg of a multi-leg trade, guaranteeing a payout — such that the BTC is released to the counterparty only if the corresponding obligation on Ethereum is fulfilled, and returns to its owner if it isn't. No third party should ever be able to hold, freeze, or abscond with the BTC in between. That's a cross-chain conditional. Bitcoin can't read Ethereum state, and Ethereum can't read Bitcoin's. The only thing both chains can independently verify is a hash preimage. So the entire construction hangs on one shared secret. The shared secret, and why timelock order is the whole game Both legs lock to the same hash H = SHA256(s) . Whoever knows the preimage s can claim. The instant s is revealed on one chain to claim a coin, it's public, and the other party copies it to claim the other coin. That's the atomic part: one preimage unlocks both legs or neither. The danger isn't the hash. It's time . If both legs had the same expiry, the party who knows the sec

Baris Sozen 2026-06-08 14:07 14 原文
开发者 Dev.to

I Built 25 Free Financial Calculators — No Ads, No Signup, Just Tools

Two weeks ago I shared a collection of 6 financial calculators. The response was incredible, so I kept building. Today, fi-calc.com has 25 completely free calculators covering every major personal finance need: 🏠 Housing • Mortgage Calculator (full PITI + amortization schedule + pie chart) • Rent vs Buy Calculator • House Affordability Calculator • Refinance Calculator 💰 Investing & Retirement • Compound Interest Calculator • Investment Return Calculator • Future Value & Present Value Calculators • ROI Calculator • Retirement Savings Calculator • 401(k) Calculator • FIRE Calculator (Financial Independence) 💳 Debt & Loans • Loan Comparison Calculator • Auto Loan Calculator • Student Loan Calculator • Credit Card Payoff Calculator • Debt Payoff Calculator (Avalanche method) 📊 Everyday Finance • Budget Planner (50/30/20 rule) • Savings Goal Calculator • Inflation Calculator • Salary & Take-Home Pay Calculator • Net Worth Calculator • Currency Converter (15+ currencies) • CD Calculator • Sales Tax Calculator ✨ Tech Stack • Pure vanilla HTML/CSS/JS — no frameworks • Chart.js for animated interactive charts • Responsive design (mobile-friendly) • All calculations run client-side in your browser • No data collection, no accounts, no cookies 🔗 Give it a try: fi-calc.com The entire site is free and open. I built it because I was tired of calculator sites with paywalls, signup walls, and bloated ad experiences. Would love feedback from the community! What other calculators should I build next?

fan ye 2026-06-08 14:05 17 原文
AI 资讯 Reddit r/MachineLearning

How to find research opportunities in area of interest? [D]

Im an undergraduate studying CS at a state school in the US. I’m interested in researching a specific style of self supervised learning (JEPA) and want to eventually go to grad school to study further. I have experience working in a lab similar to this topic, and I’ve become fairly comfortable with the literature and have a basic understanding of what its going on, but right now km only doing applied research in a specific domain (physics). I hope to eventually go to grad school to study this. But right now my opportunities are kinda limited as my school’s CS department is pretty mid. I was wondering if y’all have any advice on how to approach things? I know i can perform research independently but its not ideal due to: 1. Limited compute, less resources compared to a proper lab 2. Lack of a supervisor/guidance on the nuances of the field My current lab would be supportive if i do try to do things, but pure ml research is not really their main thing. I’ve heard people do REUs or cold email profs. But Im not sure if i could find something that specifix in an reu (also am international). And the labs i have seen working in this are either private or quite prestigious so im not sure how far cold emailing would take me. Sorry for the long post. Tldr; want to do pure ml research but theres no existing lab/professor at my current school who does something similar, wondering if any other pathways exist Any advice would be appreciated thanks submitted by /u/QuickStar07 [link] [留言]

/u/QuickStar07 2026-06-08 13:52 8 原文
AI 资讯 Reddit r/MachineLearning

ICML rejected paper visibility [D]

If ICML conference paper is rejected and no one opts-in or opts-out to keep the reviews visible, will the reviews be visible to everyone? There was clear instruction that only papers with at-least 1 opt-in AND zero opt-out options will be visible. None of the authors selected any option, But it in my openreview profile, it shows visible to everyone. please clarify. (Just above paper decision, there is a block with "filter by type", "filter by author" etc options. in that block there is eye symbol and everyone is written.) submitted by /u/Curious-Monitor497 [link] [留言]

/u/Curious-Monitor497 2026-06-08 13:52 7 原文
产品设计 Product Hunt

NTSC-RS

Open-source video emulation of analog TV and VHS artifacts Discussion | Link

Zac Zuo 2026-06-08 13:18 5 原文
AI 资讯 Reddit r/artificial

I think we're about 12 months away from the first major AI agent disaster

I keep seeing more companies giving AI agents access to real stuff like email, databases, internal tools, customer data, etc. And what’s weird is how normal it’s starting to feel now. Like not long ago everyone was worried about chatbots just giving wrong answers. Now we’re basically like yeah sure go ahead and do things for us. I don’t know that jump feels kind of big when you actually think about it. Maybe it all works out fine. Or maybe we’re just moving fast without fully realizing what we’re doing. I’m honestly surprised there hasn’t already been some big headline like an AI agent doing something really wrong. It feels like we’re kind of close to one of those moments where everything suddenly changes overnight. Anyone else feel like we’re closer to something like that than people are admitting? submitted by /u/Comfortable_Box_4527 [link] [留言]

/u/Comfortable_Box_4527 2026-06-08 12:48 7 原文
AI 资讯 Reddit r/programming

Building a spaced repetition system that adapts to user pace in real-time (Kotlin/Compose)

I built a flashcard app for interview prep and wanted to share some of the more interesting technical problems I ran into. The app has 1500+ questions across DSA and System Design, and the core challenge was: how do you order cards intelligently without it feeling robotic? Problem 1: Slot Assignment for Spaced Repetition Standard SR (like Anki) just shows the most overdue card next. That works for vocabulary but feels terrible for algorithms because you get 3 Hard questions in a row and want to quit. My approach: generate a target difficulty pattern (Easy, Medium, Easy, Medium, Hard, repeat) based on a 40/40/20 distribution, then assign due cards to matching-difficulty slots. Most-overdue cards get placed first within their tier. Unseen cards fill remaining slots. This means a Hard card that's overdue still lands in a Hard slot, not position 1. You get difficulty variety while still seeing overdue cards at the right time. fun assignSlots(pool: List<Question>, dueCards: List<ProgressEntity>): List<Question> { val pattern = generatePattern(size = pool.size, distribution = "40/40/20") val dueByDifficulty = dueCards.groupBy { it.difficulty } val result = Array<Question?>(pattern.size) { null } // Place due cards in matching slots, most overdue first for ((difficulty, cards) in dueByDifficulty) { val sorted = cards.sortedBy { it.nextReviewDate } val availableSlots = pattern.indices.filter { pattern[it] == difficulty && result[it] == null } sorted.zip(availableSlots).forEach { (card, slot) -> result[slot] = findQuestion(card, pool) } } // Fill remaining with unseen // ... } Problem 2: Re-ranking after every swipe without jank After each swipe, the deck needs to re-rank. But the top visible card (position 0) is already animating into view, so you can't move it. Solution: lock position 0, re-rank positions 1+, then check for constraint violations across the boundary (e.g., if locked card is Hard and new position 1 is also Hard, swap position 1 with the first non-Hard card d

/u/No-Position-7728 2026-06-08 12:33 5 原文
AI 资讯 Reddit r/MachineLearning

Software and ops skills for data scientists[D]

With more software engineers entering into data science and AI, I feel it's equally important for a person with data and AI background to dive into software development to survive, thrive in industry. I Know it's a very broad question, so suggestions with broad subjects, topics are welcome , like I often wonder how DSA is relevant. I totally understand the needs of the skills are deeply coupled with domain, industry and specific problems but unfortunately the industry doesn't understand this, it judges you, rewards you based on what you already know or pretend rather than your ability to learn or adapt. submitted by /u/Dapper_Chance_2484 [link] [留言]

/u/Dapper_Chance_2484 2026-06-08 12:15 7 原文
AI 资讯 Reddit r/programming

Tab Vacuum - click once to remove every duplicate Chrome tab and auto-group the rest by website

I had 4 Chrome windows with ~80 tabs each, mostly duplicates of the same Stack Overflow page. Tried OneTab (saves to a list - not what I wanted) and Workona (cloud sync, overkill). So I wrote ~50 lines of vanilla JS. Click the toolbar icon → every duplicate tab across every window is removed (matched by URL) → survivors merge into one window → remaining tabs auto-group by hostname (collapsed). Two permissions: tabs, tabGroups. No background activity, no server, no analytics. Whole source is in the README so you can audit it before installing. Chrome Web Store: https://chromewebstore.google.com/detail/tab-vacuum/apdjhdjcejehjiomcolfgfgjhaedoieb GitHub: https://github.com/mayhsundar/tab-vacuum Please give your comments submitted by /u/mayhsundar [link] [留言]

/u/mayhsundar 2026-06-08 11:58 8 原文