<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tabbles &#187; .net</title>
	<atom:link href="http://tabbles.net/blog/tag/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://tabbles.net</link>
	<description>Document Management Software, File Tagging</description>
	<lastBuildDate>Thu, 17 May 2012 04:34:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>F# by example &#8211; part 2</title>
		<link>http://tabbles.net/blog/fsharp-tutorial-how-fsharp-adapts-to-how-we-think-part2/</link>
		<comments>http://tabbles.net/blog/fsharp-tutorial-how-fsharp-adapts-to-how-we-think-part2/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 07:11:45 +0000</pubDate>
		<dc:creator>Seguso</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dotnet]]></category>
		<category><![CDATA[F#]]></category>
		<category><![CDATA[fsharp]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://tabbles.net/blog/?p=576</guid>
		<description><![CDATA[Programming tutorial on F#: why it adapts to the way we think, part 2]]></description>
			<content:encoded><![CDATA[<p>This is the second episode of a series meant to illustrate how functional languages, and in particular F#, allow us to write code in a more natural way with respect to imperative languages. Here is the <a href="http://tabbles.net/blog/2010/07/29/fsharp-tutorial-how-fsharp-adapts-to-how-we-think-part1/">previous </a>episode.</p>
<p>Let us deal with a slightly more complicated condition:</p>
<table border="0" cellspacing="5" cellpadding="2">
<tbody>
<tr>
<td style="width: 20px;"></td>
<td style="background-color: #0fa80f;"></td>
<td><span style="font-size: small;"> if there are two dogs with the same name, print &#8220;hello&#8221;</span></td>
</tr>
</tbody>
</table>
<p><br class="spacer_" /></p>
<p>Again, this sentence reflects the way we think. I am now going to show you how to gradually and naturally translate it to F#.</p>
<p>Let us rephrase the sentence as</p>
<table border="0" cellspacing="5" cellpadding="2">
<tbody>
<tr>
<td style="width: 20px;"></td>
<td style="background-color: #0fa80f;"></td>
<td><span style="font-size: small;">if there exist two dogs D1 and D2 such that D1 and D2 have the same name, then print &#8220;hello&#8221;</span></td>
</tr>
</tbody>
</table>
<p><br class="spacer_" /></p>
<p>As you can see, the word &#8220;exist&#8221; highlights two different dogs at once, i.e. a pair of dogs (taken from <em>the set of all pairs of dogs</em>). Translating this sentence in F# would require us to generate all pairs of dogs, in order to pick a pair. Since we do not want to have to do that for now, it is easier to use the logical rule:</p>
<table border="0" cellspacing="5" cellpadding="2">
<tbody>
<tr>
<td style="width: 20px;"></td>
<td style="background-color: #0fa80f;"></td>
<td><span style="font-size: small;">âˆƒx,y: P â‡” âˆƒx: âˆƒy: P</span></td>
</tr>
</tbody>
</table>
<p style="text-align: left;">Â </p>
<p style="text-align: left;">or, in english,</p>
<table border="0" cellspacing="5" cellpadding="2">
<tbody>
<tr>
<td style="width: 20px;"></td>
<td style="background-color: #0fa80f;"></td>
<td><span style="font-size: small;">There exists x and y such that P is true â‡” There exists x such that there exists y such that P is true.</span></td>
</tr>
</tbody>
</table>
<p><br class="spacer_" /></p>
<p>This logical rule allows us to rephrase the sentence in such a way that &#8220;exists&#8221; highlights a single dog. Here is the rewritten sentence:</p>
<table border="0" cellspacing="5" cellpadding="2">
<tbody>
<tr>
<td style="width: 20px;"></td>
<td style="background-color: #0fa80f;"></td>
<td><span style="font-size: small;">if there exists a dog D1 such that there exists another dog D2 such that D1 and D2 have the same name, then print &#8220;hello&#8221;</span></td>
</tr>
</tbody>
</table>
<p><br class="spacer_" /></p>
<p>This sentence is easier to translate to F#. However, we are not done: we have to add a condition expressing something we tend to give for granted, namely the fact that D1 and D2 are <em>different </em>dogs. (Otherwise the above condition will always evaluate to true.) So our sentence becomes:</p>
<table border="0" cellspacing="5" cellpadding="2">
<tbody>
<tr>
<td style="width: 20px;"></td>
<td style="background-color: #0fa80f;"></td>
<td><span style="font-size: small;">If there exists a dog D1 such that there exists a dog D2 such that D1 and D2 have the same name and D1 is different from D2, then print &#8220;hello&#8221;</span></td>
</tr>
</tbody>
</table>
<p><br class="spacer_" /></p>
<p>And we are done. The F# code is almost identical:</p>
<table border="0" cellspacing="5" cellpadding="2">
<tbody>
<tr>
<td style="width: 20px;"></td>
<td style="background-color: #0e42bd;"></td>
<td><span style="font-size: small;">if exists dogs (fun d1 -&gt; exists dogs (fun d2 -&gt; d1.name = d2.name &amp;&amp; d1 &lt;&gt; d2 )) then print &#8220;hello&#8221;.</span></td>
</tr>
</tbody>
</table>
<p><br class="spacer_" /></p>
<p><span style="font-family: 'courier new',courier;">(where the <em>exists </em>function is defined as in the previous episode)<br />
 </span></p>
<p>See you in the next episode!</p>
<p><br class="spacer_" /></p>
<pre>_______</pre>
<table border="0" cellpadding="10">
<tbody>
<tr>
<td><a href="http://www.microsoftstartupzone.com/bsdb/search.aspx?id=3472"><img title="Microsoft Bizspark logo" src="http://tabbles.net/images/BizSparkDB_logo.jpg" alt="Microsoft Bizspark logo" width="120" height="50" /></a></td>
<td><a title="About Yellow blue soft" href="http://www.yellowbluesoft.com">Yellow blue soft</a> is a proudÂ <a title="Tabbles @Microsoft Bizspark" href="http://www.microsoftstartupzone.com/bsdb/search.aspx?id=3472">Microsoft Bizspark partner</a>.Â <a title="Tabbles home" href="http://tabbles.net">Tabbles</a> (our flagship product) is developed entirely in F#, and WPF using Visual Studio 2010.</td>
</tr>
</tbody>
</table>
<p>_______</p>
]]></content:encoded>
			<wfw:commentRss>http://tabbles.net/blog/fsharp-tutorial-how-fsharp-adapts-to-how-we-think-part2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How F# adapts to the way we think &#8211; part1</title>
		<link>http://tabbles.net/blog/fsharp-tutorial-how-fsharp-adapts-to-how-we-think-part1/</link>
		<comments>http://tabbles.net/blog/fsharp-tutorial-how-fsharp-adapts-to-how-we-think-part1/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 14:39:12 +0000</pubDate>
		<dc:creator>Seguso</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dotnet]]></category>
		<category><![CDATA[F sharp]]></category>
		<category><![CDATA[F#]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://tabbles.net/blog/?p=520</guid>
		<description><![CDATA[Programming tutorial on F#: why it adapts to the way we think]]></description>
			<content:encoded><![CDATA[<p>This is the <strong>first episode of a series</strong> meant to show how easily F# adapts to the way we think. I assume no knowledge of functional languages, but I do assume knowledge of an imperative language such as C#.</p>
<p>___</p>
<p>Suppose in your application you want to do the following:</p>
<p style="padding-left: 30px;"><span style="color: #339966;">if there is a dog whose name is jerry, print &#8220;hello&#8221;.</span></p>
<p>This is how we think, i.e. how the original thought forms in our mind. But, in order to implement this thought in ordinary imperative languages (such as C++ or C# before .NET 3), we&#8217;d have to translate it more or less like that:</p>
<pre><span style="color: #0000ff;">for each d in dogs</span></pre>
<pre><span style="color: #0000ff;">   if d.name = jerry then</span></pre>
<pre><span style="color: #0000ff;">      print "hello"</span></pre>
<p>which is not close to the original sentence. As the conditions to write become more complicated, this kind of code tends to become unreadable and unmantainable.</p>
<p><br class="spacer_" /></p>
<p>Let us now see how much more natural it is to express the same idea in F#, and how much closer to the original sentence the F# code is.</p>
<p>In order to translate this to F#, it is useful to slightly rephrase our original thought like that:</p>
<p style="padding-left: 30px;"><span style="color: #339966;">if there is a dog D whose name is jerry, then print &#8220;hello&#8221;.</span></p>
<p>This is closer to F#, but let us rephrase it again slightly:</p>
<p style="padding-left: 30px;"><span style="color: #339966;">if there exists a dog D such that D.name = jerry, then print &#8220;hello&#8221;.</span></p>
<p>now the above is practically F#. In fact, the real F# code is:</p>
<pre style="padding-left: 30px;"><span style="color: #0000ff;">if exists dogs (fun d -&gt; d.name = "jerry") then print "hello"</span></pre>
<p>as you can see, it reads almost the way you think:</p>
<table border="0" cellspacing="10" cellpadding="10">
<tbody>
<tr style="text-align: center;">
<td>
<pre><span style="color: #0000ff;">if</span></pre>
</td>
<td>
<pre><span style="color: #0000ff;">exists</span></pre>
</td>
<td>
<pre><span style="color: #0000ff;">dogs</span></pre>
</td>
<td>
<pre><span style="color: #0000ff;">(fun d</span></pre>
</td>
<td style="text-align: center;">
<pre><span style="color: #0000ff;">-&gt;</span></pre>
</td>
<td>
<pre><span style="color: #0000ff;">d.name = "jerry") then print "hello"</span></pre>
</td>
</tr>
<tr>
<td style="text-align: center;"><span style="color: #339966;">if</span></td>
<td style="text-align: center;"><span style="color: #339966;">there exists</span></td>
<td style="text-align: center;"><span style="color: #339966;">a dog</span></td>
<td style="text-align: center;"><span style="color: #339966;">d</span></td>
<td style="text-align: center;"><span style="color: #339966;">such that</span></td>
<td style="text-align: center;"><span style="color: #339966;">d.name = &#8220;jerry&#8221;) then print &#8220;hello&#8221;</span></td>
</tr>
</tbody>
</table>
<p><br class="spacer_" /></p>
<p><strong>End note:</strong></p>
<p>In the above, the <em>exists </em>function is defined as follows:</p>
<pre style="padding-left: 30px;"><span style="color: #0000ff;">let exists x y = List.exists y x</span></pre>
<pre><span style="color: #0000ff;">
</span></pre>
<p><strong>In the <a title="F Sharp: part 2" href="http://tabbles.net/blog/2010/08/10/fsharp-tutorial-how-fsharp-adapts-to-how-we-think-part2/">next episode</a></strong><strong> I&#8217;ll deal with more complicated (but still very common) sentences and show how naturally they translate to F#.</strong></p>
<pre><span style="color: #000000;">_______</span></pre>
<table style="width: 600px;" border="0" cellpadding="10">
<tbody>
<tr>
<td><a href="http://www.microsoftstartupzone.com/bsdb/search.aspx?id=3472"><img class="alignnone" title="Microsoft Bizspark logo" src="http://tabbles.net/images/BizSparkDB_logo.jpg" alt="Microsoft Bizspark logo" width="120" height="50" /></a></td>
<td><a title="About Yellow blue soft" href="http://www.yellowbluesoft.com">Yellow blue soft</a> is a proud   <a title="Tabbles @Microsoft Bizspark" href="http://www.microsoftstartupzone.com/bsdb/search.aspx?id=3472">Microsoft Bizspark partner</a>.  <a title="Tabbles home" href="http://tabbles.net"><span style="color: #000000; font-size: small;">Tabbles</span></a> (our flagship product) is developed entirely in F#, and WPF using Visual Studio 2010.</td>
</tr>
</tbody>
</table>
<p>_______</p>
]]></content:encoded>
			<wfw:commentRss>http://tabbles.net/blog/fsharp-tutorial-how-fsharp-adapts-to-how-we-think-part1/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>FileSystemWatcher (.net wrapper): doesn&#8217;t work on FAT32 (removable or Samba)</title>
		<link>http://tabbles.net/blog/filesystemwatcher-net-wrapper-doesnt-work-on-fat32/</link>
		<comments>http://tabbles.net/blog/filesystemwatcher-net-wrapper-doesnt-work-on-fat32/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 16:55:33 +0000</pubDate>
		<dc:creator>Andrea</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Fat32]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[FileSystemWatcher]]></category>
		<category><![CDATA[Leandro]]></category>
		<category><![CDATA[Ntfs]]></category>

		<guid isPermaLink="false">http://tabbles.net/blog/?p=513</guid>
		<description><![CDATA[FileSystemWatcher (.net wrapper): doesn't work on FAT32. The low-level Win32 function has an option to enable the "Fat32 mode"]]></description>
			<content:encoded><![CDATA[<p>HELLO WORLD,</p>
<p>We&#8217;ve always perceived the FileSystemWatcher as &#8220;moody&#8221;, meaning that it would work on some disks and not on some other&#8230; but we couldn&#8217;t quite understand the reasons behind it. It would work on fixed HD but <strong>not always on removable drives</strong>&#8230;</p>
<p>A few days ago we bought 2 of those fantastic mini <a href="http://www.digitus.info/en/products/accessories/?c=1208&amp;p=17380">NAS-adapters</a>, which work indeed fine even if they:</p>
<p>1) Â have an embedded Linux using Samba to manage the sharing.</p>
<p>2) support only FAT32 partitions.</p>
<p>Of course we started testing Tabbles furiously and we immediately started yelling &#8220;OMG, the FileSystemWatcher doesn&#8217;t work on Network drives!&#8221;. The reason of such a panic attack is that our auto-tagging rules and one click-tagging are based on the FileSystemWatcher and Tabbles looses much of its appeal without those.</p>
<p>After a bit of yelling and hair-tearing we googled &#8220;FileSystemWatcher Samba&#8221; until we stumble on this <a title="FileSystemWatcher on Samba" href="http://support.teamdev.com/thread/1986">article</a> suggesting to use the &#8220;Win9xWatcherStrategy class&#8221;&#8230; deeply moved in the heart, Maurizio tries immediately to implement this but soon enough he finds out that the method &#8220;Win9xWatcherStrategy&#8221; doesn&#8217;t exist in the FileSystemWatcherClass. This means that we&#8217;ll probably bin the .net FileSystemWatcher wrapper, and move to the lower-level Win32 function.</p>
<p><strong>For any of you using Tabbles Portable: be aware that for the moment the auto-tagging rules work only if your USB drive is formatted as NTFS</strong>&#8230; sorry for that but we&#8217;ll try to fix this soon!</p>
<p>&#8212;&#8212;</p>
<p>But we also have some good news here: totally out of the blue, Mr. <a title="Leandro on the Tabbles forum" href="http://tabbles.net/forum/leandro-u353.html">Leandro &#8220;O DragÃ£o&#8221;</a> posted on our forum a solution to the annoying problem of Â <a title="FileSystemWatcher blues" href="http://tabbles.net/blog/2010/03/01/goodbye-filesystemwatcher-welcome-full-file-manager-solution/">Tabbles not being able to track files moved with Explorer</a>, have a look at this <a title="Moving files with Explorer" href="http://tabbles.net/forum/move-files-with-tabbles-instead-of-explorer-t231-10.html#p1768">thread</a>. This is among the most exciting thing that happened to us in the past months&#8230;we don&#8217;t really know a lot about it yet, but so far it looks really promising &#8211; Kudos to Leandro! <img src='http://tabbles.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<div id="attachment_518" class="wp-caption aligncenter" style="width: 266px"><a href="http://tabbles.net/blog/wp-content/uploads/2010/07/mr-burns-picture.jpg" rel="wp-prettyPhoto[g513]"><img class="size-medium wp-image-518" title="Mr. Burns" src="http://tabbles.net/blog/wp-content/uploads/2010/07/mr-burns-picture-256x300.jpg" alt="Mr. Burns" width="256" height="300" /></a><p class="wp-caption-text">Mr. Burns</p></div>
<p style="text-align: center;">(Not sure why, but I believe Mr. Burns would be proud of us!)</p>
<p style="text-align: center;">
<p style="text-align: center;"> <img src='http://tabbles.net/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tabbles.net/blog/filesystemwatcher-net-wrapper-doesnt-work-on-fat32/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Goodbye FileSystemWatcher &#8211; welcome full file-manager solution!</title>
		<link>http://tabbles.net/blog/goodbye-filesystemwatcher-welcome-full-file-manager-solution/</link>
		<comments>http://tabbles.net/blog/goodbye-filesystemwatcher-welcome-full-file-manager-solution/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 15:35:48 +0000</pubDate>
		<dc:creator>Andrea</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[file manager]]></category>
		<category><![CDATA[FileSystemWatcher]]></category>

		<guid isPermaLink="false">http://tabbles.net/blog/?p=231</guid>
		<description><![CDATA[After some intense research about technologies we came to the conclusion that there is no easy way to "listen" to a files system and to understand when files are moved.]]></description>
			<content:encoded><![CDATA[<div><strong>The problem: when files are being moved, they need to &#8220;carry&#8221; their tags with them.</strong> To do that, we first approached theÂ <a title="FileSystemWatcher on MSDN " href="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx">FileSystemWatcher</a> technology: this proved unreliable in many ways when it goes to moving files (feel free to ask for details). Then we considered the <a title="file system mini filter - microsoft.com" href="http://www.microsoft.com/whdc/driver/filterdrv/default.mspx">file system mini-filter</a> technology (the one commonly used by anti-viruses); apart from the issues related to integrating a piece of C code into a .net application, this technology didn&#8217;t appear to be more useful than the previous one.</div>
<div><strong>The issue is indeed non-trivial</strong>: moving a file (specially from a disk to another) means creating a new file, copying bit by bit all the data from the source file into the new file and then deleting the old one&#8230; this means that there is no such a thing like &#8220;file moving&#8221; event, nor would it be possible to have it.</div>
<div>Our previous approach was to develop a system to track file movements that listened to the file system and <strong>using a pretty complex AI did (try to) understand when a file was moved</strong>. This approach included creating many different pattern-matching Â algorythms in order to be able to &#8220;understand&#8221; the behaviour of some of the most used applications (i.e. MSFT Word, Adobe Photoshop), since they performed complex operation on the disk each time they were saving a file. Â It totally felt like a game we couldn&#8217;t win!</div>
<h2>&lt;</h2>
<h2>After some intense research about technologies we came to the conclusion that there is no easy way to &#8220;listen&#8221; to a filesystem and to understand when files are moved&#8230;are we missing something (our <a title="Detecting when file is moved with Windows Explorer - MSDN forum" href="http://social.msdn.microsoft.com/Forums/en/windowsuidevelopment/thread/7862ba47-f878-4e78-ba1b-7d15eeac9ab3">thread</a> on MSDN forum)?</h2>
<h2>&gt;</h2>
<p><strong>The (final?) solution: only files pasted using Tabbles will be tracked</strong>. Tabbles already had all of the file-management functions built-in, therefore it was pretty easy for us to listen to the file-movement initiated by Tabbles itself and then have the tagging to &#8220;follow&#8221; the files. This means that you can do cut&amp;paste or drag&amp;dropÂ inside Tabbles, Â or you can do cut from explorer and paste in Tabbles, as well as drag&amp;drop from explorer to Tabbles (but not the other way around!) and it will still work. <a href="http://tabbles.net/blog/wp-content/uploads/2010/03/new_cut_paste.png" rel="wp-prettyPhoto[g231]"><img class="size-full wp-image-233 " title="new_cut_paste" src="http://tabbles.net/blog/wp-content/uploads/2010/03/new_cut_paste.png" alt="cut from Explorer and paste in Tabbles" width="558" height="391" /></a><strong>Are we missing something?</strong> If anyone out there could think of a better solution to this problem, we&#8217;re all ears! Please write us using the contact form on <a title="tabbles.net" href="http://tabbles.net">tabbles.net</a> <strong>Hint &#8211; how to rearrange your files thematically, like you never could before</strong>: keep in mind that Tabbles allows you to group files according to &#8220;concepts&#8221; but you can at the same time browse your disks as you do with a normal file manager. Therefore, let&#8217;s say that you have a bunch of scattered files related to France and you feel like having them in the same folder. You can open the for example the tabble &#8220;France&#8221;, cut all the files in there, and paste them in a brand new folder, all inside Tabbles. This way you can get files rearranged Â in no-time and all the tagging will be preserved. Also keep in mind that, should you want to backup your files on a disk, <strong>you can do drag&#8217;n'drop files from Tabbles to any application, including your favourite cd/dvd-burner app</strong>! <img src='http://tabbles.net/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> Comments are welcome! And <a title="1.4.10b3 on Tabbles forum" href="http://tabbles.net/forum/viewtopic.php?f=10&amp;t=221">here</a> is the related forum post! peace and love, Andrea + Maurizio</p>
<p><br class="spacer_" /></p>
<p><strong>UPDATE: </strong>we&#8217;re working now on a dll-injection based solution, read the whole discussion on our <a title="Tabbles development wave" href="https://wave.google.com/wave/waveref/googlewave.com/w+OsNtHUDjB ">development wave</a> (everyone is welcome to contribute).</p>
]]></content:encoded>
			<wfw:commentRss>http://tabbles.net/blog/goodbye-filesystemwatcher-welcome-full-file-manager-solution/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

