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

이란혁명수비대의 군용 무기를 동원한 무차별 진압으로 미성년 사망자까지 속출하고 있다는 분석이 나왔습니다. 이란 인권센터 이사는 “8일 밤부터 이슬람혁명수비대가 주도한 학살로 8000명~1만명이 사망했을 가능성이 있다”며 “국제사회에 알려진 건 진실의 1%도 되지 않는다”고 주장했습니다.

이란 인권센터 이사 “1만명 사망 가능성…유례없는 대학...

0
0
1

Holy Shit. "one of ours. all of yours". on a government podium?!?

That's serious fascism stuff. It's the approach taken by the Nazis when Reinhard Heydrich, a prime architect of the holocaust, was assassinated by the resistance.

The assassins were mistakenly believed to be from the town of Lidice in occupied Czechoslovakia. So the Nazi's rounded up all the men and boys and killed them, and sent all the women to concentration camps. wiped the town off the map.

THAT is what's being evoked by that phrase on the puppy killer's podium.


US Homeland Security Secretary Kristi Noem speaks during a press conference in New York. photo by Uki Iwamura/AP

The text on the podium reads:
ONE OF OURS
ALL OF YOURS
0
0
0
0

영국, 음란이미지 생성 AI '그록' 조사…위법시 매출 10% 벌금 가능 n.news.naver.com/mnews/articl... 위법 사항이 적발될 경우 전 세계 연간 매출의 최대 10%가 벌금으로 부과될 수 있다. 초기에는 단순히 옷을 비키니로 바꾸는 수준이었다. 그러나 점차 나치 문양을 그려 넣거나 혈흔을 추가하는 등 악의적이고 모욕적인 이미지 생성이 확대됐다.

영국, 음란이미지 생성 AI '그록' 조사…위법시 매출...

0
0

초무 shared the below article:

Your CLI's completion should know what options you've already typed

洪 民憙 (Hong Minhee) @hongminhee@hackers.pub

Consider Git's -C option:

git -C /path/to/repo checkout <TAB>

When you hit Tab, Git completes branch names from /path/to/repo, not your current directory. The completion is context-aware—it depends on the value of another option.

Most CLI parsers can't do this. They treat each option in isolation, so completion for --branch has no way of knowing the --repo value. You end up with two unpleasant choices: either show completions for all possible branches across all repositories (useless), or give up on completion entirely for these options.

Optique 0.10.0 introduces a dependency system that solves this problem while preserving full type safety.

Static dependencies with or()

Optique already handles certain kinds of dependent options via the or() combinator:

import { flag, object, option, or, string } from "@optique/core";

const outputOptions = or(
  object({
    json: flag("--json"),
    pretty: flag("--pretty"),
  }),
  object({
    csv: flag("--csv"),
    delimiter: option("--delimiter", string()),
  }),
);

TypeScript knows that if json is true, you'll have a pretty field, and if csv is true, you'll have a delimiter field. The parser enforces this at runtime, and shell completion will suggest --pretty only when --json is present.

This works well when the valid combinations are known at definition time. But it can't handle cases where valid values depend on runtime input—like branch names that vary by repository.

Runtime dependencies

Common scenarios include:

  • A deployment CLI where --environment affects which services are available
  • A database tool where --connection affects which tables can be completed
  • A cloud CLI where --project affects which resources are shown

In each case, you can't know the valid values until you know what the user typed for the dependency option. Optique 0.10.0 introduces dependency() and derive() to handle exactly this.

The dependency system

The core idea is simple: mark one option as a dependency source, then create derived parsers that use its value.

import {
  choice,
  dependency,
  message,
  object,
  option,
  string,
} from "@optique/core";

function getRefsFromRepo(repoPath: string): string[] {
  // In real code, this would read from the Git repository
  return ["main", "develop", "feature/login"];
}

// Mark as a dependency source
const repoParser = dependency(string());

// Create a derived parser
const refParser = repoParser.derive({
  metavar: "REF",
  factory: (repoPath) => {
    const refs = getRefsFromRepo(repoPath);
    return choice(refs);
  },
  defaultValue: () => ".",
});

const parser = object({
  repo: option("--repo", repoParser, {
    description: message`Path to the repository`,
  }),
  ref: option("--ref", refParser, {
    description: message`Git reference`,
  }),
});

The factory function is where the dependency gets resolved. It receives the actual value the user provided for --repo and returns a parser that validates against refs from that specific repository.

Under the hood, Optique uses a three-phase parsing strategy:

  1. Parse all options in a first pass, collecting dependency values
  2. Call factory functions with the collected values to create concrete parsers
  3. Re-parse derived options using those dynamically created parsers

This means both validation and completion work correctly—if the user has already typed --repo /some/path, the --ref completion will show refs from that path.

Repository-aware completion with @optique/git

The @optique/git package provides async value parsers that read from Git repositories. Combined with the dependency system, you can build CLIs with repository-aware completion:

