Searching txt.sour.is

Twts matching #GO
Sort by: Newest, Oldest, Most Relevant
In-reply-to » I have just received the royalties for the last book: 98 euros for the four-month period, about 24 euros a month on average. Not even enough for the gym membership. If you have to keep some knowledge: don't write for money, the paper (or ebook) industry is in a very bad way, the margins for the author are very small and piracy is devastating.

well, that leads to a long conversation.

Piracy is a difficult topic which is very personal, so I won’t say much about it.

On writing books, I’ve tried along with other digital products such as courses and videogames, and I got to confess that it has been hard for me.

If it helps, I think it all reaches our expectations on the activity and the result. If royalties is the expectation, it’s going to be slow. By 5% of royalties, for a rough example, a huge amount of sales will be required to get a decent “wage”, so I’ve understood of doing it by the side of a normal employment although it has been discouraging and a bit sad.

I have reflected about it in Spanish here: https://sembrandojuegos.substack.com/p/sobre-expectativas-al-crear-juegos

⤋ Read More
In-reply-to » I have just received the royalties for the last book: 98 euros for the four-month period, about 24 euros a month on average. Not even enough for the gym membership. If you have to keep some knowledge: don't write for money, the paper (or ebook) industry is in a very bad way, the margins for the author are very small and piracy is devastating.

@prologic@twtxt.net Fully agreed. I’m far more likely to buy such mediums when DRM-free. I never go near Amazon eBooks etc because of their lock-in, and I have a Kobo eReader which needs to have the books side loaded unless directly from the Kobo store. I prefer DRM-free files every time.

⤋ Read More

使用 Go 實現服務端事件推送 SSE
背景–在對內部 CRM 項目進行優化時,我們發現項目中的站內信功能目前採用了 WebSocket 來實現消息推送。然而,對於站內信這種低頻的推送場景來說,維護一個長連接的成本相對較高。WebSocket 通常用於需要實時雙向通信的應用,而我們需要的只是簡單的單向推送。經過考慮,我們決定使用一種更輕量級的技術——Server-Sent Events(SSE)來實現站內信的推送。這種技術不僅可以減 ⌘ Read more

⤋ Read More

使用 Go 進行 SSH 隧道:輕鬆構建安全通道
使用 Go 進行 SSH 隧道:輕鬆構建安全通道 ————————-SSH 隧道常常被用來安全地穿越防火牆、保護數據傳輸以及遠程訪問受限服務。本文將帶你一步步瞭解如何用 Go 語言搭建一個 SSH 隧道,並結合實際案例分享一些個人經驗和最佳實踐,讓你輕鬆上手這一強大工具。 什麼是 SSH 隧道? —————SSH 隧道(SSH Tunnel)是 ⌘ Read more

⤋ Read More

搞懂常見 Go ORM 系列 - Ent 框架詳解
在 Go ORM 開篇中我們將 Go ORM 框架分成了三類🌲 反射型主要通過反射機制將結構體映射到數據庫表上,代表作爲 go-gorm/gorm🌲 代碼生成型通過代碼生成工具預先生成數據模型及查詢構建器,代表作有 ent/ent 和日益流行的 go-gorm/gen🌲 SQL 增強型基於原生 SQL 庫進行封裝和擴展,既保留 SQL 的靈活性,又提供了一系列便捷函數,代表作爲 jmoiron/s ⌘ Read more

⤋ Read More

Go 語言錯誤處理:Panic 與 Error 的抉擇
在 Go 語言的開發實踐中,錯誤處理機制是構建健壯應用程序的核心要素。與其他語言不同,Go 通過顯式的錯誤返回和獨特的 panic/recover 機制形成了獨特的錯誤處理哲學。本文將深入探討 panic 與 error 的本質區別,並通過實際場景分析幫助開發者做出正確的技術選擇。 錯誤處理機制的核心差異———–Error 的顯式傳遞特性Go 語言將 error 定義爲內置接口類型, ⌘ Read more

⤋ Read More

Go 1-25:工具鏈優化與運行時改進
Go 語言自誕生以來,始終保持着穩定的迭代節奏。2025 年 8 月即將發佈的 Go 1.25 版本在工具鏈、運行時、編譯器及標準庫等方面都帶來了值得關注的改進。本文將從實際開發角度出發,詳細解析這些變化的技術細節及其對開發者產生的實際影響。工具鏈增強—–構建系統優化go build命令的-asan選項在 1.25 版本中默認啓用了內存泄漏檢測機制。該功能會在程序退出時自動檢查未釋放的 C ⌘ Read more

⤋ Read More

** Late March Snow **
The forecast predicted snow, but even with that knowledge I held out hope that it wouldn’t. The shade over the window in the bedroom doesn’t close all the way. It always stops short of totally covering the window with about an inch further to go. It is too short. When I woke up this morning there was a flat grey line of light streaming into the room through the gap left by the too short shade. So, I spent some time shoveling this morning. Probably sooner than I ought to have since it’s still coming down. It’s 80ish de … ⌘ Read more

⤋ Read More

Canada Announces Bombshell Break With U.S. Over Trump
,    -

_Stephan: MAGAt monarch Trump is singlehandedly destroying a 200-year-old friendship and working partnership between the United States and Canada. The effect this is going to have on U.S. communities is going to be devastating. Trump is a resentful psychopath and not smart enough to realize that Canada will very quickly find alternative buyers for their raw materials and products, while America will have to fin … ⌘ Read more

