golang 每日一庫之 gopsutil
shirou/gopsutil 是一個用 Go 語言實現的跨平臺系統信息採集庫,其設計靈感來源於 Python 的 psutil。它爲開發者提供了一套統一、簡潔的 API,用於獲取底層操作系統的各項指標數據,如 CPU、內存、磁盤、網絡、主機信息以及進程狀態等。下面我們將從多個方面詳細介紹這個庫的功能、設計特點、使用示例以及應用場景。庫簡介——跨平臺支持 gopsutil ⌘ Read more
使用 Golang-OpenCV 獲取攝像頭視頻流: 從原理到實踐
在現代計算機視覺應用中,實時視頻處理是一個重要的功能,例如監控系統、人臉識別、手勢檢測等。而 Go 語言結合 OpenCV 可以高效地實現攝像頭數據的採集和處理。在本篇文章將會簡單的講解,OpenCV 處理視頻流的基本步驟,原理和如何使用 gocv 這個庫來讀取攝像頭畫面。安裝 OpenCV因爲我用的是 mac 電腦所以,我使用 homebrew 進行 opencv 的安裝,其他平臺例如 arch ⌘ Read more
Golang 擴展 osquery,讓系統查詢更強大!
在深圳有很多老闆都很奇葩,比如我的前老闆,需求是半夜給的,效果是要早上看到的,我要感謝我的的前老闆,讓我接觸到了聞所未聞的新奇技術。今天要分享的內容是 osquery 這個東西,不知道各位萬能的網友們知不知道。osquery 是一個強大的開源工具,它能讓我們像查詢數據庫一樣獲取操作系統信息。而 osquery-go 則是官方提供的 Golang SDK,可以讓我們擴展 osquery,添加自定義查 ⌘ Read more
Java 24 released
Oracle, the company owned by a guy who purchased a huge chunk of the Kingdom of Hawaii from the Americans, has released Java 24. I’ll be honest and upfront: I just don’t care very much at all about this, as the only interaction I’ve had with Java over the past, I don’t know, 15 years or so, is either because of Minecraft, or because of my obsession with ancient UNIX workstations where Java programs pop up in the weirdest of places. I know Java is massive and used everywhere, but going through the … ⌘ Read more
使用 Go 實現 License 認證
在軟件授權管理中,License 機制可以有效防止未授權使用,確保軟件的合法性。本篇文章將講解如何使用 Go 生成機器碼、創建 License、驗證 License 及防止時間篡改,並提供完整可運行代碼示例,以讓您理解其中的邏輯。License 機制概述在軟件授權體系中,License(許可證)是用於驗證軟件的合法使用權限的一種機制。常見 License 設計包含以下關鍵要素:機器碼:用於唯一標識 ⌘ Read more
chromem-go:Go 語言 RAG 應用的高效輕量級向量數據庫
前言在開發 RAG(Retrieval-Augmented Generation)應用時,起初你可能更傾向於選擇一款輕量級的向量數據庫,而非複雜的大型數據庫。例如,在關係型數據庫的選擇上,許多人會更願意使用 SQLite 而不是 PostgreSQL 或 MySQL,以減少額外的配置和維護成本。在 Go 語言中,chromem-go 提供了一種簡潔高效的解決方案——它是一款可嵌入到 Go 程序中的 ⌘ Read more
** A day off **
I didn’t go to work today. Six month ago I took the day off when I made my kids a dentist appointment. So, this morning I took them to the dentist where we played Mario Kart in the waiting room on the Nintendo the dentist keeps set up there.
After that, I dropped them each at school and picked up my dad and took him to Costco and to the Chinese takeaway place. While he gossiped with the folks at the takeaway I started Sally Rooney’s Normal People. I’m late to this book, but enjoying it right away.
After all th … ⌘ Read more
@lyse@lyse.isobeef.org interesting! yeah i figured it was some parsing stuff going on
Found this girl in the undercarriage of my car just over a year ago. How it started and how its going: ⌘ Read more
golang 每日一庫之 volatiletech-authboss
Authboss 是一個強大且可擴展的 Go 語言認證(authentication)和授權(authorization)框架,適用於 Web 應用程序。它提供了一套完整的用戶身份驗證方案,包括用戶註冊、登錄、註銷、賬號恢復、密碼重置、OAuth2、雙因素認證(2FA)等功能,使開發者能夠快速構建安全的身份認證系統。核心特性——–模塊化設計 :Authboss 由多個獨立的 ⌘ Read more
如何使用 go:linkname 指令訪問 Go 包中的私有函數
在 Go 語言的包設計中,函數和變量通過首字母大小寫來嚴格區分導出(exported)與未導出(unexported)的可見性規則。這種機制是 Go 模塊化設計的基石,但同時也爲底層系統級開發帶來了限制。//go:linkname 指令正是 Go 爲突破這一限制預留的「後門」,它通過編譯器的符號重定向能力,允許開發者直接鏈接任意包的未導出符號——無論是標準庫的私有函數,還是第三方包的隱藏變量。本文 ⌘ Read more
Go 語言 TCP 服務構建:原理到工程實踐
在分佈式系統架構中,傳輸層協議扮演着關鍵角色。作爲可靠傳輸的代表,TCP 協議通過三次握手建立連接、滑動窗口流量控制、序列號確認機制等技術,爲上層應用提供了有序且可靠的數據傳輸通道。這種面向連接的協議特性,使其成爲實時通信、文件傳輸、遠程控制等場景的首選方案。Go 語言自誕生之初就將網絡編程能力作爲核心設計目標。其標準庫中完善的 net 包提供了跨平臺的網絡 I/O 接口,結合輕量級線程 goro ⌘ Read more
So annoying to carry all this heavy stuff around, maybe I should go for a Bass Ukulele. 🤣
More pro for the DEC Professional 380 (featuring PRO/VENIX)
Settle down children, it’s time for another great article by Cameron Kaiser. This time, they’re going to tell us about the DEC Professional 380 running PRO/VENIX. The Pro 380 upgraded to the beefier J-11 (“Jaws”) CPU from the PDP-11/73, running two to three times faster than the 325 and 350. It had faster RAM and came with more of it, and boasted quicker graphics with double the vertical resolution built right into … ⌘ Read more
@kat@yarn.girlonthemoon.xyz Oh, yes, it’s probably going to be something like gotosocial or snac. It’s got to be as lightweight as possible. (I call this whole thing “Mastodon”, but you’re right, that’s not quite correct. 😅)
Ten Movies Overshadowed by Behind-the-Scenes Controversies
The job of Hollywood is to present us with an immaculately presented fantasy with beautiful people and big money. That’s why we can’t look away when things go wrong. For these ten movies, things went so wrong behind the scenes that it overshadowed the Hollywood magic; these ten movies had controversies bigger and more memorable […]
The post [Ten Movies Overshadowed by Behind-the-Scenes Controversies](https://listve … ⌘ Read more
i’m going to k-pop-ify the yarn verse. everyone look at miyawaki sakura or i will uh do server magic to make your CPU run worse or something
SQL scares me i tweaked a bash script that pulled from a DB and the bash part was easy even if i was just going off of the code in there that i didn’t write (like i understood it at least) but the SQL parts had me suffering
Who wants to go o the Moon on a plasma rocket? 🌕 It’ll only take 3 weeks ⌘ Read more
golang 每日一庫之 fatih-color
fatih/color 是一個流行的 Go 語言庫,用於在終端中輸出彩色文本和樣式化的內容。由開發者 Fatih Arslan 創建,它簡化了 ANSI 轉義碼的使用,使開發者能夠輕鬆爲 CLI 工具、日誌系統等添加顏色和樣式。特點豐富的顏色和樣式支持 顏色 :支持 16 種基礎前景色(如紅色、綠色)和背景色。 樣式 :支持加粗(bold)、斜體(itali ⌘ Read more
用 Go 構建跨平臺桌面應用:Wails 框架的深度實踐指南
在桌面應用開發領域,Electron 等基於 Web 技術的方案長期佔據主導地位,但其資源消耗問題始終是開發者心中的痛點。Go 語言的高效性和簡潔性爲這個問題提供了新的解題思路,而 Wails 框架正是這種思路的具象化體現。Wails 框架的核心價值在於將 Go 的後端能力與現代化前端技術無縫結合。通過內置的 Vite 支持,開發者可以自由選擇 React、Vue 或 Svelte 等前端框架,同 ⌘ Read more
Pokemon Go, the Surveillance Game Financed by the CIA, now Owned by Saudi Arabia
Pokemon Go has been 3D mapping your homes for years, and now it is owned by the Wife-Beating, Jeff Bezos Hacking, Journalist Murdering Crown Prince of Saudi Arabia. ⌘ Read more
Go 語言中的 LangGraph:基於 LangGraphgo 的 AI 任務編排
在 AI 任務編排領域,LangChain 提供了 LangGraph,幫助開發者搭建複雜、多步驟、有狀態的 AI 工作流。但這個庫主要基於 Python,而在 Go 語言生態中,如何實現類似的 AI 任務編排呢?今天,我們來介紹 langgraphgo,一個爲 Golang 量身定製的 AI 任務流管理框架。通 langgraphgo,你可以高效地構建 AI 代碼審計、對話系統、多智能體協作等應 ⌘ Read more
golang 每日一庫之 jinzhu-now
jinzhu/now 是一個用於增強 Go 語言時間處理的第三方庫,它基於標準庫 time 進行了擴展,提供了更便捷的時間操作功能,適用於需要頻繁處理時間區間、時區轉換或複雜時間解析的場景。以下是該庫的核心功能和用法詳解:一、核心功能時間區間的便捷計算now 庫提供了快速獲取時間區間(如某分鐘的開始 / 結束、某周的開始 / 結束等)的方法,無需手動計算。例如: import ⌘ Read more
Ubuntu to replace classic coreutils and more with new Rust-based alternatives
After so much terrible tech politics news, let’s focus on some nice, easy-going Linux news that’s not going to be controversial at all: Ubuntu intends to replace numerous core Linux utilities with newer Rust replacements, starting with the ubiquitous GNU Coreutils. This package provides utilities which have become synonymous with Linux to many – the likes of ls, cp, and mv. In … ⌘ Read more
gogen:一鍵生成 Go 項目,開發者的效率利器
在 Go 開發中,手動搭建項目結構是不是讓你覺得效率低下?有沒有想過一個工具能一鍵搞定模板生成,像 Rust 的 cargo generate 那樣簡單?我開發的 gogen 就是爲此而生——輕量、靈活,專爲 Go 開發者打造。幾秒鐘內,你就能擁有一個定製化的項目骨架。接下來,讓我帶你看看它有多實用!gogen 是一個 Go 項目生成工具,靈感源自 Rust 的 cargo generate,旨在 ⌘ Read more
No matter the size a cat is going to cat. ⌘ Read more
Notes from setting up GlobalTalk using QEMU on Ubuntu
I signed up for GlobalTalk in 2024, but never found the time to get a machine set up. Fast-forward to MARCHintosh 2025 and I wasn’t going to let another year go by. This is a series of notes from my experience getting System 7.6 up and running on QEMU 68k on Ubuntu. Hopefully this will help others that might be hitting a roadblock. I certainly hit several! ↫ Cale Mooth A short and to-the-point guide for those of us who want … ⌘ Read more
twtxt is a decentralised, minimalist microblogging service for hackers.
The keyword here is microblogging. But it doesn’t feel like we’ve been (relatively speaking) doing much of that lately… maybe I go the concept of microblogging wrong.
(#sz6bhma) @kat@kat Arw you running make build or go build?
@kat @yarn.girlonthemoon.xyz Arw you running make build or go build? ⌘ Read more
golang 每日一庫之 bluele-gcache
bluele/gcache 是一個 高性能、功能豐富的 Go 語言緩存庫,支持多種緩存策略,如 LRU(最近最少使用)、LFU(最少使用頻率)、ARC(自適應緩存替換)等,可以靈活選擇適合的緩存模式。1. 安裝———使用 go get 下載安裝:go get github.com/bluele/gcache然後在代碼中導入:import ”github.com/bluele/gcach ⌘ Read more
如何基於 Go 語言設計一個簡潔優雅的分佈式任務系統
在當今雲計算與微服務盛行的時代,分佈式任務系統已成爲支撐大規模業務的核心基礎設施。今天就來爲大家分享下如何基於 Go 語言從零設計和實現一個架構簡潔且擴展性強的分佈式任務系統。前置概念本文會設計並實現一個分佈式任務系統,這裏我們要先明確兩個概念。• 分佈式:在我們將要實現的分佈式任務系統中,分佈式是指我們的服務可以部署多個副本,這樣才能確保服務更加穩定。 • 任務:這裏的任務是指異步任務,可 ⌘ Read more
【GoAnalysis】大更新,Go 項目源碼褲衩子被脫光了
前提上週,我發佈了 goanalysis 工具的首個版本,並得到了廣大用戶的積極反饋與支持。隨着關注度的增加,許多用戶表達了對如何有效利用該工具的興趣和疑問。經過深入考量後,我決定對 goanalysis 進行重大升級以更好地滿足用戶需求。本文旨在詳細介紹最新版 goanalysis 的功能特性及其使用方法,並引導大家訪問體驗網站。主要功能包括:運行時性能分析:提供應用程序在實際執行過程中性能指標 ⌘ Read more
oh god i have a horrible headache i know it’ll only go away if i sleep but i don’t wanna sleep yet T_T
Go European: Discover European products and services
Article URL: https://www.goeuropean.org/
Comments URL: https://news.ycombinator.com/item?id=43318798
Points: 508
# Comments: 230 ⌘ Read more
go-attention:純 Go 語言實現的注意力機制和 Transformer
go-attention[1] 是由 takara.ai[2] 的前沿研究團隊開發的,是第一個純 Go 語言實現的注意力機制和 Transformer 層的庫。它專爲高性能和易用性而設計,目前已開源且經獲得了 291 star。主要特點—-純 Go 實現:無外部依賴,適合邊緣計算和需要依賴管理的場景 完整的注意力機制:包括基本的點積注意力和多頭注意力 完整的 Transformer ⌘ Read more
Go-redis:執行 Lua 腳本
go-redis (github.com/redis/go-redis) 支持 Lua 腳本 redis.Script,本文在這裏簡單展示其在秒殺場景中使用的代碼片段。秒殺場景在秒殺場景中,一個商品的庫存對應了兩個信息,分別是總庫存量和已秒殺量。可以使用一個 Hash 類型的鍵值對來保存庫存的這兩個信息,如下所示:key: productid value: {total: N, ordered: ⌘ Read more
[ANN] More vitamins for Monero with Carrot - part 2: History
Before I go deeper into technical details regarding important aspects of Carrot with further posts, I present you, as something like an “interlude”, a history of Monero privacy technologies. One aim is to show you how we arrived at the point where we are now with FCMP++ and Carrot.
Link: https://farside.link/libreddit/r/Monero/comments/1j745kf/
u/rbrunner7 (Gith … ⌘ Read more
@lyse@lyse.isobeef.org OK. So how I have worked things like this out is to have the interface in the root package from the implementations. The interface doesn’t need to be tested since it’s just a contract. The implementations don’t need to import storage.Storage
- storage/ defines the
Storageinterface (no tests!)
- storage/sqlite for the sqlite implementation tests for sqlite directly
- storage/ram for the ram implementation and tests for RAM directly
- storage/sqlite for the sqlite implementation tests for sqlite directly
- controller/ can now import both storage and the implementation as needed.
So now I am guessing you wanted the RAM test for testing queries against sqlite and have it return some query response?
For that I usually would register a driver for SQL that emulates sqlite. Then it’s just a matter of passing the connection string to open the registered driver on setup.
https://github.com/glebarez/go-sqlite?tab=readme-ov-file#connection-string-examples
I’m going to do free doodle😻 ⌘ Read more
Microsoft discovers massive malvertising campaign on GitHub
Like the other Chrome skins, Microsoft Edge is also moving to disable Manifest v2 extensions, restricting the effectiveness of ad blockers like uBlock Origin. As an advertising company, Microsoft was obviously never going to do the work to keep Manifest v2 support around in Chrome, so this was inevitable. Blocking ads might be a necessary security practice, but why cry over spilled user data, am I right? Anyway, … ⌘ Read more
golang 每日一庫之 gods
在 Go 語言的生態中,數據結構的選擇和實現往往直接影響程序的性能和代碼的可維護性。今天,我們就來聊聊一個備受開發者喜愛的開源項目 gods,它爲我們提供了豐富且易用的數據結構實現,極大地簡化了開發過程中 “造輪子” 的煩惱。項目背景——-gods 是由 Emir Pasic 開發並維護的一個開源庫,旨在爲 Go 語言提供各種常用數據結構和算法的實現。項目採用 MIT 許可證,鼓勵社區貢獻 ⌘ Read more
Ummm, that toy isn’t going to bounce around on its own. ⌘ Read more
Google, DuckDuckGo massively expand “AI” search results
Clearly, online search isn’t bad enough yet, so Google is intensifying its efforts to continue speedrunning the downfall of Google Search. They’ve announced they’re going to show even more “AI”-generated answers in Search results, to more people. Today, we’re sharing that we’ve launched Gemini 2.0 for AI Overviews in the U.S. to help with harder questions, starting with coding, advanced math and multimodal queries, with mor … ⌘ Read more
yaegi:讓你的 Go 代碼擁有動態腳本能力
在 Go 語言的世界裏,靜態編譯是其一大特色,能夠保證性能和安全性。然而,有些場景下,我們希望像 Python 或 JavaScript 一樣,支持運行時動態執行代碼,比如插件化架構、規則引擎、腳本解釋器等。今天,我們來介紹一個強大的 Go 解釋器庫——yaegi,它能讓 Go 代碼在運行時執行動態腳本。yaegi 簡介yaegi 是一個用 Go 語言編寫的 Go 解釋器。它可以在運行時解析和執行 ⌘ Read more
Pinellas County - 5 miles: 5.03 miles, 00:08:58 average pace, 00:45:03 duration
late run do to work and life. had my daughters field trip this morning which was fun. definitely going to sleep hard tonight.
#running
it seems to be confused with the subject right next to it.. it works better at the end of the twt string.
Yarn won’t display anything. but the parser does add it to the AST in a way that you can parse it out using twt.Attrs().Get("lang")
https://git.mills.io/yarnsocial/go-lextwt/src/branch/main/ast.go#L1270-L1272
https://git.mills.io/yarnsocial/go-types/src/branch/main/twt.go#L473-L478
Go Context 實踐指南:以生產環境問題爲例
背景 Go 語言中的 context(上下文) 對於 Go 程序員來說應該是司空見慣, 很多都會不假思索的將 context 類型入參作爲函數的第一個參數. 最近因爲在生產環境處理過一個和 context 有關的問題, 因此希望可以藉助這個實際問題說說 context 使用上的注意事項. 類似 “context 應該使用參數傳遞不能作爲 struct 成員” 的八股知識不在本文討論範 ⌘ Read more
TwtAttrs
https://git.mills.io/yarnsocial/go-lextwt/pulls/17
Actually it was your old feed on eapl.mx
TwtAttrs
https://git.mills.io/yarnsocial/go-lextwt/pulls/17
Actually it was your old feed on eapl.mx