「generic」を含む日記 RSS

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

2024-02-13

GURPSおぼっちゃまくん

GURPS (Generic Universal RolePlaying System)は、キャラクタースキル能力値、有利な特徴を自由カスタマイズできる非常に柔軟なゲームシステムです。このシステム面白い点は、不利な特徴や低い能力値を選択することでキャラクターポイント(CP)を追加で獲得し、それを使って他の領域での成長を図れることにあります

御坊茶魔GURPS表現する場合、以下のようなキャラクタービルドを考えることができます

1. **有利な特徴**:

- **財産**: 御坊家の莫大な財力を反映するために、非常に高いレベルで設定。

- **地位社会的地位**: 御坊家の地位を反映して高いレベルで設定。

- **特異体質**: 金持ちになる体質や、亀に乗っての移動能力など、彼のユニークな特徴を表現する特技として設定。

- **呪文/超自然能力**: 茶魔語などの独特な言葉遣いや、彼が展開する奇妙な行動やイベント魔法超能力として設定することも考えられます

2. **不利な特徴**:

- **外見**: 人間離れした特殊な骨格や、一般的な美しさからはかけ離れた外見を反映。

- **社会的不利**: 一部の社会的状況や人間関係において、彼の風変わりな行動がマイナスに働く可能性を示す。

- **秘密**: 御坊家の秘密や、彼の身にまつわる秘密キャラクターにとってのリスクとなる。

3. **スキル**:

- 御坊茶魔の多様な活動趣味、興味を反映するために、社交、経済、あるいは特殊技能(たとえば、特定ゲームスポーツでの技能)を幅広く設定。

このビルドでは、御坊茶魔の豊かな生活背景、ユニーク能力、そして彼が直面する様々な課題冒険GURPSルールを用いて具体化しています。不利な特徴を受け入れることで得られる追加のCPは、彼の他の特技や能力さらに強化するために利用でき、非常に個性的多面的キャラクター作成することが可能です。

2023-06-18

anond:20230618010533

原文

Japan review

Japan review it's been a year since I

moved to Japan and I thought it made

sense to finally rate Japan I will talk

about things I like and the things I

don't like which seems to be the only

two options available if you have

opinions about this country

so sugoi or did you know Japan is

actually really bad it's got a lot of

survival issues okay I will list one

good thing and bad thing and I will not

hold back there's no trash bins

where I'm gonna put my trash

I have to put in my pocket

oh

there's always these generic things that

you hear or yes when we you visit it's

kind of weird but then you realize it's

not a big deal anyway let's start off

with number one reason I like Japan

it feels like a giant playground no I

don't mean in the Logan Paul kind of

sense of doing whatever the hell you

want

but rather there's a infinite things all

right lazy feels like to explore and

experience and I've been here a year now

and I don't think I'm gonna get bored

anytime soon although I am having a

child so I don't know how much more I

have time to experience

but it really feels like a whole new

world and if you visited you can

probably relate to it and I'm glad that

even a year in it still feels incredibly

fresh and I even would say that you

realize that the best part of Japan

aren't the touristy places kind of

obviously but there are so many areas

that I found that I really enjoy

visiting and this is probably more

specific to me but you know Tokyo is

very busy and so many times I just catch

myself surrounded by what feels like

hundreds of people and they have no idea

who I am

everyone is just doing their own thing

and that feels so [ __ ] good

now once it was staring at me no one's

following me no one's being weird you

guys are weird and I'm just kidding I

just love the feeling of being able to

exist in public and uh not worrying

about what everyone else is doing like

I've said this before but I genuinely

enjoy talking to fans or when people

approach me it always makes me happy but

it can be kind of frustrating to always

wanting to just do your own thing and

always be

you know so yeah let's move on to the

bad things of Japan number one reason

Japan is bad it's kind of a heavy

subject and I haven't seen anyone else

really talk about it it's not brought up

very often at least and that is cones

there's too many cones in Japan once you

see it you cannot unsee it they're

everywhere they say oh Japan has so many

vending machines there's like five per

one person no the opposite

there's more cones than people why are

there so many cones I need to know we

got the tall ones we got the small ones

we got the funny ones the cute ones the

sexy ones I do like those I just don't

understand that whoever plays these

cones think I'm just gonna barge through

oh thank God there's cones here

otherwise I had no idea what I was gonna

and I realized the cone history of Japan

stretches centuries okay if you played

Animal Crossing sometimes it's a

Japanese game so sometimes you get these

items right you're like oh that's kind

of weird I don't know exactly what that

is but it's probably something Japanese

and then you get the bamboo thing and

you're like what the hell is that what

am I even gonna do with that and then

you see it in real life here in Japan

you're like holy [ __ ] it's a cone that's

a cone they're everywhere

I feel like they are following me

I'm glad I was able to talk about this

I'm for one and willing to call out

Japan knock it off man no more cones

there's enough cones let me tell you

something even better than cones you may

have noticed new merch finally it's been

forever my mom came over she had

unofficial merge because I literally

have no other merch I've hadn't hadn't

merch I'm sorry Mom so we spruced up the

logo got a cool back design the team

that worked on it really truly

understand how my brand and I think they

did such a good job these pieces look

amazing and I think you guys are gonna

really like them as well these are

available for limited time only so make

sure you order now so excited to finally

have this merch available thanks to

amaze for making this happen we are

gonna have one piece that will stay on

the store so my mom will not buy the

wrong merch but for a limited time that

piece will be available in this color

off-white kind of color it looks really

nice and then after that you can still

get it but not in this color that's

you want this one yeah I get it

so yeah check that out if you're

interested I'm so happy about these

designs and I hope you guys would like

them as well all right reason number two

I like Japan yay when we first announced

that we were gonna move to Japan there

was so many people just saying how bad

Japan is actually did you know Japan is

really bad did you know this I have to

list all these reasons now because

everyone is like thing and then thing

Japan ah so I have to tell them and I

it's actually but one thing in

particular that people said was that old

people really don't like foreigners they

hate them so when I was gonna stop by to

say hi to our neighbors who was a little

older at least some of them I was

terrifying I heard all these stories you

know like what are they gonna do to us

so I had my guard up ready for the worst

and I was met with nothing but kindness

and welcoming and I felt like a total

dick for having this preconceived ideas

thanks to other people

and just a side comment like yes there

are definitely probably people that

don't like foreigners and all that stuff

but I realized I should let my own

experience is dictate how I feel about

certain things maybe that's just

ignoring a problem I don't know it just

feels like it's a bad way to approach

life if you always have a negative

expectation you know it's smiling people

may Smile Back

smiled back

thank you sometimes they don't and

that's okay you know anyway my point

being Japanese people are very in my own

experience

are very nice and friendly the majority

at least and yes even to foreigners I

feel like they are especially nice to

foreigners because they think we're like

a kid lost at Disneyland or something

I just asked for directions I didn't

need you to walk me for half an hour to

this specific place I was going but

thank you I appreciate it a lot of times

I go bouldering alone and there's always

other groups of people being supportive

and yelling like I'm about there like go

you can do it I love it I think it's

great you know or if you're small

talking with people people generally

want to communicate with you and I love

having those moments but of course

there's times where people are like oh

you're a foreigner I don't feel like

even trying

which again it's fine speaking of which

reason I don't like Japan number two

their language

I have lived here for a year and I'm not

fluent in Japanese

I am dumb I am very dumb I remember the

moment we moved here I had studied some

Japanese and I was like

Let's test out this knowledge that I

have acquired let's go I'm just gonna

come in it's gonna be dangerous and you

enter a store for the first time and

they're like

what

what oh

what the classic the most common

experiences that you have aren't

necessarily what you're taught in the

textbook yay I know I think that's the

same for anyone learning a language for

the first time but don't even get me

started on the kanji main what the [ __ ]

is this I feel like Japanese is such a

hard language obviously but I don't

think people realize how hard it is at

least me personally because the more you

learn the more you realize you don't

know [ __ ]

for English speakers Japanese is

considered one of the most difficult

languages and because it's just so

different I listed it as bad because

that was my first kind of experience

with it coming here but the more I

interact with people the more it feels

like I'm unlocking new skills you know

oh I made a phone call for the first

time oh I could ask someone over the

phone I know big deal but it's like oh I

can actually do that or even just having

a small tiny yes shittiest conversation

with a stranger it's still something and

it feels good you start to all of a

sudden understand you know a movie if

you're watching oh I understand actually

what's going on here or I can play games

and kind of get what this they're saying

I have to look up words obviously but to

me all those new experiences that it

unlocks to me is very rewarding even

though it's such a challenge I would

actually now say it's a good thing I

played it on its head it was a good

thing all along but I obviously have a

long [ __ ] way to go

and it just I don't think it will damage

time reason number three I like Japan

this is nothing to do with Japan to say

it's more related to me taking a more

relaxed approach to YouTube for my

entire 20s I did nothing but YouTube

that was my life and that's okay but I

also think it was a little toxic

probably you know if I wasn't making

videos I sure as hell was thinking about

making videos I uploaded videos during

our honeymoon

and it feels really good to finally be

free from it you know and I can discover

other things in life there are other

things in life

a new hobbies and interest that I've

always wanted to do I can do and have so

