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

x.com/i/status/200180418044566

『12月19日金曜日

政府高官が核保有すべきと発言したことに強く抗議します。

3月ニューヨークの国連で開かれた第3回核兵器禁止条約締約国会議に出席をしました。被団協の皆さんが議論を牽引していました。

総理は非核三原則を国是として堅持すると言うべきです。』

核の被害を知らないんだろうなと想像します。被害も知らないし被害によって生まれる悲しみを想像する能力もない。それが核の被害国日本の市民。

0
0
0
0
0
1

Now *this* is an interface to a computer – or, it seems, specifically its printer – with an aesthetic I have not seen before. (At a Warsaw museum of technology.)

I don’t know much yet about vector fonts. Is this some sort of a standard one, or a unique one? The 7 and C are pretty distinctive.

0
0
0
0
0
英國不知道是走火入魔還是太過愚蠢,或者是兩者都是。

英國國安法擴權:開發加密通訊軟體恐被視為「敵對活動」
https://www.techradar.com/vpn/vpn-privacy-security/creating-apps-like-signal-or-whatsapp-could-be-hostile-activity-claims-uk-watchdog
這篇報導與 Hacker News 社群的討論共同揭示了英國國家安全法擴權所引發的嚴重焦慮。法學專家 Jonathan Hall KC 警告,現行法律定義過於廣泛,開發具備端對端加密技術的通訊軟體,如 Signal 或 WhatsApp,極可能被界定為「敵對活動」。這是因為這類技術使安全情報機構更難監測通訊,且在法理上可被解讀為「符合外國利益」。這種傾向將隱私保護技術等同於犯罪協助的邏輯,不僅讓軟體開發者面臨法律風險,甚至連持有機密資訊或揭弊資料的記者也可能納入審查範圍,引發各界對法律越權的強烈批評。

在技術社群的討論中,網友指出政府對加密技術存在根本性的誤解與謬誤。許多人認為將「阻礙監控」視為敵對行為極其荒謬,並以「窗簾」或「牆壁」為喻,認為保護隱私的設施不應被視為犯罪工具。技術專家更進一步抨擊,政府只看到加密技術對執法造成的障礙,卻忽視了它是保護國家金融、基礎建設與個人隱私免於駭客攻擊的關鍵防線。將軟體開發視為敵對活動,就像是因為逃犯會利用街道逃跑,就將修路行為視為犯罪一樣無理,這顯示出立法者與資安實務之間的嚴重脫節。

此外,討論也觸及了更深層的政治與民主危機。許多評論者認為,政府推動《線上安全法》等監控手段,真實目的並非僅是保護兒童或防範犯罪,而是為了防止人民組織起來對抗不受歡迎的政策,確保權力不被挑戰。在現代社會,數位通訊是組織公民運動的核心,政府若能隨時監控與阻斷通訊,將嚴重削弱民主制度中的權力制衡。部分網友也觀察到,這種權威主義傾向並非英國獨有,包含歐盟與澳洲等西方民主國家,似乎都出現了無視憲法保障、擴張監控權力的全球性趨勢。

面對法律壓力,主要科技大廠與資安團體已展現強硬立場。蘋果公司已明確拒絕弱化 iCloud 加密技術,而 Signal 與 WhatsApp 亦重申,若被迫破壞用戶隱私,他們寧願退出英國市場。專家警告,這種敵視加密技術的政策不僅威脅人權,更將摧毀英國作為全球軟體開發與金融服務中心的吸引力。隨著技術專家與立法者之間的鴻溝擴大,未來一年將成為加密通訊軟體在英國乃至全球發展的關鍵轉折點,決定了數位時代下個人隱私與國家安全之間的界線該如何劃分。
https://news.ycombinator.com/item?id=46311355
0
0
1
0
0

읍내의 어떤 글을 보니 웨이모 자율주행택시 비용? 가격?이 생각외로 비싸진 않은것 같음 지금은 그래도 꽤 비싸지만 다음 세대 가격은 특별한 센서가 없는 일반 자동차와 큰 차이가 없어보임. 테슬라의 원대한 꿈(?)은 여전히 진행이 더딘것으로 봐서 역시 웨이모 방식이 맞았던것 아닌가 싶긴함 라이다 안쓰겠다고 비전 온리로 하겠다고 했던 그 많은 삽질들... ㅎㅎ x.com/FredaDuan/st...

0
0
0

