What is Hackers' Pub?

Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.

0
1
0
0
0
0
0
1
1
0

修正前:

$ demo
Usage: demo <COMMAND>

Commands:
  add     Add file
  remove  Remove file
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

修正後:
$ demo
error: 'demo' requires a subcommand but one was not provided
  [subcommands: add, remove, help]

Usage: demo <COMMAND>

For more information, try '--help'.

RE:
https://misskey.io/notes/a7ohqhvx8jpb08wi

0
0
1

Rustのclapで必須なサブコマンドのあるコマンドを作るときはarg_required_else_help(false)を書かないと引数なしで実行したときにエラーじゃなくてヘルプが表示されるの想定外

use std::path::PathBuf;

use clap::{Args, Parser, Subcommand};

#[derive(Debug, Parser)]
#[command(version)]
struct Opt {
    #[command(subcommand)]
    command: Command,
}

#[derive(Debug, Subcommand)]
enum Command {
    /// Add file.
    Add(Add),

    /// Remove file.
    Remove(Remove),
}

#[derive(Args, Debug)]
pub struct Add {
    /// File to add.
    file: Option<PathBuf>,
}

#[derive(Args, Debug)]
pub struct Remove {
    /// File to remove.
    file: Option<PathBuf>,
}

fn main() {
    let opt = Opt::parse();
    println!("{opt:?}");
}
@@ -3,7 +3,7 @@
 use clap::{Args, Parser, Subcommand};
 
 #[derive(Debug, Parser)]
-#[command(version)]
+#[command(version, arg_required_else_help(false))]
 struct Opt {
     #[command(subcommand)]
     command: Command,

0
0
0
0
0
0
0
1
1
1
0
0
0
0

川普介入美國藥價的新聞很可能會變成很諷刺的情況。

畢竟這個事情如果是民主黨做的話,就是「左膠誤國」。

但因為是川普做,我個人預測以前高喊「自由市場」的那一群華人KOL會突然稱讚起介入市場的行為。

0
0
0
1
1

川普介入美國藥價的新聞很可能會變成很諷刺的情況。

畢竟這個事情如果是民主黨做的話,就是「左膠誤國」。

但因為是川普做,我個人預測以前高喊「自由市場」的那一群華人KOL會突然稱讚起介入市場的行為。

0
0
0
0
0

好可怕!我們一定要持續教下一代什麼是民主,什麼是自由!一點都不抽象啊~~~不理解的事情就花點時間去理解,做點功課,不難啊!

摘:『談及民主時,他說民主或自由是很抽象的概念,自己並不真正理解,又自稱是為「沉默的大多數」發聲。』

g0v.social/@voyager/1144940678

MJ (@voyager@g0v.social)

附件: 1 張圖片 //鄧德成在《BBC》調查紀錄片「愛國者的崛起」中表示,在社會每個角落,看看有沒有懷疑可能違反《國安法》的事,「如果有,我們就去警處報案,舉報它」。他更指自己過去已舉報了逾百人,這些人士包括曾經在商場揮動殖民時期的旗幟,或者在麵包店售賣印上示威標誌的蛋糕。// //然而,鄧德成在《BBC》訪問中表示,舉報有嫌疑的人是出於「對香港的熱愛」,指自己對中國的看法是在香港仍為英國殖民地時形成的,「殖民地政策其實並不好,最好的機會總是給英國人,我們本地人並沒有真正的機會」。談及民主時,他說民主或自由是很抽象的概念,自己並不真正理解,又自稱是為「沉默的大多數」發聲。 他續說,香港已經回復平衡和穩定,他沒有再作舉報。街頭示威消失、民主派政黨在立法會不再佔任何席位,反對聲音在香港沉寂下來,他就將目光投向海外,「香港沒有甚麼特別的事情,我們是不是應該探索一下,怎樣可以繼續貢獻社會和我們的國家呢?」 所以,他現時以香港政研會主席的身份,定期在瑞士日內瓦出席聯合國會議,發表中國對香港、人權及其他議題的立場,「對於我這樣的非政治人物來說,這是一個難得的機會」。他甚至在瑞士創辦媒體機構,申請成為註冊記者。//

g0v.social · g0v.social

0
0
0
1
0

臺灣(타이완)에서는 乖乖(괴괴)라는 菓子(과자)를 서버 같은 컴퓨터 옆에 符籍(부적)처럼 두는 風習(풍습)이 있는데요. 乖乖(괴괴)中國語(중국어)로 「말을 잘 듣는다」는 뜻인데다, 草綠色(초록색) 封套(봉투)順航(순항)象徵(상징)한다고 합니다. (그래서 여러 () 封套(봉투) ()에서도 草綠色(초록색) 封套(봉투)效果(효과)가 있다고 여겨집니다.)

그런데 아내가 지난 臺北(타이베이) 出張(출장)에서 乖乖(괴괴)를 한 封紙(봉지) 사 왔더라고요. 그래서 저도 이 인스턴스 hollo.social과 Hackers' Pub이 돌아가는 Mac mini 옆에 두기로 했습니다. 乖乖(괴괴) 封套(봉투)에는 「()乖乖(괴괴)〉,不要當機(불요당기)」(말 잘 듣고, 다운되지 말아라)라고 썼습니다.

乖乖(괴괴)效驗(효험)流通期限(유통 기한)까지 持續(지속)된다고 하는데요, 제가 둔 封紙(봉지)는 2026() 4() 11()까지입니다. 그 때까지 다운이 안 되는지 한 () 지켜보도록 합시다. 🤣

나무 바닥 위에 Mac mini가 놓여 있고, 그 옆에 臺灣 菓子인 草綠色 封套의 乖乖가 놓여 있다. 乖乖에는 「請〈乖乖〉,不要當機」(말 잘 듣고, 다운되지 말아라)라고 써져 있다. 주위에는 흰 토끼 某樣 電球와 파란 꽃이 든 花盆이 있다.
5
1
0
1
0
1
0
0
0
1
0

I announce the release of version 2.77 of , the simple, minimalistic instance server written in C. It just reverts a feature included in previous version; links in posts were also included as attachments, but, while harmless and on spec, it made posts look ugly in some platforms, and what the world doesn't need is more ugly things.

https://comam.es/what-is-snac

If you find useful, please consider buying grunfink a coffee or contributing via LiberaPay.



0

yes. the op mentioned somewhere down only browser is needed. so, RHEL workstation is a great choice combined with firewalld + SELinux. It offers great protection + privacy. Just install Adblocker on FF and your gradma will thank you. this is another way to support opensource. No Recall. No spyware. No Ads. Nothing. It saves elderly from scams reddit.com/r/redhat/comments/1

Is Redhat workstation good for a grandma PC?

I am looking for an install and forget distro for my mother's pc. Is it a good choice to install Rhel with no cost developer account? Rhel is bullet proof for servers, how is it for workstations?
0
0