much fun with it surfing I know I would

love for the longest time and I finally

get to do it and it's so [ __ ] amazing

I love learning new things anything that

isn't necessarily connected to all of

this on the internet and that is

something I'm very very grateful that I

discovered so yeah it's not really Japan

I could have done that anywhere but it's

largely why I enjoyed so much here

reason I don't like Japan number three

this is probably the most trickiest one

and it's the rules what are the rules

Japan has so many rules and it's a bit

conflicting for me to complain about

because a lot of the best stuff about

Japan not the best stuff but a lot of

the reasons why Japan works so well is

because of the rules you know the trains

are always on time things just work in

general it's hard to explain the streets

are clean people aren't loud in public

and so on and these are sort of societal

rules that make it happen more or less

but sometimes There are rules that just

don't make any sense and I have no

problem following rules as long as I

understand the reason for it you know

don't talk on the phone on the train

because it's generally annoying when

other people do that to you A lot of it

is just be thoughtful of other people

it's not just about you and that just

makes it more pleasant for everyone but

one rule is especially which I talked

about before is the fact that because of

kovid I'm not allowed to be in the

delivery room for our baby for more than

two hours that's because of covered

rules it just doesn't make sense to me

and I tell people about this like uh

family and friends and they're always

like well why don't you just ask them or

like why don't you talk to them I'm sure

you can there's got to be somewhere and

it's like no it's Japan okay there are

rules and people follow the rules for

better or worse you know so the more I

time I spend Permalink | 記事への反応(0) | 01:06

2022-05-07

同じHDDseatoolsでLong Genericしつつ、Data Lifeguard Diagnosticsでeraseしたらどうなるのっと。

2020-09-04

thinkpad x260を買った

ので、unixbenchの結果を貼っておく。

========================================================================

BYTE UNIX Benchmarks (Version 5.1.3)

System: thinkpad-x260: GNU/Linux

OS: GNU/Linux -- 5.4.0-45-generic -- #49-Ubuntu SMP Wed Aug 26 13:38:52 UTC 2020

Machine: x86_64 (x86_64)

Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")

CPU 0: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4999.9 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization

CPU 1: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4999.9 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization

CPU 2: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4999.9 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization

CPU 3: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4999.9 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization

21:26:57 up 1:01, 2 users, load average: 0.00, 0.00, 0.15; runlevel 2020-09-04

------------------------------------------------------------------------

Benchmark Run: Fri Sep 04 2020 21:26:57 - 21:55:00

4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 38124852.7 lps (10.0 s, 7 samples)

Double-Precision Whetstone 6422.0 MWIPS (9.9 s, 7 samples)

Execl Throughput 4264.8 lps (30.0 s, 2 samples)

File Copy 1024 bufsize 2000 maxblocks 515046.2 KBps (30.0 s, 2 samples)

File Copy 256 bufsize 500 maxblocks 140474.5 KBps (30.0 s, 2 samples)

File Copy 4096 bufsize 8000 maxblocks 1617517.8 KBps (30.0 s, 2 samples)

Pipe Throughput 697605.3 lps (10.0 s, 7 samples)

Pipe-based Context Switching 170352.7 lps (10.0 s, 7 samples)

Process Creation 10427.0 lps (30.0 s, 2 samples)

Shell Scripts (1 concurrent) 9734.6 lpm (60.0 s, 2 samples)

Shell Scripts (8 concurrent) 2353.1 lpm (60.0 s, 2 samples)

System Call Overhead 398924.8 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX

Dhrystone 2 using register variables 116700.0 38124852.7 3266.9

Double-Precision Whetstone 55.0 6422.0 1167.6

Execl Throughput 43.0 4264.8 991.8

File Copy 1024 bufsize 2000 maxblocks 3960.0 515046.2 1300.6

File Copy 256 bufsize 500 maxblocks 1655.0 140474.5 848.8

File Copy 4096 bufsize 8000 maxblocks 5800.0 1617517.8 2788.8

Pipe Throughput 12440.0 697605.3 560.8

Pipe-based Context Switching 4000.0 170352.7 425.9

Process Creation 126.0 10427.0 827.5

Shell Scripts (1 concurrent) 42.4 9734.6 2295.9

Shell Scripts (8 concurrent) 6.0 2353.1 3921.8

System Call Overhead 15000.0 398924.8 265.9

========

System Benchmarks Index Score 1152.9

------------------------------------------------------------------------

Benchmark Run: Fri Sep 04 2020 21:55:00 - 22:23:04

4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables 103355568.3 lps (10.0 s, 7 samples)

Double-Precision Whetstone 22425.8 MWIPS (9.9 s, 7 samples)

Execl Throughput 10514.5 lps (30.0 s, 2 samples)

File Copy 1024 bufsize 2000 maxblocks 878593.5 KBps (30.0 s, 2 samples)

File Copy 256 bufsize 500 maxblocks 237997.4 KBps (30.0 s, 2 samples)

File Copy 4096 bufsize 8000 maxblocks 2896282.9 KBps (30.0 s, 2 samples)

Pipe Throughput 1718493.4 lps (10.0 s, 7 samples)

Pipe-based Context Switching 381500.2 lps (10.0 s, 7 samples)

Process Creation 26280.8 lps (30.0 s, 2 samples)

Shell Scripts (1 concurrent) 18979.1 lpm (60.0 s, 2 samples)

Shell Scripts (8 concurrent) 2716.0 lpm (60.1 s, 2 samples)

System Call Overhead 951109.4 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX

Dhrystone 2 using register variables 116700.0 103355568.3 8856.5

Double-Precision Whetstone 55.0 22425.8 4077.4

Execl Throughput 43.0 10514.5 2445.2

File Copy 1024 bufsize 2000 maxblocks 3960.0 878593.5 2218.7

File Copy 256 bufsize 500 maxblocks 1655.0 237997.4 1438.1

File Copy 4096 bufsize 8000 maxblocks 5800.0 2896282.9 4993.6

Pipe Throughput 12440.0 1718493.4 1381.4

Pipe-based Context Switching 4000.0 381500.2 953.8

Process Creation 126.0 26280.8 2085.8

Shell Scripts (1 concurrent) 42.4 18979.1 4476.2

Shell Scripts (8 concurrent) 6.0 2716.0 4526.6

System Call Overhead 15000.0 951109.4 634.1

========

System Benchmarks Index Score 2462.3

2020-03-03

治験に協力したい人だけどうぞ anond:20200303130612

アメリカみたいにジェネリックを厳しくチェックする必要があるが日本はしてないんだもの

その上、まともに勉強してない医者薬剤師が多いしな日本場合


ジェネリックの普及率が高いアメリカでは

政府機関FDA(アメリカ食品医薬品局)下位組織医薬品評価研究センター

ジェネリック医薬品局』(The Office of Generic Drugs)があってちゃんとチェックしてるやで

日本はどこの政府機関がやってるの?

医者薬剤師教育も誰が?


税金節約しなきゃ意識が高いなら分割調剤(お試し調剤)すると良いが

日医と日薬は自分の取り分(点数)で言い争っているようにしか見えんがな

https://www.m3.com/open/iryoIshin/article/716070/



追記:どうしようもないのは変わらんけど2014年ジェネリック部門独立させたみたいね。推進するなら部ではなく局として独立させる規模の話だと思うけどな(省>局>部)

http://www.nihs.go.jp/dec/rs/iyaku/iyaku2017/02HI.pdf

2019-10-26

[] ジェネリック

英語の"Generic"からきており、Wikipediaによると「一般的な」だとか「ブランドに囚われない」という意味らしい。

日本では、この言葉を有名にしたジェネリック医薬品ネガティブイメージから、俗に「代用品」だとか「互換」の意味合いで用いられることも多い。

2019-06-21

Javaをメインで書いているわけではないけど

別にJava良くないか

なんならRubyより静的言語だという点で優れているような。

最近Go流行っているが、それならJavaだって同様に良さそうな気がする。

Java批判すべき点ってなんなんだろう。

- 記述冗長

- nullがたまにうざい

- なんか重厚な感じがする

- 重厚アーキテクチャ流行りすぎた?

- ORMとかが重厚なのが多かった

- ビルドツールが洗練されていない時代があった

- 故に環境構築が大変だった

- tomcat + jar みたいなのがだるかった?

- strutsがしんどかった

- 未だにstruts脆弱性が見つかったりするところ

- xml地獄からアノテーション化したりいろいろと模索していた

- なんかJava案件地雷が多かったとか?

- ちょっと昔には「俺たちイケてるプログラマ」はみんなRailsに移っていった流れがあった?

- Effective Javaよいが、そもそもそういうtips意識せずにそう書けるような言語仕様になってほしかった気もする

- 非同期処理やスレッド処理がやや難しかたか、あるいは言語側でのサポートが薄かったか(?)

言語仕様的な批判と、エコシステム的な批判に分けられそうなきがするな。

関数型言語の関心はScalaClojureに全フリしてもらって、Javaシンプル機能を持つGo方向性なModan Javaになっていってくれれば良さそうな気も。

httpサーブレットとかそのへんが微妙だったかもしかしてGoみたいにnet/httpライブラリが標準であればそれをベースにすることでオレオレフレームワークの乱立を避けることができるか、と思ったけどJAX-RSとかがあるな。

