Skip to content

Instantly share code, notes, and snippets.

@noqisofon
noqisofon / change_the_in.org
Created April 11, 2023 08:05
( ノ╹◡◡╹)ノ 「いっぱい」の「い」を「お」に変えてみるテスト

「いっぱい」の「い」を「お」に変えてみよう。

my $phrase = 'いっぱい';

Raku 言語においては .subst メソッドを使うと文字列の置換を行うことができる。 早速やってみよう。

みんな大好き「おっぱい」になるのは最初の「い」を「お」に変えたときだ。

@noqisofon
noqisofon / index.html
Created March 29, 2023 11:36
( ノ╹◡◡╹)ノ Blob に文字列を入れて、それをどこからともなく出てきたあんかー要素からダウンロードさせるやつ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>何らかをダウンロードするページ</title>
</head>
<body>
<button type="button" id="download-button">ダウンロード</button>
@noqisofon
noqisofon / Adventure004_001.log
Last active March 24, 2023 15:03
( ノ╹◡◡╹)ノ AI ダンジョンでのプレイログ その 4 の続き
# 004 のおそらくラザール地区編になると思われる。
# ラザール地区は王国の北東にある模様。
# ラザール地区へ移動する
> You move to the Lhazaar district.
You walk along the road that leads to the Lhazaar district.
You come to a fork in the road.
On the left side of the road is a bridge. The bridge leads to a small house.
@noqisofon
noqisofon / Adventure004.log
Created March 21, 2023 04:25
( ノ╹◡◡╹)ノ AI ダンジョンでのプレイログ その 4
A kingdom that exists in perpetual peace and general happiness. The kingdom is ruled by an immortal king and the people are ruled by the rule of law. The people of the kingdom are kind and humble, and everyone wants to live in peace and harmony. The kingdom is an exemplar of virtue and justice.
永遠の平和と一般的な幸福の中に存在する王国。 王国は不滅の王によって統治され、人々は法の支配によって統治されています。 王国の人々は親切で謙虚で、誰もが平和で調和のとれた生活を望んでいます。 王国は美徳と正義の模範です。
You are Narelle, a female Hoza's Dragonewt warrior in Perdari-Ge East. You live in the Perdari-Ge district of the kingdom, which is a large district full of farms, mines, and lumberyards. The district has been peaceful for several decades, but recently a member of the royal family has gone missing and soon reports start coming in that Perdari-Ge East is under strange attack. Reports of monsters and demon summoners have been flooding into the local Kingdom of Sempera militia outpost and the situation is getting tense. You are being called to help out the militia.
あなたは Perdari-Ge East にいる Hoza の Dragonewt の女戦
You are Nelly Ofook, a witch living on the edge of the medieval kingdom of Larion. You have a wand and a pet alligator named Peroro. As you sit in your swamp hut mixing a magical potion, you hear a knock at the door. You open it and see a messenger from the king. The man gives you a letter and then leaves.
あなたは、中世のラリオン王国の端に住む魔女、ネリー・オブックです。 あなたは杖とペロロという名前のペットのワニを持っています。 沼地の小屋に座って魔法のポーションを混ぜていると、ドアをノックする音が聞こえます。 それを開くと、王からの使者が見えます。 男はあなたに手紙を渡して去ります。
# 手紙を見る
> You look at the letter.
You open the letter and read it.
Dear Nelly Ofook,
It has come to our attention that you may be in possession of some artifacts belonging to the king.
@noqisofon
noqisofon / Adventure002.log
Created March 19, 2023 12:36
( ノ╹◡◡╹)ノ AI ダンジョンでのプレイログ
You are Royer Kanarewasi, a knight living in the kingdom of Larion. You have a steel longsword and a wooden shield. You are on a quest to defeat the evil dragon of Larion. You've heard he lives up at the north of the kingdom. You set on the path to defeat him and walk into a dark forest. As you enter the forest you see the path and make your way on it.
あなたは、ラリオン王国に住む騎士ロイヤー・カナレワシです。 あなたは鋼のロングソードと木製の盾を持っています。 あなたはラリオンの邪悪なドラゴンを倒すための探求をしています。 彼は王国の北に住んでいると聞いたことがあります。 あなたは彼を倒すための道を歩み始め、暗い森に足を踏み入れました。 森に入ると道が見え、道を進みます。
You walk for what seems like ages, thinking about your next move.
あなたは次の動きを考えながら何年も歩き続けます。
# 邪悪なドラゴンの名前は?
> You say "What is the name of the evil dragon?"
@noqisofon
noqisofon / open-daily-note
Last active March 16, 2023 09:27
( ノ╹◡◡╹)ノ emacs でも今日のノートを開きたさがあった
#!/usr/bin/env raku
# -*- mode: raku; -*-
sub month-to-kansuji(Int $month) {
given $month {
when 1 { '一' }
when 2 { 'ニ' }
when 3 { '三' }
when 4 { '四' }
when 5 { '五' }
@noqisofon
noqisofon / pachipachi.md
Last active February 19, 2023 04:37
( ノ╹◡◡╹)ノ mermaid テスト
  flowchart LR;
      OnStart -- started --> Sequence;
      Sequence -- play --> Play&Wait;
      Play&Wait == target === AudioClipPlayer;
      Play&Wait -- onFinishedPlaying --> Sequence;
@noqisofon
noqisofon / example.json
Created February 11, 2023 01:23
( ノ╹◡◡╹)ノ jansson を使ってみたやつ
{
"name": "Alice Riddle",
"age": 17
}
@noqisofon
noqisofon / innkeepers-line.raku
Created November 27, 2022 06:38
( ノ╹◡◡╹)ノ {1泊の値段} {通貨} だが泊まっていくかい?
my @currencies = <ギメル ポッチ 貨 デナリオン セスティリオン>;
say "{(2..12).pick} {@currencies.pick}だが、泊まっていくかい?";