Smalltalk [転載禁止]©2ch.net

このエントリーをはてなブックマークに追加
1Anonymous
2Anonymous:2015/01/12(Mon) 16:44:04.30
How to download the GemStone?

You can download the Gemstone from here.
https://my.vmware.com/web/vmware/info/slug/application_platform/vmware_gemstone_s/3_1
3Anonymous:2015/01/12(Mon) 16:55:57.77
How to remove a class from a image file in the Gnu smalltalk.

You can remove a class in example.

example:

| deleteClass |

deleteClass :=
[ :aClass |
 | superClass nameSpace |

 superClass := aClass superclass.
 nameSpace := aClass environment.

 nameSpace removeKey: aClass name.
 superClass removeSubclass: aClass.
 superClass class removeSubclass: aClass class.
].
4Anonymous
http://peace.2ch.net/test/read.cgi/tech/1418278634/438

Kim likes Robin.
Sandy likes Kim.
Robin likes cats.
Sandy likes people(or animal) who likes cats.
Kim likes people who like Lee and Kim.
Sandy likes Lee.
People(or animal) like myself.


http://peace.2ch.net/test/read.cgi/tech/1418278634/441
GNU Smalltalk

| Kim Robin Sandy Lee cats |

Likes members: {
 Kim := People named: #Kim.
 Robin := People named: #Robin.
 Sandy := People named: #Sandy.
 Lee := People named: #Lee.
 cats := Animals named: #cats
}.

Kim likes: Robin.
Sandy likes: Kim.
Robin likes: cats.
Sandy likes: [:who |
 ((who isKindOf: People) or: [who isKindOf: Animals]) and: [who definitelyLikes: cats]].
Kim likes: [:who |
 (who isKindOf: People) and: [who definitelyLikes: {Lee. Kim}]].
Sandy likes: Lee.
Likes members do: [:who |
 ((who isKindOf: People) or: [who isKindOf: Animals]) ifTrue: [who likes: who]].

Likes members do: [:each | (each -> each allOneLikes) printNl]

"=>
 Robin->(cats Robin )
 cats->(cats )
 Kim->(Robin Sandy Kim )
 Sandy->(Kim Robin cats Lee Sandy )
 Lee->(Lee )
"

http://ideone.com/9Fxawa