Goだって冗長記述必要言語だが、好かれているし、Javaも悪くない言語な気がするんだよな。

まあ何でもいいが。

ロジカルに考えているようで結局なところ雰囲気的なところに左右されているエンジニア多い気がする。

まあわいも、人気な言語に乗っておいて高単価を得られたほうがいいのでそうするが。今の所Goが肌にあっているんだよな・・。3年ぐらい使って熟練度上がってきたし、さほど悩まずにコーディングすることができる。

PHPの人が好きな、あるいはRubyのmethod_missingなど活かしたテクコードは、書いているやつは気持ちいかもしれないがわいは明示的にinterfaceがわかるコードが書かれていたほうが好きだ。型で振る舞いがわかったり制御されていないと分かりづらくない?複数プロジェクトを掛け持ちするから、読むときに前提知識が少なく読めるコードがいい。

まあJavaもリフレクションでテクいことができる気がするな。

Goがいい。誰が書いてもだいたい同じコードになるから、誰かに作業を振ったとしてもレビューやすい。

まあこれからJavaを書く気はしないが、GoAPI書いているマンから見ると、JAX-RSとかでゴリゴリAPI書いていくの全然悪くないんじゃないかと思うのであった。

最悪別にGeneric入らなくてもいいかもな。別にそんなに困ってない。はいってくれるなら、はいってくれたほうがいいが。sliceに対してmap, each, filter, existsなどのメソッドが生えることになるイメージかな。まあそれは欲しくなるけどな・・・

Scalaもいいんだが、たまにイキったコードを書くと分かりづらくなる時がある。イケてるコードを書こうと思ったとき結構パワーを使う言語だ。なんかモナドってジェネリックを更に強くしたやつだとも捉えられるような気がするな。ゴリゴリ関数型で書こうと思った場合プロジェクト全体に影響がある話なのでアーキテクチャ設計に力がいる気がする。

年をとると大事にするポイントが変わってくるな。昔はスーパープログラマになりたくて関数型言語とかやっていたが、今はいかに効率よく仕事をする=金を稼ぎ自由を得るかを重視している。職業プログラマとなったわけだ。仕様固めたりリリースしたり不具合対応したり運用したり、フリーランスなら税金計算したり、金儲けの方法考えたり忙しいんじゃ。今は結局スーパープログラマとは何か悩ましいよ。「プログラマとして」キチガイレベルにすごい人間というのはまだ見たことがないかもしれない。コーディングが早い?バグ修正が早い?パフォーマンスやばいコードを書ける?設計が優れている?

わいのレベルが低くて、高い人間凄さに気づけていないのかもしれないな。

2019-01-17

推しジェネリックは求めてない

ジェネリックgeneric

一般的であること。共通していること。

2 (商標名ではなく)一般名。総称

新薬特許期間の切れた後に、他社が製造する新薬と同一成分の薬。効能用法、用量も新薬と同じ。開発費がかからないため価格が安い。ジェネリック医薬品。後発医薬品後発薬ゾロ薬。→先発医薬品

コトバンクより引用

3あたりの意味を受けてヲタク界隈では「AではないけどAとして扱えるB」みたいな使い方をする、と思う。そして私は推しジェネリックを求めてはいなかった。そんな話だ。

ぼかして書くのが苦手なので察せてしまうかも知れないがそこは許して欲しい。

私は声優のXくんがすごく好きだ。そのXくんの出演してる作品が終わって、当時他の作品にも出ていなかったものからもうXくんの新しいお芝居が聞けないとすごく悲しかった。

そんな時Xくんにソシャゲお仕事が来た。

インキャラのうちの一人で、なんと歌いもする。ずっと聞きたかったXくんの歌が聞ける。聞いた。めちゃくちゃ上手かった。キャラクターもすごく魅力的で、Xくんの演じるYくんのこともすっごくすっごく好きになった。

Xくんが他にもたくさんお仕事をして、もちろんソシャゲお仕事もしていたある日、私にとって大事件が起きた。

少し苦手意識を持っていたソシャゲにXくんの演じるキャラクターが追加された。

日頃からXくんのキャラが追加されたら始めるからと周りに言っていた私は秒でDLした。この世は推し正義なので私のちっぽけな苦手意識などどうでもよかった。友人たちもハマっていたし一緒に盛り上がるのも楽しかった。

その時はこのゲームでXくんが演じるZくんへの違和感無視できた。

でも抱いていたには抱いていた。その違和感はYくんとZくんの類似点だ。

それぞれ役者だが、その道に進むことを決めたきっかけがずっと好きだったスポーツの道を断念することになったが、舞台の上に立つ憧れの人を追いかけて自分役者を目指した』というものだ。

……いや、そこ被せてくる?

どちらのゲームもこういう理由役者を目指しているキャラクターは他にはいない。よりによって同じ声優キャラでそこを被せる?

まあでもハマりたてのジャンル楽しい気持ちがわかる人も多いだろう。ハマりたてブーストもありそんなこと気にしないでいれるくらい私は楽しめた。ちらほら違和感は抱き続けたがそれでも楽しかった。私は推しキャラなら好きになれちゃうな、ワハハ、と陽気だった。

この日まではそうだった。

ある日イベントが始まった。Zくんがたくさん出てくるイベントだった。好きな子が出るとのことでウキウキしながらイベストを読み進めていったが、そこで私は夢から覚めてしまった。

Zくんのクジ運が悪いという設定が明らかになった。

Yくんも、クジ運が悪かった。

なんでかわからないけどここで何か張り詰めていたのもがプツリと切れて、私は、そっか、となった。ZくんにYくんのジェネリックを求めてないのに、やたらとZくんがYくんを思い出させる。その事がやたらと悲しくて苦しくて、わたしはYくんのことが好きなんだな、と本当の意味で実感してしまった。

先に苦手意識を持っていたと書いたが、このソシャゲカードひとつがYくんのイラストをゆるパクしたのでは? という書き込みを見かけたことがあり、実際私はそうだと感じてすごく悲しかった。

このソシャゲと同じ会社の別ソシャゲコラボしたこともあり、全く知らない! とは言えないんじゃないか? というのも私の悲しみを助長させた。

ていうか同業他社だし同じ声優なんだからもっと……もっとこう被せないこと出来なかったの? 何で?

とにかく『クジ運が悪い』という設定の類似で私は一気に力が抜けてしまった。以前と同じようにZくんを好きと言えなくなってしまいそうだ。

しかしたら今私生活の立て込みもあり疲れてるからこんな感情になったのかも知れない。そうだといいな。キャラクターに罪はないって思いたいし。

なんかもうごちゃごちゃだけどどうしても吐き出したかった。早く元気になって推しをたくさん応援したい。

2018-05-10

Ichinose must have been very disappointed.

You're the first like-minded friend he's ever had.

Your performance yesterday was inspiring. I'm impressed though not surprised.

I was hoping your praise in particular wouldn't be so generic.

Sensei!

Can I ever hope to move people with my playing the way Kai did? Can I someday..?

I want the honest truth, so please don't hold back.

Fair enough. Since you're aiming to be a professional, I'll give you the unfettered, honest truth. Amamiya, you need to learn to appreciate your own piano playing more. Do that, and you'll understand. You need compare yourself against others. you gave a good performance. Your future excites me.

From the line of "Piano Forest"

2016-07-25

gitにおけるコミットログ/メッセージ例文集100

私はコミットログの書き方に悩む英語の苦手な人間である。実際、似たような人は世の中に結構いるようで、頻出単語を集計したりまとめたものは既にあって役に立つのだけれど、これらはあくま単語の話であり、具体的な文を構成する過程でやっぱり困る部分がかなりあった。

要するに、どういう時にどういう文が使われているのか、ということを示した例文集が欲しいのであるググると他にも「例文集があればいいのに」みたいな声はあるくせして、しかし誰も作ろうとしない。何なんだお前ら。それじゃ私が楽できないじゃないか

仕方なく自分でまとめたので、増田に垂れ流しておく。

はじめに

ここで挙げているコミットログは全て実際のコミットログから転載である。当然ながら各コミットログ著作権はそれぞれの書き手にある。いずれも各英文でググれば出てくるし、フェアユース範囲なら許してくれるだろうと考え名前プロジェクト名は割愛したが、ここにお詫びと感謝を述べておきたい。

抽出条件だが、参考にできそうなコミットログを多く含んでいそうなリポジトリGitHubSTARの多い方からざっと目で見て適当に選び、それぞれ最新コミットから5000件抽出した(あわせて前処理として、コミットログ冒頭のタグ情報は消去した)。

結果として対象としたリポジトリは以下の通り。

atomのみ5400件抽出していたため、計25400件のコミットログベースである。このうち、以下の条件に合致するものは参考例にすべきでないとして一律排除した。

こうして残った8540件を眺めながら、適当に切り出したのがこの用例集である個人的に「うーんこの」と思った表現も、散見される場合は載せた。

ということで、以下用例を羅列していく。

用例集

