I recall once writing a small program on a Sinclair QL which drew an image of the Mandelbrot set on the screen, I was amazed at how a simple looking recursive function could possibly lead to such an incredibly complicated looking pattern.
Although the initial version of a lexical analyzer represents the input file as a List, it also exposes tokens in a crude “one at a time” manner, burdening the token consumer with the responsibility of passing the previous token into the tokenizer function when requesting the next token.
In the previous post I presented a simple lexical analyzer created purely as a means for me to get deeper into working with the F# language, such projects are a valuable means of subjecting oneself to realistic pressures so that one is compelled to deliver some kind of working solution.
The term Lexical Analysis refers to the conversion of a raw character by character stream into a stream of what are termed tokens. A token is a simple abstraction which strives to decouple the lexical structure of something from its logical meaning.
The TaskCompletionSource class is the means by which we can create and “manage” a Task ourselves. By “manage” I mean implement the underlying mechanism that embodies the progression of an asynchronous activity including its completion or possible termination due to exceptions.
I feel rather fortunate to have developed interests in electronics and computing right at the beginning of the microprocessor era. Today’s generation are entering the technology, software and internet fields at a time when they are well established and the chaos, experimentation, excitement and optimism are somewhat less than they were forty years ago.
I’ve been informally exploring the whole microcontroller world recently; because I studied and wrote about electronics and hobby robotics in the past I have an ongoing fascination with these kinds of gadgets but have done very little in this area for years.
Imperia is the name I’ve given to my UPnP Control Point API that supports Windows Desktop, Windows Surface (WinRT) and Windows Phone 8. This project arose because I was interested in leveraging my C# skills on a Windows Phone 8 project, I setup a developer account at Microsoft and installed the Phone SDK as part of Visual Studio 2012 on a Windows 8 machine that I have.
C# allows you to declare raw pointers to memory, such pointers can only be declared and manipulated if the project in which they appear has the “Allow unsafe code” option enabled and the code block has the “unsafe” keyword specified.