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

AI 资讯

AI人工智能最新资讯、模型发布、研究进展

15769
篇文章

共 15769 篇 · 第 655/789 页

Reddit r/webdev

What do you think of OCaml's tyxml for generating ultra type-safe HTML?

I'm working on a personal one-man project. It's very simple : it's a static website generated from some data stored in a JSON file. I have a prototype written in TypeScript/TSX, consisting of fewer than ten files (views), each containing an average of less than fifty lines of code. Only two of the pages retrieve data from JSON; the rest are simple TSX files that describe the project (pages like "About" or the "Privacy" page). Given how simple it is, I thought I'd go the extra mile and focus heavily on ensuring the entire code, from the build process to the distribution, is 1000% correct, stuff like: crazy type safety 0% chance of logical and consistency errors validation of JSON against a schema HTML (and attributes) that conforms to the specifications (no mains inside spans, no booleans inside hrefs...) I started exploring the various programming languages that allowed me to do all these things at once, and I found OCaml . It: is statically typed has yojson to parse JSON and into a nested OCaml tree data structures has tyxml to build valid HTML. If I understood correctly, it has the distinctive feature of performing strict checks on (HTML) element's attributes while libraries in other languages simply accept any string To be honest, I also looked into Elm , which seems to be even more lenient when it comes to error handling; however, its HTML generation library doesn't seem to have strict controls over attributes, not nearly as strict as tyxml. Is there something even more powerful that allows me to achieve what I want (code safety and error free) or is OCaml already the best? If so, what has been your experience with it? Any advice? I'll say it again: the project is so simple that you could rewrite it in any programming language in an hour, it's no problem for me. It's a chance to learn something new. Thanks in advance. submitted by /u/Wise_Stick9613 [link] [留言]

/u/Wise_Stick9613 2026-06-06 00:14 👁 6 查看原文 →
HackerNews

Ask HN: Are orbital data centers possible / a good idea?

Saw a YC company has raised 200 million at a billion dollar valuation. https://www.starcloud.com/starcloud-4. Additionally - with the impending spacex ipo this seems like a big focus. Can someone with a stronger physics background explain why anyone would think this is a good idea?

aronowb14 2026-06-06 00:13 👁 3 查看原文 →
Reddit r/artificial

The strange thing about LLM reasoning research: we're now trying to remove the chain-of-thought traces

After spending the last few weeks reading through the reasoning literature, I noticed a trend that seems worth discussing. For the past 2–3 years, a large fraction of progress in LLM reasoning came from making models generate more intermediate thoughts. Chain-of-Thought prompting (Wei et al., 2022) pushed PaLM 540B from roughly 18% to 58% on GSM8K. Self-Consistency added another 17.9 percentage points by exploring multiple reasoning paths before committing to an answer. Tree-of-Thoughts later showed that GPT-4's success rate on Game of 24 could jump from 4% to 74% when reasoning was reformulated as search rather than a single chain. DeepSeek-R1 and OpenAI's o1 pushed the idea even further by allocating substantial test-time compute to reasoning itself. Taken together, these results seemed to point in the same direction: giving models additional reasoning trajectories, search paths, or thinking steps often improved outcomes. Recent work increasingly asks whether those traces are actually necessary. Quiet-STaR doesnt treat reasoning traces primarily as explanations for humans. Instead, it trains models to generate internal rationales that improve future token prediction. COCONUT goes a step further and asks a more radical question: why force reasoning to be represented as language at all? Rather than generating reasoning tokens, it feeds continuous hidden states back into the model and performs reasoning directly in latent space. Fast Quiet-STaR then shows that some of the benefits of explicit reasoning can be retained even after removing thought-token generation during inference. This feels like a meaningful shift in research direction. For a while, the field seemed focused on making reasoning more visible. Recent work increasingly explores whether visibility is actually necessary. One way to interpret this is that Chain-of-Thought was never the reasoning process itself. It was a computational scaffold. Transformers perform a fixed amount of computation per generated

