back
user profile
danabramov
9,673karma·1,751submissions·February 4, 2012
recent activity (1,751 total)
comment
Fonts often take months, if not years to design. There are blogs dedicated to the process that help you learn about the process and decisions being made. For example: http://ilovetypography…
comment
May I reply with a Russian proverb? “If mushrooms grew in the mouth, that would be not mouth but kitchen garden.”
comment
https://twitter.com/spolsky/status/370917100593762304
comment
Some very exciting things there for Mono. * SGen is now default GC * There's an API to ask GC not to run during critical sections * Much faster build times * F#, RX now bundled with Mono * Xama…
comment
Do you have any other method of updating the UI without calling corresponding methods? I'm lost on your argument.
comment
Yes, you are :-) The compiler rewrites your code to schedule all next lines as a continuation . There is no blocking.
comment
Surely async isn't meant to replace events—it's just in some cases, when you expect events to happen in particular order, such as in help tutorial, async gives an advantage.
comment
You never want to block UI thread in a GUI app.
comment
No, you got it wrong.
Await never blocks the UI thread. Instead, the compiler rewrites your sequential code into a state machine. When you await on a task, the compiler turns this into scheduling a…
comment
Oh, can we use Tcl on iOS maybe? No? How about Android? Xamarin runs on both.
comment
You misread the article. The compiler allows you to write code in sequential manner but rewrites it into a state machine with callbacks.
comment
Have you read the article? It's not about tasks per se, it's about a code rewriter.
comment
This. Specifically, I'm thinking about iOS prompts and alerts, they are not blocking.
comment
Imagine it's an iOS modal prompt. It doesn't block the thread, it sends an event.
comment
This is simply not true. You can use any C# library without using async (code rewriter). You'd still be using Tasks but there is nothing special about them (no compiler magic). They're just …
comment
I'm sure Busy isn't meant to represent state—it's a property whose setter and getter call a spinning wheel UI element's StartAnimating and StopAnimating. It's a very common pr…
comment
Exactly, this was my point. It took me about as long as I typed this code to write it. Of course it is doable with callbacks, but I know I 'm not smart enough to do it in a comment field on HN…
comment
No, it rewrites the method code into a state machine[1]. See Async/Await FAQ[2]. [1]: http://stackoverflow.com/a/4047607/458193
[2]: http://blogs.msdn.com…
comment
That's a smooth point! As you probably know, async code is translated by C# compiler to a state machine[1]. [1]: http://stackoverflow.com/a/4047607/458193 …
comment
Same problem like with the sibling post: this will ask two players simultaneously. My example waits for each player to provide a valid name in turn.
comment
This will ask two players simultaneously. My example waits for each player to provide a valid name in turn.
comment
Await kills `done` and `error` callbacks, which are always devoid of concrete meaning in the context of function. Of course it can't—and isn't meant to replace callbacks like `comparator`, `…
comment
It is a convention, often used to differentiate blocking and asynchronous methods in the APIs (e.g. `Read` and `ReadAsync`, etc). You're not required to use it, but it is useful whenever there is…
comment
That's very cool, thanks for sharing.
comment
I see your point. Closures also don't affect structure on conceptual level, but I think they're pretty darn useful. By the way, async can affect things on conceptual level if you embrace[1…
comment
How do you do this with callbacks? foreach (var player in players) {
while (true) {
var name = await Ask("What's your name");
if (IsValidName(name)) …
comment
They seem to be pretty busy with Roslyn, Anders recently admitted it's taking longer than originally expected. So perhaps we need to give 'em a break. The only thing I heard about C# 6 so fa…
comment
By the way, how do F#'s async workflow compare to ClojureScript? Are they equally powerful?