由买买提看人间百态

topics

全部话题 - 话题: actors
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
n****1
发帖数: 1136
1
来自主题: Programming版 - OOP里面的Object其实是actor
没错, actor是object
但我的point是:
只有actor才值得用object的概念来建模. 其他的"object"不过是普通的encapsulated
data struct罢了。
拥有"独立人格"的东西最难建模与分析了,因为数学上是non deterministic, 甚至某
些actor可能等价于一个turing machine. 所以从程序复杂度的角度, 也应该尽量减少
actor的数量。 AKA, 不要抱着万物皆活物的思想写程序。
还有,这个actor和FP一毛钱关系也没有. 你也提醒过我, golang也用类似于actor的
goroutine, 而把thread api废掉了.
j*********r
发帖数: 24733
2
Peter Strzok又立新功啊!
“Foreign actors” obtained access to some of former Secretary of State
Hillary Clinton’s emails -- including at least one email classified as “
secret” -- according to a new memo from two GOP-led House committees and an
internal FBI email.
Fox News obtained the memo prepared by the House Judiciary and Oversight
committees, which lays out key interim findings ahead of next week’s
hearing with Justice Department Inspector General Michael Horowitz. The IG,
separately, is expected ... 阅读全帖
z*c
发帖数: 63
3
来自主题: JobHunting版 - 问个scala Akka actors的问题
学校里的项目自己手贱偏要选用scala搞,结果身边没人会,网上资料也相对少多了,
各种疑惑也找不到解答....
目前设计程序一启动就创建200个actors,然后每个actor都一直运行下去。每个actors
的逻辑里头都有个while(true)和Thread.sleep(5000),每隔五秒重复一次。
目前的问题是不知咋的代码一运行只能创建12个actors....
代码如下:
imgs是一个大小为200的list of string
Raw是“final case class Raw(data: String)”
for (img <- imgs) {
lazy val imgActor = Akka.system.actorOf(Props[ImageProcessing])
imgActor ! Raw(img)
}
然后ImageProcessing长这样:
class ImageProcessing extends Actor {
import Application._
def receive =
{
case Raw... 阅读全帖
g*****g
发帖数: 34805
4
来自主题: Programming版 - OOP里面的Object其实是actor
你走火入魔了,谁说对象需要独立人格?这个世界万物皆物体 (object),物体需要独
立人格吗?
一个桌子没有任何思想,就不能有4条腿,一个面吗?你连最基本的常识都弄错了,还
推理了一大堆,I服了U。
事实上,OO里所谓对象,无非是一堆的相关的数据状态,用对象方法来确保数据的变化
保持一致性罢了。
另外,你对多线程的理解也很狭隘。actor model在复杂多线程的系统里很好用,可以
简化线程同步。
但反过来,如果系统并没有那么多的同步需要。比如绝大部分web应用,无非是某种形
式的CRUD,
有同步需要的部分都在数据库里处理了。这时候actor就如同spring bean里用
prototype,明明一个singleton够用了,却产生了大量的copy,导致GC开销提高很
多,造成性能下降。我个人用scala的时候为了最大化系统throughput,在调GC仍然有
问题之后,不得已用了object pool来重用actor,这已经违背了actor model的本意。

Erlang
z****e
发帖数: 54598
5
来自主题: Programming版 - 有什么web server 可以后台接actor
同沙发
你在说啥?
actor做比较慢的工作?
你说的是操作耗时比较久,所以会block你的异步framework吗?
这个应该交给worker去做,而不是一般的verticle
如果是actor,actor只要你能够保证immutable的话
就没啥问题,因为本质上actor是多thread的
跟异步的event不一回事
t******o
发帖数: 3
6
来自主题: Chinese版 - looking for Chinese actors
Hi everyone,
I'm looking to do a short film about the live of Fuzhouese people in America
this December. It's going to be shoot in New York and Long Island. The
shooting takes about 10 to 14 days. I would like to have my actors from Fuzhou
and other parts of China as well. I prefer nonprofessional actors, but
professional actors are welcome too. Please contact me at
y********[email protected].
g*****g
发帖数: 34805
7
来自主题: Programming版 - OOP里面的Object其实是actor
你无知又逼我来打脸了是吧?为啥java的所有对象都有wait/notify,因为所有的对象
都有一个monitor,wait/notify就是为了这个monitor服务的。没有这个monitor的存在
,java就实现不了built-in的synchronization。这就是一个语言的feature,还有问为
什么的?
任何建模都有局限性,就比如actor model,大多数语言的实现是保证actor本身单线程
。我老人
家边吃饭边灌水,你拿actor model就建模不了。
班上70%的人身攻击,都是因为你这样的脑残不懂还非要装逼引起的。诸如魏公公坚信
自己的单机可以秒掉nasdaq,除了傻逼没有更合适的词了。
a********o
发帖数: 585
8
来自主题: _FilmArts版 - My favourite actors, very few
Dustin Hoffman: A real actor. A real personality actor. A real talent. The
graduate, midnight cowboys, Crammer vs Crammers......and much more.
Jack Nicolson: A truelly man. showed such good acting in my favourite movie:"
Chinatown". "Postman only ring bells twice" and " as good as it is". I like
his actually ugly look and witty smiles. very cool.
John Cusack: Not much to say about Cusack. He is just as good as a perfect
actor which is really acting. And although sometimes pretty low, he is quit
l****z
发帖数: 29846
9
April 13, 2012 by Warner Todd Huston
Left-wingers have for years complained that conservatives are wrong to
condemn a movie based on the outspoken nature or politics of a staring actor
or director.
“It’s just a movie,” they tell us and they scold us for not separating
the entertainment from the actor’s real life. But now, in a typical
hypocritical move, left-wingers are condemning a movie that is in the works
precisely because of who is involved in the project, Mel Gibson, someone
they do not ... 阅读全帖
l****z
发帖数: 29846
10
Actor in Bloomberg Anti-Gun Ad Violates Basic Gun Safety Rules
by Jammie
Hey, when you’ve got an agenda, who cares if you screw up the basic details
? But really, this is embarrassing, even for the mini-mayor Mike Bloomberg.
The ad does not specify if the man is an actor, but he violates all
three gun safety rules taught by the National Rifle Association (NRA).
The first rule is to always keep the gun pointed in a safe direction. In
this case, the children are playing in the yard. Altho... 阅读全帖
p*****2
发帖数: 21240
11
来自主题: JobHunting版 - 问个scala Akka actors的问题
actor不是这么用的呀

actors
f******n
发帖数: 116
12
来自主题: JobMarket版 - Actor needed in Boston
We are looking for an actor. No experience is required. This will be a very
easy shoot with very little dialogue.
Here is what we need:
1 East Asian male actor, 50+ age - Must be able to speak Mandarin
Each shoot should last approximately 1 hour -- 1.5 hours
We will pay you $50 for your time. This is for a good cause (www.loveandhelp
.org) so we are hoping to find someone to help us out!
Much thanks!
If you are interested, please contact Lucy at x******[email protected]
f******n
发帖数: 116
13
来自主题: Boston版 - Actor needed in Boston
We are looking for an actor. No experience is required. This will be a very
easy shoot with very little dialogue.
Here is what we need:
1 East Asian male actor, 50+ age - Must be able to speak Mandarin
Each shoot should last approximately 1 hour -- 1.5 hours
We will pay you $50 for your time. This is for a good cause (www.loveandhelp
.org) so we are hoping to find someone to help us out!
Much thanks!
If you are interested, please contact Lucy at x******[email protected]
j**4
发帖数: 10425
14
http://www.tmz.com/2012/01/28/soap-opera-actor-dog-suicide-nick
A soap actor killed himself this week on his 47th birthday ... hours after
he was forced to put his beloved dog to sleep under pressure from his
Manhattan condo.
According to the NY Post the building had a ban on pit-bulls, but Nick
Santino's dog had been grandfathered in ... which didn't sit well will some
of the neighbors. Some claimed the dog was loud and aggressive, but others
said building management was just harassing Santino... 阅读全帖
s***i
发帖数: 10182
15
Heynckes: Drogba is a top striker but also an outstanding actor
The Ivorian has long been criticised for the ease with which he goes to
ground, and the Bavarians' coach feels it is something his players must be
aware of at the Allianz Arena
he Ivorian is now 34 but he proved in the Blues' semi-final success over
Barcelona that he remains one of the most fearsome forwards in the game.
Heynckes has warned his defenders that they will have to maintain both their
focus and their composure - in the f... 阅读全帖
c**i
发帖数: 6973
16
Bonnie Chao, China reaches out for foreign actors as non-Chinese roles
mushroom in TV and movies. Associated Press, June 15, 2010.
http://www.latimes.com/entertainment/news/wire/sns-ap-as-china-imported-actors,0,6483996.story
Note:
(a) I cannot find "Grassroots King" or "Feng Yu."
(b) Baike Quanshuo 百科全说
(c) Volker Helfrich 福乐克
(d) dub (vt; by shortening & alteration from "double"): "to add (sound
effects or new dialogue) to a film or to a radio or television production"
www.m-w.com
C****a
发帖数: 7186
17
(NYTimes article)
Robin Williams, an Academy Award-winning actor and comedian who imbued his
performances with wild inventiveness and a kind of manic energy, died on
Monday at his home in Marin County, Calif. He was 63.
The county sheriff’s office said in a statement that it “suspects the
death to be a suicide due to asphyxia.” A further investigation was under
way.
The statement said that the office received a 9-1-1 call at 11:55 a.m.
saying that a man had been found “unconscious and not breath... 阅读全帖
n****1
发帖数: 1136
18
来自主题: Programming版 - OOP里面的Object其实是actor
OOP的粉丝们喜欢吹鼓一切皆对象, 对象都有自己的method, 就像有自己的独立人格。
譬如BankAccount是对象, 它有deposit/withdraw/query这些method, 甚至连True/
False这俩也是对象。 但其实这些都是死物, 它们自己不会动的, 而是被一些特殊的
对象: 活对象来使用, 像Banker这种。
这些活对象的却应该有自己的动作(method), 而且除此之外, 每个活对象还都需要有
独立运作空间。 换句话说, 每个对象都应该有自己独立的thread。 而传统的c++/
java/python这些oop都是把object和thread两个概念完全正交分离的, 结果就是在
multithread中很难搞懂object与thread之间错综复杂的关系, 所以程序员讨厌多线程
, 写出来的最robust的架构都是单线程的。
而每个活对象独占一线程, 同时把线程这玩意完全abstract out的思想, 正是Erlang
/Scala所提倡的actor model. 而Erlang/Scala的风靡正说明了object和thread两个概
念其实是应... 阅读全帖
p*****2
发帖数: 21240
19
来自主题: Programming版 - OOP里面的Object其实是actor
Scala里面的actor也是object吧?也是OOP的东西。Erlang不熟悉,不过感觉actor本来
也是个object,封装性很强。但是不share state,性能有影响。
n****1
发帖数: 1136
20
来自主题: Programming版 - OOP里面的Object其实是actor
我提的这个与FP完全无关, 就拿c++做例子, 我希望C++里面的class只有data member
, 没有method member. 这样就可以完全从线程的角度, imperative style来看问题(其
实等价于用了opaque struct的C).
或者像golang这样, 完全隐藏多线程, 只有goroutine, 这样就可以完全从actor的角
度看问题。 同时考虑actor和线程是非常痛苦的。
@domini
你就这点理解能力么? 凡是反OO的就是FP么? 我这帖子啥时候提FP了?
我是说OOP语言里的多线程应该由runtime来实现, 而不该直接把kernel thread api暴
露给程序员, 我啥时候说不用多线程了?
话说我还真认为imperative常常比OO的逻辑更清晰, 没有OO概念,PHP照样流行,c也能
写出整个linux 内核, 而java代码往往是滥用模式,又臭又长。
g*****g
发帖数: 34805
21
来自主题: Programming版 - OOP里面的Object其实是actor
LOL,last time I checked, Scala implemented actor in single thread too. So
maybe it's time for you to relearn 101.
At the end of the day, a language doesn't need to be the best at everything.
All features are double-edge swords. For a given job, a language may be
easier than another, that's about it.
However, I wouldn't say Java took the wrong approach in the first place. A
popular language is never a wrong approach. It's only not best for
everything, and it doesn't have to. I always compliment F... 阅读全帖
v*******e
发帖数: 3714
22
来自主题: _FilmArts版 - Interview with the actors
happened to see several interviews with the actors on TV. anybody
else seen it? it's very good. the questions are quite cute. last
time John Depp was interviewed, he was asked:
why do you want to hear God say when you get to the heaven?
"Oh yeah" was his answer.
another guy, forgot his name, was asked same question yesterday,
"here is the key, go and leave as you please." was his answer.
it is obvious that they are both good actors, even their way of
answering questions is a kind of performance,
d****i
发帖数: 348
23
来自主题: _FilmArts版 - icon/actor
great actor changes to fit his role, icon changes role to fit him/herself.
sadly enough, without the long abandoned greece tradition of masking
performance, an actor is great only until the very movie that makes him great.
(ft my english)
b********n
发帖数: 38600
c********e
发帖数: 4283
25
来自主题: Military版 - now it only takes one star actor/actress
now it only takes one star actor/actress to make a pro HK democracy tweet
for China to boycott the entire Hollywood, any one?
L*******e
发帖数: 2202
26
大帅哥啊
Matt Bomer, who has up till now lived in a glass closet (most industry
people knew) regarding his sexuality, made it public at an awards ceremony
and in a magazine article last week. Bomer was given the New Generation Arts
and Activism Award from the Steve Chase Humanitarian Awards on Saturday. In
his award speech, he thanked his partner Simon Halls, and his three kids.
Said Bomer: "And I'd really especially like to thank my beautiful family:
Simon, Kit, Walker, Henry. Thank you for teachin... 阅读全帖
m******8
发帖数: 2153
27
Jim Parsons, who is best known for playing Sheldon Cooper in the US sitcom
‘The Big Bang Theory,’ has been described as gay and in a 10-year
relationship in a profile for the New York Times.
The revelation was quietly added towards the end of the article, discussing
Mr Parsons’ appearance as a gay man in the Broadway play, ‘The Normal
Heart.’
Mr Parsons, whose performance in ‘The Big Bang Theory’ has won him several
awards, including two Emmys and a Golden Globe, has been quiet about his
private... 阅读全帖
a**e
发帖数: 8800
28
More Footage Sandy Hook Hoax Actors Going In Circles
事实上,我一直很奇怪,如果真的发生了屠杀,几十个孩子,按照正常的逻辑,一定有
人在facebook上纪念他们在这次屠杀中失去的孩子/亲戚的孩子/表弟表妹。。。。
而不会仅仅是一些社区的纪念。。。
m********o
发帖数: 2088
29
https://www.washingtonpost.com/news/reliable-source/wp/2016/09/07/gov-john-
kasich-on-actor-daniel-radcliffe-what-the-hell-is-wrong-with-him/#comments
a***4
发帖数: 1112
30
crisis actor!
August 2017 on CNN TOO.
e*9
发帖数: 2289
31
fake news 从来不缺 actors

发帖数: 1
32
如婊说什么一点用没有
关键是这人到底是不是演员
来点干货证明比什么都强

actors
g*****9
发帖数: 1394
33
神经病么?actor和actress里面又没有man这个词。难道英语的man和woman都要取消,
合并成一个词person?
i**n
发帖数: 1481
34
来自主题: Australia版 - Australian wins the Best Actor
ACTOR -- LEADING
Russell Crowe
GLADIATOR
N*********6
发帖数: 4372
35
这个不仔细看真看不出来蹊跷,实在是太忽悠人了,一般除了punter,
coverage team都不看球往哪个地方,直接往前冲,其中一个punter
returner fake一个fair catch, 另一边已经wide open往前冲了
college的同学们更得学习一下,因为意识什么的比NFL差多了
【 以下文字转载自 Football 讨论区 】
发信人: lpx (独自远行), 信区: Football
标 题: Best Actor award goes to Devin Hester
发信站: BBS 未名空间站 (Mon Sep 26 17:44:16 2011, 美东)
Did anyone see his fake punt fair catch? He fooled the whole Packers
coverage team. I can't believe none of the Packers, except for the
Punter
maybe, knew which side of the field the ball was punt to. ... 阅读全帖
d**w
发帖数: 14889
36
来自主题: CouchPotato版 - Grey's actor is gay
NEW YORK (AP) -- "Grey's Anatomy" star T.R. Knight says he's gay, but hopes
people don't consider that "the most interesting part of me."
The 33-year-old actor addressed rumors of his sexuality in a statement to
People magazine Thursday.
"I guess there have been a few questions about my sexuality, and I'd like to
quiet any unnecessary rumors that may be out there," Knight's statement
read. "While I prefer to keep my personal life private, I hope the fact that
I'm gay isn't the most interesting p
u**r
发帖数: 49
37
LOS ANGELES (Reuters) - Actor Lane Garrison of the popular U.S. television
show "Prison Break" was in a car accident late on Saturday that killed a 17-
year-old boy and injured two other teenagers, Beverly Hills police said on
Sunday.
ADVERTISEMENT
Garrison, 26, was inside his sport utility vehicle when it crashed into a
tree in Beverly Hills at about 11:50 p.m. local time, Sergeant Shan Davis
said, adding that police were still investigating which of the car's four
occupants was driving and wha
o********y
发帖数: 1138
38
来自主题: CouchPotato版 - Film, TV actor Peter Boyle dead at 71
NEW YORK (Reuters) - Emmy-winning actor Peter Boyle, who played the
dancing monster in the movie "Young Frankenstein" and grouchy father Frank
Barone in the TV series "Everybody Loves Raymond," has died, his publicist
said on Wednesday.
The 71-year-old former Christian Brothers monk died on Tuesday after a long
battle with multiple myeloma and heart disease, his publicists said.
Boyle, who often played cantankerous characters, shot to fame as a foul-
mouthed, working-class bigot in the 19
d**w
发帖数: 14889
39
She looks like she is 50 herself, doesn't she?!
http://marquee.blogs.cnn.com/2011/06/21/lost-actor-marries-16-y
s****n
发帖数: 4902
40
傲视卡最佳actor我猜colin
l***y
发帖数: 791
41
来自主题: Translation版 - oscar best actor
just some observations, before the winner of best actor was announced, i
noticed both Law and Depp were rubbing their lips with their fingers. ^o^ the
best actress nominees were less tense --- but they had kind-hearted Adrien to
distract them. :)
p*****2
发帖数: 21240
42
来自主题: Programming版 - OOP里面的Object其实是actor
都是机器世界和现实世界之间的折衷吧?就看折衷在什么地方了。不能说Java不对,只
能说actor更上层。Functional本来就比Imperative上层。
N******K
发帖数: 10202
43
来自主题: Programming版 - OOP里面的Object其实是actor
为啥要去掉成员函数?
actor之间的交互 很复杂 怎么搞?

