CKoenig
http://gettingsharper.de
@CarstKoenig
| Forum | Thread | Replies | Latest activity |
|---|---|---|---|
| Coffeehouse | what happend to the "cool stuff" | 7 | Sep 08, 2011 at 11:35 PM |
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
| Forum | Thread | Replies | Latest activity |
|---|---|---|---|
| Coffeehouse | what happend to the "cool stuff" | 7 | Sep 08, 2011 at 11:35 PM |
Erik Meijer - Functional Programming From First Principles
Sep 11, 2012 at 9:39 PMI don't think Erik went to the dark ... err imperative ... side - you just have to adapt to your audience: "GOTO Chicago is a premier software development conference designed for team leads, architects, and project managers."
JavaScript Variables, Types, Operators, and Expressions - 05
Aug 13, 2012 at 11:03 AMBTW: in JS "values" got types not the variables - so if you put
it's not myVar that will have any type - indeed you can just go on and give another value of a different type to the same variable without getting any complaints:
That is both one of the strenghts (as it gives you lot's of power - like duck-typing) but also one of the biggest weaknesses (as there is no compiler telling you about your type-errors) of dynamic languagues.
Understanding Monads with JavaScript
Aug 12, 2012 at 1:01 AM@philosopher: if you need practical aspects look at any of the LINQ casts here or elsewhere. Other examples would be the asynchronous workflows in F# (you can find a *inferior* version of this in C# too - there it's called await/async
), the IO-Monad in Haskell, testing with randomized data with QuickCheck/FsCheck, ...
That's the fun of this cat.theory stuff: it's so general that it's everywhere around you - even if you don't notice.
Understanding Monads with JavaScript
Aug 12, 2012 at 12:36 AMright in the middle you can see why dynamic typed languagues are just a pain. Any strongly typed languague won't have him made smarter about his add/add3 typo but the compiler would have him get it in no time .... and of course you can see the "JOY" of JS by adding and substracting strings and yield some kind of almost sensible output ... god this languagues is so ... argh
Brian Beckman: Hidden Markov Models, Viterbi Algorithm, LINQ, Rx and Higgs Boson
Jan 01, 2012 at 10:21 PMfinally ... cannot wait to see this ... downloading now - enjoying after work ... thank you guys
TouchDevelop - Getting Started
Aug 15, 2011 at 5:38 AMI would really like to play with this but I've got the (known) install problem (c101b00b) - is there any cure for this ill on the way?
Rx Workshop: Schedulers
Jul 11, 2011 at 9:09 PMHi - you never have to "foreach" - you can allways use some LINQ-syntax to do the same (and tools like ReSharper even have some automatic code-conversation between the two ways) - it's just a matter of taste and the way the code might look if you use Select/Aggregate/whatever to make it LINQish.
Rx Workshop: Schedulers
Jul 05, 2011 at 9:32 PMIndeed this might be the indented way - thanks.
But boths of theses seems to me like "breaking the pattern" - if we use a concrete scheduler in the definition of the Observable-Source then what about SubscribeOn (the one with the IScheduler overload)?
What I had expected was something like Create with "Action<ISubscriber>" or something like
public static IObservable<tData> ToObservable<tData>(this IEnumerable<Tuple<DateTimeOffset, tData>> source) { /* feed the data (snd) into a IObsevable and use the fst component for the scheduler, whatever it might be */ }Rx Workshop: Schedulers
Jul 04, 2011 at 4:41 AMWell - here is my try.
I have to say I've got some problems with this. First it took me a horrible long time to realise that Subject can be used as an Observable-Source you can publish values to. And even worse is the way I have to use the Schedule/OnNext - mess.
Don't know if there is any better way, but why was the way suggested by the video droped?
IObservable<StockQuote> GetQuotes(IScheduler scheduler, IEnumerable<StockQuote> quotes) { // Create an observable source of stock quotes var sub = new Subject<StockQuote>(); foreach (var quote in quotes) { var quote1 = quote; scheduler.Schedule(quote.Date, () => sub.OnNext(quote1)); } return sub; } IObservable<object> Query(IObservable<StockQuote> quotes) { // Write a query to grab the Microsoft "MSFT" stock quotes and output the closing price // HINT: Make sure you include a property in the result which has a type of DateTime return quotes.Where(q => q.Symbol == "MSFT").Select(q => new {q.Date, q.Close, q.High, q.Low, q.Open}); }Rx Workshop: Unified Programming Model
Jul 03, 2011 at 10:11 PMa pitty that nobody posted anything on te challange (or am I missing something?) so here is my *take* on it:
// Convert txt.TextChanged to IObservable<EventPattern<EventArgs>> and assign it to textChanged. var textChanged = Observable .FromEventPattern(addHandler: evHandler => txt.TextChanged += evHandler, removeHandler: evHandler => txt.TextChanged -= evHandler) .Select(ev => ((TextBox) ev.Sender).Text) .Throttle(TimeSpan.FromMilliseconds(300)); // Convert BeginMatch/EndMatch to Func<string, IObservable<DictionaryWord[]>> and assign it to getSuggestions. var getSuggestions = Observable.FromAsyncPattern<string, DictionaryWord[]>(begin: BeginMatch, end: EndMatch); var results = from text in textChanged where text.Length >= 3 from suggestions in getSuggestions(text) select suggestions;As you might see I took the freedom to change some little pieces.
First I want to get the text from textChanged (just like in the cast) and second I don't want to fire 7 webrequests in succesion to get the suggestions for "automobile" while typing, so I throttle the textChanged-Observable to 300ms.
See more comments…