オプションフラグメニューを追加した
ファイルを追加した
メソッド機能を追加した
実装を別のものへ切り替えた
  • Use args.resourcePath instead of args.devResourcePath
  • Use arrays instead of while loops
  • Use auto instead of repeating explicit class names
  • Use weak pointer instead of manual bookkeeping
  • Change all uses of 'CInt' to 'Int32' in the SDK overlay
  • Change Integer#year to return a Fixnum instead of a Float to improve consistency
新しく何かに対応した/機能上の制約を取り払った
何かを使うようにした
より好ましい実装に改良した
何かを出来ない/しないようにした
  • Don't bail reading a metadata instance if swift_isaMask isn't available
  • Don't exit until the parent asks for an instance
  • Don't include Parent pointer in Nominal/BoundGeneric TypeRef uniquing
  • Don't use MatchesExtension for matching filters
  • Don't use ES6 class for AutoUpdater windows class
  • Don't use MatchesExtension for matching filters
  • Avoid `distinct` if a subquery has already materialized
  • Avoid infinite recursion when bad values are passed to tz aware fields
オブジェクトの内容や挙動確認やすくした
Assertを追加した
不要コードを除去した
コードを移動した
名前修正した
さなバグタイポ修正した, 警告を潰した
バグや好ましくない挙動修正した
テストコメントドキュメントを追加した
テストを削除した
テストコメント修正した
ドキュメント修正した

表現傾向とまとめ

以上の用例をふまえ、今回の参考ログ8540件から先頭の単語を出現回数で並べると次のようになった。

Add1149
Fix1014
Update584
Remove566
Use382
Don't260
Make228
Move178
Change103
Rename85
Improve76
Avoid68
Allow65
Implement60
Handle58

コミットログの基本形はもちろん動詞 + 名詞である名詞固有名詞複数形、不可算名詞が多いが、単数形場合冠詞は a が使われるか、あるいは省略される。the はまず使われない。

何かを追加した、という表現では非常に広く Add が使われる。メソッドからテストドキュメントに至るまで大概これでまかなえる。

一方、何かを修正した、という表現では広く Fix が使われる。「何か」は typocrash といった単語からメソッド名まで幅広い名詞を取るが、動名詞はあまり取らないのと、that節は取らないのでその点は注意が必要である

Fix は「何かが正しく動くようにした」ことを示し、正しい動作内容が何かを説明しない。そこで正しい動作内容に言及したい場合Make sure が使われる(こちらはthat節が取れる)。ただし Fix よりもニュアンス的に重い表現と思われ、Fix を使わず Make sure ばかり使うのはちょっとキモいのではないかと思う(Ensure はさらに重い表現っぽい)。

また、Fixtypo 以外でのドキュメント修正に対して使われることは稀である。対して Update はドキュメントコメントテストに使われ、本体コード修正に対しては使われない。本体コード修正にあわせてテスト更新したなら Update が使われる。ただ、テスト機構それ自体バグ修正したなら Fix である

無駄な何かを単純に除去したなら Remove を使う。これまでのもの(A)からのもの(B)に切り替えたのであれば Use B instead of A か Change A to B が使われる。新たに何かを利用するようにしたのであれば Use を、利用を取りやめた場合Don't use を使うことが多い。

何かをしないようにしたなら Don't を、内部実装効率化なら Make A + 比較級/形容詞Improve が使われる。

中身の変更を伴わない単なる名前の変更なら Rename A to B、コード機能論理上の場所を移動させたなら Move A to B である

この辺はリファクタリングと呼ばれる行為と思うが、Refactor というぼんやりした動詞はあまり使われず、このように変更内容の種類に応じて動詞が使い分けられている。

余談

コミットログにはWhyを書くべきだ、というのを何かで見かけたので because とか since を使ったログがどの程度あるかを調べたが、8540件のうち22件だった。基本的に短く、シンプルに、一目で意味が取れるログが好まれる傾向がある。例えば get rid of とか2件しか使われておらず、圧倒的に remove である

一方で、シンプル単語だけど開始単語としては使われないものもある。例えば次のような単語である。Expand(9)、Extend(8)、Print(5)、Optimize(5)、Publish(4)、Append(4)、Modify(3)、Manage(2)、Revise(2)、Dump(2)、Insert(2)、Migrate(2)、Enhance(1)、Edit(1) 。いずれもカッコ内は8540件に対する冒頭での登場回数である。結局、より一般的平易な単語で表せたり、Refactor同様に抽象度が高すぎると使われないのだろう。

おわりに

8000件もログを見たおかげで、迷いなくコミットメッセージが思いつくようになったのが個人的には今回書いてて最大の収穫だった。たぶんカンニングペーパーを作る行為それ自体効率のいい学習になるという話と同じだと思う。

このまとめも100以上用例を転載してあるので、それを読むだけでも多少は効果があるんじゃないかと思う。同じようにコミットログ書きたくねぇなぁ英語わっかんねぇなぁと思っている人にとって、何か役に立つところがあれば幸いである。

2016-05-29

富士通退職した話」に言及とついでに自分の話でも。

自分も前に富士通に居て既に退職してます。後で詳しく書くけど、ソフトウェア開発職に居たです。

富士通を退職した話

彼のへの感想

富士通はクソでっかい会社なんだし、サイト見ればメインフレームやってるのだって判るんだから、開発職を希望したらメインフレーム関連の開発やる可能性あるのは当然予見出来るだろうし、それを想像してなかったのなら情弱とかブコメで言われてしまうよね。あと何も記述が無いか想像だけど、「それほど有能ではない」と判断された可能性もある。と言っても学生が思う「開発者として有能かどうか」ってのと会社でのそれってのは別物で、要するに学生自身自分が実績もあって優秀だと思っても、会社的にはそうでないのよね。そうなると(後述の富士通入社して10年が経った人の話にもあるのだけど)新人能力客観的判断材料って大学資格応用情報レベル以上)程度なのよね。資格に関しても基本情報なんてMARCHクラス以上の人間なら受けたら取れて当然だから、「有能かどうか」の判断材料にならない。就活の際に本気でIT業界に入りたいかどうかの判断材料にはなる程度。自分の同世代富士通本体に入ってソフトウェア開発関連に配属された人のプロフィールを見たけど、確か偏差値的には少なくとも神戸大学とか千葉大学あたりの修士しか居なかった覚えがある。あと確か2~3人がソフ開持ってた気がする。だから、この増田がどの程度だったのかなと。

ただ、20人月案件が具体的に何かは判らないのだけど、自分の在籍していた当時でも炎上巨大案件というのはあって、(自分が知ってるのは確かデジタルテレビがどうのこうのとか言ってた)、そういうのに入社して間もなく入ってしまうと自身勉強等が出来なかったり潰されたり最悪死んだりするんで、そういう意味でも逃げるのは正解の一つ。(自分炎上案件に放り込まれ新人が寮で死んでたとか話を聞いたことある

上司対応はまあこれだけ見ればクソだわな。

富士通を退職して思うこと

はあ、としか。この人がこう判断した際の判断材料にするであろう自己体験を具体的に書いてないので、意識高い系がフカしてるようにしか見えない。あと、たった3年しか居なくてあの巨大企業経営とか体制とか理解出来るんかね?と思わないでもない。自分とは部署が違うだろうから当然かもしれないけど、自分体験とは違うなーって感じ。自分は、外から見たら馬鹿みたいな事やってるように見えるかもしれないけど、経緯や目的巨大企業特有問題があってそうなってるんだなって思う事が多々あった。

富士通に入社して10年が経った - blog

近い時期に入社したと思われる。具体的な話が自分経験と一致してる。特に富士通ソフトウェア開発と言えばミドルウェアの開発が主だというのは、富士通内部じゃないとなかなか(特に学生なんかじゃ)判らないかなと。

それでこれらの話を見てどんな人が富士通(というか大企業)に向くのかなと考えたんだけど、「やりたいこと」そこまで明確じゃないけどコンピュータは嫌いじゃないって感じで、地頭がまあまあ良くて勉強に関しても要領よくやれる(要するにそこそこの大学に行って卒業した人)、それでそこそこ安定した職・収入目当てな人かなと。ってコレ書いててふわふわしてる人みたいであまり良い印象の人物像じゃないな。マッチングミスはどうしても起きると思うし、学生の頃に思う「やりたい事」って往々にして変わったり間違いだったりするし、そもそも学生の頃に明確な「やりたい事」がある人の方が少数派でしょ。だからこういうそこそこ優秀だけどふわふわしてる人の方が良いんじゃないかなとか。逆に、ちゃんと「やりたい事」が明確にあるけどまあ安定はしたいって人はどうしたらいいのかって言うと、自分みたく大企業の子会社を狙うと良いんじゃないかなと。子会社ならその会社がやってる事が理解やすいし、入った後の配属の希望も大きく違ったものにはなりにくいし。まあ子会社子会社で色々アルかもしれないけど。

で、自分入社から退社までの話。

入社10年ぐらい前。入ったのは富士通の子会社で主にミドルウェアの開発をやっている所でした。入社して1~2年したら子会社の統廃合とのことで富士通本体連携してる部署自分がそうだった)は富士通本体になりますとのことで富士通本体の方に移ったという経緯ですね。別に待遇とか元々本体と同じだったから変わらず、事務関連が小回りきかなくなったぐらい。入社してから退職までは5年ぐらいでした。辞めた理由実家事業を継ぐ事にしたため。