import {
  command,
  dependency,
  message,
  object,
  option,
  string,
} from "@optique/core";
import { gitBranch } from "@optique/git";

const repoParser = dependency(string());

const branchParser = repoParser.deriveAsync({
  metavar: "BRANCH",
  factory: (repoPath) => gitBranch({ dir: repoPath }),
  defaultValue: () => ".",
});

const checkout = command(
  "checkout",
  object({
    repo: option("--repo", repoParser, {
      description: message`Path to the repository`,
    }),
    branch: option("--branch", branchParser, {
      description: message`Branch to checkout`,
    }),
  }),
);

Now when you type my-cli checkout --repo /path/to/project --branch <TAB>, the completion will show branches from /path/to/project. The defaultValue of "." means that if --repo isn't specified, it falls back to the current directory.

Multiple dependencies

Sometimes a parser needs values from multiple options. The deriveFrom() function handles this:

import {
  choice,
  dependency,
  deriveFrom,
  message,
  object,
  option,
} from "@optique/core";

function getAvailableServices(env: string, region: string): string[] {
  return [`${env}-api-${region}`, `${env}-web-${region}`];
}

const envParser = dependency(choice(["dev", "staging", "prod"] as const));
const regionParser = dependency(choice(["us-east", "eu-west"] as const));

const serviceParser = deriveFrom({
  dependencies: [envParser, regionParser] as const,
  metavar: "SERVICE",
  factory: (env, region) => {
    const services = getAvailableServices(env, region);
    return choice(services);
  },
  defaultValues: () => ["dev", "us-east"] as const,
});

const parser = object({
  env: option("--env", envParser, {
    description: message`Deployment environment`,
  }),
  region: option("--region", regionParser, {
    description: message`Cloud region`,
  }),
  service: option("--service", serviceParser, {
    description: message`Service to deploy`,
  }),
});

The factory receives values in the same order as the dependency array. If some dependencies aren't provided, Optique uses the defaultValues.

Async support

Real-world dependency resolution often involves I/O—reading from Git repositories, querying APIs, accessing databases. Optique provides async variants for these cases:

import { dependency, string } from "@optique/core";
import { gitBranch } from "@optique/git";

const repoParser = dependency(string());

const branchParser = repoParser.deriveAsync({
  metavar: "BRANCH",
  factory: (repoPath) => gitBranch({ dir: repoPath }),
  defaultValue: () => ".",
});

The @optique/git package uses isomorphic-git under the hood, so gitBranch(), gitTag(), and gitRef() all work in both Node.js and Deno.

There's also deriveSync() for when you need to be explicit about synchronous behavior, and deriveFromAsync() for multiple async dependencies.

Wrapping up

The dependency system lets you build CLIs where options are aware of each other—not just for validation, but for shell completion too. You get type safety throughout: TypeScript knows the relationship between your dependency sources and derived parsers, and invalid combinations are caught at compile time.

This is particularly useful for tools that interact with external systems where the set of valid values isn't known until runtime. Git repositories, cloud providers, databases, container registries—anywhere the completion choices depend on context the user has already provided.

This feature will be available in Optique 0.10.0. To try the pre-release:

deno add jsr:@optique/core@0.10.0-dev.311

Or with npm:

npm install @optique/core@0.10.0-dev.311

See the documentation for more details.

Read more →
5
0
1

96년도부터 리눅스를 사용했던 사람인데
일단, 현재의 리눅스는 개발자 뿐 아니라 일반 사용자들이 충분히 사용할 수 있는 상태라고 봄.

익숙하지 않아서 처음엔 불편하게 느껴지겠지만 CLI없이 GUI상태에서 99.9% 사용가능하고, 스팀 게임도 되고, 웹에서 안될것 거의 없고. 오피스도 웹기반 버전이 있으니 안될거 없고. 한글 입출력문제도 이젠 거의 없음.

다만 문제가, 윈도우는 자잘한 문제가 생겨도 찾아보면 마우스 눌러가며 고치는 방법 다 나오지만, 리눅스는 그게 어려움. 커뮤니티나 AI에게 물어보면 자세히 답 해주지만, 대부분 명령어 기반으로 고치는 방법을 알려주니....

1
0
0
0

독일의 파워레인저 핑크(?)가 백인전용 만남 사이트를 파해쳐보니 백인우월주의·극우·신나치주의자 커뮤니티였다는 걸 알게되어서, 그 사이트들 가입자 신상정보를 다 공개한 다음, 컨퍼런스 발표장에서 사이트들을 실시간으로 날려버린 썰 (유튜브 노말틱 채널) youtu.be/DxLqK00OXec?...

파워레인저 핑크가 등장한 해킹 발표 현장, 그 충격은 ...

0

Google カレンダーを :vivaldi_red: のビルトインカレンダーで見てるけど最近 API の制限に引っかかることが多い気がしている。

