Blog

  • 反接 DC 頭電源正負極

    反接 DC 頭電源正負極

    德生 PL660 的原裝充電線只能進 220V 電壓,在美期間一直沒有辦法讓它外接 110V 市電(而不使用電池)。之後買來萬能可調電源,卻仍然沒辦法充電。以為官方做了什麼握手加密,覺得很神秘。偶然看到一篇文章:

    https://www.hellocq.net/forum/read.php?tid=371819

    才知道 PL 系列原裝充電器(DC-06)正負極是接反的,用萬用表一測,果然如此。接下來就簡單了。買一根 DC 延長線,中間剪斷,正負反接:

    然後外接電源就成功接通啦~

    好久沒有經歷成功的 EE 小手工了(這幾年修什麼壞什麼),雖然是超小的實踐,活也有點糙,但修好東西的快樂是實在的~

  • A special day

    A special day

    超長的這一天發生了那麼多

    • 最終租下週末的 airbnb, 拒絕 partner 來訪
    • 在老爸老媽和老爸家的多方爭執中保持老爸和老媽堅持離婚的立場
    • 2025 H1B 抽籤第二次失敗,今天開始準備離開波士頓
    • 明確拒絕了一份來自歐洲的工作
  • 20250314-15 Columbus, Ohio

    20250314-15 Columbus, Ohio

    Columbus, 一次從起因到結束都充滿未知和意外的旅程。如果不是 Association for Asian Studies(AAS), 大概很難會旅行到 Ohio 的 Columbus.
    本來自己的 project 並不太支持我去 AAS,幾年前有幾次提過,收到的反饋都是和 project 關係不大,如果去只能是自費。還蠻奇怪,如果去 present, 除了所在的這個 project ,我大概也不太願意 present 其他的內容。但無論如何,因為這個淵源,即使在家邊的 2023 Boston AAS, 也沒有動力去參加。經歷過去年 2024.8 和 2025.2 的一些事後,對於工作的狀態從建設有部分共同認知學術社區,變成:站在 project manager 的角色上,完美做好輸出和發展的規劃。把情緒從工作中抽離出來。並且在工作之外匿名創造:完全由自己的創造力、感性、理性生成的,有生命力的,能和世界更多部分以純粹「就事論事」方式互動的,有反饋的作品。
    今年因為有一個 panel 涉及一些奇妙的「政治張力」,所以項目有限地支持我去 AAS. 於是,三月十四號晚上出發,十五號 present 完,當晚回家。Present 過程很享受。大概因為來去匆忙,不容易陷入怪事情,所以也 enjoy 許多和熟人的見面。不過也 detect 到一些人「政治性」的變化。這樣想來,充滿學術政治博弈的 AAS,未來還是遠離一些比較好。不過反過來,如果不是一個大型學術政治舞台,也不會吸引這麼多人。
    會議期間老爸身體檢查血色素異常低,可能是胃癌,然後一個人去檢查、住院,以及和老媽繼續你死我活就不離婚的爭鬥,以及在他們家族群裡面抱怨死活,幾個姑姑叔叔向我瘋狂打電話,發消息。給整個旅行增加了一條有張力的故事線。
    以及降落波士頓之後,能 track 到行李已經抵達波士頓,但它就是不存在。給機場留了電話,第二天早晨愉快地收到行李快遞。本來為了避免丟行李,一直盡量不托運,但 Delta E175 飛機的隨身行李有限(預計 Delta 2026 年才能完成 E175 所有行李架的擴容),所以被要求免費托運登機箱。下次旅行的時候即使是登機箱,也一定要放一個 apple tag. 這也為旅行增加了段奇妙的故事。
    從二月開始,恢復非工作時間退出微信。確保自己獨處、獨自反思和獨斷創造的時間。在新生活方式下,還蠻享受上述所有這些來自生活的點點滴滴。如果人生目標是成魔而獨立,進而用自己的方式擴張認知,干涉宇宙。那麼這些又算是什麼呢?回來的晚上是 Saint Patrick’s Day,加上是齋月的晚上,整個城市沉浸在節日氛圍裡面。到家~ 叫炸雞~ 開啤酒~ 歡度周末到凌晨四點~ 超開心!
    雖然從出家門到回家,旅行時長大概只有三十一個小時,但仍然抽出兩段時間來 city walk. 那麼接下來就是看圖話說~

    Ohio statehouse

    文藝復興式建築風格的三角楣 pediment 和圓頂 cupola 讓它在 Columbus 的 downtown 裡特別引入注目。非常神奇的是,建築物上有一些十九世紀 Ohio 監獄囚犯的塗鴉。關於這棟建築,這裡有非常詳細的說明:https://www.ohiostatehouse.org/about/capitol-square/statehouse
    臨街的雕像是 William McKinley, Ohio 出生的州长和以及美國第二十五任總統。雕像下方是对 William McKinley 的引用:
    Let us ever remember that our interest is in concord, not in conflict; and that our real eminence rests in the victories of peace, not those of war.
    God will graciously vouchsafe prosperity, happiness and peace to all our neighbors, and like blessings to all the peoples and powers of earth.

    俄司庫鼎


    看到 Ohio National Bank 外面這件青銅器格外親切。按照青銅器的命名,也許會被叫做俄(Ohio state)司庫(bank)無耳雷紋圓底獅面長足鼎。看到它,開始琢磨它的命名方式,是當晚最可樂的事。

    The Dream of the City

    Columbus Commons 前的一段通道。右邊是戲仿葛飾北齋章魚與海女的章魚與城市。這段通道的直觀感受,對我來說,是一條長長的陰道。

    Columbus Union Station Arch

    Columbus 聯合車站拱門。1897 年完工,曾經是有軌電車與火車的交通樞紐与 Ohio 地標。今已經完全廢棄成為公園。

    變壓器與建築遺跡

    在 Nationwide Arena 附近。一開始以為是墓地,走進才發現是建築構件。沒發現和這些建築構建相關的的信息。

    Olentangy river

    Columbus 两条重要的河流之一(另一条是 Scioto river)。特拉華印第安人(Leni Lenape)把它叫做 Keenhongsheconsepung,表示 sharp/more and more/tool river,被解讀為因河邊有大量可以用來磨刀的頁岩(如照片所見)而得名。殖民者根據磨刀石把它直譯成 Whetstone. 1833 年 Ohio 立法希望恢復印第安語水道名的時候,不知道誰說,它叫:Olentangy. 您這麼一說,我這麼一記,得嘞。而實際上叫做 Olentangy 的水道在這張照片的更西邊。今天叫做 Big Darby,並且是 creek 溪流,一條小水道。於是 Olentangy 錯失被正確命名為 Keenhongsheconsepung 的機會。也有可能是當時大家嫌棄 Keenhongsheconsepung 這個詞太長了。

    Scioto river

    Columbus 的最大的水流,是 Ohio 境內最長的水流,也是 Ohio 州徽(Ohio state seal)上水流名字。水面相比 Olentangy 寬得多,岸邊坡道很緩,以前沿河有許多居民區(見河邊的歷史照片),河面上的鐵路橋沿用至今(見照片)。

  • Parassis 上線~

    Parassis 上線~

    經過一個月做做停停,Parassis https://pa.oopus.info 初始版本終於上線啦~~~

    Parassis 是 paragraph assistant 的縮寫。它會使用 LLM 對文本(主要是故事型文本)進行分析,以便閱讀。

    登錄網站的時候需要輸入 LLM token, 暫時用的都是最省錢的模型,效果也不錯。

    輸入 token 之後,可以通過 下圖的(1)按鈕上傳文檔,文檔必須是 markdown 格式。

    在使用上圖(3)或者(4)翻頁的時候,下方 Assistant 區域會自動根據當前文本和前文對文本中自動梳理故事線索。

    (5)是目錄,它會根據 markdown 文件中的 headings(標題)自動生成文本目錄。要注意,跳轉到某頁,或者剛剛上傳文本的之後不會自動觸發任何 AI 功能,如果需要在跳轉和上傳後梳理當前頁的線索,可以使用(2)圖標,手動生成當前頁的線索梳理。

    (6)可以重新打開設置按鈕來選擇其他 LLM,或者改變輸出文本的語言。

    初始設計的時候還有一些其他功能,包括根據特定主題來分析當前頁,與當前頁對話,基於某些原則修改當前頁的內容等等。未來慢慢再加。因為最近想要開一個新 project, 而且和 parassis 有關係。所以就愉快把開發了一半的 parassis 上線吧~ 一方面便於自己使用,以及積累後續開發和修改思路。另一方面,也把開發重心轉向新 project.

    Parassis 項目中大量使用 cline 和 Github copliot來實現功能以及修問題。大大增加開發進度,以及解決問題的效率。會學到很多。在開發後期,用 copliot 協助自定義的細節的頻率遠遠多於初期。在部署到 vercel 的時候,把 vite.config.ts proxy 轉寫成 vercel.json 完全是讓 cline 寫,非常舒適。不過確認要用 vercel.json 解決 vercel proxy 問題還是手動搜索解決方案,cline 並沒有發現這個問題的解決方案。

  • 與一位失業者的對話

    今天和一位七十年代的本科生進行了一次工作談話。對方在美國獲得博士學位,去年自己的公司參加了一起收購案,被收購後,員工被裁員,輸得乾乾淨淨。今年從零開始找工作。

    思考並學到(更確認)的有:

    • 一旦參加博弈,輸了只是自己蠢。不依賴、責怪任何人分享經驗或者建議。
    • 不在不熟悉的情況下僅憑利益做決定。
    • 不要僅憑興趣沉溺在某個領域。
    • 確保足夠的自己的時間思考過去、當下、未來。
    • 命運(已經、並將)決定在自己的手裡,而不是任何人,任何集體,任何國家。
    • 工作的專業性是把活和需求在規定時間內高質量做好。其他一切負面的情緒都是需要解決掉的問題。
    • 時間只有在(無論是憑理性還是憑感性)規劃/衝動下才有。否則,永遠不會有時間。
  • Using mkvtoolnix to extract subtitles from MKV files

    Download mkvtoolnix

    https://mkvtoolnix.download/downloads.html#windows

    Finding your subtitle id

    • Open mkvtoolnix-gui from the mkvtoolnix folder;
    • (See the screenshot below)Add your MKV file to (1). If (2) is .sub or other subtitle format that you are familiar with, you can extract it by clicking Start multiplexing. That’s it! If not, go to (3) and then remember the TRACK_ID

    Extract the subtitle

    • Use command line or terminal tool to get into your mkvtoolnix folder. For me, it is: cd C:\Users\{user}\Downloads\mkvtoolnix
    • Run the following command: (replace it by your own path and the TRACK_ID which is a number that you got from the previous step)
    mkvextract tracks "C:\Users\{your path and file name}.mkv" {TRACK_ID}:"C:\Users\{your path and file name}subtitle.ass"

    After getting the ass file

    You can use any text editing tool to open this .ass file, then you will see all the subtitles. You can also use ffmpeg, ChatGPT or other tools to convert it into .srt file.

  • 【宜言飲酒 20240113】熱帶水果不可以苦 藍色 Putin 勝利

    Buck Buck juice – 左一。來自一間叫做 Zero Gravity 的 Vermont 酒廠。Logo 是一隻紅色拽拽的鹿,讓人不忍不多看它兩眼。這樣拽拽的表情,大概你也能猜出來它是一罐比較烈的酒。作為 Double IPA 一定是苦味的底色,酒精度是 9 度,麥汁比重(OG)15.1°P. 酒罐上寫著:”The tropical, juicy palate is balanced by bold and hoppy aromas.”(熱帶多汁的口感由濃郁而啤酒花香氣平衡)Emmm… 買來的時候就好奇,熱帶水果和 IPA, 而且是 double IPA 的苦味,怎麼能平衡?有家酒評說這款酒:”Bursting with juicy pineapple, zesty citrus, and ripe mango flavors.”(充滿多汁的鳳梨、清新的柑橘和熟透的芒果風味) 從實際的口感來說,在有趣的啤酒花和清新的苦味外,確實有些微妙的氣味,但很難說捕捉到熱帶水果的一絲一毫。IPA 起源於新英格蘭地區,而熱帶水果和這裡八竿子打不著。讚美釀酒師有趣的想象力~ 但 Double IPA 往熱帶水果上調,萌萌噠勉強,也很有趣呢~

  • nextjs SSG + rust web server

    Create components for specific hooks

    If there are some special hooks were used, for example useSearchParams(), wrap it as a component, using suspense to load it. Ex:

    import { Suspense } from 'react';
    import ChatComponent from './ChatComponent';
    
    export default function Page() {
     return (
      <div className="font-sans max-w-3xl mx-auto p-5">
        <h1 className="text-2xl font-bold mb-4 text-center">Yidam Chat</h1>
        <Suspense fallback={<div>Loading chat...</div>}>
         <ChatComponent />
        </Suspense>
      </div>
     );
    }

    Set next.config.ts

    import type { NextConfig } from "next";
    
    const nextConfig: NextConfig = {
     /* config options here */
     reactStrictMode: true,
     output: 'export',
     basePath: '/web',
    };
    
    export default nextConfig;

    Notes

    • Set output: 'export' for npm run build
    • Set basePath: '/web' for the sub-directory of the web root

    Set package.json

     "scripts": {
      "dev": "next dev",
      "build": "next build",
      "start": "next start",
      "lint": "next lint"
     },

    Notes: just keep as it was

    Run command to generate files

    npm run build

    (Optional) Rust web server setting

    use axum::{
      routing::{get, get_service},
      Router,
    };
    
    async fn main() {
      let state = Arc::new(AppState {
        context: Mutex::new(Vec::new()),
      });
    
      let app = Router::new()
      .route("/ws", get(websocket_handler))
      .nest_service("/web", get_service(ServeDir::new("./src/web")))
      .with_state(state);
      const PORT: u16 = 3001;
      // get lan ip
      let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{}", PORT)).await.unwrap();
      println!("Please open http://{}:{}/web", get_local_ip().unwrap(), PORT);
      axum::serve(listener, app).await.unwrap();
    }
  • 有張力的好奇心永不在安全邊界之內

    有張力的好奇心永不在安全邊界之內

    Source: 地。-关于地球的运动-(チ。-地球の運動について-) Ep10 11:11

    忽然意識到,我一定做不了教授或者家長的原因是,終究最感興趣去探索和分享的是最危險和最「暗」的「知」。如果「知」在人類知識和價值觀的邊界之內,那多無聊吖~「知」不正是認知黑暗和不穩定中的「未知」麼

  • Sautoyrs: Erotic literature generation platfrom

    Sautoyrs: Erotic literature generation platfrom

    After one month work, today is the first day that I opened my erotic literature generation platform to the public: https://github.com/sudoghut/Sautoyrs

    It is a web application that generates romantic and explicit sexual stories automatically using a large language model. It creates interactive narratives between two characters with customizable settings. It can only work on Chrome /Firefox on desktop or laptop.

    Sautoyrs came from satyr:

    In Greek mythology, a satyr[a] (Ancient Greek: σάτυρος, romanized: sátyros, pronounced [sátyros]), also known as a silenus[b] or silenos (Ancient Greek: σειληνός, romanized: seilēnós [seːlɛːnós]), and sileni (plural), is a male nature spirit with ears and a tail resembling those of a horse, as well as a permanent, exaggerated erection. Early artistic representations sometimes include horse-like legs, but, by the sixth century BC, they were more often represented with human legs.[4] Comically hideous, they have mane-like hair, bestial faces, and snub noses and they always are shown naked. Satyrs were characterized by their ribaldry and were known as lovers of wine, music, dancing, and women. They were companions of the god Dionysus and were believed to inhabit remote locales, such as woodlands, mountains, and pastures. They often attempted to seduce or rape nymphs and mortal women alike, usually with little success. They are sometimes shown masturbating or engaging in bestiality.

    Since that it can generate conversations automatically, I added auto into satyrs. It became sautoyrs.

    This is the web traffic statistics for the first day. Not as good as I expected:

    Anyway, I have done my best.