由买买提看人间百态

topics

全部话题 - 话题: async
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
h*i
发帖数: 3446
1
来自主题: Programming版 - go channel和clojure core.async哪个好
这只能说明goroutine 适用范围小,要求driver必须是nonblocking的,我问的是,what
if driver是blocking的?你可能回答,go的driver都是基于fiber的。我说,这不就
是limitation么?
core.async不管下面是什么,多线程也好(Java),单线程也好(JavaScript),甚至fiber
也好,对用户来说是透明的,我不需要关心,我一样用,得到一样的async的功能。这
样的好处是巨大的,比如在浏览器端,core.async让clojurescript完全脱离了
callback hell。
至于下面的机制不同,context switch效率不同,这不是废话么,谁都知道。一般来说
,用户更关心能不能的问题,"core.async不管什么环境都能,goroutine 只能在go环
境里能,所以core.async更好"。
无论如何,"core.async is just a toy" is nonsense.

★ 发自iPhone App: ChineseWeb 8.6
h*i
发帖数: 3446
2
来自主题: Programming版 - go channel和clojure core.async哪个好
core.async可以block,也可以不block,用户自己选择,这是优点不是缺点啊。
在不block的时候,core.async的实现和Go里面的goroutine的实现的几乎是一样的,都
是把状态park在适当的地方,等数据来了把context换过来,继续走。而且数据结构都
是追求lightweight, core.async用一个mutable array, goroutine用一个stack, 我没
看出来性能能够如何不同。
async没有什么magical的,就是个语言内部实现的context switch,不用OS的那一套而
已,这样可以更加lightweight。
h*i
发帖数: 3446
3
来自主题: Programming版 - go channel和clojure core.async哪个好
呵呵,我们不是在试图学习么,到底这比一张皮要深邃的东东是个啥?搞了半天你也没
说个道道来。
至于core.async的应用,现在Clojure世界Web编程前端后端几乎都是用core.async,
chan满天飞,有识之士已经在呼吁不要滥用core.async了。
http://www.lispcast.com/core-async-code-style
N********n
发帖数: 8363
4
来自主题: DotNet版 - Effective Async coding
Good videos on how to avoid troubles when writing the latest .Net
4.5 async code.
http://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/
http://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/
p*****2
发帖数: 21240
5
来自主题: Programming版 - 看了一下C#的async await

Scala 2.10 has integrated the Future concept from Akka, still available by
means of Akka for Scala < 2.10. You are right, Task is analogous to
Future[T] from Scala.
I also don't like the async/await feature from C# or the experimental
delimitated continuations support. Async programming by means of Futures
works great without it and looking at my code, I don't see many places where
I could actually use the async/await syntactic sugar. That's because
modelling computations in terms of Future... 阅读全帖
t**r
发帖数: 3428
6
node里,async.waterfall async.auto 大家用的多么?总感觉怪怪的
h*i
发帖数: 3446
7
来自主题: Programming版 - go channel和clojure core.async哪个好
作为一个用户,我不管底层是如何实现的,只要我用起来一样就行了。
具体说到实现的话,Clojure好像是把CSP转换成一个finte state machine来实现async
的。从用户角度,这种实现好像也没有什么损害。
好像没有人benchmark过goroutine和core.async两者的效率区别。可能也没有意义,两
个语言的使用场合完全不同。go是底层系统语言,与C/C++啥的竞争,Clojure是高层的
用来写应用的语言,根本不与C/C++的竞争。

