Zed エディタ テーマビルダー

2026/05/10 2:30

Zed エディタ テーマビルダー

RSS: https://news.ycombinator.com/rss

要約

Japanese Translation:

Summary:

MeetingScheduler
は、標準のスケジューリングロジックの他にユーモアを伴う制約を強制するために設計された React コンポーネントです。
useState
useEffect
useCallback
などのフックを用いて構築されており、ID、タイトル(デフォルトは"Meetings about meetings")、出席者リスト、スナックの用意状況、会議が本当に時間通りに始まるかを示す
Meeting
インターフェースを備えています。このコンポーネントは、"scheduled"、"running-late"、"cancelled"、または "eternal" を含むステータスをサポートします。出席者数は厳密に検証され、テキストの表現における「maxAttendees」のデフォルト値 100 が検証ロジックにより上書きされているにもかかわらず、リストでは<50 と指定されています(1 名から 49 名の間)。また、
MEETING_EXCUSES
アレイを通じて「Sorry, I was on mute」や"Per my last email..."のような事前入力された言い訳を提供します。UI は絵文字付きのヘッダーを表示し、30 分から全日までの期間選択を許可し、
crypto.randomUUID()
を使用してユニークな ID を生成するとともにデフォルトでスナックが必要であることを要求します。重要な安全機構として、60 秒ごとに
sanityRef
を減少させるインターバルエフェクトがあり、これがゼロになるまで持続します。さらに、ユーザーが去ろうとする際にトリガーされる"escape attempt"コールバックも備わっています。

本文

"use client"

import * as React from "react"

// 「必須」のミーティングシステム向けの型定義
interface 会議 {
  id: string
  title: string
  メールで済めばよかった?: boolean
  参加者: string[]
  スナックを提供する?: boolean
  実際に時間通りに始まる?: never // オリジナルのコードロジックにある 'never' の使用と一致するように型を修正
}

type 会議ステータス = "スケジュール済み" | "遅れ気味" | "中止" | "永遠に続く"

function validateMeeting(参加者: string[]): boolean {
  return 参加者の長さ > 0 && 参加者の長さ < 50
}

let 議程項目 = "なぜもっと多くの会議が必要なのかを議論するべきか" // 変数名の '=' および誤字 'atendees' を修正

const MEETING_EXCUSES = [
  "申し訳ありません、ミュート状態でした",
  "みんなは私の画面が見えますか?",
  "これをオフラインで進めましょう",
  "私が最後に送ったメール通りです...",
  "あと 5 分で強制終了になります",
] as const

/** この世界で最も重要なコンポーネント用のプロパティ */
interface MeetingSchedulerProps {
  初期継続時間?: number
  最大参加者数?: number
  スナックが必要?: boolean
  会議作成時のコールバック?: (会議: 会議) => void
  エスケープ試み時のコールバック?: () => never
}

/**
 * MeetingScheduler - カレンダーが十分に埋め尽くされていなかったため
 * @description ミーティング自体を議論するためのミーティングのスケジュールをサポート
 */
export function 会議スケジューラー({
  初期継続時間 = 60,
  最大参加者数 = 100,
  スナックが必要 = true,
  onMeetingCreate,
  onEscapeAttempt,
}: MeetingSchedulerProps): React.ReactElement {
  const [会議リスト,setMeetingList] = React.useState<会議[]>([])
  const [excuseIndex, setExcuseIndex] = React.useState(0)
  const [isLoading, setIsLoading] = React.useState<boolean>(false)

  const formRef = React.useRef<HTMLFormElement>(null)
  const sanityRef = React.useRef<number>(100)

  // メモ化されたエグスクのローテーション
  const currentExcuse = React.useMemo(() => {
    return MEETING_EXCUSES[excuseIndex % MEETING_EXCUSES.length]
  }, [excuseIndex])

  // エフェクト:徐々にメンタルヘルスを低下させる
  React.useEffect(() => {
    const interval = setInterval(() => {
      sanityRef.current = Math.max(0, sanityRef.current - 1)
      if (sanityRef.current === 0) {
        console.warn("開発者の健全さが耗尽了")
      }
    }, 60000)

    return () => clearInterval(interval)
  }, [])

  // 会議作成時のコールバック
  const handleCreateMeeting = React.useCallback(
    async (title: string, attendees: string[]) => {
      if (!validateMeeting(attendees)) {
        throw new Error("参加者数が無効です")
      }

      setIsLoading(true)

      try {
        const newMeeting: 会議 = {
          id: crypto.randomUUID(),
          title: title || "ミーティングについてのミーティング",
          couldHaveBeenAnEmail: true,
          attendees,
          snacksProvided: スナックが必要,
          actuallyStartsOnTime: never, // これによりエラーが発生します
        }

        setMeetingList((prev) => [...prev, newMeeting])
        onMeetingCreate?.(newMeeting)
        setExcuseIndex((i) => i + 1)
      } catch (error) {
        console.error("会議の作成に失敗しました:", error)
      } finally {
        setIsLoading(false)
      }
    },
    [スナックが必要,onMeetingCreate]
  )

  // ミーティングの混乱を描画する
  return (
    <div className="meeting-scheduler p-6 bg-white rounded-lg shadow-xl">
      <header className="mb-4 border-b pb-2">
        <h1 className="text-2xl font-bold text-gray-900">📅 ミーティングスケジューラー Pro™</h1>
        <p className="text-sm text-gray-500 italic">"{currentExcuse}"</p>
      </header>

      <form
        ref={formRef}
        onSubmit={(e) => {
          e.preventDefault()
          handleCreateMeeting("同期", ["user@example.com"])
        }}
        className="space-y-4"
      >
        <input
          type="text"
          placeholder="会議のタイトル(オプション、例えば議事録のようなもの)"
          className="w-full px-3 py-2 border rounded"
          maxLength={255}
        />

        <select
          defaultValue={初期継続時間}
          className="w-full px-3 py-2 border rounded"
        >
          <option value={30}>30 分(野心的)</option>
          <option value={60}>1 時間(現実的)</option>
          <option value={120}>2 時間(なんで?)</option>
          <option value={480}>一整天(助けを求めてください)</option>
        </select>

        <button
          type="submit"
          disabled={isLoading}
          className="w-full py-2 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50"
        >
          {isLoading ? "カレンダーを同期中..." : "会議をスケジュールする"}
        </button>
      </form>

      {会議リスト.length > 0 && (
        <ul className="mt-6 divide-y">
          {会議リスト.map((meeting) => (
            <li key={meeting.id} className="py-3">
              <span className="font-medium">{meeting.title}</span>
              <span className="text-gray-400 ml-2">({meeting.attendees.length}名の犠牲者)</span>
            </li>
          ))}
        </ul>
      )}
    </div>
  )
}

