<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3752573690854836522</id><updated>2012-02-01T22:04:59.895Z</updated><category term='destructor'/><category term='control'/><category term='e-world'/><category term='lru'/><category term='bug'/><category term='free'/><category term='morris sequence'/><category term='regexp'/><category term='poll'/><category term='fast fourier transform'/><category term='foundations of f#'/><category term='algorithms'/><category term='using'/><category term='skills matter'/><category term='native code'/><category term='augmentations'/><category term='roadmap'/><category term='lzw'/><category term='sudoku'/><category term='monadic'/><category term='MissingMethodException'/><category term='resources'/><category term='classes'/><category term='searching'/><category term='sparse linear algebra'/><category term='balanced tree'/><category term='bdd'/><category term='c++'/><category term='approximation'/><category term='.NET Rocks'/><category term='neighbors'/><category term='programs'/><category term='unmanaged code'/><category term='tiling'/><category term='sort'/><category term='code generation'/><category term='moving average'/><category term='numerical integration'/><category term='jacobi algorithm'/><category term='distributed'/><category term='visualization'/><category term='set collection'/><category term='java'/><category term='infiniband'/><category term='simulated annealing'/><category term='binary tree'/><category term='graphics'/><category term='Expert F#'/><category term='impure'/><category term='differential equation'/><category term='streams'/><category term='c'/><category term='logic programming'/><category term='lecture'/><category term='interview'/><category term='substring'/><category term='shared memory'/><category term='richard morris'/><category term='graph theory'/><category term='multiple plots'/><category term='microsecond'/><category term='enumerator'/><category term='james margetson'/><category term='compiler'/><category term='google'/><category term='f# team'/><category term='return'/><category term='slides'/><category term='priority queue'/><category term='smtp'/><category term='podcast'/><category term='introduction'/><category term='list'/><category term='catenable list'/><category term='survival of the fittest'/><category term='least recently used'/><category term='mpi'/><category term='dynamic programming'/><category term='allocation'/><category term='american options'/><category term='latency'/><category term='demo'/><category term='application'/><category term='artificial life'/><category term='happy numbers'/><category term='symbolic differentiation'/><category term='remote procedure call'/><category term='lorenz attractor'/><category term='windows forms'/><category term='markdown'/><category term='purely functional'/><category term='graph algorithms'/><category term='see and say sequence'/><category term='tdd'/><category term='molecular dynamics'/><category term='polymorphism'/><category term='physics'/><category term='image'/><category term='static type checking'/><category term='jit'/><category term='update'/><category term='workstation gc'/><category term='sequence expressions'/><category term='currying'/><category term='huffman'/><category term='directx'/><category term='numerics'/><category term='silverlight'/><category term='singular value decomposition'/><category term='optimize'/><category term='labelled arguments'/><category term='queue'/><category term='regex'/><category term='quickhull algorithm'/><category term='slider'/><category term='brevity'/><category term='ado.net'/><category term='data structures'/><category term='sql'/><category term='ctp'/><category term='wpf'/><category term='twitter'/><category term='garbage collection'/><category term='minimization'/><category term='source code'/><category term='entropy'/><category term='ConcurrentQueue'/><category term='lex'/><category term='educational'/><category term='pricer'/><category term='beginner'/><category term='burrows-wheeler transform'/><category term='windows presentation foundation'/><category term='filtering'/><category term='high performance'/><category term='free article'/><category term='service pack 1'/><category term='market share'/><category term='rational'/><category term='hash table'/><category term='finance'/><category term='web'/><category term='lighting'/><category term='wait free'/><category term='computation expression'/><category term='triangulated irregular network'/><category term='concurrent programming'/><category term='sieve of eratosthenes'/><category term='blog post'/><category term='puzzle'/><category term='method'/><category term='combinatorial'/><category term='units of measure'/><category term='library'/><category term='pop3'/><category term='numerical'/><category term='anagram'/><category term='map reduce'/><category term='linear algebra'/><category term='attributes'/><category term='function'/><category term='all-pairs shortest paths'/><category term='.net'/><category term='edit distance'/><category term='typeset'/><category term='performance'/><category term='tic tac toe'/><category term='review'/><category term='tin'/><category term='traveling salesman'/><category term='hashing'/><category term='or-pattern'/><category term='knights tour'/><category term='simulation'/><category term='snippets'/><category term='whisp'/><category term='shallow'/><category term='finite element'/><category term='controls'/><category term='shunting yard'/><category term='longest common subsequence'/><category term='immutable'/><category term='monte-carlo'/><category term='struct'/><category term='language'/><category term='phong'/><category term='regular expression'/><category term='brian mcnamara'/><category term='sample'/><category term='gui'/><category term='random number'/><category term='interpreter'/><category term='trend'/><category term='task parallel library'/><category term='release'/><category term='fft'/><category term='queens problem'/><category term='agent'/><category term='recursion'/><category term='articles'/><category term='inline'/><category term='complex'/><category term='luca bolognese'/><category term='Symbol tables'/><category term='map'/><category term='eigenvector'/><category term='tesselation'/><category term='benchmark'/><category term='bitmaps'/><category term='depth-first search'/><category term='mine sweeper'/><category term='xml-rpc'/><category term='assembly'/><category term='forum'/><category term='dijkstra'/><category term='concurrent'/><category term='c# 4'/><category term='complete graph'/><category term='f# for scientists'/><category term='class'/><category term='visual f# 2010 for technical computing'/><category term='windows'/><category term='tail recursion'/><category term='scientific computing'/><category term='vector'/><category term='cache miss'/><category term='parametric plot'/><category term='graph reduction'/><category term='recommendations'/><category term='new england'/><category term='memory leak'/><category term='particle'/><category term='type variable'/><category term='tpl'/><category term='tail calls'/><category term='quicksort'/><category term='maze'/><category term='polygons'/><category term='f#.net journal'/><category term='random'/><category term='inverse'/><category term='the code project'/><category term='metaprogramming'/><category term='games'/><category term='spell checking'/><category term='special offer'/><category term='force'/><category term='lock free'/><category term='chart'/><category term='reddit'/><category term='adaptive subdivision'/><category term='live migration'/><category term='levenshtein'/><category term='matlab'/><category term='enumerable'/><category term='look and say sequence'/><category term='tcp'/><category term='pattern matching'/><category term='comprehensions'/><category term='protein'/><category term='expressions'/><category term='predator-prey dynamics'/><category term='generics'/><category term='abstraction'/><category term='lazy list'/><category term='structure'/><category term='search'/><category term='fourier'/><category term='reactive extensions'/><category term='ocaml'/><category term='article'/><category term='throughput'/><category term='precedence climbing'/><category term='mailbox processor'/><category term='Normal distribution'/><category term='bezier'/><category term='pythagoras tree'/><category term='do'/><category term='boids'/><category term='non-blocking algorithm'/><category term='case study'/><category term='bugs'/><category term='memoization'/><category term='development'/><category term='f# for visualization'/><category term='continuation'/><category term='gradient descent'/><category term='sql server compact edition'/><category term='topological sort'/><category term='weasel program'/><category term='recursive descent'/><category term='parsing'/><category term='f# interactive'/><category term='named arguments'/><category term='optional arguments'/><category term='bioinformatics'/><category term='jumo fisher'/><category term='Mathematica'/><category term='threading'/><category term='array'/><category term='classification'/><category term='computer algebra'/><category term='bytecode'/><category term='module'/><category term='audio'/><category term='set'/><category term='combinator'/><category term='copy'/><category term='foreign function interface'/><category term='reliability'/><category term='flocking'/><category term='video'/><category term='virtual'/><category term='stencil buffer'/><category term='binary format'/><category term='synchronous'/><category term='eye candy'/><category term='swarming'/><category term='training'/><category term='f# book'/><category term='floyd-warshall algorithm'/><category term='ienumerator'/><category term='scheme'/><category term='linq'/><category term='sql server ce'/><category term='plot'/><category term='prime number'/><category term='word frequency'/><category term='parser combinator'/><category term='observable'/><category term='example'/><category term='parallel fx'/><category term='geographic information systems'/><category term='ConcurrentStack'/><category term='growth'/><category term='diff'/><category term='mutable'/><category term='pdf'/><category term='rosetta code'/><category term='route finding'/><category term='jon harrop'/><category term='active patterns'/><category term='beta'/><category term='balanced binary tree'/><category term='execution'/><category term='teapot'/><category term='welcome'/><category term='text'/><category term='selection'/><category term='optimization'/><category term='asynchronous workflows'/><category term='network'/><category term='global optimization'/><category term='sliding window'/><category term='tree'/><category term='static typing'/><category term='emergent behaviour'/><category term='natural selection'/><category term='method dispatch'/><category term='chris smith'/><category term='slice'/><category term='reflection'/><category term='challenge'/><category term='support'/><category term='histogram equalization'/><category term='ConcurrentBag'/><category term='concurrent collection'/><category term='client'/><category term='generic'/><category term='bessel function'/><category term='parametric polymorphism'/><category term='seq'/><category term='event'/><category term='numerical methods'/><category term='pangram'/><category term='obstruction free'/><category term='lu decomposition'/><category term='higher-order function'/><category term='cellular automata'/><category term='concurrent gc'/><category term='coherent graphics'/><category term='interface'/><category term='visualisation'/><category term='lazy stream'/><category term='value type'/><category term='biology'/><category term='deep'/><category term='user interface'/><category term='message loop'/><category term='function optimization'/><category term='web programming'/><category term='london'/><category term='artificial intelligence'/><category term='F# for Numerics'/><category term='best fit'/><category term='f# release'/><category term='yacc'/><category term='f# for technical computing'/><category term='component design guidelines'/><category term='ray tracer'/><category term='f# 2.0'/><category term='sockets'/><category term='parallel for'/><category term='repl'/><category term='interoperability'/><category term='real-time'/><category term='automated'/><category term='purely functional data structures'/><category term='typeful programming'/><category term='scatter plot'/><category term='scimark2'/><category term='curve fitting'/><category term='thread'/><category term='replace'/><category term='concentration'/><category term='mutation'/><category term='dynamics'/><category term='pdb'/><category term='slicing'/><category term='simplification'/><category term='graphical'/><category term='don syme'/><category term='run-time type'/><category term='exhibition'/><category term='visual studio 2010'/><category term='cache oblivious'/><category term='parallelism'/><category term='server'/><category term='machine learning'/><category term='data compression'/><category term='bwt'/><category term='use'/><category term='reuse'/><category term='calculator'/><category term='rigid body'/><category term='xaml'/><category term='jason olson'/><category term='Lotka-Volterra equations'/><category term='3d'/><category term='breadth-first search'/><category term='data structure'/><category term='Gaussian'/><category term='k-means clustering'/><category term='web crawler'/><category term='nunit'/><category term='validation'/><category term='product'/><category term='c#'/><category term='successive over relaxation'/><category term='cost'/><category term='fractal'/><category term='spectral'/><category term='mersenne twister'/><category term='treemap'/><category term='e-mail'/><category term='haskell'/><category term='web service'/><category term='book worm'/><category term='spectral methods'/><category term='scimark'/><category term='commercial product'/><category term='integral'/><category term='interpolation'/><category term='randomized'/><category term='a* algorithm'/><category term='interactive'/><category term='scalability'/><category term='heap'/><category term='1.9.2'/><category term='sequence'/><category term='fluid dynamics'/><category term='pretty print'/><category term='byron cook'/><category term='xna'/><category term='extreme optimization'/><category term='idioms'/><category term='algorithm'/><category term='round robin'/><category term='game'/><category term='equality'/><category term='salary'/><category term='qr decomposition'/><category term='visual studio'/><category term='split'/><category term='countBy'/><category term='editor'/><category term='Fortran'/><category term='tutorials'/><category term='convex hull'/><category term='joe hummel'/><category term='second edition'/><category term='atom'/><category term='fem'/><category term='vector graphics'/><category term='extrapolation'/><category term='testing'/><category term='automation'/><category term='evaluate'/><category term='luke hoban'/><category term='examples'/><category term='ide'/><category term='static linking'/><category term='screencast'/><category term='thunk'/><category term='path finding'/><category term='.net 4'/><category term='cheat sheet'/><category term='f# 1.9.9.9'/><category term='median'/><category term='dll'/><category term='skewness'/><category term='asynchronous'/><category term='cache'/><category term='gouraud'/><category term='matrix inversion'/><category term='shader'/><category term='monad'/><category term='gamma function'/><category term='games programming'/><category term='f# meetup'/><category term='eigenvalue'/><category term='graph'/><category term='export'/><category term='easy'/><category term='fparsec'/><category term='low latency'/><category term='string'/><category term='rtin'/><category term='red-black tree'/><category term='f#'/><category term='data visualization'/><category term='opengl'/><category term='member'/><category term='f#.net'/><category term='python'/><category term='comparison'/><category term='dimensional consistency'/><category term='chat'/><category term='sinc'/><category term='parallel'/><category term='layout'/><category term='traversal'/><category term='database'/><category term='divide and conquer'/><category term='computational geometry'/><category term='parallel programming'/><category term='dragon curve'/><category term='ienumerable'/><category term='2d'/><category term='tutorial'/><category term='evolutionary algorithm'/><category term='kurtosis'/><category term='objects'/><category term='sorting'/><category term='gis'/><category term='book club'/><category term='lisp'/><category term='simple'/><category term='communication'/><category term='jvm'/><category term='wavelet'/><category term='book'/><category term='style guide'/><category term='sql server'/><category term='strongly-connected components'/><category term='key bindings'/><category term='jobs'/><category term='matrix'/><category term='server gc'/><category term='clr'/><category term='phil trelford'/><category term='functional programming'/><category term='dictionary'/><category term='raytracer'/><category term='microsoft'/><category term='popular'/><category term='least squares'/><category term='symbolic'/><category term='parser'/><category term='series'/><category term='message passing'/><category term='profiling'/><category term='distribution'/><category term='deallocate'/><title type='text'>F# News</title><subtitle type='html'>Putting the fun in functional programming since 2005!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default?start-index=101&amp;max-results=100'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>298</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-7124261398018131201</id><published>2012-01-08T23:16:00.001Z</published><updated>2012-01-08T23:16:59.098Z</updated><title type='text'>Fast Generic Pretty Printing</title><content type='html'>&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb112"&gt;The F#.NET Journal&lt;/a&gt; just published an article about performance:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;"The ability to convert values into legible strings efficiently, a process known as generic pretty printing, has a variety of uses including debugging and serialization. This article takes a look at the characteristics of the built-in pretty printer before considering alternatives including combinators and reflectors with a view to improving performance. Ultimately, a generic solution is proposed that runs 7,600&amp;#215; faster than the built-in F# solution on our test case..."&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb112"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-7124261398018131201?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/7124261398018131201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=7124261398018131201' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7124261398018131201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7124261398018131201'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2012/01/fast-generic-pretty-printing.html' title='Fast Generic Pretty Printing'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-6487580710875884288</id><published>2011-12-17T19:27:00.001Z</published><updated>2011-12-17T19:27:37.397Z</updated><title type='text'>Rendering autostereograms</title><content type='html'>&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb111"&gt;The F#.NET Journal&lt;/a&gt; just published an article about graphics:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;"An autostereogram is a tiling distorted such that the differences between one column of tiles and the next simulate the differences between images seen by the left and right eyes when viewing a 3D scene. This allows a practiced viewer to stare through the picture such that their eyes view the stereogram offset by a single column of tiles and, therefore, they perceive the image to be 3D. This article describes a simple technique that allows autostereograms to be generated by a parallelized F# program..."&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb111"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-6487580710875884288?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/6487580710875884288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=6487580710875884288' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6487580710875884288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6487580710875884288'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/12/rendering-autostereograms.html' title='Rendering autostereograms'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-7993364736418931757</id><published>2011-12-11T21:24:00.001Z</published><updated>2011-12-17T19:26:06.256Z</updated><title type='text'>Metaprogramming: parsing with active patterns</title><content type='html'>&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb110"&gt;The F#.NET Journal&lt;/a&gt; just published an article about metaprogramming:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;"Metaprogramming is the art of writing programs that manipulate other programs and includes writing compilers and interpreters as well as more exotic tools such as theorem provers. This article walks through the construction of a mini ML interpreter and, in particular, uses a novel approach to parsing based upon F# active patterns. This allows us to write a lexer and parser for a toy functional language in under 100 lines of vanilla F# code..."&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb110"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-7993364736418931757?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/7993364736418931757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=7993364736418931757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7993364736418931757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7993364736418931757'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/12/metaprogramming-parsing-with-active.html' title='Metaprogramming: parsing with active patterns'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-8433188537473759581</id><published>2011-11-05T14:06:00.005Z</published><updated>2011-11-08T16:00:27.635Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='ado.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c# 4'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><category scheme='http://www.blogger.com/atom/ns#' term='asynchronous'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Scalable servers with async F#</title><content type='html'>&lt;p&gt;We recently pitted a traditional server built using synchronous C# 4, ADO.NET and WCF with an equivalent solution built using asynchronous &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;, ADO.NET and Google Protocol buffers over sockets. The characteristics of the two solutions really demonstrate the advantages of an asynchronous approach when using .NET. Specifically, our asynchronous solution was found to have the following advantages:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;2× lower CPU usage¹&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;12× lower memory usage¹&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;90× lower max latency&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;10× higher max client connections&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;4× less code!&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;¹ with a constant stream of queries.&lt;/p&gt;&lt;p&gt;The basic ideas behind this real-world asynchronous server have already been covered in the following &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb"&gt;F#.NET Journal&lt;/a&gt; articles:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2008/10/concurrent-web-crawling-using.html"&gt;Concurrent web crawling using asynchronous workflows&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2008/10/concurrent-web-crawling-using.html"&gt;An introduction to asynchronous workflows&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/09/distributed-message-passing.html"&gt;Distributed message passing&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/11/concurrent-programming-tcp-relay-server.html"&gt;Concurrent programming: TCP relay server&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2011/06/generic-server-architecture.html"&gt;Generic server architecture&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Furthermore, the forthcoming .NET 4.5 will be the first to provide a fully asynchronous ADO.NET interface by adding a new &lt;a href="http://msdn.microsoft.com/en-us/library/hh223681(v=VS.110).aspx"&gt;ReadAsync&lt;/a&gt; method to read individual records from a database query asynchronously. This will make it possible to write fully asynchronous database code in .NET for the first time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-8433188537473759581?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/8433188537473759581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=8433188537473759581' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8433188537473759581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8433188537473759581'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/11/scalable-servers-with-async-f.html' title='Scalable servers with async F#'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-955588506874590762</id><published>2011-11-05T12:29:00.002Z</published><updated>2011-11-05T14:04:47.042Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='recursion'/><category scheme='http://www.blogger.com/atom/ns#' term='treemap'/><category scheme='http://www.blogger.com/atom/ns#' term='data visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='adaptive subdivision'/><category scheme='http://www.blogger.com/atom/ns#' term='balanced tree'/><title type='text'>Drawing tree maps</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb109"&gt;The F#.NET Journal&lt;/a&gt; just published an article about visualization:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"A tree map is a simple way to visualize the relative sizes of a collection of objects in 2D. The idea is to recursively subdivide a rectangle into non-overlapping rectangles that have areas proportional to the weights they represent..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/-5tx4vLFJ-VE/TrVCU7jWa5I/AAAAAAAAAM8/2adDmnn8wiU/s1600/TreeMap.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 282px;" src="http://1.bp.blogspot.com/-5tx4vLFJ-VE/TrVCU7jWa5I/AAAAAAAAAM8/2adDmnn8wiU/s400/TreeMap.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5671512233093786514" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb109"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-955588506874590762?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/955588506874590762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=955588506874590762' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/955588506874590762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/955588506874590762'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/11/drawing-tree-maps.html' title='Drawing tree maps'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-5tx4vLFJ-VE/TrVCU7jWa5I/AAAAAAAAAM8/2adDmnn8wiU/s72-c/TreeMap.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-367675236175628405</id><published>2011-10-31T10:08:00.003Z</published><updated>2011-10-31T14:17:23.482Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='mine sweeper'/><title type='text'>Mine sweeper in 99 lines of F# code</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/-e4--2otqUQ8/Tq6t73uRzYI/AAAAAAAAAMw/p4k945n3mMc/s1600/MineSweeper.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 319px; height: 325px;" src="http://1.bp.blogspot.com/-e4--2otqUQ8/Tq6t73uRzYI/AAAAAAAAAMw/p4k945n3mMc/s400/MineSweeper.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5669660224987975042" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;Tomas Petricek's excellent &lt;a href="http://fssnip.net/"&gt;F# Snippets&lt;/a&gt; site is a gold mine of educational samples. This &lt;a href="http://fssnip.net/7W"&gt;mine sweeper in 99 lines of code&lt;/a&gt; is no exception!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-367675236175628405?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/367675236175628405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=367675236175628405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/367675236175628405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/367675236175628405'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/10/mine-sweeper-in-99-lines-of-f-code.html' title='Mine sweeper in 99 lines of F# code'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-e4--2otqUQ8/Tq6t73uRzYI/AAAAAAAAAMw/p4k945n3mMc/s72-c/MineSweeper.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-5392605977185153508</id><published>2011-10-27T13:45:00.001Z</published><updated>2011-10-27T14:34:39.932Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server ce'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server'/><category scheme='http://www.blogger.com/atom/ns#' term='sql server compact edition'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Using SQL Server Compact Edition</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb108"&gt;The F#.NET Journal&lt;/a&gt; just published an article about databases:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"In addition to the heavy weight SQL Server 2008 and its free sibling SQL Express, Microsoft also offer a light-weight database called SQL Server Compact Edition (CE) that requires fewer resources and, in particular, can be run from a DLL and does not require installation or background services. This article walks through the use of the Northwind database from SQL Server CE including a WPF-based user interface built upon asynchronous message passing..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb108"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-5392605977185153508?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/5392605977185153508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=5392605977185153508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5392605977185153508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5392605977185153508'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/10/using-sql-server-compact-edition.html' title='Using SQL Server Compact Edition'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-2858379872004277959</id><published>2011-10-27T13:41:00.002Z</published><updated>2011-10-27T13:45:51.830Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='event'/><category scheme='http://www.blogger.com/atom/ns#' term='observable'/><category scheme='http://www.blogger.com/atom/ns#' term='reactive extensions'/><title type='text'>Observables and Reactive Extensions</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb107"&gt;The F#.NET Journal&lt;/a&gt; just published an article about event-based programming:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Various recent additions to the .NET Framework have encouraged event-based programming, including observables and the recent Reactive Extensions (Rx) library. This article reviews the basic properties of observables and some of the core functionality in the Rx library before taking a look at a common problem in event-based programming: subscribing to a state machine..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb107"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-2858379872004277959?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/2858379872004277959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=2858379872004277959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/2858379872004277959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/2858379872004277959'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/10/observables-and-reactive-extensions.html' title='Observables and Reactive Extensions'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-488967300259106926</id><published>2011-09-17T19:35:00.001Z</published><updated>2011-09-17T19:37:04.688Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sockets'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='web service'/><category scheme='http://www.blogger.com/atom/ns#' term='asynchronous'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrent'/><title type='text'>Using sockets from Silverlight</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb106"&gt;The F#.NET Journal&lt;/a&gt; just published an article about Silverlight:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Silverlight applications can communicate with remote servers via TCP sockets. This can be done without requiring elevated permissions (e.g. in browser) provided a client access policy server is running on the remote machine. This article describes how both the client- and server-side solutions to this problem can be written in F#..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb106"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-488967300259106926?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/488967300259106926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=488967300259106926' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/488967300259106926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/488967300259106926'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/09/using-sockets-from-silverlight.html' title='Using sockets from Silverlight'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4536138779526582362</id><published>2011-09-14T22:48:00.002Z</published><updated>2011-09-14T22:51:25.103Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='set'/><category scheme='http://www.blogger.com/atom/ns#' term='latency'/><category scheme='http://www.blogger.com/atom/ns#' term='throughput'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrent'/><title type='text'>Concurrent change sets</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb105"&gt;The F#.NET Journal&lt;/a&gt; just published an article about concurrency:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Many applications that perform a series of insertions and removals to and from a set can benefit from the ability to maintain the currently-outstanding added and removed elements such that an external replica of the changing set can be updated in batches on demand. Perhaps the most valuable application is to decouple the performance of a background worker from the user interface thread and vice versa. This article studies a a solution that uses an asynchronous agent sitting between the worker and visualizer that allows the worker to add and remove elements at high throughput while the visualizer concurrently fetches change sets with low latency..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb105"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4536138779526582362?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4536138779526582362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4536138779526582362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4536138779526582362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4536138779526582362'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/09/concurrent-change-sets.html' title='Concurrent change sets'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3762123846870554015</id><published>2011-08-29T14:09:00.003Z</published><updated>2011-08-29T14:11:56.137Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Symbol tables'/><title type='text'>Symbol tables</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb104"&gt;The F#.NET Journal&lt;/a&gt; just published an article about data representations:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Computations such as graph traversals are often most naturally expressed in terms of raw data such as the strings names of the entities involved. This simplicity is valuable but comes at a cost in terms of performance because operations over strings from a finite set are substantially slower than operations over an equivalent representation. Symbol tables offer the ability to replace strings with ints in order to accelerate computations over them. This article looks at a typical example application that stands to benefit from the use of a symbol table and then demonstrates how a symbol table can be implemented along with an efficient specialized dictionary for keys that are symbols, culminating in a 14&amp;#215; performance improvement..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb104"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-3762123846870554015?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/3762123846870554015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=3762123846870554015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3762123846870554015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3762123846870554015'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/08/symbol-tables.html' title='Symbol tables'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1533313980579995360</id><published>2011-08-21T21:42:00.001Z</published><updated>2011-08-21T21:44:19.037Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='round robin'/><category scheme='http://www.blogger.com/atom/ns#' term='random'/><category scheme='http://www.blogger.com/atom/ns#' term='cache'/><category scheme='http://www.blogger.com/atom/ns#' term='least recently used'/><category scheme='http://www.blogger.com/atom/ns#' term='lru'/><title type='text'>Caching</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb103"&gt;The F#.NET Journal&lt;/a&gt; just published an article about caching:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Caches are ubiquitous in CPUs themselves but this article takes a look at the kinds of caches that are used in higher-level applications such as distributed web services. Caches with random eviction, round robin and least-recently used (LRU) schemes are examined..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb103"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1533313980579995360?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1533313980579995360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1533313980579995360' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1533313980579995360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1533313980579995360'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/08/caching.html' title='Caching'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-6402880214542163274</id><published>2011-07-31T20:30:00.001Z</published><updated>2011-07-31T20:32:21.345Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='matrix inversion'/><category scheme='http://www.blogger.com/atom/ns#' term='minimization'/><category scheme='http://www.blogger.com/atom/ns#' term='symbolic differentiation'/><category scheme='http://www.blogger.com/atom/ns#' term='computer algebra'/><title type='text'>Symbolic differentiation and matrix inversion</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb102"&gt;The F#.NET Journal&lt;/a&gt; just published an article about computer algebra:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Previous F#.NET Journal articles have covered manipulating symbolic expressions, computing derivatives and inverting matrices. This article combines these concepts in order to build a small computer algebra system capable of symbolically computing and simplifying the inverse of the Hessian matrix and grad of a given expression. This foundation is then used to minimize a symbolic expression to arbitrary-precision using rational arithmetic..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb102"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-6402880214542163274?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/6402880214542163274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=6402880214542163274' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6402880214542163274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6402880214542163274'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/07/symbolic-differentiation-and-matrix.html' title='Symbolic differentiation and matrix inversion'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-5575366954875761508</id><published>2011-07-10T09:00:00.001Z</published><updated>2011-07-10T15:36:46.272Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtual'/><category scheme='http://www.blogger.com/atom/ns#' term='live migration'/><category scheme='http://www.blogger.com/atom/ns#' term='asynchronous'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrent'/><category scheme='http://www.blogger.com/atom/ns#' term='agent'/><title type='text'>Live migration</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb101"&gt;The F#.NET Journal&lt;/a&gt; just published an article about concurrent programming:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"An interesting application of agent-based programming is the ability to implement virtual agents that are capable of running concrete server applications and then allow the servers to be migrated between agents seamlessly. This article describes the design and implementation of a simple program that demonstrates the effect by allowing a trivial server to be live migrated from one agent to another by instructing the agent to suspend the server, send the server's state to another agent and resume the server's execution at the remote location..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb101"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-5575366954875761508?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/5575366954875761508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=5575366954875761508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5575366954875761508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5575366954875761508'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/07/live-migration.html' title='Live migration'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3901050233272736580</id><published>2011-07-04T09:33:00.005Z</published><updated>2011-07-04T16:05:06.315Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='london'/><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='lecture'/><category scheme='http://www.blogger.com/atom/ns#' term='asynchronous'/><category scheme='http://www.blogger.com/atom/ns#' term='user interface'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrent'/><category scheme='http://www.blogger.com/atom/ns#' term='skills matter'/><title type='text'>Progressive F# tutorials</title><content type='html'>&lt;a href="https://skillsmatter.com/custom/images/progressivefsharpmaster.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 670px; height: 180px;" src="https://skillsmatter.com/custom/images/progressivefsharpmaster.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://skillsmatter.com/"&gt;Skills Matter&lt;/a&gt; have announced that they will be hosting &lt;a href="http://skillsmatter.com/event/scala/progressive-f-tutorials"&gt;Progressive F# Tutorials&lt;/a&gt; at their London office in August. The event includes lectures from many big names in the &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; world including &lt;a href="http://tomasp.net/"&gt;Tomas Petricek&lt;/a&gt;, &lt;a href="http://www.trelford.com/blog/"&gt;Phil Trelford&lt;/a&gt;, Zach Bray and &lt;a href="http://strangelights.com/blog/"&gt;Robert Pickering&lt;/a&gt;. Topics covered include testing, user interface (Silverlight and WPF), concurrent and asynchronous programming.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-3901050233272736580?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/3901050233272736580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=3901050233272736580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3901050233272736580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3901050233272736580'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/07/progressive-f-tutorials.html' title='Progressive F# tutorials'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3609646255274883631</id><published>2011-06-18T20:50:00.001Z</published><updated>2011-06-18T20:52:10.464Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='chat'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrent'/><title type='text'>Chat server</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb100"&gt;The F#.NET Journal&lt;/a&gt; just published an article about concurrent programming:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Perhaps the simplest complete working example that can be constructed using the generic server architecture described in the previous articles is a chat server that allows clients to logon and communicate by posting messages that are relayed to all other logged-on clients. This article describes a chat server and clients with GUI interface for demonstration..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb100"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-3609646255274883631?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/3609646255274883631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=3609646255274883631' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3609646255274883631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3609646255274883631'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/06/chat-server.html' title='Chat server'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-301093559341870779</id><published>2011-06-12T11:19:00.003Z</published><updated>2011-06-12T11:25:06.032Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='generic'/><category scheme='http://www.blogger.com/atom/ns#' term='filtering'/><category scheme='http://www.blogger.com/atom/ns#' term='polymorphism'/><category scheme='http://www.blogger.com/atom/ns#' term='execution'/><category scheme='http://www.blogger.com/atom/ns#' term='validation'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrent'/><category scheme='http://www.blogger.com/atom/ns#' term='abstraction'/><title type='text'>Generic server architecture</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb99"&gt;The F#.NET Journal&lt;/a&gt; just published an article about abstractions for concurrent programming:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Server applications often have very similar requirements in terms of their overall architecture. This article describes the design and implementation of a generic server that allows incoming messages to be validated per-connection, executed centrally, dispatched either to a specific connection or all connections and with all outgoing messages being filtered before they are returned to the client. The result is an elegant fully-asynchronous and generic library for server-side programming that is applicable to a wide variety of real server applications..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb99"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-301093559341870779?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/301093559341870779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=301093559341870779' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/301093559341870779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/301093559341870779'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/06/generic-server-architecture.html' title='Generic server architecture'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-6252895213226347739</id><published>2011-05-22T13:37:00.002Z</published><updated>2011-05-22T13:43:30.224Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='classification'/><category scheme='http://www.blogger.com/atom/ns#' term='windows presentation foundation'/><category scheme='http://www.blogger.com/atom/ns#' term='k-means clustering'/><category scheme='http://www.blogger.com/atom/ns#' term='machine learning'/><title type='text'>k-means clustering</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb98"&gt;The F#.NET Journal&lt;/a&gt; just published an article about machine learning:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"The k-means clustering algorithm is a simple form of machine learning that categorizes a set of data points into k clusters each centered around its own centroid. This article describes the design and implementation of the k-means clustering algorithm and an example application to a standard Iris flower data set including downloading and massaging the data directly from the web and visualizing the resulting clusters using WPF and the new charting and graphing functionality in .NET 4..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb98"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-6252895213226347739?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/6252895213226347739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=6252895213226347739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6252895213226347739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6252895213226347739'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/05/k-means-clustering.html' title='k-means clustering'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-6033998594040849204</id><published>2011-05-07T13:45:00.002Z</published><updated>2011-05-07T13:48:14.614Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='garbage collection'/><category scheme='http://www.blogger.com/atom/ns#' term='low latency'/><category scheme='http://www.blogger.com/atom/ns#' term='allocation'/><title type='text'>Allocationless programming on .NET</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb97"&gt;The F#.NET Journal&lt;/a&gt; just published another article about low-latency programming:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"An extreme technique used in some latency-critical applications is to completely circumvent the garbage collector by replacing all heap allocations with the use of pre-allocated arrays of value types, effectively implementing manual memory management inside a managed programming language. This might be called Fortran-style programming on .NET but the advantage is that stalls due to garbage collection can be made less frequent or even eliminated entirely..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb97"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-6033998594040849204?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/6033998594040849204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=6033998594040849204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6033998594040849204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6033998594040849204'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/05/allocationless-programming-on-net.html' title='Allocationless programming on .NET'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4331406198107153800</id><published>2011-04-17T22:56:00.002Z</published><updated>2011-04-17T22:59:58.550Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='microsecond'/><category scheme='http://www.blogger.com/atom/ns#' term='infiniband'/><category scheme='http://www.blogger.com/atom/ns#' term='low latency'/><category scheme='http://www.blogger.com/atom/ns#' term='communication'/><category scheme='http://www.blogger.com/atom/ns#' term='message passing'/><title type='text'>Using MPI over Infiniband from F#</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb96"&gt;The F#.NET Journal&lt;/a&gt; just published another article about low-latency message passing:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Infiniband is a high-throughput low-latency communication fabric commonly used in supercomputers. This article describes how a standalone F# application can use the Intel MPI 4 library via PInvoke to send and receive messages over an Infiniband connection between two separate machines with latencies as low as 7µs..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb96"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4331406198107153800?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4331406198107153800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4331406198107153800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4331406198107153800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4331406198107153800'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/04/using-mpi-over-infiniband-from-f.html' title='Using MPI over Infiniband from F#'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-5010283623521125703</id><published>2011-04-17T22:54:00.001Z</published><updated>2011-04-17T22:56:29.619Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='graph algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='strongly-connected components'/><title type='text'>Graph theory: Strongly-connected components</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb95"&gt;The F#.NET Journal&lt;/a&gt; just published another article about graph algorithms:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"One of the most important fundamental algorithms in graph theory is Tarjan et al.'s 1972 algorithm for computing the strongly-connected components in a graph in linear time. Strongly-connected components are subgraphs where at least one path exists from any vertex to any other vertex. This has many applications and, in particular, is the basis of many more advanced algorithms from graph theory. This article describes both imperative and purely functional implementations of this algorithm and a WPF-based GUI application that visualizes the strongly connected components of a randomly-generated graph..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb95"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-5010283623521125703?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/5010283623521125703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=5010283623521125703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5010283623521125703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5010283623521125703'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/04/graph-theory-strongly-connected.html' title='Graph theory: Strongly-connected components'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-7049553272057657465</id><published>2011-03-26T14:53:00.005Z</published><updated>2011-03-26T21:30:25.304Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='service pack 1'/><category scheme='http://www.blogger.com/atom/ns#' term='MissingMethodException'/><category scheme='http://www.blogger.com/atom/ns#' term='visual studio 2010'/><title type='text'>Don't install VS2010 SP1</title><content type='html'>&lt;p&gt;The new &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5"&gt;Service Pack 1&lt;/a&gt; for Visual Studio 2010 is buggy and may cause irreparable corruption:&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-0r3twu0o9eQ/TY5ZPeqxjMI/AAAAAAAAAL4/qkCxfqZHOlk/s1600/VS2010SP1Corruption.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 370px;" src="http://3.bp.blogspot.com/-0r3twu0o9eQ/TY5ZPeqxjMI/AAAAAAAAAL4/qkCxfqZHOlk/s400/VS2010SP1Corruption.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5588502310078745794" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Installing this service pack destabilized one of our development machines and, more worryingly, attempting to uninstall the service pack produces the above warning that it may irreparably corrupt the Visual Studio 2010 installation.&lt;/p&gt;&lt;p&gt;We have no reason to believe that this is &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; specific (there have been &lt;a href="http://visualstudiomagazine.com/articles/2011/03/11/developers-react-to-visual-studio-2010-sp1.aspx"&gt;many complaints&lt;/a&gt; from non-F# users) but some of our customers have reported that it destabilised their systems too, both the development environment and programs containing &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; source code.&lt;/p&gt;&lt;p&gt;Our &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; implementation of Okasaki's &lt;a href="http://fsharpnews.blogspot.com/2009/05/purely-functional-data-structures-real.html"&gt;purely functional real-time queue&lt;/a&gt; data structure started to suffer from &lt;span class="Apple-style-span"&gt;MissingMethodException&lt;/span&gt;s after we installed SP1. Two of our clients are experiencing problems using &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; with Silverlight only after having installed SP1.&lt;/p&gt;&lt;p&gt;Therefore, we are recommending that users avoid this Service Pack until the issues have been identified and resolved.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-7049553272057657465?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/7049553272057657465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=7049553272057657465' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7049553272057657465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7049553272057657465'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/03/dont-install-vs2010-sp1.html' title='Don&apos;t install VS2010 SP1'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-0r3twu0o9eQ/TY5ZPeqxjMI/AAAAAAAAAL4/qkCxfqZHOlk/s72-c/VS2010SP1Corruption.png' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-5498523705935889552</id><published>2011-03-23T23:28:00.002Z</published><updated>2011-03-23T23:33:45.957Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='mailbox processor'/><category scheme='http://www.blogger.com/atom/ns#' term='asynchronous workflows'/><category scheme='http://www.blogger.com/atom/ns#' term='concentration'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><category scheme='http://www.blogger.com/atom/ns#' term='agent'/><title type='text'>Game of Concentration</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb94"&gt;The F#.NET Journal&lt;/a&gt; just published another article about game programming:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Concentration is a popular game where the objective is to remember previously-seen cards when flipping over pairs in order to find matching pairs and remove them from the game until none remain. This article describes the design and implementation of a WPF application that implements the game of Concentration. In particular, a novel design is adopted that uses an asynchronous agent to handle user interface timeouts elegantly and a set of mutually recursive asynchronous workflows that implement the state machine of the game logic..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb94"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-5498523705935889552?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/5498523705935889552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=5498523705935889552' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5498523705935889552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5498523705935889552'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/03/game-of-concentration.html' title='Game of Concentration'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4615342265504905650</id><published>2011-03-13T16:19:00.000Z</published><updated>2011-03-13T16:20:54.508Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='mutable'/><category scheme='http://www.blogger.com/atom/ns#' term='median'/><category scheme='http://www.blogger.com/atom/ns#' term='sliding window'/><category scheme='http://www.blogger.com/atom/ns#' term='set collection'/><category scheme='http://www.blogger.com/atom/ns#' term='purely functional'/><category scheme='http://www.blogger.com/atom/ns#' term='moving average'/><title type='text'>Sliding averages</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb93"&gt;The F#.NET Journal&lt;/a&gt; just published another article about a semi-numerical algorithm:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Sliding window algorithms are a class of algorithms that treat streams of data by computing a statistic across a window for each position of the window within the data stream. Moving averages are sliding window algorithms that compute an average over each window. This article begins with a simple implementation of the sliding mean average and goes on to examine more efficient algorithms for both mean and median sliding averages..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb93"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4615342265504905650?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4615342265504905650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4615342265504905650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4615342265504905650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4615342265504905650'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/03/sliding-averages.html' title='Sliding averages'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-831207128802909164</id><published>2011-02-23T16:15:00.004Z</published><updated>2011-02-23T22:07:05.473Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='joe hummel'/><title type='text'>Seminar: Multicore Programming on .NET</title><content type='html'>&lt;p&gt;Parallel programming veteran &lt;a href="http://www.pluralsight-training.net/microsoft/about/instructor.aspx?name=joe-hummel"&gt;Joe Hummel&lt;/a&gt; is giving &lt;a href="http://www.sfsharp.org/events/16560940/?a=mc1_lnm&amp;amp;eventId=16560940&amp;amp;action=detail&amp;amp;rv=mc1&amp;amp;rv=mc1"&gt;a full-day seminar about multicore programming on .NET&lt;/a&gt; in San Francisco. Interestingly, &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; &lt;strike&gt;is&lt;/strike&gt; should be the programming language of choice for this presentation...&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;"This 1-day workshop will introduce parallel programming support in .NET 4, and move rapidly from concepts to concrete examples. Topics include the new task-oriented programming model, exploiting data &amp;amp; task parallelism in your applications, design patterns for exposing parallelism, Task Parallel Library (TPL), Parallel LINQ, new concurrent data structures for more efficient parallel access, and proper exception handling in the presence of parallelism. We’ll also discuss cutting-edge Visual Studio 2010 tools for debugging and profiling of parallel apps, as well as tool support from Microsoft Research. The workshop will be demo-rich, with complete source code provided."&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-831207128802909164?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/831207128802909164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=831207128802909164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/831207128802909164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/831207128802909164'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/02/seminar-multicore-programming-on-net.html' title='Seminar: Multicore Programming on .NET'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-5266865256298694322</id><published>2011-02-09T22:39:00.001Z</published><updated>2011-02-09T22:42:07.251Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='ray tracer'/><category scheme='http://www.blogger.com/atom/ns#' term='real-time'/><title type='text'>Real-time ray tracing in Silverlight</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb92"&gt;The F#.NET Journal&lt;/a&gt; just published another article about Silverlight:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Ray tracing is a simple but powerful approach to photorealistic rendering and implementing a ray tracer is an excellent way to learn a programming language and, in particular, to learn about graphics and optimization in the context of numerical algorithms. This article walks through the design and implementation of a basic ray tracer that visualizes a 3D scene in a Silverlight bitmap and exploits parallelism in order to attain the performance required for real-time animation..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb92"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-5266865256298694322?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/5266865256298694322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=5266865256298694322' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5266865256298694322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5266865256298694322'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/02/real-time-ray-tracing-in-silverlight.html' title='Real-time ray tracing in Silverlight'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4927898066919385646</id><published>2011-02-09T18:23:00.006Z</published><updated>2011-02-09T18:50:45.142Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='jobs'/><category scheme='http://www.blogger.com/atom/ns#' term='trend'/><category scheme='http://www.blogger.com/atom/ns#' term='growth'/><category scheme='http://www.blogger.com/atom/ns#' term='market share'/><title type='text'>F# share of UK job market triples in four months</title><content type='html'>&lt;p&gt;The &lt;a href="http://www.itjobswatch.co.uk/jobs/uk/fsharp.do"&gt;IT Jobs Watch website&lt;/a&gt; hosts up-to-date statistics about the prevalence of different keywords in UK job adverts including those mentioning Microsoft's new &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; programming language. Incredibly, the proportion of job adverts mentioning &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; has tripled in just four months:&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_NMRkpon4Ps0/TVLc_rRzpeI/AAAAAAAAALo/L6yCR-L9NbE/s1600/FSharpJobTrend-2011-02.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 184px;" src="http://2.bp.blogspot.com/_NMRkpon4Ps0/TVLc_rRzpeI/AAAAAAAAALo/L6yCR-L9NbE/s400/FSharpJobTrend-2011-02.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5571758675518006754" /&gt;&lt;/a&gt;&lt;p&gt;More job adverts now mention &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; than any other functional programming language, including &lt;a href="http://ocamlnews.blogspot.com/"&gt;OCaml&lt;/a&gt;, &lt;a href="http://haskell-news.blogspot.com/"&gt;Haskell&lt;/a&gt; and even &lt;a href="http://scalanews.blogspot.com/"&gt;Scala&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4927898066919385646?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4927898066919385646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4927898066919385646' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4927898066919385646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4927898066919385646'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/02/f-share-of-uk-job-market-triples-in.html' title='F# share of UK job market triples in four months'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NMRkpon4Ps0/TVLc_rRzpeI/AAAAAAAAALo/L6yCR-L9NbE/s72-c/FSharpJobTrend-2011-02.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-8900078226782659489</id><published>2011-02-02T21:02:00.005Z</published><updated>2011-02-02T21:59:16.484Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='exhibition'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='e-world'/><category scheme='http://www.blogger.com/atom/ns#' term='f# for visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='windows presentation foundation'/><title type='text'>F# for Visualization in Silverlight</title><content type='html'>&lt;p&gt;We have developed a version of our &lt;a href="http://ffconsultancy.com/products/fsharp_for_visualization/?fsb"&gt;F# for Visualization&lt;/a&gt; library that uses Microsoft's &lt;a href="http://fsharpnews.blogspot.com/2011/01/introduction-to-silverlight.html"&gt;Silverlight&lt;/a&gt; instead of &lt;a href="http://fsharpnews.blogspot.com/2008/11/windows-presentation-foundation-basic.html"&gt;Windows Presentation Foundation&lt;/a&gt; for a client to use at the &lt;a href="http://www.e-world-2011.com/en/home/"&gt;E-world 2011&lt;/a&gt; exhibition in Germany next week. This variant allows our charts and graphs to be rendered in web pages without sacrificing any functionality from the original library.&lt;/p&gt;&lt;p&gt;Here is a screenshot of a simple graph visualized in Internet Explorer using the Silverlight version of &lt;a href="http://ffconsultancy.com/products/fsharp_for_visualization/?fsb"&gt;F# for Visualization&lt;/a&gt;:&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_NMRkpon4Ps0/TUnJ4k04EaI/AAAAAAAAALg/VyifiIONM8o/s1600/FirstGraph.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 346px;" src="http://2.bp.blogspot.com/_NMRkpon4Ps0/TUnJ4k04EaI/AAAAAAAAALg/VyifiIONM8o/s400/FirstGraph.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5569204388015640994" /&gt;&lt;/a&gt;&lt;p&gt;Just like the WPF version, this visualization required just a single line of code:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;PlotControl([Function sin], (-6.0, 6.0))&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;If anyone else is interested in &lt;a href="http://ffconsultancy.com/products/fsharp_for_visualization/?fsb"&gt;F# for Visualization&lt;/a&gt; on Silverlight, please comment here or drop us an e-mail to let us know!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-8900078226782659489?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/8900078226782659489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=8900078226782659489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8900078226782659489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8900078226782659489'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/02/f-for-visualization-in-silverlight.html' title='F# for Visualization in Silverlight'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NMRkpon4Ps0/TUnJ4k04EaI/AAAAAAAAALg/VyifiIONM8o/s72-c/FirstGraph.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-9048675360609527955</id><published>2011-01-23T23:25:00.001Z</published><updated>2011-01-23T23:27:55.591Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>Introduction to Silverlight</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb91"&gt;The F#.NET Journal&lt;/a&gt; just published an article about Silverlight:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Microsoft's Silverlight allows .NET programs to be run directly in a compliant browser and all major browsers can support Silverlight. This articles describes how self-contained interactive Silverlight programs can be written entirely in the comfort of the F# programming language an easily to deployed to any web server (not necessarily Windows based) as an easy and efficient way to bring dynamic content to a website..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb91"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-9048675360609527955?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/9048675360609527955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=9048675360609527955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/9048675360609527955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/9048675360609527955'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/01/introduction-to-silverlight.html' title='Introduction to Silverlight'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4917201887889300345</id><published>2011-01-23T23:11:00.004Z</published><updated>2011-01-23T23:25:46.417Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='minimization'/><category scheme='http://www.blogger.com/atom/ns#' term='gradient descent'/><category scheme='http://www.blogger.com/atom/ns#' term='function optimization'/><title type='text'>Gradient descent</title><content type='html'>&lt;p&gt;One of the most popular questions we receive about the old book F# for Scientists is how the gradient descent example can be rewritten to work with the current version of F# in Visual Studio 2010 rather than the early prototype covered in the book, running under Visual Studio 2005.&lt;/p&gt;&lt;p&gt;We begin by referencing the F# PowerPack and its Compatibility extension:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#070;&amp;#083;&amp;#104;&amp;#097;&amp;#114;&amp;#112;&amp;#046;&amp;#080;&amp;#111;&amp;#119;&amp;#101;&amp;#114;&amp;#112;&amp;#097;&amp;#099;&amp;#107;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#045;&amp;#045;&amp;#062;&amp;#032;&amp;#082;&amp;#101;&amp;#102;&amp;#101;&amp;#114;&amp;#101;&amp;#110;&amp;#099;&amp;#101;&amp;#100;&amp;#032;&amp;#039;&amp;#067;&amp;#058;&amp;#092;&amp;#080;&amp;#114;&amp;#111;&amp;#103;&amp;#114;&amp;#097;&amp;#109;&amp;#032;&amp;#070;&amp;#105;&amp;#108;&amp;#101;&amp;#115;&amp;#092;&amp;#070;&amp;#083;&amp;#104;&amp;#097;&amp;#114;&amp;#112;&amp;#080;&amp;#111;&amp;#119;&amp;#101;&amp;#114;&amp;#080;&amp;#097;&amp;#099;&amp;#107;&amp;#045;&amp;#050;&amp;#046;&amp;#048;&amp;#046;&amp;#048;&amp;#046;&amp;#048;&amp;#092;&amp;#098;&amp;#105;&amp;#110;&amp;#092;&amp;#070;&amp;#083;&amp;#104;&amp;#097;&amp;#114;&amp;#112;&amp;#046;&amp;#080;&amp;#111;&amp;#119;&amp;#101;&amp;#114;&amp;#112;&amp;#097;&amp;#099;&amp;#107;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#039;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#070;&amp;#083;&amp;#104;&amp;#097;&amp;#114;&amp;#112;&amp;#046;&amp;#080;&amp;#111;&amp;#119;&amp;#101;&amp;#114;&amp;#112;&amp;#097;&amp;#099;&amp;#107;&amp;#046;&amp;#067;&amp;#111;&amp;#109;&amp;#112;&amp;#097;&amp;#116;&amp;#105;&amp;#098;&amp;#105;&amp;#108;&amp;#105;&amp;#116;&amp;#121;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#045;&amp;#045;&amp;#062;&amp;#032;&amp;#082;&amp;#101;&amp;#102;&amp;#101;&amp;#114;&amp;#101;&amp;#110;&amp;#099;&amp;#101;&amp;#100;&amp;#032;&amp;#039;&amp;#067;&amp;#058;&amp;#092;&amp;#080;&amp;#114;&amp;#111;&amp;#103;&amp;#114;&amp;#097;&amp;#109;&amp;#032;&amp;#070;&amp;#105;&amp;#108;&amp;#101;&amp;#115;&amp;#092;&amp;#070;&amp;#083;&amp;#104;&amp;#097;&amp;#114;&amp;#112;&amp;#080;&amp;#111;&amp;#119;&amp;#101;&amp;#114;&amp;#080;&amp;#097;&amp;#099;&amp;#107;&amp;#045;&amp;#050;&amp;#046;&amp;#048;&amp;#046;&amp;#048;&amp;#046;&amp;#048;&amp;#092;&amp;#098;&amp;#105;&amp;#110;&amp;#092;&amp;#070;&amp;#083;&amp;#104;&amp;#097;&amp;#114;&amp;#112;&amp;#046;&amp;#080;&amp;#111;&amp;#119;&amp;#101;&amp;#114;&amp;#112;&amp;#097;&amp;#099;&amp;#107;&amp;#046;&amp;#067;&amp;#111;&amp;#109;&amp;#112;&amp;#097;&amp;#116;&amp;#105;&amp;#098;&amp;#105;&amp;#108;&amp;#105;&amp;#116;&amp;#121;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#039;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#035;&amp;#110;&amp;#111;&amp;#119;&amp;#097;&amp;#114;&amp;#110;&amp;#032;&amp;#034;&amp;#054;&amp;#050;&amp;#034;&amp;#059;&amp;#059;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;Next, we define a small number that we be used to calculate numerical approximations to derivatives:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#948;&amp;#032;&amp;#061;&amp;#032;&amp;#101;&amp;#112;&amp;#115;&amp;#105;&amp;#108;&amp;#111;&amp;#110;&amp;#095;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#042;&amp;#042;&amp;#032;&amp;#040;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#047;&amp;#032;&amp;#051;&amp;#046;&amp;#048;&amp;#041;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#948;&amp;#032;&amp;#058;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#054;&amp;#046;&amp;#048;&amp;#053;&amp;#053;&amp;#052;&amp;#053;&amp;#052;&amp;#052;&amp;#053;&amp;#050;&amp;#101;&amp;#045;&amp;#048;&amp;#054;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;The following function repeatedly applies the given function to the given initial value until the result stops changing:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#101;&amp;#099;&amp;#032;&amp;#102;&amp;#105;&amp;#120;&amp;#101;&amp;#100;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#102;&amp;#032;&amp;#120;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#032;&amp;#120;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#120;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#120;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#032;&amp;#102;&amp;#105;&amp;#120;&amp;#101;&amp;#100;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#102;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#102;&amp;#105;&amp;#120;&amp;#101;&amp;#100;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#058;&amp;#032;&amp;#040;&amp;#039;&amp;#097;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#039;&amp;#097;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#119;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#058;&amp;#032;&amp;#101;&amp;#113;&amp;#117;&amp;#097;&amp;#108;&amp;#105;&amp;#116;&amp;#121;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;The numerical approximation to the grad of a scalar field is built up from partial derivatives in each direction:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#112;&amp;#097;&amp;#114;&amp;#116;&amp;#105;&amp;#097;&amp;#108;&amp;#068;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#115;&amp;#032;&amp;#102;&amp;#032;&amp;#040;&amp;#120;&amp;#115;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#041;&amp;#032;&amp;#105;&amp;#032;&amp;#120;&amp;#105;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#120;&amp;#115;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#120;&amp;#105;&amp;#032;&amp;#043;&amp;#032;&amp;#948;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#116;&amp;#114;&amp;#121;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#120;&amp;#115;&amp;#032;&amp;#045;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#115;&amp;#041;&amp;#032;&amp;#047;&amp;#032;&amp;#948;&amp;#032;&amp;#102;&amp;#105;&amp;#110;&amp;#097;&amp;#108;&amp;#108;&amp;#121;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#120;&amp;#115;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#120;&amp;#105;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#112;&amp;#097;&amp;#114;&amp;#116;&amp;#105;&amp;#097;&amp;#108;&amp;#068;&amp;#032;&amp;#058;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#040;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;The following function performs a single iteration of gradient descent by scaling the step size λ by either α or β if the result increases or decreases the function being minimized, respectively:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#100;&amp;#101;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#100;&amp;#032;&amp;#945;&amp;#032;&amp;#946;&amp;#032;&amp;#102;&amp;#032;&amp;#040;&amp;#102;&amp;#039;&amp;#058;&amp;#032;&amp;#095;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#041;&amp;#032;&amp;#040;&amp;#955;&amp;#044;&amp;#032;&amp;#120;&amp;#115;&amp;#044;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#115;&amp;#041;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#120;&amp;#115;&amp;#095;&amp;#050;&amp;#032;&amp;#061;&amp;#032;&amp;#120;&amp;#115;&amp;#032;&amp;#045;&amp;#032;&amp;#955;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#039;&amp;#032;&amp;#120;&amp;#115;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#115;&amp;#095;&amp;#050;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#032;&amp;#120;&amp;#115;&amp;#095;&amp;#050;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#115;&amp;#095;&amp;#050;&amp;#032;&amp;#062;&amp;#061;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#115;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#945;&amp;#032;&amp;#042;&amp;#032;&amp;#955;&amp;#044;&amp;#032;&amp;#120;&amp;#115;&amp;#044;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#115;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#946;&amp;#032;&amp;#042;&amp;#032;&amp;#955;&amp;#044;&amp;#032;&amp;#120;&amp;#115;&amp;#095;&amp;#050;&amp;#044;&amp;#032;&amp;#102;&amp;#095;&amp;#120;&amp;#115;&amp;#095;&amp;#050;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#100;&amp;#101;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#100;&amp;#032;&amp;#058;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#040;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#062;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#039;&amp;#097;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#040;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#062;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#042;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#062;&amp;#032;&amp;#042;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#042;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#062;&amp;#032;&amp;#042;&amp;#032;&amp;#039;&amp;#097;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#119;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#058;&amp;#032;&amp;#099;&amp;#111;&amp;#109;&amp;#112;&amp;#097;&amp;#114;&amp;#105;&amp;#115;&amp;#111;&amp;#110;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;Finally, the following function uses the gradient descent algorithm to minimize a given function and derivative:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#103;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#101;&amp;#110;&amp;#116;&amp;#068;&amp;#101;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#032;&amp;#102;&amp;#032;&amp;#102;&amp;#039;&amp;#032;&amp;#120;&amp;#115;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#095;&amp;#044;&amp;#032;&amp;#120;&amp;#115;&amp;#044;&amp;#032;&amp;#095;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#105;&amp;#120;&amp;#101;&amp;#100;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#040;&amp;#100;&amp;#101;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#100;&amp;#032;&amp;#048;&amp;#046;&amp;#053;&amp;#032;&amp;#049;&amp;#046;&amp;#049;&amp;#032;&amp;#102;&amp;#032;&amp;#102;&amp;#039;&amp;#041;&amp;#032;&amp;#040;&amp;#948;&amp;#044;&amp;#032;&amp;#120;&amp;#115;&amp;#044;&amp;#032;&amp;#102;&amp;#032;&amp;#120;&amp;#115;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#120;&amp;#115;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#103;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#101;&amp;#110;&amp;#116;&amp;#068;&amp;#101;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#032;&amp;#058;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#040;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#062;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#039;&amp;#097;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#040;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#062;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#062;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#119;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#058;&amp;#032;&amp;#099;&amp;#111;&amp;#109;&amp;#112;&amp;#097;&amp;#114;&amp;#105;&amp;#115;&amp;#111;&amp;#110;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;For example, the following computes a numerical approximation to the derivative of a function:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#103;&amp;#114;&amp;#097;&amp;#100;&amp;#032;&amp;#102;&amp;#032;&amp;#120;&amp;#115;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#046;&amp;#109;&amp;#097;&amp;#112;&amp;#105;&amp;#032;&amp;#040;&amp;#112;&amp;#097;&amp;#114;&amp;#116;&amp;#105;&amp;#097;&amp;#108;&amp;#068;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#120;&amp;#115;&amp;#041;&amp;#032;&amp;#102;&amp;#032;&amp;#120;&amp;#115;&amp;#041;&amp;#032;&amp;#120;&amp;#115;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#103;&amp;#114;&amp;#097;&amp;#100;&amp;#032;&amp;#058;&amp;#032;&amp;#040;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;And the following defines the famous Rosenbrock "banana" function that is notoriously difficult to minimize due to its curvature around the minimum:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#111;&amp;#115;&amp;#101;&amp;#110;&amp;#098;&amp;#114;&amp;#111;&amp;#099;&amp;#107;&amp;#032;&amp;#040;&amp;#120;&amp;#115;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#041;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#032;&amp;#061;&amp;#032;&amp;#120;&amp;#115;&amp;#046;&amp;#091;&amp;#048;&amp;#093;&amp;#044;&amp;#032;&amp;#120;&amp;#115;&amp;#046;&amp;#091;&amp;#049;&amp;#093;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#112;&amp;#111;&amp;#119;&amp;#110;&amp;#032;&amp;#040;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#045;&amp;#032;&amp;#120;&amp;#041;&amp;#032;&amp;#050;&amp;#032;&amp;#043;&amp;#032;&amp;#049;&amp;#048;&amp;#048;&amp;#046;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#112;&amp;#111;&amp;#119;&amp;#110;&amp;#032;&amp;#040;&amp;#121;&amp;#032;&amp;#045;&amp;#032;&amp;#112;&amp;#111;&amp;#119;&amp;#110;&amp;#032;&amp;#120;&amp;#032;&amp;#050;&amp;#041;&amp;#032;&amp;#050;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#114;&amp;#111;&amp;#115;&amp;#101;&amp;#110;&amp;#098;&amp;#114;&amp;#111;&amp;#099;&amp;#107;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;The minimum at (1, 1) may be found quickly and easily using the functions defined above as follows:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#120;&amp;#115;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#091;&amp;#048;&amp;#046;&amp;#048;&amp;#059;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#093;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#103;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#101;&amp;#110;&amp;#116;&amp;#068;&amp;#101;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#032;&amp;#114;&amp;#111;&amp;#115;&amp;#101;&amp;#110;&amp;#098;&amp;#114;&amp;#111;&amp;#099;&amp;#107;&amp;#032;&amp;#040;&amp;#103;&amp;#114;&amp;#097;&amp;#100;&amp;#032;&amp;#114;&amp;#111;&amp;#115;&amp;#101;&amp;#110;&amp;#098;&amp;#114;&amp;#111;&amp;#099;&amp;#107;&amp;#041;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#120;&amp;#115;&amp;#032;&amp;#058;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#062;&amp;#032;&amp;#061;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#091;&amp;#124;&amp;#048;&amp;#046;&amp;#057;&amp;#057;&amp;#055;&amp;#055;&amp;#049;&amp;#056;&amp;#048;&amp;#053;&amp;#055;&amp;#049;&amp;#059;&amp;#032;&amp;#048;&amp;#046;&amp;#057;&amp;#057;&amp;#053;&amp;#052;&amp;#051;&amp;#051;&amp;#056;&amp;#057;&amp;#124;&amp;#093;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;For the latest in-depth coverage of the F# programming language, read &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;Visual F# 2010 for Technical Computing&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4917201887889300345?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4917201887889300345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4917201887889300345' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4917201887889300345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4917201887889300345'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/01/gradient-descent.html' title='Gradient descent'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-7667233453419226804</id><published>2011-01-16T21:52:00.001Z</published><updated>2011-01-17T09:10:38.620Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='tdd'/><category scheme='http://www.blogger.com/atom/ns#' term='f# interactive'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='bdd'/><category scheme='http://www.blogger.com/atom/ns#' term='nunit'/><title type='text'>Testing: Behaviour-Driven Development with F#</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb90"&gt;The F#.NET Journal&lt;/a&gt; just published an article about testing:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Of the many approaches taken to testing, Behaviour-Driven Development (BDD) is unusual in aiming to provide human-readable tests that can be used by non-technical people. The objective is to write the tests in a high-level language, as close to plain English as possible with data provided in the form of bullet-point lists or tables, that are interpreted by the machine in order to drive a production system and verify its behaviour. Naturally, F# is ideal in this situation because the challenge is essentially to implement an interpreter for a Domain Specific Language (DSL), the task that this family of languages were specifically bred for. This article walks through a complete sample including Gherkin parser, interpreter and harnesses for the NUnit testing framework and F# interactive..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb90"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-7667233453419226804?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/7667233453419226804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=7667233453419226804' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7667233453419226804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7667233453419226804'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/01/testing-behaviour-driven-development.html' title='Testing: Behaviour-Driven Development with F#'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4500573869433009994</id><published>2011-01-09T21:25:00.002Z</published><updated>2011-01-09T21:29:38.279Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='shunting yard'/><category scheme='http://www.blogger.com/atom/ns#' term='active patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='precedence climbing'/><category scheme='http://www.blogger.com/atom/ns#' term='parsing'/><category scheme='http://www.blogger.com/atom/ns#' term='simple'/><category scheme='http://www.blogger.com/atom/ns#' term='recursive descent'/><title type='text'>Simple and efficient hand-written parsers</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb89"&gt;The F#.NET Journal&lt;/a&gt; just published an article about parsing:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"In addition to the powerful code generation tools and libraries that assist with parsing, the ability to write simple and efficient parsers by hand can also be extremely useful. This article examines three different kinds of hand-written parsers ranging from very simple and extensible recursive-descent parsers to highly efficient bottom-up parsers..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb89"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4500573869433009994?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4500573869433009994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4500573869433009994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4500573869433009994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4500573869433009994'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/01/simple-and-efficient-hand-written.html' title='Simple and efficient hand-written parsers'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-6983921977110348822</id><published>2011-01-03T14:32:00.004Z</published><updated>2011-01-03T14:48:41.163Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='pattern matching'/><category scheme='http://www.blogger.com/atom/ns#' term='or-pattern'/><title type='text'>Patterns are everywhere!</title><content type='html'>&lt;p&gt;When people first learn languages from the ML family, like &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;, they often mistakenly assume that patterns appear only in match or function expressions. In fact, patterns also appear on the left-hand-side of let-bound definitions. This is why you can write:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;let f(a, b) = a + b&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;The pattern is used to destructure a tuple. Specifically, a pair. But this is not just restricted to tuples. You can use that pattern to destructure much more. For example, the following destructures a pair of pairs:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;let f((x1, y1), (x2, y2)) = x1 + x2, y1 + y2&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;Things start to get interesting when you pull in some of the more advanced pattern matching features in F#. For example, the following uses an or-pattern to select the value x is bound to depending upon the structure of the input:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;let def (_, Some x | x, None) = x&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;This function takes a pair of values. The second value is of an option type. If that second value has the structure Some then its argument is the return value of the def function. Otherwise, the structure is None and the first argument is returned. Therefore, this def function mimics the behaviour of the built-in defaultArg function, returning the value conveyed by an optional type (if any) or a given default value otherwise.&lt;/p&gt;&lt;p&gt;Pattern matching is one of the enormously powerful features offered by the F# programming language. This feature and more are described in my new book &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;Visual F# 2010 for Technical Computing&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-6983921977110348822?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/6983921977110348822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=6983921977110348822' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6983921977110348822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6983921977110348822'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2011/01/patterns-are-everywhere.html' title='Patterns are everywhere!'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-7675712282771228128</id><published>2010-12-30T02:49:00.004Z</published><updated>2010-12-30T03:09:17.544Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Performance-related features in F# and C#</title><content type='html'>&lt;p&gt;Many people expect the performance of &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; to be comparable to the performance of C# "because they both compile to the same intermediate language (CIL)". Although the VM obviously places the same ceiling on the performance of both &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; and C# there are some features that affect performance differently between the two language implementations.&lt;/p&gt;&lt;p&gt;Firstly, C# and &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; don't actually compile down to the same CIL because only &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; generates tail calls. This affects performance when mutually recursive functions that represent the different states of a state machine tail call each other in order to move between states. This design pattern often appears in the context of asynchronous workflows that can tail call each other in &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; but this will not even be possible with the new async support in C# 5.&lt;/p&gt;&lt;p&gt;Secondly, the implementation of delegates on .NET is currently quite inefficient and, consequently, &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; uses its own FastFunc type for high-performance first-class functions.&lt;/p&gt;&lt;p&gt;Thirdly, &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; uses .NET metadata to convey inline functions so that they can be exported across APIs and, of course, that can dramatically improve performance in certain circumstances. Moreover, &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;'s inlining allows functions passed as arguments to higher-order functions to be completely inlined and type specialized. Our &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_numerics/?fsb"&gt;F# for Numerics&lt;/a&gt; library makes extensive use of this feature to ensure that per-type functions such as comparison are specialized, giving performance in &lt;a href="http://flyingfrogblog.blogspot.com/2009/07/ocaml-vs-f-burrows-wheeler.html"&gt;F# up to 2,350× faster than the equivalent C#&lt;/a&gt; (!). In fact, some of our numerical routines are consistently several times faster than vendor-tuned Fortran in libraries like the Intel MKL.&lt;/p&gt;&lt;p&gt;Finally, pattern matching can be extremely laborious to express in C# because the language lacks pattern matching but it is almost impossible to maintain optimized C# code equivalent to many non-trivial pattern matches. In contrast, the &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; compiler aggressively optimizes pattern matches during compilation.&lt;/p&gt;&lt;p&gt;Conversely, the C# compiler can be better at optimizing computations over value types (e.g. complex arithmetic).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-7675712282771228128?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/7675712282771228128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=7675712282771228128' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7675712282771228128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7675712282771228128'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/12/performance-related-features-in-f-and-c.html' title='Performance-related features in F# and C#'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1675268366454411374</id><published>2010-12-14T09:20:00.002Z</published><updated>2010-12-14T09:32:47.547Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='active patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='parsing'/><category scheme='http://www.blogger.com/atom/ns#' term='expressions'/><title type='text'>Parsing mathematical expressions using active patterns</title><content type='html'>&lt;p&gt;Active patterns allow arbitrary user-defined functions to be used to dissect values during pattern matching. This opens up some interesting possibilities with regard to parsing because it allows active patterns to be used to destructure streams of data when known patterns are encountered.&lt;/p&gt;&lt;p&gt;The following code sample creates several mutually-recursive active patterns that form a recursive descent parser for mathematical expressions:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#62;&amp;#32;&amp;#108;&amp;#101;&amp;#116;&amp;#32;&amp;#114;&amp;#101;&amp;#99;&amp;#32;&amp;#40;&amp;#124;&amp;#84;&amp;#101;&amp;#114;&amp;#109;&amp;#124;&amp;#95;&amp;#124;&amp;#41;&amp;#32;&amp;#61;&amp;#32;&amp;#102;&amp;#117;&amp;#110;&amp;#99;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#70;&amp;#97;&amp;#99;&amp;#116;&amp;#111;&amp;#114;&amp;#40;&amp;#101;&amp;#49;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&amp;#32;&amp;#45;&amp;#62;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#108;&amp;#101;&amp;#116;&amp;#32;&amp;#114;&amp;#101;&amp;#99;&amp;#32;&amp;#97;&amp;#117;&amp;#120;&amp;#32;&amp;#101;&amp;#49;&amp;#32;&amp;#61;&amp;#32;&amp;#102;&amp;#117;&amp;#110;&amp;#99;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#39;&amp;#43;&amp;#39;&amp;#58;&amp;#58;&amp;#70;&amp;#97;&amp;#99;&amp;#116;&amp;#111;&amp;#114;&amp;#40;&amp;#101;&amp;#50;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#97;&amp;#117;&amp;#120;&amp;#32;&amp;#40;&amp;#101;&amp;#49;&amp;#32;&amp;#43;&amp;#32;&amp;#101;&amp;#50;&amp;#41;&amp;#32;&amp;#116;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#39;&amp;#45;&amp;#39;&amp;#58;&amp;#58;&amp;#70;&amp;#97;&amp;#99;&amp;#116;&amp;#111;&amp;#114;&amp;#40;&amp;#101;&amp;#50;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#97;&amp;#117;&amp;#120;&amp;#32;&amp;#40;&amp;#101;&amp;#49;&amp;#32;&amp;#45;&amp;#32;&amp;#101;&amp;#50;&amp;#41;&amp;#32;&amp;#116;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#116;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#83;&amp;#111;&amp;#109;&amp;#101;&amp;#40;&amp;#101;&amp;#49;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#97;&amp;#117;&amp;#120;&amp;#32;&amp;#101;&amp;#49;&amp;#32;&amp;#116;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#95;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#78;&amp;#111;&amp;#110;&amp;#101;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#97;&amp;#110;&amp;#100;&amp;#32;&amp;#40;&amp;#124;&amp;#70;&amp;#97;&amp;#99;&amp;#116;&amp;#111;&amp;#114;&amp;#124;&amp;#95;&amp;#124;&amp;#41;&amp;#32;&amp;#61;&amp;#32;&amp;#102;&amp;#117;&amp;#110;&amp;#99;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#39;&amp;#45;&amp;#39;&amp;#58;&amp;#58;&amp;#70;&amp;#97;&amp;#99;&amp;#116;&amp;#111;&amp;#114;&amp;#40;&amp;#101;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#83;&amp;#111;&amp;#109;&amp;#101;&amp;#40;&amp;#45;&amp;#101;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#65;&amp;#116;&amp;#111;&amp;#109;&amp;#40;&amp;#101;&amp;#49;&amp;#44;&amp;#32;&amp;#39;&amp;#42;&amp;#39;&amp;#58;&amp;#58;&amp;#70;&amp;#97;&amp;#99;&amp;#116;&amp;#111;&amp;#114;&amp;#40;&amp;#101;&amp;#50;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&amp;#41;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#83;&amp;#111;&amp;#109;&amp;#101;&amp;#40;&amp;#101;&amp;#49;&amp;#32;&amp;#42;&amp;#32;&amp;#101;&amp;#50;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#65;&amp;#116;&amp;#111;&amp;#109;&amp;#40;&amp;#101;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#83;&amp;#111;&amp;#109;&amp;#101;&amp;#40;&amp;#101;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#95;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#78;&amp;#111;&amp;#110;&amp;#101;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#97;&amp;#110;&amp;#100;&amp;#32;&amp;#40;&amp;#124;&amp;#65;&amp;#116;&amp;#111;&amp;#109;&amp;#124;&amp;#95;&amp;#124;&amp;#41;&amp;#32;&amp;#61;&amp;#32;&amp;#102;&amp;#117;&amp;#110;&amp;#99;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#99;&amp;#58;&amp;#58;&amp;#116;&amp;#32;&amp;#119;&amp;#104;&amp;#101;&amp;#110;&amp;#32;&amp;#39;&amp;#48;&amp;#39;&amp;#60;&amp;#61;&amp;#99;&amp;#32;&amp;#38;&amp;#38;&amp;#32;&amp;#99;&amp;#60;&amp;#61;&amp;#39;&amp;#57;&amp;#39;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#83;&amp;#111;&amp;#109;&amp;#101;&amp;#40;&amp;#105;&amp;#110;&amp;#116;&amp;#40;&amp;#115;&amp;#116;&amp;#114;&amp;#105;&amp;#110;&amp;#103;&amp;#32;&amp;#99;&amp;#41;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#39;&amp;#40;&amp;#39;&amp;#58;&amp;#58;&amp;#84;&amp;#101;&amp;#114;&amp;#109;&amp;#40;&amp;#101;&amp;#44;&amp;#32;&amp;#39;&amp;#41;&amp;#39;&amp;#58;&amp;#58;&amp;#116;&amp;#41;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#83;&amp;#111;&amp;#109;&amp;#101;&amp;#40;&amp;#101;&amp;#44;&amp;#32;&amp;#116;&amp;#41;&lt;br /&gt;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#124;&amp;#32;&amp;#95;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#78;&amp;#111;&amp;#110;&amp;#101;&amp;#59;&amp;#59;&lt;br /&gt;&amp;#118;&amp;#97;&amp;#108;&amp;#32;&amp;#40;&amp;#32;&amp;#124;&amp;#84;&amp;#101;&amp;#114;&amp;#109;&amp;#124;&amp;#95;&amp;#124;&amp;#32;&amp;#41;&amp;#32;&amp;#58;&amp;#32;&amp;#99;&amp;#104;&amp;#97;&amp;#114;&amp;#32;&amp;#108;&amp;#105;&amp;#115;&amp;#116;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#40;&amp;#105;&amp;#110;&amp;#116;&amp;#32;&amp;#42;&amp;#32;&amp;#99;&amp;#104;&amp;#97;&amp;#114;&amp;#32;&amp;#108;&amp;#105;&amp;#115;&amp;#116;&amp;#41;&amp;#32;&amp;#111;&amp;#112;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&lt;br /&gt;&amp;#118;&amp;#97;&amp;#108;&amp;#32;&amp;#40;&amp;#32;&amp;#124;&amp;#70;&amp;#97;&amp;#99;&amp;#116;&amp;#111;&amp;#114;&amp;#124;&amp;#95;&amp;#124;&amp;#32;&amp;#41;&amp;#32;&amp;#58;&amp;#32;&amp;#99;&amp;#104;&amp;#97;&amp;#114;&amp;#32;&amp;#108;&amp;#105;&amp;#115;&amp;#116;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#40;&amp;#105;&amp;#110;&amp;#116;&amp;#32;&amp;#42;&amp;#32;&amp;#99;&amp;#104;&amp;#97;&amp;#114;&amp;#32;&amp;#108;&amp;#105;&amp;#115;&amp;#116;&amp;#41;&amp;#32;&amp;#111;&amp;#112;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&lt;br /&gt;&amp;#118;&amp;#97;&amp;#108;&amp;#32;&amp;#40;&amp;#32;&amp;#124;&amp;#65;&amp;#116;&amp;#111;&amp;#109;&amp;#124;&amp;#95;&amp;#124;&amp;#32;&amp;#41;&amp;#32;&amp;#58;&amp;#32;&amp;#99;&amp;#104;&amp;#97;&amp;#114;&amp;#32;&amp;#108;&amp;#105;&amp;#115;&amp;#116;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#40;&amp;#105;&amp;#110;&amp;#116;&amp;#32;&amp;#42;&amp;#32;&amp;#99;&amp;#104;&amp;#97;&amp;#114;&amp;#32;&amp;#108;&amp;#105;&amp;#115;&amp;#116;&amp;#41;&amp;#32;&amp;#111;&amp;#112;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;For example, the following parses the expression &lt;i&gt;1 + 2 &amp;#215; (3 - 4) &amp;#215; -5&lt;/i&gt;:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#62;&amp;#32;&amp;#108;&amp;#101;&amp;#116;&amp;#32;&amp;#40;&amp;#84;&amp;#101;&amp;#114;&amp;#109;&amp;#32;&amp;#101;&amp;#41;&amp;#32;&amp;#61;&amp;#32;&amp;#76;&amp;#105;&amp;#115;&amp;#116;&amp;#46;&amp;#111;&amp;#102;&amp;#83;&amp;#101;&amp;#113;&amp;#32;&amp;#34;&amp;#49;&amp;#43;&amp;#50;&amp;#42;&amp;#40;&amp;#51;&amp;#45;&amp;#52;&amp;#41;&amp;#42;&amp;#45;&amp;#53;&amp;#34;&amp;#59;&amp;#59;&lt;br /&gt;&amp;#118;&amp;#97;&amp;#108;&amp;#32;&amp;#101;&amp;#32;&amp;#58;&amp;#32;&amp;#105;&amp;#110;&amp;#116;&amp;#32;&amp;#42;&amp;#32;&amp;#99;&amp;#104;&amp;#97;&amp;#114;&amp;#32;&amp;#108;&amp;#105;&amp;#115;&amp;#116;&amp;#32;&amp;#61;&amp;#32;&amp;#40;&amp;#49;&amp;#49;&amp;#44;&amp;#32;&amp;#91;&amp;#93;&amp;#41;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;The F# programming language is descended from the MetaLanguages (ML) family that were specifically bred for metaprogramming including parsing. For more information on metaprogramming with F#, read the following articles in &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb"&gt;The F#.NET Journal&lt;/a&gt;:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2007/10/parsing-text-with-lex-and-yacc.html"&gt;Parsing text with Lex and Yacc (30th September 2007)&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2007/11/optimizing-simple-bytecode-interpreter.html"&gt;Optimizing a simple bytecode interpreter (31st October 2007)&lt;/a&gt;.&lt;/li&gt; &lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2007/12/parser-combinators.html"&gt;Parser combinators (30th November 2007)&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2008/01/language-oriented-programming-term.html"&gt;Language-oriented programming: The Term-level Interpreter (31st December 2007)&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2008/08/solving-traveling-salesman-problem.html"&gt;Language-oriented programming: Term Rewriting (16th August 2008)&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2008/09/run-time-code-generation-using.html"&gt;Run-time code generation using &lt;code&gt;System.Reflection.Emit&lt;/code&gt; (31st August 2008)&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2009/12/parsing-and-visualizing-binary.html"&gt;Parsing and visualizing binary Geographic Information System data (30th November 2009)&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1675268366454411374?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1675268366454411374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1675268366454411374' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1675268366454411374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1675268366454411374'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/12/parsing-mathematical-expressions-using.html' title='Parsing mathematical expressions using active patterns'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3027034187106817228</id><published>2010-12-10T13:10:00.004Z</published><updated>2010-12-10T13:15:03.769Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='example'/><category scheme='http://www.blogger.com/atom/ns#' term='sample'/><category scheme='http://www.blogger.com/atom/ns#' term='popular'/><category scheme='http://www.blogger.com/atom/ns#' term='blog post'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><title type='text'>Most popular F# samples</title><content type='html'>&lt;p&gt;Here's a short-list of our most popular blog posts that describe example F# programs:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/07/lorenz-attractor.html"&gt;Lorenz attractor&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/02/sieve-of-eratosthenes.html"&gt;Sieve of Eratosthenes&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/11/visualizing-complete-graph.html"&gt;Visualizing a complete graph&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/07/f-vs-mathematica-parametric-plots.html"&gt;Parametric plots&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/06/dragon-curve-in-17-lines-of-f.html"&gt;Dragon curve&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/02/bookworm-challenge.html"&gt;Bookworm challenge&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/07/f-vs-mathematica-red-black-trees.html"&gt;Red-black trees&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/02/anagrams.html"&gt;Anagrams&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/05/mini-hash-table.html"&gt;Mini hash table&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2007/02/symbolic-manipulation.html"&gt;Symbolic manipulation&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2009/05/pythagoras-tree.html"&gt;Pythagoras tree&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/02/morris-sequences.html"&gt;Morris sequences&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/07/happy-numbers.html"&gt;Happy numbers&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/05/java-vs-f.html"&gt;Java vs F#&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/03/f-vs-unmanaged-c-for-parallel-numerics.html"&gt;F# vs Unmanaged C++ for parallel numerics&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2010/02/john-conways-game-of-life-in-32-lines.html"&gt;John Conway's Game of Life&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2009/12/evolution-weasel-program.html"&gt;Evolution: the weasel program&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fsharpnews.blogspot.com/2007/04/foreign-function-interface-ffi.html"&gt;Foreign Function Interface (FFI)&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-3027034187106817228?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/3027034187106817228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=3027034187106817228' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3027034187106817228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3027034187106817228'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/12/most-popular-f-samples.html' title='Most popular F# samples'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4601722391825234391</id><published>2010-12-05T15:29:00.001Z</published><updated>2010-12-05T16:10:48.522Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='matrix inversion'/><category scheme='http://www.blogger.com/atom/ns#' term='numerical methods'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='inverse'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematica'/><title type='text'>Numerical methods: matrix inversion</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb88"&gt;The F#.NET Journal&lt;/a&gt; just published an article about numerical methods:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Matrix inversion is one of the most important numerical methods with many practical applications. In practice, the numerical instability of matrix inverses leads to the use of linear solvers that effectively premultiply by the inverse of a matrix without having to explicitly compute the matrix inverse. This article disregards numerical accuracy in order to write the simplest possible function that computes the inverse of a matrix. The resulting function is just 8 lines of F# code and the remainder of the article is devoted to examining the generality and parallelization of this tiny function. We find that our tiny solution is up to 4.3× faster than Mathematica 7's built-in matrix inversion..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb88"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4601722391825234391?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4601722391825234391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4601722391825234391' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4601722391825234391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4601722391825234391'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/12/numerical-methods-matrix-inversion.html' title='Numerical methods: matrix inversion'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-2473145798442294800</id><published>2010-11-30T09:59:00.001Z</published><updated>2010-11-30T10:00:52.834Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='don syme'/><category scheme='http://www.blogger.com/atom/ns#' term='lecture'/><title type='text'>"A Taste of F#" video lecture by Don Syme</title><content type='html'>&lt;p&gt;Without further ado, here is Don Syme's recent Tech-Ed lecture on &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; today and in the future:&lt;/p&gt;&lt;object class="player" width="645" height="363" type="application/x-silverlight-2" data="data:application/x-silverlight-2,"&gt;&lt;br /&gt;&lt;param value="http://www.msteched.com/ClientBin/players/VideoPlayer2009_03_27.xap" name="source"&gt;&lt;br /&gt;&lt;param value="m=http://ecn.channel9.msdn.com/o9/te/Europe/2010/wmv/dev304.wmv,thumbnail=http://www.msteched.com/Skins/TechEdOnline/Styles/images/DefaultPlayerBackground.png,autohide=true,showembed=true" name="initParams"&gt;&lt;br /&gt;&lt;param value="#00000000" name="background"&gt;&lt;br /&gt;&lt;param name="minRuntimeVersion" value="3.0.50106.0"&gt;&lt;br /&gt;&lt;param name="windowless" value="true"&gt;&lt;br /&gt;&lt;param name="enableGPUAcceleration" value="true"&gt;&lt;br /&gt;&lt;param name="autoUpgrade" value="true"&gt;&lt;br /&gt; &lt;a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;amp;v=3.0.50106.0" style="text-decoration:none"&gt;&lt;br /&gt;   &lt;img src="http://www.msteched.com/Skins/TechEdOnline/Styles/images/NoSilverlight.jpg" alt="Get Microsoft Silverlight" style="border-style:none" /&gt;&lt;br /&gt; &lt;/a&gt;&lt;br /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-2473145798442294800?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/2473145798442294800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=2473145798442294800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/2473145798442294800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/2473145798442294800'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/11/taste-of-f-video-lecture-by-don-syme.html' title='&quot;A Taste of F#&quot; video lecture by Don Syme'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1752813506031034069</id><published>2010-11-30T09:29:00.003Z</published><updated>2010-11-30T09:41:16.696Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='byron cook'/><category scheme='http://www.blogger.com/atom/ns#' term='interview'/><title type='text'>"F# is like waterfowl..."</title><content type='html'>&lt;p&gt;Winner of the British Computer Society’s Roger Needham award, &lt;a href="http://byroncook.blogspot.com/"&gt;Byron Cook&lt;/a&gt;, described why &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; is his language of choice in &lt;a href="http://www.simple-talk.com/opinion/geek-of-the-week/dr-byron-cook-geek-of-the-week/"&gt;a recent interview&lt;/a&gt;:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;"&lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; is like waterfowl: it looks very graceful and calm from above, but below the water its legs are furiously working to protect you from the reality below..."&lt;/p&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1752813506031034069?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1752813506031034069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1752813506031034069' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1752813506031034069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1752813506031034069'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/11/f-is-like-waterfowl.html' title='&quot;F# is like waterfowl...&quot;'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3653099928553796934</id><published>2010-11-30T09:24:00.002Z</published><updated>2010-11-30T09:28:54.391Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='poll'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='language'/><title type='text'>What's your preferred .NET programming language?</title><content type='html'>&lt;p&gt;Zoho are running a poll about language preference on .NET:&lt;/p&gt;&lt;p style="text-align: center"&gt;&lt;iframe frameborder="0" src="http://zohopolls.com/external/mormond/language-shapes-the-way-we-think" width="320" height="400"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;p&gt;The &lt;a href="http://zohopolls.com/mormond/language-shapes-the-way-we-think"&gt;results&lt;/a&gt; show a surprisingly large proportion of developers now choosing &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;, even more than VB!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-3653099928553796934?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/3653099928553796934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=3653099928553796934' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3653099928553796934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3653099928553796934'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/11/whats-your-preferred-net-programming.html' title='What&apos;s your preferred .NET programming language?'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-7178310550710598388</id><published>2010-11-22T11:28:00.006Z</published><updated>2010-11-22T11:41:19.916Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='set'/><category scheme='http://www.blogger.com/atom/ns#' term='pangram'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><title type='text'>Checking for pangrams</title><content type='html'>&lt;p&gt;A pangram is a phrase that uses every letter of the alphabet. The following &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; function can be used to check a string to see if it constitutes a pangram:&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&amp;#62;&amp;#32;&amp;#108;&amp;#101;&amp;#116;&amp;#32;&amp;#105;&amp;#115;&amp;#80;&amp;#97;&amp;#110;&amp;#103;&amp;#114;&amp;#97;&amp;#109;&amp;#32;&amp;#40;&amp;#115;&amp;#116;&amp;#114;&amp;#58;&amp;#32;&amp;#115;&amp;#116;&amp;#114;&amp;#105;&amp;#110;&amp;#103;&amp;#41;&amp;#32;&amp;#61;&amp;#32;&amp;#40;&amp;#115;&amp;#101;&amp;#116;&amp;#91;&amp;#39;&amp;#97;&amp;#39;&amp;#46;&amp;#46;&amp;#39;&amp;#122;&amp;#39;&amp;#93;&amp;#32;&amp;#45;&amp;#32;&amp;#115;&amp;#101;&amp;#116;&amp;#40;&amp;#115;&amp;#116;&amp;#114;&amp;#46;&amp;#84;&amp;#111;&amp;#76;&amp;#111;&amp;#119;&amp;#101;&amp;#114;&amp;#40;&amp;#41;&amp;#41;&amp;#41;&amp;#46;&amp;#73;&amp;#115;&amp;#69;&amp;#109;&amp;#112;&amp;#116;&amp;#121;&amp;#59;&amp;#59;&lt;br /&gt;&amp;#118;&amp;#97;&amp;#108;&amp;#32;&amp;#105;&amp;#115;&amp;#80;&amp;#97;&amp;#110;&amp;#103;&amp;#114;&amp;#97;&amp;#109;&amp;#32;&amp;#58;&amp;#32;&amp;#115;&amp;#116;&amp;#114;&amp;#105;&amp;#110;&amp;#103;&amp;#32;&amp;#45;&amp;#62;&amp;#32;&amp;#98;&amp;#111;&amp;#111;&amp;#108;&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;The function works by computing a set difference, removing the set of letters used in the string from the set of letters in the alphabet. If the resulting set is empty then the string must have used every letter in the alphabet and, therefore, it is a pangram.&lt;/p&gt;&lt;p&gt;Note how easy &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; makes it to build sets from arbitrary sequences (lists and strings of characters, in this case) and perform set theoretic operations such as set difference (and union and intersection) on them. This basic functionality has a wide variety of applications ranging from the manipulation of strings seen here to the computation of &lt;i&gt;n&lt;/i&gt;&lt;sup&gt;th&lt;/sup&gt;-nearest neighbors in computational science (see the article &lt;a href="http://fsharpnews.blogspot.com/2009/09/traversing-networks-nth-nearest.html"&gt;Traversing networks: the &lt;i&gt;n&lt;/i&gt;&lt;sup&gt;th&lt;/sup&gt;-nearest neighbor&lt;/a&gt; in &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb"&gt;The F#.NET Journal&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;For example, the following verifies a popular English pangram:&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&amp;#62;&amp;#32;&amp;#105;&amp;#115;&amp;#80;&amp;#97;&amp;#110;&amp;#103;&amp;#114;&amp;#97;&amp;#109;&amp;#32;&amp;#34;&amp;#84;&amp;#104;&amp;#101;&amp;#32;&amp;#113;&amp;#117;&amp;#105;&amp;#99;&amp;#107;&amp;#32;&amp;#98;&amp;#114;&amp;#111;&amp;#119;&amp;#110;&amp;#32;&amp;#102;&amp;#111;&amp;#120;&amp;#32;&amp;#106;&amp;#117;&amp;#109;&amp;#112;&amp;#101;&amp;#100;&amp;#32;&amp;#111;&amp;#118;&amp;#101;&amp;#114;&amp;#32;&amp;#116;&amp;#104;&amp;#101;&amp;#32;&amp;#108;&amp;#97;&amp;#122;&amp;#121;&amp;#32;&amp;#100;&amp;#111;&amp;#103;&amp;#115;&amp;#34;&amp;#59;&amp;#59;&lt;br /&gt;&amp;#118;&amp;#97;&amp;#108;&amp;#32;&amp;#105;&amp;#116;&amp;#32;&amp;#58;&amp;#32;&amp;#98;&amp;#111;&amp;#111;&amp;#108;&amp;#32;&amp;#61;&amp;#32;&amp;#116;&amp;#114;&amp;#117;&amp;#101;&lt;/pre&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-7178310550710598388?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/7178310550710598388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=7178310550710598388' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7178310550710598388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7178310550710598388'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/11/checking-for-pangrams.html' title='Checking for pangrams'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-8364624398526993219</id><published>2010-11-21T12:44:00.002Z</published><updated>2010-11-21T12:46:54.835Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='interactive'/><category scheme='http://www.blogger.com/atom/ns#' term='quickhull algorithm'/><category scheme='http://www.blogger.com/atom/ns#' term='graphical'/><category scheme='http://www.blogger.com/atom/ns#' term='computational geometry'/><category scheme='http://www.blogger.com/atom/ns#' term='windows presentation foundation'/><category scheme='http://www.blogger.com/atom/ns#' term='convex hull'/><title type='text'>Computational geometry: quick hull</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb87"&gt;The F#.NET Journal&lt;/a&gt; just published an article about computational geometry:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Computing the convex hull of a set of points is a challenge of fundamental importance in computational geometry. Other tasks such as Delaunay triangulation can be built upon a convex hull algorithm and then tasks such as Ruppert's algorithm may be built upon those. This article describes the design and implementation of the quickhull algorithm in just 10 lines of F# code before going on to build a WPF-based GUI application that can be used to manipulate a convex hull interactively..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb87"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-8364624398526993219?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/8364624398526993219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=8364624398526993219' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8364624398526993219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8364624398526993219'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/11/computational-geometry-quick-hull.html' title='Computational geometry: quick hull'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1309221100684347480</id><published>2010-11-14T18:09:00.005Z</published><updated>2010-11-14T18:38:47.949Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='vector graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='complete graph'/><title type='text'>Visualizing a complete graph</title><content type='html'>&lt;p&gt;Kean Walmsley posted &lt;a href="http://through-the-interface.typepad.com/through_the_interface/2010/11/solving-a-fun-little-geometry-problem-in-c-and-f.html"&gt;an article&lt;/a&gt; describing how AutoCAD can be used to visualize a complete graph using vector graphics. This prompted Cay Horstmann to publish &lt;a href="http://weblogs.java.net/blog/cayhorstmann/archive/2010/11/12/geometry-problem-scala-0"&gt;an article&lt;/a&gt; describing how &lt;a href="http://technically.us/spde/About"&gt;the SPDE framework&lt;/a&gt; makes it possible to visualize the same thing using only 12 lines of Scala code. Here's how you can do the same thing in &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; out-of-the-box in only 10 lines of code:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#080;&amp;#114;&amp;#101;&amp;#115;&amp;#101;&amp;#110;&amp;#116;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#067;&amp;#111;&amp;#114;&amp;#101;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#080;&amp;#114;&amp;#101;&amp;#115;&amp;#101;&amp;#110;&amp;#116;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#070;&amp;#114;&amp;#097;&amp;#109;&amp;#101;&amp;#119;&amp;#111;&amp;#114;&amp;#107;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#088;&amp;#097;&amp;#109;&amp;#108;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#066;&amp;#097;&amp;#115;&amp;#101;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#111;&amp;#112;&amp;#101;&amp;#110;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#110;&amp;#032;&amp;#061;&amp;#032;&amp;#050;&amp;#052;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#110;&amp;#032;&amp;#058;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#050;&amp;#052;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#112;&amp;#032;&amp;#105;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#040;&amp;#105;&amp;#032;&amp;#037;&amp;#032;&amp;#110;&amp;#041;&amp;#032;&amp;#047;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#110;&amp;#032;&amp;#042;&amp;#032;&amp;#050;&amp;#046;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#077;&amp;#097;&amp;#116;&amp;#104;&amp;#046;&amp;#080;&amp;#073;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#040;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#043;&amp;#032;&amp;#115;&amp;#105;&amp;#110;&amp;#032;&amp;#116;&amp;#044;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#043;&amp;#032;&amp;#099;&amp;#111;&amp;#115;&amp;#032;&amp;#116;&amp;#041;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#112;&amp;#032;&amp;#058;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#115;&amp;#104;&amp;#097;&amp;#112;&amp;#101;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#104;&amp;#097;&amp;#112;&amp;#101;&amp;#115;&amp;#046;&amp;#080;&amp;#111;&amp;#108;&amp;#121;&amp;#108;&amp;#105;&amp;#110;&amp;#101;&amp;#040;&amp;#083;&amp;#116;&amp;#114;&amp;#111;&amp;#107;&amp;#101;&amp;#061;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#046;&amp;#066;&amp;#114;&amp;#117;&amp;#115;&amp;#104;&amp;#101;&amp;#115;&amp;#046;&amp;#066;&amp;#108;&amp;#097;&amp;#099;&amp;#107;&amp;#044;&amp;#032;&amp;#083;&amp;#116;&amp;#114;&amp;#111;&amp;#107;&amp;#101;&amp;#084;&amp;#104;&amp;#105;&amp;#099;&amp;#107;&amp;#110;&amp;#101;&amp;#115;&amp;#115;&amp;#061;&amp;#048;&amp;#046;&amp;#048;&amp;#048;&amp;#049;&amp;#041;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#115;&amp;#104;&amp;#097;&amp;#112;&amp;#101;&amp;#032;&amp;#058;&amp;#032;&amp;#083;&amp;#104;&amp;#097;&amp;#112;&amp;#101;&amp;#115;&amp;#046;&amp;#080;&amp;#111;&amp;#108;&amp;#121;&amp;#108;&amp;#105;&amp;#110;&amp;#101;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#061;&amp;#048;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#110;&amp;#045;&amp;#049;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#106;&amp;#061;&amp;#105;&amp;#043;&amp;#049;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#110;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#105;&amp;#116;&amp;#101;&amp;#114;&amp;#032;&amp;#115;&amp;#104;&amp;#097;&amp;#112;&amp;#101;&amp;#046;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#115;&amp;#046;&amp;#065;&amp;#100;&amp;#100;&amp;#032;&amp;#091;&amp;#112;&amp;#032;&amp;#105;&amp;#059;&amp;#032;&amp;#112;&amp;#032;&amp;#106;&amp;#093;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#105;&amp;#116;&amp;#032;&amp;#058;&amp;#032;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#040;&amp;#041;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#040;&amp;#067;&amp;#111;&amp;#110;&amp;#116;&amp;#101;&amp;#110;&amp;#116;&amp;#061;&amp;#067;&amp;#111;&amp;#110;&amp;#116;&amp;#114;&amp;#111;&amp;#108;&amp;#115;&amp;#046;&amp;#086;&amp;#105;&amp;#101;&amp;#119;&amp;#098;&amp;#111;&amp;#120;&amp;#040;&amp;#067;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#061;&amp;#115;&amp;#104;&amp;#097;&amp;#112;&amp;#101;&amp;#041;&amp;#041;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#065;&amp;#112;&amp;#112;&amp;#108;&amp;#105;&amp;#099;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#040;&amp;#041;&amp;#046;&amp;#082;&amp;#117;&amp;#110;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#105;&amp;#103;&amp;#110;&amp;#111;&amp;#114;&amp;#101;&amp;#059;&amp;#059;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;When run from an &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; interactive session, this program produces the following output:&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_NMRkpon4Ps0/TOAsC5aVHuI/AAAAAAAAAKI/oGiRc4knhfs/s1600/CompleteGraph.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 380px; height: 400px;" src="http://3.bp.blogspot.com/_NMRkpon4Ps0/TOAsC5aVHuI/AAAAAAAAAKI/oGiRc4knhfs/s400/CompleteGraph.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5539475969948327650" /&gt;&lt;/a&gt;&lt;p&gt;Being able to solve simple problems simply &lt;i&gt;and&lt;/i&gt; scale it up to sophisticated commercial software is why I love &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1309221100684347480?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1309221100684347480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1309221100684347480' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1309221100684347480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1309221100684347480'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/11/visualizing-complete-graph.html' title='Visualizing a complete graph'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_NMRkpon4Ps0/TOAsC5aVHuI/AAAAAAAAAKI/oGiRc4knhfs/s72-c/CompleteGraph.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4691388383874644165</id><published>2010-11-10T21:18:00.001Z</published><updated>2010-11-10T21:19:58.940Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='tcp'/><category scheme='http://www.blogger.com/atom/ns#' term='asynchronous workflows'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrent'/><category scheme='http://www.blogger.com/atom/ns#' term='client'/><title type='text'>Concurrent programming: TCP relay server</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb86"&gt;The F#.NET Journal&lt;/a&gt; just published an article about concurrent programming:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Asynchronous workflows are an incredibly useful feature of the F# programming language in the context of concurrent programming. This article describes a simple concurrent program that provides a relay server that can be instructed to connect to a TCP server and forward messages to it..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb86"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4691388383874644165?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4691388383874644165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4691388383874644165' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4691388383874644165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4691388383874644165'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/11/concurrent-programming-tcp-relay-server.html' title='Concurrent programming: TCP relay server'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3524224546786991438</id><published>2010-11-06T21:03:00.004Z</published><updated>2010-11-06T22:02:10.234Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='the code project'/><category scheme='http://www.blogger.com/atom/ns#' term='extreme optimization'/><title type='text'>F# reaching a wider audience</title><content type='html'>&lt;p&gt;There are now dozens of &lt;a href="http://www.codeproject.com/info/search.aspx?artkw=f%23&amp;amp;sa_ao=False&amp;amp;sa_so=17&amp;amp;sa_as=1,3,6"&gt;F#-related articles at The Code Project&lt;/a&gt; covering a variety of interesting topics.&lt;/p&gt;&lt;p&gt;Some vendors have also started to publish literature describing how their products can be used from &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;. For example, the Extreme Optimization high-performance numerical libraries for .NET now provide &lt;a href="http://www.extremeoptimization.com/QuickStart/ContinuousDistributionsFS.aspx"&gt;examples in F#&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Recent events like Microsoft's &lt;a href="http://player.microsoftpdc.com/"&gt;PDC 2010&lt;/a&gt; including a lecture from Don Syme on &lt;a href="http://player.microsoftpdc.com/Session/04092962-4ed1-42c6-be07-203d42115274"&gt;The Future of F#&lt;/a&gt; and the recent release of the F# compiler and tool stack as open source software have massively boosted the visibility of F# which is great to see, not least because sales of &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;Visual F# 2010 for Technical Computing&lt;/a&gt; just doubled!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-3524224546786991438?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/3524224546786991438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=3524224546786991438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3524224546786991438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3524224546786991438'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/11/f-reaching-wider-audience.html' title='F# reaching a wider audience'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1078674379465104649</id><published>2010-11-06T17:32:00.002Z</published><updated>2010-11-06T17:53:13.738Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='jon harrop'/><category scheme='http://www.blogger.com/atom/ns#' term='don syme'/><category scheme='http://www.blogger.com/atom/ns#' term='phil trelford'/><category scheme='http://www.blogger.com/atom/ns#' term='twitter'/><title type='text'>349 people following Don Syme on Twitter</title><content type='html'>&lt;p&gt;&lt;a href="http://twitter.com/#!/dsyme"&gt;Don Syme&lt;/a&gt; now has 349 followers on Twitter. Doesn't sound like an amazing accomplishment until you learn that Don has never tweeted anything in his life! Apparently he is too busy flying around the world giving awe-inspiring presentations about the F# programming language he created.&lt;/p&gt;&lt;p&gt;According to &lt;a href="http://www.trelford.com/blog/"&gt;Phil Trelford&lt;/a&gt;, &lt;a href="http://twitter.com/#!/search?q=%23fsharp"&gt;Twitter is hot for F#&lt;/a&gt; right now so I couldn't help but get &lt;a href="http://twitter.com/#!/jonharrop"&gt;my own account&lt;/a&gt; and start tweeting!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1078674379465104649?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1078674379465104649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1078674379465104649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1078674379465104649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1078674379465104649'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/11/349-people-following-don-syme-on.html' title='349 people following Don Syme on Twitter'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-8972394111821591261</id><published>2010-10-27T17:17:00.011Z</published><updated>2010-10-27T18:06:36.091Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='don syme'/><category scheme='http://www.blogger.com/atom/ns#' term='interview'/><title type='text'>F# video interviews with Don Syme (parts 1-4)</title><content type='html'>&lt;p&gt;David Gristwood has posted a fascinating four-part series of video interviews with the creator of the F# programming language, Don Syme:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://channel9.msdn.com/Blogs/David+Gristwood/An-Introduction-to-F-with-Don-Syme-1-of-4"&gt;An introduction to F#&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://channel9.msdn.com/Blogs/David+Gristwood/An-F-Tutorial-with-Don-Syme-2-of-4"&gt;An F# tutorial&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://channel9.msdn.com/Blogs/David+Gristwood/F-and-Windows-Azure-with-Don-Syme-3-of-4"&gt;F# and Windows Azure&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://channel9.msdn.com/Blogs/David+Gristwood/F-in-use-at-Microsoft-Research-4-of-4"&gt;F# in use at Microsoft Research&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;In addition to our old F# for Scientists book that Don mentions in the interview, you may also appreciate our new &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;Visual F# 2010 for Technical Computing book&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-8972394111821591261?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/8972394111821591261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=8972394111821591261' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8972394111821591261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8972394111821591261'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/10/introduction-to-f-with-don-syme-part-1.html' title='F# video interviews with Don Syme (parts 1-4)'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4877419973724645126</id><published>2010-10-19T12:31:00.001Z</published><updated>2010-10-19T12:33:07.262Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='purely functional data structures'/><category scheme='http://www.blogger.com/atom/ns#' term='topological sort'/><category scheme='http://www.blogger.com/atom/ns#' term='all-pairs shortest paths'/><category scheme='http://www.blogger.com/atom/ns#' term='graph'/><category scheme='http://www.blogger.com/atom/ns#' term='floyd-warshall algorithm'/><title type='text'>Graph algorithms: topological sort and all-pairs shortest paths</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb85"&gt;The F#.NET Journal&lt;/a&gt; just published an article about graph theory:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Following on from our previous article about depth- and breadth-first searches of graphs, this article examines some more involved algorithms that also have many practical applications. A topological sort of a directed acyclic graph produces the vertices in a sequence where every vertex reachable from another appears after it in the sequence. All-pairs shortest paths finds the shortest path from any vertex to any other vertex..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb85"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4877419973724645126?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4877419973724645126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4877419973724645126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4877419973724645126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4877419973724645126'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/10/graph-algorithms-topological-sort-and.html' title='Graph algorithms: topological sort and all-pairs shortest paths'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1943050116995193492</id><published>2010-10-19T10:41:00.006Z</published><updated>2010-10-19T12:30:30.030Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='tail calls'/><category scheme='http://www.blogger.com/atom/ns#' term='memory leak'/><category scheme='http://www.blogger.com/atom/ns#' term='do'/><category scheme='http://www.blogger.com/atom/ns#' term='return'/><category scheme='http://www.blogger.com/atom/ns#' term='asynchronous workflows'/><category scheme='http://www.blogger.com/atom/ns#' term='tail recursion'/><title type='text'>Memory leaks in asynchronous workflows</title><content type='html'>&lt;p&gt;During the development of a concurrent distributed application for a client, we repeated a common mistake of tail recursing in an asynchronous workflow using the &lt;span class="Apple-style-span"&gt;do!&lt;/span&gt; construct. For example:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&amp;#108;&amp;#101;&amp;#116;&amp;#32;&amp;#97;&amp;#103;&amp;#101;&amp;#110;&amp;#116;&amp;#32;&amp;#101;&amp;#120;&amp;#101;&amp;#99;&amp;#117;&amp;#116;&amp;#101;&amp;#32;&amp;#61;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#110;&amp;#101;&amp;#119;&amp;#32;&amp;#77;&amp;#97;&amp;#105;&amp;#108;&amp;#98;&amp;#111;&amp;#120;&amp;#80;&amp;#114;&amp;#111;&amp;#99;&amp;#101;&amp;#115;&amp;#115;&amp;#111;&amp;#114;&amp;#60;&amp;#95;&amp;#62;&amp;#40;&amp;#102;&amp;#117;&amp;#110;&amp;#32;&amp;#105;&amp;#110;&amp;#98;&amp;#111;&amp;#120;&amp;#32;&amp;#45;&amp;#62;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#108;&amp;#101;&amp;#116;&amp;#32;&amp;#114;&amp;#101;&amp;#99;&amp;#32;&amp;#108;&amp;#111;&amp;#111;&amp;#112;&amp;#40;&amp;#41;&amp;#32;&amp;#61;&amp;#32;&amp;#97;&amp;#115;&amp;#121;&amp;#110;&amp;#99;&amp;#32;&amp;#123;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#108;&amp;#101;&amp;#116;&amp;#33;&amp;#32;&amp;#109;&amp;#115;&amp;#103;&amp;#32;&amp;#61;&amp;#32;&amp;#105;&amp;#110;&amp;#98;&amp;#111;&amp;#120;&amp;#46;&amp;#82;&amp;#101;&amp;#99;&amp;#101;&amp;#105;&amp;#118;&amp;#101;&amp;#40;&amp;#41;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#101;&amp;#120;&amp;#101;&amp;#99;&amp;#117;&amp;#116;&amp;#101;&amp;#32;&amp;#109;&amp;#115;&amp;#103;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#100;&amp;#111;&amp;#33;&amp;#32;&amp;#108;&amp;#111;&amp;#111;&amp;#112;&amp;#40;&amp;#41;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#125;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#108;&amp;#111;&amp;#111;&amp;#112;&amp;#40;&amp;#41;&amp;#41;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This is problematic because using &lt;span class="Apple-style-span"&gt;do!&lt;/span&gt; in this context leaks stack frames every time the workflows recurses (which is typically every time a message is processed). Moreover, F# uses a trampoline to implement this stack so the consequence is not a stack overflow but, rather, a gradual memory leak.&lt;/p&gt;&lt;p&gt;So if your concurrent applications appear to be leaking a few kilobytes for each message they process, search for instances of &lt;span class="Apple-style-span"&gt;do!&lt;/span&gt; in tail position and replace them with &lt;span class="Apple-style-span"&gt;return!&lt;/span&gt; like this:&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&amp;#108;&amp;#101;&amp;#116;&amp;#32;&amp;#97;&amp;#103;&amp;#101;&amp;#110;&amp;#116;&amp;#32;&amp;#101;&amp;#120;&amp;#101;&amp;#99;&amp;#117;&amp;#116;&amp;#101;&amp;#32;&amp;#61;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#110;&amp;#101;&amp;#119;&amp;#32;&amp;#77;&amp;#97;&amp;#105;&amp;#108;&amp;#98;&amp;#111;&amp;#120;&amp;#80;&amp;#114;&amp;#111;&amp;#99;&amp;#101;&amp;#115;&amp;#115;&amp;#111;&amp;#114;&amp;#60;&amp;#95;&amp;#62;&amp;#40;&amp;#102;&amp;#117;&amp;#110;&amp;#32;&amp;#105;&amp;#110;&amp;#98;&amp;#111;&amp;#120;&amp;#32;&amp;#45;&amp;#62;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#108;&amp;#101;&amp;#116;&amp;#32;&amp;#114;&amp;#101;&amp;#99;&amp;#32;&amp;#108;&amp;#111;&amp;#111;&amp;#112;&amp;#40;&amp;#41;&amp;#32;&amp;#61;&amp;#32;&amp;#97;&amp;#115;&amp;#121;&amp;#110;&amp;#99;&amp;#32;&amp;#123;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#108;&amp;#101;&amp;#116;&amp;#33;&amp;#32;&amp;#109;&amp;#115;&amp;#103;&amp;#32;&amp;#61;&amp;#32;&amp;#105;&amp;#110;&amp;#98;&amp;#111;&amp;#120;&amp;#46;&amp;#82;&amp;#101;&amp;#99;&amp;#101;&amp;#105;&amp;#118;&amp;#101;&amp;#40;&amp;#41;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#101;&amp;#120;&amp;#101;&amp;#99;&amp;#117;&amp;#116;&amp;#101;&amp;#32;&amp;#109;&amp;#115;&amp;#103;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#33;&amp;#32;&amp;#108;&amp;#111;&amp;#111;&amp;#112;&amp;#40;&amp;#41;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#125;&amp;#10;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#32;&amp;#108;&amp;#111;&amp;#111;&amp;#112;&amp;#40;&amp;#41;&amp;#41;&lt;/pre&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1943050116995193492?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1943050116995193492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1943050116995193492' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1943050116995193492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1943050116995193492'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/10/memory-leaks-in-asynchronous-workflows.html' title='Memory leaks in asynchronous workflows'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4413737419578968619</id><published>2010-10-03T22:54:00.002Z</published><updated>2010-10-03T23:00:07.716Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='depth-first search'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><category scheme='http://www.blogger.com/atom/ns#' term='graph'/><category scheme='http://www.blogger.com/atom/ns#' term='breadth-first search'/><title type='text'>Representing and searching graphs</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb84"&gt;The F#.NET Journal&lt;/a&gt; just published an article about graph theory:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Graph theory is an important branch of mathematics in the context of programming because important problems can often be phrased in terms of graphs. This articles takes a look at the representation of graphs in F# and introduces the basic operations of depth-first and breadth-first searches..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb84"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4413737419578968619?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4413737419578968619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4413737419578968619' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4413737419578968619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4413737419578968619'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/10/representing-and-searching-graphs.html' title='Representing and searching graphs'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-8816129333444199729</id><published>2010-09-15T23:45:00.001Z</published><updated>2010-09-15T23:47:21.717Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='tcp'/><category scheme='http://www.blogger.com/atom/ns#' term='reliability'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='distributed'/><category scheme='http://www.blogger.com/atom/ns#' term='message passing'/><title type='text'>Distributed message passing</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb83"&gt;The F#.NET Journal&lt;/a&gt; just published an article about message passing:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"The F# programming language makes message passing easy thanks to union types and pattern matching. Asynchronous workflows leverage this to provide Erlang-style agent-based programming. However, Erlang programs can be distributed across multiple machines transparently but asynchronous workflows work only in-process. This article examines the use of TCP sockets and serialization to communicate values between machines in order to use distributed message passing..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb83"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-8816129333444199729?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/8816129333444199729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=8816129333444199729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8816129333444199729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8816129333444199729'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/09/distributed-message-passing.html' title='Distributed message passing'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-615228015982631729</id><published>2010-09-15T23:44:00.004Z</published><updated>2010-09-15T23:45:25.543Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='lecture'/><category scheme='http://www.blogger.com/atom/ns#' term='new england'/><title type='text'>F# lectures from the New England F# user group</title><content type='html'>&lt;p&gt;The New England F# user group in the United States have put up a great list of video lectures and associated slides &lt;a href="http://www.fsug.org/PreviousSpeakers/tabid/66/Default.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-615228015982631729?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/615228015982631729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=615228015982631729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/615228015982631729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/615228015982631729'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/09/f-lectures-from-new-england-f-user.html' title='F# lectures from the New England F# user group'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-51030470012070481</id><published>2010-09-12T12:32:00.002Z</published><updated>2010-09-12T12:36:42.731Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='predator-prey dynamics'/><category scheme='http://www.blogger.com/atom/ns#' term='Lotka-Volterra equations'/><category scheme='http://www.blogger.com/atom/ns#' term='biology'/><category scheme='http://www.blogger.com/atom/ns#' term='data visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='windows forms'/><category scheme='http://www.blogger.com/atom/ns#' term='numerical integration'/><category scheme='http://www.blogger.com/atom/ns#' term='windows presentation foundation'/><category scheme='http://www.blogger.com/atom/ns#' term='differential equation'/><title type='text'>Simulating predator-prey relationships</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb82"&gt;The F#.NET Journal&lt;/a&gt; just published an article about biological simulation:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"This article describes the design and implementation of a Windows Presentation Foundation application that simulates and visualizes the evolution of the predator and prey populations over time. This involves the numerical integration of a differential equation and the resulting trajectory is visualized as a parametric plot using the new charting and graphing functionality provided with .NET 4. The parameters of the simulation can be adjusted by the user and the graph is updated in real time..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb82"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-51030470012070481?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/51030470012070481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=51030470012070481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/51030470012070481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/51030470012070481'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/09/simulating-predator-prey-relationships.html' title='Simulating predator-prey relationships'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-969558020163125081</id><published>2010-09-01T22:40:00.003Z</published><updated>2010-09-01T22:44:45.129Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='component design guidelines'/><category scheme='http://www.blogger.com/atom/ns#' term='recommendations'/><category scheme='http://www.blogger.com/atom/ns#' term='style guide'/><title type='text'>Draft F# Component Design Guidelines</title><content type='html'>&lt;p&gt;The F# team at Microsoft have kindly released a draft of their &lt;a href="http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/fsharp-component-design-guidelines.pdf"&gt;F# Component Design Guidelines&lt;/a&gt;. This document provides a wealth of advice for professional F# developers covering both F#-facing code and code exposed to other .NET languages.&lt;/p&gt;&lt;p&gt;Recommended reading for all F# programmers!&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-969558020163125081?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/969558020163125081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=969558020163125081' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/969558020163125081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/969558020163125081'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/09/draft-f-component-design-guidelines.html' title='Draft F# Component Design Guidelines'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-8768174303963502883</id><published>2010-08-29T23:56:00.002Z</published><updated>2010-08-29T23:59:48.251Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='typeful programming'/><category scheme='http://www.blogger.com/atom/ns#' term='calculator'/><title type='text'>Calculator</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb81"&gt;The F#.NET Journal&lt;/a&gt; just published an article about typeful programming:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"The pedagogical calculator sample demonstrates how a program can evaluate mathematical expressions originating from the user interface of a calculator. This article describes the design and implementation of a calculator application that uses Windows Presentation Foundation to provide a graphical user interface similar to that of a traditional calculator. In particular, every effort is made to leverage static checking in order to catch as many bugs at compile time as possible. This includes not only sophisticated union types to represent the state of the state machine but also exhaustiveness and redundancy checking of the advanced pattern matches that result as well as their factoring to reduce code size..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb81"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-8768174303963502883?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/8768174303963502883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=8768174303963502883' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8768174303963502883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8768174303963502883'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/08/calculator.html' title='Calculator'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4510849331035736981</id><published>2010-08-18T21:37:00.003Z</published><updated>2010-08-18T21:48:23.999Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='don syme'/><category scheme='http://www.blogger.com/atom/ns#' term='lecture'/><title type='text'>Don Syme lecturing at the F#unctional Londoners Meetup</title><content type='html'>&lt;p&gt;Creator of the F# programming language and all-around great guy Don Syme will be giving a lecture at the &lt;a href="http://www.meetup.com/FSharpLondon/calendar/14453225/"&gt;F#unctional Londoners Meetup&lt;/a&gt;, &lt;a href="http://skillsmatter.com/event/open-source-dot-net/don-syme-on-f/rl-311"&gt;Skills Matter eXchange&lt;/a&gt;, on 9th September 2010.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4510849331035736981?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4510849331035736981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4510849331035736981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4510849331035736981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4510849331035736981'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/08/don-syme-lecturing-at-functional.html' title='Don Syme lecturing at the F#unctional Londoners Meetup'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-2524998001141863518</id><published>2010-08-07T01:00:00.002Z</published><updated>2010-08-07T01:08:43.628Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='qr decomposition'/><category scheme='http://www.blogger.com/atom/ns#' term='jon harrop'/><category scheme='http://www.blogger.com/atom/ns#' term='slides'/><category scheme='http://www.blogger.com/atom/ns#' term='lecture'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><category scheme='http://www.blogger.com/atom/ns#' term='purely functional'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='impure'/><title type='text'>Jon Harrop lectures on Parallel QR Decomposition</title><content type='html'>&lt;p&gt;The Skills Matter eXchange have kindly uploaded the &lt;a href="http://skillsmatter.com/podcast/agile-testing/jon-harrop-qr-decomposition"&gt;video&lt;/a&gt; of my recent lecture as well as the accompanying &lt;a href="http://www.slideshare.net/skillsmatter/parallel-qr-decomposition"&gt;slides&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The core of this lecture is an explanation of why &lt;a href="http://flyingfrogblog.blogspot.com/2010/06/regular-shape-polymorphic-parallel.html"&gt;purely functional code that looks embarrassingly parallel often does not scale&lt;/a&gt; and how scalability can be achieved through the use of mutation.&lt;/p&gt;&lt;p&gt;The example used is QR decomposition where pure code achieves less than 2× speedup on 8 cores but impure F# code achieves over 7× speedup and beats the reference implementation of BLAS and LAPACK with 99% less code. However, the lessons learned are not specific to this algorithm or even to numerical methods in general but &lt;em&gt;apply to all software running on .NET&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;For vastly more information on this subject, stay tuned for our forthcoming Multicore .NET book.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-2524998001141863518?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/2524998001141863518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=2524998001141863518' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/2524998001141863518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/2524998001141863518'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/08/jon-harrop-lectures-on-parallel-qr.html' title='Jon Harrop lectures on Parallel QR Decomposition'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4813598531585027661</id><published>2010-08-04T06:18:00.001Z</published><updated>2010-08-04T06:20:13.649Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='priority queue'/><category scheme='http://www.blogger.com/atom/ns#' term='data structure'/><category scheme='http://www.blogger.com/atom/ns#' term='heap'/><title type='text'>Data structures: heaps</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb80"&gt;The F#.NET Journal&lt;/a&gt; just published an article about data structures:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"A min-heap is a tree-based data structure that satisfies the constraint that the children at any given branch are always larger than their parent and, consequently, the minimum element is at the root. Heaps are most notable as an efficient way to implement priority queues which, in turn, underpin a variety of algorithms including some seen in previous F#.NET Journal articles. This article examines skew heaps, leftist heaps, pairing heaps and splay heaps..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb80"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4813598531585027661?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4813598531585027661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4813598531585027661' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4813598531585027661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4813598531585027661'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/08/data-structures-heaps.html' title='Data structures: heaps'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-9012056396376358829</id><published>2010-07-27T22:43:00.000Z</published><updated>2010-07-27T22:44:38.986Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='london'/><category scheme='http://www.blogger.com/atom/ns#' term='lecture'/><category scheme='http://www.blogger.com/atom/ns#' term='f# meetup'/><title type='text'>F#unctional Londoners meetup lecture (28th July 2010)</title><content type='html'>&lt;p&gt;Zach Bray of &lt;a href="http://www.trayport.com/"&gt;Trayport&lt;/a&gt; and Jon Harrop of &lt;a href="http://www.ffconsultancy.com/?fsb"&gt;Flying Frog Consultancy Ltd.&lt;/a&gt; will be presenting lectures at &lt;a href="http://skillsmatter.com/"&gt;Skills Matter eXchange&lt;/a&gt; London (UK) at 6:30pm on Wednesday 28th July 2010.&lt;/p&gt;&lt;p&gt;Many thanks to Carolyn Miller and Phil Trelford for organizing &lt;a href="http://www.meetup.com/FSharpLondon/"&gt;F#unctional Londoners Meetup Group&lt;/a&gt;, an excellent series of events!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-9012056396376358829?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/9012056396376358829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=9012056396376358829' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/9012056396376358829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/9012056396376358829'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/07/functional-londoners-meetup-lecture.html' title='F#unctional Londoners meetup lecture (28th July 2010)'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-637080624320452243</id><published>2010-07-17T02:33:00.002Z</published><updated>2010-07-18T12:28:48.211Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='image'/><category scheme='http://www.blogger.com/atom/ns#' term='data visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='windows forms'/><category scheme='http://www.blogger.com/atom/ns#' term='histogram equalization'/><category scheme='http://www.blogger.com/atom/ns#' term='windows presentation foundation'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><category scheme='http://www.blogger.com/atom/ns#' term='.net 4'/><title type='text'>Histogram equalization</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb79"&gt;The F#.NET Journal&lt;/a&gt; just published an article about image processing and the new charting functionality in .NET 4:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Over- and under-exposed images have their intensity distributions skewed to the high or low end of the range. Histogram equilization is one technique to combat this effect digitally by spreading out the distribution of intensities in an image via the intensity histogram. This article describes a program for image enhancement using histogram equalization with an interactive WPF-based GUI using the new charting functionality in .NET 4 to visualize the intensity histograms in real time..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb79"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-637080624320452243?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/637080624320452243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=637080624320452243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/637080624320452243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/637080624320452243'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/07/histogram-equalization.html' title='Histogram equalization'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-7312467154076831021</id><published>2010-07-12T00:45:00.005Z</published><updated>2010-07-12T12:03:46.072Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='pricer'/><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='american options'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='f#'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematica'/><title type='text'>F# vs Mathematica: an even faster pricer for American options</title><content type='html'>&lt;p&gt;The previous post described a performance-critical pricer for American options. Upon reflection, the optimized Mathematica code had introduced many redundant computations in order to vectorize the code because vectorization offers considerable performance improvements in such a slow language. Our simple translation of the optimized Mathematica had not taken advantage of this by removing these redundant computations.&lt;/p&gt;&lt;p&gt;This new optimized and parallelized F# solution is now a whopping &lt;i&gt;960&amp;#215; faster than the original Mathematica&lt;/i&gt; code from Sal Mangano's Mathematica Cookbook:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#097;&amp;#109;&amp;#101;&amp;#114;&amp;#105;&amp;#099;&amp;#097;&amp;#110;&amp;#080;&amp;#117;&amp;#116;&amp;#032;&amp;#107;&amp;#107;&amp;#032;&amp;#114;&amp;#032;&amp;#115;&amp;#105;&amp;#103;&amp;#109;&amp;#097;&amp;#032;&amp;#116;&amp;#116;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#032;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#120;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#105;&amp;#107;&amp;#107;&amp;#044;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#110;&amp;#110;&amp;#044;&amp;#032;&amp;#109;&amp;#109;&amp;#044;&amp;#032;&amp;#116;&amp;#116;&amp;#048;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#047;&amp;#032;&amp;#107;&amp;#107;&amp;#044;&amp;#032;&amp;#053;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#049;&amp;#048;&amp;#048;&amp;#048;&amp;#044;&amp;#032;&amp;#050;&amp;#048;&amp;#048;&amp;#044;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#032;&amp;#115;&amp;#105;&amp;#103;&amp;#109;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#116;&amp;#116;&amp;#032;&amp;#047;&amp;#032;&amp;#050;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#107;&amp;#044;&amp;#032;&amp;#104;&amp;#044;&amp;#032;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#050;&amp;#046;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#114;&amp;#032;&amp;#047;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#032;&amp;#115;&amp;#105;&amp;#103;&amp;#109;&amp;#097;&amp;#044;&amp;#032;&amp;#050;&amp;#046;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#097;&amp;#032;&amp;#047;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#110;&amp;#110;&amp;#044;&amp;#032;&amp;#116;&amp;#116;&amp;#048;&amp;#032;&amp;#047;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#109;&amp;#109;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#044;&amp;#032;&amp;#107;&amp;#048;&amp;#044;&amp;#032;&amp;#107;&amp;#049;&amp;#032;&amp;#061;&amp;#032;&amp;#115;&amp;#032;&amp;#047;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#032;&amp;#104;&amp;#044;&amp;#032;&amp;#048;&amp;#046;&amp;#053;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#107;&amp;#032;&amp;#045;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#041;&amp;#044;&amp;#032;&amp;#048;&amp;#046;&amp;#050;&amp;#053;&amp;#032;&amp;#042;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#032;&amp;#040;&amp;#107;&amp;#032;&amp;#043;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#120;&amp;#032;&amp;#105;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#105;&amp;#032;&amp;#042;&amp;#032;&amp;#104;&amp;#032;&amp;#045;&amp;#032;&amp;#097;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#101;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#032;&amp;#040;&amp;#110;&amp;#110;&amp;#043;&amp;#049;&amp;#041;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#040;&amp;#120;&amp;#032;&amp;#105;&amp;#041;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#101;&amp;#107;&amp;#048;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#032;&amp;#040;&amp;#110;&amp;#110;&amp;#043;&amp;#049;&amp;#041;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#040;&amp;#107;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#120;&amp;#032;&amp;#105;&amp;#041;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#112;&amp;#112;&amp;#048;&amp;#032;&amp;#105;&amp;#032;&amp;#061;&amp;#032;&amp;#109;&amp;#097;&amp;#120;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#032;&amp;#040;&amp;#107;&amp;#107;&amp;#032;&amp;#045;&amp;#032;&amp;#107;&amp;#107;&amp;#032;&amp;#042;&amp;#032;&amp;#101;&amp;#120;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#101;&amp;#107;&amp;#048;&amp;#097;&amp;#044;&amp;#032;&amp;#107;&amp;#049;&amp;#115;&amp;#044;&amp;#032;&amp;#097;&amp;#039;&amp;#032;&amp;#061;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#040;&amp;#107;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#097;&amp;#041;&amp;#044;&amp;#032;&amp;#107;&amp;#049;&amp;#032;&amp;#042;&amp;#032;&amp;#115;&amp;#044;&amp;#032;&amp;#050;&amp;#046;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#032;&amp;#045;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#117;&amp;#032;&amp;#061;&amp;#032;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#032;&amp;#040;&amp;#110;&amp;#110;&amp;#043;&amp;#049;&amp;#041;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#101;&amp;#107;&amp;#048;&amp;#120;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#042;&amp;#032;&amp;#112;&amp;#112;&amp;#048;&amp;#032;&amp;#105;&amp;#032;&amp;#042;&amp;#032;&amp;#105;&amp;#107;&amp;#107;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#117;&amp;#039;&amp;#032;&amp;#061;&amp;#032;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#032;&amp;#040;&amp;#110;&amp;#110;&amp;#043;&amp;#049;&amp;#041;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#106;&amp;#061;&amp;#048;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#109;&amp;#109;&amp;#045;&amp;#049;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#101;&amp;#107;&amp;#049;&amp;#115;&amp;#106;&amp;#032;&amp;#061;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#040;&amp;#107;&amp;#049;&amp;#115;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#106;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#107;&amp;#050;&amp;#032;&amp;#061;&amp;#032;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#105;&amp;#107;&amp;#107;&amp;#032;&amp;#042;&amp;#032;&amp;#101;&amp;#107;&amp;#048;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#101;&amp;#107;&amp;#049;&amp;#115;&amp;#106;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#117;&amp;#039;&amp;#046;&amp;#091;&amp;#048;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#117;&amp;#046;&amp;#091;&amp;#049;&amp;#093;&amp;#032;&amp;#045;&amp;#032;&amp;#097;&amp;#039;&amp;#032;&amp;#042;&amp;#032;&amp;#117;&amp;#046;&amp;#091;&amp;#048;&amp;#093;&amp;#032;&amp;#043;&amp;#032;&amp;#107;&amp;#050;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#109;&amp;#097;&amp;#120;&amp;#032;&amp;#040;&amp;#101;&amp;#107;&amp;#048;&amp;#120;&amp;#046;&amp;#091;&amp;#048;&amp;#093;&amp;#032;&amp;#042;&amp;#032;&amp;#101;&amp;#107;&amp;#049;&amp;#115;&amp;#106;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#045;&amp;#032;&amp;#101;&amp;#120;&amp;#046;&amp;#091;&amp;#048;&amp;#093;&amp;#041;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#105;&amp;#110;&amp;#108;&amp;#105;&amp;#110;&amp;#101;&amp;#032;&amp;#103;&amp;#101;&amp;#116;&amp;#032;&amp;#040;&amp;#117;&amp;#058;&amp;#032;&amp;#095;&amp;#032;&amp;#091;&amp;#093;&amp;#041;&amp;#032;&amp;#105;&amp;#032;&amp;#109;&amp;#032;&amp;#061;&amp;#032;&amp;#109;&amp;#097;&amp;#120;&amp;#032;&amp;#109;&amp;#032;&amp;#040;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#117;&amp;#046;&amp;#091;&amp;#105;&amp;#043;&amp;#049;&amp;#093;&amp;#032;&amp;#043;&amp;#032;&amp;#117;&amp;#046;&amp;#091;&amp;#105;&amp;#045;&amp;#049;&amp;#093;&amp;#041;&amp;#032;&amp;#045;&amp;#032;&amp;#097;&amp;#039;&amp;#032;&amp;#042;&amp;#032;&amp;#117;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#061;&amp;#049;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#110;&amp;#110;&amp;#047;&amp;#050;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#117;&amp;#039;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#103;&amp;#101;&amp;#116;&amp;#032;&amp;#117;&amp;#032;&amp;#105;&amp;#032;&amp;#040;&amp;#101;&amp;#107;&amp;#048;&amp;#120;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#042;&amp;#032;&amp;#101;&amp;#107;&amp;#049;&amp;#115;&amp;#106;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#045;&amp;#032;&amp;#101;&amp;#120;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#041;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#061;&amp;#110;&amp;#110;&amp;#047;&amp;#050;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#110;&amp;#110;&amp;#045;&amp;#049;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#117;&amp;#039;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#103;&amp;#101;&amp;#116;&amp;#032;&amp;#117;&amp;#032;&amp;#105;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#117;&amp;#039;&amp;#039;&amp;#032;&amp;#061;&amp;#032;&amp;#117;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#117;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#117;&amp;#039;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#117;&amp;#039;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#117;&amp;#039;&amp;#039;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#107;&amp;#051;&amp;#032;&amp;#061;&amp;#032;&amp;#107;&amp;#107;&amp;#032;&amp;#042;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#040;&amp;#045;&amp;#107;&amp;#049;&amp;#032;&amp;#042;&amp;#032;&amp;#116;&amp;#116;&amp;#048;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#109;&amp;#097;&amp;#112;&amp;#105;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#117;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#107;&amp;#107;&amp;#032;&amp;#042;&amp;#032;&amp;#101;&amp;#120;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#044;&amp;#032;&amp;#107;&amp;#051;&amp;#032;&amp;#047;&amp;#032;&amp;#101;&amp;#107;&amp;#048;&amp;#120;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#042;&amp;#032;&amp;#117;&amp;#041;&amp;#032;&amp;#117;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#080;&amp;#097;&amp;#114;&amp;#097;&amp;#108;&amp;#108;&amp;#101;&amp;#108;&amp;#046;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#032;&amp;#049;&amp;#048;&amp;#048;&amp;#048;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#097;&amp;#109;&amp;#101;&amp;#114;&amp;#105;&amp;#099;&amp;#097;&amp;#110;&amp;#080;&amp;#117;&amp;#116;&amp;#032;&amp;#040;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#040;&amp;#105;&amp;#043;&amp;#049;&amp;#041;&amp;#041;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#053;&amp;#032;&amp;#048;&amp;#046;&amp;#049;&amp;#052;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#041;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;Note that the hardcoded constants nn and mm have been increased, sigma has been decreased to keep alpha just below 0.5 and strikes from 1 to 1,000 are computed in order to make the F# code take a significant fraction of the second (when the Mathematica takes several minutes!).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-7312467154076831021?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/7312467154076831021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=7312467154076831021' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7312467154076831021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7312467154076831021'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/07/f-vs-mathematica-even-faster-pricer-for.html' title='F# vs Mathematica: an even faster pricer for American options'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-5943809894802163284</id><published>2010-07-09T14:09:00.006Z</published><updated>2010-07-12T01:37:13.719Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='pricer'/><category scheme='http://www.blogger.com/atom/ns#' term='american options'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematica'/><category scheme='http://www.blogger.com/atom/ns#' term='high performance'/><title type='text'>F# vs Mathematica: fast pricer for American options</title><content type='html'>&lt;p&gt;&lt;b&gt;UPDATE:&lt;/b&gt; A new F# solution that is 960&amp;#215; faster than the original Mathematica is available &lt;a href="http://fsharpnews.blogspot.com/2010/07/f-vs-mathematica-even-faster-pricer-for.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Another example from Sal Mangano's Mathematica Cookbook, this time taken from &lt;a href="http://216.80.120.13:8080/webMathematica/LC/explicit.jsp"&gt;Andreas Lauschke's example&lt;/a&gt;, is a "fast" pricer for American options. The relevant section of the book stresses the importance of performance in this context and the Mathematica code presented was heavily optimized by experts. Here is their code:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_NMRkpon4Ps0/TDczHmDW_YI/AAAAAAAAAIE/SXUrWIEHlhI/s1600/AmericanPutMMA.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 354px; height: 400px;" src="http://2.bp.blogspot.com/_NMRkpon4Ps0/TDczHmDW_YI/AAAAAAAAAIE/SXUrWIEHlhI/s400/AmericanPutMMA.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5491914476168347010" /&gt;&lt;/a&gt;&lt;p&gt;Specifically, this function has been optimized by pushing computational burden from the general-purpose term rewriting language of Mathematica onto the optimized C routines in its standard library and then compiling the high-level code into lower-level bytecode that is interpreted more efficiently, giving another 5&amp;#215; speedup.&lt;/p&gt;&lt;p&gt;However, this general approach to the optimization of Mathematica code has the unfortunate side effect of "foresting": introducing unnecessary intermediate data structures because built-in operations over them are faster than writing a direct solution in such a slow language. Consequently, a direct solution in a compiled language will usually be orders of magnitude faster. In this case, we found that the following translation to &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; is 64&amp;#215; faster than Sal's original Mathematica benchmark:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#097;&amp;#109;&amp;#101;&amp;#114;&amp;#105;&amp;#099;&amp;#097;&amp;#110;&amp;#080;&amp;#117;&amp;#116;&amp;#032;&amp;#107;&amp;#107;&amp;#032;&amp;#114;&amp;#032;&amp;#115;&amp;#105;&amp;#103;&amp;#109;&amp;#097;&amp;#032;&amp;#116;&amp;#116;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#032;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#120;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#110;&amp;#110;&amp;#044;&amp;#032;&amp;#109;&amp;#109;&amp;#044;&amp;#032;&amp;#116;&amp;#116;&amp;#048;&amp;#032;&amp;#061;&amp;#032;&amp;#053;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#049;&amp;#048;&amp;#048;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#050;&amp;#048;&amp;#044;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#032;&amp;#115;&amp;#105;&amp;#103;&amp;#109;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#116;&amp;#116;&amp;#032;&amp;#047;&amp;#032;&amp;#050;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#107;&amp;#044;&amp;#032;&amp;#104;&amp;#044;&amp;#032;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#050;&amp;#046;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#114;&amp;#032;&amp;#047;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#032;&amp;#115;&amp;#105;&amp;#103;&amp;#109;&amp;#097;&amp;#044;&amp;#032;&amp;#050;&amp;#046;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#097;&amp;#032;&amp;#047;&amp;#032;&amp;#110;&amp;#110;&amp;#044;&amp;#032;&amp;#116;&amp;#116;&amp;#048;&amp;#032;&amp;#047;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#109;&amp;#109;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#044;&amp;#032;&amp;#120;&amp;#110;&amp;#032;&amp;#061;&amp;#032;&amp;#115;&amp;#032;&amp;#047;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#032;&amp;#104;&amp;#044;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#040;&amp;#050;&amp;#046;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#097;&amp;#047;&amp;#104;&amp;#032;&amp;#043;&amp;#032;&amp;#048;&amp;#046;&amp;#053;&amp;#041;&amp;#032;&amp;#043;&amp;#032;&amp;#049;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#120;&amp;#032;&amp;#105;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#105;&amp;#032;&amp;#042;&amp;#032;&amp;#104;&amp;#032;&amp;#045;&amp;#032;&amp;#097;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#115;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#032;&amp;#120;&amp;#110;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#107;&amp;#107;&amp;#032;&amp;#042;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#040;&amp;#120;&amp;#032;&amp;#105;&amp;#041;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#107;&amp;#048;&amp;#044;&amp;#032;&amp;#107;&amp;#049;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#046;&amp;#053;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#107;&amp;#032;&amp;#045;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#041;&amp;#044;&amp;#032;&amp;#048;&amp;#046;&amp;#050;&amp;#053;&amp;#032;&amp;#042;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#032;&amp;#040;&amp;#107;&amp;#032;&amp;#043;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#107;&amp;#049;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#107;&amp;#049;&amp;#032;&amp;#042;&amp;#032;&amp;#115;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#112;&amp;#112;&amp;#048;&amp;#032;&amp;#105;&amp;#032;&amp;#061;&amp;#032;&amp;#109;&amp;#097;&amp;#120;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#032;&amp;#040;&amp;#107;&amp;#107;&amp;#032;&amp;#045;&amp;#032;&amp;#115;&amp;#115;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#101;&amp;#099;&amp;#032;&amp;#114;&amp;#117;&amp;#110;&amp;#032;&amp;#040;&amp;#117;&amp;#058;&amp;#032;&amp;#095;&amp;#032;&amp;#091;&amp;#093;&amp;#041;&amp;#032;&amp;#040;&amp;#117;&amp;#039;&amp;#058;&amp;#032;&amp;#095;&amp;#032;&amp;#091;&amp;#093;&amp;#041;&amp;#032;&amp;#106;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#106;&amp;#061;&amp;#109;&amp;#109;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#117;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#032;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#102;&amp;#032;&amp;#105;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#120;&amp;#105;&amp;#032;&amp;#061;&amp;#032;&amp;#045;&amp;#097;&amp;#032;&amp;#043;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#105;&amp;#032;&amp;#042;&amp;#032;&amp;#104;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#120;&amp;#105;&amp;#032;&amp;#062;&amp;#061;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#040;&amp;#107;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#120;&amp;#105;&amp;#032;&amp;#043;&amp;#032;&amp;#107;&amp;#049;&amp;#115;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#106;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#045;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#032;&amp;#120;&amp;#105;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#117;&amp;#039;&amp;#046;&amp;#091;&amp;#048;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#117;&amp;#046;&amp;#091;&amp;#049;&amp;#093;&amp;#032;&amp;#045;&amp;#032;&amp;#040;&amp;#050;&amp;#046;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#032;&amp;#045;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#117;&amp;#046;&amp;#091;&amp;#048;&amp;#093;&amp;#032;&amp;#043;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#032;&amp;#047;&amp;#032;&amp;#107;&amp;#107;&amp;#032;&amp;#042;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#040;&amp;#107;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#097;&amp;#032;&amp;#043;&amp;#032;&amp;#107;&amp;#049;&amp;#115;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#106;&amp;#041;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#109;&amp;#097;&amp;#120;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#048;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#061;&amp;#049;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#117;&amp;#046;&amp;#076;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#045;&amp;#050;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#117;&amp;#039;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#117;&amp;#046;&amp;#091;&amp;#105;&amp;#043;&amp;#049;&amp;#093;&amp;#032;&amp;#043;&amp;#032;&amp;#117;&amp;#046;&amp;#091;&amp;#105;&amp;#045;&amp;#049;&amp;#093;&amp;#041;&amp;#032;&amp;#045;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#040;&amp;#050;&amp;#046;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#097;&amp;#108;&amp;#112;&amp;#104;&amp;#097;&amp;#032;&amp;#045;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#117;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#109;&amp;#097;&amp;#120;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#105;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#114;&amp;#117;&amp;#110;&amp;#032;&amp;#117;&amp;#039;&amp;#032;&amp;#117;&amp;#032;&amp;#040;&amp;#106;&amp;#043;&amp;#049;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#117;&amp;#032;&amp;#105;&amp;#032;&amp;#061;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#040;&amp;#107;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#120;&amp;#032;&amp;#105;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#112;&amp;#112;&amp;#048;&amp;#032;&amp;#105;&amp;#032;&amp;#047;&amp;#032;&amp;#107;&amp;#107;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#117;&amp;#032;&amp;#061;&amp;#032;&amp;#114;&amp;#117;&amp;#110;&amp;#032;&amp;#040;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#032;&amp;#120;&amp;#110;&amp;#032;&amp;#117;&amp;#041;&amp;#032;&amp;#040;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#032;&amp;#120;&amp;#110;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#041;&amp;#032;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#115;&amp;#115;&amp;#044;&amp;#032;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#109;&amp;#097;&amp;#112;&amp;#105;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#117;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#107;&amp;#107;&amp;#032;&amp;#042;&amp;#032;&amp;#101;&amp;#120;&amp;#112;&amp;#040;&amp;#045;&amp;#107;&amp;#049;&amp;#032;&amp;#042;&amp;#032;&amp;#116;&amp;#116;&amp;#048;&amp;#032;&amp;#045;&amp;#032;&amp;#107;&amp;#048;&amp;#032;&amp;#042;&amp;#032;&amp;#120;&amp;#032;&amp;#105;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#117;&amp;#041;&amp;#032;&amp;#117;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#080;&amp;#097;&amp;#114;&amp;#097;&amp;#108;&amp;#108;&amp;#101;&amp;#108;&amp;#046;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#032;&amp;#049;&amp;#048;&amp;#048;&amp;#048;&amp;#048;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#115;&amp;#116;&amp;#114;&amp;#105;&amp;#107;&amp;#101;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#115;&amp;#115;&amp;#044;&amp;#032;&amp;#112;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#097;&amp;#109;&amp;#101;&amp;#114;&amp;#105;&amp;#099;&amp;#097;&amp;#110;&amp;#080;&amp;#117;&amp;#116;&amp;#032;&amp;#040;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#040;&amp;#115;&amp;#116;&amp;#114;&amp;#105;&amp;#107;&amp;#101;&amp;#043;&amp;#049;&amp;#041;&amp;#041;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#053;&amp;#032;&amp;#048;&amp;#046;&amp;#052;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#122;&amp;#105;&amp;#112;&amp;#032;&amp;#040;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#116;&amp;#097;&amp;#107;&amp;#101;&amp;#032;&amp;#054;&amp;#048;&amp;#032;&amp;#115;&amp;#115;&amp;#041;&amp;#032;&amp;#040;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#116;&amp;#097;&amp;#107;&amp;#101;&amp;#032;&amp;#054;&amp;#048;&amp;#032;&amp;#112;&amp;#115;&amp;#041;&amp;#041;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;The superior performance of the &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; solution comes from two main benefits:&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;The &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; program is compiled all the way down to machine code before being executed whereas the Mathematica code is interpreted. The intermediate data structures are then replaced by simple function calls. This alone makes the &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; solution over 10&amp;#215; faster than the original Mathematica.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; inherits the benefits of a highly-optimized multicore-capable run-time from the .NET platform. This allows us to use fine-grained parallelism to improve performance even further for another 6.1&amp;#215; speedup on this 8-core machine.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-5943809894802163284?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/5943809894802163284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=5943809894802163284' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5943809894802163284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5943809894802163284'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/07/f-vs-mathematica-fast-pricer-for.html' title='F# vs Mathematica: fast pricer for American options'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NMRkpon4Ps0/TDczHmDW_YI/AAAAAAAAAIE/SXUrWIEHlhI/s72-c/AmericanPutMMA.png' height='72' width='72'/><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-192728582714434286</id><published>2010-07-08T00:10:00.006Z</published><updated>2010-07-09T04:26:17.087Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='numerical integration'/><category scheme='http://www.blogger.com/atom/ns#' term='parametric plot'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematica'/><category scheme='http://www.blogger.com/atom/ns#' term='differential equation'/><title type='text'>F# vs Mathematica: parametric plots</title><content type='html'>&lt;p&gt;Another example from Sal Mangano's Mathematica Cookbook (p.520) is an elegant little Mathematica program that uses a crude numerical integrator to plot the trajectory of a differential equation representing the populations of predators (foxes) and prey (rabbits):&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_NMRkpon4Ps0/TDUXy8I5QqI/AAAAAAAAAHk/U_tBuUr6S5I/s1600/PredatorPreyMMA.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 274px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5491321484552520354" border="0" alt="" src="http://4.bp.blogspot.com/_NMRkpon4Ps0/TDUXy8I5QqI/AAAAAAAAAHk/U_tBuUr6S5I/s400/PredatorPreyMMA.png" /&gt;&lt;/a&gt;&lt;p&gt;This example, which was derived from &lt;a href="http://demonstrations.wolfram.com/PredatorPreyDynamicsWithTypeTwoFunctionalResponse/"&gt;this&lt;/a&gt; Wolfram Demonstrations sample, really plays to the strengths of the Mathematica language, not least its enormous standard library of graphing libraries.&lt;/p&gt;&lt;p&gt;However, .NET 4 does include new charting functionality so it is interesting to see how elegantly this can be written in &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;. The following &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; program implements the same functionality when evaluated interactively:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#046;&amp;#070;&amp;#111;&amp;#114;&amp;#109;&amp;#115;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#013;&amp;#010;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#046;&amp;#070;&amp;#111;&amp;#114;&amp;#109;&amp;#115;&amp;#046;&amp;#068;&amp;#097;&amp;#116;&amp;#097;&amp;#086;&amp;#105;&amp;#115;&amp;#117;&amp;#097;&amp;#108;&amp;#105;&amp;#122;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#013;&amp;#010;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#066;&amp;#097;&amp;#115;&amp;#101;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#013;&amp;#010;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#070;&amp;#111;&amp;#114;&amp;#109;&amp;#115;&amp;#073;&amp;#110;&amp;#116;&amp;#101;&amp;#103;&amp;#114;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#013;&amp;#010;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#080;&amp;#114;&amp;#101;&amp;#115;&amp;#101;&amp;#110;&amp;#116;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#067;&amp;#111;&amp;#114;&amp;#101;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#013;&amp;#010;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#080;&amp;#114;&amp;#101;&amp;#115;&amp;#101;&amp;#110;&amp;#116;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#070;&amp;#114;&amp;#097;&amp;#109;&amp;#101;&amp;#119;&amp;#111;&amp;#114;&amp;#107;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#013;&amp;#010;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#088;&amp;#097;&amp;#109;&amp;#108;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#111;&amp;#112;&amp;#101;&amp;#110;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#046;&amp;#070;&amp;#111;&amp;#114;&amp;#109;&amp;#115;&amp;#013;&amp;#010;&amp;#111;&amp;#112;&amp;#101;&amp;#110;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#046;&amp;#070;&amp;#111;&amp;#114;&amp;#109;&amp;#115;&amp;#046;&amp;#068;&amp;#097;&amp;#116;&amp;#097;&amp;#086;&amp;#105;&amp;#115;&amp;#117;&amp;#097;&amp;#108;&amp;#105;&amp;#122;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#046;&amp;#067;&amp;#104;&amp;#097;&amp;#114;&amp;#116;&amp;#105;&amp;#110;&amp;#103;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#116;&amp;#114;&amp;#097;&amp;#106;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#121;&amp;#032;&amp;#103;&amp;#032;&amp;#107;&amp;#032;&amp;#116;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#101;&amp;#118;&amp;#111;&amp;#108;&amp;#118;&amp;#101;&amp;#040;&amp;#114;&amp;#044;&amp;#032;&amp;#102;&amp;#041;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#100;&amp;#116;&amp;#114;&amp;#102;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#048;&amp;#048;&amp;#049;&amp;#032;&amp;#042;&amp;#032;&amp;#114;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#114;&amp;#032;&amp;#043;&amp;#032;&amp;#040;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#045;&amp;#032;&amp;#114;&amp;#047;&amp;#107;&amp;#041;&amp;#042;&amp;#114;&amp;#042;&amp;#103;&amp;#032;&amp;#045;&amp;#032;&amp;#100;&amp;#116;&amp;#114;&amp;#102;&amp;#044;&amp;#032;&amp;#100;&amp;#116;&amp;#114;&amp;#102;&amp;#032;&amp;#043;&amp;#032;&amp;#040;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#045;&amp;#032;&amp;#103;&amp;#041;&amp;#042;&amp;#102;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#115;&amp;#099;&amp;#097;&amp;#110;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#115;&amp;#032;&amp;#095;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#101;&amp;#118;&amp;#111;&amp;#108;&amp;#118;&amp;#101;&amp;#032;&amp;#115;&amp;#041;&amp;#032;&amp;#040;&amp;#053;&amp;#048;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#049;&amp;#048;&amp;#046;&amp;#048;&amp;#041;&amp;#032;&amp;#123;&amp;#049;&amp;#046;&amp;#046;&amp;#116;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#117;&amp;#115;&amp;#101;&amp;#032;&amp;#115;&amp;#101;&amp;#114;&amp;#105;&amp;#101;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#083;&amp;#101;&amp;#114;&amp;#105;&amp;#101;&amp;#115;&amp;#040;&amp;#067;&amp;#104;&amp;#097;&amp;#114;&amp;#116;&amp;#084;&amp;#121;&amp;#112;&amp;#101;&amp;#061;&amp;#083;&amp;#101;&amp;#114;&amp;#105;&amp;#101;&amp;#115;&amp;#067;&amp;#104;&amp;#097;&amp;#114;&amp;#116;&amp;#084;&amp;#121;&amp;#112;&amp;#101;&amp;#046;&amp;#076;&amp;#105;&amp;#110;&amp;#101;&amp;#041;&amp;#013;&amp;#010;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#032;&amp;#105;&amp;#110;&amp;#032;&amp;#116;&amp;#114;&amp;#097;&amp;#106;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#121;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#050;&amp;#032;&amp;#053;&amp;#101;&amp;#050;&amp;#032;&amp;#049;&amp;#053;&amp;#048;&amp;#048;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#115;&amp;#101;&amp;#114;&amp;#105;&amp;#101;&amp;#115;&amp;#046;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#115;&amp;#046;&amp;#065;&amp;#100;&amp;#100;&amp;#088;&amp;#089;&amp;#040;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#041;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#105;&amp;#103;&amp;#110;&amp;#111;&amp;#114;&amp;#101;&amp;#013;&amp;#010;&amp;#117;&amp;#115;&amp;#101;&amp;#032;&amp;#097;&amp;#114;&amp;#101;&amp;#097;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#067;&amp;#104;&amp;#097;&amp;#114;&amp;#116;&amp;#065;&amp;#114;&amp;#101;&amp;#097;&amp;#040;&amp;#041;&amp;#013;&amp;#010;&amp;#097;&amp;#114;&amp;#101;&amp;#097;&amp;#046;&amp;#065;&amp;#120;&amp;#105;&amp;#115;&amp;#088;&amp;#046;&amp;#084;&amp;#105;&amp;#116;&amp;#108;&amp;#101;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#034;&amp;#082;&amp;#097;&amp;#098;&amp;#098;&amp;#105;&amp;#116;&amp;#115;&amp;#034;&amp;#013;&amp;#010;&amp;#097;&amp;#114;&amp;#101;&amp;#097;&amp;#046;&amp;#065;&amp;#120;&amp;#105;&amp;#115;&amp;#088;&amp;#046;&amp;#077;&amp;#105;&amp;#110;&amp;#105;&amp;#109;&amp;#117;&amp;#109;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#097;&amp;#114;&amp;#101;&amp;#097;&amp;#046;&amp;#065;&amp;#120;&amp;#105;&amp;#115;&amp;#089;&amp;#046;&amp;#084;&amp;#105;&amp;#116;&amp;#108;&amp;#101;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#034;&amp;#070;&amp;#111;&amp;#120;&amp;#101;&amp;#115;&amp;#034;&amp;#013;&amp;#010;&amp;#117;&amp;#115;&amp;#101;&amp;#032;&amp;#099;&amp;#104;&amp;#097;&amp;#114;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#067;&amp;#104;&amp;#097;&amp;#114;&amp;#116;&amp;#040;&amp;#068;&amp;#111;&amp;#099;&amp;#107;&amp;#061;&amp;#068;&amp;#111;&amp;#099;&amp;#107;&amp;#083;&amp;#116;&amp;#121;&amp;#108;&amp;#101;&amp;#046;&amp;#070;&amp;#105;&amp;#108;&amp;#108;&amp;#041;&amp;#013;&amp;#010;&amp;#099;&amp;#104;&amp;#097;&amp;#114;&amp;#116;&amp;#046;&amp;#067;&amp;#104;&amp;#097;&amp;#114;&amp;#116;&amp;#065;&amp;#114;&amp;#101;&amp;#097;&amp;#115;&amp;#046;&amp;#065;&amp;#100;&amp;#100;&amp;#032;&amp;#097;&amp;#114;&amp;#101;&amp;#097;&amp;#013;&amp;#010;&amp;#099;&amp;#104;&amp;#097;&amp;#114;&amp;#116;&amp;#046;&amp;#083;&amp;#101;&amp;#114;&amp;#105;&amp;#101;&amp;#115;&amp;#046;&amp;#065;&amp;#100;&amp;#100;&amp;#032;&amp;#115;&amp;#101;&amp;#114;&amp;#105;&amp;#101;&amp;#115;&amp;#013;&amp;#010;&amp;#117;&amp;#115;&amp;#101;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#109;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#070;&amp;#111;&amp;#114;&amp;#109;&amp;#040;&amp;#041;&amp;#013;&amp;#010;&amp;#102;&amp;#111;&amp;#114;&amp;#109;&amp;#046;&amp;#067;&amp;#111;&amp;#110;&amp;#116;&amp;#114;&amp;#111;&amp;#108;&amp;#115;&amp;#046;&amp;#065;&amp;#100;&amp;#100;&amp;#032;&amp;#099;&amp;#104;&amp;#097;&amp;#114;&amp;#116;&amp;#013;&amp;#010;&amp;#102;&amp;#111;&amp;#114;&amp;#109;&amp;#046;&amp;#083;&amp;#104;&amp;#111;&amp;#119;&amp;#040;&amp;#041;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;When evaluated, this &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; program produces the following output:&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_NMRkpon4Ps0/TDaj6w74h_I/AAAAAAAAAH0/b_I-qLAxpyU/s1600/PredatorPrey.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_NMRkpon4Ps0/TDaj6w74h_I/AAAAAAAAAH0/b_I-qLAxpyU/s400/PredatorPrey.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5491757025588709362" /&gt;&lt;/a&gt;&lt;p&gt;This program will be the basis for a future &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb"&gt;F#.NET Journal&lt;/a&gt; article that introduces user interaction. Although Mathematica also makes user interaction easy as well, its relatively poor performance often makes interactive programs sluggish whereas the relevant code in our F# version of this program runs 64&amp;#215; faster than the original Mathematica and, consequently, produces a fluid user interface.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-192728582714434286?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/192728582714434286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=192728582714434286' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/192728582714434286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/192728582714434286'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/07/f-vs-mathematica-parametric-plots.html' title='F# vs Mathematica: parametric plots'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NMRkpon4Ps0/TDUXy8I5QqI/AAAAAAAAAHk/U_tBuUr6S5I/s72-c/PredatorPreyMMA.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1630950546337194813</id><published>2010-07-07T01:31:00.011Z</published><updated>2010-07-08T22:30:56.774Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='red-black tree'/><category scheme='http://www.blogger.com/atom/ns#' term='brevity'/><category scheme='http://www.blogger.com/atom/ns#' term='data structure'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematica'/><category scheme='http://www.blogger.com/atom/ns#' term='high performance'/><title type='text'>F# vs Mathematica: red-black trees</title><content type='html'>&lt;p&gt;Mathematica is an expensive commercial application sold as software for "interactive technical computing". In particular, the product centers around the Mathematica programming language which is a very powerful and dynamic language based upon term rewriting with excellent graphical capabilities and a wealth of useful functionality in its standard library. However, Microsoft's new &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; programming language not only provides most of the useful functionality found in Mathematica but has many other benefits, not least that it is completely free!&lt;/p&gt;&lt;p&gt;We have previously &lt;a href="http://flyingfrogblog.blogspot.com/2009/05/f-vs-mathematica-pythagoras-tree.html"&gt;compared F# and Mathematica&lt;/a&gt; in the context of 2D vector graphics. This post is the first in a series comparing these languages. Specifically, this post compares data structures. The &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F# programming language&lt;/a&gt; is designed for efficient compilation to native code whereas the Mathematica language is generally evaluated via term rewriting which is, essentially, a very inefficient form of interpretation. Consequently, &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; code is typically 10-1,000× faster than Mathematica code unless computational burden can be shifted onto functions written in other languages (usually those in the vast standard library).&lt;/p&gt;&lt;p&gt;The latest Mathematica-related book, Mathematica Cookbook by Sal Mangano, contains many examples including a translation of Chris Okasaki's immutable red-black trees from Haskell to Mathematica augmented with a function to remove an element from a tree. Unfortunately, the new function written by Sal Mangano is incorrect and silently corrupts the shape of the tree. Thus, we shall focus on the subset of the code presented in Sal's book that is correct. This code may be written as follows in &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#116;&amp;#121;&amp;#112;&amp;#101;&amp;#032;&amp;#099;&amp;#111;&amp;#108;&amp;#111;&amp;#114;&amp;#032;&amp;#061;&amp;#032;&amp;#082;&amp;#101;&amp;#100;&amp;#032;&amp;#124;&amp;#032;&amp;#066;&amp;#108;&amp;#097;&amp;#099;&amp;#107;&amp;#013;&amp;#010;&amp;#116;&amp;#121;&amp;#112;&amp;#101;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#111;&amp;#102;&amp;#032;&amp;#099;&amp;#111;&amp;#108;&amp;#111;&amp;#114;&amp;#032;&amp;#042;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#116;&amp;#032;&amp;#042;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#116;&amp;#032;&amp;#124;&amp;#032;&amp;#076;&amp;#101;&amp;#097;&amp;#102;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#098;&amp;#097;&amp;#108;&amp;#097;&amp;#110;&amp;#099;&amp;#101;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#117;&amp;#110;&amp;#099;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#066;&amp;#108;&amp;#097;&amp;#099;&amp;#107;&amp;#044;&amp;#032;&amp;#122;&amp;#044;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#041;&amp;#044;&amp;#032;&amp;#099;&amp;#041;&amp;#044;&amp;#032;&amp;#100;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#066;&amp;#108;&amp;#097;&amp;#099;&amp;#107;&amp;#044;&amp;#032;&amp;#122;&amp;#044;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#098;&amp;#044;&amp;#032;&amp;#099;&amp;#041;&amp;#041;&amp;#044;&amp;#032;&amp;#100;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#066;&amp;#108;&amp;#097;&amp;#099;&amp;#107;&amp;#044;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#122;&amp;#044;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#098;&amp;#044;&amp;#032;&amp;#099;&amp;#041;&amp;#044;&amp;#032;&amp;#100;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#066;&amp;#108;&amp;#097;&amp;#099;&amp;#107;&amp;#044;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#098;&amp;#044;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#122;&amp;#044;&amp;#032;&amp;#099;&amp;#044;&amp;#032;&amp;#100;&amp;#041;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#066;&amp;#108;&amp;#097;&amp;#099;&amp;#107;&amp;#044;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#041;&amp;#044;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#066;&amp;#108;&amp;#097;&amp;#099;&amp;#107;&amp;#044;&amp;#032;&amp;#122;&amp;#044;&amp;#032;&amp;#099;&amp;#044;&amp;#032;&amp;#100;&amp;#041;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#120;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#120;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#105;&amp;#110;&amp;#115;&amp;#101;&amp;#114;&amp;#116;&amp;#032;&amp;#120;&amp;#032;&amp;#115;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#101;&amp;#099;&amp;#032;&amp;#105;&amp;#110;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#117;&amp;#110;&amp;#099;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#076;&amp;#101;&amp;#097;&amp;#102;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#076;&amp;#101;&amp;#097;&amp;#102;&amp;#044;&amp;#032;&amp;#076;&amp;#101;&amp;#097;&amp;#102;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#099;&amp;#111;&amp;#108;&amp;#111;&amp;#114;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#041;&amp;#032;&amp;#097;&amp;#115;&amp;#032;&amp;#115;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#120;&amp;#032;&amp;#060;&amp;#032;&amp;#121;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#098;&amp;#097;&amp;#108;&amp;#097;&amp;#110;&amp;#099;&amp;#101;&amp;#032;&amp;#040;&amp;#099;&amp;#111;&amp;#108;&amp;#111;&amp;#114;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#105;&amp;#110;&amp;#115;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#101;&amp;#108;&amp;#105;&amp;#102;&amp;#032;&amp;#120;&amp;#032;&amp;#062;&amp;#032;&amp;#121;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#098;&amp;#097;&amp;#108;&amp;#097;&amp;#110;&amp;#099;&amp;#101;&amp;#032;&amp;#040;&amp;#099;&amp;#111;&amp;#108;&amp;#111;&amp;#114;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#105;&amp;#110;&amp;#115;&amp;#032;&amp;#098;&amp;#041;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#032;&amp;#115;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#109;&amp;#097;&amp;#116;&amp;#099;&amp;#104;&amp;#032;&amp;#105;&amp;#110;&amp;#115;&amp;#032;&amp;#115;&amp;#032;&amp;#119;&amp;#105;&amp;#116;&amp;#104;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#082;&amp;#101;&amp;#100;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#078;&amp;#111;&amp;#100;&amp;#101;&amp;#032;&amp;#040;&amp;#066;&amp;#108;&amp;#097;&amp;#099;&amp;#107;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#116;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;The Mathematica code is significantly more complicated (714 vs 1514 bytes) for two main reasons:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Mathematica has no types so it cannot express a type with an ordering, so a new rbTree data structure is created with an ordering and that must then be boxed and unboxed by hand.&lt;/li&gt;&lt;li&gt;Mathematica prohibits top-level or-patterns so the same pattern is repeated four times in the balance function.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href="http://3.bp.blogspot.com/_NMRkpon4Ps0/TDPn1n0LBII/AAAAAAAAAHc/7I8lhKHyywE/s1600/RBTreeMMA.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 328px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5490987279101658242" border="0" alt="" src="http://3.bp.blogspot.com/_NMRkpon4Ps0/TDPn1n0LBII/AAAAAAAAAHc/7I8lhKHyywE/s400/RBTreeMMA.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The simpler &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; solution is also 20× faster at inserting 100k elements and 100× faster at computing the range of depths in the resulting tree.&lt;/p&gt;&lt;p&gt;In the next post, we'll start to compare the graphical capabilities of the two languages.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1630950546337194813?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1630950546337194813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1630950546337194813' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1630950546337194813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1630950546337194813'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/07/f-vs-mathematica-red-black-trees.html' title='F# vs Mathematica: red-black trees'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_NMRkpon4Ps0/TDPn1n0LBII/AAAAAAAAAHc/7I8lhKHyywE/s72-c/RBTreeMMA.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1846945897070006671</id><published>2010-07-05T08:58:00.004Z</published><updated>2010-07-05T17:37:05.695Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='rosetta code'/><category scheme='http://www.blogger.com/atom/ns#' term='happy numbers'/><title type='text'>Happy numbers</title><content type='html'>&lt;p&gt;Consider the sequence obtained by summing the squares of the digits of a number and then repeating with the result. If this sequence ends with the number one then the numbers in the sequence are Happy Numbers.&lt;/p&gt;&lt;p&gt;One of the challenges on Rosetta code is to compute the first eight Happy Numbers. The &lt;a href="http://rosettacode.org/wiki/Happy_numbers#F.23"&gt;current F# solution&lt;/a&gt; weighs in at 26 lines of code. Let's see if we can do better...&lt;/p&gt;&lt;p&gt;We begin by writing a &lt;span style="font-family:courier new;"&gt;next&lt;/span&gt; function that computes the next happy number after the given number:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#101;&amp;#099;&amp;#032;&amp;#110;&amp;#101;&amp;#120;&amp;#116;&amp;#032;&amp;#040;&amp;#109;&amp;#058;&amp;#032;&amp;#083;&amp;#101;&amp;#116;&amp;#060;&amp;#095;&amp;#062;&amp;#041;&amp;#032;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#105;&amp;#061;&amp;#049;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#110;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#109;&amp;#046;&amp;#067;&amp;#111;&amp;#110;&amp;#116;&amp;#097;&amp;#105;&amp;#110;&amp;#115;&amp;#032;&amp;#105;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#110;&amp;#101;&amp;#120;&amp;#116;&amp;#032;&amp;#083;&amp;#101;&amp;#116;&amp;#046;&amp;#101;&amp;#109;&amp;#112;&amp;#116;&amp;#121;&amp;#032;&amp;#040;&amp;#110;&amp;#043;&amp;#049;&amp;#041;&amp;#032;&amp;#040;&amp;#110;&amp;#043;&amp;#049;&amp;#041;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#115;&amp;#117;&amp;#109;&amp;#066;&amp;#121;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#100;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#112;&amp;#111;&amp;#119;&amp;#110;&amp;#032;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#100;&amp;#032;&amp;#045;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#039;&amp;#048;&amp;#039;&amp;#041;&amp;#032;&amp;#050;&amp;#041;&amp;#032;&amp;#040;&amp;#115;&amp;#116;&amp;#114;&amp;#105;&amp;#110;&amp;#103;&amp;#032;&amp;#105;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#110;&amp;#101;&amp;#120;&amp;#116;&amp;#032;&amp;#040;&amp;#109;&amp;#046;&amp;#065;&amp;#100;&amp;#100;&amp;#032;&amp;#105;&amp;#041;&amp;#032;&amp;#110;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#110;&amp;#101;&amp;#120;&amp;#116;&amp;#032;&amp;#058;&amp;#032;&amp;#083;&amp;#101;&amp;#116;&amp;#060;&amp;#105;&amp;#110;&amp;#116;&amp;#062;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;Note the use of the &lt;span style="font-family:courier new;"&gt;string&lt;/span&gt; function to convert an &lt;span style="font-family:courier new;"&gt;int&lt;/span&gt; into its string representation and then the use of the &lt;span style="font-family:courier new;"&gt;int&lt;/span&gt; function to convert each char back into an &lt;span style="font-family:courier new;"&gt;int&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;Finally, we use the &lt;span style="font-family:courier new;"&gt;List.scan&lt;/span&gt; function to build a list of accumulated results as the &lt;span style="font-family:courier new;"&gt;next&lt;/span&gt; function finds each of the happy numbers in turn:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#076;&amp;#105;&amp;#115;&amp;#116;&amp;#046;&amp;#115;&amp;#099;&amp;#097;&amp;#110;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#110;&amp;#032;&amp;#095;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#110;&amp;#101;&amp;#120;&amp;#116;&amp;#032;&amp;#083;&amp;#101;&amp;#116;&amp;#046;&amp;#101;&amp;#109;&amp;#112;&amp;#116;&amp;#121;&amp;#032;&amp;#040;&amp;#110;&amp;#043;&amp;#049;&amp;#041;&amp;#032;&amp;#040;&amp;#110;&amp;#043;&amp;#049;&amp;#041;&amp;#041;&amp;#032;&amp;#049;&amp;#032;&amp;#091;&amp;#049;&amp;#046;&amp;#046;&amp;#055;&amp;#093;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#105;&amp;#116;&amp;#032;&amp;#058;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#108;&amp;#105;&amp;#115;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#091;&amp;#049;&amp;#059;&amp;#032;&amp;#055;&amp;#059;&amp;#032;&amp;#049;&amp;#048;&amp;#059;&amp;#032;&amp;#049;&amp;#051;&amp;#059;&amp;#032;&amp;#049;&amp;#057;&amp;#059;&amp;#032;&amp;#050;&amp;#051;&amp;#059;&amp;#032;&amp;#050;&amp;#056;&amp;#059;&amp;#032;&amp;#051;&amp;#049;&amp;#093;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;The &lt;span style="font-family:courier new;"&gt;scan&lt;/span&gt; function is relatively new and, consequently, not as widely appreciated as perhaps it should be.&lt;/p&gt;&lt;p&gt;Our whole program weighs in at only 6 lines of code, much shorter than the original!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1846945897070006671?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1846945897070006671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1846945897070006671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1846945897070006671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1846945897070006671'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/07/happy-numbers.html' title='Happy numbers'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1173811343507111822</id><published>2010-07-04T02:00:00.004Z</published><updated>2010-07-04T02:14:04.748Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='lorenz attractor'/><category scheme='http://www.blogger.com/atom/ns#' term='visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='fractal'/><category scheme='http://www.blogger.com/atom/ns#' term='whisp'/><category scheme='http://www.blogger.com/atom/ns#' term='windows presentation foundation'/><title type='text'>Lorenz attractor</title><content type='html'>&lt;p&gt;The &lt;a href="http://mathworld.wolfram.com/LorenzAttractor.html"&gt;Lorenz attractor&lt;/a&gt; is a fractal derived from the trajectory of a 3-dimensional dynamical system that exhibits chaotic flow. This blog post describes a 35-line program that computes trajectories of this attractor and visualizes them as a beautiful whisp using Windows Presentation Foundation:&lt;/p&gt;&lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_NMRkpon4Ps0/TC_sCzGpz1I/AAAAAAAAAHU/nqH30ydu0XI/s1600/lorenz.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 336px; DISPLAY: block; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5489866003609931602" border="0" alt="" src="http://2.bp.blogspot.com/_NMRkpon4Ps0/TC_sCzGpz1I/AAAAAAAAAHU/nqH30ydu0XI/s400/lorenz.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The program is as follows:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#080;&amp;#114;&amp;#101;&amp;#115;&amp;#101;&amp;#110;&amp;#116;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#067;&amp;#111;&amp;#114;&amp;#101;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#080;&amp;#114;&amp;#101;&amp;#115;&amp;#101;&amp;#110;&amp;#116;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#070;&amp;#114;&amp;#097;&amp;#109;&amp;#101;&amp;#119;&amp;#111;&amp;#114;&amp;#107;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#066;&amp;#097;&amp;#115;&amp;#101;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#035;&amp;#114;&amp;#032;&amp;#034;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#088;&amp;#097;&amp;#109;&amp;#108;&amp;#046;&amp;#100;&amp;#108;&amp;#108;&amp;#034;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#116;&amp;#114;&amp;#097;&amp;#106;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#121;&amp;#032;&amp;#102;&amp;#032;&amp;#040;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#041;&amp;#032;&amp;#100;&amp;#116;&amp;#032;&amp;#110;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#115;&amp;#044;&amp;#032;&amp;#098;&amp;#044;&amp;#032;&amp;#112;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#048;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#056;&amp;#046;&amp;#048;&amp;#032;&amp;#047;&amp;#032;&amp;#051;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#050;&amp;#056;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#120;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#121;&amp;#032;&amp;#061;&amp;#032;&amp;#121;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#122;&amp;#032;&amp;#061;&amp;#032;&amp;#122;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#097;&amp;#032;&amp;#061;&amp;#032;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#122;&amp;#101;&amp;#114;&amp;#111;&amp;#067;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#032;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#061;&amp;#048;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#110;&amp;#045;&amp;#049;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#097;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#102;&amp;#032;&amp;#040;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#120;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#115;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#121;&amp;#032;&amp;#045;&amp;#032;&amp;#120;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#116;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#121;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#121;&amp;#032;&amp;#043;&amp;#032;&amp;#040;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#112;&amp;#032;&amp;#045;&amp;#032;&amp;#122;&amp;#041;&amp;#032;&amp;#045;&amp;#032;&amp;#121;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#116;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#122;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#122;&amp;#032;&amp;#043;&amp;#032;&amp;#040;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#121;&amp;#032;&amp;#045;&amp;#032;&amp;#098;&amp;#032;&amp;#042;&amp;#032;&amp;#122;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#116;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#097;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#116;&amp;#114;&amp;#097;&amp;#106;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#121;&amp;#032;&amp;#058;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#040;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#039;&amp;#097;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#091;&amp;#093;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#111;&amp;#112;&amp;#101;&amp;#110;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#119;&amp;#104;&amp;#105;&amp;#115;&amp;#112;&amp;#040;&amp;#041;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#097;&amp;#110;&amp;#100;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#082;&amp;#097;&amp;#110;&amp;#100;&amp;#111;&amp;#109;&amp;#040;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#102;&amp;#032;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#112;&amp;#111;&amp;#119;&amp;#110;&amp;#032;&amp;#040;&amp;#114;&amp;#097;&amp;#110;&amp;#100;&amp;#046;&amp;#078;&amp;#101;&amp;#120;&amp;#116;&amp;#068;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#040;&amp;#041;&amp;#032;&amp;#045;&amp;#032;&amp;#048;&amp;#046;&amp;#053;&amp;#041;&amp;#032;&amp;#050;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#032;&amp;#049;&amp;#048;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#102;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#102;&amp;#032;&amp;#050;&amp;#048;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#120;&amp;#121;&amp;#115;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#102;&amp;#040;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#041;&amp;#032;&amp;#061;&amp;#032;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#040;&amp;#050;&amp;#048;&amp;#046;&amp;#048;&amp;#032;&amp;#043;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#050;&amp;#053;&amp;#046;&amp;#048;&amp;#032;&amp;#043;&amp;#032;&amp;#121;&amp;#032;&amp;#045;&amp;#032;&amp;#122;&amp;#032;&amp;#043;&amp;#032;&amp;#053;&amp;#048;&amp;#046;&amp;#048;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#116;&amp;#114;&amp;#097;&amp;#106;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#121;&amp;#032;&amp;#102;&amp;#032;&amp;#040;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#041;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#048;&amp;#051;&amp;#032;&amp;#050;&amp;#048;&amp;#048;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#108;&amp;#105;&amp;#110;&amp;#101;&amp;#095;&amp;#116;&amp;#111;&amp;#032;&amp;#040;&amp;#120;&amp;#121;&amp;#058;&amp;#032;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#041;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#040;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#046;&amp;#076;&amp;#105;&amp;#110;&amp;#101;&amp;#083;&amp;#101;&amp;#103;&amp;#109;&amp;#101;&amp;#110;&amp;#116;&amp;#040;&amp;#120;&amp;#121;&amp;#044;&amp;#032;&amp;#116;&amp;#114;&amp;#117;&amp;#101;&amp;#041;&amp;#032;&amp;#058;&amp;#062;&amp;#032;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#046;&amp;#080;&amp;#097;&amp;#116;&amp;#104;&amp;#083;&amp;#101;&amp;#103;&amp;#109;&amp;#101;&amp;#110;&amp;#116;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#046;&amp;#080;&amp;#097;&amp;#116;&amp;#104;&amp;#071;&amp;#101;&amp;#111;&amp;#109;&amp;#101;&amp;#116;&amp;#114;&amp;#121;&amp;#091;&amp;#032;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#046;&amp;#080;&amp;#097;&amp;#116;&amp;#104;&amp;#070;&amp;#105;&amp;#103;&amp;#117;&amp;#114;&amp;#101;&amp;#040;&amp;#120;&amp;#121;&amp;#115;&amp;#046;&amp;#091;&amp;#048;&amp;#093;&amp;#044;&amp;#032;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#109;&amp;#097;&amp;#112;&amp;#032;&amp;#108;&amp;#105;&amp;#110;&amp;#101;&amp;#095;&amp;#116;&amp;#111;&amp;#032;&amp;#120;&amp;#121;&amp;#115;&amp;#044;&amp;#032;&amp;#102;&amp;#097;&amp;#108;&amp;#115;&amp;#101;&amp;#041;&amp;#032;&amp;#093;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#119;&amp;#104;&amp;#105;&amp;#115;&amp;#112;&amp;#032;&amp;#058;&amp;#032;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#046;&amp;#080;&amp;#097;&amp;#116;&amp;#104;&amp;#071;&amp;#101;&amp;#111;&amp;#109;&amp;#101;&amp;#116;&amp;#114;&amp;#121;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#103;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#032;&amp;#061;&amp;#032;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#046;&amp;#071;&amp;#101;&amp;#111;&amp;#109;&amp;#101;&amp;#116;&amp;#114;&amp;#121;&amp;#071;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#040;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#061;&amp;#049;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#049;&amp;#048;&amp;#048;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#119;&amp;#104;&amp;#105;&amp;#115;&amp;#112;&amp;#040;&amp;#041;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#103;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#046;&amp;#067;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#114;&amp;#101;&amp;#110;&amp;#046;&amp;#065;&amp;#100;&amp;#100;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#105;&amp;#103;&amp;#110;&amp;#111;&amp;#114;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#098;&amp;#114;&amp;#117;&amp;#115;&amp;#104;&amp;#032;&amp;#061;&amp;#032;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#046;&amp;#083;&amp;#111;&amp;#108;&amp;#105;&amp;#100;&amp;#067;&amp;#111;&amp;#108;&amp;#111;&amp;#114;&amp;#066;&amp;#114;&amp;#117;&amp;#115;&amp;#104;&amp;#032;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#046;&amp;#067;&amp;#111;&amp;#108;&amp;#111;&amp;#114;&amp;#115;&amp;#046;&amp;#082;&amp;#101;&amp;#100;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#112;&amp;#097;&amp;#116;&amp;#104;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#104;&amp;#097;&amp;#112;&amp;#101;&amp;#115;&amp;#046;&amp;#080;&amp;#097;&amp;#116;&amp;#104;&amp;#040;&amp;#068;&amp;#097;&amp;#116;&amp;#097;&amp;#061;&amp;#103;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#044;&amp;#032;&amp;#083;&amp;#116;&amp;#114;&amp;#111;&amp;#107;&amp;#101;&amp;#061;&amp;#098;&amp;#114;&amp;#117;&amp;#115;&amp;#104;&amp;#044;&amp;#032;&amp;#083;&amp;#116;&amp;#114;&amp;#111;&amp;#107;&amp;#101;&amp;#084;&amp;#104;&amp;#105;&amp;#099;&amp;#107;&amp;#110;&amp;#101;&amp;#115;&amp;#115;&amp;#061;&amp;#048;&amp;#046;&amp;#048;&amp;#048;&amp;#053;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#098;&amp;#111;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#067;&amp;#111;&amp;#110;&amp;#116;&amp;#114;&amp;#111;&amp;#108;&amp;#115;&amp;#046;&amp;#086;&amp;#105;&amp;#101;&amp;#119;&amp;#098;&amp;#111;&amp;#120;&amp;#040;&amp;#067;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#061;&amp;#112;&amp;#097;&amp;#116;&amp;#104;&amp;#044;&amp;#032;&amp;#083;&amp;#116;&amp;#114;&amp;#101;&amp;#116;&amp;#099;&amp;#104;&amp;#061;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#046;&amp;#083;&amp;#116;&amp;#114;&amp;#101;&amp;#116;&amp;#099;&amp;#104;&amp;#046;&amp;#085;&amp;#110;&amp;#105;&amp;#102;&amp;#111;&amp;#114;&amp;#109;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#119;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#032;&amp;#061;&amp;#032;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#040;&amp;#067;&amp;#111;&amp;#110;&amp;#116;&amp;#101;&amp;#110;&amp;#116;&amp;#061;&amp;#098;&amp;#111;&amp;#120;&amp;#044;&amp;#032;&amp;#084;&amp;#105;&amp;#116;&amp;#108;&amp;#101;&amp;#061;&amp;#034;&amp;#076;&amp;#111;&amp;#114;&amp;#101;&amp;#110;&amp;#122;&amp;#032;&amp;#097;&amp;#116;&amp;#116;&amp;#114;&amp;#097;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#034;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#040;&amp;#065;&amp;#112;&amp;#112;&amp;#108;&amp;#105;&amp;#099;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#040;&amp;#041;&amp;#041;&amp;#046;&amp;#082;&amp;#117;&amp;#110;&amp;#032;&amp;#119;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#105;&amp;#103;&amp;#110;&amp;#111;&amp;#114;&amp;#101;&amp;#059;&amp;#059;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;The &lt;span style="font-family:courier new;"&gt;trajectory&lt;/span&gt; function generates an array derived from the coordinates along a trajectory with the given starting position. The &lt;span style="font-family:courier new;"&gt;whisp&lt;/span&gt; function computes a trajectory with a slightly randomized starting position and generates a WPF &lt;span style="font-family:courier new;"&gt;PathGeometry&lt;/span&gt;. Finally, the main program generates 100 whisps and visualizes them.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1173811343507111822?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1173811343507111822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1173811343507111822' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1173811343507111822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1173811343507111822'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/07/lorenz-attractor.html' title='Lorenz attractor'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NMRkpon4Ps0/TC_sCzGpz1I/AAAAAAAAAHU/nqH30ydu0XI/s72-c/lorenz.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-7579052984238858308</id><published>2010-07-04T01:36:00.002Z</published><updated>2010-07-04T01:42:04.576Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='demo'/><category scheme='http://www.blogger.com/atom/ns#' term='windows presentation foundation'/><category scheme='http://www.blogger.com/atom/ns#' term='dynamics'/><category scheme='http://www.blogger.com/atom/ns#' term='rigid body'/><category scheme='http://www.blogger.com/atom/ns#' term='real-time'/><title type='text'>Rigid body dynamics demo</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb"&gt;The F#.NET Journal&lt;/a&gt; just made another &lt;a href="http://ffconsultancy.com/products/fsharp_journal/code/RigidBodyDynamics.exe"&gt;downloadable demo&lt;/a&gt; freely available. This demo is from the article &lt;a href="http://fsharpnews.blogspot.com/2010/01/rigid-body-dynamics.html"&gt;&lt;em&gt;Rigid body dynamics (15th January 2010&lt;/em&gt;)&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://3.bp.blogspot.com/_NMRkpon4Ps0/TC_l33eidJI/AAAAAAAAAHM/FSy_XScyOKo/s1600/rigid.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 388px; DISPLAY: block; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5489859218735527058" border="0" alt="" src="http://3.bp.blogspot.com/_NMRkpon4Ps0/TC_l33eidJI/AAAAAAAAAHM/FSy_XScyOKo/s400/rigid.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The &lt;a href="http://fsharpnews.blogspot.com/2010/01/rigid-body-dynamics.html"&gt;article&lt;/a&gt; walks through the design and implementation of a 250-line program that simulates the dynamics of a collection of solid balls as they bound around a scene, using Windows Presentation Foundation for visualization!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-7579052984238858308?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/7579052984238858308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=7579052984238858308' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7579052984238858308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7579052984238858308'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/07/rigid-body-dynamics-demo.html' title='Rigid body dynamics demo'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_NMRkpon4Ps0/TC_l33eidJI/AAAAAAAAAHM/FSy_XScyOKo/s72-c/rigid.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-5113938981581130283</id><published>2010-07-02T14:28:00.001Z</published><updated>2010-07-02T14:30:00.887Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='dynamic programming'/><category scheme='http://www.blogger.com/atom/ns#' term='text'/><category scheme='http://www.blogger.com/atom/ns#' term='diff'/><category scheme='http://www.blogger.com/atom/ns#' term='longest common subsequence'/><title type='text'>Diff</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb78"&gt;The F#.NET Journal&lt;/a&gt; just published an article about text processing:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"The unix program diff identifies differences between text files, line by line. This tool is most useful for comparing two versions of a program. This article develops a simple implementation of the diff tool based upon the longest common subsequence (LCS) algorithm with a graphical user interface written using Windows Presentation Foundation to visualize the difference between two text files..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb78"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-5113938981581130283?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/5113938981581130283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=5113938981581130283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5113938981581130283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5113938981581130283'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/07/diff.html' title='Diff'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-7781217410961663145</id><published>2010-06-29T23:27:00.002Z</published><updated>2010-06-29T23:32:32.581Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Expert F#'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Expert F# 2.0</title><content type='html'>&lt;p&gt;Don Syme et al. have updated their seminal text on F#, bringing hardcore developers all the gory detail in the new &lt;a href="http://www.apress.com/book/view/9781430224310"&gt;Expert F# 2.0&lt;/a&gt; book.&lt;/p&gt;&lt;p&gt;This is the second book to cover the latest version of F# that shipped with Visual Studio 2010 in April. The first book was, of course, our own &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;Visual F# 2010 for Technical Computing&lt;/a&gt;.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-7781217410961663145?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/7781217410961663145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=7781217410961663145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7781217410961663145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7781217410961663145'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/06/expert-f-20.html' title='Expert F# 2.0'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-8493929997870159126</id><published>2010-06-19T15:26:00.004Z</published><updated>2010-06-19T15:30:49.458Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='concurrent collection'/><category scheme='http://www.blogger.com/atom/ns#' term='ConcurrentQueue'/><category scheme='http://www.blogger.com/atom/ns#' term='ConcurrentStack'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='ConcurrentBag'/><category scheme='http://www.blogger.com/atom/ns#' term='.net 4'/><category scheme='http://www.blogger.com/atom/ns#' term='visual studio 2010'/><title type='text'>Parallelism in .NET 4 and Visual F# 2010</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb77"&gt;The F#.NET Journal&lt;/a&gt; just published an article about .NET 4:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"The latest version of the .NET Framework provides a wealth of functionality for parallel programming aimed at multicores. This includes not only the Task Parallel Library, that was previously available in the form of CTP releases, but also Parallel LINQ (PLINQ) and the new concurrent collections. The F# standard library has also been augmented with parallelized functions. This article examines each of these in turn..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb77"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-8493929997870159126?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/8493929997870159126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=8493929997870159126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8493929997870159126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8493929997870159126'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/06/parallelism-in-net-4-and-visual-f-2010.html' title='Parallelism in .NET 4 and Visual F# 2010'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-8072663285884764503</id><published>2010-06-06T18:53:00.005Z</published><updated>2010-06-06T19:00:57.014Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='dragon curve'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='windows presentation foundation'/><title type='text'>A dragon curve in 17 lines of F#</title><content type='html'>&lt;p&gt;Dragon curves are a family of self-similar fractal curves. The following 17-line &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; program uses Windows Presentation Foundation to visualize the results of a simple recursively-constructed dragon curve:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#111;&amp;#112;&amp;#101;&amp;#110;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#013;&amp;#010;&amp;#111;&amp;#112;&amp;#101;&amp;#110;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#115;&amp;#046;&amp;#077;&amp;#101;&amp;#100;&amp;#105;&amp;#097;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#109;&amp;#032;&amp;#061;&amp;#032;&amp;#077;&amp;#097;&amp;#116;&amp;#114;&amp;#105;&amp;#120;&amp;#040;&amp;#048;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#048;&amp;#046;&amp;#053;&amp;#044;&amp;#032;&amp;#045;&amp;#048;&amp;#046;&amp;#053;&amp;#044;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#041;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#115;&amp;#116;&amp;#101;&amp;#112;&amp;#032;&amp;#115;&amp;#101;&amp;#103;&amp;#115;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#115;&amp;#101;&amp;#113;&amp;#032;&amp;#123;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#097;&amp;#058;&amp;#032;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#044;&amp;#032;&amp;#098;&amp;#058;&amp;#032;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#105;&amp;#110;&amp;#032;&amp;#115;&amp;#101;&amp;#103;&amp;#115;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#097;&amp;#032;&amp;#043;&amp;#032;&amp;#048;&amp;#046;&amp;#053;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#098;&amp;#032;&amp;#045;&amp;#032;&amp;#097;&amp;#041;&amp;#032;&amp;#043;&amp;#032;&amp;#040;&amp;#098;&amp;#032;&amp;#045;&amp;#032;&amp;#097;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#109;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#121;&amp;#105;&amp;#101;&amp;#108;&amp;#100;&amp;#033;&amp;#032;&amp;#091;&amp;#097;&amp;#044;&amp;#032;&amp;#120;&amp;#059;&amp;#032;&amp;#098;&amp;#044;&amp;#032;&amp;#120;&amp;#093;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#101;&amp;#099;&amp;#032;&amp;#110;&amp;#101;&amp;#115;&amp;#116;&amp;#032;&amp;#110;&amp;#032;&amp;#102;&amp;#032;&amp;#120;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#110;&amp;#061;&amp;#048;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#120;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#032;&amp;#110;&amp;#101;&amp;#115;&amp;#116;&amp;#032;&amp;#040;&amp;#110;&amp;#045;&amp;#049;&amp;#041;&amp;#032;&amp;#102;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#120;&amp;#041;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#091;&amp;#060;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#083;&amp;#084;&amp;#065;&amp;#084;&amp;#104;&amp;#114;&amp;#101;&amp;#097;&amp;#100;&amp;#062;&amp;#093;&amp;#013;&amp;#010;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#112;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#115;&amp;#116;&amp;#032;&amp;#049;&amp;#052;&amp;#032;&amp;#115;&amp;#116;&amp;#101;&amp;#112;&amp;#032;&amp;#040;&amp;#115;&amp;#101;&amp;#113;&amp;#032;&amp;#091;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#040;&amp;#048;&amp;#046;&amp;#044;&amp;#032;&amp;#048;&amp;#046;&amp;#041;&amp;#044;&amp;#032;&amp;#080;&amp;#111;&amp;#105;&amp;#110;&amp;#116;&amp;#040;&amp;#049;&amp;#046;&amp;#044;&amp;#032;&amp;#048;&amp;#046;&amp;#041;&amp;#093;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#100;&amp;#032;&amp;#061;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#040;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#109;&amp;#105;&amp;#110;&amp;#091;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#032;&amp;#105;&amp;#110;&amp;#032;&amp;#112;&amp;#115;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#109;&amp;#105;&amp;#110;&amp;#032;&amp;#097;&amp;#046;&amp;#088;&amp;#032;&amp;#098;&amp;#046;&amp;#088;&amp;#093;&amp;#044;&amp;#032;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#109;&amp;#105;&amp;#110;&amp;#091;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#032;&amp;#105;&amp;#110;&amp;#032;&amp;#112;&amp;#115;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#109;&amp;#105;&amp;#110;&amp;#032;&amp;#097;&amp;#046;&amp;#089;&amp;#032;&amp;#098;&amp;#046;&amp;#089;&amp;#093;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#108;&amp;#105;&amp;#110;&amp;#101;&amp;#084;&amp;#111;&amp;#032;&amp;#112;&amp;#032;&amp;#061;&amp;#032;&amp;#040;&amp;#076;&amp;#105;&amp;#110;&amp;#101;&amp;#083;&amp;#101;&amp;#103;&amp;#109;&amp;#101;&amp;#110;&amp;#116;&amp;#040;&amp;#112;&amp;#044;&amp;#032;&amp;#116;&amp;#114;&amp;#117;&amp;#101;&amp;#041;&amp;#032;&amp;#058;&amp;#062;&amp;#032;&amp;#080;&amp;#097;&amp;#116;&amp;#104;&amp;#083;&amp;#101;&amp;#103;&amp;#109;&amp;#101;&amp;#110;&amp;#116;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#112;&amp;#097;&amp;#116;&amp;#104;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#104;&amp;#097;&amp;#112;&amp;#101;&amp;#115;&amp;#046;&amp;#080;&amp;#097;&amp;#116;&amp;#104;&amp;#040;&amp;#083;&amp;#116;&amp;#114;&amp;#111;&amp;#107;&amp;#101;&amp;#061;&amp;#066;&amp;#114;&amp;#117;&amp;#115;&amp;#104;&amp;#101;&amp;#115;&amp;#046;&amp;#066;&amp;#108;&amp;#097;&amp;#099;&amp;#107;&amp;#044;&amp;#032;&amp;#083;&amp;#116;&amp;#114;&amp;#111;&amp;#107;&amp;#101;&amp;#084;&amp;#104;&amp;#105;&amp;#099;&amp;#107;&amp;#110;&amp;#101;&amp;#115;&amp;#115;&amp;#061;&amp;#048;&amp;#046;&amp;#048;&amp;#048;&amp;#051;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#112;&amp;#097;&amp;#116;&amp;#104;&amp;#046;&amp;#068;&amp;#097;&amp;#116;&amp;#097;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#080;&amp;#097;&amp;#116;&amp;#104;&amp;#071;&amp;#101;&amp;#111;&amp;#109;&amp;#101;&amp;#116;&amp;#114;&amp;#121;&amp;#091;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#032;&amp;#105;&amp;#110;&amp;#032;&amp;#112;&amp;#115;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#080;&amp;#097;&amp;#116;&amp;#104;&amp;#070;&amp;#105;&amp;#103;&amp;#117;&amp;#114;&amp;#101;&amp;#040;&amp;#097;&amp;#045;&amp;#100;&amp;#044;&amp;#032;&amp;#091;&amp;#108;&amp;#105;&amp;#110;&amp;#101;&amp;#084;&amp;#111;&amp;#040;&amp;#098;&amp;#045;&amp;#100;&amp;#041;&amp;#093;&amp;#044;&amp;#032;&amp;#102;&amp;#097;&amp;#108;&amp;#115;&amp;#101;&amp;#041;&amp;#093;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#040;&amp;#065;&amp;#112;&amp;#112;&amp;#108;&amp;#105;&amp;#099;&amp;#097;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#040;&amp;#041;&amp;#041;&amp;#046;&amp;#082;&amp;#117;&amp;#110;&amp;#040;&amp;#087;&amp;#105;&amp;#110;&amp;#100;&amp;#111;&amp;#119;&amp;#040;&amp;#067;&amp;#111;&amp;#110;&amp;#116;&amp;#101;&amp;#110;&amp;#116;&amp;#061;&amp;#067;&amp;#111;&amp;#110;&amp;#116;&amp;#114;&amp;#111;&amp;#108;&amp;#115;&amp;#046;&amp;#086;&amp;#105;&amp;#101;&amp;#119;&amp;#098;&amp;#111;&amp;#120;&amp;#040;&amp;#067;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#061;&amp;#112;&amp;#097;&amp;#116;&amp;#104;&amp;#041;&amp;#041;&amp;#041;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#105;&amp;#103;&amp;#110;&amp;#111;&amp;#114;&amp;#101;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;This program produces the following output:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_NMRkpon4Ps0/TAvv-5JVu_I/AAAAAAAAAHE/4_5gTjL9Cb0/s1600/DragonCurve.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 236px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5479737235397262322" border="0" alt="" src="http://2.bp.blogspot.com/_NMRkpon4Ps0/TAvv-5JVu_I/AAAAAAAAAHE/4_5gTjL9Cb0/s400/DragonCurve.png" /&gt;&lt;/a&gt; &lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-8072663285884764503?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/8072663285884764503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=8072663285884764503' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8072663285884764503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8072663285884764503'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/06/dragon-curve-in-17-lines-of-f.html' title='A dragon curve in 17 lines of F#'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NMRkpon4Ps0/TAvv-5JVu_I/AAAAAAAAAHE/4_5gTjL9Cb0/s72-c/DragonCurve.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1189111605189614786</id><published>2010-06-06T17:11:00.002Z</published><updated>2010-06-06T17:13:23.633Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><category scheme='http://www.blogger.com/atom/ns#' term='cache oblivious'/><category scheme='http://www.blogger.com/atom/ns#' term='cache'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='cache miss'/><title type='text'>Cache oblivious algorithms: Matrix multiply</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb76"&gt;The F#.NET Journal&lt;/a&gt; just published an article about cache oblivious algorithms:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"The widespread adoption of CPU caches around two decades ago forced a change in the way programmers traverse data structures when performance is of interest. The classic style was to iterate directly using&lt;/em&gt; &lt;span style="font-family:courier new;"&gt;for&lt;/span&gt;&lt;em&gt; loops. Two new styles have emerged: either a cache aware set of loops that tile the dataset into fixed-size subsets that fit into a cache of a known size, or a cache oblivious style that uses divide and conquer to subdivide the problem until it fits into the cache regardless its size. This article describes the revolutionary idea of cache oblivious algorithms via the elegant and efficient implementation of a matrix multiply in F#. In particular, we demonstrate the importance of these techniques in the context of multicore programming...."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb76"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1189111605189614786?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1189111605189614786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1189111605189614786' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1189111605189614786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1189111605189614786'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/06/cache-oblivious-algorithms-matrix.html' title='Cache oblivious algorithms: Matrix multiply'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-5008354865616637388</id><published>2010-05-25T02:18:00.003Z</published><updated>2010-05-25T02:47:12.157Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='array'/><category scheme='http://www.blogger.com/atom/ns#' term='hash table'/><category scheme='http://www.blogger.com/atom/ns#' term='bessel function'/><category scheme='http://www.blogger.com/atom/ns#' term='higher-order function'/><title type='text'>Mini hash table</title><content type='html'>&lt;p&gt;Imagine you're stuck on a desert island with only a few keystrokes and you desperately need to create your own rudimentary hash table. What might you do?&lt;/p&gt;&lt;p&gt;Well, here's one possible solution: a function that takes a sequence of key-value pairs and builds a hash table, returning another function that searches the hash table for the given key in order to find its corresponding value:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#104;&amp;#097;&amp;#115;&amp;#104;&amp;#116;&amp;#098;&amp;#108;&amp;#032;&amp;#120;&amp;#115;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#115;&amp;#112;&amp;#105;&amp;#110;&amp;#101;&amp;#032;&amp;#061;&amp;#032;&amp;#091;&amp;#124;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#095;&amp;#032;&amp;#105;&amp;#110;&amp;#032;&amp;#120;&amp;#115;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#082;&amp;#101;&amp;#115;&amp;#105;&amp;#122;&amp;#101;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#040;&amp;#041;&amp;#124;&amp;#093;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#102;&amp;#032;&amp;#107;&amp;#032;&amp;#061;&amp;#032;&amp;#115;&amp;#112;&amp;#105;&amp;#110;&amp;#101;&amp;#046;&amp;#091;&amp;#107;&amp;#046;&amp;#071;&amp;#101;&amp;#116;&amp;#072;&amp;#097;&amp;#115;&amp;#104;&amp;#067;&amp;#111;&amp;#100;&amp;#101;&amp;#040;&amp;#041;&amp;#032;&amp;#037;&amp;#032;&amp;#115;&amp;#112;&amp;#105;&amp;#110;&amp;#101;&amp;#046;&amp;#076;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#093;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#105;&amp;#116;&amp;#101;&amp;#114;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#040;&amp;#107;&amp;#044;&amp;#032;&amp;#118;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#107;&amp;#041;&amp;#046;&amp;#065;&amp;#100;&amp;#100;&amp;#032;&amp;#040;&amp;#107;&amp;#044;&amp;#032;&amp;#118;&amp;#041;&amp;#041;&amp;#032;&amp;#120;&amp;#115;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#107;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#083;&amp;#101;&amp;#113;&amp;#046;&amp;#112;&amp;#105;&amp;#099;&amp;#107;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#040;&amp;#107;&amp;#039;&amp;#044;&amp;#032;&amp;#118;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#107;&amp;#061;&amp;#107;&amp;#039;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#083;&amp;#111;&amp;#109;&amp;#101;&amp;#032;&amp;#118;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#032;&amp;#078;&amp;#111;&amp;#110;&amp;#101;&amp;#041;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#107;&amp;#041;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#104;&amp;#097;&amp;#115;&amp;#104;&amp;#116;&amp;#098;&amp;#108;&amp;#032;&amp;#058;&amp;#032;&amp;#115;&amp;#101;&amp;#113;&amp;#060;&amp;#039;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#039;&amp;#098;&amp;#062;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#040;&amp;#039;&amp;#097;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#039;&amp;#098;&amp;#041;&amp;#032;&amp;#119;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#039;&amp;#097;&amp;#032;&amp;#058;&amp;#032;&amp;#101;&amp;#113;&amp;#117;&amp;#097;&amp;#108;&amp;#105;&amp;#116;&amp;#121;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;Here's how you might use it to look up some squares:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#062;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#116;&amp;#098;&amp;#108;&amp;#032;&amp;#061;&amp;#032;&amp;#104;&amp;#097;&amp;#115;&amp;#104;&amp;#116;&amp;#098;&amp;#108;&amp;#032;&amp;#091;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#120;&amp;#032;&amp;#105;&amp;#110;&amp;#032;&amp;#048;&amp;#046;&amp;#046;&amp;#049;&amp;#048;&amp;#048;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#120;&amp;#093;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#116;&amp;#098;&amp;#108;&amp;#032;&amp;#058;&amp;#032;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#041;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#116;&amp;#098;&amp;#108;&amp;#032;&amp;#052;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#105;&amp;#116;&amp;#032;&amp;#058;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#054;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#062;&amp;#032;&amp;#116;&amp;#098;&amp;#108;&amp;#032;&amp;#049;&amp;#050;&amp;#059;&amp;#059;&amp;#013;&amp;#010;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#105;&amp;#116;&amp;#032;&amp;#058;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#052;&amp;#052;&lt;/p&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-5008354865616637388?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/5008354865616637388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=5008354865616637388' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5008354865616637388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5008354865616637388'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/05/mini-hash-table.html' title='Mini hash table'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3312112686267741685</id><published>2010-05-20T04:19:00.002Z</published><updated>2010-05-20T04:22:25.554Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='quicksort'/><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='generics'/><category scheme='http://www.blogger.com/atom/ns#' term='searching'/><category scheme='http://www.blogger.com/atom/ns#' term='purely functional'/><category scheme='http://www.blogger.com/atom/ns#' term='inline'/><category scheme='http://www.blogger.com/atom/ns#' term='sorting'/><category scheme='http://www.blogger.com/atom/ns#' term='selection'/><title type='text'>Quicksort</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb75"&gt;The F#.NET Journal&lt;/a&gt; just published an article about sorting:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"The quicksort algorithm was invented by Tony Hoare in 1960 and remains one of the most celebrated algorithms and is still of great practical value. Implementing some of the many variations of the quicksort algorithm serves as an excellent introduction to mixed-paradigm programming in F# and the implementation of a production-quality implementation benefits enormously from the use of a substantial number of exotic features of the F# language. Moreover, the quicksort algorithm is amenable to parallelization, which is of increasing relevance in the multicore era, so the performance characteristics of parallelizations of the implementations are also of great interest..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb75"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-3312112686267741685?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/3312112686267741685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=3312112686267741685' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3312112686267741685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3312112686267741685'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/05/quicksort.html' title='Quicksort'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-6811555950261986962</id><published>2010-05-14T03:16:00.009Z</published><updated>2010-05-14T06:11:13.187Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='clr'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel programming'/><category scheme='http://www.blogger.com/atom/ns#' term='tail calls'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='parametric polymorphism'/><category scheme='http://www.blogger.com/atom/ns#' term='tpl'/><category scheme='http://www.blogger.com/atom/ns#' term='jvm'/><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='hash table'/><category scheme='http://www.blogger.com/atom/ns#' term='value type'/><category scheme='http://www.blogger.com/atom/ns#' term='generics'/><category scheme='http://www.blogger.com/atom/ns#' term='f#'/><category scheme='http://www.blogger.com/atom/ns#' term='jit'/><title type='text'>Java vs F#</title><content type='html'>&lt;p&gt;Dr Cliff Click of &lt;a href="http://www.azulsystems.com/"&gt;Azul Systems&lt;/a&gt;, specialists in manycore JVM systems, recently published a &lt;a href="http://www.azulsystems.com/blog/cliff-click/2009-09-06-java-vs-c-performanceagain"&gt;blog post&lt;/a&gt; about the performance of Java compared primarily to C and C++ but also discussing C# and .NET. Three of Cliff's comments are of particular interest:&lt;/p&gt;&lt;p&gt;Under the heading "Places where C/C++ beats Java for obvious reasons":&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;"Value Types, such as a 'Complex' type require a full object in Java."&lt;/em&gt; - Dr Cliff Click&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;What Cliff forgot to mention is that .NET also provides value types and a far more compelling example than complex numbers is the humble hash table.&lt;/p&gt;&lt;p&gt;Consider the task of filling a hash table with 10,000,000 associations from integers to single-precision floating point numbers. This may be accomplished in Java as follows:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#112;&amp;#097;&amp;#099;&amp;#107;&amp;#097;&amp;#103;&amp;#101;&amp;#032;&amp;#104;&amp;#097;&amp;#115;&amp;#104;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#098;&amp;#101;&amp;#110;&amp;#099;&amp;#104;&amp;#109;&amp;#097;&amp;#114;&amp;#107;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#105;&amp;#109;&amp;#112;&amp;#111;&amp;#114;&amp;#116;&amp;#032;&amp;#106;&amp;#097;&amp;#118;&amp;#097;&amp;#046;&amp;#117;&amp;#116;&amp;#105;&amp;#108;&amp;#046;&amp;#072;&amp;#097;&amp;#115;&amp;#104;&amp;#077;&amp;#097;&amp;#112;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#112;&amp;#117;&amp;#098;&amp;#108;&amp;#105;&amp;#099;&amp;#032;&amp;#099;&amp;#108;&amp;#097;&amp;#115;&amp;#115;&amp;#032;&amp;#077;&amp;#097;&amp;#105;&amp;#110;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#112;&amp;#117;&amp;#098;&amp;#108;&amp;#105;&amp;#099;&amp;#032;&amp;#115;&amp;#116;&amp;#097;&amp;#116;&amp;#105;&amp;#099;&amp;#032;&amp;#118;&amp;#111;&amp;#105;&amp;#100;&amp;#032;&amp;#109;&amp;#097;&amp;#105;&amp;#110;&amp;#040;&amp;#083;&amp;#116;&amp;#114;&amp;#105;&amp;#110;&amp;#103;&amp;#091;&amp;#093;&amp;#032;&amp;#097;&amp;#114;&amp;#103;&amp;#115;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#110;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#048;&amp;#048;&amp;#048;&amp;#048;&amp;#048;&amp;#048;&amp;#048;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#106;&amp;#061;&amp;#048;&amp;#059;&amp;#032;&amp;#106;&amp;#060;&amp;#049;&amp;#048;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#106;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#111;&amp;#110;&amp;#103;&amp;#032;&amp;#115;&amp;#116;&amp;#097;&amp;#114;&amp;#116;&amp;#084;&amp;#105;&amp;#109;&amp;#101;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#099;&amp;#117;&amp;#114;&amp;#114;&amp;#101;&amp;#110;&amp;#116;&amp;#084;&amp;#105;&amp;#109;&amp;#101;&amp;#077;&amp;#105;&amp;#108;&amp;#108;&amp;#105;&amp;#115;&amp;#040;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#072;&amp;#097;&amp;#115;&amp;#104;&amp;#077;&amp;#097;&amp;#112;&amp;#032;&amp;#104;&amp;#097;&amp;#115;&amp;#104;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#072;&amp;#097;&amp;#115;&amp;#104;&amp;#077;&amp;#097;&amp;#112;&amp;#040;&amp;#110;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#105;&amp;#061;&amp;#049;&amp;#059;&amp;#032;&amp;#105;&amp;#060;&amp;#061;&amp;#110;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#105;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#104;&amp;#097;&amp;#115;&amp;#104;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#046;&amp;#112;&amp;#117;&amp;#116;&amp;#040;&amp;#105;&amp;#044;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#102;&amp;#032;&amp;#047;&amp;#032;&amp;#105;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#111;&amp;#117;&amp;#116;&amp;#046;&amp;#112;&amp;#114;&amp;#105;&amp;#110;&amp;#116;&amp;#108;&amp;#110;&amp;#040;&amp;#034;&amp;#109;&amp;#091;&amp;#049;&amp;#048;&amp;#048;&amp;#093;&amp;#032;&amp;#061;&amp;#032;&amp;#034;&amp;#032;&amp;#043;&amp;#032;&amp;#104;&amp;#097;&amp;#115;&amp;#104;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#046;&amp;#103;&amp;#101;&amp;#116;&amp;#040;&amp;#049;&amp;#048;&amp;#048;&amp;#041;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#111;&amp;#110;&amp;#103;&amp;#032;&amp;#116;&amp;#105;&amp;#109;&amp;#101;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#099;&amp;#117;&amp;#114;&amp;#114;&amp;#101;&amp;#110;&amp;#116;&amp;#084;&amp;#105;&amp;#109;&amp;#101;&amp;#077;&amp;#105;&amp;#108;&amp;#108;&amp;#105;&amp;#115;&amp;#040;&amp;#041;&amp;#032;&amp;#045;&amp;#032;&amp;#115;&amp;#116;&amp;#097;&amp;#114;&amp;#116;&amp;#084;&amp;#105;&amp;#109;&amp;#101;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#111;&amp;#117;&amp;#116;&amp;#046;&amp;#112;&amp;#114;&amp;#105;&amp;#110;&amp;#116;&amp;#108;&amp;#110;&amp;#040;&amp;#034;&amp;#084;&amp;#111;&amp;#111;&amp;#107;&amp;#058;&amp;#032;&amp;#034;&amp;#032;&amp;#043;&amp;#032;&amp;#116;&amp;#105;&amp;#109;&amp;#101;&amp;#032;&amp;#047;&amp;#032;&amp;#049;&amp;#101;&amp;#051;&amp;#032;&amp;#043;&amp;#032;&amp;#034;&amp;#115;&amp;#034;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#125;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The equivalent program in &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; is not only shorter but also 17× faster:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#110;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#048;&amp;#048;&amp;#048;&amp;#048;&amp;#048;&amp;#048;&amp;#048;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#109;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#067;&amp;#111;&amp;#108;&amp;#108;&amp;#101;&amp;#099;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#115;&amp;#046;&amp;#071;&amp;#101;&amp;#110;&amp;#101;&amp;#114;&amp;#105;&amp;#099;&amp;#046;&amp;#068;&amp;#105;&amp;#099;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#097;&amp;#114;&amp;#121;&amp;#040;&amp;#110;&amp;#041;&amp;#013;&amp;#010;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#061;&amp;#049;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#110;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#109;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#102;&amp;#032;&amp;#047;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#051;&amp;#050;&amp;#032;&amp;#105;&amp;#013;&amp;#010;&amp;#112;&amp;#114;&amp;#105;&amp;#110;&amp;#116;&amp;#102;&amp;#032;&amp;#034;&amp;#109;&amp;#091;&amp;#049;&amp;#048;&amp;#048;&amp;#093;&amp;#032;&amp;#061;&amp;#032;&amp;#037;&amp;#102;&amp;#092;&amp;#110;&amp;#034;&amp;#032;&amp;#109;&amp;#046;&amp;#091;&amp;#049;&amp;#048;&amp;#048;&amp;#093;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Specifically, Java takes 6.967s initially and 5.733s steady state whereas &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; takes only 0.414s.&lt;/p&gt;&lt;p&gt;In fact, &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; completes this benchmark so quickly that we would like to give it more work but Java cannot handle any more work without running out of memory on this 4Gb machine.&lt;/p&gt;&lt;p&gt;Elsewhere, Cliff also writes of Java:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;"Very Good Multi-Threading Support. Parallel programming is just easier in Java."&lt;/em&gt; - Dr Cliff Click&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;and later:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;"Not that I track C# all that closely but... I believe the JIT produces substantially slower code than Java"&lt;/em&gt; - Dr Cliff Click&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Allow us to demonstrate the otherwise. The Computer Language Shootout contains a well-formed benchmark called spectral-norm for which &lt;a href="http://shootout.alioth.debian.org/u32q/program.php?test=spectralnorm&amp;amp;lang=javasteady&amp;amp;id=2"&gt;the fastest Java solution&lt;/a&gt; is a 173-line parallel program. This implementation may be rewritten in only 24 lines of &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#065;&amp;#032;&amp;#105;&amp;#032;&amp;#106;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#032;&amp;#047;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#040;&amp;#040;&amp;#105;&amp;#032;&amp;#043;&amp;#032;&amp;#106;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#040;&amp;#105;&amp;#032;&amp;#043;&amp;#032;&amp;#106;&amp;#032;&amp;#043;&amp;#032;&amp;#049;&amp;#041;&amp;#032;&amp;#047;&amp;#032;&amp;#050;&amp;#032;&amp;#043;&amp;#032;&amp;#105;&amp;#032;&amp;#043;&amp;#032;&amp;#049;&amp;#041;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#105;&amp;#110;&amp;#108;&amp;#105;&amp;#110;&amp;#101;&amp;#032;&amp;#109;&amp;#117;&amp;#108;&amp;#032;&amp;#065;&amp;#032;&amp;#040;&amp;#117;&amp;#058;&amp;#032;&amp;#095;&amp;#032;&amp;#091;&amp;#093;&amp;#041;&amp;#032;&amp;#040;&amp;#118;&amp;#058;&amp;#032;&amp;#095;&amp;#032;&amp;#091;&amp;#093;&amp;#041;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#084;&amp;#104;&amp;#114;&amp;#101;&amp;#097;&amp;#100;&amp;#105;&amp;#110;&amp;#103;&amp;#046;&amp;#084;&amp;#097;&amp;#115;&amp;#107;&amp;#115;&amp;#046;&amp;#080;&amp;#097;&amp;#114;&amp;#097;&amp;#108;&amp;#108;&amp;#101;&amp;#108;&amp;#046;&amp;#070;&amp;#111;&amp;#114;&amp;#040;&amp;#048;&amp;#044;&amp;#032;&amp;#118;&amp;#046;&amp;#076;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#044;&amp;#032;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#118;&amp;#105;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#106;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#118;&amp;#046;&amp;#076;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#032;&amp;#045;&amp;#032;&amp;#049;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#118;&amp;#105;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#118;&amp;#105;&amp;#032;&amp;#043;&amp;#032;&amp;#065;&amp;#032;&amp;#105;&amp;#032;&amp;#106;&amp;#032;&amp;#042;&amp;#032;&amp;#117;&amp;#046;&amp;#091;&amp;#106;&amp;#093;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#118;&amp;#046;&amp;#091;&amp;#105;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#118;&amp;#105;&amp;#041;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#105;&amp;#103;&amp;#110;&amp;#111;&amp;#114;&amp;#101;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#065;&amp;#116;&amp;#065;&amp;#117;&amp;#032;&amp;#117;&amp;#032;&amp;#118;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#119;&amp;#032;&amp;#061;&amp;#032;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#032;&amp;#040;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#108;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#032;&amp;#117;&amp;#041;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#109;&amp;#117;&amp;#108;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#106;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#065;&amp;#032;&amp;#105;&amp;#032;&amp;#106;&amp;#041;&amp;#032;&amp;#117;&amp;#032;&amp;#119;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#109;&amp;#117;&amp;#108;&amp;#032;&amp;#040;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#105;&amp;#032;&amp;#106;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#065;&amp;#032;&amp;#106;&amp;#032;&amp;#105;&amp;#041;&amp;#032;&amp;#119;&amp;#032;&amp;#118;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#110;&amp;#032;&amp;#061;&amp;#032;&amp;#053;&amp;#053;&amp;#048;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#117;&amp;#044;&amp;#032;&amp;#118;&amp;#032;&amp;#061;&amp;#032;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#032;&amp;#110;&amp;#032;&amp;#049;&amp;#046;&amp;#048;&amp;#044;&amp;#032;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#032;&amp;#110;&amp;#032;&amp;#048;&amp;#046;&amp;#048;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#057;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#065;&amp;#116;&amp;#065;&amp;#117;&amp;#032;&amp;#117;&amp;#032;&amp;#118;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#065;&amp;#116;&amp;#065;&amp;#117;&amp;#032;&amp;#118;&amp;#032;&amp;#117;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#117;&amp;#044;&amp;#032;&amp;#118;&amp;#032;&amp;#061;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#117;&amp;#044;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#118;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#112;&amp;#114;&amp;#105;&amp;#110;&amp;#116;&amp;#102;&amp;#032;&amp;#034;&amp;#037;&amp;#048;&amp;#046;&amp;#057;&amp;#102;&amp;#092;&amp;#110;&amp;#034;&amp;#032;&amp;#040;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#046;&amp;#100;&amp;#111;&amp;#116;&amp;#032;&amp;#117;&amp;#032;&amp;#118;&amp;#032;&amp;#047;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#046;&amp;#100;&amp;#111;&amp;#116;&amp;#032;&amp;#118;&amp;#032;&amp;#118;&amp;#041;&amp;#041;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;In the Java, dozens of lines of code were devoted to parallelism. In contrast, only two lines of code were altered to parallelize the &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;. So it would seem that parallel programming is not "just easier in Java".&lt;/p&gt;&lt;p&gt;The the serial Java takes 12.722s initially and 12.299s steady state whereas &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; takes only 12.18s from a cold start. On this 8-core 2xE5405 2.0GHz Xeon, the parallel Java takes 1.839s initially and 1.820s steady state whereas the parallel &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; takes only 1.60s from a cold start. The fact that Java is slower in every single case indicates that the CLR's JIT is not "producing substantially slower code than Java".&lt;/p&gt;&lt;p&gt;Finally, Cliff made no mention of two other design deficiencies that cripple Java's performance. Firstly, their type erasure approach to generics incurs massive performance degradation for a lot of generic code because it leads to unnecessary boxing. Secondly, the JVM's lack of tail call elimination is not only a growing hindrance in the era of functional programming but the only general-purpose workaround, trampolines, is typically 10× slower that necessary.&lt;/p&gt;&lt;p&gt;If you want to learn how to write fast parallel programs in &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;, read our book &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;Visual F# 2010 for Technical Computing&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-6811555950261986962?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/6811555950261986962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=6811555950261986962' title='47 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6811555950261986962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/6811555950261986962'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/05/java-vs-f.html' title='Java vs F#'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>47</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3929280253223582615</id><published>2010-05-06T01:27:00.001Z</published><updated>2010-05-06T01:29:11.409Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='lu decomposition'/><category scheme='http://www.blogger.com/atom/ns#' term='scimark2'/><category scheme='http://www.blogger.com/atom/ns#' term='monte-carlo'/><category scheme='http://www.blogger.com/atom/ns#' term='sparse linear algebra'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><title type='text'>Parallelizing the SciMark2 benchmark: part 2</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb74"&gt;The F#.NET Journal&lt;/a&gt; just published an article about parallel programming:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"The SciMark2 benchmark is one of the better benchmarks for programming languages and their implementations in the context of technical computing. This article is the second in a two-part series revisiting the SciMark2 benchmark to examine the parallelization of each of its component tasks. Specifically, the Monte-Carlo, sparse matrix-vector multiplication and LU decomposition tests. The results are of general interest in the context of improving performance on multicores using parallel programming..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb74"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-3929280253223582615?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/3929280253223582615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=3929280253223582615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3929280253223582615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3929280253223582615'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/05/parallelizing-scimark2-benchmark-part-2.html' title='Parallelizing the SciMark2 benchmark: part 2'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4142508150924348062</id><published>2010-04-19T23:31:00.002Z</published><updated>2010-04-19T23:32:21.424Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='cheat sheet'/><category scheme='http://www.blogger.com/atom/ns#' term='key bindings'/><category scheme='http://www.blogger.com/atom/ns#' term='Expert F#'/><title type='text'>Visual F# 2010 key binding cheat sheet</title><content type='html'>&lt;p&gt;Download your copy of Microsoft's official F# key bindings cheat sheet &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=92ced922-d505-457a-8c9c-84036160639f"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4142508150924348062?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4142508150924348062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4142508150924348062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4142508150924348062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4142508150924348062'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/04/visual-f-2010-key-binding-cheat-sheet.html' title='Visual F# 2010 key binding cheat sheet'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-698120258604791336</id><published>2010-04-19T21:02:00.004Z</published><updated>2010-04-19T21:24:14.319Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='case study'/><title type='text'>"by moving to F# we reduced code size by nearly 75 percent"</title><content type='html'>&lt;p&gt;&lt;a href="https://www.grangeinsurance.com/"&gt;Grange Insurance&lt;/a&gt; of Columbus OH recently published a compelling &lt;a href="http://www.microsoft.com/casestudies/case_study_detail.aspx?casestudyid=4000005226"&gt;case study&lt;/a&gt; regarding their use of Microsoft's new &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;Visual F# 2010&lt;/a&gt; programming language.&lt;/p&gt;&lt;p&gt;They cite clarity as a major advantage of &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt;:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;"We liked that Visual F# is tailored to highly mathematical problems, helping programmers work more closely to the problem domain and enabling actuaries and other nonprogrammers to review the code as they would a math formula,"&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;and parallelism:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;"We liked the .NET Parallel Extensions available through F# for managing parallelism automatically through the runtime system."&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;and integrated development environment and interoperability with existing technologies:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;"We also liked that Visual F# is an integrated part of the Visual Studio tool set and the .NET Framework. That meant our programmers could use the same IDE and powerful .NET libraries they knew from having developed the earlier version of the solution in Visual C#."&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;For other &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; success stories, read the &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/free/introduction.html?fsb"&gt;freely available first article from The F#.NET Journal&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-698120258604791336?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/698120258604791336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=698120258604791336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/698120258604791336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/698120258604791336'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/04/by-moving-to-f-we-reduced-code-size-by.html' title='&quot;by moving to F# we reduced code size by nearly 75 percent&quot;'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1053795539443778579</id><published>2010-04-19T00:12:00.007Z</published><updated>2010-05-01T01:31:12.748Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='second edition'/><category scheme='http://www.blogger.com/atom/ns#' term='visual f# 2010 for technical computing'/><category scheme='http://www.blogger.com/atom/ns#' term='f# for technical computing'/><title type='text'>Visual F# 2010 for Technical Computing</title><content type='html'>&lt;p&gt;Following the ground-breaking &lt;a href="http://msdn.microsoft.com/en-us/library/dd233154.aspx"&gt;product release of Visual F#&lt;/a&gt; by Microsoft as part of &lt;a href="http://msdn.microsoft.com/en-us/vstudio/default.aspx"&gt;Visual Studio 2010&lt;/a&gt;, we have updated our &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F# for Technical Computing&lt;/a&gt; book to cover both &lt;a href="http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec.html"&gt;F# 2.0&lt;/a&gt; and .NET 4.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;Visual F# 2010 for Technical Computing&lt;/a&gt; includes a variety of changes throughout the book, some affecting changes to the language and others affecting the use of libraries. The three most prominent changes are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Chapter 10: Concurrent Programming&lt;/strong&gt; now covers the final production-quality implementation of asynchronous workflows in the F# 2.0 language.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Chapter 11: Parallel Programming&lt;/strong&gt; now replaces the TPL CTP with the constructs for shared-memory parallelism that have been integrated into .NET 4. Both the API and the performance characteristics have changed considerably.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Chapter 12: Performance&lt;/strong&gt; has been completely revamped due to massive improvements in the F# compiler and the &lt;a href="http://channel9.msdn.com/shows/Going+Deep/Maoni-Stephens-and-Andrew-Pardoe-CLR-4-Inside-Background-GC/"&gt;new garbage collector&lt;/a&gt; in .NET 4.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;One particular surprise was the substantial difference in performance characteristics between Visual Studio 2010 and the F# prereleases. Several of the benchmarks covered in the book show 400% changes! &lt;p&gt;&lt;/p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2ffsharpnews.blogspot.com%2f2010%2f04%2fvisual-f-2010-for-technical-computing.html"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2ffsharpnews.blogspot.com%2f2010%2f04%2fvisual-f-2010-for-technical-computing.html" /&gt;&lt;/a&gt; &lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1053795539443778579?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1053795539443778579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1053795539443778579' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1053795539443778579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1053795539443778579'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/04/visual-f-2010-for-technical-computing.html' title='Visual F# 2010 for Technical Computing'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3722149646399819872</id><published>2010-04-15T19:42:00.001Z</published><updated>2010-04-15T19:44:02.808Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='route finding'/><category scheme='http://www.blogger.com/atom/ns#' term='a* algorithm'/><category scheme='http://www.blogger.com/atom/ns#' term='dijkstra'/><category scheme='http://www.blogger.com/atom/ns#' term='artificial intelligence'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><category scheme='http://www.blogger.com/atom/ns#' term='path finding'/><title type='text'>The A* algorithm</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb73"&gt;The F#.NET Journal&lt;/a&gt; just published an article about route finding:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"The A* algorithm is often used for route finding in game AI and is a generalization of Dijkstra's shortest-path algorithm from graph theory. This article describes two generic implementations of the A* algorithm written in F#. The first implementation is a simple prototype written in a purely functional style using data structures provided by F#. The second implementation uses mutable .NET collections to perform the same computation substantially more quickly. Finally, an example application is provided that finds a route across the Grand Canyon..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb73"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-3722149646399819872?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/3722149646399819872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=3722149646399819872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3722149646399819872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3722149646399819872'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/04/a-algorithm.html' title='The A* algorithm'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-7219290247230673909</id><published>2010-04-14T13:31:00.005Z</published><updated>2010-04-14T14:03:37.369Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='f# release'/><category scheme='http://www.blogger.com/atom/ns#' term='visual studio 2010'/><title type='text'>Visual Studio 2010 with F# out now!</title><content type='html'>&lt;p&gt;MSDN subscribers can now download &lt;a href="http://www.microsoft.com/visualstudio/en-us/"&gt;Visual Studio 2010&lt;/a&gt; that provides the first fully-supported product release of the new F# programming language. Don Syme, the creator of F# at Microsoft Research Cambridge, posted an &lt;a href="http://blogs.msdn.com/dsyme/archive/2010/04/12/f-2-0-released-as-part-of-visual-studio-2010.aspx"&gt;emotional blog article&lt;/a&gt; accompanying this release as it represents the culmination of 7 years of work.&lt;/p&gt;&lt;p&gt;We shall be updating all of our F#-related &lt;a href="http://www.ffconsultancy.com/products/?fsb"&gt;products&lt;/a&gt; to work with the new product release and, in particular, our &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_numerics/?fsb"&gt;F# for Numerics&lt;/a&gt; and &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_visualization/?fsb"&gt;F# for Visualization&lt;/a&gt; software libraries will now see their first product releases as well. Future articles in the &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb"&gt;F#.NET Journal&lt;/a&gt; will cover every aspect of Visual Studio 2010 in detail.&lt;/p&gt;&lt;p&gt;Note that there is no Visual F# Express edition and, at the time of writing, there is no user-friendly way to develop F# on .NET 4 for free. However, you can develop F# 2.0 on .NET 3 using Visual Studio 2008 or compile F# 2.0 for .NET 4 using the command-line compilers. Brian McNamara of the F# team has encouraged anyone wanting Visual F# Express to upvote &lt;a href="http://connect.microsoft.com/VisualStudio/feedback/details/550454/f-in-express-or-integrated-shell-modes"&gt;this motion&lt;/a&gt;. Hopefully we will see another Visual Studio 2010 Shell with separate F# release that makes it easy to develop F# software with the latest libraries for free. The F# team are also committed to open source cross-platform development, to the extent that they are &lt;a href="http://blogs.msdn.com/dsyme/archive/2010/03/10/contract-position-in-the-f-team-compiler-and-visual-tools-software-engineer-for-cross-platform-f.aspx"&gt;hiring a new contractor&lt;/a&gt; specifically to help with this.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-7219290247230673909?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/7219290247230673909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=7219290247230673909' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7219290247230673909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/7219290247230673909'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/04/visual-studio-2010-with-f-out-now.html' title='Visual Studio 2010 with F# out now!'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-5193496657467438740</id><published>2010-04-11T00:32:00.003Z</published><updated>2010-04-15T18:22:54.842Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='review'/><category scheme='http://www.blogger.com/atom/ns#' term='f# for technical computing'/><category scheme='http://www.blogger.com/atom/ns#' term='f# for scientists'/><title type='text'>Book review: F# for Scientists</title><content type='html'>&lt;p&gt;Our 2006 book &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_scientists/?fsb"&gt;F# for Scientists&lt;/a&gt; has received its &lt;a href="http://www.amazon.com/review/R3UUOW1HFM8SXJ/ref=cm_cr_rdp_perm"&gt;ninth review on Amazon&lt;/a&gt; and, like all previous reviews, was given the maximum 5-star rating!&lt;/p&gt;&lt;p&gt;Andre M. Van Meulebrouck from California writes:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;A hallmark of this book is conciseness. (The book itself is fairly small and thin; and nicely hardbound.)&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;This book is a gold mine of great information that could take years to fully digest!&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;While the book is titled as a scientific book, and it is that; it also has much more to offer. It should be of great interest to scientists, mathematicians, statisticians, computer scientists, financial programmers, and any programmers who want to write good code. It features a well balanced selection of topics including: algorithms, data structures, visualization, graphics, threading, performance, and optimization. The use of DirectX is demonstrated. Some compilation techniques are also shown.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;A nice selection of recursive list algorithms are presented that showcase the kind of problem solving that can be done purely with recursion and list processing. These are classic idioms that are good to be exposed to; like power set, and substitution with replacement.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Many of the examples are very much in the spirit of the Scheme Revised Reports, wherein the most gutted possible examples are used to demonstrate a given primitive or concept. Nothing extraneous to cause distractions.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;There is a complement to this book called "&lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F# for Technical Computing&lt;/a&gt;" that can be purchased from Flying Frog Consultancy. The complementary book adds nicely to the material in "F# for Scientists"; with discussions on such topics as parallel computing and WPF. In addition, the complementary book features longer page sizes, a stay flat (music book style) binding, and color; all of which I really like. (I wish more technical books made use of color because code is much easier to read when you see comments in one color, keywords in another, etc..)&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Both books are gems. There are also counterparts to these books for OCaml programmers.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Relevant software can also be obtained from the Flying Frog Consultancy (which has, as part of its logo: "Putting the fun in functional since 2005").&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-5193496657467438740?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/5193496657467438740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=5193496657467438740' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5193496657467438740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/5193496657467438740'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/04/book-review-f-for-scientists.html' title='Book review: F# for Scientists'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-322475184048139730</id><published>2010-04-03T02:25:00.002Z</published><updated>2010-04-03T02:38:35.552Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='application'/><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='pop3'/><category scheme='http://www.blogger.com/atom/ns#' term='smtp'/><category scheme='http://www.blogger.com/atom/ns#' term='automated'/><category scheme='http://www.blogger.com/atom/ns#' term='gui'/><category scheme='http://www.blogger.com/atom/ns#' term='e-mail'/><title type='text'>An e-mail client in F#</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb72"&gt;The F#.NET Journal&lt;/a&gt; just published an article about the design and implementation of a complete GUI application:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"An e-mail client is an application that checks a remote mailbox for incoming messages and allows the user to send newly composed messages and replies to received messages. Incoming e-mails are typically read using the Post Office Protocol version 3 (POP3) which is a simple plain-text protocol implemented over TCP sockets. Outgoing e-mails are sent using the Simple Message Transfer Protocol (SMTP), an implementation of which is provided by the .NET framework. This article describes the design and implementation of an e-mail client that can be used for basic e-mail handling but, in particular, is easily programmed to perform tasks such as transaction processing automatically..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb72"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-322475184048139730?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/322475184048139730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=322475184048139730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/322475184048139730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/322475184048139730'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/04/e-mail-client-in-f.html' title='An e-mail client in F#'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-1507521264384870776</id><published>2010-03-18T22:09:00.003Z</published><updated>2010-03-18T23:39:13.613Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='clr'/><category scheme='http://www.blogger.com/atom/ns#' term='tail calls'/><category scheme='http://www.blogger.com/atom/ns#' term='.net 4'/><title type='text'>.NET 4's improved tail call elimination</title><content type='html'>&lt;p&gt;Existing versions of the .NET Framework sometimes unnecessarily fail to eliminate tail calls. Grant Richins of Microsoft recently published &lt;a href="http://blogs.msdn.com/clrcodegeneration/archive/2009/05/11/tail-call-improvements-in-net-framework-4.aspx"&gt;a blog post&lt;/a&gt; explaining how this has been addressed in .NET 4. The improvements make it entirely feasible to write idiomatic pure and impure functional &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; programs relying upon tail call elimination without having to worry about stack overflows.&lt;/p&gt;&lt;p&gt;Such changes in the very fabric of .NET also demonstrate just how committed Microsoft are to their new &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; programming language.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-1507521264384870776?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/1507521264384870776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=1507521264384870776' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1507521264384870776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/1507521264384870776'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/03/net-4s-improved-tail-call-elimination.html' title='.NET 4&apos;s improved tail call elimination'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3854499811988668623</id><published>2010-03-18T22:03:00.002Z</published><updated>2010-03-18T22:05:46.363Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='visual studio 2010'/><title type='text'>New VS2010 release date</title><content type='html'>&lt;p&gt;Microsoft have updated &lt;a href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions/professional"&gt;the product page for Visual Studio 2010&lt;/a&gt; (which includes F#!) with a new release date of 12th April 2010 under the "Buy" section.&lt;/p&gt;&lt;p&gt;24 days and counting!!!&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-3854499811988668623?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/3854499811988668623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=3854499811988668623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3854499811988668623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/3854499811988668623'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/03/new-vs2010-release-date.html' title='New VS2010 release date'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-8463588782385966038</id><published>2010-03-16T05:27:00.002Z</published><updated>2010-03-16T05:30:50.056Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='pretty print'/><category scheme='http://www.blogger.com/atom/ns#' term='editor'/><category scheme='http://www.blogger.com/atom/ns#' term='parsing'/><category scheme='http://www.blogger.com/atom/ns#' term='gui'/><category scheme='http://www.blogger.com/atom/ns#' term='windows presentation foundation'/><category scheme='http://www.blogger.com/atom/ns#' term='markdown'/><title type='text'>Writing an article editor with Windows Presentation Foundation</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb71"&gt;The F#.NET Journal&lt;/a&gt; just published an article about the design and implementation of a complete GUI application:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"This article describes the article editing tool we are creating to help automate the process of generating journal content. The editor provides a simple text editor where the author writes a form of markdown. The markdown is interactively parsed and pretty printed in a separate pane and the editor allows the result to be exported to HTML for inclusion in the journal. The application is based entirely upon Windows Presentation Foundation..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb71"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-8463588782385966038?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/8463588782385966038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=8463588782385966038' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8463588782385966038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/8463588782385966038'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/03/writing-article-editor-with-windows.html' title='Writing an article editor with Windows Presentation Foundation'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-4941842213488782052</id><published>2010-03-10T00:30:00.003Z</published><updated>2010-03-10T00:49:50.199Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='ray tracer'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmark'/><title type='text'>F# vs Unmanaged C++ for parallel numerics</title><content type='html'>&lt;p&gt;We obtained a surprising performance result when comparing optimized parallel ray tracers written in &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; and C++ recently. The following two programs render the same highly complex scenes containing over a million objects. Surprisingly, the 136-line managed &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; program runs slightly faster at 17s than the 168-line unmanaged C++ which takes 18s.&lt;/p&gt;&lt;p&gt;Here is the &lt;a href="http://www.ffconsultancy.com/products/fsharp_for_technical_computing/?fsb"&gt;F#&lt;/a&gt; program:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#068;&amp;#105;&amp;#097;&amp;#103;&amp;#110;&amp;#111;&amp;#115;&amp;#116;&amp;#105;&amp;#099;&amp;#115;&amp;#046;&amp;#083;&amp;#116;&amp;#111;&amp;#112;&amp;#119;&amp;#097;&amp;#116;&amp;#099;&amp;#104;&amp;#046;&amp;#083;&amp;#116;&amp;#097;&amp;#114;&amp;#116;&amp;#078;&amp;#101;&amp;#119;&amp;#040;&amp;#041;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#100;&amp;#101;&amp;#108;&amp;#116;&amp;#097;&amp;#032;&amp;#061;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#032;&amp;#101;&amp;#112;&amp;#115;&amp;#105;&amp;#108;&amp;#111;&amp;#110;&amp;#095;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#091;&amp;#060;&amp;#083;&amp;#116;&amp;#114;&amp;#117;&amp;#099;&amp;#116;&amp;#062;&amp;#093;&amp;#013;&amp;#010;&amp;#116;&amp;#121;&amp;#112;&amp;#101;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#120;&amp;#032;&amp;#058;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#121;&amp;#032;&amp;#058;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#118;&amp;#097;&amp;#108;&amp;#032;&amp;#122;&amp;#032;&amp;#058;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#040;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#041;&amp;#032;&amp;#061;&amp;#032;&amp;#123;&amp;#120;&amp;#061;&amp;#120;&amp;#059;&amp;#032;&amp;#121;&amp;#061;&amp;#121;&amp;#059;&amp;#032;&amp;#122;&amp;#061;&amp;#122;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#115;&amp;#116;&amp;#097;&amp;#116;&amp;#105;&amp;#099;&amp;#032;&amp;#109;&amp;#101;&amp;#109;&amp;#098;&amp;#101;&amp;#114;&amp;#032;&amp;#040;&amp;#032;&amp;#043;&amp;#032;&amp;#041;&amp;#032;&amp;#040;&amp;#097;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#044;&amp;#032;&amp;#098;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#040;&amp;#097;&amp;#046;&amp;#120;&amp;#043;&amp;#098;&amp;#046;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#046;&amp;#121;&amp;#043;&amp;#098;&amp;#046;&amp;#121;&amp;#044;&amp;#032;&amp;#097;&amp;#046;&amp;#122;&amp;#043;&amp;#098;&amp;#046;&amp;#122;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#115;&amp;#116;&amp;#097;&amp;#116;&amp;#105;&amp;#099;&amp;#032;&amp;#109;&amp;#101;&amp;#109;&amp;#098;&amp;#101;&amp;#114;&amp;#032;&amp;#040;&amp;#032;&amp;#045;&amp;#032;&amp;#041;&amp;#032;&amp;#040;&amp;#097;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#044;&amp;#032;&amp;#098;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#040;&amp;#097;&amp;#046;&amp;#120;&amp;#045;&amp;#098;&amp;#046;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#046;&amp;#121;&amp;#045;&amp;#098;&amp;#046;&amp;#121;&amp;#044;&amp;#032;&amp;#097;&amp;#046;&amp;#122;&amp;#045;&amp;#098;&amp;#046;&amp;#122;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#115;&amp;#116;&amp;#097;&amp;#116;&amp;#105;&amp;#099;&amp;#032;&amp;#109;&amp;#101;&amp;#109;&amp;#098;&amp;#101;&amp;#114;&amp;#032;&amp;#040;&amp;#032;&amp;#042;&amp;#032;&amp;#041;&amp;#032;&amp;#040;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#040;&amp;#097;&amp;#042;&amp;#098;&amp;#046;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#042;&amp;#098;&amp;#046;&amp;#121;&amp;#044;&amp;#032;&amp;#097;&amp;#042;&amp;#098;&amp;#046;&amp;#122;&amp;#041;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#032;&amp;#120;&amp;#032;&amp;#121;&amp;#032;&amp;#122;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#040;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#041;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#100;&amp;#111;&amp;#116;&amp;#032;&amp;#040;&amp;#097;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#040;&amp;#098;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#061;&amp;#032;&amp;#097;&amp;#046;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#098;&amp;#046;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#097;&amp;#046;&amp;#121;&amp;#032;&amp;#042;&amp;#032;&amp;#098;&amp;#046;&amp;#121;&amp;#032;&amp;#043;&amp;#032;&amp;#097;&amp;#046;&amp;#122;&amp;#032;&amp;#042;&amp;#032;&amp;#098;&amp;#046;&amp;#122;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#108;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#032;&amp;#114;&amp;#032;&amp;#061;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#100;&amp;#111;&amp;#116;&amp;#032;&amp;#114;&amp;#032;&amp;#114;&amp;#041;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#105;&amp;#115;&amp;#101;&amp;#032;&amp;#114;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#046;&amp;#032;&amp;#047;&amp;#032;&amp;#108;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#032;&amp;#114;&amp;#032;&amp;#042;&amp;#032;&amp;#114;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#116;&amp;#121;&amp;#112;&amp;#101;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#111;&amp;#102;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#042;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#095;&amp;#116;&amp;#121;&amp;#112;&amp;#101;&amp;#013;&amp;#010;&amp;#097;&amp;#110;&amp;#100;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#095;&amp;#116;&amp;#121;&amp;#112;&amp;#101;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#071;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#032;&amp;#111;&amp;#102;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#042;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#042;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#042;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#042;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#105;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#068;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#046;&amp;#080;&amp;#111;&amp;#115;&amp;#105;&amp;#116;&amp;#105;&amp;#118;&amp;#101;&amp;#073;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#105;&amp;#110;&amp;#108;&amp;#105;&amp;#110;&amp;#101;&amp;#032;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#040;&amp;#100;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#040;&amp;#118;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#114;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#118;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#118;&amp;#046;&amp;#120;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#118;&amp;#121;&amp;#032;&amp;#061;&amp;#032;&amp;#118;&amp;#046;&amp;#121;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#118;&amp;#122;&amp;#032;&amp;#061;&amp;#032;&amp;#118;&amp;#046;&amp;#122;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#061;&amp;#032;&amp;#118;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#118;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#118;&amp;#121;&amp;#032;&amp;#042;&amp;#032;&amp;#118;&amp;#121;&amp;#032;&amp;#043;&amp;#032;&amp;#118;&amp;#122;&amp;#032;&amp;#042;&amp;#032;&amp;#118;&amp;#122;&amp;#032;&amp;#045;&amp;#032;&amp;#114;&amp;#032;&amp;#042;&amp;#032;&amp;#114;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#060;&amp;#032;&amp;#048;&amp;#046;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#105;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#098;&amp;#032;&amp;#061;&amp;#032;&amp;#118;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#046;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#118;&amp;#121;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#046;&amp;#121;&amp;#032;&amp;#043;&amp;#032;&amp;#118;&amp;#122;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#046;&amp;#122;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#098;&amp;#050;&amp;#032;&amp;#061;&amp;#032;&amp;#098;&amp;#032;&amp;#042;&amp;#032;&amp;#098;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#098;&amp;#050;&amp;#032;&amp;#060;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#105;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#061;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#098;&amp;#050;&amp;#032;&amp;#045;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#116;&amp;#049;&amp;#032;&amp;#061;&amp;#032;&amp;#098;&amp;#032;&amp;#045;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#105;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#116;&amp;#049;&amp;#032;&amp;#062;&amp;#032;&amp;#048;&amp;#046;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#116;&amp;#049;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#032;&amp;#098;&amp;#032;&amp;#043;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#039;&amp;#032;&amp;#040;&amp;#111;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#040;&amp;#100;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#040;&amp;#099;&amp;#032;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#114;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#118;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#099;&amp;#046;&amp;#120;&amp;#032;&amp;#045;&amp;#032;&amp;#111;&amp;#046;&amp;#120;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#118;&amp;#121;&amp;#032;&amp;#061;&amp;#032;&amp;#099;&amp;#046;&amp;#121;&amp;#032;&amp;#045;&amp;#032;&amp;#111;&amp;#046;&amp;#121;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#118;&amp;#122;&amp;#032;&amp;#061;&amp;#032;&amp;#099;&amp;#046;&amp;#122;&amp;#032;&amp;#045;&amp;#032;&amp;#111;&amp;#046;&amp;#122;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#118;&amp;#118;&amp;#032;&amp;#061;&amp;#032;&amp;#118;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#118;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#118;&amp;#121;&amp;#032;&amp;#042;&amp;#032;&amp;#118;&amp;#121;&amp;#032;&amp;#043;&amp;#032;&amp;#118;&amp;#122;&amp;#032;&amp;#042;&amp;#032;&amp;#118;&amp;#122;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#098;&amp;#032;&amp;#061;&amp;#032;&amp;#118;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#046;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#118;&amp;#121;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#046;&amp;#121;&amp;#032;&amp;#043;&amp;#032;&amp;#118;&amp;#122;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#046;&amp;#122;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#061;&amp;#032;&amp;#098;&amp;#032;&amp;#042;&amp;#032;&amp;#098;&amp;#032;&amp;#045;&amp;#032;&amp;#118;&amp;#118;&amp;#032;&amp;#043;&amp;#032;&amp;#114;&amp;#032;&amp;#042;&amp;#032;&amp;#114;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#062;&amp;#061;&amp;#032;&amp;#048;&amp;#046;&amp;#032;&amp;#038;&amp;#038;&amp;#032;&amp;#098;&amp;#032;&amp;#043;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#062;&amp;#061;&amp;#032;&amp;#048;&amp;#046;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#116;&amp;#121;&amp;#112;&amp;#101;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#123;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#108;&amp;#058;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#059;&amp;#032;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#110;&amp;#120;&amp;#058;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#059;&amp;#032;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#110;&amp;#121;&amp;#058;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#059;&amp;#032;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#110;&amp;#122;&amp;#058;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#040;&amp;#100;&amp;#105;&amp;#114;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#108;&amp;#039;&amp;#032;&amp;#040;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#058;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#041;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#108;&amp;#039;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#046;&amp;#120;&amp;#032;&amp;#045;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#046;&amp;#120;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#121;&amp;#032;&amp;#061;&amp;#032;&amp;#108;&amp;#039;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#046;&amp;#121;&amp;#032;&amp;#045;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#046;&amp;#121;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#122;&amp;#032;&amp;#061;&amp;#032;&amp;#108;&amp;#039;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#046;&amp;#122;&amp;#032;&amp;#045;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#046;&amp;#122;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#105;&amp;#108;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#046;&amp;#032;&amp;#047;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#120;&amp;#032;&amp;#042;&amp;#032;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#121;&amp;#032;&amp;#042;&amp;#032;&amp;#121;&amp;#032;&amp;#043;&amp;#032;&amp;#122;&amp;#032;&amp;#042;&amp;#032;&amp;#122;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#108;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#108;&amp;#039;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#120;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#105;&amp;#108;&amp;#032;&amp;#042;&amp;#032;&amp;#120;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#121;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#105;&amp;#108;&amp;#032;&amp;#042;&amp;#032;&amp;#121;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#122;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#105;&amp;#108;&amp;#032;&amp;#042;&amp;#032;&amp;#122;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#101;&amp;#099;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#117;&amp;#110;&amp;#099;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#040;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#044;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#044;&amp;#116;&amp;#121;&amp;#112;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#108;&amp;#039;&amp;#032;&amp;#061;&amp;#032;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#108;&amp;#039;&amp;#032;&amp;#060;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#108;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#109;&amp;#097;&amp;#116;&amp;#099;&amp;#104;&amp;#032;&amp;#116;&amp;#121;&amp;#112;&amp;#032;&amp;#119;&amp;#105;&amp;#116;&amp;#104;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#108;&amp;#039;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#071;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#040;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#044;&amp;#032;&amp;#099;&amp;#044;&amp;#032;&amp;#100;&amp;#044;&amp;#032;&amp;#101;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#097;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#098;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#099;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#100;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#101;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#101;&amp;#099;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#039;&amp;#032;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#117;&amp;#110;&amp;#099;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#040;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#044;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#044;&amp;#032;&amp;#116;&amp;#121;&amp;#112;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#039;&amp;#032;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#032;&amp;#038;&amp;#038;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#109;&amp;#097;&amp;#116;&amp;#099;&amp;#104;&amp;#032;&amp;#116;&amp;#121;&amp;#112;&amp;#032;&amp;#119;&amp;#105;&amp;#116;&amp;#104;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#116;&amp;#114;&amp;#117;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#071;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#032;&amp;#040;&amp;#097;&amp;#044;&amp;#032;&amp;#098;&amp;#044;&amp;#032;&amp;#099;&amp;#044;&amp;#032;&amp;#100;&amp;#044;&amp;#032;&amp;#101;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#039;&amp;#032;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#097;&amp;#032;&amp;#124;&amp;#124;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#039;&amp;#032;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#098;&amp;#032;&amp;#124;&amp;#124;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#039;&amp;#032;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#099;&amp;#032;&amp;#124;&amp;#124;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#039;&amp;#032;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#100;&amp;#032;&amp;#124;&amp;#124;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#039;&amp;#032;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#101;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#110;&amp;#101;&amp;#103;&amp;#095;&amp;#108;&amp;#105;&amp;#103;&amp;#104;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#105;&amp;#115;&amp;#101;&amp;#040;&amp;#118;&amp;#101;&amp;#099;&amp;#032;&amp;#049;&amp;#046;&amp;#032;&amp;#051;&amp;#046;&amp;#032;&amp;#045;&amp;#050;&amp;#046;&amp;#041;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#101;&amp;#099;&amp;#032;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#116;&amp;#114;&amp;#097;&amp;#099;&amp;#101;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#123;&amp;#108;&amp;#061;&amp;#105;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#059;&amp;#032;&amp;#110;&amp;#120;&amp;#061;&amp;#048;&amp;#046;&amp;#059;&amp;#032;&amp;#110;&amp;#121;&amp;#061;&amp;#048;&amp;#046;&amp;#059;&amp;#032;&amp;#110;&amp;#122;&amp;#061;&amp;#048;&amp;#046;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#108;&amp;#032;&amp;#061;&amp;#032;&amp;#105;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#048;&amp;#046;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#110;&amp;#032;&amp;#061;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#120;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#121;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#122;&amp;#032;&amp;#105;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#103;&amp;#032;&amp;#061;&amp;#032;&amp;#100;&amp;#111;&amp;#116;&amp;#032;&amp;#110;&amp;#032;&amp;#110;&amp;#101;&amp;#103;&amp;#095;&amp;#108;&amp;#105;&amp;#103;&amp;#104;&amp;#116;&amp;#032;&amp;#105;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#103;&amp;#032;&amp;#060;&amp;#032;&amp;#048;&amp;#046;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#048;&amp;#046;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#039;&amp;#032;&amp;#040;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#108;&amp;#032;&amp;#042;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#043;&amp;#032;&amp;#100;&amp;#101;&amp;#108;&amp;#116;&amp;#097;&amp;#032;&amp;#042;&amp;#032;&amp;#110;&amp;#041;&amp;#032;&amp;#110;&amp;#101;&amp;#103;&amp;#095;&amp;#108;&amp;#105;&amp;#103;&amp;#104;&amp;#116;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#048;&amp;#046;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#032;&amp;#103;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#102;&amp;#111;&amp;#108;&amp;#100;&amp;#053;&amp;#032;&amp;#102;&amp;#032;&amp;#120;&amp;#032;&amp;#097;&amp;#032;&amp;#098;&amp;#032;&amp;#099;&amp;#032;&amp;#100;&amp;#032;&amp;#101;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#040;&amp;#102;&amp;#032;&amp;#120;&amp;#032;&amp;#097;&amp;#041;&amp;#032;&amp;#098;&amp;#041;&amp;#032;&amp;#099;&amp;#041;&amp;#032;&amp;#100;&amp;#041;&amp;#032;&amp;#101;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#101;&amp;#099;&amp;#032;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#032;&amp;#108;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#032;&amp;#099;&amp;#032;&amp;#114;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#111;&amp;#098;&amp;#106;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#040;&amp;#099;&amp;#044;&amp;#032;&amp;#114;&amp;#044;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#108;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#032;&amp;#116;&amp;#104;&amp;#101;&amp;#110;&amp;#032;&amp;#111;&amp;#098;&amp;#106;&amp;#032;&amp;#101;&amp;#108;&amp;#115;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#097;&amp;#032;&amp;#061;&amp;#032;&amp;#051;&amp;#046;&amp;#032;&amp;#042;&amp;#032;&amp;#114;&amp;#032;&amp;#047;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#032;&amp;#049;&amp;#050;&amp;#046;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#101;&amp;#099;&amp;#032;&amp;#098;&amp;#111;&amp;#117;&amp;#110;&amp;#100;&amp;#032;&amp;#040;&amp;#099;&amp;#044;&amp;#032;&amp;#114;&amp;#041;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#117;&amp;#110;&amp;#099;&amp;#116;&amp;#105;&amp;#111;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#040;&amp;#099;&amp;#039;&amp;#044;&amp;#032;&amp;#114;&amp;#039;&amp;#044;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#099;&amp;#044;&amp;#032;&amp;#109;&amp;#097;&amp;#120;&amp;#032;&amp;#114;&amp;#032;&amp;#040;&amp;#108;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#032;&amp;#040;&amp;#099;&amp;#032;&amp;#045;&amp;#032;&amp;#099;&amp;#039;&amp;#041;&amp;#032;&amp;#043;&amp;#032;&amp;#114;&amp;#039;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#124;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#040;&amp;#095;&amp;#044;&amp;#032;&amp;#095;&amp;#044;&amp;#032;&amp;#071;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#040;&amp;#118;&amp;#044;&amp;#032;&amp;#119;&amp;#044;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#041;&amp;#041;&amp;#032;&amp;#045;&amp;#062;&amp;#032;&amp;#102;&amp;#111;&amp;#108;&amp;#100;&amp;#053;&amp;#032;&amp;#098;&amp;#111;&amp;#117;&amp;#110;&amp;#100;&amp;#032;&amp;#040;&amp;#099;&amp;#044;&amp;#032;&amp;#114;&amp;#041;&amp;#032;&amp;#118;&amp;#032;&amp;#119;&amp;#032;&amp;#120;&amp;#032;&amp;#121;&amp;#032;&amp;#122;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#097;&amp;#117;&amp;#120;&amp;#032;&amp;#120;&amp;#039;&amp;#032;&amp;#122;&amp;#039;&amp;#032;&amp;#061;&amp;#032;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#032;&amp;#040;&amp;#108;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#032;&amp;#045;&amp;#032;&amp;#049;&amp;#041;&amp;#032;&amp;#040;&amp;#099;&amp;#032;&amp;#043;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#032;&amp;#120;&amp;#039;&amp;#032;&amp;#097;&amp;#032;&amp;#122;&amp;#039;&amp;#041;&amp;#032;&amp;#040;&amp;#048;&amp;#046;&amp;#053;&amp;#032;&amp;#042;&amp;#032;&amp;#114;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#119;&amp;#044;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#032;&amp;#061;&amp;#032;&amp;#097;&amp;#117;&amp;#120;&amp;#032;&amp;#097;&amp;#032;&amp;#040;&amp;#045;&amp;#097;&amp;#041;&amp;#044;&amp;#032;&amp;#097;&amp;#117;&amp;#120;&amp;#032;&amp;#040;&amp;#045;&amp;#097;&amp;#041;&amp;#032;&amp;#040;&amp;#045;&amp;#097;&amp;#041;&amp;#044;&amp;#032;&amp;#097;&amp;#117;&amp;#120;&amp;#032;&amp;#097;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#097;&amp;#117;&amp;#120;&amp;#032;&amp;#040;&amp;#045;&amp;#097;&amp;#041;&amp;#032;&amp;#097;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#099;&amp;#044;&amp;#032;&amp;#114;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#111;&amp;#108;&amp;#100;&amp;#053;&amp;#032;&amp;#098;&amp;#111;&amp;#117;&amp;#110;&amp;#100;&amp;#032;&amp;#040;&amp;#099;&amp;#032;&amp;#043;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#032;&amp;#048;&amp;#046;&amp;#032;&amp;#114;&amp;#032;&amp;#048;&amp;#046;&amp;#044;&amp;#032;&amp;#048;&amp;#046;&amp;#041;&amp;#032;&amp;#111;&amp;#098;&amp;#106;&amp;#032;&amp;#119;&amp;#032;&amp;#120;&amp;#032;&amp;#121;&amp;#032;&amp;#122;&amp;#032;&amp;#105;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#040;&amp;#099;&amp;#044;&amp;#032;&amp;#114;&amp;#044;&amp;#032;&amp;#071;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#040;&amp;#111;&amp;#098;&amp;#106;&amp;#044;&amp;#032;&amp;#119;&amp;#044;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#041;&amp;#041;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#108;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#044;&amp;#032;&amp;#110;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#049;&amp;#044;&amp;#032;&amp;#050;&amp;#048;&amp;#052;&amp;#056;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#061;&amp;#032;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#032;&amp;#108;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#032;&amp;#040;&amp;#118;&amp;#101;&amp;#099;&amp;#032;&amp;#048;&amp;#046;&amp;#032;&amp;#045;&amp;#049;&amp;#046;&amp;#032;&amp;#052;&amp;#046;&amp;#041;&amp;#032;&amp;#049;&amp;#046;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#115;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#052;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#117;&amp;#115;&amp;#101;&amp;#032;&amp;#099;&amp;#104;&amp;#032;&amp;#061;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#073;&amp;#079;&amp;#046;&amp;#070;&amp;#105;&amp;#108;&amp;#101;&amp;#046;&amp;#067;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#040;&amp;#034;&amp;#067;&amp;#058;&amp;#092;&amp;#085;&amp;#115;&amp;#101;&amp;#114;&amp;#115;&amp;#092;&amp;#074;&amp;#111;&amp;#110;&amp;#092;&amp;#068;&amp;#111;&amp;#099;&amp;#117;&amp;#109;&amp;#101;&amp;#110;&amp;#116;&amp;#115;&amp;#092;&amp;#086;&amp;#105;&amp;#115;&amp;#117;&amp;#097;&amp;#108;&amp;#032;&amp;#083;&amp;#116;&amp;#117;&amp;#100;&amp;#105;&amp;#111;&amp;#032;&amp;#049;&amp;#048;&amp;#092;&amp;#080;&amp;#114;&amp;#111;&amp;#106;&amp;#101;&amp;#099;&amp;#116;&amp;#115;&amp;#092;&amp;#070;&amp;#035;&amp;#092;&amp;#082;&amp;#097;&amp;#121;&amp;#084;&amp;#114;&amp;#097;&amp;#099;&amp;#101;&amp;#114;&amp;#092;&amp;#105;&amp;#109;&amp;#097;&amp;#103;&amp;#101;&amp;#046;&amp;#112;&amp;#103;&amp;#109;&amp;#034;&amp;#044;&amp;#032;&amp;#110;&amp;#032;&amp;#042;&amp;#032;&amp;#110;&amp;#032;&amp;#043;&amp;#032;&amp;#051;&amp;#050;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#115;&amp;#112;&amp;#114;&amp;#105;&amp;#110;&amp;#116;&amp;#102;&amp;#032;&amp;#034;&amp;#080;&amp;#053;&amp;#092;&amp;#110;&amp;#037;&amp;#100;&amp;#032;&amp;#037;&amp;#100;&amp;#092;&amp;#110;&amp;#050;&amp;#053;&amp;#053;&amp;#092;&amp;#110;&amp;#034;&amp;#032;&amp;#110;&amp;#032;&amp;#110;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#083;&amp;#116;&amp;#114;&amp;#105;&amp;#110;&amp;#103;&amp;#046;&amp;#105;&amp;#116;&amp;#101;&amp;#114;&amp;#032;&amp;#040;&amp;#099;&amp;#104;&amp;#046;&amp;#087;&amp;#114;&amp;#105;&amp;#116;&amp;#101;&amp;#066;&amp;#121;&amp;#116;&amp;#101;&amp;#032;&amp;#060;&amp;#060;&amp;#032;&amp;#098;&amp;#121;&amp;#116;&amp;#101;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#105;&amp;#109;&amp;#097;&amp;#103;&amp;#101;&amp;#032;&amp;#061;&amp;#032;&amp;#065;&amp;#114;&amp;#114;&amp;#097;&amp;#121;&amp;#046;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#032;&amp;#040;&amp;#110;&amp;#042;&amp;#110;&amp;#041;&amp;#032;&amp;#048;&amp;#117;&amp;#121;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#121;&amp;#115;&amp;#116;&amp;#101;&amp;#109;&amp;#046;&amp;#084;&amp;#104;&amp;#114;&amp;#101;&amp;#097;&amp;#100;&amp;#105;&amp;#110;&amp;#103;&amp;#046;&amp;#084;&amp;#097;&amp;#115;&amp;#107;&amp;#115;&amp;#046;&amp;#080;&amp;#097;&amp;#114;&amp;#097;&amp;#108;&amp;#108;&amp;#101;&amp;#108;&amp;#046;&amp;#070;&amp;#111;&amp;#114;&amp;#040;&amp;#048;&amp;#044;&amp;#032;&amp;#110;&amp;#044;&amp;#032;&amp;#102;&amp;#117;&amp;#110;&amp;#032;&amp;#121;&amp;#032;&amp;#045;&amp;#062;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#110;&amp;#032;&amp;#045;&amp;#032;&amp;#049;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#109;&amp;#117;&amp;#116;&amp;#097;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#103;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#046;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#100;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#115;&amp;#115;&amp;#032;&amp;#045;&amp;#032;&amp;#049;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#100;&amp;#121;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#032;&amp;#116;&amp;#111;&amp;#032;&amp;#115;&amp;#115;&amp;#032;&amp;#045;&amp;#032;&amp;#049;&amp;#032;&amp;#100;&amp;#111;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#097;&amp;#117;&amp;#120;&amp;#032;&amp;#120;&amp;#032;&amp;#100;&amp;#032;&amp;#061;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#120;&amp;#032;&amp;#045;&amp;#032;&amp;#048;&amp;#046;&amp;#053;&amp;#032;&amp;#042;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#110;&amp;#032;&amp;#043;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#100;&amp;#032;&amp;#047;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#115;&amp;#115;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#061;&amp;#032;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#105;&amp;#115;&amp;#101;&amp;#040;&amp;#118;&amp;#101;&amp;#099;&amp;#032;&amp;#040;&amp;#097;&amp;#117;&amp;#120;&amp;#032;&amp;#120;&amp;#032;&amp;#100;&amp;#120;&amp;#041;&amp;#032;&amp;#040;&amp;#097;&amp;#117;&amp;#120;&amp;#032;&amp;#121;&amp;#032;&amp;#100;&amp;#121;&amp;#041;&amp;#032;&amp;#040;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#110;&amp;#041;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#103;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#103;&amp;#032;&amp;#043;&amp;#032;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#116;&amp;#114;&amp;#097;&amp;#099;&amp;#101;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#115;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#109;&amp;#097;&amp;#103;&amp;#101;&amp;#046;&amp;#091;&amp;#120;&amp;#043;&amp;#121;&amp;#042;&amp;#110;&amp;#093;&amp;#032;&amp;#060;&amp;#045;&amp;#032;&amp;#048;&amp;#046;&amp;#053;&amp;#032;&amp;#043;&amp;#032;&amp;#050;&amp;#053;&amp;#053;&amp;#046;&amp;#032;&amp;#042;&amp;#032;&amp;#103;&amp;#032;&amp;#047;&amp;#032;&amp;#102;&amp;#108;&amp;#111;&amp;#097;&amp;#116;&amp;#032;&amp;#040;&amp;#115;&amp;#115;&amp;#042;&amp;#115;&amp;#115;&amp;#041;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#098;&amp;#121;&amp;#116;&amp;#101;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#124;&amp;#062;&amp;#032;&amp;#105;&amp;#103;&amp;#110;&amp;#111;&amp;#114;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#099;&amp;#104;&amp;#046;&amp;#087;&amp;#114;&amp;#105;&amp;#116;&amp;#101;&amp;#040;&amp;#105;&amp;#109;&amp;#097;&amp;#103;&amp;#101;&amp;#044;&amp;#032;&amp;#048;&amp;#044;&amp;#032;&amp;#110;&amp;#042;&amp;#110;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#112;&amp;#114;&amp;#105;&amp;#110;&amp;#116;&amp;#102;&amp;#032;&amp;#034;&amp;#084;&amp;#111;&amp;#111;&amp;#107;&amp;#032;&amp;#037;&amp;#103;&amp;#115;&amp;#034;&amp;#032;&amp;#116;&amp;#046;&amp;#069;&amp;#108;&amp;#097;&amp;#112;&amp;#115;&amp;#101;&amp;#100;&amp;#046;&amp;#084;&amp;#111;&amp;#116;&amp;#097;&amp;#108;&amp;#083;&amp;#101;&amp;#099;&amp;#111;&amp;#110;&amp;#100;&amp;#115;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;And here is the C++ program:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#035;&amp;#105;&amp;#110;&amp;#099;&amp;#108;&amp;#117;&amp;#100;&amp;#101;&amp;#032;&amp;#034;&amp;#115;&amp;#116;&amp;#100;&amp;#097;&amp;#102;&amp;#120;&amp;#046;&amp;#104;&amp;#034;&amp;#013;&amp;#010;&amp;#035;&amp;#105;&amp;#110;&amp;#099;&amp;#108;&amp;#117;&amp;#100;&amp;#101;&amp;#032;&amp;#060;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#062;&amp;#013;&amp;#010;&amp;#035;&amp;#105;&amp;#110;&amp;#099;&amp;#108;&amp;#117;&amp;#100;&amp;#101;&amp;#032;&amp;#060;&amp;#105;&amp;#111;&amp;#115;&amp;#116;&amp;#114;&amp;#101;&amp;#097;&amp;#109;&amp;#062;&amp;#013;&amp;#010;&amp;#035;&amp;#105;&amp;#110;&amp;#099;&amp;#108;&amp;#117;&amp;#100;&amp;#101;&amp;#032;&amp;#060;&amp;#102;&amp;#115;&amp;#116;&amp;#114;&amp;#101;&amp;#097;&amp;#109;&amp;#062;&amp;#013;&amp;#010;&amp;#035;&amp;#105;&amp;#110;&amp;#099;&amp;#108;&amp;#117;&amp;#100;&amp;#101;&amp;#032;&amp;#060;&amp;#108;&amp;#105;&amp;#109;&amp;#105;&amp;#116;&amp;#115;&amp;#062;&amp;#013;&amp;#010;&amp;#035;&amp;#105;&amp;#110;&amp;#099;&amp;#108;&amp;#117;&amp;#100;&amp;#101;&amp;#032;&amp;#060;&amp;#099;&amp;#109;&amp;#097;&amp;#116;&amp;#104;&amp;#062;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#117;&amp;#115;&amp;#105;&amp;#110;&amp;#103;&amp;#032;&amp;#110;&amp;#097;&amp;#109;&amp;#101;&amp;#115;&amp;#112;&amp;#097;&amp;#099;&amp;#101;&amp;#032;&amp;#115;&amp;#116;&amp;#100;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#110;&amp;#117;&amp;#109;&amp;#101;&amp;#114;&amp;#105;&amp;#099;&amp;#095;&amp;#108;&amp;#105;&amp;#109;&amp;#105;&amp;#116;&amp;#115;&amp;#060;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#062;&amp;#032;&amp;#114;&amp;#101;&amp;#097;&amp;#108;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#100;&amp;#101;&amp;#108;&amp;#116;&amp;#097;&amp;#032;&amp;#061;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#114;&amp;#101;&amp;#097;&amp;#108;&amp;#046;&amp;#101;&amp;#112;&amp;#115;&amp;#105;&amp;#108;&amp;#111;&amp;#110;&amp;#040;&amp;#041;&amp;#041;&amp;#044;&amp;#032;&amp;#105;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#032;&amp;#061;&amp;#032;&amp;#114;&amp;#101;&amp;#097;&amp;#108;&amp;#046;&amp;#105;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#040;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#115;&amp;#116;&amp;#114;&amp;#117;&amp;#099;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#120;&amp;#044;&amp;#032;&amp;#121;&amp;#044;&amp;#032;&amp;#122;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#040;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#120;&amp;#050;&amp;#044;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#121;&amp;#050;&amp;#044;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#122;&amp;#050;&amp;#041;&amp;#032;&amp;#058;&amp;#032;&amp;#120;&amp;#040;&amp;#120;&amp;#050;&amp;#041;&amp;#044;&amp;#032;&amp;#121;&amp;#040;&amp;#121;&amp;#050;&amp;#041;&amp;#044;&amp;#032;&amp;#122;&amp;#040;&amp;#122;&amp;#050;&amp;#041;&amp;#032;&amp;#123;&amp;#125;&amp;#013;&amp;#010;&amp;#125;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#111;&amp;#112;&amp;#101;&amp;#114;&amp;#097;&amp;#116;&amp;#111;&amp;#114;&amp;#043;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#097;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#098;&amp;#041;&amp;#013;&amp;#010;&amp;#123;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#040;&amp;#097;&amp;#046;&amp;#120;&amp;#043;&amp;#098;&amp;#046;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#046;&amp;#121;&amp;#043;&amp;#098;&amp;#046;&amp;#121;&amp;#044;&amp;#032;&amp;#097;&amp;#046;&amp;#122;&amp;#043;&amp;#098;&amp;#046;&amp;#122;&amp;#041;&amp;#059;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#111;&amp;#112;&amp;#101;&amp;#114;&amp;#097;&amp;#116;&amp;#111;&amp;#114;&amp;#045;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#097;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#098;&amp;#041;&amp;#013;&amp;#010;&amp;#123;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#040;&amp;#097;&amp;#046;&amp;#120;&amp;#045;&amp;#098;&amp;#046;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#046;&amp;#121;&amp;#045;&amp;#098;&amp;#046;&amp;#121;&amp;#044;&amp;#032;&amp;#097;&amp;#046;&amp;#122;&amp;#045;&amp;#098;&amp;#046;&amp;#122;&amp;#041;&amp;#059;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#111;&amp;#112;&amp;#101;&amp;#114;&amp;#097;&amp;#116;&amp;#111;&amp;#114;&amp;#042;&amp;#040;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#097;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#098;&amp;#041;&amp;#032;&amp;#123;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#040;&amp;#097;&amp;#042;&amp;#098;&amp;#046;&amp;#120;&amp;#044;&amp;#032;&amp;#097;&amp;#042;&amp;#098;&amp;#046;&amp;#121;&amp;#044;&amp;#032;&amp;#097;&amp;#042;&amp;#098;&amp;#046;&amp;#122;&amp;#041;&amp;#059;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#100;&amp;#111;&amp;#116;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#097;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#098;&amp;#041;&amp;#032;&amp;#123;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#097;&amp;#046;&amp;#120;&amp;#042;&amp;#098;&amp;#046;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#097;&amp;#046;&amp;#121;&amp;#042;&amp;#098;&amp;#046;&amp;#121;&amp;#032;&amp;#043;&amp;#032;&amp;#097;&amp;#046;&amp;#122;&amp;#042;&amp;#098;&amp;#046;&amp;#122;&amp;#059;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#108;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#097;&amp;#041;&amp;#032;&amp;#123;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#100;&amp;#111;&amp;#116;&amp;#040;&amp;#097;&amp;#044;&amp;#032;&amp;#097;&amp;#041;&amp;#041;&amp;#059;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#105;&amp;#115;&amp;#101;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#097;&amp;#041;&amp;#032;&amp;#123;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#040;&amp;#049;&amp;#032;&amp;#047;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#100;&amp;#111;&amp;#116;&amp;#040;&amp;#097;&amp;#044;&amp;#032;&amp;#097;&amp;#041;&amp;#041;&amp;#041;&amp;#032;&amp;#042;&amp;#032;&amp;#097;&amp;#059;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#115;&amp;#116;&amp;#114;&amp;#117;&amp;#099;&amp;#116;&amp;#032;&amp;#072;&amp;#105;&amp;#116;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#110;&amp;#111;&amp;#114;&amp;#109;&amp;#097;&amp;#108;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#072;&amp;#105;&amp;#116;&amp;#040;&amp;#041;&amp;#032;&amp;#058;&amp;#032;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#040;&amp;#105;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#041;&amp;#044;&amp;#032;&amp;#110;&amp;#111;&amp;#114;&amp;#109;&amp;#097;&amp;#108;&amp;#040;&amp;#086;&amp;#101;&amp;#099;&amp;#040;&amp;#048;&amp;#044;&amp;#032;&amp;#048;&amp;#044;&amp;#032;&amp;#048;&amp;#041;&amp;#041;&amp;#032;&amp;#123;&amp;#125;&amp;#013;&amp;#010;&amp;#125;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#115;&amp;#116;&amp;#114;&amp;#117;&amp;#099;&amp;#116;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#115;&amp;#116;&amp;#114;&amp;#117;&amp;#099;&amp;#116;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#118;&amp;#105;&amp;#114;&amp;#116;&amp;#117;&amp;#097;&amp;#108;&amp;#032;&amp;#126;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#040;&amp;#041;&amp;#032;&amp;#123;&amp;#125;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#118;&amp;#105;&amp;#114;&amp;#116;&amp;#117;&amp;#097;&amp;#108;&amp;#032;&amp;#118;&amp;#111;&amp;#105;&amp;#100;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#040;&amp;#072;&amp;#105;&amp;#116;&amp;#032;&amp;#038;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#118;&amp;#105;&amp;#114;&amp;#116;&amp;#117;&amp;#097;&amp;#108;&amp;#032;&amp;#098;&amp;#111;&amp;#111;&amp;#108;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#118;&amp;#105;&amp;#114;&amp;#116;&amp;#117;&amp;#097;&amp;#108;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#098;&amp;#111;&amp;#117;&amp;#110;&amp;#100;&amp;#040;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#098;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#048;&amp;#059;&amp;#013;&amp;#010;&amp;#125;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#115;&amp;#116;&amp;#114;&amp;#117;&amp;#099;&amp;#116;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#058;&amp;#032;&amp;#112;&amp;#117;&amp;#098;&amp;#108;&amp;#105;&amp;#099;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#040;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#099;&amp;#044;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#114;&amp;#041;&amp;#032;&amp;#058;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#040;&amp;#099;&amp;#041;&amp;#044;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#040;&amp;#114;&amp;#041;&amp;#032;&amp;#123;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#126;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#040;&amp;#041;&amp;#032;&amp;#123;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#098;&amp;#032;&amp;#061;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#046;&amp;#120;&amp;#042;&amp;#100;&amp;#105;&amp;#114;&amp;#046;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#046;&amp;#121;&amp;#042;&amp;#100;&amp;#105;&amp;#114;&amp;#046;&amp;#121;&amp;#032;&amp;#043;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#046;&amp;#122;&amp;#042;&amp;#100;&amp;#105;&amp;#114;&amp;#046;&amp;#122;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#061;&amp;#032;&amp;#098;&amp;#042;&amp;#098;&amp;#032;&amp;#045;&amp;#032;&amp;#100;&amp;#111;&amp;#116;&amp;#040;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#044;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#041;&amp;#032;&amp;#043;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#032;&amp;#042;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#040;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#062;&amp;#032;&amp;#048;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#100;&amp;#032;&amp;#061;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#041;&amp;#044;&amp;#032;&amp;#116;&amp;#050;&amp;#032;&amp;#061;&amp;#032;&amp;#098;&amp;#032;&amp;#043;&amp;#032;&amp;#100;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#040;&amp;#116;&amp;#050;&amp;#032;&amp;#062;&amp;#032;&amp;#048;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#116;&amp;#049;&amp;#032;&amp;#061;&amp;#032;&amp;#098;&amp;#032;&amp;#045;&amp;#032;&amp;#100;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#040;&amp;#116;&amp;#049;&amp;#032;&amp;#062;&amp;#032;&amp;#048;&amp;#032;&amp;#063;&amp;#032;&amp;#116;&amp;#049;&amp;#032;&amp;#058;&amp;#032;&amp;#116;&amp;#050;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#105;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#098;&amp;#111;&amp;#111;&amp;#108;&amp;#032;&amp;#115;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#118;&amp;#032;&amp;#061;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#032;&amp;#045;&amp;#032;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#098;&amp;#032;&amp;#061;&amp;#032;&amp;#100;&amp;#111;&amp;#116;&amp;#040;&amp;#118;&amp;#044;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#044;&amp;#032;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#061;&amp;#032;&amp;#098;&amp;#042;&amp;#098;&amp;#032;&amp;#045;&amp;#032;&amp;#100;&amp;#111;&amp;#116;&amp;#040;&amp;#118;&amp;#044;&amp;#032;&amp;#118;&amp;#041;&amp;#032;&amp;#043;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#032;&amp;#042;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#040;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#032;&amp;#060;&amp;#032;&amp;#048;&amp;#032;&amp;#063;&amp;#032;&amp;#102;&amp;#097;&amp;#108;&amp;#115;&amp;#101;&amp;#032;&amp;#058;&amp;#032;&amp;#098;&amp;#032;&amp;#043;&amp;#032;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#100;&amp;#105;&amp;#115;&amp;#099;&amp;#041;&amp;#032;&amp;#062;&amp;#061;&amp;#032;&amp;#048;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#118;&amp;#111;&amp;#105;&amp;#100;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#040;&amp;#072;&amp;#105;&amp;#116;&amp;#032;&amp;#038;&amp;#104;&amp;#105;&amp;#116;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#032;&amp;#061;&amp;#032;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#040;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#040;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#032;&amp;#060;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#032;&amp;#061;&amp;#032;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#110;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#042;&amp;#100;&amp;#105;&amp;#114;&amp;#046;&amp;#120;&amp;#032;&amp;#045;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#046;&amp;#120;&amp;#044;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#110;&amp;#121;&amp;#032;&amp;#061;&amp;#032;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#042;&amp;#100;&amp;#105;&amp;#114;&amp;#046;&amp;#121;&amp;#032;&amp;#045;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#046;&amp;#121;&amp;#044;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#110;&amp;#122;&amp;#032;&amp;#061;&amp;#032;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#042;&amp;#100;&amp;#105;&amp;#114;&amp;#046;&amp;#122;&amp;#032;&amp;#045;&amp;#032;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#046;&amp;#122;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#105;&amp;#108;&amp;#032;&amp;#061;&amp;#032;&amp;#049;&amp;#047;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#110;&amp;#120;&amp;#042;&amp;#110;&amp;#120;&amp;#032;&amp;#043;&amp;#032;&amp;#110;&amp;#121;&amp;#042;&amp;#110;&amp;#121;&amp;#032;&amp;#043;&amp;#032;&amp;#110;&amp;#122;&amp;#042;&amp;#110;&amp;#122;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#111;&amp;#114;&amp;#109;&amp;#097;&amp;#108;&amp;#046;&amp;#120;&amp;#032;&amp;#061;&amp;#032;&amp;#105;&amp;#108;&amp;#042;&amp;#110;&amp;#120;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#111;&amp;#114;&amp;#109;&amp;#097;&amp;#108;&amp;#046;&amp;#121;&amp;#032;&amp;#061;&amp;#032;&amp;#105;&amp;#108;&amp;#042;&amp;#110;&amp;#121;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#111;&amp;#114;&amp;#109;&amp;#097;&amp;#108;&amp;#046;&amp;#122;&amp;#032;&amp;#061;&amp;#032;&amp;#105;&amp;#108;&amp;#042;&amp;#110;&amp;#122;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#098;&amp;#111;&amp;#111;&amp;#108;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#123;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#115;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#040;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#044;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#059;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#098;&amp;#111;&amp;#117;&amp;#110;&amp;#100;&amp;#040;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#098;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#040;&amp;#098;&amp;#046;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#044;&amp;#032;&amp;#109;&amp;#097;&amp;#120;&amp;#040;&amp;#098;&amp;#046;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#044;&amp;#032;&amp;#108;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#040;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#032;&amp;#045;&amp;#032;&amp;#098;&amp;#046;&amp;#099;&amp;#101;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#041;&amp;#032;&amp;#043;&amp;#032;&amp;#114;&amp;#097;&amp;#100;&amp;#105;&amp;#117;&amp;#115;&amp;#041;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#125;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#116;&amp;#121;&amp;#112;&amp;#101;&amp;#100;&amp;#101;&amp;#102;&amp;#032;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#042;&amp;#062;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#115;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#115;&amp;#116;&amp;#114;&amp;#117;&amp;#099;&amp;#116;&amp;#032;&amp;#071;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#032;&amp;#058;&amp;#032;&amp;#112;&amp;#117;&amp;#098;&amp;#108;&amp;#105;&amp;#099;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#098;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#115;&amp;#032;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#071;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#040;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#098;&amp;#044;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#115;&amp;#032;&amp;#099;&amp;#041;&amp;#032;&amp;#058;&amp;#032;&amp;#098;&amp;#040;&amp;#098;&amp;#041;&amp;#044;&amp;#032;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#040;&amp;#099;&amp;#041;&amp;#032;&amp;#123;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#126;&amp;#071;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#040;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#115;&amp;#058;&amp;#058;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#095;&amp;#105;&amp;#116;&amp;#101;&amp;#114;&amp;#097;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#116;&amp;#061;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#098;&amp;#101;&amp;#103;&amp;#105;&amp;#110;&amp;#040;&amp;#041;&amp;#059;&amp;#032;&amp;#105;&amp;#116;&amp;#033;&amp;#061;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#101;&amp;#110;&amp;#100;&amp;#040;&amp;#041;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#105;&amp;#116;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#100;&amp;#101;&amp;#108;&amp;#101;&amp;#116;&amp;#101;&amp;#032;&amp;#042;&amp;#105;&amp;#116;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#118;&amp;#111;&amp;#105;&amp;#100;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#040;&amp;#072;&amp;#105;&amp;#116;&amp;#032;&amp;#038;&amp;#104;&amp;#105;&amp;#116;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#040;&amp;#098;&amp;#046;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#040;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#032;&amp;#060;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#115;&amp;#058;&amp;#058;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#095;&amp;#105;&amp;#116;&amp;#101;&amp;#114;&amp;#097;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#116;&amp;#061;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#098;&amp;#101;&amp;#103;&amp;#105;&amp;#110;&amp;#040;&amp;#041;&amp;#059;&amp;#032;&amp;#105;&amp;#116;&amp;#033;&amp;#061;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#101;&amp;#110;&amp;#100;&amp;#040;&amp;#041;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#105;&amp;#116;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#040;&amp;#042;&amp;#105;&amp;#116;&amp;#041;&amp;#045;&amp;#062;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#040;&amp;#104;&amp;#105;&amp;#116;&amp;#044;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#098;&amp;#111;&amp;#111;&amp;#108;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#040;&amp;#033;&amp;#098;&amp;#046;&amp;#115;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#115;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#040;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#044;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#041;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#102;&amp;#097;&amp;#108;&amp;#115;&amp;#101;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#115;&amp;#058;&amp;#058;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#095;&amp;#105;&amp;#116;&amp;#101;&amp;#114;&amp;#097;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#116;&amp;#061;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#098;&amp;#101;&amp;#103;&amp;#105;&amp;#110;&amp;#040;&amp;#041;&amp;#059;&amp;#032;&amp;#105;&amp;#116;&amp;#033;&amp;#061;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#101;&amp;#110;&amp;#100;&amp;#040;&amp;#041;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#105;&amp;#116;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#040;&amp;#040;&amp;#042;&amp;#105;&amp;#116;&amp;#041;&amp;#045;&amp;#062;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#040;&amp;#111;&amp;#114;&amp;#105;&amp;#103;&amp;#044;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#041;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#116;&amp;#114;&amp;#117;&amp;#101;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#102;&amp;#097;&amp;#108;&amp;#115;&amp;#101;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#098;&amp;#111;&amp;#117;&amp;#110;&amp;#100;&amp;#040;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#098;&amp;#041;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#098;&amp;#050;&amp;#032;&amp;#061;&amp;#032;&amp;#098;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#115;&amp;#058;&amp;#058;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#095;&amp;#105;&amp;#116;&amp;#101;&amp;#114;&amp;#097;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#116;&amp;#061;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#098;&amp;#101;&amp;#103;&amp;#105;&amp;#110;&amp;#040;&amp;#041;&amp;#059;&amp;#032;&amp;#105;&amp;#116;&amp;#033;&amp;#061;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#101;&amp;#110;&amp;#100;&amp;#040;&amp;#041;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#105;&amp;#116;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#098;&amp;#050;&amp;#032;&amp;#061;&amp;#032;&amp;#040;&amp;#042;&amp;#105;&amp;#116;&amp;#041;&amp;#045;&amp;#062;&amp;#098;&amp;#111;&amp;#117;&amp;#110;&amp;#100;&amp;#040;&amp;#098;&amp;#050;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#098;&amp;#050;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#125;&amp;#059;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#116;&amp;#114;&amp;#097;&amp;#099;&amp;#101;&amp;#040;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#110;&amp;#101;&amp;#103;&amp;#095;&amp;#108;&amp;#105;&amp;#103;&amp;#104;&amp;#116;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#038;&amp;#100;&amp;#105;&amp;#114;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#038;&amp;#115;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#072;&amp;#105;&amp;#116;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#115;&amp;#046;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#040;&amp;#104;&amp;#105;&amp;#116;&amp;#044;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#040;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#032;&amp;#061;&amp;#061;&amp;#032;&amp;#105;&amp;#110;&amp;#102;&amp;#105;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#041;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#048;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#103;&amp;#032;&amp;#061;&amp;#032;&amp;#100;&amp;#111;&amp;#116;&amp;#040;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#111;&amp;#114;&amp;#109;&amp;#097;&amp;#108;&amp;#044;&amp;#032;&amp;#110;&amp;#101;&amp;#103;&amp;#095;&amp;#108;&amp;#105;&amp;#103;&amp;#104;&amp;#116;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#040;&amp;#103;&amp;#032;&amp;#060;&amp;#032;&amp;#048;&amp;#041;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#048;&amp;#046;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#112;&amp;#032;&amp;#061;&amp;#032;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#108;&amp;#097;&amp;#109;&amp;#098;&amp;#100;&amp;#097;&amp;#042;&amp;#100;&amp;#105;&amp;#114;&amp;#032;&amp;#043;&amp;#032;&amp;#100;&amp;#101;&amp;#108;&amp;#116;&amp;#097;&amp;#042;&amp;#104;&amp;#105;&amp;#116;&amp;#046;&amp;#110;&amp;#111;&amp;#114;&amp;#109;&amp;#097;&amp;#108;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#040;&amp;#115;&amp;#046;&amp;#105;&amp;#110;&amp;#116;&amp;#101;&amp;#114;&amp;#115;&amp;#101;&amp;#099;&amp;#116;&amp;#040;&amp;#112;&amp;#044;&amp;#032;&amp;#110;&amp;#101;&amp;#103;&amp;#095;&amp;#108;&amp;#105;&amp;#103;&amp;#104;&amp;#116;&amp;#041;&amp;#032;&amp;#063;&amp;#032;&amp;#048;&amp;#032;&amp;#058;&amp;#032;&amp;#103;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#042;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#108;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#044;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#099;&amp;#044;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#114;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#042;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#040;&amp;#099;&amp;#044;&amp;#032;&amp;#114;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#105;&amp;#102;&amp;#032;&amp;#040;&amp;#108;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#032;&amp;#061;&amp;#061;&amp;#032;&amp;#049;&amp;#041;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#115;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#115;&amp;#032;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#114;&amp;#101;&amp;#115;&amp;#101;&amp;#114;&amp;#118;&amp;#101;&amp;#040;&amp;#053;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#112;&amp;#117;&amp;#115;&amp;#104;&amp;#095;&amp;#098;&amp;#097;&amp;#099;&amp;#107;&amp;#040;&amp;#115;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#114;&amp;#110;&amp;#032;&amp;#061;&amp;#032;&amp;#051;&amp;#042;&amp;#114;&amp;#047;&amp;#115;&amp;#113;&amp;#114;&amp;#116;&amp;#040;&amp;#049;&amp;#050;&amp;#046;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#100;&amp;#122;&amp;#061;&amp;#045;&amp;#049;&amp;#059;&amp;#032;&amp;#100;&amp;#122;&amp;#060;&amp;#061;&amp;#049;&amp;#059;&amp;#032;&amp;#100;&amp;#122;&amp;#043;&amp;#061;&amp;#050;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#100;&amp;#120;&amp;#061;&amp;#045;&amp;#049;&amp;#059;&amp;#032;&amp;#100;&amp;#120;&amp;#060;&amp;#061;&amp;#049;&amp;#059;&amp;#032;&amp;#100;&amp;#120;&amp;#043;&amp;#061;&amp;#050;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#112;&amp;#117;&amp;#115;&amp;#104;&amp;#095;&amp;#098;&amp;#097;&amp;#099;&amp;#107;&amp;#040;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#040;&amp;#108;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#045;&amp;#049;&amp;#044;&amp;#032;&amp;#099;&amp;#032;&amp;#043;&amp;#032;&amp;#114;&amp;#110;&amp;#042;&amp;#086;&amp;#101;&amp;#099;&amp;#040;&amp;#100;&amp;#120;&amp;#044;&amp;#032;&amp;#049;&amp;#044;&amp;#032;&amp;#100;&amp;#122;&amp;#041;&amp;#044;&amp;#032;&amp;#114;&amp;#047;&amp;#050;&amp;#041;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#112;&amp;#104;&amp;#101;&amp;#114;&amp;#101;&amp;#032;&amp;#098;&amp;#050;&amp;#040;&amp;#099;&amp;#032;&amp;#043;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#040;&amp;#048;&amp;#044;&amp;#032;&amp;#114;&amp;#044;&amp;#032;&amp;#048;&amp;#041;&amp;#044;&amp;#032;&amp;#114;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#115;&amp;#058;&amp;#058;&amp;#099;&amp;#111;&amp;#110;&amp;#115;&amp;#116;&amp;#095;&amp;#105;&amp;#116;&amp;#101;&amp;#114;&amp;#097;&amp;#116;&amp;#111;&amp;#114;&amp;#032;&amp;#105;&amp;#116;&amp;#061;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#098;&amp;#101;&amp;#103;&amp;#105;&amp;#110;&amp;#040;&amp;#041;&amp;#059;&amp;#032;&amp;#105;&amp;#116;&amp;#033;&amp;#061;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#046;&amp;#101;&amp;#110;&amp;#100;&amp;#040;&amp;#041;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#105;&amp;#116;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#098;&amp;#050;&amp;#032;&amp;#061;&amp;#032;&amp;#040;&amp;#042;&amp;#105;&amp;#116;&amp;#041;&amp;#045;&amp;#062;&amp;#098;&amp;#111;&amp;#117;&amp;#110;&amp;#100;&amp;#040;&amp;#098;&amp;#050;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#110;&amp;#101;&amp;#119;&amp;#032;&amp;#071;&amp;#114;&amp;#111;&amp;#117;&amp;#112;&amp;#040;&amp;#098;&amp;#050;&amp;#044;&amp;#032;&amp;#099;&amp;#104;&amp;#105;&amp;#108;&amp;#100;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#125;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#095;&amp;#116;&amp;#109;&amp;#097;&amp;#105;&amp;#110;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#097;&amp;#114;&amp;#103;&amp;#099;&amp;#044;&amp;#032;&amp;#099;&amp;#104;&amp;#097;&amp;#114;&amp;#042;&amp;#032;&amp;#097;&amp;#114;&amp;#103;&amp;#118;&amp;#091;&amp;#093;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#108;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#032;&amp;#061;&amp;#032;&amp;#040;&amp;#097;&amp;#114;&amp;#103;&amp;#099;&amp;#061;&amp;#061;&amp;#051;&amp;#032;&amp;#063;&amp;#032;&amp;#097;&amp;#116;&amp;#111;&amp;#105;&amp;#040;&amp;#097;&amp;#114;&amp;#103;&amp;#118;&amp;#091;&amp;#049;&amp;#093;&amp;#041;&amp;#032;&amp;#058;&amp;#032;&amp;#049;&amp;#049;&amp;#041;&amp;#044;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#110;&amp;#032;&amp;#061;&amp;#032;&amp;#040;&amp;#097;&amp;#114;&amp;#103;&amp;#099;&amp;#061;&amp;#061;&amp;#051;&amp;#032;&amp;#063;&amp;#032;&amp;#097;&amp;#116;&amp;#111;&amp;#105;&amp;#040;&amp;#097;&amp;#114;&amp;#103;&amp;#118;&amp;#091;&amp;#050;&amp;#093;&amp;#041;&amp;#032;&amp;#058;&amp;#032;&amp;#050;&amp;#048;&amp;#052;&amp;#056;&amp;#041;&amp;#044;&amp;#032;&amp;#115;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#052;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#110;&amp;#101;&amp;#103;&amp;#095;&amp;#108;&amp;#105;&amp;#103;&amp;#104;&amp;#116;&amp;#032;&amp;#061;&amp;#032;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#105;&amp;#115;&amp;#101;&amp;#040;&amp;#086;&amp;#101;&amp;#099;&amp;#040;&amp;#049;&amp;#044;&amp;#032;&amp;#051;&amp;#044;&amp;#032;&amp;#045;&amp;#050;&amp;#041;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#083;&amp;#099;&amp;#101;&amp;#110;&amp;#101;&amp;#032;&amp;#042;&amp;#115;&amp;#040;&amp;#099;&amp;#114;&amp;#101;&amp;#097;&amp;#116;&amp;#101;&amp;#040;&amp;#108;&amp;#101;&amp;#118;&amp;#101;&amp;#108;&amp;#044;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#040;&amp;#048;&amp;#044;&amp;#032;&amp;#045;&amp;#049;&amp;#044;&amp;#032;&amp;#052;&amp;#041;&amp;#044;&amp;#032;&amp;#049;&amp;#041;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#111;&amp;#102;&amp;#115;&amp;#116;&amp;#114;&amp;#101;&amp;#097;&amp;#109;&amp;#032;&amp;#111;&amp;#117;&amp;#116;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#115;&amp;#116;&amp;#100;&amp;#058;&amp;#058;&amp;#118;&amp;#101;&amp;#099;&amp;#116;&amp;#111;&amp;#114;&amp;#060;&amp;#099;&amp;#104;&amp;#097;&amp;#114;&amp;#062;&amp;#032;&amp;#105;&amp;#109;&amp;#097;&amp;#103;&amp;#101;&amp;#040;&amp;#110;&amp;#042;&amp;#110;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#035;&amp;#112;&amp;#114;&amp;#097;&amp;#103;&amp;#109;&amp;#097;&amp;#032;&amp;#111;&amp;#109;&amp;#112;&amp;#032;&amp;#112;&amp;#097;&amp;#114;&amp;#097;&amp;#108;&amp;#108;&amp;#101;&amp;#108;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#121;&amp;#061;&amp;#048;&amp;#059;&amp;#032;&amp;#121;&amp;#060;&amp;#110;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#121;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#120;&amp;#061;&amp;#048;&amp;#059;&amp;#032;&amp;#120;&amp;#060;&amp;#110;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#120;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#100;&amp;#111;&amp;#117;&amp;#098;&amp;#108;&amp;#101;&amp;#032;&amp;#103;&amp;#061;&amp;#048;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#100;&amp;#120;&amp;#061;&amp;#048;&amp;#059;&amp;#032;&amp;#100;&amp;#120;&amp;#060;&amp;#115;&amp;#115;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#100;&amp;#120;&amp;#041;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#102;&amp;#111;&amp;#114;&amp;#032;&amp;#040;&amp;#105;&amp;#110;&amp;#116;&amp;#032;&amp;#100;&amp;#121;&amp;#061;&amp;#048;&amp;#059;&amp;#032;&amp;#100;&amp;#121;&amp;#060;&amp;#115;&amp;#115;&amp;#059;&amp;#032;&amp;#043;&amp;#043;&amp;#100;&amp;#121;&amp;#041;&amp;#032;&amp;#123;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#086;&amp;#101;&amp;#099;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#040;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#105;&amp;#115;&amp;#101;&amp;#040;&amp;#086;&amp;#101;&amp;#099;&amp;#040;&amp;#120;&amp;#043;&amp;#100;&amp;#120;&amp;#042;&amp;#049;&amp;#046;&amp;#047;&amp;#115;&amp;#115;&amp;#045;&amp;#110;&amp;#047;&amp;#050;&amp;#046;&amp;#044;&amp;#032;&amp;#121;&amp;#043;&amp;#100;&amp;#121;&amp;#042;&amp;#049;&amp;#046;&amp;#047;&amp;#115;&amp;#115;&amp;#045;&amp;#110;&amp;#047;&amp;#050;&amp;#046;&amp;#044;&amp;#032;&amp;#110;&amp;#041;&amp;#041;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#103;&amp;#032;&amp;#043;&amp;#061;&amp;#032;&amp;#114;&amp;#097;&amp;#121;&amp;#095;&amp;#116;&amp;#114;&amp;#097;&amp;#099;&amp;#101;&amp;#040;&amp;#110;&amp;#101;&amp;#103;&amp;#095;&amp;#108;&amp;#105;&amp;#103;&amp;#104;&amp;#116;&amp;#044;&amp;#032;&amp;#100;&amp;#105;&amp;#114;&amp;#044;&amp;#032;&amp;#042;&amp;#115;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#105;&amp;#109;&amp;#097;&amp;#103;&amp;#101;&amp;#091;&amp;#120;&amp;#043;&amp;#040;&amp;#110;&amp;#045;&amp;#049;&amp;#045;&amp;#121;&amp;#041;&amp;#042;&amp;#110;&amp;#093;&amp;#032;&amp;#061;&amp;#032;&amp;#046;&amp;#053;&amp;#032;&amp;#043;&amp;#032;&amp;#050;&amp;#053;&amp;#053;&amp;#046;&amp;#032;&amp;#042;&amp;#032;&amp;#103;&amp;#032;&amp;#047;&amp;#032;&amp;#040;&amp;#115;&amp;#115;&amp;#042;&amp;#115;&amp;#115;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#125;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#111;&amp;#117;&amp;#116;&amp;#046;&amp;#111;&amp;#112;&amp;#101;&amp;#110;&amp;#040;&amp;#034;&amp;#067;&amp;#058;&amp;#092;&amp;#092;&amp;#085;&amp;#115;&amp;#101;&amp;#114;&amp;#115;&amp;#092;&amp;#092;&amp;#074;&amp;#111;&amp;#110;&amp;#092;&amp;#092;&amp;#068;&amp;#111;&amp;#099;&amp;#117;&amp;#109;&amp;#101;&amp;#110;&amp;#116;&amp;#115;&amp;#092;&amp;#092;&amp;#105;&amp;#109;&amp;#097;&amp;#103;&amp;#101;&amp;#046;&amp;#112;&amp;#103;&amp;#109;&amp;#034;&amp;#044;&amp;#032;&amp;#115;&amp;#116;&amp;#100;&amp;#058;&amp;#058;&amp;#105;&amp;#111;&amp;#115;&amp;#095;&amp;#098;&amp;#097;&amp;#115;&amp;#101;&amp;#058;&amp;#058;&amp;#098;&amp;#105;&amp;#110;&amp;#097;&amp;#114;&amp;#121;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#111;&amp;#117;&amp;#116;&amp;#032;&amp;#060;&amp;#060;&amp;#032;&amp;#034;&amp;#080;&amp;#053;&amp;#092;&amp;#110;&amp;#034;&amp;#032;&amp;#060;&amp;#060;&amp;#032;&amp;#110;&amp;#032;&amp;#060;&amp;#060;&amp;#032;&amp;#034;&amp;#032;&amp;#034;&amp;#032;&amp;#060;&amp;#060;&amp;#032;&amp;#110;&amp;#032;&amp;#060;&amp;#060;&amp;#032;&amp;#034;&amp;#092;&amp;#110;&amp;#050;&amp;#053;&amp;#053;&amp;#092;&amp;#110;&amp;#034;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#111;&amp;#117;&amp;#116;&amp;#046;&amp;#119;&amp;#114;&amp;#105;&amp;#116;&amp;#101;&amp;#040;&amp;#038;&amp;#105;&amp;#109;&amp;#097;&amp;#103;&amp;#101;&amp;#091;&amp;#048;&amp;#093;&amp;#044;&amp;#032;&amp;#110;&amp;#042;&amp;#110;&amp;#041;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#114;&amp;#101;&amp;#116;&amp;#117;&amp;#114;&amp;#110;&amp;#032;&amp;#048;&amp;#059;&amp;#013;&amp;#010;&amp;#125;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-4941842213488782052?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/4941842213488782052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=4941842213488782052' title='23 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4941842213488782052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/4941842213488782052'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/03/f-vs-unmanaged-c-for-parallel-numerics.html' title='F# vs Unmanaged C++ for parallel numerics'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>23</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-303239708474261628</id><published>2010-03-02T05:41:00.001Z</published><updated>2010-03-02T05:43:41.180Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='tcp'/><category scheme='http://www.blogger.com/atom/ns#' term='monadic'/><category scheme='http://www.blogger.com/atom/ns#' term='asynchronous workflows'/><category scheme='http://www.blogger.com/atom/ns#' term='web crawler'/><category scheme='http://www.blogger.com/atom/ns#' term='synchronous'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrent'/><category scheme='http://www.blogger.com/atom/ns#' term='computation expression'/><category scheme='http://www.blogger.com/atom/ns#' term='client'/><title type='text'>An introduction to asynchronous workflows</title><content type='html'>&lt;p&gt;&lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb70"&gt;The F#.NET Journal&lt;/a&gt; just published an article about concurrent programming:&lt;/p&gt;&lt;p&gt;&lt;em&gt;"Asynchronous workflows were introduced into the F# programming language in 2007 and have recently matured pending the imminent release of the first officially-supported F# in Visual Studio 2010. This article describes the basic concepts that underpin this language feature and walks through some simple examples that demonstrate both basic and advanced use of this language feature..."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To read this article and more, subscribe to &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/?fsb70"&gt;The F#.NET Journal&lt;/a&gt; today!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3752573690854836522-303239708474261628?l=fsharpnews.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fsharpnews.blogspot.com/feeds/303239708474261628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3752573690854836522&amp;postID=303239708474261628' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/303239708474261628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3752573690854836522/posts/default/303239708474261628'/><link rel='alternate' type='text/html' href='http://fsharpnews.blogspot.com/2010/03/introduction-to-asynchronous-workflows.html' title='An introduction to asynchronous workflows'/><author><name>Flying Frog Consultancy Ltd.</name><uri>http://www.blogger.com/profile/11059316496121100950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3752573690854836522.post-3106376724786880796</id><published>2010-02-22T19:39:00.002Z</published><updated>2010-02-22T20:15:11.505Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='challenge'/><category scheme='http://www.blogger.com/atom/ns#' term='brian mcnamara'/><category scheme='http://www.blogger.com/atom/ns#' term='book worm'/><category scheme='http://www.blogger.com/atom/ns#' term='chris smith'/><title type='text'>The BookWorm challenge</title><content type='html'>&lt;p&gt;&lt;a href="http://blogs.msdn.com/chrsmith/"&gt;Chris Smith&lt;/a&gt; and &lt;a href="http://lorgonblog.spaces.live.com/"&gt;Brian McNamara&lt;/a&gt; of Microsoft have been &lt;a href="http://lorgonblog.spaces.live.com/blog/cns!701679AD17B6D310!1803.entry"&gt;squabbling&lt;/a&gt; like mildly-naughty henchmen in recent blog posts over F# solutions to the BookWorm challenge, a word search on a hexagonal board:&lt;/p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrsmith/WindowsLiveWriter/TrieingtouseFforoptimizingtextsearch_F99C/image_4.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 570px; DISPLAY: block; HEIGHT: 449px; CURSOR: hand" border="0" alt="" src="http://blogs.msdn.com/blogfiles/chrsmith/WindowsLiveWriter/TrieingtouseFforoptimizingtextsearch_F99C/image_4.png" /&gt;&lt;/a&gt; &lt;p&gt;Despite their best efforts, their results make them look more like plucky comic relief than genuinely evil. We'll save you the bluster and focus on destroying their entire line of thinking. Suffice to say, our blog post should be read with an English accent.&lt;/p&gt;&lt;p&gt;We present a solution that is simultaneously less than half the length of their shortest solution and over eight times faster than their fastest solution on the largest example problem they have given to date. Moreover, our solution requires no search data structure and, consequently, uses far less memory. In fact, a simple alteration can even evade the need to store the entire dictionary, reducing the total memory consumption to only a few bytes for each word and the puzzle itself.&lt;/p&gt;&lt;p&gt;To date, Chris and Brian have developed in a single direction: using a trie data structure to perform asymptotically fast string searches. This sounds like a good idea but, in fact, the sole purpose of a trie is to be asymptotically efficient in the limit of infinite-length keys. Consequently, tries work wonders when your keys are giga-length strings such as DNA sequences but, as Chris noted, the keys for this problem are English words under 16 characters in length. As such small strings easily fit into a cache line, traversing them directly is &lt;em&gt;very&lt;/em&gt; fast. In contrast, a tree-based search data structure that incurs an indirection at every character imposes a much higher constant prefactor in the time taken. Moreover, their optimizations have come at the expense of correctness because they lost the ability to handle board positions containing multiple characters such as Qu in their own example board pictured above.&lt;/p&gt;&lt;p&gt;Our program uses a simple &lt;span style="font-family:courier new;"&gt;string array array&lt;/span&gt; to represent the board such that positions may contain multiple characters and a &lt;span style="font-family:courier new;"&gt;string array&lt;/span&gt; to represent the dictionary. Each word is searched for in the board in turn and those found are printed and, finally, the total number of words found in the board is printed. The entire program is around 40 lines of code and the whole process, including loading the dictionary, takes only 0.9s on this 8-core machine. Here is the complete program:&lt;/p&gt;&lt;pre&gt;&lt;p&gt;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#100;&amp;#097;&amp;#116;&amp;#097;&amp;#032;&amp;#061;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#091;&amp;#124;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#085;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#066;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#078;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#086;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#074;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#080;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#076;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#077;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#071;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#084;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#074;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#084;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#072;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#085;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#070;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#078;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#076;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#080;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#085;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#071;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#078;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#080;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#084;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#070;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#071;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#073;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#073;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#087;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#085;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#066;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#078;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#086;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#074;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#080;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#076;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#077;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#071;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#074;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#084;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#089;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#067;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#085;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#070;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#089;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#082;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#078;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#077;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#076;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#085;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#084;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#071;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#073;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#072;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#084;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#070;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#078;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#073;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#089;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#085;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#066;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#078;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#086;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#074;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#080;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#077;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#071;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#084;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#074;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#084;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#067;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#085;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#070;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#089;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#082;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#078;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#076;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#085;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#084;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#083;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#079;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#085;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#071;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#069;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#073;&amp;#034;&amp;#124;&amp;#093;&amp;#059;&amp;#013;&amp;#010;&amp;#032;&amp;#032;&amp;#032;&amp;#032;&amp;#091;&amp;#124;&amp;#034;&amp;#072;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#084;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#070;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#071;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#065;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#073;&amp;#034;&amp;#059;&amp;#032;&amp;#034;&amp;#089;&amp;#034;&amp;#124;&amp;#093;&amp;#124;&amp;#093;&amp;#013;&amp;#010;&amp;#013;&amp;#010;&amp;#108;&amp;#101;&amp;#116;&amp;#032;&amp;#114;&amp;#111;&amp;#119;&amp;#115;&amp;#044;&amp;#032;&amp;#099;&amp;#111;&amp;#108;&amp;#115;&amp;#032;&amp;#061;&amp;#032;&amp;#100;&amp;#097;&amp;#116;&amp;#097;&amp;#046;&amp;#076;&amp;#101;&amp;#110;&amp;#103;&amp;#116;&amp;#104;&amp;#044;&amp;#032;&amp;#100;&amp;#097;&amp;#116