async
g*******o
发帖数: 156
8
来自主题: Programming版 - go channel和clojure core.async哪个好
goroutine所有的driver都是fiber/micro-thread切换,所以从语言层和效率上看都是
async.
core.async如果使用blocking driver,就需要做thread切换,语言层是async,但是效
率远不行(context switch)。
如果说错了请指正阿:)
c*********e
发帖数: 16335
9
These 2 java async extensions are trying to combine concurrency with async.
https://github.com/ReactiveX/RxJava
https://github.com/AsyncHttpClient/async-http-client
Which one is better?
S******s
发帖数: 5376
10
来自主题: EE版 - 求ASYNC VLSI 科普
目前的async company基本上都是基于大学的
比如silistix是基于英国u of manchester,貌似做的比较广,主要是network on chip
fulcrum是基于caltech的,主要产品,以太网交换路由芯片
achronix(好像是这么写的),好像是基于cornell,异步FPGA
飞利浦分出来的handshake solution,头一阵子说破产了,不知道现在咋样。
sun microsystem的research lab一直在搞async的东西,大牛很多。
还有几家法国公司,忘记什么名字了。
这个领域主要是缺少CAD TOOL,大家都有自己的一套方法,不够standard。像
handshake solutions,整套流程不外泄,外人不知道他们具体怎么做出来的。
异步设计基于各种timing
1. delay insensitive or quasi delay insensitive circuit operates independent
delay on gates and wires. 但是做出来的电路比较复杂,没什么优势,主要就是解
决的a... 阅读全帖
S******s
发帖数: 5376
11
来自主题: EE版 - 求ASYNC VLSI 科普
目前的async company基本上都是基于大学的
比如silistix是基于英国u of manchester,貌似做的比较广,主要是network on chip
fulcrum是基于caltech的,主要产品,以太网交换路由芯片
achronix(好像是这么写的),好像是基于cornell,异步FPGA
飞利浦分出来的handshake solution,头一阵子说破产了,不知道现在咋样。
sun microsystem的research lab一直在搞async的东西,大牛很多。
还有几家法国公司,忘记什么名字了。
这个领域主要是缺少CAD TOOL,大家都有自己的一套方法,不够standard。像
handshake solutions,整套流程不外泄,外人不知道他们具体怎么做出来的。
异步设计基于各种timing
1. delay insensitive or quasi delay insensitive circuit operates independent
delay on gates and wires. 但是做出来的电路比较复杂,没什么优势,主要就是解
决的a... 阅读全帖
N********n
发帖数: 8363
12
来自主题: Programming版 - 看了一下C#的async await

Scala也在加async/await, 基本上裸抄C#。NODE用啥不知道,但只要是还
在写CALLBACK METHOD就不是真正的async/await。
g****r
发帖数: 1589
13
来自主题: Programming版 - 看了一下C#的async await
看了下scala的future,这个还真是老一套的东西,基本相当于.net 3.5里面
asyncresult类似的一个东西,还真比async/await差一些
go看着挺颠覆的,之前看了点,没感觉咋样,有啥async编程的例子吗,我研究研究?

Future
k**********g
发帖数: 989
14
来自主题: Programming版 - 看了一下C#的async await