/u/dank_philosopher 2026-06-06 00:04 👁 7 查看原文 →
Dev.to

How We Strengthened Magento Performance Architecture for a Multi-Million Product Store

Managing a multi-million product catalog on Magento presents unique challenges around performance, scalability, and operational efficiency. At Rave Digital, we recently undertook a Magento performance optimization project for a large-scale eCommerce merchant struggling with slow site speed, infrastructure bottlenecks, and backend instability. This use case breakdown details how we modernized their Magento architecture, optimized database performance, and scaled infrastructure to deliver a stable, high-speed shopping experience. This post is tailored for eCommerce managers, directors, and Magento merchants—especially those running Adobe Commerce or Magento Open Source platforms—who want to understand practical strategies for Magento architecture scaling and performance tuning for large catalogs. The Problem: Performance Bottlenecks in a Complex Magento Environment: Our client operated an enterprise Magento store with a multi-million product catalog. Despite Magento’s robust capabilities, the site suffered from: Slow page load times impacting user experience and SEO Scalability challenges as product volume and traffic grew Infrastructure bottlenecks causing backend instability and downtime Complex integrations and manual processes limiting operational efficiency Platform limitations in handling large catalog management and real-time inventory updates These issues collectively threatened the site’s ability to support growth and deliver a seamless customer experience. The client sought a comprehensive Magento platform modernization to address these challenges. Context: Why Magento Architecture and Infrastructure Matter Magento’s flexibility and extensibility make it ideal for enterprise eCommerce, but large catalogs require careful architecture and infrastructure planning. Key technical pain points include: Database performance under heavy read/write loads Indexing delays and cache invalidation impacting site speed Integration complexity with third-party systems and API

Rave Digital 2026-06-05 23:58 👁 11 查看原文 →
Dev.to

Everyday Docker CLI

Docker has a massive surface area, but your day-to-day workflow only relies on a handful of commands. here is the essential cheat sheet for running, debugging, and cleaning up. 1. Running Containers ( docker run ) The docker run command is your workhorse. By combining a few key flags, you can control exactly how your container behaves. Run in the background with a specific name: docker run -d --name my-cache redis:7-alpine -d runs the container in detached mode (background). --name gives it a recognizable name instead of a random hash. Expose ports securely (Localhost only): docker run -p 127.0.0.1:8080:80 nginx:alpine Maps port 80 inside the container to port 8080 on your host machine, restricting access strictly to your local loopback address. Inject Environment Variables: # Single variable docker run -e ENV = prod python:3.12-slim # From a file docker run --env-file .env python:3.12-slim Auto-cleanup for one-off tasks: docker run --rm python:3.12-slim python -c "print('Done!')" --rm ensures the container is automatically deleted from your system the moment it stops running. 2. Debugging and Interacting Once a container is running, you need visibility into what it's doing. Stream live logs: docker logs -f my-cache The -f (follow) flag streams the logs in real-time. Use Ctrl+C to exit. Drop into a shell of an already running container: docker exec -it my-cache sh Unlike docker run (which creates a new container), exec opens an interactive ( -it ) shell inside an existing one. 3. Container Lifecycle Knowing how to stop a container properly prevents data corruption and hanging processes. Graceful shutdown: docker stop my-cache Sends a SIGTERM signal, giving the container time to save state and shut down cleanly. Force shutdown (when frozen): docker kill my-cache Sends an immediate SIGKILL signal. Use this only when stop fails. 4. Visibility and Cleanup Docker accumulates stopped containers and unused images fast. Keep your system clean. List all containers (including

aykhlf yassir 2026-06-05 23:51 👁 6 查看原文 →
Reddit r/artificial

Feel like I'm becoming the glue between many AI tools