入社して数ヶ月の時にある温泉地にある某所でその手の開発をやってる子会社沢山と

富士通本体ソフト開発配属の人達研修をやったのだけど、その際に富士通本体人達と知り合った。(この際に全員のプロフィール冊子が配られた)そのときは流石子会社に入る人達本体とじゃレベルが違うな~と思いましたね。(ちなみに自分MARCHより下の院卒。)

自分が配属されたのは某製品部署API部分チーム。その製品C言語Java言語からも使えるように出入り口を用意する部分。中でやってる事は指定されたIPポートプロトコルに沿ってデータ投げるだけなんだけどね。ちなみに配属希望の際は「そこそこの忙しさの所がイイ」と言っていました。「バリバリに働きたい」と言ってた同期は多忙ヤバい所に配属されてました。他にもチームがいくつかあったけど、それらのうちの一つは例の「山奥の工場」でしたね。自分が配属された当時はC言語APIリニューアルするって開発してたのだけど、設計担当Javaしかやったことない人で色々とC言語流儀に反してて後々のメンテが大変でした。まあそれでもリニューアル前よりは遙かに良くて、以前はユーザに見せてる関数名が ○○search1 ○○search2 ○○search3 とかでしたね(ちなみに機能はそれサーチか?思うのもあった)。もっと酷かったのが初期製品Javaの公開メソッドで、マニュアルには「このメソッド引数○○を□□を指定した場合戻り値Objectを△△にキャストしてください。××を指定場合は…」という「これ製品にして売ってたんだ…」と思うレベル。もちろんコレがダメだったってのは開発側も認識していて当時は既にリニューアル済みだったけど。リニューアル済みでも少し微妙だったけどね。

これは、ミドルウェアの開発をやってる人達って基本的C言語が主でJavaとかをやってる人がほぼ居なかったからだと思う。上司もそういうのは良くないってのは認識してた。対象OSWindowsLinuxSolarisだったけど、そんなにたいした事やってなかったからほぼ同じコードだったような。ソケットの一部だけ違ってたっけかな。

それでそのバージョンの開発が終わったあたりで、.NET Frameworkが出始めてきたので次バージョンでは.NET FrameworkAPIを作る事になりまして、自分が少し勉強していたのでそれの設計から担当する事に。当時は.NET Framework 1.1で今思えば少し時期が早かったと思う。2.0Genericが出てからやった方が良かったと思うんだけど、そういうの政治的判断だし結果論だしなー。それまでにRubyとかオブジェクト指向言語に触れてその辺の勉強もしていたので、.NET用のAPIに関しては設計実装結構良い感じに出来たと思う。ああ、そういえばRuby用のAPI効率化の開発ツールとかの名目仕事中に勝手に作ってたなあ。他にもC言語APIも内部実装がクソすぎ!とキレてユーザ公開関数インターフェースだけ同じで中身をフルスクラッチした事も。もちろん絶対LDしてるんで完全に趣味なんだけどな。これでAPIC言語Java.NETになった訳だけど、現場案件で使われたのってほぼ全てJavaだったと思う。(開発中のサーバテストアプリC言語だけど)。要するに自分が数年関わったコードが世の中ではほぼ使われてない訳でして、取りそろえとして必要だったとはいえ世の中の役に立ってないってのは嬉しくは無かったですね。まあ、大企業仕事なんてそういうもんです。.NETに関してはそのバージョンが出る頃はその製品があまり売れてなかったんだか使われたって話は聞かなかったですね。ほほほ。大企業に勤めるのならこういう覚悟必要かもね。

で、.NETAPIが出来たあたりに開発ネタがなくなって保守気味になってきたので、人員整理作業整理との事でインストーラと切りたいけど一度やったからには切れない補助製品担当が増える事に。インストーラWindowsがInstallShieldというクソみたいな言語上で作られたものLinuxSolarisシェルスクリプトのもので、InsallShieldの方のコードはあまりにクソなのでリファクタリングさせてもらった。この辺の開発は少なかったのだけど新OS対応(Vistaとか)とか保守作業が大変だった覚えある。

んで、これらの作業が終わったあたりでこの製品でやることが無くなってきたのと同時に、この製品派生製品の話が出てきてて、それは1機能1exeで提供されてて、それらを纏めるバッチ処理機能部分を担当することに。バッチ処理の内容・順番を記述するのにXMLを使う事になったのでXMLのパーサが必要なのだけど、色々調べたら富士通内部でパーサ作ってたのでそれをもらって使う事に。そのパーサはC++からじゃないと使えなかったのだけど、趣味C++勉強してたので何とかなった。あと、結構OSの知識(プロセスとか)が必要WindowsLinuxSolarisで動くコードを書く必要があってまあまあ大変でした(と言ってもifdefで切り分けるだけなんだけど)。けど、これらの開発は自分が一から設計してコードを書いていたので楽しかったですね。それでこれが完成するかしないかあたりで、このバッチ処理機能が他の開発中の製品バッチ処理に使えないかとか話が出てきたあたりで自分退職する事に。(退職の話は1年ぐらい前に話し合って決定済み)引き継ぎをして退職ということになりました。最後は溜まった有給を使う予定でまだ在籍中だけど部屋を引き払って実家に帰ってたのだけど、打ち合わせに来て欲しいって言われてしま実家から何日か通ったのは良い想い出。というかまさか実家から朝8時に間に合うとは思って無かった。

振り返ってみて残業時間は月40~60時間が多かったかな。100時間超えた時は上司に怒られた。あと退職前の1年ぐらいはうちの事業本部(だったかな?)単位残業禁止になってホント残業0時間になった時期があった。他の部署の人の話で、どう考えても狂ってる上司の話とかを聞いてると上司とかの運は良かったと思う。あと、やっぱり仕事でみっちりプログラミングが出来たのは運が良かったと思う。富士通ソフト開発で C C++ C# Java シェルスクリプト InstallShieldとか(そんなに深くはないけど)色々やれた人間はそうそう居ないんじゃないかな。同期とかの仕事は年上の人の派遣の人に指示出したり取り仕切ったりする仕事とか、保守サポートみたいな開発じゃない仕事の話も良く聞いていたので、ソフト開発のキモ体験出来たのは良かったです(こなみ)。

2015-09-15

http://anond.hatelabo.jp/20150915135747

ああ、普段ならそれ使うけど、前側だけ固定で、後ろの要素が動的なんだよ。

Genericリストも良いかもな。

2015-02-09

http://anond.hatelabo.jp/20150209095644

アホなツッコミするくらいなら辞書genericを調べてからやればいいのに

Generic is also a noun.

The program saved $11 million in 1988 by substituting generics for brand-name drugs.

(COBUILD4)

2011-03-03

ブログの問題を解いてみた

http://okajima.air-nifty.com/b/2011/01/2011-ffac.html

ぷよぷよを解く問題をやってみた

かかった時間はおおよそ1時間

途中でわからないところがあったのでくぐってしまった

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder[] blocks = {
                new StringBuilder("**GYRR"),
                new StringBuilder("RYYGYG"),
                new StringBuilder("GYGYRR"),
                new StringBuilder("RYGYRG"),
                new StringBuilder("YGYRYG"),
                new StringBuilder("GYRYRG"),
                new StringBuilder("YGYRYR"),
                new StringBuilder("YGYRYR"),
                new StringBuilder("YRRGRG"),
                new StringBuilder("RYGYGG"),
                new StringBuilder("GRYGYR"),
                new StringBuilder("GRYGYR"),
                new StringBuilder("GRYGYR")
            };

            bool updated = true;
            while (updated)
            {
            breaked:
                DumpBlock(blocks);
                for (int i = 0; i < blocks.Length; i++)
                {
                    for (int j = 0; j < blocks[i].Length; j++)
                    {
                        char c = blocks[i][j];
                        if (c == '*')
                            continue;
                        updated = false;
                        if (KillBlocks(blocks, i, j))
                        {
                            updated = true;
                            goto breaked;
                        }
                    }
                }
            }
            DumpBlock(blocks);
            Console.Read();
        }
        struct Point
        {
            public int x, y;
            public Point(int x, int y)
            {
                this.x = x;
                this.y = y;
            }
        }
        static bool KillBlocks(StringBuilder[] blocks, int x, int y)
        {
            bool[,] visted = new bool[blocks.Length,blocks[0].Length];

            MarkBlock(visted, blocks, x, y);

            Queue<Point> queque = new Queue<Point>();
            for (int i = x; i < blocks.Length; i++)
                for (int j = y; j < blocks[i].Length; j++)
                    if(visted[i,j] == true)
                        queque.Enqueue(new Point(j,i));

            if (queque.Count < 4)
                return false;

            while (queque.Count > 0)
            {
                Point p = queque.Dequeue();
                RemoveBlock(blocks, p.x, p.y);
            }
            return true;
        }
        static void MarkBlock(bool[,] visted, StringBuilder[] blocks, int x, int y)
        {
            if (x < 0 || y < 0 || x >= blocks.Length || y >= blocks[0].Length || visted[x, y] == true)
                return;
            char c = blocks[x][y];
            visted[x, y] = true;
            if (x + 1 < blocks.Length && blocks[x + 1][y] == c) MarkBlock(visted, blocks, x + 1, y);
            if (y + 1 < blocks[0].Length && blocks[x][y + 1] == c) MarkBlock(visted, blocks, x, y + 1);
            if (x > 0 && blocks[x - 1][y] == c) MarkBlock(visted, blocks, x - 1, y);
            if (y > 0 && blocks[x][y - 1] == c) MarkBlock(visted, blocks, x, y - 1);
        }
        static void DumpBlock(StringBuilder[] blocks)
        {
            foreach (StringBuilder s in blocks)
                Console.WriteLine(s);
            Console.WriteLine();
        }
        static void RemoveBlock(StringBuilder[] blocks,int x,int y)
        {
            int i;
            if (y == 0)
            {
                blocks[y][x] = '*';
                return;
            }
            for (i = y; i > 0; i--)
            {
                blocks[i][x] = blocks[i - 1][x];
            }
            blocks[i][x] = '*';
        }
    }
}

