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

今日精选

HOT

最新资讯

共 26751 篇
第 548/1338 页
AI 资讯 Reddit r/MachineLearning

Small Language Model SLM [D]

Hi, I am supposed to prepare for SLM and its software part for an on campus internship, i've worked with local models like ollama generally,in my projects and also with open claw so can anyone guide me the last 2-3 days tips on what should i go through for this internship prep?? submitted by /u/Idea_less_ [link] [留言]

/u/Idea_less_ 2026-07-04 00:17 4 原文
AI 资讯 Dev.to

Effort Levels in Practice: I Benchmarked low Through max on Real Tasks

The current Claude models give you an effort knob with five settings: low , medium , high , xhigh , max . The docs tell you what each is for. I wanted numbers, so I ran the same three real tasks across all five levels and measured tokens, latency, and quality. The results changed how I set effort, and one of them surprised me. Here is the data and what I do with it now. What effort controls Effort is not just "how much the model thinks." It controls overall token spend: how much it thinks and how it acts. Lower effort means fewer, more consolidated tool calls, less preamble, terser output. Higher effort means more exploration before answering. The default is high if you omit it. const response = await client . messages . create ({ model : " claude-opus-4-8 " , max_tokens : 16000 , thinking : { type : " adaptive " }, output_config : { effort : " medium " }, // the knob messages , }); The three tasks I picked tasks that span the range of what I actually do: Classification : label a contract finding as low/medium/high/critical. Short, scoped. Code generation : write a TypeScript function with edge-case handling. Medium difficulty. Multi-step audit : analyze a 200-line contract for vulnerabilities across functions. Hard, agentic. I ran each at all five effort levels, three times, and averaged. I scored quality against a known-correct answer for tasks 1 and 3, and by manual review for task 2. The results Task 1, classification. Quality was flat across every effort level. The right label is the right label, and the model nailed it at low just as well as at max . But token usage climbed steeply: max used roughly 8x the tokens of low for an identical answer. Latency tracked tokens. The lesson: for genuinely simple, scoped tasks, high effort is pure waste. I set classification to low . Task 2, code generation. Quality improved from low to high , then plateaued. At low the model sometimes skipped an edge case. At high it caught them. xhigh and max produced essentially the sam

Pavel Espitia 2026-07-03 23:56 6 原文
AI 资讯 Dev.to

The Go Code Review Comments List: 10 Rules Every Reviewer Cites

Book: The Complete Guide to Go Programming Also by me: Hexagonal Architecture in Go — the companion book in the Thinking in Go series My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub You open a pull request in a Go repo you just joined. Ten minutes later there are six comments on it. None of them are about your logic. They point at a capitalized error string, a receiver named this , a context stored on a struct. Each comment links the same page: the Go Code Review Comments wiki. That page is the closest thing Go has to an official style council. It grew out of the comments Go's own maintainers left on CLs for years, and most Go teams treat it as the default rulebook. The problem is that the wiki tells you what but rarely why , so the rules read like arbitrary taste. They aren't. Each one exists because the alternative bit somebody. Here are ten that reviewers cite the most, with the reason behind each. Everything below is idiomatic on Go 1.23+. 1. Error strings are lowercase and unpunctuated The rule: an error string should not be capitalized and should not end with punctuation. // wrong return fmt . Errorf ( "Failed to open config." ) // right return fmt . Errorf ( "failed to open config" ) The reason is wrapping. Go errors get concatenated. Your string is almost never the whole sentence a user reads; it's a fragment in a chain built with %w : return fmt . Errorf ( "load settings: %w" , err ) // -> "load settings: open config: permission denied" Capitalize your fragment and you get load settings: Open config: permission denied in the middle of a line. End it with a period and you get a period in the middle of a longer message. Lowercase, no trailing punctuation, and every fragment composes cleanly no matter where it lands in the chain. The exception is a string that begins with an exported name or acronym, which keeps its own case ( HTTP , TLS ). 2. Receiver types are consistent ac

Gabriel Anhaia 2026-07-03 23:53 10 原文
开发者 Dev.to

NanoScript can finally create real projects!

Hey everyone! 👋 I'm super excited to share this. After a lot of work, NanoScript is finally ready to build real-world projects. It's a modern, ultra-lightweight JavaScript library designed for edge environments, and it makes DOM manipulation, event handling, and animations a breeze. To show you what it can do, I built a small but complete project: The Kasane Teto Song Finder . It's a fun, fully-functional web app that uses almost every NanoScript plugin. 🎵 What is the Kasane Teto Song Finder? It's a simple single-page app for fans of the UTAU voicebank, Kasane Teto. It lets you search through a list of songs, save your input, toggle themes, copy text, and more. Here's a quick look at the code: <input id= "teto-songs-input" type= "text" placeholder= "Enter song name.." /> <div class= "songs-list" > <div class= "song" > Voices In My Head feat. Kasane Teto </div> <div class= "song" > Execution Clap feat. Kasane Teto </div> <div class= "song" > YARARARA feat. Kasane Teto </div> </div> <script> // NanoScript in action! NS . getGhostState (); // Restore saved input NS . ghostState ( " #teto-songs-input " , " value " ); // Auto-save input // Live search filter NS . findArray ({ items : document . querySelectorAll ( " .song " ), element : " #teto-songs-input " }); // Live character counter NS . liveCounter ({ element : " #teto-songs-input " , max : 50 , showCounter : true , counterElement : " #count " , onLimit : () => { alert ( " No Kasane Teto song name is that tall 😅. " ); } }); /* Rest of the code */ </script> ✨ What This Project Shows This tiny app is a perfect demonstration of NanoScript's core philosophy: do more with less. Here's what it uses in a few lines of code: State Management: NS.ghostState and NS.getGhostState automatically save and restore the user's input using localStorage. This is a full-featured persistence system with zero setup. Real-time Search: NS.findArray filters a list of songs as you type, proving that NanoScript isn't just a utility library—it

Codemaster_121482 2026-07-03 23:52 3 原文
AI 资讯 Dev.to

iOS and Android Have Different Goals for PWAs: The Real Difference Beyond Support or No Support

This is a reprint from my tips blog. You can find the original article here: [ https://tips.ojapp.app/en/ios-android-pwa-goal-difference-3/ ] Android vs. iPhone: Different Goals for PWAs When people talk about PWAs, the explanation often sounds like this: Android supports PWAs. iPhone does not support PWAs very well. If you only look at the PWA specifications, this explanation is easy to understand. Android Chrome supports manifest.json, Service Worker, installation, notifications, shortcuts, and many other PWA features quite strongly. iPhone Safari, on the other hand, does not behave the same way as Android. But after testing PWAs on both iPhone and Android many times, I started to see the difference in another way. More accurately, Android and iPhone have different goals for PWAs. That is the biggest difference I noticed while testing repeatedly. Android tries to turn web pages into apps Android PWAs are clearly designed in the direction of making web pages feel closer to native apps. The idea is to take a website opened in the browser and move it toward a native-app-like experience. This direction is very strong on Android. That is why many PWA-related features are well supported. manifest.json Service Worker Push notifications Install Prompt Shortcuts theme_color background_color maskable icons display modes orientation Of course, it is not perfect. Manifest cache can be stubborn, multiple PWAs on the same domain can become confusing, and real-device testing can still create plenty of traps. Even so, when you build according to the PWA specification, Android usually responds in a fairly straightforward way. For example, if you set display: fullscreen , the app feels much more full-screen. theme_color is often reflected in the toolbar color. orientation also works quite strongly on Android. In other words, for Android, a PWA is an app made from the Web . iPhone starts from the experience of placing web pages on the home screen iPhone is different. Even before the

ojach 2026-07-03 23:52 8 原文
AI 资讯 Dev.to

Go Naming: Why Getters Drop the Get Prefix (and Other Idioms)

Book: The Complete Guide to Go Programming Also by me: Hexagonal Architecture in Go — the companion book in the Thinking in Go series My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub You write a Go struct with a private field and a method to read it. Muscle memory from Java, C#, or PHP takes over, and you type GetName() . The code compiles. Tests pass. Then a reviewer leaves a comment that just says "drop the Get" with no explanation, and you're left wondering whether that's a real rule or one person's taste. It's a real rule. It's written into the language's own style guide, the standard library follows it everywhere, and several linters will flag the code that breaks it. Go naming isn't a matter of opinion the way it is in some languages. A handful of conventions are baked into the tooling, and once you know them, half the reviewer nitpicks disappear. Getters drop the Get The convention comes straight from the Effective Go document. If you have an unexported field owner , the accessor is named Owner , not GetName or GetOwner . The mutator, if you need one, keeps the Set prefix. type File struct { owner string } func ( f * File ) Owner () string { return f . owner } func ( f * File ) SetOwner ( o string ) { f . owner = o } The reasoning is about how the call reads. person.Name() says the same thing as GetName() with less noise, and the parentheses already tell you it's a method call. Get adds a word that carries no information in a language where field access and method calls look different anyway. The Set prefix stays because there's no other clean way to signal mutation. Name() reads, SetName(x) writes. The asymmetry is deliberate. This shows up all over the standard library. bytes.Buffer has Len() , not GetLen() . sync.Once has no getters to get wrong, but http.Request exposes fields and methods that never carry a Get . time.Time has Hour() , Minute() , Second() . The pattern is

Gabriel Anhaia 2026-07-03 23:51 10 原文