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
0
0
0
0
0
0
0
1
0
0
1
0
1
0

https://github.com/makachanm/questionbasket

셀프호스트 1인용 익명 질문함 서비스의 백엔드까지는 전부 짜긴 했지만 프론트엔드를 맡아줄 사람이 없어서 그냥 백엔드 API만 작동하는 정도로 남겨두었다. 언젠간 완성할수도 있지만... 일단은 이정도 완성시킨걸로 만족하기로 하자. Gemini 없었으면 4달 전에 진행하다 버린 프로젝트를 오늘 완성시킬순 없었을거다.

2
0
1
0
0
0
1
0
0

공개 배포 예정이 없는 이유: 솔직히, 솔직히 말해서, 내가 필요로 한다는 이유로 사이버 사제무기를 만든 느낌이긴 합니다. 내가 내 책임으로 쓰는 건 내가 온전히 감당할 수 있지만 남에게 무기를 뿌리고 그 후과를 감당할 순 없음...

0

그러고보니 요새 몇년간 홀로라이브가 대만 이벤트도 개최하면서도 중화풍 의상도 허용하는 거 보면 신기한 기분이 드는데 옛날 홀로라이브는 중국 대만 문제 너무 나이브하게 대처하다 엄청난 일을 겪었던 곳이라.

0
0
0
0
1

Last week trump announced plans to "review" 8 Smithsonian museums. Today he doubled down, very explicit about the intent to revise history to reflect the ethno-nationalist fantasy of US history.

You can do something about that! We are backing up the digital archives of those museums on sciop: sciop.net/tags/smithsonian

You can take direct action to preserve the historical artifacts the right wants to destroy:

1) you can download a copy and seed it, every seeder counts. Subscribe to the smithsonian RSS feed to auto-download torrents as they are scraped.

2) we have also written a crawler connected to sciop that distributes the scraping work, and automatically creates and uploads a validated torrent that piggybacks off the s3 bucket as a webseed source while it lasts (instructions in reply).

The data from the 8 threatened museums is on the order of ~10 TB, and we have split it up by jpg/tif so people without much spare storage can join in on the jpg's at least. The full contents of the public smithsonian bucket is ~700TB, so if we want to have a full independent copy we'll need lots more seeders.

All this code is being written flat out, on the run, as it's needed by volunteers with exactly zero resources, so it's not polished or well documented, and if you're interested in helping damp the flames of the book burning by contributing to any of the code or docs, we'd love to have you.

0
0
0
0
0
1
0

I've recently been working on Optique, a CLI parser combinator for TypeScript. Optique allows you to describe complex CLIs by combining smaller parts. You can also handle the CLI parsing results in a type-safe manner (see code below). The idea came from Haskell's optparse-applicative, but since TypeScript's API style is so different from Haskell's, I referenced Zod and similar libraries for the API design. For a more detailed introduction, please refer to the article I posted on Hackers' Pub!

const parser = or(
  object({
    type: constant("network"),
    host: option(
      "-h", "--host",
      string({ metavar: "HOST" }),
    ),
    port: option(
      "-p", "--port",
      integer({ metavar: "PORT", min: 0, max: 65535 }),
    ),
  }),
  object({
    type: constant("local"),
    file: option(
      "-s", "--socket-file",
      string({ metavar: "FILE" }),
    ),
  }),
)

type Result = InferValue<typeof parser>;

// The above type is inferred as:
type Result = {
    readonly type: "network";
    readonly host: string;
    readonly port: number;
} | {
    readonly type: "local";
    readonly file: string;
}

最近、OptiqueというTypeScript向けのCLIパーサー「コンビネーター」を作っています。Optiqueは、複雑なCLIを小さなパーツの組み合わせで記述できる様にしてくれます。そして、そのCLIのパース結果を型安全に扱う事が出来ます。(下記のコード参照)アイデアはHaskellのoptparse-applicative から得ましたが、TypeScriptはHaskellとAPIのスタイルがかなり異なる為、APIの面ではZod等を参考にしました。詳しい紹介はHackers' Pubに投稿した記事をご覧ください!

const parser = or(
  object({
    type: constant("network"),
    host: option(
      "-h", "--host",
      string({ metavar: "HOST" }),
    ),
    port: option(
      "-p", "--port",
      integer({ metavar: "PORT", min: 0, max: 65535 }),
    ),
  }),
  object({
    type: constant("local"),
    file: option(
      "-s", "--socket-file",
      string({ metavar: "FILE" }),
    ),
  }),
)

type Result = InferValue<typeof parser>;

// Resultの推論された型
type Result = {
    readonly type: "network";
    readonly host: string;
    readonly port: number;
} | {
    readonly type: "local";
    readonly file: string;
}
0
0
0

당분간 혼자 가지고 놀 장난감 완성. 타임라인의 포스트에서 클릭 한번에 해당 계정을 공식 모더레이션에 성적 콘텐츠로 신고하고 동시에 내 검토리스트에 집어넣는 스크립트를 실행시킵니다. 피드로 가끔 흘러들어오는 불량계정에 써먹을 생각이고, 공개 배포 예정은 현재 없습니다.

0
0
0
0
1
3
3

저는 일과는 별개로 두통과 함께하는 사람들라는 두통 환자 단체를 만들고 있는데요. 9월 말에 있는 편두통 인식 주간(Migraine Awareness Week)를 맞아서 여러 가지를 준비하고 있습니다. 이번에 편두통 환자나 가족, 보호자를 대상으로 편두통으로 있었던 에피소드를 공유하는 수기 공모전을 진행하게 되었습니다. 수기 공모전은 9월 7일까지 카페에 글을 쓰고 신청할 수 있는데요. 상품 등도 같이 준비하였습니다. 주변에 널리 공유해주시고 관심 부탁드리겠습니다.

트위터인스타그램도 있으니 많은 팔로우 부탁드립니다.

편두통 수기 공모전 포스터 이미지보도자료 올라온 이미지
6
0
0

열심히 고생하면서... 준비하고 있습니다... 주변에 공유랑 SNS 팔로우 좀 부탁드릴게요!! + 편두통 환자나 가족이라면 참여해주세요! 상품도 넉넉히 준비했습니다.

hackers.pub/@nebuleto/0198cc8e

0
0
0
0
0
0