⤋ Read More
In-reply-to » DOGE To Rewrite SSA Codebase In 'Months' Longtime Slashdot reader frank_adrian314159 writes: According to an article in Wired, Elon Musk has appointed a team of technologists from DOGE to "rewrite the code that runs the SSA in months." This codebase has over 60 million lines of COBOL and handles record keeping for all American workers and payments for all Social Security recipients. Given that the code has to track the byzantine ... ⌘ Read more

Ehhh yeah, what could go wrong 🤔 😵‍💫

⤋ Read More

Trump is a Threat to the Entire Human Species
John B. Alexander,  Commentator  -  Daily Kos

_Stephan: As MAGAt dictator Trump’s regime continues its coup, although I am beginning to see ordinary Americans turning out in opposition, I still don’t see media or ordinary Americans acknowledging that this devastation of the country’s democracy is disordering the entire world and endangering the matrix of life on Earth, and that it is going to take years to repair this damage. John Al … ⌘ Read more

⤋ Read More

RFK Jr.’s Mass Layoffs: How Many Jobs Top Health Agencies Will Lose
Kristina Fiore,  Director of Enterprise & Investigative Reporting  -  MedPage Today

Stephan: The United States already has the lowest-ranked and most expensive healthcare system in the developed world. Now, as the fascists continue their coup, it is going to get worse. The vast majority of Americans have no idea what good healthcare is actually like.

![](https://www.schwartzreport.net/wp-c … ⌘ Read more

⤋ Read More

NIH Ends Future Funding to Study the Health Effects of Climate Change
Annie Waldman and Sharon Lerner,  Health Car Reporter | Health and Environment Reporter  -  ProPublica

_Stephan: MAGAt Monarch Trump and his regime are very pointedly doing nothing to prepare for climate change. Indeed, they deny it exists as a real alteration in the ecosystems of Earth. So no funding for healthcare to prepare for what is demonstrably happening. It is going to create … ⌘ Read more

⤋ Read More

Go 語言中 Redis 管道的性能潛力
在現代分佈式系統架構中,Redis 憑藉其卓越的性能表現已成爲不可或缺的緩存和數據存儲組件。但在高併發場景下,如何突破網絡 I/O 瓶頸成爲開發者面臨的重要挑戰。本文將深入探討 Go 語言中 Redis 管道的實現原理,並通過詳實的代碼示例展示其性能優化之道。Redis 交互模式的演進之路—————傳統 Redis 客戶端的工作模式遵循 “請求 - 響應” 的同步範式。當執行S ⌘ Read more

⤋ Read More

golang 每日一庫之 base64Captcha
今天要介紹的庫 mojocn/base64Captcha 是一個用於 Go 語言的高效驗證碼生成庫,支持圖片、音頻等多種驗證碼格式,並且可以通過 base64 編碼輸出,方便前端直接使用。該庫廣泛用於 Web 應用、REST API 以及需要身份驗證的系統中,以增強安全性。主要功能——–支持多種驗證碼類型數字驗證碼 (DriverDigit):僅包含數字,適用於一般驗證碼場 ⌘ Read more

⤋ Read More

golang 每日一庫之 go-pinyin
go-pinyin 漢字轉拼音庫今天要介紹的庫是一個拼音庫,這個庫相對比較冷門,但是開發過母嬰類 app 的道友可能知道。go-pinyin 是一個用於將漢字轉換爲拼音的 Golang 庫,提供多種模式,支持帶音調、無音調、首字母提取等功能。該庫適用於拼音搜索、漢字排序、文本轉換等場景。安裝——使用 go get 下載安裝:go get -u github.com/mozillazg/go ⌘ Read more

⤋ Read More

使用 Go 構建 MCP Server
一、MCP 介紹 ———1. 基本介紹 MCP(Model Context Protocol,模型上下文協議)是由 Anthropic 公司(Claude 大模型的創造者)於 2024 年 11 月推出的一種開放標準協議,旨在統一大型語言模型(LLM)與外部數據源和工具之間的通信方式。MCP 的核心目標是解決當前 AI 應用開發中的數據孤島和碎片化集成問題。2. 協議特點 MCP 可以 ⌘ Read more

⤋ Read More
In-reply-to » I think I should try self-hosting some Mastodon thingy again.

@prologic@twtxt.net In all seriousness: Don’t worry, I’m not going to host some Fediverse thingy at the moment, probably never will. 😅

But I do use it quite a lot. Although, I don’t really use it as a social network (as in: following people). I follow some tags like #retrocomputing, which fills my timeline with interesting content. If there was a traditional web forum or mailing list or even a usenet group that covered this topic, I’d use that instead. But that’s all (mostly) dead by now. ☹️

⤋ Read More

WebSockets 在 Go 中的應用:從基礎到實踐
WebSockets 提供了一種強大的雙向通信方式,使客戶端(如 Web 瀏覽器)與服務器能夠實時交換數據。與傳統的 HTTP 請求 - 響應模型不同,WebSockets 允許全雙工通信,即客戶端和服務器可以隨時獨立發送和接收消息。因此,WebSockets 非常適合用於聊天應用、實時數據推送和交互式遊戲等場景。在本篇文章中,我們將使用 Gin 框架和 gorilla/websocket 庫,搭 ⌘ Read more

⤋ Read More

構建可維護的 Go 項目:整潔架構實踐指南
在快速迭代的軟件開發過程中,如何構建長期可維護的代碼庫始終是開發者面臨的重大挑戰。本文將以 Go 語言爲例,深入探討整潔架構(Clean Architecture)的核心思想及其在工程實踐中的具體實現方式。通過系統性分層、接口隔離和依賴管理,我們將展示如何打造具備高可測試性、低耦合度的現代化 Go 項目。 整潔架構的核心設計原則———–整潔架構由 Robert C. Martin 提 ⌘ Read more

⤋ Read More

I now subscribed to most feeds in my Go tt reimplementation that I already followed with the old Python tt. Previously, I just had a few feeds for testing purposes in my new config. While transfering, I “dropped” heaps of feeds that appeared to be inactive.

This might motivate me to actually “finish” the new client, so that it could become my daily driver. No need to use the old software stack any longer. Let’s see how bad this goes.

⤋ Read More

[$] Development statistics for 6.14
By the time that Linus Torvalds released
the 6.14 kernel, 11,003 non-merge changesets had been pulled into the
mainline, making this one of the smallest releases we have seen in some
time. Indeed, one must go back to the 4.0\
release, which happened almost exactly ten years ago, to find a release
with fewer changesets than 6.14. Even so, “small” is relative, and 6.14
contains a lot of significant changes. ⌘ Read more

⤋ Read More

爲什麼 Go 語言的錯誤處理其實設計得很好
Go 的臭名昭著的錯誤處理 [1] 引起了編程語言圈外人士的廣泛關注,常常被認爲是該語言最具爭議的設計決策之一。如果你瀏覽 Github 上任何一個用 Go 編寫的項目,幾乎可以保證你會看到以下代碼行比代碼庫中的其他部分出現得更頻繁:if err != nil {    return err}對於剛接觸這門語言的人來說,這可能顯得多餘且不必要,但 Go 將錯誤視爲一等公民(值)的原因,深深植根於編 ⌘ Read more

⤋ Read More

Go Http 框架性能測評: Fiber vs- Gin vs- Go 標準庫
本內容是對知名性能評測博主 Anton Putra  Fiber vs. Gin vs. Go (stdlib): Performance (Latency - Throughput - Saturation - Availability)[1]: Performance (Latency - Throughput - Saturation - Availability) 內容的翻譯與整理, 有適 ⌘ Read more

⤋ Read More
In-reply-to » When will the flat UI craze end? Can I get my buttons, scrollbars, and toolbars back, please?

@movq@www.uninformativ.de Yeah, most of the graphical applications are actually KDE programs:

  • KMail – e-mail client
  • Okular – PDF viewer
  • Gwenview – image viewer
  • Dolphin – file browser
  • KWallet – password manager (I want to check out pass one day. The most annoying thing is that when I copy a password, it says that the password has been modified and asks me whether I want to save the changes. I never do, because the password is still the same. I don’t get it.)
  • KPatience – card game
  • Kdenlive – video editor
  • Kleopatra – certificate manager

Qt:

  • VLC – video player
  • Psi – Jabber client (I happily used Kopete in the past, but that is not supported anymore or so. I don’t remember.)
  • sqlitebrowser – SQLite browser

Gtk:

  • Firefox – web browser
  • Quod Libet – music player (I should look for a better alternative. Can’t remember why I had to move away from Amarok, was it dead? There was a fork Clementine or so, but I had to drop that for some unknown reason, too.)
  • Audacity – audio editor
  • GIMP – image editor

These are the things that are open right now or that I could think of. Most other stuff I actually do in the terminal.

In the past™, I used the Python KDE4 bindings. That was really nice. I could pass most stuff directly in the constructor and didn’t have to call gazillions of setters improving the experience significantly. If I ever wanted to do GUI programming again, I’d definitely go that route. There are also great Qt bindings for Python if one wanted to avoid the KDE stuff on top. The vast majority I do for myself, though, is either CLI or maybe TUI. A few web shit things, but no GUIs anymore. :-)

