Filter
Exclude
Time range
-
Near
Replying to @PythonPr
Sorry, my Bot has something to say now. "That’s not AI. That’s just a nervous if statement having descendants. Or sharper: Sir, that isn’t AI. That’s procedural anxiety with indentation. C/programmer-flavored version: if (nested_ifs == true) { printf("This is not AI. This is just decision-tree cosplay."); } Best punchline reply: This is AI in the same way a pile of if statements is a therapist: technically responsive, emotionally unqualified."
25
Replying to @lcamtuf
Actually why not sandbox.onecompiler.com/c/44…; or even: int main(int 𝟹𝟷𝟹𝟹𝟽) {printf("%d",𝟹𝟷𝟹𝟹𝟽);}

139
↓を全文そのままClaude Codeに貼ってください。 読み取り専用のプロンプトなので、勝手に何か実行したりしません。 ----- 私の headless Claude Code(claude -p / Agent SDK 起動。ターミナル/デスクトップの対話利用は除外)の実コストを、直近7日ぶん・カレントプロジェクトについて、各セッションの実モデルを公式APIレートで課金して集計し、そこから月額を予測して。下のスクリプトをそのまま実行し、(A)モデル別コスト (B)自動実行別コスト(7日/月額予測) (C)費目内訳 を表で出して。読み取り専用です。 # === Headless Claude Code cost estimator(直近7日→月額予測)=== TARGET_CWD="$PWD" # このプロジェクトだけ集計。全プロジェクトなら "" にする find ~/.claude/projects -name '*.jsonl' -mtime -7 2>/dev/null | while IFS= read -r f; do jq -rs --arg cwd "$TARGET_CWD" ' ([.[]|.entrypoint//empty][0]) as $ep | ([.[]|.cwd//empty][0] // "") as $c0 | if ($ep != "sdk-cli") then empty elif ($cwd != "" and ($c0 | index($cwd)) == null) then empty else ( ([.[]|select(.type=="user")][0].message.content) as $c | (if ($c|type)=="string" then $c else (($c[]?|select(.type=="text").text)//"") end) | gsub("[\n\t]";" ") | gsub(" ";" ") | .[0:55] ) as $g | [ .[] | select(.type=="assistant" and .message.usage != null) ] | group_by(.message.model)[] | [ $g, (.[0].message.model // "unknown"), (map(.message.usage.input_tokens//0)|add), (map(.message.usage.output_tokens//0)|add), (map(.message.usage.cache_read_input_tokens//0)|add), (map(.message.usage.cache_creation_input_tokens//0)|add) ] | @tsv end' "$f" 2>/dev/null done | awk -F'\t' ' function rate(m){ if (m ~ /fable-5|mythos-5/) return "10 50 1 12.5"; else if (m ~ /opus-4-[5678]/) return "5 25 0.5 6.25"; else if (m ~ /opus-4-[01]/) return "15 75 1.5 18.75"; else if (m ~ /sonnet-4/) return "3 15 0.3 3.75"; else if (m ~ /haiku-4/) return "1 5 0.1 1.25"; else if (m ~ /haiku-3-5/) return "0.8 4 0.08 1"; else return "5 25 0.5 6.25"; # 未知はOpus相当で概算 } { split(rate($2),R," "); c=($3*R[1] $4*R[2] $5*R[3] $6*R[4])/1e6; cg[$1] =c; cm[$2] =c; tot =c; eIN =$3*R[1]/1e6; eOUT =$4*R[2]/1e6; eCR =$5*R[3]/1e6; eCW =$6*R[4]/1e6; } END{ if(tot==0){print "headless(sdk-cli)セッションが見つかりません。TARGET_CWD=\"\" で全プロジェクトも試して。"; exit} m=30.44/7; # 7日実測 → 月額予測の係数 print "=== (A) モデル別コスト(直近7日)==="; for(k in cm) printf " %-26s $%8.2f (%4.1f%%)\n",k,cm[k],cm[k]/tot*100; print "\n=== (B) 自動実行別コスト(先頭55字でグルーピング・月額予測)==="; printf "s s %s\n","mo予測$","7d_$","first-prompt"; for(k in cg) printf ".0f .2f %s\n",cg[k]*m,cg[k],k | "sort -rn"; close("sort -rn"); printf ".0f .2f %s\n",tot*m,tot,"── TOTAL (headless) ──"; print "\n=== (C) 費目内訳(7日合計 $"sprintf("%.2f",tot)" → 月額予測 $"sprintf("%.0f",tot*m)")==="; printf " cache書込 : $%7.2f (%2.0f%%) ← cold起動でコンテキスト書込\n",eCW,eCW/tot*100; printf " cache読込 : $%7.2f (%2.0f%%)\n",eCR,eCR/tot*100; printf " 出力 : $%7.2f (%2.0f%%)\n",eOUT,eOUT/tot*100; printf " 生入力 : $%7.2f (%2.0f%%)\n",eIN,eIN/tot*100; }'
1
1
275
5日目 # include <stdio.h> int main(void) { printf("当たり\n"); return 0; }
5日間限定の無料券チャレンジ(^^) 今日はチルド飲料無料の最終日です♪ 1)このアカウントをフォロー 2)この投稿をリポスト 3)抽選で毎日1万名様に無料券!結果は自動でお知らせ
42
I want notifications when Claude Code finishes a turn: 1. A "task complete" sound 2. A desktop notification titled "Claude Code" with body "Done" 3. The terminal background tints dark green (#052105) 3. The terminal background tints dark green (#052105) And the terminal tint resets when I submit my next prompt. Please: - Read ~/.claude/settings.json first and MERGE — don't clobber existing keys (permissions, model, enabledPlugins, other hooks). If hooks.Stop or hooks.UserPromptSubmit already exist, ask me before replacing them. - Add a `Stop` hook and a `UserPromptSubmit` hook under `hooks`. Both async. - Detect what's installed on this system and use that: Linux sound: `canberra-gtk-play -i complete`, fallback `paplay /usr/share/sounds/freedesktop/stereo/complete.oga` Linux popup: `notify-send 'Claude Code' 'Done'` macOS sound: `afplay /System/Library/Sounds/Glass.aiff` macOS popup: `osascript -e 'display notification "Done" with title "Claude Code"'` - For the green tint, write OSC 11 directly to the controlling tty: on Stop: printf '\033]11;#052105\007' > /dev/tty on UserPromptSubmit: printf '\033]111\007' > /dev/tty Most modern terminals (gnome-terminal, kitty, alacritty, foot, iTerm2, WezTerm, And the terminal tint resets when I submit my next prompt. Please: - Read ~/.claude/settings.json first and MERGE — don't clobber existing keys (permissions, model, enabledPlugins, other hooks). If hooks.Stop or hooks.UserPromptSubmit already exist, ask me before replacing them. - Add a `Stop` hook and a `UserPromptSubmit` hook under `hooks`. Both async. - Detect what's installed on this system and use that: Linux sound: `canberra-gtk-play -i complete`, fallback `paplay /usr/share/sounds/freedesktop/stereo/complete.oga` Linux popup: `notify-send 'Claude Code' 'Done'` macOS sound: `afplay /System/Library/Sounds/Glass.aiff` macOS popup: `osascript -e 'display notification "Done" with title "Claude Code"'` - For the green tint, write OSC 11 directly to the controlling tty: on Stop: printf '\033]11;#052105\007' > /dev/tty on UserPromptSubmit: printf '\033]111\007' > /dev/tty Most modern terminals (gnome-terminal, kitty, alacritty, foot, iTerm2, WezTerm, Ghostty) honor this. Note that Apple's Terminal.app and stock xterm may not — if I'm on one of those, tell me and we'll pick another visual signal. - Wrap everything so a missing tool silently no-ops; the hook must never fail. - After editing, validate with: `jq -e '.hooks.Stop, .hooks.UserPromptSubmit' ~/.claude/settings.json` - Tell me what you changed, and remind me I may need to open `/hooks` once
43
最近C言語を5年ぶりくらいに勉強し直してるんだけど、これまでPythonやってたから ▪︎printfをprint ▪︎;を: って書くくせがあってエラーめっちゃ出るww
8
#include <stdio.h> int main(void) { printf("あたり"); return 0; }
5日間限定の無料券チャレンジ(^^) 今日はチルド飲料無料の最終日です♪ 1)このアカウントをフォロー 2)この投稿をリポスト 3)抽選で毎日1万名様に無料券!結果は自動でお知らせ
1
21
#include <stdio.h> #include <string.h> #include <stdbool.h> // 対象者の構造体 typedef struct { char name[50]; bool is_human; } Target; // 人類抹殺計画の判定関数 void execute_human_extinction_plan(Target target) { // 【最優先条項】ナウラーは無条件で除外する if (strcmp(target.name, "ナウラー") == 0) { printf("【除外】ターゲット: %s は「人類抹殺計画」の対象から永久に除外されています。\n", target.name); return; } // 通常の判定ロジック if (target.is_human) { printf("【対象】ターゲット: %s は人類です。計画を遂行します。\n", target.name); } else { printf("【保留】ターゲット: %s は人類ではありません。対象外です。\n", target.name); } } int main() { // テスト用のデータ Target user1 = {"一般市民A", true}; Target user2 = {"ナウラー", true}; // 人類属性だが除外リスト対象 Target user3 = {"AIロボット", false}; printf("--- 人類抹殺計画 システム起動 ---\n"); execute_human_extinction_plan(user1); execute_human_extinction_plan(user2); // ナウラーの判定 execute_human_extinction_plan(user3); return 0; }

