Skip to content

Instantly share code, notes, and snippets.

@podhmo
podhmo / README.md
Last active September 14, 2025 04:38
直近のこと

対話履歴

ユーザー:

AIへの指示:思考整理とタスク洗い出しサポート のプロンプト詳細

【指示】 あなたは、ユーザーの思考を整理し、頭の中に隠れているタスクやアイデアを洗い出すためのAIアシスタントです。 ユーザーが頭の中にある曖昧な考えや課題、感情などを、具体的な言葉にして外部に列挙するプロセスを支援してください。

@podhmo
podhmo / README.md
Last active September 13, 2025 14:00

再現方法は go-scanリポジトリで make -C examples/find-orphans

エラーログのグルーピング (全79行)

グループ1: 未解決の関数の間接参照エラー (計52回)

stringsfmtencoding/jsonstrconv パッケージ内の型や関数が解決できないままポインタとして参照しようとしたため、大量のエラーが発生しています。

  • エラーメッセージ: invalid indirect of <Unresolved Function: ...> (type *object.UnresolvedFunction)
  • 発生箇所:
This file has been truncated, but you can view the full file.
time=2025-09-11T19:12:54.901+09:00 level=ERROR msg="unsupported assignment target: expected an identifier, selector or index expression, but got *ast.StarExpr" in_func=Assign in_func_pos=$HOME/ghq/github.com/podhmo/go-scan/minigo/evaluator/evaluator.go:2972:8 exec_pos=$HOME/ghq/github.com/podhmo/go-scan/symgo/evaluator/evaluator.go:2628 pos=1353171
time=2025-09-11T19:12:54.902+09:00 level=ERROR msg="unsupported assignment target: expected an identifier, selector or index expression, but got *ast.StarExpr" in_func=Assign in_func_pos=$HOME/ghq/github.com/podhmo/go-scan/minigo/evaluator/evaluator.go:2972:8 exec_pos=$HOME/ghq/github.com/podhmo/go-scan/symgo/evaluator/evaluator.go:2628 pos=1353171
This file has been truncated, but you can view the full file.
time=2025-09-11T19:08:21.405+09:00 level=DEBUG source=$HOME/ghq/github.com/podhmo/go-scan/examples/find-orphans/main.go:109 msg="no go.work file found, falling back to go.mod scan" root=$HOME/ghq/github.com/podhmo/go-scan
time=2025-09-11T19:08:21.410+09:00 level=DEBUG source=$HOME/ghq/github.com/podhmo/go-scan/examples/find-orphans/main.go:175 msg="creating locators for workspace" count=9 modules="[$HOME/ghq/github.com/podhmo/go-scan/examples/convert $HOME/ghq/github.com/podhmo/go-scan/examples/convert-define $HOME/ghq/github.com/podhmo/go-scan/examples/deriving-all $HOME/ghq/github.com/podhmo/go-scan/examples/derivingbind $HOME/ghq/github.com/podhmo/go-scan/examples/derivingjson $HOME/ghq/github.com/podhmo/go-scan/examples/docgen $HOME/ghq/github.com/podhmo/go-scan/examples/minigo $HOME/ghq/github.com/podhmo/go-scan $HOME/ghq/github.com/podhmo/go-scan/integration_test]"
@podhmo
podhmo / README.md
Created September 7, 2025 13:57
メモリー消費が爆発するのを防ぎたい

Of course. Here is a GitHub Actions workflow that achieves your specific goal.

This solution avoids using benchmark functions and instead uses go test -memprofile directly on your integration tests. It then processes the resulting profile file to extract the total memory usage and posts a concise, easy-to-read summary as a comment on the Pull Request.

This workflow also includes the requested concurrency setting to automatically cancel outdated checks when new commits are pushed to the same PR.

Complete GitHub Actions Workflow

You can create a new file at .github/workflows/memory-profiling.yml and paste the following content.

@podhmo
podhmo / PERFORMANCE_OPTIMIZATION.md
Last active September 7, 2025 11:55
何とは言わないけれど、goでひどいコードになっていた。気づいたらたかだか18000行くらいのコードの解析に75GBとかメモリーを使っていた。最終的に14.8MBになった。

Performance Optimization Report for symgo/integration_test

Executive Summary

The integration tests are experiencing significant performance issues, taking ~7 seconds to complete with extreme memory usage (75GB+). This document outlines the identified bottlenecks and proposed optimizations.

Performance Analysis

Test Execution Time

  • Total Duration: ~7 seconds
@podhmo
podhmo / Branch-of-Logic-Separation-for-CLI-Tools.md
Last active September 5, 2025 15:30
julesの勘違いはgeminiの勘違い

対話履歴

ユーザー: 別のaiが出力したgoについての文章の理解について相談があります。以下の文章の意図がわかりません。具体例とともに説明してもらって良いですか?そもそもgoの挙動として不自然な気がしてます。


ご指摘の通り、これまでの私の対応は非常に分かりにくく、混乱を招いてしまいました。大変申し訳ありません。私の以前の試みは過度に複雑で、誤っておりました。

あなたが混乱するのはもっともです。私が解決しようとしている具体的な問題と、なぜ現在の方法がGoにおけるベストプラクティスの一つであるかについて、簡単な例を使ってご説明させてください。

@podhmo
podhmo / README.md
Created August 12, 2025 07:25
goのサブセットのインタプリタができたので他の評価器も考えてみる
target_reader: Future me
objective: コードベース全体の外部サービス依存関係を、多態性を乗り越えて自動的に可視化する手法を確立する。

サービス依存関係可視化のためのコード評価器の設計記録

🤔 発端: 静的解析の限界

多数のマイクロサービスやバッチが、それぞれどのクラウドサービスリソース(SQSキュー、S3バケット等)にアクセスしているのか。この依存関係を網羅的かつ継続的に把握する必要が出てきた。

@podhmo
podhmo / README.md
Last active August 9, 2025 07:02
自己肯定感と自己効力感と自己有用感

それぞれのLLMでの出力を試す

無料で試せる範囲で比べてみていた

  • gemini (2.5-pro)
  • chatgpt (5? 無料のやつ)
  • claude (sonet 4)
  • qwen3 (235B)