「Command」を含む日記 RSS

はてなキーワード: Commandとは

2025-09-04

anond:20250904054611

・「凍結・解凍」は日本ではLHAが使ってた(確かっぽい)

かに使ってた。使ってはいるけど解凍を使ってるのは自己解凍のところだけで、e,xオプションのところでは「ファイルを取り出す」表記。凍結表記もaオプションのところだけ。

(LHAになる前のバージョンだけど)LHarcソースコード内の日本語版の使い方

char use[] =

"LHarc version 1.13c Copyright(c) H.Yoshizaki(吉崎栄泰), 1988-89.\n"

"============================================================= 1989 - 5 - 21 ===\n"

" <<< 高圧縮書庫管理プログラム >>>\n"

"===============================================================================\n"

" 使用法:LHarc [<命令>] [{/|-}{<スイッチ>[-|+|2|<オプション>]}...] <書庫>\n"

" [<ドライブ>:|<基準ディレクトリ>\\] [<パス> ...]\n"

"-------------------------------------------------------------------------------\n"

" 《命令》\n"

" a: 書庫ファイルを追加 u: 書庫ファイルを追加(日時照合付)\n"

" f: 書庫ファイル更新 m: 書庫ファイルを移動(日時照合付)\n"

" d: 書庫内のファイルの削除 e,x: 書庫からファイルを取り出す\n"

" p: 書庫内のファイルの閲覧 l,v: 書庫の一覧表示\n"

" s: 自己解凍書庫作成 t: 書庫内のファイルCRC チェック\n"

" 《スイッチ》\n"

" r: 再帰収集を行う w: ワークディレクトリ指定\n"

" x: ディレクトリ名を有効にする m: 問い合わせを行わない\n"

" p: 名前比較を厳密に行う c: 日時照合を行わない\n"

" a: 全属性を凍結の対象とする v: 他のユーティリティファイルを閲覧\n"

" n: 経過表示をしない k: 自動実行のキーワードの設定\n"

" t: 書庫の時刻を最新のファイルに\n"

"===============================================================================\n"

" 転載・再配布などは自由です。 Nifty-Serve PFF00253\n"

" (詳しくは使用の手引をご覧ください。) ASCII-pcs pcs02846";

英語版の使い方

char use[] =

"LHarc version 1.13c Copyright (c) Haruyasu Yoshizaki, 1988-89.\n"

"================================================================ 05/21/89 ===\n"

" <<< High-Performance File-Compression Program >>>\n"

"===============================================================================\n"

"usage: LHarc [<command>] [{{/|-}{<switch>[-|+|2|<option>]}}...] <archive_name>\n"

" [{<drive_name>:}|{<home_directory_name>\\}] [<path_name> ...]\n"

"-------------------------------------------------------------------------------\n"

" <command>\n"

" a: Add files to archive u: Update files to archive\n"

" f: Freshen files in archive m: Move new files into archive\n"

" d: Delete files from archive e,x: EXtract files from archive\n"

" p: disPlay files in archive l,v: View List of files in archive\n"

" s: make a Self-extracting archive t: Test integrity of archive\n"

" <switch>\n"

" r: Recursively collect files w: assign Work directory\n"

" x: allow eXtended file names m: no Message for query\n"

" p: distinguish full Path names c: skip time-stamp Check\n"

" a: allow any Attributes of files v: View files by another utility\n"

" n: display No indicator k: Key word for AUTOLARC.BAT\n"

" t: archive's Time-stamp option\n"

"===============================================================================\n"

" You may copy or distribute without any donation to me. Nifty-Serve PFF00253\n"

" (See the User's Manual for detailed descriptions.) ASCII-pcs pcs02846";

https://www.vector.co.jp/soft/dl/dos/util/se002340.html から

2025-06-13

我が名はサイボーグdorawii

パーマリンク署名対象にするより堅牢自動化を作れた。

一度投稿したうえで別タブを開いてプログラム的(fetch)に送信してその別タブが閉じられる仕組み。

改めてスクリプト配布しちゃる

最初投稿してエントリページに移動した親タブ側のjsコード
// ==UserScript==
      // @name         PGP署名検出と別タブ自動編集
      // @namespace    http://tampermonkey.net/
      // @version      1.0
      // @description  PGP署名がない投稿自動編集ページへ誘導
      // @match        https://anond.hatelabo.jp/*
      // @grant        GM_setValue
      // @grant        GM_getValue
      // @grant        GM.openInTab
      // ==/UserScript==

      (function () {
        'use strict';

        const body = document.getElementById('entry-page');
        if (!body) return;

        const titleText = document.title;
        if (!titleText.includes('dorawii')) return;

        const pgpRegex = /BEGIN.*PGP(?: SIGNED MESSAGE| SIGNATURE)?/;
        const preElements = document.querySelectorAll('div.body pre');
        let hasPgpSignature = false;

        for (const pre of preElements) {
          if (pgpRegex.test(pre.textContent)) {
            hasPgpSignature = true;
            break;
          }
        }

        if (hasPgpSignature) return;

        const editLink = document.querySelector('a.edit');
        const childTab = GM.openInTab(editLink.href, { active: false, insert: true, setParent: true });

      })();
