Dev.to
FROST 深度:为什么 AI Agent 需要「家族谱系」?
FROST 深度:为什么 AI Agent 需要「家族谱系」? 前言:一个古老的管理学问题 你有没有想过,为什么人类社会的组织方式大多是「层级制」? 从部落、到王国、到现代公司,我们习惯了一种结构: 有人决策,有人执行,有人监督 。 但当我们构建 AI Agent 系统时,为什么大多数框架都把 Agent 做成「孤岛」?每个 Agent 有自己的记忆、自己的工具、自己的行为逻辑——像一个没有家族传承的独立个体。 FROST 的核心理念是:Agent 应该有谱系、记忆和荣誉感。 1. 什么是「家族治理」? FROST 引入了生物学的隐喻: Agent 家族 。 细胞会死,但谱系会存续。 Agent 会消亡,但宪法会传承。 资产会永存。 在这个框架里,有三个关键角色: 祖辈(Elder) :定义不可违背的规则,是系统的「宪法」 父辈(Parent) :负责领域协调,可以递归委托子任务 孙辈(Child) :执行具体任务,用完即散 这不是简单的角色扮演,而是一套 结构化的治理协议 : 协议一:层级 Store 继承 祖先 Store 对后代是只读的。后代只能继承和扩展,不能篡改祖先的记忆。 # 祖辈定义的宪法 ancestor_store = Store () ancestor_store . save ( " constitution " , { " rule_1 " : " always_validate_before_act " , " rule_2 " : " never_expose_raw_context " }) # 子孙只能继承,不能修改宪法 child_store = ChildStore ( ancestor_store ) 协议二:SOP 宪法校验 每个 SOP(标准操作流程)在执行前,必须经过祖辈审核。 # 子孙编写的 SOP child_sop = [ " fetch_user_data " , " process_payment " , " send_confirmation " ] # 执行前必须经过宪法校验 if not elder . validate_sop ( child_sop ): raise PermissionError ( " SOP violates constitution " ) 协议三:编排层级限制 禁止越级 spawn。父辈只能调度子辈,不能跨代指挥。 class Elder : max_spawn_generation = 0 # 祖辈不能 spawn class Parent : max_spawn_generation = 1 # 只能 spawn 子辈 class Child : max_spawn_generation = 2 # 只能 spawn 孙辈 协议四:选择性持久化 只有经过父辈审核的产出,才能进入家族记忆库。 # 子孙的临时产出 temp_result = child . execute ( task ) # 父辈决定是否收割 if parent . approve ( temp_result ): parent . merge_from ( child ) # 吸收有价值的结果 2. 为什么 Agent 需要「记忆传承」? 当前大多数 Agent 框架的痛点: 每个对话都是全新的开始 。 你问 ChatGPT 一道数学题,它不会记得你上周问过类似的题目。你用 AutoGPT 做项目,它不会继承你之前调试的经验。 FROST 的解决方案是 分层的记忆系统 : 层级 生命周期 用途 瞬时记忆 单次任务 工作区,只读不存 世代记忆 代际传递 子辈可继承祖先数据 宪法记忆 永久 不可修改,家族共享 经验记忆 按需收割 父辈选择性地吸收有价值产出 class HierarchicalStore ( Store ): """ 层级记忆系统 """ def __init__ ( self , ancestor_store = None ): self . ancestor = ancestor_store # 只读祖先记忆 self . local = {} # 本地可写记忆 def save ( self , key , value ): if key in self . ancestor : raise ValueError ( " Cannot override ancestor memory " ) self . local [ key ] = value def load ( self , key ): if key in self . local : return self . local [ key ] if key in self . ancesto
llimage
2026-07-20 11:23
👁 6
查看原文 →
Dev.to
Strip Location From Both Halves of an iOS Live Photo Before Upload
A helpful comment on my EXIF test suggested using a metadata scrubber. That is useful for ordinary still images, but a mobile upload contract must define every asset it sends. An iOS Live Photo can include both a photo resource and a paired video resource. The failure case is simple: the JPEG derivative has no GPS EXIF, while metadata or an original file associated with the paired video survives in the upload or retry path. Build the resource inventory first: let resources = PHAssetResource . assetResources ( for : asset ) for resource in resources { print ( resource . type , resource . originalFilename ) } Then make privacy assertions per output, not per UI selection: Artifact Required check still derivative no EXIF GPS/location fields paired video derivative no location metadata upload manifest only derived filenames retry queue no path to original resources temporary directory deleted after success or cancellation My lifecycle test would start an upload, force the app into the background after the still image is prepared, kill it while the paired video is processing, and relaunch. Recovery must either regenerate both safe derivatives or delete the incomplete pair. It must never mix a scrubbed still with an original video. Apple’s PHAssetResource API exposes the resources associated with a Photos asset. That enumeration should become evidence in the test: fail when an unexpected resource type is present rather than silently uploading it. Also verify what reaches the server. Device-side inspection alone misses multipart manifests, queued originals, and server-generated previews. Download the stored pair in a test environment and run the same metadata assertions again. A “remove location” button needs a precise scope. For Live Photos, the user reasonably expects it to cover the complete paired asset and every retry copy—not just the JPEG they can see.
Roronoa
2026-07-20 11:18
👁 6
查看原文 →
Dev.to
Test a Saga When Compensation Times Out and the Message Is Delivered Twice
A saga test that stops after “payment succeeded, inventory failed, refund called” assumes compensation is reliable. It is another distributed operation, so test it under the same faults. Use this sequence: 1. payment capture succeeds 2. inventory reservation times out 3. refund succeeds at provider 4. refund response is lost 5. compensation message is delivered again 6. late inventory-failed event arrives again The invariant is not “refund endpoint called once.” It is: captured amount - confirmed refunded amount = final charged amount and final charged amount is never negative Persist an inbox record for consumed message IDs and an outbox record for each intended side effect. Give the provider request a stable idempotency key derived from saga and compensation step: { "sagaId" : "order-42" , "step" : "refund-payment-v1" , "idempotencyKey" : "order-42:refund-payment:v1" , "amount" : 4900 } A deterministic simulator should permute duplicate delivery, delayed acknowledgement, worker crash, and out-of-order events. After every run, assert one terminal order state, at most one economic refund, and a complete evidence trail. “Already refunded” must reconcile to success only after amount and payment identity match. AWS describes coordination choices and rollback behavior in its Saga pattern guidance . The implementation detail that deserves its own test is durable compensation progress: a process restart cannot erase whether the external side effect occurred. Alert on sagas stuck in compensating , but do not let an operator click “retry” with a new key. The runbook should first query provider state, compare amount and currency, and resume the same operation identity. Exactly-once delivery is not required to preserve money. Stable operation identity plus reconciliation is.
Robin
2026-07-20 11:18
👁 5
查看原文 →
Dev.to
Ship a Restart-Safe Upload CLI That Survives an Expired Resume URL
My upload CLI looked restart-safe until I tested two failures together: the process crashed at 63%, and the signed resume URL expired before restart. The checkpoint needs identity, not credentials: { "file" : "release.tar.gz" , "fingerprint" : "sha256:..." , "uploadId" : "up_123" , "localOffset" : 66060288 , "updatedAt" : "2026-07-19T12:00:00Z" } Do not persist the signed URL. On restart, exchange the durable upload ID for fresh authorization, query the server offset, then reconcile: const remote = await headUpload ( freshUrl ); if ( remote > file . size ) throw new Error ( " invalid remote offset " ); if ( remote !== checkpoint . localOffset ) { await saveCheckpoint ({ ... checkpoint , localOffset : remote }); } await sendFrom ( file , remote , freshUrl ); The server offset wins because a crash can occur after bytes are accepted but before the local checkpoint is renamed. Save checkpoints through write-to-temp plus atomic rename so a partial JSON file cannot destroy recovery. My fixture matrix includes: Failure Expected behavior crash after remote commit rewind/advance to remote offset expired URL refresh without creating a second upload changed local file stop on fingerprint mismatch missing remote upload ask before starting over checkpoint write interrupted retain previous valid checkpoint The tus resumable upload protocol specifies offset discovery and conflict handling that are useful even if the service uses a smaller custom protocol. The key idea is explicit reconciliation, not assuming client memory is authoritative. I also shipped upload status , upload forget , and an exportable checkpoint directory. Recovery is a user-facing feature; if users cannot inspect or remove state, “resumable” becomes hidden lock-in.
Sam Rivera
2026-07-20 11:18
👁 4
查看原文 →
Dev.to
Reproduce SQLite WAL Checkpoint Starvation With One Forgotten Reader
A SQLite service can keep answering health checks while its WAL grows without a successful checkpoint. One forgotten read transaction is enough to reproduce the risk. Run a controlled drill: Enable WAL mode and create a small table. Open connection A, begin a read transaction, and keep it open. From connection B, commit batches of writes for 60 seconds. Sample WAL bytes and checkpoint results every second. Release A and observe recovery. PRAGMA journal_mode = WAL ; PRAGMA wal_checkpoint ( PASSIVE ); Record the three checkpoint counters plus duration, WAL file size, oldest transaction age, write latency, and free disk bytes. A green SELECT 1 says nothing about checkpoint progress. My fault-injection gate looks like this: Given: one reader holds its transaction When: 10,000 writes commit Then: writes remain bounded And: WAL growth triggers an alert before the disk budget When: the reader closes Then: checkpoint progress resumes and WAL size converges Do not start with an automatic TRUNCATE loop. A busy result is evidence of contention; aggressive checkpoints can add latency without fixing the reader lifecycle. First identify long transactions, ensure result iterators close, and define a maximum transaction age. SQLite’s WAL documentation explains that a checkpoint must stop when it reaches pages beyond an active reader’s end mark. This is why the drill needs concurrency rather than a synthetic file-growth assertion. Operational thresholds should be tied to a disk budget: alert when projected WAL growth reaches the remaining safe window, not at an arbitrary file size. The runbook should name how to find the oldest reader, how to shed writes, and when a restart is safer than waiting. A health check is useful only when it measures the subsystem that is failing.
Odd_Background_328
2026-07-20 11:18
👁 5
查看原文 →
Dev.to
Make Multipart Upload Abort Idempotent Before Orphaned Parts Start Billing You
Multipart finalization is not the only retry boundary. Abort can succeed in object storage while the HTTP response is lost, leaving your database convinced the upload is active. Model abort as a state transition, not a button wired directly to an SDK call: active → aborting → aborted └──→ cleanup_pending The endpoint should own an idempotency key and durable intent: await db . transaction ( async tx => { const upload = await tx . lockUpload ( uploadId ); if ( upload . state === " aborted " ) return ; await tx . markAborting ( uploadId , idempotencyKey ); await outbox . enqueue ( " abort-multipart " , { uploadId , storageKey }); }); A worker calls storage. If a retry receives NoSuchUpload , do not blindly fail: reconcile whether the upload was already completed, already aborted, or expired. Only the “already absent because abort succeeded” path may converge to aborted ; completion requires a separate terminal state. Test this sequence: Step Fault Required invariant persist abort intent process dies outbox resumes work storage abort succeeds response is lost retry does not reactivate upload duplicate message delivered twice one terminal state client retries same key same operation result cleanup scan stale active row reconcile before deleting Amazon S3’s AbortMultipartUpload API notes that in-progress part uploads may still succeed around an abort and recommends verifying that parts are gone. That makes a post-abort verification pass part of correctness, not optional housekeeping. Expose abort_requested_at , attempt count, last storage result, and remaining-part count. Alert on age in aborting , then run a lifecycle cleanup policy as a backstop—not as a substitute for application reconciliation.
kongkong
2026-07-20 11:18
👁 4
查看原文 →
Dev.to
Reject Image Polyglots After EXIF Removal, Before They Reach Your CDN
Removing EXIF GPS protects one privacy boundary. It does not prove that an uploaded JPEG contains only a JPEG. A useful hostile fixture is a valid image followed by bytes for another format. Many decoders stop at JPEG’s end marker and display the picture successfully, while downstream scanners, content sniffers, or accidental downloads may interpret the trailing payload differently. Build a fixture set rather than trusting extensions: clean.jpg valid JPEG exif-gps.jpg valid JPEG with location jpeg-plus-zip.jpg JPEG followed by ZIP bytes jpeg-plus-html.jpg JPEG followed by HTML truncated.jpg missing end marker oversized-dimensions.jpg small file, dangerous decode cost My upload gate has independent layers: Store the original in a non-public quarantine location. Enforce byte-size and decoded-dimension limits. Decode with a maintained image library. Re-encode pixels into a new file, discarding metadata and trailing bytes. Verify the output’s signature, dimensions, and complete parse. Publish only the derived object under a server-generated name. A boundary check can detect bytes after the end marker, but re-encoding is the stronger transformation because it creates a new representation from decoded pixels. Keep the original inaccessible and delete it according to a tested lifecycle. assert ( outputSize <= limit ); assert ( decoded . width * decoded . height <= pixelBudget ); assert ( parseConsumesEntireFile ( output )); assert ( noLocationMetadata ( output )); The OWASP File Upload Cheat Sheet recommends defense in depth: allowlisted types, generated filenames, size limits, storage separation, and content validation. No single MIME header or metadata scrubber replaces that chain. The important privacy lesson is broader than EXIF: inspect every representation that survives the upload pipeline, and publish only a constrained derivative.
jaryn
2026-07-20 11:18
👁 4
查看原文 →
Dev.to
Design AI Productivity Metrics That Survive Goodhart’s Law
Suppose leadership rewards teams for increasing the percentage of “AI-assisted pull requests.” The dashboard rises. Did productivity improve, or did people learn which box to tick? Before launching that metric, I would run a consequence-mapping session: Intended behavior Plausible adaptation Counter-metric try useful assistance label trivial PRs as assisted retained task outcome ship faster split work into tiny PRs lead time per task share adoption avoid difficult non-AI work task-mix distribution accept suggestions reduce review scrutiny rollback and defect rate The metric card should make disagreement possible: name : ai_assisted_pr_share purpose : detect workflow adoption, not productivity owner : developer-experience known_game : self-label inflation counter_metrics : [ task_mix , review_minutes , rollback_rate ] review_date : 2026-08-19 retire_when : classification cannot be audited Then interview both high and low scorers without treating the score as performance. Ask what work disappeared, what new verification appeared, and what behavior the dashboard encouraged. Include an anonymous channel: a metric cannot reveal pressure if challenging it carries career risk. The SPACE framework argues that developer productivity cannot be captured by one dimension. That is especially relevant when AI telemetry is easy to count but verification and rework are harder to observe. My launch gate is not “the metric is accurate.” It is: teams can inspect its definition, challenge its interpretation, and show where it changes behavior. If the counter-metrics diverge, pause incentives before refining the chart. What behavior would your current AI dashboard accidentally reward?
Haley
2026-07-20 11:18
👁 4
查看原文 →
Dev.to
Measure Copilot Cost per Retained Change, Not Accepted Suggestion
An accepted AI suggestion is an event, not a durable outcome. If the code is rewritten tomorrow, acceptance rate still calls it a success. For an adoption review, I would connect three timestamps: suggestion : accepted_at : 2026-07-19T09:00:00Z repository : api task_type : test change : retained_lines_24h : 31 rewritten_lines_24h : 9 reverted_at : null review : human_minutes : 12 incident_link : null Then report a funnel rather than one flattering percentage: shown → accepted → merged → retained_24h → retained_14d A useful unit is cost per retained task : (tool cost + review labor + rework labor) / retained tasks “Retained” needs a written contract. For example: the change remains merged after 14 days, passes required checks, and has not caused a linked rollback. Line survival alone is weak because formatting and refactoring can change lines without rejecting the solution. Segment the result by task type and repository. Boilerplate tests and unfamiliar security changes should not be blended into one portfolio average. Also publish counter-metrics: review time, escaped defects, rollback rate, and developer-reported interruption. GitHub documents available fields and limitations in its Copilot metrics API . Those product metrics can be inputs, but the retained-task join belongs to the adopting organization and should be versioned like any other analytics contract. My pilot gate would be simple: expand only if retained-task cost beats the existing workflow without worsening rollback rate. Otherwise, change the workflow before buying more seats. Record the baseline before enabling the tool, and keep one comparable task cohort outside the rollout; without that counterfactual, a rising retention rate may only reflect easier work entering the sample. What retention window would make an accepted change meaningful for your team?
bestbee
2026-07-20 11:18
👁 4
查看原文 →
Dev.to
Keep an Accessible Combobox Stable When Search Results Arrive Out of Order
An accessible combobox can follow the correct ARIA pattern and still become unusable when two search responses arrive in the wrong order. Reproduce this sequence: Type ca , then quickly type cat . The cat response arrives first and highlights cat facts . The slower ca response arrives and replaces the list. aria-activedescendant now points to an option that no longer exists. IME input adds another boundary: searching during composition can send partial text the user has not committed. I would model the request generation explicitly: let generation = 0 ; let composing = false ; async function search ( query : string ) { const mine = ++ generation ; const options = await fetchOptions ( query ); if ( mine !== generation || composing ) return ; render ( options ); restoreActiveOptionByKey (); } The stable key matters. An array index cannot preserve the active option when ranking changes. Regression matrix Input Injected failure Expected evidence ca → cat first request delayed only cat results render Arrow Down result refresh active key survives or resets visibly Escape response arrives afterward popup stays closed IME composition network is fast no request until compositionend A Playwright test should assert focus remains on the input, every aria-activedescendant resolves to a live element, and Escape invalidates outstanding generations. A manual screen-reader pass should confirm result-count announcements are not emitted for discarded responses. The WAI-ARIA Authoring Practices combobox pattern defines the keyboard contract. The missing production step is testing that contract under asynchronous replacement, not only against static example data. Which stale-response failure has been hardest to reproduce in your search UI?
babycat
2026-07-20 11:18
👁 5
查看原文 →
HackerNews
Claude Fable produced a counterexample to the Jacobian Conjecture
loubbrad
2026-07-20 10:51
👁 4
查看原文 →
HackerNews
Tech Workers Face Evaporating Financial Security as AI Transforms Industry
nlpnerd
2026-07-20 10:45
👁 2
查看原文 →
HackerNews
LLMs aren't remotely like compilers or power tools
blainehansen
2026-07-20 09:47
👁 1
查看原文 →
Dev.to
화면 캡처로 버그 리포트 프롬프트 바로 만드는 방법
버그를 발견한 순간, 텍스트로 상황을 설명하려다 시간을 낭비한 경험이 있을 것이다. PromptShot의 그리기 기능과 단축키(Alt+Shift+S)를 쓰면, 브라우저에서 발견한 버그의 상태와 재현 경로를 캡처·주석·프롬프트 복사까지 한 흐름으로 처리할 수 있다. 텍스트만으로 버그 상황을 기술할 때 생기는 문제 버그를 텍스트로 설명하는 일은 생각보다 까다롭다. "오른쪽 상단 버튼을 누르면 모달이 이상하게 뜬다"는 문장을 받은 개발자는 어떤 버튼인지, 어떻게 이상한지 확인하기 위해 다시 질문해야 한다. 그 왕복이 쌓이면 간단한 버그 하나에도 맥락 공유만 수십 분이 걸린다. 특히 Cursor나 Claude 같은 AI 코딩 도구에 버그를 설명할 때, 텍스트만 붙여 넣으면 도구가 UI 상태를 추측해야 한다. 추측이 틀리면 엉뚱한 수정 코드가 나온다. 결국 개발자가 다시 맥락을 보완하는 루프가 반복된다. 문제는 두 가지다. 위치 : 텍스트로는 "어디에 있는 요소인지"를 정확히 전달하기 어렵다. 상태 : 에러 메시지, 깨진 레이아웃, 빈 영역 등 시각적 상태는 캡처 없이 설명하면 정보가 줄어든다. 그리기 도구로 화면에 직접 표시하고, 그 이미지와 함께 프롬프트를 LLM에 붙여 넣는 방식이 이 문제를 해결하는 가장 빠른 경로다. PromptShot 그리기 도구로 버그 위치를 어떻게 표시할까? PromptShot의 그리기 도구는 캡처 직후 바로 활성화된다. 별도 이미지 편집기를 열 필요가 없다. 영역을 드래그해 캡처하면 편집 패널이 열리고, 여기서 선택할 수 있는 도구는 다음과 같다. 도구 용도 버그 리포트에서 쓰는 방식 펜(자유 드로잉) 특정 영역에 자유롭게 표시 깨진 텍스트나 이미지 경계에 동그라미 형광펜 반투명 강조 에러 메시지 텍스트 강조 화살표 방향 지시 "이 버튼을 누른 뒤 저 팝업이 열림" 순서 표시 텍스트 짧은 주석 "여기서 클릭 → 404" 같은 재현 경로 메모 예를 들어, 가상의 시나리오를 생각해 보자. 결제 플로에서 "다음" 버튼이 특정 해상도에서 잘리는 버그를 발견했다고 가정하면, 화살표로 버튼 위치를 가리키고 텍스트 도구로 "1280px에서 clip 발생"이라고 짧게 메모한다. 이 이미지 하나가 세 문단짜리 텍스트 설명보다 정확하다. 캡처 범위는 전체 화면이 아니라 문제가 발생한 컴포넌트 영역만 잘라도 된다. 오히려 범위를 좁히면 LLM이 어디에 집중해야 하는지 명확해진다. 클립보드 즉시 복사로 버그 리포트 프롬프트를 작성하는 방법 주석 작업이 끝나면 Alt+1 또는 Alt+2로 복사 대상을 선택한다. Alt+1 : PNG 이미지만 클립보드에 복사 Alt+2 : 프롬프트 텍스트 + PNG 이미지를 함께 클립보드에 복사 버그 리포트 프롬프트를 만들 때는 Alt+2를 쓴다. 복사된 내용을 Cursor, Claude, ChatGPT에 그대로 붙여 넣으면 이미지와 텍스트 맥락이 동시에 전달된다. 프롬프트 텍스트 부분에는 캡처한 URL, 브라우저 정보, 캡처 시각이 자동으로 포함된다. 여기에 직접 한 줄을 추가해 재현 조건을 붙이면 완성도 높은 버그 리포트 프롬프트가 된다. 실제로 AI 코딩 도구에 붙여 넣는 프롬프트 구조는 이런 형태다. [캡처 이미지 첨부됨] URL: /checkout 재현 환경: Chrome 124, 1280×800 재현 단계: 1. 장바구니에서 '결제하기' 클릭 2. 배송 정보 입력 후 '다음' 클릭 3. 위 이미지처럼 버튼이 뷰포트 밖으로 잘림 예상 동작: 버튼 전체가 화면 안에 표시됨 실제 동작: 버튼 오른쪽 일부가 잘려 클릭 불가 위 이미지와 재현 단계를 기반으로 원인을 분석하고 수정 방향을 제안해 주세요. 이 구조를 매번 타이핑하지 않아도 된다. PromptShot에서 프롬프트 템플릿을 저장해 두면, 다음 버그부터는 캡처 → 주석 → 붙여넣기 세 단계로 끝난다. Alt+Shift+S로 이슈 트래킹을 어떻게 빠르게 처리할까? Alt+Shift+S는 PromptShot의 전역 캡처 단축키다. 브라우저 외 어떤 창에서도 작동하며, 누르는 순간 드래그 선택 모드로 바로 진입한다. 이슈 트래킹
이종현
2026-07-20 08:50
👁 6
查看原文 →
Reddit r/programming
Profiling a Python code analysis pipeline: 157s → 12s by chasing bottlenecks
I recently spent some time profiling a Python code analysis pipeline that processes large repositories into a structured knowledge bundle. Rather than trying random optimizations, I profiled each stage, fixed the biggest bottleneck, and then profiled again. What surprised me was that every optimization exposed a completely different bottleneck. The benchmark was run on a real workspace containing: 23 GB source tree ~18,000 source files ~41,000 extracted concepts Timeline Stage Before After ---------------------------------------- Filesystem Walk 58.0s 0.65s Parsing 16.7s 3.23s Cross-reference Link 9.5s 0.61s Bundle Write 98.0s 4.10s ---------------------------------------- Total 157.0s 12.0s The biggest improvements came from removing unnecessary work rather than simply adding more parallelism: Replaced Path.rglob() with os.walk() and directory pruning (avoiding hundreds of thousands of unnecessary filesystem visits). Parallelized parsing with ProcessPoolExecutor because parsing was genuinely CPU-bound. Replaced repeated list scans with precomputed indexes, caching, and set-based lookups in the linker. Profiled inside the write stage and discovered that yaml.safe_dump() accounted for nearly 95% of render time for a fixed front matter schema. Replacing it with a schema-specific serializer became one of the biggest remaining wins. One takeaway that surprised me is how misleading optimization can be without profiling. I initially assumed parsing would dominate, but after each fix, a completely different stage became the bottleneck. I documented the entire optimization journey—including benchmark methodology, implementation details, trade-offs, and the optimizations that didn't matter—in this write-up: Performance write-up: performance The implementation is part of an open-source project called OKF Generator , but I tried to make the article useful even if you're not interested in the project itself: okf-generator I'd love feedback from anyone who has worked on compiler
/u/UmairBaig7
2026-07-20 08:37
👁 6
查看原文 →
Product Hunt
Diffsmith
Comment on your AI agent's code & collaborate on changes Discussion | Link
2026-07-20 08:34
👁 3
查看原文 →
Reddit r/MachineLearning
Are there some textbooks that take a primarily engineering approach to machine learning (as opposed to a "scientific" approach)? [D]
As someone who studied stats undergrad and industrial engineering operations research grad, and who thinks about the practical business of ML components in software.... I get lost and a bit hopeless when I think about how to make useful software out of ML models in a reasonable amount of time, and in the current business environment. And when I look at the businesses where I have worked that have mountains of middle management running tiny bits of the ML model lifecycle (think feature extraction, data ingestion and integration, training infra, hosting infra, more hosting infra, applied science)... that only makes my head hurt even more. How do you go about making practical software out of ML components? Edit: I should mention that I mean from scratch ML components, not just a call to a third party hosted tool. submitted by /u/ConstructionBoth6461 [link] [留言]
/u/ConstructionBoth6461
2026-07-20 08:32
👁 2
查看原文 →
Dev.to
Installing traceless-style: A Step-by-Step Guide
Installation traceless-style is published to npm. It has no required dependencies at runtime and one optional dependency ( @swc/core ) that the SWC-backed extractor uses for large codebases. 1. Install the package npm install traceless-style # or pnpm add traceless-style # or yarn add traceless-style The package ships pre-built. There is no postinstall step. Peer dependency Required? What for react ≥ 18 Optional Only needed for the React components in traceless-style/dark and traceless-style/rtl ( <TracelessRoot /> , <ThemeToggle /> , <RtlToggle /> ). next ≥ 14 Optional Only needed if you use traceless-style/nextjs . webpack ≥ 5 Optional Only needed if you wire up the raw webpack plugin. vite Optional Only needed for traceless-style/vite . @swc/core Optional Auto-loaded for projects ≥ 100 source files. Falls back to the legacy parser if installation failed. 2. Pick an integration You're using… Install one of Next.js (App Router or Pages) traceless-style/nextjs Webpack directly (CRA-style or Rspack) traceless-style/webpack Vite traceless-style/vite Rollup traceless-style/rollup esbuild traceless-style/esbuild Just Node + a build script The CLI: npx traceless-style Each integration page contains a copy-paste config snippet. 3. Run init (recommended) npx traceless-style init This zero-config scaffolder: Detects your framework (Next, Vite, Remix, Astro). Adds the bundler plugin to your config file. Adds <TracelessRoot /> to your root layout (anti-flash dark + RTL script). Creates traceless-style.config.js if missing. Adds dev / build scripts to package.json if missing. Suggests installing the VS Code extension via .vscode/extensions.json . The scaffolder is idempotent — re-running it will not duplicate edits. 4. Verify the install Create a tiny component: // app/test-install.tsx import { tl } from " traceless-style " ; const $ = tl . create ({ hello : { color : " tomato " , padding : " 1rem " , fontSize : " 1.25rem " }, }); export default function Test () { return < div
Jenny Akhi
2026-07-20 08:29
👁 6
查看原文 →
Dev.to
AI 개발자가 실전에서 쓰는 필수 수학 개념 완전 정복
https://mdooai.com AI 모델을 다루다 보면 코드는 돌아가는데 왜 성능이 안 나오는지 이해하지 못하는 순간이 옵니다. 그 답은 대부분 수학에 있습니다. 실무 AI 개발자로 성장하기 위해 반드시 잡아야 할 최소한의 수학 개념과, 그것을 어떻게 공부해야 하는지를 구체적으로 살펴보겠습니다. 코딩만으로는 해결할 수 없는 AI 모델 성능의 열쇠 많은 주니어 개발자들이 비슷한 경험을 합니다. PyTorch나 TensorFlow로 튜토리얼 코드를 복사하고, 학습도 돌리고, 결과도 나옵니다. 그런데 모델이 왜 이렇게 예측하는지, 왜 학습이 멈추는지, 어떻게 하면 성능이 올라가는지는 설명할 수가 없습니다. 이 간극의 정체가 바로 수학입니다. 가령 모델이 과적합(overfitting)될 때 L2 정규화를 쓰라는 조언을 듣습니다. 코드 한 줄로 해결되지만, 그게 왜 작동하는지는 가중치 벡터의 크기를 제한한다는 선형대수와 확률론적 추론이 얽혀 있습니다. 이 원리를 이해하는 개발자와 모르는 개발자가 새로운 문제에서 만들어내는 솔루션의 질은 다를 수밖에 없습니다. 다행인 건, AI 개발에서 필요한 수학은 대학원 수준의 수리해석학이 아닙니다. 핵심 개념 몇 가지를 실용적 도구로 이해하는 것으로 충분합니다. 선형대수와 확률통계, 어떤 개념부터 공부해야 할까? 선형대수와 확률통계는 AI 수학의 두 축입니다. 그런데 이 두 분야 전체를 공부하려 들면 끝이 없습니다. 개발자 관점에서 실제로 반복해서 등장하는 개념만 추려내면 다음과 같습니다. 선형대수에서 우선해야 할 개념 벡터와 행렬의 연산 : 데이터는 사실상 전부 벡터와 행렬로 표현됩니다. 이미지는 픽셀값 행렬이고, 텍스트는 임베딩 벡터입니다. 행렬 곱(matrix multiplication)이 신경망의 순전파(forward pass) 그 자체입니다. 내적(dot product)과 유사도 : 추천 시스템, 어텐션 메커니즘(Transformer의 핵심)이 내적 연산 위에 서 있습니다. 고유값(eigenvalue)과 고유벡터(eigenvector) : PCA(주성분 분석)처럼 차원을 줄이는 기법을 이해하려면 반드시 필요합니다. 행렬 분해(SVD 등) : 추천 시스템과 자연어 처리의 기반 기술에 등장합니다. 확률통계에서 우선해야 할 개념 확률분포와 기댓값 : 모델의 출력이 확률인 이유, 소프트맥스(softmax)가 하는 일을 이해하는 기반입니다. 베이즈 정리 : 사전 지식을 데이터로 업데이트하는 논리 구조로, 생성 모델과 불확실성 추정에 직접 연결됩니다. 최대 우도 추정(MLE, Maximum Likelihood Estimation) : 모델 학습이 왜 손실 함수를 최소화하는 방향인지를 설명하는 원리입니다. 크로스 엔트로피 손실 : 분류 모델에서 가장 자주 쓰이는 손실 함수로, 확률론과 정보이론이 만나는 지점입니다. 분야 핵심 개념 AI 실무 연결 지점 선형대수 행렬 곱, 내적 신경망 순전파, 어텐션 선형대수 고유값·고유벡터 PCA, 차원 축소 선형대수 행렬 분해(SVD) 추천 시스템, NLP 확률통계 확률분포, 기댓값 소프트맥스, 분류 출력 확률통계 베이즈 정리 생성 모델, 불확실성 추정 확률통계 최대 우도 추정 손실 함수의 논리적 근거 확률통계 크로스 엔트로피 분류 모델 학습 활성화 함수와 역전파에서 미적분은 어떻게 작동하는가? 미적분은 신경망 학습의 핵심 메커니즘인 역전파(backpropagation)를 이해하는 데 필요합니다. 겁먹을 필요는 없습니다. AI 개발에서 실제로 필요한 미적분 개념은 크게 두 가지입니다. 1. 편미분과 기울기(gradient) 손실 함수는 모델의 가중치를 변수로 가지는 다변수 함수입니다. 학습이란 이 함수의 값을 줄이는 방향으로 가중치를 조금씩 조정하는 과정입니다. 이 '방향'을 계산하는 도구가 편미분이고, 모든 가중치에 대한 편미분을 모아놓은 것이 기울기(gradient)입니다. 경사하강법(gradient descent)은 이 기울기의 반대 방향으로 가중치를 업데이트합니다. 수식으로는 다음과 같습니다. 새 가중치 = 기존 가중치 − 학습률(lr) × 기
이종현
2026-07-20 08:28
👁 7
查看原文 →
Dev.to
I built agentglass: mission control for your AI coding agents
I run several AI coding agents at once and never really knew what they were doing — what it cost, which one was stuck, what they just changed. So I built agentglass : real-time mission control and a workspace for AI coding agents, across every provider and every project on your machine. ▶ Live demo (no install) · ⭐ GitHub What it does Point any agent at it — Claude Code hooks or any OpenTelemetry exporter (Codex, Gemini, Bedrock…) — and watch everything move live: 💰 Cost per event / session / model ⏱️ Tool latency (real p50 / p95) 🔴 Error timelines + a "what needs you" alert center 💾 Persists (SQLite) — history's there the moment you open it More than a viewer — a workspace All one keystroke away, same cockpit: 🔬 Diff & review — every Edit/Write, syntax-highlighted 🌿 Source control — lazygit in the browser 🐳 Docker — lazydocker in the browser ▶ Real terminal — an actual PTY shell, not an emulation 💬 Chat — drive local Claude sessions Open source (MIT), local-first Built solo. Small stack: Bun + SQLite, React/Vite, Tauri desktop, a stdlib-only Python hook forwarder. If you run more than one agent at a time, I'd love your feedback 👇 ⭐ https://github.com/SirAllap/agentglass
David PR
2026-07-20 08:22
👁 6
查看原文 →