Node Streams: the easy way

How to compose streams with pipe function: Node Streams are Awesome. This is where node.js is really awesome: doing complex thing the easy way.

EDIT: Another article about node’s streams and particularly pipe: Solving Coding Challenges with Streams which use a succession of Stream.Transform derived classes to convert kind of data along pipe flow. Using local variable, it’s trivial to aggregate multiple subsequent input data into output one.

Advertisements

POCO C++ Libraries

This is a C++ small cross plateform library for network prgramming:  Overview | POCO C++ Libraries. Some kind of minimalist version of Boost :). There is also a good introduction on Wikipedia here.

Don’t be foolish, POCO is for POrtable COmponents.

Edited: Now POCO is available on Windows 8.1 or Windows Phone 8.1 including OSC, UDP and TCP. Thanks to MS Open Tech.

NString

From Thomas Levesque, a bunch of usefull string extension and a string format extended to fields and properties (use Regex to find named placeholder and Expression compilation to access it).

Supported syntax is less rich (no sub-property, no indexer) than DataBinder solution (like FormatWith 2.0 – String formatting with named variables) but it doesn’t require dependency on System.Web and can be PCL).

thomaslevesque/NString · GitHub.

Edit: We can refer to Fun With Named Formats, String Parsing, and Edge Cases and .Net ObjectFormatter – Using Tokens in a Format String for two other implementations and interesting discussion of how to escape brace and how to proceed. Basically, we have:

  1. to find {Xxxx}, either Regex or a hand coded parser using a small state machine,
  2. to evaluate Xxxx against an object instance :
    1. pure Reflexion to read field or property,
    2. Expression.Compile to read field or property,
    3. DataBinder.Eval with a rich syntax but slow and introducing a dependency on System.Web,
  3. to replace {Xxxx}, either Regex.Replace or using a generated standard String.Format with positional {2} or a manual construction.

NHotkey

A library providing an elegant extension to WPF key binding:

<Window.InputBindings>
        <KeyBinding Gesture="Ctrl+Alt+Add" Command="{Binding IncrementCommand}"
                    HotkeyManager.RegisterGlobalHotkey="True" />
        <KeyBinding Gesture="Ctrl+Alt+Subtract" Command="{Binding DecrementCommand}"
                    HotkeyManager.RegisterGlobalHotkey="True" />
    </Window.InputBindings>

to register global hotkeys.

thomaslevesque/NHotkey · GitHub.