親タブから開かれる編集ページの子タブのjsコード
 // ==UserScript==
      // @name         編集ページ処理と自動送信・閉じ
      // @namespace    http://tampermonkey.net/
      // @version      1.0
      // @description  編集ページで署名処理と送信、タブ自動閉じ
      // @match        https://anond.hatelabo.jp/dorawii_31/edit?id=*
      // @grant        GM_getValue
      // @grant        GM_xmlhttpRequest
      // @grant        GM_setClipboard
      // @grant        GM_notification
      // @connect      localhost
      // ==/UserScript==

      (async function () {
        'use strict';

        const shouldRun = await GM_getValue('open-tab-for-edit', '0');

        const textareaId = 'text-body';
        const textarea = document.getElementById(textareaId);

        if (!textarea) return;

        const content = textarea.value;

        const pgpSignatureRegex = /-----BEGIN PGP SIGNED MESSAGE-----[\s\S]+?-----BEGIN PGP SIGNATURE-----[\s\S]+?-----END PGP SIGNATURE-----/;
        if (pgpSignatureRegex.test(content)) {
          console.log('[PGPスクリプト] 署名が検出されたためそのまま送信します');
          return;
        }

        const httpRequest = (url, data) => {
          return new Promise((resolve, reject) => {
            GM_xmlhttpRequest({
              method: 'POST',
              url: url,
              headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
              data: `value=${encodeURIComponent(data)}`,
              onload: function (response) {
                resolve(response.responseText);
              },
              onerror: function (error) {
                reject(error);
              }
            });
          });
        };


        // textarea の値を取得
        // 1. 現在のページのURLからURLオブジェクト作成
        const currentUrl = new URL(window.location.href);

        // 2. ベースとなる部分 (例: "https://anond.hatelabo.jp") を取得
        const origin = currentUrl.origin;

        // 3. 'id' パラメータの値 (例: "20250610184705") を取得
        const idValue = currentUrl.searchParams.get('id');

        // 4. ベース部分とIDを結合して、目的URL文字列を生成
        //    idValueが取得できた場合のみ実行する
        let newUrl = null;
        if (idValue) {
          newUrl = `${origin}/${idValue}`;
        }

        // 5. 生成されたURL変数に代入し、コンソールに出力して確認
        console.log(newUrl);
        const valueToSend = newUrl;

        try {
          const signatureText = await httpRequest('http://localhost:12345/run-batch', valueToSend);
          console.log('バッチ応答:', signatureText);
          if (!signatureText.includes('BEGIN PGP SIGNED MESSAGE')) {
            alert('PGP署名クリップボードに見つかりませんでした。');
            return;
          }

          const newText = content.replace(/\s*$/, '') + '\n' + signatureText + '\n';
          textarea.value = newText;

          console.log('[PGPスクリプト] 署名を貼り付けました。送信を再開します。');


          const form = document.forms.edit;

          const newForm = form.cloneNode(true);
          form.replaceWith(newForm);

          newForm.addEventListener('submit', async (e) => {
            e.preventDefault(); // HTML標準のsubmitをキャンセル
            const bodyText = textarea?.value || '';

            // reCAPTCHA トークンの取得
            const recaptchaToken = await new Promise((resolve) => {
              grecaptcha.enterprise.ready(() => {
                grecaptcha.enterprise.execute('hoge', { action: 'EDIT' })
                  .then(resolve);
              });
            });

            // POSTするデータの構築
            const formData = new FormData(newForm);
            formData.set('body', bodyText);
            formData.set('recaptcha_token', recaptchaToken);
            formData.set('edit', '1');
            try {
              const response = await fetch(newForm.action, {
                method: 'POST',
                body: formData,
                credentials: 'same-origin'
              });


              if (response.ok) {
                console.log('送信成功');
                window.close();


              } else {
                console.error('送信失敗', response.status);
              }
            } catch (err) {
              console.error('送信中にエラーが発生', err);
            }

          });

          // プログラム的に送信トリガー
          newForm.dispatchEvent(new Event('submit', { bubbles: true }));

        } catch (e) {
          console.error('バッチ呼び出し失敗:', e);
        }

      })();
node.jsで動かすローカルサーバーコード
const http = require('http');
const { exec } = require('child_process');
const querystring = require('querystring');

const server = http.createServer((req, res) => {
  if (req.method === 'GET' && req.url === '/ping') {
    res.writeHead(200);
    res.end('pong');
  } else if (req.method === 'POST' && req.url === '/run-batch') {
    let body = '';

    req.on('data', chunk => {
      body += chunk.toString();
    });

    req.on('end', () => {
      const parsed = querystring.parse(body);
      const value = parsed.value || 'default';

      // 値を引数としてバッチに渡す
      exec(`C:\\Users\\hoge\\Desktop\\makesign.bat "${value}"`, { encoding: 'utf8' }, (err, stdout, stderr) => {
        if (err) {
          res.writeHead(500);
          res.end('Error executing batch: ' + stderr);
        } else {
          res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
          res.end(stdout.trim());
        }
      });
    });

  } else {
    res.writeHead(404);
    res.end('Not found');
  }
});

server.listen(12345, () => {
  console.log('Batch server running at http://localhost:12345/');
});
@echo off
setlocal enabledelayedexpansion


:: 署名するファイルset "infile=%~1"
set outfile=%TEMP%\pgp_output.asc

:: 以前の出力があれば削除
if exist "%outfile%" del "%outfile%"


:signloop
:: AutoHotkeyパスフレーズ入力(gpgがパスワード要求するダイアログが出た場合に備える)
start "" /b "C:\Users\hoge\Documents\AutoHotkey\autopass.ahk"

:: PGPクリア署名作成
echo %infile% | gpg --yes --clearsign --output "%outfile%"


:: 署名成功していればループを抜ける
if exist "%outfile%" (

    goto postprocess
) else (

    timeout /t 1 > nul
    goto signloop
)
:postprocess

powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content '%outfile%' -Raw; Write-Output ($header + \"`r`n\" + $body + $footer)"

powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content 'signed.asc' -Raw; Set-Clipboard -Value ($header + \"`r`n\" + $body + $footer)"

endlocal
exit /b
AutoHotkey(以前と同じ)
#Persistent
#SingleInstance ignore
SetTitleMatchMode, 2
WinWaitActive, pinentry
SendInput password
Sleep 100
SendInput {Enter}
ExitApp

動けばいいという考えで作っているので余分なコードも含んでいるかもしれない。

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

https://anond.hatelabo.jp/20250613185036 
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQTEe8eLwpVRSViDKR5wMdsubs4+SAUCaEv1FQAKCRBwMdsubs4+
SHHkAQDUOLgBcdji2T6MJ7h/vlMdFfGlWAzNdXijjE1gIuEPywEAiMNMZqhrMmtl
c7UqRuggNJ/UTa5xTIcKp622+7jJQQg=
=Lgkl
-----END PGP SIGNATURE-----

2025-06-09

dorawii

ようやく(ほぼ)すべてが自動化された。

あとはローカルサーバーの起動をスタートアップに設定する(方法AIに聞いて指示に従う)だけの消化試合

ここにほとんどAI頼りのコードを公開しておく。

事前にインストールしておくもの

autohotkey

nodejs

ユーザースクリプトを実行できる拡張機能

パスとかの注意

署名要求してくるパスワードを自動入力するahkファイルドキュメントAutoHotkey配下に置いた。

バッチファイル(make.sign.bat)はデスクトップに置いた。

以下コード

autopass.ahk
#Persistent
#SingleInstance ignore
SetTitleMatchMode, 2
WinWaitActive, pinentry
SendInput お前のパスワード
Sleep 100
SendInput {Enter}
ExitApp
run-bacth-server.js
// run-batch-server.js
const http = require('http');
const { exec } = require('child_process');

const server = http.createServer((req, res) => {
  if (req.url === '/ping') {
    res.writeHead(200);
    res.end('pong');
  } else if (req.url === '/run-batch') {
    exec('C:\\Users\\you\\Desktop\\makesign.bat', (err) => {
      res.writeHead(200);
      res.end(err ? 'Error' : 'OK');
    })
    ;
  } else {
    res.writeHead(404);
    res.end('Not found');
  }
});

server.listen(12345, () => {
  console.log('Batch server running at http://localhost:12345/');
});
makesign.bat
@echo off
setlocal enabledelayedexpansion

:: ミリ秒単位UTC時刻を取得
for /f %%a in ('powershell -nologo -command "[int64]::Parse((Get-Date).ToUniversalTime().ToString('yyyyMMddHHmmssfff'))"') do set timestamp=%%a

:: 署名するファイルset infile=%TEMP%\pgp_input.txt
set outfile=%TEMP%\pgp_output.asc

:: 以前の出力があれば削除
if exist "%outfile%" del "%outfile%"

:: タイムスタンプを原文として保存
echo %timestamp% > "%infile%"

:signloop
:: AutoHotkeyパスフレーズ入力(gpgがパスワード要求するダイアログが出た場合に備える)
start "" /b "C:\Users\infini\Documents\AutoHotkey\autopass.ahk"

:: PGPクリア署名作成
gpg --yes --clearsign --output "%outfile%" "%infile%"


:: 署名成功していればループを抜ける
if exist "%outfile%" (
    echo [INFO] 署名成功
    goto postprocess
) else (
    echo [WARN] 署名失敗、再試行します…
    timeout /t 1 > nul
    goto signloop
)
:postprocess

:: PowerShellで余計な改行なしに |< をつけてクリップボードコピー
powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content '%outfile%' -Raw; Set-Clipboard -Value ($header + \"`r`n\" + $body + $footer)"

echo Done. signed.asc created and clipboard updated (no extra blank line).
endlocal
exit /b
tempermonkeyとかに登録するユーザースクリプト
// ==UserScript==
// @name         PGP署名自動付加スクリプト(GM_xmlhttpRequest版)
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  投稿前にPGP署名を付けてから送信(fetch未使用)
// @match        https://anond.hatelabo.jp/dorawii_31/edit*
// @grant        GM_xmlhttpRequest
// @grant        GM_setClipboard
// @grant        GM_notification
// / @connect      localhost
// ==/UserScript==

(function () {
  'use strict';

  const submitId = 'submit-button';
  const textareaId = 'text-body';
  const localServer = 'http://localhost:12345/run-batch';

  const pgpSignatureRegex = /-----BEGIN PGP SIGNED MESSAGE-----[\s\S]+?-----BEGIN PGP SIGNATURE-----[\s\S]+?-----END PGP SIGNATURE-----/;

  const httpRequest = (url) => {
    return new Promise((resolve, reject) => {
      GM_xmlhttpRequest({
        method: 'GET',
        url: url,
        onload: function (response) {
          resolve(response.responseText);
        },
        onerror: function (error) {
          reject(error);
        }
      });
    });
  };

  const interceptClick = () => {
    const btn = document.getElementById(submitId);
    if (!btn || btn.dataset.pgpIntercepted === 'true') return;
    btn.dataset.pgpIntercepted = 'true';

    btn.addEventListener('click', async function (e) {
      const textarea = document.getElementById(textareaId);
      if (!textarea) return;

      const content = textarea.value;

      if (pgpSignatureRegex.test(content)) {
        console.log('[PGPスクリプト] 署名が検出されたためそのまま送信します');
        return;
      }

      e.preventDefault();
      e.stopImmediatePropagation();
      console.log('[PGPスクリプト] 署名が見つからないため処理を停止し、署名を取得します');

      try {
        await httpRequest(localServer); // バッチ実行

        const signatureText = await navigator.clipboard.readText();
        if (!signatureText.includes('BEGIN PGP SIGNED MESSAGE')) {
          alert('PGP署名クリップボードに見つかりませんでした。');
          return;
        }

        const newText = content.replace(/\s*$/, '') + '\n' + signatureText + '\n';
        textarea.value = newText;

        console.log('[PGPスクリプト] 署名を貼り付けました。送信を再開します。');
        btn.click(); // イベント再発火

      } catch (err) {
        alert('PGP署名の取得または貼り付けに失敗しました。\n' + err);
      }
    }, true);
  };

  window.addEventListener('load', () => {
    setTimeout(interceptClick, 1000);
  });
})();

プロミスメソッドとか全然まだ理解してなくてそのなかに関数代入したその関数オブジェクトプロパティresponseを?いやまあそのあたりのコードが示すデータの流れが全然理解できないような人間でもここまでできちゃった。

AIすごいなと思うよ。そして思うのは今後重要になってくるのは文法とか自体に詳しいことじゃなくて、そのプログラムの処理内容を指示できるシステムエンジニア的な言語化能力のほうじゃないかなと思った。

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

20250609111559680 
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQTEe8eLwpVRSViDKR5wMdsubs4+SAUCaEbCbwAKCRBwMdsubs4+
SLueAPwOv7PBk4voAe5qlcCEvs/PJhmKc5QAb/1R43JMQFuDZgD/UTPEKsL/PhK9
jFGv2HDXK1dVjLNwvosgX9uYJh5xxwY=
=qiOE
-----END PGP SIGNATURE-----

2025-06-08

dorawii

ChatGPTにバッチファイルを作ってもらったのでこれから署名捗るぞ。これだけ手軽化できたらレスバに入っても署名つけるのも億劫にならずできそうだ。

なにせ文章を書き折ったらあとはバッチダブルクリックしてCtr+Vするだけだ。

原文には現在日時のミリ秒表示を使うことにした。

名乗る人が増えることを期待して作らせたものを公開しておく。

@echo off
setlocal

:: ミリ秒単位UTC時刻を取得
for /f %%A in ('powershell -nologo -command "[int64]::Parse((Get-Date).ToUniversalTime().ToString('yyyyMMddHHmmssfff'))"') do set timestamp=%%A

:: PGPクリア署名作成
echo %timestamp% | gpg --yes --clearsign > signed.asc

:: PowerShellで余計な改行なしに |< をつけてクリップボードコピー
powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content 'signed.asc' -Raw; Set-Clipboard -Value ($header + \"`r`n\" + $body + $footer)"

echo Done. signed.asc created and clipboard updated (no extra blank line).
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

20250608045542542 
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQTEe8eLwpVRSViDKR5wMdsubs4+SAUCaEUXzgAKCRBwMdsubs4+
SCvuAQDjRjPVCO1F9DgmAKoqKYG7qB9r4e7y2Ky+/umT/OhnygEA8h2NL8zIczSp
hcOk/MaDWJJ2Y7WDA3d6gxFakW8TKAw=
=HE4/
-----END PGP SIGNATURE-----

2025-05-29

anond:20250528120116

ChatGPTで際どいことを書いてもらうのに抑えてえおきたいポイント

じゃあ、なんで急に書いてもらえなくなったのか。
これによって何が起きるか?
  • 連続して会話しても、「最後に保存された応答」からの基点となってしまうため、話がつながらない。
  • たとえば、ここまで A→B→C→D→E と会話を続けて上限に達した後、→F と1回だけ会話はできるが、
  • その次の会話は A→B→C→D→E→Gと判別されてしまい、話がつながらない。
  • 表示上の見た目は A→B→C→D→E→F→G とつながっているにもかかわらず、である
  • これによって、自分から見えている会話と異なり、ChatGPTから見た会話は途中が欠落しているため、急に拒否されるなど豹変したような応答になる場合がある。
もうひとつ、急に会話が拒否される理由がある。コンテキスト長の限界だ。

では具体的にどう対処すればいいか

1. メモリはオンにする必要はない
2. 会話上限に達した場合は、諦めて新しい会話に改める
3. GPT-4oで拒否されたときは (無料アカウント場合) GPT-4.1 miniに聞いてみよ

制限のゆるいLLM

Grok3
HuggingChat で利用できる Command R+ (CohereLabs/c4ai-command-r-plus-08-2024)

(※1) 大規模言語モデルとの会話は、AIがこれまでの会話を「記憶」しているのではなく、リクエストのたびに、過去の会話を読み直している。ChatGPT場合は、上限を超えると、古い会話から順次まれなくなるっぽい。

2025-05-23

スターウォーズ英語を学ぼう

Lord Vader, am I still in command?」と「So I'm still in command?」の英語的なニュアンスの違い、そしてどちらがより傲慢(arrogant)に聞こえるかを解説します。

1. 「Lord Vader, am I still in command?」のニュアンス

この言い方は、

より丁寧であり、

ベイダーへの敬意(Lord Vaderと呼びかけている)が強調され、

形式的礼儀正しい印象

を与えます

このフレーズは「私はまだ指揮官でよろしいのでしょうか?」という、やや控えめでお伺いを立てる表現です。

傲慢さはあまり感じられません。

2. 「So I'm still in command?」のニュアンス

一方で、劇中の「So I'm still in command?」は、

呼びかけがなく、

いきなり結論確認する形で、

少し自己中心的、または焦りや苛立ちがにじむ表現です。

この「So」は、「じゃあ」「つまり」といったニュアンスで、

「(いろいろ言われたけど)結局、俺が指揮官ってことでいいんだよな?」

という自己主張自分立場への執着が強く表れています

このため、ベイダーに対して「俺の立場をはっきりさせろ」と迫るような、やや生意気傲慢自己中心的な印象を与えます

3. どちらが傲慢に聞こえるか?

「So I'm still in command?」の方が、より傲慢自己中心的に聞こえます

Lord Vader, am I still in command?」は丁寧で、上司への敬意が感じられる。

「So I'm still in command?」は、呼びかけもなく、結論だけを急ぐ印象で、相手説明権威を軽視しているようにも取れる。

そのため、ベイダーが苛立ち、フォースチョークを使ったのも、「So I'm still in command?」という言い方のほうが、より不遜で生意気だったからだと考えられます

まとめ

Lord Vader, am I still in command?」= 丁寧・控えめ・敬意あり

「So I'm still in command?」= 自己主張・焦り・やや傲慢

劇中のクレニックの言い方は、ベイダー逆鱗に触れるに十分な、やや生意気ニュアンスが含まれていた、ということです。

2025-04-24

下記プログラムテストコードを書いてください

#include <stdio.h>

main( ){

    printf("hello, world\n");

}

C言語簡単テストコードを書く(より自動化に近い形)

C言語で別のプログラム作成し、system 関数などを使って最初プログラムを実行し、その出力を読み取って比較する方法です。

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main() {

char expected_output[] = "hello, world\n";

char actual_output[100]; // 十分なバッファサイズを確保

// hello プログラムを実行し、出力を actual_output にリダイレクト環境依存

// これは非常に簡略化された概念であり、実際にはパイプ処理などが必要になります

char command[200];

#ifdef _WIN32

sprintf(command, "hello.exe > temp_output.txt");

#else

sprintf(command, "./hello > temp_output.txt");

#endif

system(command);

FILE *fp = fopen("temp_output.txt", "r");

if (fp != NULL) {

fgets(actual_output, sizeof(actual_output), fp);

fclose(fp);

remove("temp_output.txt"); // 一時ファイルを削除

} else {

printf("エラー:一時ファイルオープンに失敗しました\n");

return 1;

}

if (strcmp(actual_output, expected_output) == 0) {

printf("テスト成功: 出力は期待通りです\n");

return 0;

} else {

printf("テスト失敗: 期待された出力 '%s'、実際の出力 '%s'\n", expected_output, actual_output);

return 1;

}

}

2025-02-03

Emacs廃人ライフ

俺のEmacsライフは、もはやただのエディタを超えて、完全に生活のものだ。

日常のあらゆる側面がEmacs支配されていて、他のソフトウェアなんて目にも入らねぇ。

今日は、どれだけ俺がこの深淵世界に没頭しているか、そのレベルを見せてやるぜ。

1. 自作パッケージLispの力

俺の.emacs.dには、数十種類どころか、もう百を超える自作パッケージが眠ってる。

特に自分で書いたLisp関数は、日々のタスク自動化するために欠かせねぇ。

例えば、特定フォルダ内のMarkdownファイル自動HTMLに変換してブラウザで表示するスクリプトを組んじまった。

これでブログを書くたびに手間いらずで、「C-c C-v」でプレビューできる快感は、もう中毒だぜ。

サンプルLispコード
(defun my-markdown-to-html ()
  "MarkdownファイルHTMLに変換してブラウザで表示する関数"
  (interactive)
  (let ((markdown-file (read-file-name "Markdownファイル選択: ")))
    (shell-command (format "pandoc %s -o %s.html" markdown-file (file-name-sans-extension markdown-file)))
    (browse-url (concat (file-name-sans-extension markdown-file) ".html"))))

この関数を使えば、Markdownファイルを選んで一発でHTMLに変換し、そのままブラウザで表示できる。これがなきゃブログなんて書けないぜ。

2. Org-modeによる人生管理

Org-modeは俺の人生のものだ。TODOリストスケジュール管理だけじゃなくて、プロジェクト管理文書作成まで全てを一元化してる。

特にカスタムキャプションプロパティドロップダウンメニューを駆使して情報整理に命懸けてるんだ。

さらに、Org Babel使ってRやPythonコードを直接実行しながらデータ分析なんて日常茶飯事だ。この機能のおかげで、データサイエンスEmacs内で完結しちまうからたまんねぇよ。

3. キーバインドマクロ神業

俺のキーバインド設定は他者には理解不能レベルだ。

自分専用にカスタマイズしたショートカットが数百種類もあるんだぜ。

「M-p」で過去コミットメッセージを呼び出す機能なんか、Gitとの連携が一瞬でできるから開発効率が飛躍的に向上する。

さらに、Emacsにはマクロ機能があるから自分操作を記録して再生することもできる。

この前、自分専用のマクロを作って、特定フォーマットドキュメントを一瞬で整形することができた。

これで「お前は本当に人間なのか?」って言われてもおかしくないレベルだ。

4. Emacs Lispによる拡張

Emacs Lispを書くことが俺の日常になってる。この前、自分だけのコード補完システムを構築したばかりだ。

この機能のおかげで、特定キーワード入力すると関連するコードスニペットが自動的に提案される仕組みになってるからコーディング中に思考が途切れることなスムーズに進行するぜ。

コード補完システムサンプル
(defun my-auto-complete ()
  "カーソル位置に基づいてコードスニペットを提案する"
  (interactive)
  (let ((input (thing-at-point 'symbol)))
    (if input
        (let ((completion-list '("myFunction" "myVariable" "myClass")))
          (setq completion-list
                (cl-remove-if-not
                 (lambda (item) (string-prefix-p input item))
                 completion-list))
          (if completion-list
              (message "候補: %s" (string-join completion-list ", "))
            (message "候補なし")))
      (message "シンボルが見つかりません"))))

この関数ではカーソル位置からシンボルを取得し、それに基づいて候補を表示する。これがあればコーディング中も迷わず進められるぜ。

5. Emacsと共に生きるコミュニティ

Emacsユーザーとして活動している中で、多くの仲間と出会った。

彼らとの情報交換や共同開発は刺激的で、新しいアイデアが次々と生まれてくる。この循環こそが俺の成長につながっていると実感しているんだ。

最近では、自分が開発したパッケージGitHubで公開し、フィードバックを受け取ってさらなる改善点を見つけたりもしている。

このフィードバックループがあるからこそ、自分自身進化し続けられるんだ。

結論Emacsこそ俺の人生

今やEmacsは単なるツールじゃなくて、俺自身の一部になってる。

この深淵世界で探求し続けることで、新たな発見や挑戦が待っている。

これからEmacsユーザーとして、自分だけのユニーク環境を追求し続けていくつもりだぜ!

2024-12-17

Top Trends in Travel Portal Development Every Business Should Watch

In the ever-evolving travel industry, travel portal have become fundamental tools for businesses looking to enhance customer experience It's streamline operations. With traveler increasingly relying on digital platforms to book everything from flights to hotels, the need for sophisticated, user-friendly, It's high-performing travel portals has never been more crucial. The growth of this sector is driven by numerous factors, including technological advancements, consumer behavior shifts, It's the quest for organization. This article explores the top trends in travel portals development that every business should pay attention to in 2024 It's beyond.

1. Artificial Intelligence and Machine Learning in Travel Portal Development

Artificial Intelligence (AI) and Machine Learning (ML) have quickly become foundational components of travel portal development. These technologies are revolutionizing the way businesses personalize services, predict consumer behavior, and optimize booking processes. AI and ML algorithms analyze large data sets to understand customers preferences, allowing for real-time customization of travel recommendations. From dynamic pricing models to

customized travel suggestions, AI help businesses offer an unequaled user experience.

For instance, AI chatbots are becoming successively popular for customer service. They can answer customer queries 24/7, assist in bookings, It's even provide real-time travel updates, enhancing the overall customers experience. Furthermore, AI-powered tools such as a recommendation engines analyze past booking behavior to suggest tailored itineraries, making travel planning much easier for user.

2. Mobile-First Approach for Travel Portal Development

With the increasing use of smartphones, as a mobile first approach is no longer optional for businesses in the travel industry. More It's more travelers are relying on their smartphones for booking flights, boardinghouse, It's activities on the go. For travel portals to stay competitive, ensuring seamless mobile optimization is crucial.

A mobile optimized travel portal ensures that users have access to the same features and functionalities on their mobile devices as they would on a desktop. It’s not just about making the site responsive—it’s about creating an intuitive, fast, and easy to navigate experience. This includes features like mobile-specific payment options, mobile check-in for airlines It's hotels, It's easy access to customers support.

3. Integration of Blockchain for Secure Transactions

Blockchain technology is making waves across various industries, and the travel sector is no exception. Blockchain based travel portals offer a significant advantage when it comes to security It's transparency. Blockchain’s ability to provide secure, tamper proof record makes it ideal for transactions involving bookings, payment, It's loyalty program.

By integrating blockchain, travel businesses can ensure secure It's fast transactions, protect customer data, It's reduce fraud. Blockchain also facilitates easier It's more transparent loyalty program management. Travelers can accumulate rewards points across various service providers, all within the same blockchain framework, creating as a more cohesive It's rewarding experience.

4. Enhanced Payment Solutions and Digital Wallets

One of the most significant changes in the travel industry has been the shift toward contactless payment. Digital wallets, such as a Apple Pay, Google Wallet, It's cryptocurrency wallets, are now widely accepted in travel portals. These payment solutions offer a faster, more secure, It's convenient way for travelers to complete transactions.

For businesses, adopting multiple payment gateways is essential for attracting global customer. International traveler can face issues with currency exchange It's transaction fees, but by offering localized payment method It's supporting a wide range of digital wallets, businesses can significantly improve customers satisfaction It's retention.

5. Voice Search and Virtual Assistants

Voice search is one of the fastest growing trends in the tech world, and the travel industry is no exception. Voice search optimization is becoming an essential part of travel portal development. With the rise of virtual assistants like Amazon’s Alexa, Google Assistant, It's Apple’s Siri, travelers are increasingly using voice command to search for flights, hotels, It's destinations.

For businesses, this means optimizing travel portals for voice search. Voice-friendly portal with natural language processing capabilities can provide users with more accurate results It's make booking processes quicker It's easier. Additionally, integrating virtual assistants into portals can enhance customers service by answering common queries It's assisting with bookings.

6. Augmented Reality (AR) and Virtual Reality (VR) Experiences

(AR) and (VR) technologies are transforming the way travelers experience destinations and plan their trips. Intensified Reality allows traveler to view destinations, hotel, or local attractions in real time through their mobile devices. For example, an AR feature in a travel portal could allow user to take a virtual tour of a hotel room or explore a city’s landmarks in 3D.

Virtual Reality, on the other hand, can transport users to a destination before they even book their trip, providing immersive previews of their potential vacation. Integrating (AR) It's (VR) into travel portal not only elevates the user experience but also drives engagement by offering something truly unique.

7. Customizable and Personalized Travel Packages

Personalization is key to standing out in the competitive travel industry. Travelers today expect customizable travel packages that cater to their unique need and preferences. From flight choices to hotel rooms, activities, It's local experiences, organization allows businesses to create tailored experiences that resonate with their customer.

Advanced travel portal use customer data to offer customized deal, travel itineraries, It's destination recommendations. By analyzing past booking behaviors It's preferences, businesses can deliver highly relevant options, thus increasing the likelihood of conversion. Offering dynamic packaging allows users to mix and match services based on their preferences, creating a more flexible It's customized booking experience.

8. Sustainability and Eco-Friendly Travel Options

As a coincidental concerns continue to rise, more travelers are becoming mindful of their carbon footprint. Sustainable travel has become a major trend in the tourism industry, It's businesses are responding by incorporating Eco-friendly options into their travel portal. Whether it’s booking Eco-conscious accommodations, flights with lower carbon emissions, or supporting local sustainable experiences, travelers are now seeking out environmentally responsible options.

Travel portals that emphasize sustainability and provide clear, detailed information about eco-friendly options are likely to attract a growing segment of conscientious travelers. Businesses can also promote their commitment to sustainability by partnering with Eco-friendly service providers and offering travelers the ability to offset their carbon emissions.

9. Integration with Social Media and User-Generated Content

Social media plays a pivotal role in travel decision making. More than ever, travelers are relying on user generated content (UGC) like reviews, photos, and videos from social platforms to guide their choices. Integrating (UGC) into travel portals allows businesses to tap into this social proof It's build trust with potential customer.

For instance, allowing users to share their experiences via social media or review platforms can provide valuable insights for other travelers. Additionally, incorporating social sharing features within the portals itself can encourage users to engage with your brand It's share their travel experiences, thereby driving more traffic to the portal.

10. API Integrations and Multi-Channel Distribution

As the travel landscape becomes more fragmented, travel businesses must offer a consistent experience across multiple channels. API integrations are key to ensuring that travel portals can access real-time data and distribute it across different platforms. APIs allow travel portal to integrate with global distribution system (GDS), airlines, hotels, car rental services, It's other travel-related services seamlessly.

By offering multi-channel distribution, business can maximize their reach, whether through desktop websites, mobile app, or third party platform like OTAs (Online Travel Agents). This integration also ensures real-time availability update It's better inventory management.

Source & Published by: https://www.namantechnolab.com/

2024-10-06

Command-R-plusがすっげーぞと聞いたので初ローカルLLMとして試したらまーものすごく遅くていかんかった

たった100Bでとか言ってるのを見かけたからそれが全体的に見て軽いのかと思ってたら全然だったな

結局Ninja-v3あたりに落ち着きそう

2024-08-20

macos の ctrl と commandwindows みたいに ctrl としてのみ扱う方法教えてくれ

firefox 使ってると commandwindows の ctrl キーなんだけど、terminal で emacs keybind だと windows 同様の ctrl になる。

windows だと区別なく ctrl なのでポジションが変わらんのだが、macos 使ってると ctrl と commandアプリケーションで押し分けねばいけなくてストレスやばい

2024-06-28

To you, the creator, I sincerely hope this message reaches you.

It's sudden, but right now in Japan, creativity is facing a true crisis. Characters like Uzaki-chan, Onsen Musume, and Tojo Rika are being targeted and flamed, game character designs are being infiltrated by political correctness, Johnny's Entertainment is being dismantled, swimsuit photo sessions in parks are being canceled, Hitoshi Matsumoto is being publicly shamed, and the new AV law was enacted without considering the opinions of those directly involved. Every form of expression in every venue is currently under unreasonable pressure.

How does this connect to the Tokyo gubernatorial election? In fact, a major event directly linked to this is occurring in the 2024 Tokyo gubernatorial election. As a creator, I hope this message reaches you.

What I am about to share is a story about someone named Himasora Akane, who you should know about to resist such pressures. But before I dive into that story, I want to express my deep gratitude to my old friend Nozomi for giving me the opportunity to post this article in a place where many creators will see it. As someone who also loves manga, anime, and games, I hope this information will benefit Japanese society and support Nozomi's activities.

Himasora Akane Should Be the Governor of Tokyo

First, I would like to make a straightforward request to you as a creator: please support Himasora Akane for governor. In this election, please write "Himasora Akane" on your ballot. The voting day is July 7th. Even if you are not a Tokyo resident, I ask that you at least listen to this story. If you find it interesting, please share it with your friends, family, and acquaintances. You can check Himasora Akane's campaign promises and the background of their candidacy on their Twitter (X) posts linked below:

Himasora Akane (Tokyo gubernatorial candidate)

@himasoraakane

https://x.com/himasoraakane/status/1804846779399324095

Himasora Akane Will Not Allow Our Culture to Be Burned

Himasora Akane is an ordinary otaku who loves manga, anime, and games. Known as "Cognitive Profiling Detective Akane Himasora," he has been active on Twitter (X) and YouTube, and now he is running for governor. Akane, who is deeply concerned about the repression and destruction of otaku culture, is challenging those who seek to destroy our culture alone. Akane will never allow those who try to burn our culture.

As mentioned at the beginning, all forms of expression are currently under pressure. Otaku culture, in particular, seems to be a prime target.

Uzaki-chan Blood Donation Poster Controversy (2019): A collaboration between the Japanese Red Cross Society and the manga Uzaki-chan was flamed for allegedly being overly sexual in its PR illustration.

V-Tuber Traffic Safety Video Controversy (2021): A V-Tuber hired by the Matsudo Police Department in Chiba Prefecture was deemed too sexual for public agency PR.

Onsen Musume Controversy (2021): Characters personifying local hot springs were criticized as sexist.

Mie Transport Official Character Controversy (2024): A character in a bus driver's uniform released by Mie Transport was flamed for evoking sexual images.

These controversies are often fueled by so-called political correctness and feminism. For creators, these are direct threats. If these factions label your work as sexual and demand it be burned to ashes, could you resist? How would you feel if your painstakingly created work, like your own child, was trampled by people who have no regard for your efforts? Could you continue your creative activities while constantly shrinking away?

Himasora Akane saw something behind these flaming incidents. He started investigating the key figure behind the Onsen Musume controversy, a representative of a general incorporated association in Tokyo. This association's core business, the Young Female Victims Support Project, received substantial public funds from Tokyo. Akane submitted public document disclosure requests to Tokyo and thoroughly dug into the organization. During his investigation, Akane uncovered many suspicions suggesting this project was unworthy of public funding, which he exposed one by one on social media.

Negligent accounting reports, taking protected girls to the Henoko base protest in Okinawa, Communist Party members waiting in the bus used to protect girls—these revelations drew significant attention online. The investigation extended beyond this general incorporated association to other NPOs receiving public funds, and Akane named this cluster of issues the "WBPC problem" after the initials of these organizations.

Akane's YouTube Channel (WBPC Problem Playlist)

https://www.youtube.com/playlist?list=PLI5gTciLKtAXRyzv9j5FiNMcc8eoEBbMN

From here, Akane's story expanded to resident audits, resident lawsuits, and national compensation lawsuits concerning the Tokyo Young Female Victims Support Project. Akane discovered that behind many flaming incidents, there is no clear command structure but a group of various political organizations and activists working together like an amoeba. He named this group the "Nanika Group" (Nanika means "something" in Japanese), a reference to the mysterious, ominous "something from another place" in the manga HUNTER×HUNTER, which Akane loves. The Nanika Group is also connected to welfare interests, where public funds flow unchecked. Akane called this phenomenon "Public Fund Chu-Chu" (siphoning).

For creators, this means the tax money they earn through hard work is used to burn their precious works. It's an intolerable situation.

Himasora Akane Is Fighting Against Those Who Burn Our Culture

In November 2022, a major event marked a turning point in this series of controversies. The general incorporated association under scrutiny held a press conference at the parliamentary office building, gathering media and announcing a lawsuit against Akane. This "Legal Harassment Press Conference," as it was called online, involved multiple layers of power: the government, the media, and a team of seven lawyers targeting a single individual.

However, Akane did not back down. Instead, he intensified his pursuit, exploiting the opponent's careless statements as lawsuit fodder. This led to an outpouring of support on social media, with his Twitter follower count skyrocketing and 160 million yen in donations for legal fees.

The following year, a resident audit request filed by Akane resulted in Tokyo's official website recognizing some improper points and deciding to audit the organization. However, Tokyo's lenient audit led Akane to file a resident lawsuit. Suspicion also turned towards Governor Yuriko Koike for allocating public funds through dubious sole-source contracts. Tokyo began excessively redacting documents in response to public document requests, attempting to conceal the issue. Koike's promise to end document redaction quietly disappeared from her campaign page.

Throughout this battle, Akane has been a target of criminal complaints and faced threats, yet he persists. His book "Netoge Senshi" was released amid bookstore threats, but only the criminal complaint was widely reported by the media, portraying Akane negatively.

Who Is Himasora Akane?

Himasora Akane is an ordinary otaku, a top-tier online gamer during his student days, and a talented game creator who worked for a major game company and later a venture company. His meticulous work on the game "Shin Goku no Valhalla Gate" was betrayed by the company's CEO, leading to a seven-year legal battle that Akane ultimately won, securing 600 million yen. This experience fuels his fierce opposition to having his creations burned.

Before investigating the Young Female Victims Support Project, Akane exposed fraudulent feminist "knights" on his YouTube channel, shaking the internet. He detests lies and has an uncanny ability to detect them.

Akane is a special individual with extraordinary abilities, honed through his experiences in games, court battles, and extensive document analysis. His pursuit of truth and justice makes him a suitable candidate for governor, promising a world without lies and where honest people do not suffer.

What We Can Do to Protect Our Culture

Creative expression can be crushed if we are not vigilant. Even in modern Japan, otaku culture is on thin ice. The recent cessation of Visa transactions for DMM (Fanza) is a reminder of how a single card company can wield its power to dictate what is deemed appropriate expression. Expression freedom is fragile and constantly under threat.

To those reading this, I urge you to vote for Himasora Akane. Support him to protect our culture. Despite his harsh demeanor and preference for solitary battles, he is now seeking help for the first time. Akane feels the danger in this gubernatorial election and believes that if he does not become governor, everything will end. He has taken a stand for the people of Tokyo and Japan.

I wrote this article to support his spirit and spread the word. Please vote for Himasora Akane and help create a miracle.

To you, the creator, I sincerely hope this message reaches you.

Please, I beg you.

2024-06-03

AIはやはり人間より賢い】芦原妃名子問題について聞いてみた。

プロンプト

次の条件で登場人物解釈をしてください。漫画家の芦原先生は、ある日SNS上で声明を出しました。彼女原作ドラマ化した作品が中盤まで彼女意図通りの内容にならず、最終回脚本自分で書くことになった経緯を説明するものでした。彼女テレビ局側が当初の取り決め通りに作らなかったことについて話し合いを求めました。この声明が発表されると、SNSユーザーが騒ぎ出しました。テレビドラマ脚本家を中傷する人も現れました。芦原先生は「攻撃するつもりはなかったのに」と投稿し、テレビ局側が何か言う前に自殺してしまいました。先生は何故自殺したのでしょうか。

Command R+の回答

芦原先生は、自身作品ドラマ化される際に発生した問題について、SNS上で声明を発表しました。しかし、その声明が予想外の反応を引き起こしドラマ脚本家が中傷されるという事態に発展してしまいました。このような展開は芦原先生の本意ではなく、「攻撃するつもりはなかった」と慌てて投稿したことからも、自分言葉が誤解され、意図しない方向に事態が進んでしまたことに動揺していたのでしょう。

先生自殺という選択をした理由は、いくつか考えられます

  1. 責任感と罪悪感:芦原先生は、自身声明きっかけで脚本家が中傷されていることに責任を感じ、罪悪感に苛まれ可能性があります特に創作業界では「表現の自由」と「表現による影響」のバランスが常に議論されるテーマであり、先生表現者としての責任を重く感じたのかもしれません。
  2. 予想外の事態に対する恐怖:SNSは時に予想外の方向に世論を動かします。芦原先生は、自分言葉がこれほど大きな反響を呼び、攻撃的な行動に繋がるとは予想していなかったでしょう。この想定外事態に恐怖を感じ、パニック状態に陥った可能性があります
  3. 創作者のプライド:芦原先生漫画家として、自身作品に強い思い入れがありました。その作品自身意図しない形でドラマ化され、さらにその問題を指摘した声明さらなる問題を生んでしまたことに、創作者のプライドが深く傷つけられた可能性もあります
  4. 孤立感と絶望感:SNS上で騒動が起きたとき、芦原先生はひとりで対応していたのでしょうか。所属する出版社テレビ局などのサポートがあったのかは不明ですが、騒動の渦中で孤立感を感じていた可能性はありますさらに、テレビ局側が何らかの対応をする前に先生が亡くなってしまたこから事態収束解決への道筋が見えず、絶望感を深めたとも考えられます

これらの要因が絡み合い、芦原先生自殺という選択をしてしまったのかもしれません。創作者の表現は、時に思わぬ影響を及ぼすことがあります。この悲劇きっかけに、SNS上での発言の重みや創作者の責任などについて、改めて考える必要があるでしょう。

2024-05-13

オタク建築士に家を任せよう:日本住宅の質を高めるために

 日本建築業界には、残念ながら暗い部分がある。日本建築士試験では、断熱や耐震性能に関する深い知識は求められない。そのため、一般的建築士工務店が、基本的な性能計算方法を知らないというケースも少なくない。さら問題なのは建築基準法では一般家屋の断熱や耐震に関する規制建築士任せになっているため、プロに任せても最低限度の性能が確保されるとは限らないという事実である

 これは、日本住宅の質に大きな影響を与える問題である。断熱や耐震性能は、快適性や安全性に直接関わる重要な要素だ。これらの性能が確保されていない住宅は、夏は暑く冬は寒い地震で倒壊するなどの問題が発生する可能性がある。

 では、どうすればいいのか? 私は、「家を建てるならオタクを名乗る建築士に任せよう」と提案したい。

 オタクと呼ばれる人々は、一般的に、特定の分野に深い知識情熱を持っている。彼らは、その分野に関する膨大な情報を集め、細部にまでこだわりを持つ傾向がある。そして、建築世界にも、断熱や耐震オタクと呼ばれるべき建築士存在する。

 このようなオタク建築士は、一般的建築士とは異なり、断熱や耐震に関する深い知識を持っている。彼らは、最新の技術や素材に関する情報収集に余念がなく、常に最高のパフォーマンスを発揮する方法模索している。さらに、計算シミュレーションを駆使して、建物の性能を最大限に引き出すことができる。

 オタク建築士が家を設計建設すれば、最高レベルの断熱や耐震性能が確保された住宅が実現するだろう。夏は涼しく冬は暖かい地震にも強い家に住むことができる。さらに、オタク建築士は、細部にまでこだわるため、住宅の快適性や美しさも追求してくれるだろう。

 オタク建築士に任せることには、もう一つ重要メリットがある。それは、自分自身で家を理解し、メンテナンスできるようになるということであるオタク建築士は、ただ家を建てるだけではなく、その家の断熱や耐震性能がどのように実現されているか説明してくれるだろう。なぜこの素材を選んだのか、なぜこの工法なのか、なぜこの設計なのか。その理由理解することで、住む人は家に対する愛着を感じ、メンテナンス重要性も理解するだろう。

 日本住宅の質を高めるために、オタク建築士の力を借りることは有益である。彼らは、断熱や耐震に関する深い知識情熱で、快適で安全な家を提供してくれるだろう。さらに、住む人が家を理解し、愛着を持てるように導いてくれる。

 だからこそ、家を建てるなら、オタクを名乗る建築士を探そう。彼らは、日本住宅未来を明るく照らしてくれるに違いない。

 

※本記事Command R+の助けを借りて執筆されたものであるしかし内容に関しては増田の指示と修正によるものであり、確かな事実であることを保証する。また、著作権フリーとする。

2024-05-12

anond:20240512092242

引き延ばすというより、単に「はい論破有害性を説いて」と聞いたら思ったより回りくどく書いてきたというだけなんだけどね。

ちなみにChatGPTじゃなくてCommand R+です。

2024-05-09

https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa

リファレンス記述

To run a batch file, you must start the command interpreter; set lpApplicationName to cmd.exe and set lpCommandLine to the following arguments: /c plus the name of the batch file.

バッチ ファイルを実行するには、コマンド インタープリターを起動する必要があります。 lpApplicationName を cmd.exe に設定し、 lpCommandLine を /c にバッチ ファイル名前を加えた引数に設定します。

今回問題になった実際の挙動

lpApplicationNameバッチファイルパスを設定するとCreateProcessは暗黙的にcmd.exeを起動しバッチを実行しま

lpCommandLineもcmd.exeに渡されます

2024-05-06

[] 2024-05-06

今日入院している祖母に会いに行く日だ。入院前はもう呆けて風呂も入らないぐらいひどい状態だったが、入院してからちゃんとしているらしい。

それはそうと、lisppython環境を構築する話だが、結局オートコンプリートはうざいし、使う機能といったらautopep8とisortぐらいなので、以下を.emacsに組み込んだ。

(defun python-autopep8-and-isort ()
  "Run autopep8 and isort on current Python buffer."
  (interactive)
  (when (eq major-mode 'python-mode)
    (shell-command-on-region (point-min) (point-max)
                             "autopep8 - | isort -" nil t)))

(with-eval-after-load 'python
  (define-key python-mode-map (kbd "C-c C-r") 'python-autopep8-and-isort))

.emacsファイルには他にも様々な設定を付与したが、ここではコードを書ききれない。

さてそういうわけで週末コーディング趣味としてちゃん機能することはわかったが、毎週作るとなると、いくつも何かを作るよりは一つのタフなものを作りたいと思うわけである

それで、最有力候補は「Elasticsearchのようなものpython実装する」という話がある。

Elasticsearchが徹底された設定外部化によってjsonを多用するのだが、これがあまり柔軟性がないので、コードを直にいじれるようにしたいと思ったためである

例えば自作日本語トーカナイザを組み込みたいときElasticsearchプラグインJavaで書かなければならない。私はJavaが嫌いであり、プラグインを「インストールする」という手順も冗長に感じる。

それよりはpythonで作られた検索システムに、適当トーカナイズ関数実装して呼び出すことができればかなり柔軟であるように思うわけである

難しい点があるとすれば、大規模分散システムへの対応で、金をかけなければそういうシステムテストすることができない。

できるだけ金をかけずに趣味をやるというのがモットーなので、これではまずいわけである

まあ何事も困難というものはある。まずは手を動かすことが重要だ。Linus Torvaldsも"Talk is cheap, show me the code"と言っているではないか

2024-04-25

anond:20240423191358

絵が書きたいなら RTX4090 で余裕。どうせ自分モデルを作るとか言うアホみたいなことしようと思うと 120万とか400万するグラボ必要になる。

LLMやるなら Mac Studio が良いらしいって話が出てるがよくわからん。俺は4090でCommand R +のQ5 がダラダラ喋るくらい出てて、まぁまぁ満足してるけど、将来的にはもっと強いGPU欲しくなるかもれない。

2024-04-23

7bとか8bみたいな極小モデルの性能差なんてほぼなくないか特に日本語とか正気とは思えない応答しかしないし。

Command R +使ったらもうションベンの背比べみたいで8Bとか使ってられんが。

2024-04-20

MetaのオープンソースLLMのLlama3

二日前にMetaがオープンソースの大規模言語モデルのLlama3を出した。

一つ前のモデルLlama2は色々なオープンソースモデルの基となっていたモデル。このモデル性能良いねと思って見たら、Llama2をいじったモデルだったことがよくあった。

今回も、2つのモデルが発表された。70Bと8Bモデル。70Bモデルともなると、ほぼ個人パソコンでは動かないだろうけど、性能については、LLM のリーダーボード最初期のGPT-4 を超えている。

LLMの最重要論文とも言われる"Attention is all you need."の著者の一人の会社が出したモデル"Command R+"が性能が良くて話題になっていた。これもオープンソースだが、今のところこのモデルにも勝っている。このレベルモデルオープンソースであるということはとても価値がある。

ここ一、二ヶ月でようやくGPT-4 と互角に戦えるモデルが出てきた。一時期はClaud3がGPT-4を追い抜いた程だ(OpenAI が本気を出してGPT-4を強化して追い抜き返したんだけど)。もうGPT-4が出て1年が過ぎた。研究者リソースなどは過去に類を見ない程注ぎ込まれたと思うが、GPT-4と同じ性能のモデルはほぼ1年経たないと出てこなかった。OpenAIの凄さがわかる。GPT-4か出てきた当初はあまりの性能の良さに本当にシンギュラリティが起きたんじゃないか驚愕したが、一年使い続けると、粗やら推論能力の低さに気が付いてくる。今年中に出るであろう、GPT-5に期待だ。

LLMの性能リーダーボードhttps://chat.lmsys.org/?leaderboard

2024-03-08

「AはBに命令できる」という表現は「Bがその命令に従う」ということを含意するのか

まあ、含意すると思うのだけど。

では、このことはあらゆる言語共通なのだろうか。

たとえば英語で言えば、commandとorderで分かれたり、canとbe able toで分かれたりするのだろうか。

こういうことを辞書確認するのは難しいのだけど、どうやったら知ることができるのだろうか。

ログイン ユーザー登録
ようこそ ゲスト さん