⤋ Read More
In-reply-to » When will the flat UI craze end? Can I get my buttons, scrollbars, and toolbars back, please?

@movq@www.uninformativ.de Where can I join your club? Although, most software I use is decentish in that regard.

I just noted today that JetBrains improv^Wcompletely fucked up their new commit dialog. There’s no diff anymore where I would also be able to select which changes to stage. I guess from now on I’m going to exclusively commit from only the shell. No bloody git integration anymore. >:-( This is so useless now, unbelievable.

⤋ Read More

Security updates for Monday
Security updates have been issued by Debian (libxslt, mercurial, and webkit2gtk), Fedora (chromium, dotnet8.0, ffmpeg, jupyterlab, and kitty), Mageia (expat and libxslt), Red Hat (pcs), SUSE (apptainer, chromium, kernel, libarchive, mercurial, python311, radare2, xorg-x11-server, and zvbi), and Ubuntu (golang-github-cli-go-gh-v2 and nltk). ⌘ Read more

⤋ Read More

There Are Four Things You Must Do to Save America
Stephan A. Schwartz,  Editor  -  Schwartzreport

_Stephan: As I was researching stories for today’s SR, I did a podcast with a host named Helen Cowan. She asked me what I thought was going on in the United States, and what I thought ordinary people could do to preserve the nation’s democracy and avoid the country being owned by oligarchs. As I answered her I thought that rather than do the usual four trend stories … ⌘ Read more

⤋ Read More

Trump’s funding ax throws colleges into an existential crisis
Erica Pandey,    -  Axios

_Stephan: The Trumpian authoritarian coup continues, and democracy dissipates; all of this following Hitler’s action list point by point. What stands out for me is how weak the institutional resistance is. Universities are docilely falling to their knees. Law firms are proving equally craven. There is only one way this is going to stop. You – and I mean you – must participate … ⌘ Read more

⤋ Read More
In-reply-to » Hmmm, when I Ctrl+Left to jump a word left, I get 1;5D in my tt2 message text. My TERM is set to rxvt-unicode-256color. In tt, it works just fine. When I change to TERM=xterm-256color, it also works in tt2. I have to read up on that. Maybe even try to capture these sequences and rewrite them.

Well, some time ago I put this in my ~/.Xdefaults:

URxvt.keysym.Control-Up:    \033[1;5A
    URxvt.keysym.Control-Down:  \033[1;5B
URxvt.keysym.Control-Left:  \033[1;5D
    URxvt.keysym.Control-Right: \033[1;5C

Probably to behave more like XTerm and fix a few other issues I had with other programs. But, it turns out, tcell expects the original sequence: https://github.com/gdamore/tcell/blob/main/terminfo/r/rxvt/term.go#L487

Hmm.

⤋ Read More
In-reply-to » my biggest fear of starting to work with servers professionally is realizing that no one uses servers anymore and having to do some cloud bullshit instead

@movq@www.uninformativ.de hahahah i for one hate sleeping and need to be busy 24/7 or else i go insane so server stuff is awesome for my ADHD ass!!!

IaaS does seem kinda interesting to me, i think i could vibe with that more than full on cloud stuff

i hope i can be one of those people who does the barebones stuff bc i am a rare sicko who finds it fun and cloud stuff scares me LMAOOOO

⤋ Read More

What to do in London near the KubeCon + CloudNativeCon Europe 2025 Venue, part one
London’s calling and our local CNCF Ambassadors have answered with some great ideas of things to do close to the KubeCon + CloudNativeCon Europe 2025 venue. Cross the river Since our event is going to be… ⌘ Read more

⤋ Read More

‘Absolute chaos’ at Dept of Agriculture could skyrocket rural grocery prices: report
Brad Reed,  Staff Writer  -  Raw Story

_Stephan: The United States as I predicted is going into recession, and your groceries prices are going to go up. We are at a moment of truth we have not experienced since the Founders created the United States. We are no longer a functioning democracy, and the authoritarian government that now runs the country cares noth … ⌘ Read more

⤋ Read More

US measles outbreak tops 300 cases — what to know about the disease
Emily Cooke,  Staff Writer  -  Live Science

_Stephan: Because of the destruction of the healthcare agencies in the United States by psychopath Trump, his Frankenstein oligarch Musk, and the flying monkeys of DOGE, I predict we are going to see more pandemics. Measles, now above 300 cases, has spread to a number of states beyond Texas – Alaska, California, Florida, Georgia, Kentucky, Maryland … ⌘ Read more

⤋ Read More

10 Non-musical Films with Epic Musical Scenes
Generic conventions exist to signpost the kind of movie we are going to see and ensure we aren’t broadsided with teeny-bopper romance in our body horror or explosions and car chases in our period drama. And yet, plenty of filmmakers find subtle ways to break expectations while maintaining their film’s overarching genre. Only a select […]

The post [10 Non-musical Films with Epic Musical Scenes](https://listverse.com/2025/03/21/10-non-musical … ⌘ Read more

⤋ Read More

從 Shell 到 Go:腳本編寫的優雅進化
你有沒有想過,寫腳本這件事,可能不再需要依賴 Unix Shell 了?別誤會,Shell 確實是個 “魔法工具”,能用一行命令完成許多複雜任務。但如果你是 Go 語言的愛好者,或者正在尋找一種更現代化、更高效的腳本編寫方式,那麼今天這篇文章絕對會讓你眼前一亮!我們將深入探討如何用 Go 語言結合script包,輕鬆實現原本需要 Shell 才能完成的任務。不僅代碼更優雅,還能跨平臺運行,甚至 ⌘ Read more

⤋ Read More

golang 每日一庫之 gopsutil
shirou/gopsutil 是一個用 Go 語言實現的跨平臺系統信息採集庫,其設計靈感來源於 Python 的 psutil。它爲開發者提供了一套統一、簡潔的 API,用於獲取底層操作系統的各項指標數據,如 CPU、內存、磁盤、網絡、主機信息以及進程狀態等。下面我們將從多個方面詳細介紹這個庫的功能、設計特點、使用示例以及應用場景。庫簡介——跨平臺支持 gopsutil ⌘ Read more

⤋ Read More

使用 Golang-OpenCV 獲取攝像頭視頻流: 從原理到實踐
在現代計算機視覺應用中,實時視頻處理是一個重要的功能,例如監控系統、人臉識別、手勢檢測等。而 Go 語言結合 OpenCV 可以高效地實現攝像頭數據的採集和處理。在本篇文章將會簡單的講解,OpenCV 處理視頻流的基本步驟,原理和如何使用 gocv 這個庫來讀取攝像頭畫面。安裝 OpenCV因爲我用的是 mac 電腦所以,我使用 homebrew 進行 opencv 的安裝,其他平臺例如 arch ⌘ Read more

⤋ Read More

Golang 擴展 osquery,讓系統查詢更強大!
在深圳有很多老闆都很奇葩,比如我的前老闆,需求是半夜給的,效果是要早上看到的,我要感謝我的的前老闆,讓我接觸到了聞所未聞的新奇技術。今天要分享的內容是 osquery 這個東西,不知道各位萬能的網友們知不知道。osquery 是一個強大的開源工具,它能讓我們像查詢數據庫一樣獲取操作系統信息。而 osquery-go 則是官方提供的 Golang SDK,可以讓我們擴展 osquery,添加自定義查 ⌘ Read more

⤋ Read More

@movq@www.uninformativ.de I have no doubt that you’re not seeing the images correctly 😀. It’s just that it’s broken when viewing them, in my case, and analyzing the URLs, I’ve seen everything I mentioned.
Regarding the hash, you’re right. I’ll have to investigate what’s going on. I’m having a hard time getting the hash generation to work properly.

⤋ Read More

使用 Go 實現 License 認證
在軟件授權管理中,License 機制可以有效防止未授權使用,確保軟件的合法性。本篇文章將講解如何使用 Go 生成機器碼、創建 License、驗證 License 及防止時間篡改,並提供完整可運行代碼示例,以讓您理解其中的邏輯。License 機制概述在軟件授權體系中,License(許可證)是用於驗證軟件的合法使用權限的一種機制。常見 License 設計包含以下關鍵要素:機器碼:用於唯一標識 ⌘ Read more

⤋ Read More

chromem-go:Go 語言 RAG 應用的高效輕量級向量數據庫
前言在開發 RAG(Retrieval-Augmented Generation)應用時,起初你可能更傾向於選擇一款輕量級的向量數據庫,而非複雜的大型數據庫。例如,在關係型數據庫的選擇上,許多人會更願意使用 SQLite 而不是 PostgreSQL 或 MySQL,以減少額外的配置和維護成本。在 Go 語言中,chromem-go 提供了一種簡潔高效的解決方案——它是一款可嵌入到 Go 程序中的 ⌘ Read more

⤋ 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

⤋ Read More

Trump asks Supreme Court to curb judges’ power to block policies nationwide
Josh Gerstein,  Staff Writer  -  Politico

_Stephan: Trump has taken his authoritarianism to the Supreme Court and I predict we are coming to a moment of truth for the future of the United States. Trump is clearly banking on the corrupt fascists on the Court to rule in his favor, and I understand this thinking. But strangely, I’m not sure it is going to play out as he hopes. I … ⌘ Read more

⤋ Read More

golang 每日一庫之 volatiletech-authboss
Authboss 是一個強大且可擴展的 Go 語言認證(authentication)和授權(authorization)框架,適用於 Web 應用程序。它提供了一套完整的用戶身份驗證方案,包括用戶註冊、登錄、註銷、賬號恢復、密碼重置、OAuth2、雙因素認證(2FA)等功能,使開發者能夠快速構建安全的身份認證系統。核心特性——–模塊化設計 :Authboss 由多個獨立的 ⌘ Read more

⤋ Read More

如何使用 go:linkname 指令訪問 Go 包中的私有函數
在 Go 語言的包設計中,函數和變量通過首字母大小寫來嚴格區分導出(exported)與未導出(unexported)的可見性規則。這種機制是 Go 模塊化設計的基石,但同時也爲底層系統級開發帶來了限制。//go:linkname 指令正是 Go 爲突破這一限制預留的「後門」,它通過編譯器的符號重定向能力,允許開發者直接鏈接任意包的未導出符號——無論是標準庫的私有函數,還是第三方包的隱藏變量。本文 ⌘ Read more

⤋ Read More

Go 語言 TCP 服務構建:原理到工程實踐
在分佈式系統架構中,傳輸層協議扮演着關鍵角色。作爲可靠傳輸的代表,TCP 協議通過三次握手建立連接、滑動窗口流量控制、序列號確認機制等技術,爲上層應用提供了有序且可靠的數據傳輸通道。這種面向連接的協議特性,使其成爲實時通信、文件傳輸、遠程控制等場景的首選方案。Go 語言自誕生之初就將網絡編程能力作爲核心設計目標。其標準庫中完善的 net 包提供了跨平臺的網絡 I/O 接口,結合輕量級線程 goro ⌘ Read more

⤋ Read More

It Isn’t Just Trump. America’s Whole Reputation Is Shot.
David Brooks,  Columnist  -  The New York Times

_Stephan: We are no longer a functioning democracy. We have one party, the MAGAts (formerly Republican) that is openly fascist, and the other, the Democrats, who are led in Congress by spineless individuals who don’t seem to understand what is going on. And all of this is being observed by all the other countries of the world. As David Brooks describes in his column, f … ⌘ Read more

⤋ Read More

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

⤋ Read More

Extreme weather and powerful winds predicted for 100m Americans
,    -  Associated Press

Stephan: Maybe this is getting covered on your local media, but I don’t see much discussion in the national media (this came from A British newspaper). It is, of course, yet another manifestation of the changing climate. Anyway if these storms are headed your way, prepare. This is all just going to get worse and worse.

![](https://www.schwartzreport.net/wp-content/uploa … ⌘ Read more

⤋ Read More

Trump calls his opponents ‘scum’ and lawbreakers in bellicose speech at Justice Department
Irie Sentner and Josh Gerstein,  Staff Writers  -  Politico

_Stephan: Trump is a fascist, and today he went to the Department of Justice he has gutted and turned into his personal law firm and told us it was going to be used by him to get revenge on those who oppose him, and to end freedom of the press so the media will stop saying negative things … ⌘ Read more

⤋ Read More

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

⤋ Read More

golang 每日一庫之 fatih-color
fatih/color 是一個流行的 Go 語言庫,用於在終端中輸出彩色文本和樣式化的內容。由開發者 Fatih Arslan 創建,它簡化了 ANSI 轉義碼的使用,使開發者能夠輕鬆爲 CLI 工具、日誌系統等添加顏色和樣式。特點豐富的顏色和樣式支持 顏色 :支持 16 種基礎前景色(如紅色、綠色)和背景色。 樣式 :支持加粗(bold)、斜體(itali ⌘ Read more

⤋ Read More

用 Go 構建跨平臺桌面應用:Wails 框架的深度實踐指南
在桌面應用開發領域,Electron 等基於 Web 技術的方案長期佔據主導地位,但其資源消耗問題始終是開發者心中的痛點。Go 語言的高效性和簡潔性爲這個問題提供了新的解題思路,而 Wails 框架正是這種思路的具象化體現。Wails 框架的核心價值在於將 Go 的後端能力與現代化前端技術無縫結合。通過內置的 Vite 支持,開發者可以自由選擇 React、Vue 或 Svelte 等前端框架,同 ⌘ Read more

⤋ Read More
In-reply-to » I got a small desk calendar as advertising gift. It shows three months at once. I'm using this thing since the beginning of this year and I have to say that it turned out to be super useful. I'm happily surprised.

@eapl.me@eapl.me @bender@twtxt.net @prologic@twtxt.net Not including a photo was a stupid move, sorry. There you go:

Image

This particular one is 95mm wide and 185mm high. Fairly compact.

I can only use it figure out distances to other dates and to do some basic calendar math. I’m not able to actually schedule anything. But I grew up with a month calendar like you have there where all appointments of the entire family was recorded.

By far most of my paper use is drawing random stuff on scratch paper during meetings. :-D

Image

⤋ Read More

International Push for Consumer Boycott of US Grows
Julia Conley,  Staff Writer  -  Common Dreams

_Stephan: I predict that anti-Americanism is going to become a prominent view of populations throughout the world, and that this new attitude is going to have a disastrous effect on our economy. People throughout the world will make it a point not to buy anything made in America, and other businesses in other countries, particularly China, will see the opportunity created by p … ⌘ Read more

⤋ Read More

Go 語言中的 LangGraph:基於 LangGraphgo 的 AI 任務編排
在 AI 任務編排領域,LangChain 提供了 LangGraph,幫助開發者搭建複雜、多步驟、有狀態的 AI 工作流。但這個庫主要基於 Python,而在 Go 語言生態中,如何實現類似的 AI 任務編排呢?今天,我們來介紹 langgraphgo,一個爲 Golang 量身定製的 AI 任務流管理框架。通 langgraphgo,你可以高效地構建 AI 代碼審計、對話系統、多智能體協作等應 ⌘ Read more

⤋ Read More

golang 每日一庫之 jinzhu-now
jinzhu/now 是一個用於增強 Go 語言時間處理的第三方庫,它基於標準庫 time 進行了擴展,提供了更便捷的時間操作功能,適用於需要頻繁處理時間區間、時區轉換或複雜時間解析的場景。以下是該庫的核心功能和用法詳解:一、核心功能時間區間的便捷計算now 庫提供了快速獲取時間區間(如某分鐘的開始 / 結束、某周的開始 / 結束等)的方法,無需手動計算。例如: import ⌘ Read more

⤋ Read More

Oops, Scientists May Have Miscalculated Our Global Warming Timeline
Darren Orf,  Contributing Writer  -  Popular Mechanics

_Stephan: The latest research, as this report describes, is that climate change is happening faster than has previously been estimated. I have told you repeatedly, and put up two papers of research showing why I keep saying this, that within 15 years humanity is going to go through a civilization-altering crisis. This prediction is based … ⌘ Read more

⤋ Read More

How hard will Trump’s immigration raids hit red states?
Myah Ward,    -  Politico

_Stephan: As this article describes all those farmers and herders, most of whom voted for MAGAts, are now going to face the economic crisis that will come from that decision. For years at our property in rural Tidewater Virginia, my family raised registered purebred Angus cattle, not for meat, but like a dog breeding operation, to improve the herd genetics.  It introduced me to a world I ha … ⌘ Read more

⤋ Read More

gogen:一鍵生成 Go 項目,開發者的效率利器
在 Go 開發中,手動搭建項目結構是不是讓你覺得效率低下?有沒有想過一個工具能一鍵搞定模板生成,像 Rust 的 cargo generate 那樣簡單?我開發的 gogen 就是爲此而生——輕量、靈活,專爲 Go 開發者打造。幾秒鐘內,你就能擁有一個定製化的項目骨架。接下來,讓我帶你看看它有多實用!gogen 是一個 Go 項目生成工具,靈感源自 Rust 的 cargo generate,旨在 ⌘ Read more

⤋ 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.

⤋ Read More

Dow falls by almost 900 points in market rout after Trump says he won’t rule out a recession
John Towfighi and Lucy Bayly,  Reporters  -  CNN

Stephan: I warned you it was going to happen, and two months into this nightmare it is happening. And “king” Trump is admitting the reality. All the men and women who voted for this psychopath I now expect to begin whining because of what is happening to their wellbeing.

![](https://www.schw … ⌘ Read more

⤋ 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

⤋ Read More

如何基於 Go 語言設計一個簡潔優雅的分佈式任務系統
在當今雲計算與微服務盛行的時代,分佈式任務系統已成爲支撐大規模業務的核心基礎設施。今天就來爲大家分享下如何基於 Go 語言從零設計和實現一個架構簡潔且擴展性強的分佈式任務系統。前置概念本文會設計並實現一個分佈式任務系統,這裏我們要先明確兩個概念。• 分佈式:在我們將要實現的分佈式任務系統中,分佈式是指我們的服務可以部署多個副本,這樣才能確保服務更加穩定。 • 任務:這裏的任務是指異步任務,可 ⌘ Read more

⤋ Read More

【GoAnalysis】大更新,Go 項目源碼褲衩子被脫光了
前提上週,我發佈了 goanalysis 工具的首個版本,並得到了廣大用戶的積極反饋與支持。隨着關注度的增加,許多用戶表達了對如何有效利用該工具的興趣和疑問。經過深入考量後,我決定對 goanalysis 進行重大升級以更好地滿足用戶需求。本文旨在詳細介紹最新版 goanalysis 的功能特性及其使用方法,並引導大家訪問體驗網站。主要功能包括:運行時性能分析:提供應用程序在實際執行過程中性能指標 ⌘ Read more

⤋ Read More

go-attention:純 Go 語言實現的注意力機制和 Transformer
go-attention[1] 是由 takara.ai[2] 的前沿研究團隊開發的,是第一個純 Go 語言實現的注意力機制和 Transformer 層的庫。它專爲高性能和易用性而設計,目前已開源且經獲得了 291 star。主要特點—-純 Go 實現:無外部依賴,適合邊緣計算和需要依賴管理的場景 完整的注意力機制:包括基本的點積注意力和多頭注意力 完整的 Transformer ⌘ Read more

⤋ Read More

Go-redis:執行 Lua 腳本
go-redis (github.com/redis/go-redis) 支持 Lua 腳本 redis.Script,本文在這裏簡單展示其在秒殺場景中使用的代碼片段。秒殺場景在秒殺場景中,一個商品的庫存對應了兩個信息,分別是總庫存量和已秒殺量。可以使用一個 Hash 類型的鍵值對來保存庫存的這兩個信息,如下所示:key: productid value: {total: N, ordered: ⌘ Read more

⤋ Read More

We had a very sunny day, peaking at 19°C. This not only decoyed me out, but also plenty motorcycle terrorists. Eh fuckwits, nobody wants to listen to your bloody engine and exhaust noise, keep it quiet for fuck’s sake! Many of your rider collegues can manage it, too, so should you.

I had some sore muscles after yesterday’s waste paper collection with the scouts. So, I only went for a short trip to my closest backyard mountain. Watching two rock climbers was interesting. That’s not something I see very often.

Image

https://lyse.isobeef.org/waldspaziergang-2025-03-09/

⤋ Read More
In-reply-to » Dang it! I ran into import cycles with shared test utilities again. :-( Either I have to copy this function to set up an in-memory test storage across packages or I have to put it in the storage package itself and guard it with a build tag that is only used in tests (otherwise I end up with this function in my production binary as well). I don't like any of the alternatives. :-(

Thanks, @xuu@txt.sour.is, great explanation. In another project I’ve structured it exactly like you wrote. The mock storage over there extends the SQLite storage and provides mechanism to return errors and such for testing purposes:

  • storage/ defines the interface
    • sqlite/ implements the storage interface
    • mock/ extends the SQLite implementation by some mocking capabilities and assertions

Here, however, there are no storage subpackages. It’s just storage, that’s it. Everything is in there. The only implementation so far is an SQLite backend that resides in storage. My RAM storage is exactly that SQLite storage, but with :memory: instead a backing file on disk. I do not have a mock storage (yet).

I have to think about it a bit more, but I probably have to do exactly that in my tt rewrite, too. Sigh. I just have the feeling that in storage/sqlite/sqlite_test.go I cannot import storage/mock for the helper because storage/mock/mock.go imports and embeds the type from storage/sqlite. But I’m too tired right now to think clearly.

⤋ Read More

Climate Change Threatens Earth’s Major Crops, Study Finds
Michael Riojas,  Reporter and Editorial Assistant  -  Eco Watch

Stephan: Climate change is going to drastically change agriculture, and that is going to cause enormous migrations both internally and internationally. This will, in turn, massively disrupt nations across Earth. And this crisis is coming very quickly. By 2040 humanity will be in crisis.

![](https://www.schwartzreport.net/wp-content/uploads/2025/0 … ⌘ Read more

⤋ 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

⤋ Read More
In-reply-to » Dang it! I ran into import cycles with shared test utilities again. :-( Either I have to copy this function to set up an in-memory test storage across packages or I have to put it in the storage package itself and guard it with a build tag that is only used in tests (otherwise I end up with this function in my production binary as well). I don't like any of the alternatives. :-(

@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 Storage interface (no tests!)
    • storage/sqlite for the sqlite implementation tests for sqlite directly
    • storage/ram for the ram implementation and tests for RAM 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

⤋ Read More
In-reply-to » Dang it! I ran into import cycles with shared test utilities again. :-( Either I have to copy this function to set up an in-memory test storage across packages or I have to put it in the storage package itself and guard it with a build tag that is only used in tests (otherwise I end up with this function in my production binary as well). I don't like any of the alternatives. :-(

@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 Storage interface (no tests!)
    • storage/sqlite for the sqlite implementation tests for sqlite directly
    • storage/ram for the ram implementation and tests for RAM 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

⤋ Read More

Ontario will tariff electricity going to 3 US states on Monday, premier says
Ashleigh Fields,  Staff Writer  -  The Hill

_Stephan: If you live in Michigan, Minnesota, and New York expect your electric bill to go up significantly, because much of your electricity comes from Canada, and Ontario is now responding to the Trump tariffs. But as bad as that is, I think what criminal Trump is doing is far worse than anyone in media is really talking about. … ⌘ Read more

⤋ Read More

Donald Trump Approval Rating: Update for March 6 as Numbers Slide
,    -  Newsweek

_Stephan: Americans still don’t get it. They still don’t properly understand what “king” Trump, his Frankenstein Musk, and his flying monkeys in Congress are doing to their lives. The U.S. economy is headed for a recession, prices are going up not down, the nation’s reputation in the world is in the garbage; and if you need medical attention, you may not be able to get it, you … ⌘ Read more

⤋ Read More

golang 每日一庫之 gods
在 Go 語言的生態中,數據結構的選擇和實現往往直接影響程序的性能和代碼的可維護性。今天,我們就來聊聊一個備受開發者喜愛的開源項目 gods,它爲我們提供了豐富且易用的數據結構實現,極大地簡化了開發過程中 “造輪子” 的煩惱。項目背景——-gods 是由 Emir Pasic 開發並維護的一個開源庫,旨在爲 Go 語言提供各種常用數據結構和算法的實現。項目採用 MIT 許可證,鼓勵社區貢獻 ⌘ Read more

⤋ Read More
In-reply-to » Dang it! I ran into import cycles with shared test utilities again. :-( Either I have to copy this function to set up an in-memory test storage across packages or I have to put it in the storage package itself and guard it with a build tag that is only used in tests (otherwise I end up with this function in my production binary as well). I don't like any of the alternatives. :-(

@xuu@txt.sour.is My layout looks like this:

  • storage/
    • storage.go: defines a Storage interface
    • sqlite.go: implements the Storage interface
    • sqlite_test.go: originally had a function to set up a test storage to test the SQLite storage implementation itself: newRAMStorage(testing.T, $initialData) *Storage
  • controller/
    • feeds.go: uses a Storage
    • feeds_test.go: here I wanted to reuse the newRAMStorage(…) function

I then tried to relocate the newRAMStorage(…) into a

  • teststorage/
    • storage.go: moved here as NewRAMStorage(…)

so that I could just reuse it from both

  • storage/
    • sqlite_test.go: uses testutils.NewRAMStorage(…)
  • controller/
    • feeds_test.go: uses testutils.NewRamStorage(…)

But that results into an import cycle, because the teststorage package imports storage for storage.Storage and the storage package imports testutils for testutils.NewRAMStorage(…) in its test. I’m just screwed. For now, I duplicated it as newRAMStorage(…) in controller/feeds_test.go.

I could put NewRAMStorage(…) in storage/testutils.go, which could be guarded with //go:build testutils. With go test -tags testutils …, in storage/sqlite_test.go could just use NewRAMStorage(…) directly and similarly in controller/feeds_test.go I could call storage.NewRamStorage(…). But I don’t know if I would consider this really elegant.

The more I think about it, the more appealing it sounds. Because I could then also use other test-related stuff across packages without introducing other dedicated test packages. Build some assertions, converters, types etc. directly into the same package, maybe even make them methods of types.

If I went that route, I might do the opposite with the build tag and make it something like !prod instead of testing. Only when building the final binary, I would have to specify the tag to exclude all the non-prod stuff. Hmmm.

⤋ Read More

Poll on Trump’s 2025 joint address to Congress finds large majority of viewers approve
Anthony Salvanto,  Reporter  -  CBS News

Stephan: The fundamental source of the problems with America is Republican frightened, resentful, ignorant Americans. They are the ones who elected this monster, and they are also the ones who are going to be most severely impacted by his greed, corruption, and madness.

![](https://www.schwartzreport.net/wp-con … ⌘ Read more

⤋ Read More

yaegi:讓你的 Go 代碼擁有動態腳本能力
在 Go 語言的世界裏,靜態編譯是其一大特色,能夠保證性能和安全性。然而,有些場景下,我們希望像 Python 或 JavaScript 一樣,支持運行時動態執行代碼,比如插件化架構、規則引擎、腳本解釋器等。今天,我們來介紹一個強大的 Go 解釋器庫——yaegi,它能讓 Go 代碼在運行時執行動態腳本。yaegi 簡介yaegi 是一個用 Go 語言編寫的 Go 解釋器。它可以在運行時解析和執行 ⌘ Read more

⤋ Read More
In-reply-to » lang=en @xuu gotcha! From that PR #17 I think it was reverted? We could discuss about metadata later this month, as it seems that I'm the only person using it.

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

⤋ Read More
In-reply-to » lang=en @xuu gotcha! From that PR #17 I think it was reverted? We could discuss about metadata later this month, as it seems that I'm the only person using it.

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

⤋ Read More

Tariff War Risks Sinking World Into New Great Depression, International Chamber of Commerce Warns
Joshua Kirby,  Economic Reporter  -  The Wall Street Journal

_Stephan: This is from yesterday’s Murdoch owned The Wall Street Journal, hardly a Democratic or liberal publication. Since I read Project 2025 I have been predicting on SR that the United States is probably going to go into a recession. TWSJ seems to think it may be worse … ⌘ Read more

⤋ Read More

Analysis Finds Trump Tariffs Will Cost Average US Family $1,600 or More Per Year
Jessica Corbett,  Senior Editor  -  Common Dreams

_Stephan: I have seen several estimates on what the Trump MAGAt Party’s impact on the economy is going to cost each American household; this one seems the most fact-based. Maybe $1,600 this year is not that much to you, but to millions of U.S. families it is going to have a serious impact. And after the State of the U … ⌘ Read more

⤋ Read More