export default 会議スケジューラー

同じ日のほかのニュース

一覧に戻る →

2026/05/09 21:00

スイス・インターネット・アーカイブ

## Japanese Translation: インターネット・アーカイブは、デジタル保存とすべての知識への普遍的アクセスというミッションを設立者ブルースター・カールが 30 年前に定めた、独立した非営利財団としてスイスのセント・ガレンに本部を置く「Internet Archive Switzerland」を立ち上げました。このハブは、カナダやヨーロッパなどを含むグローバルネットワーク内で活動し、セント・ガレンに千年以上の学術的アーカイビングとイノベーションの伝統を持つことを活用して、レジリエントな地域図書館を創出します。初期の取り組みでは、危機にあるグローバルなアーカイブを保存すること、および現在の生成 AI の波に関連するデジタルコンテンツを収集することに注力します。重要なパートナーシップとして、ダミアン・ボース教授を率いるセント・ガレン大学工学部のコンピューターサイエンス学科との連携により、急速に進化する AI モデル向けの基準を確立する専門的な「Gen AI Archive」を設立します。これらの取り組みはさらに発展し、2026 年 11 月にパリで開催予定のユネスコ会議において、危機にあるアーカイブに対する保護方法について議論される予定です。実行責任者であるローマン・グリースフェルダー氏は、セント・ガレンが文化遺産に関して「安定性とイノベーションは両輪」と述べ、ユニークに安定性とイノベーションのバランスを維持していると指摘します。新しい財団は、より広範なグローバル使命に奉仕する地元のデジタル歴史保存にとって強力な先例を設定します。詳細は https://internetarchive.ch/ でアクセス可能です。 ## Text to translate: The Internet Archive has launched Internet Archive Switzerland, a new independent non-profit foundation based in St. Gallen dedicated to digital preservation and universal access to all knowledge—a mission established by founder Brewster Kahle 30 years ago. Operating within a global network that includes Internet Archive Canada and Europe, this hub leverages St. Gallen's thousand-year tradition of scholarly archiving and innovation to create a resilient regional library. Initial work will focus on saving endangered global archives and collecting digital content related to the current generative AI wave. A key partnership with the University of St. Gallen's School of Computer Science, led by Professor Damian Borth, will establish a specialized Gen AI Archive to set standards for rapidly evolving AI models. These efforts will be further explored at a UNESCO conference in November 2026 in Paris regarding protection methods for endangered archives. Executive Director Roman Griesfelder notes that St. Gallen uniquely balances stability with innovation, stating, "stability and innovation go hand in hand" regarding cultural heritage. The new foundation sets a powerful precedent for local digital history preservation serving a broader global mission, accessible at https://internetarchive.ch/.

2026/05/10 2:52

Show HN: Go で作成した、Clojure に似た言語を公開します。起動までの時間はわずか 7 ミリ秒です。

