デジタルちんぶろぐ

デジタルな話題

ホーム 連絡をする 同期する ( RSS 2.0 ) Login
投稿数  268  : 記事  0  : コメント  4419  : トラックバック  79

ニュース


技術以外は
ちんぶろぐ

記事カテゴリ

書庫

日記カテゴリ

わんくま名古屋勉強会のLTあおいたんが紹介していたShapespeareHello Worldがさっぱり理解できなかったので、ココにあるHello Worldの解説を読んでいたときの脳内思考を含めた超意訳。

途中から機械翻訳の出したわからない日本語を「こぉかなぁ?」と想像して書いたので結果部分以外はそーとー怪しいです。

Shakespeareなどという誰も使いそうにない言語なので誤訳があっても迷惑をかける可能性が低い事が幸いw

?

?

Title(タイトル)

タイトル部の説明。最初の1行(最初のピリオドまで)はタイトルだそうな。

The first line of every SPL program is the title.…

んで、タイトルは何かというとこの章の最後にこんな一文。

From the parser's point of view, it's a comment.

パーサーから見ればコメントだって。

よってこの章の訳は不要とみなす。

?

Dramatis Personae(登場人物)

The next few lines are a list of all characters in the play.

続く数行はこの演目での全登場人物のリスト。

Think of them as variables, capable of holding a signed integer value. You must declare every character you intend to use, or the program won't compile.

彼らは符号付整数を保持できる変数だと思ってね。あなたが彼らを使うつもりなら必ず宣言してね。じゃないとコンパイルされませんよ。

登場人物が変数だそうな。符号付整数しか扱えなさそうね。

?

んで、やる気が失せるのがこの一文。