2011-01-11

人材獲得作戦・4 試験問題ほか

http://okajima.air-nifty.com/b/2010/01/post-abc6.html

迷路の最短経路を求める問題が出たので解いてみた

幅優先探索を使えばいいのがわかっていたのですんなりかけたのだが無限ループになる個所があったので動くようになるまで時間がかかった

using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;

namespace MazeFind
{
    class Point
    {
        public int x;
        public int y;
        public Point before;
        public Point(int x, int y,Point before)
        {
            this.x = x;
            this.y = y;
            this.before = before;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            const char BreakChar = 'B';
            const char GoalChar = 'G';
            const char WallChar = '*';
            const char BeforeChar = '.';

            StringBuilder[] maze = new StringBuilder[]{
                new StringBuilder("**************************"),
                new StringBuilder("*S* *                    *"),
                new StringBuilder("* * *  *  *************  *"),
                new StringBuilder("* *   *    ************  *"),
                new StringBuilder("*    *                   *"),
                new StringBuilder("************** ***********"),
                new StringBuilder("*                        *"),
                new StringBuilder("** ***********************"),
                new StringBuilder("*      *              G  *"),
                new StringBuilder("*  *      *********** *  *"),
                new StringBuilder("*    *        ******* *  *"),
                new StringBuilder("*       *                *"),
                new StringBuilder("**************************"),
            };
            Point start = new Point(1, 1,null);

            //最短経路を探索する
            Queue<Point> queque = new Queue<Point>();
            queque.Enqueue(start);

            while (queque.Count > 0)
            {
                Point now = queque.Dequeue();
                if (maze[now.y][now.x] == BreakChar)
                    Console.WriteLine("break");
                if (maze[now.y][now.x] == WallChar || maze[now.y][now.x] == BeforeChar)
                    continue;
                else if (maze[now.y][now.x] == GoalChar)
                {
                    Point p = now.before;
                    while (p != null)
                    {
                        maze[p.y][p.x] = '@';
                        p = p.before;
                    }
                    break;
                }

                if (maze[now.y - 1][now.x] != '#')
                {
                    queque.Enqueue(new Point(now.x, now.y - 1, now));
                    maze[now.y][now.x] = '.';
                }
                if (maze[now.y][now.x + 1] != '#')
                {
                    queque.Enqueue(new Point(now.x + 1, now.y, now));
                    maze[now.y][now.x] = '.';
                }
                if (maze[now.y + 1][now.x] != '#')
                {
                    queque.Enqueue(new Point(now.x, now.y + 1, now));
                    maze[now.y][now.x] = '.';
                }
                if (maze[now.y][now.x - 1] != '#')
                {
                    queque.Enqueue(new Point(now.x - 1, now.y, now));
                    maze[now.y][now.x] = '.';
                }
            }

            //結果を出力する
            foreach (StringBuilder s in maze)
                Console.WriteLine(s.ToString().Replace(BeforeChar,' '));

            Console.ReadLine();
        }
    }
}
<||

2010-01-14

http://anond.hatelabo.jp/20100113192313

これで40分。

タイムアタックってことでアルゴリズムは全幅探索で書き上げました。

エラーチェック皆無。

A*ならもう5分ほど延びるかな?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Maze
{
    class Program
    {
        // 探索用地図
        static int[,] maze;

        // 始点終点
        static Position Start = new Position(0, 0), Goal = new Position(0, 0);

        static void Main(string[] args)
        {
            //////////////////////////// まずは各行のリストとして読み込み
            string[] inMaze;

            using (var fp = new FileStream(args[0], FileMode.Open, FileAccess.Read))
            using (var iStream = new StreamReader(fp))
                inMaze = iStream.ReadToEnd().Split('\n');

            // 迷路幅
            int height = inMaze.Length;

            // 迷路高さ
            int width = inMaze[0].Length;

            /////////////////////////// 読み込んだ迷路を作業用地図に展開
            maze = new int[width, height];
            for (int y = 0; y < height; ++y)
            {
                string line = inMaze[y];
                for (int x = 0; x < line.Length; ++x)
                {
                    maze[x, y] = line[x] == '*'
                        ? -1
                        : 0;
                    if (line[x] == 'S') Start = new Position(x, y);
                    if (line[x] == 'G') Goal = new Position(x, y);
                }
            }

            // 探索実行
            int dist = Search(maze, Start);

            // 探索結果から最短経路を再現
            Position backTracer = Goal;
            while (dist&gt;1){
                --dist;
                backTracer = backTracer.Nearbys.First(pos =&gt; maze[pos.X,pos.Y] == dist);
                maze[backTracer.X, backTracer.Y] = -2;
            }

            //////////////////// 最短経路こみのアスキー地図に変換
            char[,] outMaze = new char[width, height];

            for (int y = 0; y < height; ++y)
            {
                for (int x = 0; x < width; ++x)
                {
                    outMaze[x, y] = maze[x, y] == -2
                        ? '$'
                        : maze[x, y] == -1
                            ? '*'
                            : ' ';
                }
            }
            outMaze[Start.X, Start.Y] = 'S';
            outMaze[Goal.X, Goal.Y] = 'G';


            ////////////////////// 結果は標準出力に。
            for (int y = 0; y < height; ++y)
            {
                for (int x = 0; x < width; ++x)
                    Console.Write(outMaze[x, y]);
                Console.WriteLine();
            }
            Console.ReadLine();
        }

        /// <summary&gt;
        /// 探索する。SG間の道のりを返す(道のり=SGが隣接しているなら1)
        /// </summary&gt;
        private static int Search(int[,] maze, Position Start)
        {
            List<Position&gt; FrontLine = new List<Position&gt;();
            FrontLine.Add(Start);
            int dist = 1;
            for (; ; )
            {
                List<Position&gt; NextFrontLine = new List<Position&gt;();
                foreach (var pos in FrontLine)
                {
                    foreach (var nextPos in pos.Nearbys)
                    {
                        if (nextPos == Goal) return dist;
                        if (maze[nextPos.X, nextPos.Y] == 0)
                        {
                            maze[nextPos.X, nextPos.Y] = dist;
                            NextFrontLine.Add(nextPos);
                        }
                    }
                }
                FrontLine = NextFrontLine;
                ++dist;
            }
        }
    }

    struct Position
    {
        public readonly int X, Y;
        public Position(int x, int y) { X = x; Y = y; }

        public IEnumerable<Position&gt; Nearbys
        {
            get
            {
                return new[]{
                    new Position(X-1,Y),
                    new Position(X,Y-1),
                    new Position(X+1,Y),
                    new Position(X,Y+1),
                };
            }
        }

        public static bool operator==(Position p1, Position p2){
            return p1.X == p2.X &amp;&amp; p1.Y == p2.Y;
        }

        public static bool operator!=(Position p1, Position p2){
            return p1.X != p2.X || p1.Y != p2.Y;
        }
    }
}

2009-11-11

http://translate.google.com/translate?hl=ja&u=http%3A%2F%2Fcode.google.com%2Fp%2Fgo%2Fissues%2Fdetail%3Fid%3D9

fmccabeで、 今日(7時間前)報告

I have been working on a programming language, also called Go, for the last 10 years.私は、プログラミング言語にも、移動と呼ばれ、過去10年間のために働いている。 There haveが存在して

been papers published on this and I have a book.された論文は、この上で公開され、私の本がある。

I would appreciate it if google changed the name of this language; as I do not want to have toもしGoogleがこの言語名前を変更私はそれをお願い申し上げます。私にはしたくない

change my language!私の言語を変更!

Comment 1 by dsymonds , Today (7 hours ago) コメント1 dsymondsで 、 今日(7時間前)

References?参考文献?

Comment 2 by fmccabe , Today (7 hours ago) コメント2 fmccabeで 、 今日(7時間前)

If you google (sic) francis mccabe go you will find some references.場合は()を原文のままGoogleフランシス、いくつかの参照を見つける行くマッケイブ

I published the book on lulu.com私lulu.com上の本を出版

Comment 3 by reidellis , Today (4 hours ago) コメント3 reidellisで 、 今日(4時間前)

I think Mr McCabe's language is called "Go!".私は氏マッケイブ言語"と呼ばれてみろ!"。 Here's the Lulu link:ここでは、ルルのリンクです:

http://www.lulu.com/content/paperback-book/lets-go/641689 http://www.lulu.com/content/paperback-book/lets-go/641689

Comment 4 by niral.n95 , Today (3 hours ago) コメント4 niral.n95で 、 今日(3時間前)

reidellis: is right! reidellis:ですね! its "Lets Go!"その"はLets Go!" or "Go!".や"ゴー!"。 This is google "go", "The Goこれは、"行くに"google、"移動されます

Programming Language" Bigg Difference.. :)プログラミング言語"Biggの違い..:)

Ps Anyone hearing the release of Google "go" would have picked up their book that psの誰""行っても本を手にしてはGoogleリリース公聴会では

never sold and started finding the work "GO" and as they would find their 1st "GO"販売されなかったとの仕事"Go"を見つけることを始め、などに気づくような、その第一の"Go"

they wil go , Eureka!彼らはエウレカ行くウィル! :) :)

Comment 5 by fmccabe , Today (3 hours ago) コメント5 fmccabeで 、 今日(3時間前)

My language is called Go!.自分言語へと呼ばれます!。 The book is called Let's Go!.本の行こうと呼ばれます!。

The issue is not whether or not Google's go will be well known.問題かどうかは、Googleの移動も呼ばれることもありません。 It is one of fairness.これは1つの公平性の一つです。

Comment 6 by zhenshe41 , Today (3 hours ago) コメント6 zhenshe41で 、 今日(3時間前)

In Go!行くで! , can the IDE know the differences between Go!は、IDEへの違いを知ることができます! and go ?行く?

Comment 9 by shirish4you , Today (2 hours ago) コメント9 shirish4youで 、 今日(2時間前)

ah...ああ... Google should change the name... Googleは、名前を変更する必要があります...

Comment 11 by spronkey , Today (2 hours ago) コメント11 spronkeyで 、 今日(2時間前)

Indeed they should.確かにそうあるべきだ。 Full support for you, Mr. McCabe.あなたのためのフルサポートミスターマッケイブ。 It's not that hard to findそれを見つけるために、ハードではない

references to your language online either - it was on the first page of Bing, secondあなたの言語オンラインへの参照のいずれか-それはビンビンの最初のページに2番目だった

of Google for 'go programming language'. Googleの'のために行くのプログラミング言語'。

In fact, the title of the Google go tutorial page is even "Let's Go".実際には、Googleタイトルチュートリアルページに行っても"行こう"です。

It would be pretty poor for you folks Google to keep this name given your "do noそれはかなりあなたのための人々 、Googleはこの名が指定さを維持する貧困層になるお客様の"ありませんか

evil" slogan!悪"のスローガン

Comment 12 by nofakesallowed , Today (2 hours ago) コメント12 nofakesallowed、 今日(2時間前 に )

Google should totally change the name, fmccabe you should find a (cheap) lawyer just Googleの完全に、あなたは(安い)弁護士を見つける必要がありますだけfmccabeの名前を変更する必要があります

in case...場合には...

Google has deep pockets. Googleの深いポケットにしています。

Comment 13 by nofakesallowed , Today (2 hours ago) コメント13 nofakesallowed、 今日(2時間前 に )

btw, what's up redditところで、どうしたのreddit

Comment 14 by alex.salkever , Today (2 hours ago) コメント14 alex.salkeverで 、 今日(2時間前)

fmcabe -- could you contact me at alex @ dailyfinance.com? fmcabe -あなたalex@dailyfinance.comで、私に連絡だろうか? Might want to write a可能性のある記述する

little article about this.このことについて少し記事 Thanks.ありがとう。

Comment 16 by matthew.m.mckenzie , Today (2 hours ago) コメント16 matthew.m.mckenzieで 、 今日(2時間前)

google should change!グーグル変更してください!

Comment 17 by senthil.nayagam , Today (2 hours ago) コメント17 senthil.nayagamで 、 今日(2時間前)

maybe name it Goo or Foo多分グーかはFooという名前を付けます

Comment 18 by mail2ankitgupta , Today (119 minutes ago) コメント18 mail2ankitguptaで 、 今日(119分前)

A company claiming to capture world's info, missed it!!!同社は、世界情報キャプチャすると主張し、それを逃した!

Comment 19 by terence.stuart , Today (117 minutes ago) コメント19 terence.stuartで 、 今日(117分前)

Let the language with the most users keep its name.ほとんどのユーザーは、その名前のままにして言語をしましょう。

Er... Erを... That's not yours, is it?それは、あなたではないって?

Comment 20 by blair.briggs , Today (113 minutes ago) コメント20 blair.briggsで 、 今日(113分前)

Go, find a new name.移動し、新しい名前を探します。 ;) ;)

Comment 21 by josecamporro , Today (111 minutes ago) コメント21 josecamporroで 、 今日(111分前)

I agree with majority on this.私はこの上の部分に同意する。 Google should change the name of this language... Googleはこの言語名前を変更する必要があります...

Francis McCab is right, Go!フランシスMcCabが正しいでGO! and Go are not that different.と移動の違いはありませんです。 And he went first, public.彼は、公共の最初に行った。

Comment 22 by sebastian.krause , Today (104 minutes ago) コメント22 sebastian.krauseで 、 今日(104分前)

Google should consider a different name simply for the reason that "Go" is just a too Googleはその理由は、"移動"されに別の名前を検討する必要がありますだけでも

common word and it might eventually become difficult to google for references and一般的な単語と、最終的に参照するためにGoogleが困難になる可能性があります

examples about this language.この言語についての例です。 A somewhat more unique name can have its benefits.もう少しユニーク名前は、その利点を持つことができます。

Comment 23 by Afro.Systems , Today (95 minutes ago) コメント23 Afro.Systemsで 、 今日(95分前)

I think lango would be a great name and I am hereby to give away to google any私はランゴすばらしい名前だと思うと私は、ここから何かグーグルに与えるために午前

copyrights for the name.名の著作権

Comment 24 by ismetdere , Today (94 minutes ago) コメント24 ismetdereで 、 今日(94分前)

Goo, whould be just fine.グー、されるだけで罰金whould。

Comment 25 by QrczakMK , Today (68 minutes ago) コメント25 QrczakMKで 、 今日(68分前)

Goo is already taken too, although it has been dead for a few years I think.ただし、それが思う数年前に死んだがグー、すでにも、撮影されます。

Comment 26 by zak.wilson , Today (68 minutes ago) コメント26 zak.wilsonで 、 今日(68分前)

Goo is the name of a Lisp dialect.具は、Lisp方言名前です。

Comment 27 by daniel.kolman , Today (67 minutes ago) コメント27 daniel.kolmanで 、 今日(67分前)

Both Google and fmccabe should find a new name, "Go" is silly name for a programming Googleとfmccabe、"Go"をテコな名前プログラミングされている新しい名前を見つける必要があります

language.言語

Comment 28 by br...@silcon.com , Today (67 minutes ago) コメント28 brで... silcon.com @、 今日(67分前)

how about GOOP = Google Object Oriented Programming?方法については無神経な人= Googleオブジェクト指向プログラミング

mccabe- personally, I agree with you, but while you may be first, and you may beマッケイブ、個人的に、私はあなたと、しかし、中に最初にすることに同意し、することがあります

published, your issue title begs not to take you seriously regardless of your actual公開され、あなたの問題のタイトル真剣にかかわらず、お客様の実際の場合を取らないように頼む

stature.身長

I do hope this is resolved in your favor though.私はあなたのおかげでも解決されてほしいですか。

Comment 29 by jwb.public , Today (66 minutes ago) コメント29 jwb.publicで 、 今日(66分前)

how about ogle?方法については色目を使う?

Comment 30 by srikumarks , Today (60 minutes ago) コメント30 srikumarksで 、 今日(60分前)

Given that is derives from Limbo, "Bo" would be short and sweet as well.つまり、辺獄から、"ボー"不足しているだろうと甘いだけでなく派生を考える。 They can alsoこれらのこともできます。

use "boroutines" :P "boroutines":pを使用

Comment 31 by ismetdere , Today (57 minutes ago) コメント31 ismetdereで 、 今日(57分前)

Goo is gone too?具も行ったですか? damn..気.. what about Goat?何ヤギは?

Comment 32 by killercore , Today (52 minutes ago) コメント32 killercoreで 、 今日(52分前)

I'd go for JAgo: Just Another go私JAgoのために行くだろう:ちょうど別のものへ

Comment 33 by jason.lee.quinn , Today (51 minutes ago) コメント33 jason.lee.quinnで 、 今日(51分前)

Goat Special Editionヤギスペシャルエディション

Comment 34 by nikola.tepper , Today (50 minutes ago) コメント34 nikola.tepperで 、 今日(50分前)

It is completely absurd to use name of an already existing language.それは完全に既存の言語名前を使用するのはばかげている。 Hey Google,ちょっとGoogleは、

couldn't you, i don't know... 、私を知らない場合が...。 google it?とGoogleの? Oh right, the name is so generic, that isそう、名ので、つまり、汎用的なもの

almost impossible to get relevant matches.ほとんどの関連性と一致を得ることは不可能。 If this language catches on, it'll be aこの言語キャッチし、それになります

nightmare to search for problems and solutions.問題と解決策を検索する悪夢のような。

Comment 36 by jsykari , Today (40 minutes ago) コメント36 jsykariで 、 今日(40分前)

May I humbly suggest "go2"? 5私は謙虚に""go2いかがでしょう?

Even C++ got away with naming the language after an esoteric feature of C -- perhapsも、C + +の距離Cの難解な機能の後に、言語名前付け規則だ-おそらく

naming a language after "goto" isn't that bad. "の後に、後藤は"悪くはない言語のネーミングになります。

Comment 37 by Linnsey , Today (38 minutes ago) コメント37 Linnseyで 、 今日(38分前)

There are so many hobby and specialist programming languages it'd be hard to find aあるので趣味や専門のプログラミング言語でそれを見つけることは難しいですね、多くの

name that's not taken.名は、撮影ではない。

Comment 39 by david.kitchen , Today (32 minutes ago) コメント39 david.kitchenで 、 今日(32分前)

@33 Disturbing but funny... @ 33不穏がおかしい... I can imagine the logo now: 3OE私は今のロゴ想像することができます:3OE

@34 Look at the dates of these things, it would appear that go started around the @これらのものの日程を34歳で見て、その周りを開始へ表示されます

same time that the book was being written (but Go! already existed).同じ時間には、図書(ただし、移動書かれていた!既に存在していた)。 I wouldn't be私ではない

surprised to learn that due diligence was done at the time but simply that since thenは、デューデリジェンス時間でも行われていた知って驚く人は、単にそれ以来、

it just hadn't been revisited.それだけで再訪されていませんでした。

@36 http://xkcd.com/292/ @ 36 http://xkcd.com/292/

Comment 40 by patla073 , Today (31 minutes ago) コメント40 patla073で 、 今日(31分前)

Why not just name it Golang?理由だけではなく、それGolang名前は?

Erlang - "Ericsson Language"アーラン- "エリクソン言語"

Golang - "Google Language" Golang - "Google言語"

Comment 41 by drc.uvic , Today (31 minutes ago) コメント41 drc.uvic、 今日(31分前 に )

Does anyone use 'Go!'?誰'移動を使用しますか!'? If yours is better, or has a decent user base then a name change might be the right thingもしあなたの優れているか、またはその名前の変更は正しいかもしれませんが、まともなユーザーベースを持って

to do.を行う。 If you're bringing it up for academic pride then I don't see why they should have to change anything.もし私はなぜ何も変更する必要がありますが表示されない学問の誇りをのために育てている。

Comment 42 by abouthors , Today (29 minutes ago) コメント42 abouthorsで 、 今日(29分前)

Jago is already taken by a program to play the game of go. Jago既に行くのゲームプレイするためのプログラムによって行われる。

Comment 44 by charles.majola , Today (18 minutes ago) コメント44 charles.majolaで 、 今日(18分前)

This is issue 9 ......この問題は9 ...... Plan 9..... Plan 9の.....

Coincidence?偶然?

Comment 45 by tuxthelinuxdood , Today (14 minutes ago) コメント45 tuxthelinuxdoodで 、 今日(14分前)

It is obvious that Google employees did not research the name in terms of existingこれは、Google従業員の面では、名前研究していない明らかにされ、既存の

languages before release.リリース前の言語。 In such a situation I believe Google is at fault and the nameこのような状況では私はGoogle断層の名前ではと考えています

should be changed.変更する必要があります。 I doubt it will happen but it to change it would be in line with "do私はそれが起こるとは思えませんが、それを行となる"を変更するか

no evil".邪悪な"。

Comment 46 by GeoffreyJ.Lee , Today (14 minutes ago) コメント46 GeoffreyJ.Leeで 、 今日(14分前)

How about "Google Go"?方法については"Googleの移動"?

Go2 is pretty clever though, so my vote is on that. Go2かなりかかわらず、僕の投票をするには利口だ。

Comment 47 by roblesjm , Today (9 minutes ago) コメント47 roblesjmで 、 今日(9分前)

Google always releases new products with the prefix "Google". Googleでは常に接頭辞"Googleとの"新製品リリースします。 In this case, I don'tこの場合、私はしないでください

know if Google want release a new product or make an Alliance like Android.知っている場合、Googleは新製品リリースしたい、またはするアライアンスAndroidのような。

In the first case, I would use "GoogleC".最初のケースで、私は"を使用します。GoogleC"。 For the second, something like "GCP" fromについては、2番目の、何か"GCPの"からのような

(Google C Python). (GoogleのĈパイソン)。

Comment 48 by ismetdere , Today (4 minutes ago) コメント48 ismetdereで 、 今日(4分前)

Goat it is...ヤギって... there, settled.そこに定住した。

Comment 49 by Peter.Schweizer , Today (4 minutes ago) コメント49 Peter.Schweizerで 、 今日(4分前)

i'd suggest "giggity giggity goo" as new name since quagmire is a very funny guy私は""新しい名前として泥沼非常に面白いやつなんだからgiggity giggityグーをお勧めしたい

btw.ところで。 hi reddit :)ハイテクしかし:)

Comment 50 by ruivaldo , Today (4 minutes ago) コメント50 ruivaldoで 、 今日(4分前)

"Do" ? ""ですか? Makes sense, check the purpose of the lang.理にかなっては、langの目的をご確認ください。

2009-07-06

C#用FMFリーダー

platinumで吐き出せるFMFを読み取るためクラスを置いておく。特に反省はしてない。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data;

namespace RPG
{
    class MapFile
    {
        //FMFファイルのヘッダー
        struct FMFHeader
        {
            public string dwIdentifier;	// ファイル識別子 'FMF_'
            public int dwSize;			// ヘッダを除いたデータサイズ
            public int dwWidth;		// マップの横幅
            public int dwHeight;		// マップの高さ
            public byte byChipWidth;	// マップチップ1つの幅(pixel)
            public byte byChipHeight;	// マップチップ1つの高さ(pixel)
            public byte byLayerCount;	// レイヤーの数
            public byte byBitCount;		// レイヤデータビットカウント
        }

        private FileStream fs;
        private BinaryReader br;
        private FMFHeader _head;
        private byte[] _data8 = null;
        private short[] _data16 = null;

        public int width
        {
            get { return _head.dwWidth; }
        }

        public int height
        {
            get { return _head.dwHeight; }
        }

        public int chip_width
        {
            get { return _head.byChipWidth; } 
        }

        public int chip_height
        {
            get { return _head.byChipHeight; }
        }

        //マップファイルを読み込む。
        //エラーが起きた場合は例外を投げます
        public void Load(String fname)
        {
            try
            {
                fs = new FileStream(fname, FileMode.Open);
                br = new BinaryReader(fs);

                //識別子を確認する
                _head.dwIdentifier = new String(br.ReadChars(4));
                if (_head.dwIdentifier != "FMF_")
                {
                    throw new Exception("ファイルが壊れています");
                }

                //ヘッダーの残りの情報を読み込む
                _head.dwSize = br.ReadInt32();
                _head.dwWidth = br.ReadInt32();
                _head.dwHeight = br.ReadInt32();
                _head.byChipWidth = br.ReadByte();
                _head.byChipHeight = br.ReadByte();
                _head.byLayerCount = br.ReadByte();
                _head.byBitCount = br.ReadByte();
                switch (_head.byBitCount)
                {
                    case 8:     //8bit layer
                        _data8 = br.ReadBytes(_head.dwSize);
                        break;
                    case 16:    //16it layer
                        int count = _head.dwSize / 2;
                        _data16 = new short[count];
                        for(int i = 0; i < count; i++)
                            _data16[i] = br.ReadInt16();
                        break;
                }
            }
            catch(Exception ex)
            {
                throw ex;
            }
            finally
            {
                br.Close();
            }
        }
        //マップファイルを閉じます
        public void close()
        {
            //読み込んだデータを破棄する
            _data8 = null;
            _data16 = null;
        }
        //マップファイルからチップ番号を取得します
        public int getValue(int layer_index, int x, int y)
        {
            if (_data8 == null &amp;amp;&amp;amp; _data16 == null)
                return -1;
            if (layer_index &gt;= _head.byLayerCount ||
                x &gt;= _head.dwWidth ||
                y &gt;= _head.dwHeight)
                    return -1;

            int index = 0;
            int layer_offset = getLayerAddr(layer_index);
            switch (_head.byBitCount)
            {
                case 8:     //8bit layer
                    index = _data8[layer_offset + x + y * _head.dwWidth];
                    break;
                case 16:    //16it layer
                    index = _data16[layer_offset + x + y * _head.dwWidth];
                    break;
            }
            return index;
        }
        //該当レイヤーが存在する_dataのindexを返す
        private int getLayerAddr(int layer_index)
        {
            if (layer_index &gt;= _head.byLayerCount || (_data8 == null &amp;amp;&amp;amp; _data16 == null))
                return -1;
            return _head.dwWidth * _head.dwHeight * layer_index;
        }
    }
}

#訂正

致命的なバグがあったので修正しました&データを取得する部分をわかりやすくした

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