Slide 1

Slide 1 text

ミンコフスキ時空における物 体のフォンノイマン型計算機 上での表現について

Slide 2

Slide 2 text

Just kidding 冗談です

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

I want to make SciFi come true

Slide 5

Slide 5 text

● Permutation City ● Diaspora ● Matrix ● ZEGAPAIN ● etc

Slide 6

Slide 6 text

OOP for Real-world Simulation?

Slide 7

Slide 7 text

“Software objects are conceptually similar to real-world objects: they too consist of state and related behavior” (What is an Object — The Java Tutorials) オブジェクトの概念は現実世界の物と似ている。それ (オブジェクト)も状態と、関連する振る舞いでできてい る。

Slide 8

Slide 8 text

“Simula is considered the first object- oriented language. As its name implies, Simula was designed for simulation” (Simula — Wikipedia, Free Encyclopedia) Simulaは世界初のオブジェクト指向言語だと考えられている。その名前の通り、 Simulaはシミュレーションの ためにデザインされた。

Slide 9

Slide 9 text

Do objects correctly model real-world objects?

Slide 10

Slide 10 text

No!

Slide 11

Slide 11 text

Things I used to point out which I do no longer ● RWOs have no knowledge about their usage ○ A book can be used to hit people ● RWOs do not respond to messages ○ Boxes do not answer when we ask them its heights ○ Instead, an external intelligence has to measure them These mismatch become trivial if we imagine a city that everything has a micro computer embedded into it.

Slide 12

Slide 12 text

One moment please...

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

What do we do?

Slide 20

Slide 20 text

Functional Programming!

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

History-preserving objects seem like a natural transition from traditional objects. ● Make every instance variable immutable ● Make every method return a new object with a reference to the current object

Slide 23

Slide 23 text

A problem: Q: Won’t this model eat up memory? A: Not as much as you would think but Yes. Since every object is immutable, it can be made persistent. ∴ a new state would require a lot less space than a full-copy. However, memory usage grows linearly over time. A more compact representation is needed.

Slide 24

Slide 24 text

History of an object (i.e. snapshots of the past) doesn’t have to be contained within itself (i.e. current snapshot) ... if we could express a 4D object directly

Slide 25

Slide 25 text

Persistent Data Structures Snapshots Recursive Functions Objects

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

In practice, what gets folded would be a stream of events instead of ticks of a clock.

Slide 28

Slide 28 text

I call them Minkowski Objects

Slide 29

Slide 29 text

● Event Stream = Blocking Queue ● Folding function writes to its neighbors’ event stream Side-effects propagate through various MOs’ event streams Modifications to make MOs practical

Slide 30

Slide 30 text

(fold (^ e s s’) brain [...]) (fold (^ e s s’) cup [...]) (fold (^ e s s’) mouth [...]) (fold (^ e s s’) fisher [...]) (fold (^ e s s’) stomach [...]) (fold (^ e s s’) fish [...]) (fold (^ e s s’) toilet [...]) (fold (^ e s s’) river [...]) Minkowski Object Oriented Programming fill coffee drink coffee fill coffee fill pee add water provide oxygen catch fish eat fish get smarter get excited

Slide 31

Slide 31 text

Conclusion ● Mutable objects aren’t representing anything in real-world 破壊可能なオブジェクトは現実世界のなにも表現していない ● Functional programming can provide a more concise analogy for real-world objects 実は関数型の方がより正確に物体を喩える事ができる ● OOP probably is too weak to make SciFi come true オブジェクト指向はSFを現実にするには弱すぎるのかもしれない

Slide 32

Slide 32 text

No content