you must use a real Shakespeare character name, such as Romeo, Juliet, or the Ghost (Hamlet's deceased father).

シェークスピアの実在の登場人物を使わないとダメよ。例えばロミオ、ジュリエットとかゴースト(ハムレットの実父)

ゴーストの説明なんぞどうでもいいわ!と思える。

実際、

Andochin, a middle age programmer.

と入れたらコンパイルエラーだけど

Othello, one of the products of Tsukuda Original.

ならコンパイル通った。

?

Acts and Schenes (幕とシーン)

The purpose of acts and scenes is to divide the play into smaller parts.

この部分は以下のように単語を読み替えると「Cやね」と納得できるのでShakespeareの出力コードを想像したのだが

act -> source code

scene -> function

The purpose of source files and functions is to divide the program into smaller parts.

んが、Shakespeareはそんなに甘くなかった。

spl->cではそんな風に分割されない。それらは全て以下のようなgotoのラベルになりmainの中に記述される

この記述

Act II: Behind Hamlet's back.

Scene I: Romeo and Juliet's conversation.

がこんな風になる。

act_ii: /* Behind Hamlet ' s back */

act_ii_scene_i: /* Romeo and Juliet ' s conversation */

そしてsplの記述を見てもわかる通りの下記記述。

Acts and scenes are numbered with roman numerals.

幕とシーンはローマ数字にしてね。

この時点で○○○○?と思える。

?

Enter, Exit and Exeunt(登場、退場)

To be able to speak their lines, characters must be on stage. The character they address as "you" (or "thou" or any other second-person pronoun) must also be on stage. But if there is yet another character on stage, it's not clear which one is intended. This is frowned upon by the parser.

キャラクタがセリフをしゃべる為にはステージ上にいなければなりません。そのキャラクタが"you"(もしくは"thou"もしくは他の2人称を指す代名詞)と指す者もステージ上にいなければなりません。しかし、更にもう一人のキャラクタがステージ上にいる場合誰を指すかが不明確です。これはパーサーの顰蹙を買います。

Enter Enter and Exit. These directives cause characters to get on and off stage."Enter" is followed by a list of one or more characters. "Exit" is followed by exactly one character. The plural of Exit is "Exeunt", which is followed by a list of at least two characters - or none, in which case everyone leaves.

EnterとExitを記述せよ(Enter Enter and Exit)。これらの指示によりキャラクタはステージへの登場・退場を行います。"Enter"には1つ以上のキャラクタのリストが続きます。"Exit"には正しく一人のキャラクタが続きます。"Exit"の複数形は"Exeunt"です。これには少なくとも2人のキャラクタが続きます。もしキャラクタがなければ全員退場します。

※Enter Enter and Exitの訳は刈歩さんに教えてもらいました

An Enter directive given to a character already on stage, or the other way around, will cause a runtime error.

ステージ上に既にいるキャラクタへの"Enter"もしくはその逆は実行時エラーを引き起こすでしょう。

?

Lines (台詞)

A line consists of the name of a character, a colon, and one or more sentences. In the Hello World program, only two kinds of sentences are used: output, which causes output to the screen, and statements, which cause the second person to assume a certain value.

台詞はキャラクタの名前、コロンと1つ以上の文から成り立ちます。"Hello World"プログラムは、2つの文しか使用されていません。スクリーンへ出力するoutputと2番目の人に値を思い込ませる命令文(statements)です。

?

"second person"2人称の意味だから恐らく舞台上の相手を意味しているんじゃないかな?と思ったけど、それもしっくりこない。この時点でもう気力なし。

?

Constants (定数)

First, we'll explain how constants (that is, constant numbers, such as 17 and 4711) are expressed. Any noun is a constant with the value 1 or -1, depending on whether it's nice or not. For example, "flower" has the value 1 because flowers are nice, but "pig" has the value -1 because pigs are dirty (which doesn't prevent most people from eating them). Neutral nouns, such as "tree", count as 1 as well.

まず、どのように定数が定義されるかを説明します。 名詞はそれが良いか悪いかに依存して1-1になります。例えば"flower"1を持ちます。なぜならお花はナイスだからです。しかし、"pig"-1を持ちます。なぜならブタさんはばっちいからです。""のような中立名詞は1をもちます。

# ブタさん好きが聞いたら怒り出しそうな理由。

By prefixing a noun with an adjective, you multiply it by two. Another adjective, and it is multiplied by two again, and so on. That way, you can easily construct any power of two or its negation. From there, it's easy to construct arbitrary integers using basic arithmetic, such as "the sum of X and Y", where X and Y are themselves arbitrary integers.

形容詞を名詞の前に付けることで2倍することが出来、もう一つ形容詞をつけるとその値が更に2倍されていきます。従って容易に任意の値の2乗もしくはその値の負数を構築できます。そこから、基本的な数式を使用して整数値を構築できます。例えばXYが任意の整数である場合に"the sum of X and Y"(XYの和)の様にです。

?

こっから下の例文は原文をぶった切りながら

For example, "the difference between the square of the difference between my little pony and your big hairy hound and the cube of your sorry little codpiece".Substituting the simple constants with numbers,

例えば、"the difference between the square of the difference between my little pony and your big hairy hound and the cube of your sorry little codpiece"は簡単な定数値に置換されます。

little pony (ちっちゃなポニー) = 2

big hairy hound (でっかいけむくじゃらの猟犬) = 4

sorry little codpiece (かわいそうなちっちゃい股袋ン?) = -4

# 訳のミスの可能性高いけど下ネタ?

"the difference between the square of the difference between 2 and 4 and the cube of -4".

これで3つの数値が出てきた。

Now, since the difference between 2 and 4 is 2 - 4 = -2, and the cube of -4 is (-4)3 = -64, this is equal to "the difference between the square of -2 and -64". The square of -2 is (-2)2 = 4, and the difference of 4 and -64 is 60. Thus, "the difference between the square of the difference between my little pony and your big hairy hound and the cube of your sorry little codpiece" means 60.

ちっちゃい数字はn

で、今までのことから

"difference between 2 and 4" = -2

"cube of -4" = -64

になるので、文は以下のようになる。

"The difference between the square of -2 and 64".

んで、

"square of -2" = 4

になるので、全文はこうなる。

"The difference between 4 and -64" = 60

従って

"the difference between the square of the difference between my little pony and your big hairy hound and the cube of your sorry little codpiece"

60を意味する。

?

As you see, this way of writing constants gives you much more poetic freedom than in other programming languages.

ご覧の通りこのような定数値の記述は古いコンピュータ言語以上に詩的な自由度をあなたに与えます。

って

ここまで読んで読む気が失せた

?

Assignment of Values(値の割り当て)

Now, how do we use those numbers? Well, just have a look at the two statements "You lying stupid fatherless big smelly half-witted coward!" and "You are as stupid as the difference between a handsome rich brave hero and thyself!"

さて、どのように私たちはそれらの値を使うのでしょうか?次の2つの文を見てください。
"You lying stupid fatherless big smelly half-witted coward!"
"You are as stupid as the difference between a handsome rich brave hero and thyself!"

The first one is simple: A second person pronoun, followed by a number. The effect of this statement is to assign the value of that number (in this case, -64) to the character being spoken to. Think "X=-64".

最初の文は簡単です。二人称代名詞に数値が続いています。この文の効果はその値(この場合なら-64)を話をされている人物に割り当てます。"X=-64"と考える

多分2*2*2*2*2*2*-1って事ね

The second one is slightly more complicated. For starters, what is the value of "thyself"? That's not a noun, that's a reflexive pronoun. It's value is the current value of the character being spoken to. So the number in the second statement is 8 - X, where X is the value of the character being spoken to. And just as you might expect from your experience with English, the second statement is just another assignment. Think "X = 8 - X". Being "as bas as", "as good as", or as [any adjective] as something else, means being equal to that something.

2番目の文はやや複雑です。手始めに、自身の値は何でしょう?それは名刺ではなく再帰代名詞です。それは値が話されているキャラクタの現在の値であるということです。従って2番目の文の中の数値は8-Xです。そしてそこでXはキャラクタに話された値です。それと同時にあなたがあなたの英語の経験から期待する通りに2番目の文はもうひとつの割り当てにすぎません。"X = 8 - X"と考える。"as bas as","as good as"もしくはas [何らかの形容詞] as [何か他の物]が[何か]と等しいことを意味するように。

ここは機械翻訳もいい訳を出してくれなかった

?

ふへぇ。疲れた

?

しかし、最後の章を訳していなかった事に翌日気付いた。

Output(出力)

The other kind of sentence used in the Hello World program is output.There are two different output sentences, "Open your heart" and "Speak your mind". The first causes the character being spoken to to output her or his value in numerical form, and the other, being more literal, outputs the corresponding letter, digit, or other character, according to the character set being used by your computer.

Hello Worldプログラムで使用された別の種類のセンテンスは出力(output)です。出力には2種類のセンテンスがあります。"Open your heart"と"Speak your mind"です。最初のセンテンスはキャラクタが自身の値を数値形式で出力します。もうひとつのセンテンスはあなたの使用するコンピュータのキャラクタセットに従い文字、数字もしくは他のキャラクタで出力します。

In this program, we use only the second form. The whole program is a long sequence of constructing a number, writing the corresponding character, constructing the next number, writing the corresponding character, and so on.

Hello Worldプログラムでは2番目のセンテンスしか使用していません。プログラム全体は数値を構築し、対応するキャラクタを書き出し次の数値を構築し対応するキャラクタを書の書き出す…が続く長い文です。

?

?

?

投稿日時 : 2008年10月28日 0:28

コメント

# re: ShakespeareのHello Worldの説明を読んでみた 2008/10/28 1:24 アキラ
翻訳お疲れさまです(^^;

Shakespeare Programming Languageかー。
あとで調べてみよう

# re: ShakespeareのHello Worldの説明を読んでみた 2008/10/28 1:31 アキラ
Hello World長っw
http://kara.ifdef.jp/program/spl/spl01.html

# re: ShakespeareのHello Worldの説明を読んでみた 2008/10/28 21:32 あんどちん
すごいっしょ?見つけてきたあおいたんも凄いと思うけど何よりこんな言語を作ったこととその言語規則の変体っプリ。
Cに落ちたコードもステキですよ



# re: ShakespeareのHello Worldの説明を読んでみた 2008/10/30 10:11 刈歩 菜良 CTP
面白いけど、全部読み切れません。
ヾ(>y<;)ノうわぁぁ

とりあえず、登場、退場まで読んでみた。
で、ちょいと疑問。

Enter Enter and Exit.

EnterとExitを入力しなさい。
だとおもう。

いわゆる英語のダジャレ的なものかと...

続きはまた空いた時間に読みますね。

# re: ShakespeareのHello Worldの説明を読んでみた 2008/10/30 10:20 刈歩 菜良 CTP
あ、原文に注釈があったよ。
http://shakespearelang.sourceforge.net/report/shakespeare/shakespeare.html#tex2html5

If you don't get the joke, you can mail the authors and ask.

やっぱダジャレだったんだ...

# re: ShakespeareのHello Worldの説明を読んでみた 2008/10/30 23:02 あんどちん
引用前後します

> If you don't get the joke, you can mail the authors and ask.
これは読んでたのでジョークなんだろうなとは思ってたんですが、

> EnterとExitを入力しなさい。
> だとおもう。
Enter and Exit = 「登場、退場」もしくは「出入口」と判断して
出入り口に入るだと思ってました。Enterを入力と訳すところまで考えが回らなくて…

上記の通りメールして聞けば良かったんですねw


# YDkukkwFNyDh 2014/07/18 17:49 http://crorkz.com/
cajids Wow, great blog article.Much thanks again. Awesome.

# Oh my goodness! Awesome article dude! Many thanks, However I am going through problems with your RSS.
I don't know why I cannot subscribe to it.
Is there anybody else getting similar RSS issues? Anyone that knows
the answer can you kindly res 2014/08/04 3:32 Zachary
Oh my goodness! Awesome article dude! Many thanks, However I am
going through problems with your RSS. I don't know why I cannot subscribe to it.
Is there anybody else getting similar RSS issues?
Anyone that knows the answer can you kindly respond? Thanx!!

# BURTryiebqxrFAcMSyE 2014/08/07 3:13 http://crorkz.com/
jaupC2 Very informative blog post.Much thanks again.

# Appreciation to my father who shared with me concerning this blog,
this website is actually remarkable. 2014/08/24 22:09 Priscilla
Appreciation to my father who shared with me concerning this blog, this website
is actually remarkable.

I have fun with, cause I found exactly what I was taking a look for. You've ended my 4 day long hunt! God Bless you man. Have a great day. Bye

# hello!,I like your writing very so much! proportion we keep in touch extra approximately your post on AOL?

I need an expert in this house to unravel my problem.
May be that's you! Having a look ahead to see you. 2014/09/03 23:45 Eloise
hello!,I like your writing very so much! proportion we keep in touch extra
approximately your post on AOL? I need an expert in this house to unravel my problem.
May be that's you! Having a look ahead to see you.

# This piece of writing is in fact a good one it helps new internet people, who are wishing for blogging. 2014/09/22 3:01 Anke
This piece of writing is in fact a good one it helps new internet people, who are wishing for blogging.

# If You Still Desire To Purchase A Classic michael kors handbags, We Recommend Our michael kors handbags Offers You High Quality
And Big Discount!

more from : cheap michael kors wallets 2014/09/25 22:03 Celina
If You Still Desire To Purchase A Classic michael kors handbags,
We Recommend Our michael kors handbags Offers You
High Quality And Big Discount!

more from : cheap michael kors wallets

# Greetings! Ι've been fоllowing youг web
site fоr a while now and finally got the bravery tо go
ahead аnd giѵe yοu а shout оut from Kingwood Texas!
Јust wanted tο say keeр up the excellent work! 2014/10/29 10:36 Renaldo
Greetings! I've been follоwing youг web site fоr a wh?le nοw an? finally gοt the bravery to
gо ahead and give you a shout оut fгom Kingwood Texas!

Just ωanted to saу keеp uρ the excellent ωork!

# Great looking site. Assume you did a great deal of your very own coding.


more from : Discount Michael Kors Watches 2014/12/25 23:03 Terese
Great looking site. Assume you did a great deal of your very own coding.


more from : Discount Michael Kors Watches

# Thanks, this site is very useful.

more from : Michael Kors Outlet 2014/12/26 20:27 Mittie
Thanks, this site is very useful.

more from : Michael Kors Outlet

# Fastidious respond in return of this issue with firm
arguments and explaining the whole thing regarding that. 2016/03/12 9:51 Osvaldo
Fastidious respond in return of this issue with firm arguments and explaining
the whole thing regarding that.

# juicy couture online
563149409 2019/06/20 3:31 Salorito
Converse All Star You can find so much of variety and so significantly of designs to pick out from that fellas and ladies just should enter a converse showroom and choose the a person that's the best suited for them. Now the ladies on the globe have two best mates one is the normal just one diamonds even though another could be the ladies low cost converse all star . On no account just before while in the historic previous with the footwears there has been a lot of collection on show because the really best shoe makers in the planet Converse sneakers have delivered us with.

Now it is upto us that we make the right variety in deciding upon the right group as correctly as the suitable assortment of converse footwear for on their own. The shoe sizes to the Livie and Luca child sneakers and toddler sneakers ranges from measurement 4 as much as dimensions twelve. It is recommended you entry the Livie and Luca child sneakers and toddler sneakers formal web site wherein you'll be able to obtain and print out their official sizing chart for that Livie and Luca baby sneakers and toddler sneakers as a way to make it easier to locate the very best shoe suit for your personal toddler or toddler.

To find an ideal fit for your personal little one or toddler by way of the usage of the downloadable official sizing chart of Livie and Luca little one footwear and toddler footwear, have your baby or toddler stand on it, and with the protected shoe size, there needs to be a few quarter as many as a fifty percent inch of extra area in order to locate the finest fit for the infant. The included excess area will allow a ?ユ?rowing room??for your baby?ユ獨 or toddler?ユ獨 feet. Under is an instance of how to define the ideal shoe match to your child or toddler with the use of the formal sizing chart with the Livie and Luca child footwear and toddler shoes:

Have your newborn or toddler stands on the official sizing chart of Livie and Luca child footwear and toddler sneakers, and if, as an example, their foot lands inside the size three footprint, make sure that there ought to be a couple of one-fourth as many as a 50 percent inch of no cost place involving the edge of one's baby?ユ獨 or toddler?ユ獨 major toe plus the traced define of the size a few shoe footprint. Your baby?ユ獨 or toddler?ユ獨 heel need to even be correct up versus the define inside the back. In case your baby remains to be an toddler, try to remember they usually usually curl their toes,affordable toms shoes, so you need to carefully push down around the top rated in their foot in order to get an precise length of one's baby?ユ獨 foot. Quite a bit of men and women aren't knowledgeable that it's very simple and inexpensive to provide one among a form converse black converse. It's possible you'll mail away a drawing or photograph to the business that focuses on developing tailor produced converse, or take on the endeavor oneself! You could discover that custom made converse sneakers look outstanding, however they is frequently highly-priced - not simply does one fork out the price on the footwear and design and style, also, you fork out shipping and supply fees, which may be steep based on by which you keep. So, why never you seize a set of low-cost converse footwear, get a amount of artwork presents, and deliver some enjoyable and funky footwear? Here's means to personalize your Converse shoes in 4 speedy actions: 1. Draw your structure out on paper. You don't should be splendidly gifted in artwork for making your converse footwear seem excellent, nonetheless you do really need to accomplish some planning. Employ a bit of white paper to sketch your designs. You can stick to a great deal less complicated shapes like hearts, stars and squares, or get ingenious and attract your title in bubble letters, your favorite animal, or maybe a factor that reflects your favored enthusiasm (one particular illustration is, a guitar for anyone who prefer to engage in new music). Converse All Star sneakers undoubtedly are a good selection when you might have additional from the canvas to function with; low-tops hardly ever enable you to vans previous skool black noticeably place. two. Make the most of a pencil to appeal to in your individual shoe. Using this method, from the function you make a miscalculation, it is achievable to promptly erase it or rub it off. Will not be anxious about acquiring also in depth; just sketch out the outlines of one's designs you would like. It might assist to face your converse basketball sneakers around a flat flooring and that usually means you Red Toms positive you come about to get drawing straight traces. Get offered that you will require to attract your style and design, and do not get discouraged. It could possibly have a limited the perfect time to get hold of the hold of drawing on canvas with pencil. three. Use materials pens or paints to go over the pencil. Colour as section of your types extensively with your paints. In the event you come up having a miscalculation at this point, you won't locate a approach to erase it. As a substitute, you may genuinely have to just take care of it working with your paints or pen - to place it in different ways, hiding your oversight! Luckily, it really is feasible to frequently get converse footwear on sale, so though you truly don't appreciate the finished products, you could look for a way to pick out up an extra pair and take a look at when far more. four. Jazz up your footwear. The best method to assistance make your converse sneakers glance amazing is by generating use of elements this sort of as glitter, jewels, charms or studs. You will learn quite a few fantastic sources at your neighborhood craft preserve, then only use your creativity. Whenever you add every single person included, possess a stage once more and evaluate your sneakers. It is actually definitely tempting to overdo it occasionally, so you also don't need to go overboard. Other than, not remarkably, your solution was to incorporate your sneakers with glitter or studs. Now, all you might have to accomplish is use nonetheless an additional set of Converse footwear in Canada and start the full process once more!

http://kingcameranfoundation.ning.com/profiles/blogs/hermes-kelly-bag-alligator-leather-gold-hardware-in-red
http://www.expressbusinessdirectory.com/Companies/hermesbag-C861229/Hermes-Kelly-Bag-Alligator-Leather-Gold-Hardware-In-Red-P207205
https://hermesbag.kinja.com/what-kind-of-procuring-bag-within-the-function-you-util-1834133176
https://mix.com/!JZYsqYTA:hermes-kelly-bag-alligator-leather-gold-hardware-in-red
http://kingcameranfoundation.ning.com/profiles/blogs/hermes-evelyne-bag-clemence-leather-palladium-hardware-in-black
https://mix.com/!YWRhZmRk:hermes-evelyne-bag-clemence-leather-palladium-hardware-in-black
https://directory.company.com/business/view/hermes-toolbox-bag-swift-leather-palladium-hardware-in-green
https://write.as/hermesbag/hermes-kelly-bag-alligator-leather-gold-hardware-in-red
https://write.as/hermesbag/hermes-evelyne-bag-clemence-leather-palladium-hardware-in-black
https://www.reverbnation.com/page_object/page_object_photos/artist_6499650?photo=31790651

# yhDYuKaZOMlAdBte 2021/07/03 2:09 https://amzn.to/365xyVY
We all talk just a little about what you should talk about when is shows correspondence to because Perhaps this has much more than one meaning.

# TUjnJtVrZFezRjdv 2021/07/03 3:39 https://www.blogger.com/profile/060647091882378654
Thanks so much for the article.Really looking forward to read more. Much obliged.

# stromectol ivermectin 3 mg http://stromectolabc.com/
stromectol 3 mg 2022/02/07 17:41 Busjdhj
stromectol ivermectin 3 mg http://stromectolabc.com/
stromectol 3 mg

# new ed treatments https://erectionpills.best/
best treatment for ed 2022/06/28 10:59 ErectionPills
new ed treatments https://erectionpills.best/
best treatment for ed

# paxlovid cost https://paxlovid.best/
covid antivirals 2022/09/07 22:48 Paxlovid
paxlovid cost https://paxlovid.best/
covid antivirals

Post Feedback

タイトル
名前
Url:
コメント: