いかに短く書くか

フリートーク
返信する
メッセージ
作成者
konisi
記事: 893
登録日時: 2005年7月25日(月) 13:27
お住まい: 埼玉県東松山市
連絡する:

いかに短く書くか

#1 投稿記事 by konisi »

暇なので立ててみました。

目的
・コンパイラの限界とバグを知る
・短く簡潔に書く方法を学ぶ

ルール
・コンパイルが通る事
・正しいデータを渡した時、正しい結果を返す事
・あまりにも多くのメモリや時間を使わない事
・下記のような定義ファイルを除き、1つのファイルに全てを書くこと ・お題提供者はまず自分で簡単に作ったコードを投稿する(それが考えうる中での最短である必要はない)
・「TypeDefを定義ファイルに入れて3バイト短縮!」とかはしないでください

文字数の測り方は、
・上記のような定義ファイルをインクルードするための部分は無視
・改行コードは1バイト
・先頭のインデントは無視(ただし先頭以外の部分のスペースやタブ等は計算に含める)
でいきたいと思います。

例(おなじみのHello,World! 40バイト)

コード: 全て選択

Sub main(a,b)
    Print"Hello,World!"
EndSub
Website→http://web1.nazca.co.jp/himajinn13sei/top.html
ここ以外の場所では「暇人13世」というHNを主として使用。

に署名を書き換えて欲しいと言われたので暇だしやってみるテスト。
konisi
記事: 893
登録日時: 2005年7月25日(月) 13:27
お住まい: 埼玉県東松山市
連絡する:

#2 投稿記事 by konisi »

最初のお題は「brainfuckのインタプリタ」で
・メモリ空間は1000バイトくらいで
・AB424で動く事 自分で考えうる最短コードは364バイトです。
Website→http://web1.nazca.co.jp/himajinn13sei/top.html
ここ以外の場所では「暇人13世」というHNを主として使用。

に署名を書き換えて欲しいと言われたので暇だしやってみるテスト。
James227
記事: 24
登録日時: 2025年11月30日(日) 02:10

Re: いかに短く書くか

#3 投稿記事 by James227 »

I have always loved the quiet. The hush of the reading room, the soft rustle of pages, the way the world outside seems to disappear when you're surrounded by books. My name is Eleanor, I'm sixty-one, and I've been a librarian for thirty-eight years. I've watched the card catalog give way to computers, the vinyl records give way to streaming, the patrons who used to come in for research give way to patrons who come in for the free Wi-Fi. The world has changed around me, but the library has stayed the same. A sanctuary. A refuge. A place where anyone can come, no questions asked, and lose themselves in a story.

The library is my life. I don't have a husband, don't have children, don't have anything except my books and my patrons and the quiet satisfaction of a job that matters. I've watched children grow up in these aisles, seen them go from picture books to chapter books to novels that I've recommended myself. I've helped students with their research, helped seniors with their taxes, helped immigrants learn the language of their new home. It's not glamorous work, but it's good work. It's enough.

The problem is that the library is closing. Budget cuts, the mayor said, shaking my hand and looking me in the eye like he expected me to thank him for the privilege of being laid off. Thirty-eight years of service, and I got a handshake and a cardboard box and a pension that won't cover my rent. The library will be sold to a developer, turned into condos or a coffee shop or something else that the neighborhood doesn't need. The books will be sold or donated or thrown away. The quiet will be replaced by the sound of construction and commerce and progress.

I spent my last day in the library doing what I'd always done. I shelved books, helped patrons, answered questions. I didn't cry, not in front of anyone, but I felt the tears building behind my eyes, a pressure that wouldn't go away. When the last patron left and the last light was turned off, I stood in the middle of the reading room, surrounded by empty shelves, and I let myself feel it. The loss. The grief. The end of something that had been my whole life.

I went home to my small apartment, the one I'd lived in for thirty years, the one with the leaky faucet and the view of the parking lot. I sat on my couch, stared at the wall, and tried to imagine what came next. I couldn't. I'd defined myself by the library for so long that I didn't know who I was without it. A librarian without a library. A story without a reader.