PM at a mid-size startup here. Didn’t really notice how bad it got until this week. My workflow now: • Claude for ideation • ChatGPT for rewriting specs • Cursor for implementation • Perplexity for research • Notion AI for docs • Atoms AI for larger tasks None of these tools actually replaced my work. They just redistributed it. I’m still the one dragging context between all of them.Yesterday I literally caught myself pasting the exact same requirement into 4 different tools and thinking… this can’t be how it’s supposed to work. I don’t even think any single tool is bad. It just feels like we hired 6 smart interns and completely forgot to get a manager. submitted by /u/Dangerous-Guava-9232 [link] [留言]

/u/Dangerous-Guava-9232 2026-06-05 23:50 👁 6 查看原文 →
Reddit r/artificial

How do AI influencers actually make money? Breaking down the real business model

I build and teach this, so here's the honest mechanics, not the hype. Build one consistent AI character (custom-trained, not just prompting), run it as a social presence, monetize on platforms that allow AI. The edge isn't quality vs humans — it's near-zero content cost, no burnout, horizontal scaling. The underrated hard part: consistency is genuinely difficult, and the money is in audience relationship management, not the content. The content's the easy 20%. Broader signal: when content cost hits zero, the bottleneck becomes distribution and trust. Applies way past this niche. Happy to go deeper on any part — it's what I do daily. submitted by /u/PoleTV [link] [留言]

/u/PoleTV 2026-06-05 23:48 👁 9 查看原文 →
Dev.to

I Benchmarked 3 Local LLMs on My Laptop — Here's What the Numbers Actually Show

The Problem With Choosing a Local Model Everyone has an opinion on which local LLM is best. "Use Llama — it's the most popular." "Mistral 7B has the best quality." "Phi-3 Mini is small and efficient." None of these claims come with numbers. Specifically: your numbers, on your hardware, for your workload. I built a benchmarking system to change that. Three models, 30 prompts, full latency distribution, memory profiling per inference call, and a JSON validation layer to measure structured output reliability. Here's what I found — and why the results matter for anyone deploying local models in production. The Setup Three models tested: llama3.2:3b — 3B parameters, Q4_K_M quantization, 2 GB download phi3:mini — 3.8B parameters, Q4_K_M, 2.3 GB download mistral:7b — 7B parameters, Q4_K_M, 4.1 GB download Hardware: CPU only, no GPU acceleration. This is the worst-case baseline — the scenario that exposes real latency and memory numbers. 30 test prompts across 5 categories: Short factual (10): "What is the capital of France?" Reasoning (8): "Explain why the sky appears blue." Code generation (5): "Write a Python function to reverse a string." Structured output (5): "List 3 frameworks in JSON format with name and use_case." Multi-step (2): Complex chained reasoning tasks. Architecture POST /query → Pydantic validation → Ollama HTTP API → JSON Validator → QueryResponse POST /benchmark → Load test_prompts.json → For each prompt: psutil memory before → Ollama → psutil memory after → NumPy: P50/P95/P99 latency, avg TPS, peak/avg memory → BenchmarkResult JSON The benchmark runs prompts sequentially, not in parallel. Parallel would contaminate the per-prompt memory measurements. Results Llama 3.2 3B (Q4_K_M) avg_tokens_per_second : 42.3 p50_latency_ms : 1203 p95_latency_ms : 3847 p99_latency_ms : 5120 peak_memory_mb : 6953 avg_memory_mb : 6842 total_test_duration_s : 87.4 Interpretation: P50 at 1.2 seconds is excellent. P95 at 3.8 seconds misses a 3-second SLA — the outliers are m

Vijaya Rajeev Bollu 2026-06-05 23:45 👁 10 查看原文 →
Reddit r/webdev

The more I code, the more I struggle with page builder projects. Anyone else?