Google 側の制限が厳しくなったのか :vivaldi_red: がアクセスしすぎなのか、原因はよくわからないけど

0
0

구글과 애플의 공동 성명 애플과 구글은 다년간의 협력 관계를 체결했으며, 이에 따라 차세대 애플 파운데이션 모델은 구글의 제미니 모델과 클라우드 기술을 기반으로 구축될 예정입니다. 이 모델들은 올해 출시될 더욱 개인화된 시리를 포함한 향후 애플 인텔리전스 기능의 핵심 동력이 될 것입니다.

Joint statement from Google an...

0
0
0
0

96년도부터 리눅스를 사용했던 사람인데
일단, 현재의 리눅스는 개발자 뿐 아니라 일반 사용자들이 충분히 사용할 수 있는 상태라고 봄.

익숙하지 않아서 처음엔 불편하게 느껴지겠지만 CLI없이 GUI상태에서 99.9% 사용가능하고, 스팀 게임도 되고, 웹에서 안될것 거의 없고. 오피스도 웹기반 버전이 있으니 안될거 없고. 한글 입출력문제도 이젠 거의 없음.

다만 문제가, 윈도우는 자잘한 문제가 생겨도 찾아보면 마우스 눌러가며 고치는 방법 다 나오지만, 리눅스는 그게 어려움. 커뮤니티나 AI에게 물어보면 자세히 답 해주지만, 대부분 명령어 기반으로 고치는 방법을 알려주니....

1
0

이번 발표의 핵심은 헬스엑스(HealthEx)와의 파트너십이다. 헬스엑스는 환자가 여러 기관에 흩어진 전자의무기록(Electronic Medical Records, EMRs)을 한곳에서 확인하고, 데이터 접근 권한을 통제하도록 돕는 스타트업이다. 이용자는 헬스엑스(HealthEx) 커넥터(Connector)를 통해 자신의 의료기록을 클로드(Claude)에 연결할 수 있고, 클로드(Claude)는 그 기록을 바탕으로 건강 관련 질문에 답한다.

0
0
0
0
0
1
0

僕はライブはほとんどYouTubeでしか見られないんだけど、やまもとひかるさんがベースだった頃のYOASOBIがだいすきだったんだよなあ。電話のスピーカーじゃ聞こえてこないんだけど←

0
0
0
0
1
0
0
1

RE: mastodon.social/@Silverkey027/

애플이 구글의 인공지능 기술을 사용한다는 건 결국 "우리 AI 못하겠다 외주 줄란다" 선언으로 보임
다시 아이폰의 기본 검색엔진이 구글로 돌아가는 그런 느낌이 들기도 하고...

0

2022년 울산의 정신의료기관 반구대병원 폐쇄병동에서 환자간 살인 사건이 벌어져 지적 장애인 김도진(가명·32)씨가 숨졌습니다. 유족 등을 통해 입수한 사건 당일 병원 CCTV 영상에서는 가해자들의 범행 과정뿐 아니라 병동 내 환자 간의 폭력과 괴롭힘, 병원의 방임이 그대로 드러나고 있습니다.

[단독] 옆 환자 죽이고 하이파이브까지…‘병원 방임’ ...

0
0

혹시 잘 이해가 안가시는 분들 위해서: 1) 화폐가치가 휴지가 되는 루트가 확실하니 뒤로 많이들 금과 은을 사는것. 2) 근데 금과 은은 정부가 나중에 강제로 압류하는 경우가 여러번 있었음 그러니 백금을 대신 백업으로 어느정도 사라는것 다만 백금은 가격변동이 엄청 심하므로 주의해야한다고 합니다 후덜

0
0
0

구글과 애플의 공동 성명

애플과 구글은 다년간의 협력 관계를 체결했으며, 이에 따라 차세대 애플 파운데이션 모델은 구글의 제미니 모델과 클라우드 기술을 기반으로 구축될 예정입니다. 이 모델들은 올해 출시될 더욱 개인화된 시리를 포함한 향후 애플 인텔리전스 기능의 핵심 동력이 될 것입니다.

신중한 검토 끝에 애플은 구글의 인공지능 기술이 애플 파운데이션 모델에 가장 적합한 기반을 제공한다고 판단했으며, 이를 통해 애플 사용자에게 제공될 혁신적인 새로운 경험에 기대를 표합니다. 애플 인텔리전스는 애플 기기와 프라이빗 클라우드 컴퓨팅에서 계속 운영되며, 업계 최고 수준의 애플 프라이버시 기준을 유지할 것입니다. blog.google/company-news/insid

0
0
0

まあ止まらない円安とか失言による中国との(する必要のない)絶望的な関係悪化がもたらす経済的悪影響、裏金構造温存どころか裏金ギーン引き立ててることとかTM文書とか、チンピラ維新の社保逃れとか、報道すべき問題点は山ほどあるのでマスコミがちゃんと仕事せえとしか思わないんだけど、まあせんのやろなあ

0
0
0