I picked up my phone, started scrolling, looking for something to fill the silence. An ad popped up for an online casino. I almost scrolled past it, because I'm not a gambler and I don't have money to throw away. But the ad mentioned a promo code, free spins, a chance to win without risking anything of my own. I'd spent my whole life saying no, being responsible, doing the right thing. Maybe it was time to say yes. Just once. Just to see what happened.

I clicked the ad, signed up, and found a vavada promo codes on a forum. The codes gave me free spins on a slot with a theme that I didn't understand, something about ancient Egypt and pyramids and a pharaoh who looked like he was judging me. I deposited a small amount, less than I'd spend on a cup of coffee, and started playing. I chose the game that the code was for, not because I understood it but because it was free. I spun the reels, watched the symbols fall, and won nothing. I spun again, and won a little. I spun again, and won a little more. The balance on my screen started to grow, slowly at first, then faster, and I felt something I hadn't felt in years. Excitement. The kind of excitement that comes from not knowing what's going to happen next.

The bonus round triggered around midnight. Not the pyramid bonus, the one I'd been playing for, but something hidden. A secret chamber, buried in the game, that I'd never seen before. The screen went dark, and a library appeared. Not a real library, but a cartoon version, with shelves of books and a reading nook and a sign that said "quiet please." The game told me to choose a book, to open it, to trust the story. I clicked on the first book, and my balance jumped. I clicked on the second, and it jumped again. I clicked on the third, and the screen exploded with light and color and sound, and my balance jumped to a number that I couldn't process.

I sat there on my couch, my phone in my hand, staring at the screen. The number didn't change. It was real. It was mine. I did the math in my head, then did it on my phone, then did it again because I didn't believe the first two results. The number was larger than my annual salary. Larger than the cost of a new library, a new life, a new beginning. Larger than anything I'd ever imagined winning.

I withdrew the money immediately, not because I knew what I was doing but because my body was acting on instinct. The transfer took a few days, and I checked my bank account obsessively, convinced that something would go wrong. But nothing went wrong. The money arrived, every cent, and suddenly my life looked different. Not because I was rich, I wasn't, but because I had options. Options I'd never had before. Options that let me make choices instead of just accepting whatever came.

The first thing I did was buy the library. Not the building, the developer had already bought that, but the books. Every single one. I made an offer, negotiated with the city, and walked away with thousands of volumes that had been part of my life for decades. They filled my apartment, stacked on every surface, spilling into the hallway and the kitchen and the bathroom. It was chaos, but it was my chaos. My books. My stories. My legacy.

The second thing I did was start a new library. Not a public library, not one funded by the city, but a small one, in a storefront I rented on the same street as the old one. I called it "Eleanor's," because I'm not creative with names. I filled it with my books, with the shelves I'd salvaged from the old building, with the reading nook that had been my favorite spot. It wasn't fancy, but it was mine. And the patrons came. Not all of them, not the ones who'd moved away or given up, but enough. Enough to fill the chairs, enough to check out books, enough to remind me why I'd loved this work in the first place.

The third thing I did was nothing. Absolutely nothing. I sat in my new library, in my reading nook, surrounded by my books, and I let myself be. Not a librarian, not a retiree, not a woman who'd lost everything. Just Eleanor. A woman who'd spent thirty-eight years saying yes to others and was finally learning to say yes to herself.

The library is still there, Eleanor's, on the same street as the old one. It's small, but it's full. Full of books, full of patrons, full of the quiet that I've always loved. I don't make much money, but I don't need to. The win gave me a cushion, and the cushion gave me freedom, and the freedom gave me the chance to do what I'd always wanted to do. Share stories. Help people. Be useful.

I still play sometimes, on nights when the library is closed and the apartment is quiet and I need something to do with my hands. I still look for vavada promo codes, still play carefully, still walk away when I'm ahead. I haven't hit another big win, and I probably never will. That's fine. I don't need to. I already got mine. A library, a reading nook, a second chance. That's the real win. The rest is just numbers on a screen, a hidden chamber that opened when I least expected it, a librarian who finally learned to check out her own story.
返信する