The more I code, the worse my relationship with builder projects gets. It's just reality. I migrate a lot of sites to VPS these days. Cuts hosting costs significantly for clients, and honestly I've gotten pretty good at it. If anyone does the same, curious if you've run into this too. The thing is, most of these projects come with builders already in place. Elementor mostly, some Bricks, some older stuff that's a complete disaster. And the core problem is always the same: these tools design in the database. Not in code. So on a live ecommerce site you've got payments, emails, transactional stuff, chat integrations. All of that gets disabled on dev. Fine. But then when you need to push something back to main, especially if the builder is involved, it becomes a mess. The database on staging and the database on production have diverged, and there's no clean way to merge them. My current approach: stop fighting the chaos, join it with a method. Every DB action I take on staging gets documented as a WP-CLI command. Those commands live in a migration script. When it's time to push, I run the script on production after a backup. It's not magic, but it works, it's readable, and it lives in git. Not sure if this is the right way though. Meanwhile, when design lives in code (custom theme, Gutenberg blocks, PHP templates) the whole problem disappears. Git handles it. Deploy is clean. How do you all handle this in practice? Do you steer clients away from builders? Have you found a builder that plays nicely with proper deploys? Or do you just accept that builder sites need a different, more careful workflow? submitted by /u/Substantial_Word4652 [link] [留言]

/u/Substantial_Word4652 2026-06-05 23:40 👁 6 查看原文 →
Dev.to

Install PHP 8.5 with ASDF on Arch Linux

This quick tutorial shows how to install ASDF Version Manager on Arch Linux and use it to install PHP 8.5. Install Required Dependencies First, install the required packages and build dependencies: yay -S base-devel libpng postgresql-libs re2c gd oniguruma libzip libsodium You may also want to install additional common dependencies: yay -S curl git openssl zlib libxml2 sqlite Install ASDF Clone the ASDF repository: git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.18.0 Add ASDF to your shell configuration. Bash echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc source ~/.bashrc ZSH echo '. "$HOME/.asdf/asdf.sh"' >> ~/.zshrc echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.zshrc source ~/.zshrc Verify installation: asdf --version Add the PHP Plugin Install the PHP plugin for ASDF: asdf plugin add php https://github.com/asdf-community/asdf-php.git Install PHP 8.5 List available PHP versions: asdf list all php Install PHP 8.5: asdf install php 8.5.0 Set PHP 8.5 as the global default: asdf global php 8.5.0 Reload your shell: exec $SHELL Verify the installation: php -v Expected output: PHP 8.5.x ( cli ) Useful ASDF Commands List installed PHP versions: asdf list php Install another PHP version: asdf install php 8.4.0 Switch globally: asdf global php 8.4.0 Switch locally for a project: asdf local php 8.5.0 Optional: Install Composer After installing PHP, install Composer globally: php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php composer-setup.php sudo mv composer.phar /usr/local/bin/composer rm composer-setup.php Verify: composer --version

Jean Dias 2026-06-05 23:39 👁 12 查看原文 →
Dev.to

The repo that became its own good-first-issue

I've always loved teaching and helping others achieve things. There is a huge sense of accomplishment leveraging someone else's abilities. Not only telling them "you can!", but rather help them feel "I can". I was working as a developer for some time when I decided it was time to contribute to other projects. But, honestly, finding the right project, the right issue, and having the right timing was much harder than what I expected initially. I decided to create something that could help me out: scrape some orgs, find good-first-issue labels, and aggregate them together in a README file. Contributing to Open Source isn't easy for many reasons: The obvious, the technical: finding your first technically possible contribution is a combination of the right language, the right depth, and knowing which repo to search in. good-first-issues tackled that by scraping the language and the issue title to somewhat give me a little of context to start with. The not so obvious, the human side of it. My first contribution(s) were hard because I felt exposed, my weaknesses were in the wild for everyone to see and point them out to me. At least that was how I felt. And once I found the right issue, and I decided to give that step forward, many times I didn't get an answer back. That kills any motivation left. Probably PR ghosting is the biggest reason why someone quits their willingness to contribute to OSS. At first, good-first-issues was just a place others could come to find issues. But I realised it could be that issue. There were functionalities I wanted to bring and either I didn't have the time, or didn't have on the top of my head how to do them. "I can kill two birds with one stone" I thought. I knew where I wanted the repo to go, and I wanted it to be community-driven. Creating good self-contained, clear and approachable issues is an art in itself: I didn't want to create the obvious "Fix this typo" (which I did initially) or "Add your name as a contributor" issues. But I di

