Re: Asynchronous Programming with Async and Await examples for C# and VB.NET
Works for me as well, with FireFox, so I have to assume we all already have the SilverLight plugin installed in our browsers, as the site does obviously use SilverLight for its GUI. Since dilettante is forcibly refusing to install the "SilverLard" crap and a whole lot of other bloatware being pushed out there, it is what it is. Caveat Emptor, C'est la vie, ob-la-di, ob-la-da, etc...
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Why aren't you guys complaining about those things ?
I'm not complaining Niya, only observing (for example the typical ignorance of some
developers here, who seem not really capable to think outside their little MS-Box).
I love how you think....except there is a small problem. All the third part software that I use like video converters, BitTorrent clients, media players etc almost always come with Win32 installers. Some might have Linux versions but Win32 is always guaranteed. How do you propose I get around this now ?
Originally Posted by Schmidt
I'm not complaining Niya, only observing (for example the typical ignorance of some
developers here, who seem not really capable to think outside their little MS-Box).
If MS provides all that I need, why is God's name would I want to look outside ? Even as a developer, there are tools that work on Windows that can target other platforms.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Re: Asynchronous Programming with Async and Await examples for C# and VB.NET
Originally Posted by Niya
I love how you think...
Thank you so very much - assuming therefore, that it's OK to educate you further...
Originally Posted by Niya
.except there is a small problem. All the third part software that I use like
video converters,
I'm quite sure you already heard of "ffmpeg" for example...
For (and on) what OS do you think it was developed first? http://en.wikipedia.org/wiki/FFmpeg
Originally Posted by Niya
BitTorrent clients,
Ok, next read: http://en.wikipedia.org/wiki/Bram_Cohen
"...Cohen wrote the first BitTorrent client implementation in Python, and many other programs have since implemented the protocol."
I'm not exactly sure, when the first (usable) Python-version came out for the Win-platform -
but I consider 2001 as quite early for a well-working Python (including all the libs)
on Windows - but that's beside the point IMO - because Python is surely not an
"MS-invention"...
In my "Linux-phase" I've encountered VLC - and still use this Multiformat-player
in favour of the MS-one on Windows (no codec-packs to be installed).
Most good players have their roots in the "free-software-scene" and are
OpenSource-projects...
Originally Posted by Niya
If MS provides all that I need, why is God's name would I want to look outside ?
Because denying that there exists a huge world outside the MS-Box, is not
really helping with an objective view on things, Niya.
Especially when you go on, handing out "advise" to those you consider
"old fools, using old stuff"...
Do you really think, that what Developers worldwide are using was primarily invented by MS?
Just to give you an example - where do you think the MS-Winsock-stack was originally
derived from? It's basically the (somewhat enhanced) BSD-stack they choose. http://en.wikipedia.org/wiki/Winsock
Even as a developer, there are tools that work on Windows that can target other platforms.
Again that tight view, where your universe circles around a small moon,
christened 'MS'...
I'm more an electronics-guy - where MS (or any MS-tools) are playing only
a really small role - most of the µControllers programming is done per C -
most of these small chips have (in their 32Bit-versions) already a small
Linux running (often in a real-time capable version).
So, there's a reason, why C is the most popular language currently - whole
industries depend on it, on it's "stableness" - and the stability of its
surrounding "support-libs" - there's a requirement (agreement) that every
engineer considers a "very good idea", in that changes in the language or
surrounding runtimes need to be applied *very* carefully (timeframes
of decades need to be considered in most scenarios) - and that's how it
*should* be (MS was forgetting about that, and one can only hope that
they change their current practice, especially now that they plan to play
with the big guys, shifting the company more over to "devices-stuff"...)
Do you have any clue, how huge that market (and how hard the competition) is?
E.g. when we list the largest players:
- Atmel Corporation
- Freescale Semiconductor, Inc
- Fujitsu
- Infineon Technologies
- Microchip Technology Inc.
- NXP Semiconductors
- Renesas Electronics Corporation
- STMicroelectronics
- Samsung Electronics Corporation
- Texas Instruments
not to forget Apple, but they are so far only acting as an "integrator"
of the parts the above giants deliver...
You will see, that any one of the above plays at least in the same league as MS.
When you talk about "software development", then you need to come out of the MS-Box,
when your goal is, to provide an "illuminated audience with *commonly* recognized truths"...
Re: Asynchronous Programming with Async and Await examples for C# and VB.NET
Very informative post, though I'm already aware that there is a large ecosystem outside MS, that info is interesting nonetheless.
However, I would need a dozen lifetimes to learn all these different ecosystems. I only have 1 lifetime and it was spent with MS from a very early age. Again, if MS provides all that I've come to need, why then should I waste time starting over with an entirely new ecosystem. I'm all for learning as much as you can but you can spread yourself too thin. Knowing very little of a whole lot really doesn't have much value. There must be a level of specialization.
I have nothing against somebody who loves to dabble in Linux or Apple or whatever else. But I'm not going to abandon the MS ecosystem simply because of a move by MS that I didn't like. I loved VB6, I really did and I was just as passionate about the move by MS to leave it behind as any of you. You think I don't know how you guys are feeling ? I felt it too. I didn't start using .Net until it was well mature. I started with VS2008 when VS2010 was just released. I'm all the better for it.
Even so, there are still things that MS does that I don't like. Abandoning XNA for one. The killing of SilverLight for another. While I don't like these decisions, I'm not about to throw away a lifetime spent learning about Windows and all that surrounds it on a stupid emotional whim simply because I feel betrayed which is what these VB.Net hate threads come down to. XNA is gone ? I can always learn DirectX and even if MS doesn't offer a new .Net alternative, I can still learn how to use it in C++, and even so XNA isn't broken, I can still write apps that use it. SilverLight is dead ? I can always learn how to write for Flash if it really comes down to it. Both these options don't require me to abandon Windows. I don't have to adopt an extreme attitude like dilettante who is praying for the demise of Windows at the hands of Android. This is not pragmatic thinking. The just self-righteous posturing.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Re: Asynchronous Programming with Async and Await examples for C# and VB.NET
Frankly, I have no desire to return to the time where there were half a dozen OSes all on an equal footing. Back in that day, I was only interested in games, but with every new game there was always the question of whether or not it was even made for the platform you had. There were some cool mac games, but I had a PC. Some guys in college had a really neat game for the Amiga, but I had a PC. Of course, there were some great games for the PC, too, so it went both ways.
Except for the problem of ultimate stagnation, it would be better for all developers if there was a single OS. Those of us who are writing internal LOB apps generally have a single ecosystem that we target because that's where we work (and the choice is made for us rather than by us), but those writing end-user apps have to deal with all the fractured ecosystems that are out there. If you are writing lower-level apps, such as creating a language, drivers, or anything like that, then you really get to choose your ecosystem and can do as you like. The rest of us are more harmed than helped by that in the short term. In the long term....everybody is just guessing.
Re: Asynchronous Programming with Async and Await examples for C# and VB.NET
Thought I toss in a simple example that might be of help to those looking to learn. See attachment for VS2012 project.
See also: Handling Reentrancy in Async Apps (C# and Visual Basic) in regards to alternates to the code in button1
Code:
Imports System.Threading
Public Class SimpleExample1
Private AsyncCancelToken As CancellationTokenSource
Private Async Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
AsyncCancelToken = New CancellationTokenSource()
Button1.Enabled = False
Try
Await MyTask()
Finally
Button1.Enabled = True
End Try
End Sub
Public Async Function MyTask() As Task
Dim mProgress As Progress(Of Integer)
Dim progressTarget As Action(Of Integer) = AddressOf ReportProgress
mProgress = New Progress(Of Integer)(progressTarget)
Await MyProcess(16, 160, mProgress)
End Function
Private Sub ReportProgress(ByVal sender As Integer)
Label1.Text = "Current: " & sender.ToString
End Sub
Public Function MyProcess(ByVal width As Integer, ByVal height As Integer, ByVal myProgress As IProgress(Of Integer)) As Task(Of Integer())
Return Task.Run(
Function()
Dim result(width * height) As Integer
For y As Integer = 0 To height - 1
If AsyncCancelToken.IsCancellationRequested = True Then
Exit For
End If
For x As Integer = 0 To width - 1
Thread.Sleep(10)
Next
If Not myProgress Is Nothing Then
myProgress.Report(y)
End If
Next
Return result
End Function,
AsyncCancelToken.Token
)
End Function
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
AsyncCancelToken.Cancel()
End Sub
Private Sub SimpleExample1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label1.Text = ""
End Sub
End Class
Re: Asynchronous Programming with Async and Await examples for C# and VB.NET
The objection to 'silverlight' is that the WHOLE page uses it; not just a small app, video, etc.
It's an example of not understanding the consumer requirements. While those that have Siverlight activate automatically (<snort!>) will probably have no issues, my question is, 'why is this a silverlight app, for a trivial, informational, page?'
"Ok, my response to that is pending a Google search" - Bucky Katt. "There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk. "Before you can 'think outside the box' you need to understand where the box is."