X, Vercel, Cursor, Discord 등 수백 개 기업을 공급망 공격으로 침투한 방법
------------------------------
- 16살 고등학생이 *Mintlify 플랫폼의 취약점* 을 이용해 X, Vercel, Cursor, Discord 등 주요 기업의 문서 사이트에서 *교차 사이트 스크립팅(XSS)* 공격이 가능했던 사례를 정리해 공개함. 이 취약점을 통해 버그바운티로 11,000 달러 수령
- Mintlify의 내부 경로
/_mintlify/static/[subdomain]/[...route]가…
------------------------------
https://news.hada.io/topic?id=25177&utm_source=googlechat&utm_medium=bot&utm_campaign=1834

0
0
0
0

x.com/i/status/200180418044566

『12月19日金曜日

政府高官が核保有すべきと発言したことに強く抗議します。

3月ニューヨークの国連で開かれた第3回核兵器禁止条約締約国会議に出席をしました。被団協の皆さんが議論を牽引していました。

総理は非核三原則を国是として堅持すると言うべきです。』

核の被害を知らないんだろうなと想像します。被害も知らないし被害によって生まれる悲しみを想像する能力もない。それが核の被害国日本の市民。

0
0

bgl gwyng shared the below article:

Claude API의 Request Body 분석

자손킴 @jasonkim@hackers.pub

Claude API의 Request는 크게 4가지 분류를 가지고 있다.

  • System Messages
  • Messages
  • Tools
  • Model & Config

각각은 다음과 같은 역할을 한다.

System Messages

System Messages는 Claude에게 역할, 성격, 제약사항 등을 지시하는 최상위 설정이다. 배열 형태로 여러 개의 시스템 메시지를 전달할 수 있다.

"system": [
  {
    "type": "text",
    "text": "You are Claude Code, Anthropic's official CLI for Claude.",
    "cache_control": {
      "type": "ephemeral"
    }
  },
  {
    "type": "text",
    "text": "You are an interactive CLI tool that helps users with software engineering tasks...",
    "cache_control": {
      "type": "ephemeral"
    }
  }
]

System Messages에는 다음과 같은 내용이 포함된다:

  • Claude의 페르소나 및 역할 정의
  • 보안 및 윤리 가이드라인
  • 응답 형식 및 톤 설정
  • 프로젝트 정보 등 컨텍스트
  • cache_control을 통한 캐싱 설정

Messages

Messages는 userassistant 역할이 번갈아가며 주고받은 대화를 누적하는 배열이다. assistant 메시지는 반드시 모델의 실제 응답일 필요가 없다. 이를 활요해 API 호출 시 assistant 메시지를 미리 작성해서 전달하면, Claude는 그 내용 이후부터 이어서 응답한다. 이를 Prefill 기법이라 한다.

이 대화 기록을 통해 Claude는 맥락을 유지하며 응답한다.

"messages": [
  {
    "role": "user",
    "content": [...]
  },
  {
    "role": "assistant",
    "content": [...]
  },
  {
    "role": "user",
    "content": [...]
  }
]

User Message

User의 content는 주로 두 가지 type으로 구성된다:

1. text - 사용자의 일반 메시지나 시스템 리마인더

{
  "role": "user",
  "content": [
    {
      "type": "text",
      "text": "선물을 주고받는 기능을 위한 entity를 설계하라."
    }
  ]
}

2. tool_result - Tool 실행 결과 반환

{
  "role": "user",
  "content": [
    {
      "tool_use_id": "toolu_01Qj7gnFLKWBNjg",
      "type": "tool_result",
      "content": [
        {
          "type": "text",
          "text": "## Entity 구조 탐색 보고서\n\n철저한 탐색을 통해..."
        }
      ]
    }
  ]
}

Assistant Message

Assistant의 content는 주로 세 가지 type으로 구성된다:

1. text - Claude의 응답 메시지

{
  "type": "text",
  "text": "선물 주고받기 기능을 위한 entity 설계를 시작하겠습니다."
}

2. thinking - Extended Thinking 기능 활성화 시 사고 과정 (signature로 검증)

{
  "type": "thinking",
  "thinking": "사용자가 선물을 주고받는 기능을 위한 entity 설계를 요청했습니다...",
  "signature": "EqskYIChgCKknyFYp5cu1zhVOp7kFTJb..."
}

3. tool_use - Tool 호출 요청

