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

今日精选

HOT

最新资讯

共 37284 篇
第 1753/1865 页
AI 资讯 Dev.to

How I built a dependency risk scanner with Coral in 7 days

— Captain's Log entry for the Pirates of the Coral-bean Hackathon. Why this project Every developer has 5-10 side projects with rotting dependencies and doesn't know it. The 2024 xz-utils backdoor was caught by accident — one engineer noticed SSH was 500 ms slower than usual. That's how close it came. Tools like Snyk and Dependabot catch known CVEs after they're published. Nothing checks the three signals that together predict a future supply-chain attack: active CVEs · abandoned maintainer · collapsing downloads . That three-way signal only exists if you can JOIN across OSV (Google's vulnerability database), the npm registry , and the npm download API . Which is exactly what Coral does. The query that took me 6 days to earn WITH pkg AS ( SELECT name , latest_version , repository__url , time__modified AS last_publish_at FROM npm . packages WHERE package_name = : pkg ), cves AS ( SELECT affected__package__name AS package_name , COUNT ( * ) AS cve_count , MAX ( CASE database_specific__severity WHEN 'CRITICAL' THEN 4 WHEN 'HIGH' THEN 3 WHEN 'MODERATE' THEN 2 WHEN 'LOW' THEN 1 ELSE 0 END ) AS worst_sev_rank FROM osv . vulnerabilities WHERE package_name = : pkg AND ecosystem = 'npm' AND withdrawn IS NULL GROUP BY affected__package__name ), dl_month AS ( SELECT downloads FROM npm_downloads . downloads_last_month WHERE package_name = : pkg ) SELECT pkg . * , COALESCE ( cves . cve_count , 0 ) AS cve_count , COALESCE ( cves . worst_sev_rank , 0 ) AS worst_severity_rank , dl_month . downloads FROM pkg LEFT JOIN cves ON cves . package_name = pkg . name LEFT JOIN dl_month ON 1 = 1 ; One query. Three live systems — three different hosts ( registry.npmjs.org , api.osv.dev , api.npmjs.org ). Zero glue code. No ChatGPT instance on earth can run this. Verified against minimist : 2 CVEs, worst severity CRITICAL, 531M downloads/month. Day 1 — The OSV source spec OSV is a public REST API. The Coral source spec is a single YAML file, and the skeleton came together quickly. The hard part

M Rayhan Khan 2026-05-31 02:33 4 原文
AI 资讯 Reddit r/artificial

The next AI problem might not be intelligence. It might be responsibility.

AI systems are moving from answering questions to taking actions. That changes the risk. A wrong chatbot answer is annoying. A wrong action inside email, CRM, payments, customer support, or internal data can create real damage. So maybe the next big AI challenge is not just better reasoning. It is knowing: what the AI can access what it can do alone what needs approval who is accountable when it fails As AI agents become more common, who do you think should be responsible when they make a bad decision? submitted by /u/Alpertayfur [link] [留言]

/u/Alpertayfur 2026-05-31 02:28 5 原文
AI 资讯 Dev.to

Local-first: a Model on Your Own Machine, Zero Cloud

This is the concrete, runnable walkthrough for Post 1 of the Portway series . The goal: stand up a single model behind an OpenAI-compatible endpoint on hardware you already own, call it from the official OpenAI SDK, and internalize the stateless contract. Everything here runs locally for $0. What this post covers A demo.py script with two blocks: Round-trip — one chat call via the OpenAI SDK, printing the content and the usage object. Stateless proof — the same final question sent as a 1-turn message and as the last turn of a 5-turn fabricated history; both prompt_tokens values are printed alongside an explanation of the delta. Engine choice on this machine Apple Silicon Mac, 48 GB unified memory, Ollama already installed. The demo uses Ollama's OpenAI-compatible endpoint at http://localhost:11434/v1 and the gpt-oss:20b model (~14 GB). The wider Portway series uses llama.cpp on Mac (Ollama is called out as problematic for Qwen3.5 in Post 2). For Post 1 — one model, prove the contract — Ollama is fine and already on the box. Model options by available RAM The demo script works with any Ollama-served model — just substitute the model name in demo.py . The table below covers machines from 9 GB unified memory upward. Model Pull command Approx size Min RAM Notes llama3.2:3b ollama pull llama3.2:3b ~2 GB 8 GB Fastest; good for testing the contract gemma3:4b ollama pull gemma3:4b ~3 GB 8 GB Google; solid instruction-following mistral:7b ollama pull mistral:7b ~4.1 GB 8 GB Classic 7B baseline llama3.1:8b ollama pull llama3.1:8b ~4.7 GB 9 GB Best quality under 10 GB qwen2.5:7b ollama pull qwen2.5:7b ~4.4 GB 9 GB Strong at instruction + reasoning gpt-oss:20b ollama pull gpt-oss:20b ~14 GB 24 GB Used in this post's sample output On a 9 GB machine, replace gpt-oss:20b in demo.py with llama3.1:8b or qwen2.5:7b — the contract demonstration is identical. Prerequisites Ollama running locally ( curl -s http://localhost:11434/api/tags should return JSON) uv installed ( uv --version )

Dale Nguyen 2026-05-31 02:27 13 原文
AI 资讯 Reddit r/artificial

Gemini core part 4

https://preview.redd.it/pv22tsg2ib4h1.png?width=1918&format=png&auto=webp&s=dfeda1000090dc99c57c8150e4de46cfe2ba2e29 I just wanted him to give me a prompt, which then i can give to Nano Banana pro and generate me a completely random thumbnail, i wanted to test its capabilities, but instead of a prompt, he gave me this... 😭😭😭😭😭 submitted by /u/ObjectiveOrchid5344 [link] [留言]

/u/ObjectiveOrchid5344 2026-05-31 02:26 5 原文
AI 资讯 Dev.to

2487. Remove Nodes From Linked List

In this post i'm gone explain liked list an famous leetcode problem that is " Remove Nodes from linked list ". Problem Statement: You are given the head of a linked list. Remove every node which has a node with a greater value anywhere to the right side of it. Return the head of the modified linked list. Example 1: Input: head = [5,2,13,3,8] Output: [13,8] Explanation: The nodes that should be removed are 5, 2 and 3. Node 13 is to the right of node 5. Node 13 is to the right of node 2. Node 8 is to the right of node 3. Explanation: In this problem statement state that remove the nodes which have the right side (any place) element greater than. let's understand with given example. Node 13 is the right side of the 5,2 nodes thats why 2,5 should be remove. Node 8 is the right side of 3 node thats why 3 should be remove. final result would be [13,8] Solution of the problem: `/** * Definition for singly-linked list. * function ListNode(val, next) { * this.val = (val===undefined ? 0 : val) * this.next = (next===undefined ? null : next) * } */ /** * @param {ListNode} head * @return {ListNode} */ const reverList = function(head){ let prev = null; let curr = head; let next = null; while(curr!=null){ next = curr.next; curr.next = prev; prev = curr; curr = next; } return prev; } var removeNodes = function(head) { // reverse list let reversList = reverList(head); let maxNode = reversList; let prevNode = reversList; let currNode = reversList.next; // removed list while(currNode != null){ if(maxNode.val > currNode.val){ currNode = currNode.next; }else{ maxNode = currNode; prevNode.next = currNode; prevNode = prevNode.next; currNode = currNode.next; } } prevNode.next = null; // reverse list return reverList(reversList); };` If you have any query or suggestions leave your expression👨🏿‍💻🙌.

ramnayan 2026-05-31 02:22 15 原文
AI 资讯 Dev.to

C_STD : A Leak-Free, Cross-Platform Standard Library for Modern C

c_std: A Leak-Free, Cross-Platform Standard Library for Modern C Bringing the comfort of the C++ STL and Python's standard library to C17 — without leaving C A technical white paper. Executive summary C is still the substrate of the computing world — kernels, databases, language runtimes, embedded firmware, and the inner loops of nearly everything else. Yet the moment you step away from the kernel and try to write ordinary application code in C, you feel the gap: no growable vector, no hash map, no JSON parser, no string type that doesn't invite a buffer overflow. You either pull in a grab-bag of mismatched third-party libraries, each with its own conventions and failure modes, or you re-implement the same dynamic array for the hundredth time. c_std is an attempt to close that gap deliberately and coherently. It is a single, consistent library — written in pure C17 — that reimplements a large slice of the C++ Standard Library (containers, algorithms, smart pointers) alongside many Python-style conveniences ( json , regex , random , statistics , csv , config , even turtle graphics). It targets Windows and Linux from one source tree, compiles cleanly under -Wall -Wextra , and — this is the part I care about most — is verified leak-free under Valgrind , module by module, example by example. This paper explains the design philosophy, the architecture, and the engineering discipline that makes a library like this trustworthy enough to build on. 1. The problem: C's missing middle Every C programmer knows the two extremes. At the bottom, the language itself: pointers, malloc , memcpy , raw arrays. At the top, whatever the platform hands you — <windows.h> or POSIX, OpenSSL, a JSON library someone wrapped a decade ago. The middle — the layer the C++ STL and Python's batteries-included standard library occupy — is missing. That missing middle has a real cost. It shows up as: Re-invention. Teams write their own vector, their own string builder, their own linked list, each subt

amin tahmasebi 2026-05-31 02:20 7 原文
AI 资讯 Dev.to

How to build your professional network as a developer — authentic strategies

How to build your professional network as a developer — authentic strategies Building a Genuine Professional Network in Tech: A Practical Guide for Introverts and Extroverts Networking in tech isn’t about collecting business cards or forcing yourself to “work the room.” It’s about building real relationships with people you can learn from, collaborate with, and support over the long term. Whether you’re an introvert who prefers deep one-on-one conversations or an extrovert who thrives in crowds, you can build an authentic network that opens doors to mentorship,Jobs, collaborations, and career growth. Redefine Networking: It’s About Relationships, Not Transactions Forget the image of awkward name tags and empty promises to “grab coffee sometime.” Real networking is: Swapping war stories about debugging nightmares Sharing a job posting with someone who’d be a great fit DMing a speaker to say their talk inspired you Helping someone solve a problem without expecting anything back Quality over quantity isn’t just a buzzword-it’s your career strategy. You need 5-10 real connections, not hundreds of superficial contacts. Leverage Twitter (X), LinkedIn, and Dev Communities Effectively Twitter/X for Developer Networking Dev Twitter is alive and vibrant. Use it to: Share what you’re learning (builds credibility) Comment thoughtfully on others’ posts (starts conversations) DM speakers after webinars to say you enjoyed their talk Join tech conversations using relevant hashtags (#100DaysOfCode, #BuildInPublic) LinkedIn Profile Optimization Write a clear headline that explains what you do and what you’re curious about Share project updates, lessons learned, or thoughtful commentary on industry trends Join niche developer groups related to your tech stack Send personalized connection requests mentioning something specific you admired about their work Developer Communities (Discord, GitHub, Open Source) Join Discord servers for your favorite languages/frameworks Contribute to open

Rizwan Saleem 2026-05-31 02:20 7 原文
AI 资讯 Reddit r/artificial

🚀 Prompt Logic Gates (PLG): Are Prompts Becoming Systems?

GitHub: Prompt-Logic-Gates-PLG Over the past few days, I've shared my research project Prompt Logic Gates (PLG) and received a lot of interesting feedback. Some people loved the idea, some were skeptical, and many raised valid questions. The most common reaction was: > "Natural language is already the abstraction layer. Why add logic gates?" That's a fair question. My goal isn't to replace natural language prompting. In fact, natural language remains at the center of PLG. The idea is to explore what happens when prompts stop being a single request and start becoming systems. The Problem When we write prompts, we're converting our ideas, requirements, constraints, and expectations into text. For simple tasks, this works perfectly. But as prompts grow, they often include: Multiple objectives Business rules Style constraints Context dependencies Exclusions Fallback instructions Tool orchestration At that point, prompts become harder to maintain. Contradictions appear. Priorities become unclear. Context gets mixed together. The prompt is still text, but the complexity starts to resemble a system. What is PLG? Prompt Logic Gates (PLG) is a visual prompt engineering experiment that explores whether prompts can be organized before being sent to an AI model. Instead of writing one giant prompt, users create prompt components and connect them using semantic logic gates. The AI then analyzes the graph and compiles a final structured prompt. How It Works AND Gate When multiple instructions exist, the system evaluates them against the current context and determines which instruction is more foundational. The higher-priority instruction is applied first. OR Gate When multiple options are available, the system selects the most contextually relevant option instead of blindly including everything. NOT Gate Defines exclusions and negative constraints. It explicitly tells the system what should not be done, reducing contradictions and ambiguity. Ask Questions Gate If the system detec

/u/withsj 2026-05-31 02:19 6 原文
AI 资讯 Reddit r/programming

When Architecture Diagrams Stop Scaling

Interesting engineering write-up from Netflix on maintaining a real-time service topology in a large microservices ecosystem. The takeaway for me: observability isn't just about metrics, traces, and logs—understanding service relationships is equally critical as systems scale. Curious how others approach dependency mapping in production environments. https://netflixtechblog.com/from-silos-to-service-topology-why-netflix-built-a-real-time-service-map-0165ba13a7bc submitted by /u/mukeshsri369 [link] [留言]

/u/mukeshsri369 2026-05-31 02:18 5 原文
AI 资讯 Reddit r/artificial

"Act as..." effectiveness

Do you use the "Act as..." segment in your prompts? Do you think it's effective and why? I know it depends on the rest of the prompt, as well as the main goal, but i'm asking if it's working overall. submitted by /u/ObjectiveOrchid5344 [link] [留言]

/u/ObjectiveOrchid5344 2026-05-31 02:17 5 原文
AI 资讯 Reddit r/webdev

I made a game where you draw country borders from memory

Hi r/webdev ! I've been building my geography games site for a while now, and I just added a new game I wanted to share with you called Draw the Country . The idea is simple: you get a country name and a blank canvas, you sketch the border, and then the real outline slides over your drawing so you can see how close you got. You can play freehand, or draw with border anchors guiding you if you want it easier or you just want to learn. There's also a daily freehand challenge same country for everyone, every day. It's completely free. No ads, no sign-up. It's built with Nuxt, Vue, Tailwind, and Supabase. Check it out: https://www.geographygames.net/draw-country Any feedback is appreciated and I hope you enjoy it! PS: The video is recorded on my laptop so drawing with the trackpad is a bit tricky. submitted by /u/ExtremeMotor3772 [link] [留言]

/u/ExtremeMotor3772 2026-05-31 02:11 5 原文
AI 资讯 Reddit r/webdev

A tool for developers

Hello. I have launched https://devtools.aarushnaik.co.uk , a tool for developers to minimise the amount of tabs devs have open. It has a lot of frequently used tools like Regex Checker, JSON Formatters and lots more. It is completely free with no hidden costs (if you would like to support me, there is a Buy Me A Coffee button on the website). If you have any suggestions, please use the google form on the website to report bugs, give feature suggestions and more! Thanks, Aarush. submitted by /u/Extreme_Insurance334 [link] [留言]

/u/Extreme_Insurance334 2026-05-31 02:02 5 原文
AI 资讯 Reddit r/artificial

How has AI actually benefited you in day-to-day life?

With AI becoming part of almost everything now—work, business, investing, coding, spreadsheets, content creation, and more—I'm curious about real-world use cases. What's the one thing you use AI for regularly that has genuinely saved you time, made you money, improved your productivity, or solved a problem? Looking for practical examples rather than just "I use ChatGPT." What specific tasks have you automated or improved with AI? submitted by /u/Acrobatic-Shop4602 [link] [留言]

/u/Acrobatic-Shop4602 2026-05-31 01:56 5 原文