是C
Win7 也可以「仿」async/await。 沒有 syntactic sugar。
用 C++11 和 MS 自家的 Parallel Patterns Library
但是软件要在 Win7 用VS2012开发,编译後可以拿到XP/Vista/Win7/Win8运行
But according to Jon Skeet, whatever is available on C++ is still quite
primitive when compared to what's on other languages. C++ still has a long
way to go.
http://stackoverflow.com/questions/5498701/c-stdasync-vs-async-
N********n
发帖数: 8363
15
来自主题: Programming版 - 看了一下C#的async await
Imagine you wanna run 3 async operations in a method like below:
void foo () {
// run async_op1, async_op2 & async_op3
}
W/ callbacks you'd have to break it down into several callbacks:
void foo () { run_async (op1, op1_callback);}
void op1_callback () {run_async (op2, op2_callback);}
void op2_callback () {run_async (op3, op2_callback);}
void op3_callback () {//finish the rest;}
Now you are forced to break the logic down into spaghetti callback
methods. If one async_op requires o... 阅读全帖
A*****i
发帖数: 3587
16
来自主题: Programming版 - 这年头async IO成了流行了
上个世纪出来的语言基本上原生都不支持
但是这几年由于这种趋势的要求,相应的library都出来了
目前知道的,C java js ruby python php,这些最流行的全都有async库了
有的还直接就是low level library。
RESTful 的世界基本上不用async没法做并发
n*****t
发帖数: 22014
17
没用过,waterfall 基本就是串行的意思,一个挨着一个调用,前一个把结果传递给后
一个,失败了 catch
http://www.sebastianseilund.com/nodejs-async-in-practice
N********n
发帖数: 8363
18
来自主题: Programming版 - scala的基于future并行async程序怎么写
SCALA抄了C#的ASYNC/AWAIT,不知道实现细节是否100%一样。C#只要
METHOD定义成ASYNC,在AWAIT这个METHOD时EXCEPTION会被CALLER收到。
B********r
发帖数: 397
19
来自主题: Programming版 - scala的基于future并行async程序怎么写

拜托去查清楚一点,scala就只是一个第三方库实现了async/await, 其它用的future/
promise是沿袭java里面的,早就有了好么
而且跟async还不完全一样,您没写过java/scala吧
p*****2
发帖数: 21240
20
来自主题: Programming版 - go channel和clojure core.async哪个好

code没啥区别。但是clj里操作可以是blocking的,go里都是async的。为了保证async
,clj里要做更多的工作,而且也不是很容易。
h*i
发帖数: 3446
21
来自主题: Programming版 - go channel和clojure core.async哪个好
你说的“更多的工作”Rich Hickey给你都做了,对用户来说,core.async与go
channel没有啥区别,需要写的代码是一一对应的。

async
h*i
发帖数: 3446
22
来自主题: Programming版 - go channel和clojure core.async哪个好
怎么不一样?我们都看到了,用的时候代码是一样的,那还能有什么不一样?
只能是用到的资源不一样,效率不同。
现在我看了core.async的实现细节(见下面的video),我甚至认为连效率可能都差不多
。core.async的go是一个宏,在编译前就变成了state machine, 没有runtime
overhead, 而且这个state machine是用mutable state实现的,最后编译成jump table
机器码。我相信Go语言的实现也不会比这效率高到哪去。
https://www.youtube.com/watch?v=R3PZMIwXN_g&t=24m46s
p*****2
发帖数: 21240
23
来自主题: Programming版 - go channel和clojure core.async哪个好

你对于async的理解还不是很清楚。clj只是做了一张皮而已。你写写就知道了。或者你
看看有没有什么东西是core.async build的。你去看看代码,在比较一下go的。
c*********e
发帖数: 16335
24
rxjava是one thread, async. 但是,它的async,是用的epoll吗?
T******T
发帖数: 3066
25
来自主题: EE版 - 求ASYNC VLSI 科普
对这个领域有些好奇+兴趣,知道这里有些做ASYNC VLSI研究的,能否给大家科普一下?
另外有哪些业内公司/产品已经开始运用这些技术,ASYNC VLSI CAD/EDA的tool哪里可
以找到?
多谢!
T******T
发帖数: 3066
26
来自主题: EE版 - 求ASYNC VLSI 科普
Nice, very informative, thanks so much ! I read about QDI from Caltech,
novel but it seems like #4 approach might have more chance of getting
adopted by the industry ?
For companies who would like to port their current synchronous design to
Async for analysis, can the current Async EDA tools do that readily at the
RTL level and still achieve 3x power and performance gain ?
If so, man that would be huge.

chip
T******T
发帖数: 3066
27
来自主题: EE版 - 求ASYNC VLSI 科普
对这个领域有些好奇+兴趣,知道这里有些做ASYNC VLSI研究的,能否给大家科普一下?
另外有哪些业内公司/产品已经开始运用这些技术,ASYNC VLSI CAD/EDA的tool哪里可
以找到?
多谢!
T******T
发帖数: 3066
28
来自主题: EE版 - 求ASYNC VLSI 科普
Nice, very informative, thanks so much ! I read about QDI from Caltech,
novel but it seems like #4 approach might have more chance of getting
adopted by the industry ?
For companies who would like to port their current synchronous design to
Async for analysis, can the current Async EDA tools do that readily at the
RTL level and still achieve 3x power and performance gain ?
If so, man that would be huge.

chip
H******9
发帖数: 1180
29
来自主题: JobHunting版 - Async
申请的一个公司要我上Async用Webcam面试。有同学用过么?是个什么东东?有何注意
事项?多谢!
o****e
发帖数: 916
30
silverlight to self hosting wcf service, 非得用async pattern, 折腾半天才搞明
白,原来这么简单。睡觉前来这里吼一把,有木有啊!
N********n
发帖数: 8363
31
来自主题: Programming版 - 看了一下C#的async await

As someone pointed out b4, the key is AVOIDING CALLBACK b/c callback
is merely a different form of GOTO: When asynchronous operations finish,
control flow GOES TO your callback methods.
When you have to write many asynchronous operations you end up with many
"GOTO" callback methods in your code that ruin its structure, which is
bad so you wanna avoid them, and that's where async/await helps.
Threading is not relevant here.
N********n
发帖数: 8363
32
来自主题: Programming版 - 看了一下C#的async await

It's naked copy of C# async/await, and I don't know node.js has a
counterpart.
N********n
发帖数: 8363
33
来自主题: Programming版 - 看了一下C#的async await

Scala's original "future" was probably from Java. It's after its
designers saw the power of async/await that they decided to copy
the feature to Scala.
p*****2
发帖数: 21240
34
来自主题: Programming版 - 看了一下C#的async await

对了,你知道async/await是怎么设计出来的吗?参考了其他异步方案吗?
N********n
发帖数: 8363
35
来自主题: Programming版 - 看了一下C#的async await

C# introduced async/await in 2012. Scala designers were "inspired by C#"
and brought them to Scala in 2013.
Listen to their explanation here:
http://parleys.com/play/51c0b264e4b0d38b54f461f2/chapter2/about
p*****2
发帖数: 21240
36
来自主题: Programming版 - 看了一下C#的async await

这个是讲Scala Async的吧?不是说Scala Future的。
我想知道Scala的Future也是学C#的吗?这东西貌似很早之前就有了吧?
c******o
发帖数: 1277
37
来自主题: Programming版 - 看了一下C#的async await
不熟c#
Scala 的future重点是能用flatMap/map composite.
多个future 可以用任意逻辑对其中的结果任意组合 (同时每一个都是独立,相对其他
async)(除非参数上有相对的先后,那也是自动会等待), 我一个callback都不用写,
只用在最后为组合的总和写一个(要是在一些framework里,最后一个 callback 都被
代劳了)。
z****e
发帖数: 54598
38
你用java在做什么?
如果spring等框架在的话
@Async
一个annotation就搞定
core java也可以用spring
A*****i
发帖数: 3587
39
来自主题: Programming版 - 这年头async IO成了流行了
出去吹牛逼要是不显摆一下自己会用某种async IO的library简直都没法愉快的聊天了啊
连尼玛PHP都有了……
http://reactphp.org/
老女人要第二春了这就?
p*****2
发帖数: 21240
40
来自主题: Programming版 - cassandra async 问题
这个链接的例子意义不大呀。自己都说了跟sync的call一样的。cassandra在java里怎
么做async query呢。有大牛做过吗?
http://www.datastax.com/documentation/developer/java-driver/1.0
c******o
发帖数: 1277
41
来自主题: Programming版 - cassandra async 问题
据我所知,没有好的reactive(async) 的jvm C*driver.
这也是为什么我们mongo的原因之一。
s********k
发帖数: 6180
42
来自主题: Programming版 - cassandra async 问题
Mongo有什么好的reactive(async)的driver?
p*****2
发帖数: 21240
43
来自主题: Programming版 - go channel和clojure core.async哪个好
core.async 差太远了
p*****2
发帖数: 21240
44
来自主题: Programming版 - go channel和clojure core.async哪个好
node也比core.async强
p*****2
发帖数: 21240
45
来自主题: Programming版 - go channel和clojure core.async哪个好
core.async像个玩具
p*****2
发帖数: 21240
46
来自主题: Programming版 - go channel和clojure core.async哪个好

async要自己做
l**********n
发帖数: 8443
47
来自主题: Programming版 - go channel和clojure core.async哪个好
clj is immutubile

async
p*****2
发帖数: 21240
48
来自主题: Programming版 - go channel和clojure core.async哪个好

async
用起来肯定不一样呀。
p*****2
发帖数: 21240
49
来自主题: Programming版 - go channel和clojure core.async哪个好

table
core.async里的操作可以是block的。你去试试就知道了。主要是性能的差别。
h*i
发帖数: 3446
50
来自主题: Programming版 - go channel和clojure core.async哪个好
人都给出了代码,go和core.async代码对比,完全是一一对应的, 哪来的“clj需要自
己去manage"? manage啥?
http://blog.drewolson.org/clojure-go-comparison/
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)