member
n****1
发帖数: 1136
44
来自主题: Programming版 - OOP里面的Object其实是actor
哦, 莫非balance是活的? 其他人如果不去操作它, 它的值会变化么?
我顶楼已经举了例子,BankAccount不适合拥有method,而Banker是改变账户的actor,可
以有method. Banker是很好的object例子, 但account不是。
n****1
发帖数: 1136
45
来自主题: Programming版 - OOP里面的Object其实是actor

My point is that thread/sync in Java is the wrong approach at the first
place, that is why Golang removes it.
Actor in most OO language is single-threaded because most OO languages suck,
that's why scala/clojure/golang have a shot despite of the existing
popularity of Java.
>>班上70%的人身攻击,都是因为你这样的脑残不懂还非要装逼引起的。
I noticed the dirty words usually start from your posts. I guest you are the
only genius good enough to teach them a lesson.
g*****g
发帖数: 34805
46
来自主题: Programming版 - OOP里面的Object其实是actor
LOL, so this is the best defense you can come up with after being exposed of
lacking basic
common sense? Cry me a river but none of FP language today is mainstream,
actor model or not.

the
s*****y
发帖数: 11
47
如果我在几个不同的机器上spawn 几个 AKKA actor, 各自有各自的数据【格式一样】
,然后我想把这些数据merge到一个spark RDD里面统一进行处理, 怎么样的方式最好呢
d******e
发帖数: 2265
48
来自主题: Programming版 - 有什么web server 可以后台接actor
actor做一些比较慢的工作
除了用java Scala上的还有什么选择
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)