drkrillo 2026-06-05 23:36 👁 10 查看原文 →
Dev.to

The One TDD Habit That Saved My Sanity (and My Codebase)

The One TDD Habit That Saved My Sanity (and My Codebase) Quick context (why you're writing this) Here's the thing: I used to think I was doing TDD right. I’d write a test, watch it fail, then write just enough code to make it green. Rinse and repeat. Sounds textbook, right? But a few months ago I spent an entire afternoon chasing a bug that only showed up after I refactored a service class. The tests were all passing, yet the app was throwing NullReferenceExceptions in production. I was shocked. How could everything be green and still be broken? Turns out I was testing the inside of my code instead of what it actually did for the outside world. That realization hit me like a truck, and it completely changed how I approach TDD. The Insight Test behavior, not implementation. If your test is coupled to private fields, internal data structures, or the exact way a method accomplishes its goal, you’re not testing what matters—you’re testing how you happen to do it today. When you later refactor to improve performance, swap out a dependency, or even just rename a variable, those tests start failing for no good reason. You end up spending more time fixing tests than delivering value, and you lose confidence in the suite because it feels fragile. The payoff? A test suite that gives you confidence when you change code, not anxiety. You can refactor fearlessly because the tests only care about the contract: given these inputs, the system should produce these outputs or side‑effects . How (with code) Let’s look at a tiny but realistic example: a PasswordValidator service that checks whether a user‑chosen password meets our policy. ❌ The mistake: testing implementation details // PasswordValidator.cs public class PasswordValidator { private readonly IRegexProvider _regex ; // injected for testability public PasswordValidator ( IRegexProvider regex ) { _regex = regex ; } public bool IsValid ( string password ) { // implementation we might want to change later return _regex . IsMa

Timevolt 2026-06-05 23:36 👁 13 查看原文 →
Dev.to

The Website Was Working Fine. The CMS Wasn't: Understanding Drupalgeddon2

Imagine you're responsible for a company's website. Everything seems healthy. Pages load quickly. Users can log in. Content editors publish articles every day. Customers aren't reporting problems. From the outside, everything looks perfect. But then one day you discover something surprising: Attackers don't care whether your website looks healthy. They care whether the software behind it is vulnerable. That's exactly what happened with Drupalgeddon2. One of the most significant CMS vulnerabilities in recent years. And one that still teaches valuable lessons for developers, DevOps engineers, and security professionals today. The Building Manager Analogy Imagine a large office building. The company hires a building manager. The manager handles: Visitors Deliveries Maintenance Schedules Room Access The employees don't worry about these details. They trust the manager. A Content Management System (CMS) works similarly. Instead of manually managing every page and article, organizations rely on a CMS. Website ↓ CMS ↓ Content The CMS becomes the central control system. And that's why it becomes such an attractive target. What Is Drupal? Drupal is an open-source Content Management System. Organizations use it to manage: Corporate websites Government portals Universities Media platforms Enterprise applications A simplified architecture looks like: Visitor ↓ Drupal ↓ Database ↓ Content Every request passes through Drupal. Which means Drupal becomes part of the application's attack surface. Why Attackers Love CMS Platforms Suppose an attacker discovers a vulnerability in: Custom Internal Tool Maybe a few organizations are affected. Now suppose they discover a vulnerability in: Popular CMS Thousands of organizations may be affected. Potentially millions of users. One vulnerability. Many targets. That's why CMS platforms receive so much attention. Understanding Drupalgeddon2 Drupalgeddon2 refers to: CVE-2018-7600 A Remote Code Execution vulnerability affecting Drupal. The import

Arashad Dodhiya 2026-06-05 23:36 👁 7 查看原文 →