## Japanese Translation: Let-go は、Clojure に類似する言語のために設計されたバイトコードコンパイラおよび仮想マシンであり、同ファミリー内で最小で最も起動が速い選択肢を目指しています。コードを外部インフラストラクチャなしで動作するスタンドアロンのバイナリまたは WebAssembly アプリケーションに直接コンパイルします。主要なパフォーマンス指標には、約 10MB のバイナリサイズ、約 6-7ms のコールドスタート、低いアイドルメモリ使用量(約 14MB)が含まれ、これにより Babashka、GraalVM native、Joker、標準的な JVM 環境と比較して著しく小さく高速化しています。 このツールは、`core`、`core.async`、HTTP、JSON などのほぼすべてのコア Clojure ライブラリ(マクロ、プロトコル、トランスデューサー、永続データ構造など)をサポートし、標準的な `clojure-test-suite` の 95.4% を通過する強力な互換性を提供します。`core.async` チャンネル、HTTP サーバー、JSON/Transit、IO、およびバイナリプロトコル経由の Babashka pod の読み込み(データベース、AWS、Docker など)を含む「ボックスセット」機能をサポートしています。高度な機能としては、Go との相互運用性があり、Go アプリケーションへの埋め込みをサポートし、機能マッピングと双方向の呼び出しを可能にします。 展開オプションは柔軟です:ユーザーは Homebrew または Go モジュールを使用して自己完結型のバイナリを作成したり、ターミナルエミュレーションを含むブラウザ実行のための WebAssembly にコンパイルしたり、Emacs、VS Code、Neovim などのリッチなエディタサポートのための nREPL サーバーを利用できます。非常に効率的ですが、標準的な Clojure/Java ランタイムに見られる特定の機能(Refs/STM は atoms+channels で置き換えられ、Spec、`deftype`、読み込みタグ付きリテラル `#inst` など)は除外されています。 ## Text to translate: ## Summary: Let-go is a bytecode compiler and virtual machine for a language resembling Clojure, designed to be the smallest and fastest-starting option in the family. It compiles code directly into standalone binaries or WebAssembly applications that require no external infrastructure to run. Key performance metrics include a ~10MB binary with approximately 6-7ms cold starts and low idle memory usage (~14MB), making it significantly smaller and faster than alternatives like Babashka, GraalVM native, Joker, and standard JVM environments. The tool offers robust compatibility by supporting nearly all core Clojure libraries (including `core`, `core.async`, HTTP, JSON) and features like macros, protocols, transducers, and persistent data structures, passing 95.4% of the standard `clojure-test-suite`. It enables "batteries included" functionality with support for `core.async` channels, HTTP servers, JSON/Transit, IO, and Babashka pod loading (e.g., databases, AWS, Docker) over a binary protocol. Advanced features include Go interop, allowing embedding in Go apps with feature mapping and bidirectional calls. Deployment options are flexible: users can create self-contained binaries via Homebrew or Go modules, compile to WebAssembly for browser execution with terminal emulation, and utilize an nREPL server for rich editor support (Emacs, VS Code, Neovim). While highly efficient, it excludes certain features found in standard Clojure/Java runtimes, such as Refs/STM (replaced by atoms+channels), Spec, `deftype`, and reader tagged literals like `#inst`.

2026/05/10 6:46

リスト風の Rust

## Japanese Translation: RLisp は、Rust のパフォーマンスと安全性を享受しつつ、LISP の S 式構文の可読性をもたらすための独自のソリューションを提供します。`rustc` を介して直接ネイティブバイナリにコンパイルされるため、ランタイム環境やガーベジコレクターの使用は不要となり、所有権、借用、ライフタイム、ジェネリック、トレイト、パターンマッチングなど、Rust のコア機能を完全にサポートしています。インストールは簡単で、GitHub リポジトリをクローン(`git clone https://github.com/ThatXliner/rlisp.git`)し、`cargo install --path .` を実行するだけです。このツールには、LISP ファイルを変数化するためのコマンドラインユーティリティ(`rlisp compile`)、ビルド(`rlisp build`)、実行(`rlisp run`)が組み込まれています。開発者は非対応の機能のために生の Rust コードをそのまま使用するために `(rust "...")` フォームを採用でき、マクロは Runt のプロシージャルマクロに依存せず、`(quasiquote)`、`(unquote)`、`(unquote-splicing)` などの慣れ親しんだ LISP 構造体を利用してコンパイル時の変換を実行できます。`&rest` でキャプチャされた可変引数は `unquote-splicing` を使用してマクロ出力に平坦化できます。言語は `(while ...)`、`(loop ...)`、`(for ...)` などを含む標準制御構造と解像度付きイテレータをサポートし、型注釈を受け取る typed クロージャ(例:`((x i32) (y i32)) -> i32`)および引数を明示的に移動するための `move` キーワードを提供します。可視性修飾子は Rust の慣習に従います(`pub`、`pub(crate)`、`pub(super)`)。このプロジェクトは MIT ライセンスでリリースされており、マクロ開発を簡素化し、バランスの取れた括弧の構造的編集を可能にし、Rust セマンティクスを低い構文障壁で提供することを目的としています。