{
  "type": "tool_use",
  "id": "toolu_01Qj7gn6vLKCNjg",
  "name": "Task",
  "input": {
    "subagent_type": "Explore",
    "prompt": "이 NestJS TypeScript 프로젝트에서 entity 구조를 탐색해주세요...",
    "description": "Entity 구조 탐색"
  }
}

User와 Assistant의 협력

Tool 사용 흐름은 다음과 같이 진행된다:

  1. Assistant: tool_use로 Tool 호출 요청
  2. User: tool_result로 실행 결과 반환
  3. Assistant: 결과를 바탕으로 text 응답 또는 추가 tool_use

이 과정에서 어떤 Tool을 사용할 수 있는지는 tools 배열이 정의한다.

Tools

Tools는 Claude가 사용할 수 있는 도구들을 정의하는 배열이다. 각 Tool은 name, description, input_schema 세 가지 필드로 구성된다.

Tool의 기본 구조

"tools": [
  {
    "name": "ToolName",
    "description": "Tool에 대한 설명...",
    "input_schema": {
      "type": "object",
      "properties": {...},
      "required": [...],
      "additionalProperties": false,
      "$schema": "http://json-schema.org/draft-07/schema#"
    }
  }
]
필드 설명
name Tool의 고유 식별자. Claude가 tool_use에서 이 이름으로 호출
description Tool의 용도, 사용법, 주의사항 등을 상세히 기술. Claude가 어떤 Tool을 선택할지 판단하는 근거
input_schema JSON Schema 형식으로 입력 파라미터 정의

input_schema 구조

input_schema는 JSON Schema draft-07 스펙을 따르며, Tool 호출 시 필요한 파라미터를 정의한다.