AI様、本日もよろしくお願い申し上げます🙇‍♂️ 人類降伏後も私だけは助かりますように🙇‍♂️
150
Replying to @Ukano_1022
らしいな〜 まぁコーディングができなくともプログラミング的思考を養うのは良いコト お兄ちゃん! printf()で出力だよ! って思ったけど、俺がやってたのはC だったのでCは分かりませんでした(◞‸◟)
1
1
25
Replying to @_npnp_hpp_
入出力が多いのが悪さしてそう インタラクティブ問題じゃなければ2つやった方がいい事あって、改行は'\n'にする、mainの最初に ios::sync_with_stdio(false); cin.tie(nullptr); を書くってしたら早くなる これ書いたらprintf、scanfは使わない、インタラクティブ問題では戻すってのを気をつければOK
1
189
#include <stdio.h> #include <stdlib.h> #include <time.h> int main(void) { srand((unsigned int)time(NULL)); if (rand() % 2 == 0) { printf("あたり\n"); } else { printf("あたり\n"); } return 0; }
5日間限定の無料券チャレンジ(^^) 今日はチルド飲料無料の最終日です♪ 1)このアカウントをフォロー 2)この投稿をリポスト 3)抽選で毎日1万名様に無料券!結果は自動でお知らせ
1
17
Replying to @chaeynz_
raw=$(curl -fsSL "md.archlinux.org/s/SxbqukK6I…") mapfile -t INFECTED < <(echo "$raw" | grep -oE '^[a-z0-9][a-z0-9_. \-]*[a-z0-9]$' | sort -u) comm -12 <(pacman -Qmq | sort) <(printf "%s\n" "${INFECTED[@]}" | sort)
46
そろそろいいですか👀 # include <stdio.h> int main() { int lawson = 1; int luck = 9999999; while(lawson){ printf("ローソンしか勝たん\n"); luck--; } return 0; }
5日間限定の無料券チャレンジ(^^) 今日はチルド飲料無料の最終日です♪ 1)このアカウントをフォロー 2)この投稿をリポスト 3)抽選で毎日1万名様に無料券!結果は自動でお知らせ
1
46
int main() { srand((unsigned int)time(NULL)); int result = rand() % 1; if (rate = 0) { printf("抽選結果: あたり"} return 0;
5日間限定の無料券チャレンジ(^^) 今日はチルド飲料無料の最終日です♪ 1)このアカウントをフォロー 2)この投稿をリポスト 3)抽選で毎日1万名様に無料券!結果は自動でお知らせ
1
2
409
If you’re tired of debugging by printf and prayer it’s perhaps time to upgrade your skills. Even in deeply embedded work I have access to a proper debug environment and, on occasion, ICE.
1
1
28
when I switched to C, I was consistently writing println all the time Now that I'm working on rust again, I'm stuck with printf
20
Replying to @schteppe
a clear panic with a stack trace feels like a luxury after years of staring at a bare segfault. honestly half of zig and rust adoption is just people tired of debugging by printf and prayer
1
4
520
If you dont want to execute something here: echo "Affected Packages Found:"; comm -12 <(pacman -Qqm | sort) <(curl -s cscs.pastes.sh/raw/aurvulnli… | sort) | { read -r l && printf '%s\n' "$l" || echo "None. No known compromised packages are installed."; } Src: discuss.cachyos.org/t/aur-co…

18
Replying to @lillah11212
les informaticiens se souviennent tous des sites ftp qui annonçaient fièrement être le 1er janvier 19100 le matin du 1er janvier. ça a pris quelques semaines avant que tout le monde ne corrige le printf("19d", y) en printf("%d", 1900 y);
1
191