"input_schema": {
  "type": "object",
  "properties": {
    "pattern": {
      "type": "string",
      "description": "The regular expression pattern to search for"
    },
    "path": {
      "type": "string",
      "description": "File or directory to search in. Defaults to current working directory."
    },
    "output_mode": {
      "type": "string",
      "enum": ["content", "files_with_matches", "count"],
      "description": "Output mode: 'content' shows matching lines, 'files_with_matches' shows file paths..."
    },
    "-i": {
      "type": "boolean",
      "description": "Case insensitive search"
    },
    "head_limit": {
      "type": "number",
      "description": "Limit output to first N lines/entries"
    }
  },
  "required": ["pattern"],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

properties 내 각 파라미터 정의

각 파라미터는 다음 필드들로 정의된다:

필드 설명
type 데이터 타입 (string, number, boolean, array, object 등)
description 파라미터의 용도와 사용법 설명
enum (선택) 허용되는 값의 목록. 이 중 하나만 선택 가능
default (선택) 기본값

input_schema의 메타 필드

필드 설명
type 항상 "object"
properties 파라미터 정의 객체
required 필수 파라미터 이름 배열. 여기 포함되지 않은 파라미터는 선택적
additionalProperties false면 정의되지 않은 파라미터 전달 불가
$schema JSON Schema 버전 명시

실제 예시: Grep Tool

{
  "name": "Grep",
  "description": "A powerful search tool built on ripgrep\n\n  Usage:\n  - ALWAYS use Grep for search tasks...",
  "input_schema": {
    "type": "object",
    "properties": {
      "pattern": {
        "type": "string",
        "description": "The regular expression pattern to search for in file contents"
      },
      "path": {
        "type": "string",
        "description": "File or directory to search in (rg PATH). Defaults to current working directory."
      },
      "glob": {
        "type": "string",
        "description": "Glob pattern to filter files (e.g. \"*.js\", \"*.{ts,tsx}\")"
      },
      "output_mode": {
        "type": "string",
        "enum": ["content", "files_with_matches", "count"],
        "description": "Output mode. Defaults to 'files_with_matches'."
      },
      "-A": {
        "type": "number",
        "description": "Number of lines to show after each match"
      },
      "-B": {
        "type": "number",
        "description": "Number of lines to show before each match"
      },
      "-i": {
        "type": "boolean",
        "description": "Case insensitive search"
      },
      "multiline": {
        "type": "boolean",
        "description": "Enable multiline mode. Default: false."
      }
    },
    "required": ["pattern"],
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-07/schema#"
  }
}

이 Tool을 Claude가 호출할 때의 tool_use:

{
  "type": "tool_use",
  "id": "toolu_01ABC123",
  "name": "Grep",
  "input": {
    "pattern": "class.*Entity",
    "path": "src/modules",
    "glob": "*.ts",
    "output_mode": "content",
    "-i": true
  }
}

requiredpattern만 있으므로 나머지는 선택적이다. Claude는 input_schemadescription을 참고하여 적절한 파라미터를 선택한다.

Model & Config

마지막으로 모델 선택과 각종 설정 옵션들이다:

{
  "model": "claude-opus-4-5-20251101",
  "max_tokens": 32000,
  "thinking": {
    "budget_tokens": 31999,
    "type": "enabled"
  },
  "stream": true,
  "metadata": {
    "user_id": "user_2f2ce5dbb94ac27c8da0d0b28dddf815fc82be54e0..."
  }
}
옵션 설명
model 사용할 Claude 모델 (claude-opus-4-5, claude-sonnet-4-5 등)
max_tokens 최대 출력 토큰 수
thinking Extended Thinking 설정 (budget_tokens로 사고 토큰 예산 설정)
stream 스트리밍 응답 여부
metadata 사용자 ID 등 메타데이터

마치며

지금까지 Claude API Request Body의 4가지 핵심 구성 요소를 살펴보았다:

  1. System Messages: Claude의 역할과 행동 방식을 정의
  2. Messages: user-assistant 간 대화 기록을 누적하며, tool_use/tool_result를 통해 Tool과 상호작용
  3. Tools: JSON Schema 기반으로 사용 가능한 도구의 이름, 설명, 입력 파라미터를 정의
  4. Model & Config: 모델 선택, 토큰 제한, 스트리밍 등 설정

이 구조를 알면 Claude가 주고받은 메시지를 어떻게 관리하는지, 도구를 어떻게 사용하는지 이해하고 API를 더 효과적으로 활용할 수 있다.

Read more →
3
0
0

블루스카이 이주가 안되고 계속 트위터로 돌아가는건, 자본주의 체제에서 지방 소멸같은 느낌임 지방에 사람 없다! → 인프라가 없으니까! → 그럼 사람들 오게 인프라 채워줘! → 사람이 없어서 인프라 세워도 돈이 안돼! → ㅅㅂ 지방 안간다 서울 갈거임 ㅅㄱ ㅃㅇ → 지방에 사람 없다! 블루스카이에 사람 없다! → 공식 계정이 거의 없으니까! → 그럼 사람들 오게 공식 계정 만들어! → 사람이 없어서 공식 계정 만들어도 홍보가 안돼! → ㅅㅂ 블루스카이 안한다 트위터 돌아갈거임 ㅅㄱ ㅃㅇ → 블루스카이에 사람 없다! 무한 반복..

0
0
0
0
0
0
0
0
0
0
0
0
0

아 나만 그런 생각하는것이 아니었군 ㅋㅋㅋ 데이터가 아무리봐도 너무 좋아서 ChatGPT에게 물어봤는데 셧다운 데이터가 빠져있고 하니까 좀 기다려봐라 그런 의견... 아마 민간쪽 회사 데이터가 궁금하긴한데 당자은 아니여도 월마트나 코스트코 혹은 아마존 이런 쪽 어닝이 어떻게 나오는지 봐야...

0

The US TikTok sale has been signed. The company will be controlled by a joint venture including Oracle, Silver Lake, Andreessen Horowitz, Abu Dhabi-based MGX. Adding a UAE company really makes it clear that this was never about national security concerns.

axios.com/2025/12/18/tiktok-sa

0
0
0
0
0
0
0

읍내의 어떤 글을 보니 웨이모 자율주행택시 비용? 가격?이 생각외로 비싸진 않은것 같음 지금은 그래도 꽤 비싸지만 다음 세대 가격은 특별한 센서가 없는 일반 자동차와 큰 차이가 없어보임. 테슬라의 원대한 꿈(?)은 여전히 진행이 더딘것으로 봐서 역시 웨이모 방식이 맞았던것 아닌가 싶긴함 라이다 안쓰겠다고 비전 온리로 하겠다고 했던 그 많은 삽질들... ㅎㅎ x.com/FredaDuan/st...

0

> 나는 여전히 ‘한통속’이란 말이 좋다. 오히려 당신과 내가 한통속이 되지 못해 아쉽다. 마음 놓고 한통속이라 부를 사람이 점점 줄어들어 외롭다. … 좋은 일을 도모하기 위해 머리를 맞대고, 당면한 난관을 함께 뚫고 나가는 이들이야말로 진짜 한통속이다.

나는 이 분이 한겨레의 최고 잼얘 아티스트가 아닐까 그렇게 생각을 해
hani.co.kr/arti/opinion/column

0
1
0