<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Nikola Plejić</title>
	
	<link>http://nikola.plejic.com/blog</link>
	<description>Open Source (&amp;) Science</description>
	<lastBuildDate>Mon, 21 Mar 2011 13:10:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/NikolaPlejic" /><feedburner:info uri="nikolaplejic" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Developing and Deploying ASP.NET MVC Applications On Ubuntu Linux with Mono, nginx and MySQL</title>
		<link>http://feedproxy.google.com/~r/NikolaPlejic/~3/xDU1vUtGsqg/</link>
		<comments>http://nikola.plejic.com/blog/asp-net-mvc-on-ubuntu-linux-mono-nginx-mysql/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 13:10:34 +0000</pubDate>
		<dc:creator>Nikola Plejić</dc:creator>
				<category><![CDATA[(Web) Development]]></category>
		<category><![CDATA[English posts]]></category>
		<category><![CDATA[GNU/Linux]]></category>

		<guid isPermaLink="false">http://nikola.plejic.com/blog/?p=386</guid>
		<description><![CDATA[Mono is moving forward at an impressive pace: the team at Novell and the Mono community deserve some massive respect. In the more recent versions, support for ASP.NET MVC emerged and the new Microsoft library became a part of the core. Combined with XSP (the Mono web server) and its FastCGI server, it became possible [...]

<h3>Povezani postovi:</h3>
Nema povezanih postova.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-408" title="Mono" src="http://nikola.plejic.com/blog/wp-content/uploads/2011/03/mono.png" alt="Mono" width="167" height="41" align="left" />Mono is moving forward at an impressive pace: the team at Novell and the Mono community deserve some massive respect. In the more recent versions, support for ASP.NET MVC emerged and the new Microsoft library became a part of the core. Combined with XSP (the Mono web server) and its FastCGI server, it became possible to serve ASP.NET MVC applications from your Linux machines.</p>
<p><strong>This post is a quick summary of my first steps in creating a development environment and setting up a server for ASP.NET MVC on Linux.</strong> Tools of the trade will be Ubuntu 10.04 (Lucid Lynx), the nginx web server and XSP&#8217;s FastCGI server. I&#8217;ll assume you have a working setup featuring nginx and MySQL on your server &#8211; configuring these is beyond the scope of this article.<span id="more-386"></span></p>
<div style="padding-left: 30px;">
<p style="border-left: 3px solid #000; padding-left: 5px;">Much of this was never tested in a production environment. I have yet to develop a non-trivial application running on top of all of this and I can&#8217;t guarantee everything is bug-free and 100% functional. <a href="http://www.mono-project.com/Companies_Using_Mono">People are using Mono in production</a>, the whole thing looks and feels really solid, but definitely make sure you test everything before diving in.</p>
</div>
<h2>Mono.GetLastVersion();</h2>
<p><strong>Ubuntu depends on Mono quite a lot, so don&#8217;t expect to find the latest and greatest version in your package manager.</strong> There is some comfort in the form of <a href="http://badgerports.org/">Badgerports</a>, but it&#8217;s LTS-only, and it&#8217;s usually a bit behind the latest Mono stable. The solution is to compile Mono from source, which is actually a lot easier than it sounds.</p>
<div style="padding-left: 30px;">
<p style="border-left: 3px solid #000; padding-left: 5px;">If you feel you can live with an older version of Mono and are using a long-term supported release of Ubuntu, go ahead and grab the Badgerports repository and install their Mono packages. The crew is doing awesome work and the backport works great. Compiling stuff from scratch means you have to keep an eye out for security updates and recompile when necessary to keep your server safe, which can be stressful. If you really like living on the edge, follow the instructions below.</p>
</div>
<p>The whole process is made easy by a <a href="https://github.com/firegrass/mono-installer-script">nice shell script written by Patrick McEvoy</a> which does all the heavy lifting. The script is nicely written, so if you don&#8217;t like running random stuff from the web as root (and you shouldn&#8217;t!), feel free to take a peek, see what it does and do the whole thing by hand.</p>
<p>Clone the Git repo or fetch the script directly from GitHub and see what the script does by typing <code>./mono_build.sh -h</code> (you&#8217;ll have to <code>chmod +x mono-build-sh</code> if you already didn&#8217;t). <strong>The choice between the correct flags depends on what you&#8217;re configuring</strong>:</p>
<ul>
<li>for my development machine, I chose to build &#8220;just Mono&#8221; (the -r flag), and then added gnome-sharp and monodevelop afterwards (-m mono-addins gnome-sharp gnome-desktop-sharp monodevelop);</li>
<li>for my VPS, I chose to build &#8220;just Mono&#8221;, without any additional modules.</li>
</ul>
<p>Run the script with your selected parameters (don&#8217;t forget to specify the prefix!) and grab a cup of coffee as it could definitely take a while.</p>
<div style="padding-left: 30px;">
<p style="border-left: 3px solid #000; padding-left: 5px;">You may get compile errors while installing MonoDevelop. Depending on your current Mono configuration, you may need to uncheck certain MonoDevelop packages in the configure phase: I only checked &#8220;main&#8221;, &#8220;extras/MonoDevelop.Database&#8221; and &#8220;extras/MonoDevelop.Debugger.Gdb&#8221;; the &#8220;extras/BooBinding&#8221; and &#8220;extras/MonoDevelop.MonoDroid&#8221; packages I tried to install caused the compiler to choke. If you make a mistake in this phase, go to the MonoDevelop source directory, and do a <code>sudo ./configure --select</code>;  choose the packages and then try to recompile with <code>mono_build.sh</code>.</p>
</div>
<p>When finished, <strong>you should have a fully-functioning version of Mono in a directory of your own choice.</strong> Follow the instructions to enable and test your new installation, and buy Patrick a beer for his awesome work.</p>
<h2>Setting up nginx and FastCGI</h2>
<div style="padding-left: 30px;">
<p style="border-left: 3px solid #000; padding-left: 5px;">You don&#8217;t need to set up FCGI on your development machine &#8211; you can happily use the standalone XSP which was built as a development server. XSP loads automatically when you run your app from MonoDevelop.</p>
</div>
<p><strong><img class="alignleft size-full wp-image-412" title="nginx" src="http://nikola.plejic.com/blog/wp-content/uploads/2011/03/nginx.gif" alt="nginx" width="121" height="32" align="left" />XSP provides a FastCGI server, which is an excellent way to make Mono and nginx talk.</strong> For this to work, you&#8217;ll need to know the exact location of the <code>fastcgi-mono-serverX</code> (where X is one of { &#8220;&#8221;, &#8220;2&#8243;, &#8220;4&#8243; }, depending on the ASP.NET version you&#8217;d like to use). If you installed the Badgerports backport, it&#8217;s probably in your <code>PATH</code>; if you compiled from source, it&#8217;s in <code>$PREFIX/bin/fastcgi-mono-serverX</code>.</p>
<p>Now we need to point nginx to the FastCGI binary. <strong>Here&#8217;s a sample configuration file</strong>:</p>
<p><code> </code></p>
<pre><code>server {
  server_name {SERVER};
  access_log {ACCESSLOG};
  root {ROOT};

  # magick start!
  location / {
    index index.html index.htm default.aspx Default.aspx;
    # DEFAULTROUTE is the default route of your app; e.g. Home/Index
    fastcgi_index {DEFAULTROUTE};
    # choose a free port; e.g. 9001
    fastcgi_pass 127.0.0.1:{PORT};
    include /etc/nginx/fastcgi_params;
  }

  # /Content contains just static files - we don't need
  # no FCGI to serve those!
  location /Content/ {
  }
}</code></pre>
<p>You can easily deploy your ASP.NET application to {ROOT} by using MonoDevelop&#8217;s &#8220;Deploy to Web&#8221; functionality (Tools &#8211; Deploy to Web).</p>
<p>Now, edit /etc/nginx/fastcgi_params and add the following two lines defining certain environment variables the FastCGI server expects to find:</p>
<p><code>fastcgi_param  PATH_INFO          "";<br />
fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;</code></p>
<p>Finally, start the FastCGI server itself:</p>
<p><code>$PREFIX/bin/fastcgi-mono-server2 /applications={SERVER}:/:{ROOT} /socket=tcp:127.0.0.1:{PORT} &amp;</code></p>
<p>Restart nginx and your application should be ready at the server_name of your choice. However, <strong>manually starting up FCGI isn&#8217;t too exciting.</strong> Fortunately, there&#8217;s an <a href="http://tomi.developmententity.sk/Blog/Post/2">awesome script written by Tomas Bosak</a> which automates that part &#8211; follow Tomas&#8217; instructions to install the script, but make sure to update the path to the FastCGI binary if you compiled from source.</p>
<p style="text-align: center;"><a href="http://nikola.plejic.com/blog/wp-content/uploads/2011/03/aspnetlinux.png" rel="lightbox[386]"><img class="size-medium wp-image-416 aligncenter" title="ASP.NET on Mono - we have proof!" src="http://nikola.plejic.com/blog/wp-content/uploads/2011/03/aspnetlinux-300x73.png" alt="ASP.NET on Mono" width="300" height="73" /></a></p>
<p>Another option would be to use nginx to proxy requests to a standalone XSP instance: it should be fairly straightforward, but I didn&#8217;t try it at all.</p>
<h2>Mono &lt;3 MySQL and Fluent NHibernate</h2>
<p><img class="alignleft size-full wp-image-414" title="mysql" src="http://nikola.plejic.com/blog/wp-content/uploads/2011/03/mysql.png" alt="mysql" width="110" height="57" align="left" />Web applications usually work with some kind of a database. <strong>There are several <a href="http://mono-project.com/Database_Access">ADO.NET providers working with Mono</a> for different database servers like MySQL, PosgreSQL and Microsoft SQL Server.</strong> MySQL provides the <a href="http://dev.mysql.com/downloads/connector/net/">Connector/Net library</a>, which is a fully-managed ADO.NET provider. Setting it up is easy: download the library, unzip and add a reference to <code>mysql.data.dll</code> in MonoDevelop. Also note you&#8217;ll have to use the DLL from the &#8220;v2/&#8221; folder. There&#8217;s a <a href="http://mono-project.com/MySQL">quick &amp; dirty tutorial on the Mono project website</a>, and <a href="http://dev.mysql.com/doc/refman/5.1/en/connector-net.html">in-depth documentation on the MySQL website</a> which should have enough information to get you up &amp; running.</p>
<div style="padding-left: 30px;">
<p style="border-left: 3px solid #000; padding-left: 5px;">If you run into a &#8220;connection refused&#8221; message while trying to connect with MySQL, take a peek in your /etc/mysql/my.cnf: you should either have an uncommented line in there saying &#8220;skip-networking&#8221;, or  a directive which says &#8220;bind_address = 127.0.0.1&#8243;, depending on your MySQL version.</p>
</div>
<p><strong>If you&#8217;d like to use Fluent NHibernate with Mono &#8211; good news!</strong> It works perfectly without any hacks: just <a href="http://fluentnhibernate.org/">download Fluent NHibernate</a> and reference it in your project. Here&#8217;s a sample CreateSessionFactory() method for MySQL:</p>
<p><code> </code></p>
<pre><code>private static ISessionFactory CreateSessionFactory() {
  string connStr = "server=localhost;user={USER};database={DB};port={PORT};password={PWD}";
  return Fluently.Configure()
    .Database(
      MySQLConfiguration.Standard.ConnectionString()
    )
    .Mappings(m =&gt; m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly()))
    .BuildSessionFactory();
}</code></pre>
<p>Voilà.</p>
<h2><strong>ASP.NET MVC 3, WebMatrix, future&#8230;</strong></h2>
<p><a href="http://www.mono-project.com/Release_Notes_Mono_2.10#ASP.NET_MVC3_Support">Mono 2.10 should support ASP.NET MVC 3</a>, although it&#8217;s not yet bundled with Mono as is the case with previous versions. There is also some preliminary support for <a href="http://blog.neteril.org/2011/01/22/webmatrix-data-on-mono/">WebMatrix in the form of WebMatrix.Data.dll</a> and <a href="http://www.mono-project.com/Release_Notes_Mono_2.10#Razor_and_WebPages">Razor</a>. I didn&#8217;t have the time to play with any of these, so if you have some experience in setting it up, please share them in the comments.</p>
<p>I really like C# and ASP.NET MVC and <strong>I enjoy the idea of running .NET web applications on top of my preferred OS</strong>. This is something I&#8217;ll definitely be tinkering with in the future. For any questions, comments, advice or suggestions, feel free to use the comment form below, <a href="http://twitter.com/nikolaplejic">mention me on Twitter</a> or contact me by e-mail on <a href="mailto:nikola@plejic.com">nikola@plejic.com</a>.</p>


<h3>Povezani postovi:</h3><p>Nema povezanih postova.</p>]]></content:encoded>
			<wfw:commentRss>http://nikola.plejic.com/blog/asp-net-mvc-on-ubuntu-linux-mono-nginx-mysql/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://nikola.plejic.com/blog/asp-net-mvc-on-ubuntu-linux-mono-nginx-mysql/</feedburner:origLink></item>
		<item>
		<title>F#: Funkcijsko programiranje za .NET (WebUG, studeni 2010.)</title>
		<link>http://feedproxy.google.com/~r/NikolaPlejic/~3/q-Xuv-Vq2CI/</link>
		<comments>http://nikola.plejic.com/blog/f-funkcijsko-programiranje-za-net-webug-studeni-2010/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 16:37:32 +0000</pubDate>
		<dc:creator>Nikola Plejić</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nikola.plejic.com/blog/?p=384</guid>
		<description><![CDATA[18. studenoga sam na sastanku Web User Groupa održao predavanje o F#-u, višeparadigmatskom (no naglašeno funkcijskom) jeziku za CLR. Nije trivijalno strpati mali uvod u funkcijsko programiranje i cijeli novi programski jezik u ispod sat vremena, ali se nadam da sam makar dijelom u tome uspio. Od danas su dostupni i materijali sa sastanka koji [...]

<h3>Povezani postovi:</h3>
Nema povezanih postova.]]></description>
			<content:encoded><![CDATA[<p>18. studenoga sam na sastanku Web User Groupa održao <strong>predavanje o <a href="http://en.wikipedia.org/wiki/F_Sharp_(programming_language)">F#-u</a></strong>, višeparadigmatskom (no naglašeno funkcijskom) jeziku za CLR. Nije trivijalno strpati mali uvod u funkcijsko programiranje i cijeli novi programski jezik u ispod sat vremena, ali se nadam da sam makar dijelom u tome uspio.</p>
<p>Od danas su dostupni i <a href="http://www.webug.com.hr/201011/">materijali sa sastanka</a> koji uključuju i moju <strong>prezentaciju i Visual Studio 2010 solution s primjerima</strong>. Ukoliko nemate VS2010, vrijedi napomenuti da <a href="http://fsxplat.codeplex.com/">F# kompajler bez problema radi i na Monou</a>.</p>
<p>Predavanje će, u malo drugačijem izdanju, biti reprizirano na sljedećem sastanku <a href="http://wiki.razmjenavjestina.org/index.php/LangGang">Lang Ganga</a> u klubu Mama koji se događa svake prve nedjelje u mjesecu.</p>


<h3>Povezani postovi:</h3><p>Nema povezanih postova.</p>]]></content:encoded>
			<wfw:commentRss>http://nikola.plejic.com/blog/f-funkcijsko-programiranje-za-net-webug-studeni-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://nikola.plejic.com/blog/f-funkcijsko-programiranje-za-net-webug-studeni-2010/</feedburner:origLink></item>
		<item>
		<title>Brzinski pogled na Facebookov “Download Your Information” feature</title>
		<link>http://feedproxy.google.com/~r/NikolaPlejic/~3/w9X7ttGCX1E/</link>
		<comments>http://nikola.plejic.com/blog/brzinski-pogled-na-facebookov-download-your-information-feature/#comments</comments>
		<pubDate>Sun, 31 Oct 2010 09:34:30 +0000</pubDate>
		<dc:creator>Nikola Plejić</dc:creator>
				<category><![CDATA[Web aplikacije]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://nikola.plejic.com/blog/?p=344</guid>
		<description><![CDATA[Na sveopće iznenađenje, Facebook postupno korisnicima omogućava preuzimanje podataka dostupnih na profilima. Proces je prilično jednostavan (Account -&#62; Account Settings -&#62; klik na &#8220;learn more&#8221; kod opcije &#8220;Download Your Information&#8221;) i kao rezultat na download daje ZIP arhivu sa svim osobnim podacima koje ste podijelili s Facebookom. Nakon početnih poteškoća, napokon sam se uspio dočepati svog [...]

<h3>Povezani postovi:</h3>
Nema povezanih postova.]]></description>
			<content:encoded><![CDATA[<p>Na sveopće iznenađenje, Facebook postupno korisnicima <a href="http://techcrunch.com/2010/10/06/facebook-now-allows-you-to-download-your-information/">omogućava preuzimanje podataka dostupnih na profilima</a>. Proces je prilično jednostavan (Account -&gt; Account Settings -&gt; klik na &#8220;learn more&#8221; kod opcije &#8220;Download Your Information&#8221;) i <strong>kao rezultat na download daje ZIP arhivu sa svim osobnim podacima koje ste podijelili s Facebookom</strong>. Nakon početnih poteškoća, napokon sam se uspio dočepati svog primjerka. Prvi dojam? Nije loše.<span id="more-344"></span></p>
<p>Slika govori tisuću riječi; evo kako to izgleda nakon raspakiravanja:</p>
<p style="text-align: center;"><a href="http://nikola.plejic.com/blog/wp-content/uploads/2010/10/2010-10-31-002550_3520x1080_scrot.png" rel="lightbox[344]"><img class="aligncenter size-medium wp-image-348" title="Sadržaj Facebookove arhive" src="http://nikola.plejic.com/blog/wp-content/uploads/2010/10/2010-10-31-002550_3520x1080_scrot-117x300.png" alt="Sadržaj Facebookove arhive" width="117" height="300" /></a><br />
<span style="font-size: 80%;">Sadržaj raspakirane arhive</span></p>
<p>Najzanimljiviji dio priče su HTML datoteke koje <strong>sadrže kompletnu stranicu s profilom (uključujući grupe i sve &#8220;lajkane&#8221; stranice), Wall, popis prijatelja, bilješke, događaje (Events) te poruke</strong>. Sve to skupa i ne izgleda toliko loše, no nije bez mana: u mojoj arhivi Wall seže &#8220;samo&#8221; do 7. kolovoza 2009. godine, a u poruke su umiješani i tzv. <em>page updates</em>, tj. poruke sa stranica kojih ste fan, što nemalo otežava snalaženje.</p>
<p style="text-align: center;"><a href="http://nikola.plejic.com/blog/wp-content/uploads/2010/10/facebook-download.jpg" rel="lightbox[344]"><img class="aligncenter size-medium wp-image-352" title="Izgled stranice s Wallom" src="http://nikola.plejic.com/blog/wp-content/uploads/2010/10/facebook-download-300x182.jpg" alt="Izgled stranice s Wallom" width="300" height="182" /></a><br />
<span style="font-size: 80%;">Izgled stranice s Wallom</span></p>
<h3>Use the source, Luke</h3>
<p>Najočitija primjena ovih podataka, osim backupa, je migracija podataka s Facebooka na druge društvene mreže (<a href="http://joindiaspora.com/">Diaspora</a>, tebe se gleda). Facebookovci su prilično olakšali strojnu obradu (ilitiga parseanje) fileova: <strong>HTML koji se dobije je čist i razumno strukturiran</strong>. Iako su svi podaci tamo, <strong>metapodataka skoro ni nema</strong>: ID-jevi stranica, linkovi na profile i sl. uopće nisu dostupni, a jedino mjesto odakle bi se dotični mogli izvući jest stranica s događajima (Events) koja nudi link na sam događaj na Facebooku.</p>
<p>No, nije sve toliko crno: uz malo Pythona i html5liba, lako se dobiju, primjerice, sve stranice kojih ste fan (ovdje skraćeno radi preglednosti):</p>
<p><code lang="python">In [1]: fb = open("profile.html", "r")<br />
In [2]: import html5lib<br />
In [3]: fbdoc = html5lib.parse(fb.read(), "dom")<br />
In [4]: spans = fbdoc.getElementsByTagName("span")<br />
In [5]: pages = [span for span in spans if span.getAttribute("class") == u"page"]<br />
In [6]: memberof = [page.childNodes[0].wholeText for page in pages]<br />
In [9]: ", ".join(memberof[20:50])<br />
Out[9]: u'Martial arts, Physics, Music, Development, Astronomy, Computer science, Martial arts, Mathematics, Drudkh, Robert Fripp, Green Carnation, Agalloch, KYLESA, iwrestledabearonce, Tricky (Adrian Thaws), yakuza, The Kilimanjaro Darkjazz Ensemble, Rosetta, Herbie Hancock Official Artist Page, Cult of Luna, Steve Von Till, Dying Fetus, Glenn Branca, Autechre, Amon Tobin, Chase &amp; Status, One Day As A Lion, Mastodon, Ayreon, Neurosis'</code></p>
<p>Ekvivalentno se jednostavno sa iste stranice mogu dobiti i grupe (koje imaju klasu &#8220;group&#8221; umjesto &#8220;page&#8221;), a ni Wall ne bi smio predstavljati probleme. Poruke su, nažalost, nekonzistentne: novije se prikazuju u finim threadovima, dok se starije prikazuju zasebno (svaka u svom threadu).</p>
<p style="text-align: center;"><a href="http://nikola.plejic.com/blog/wp-content/uploads/2010/10/2010-10-31-095611_3520x1080_scrot.png" rel="lightbox[344]"><img class="size-medium wp-image-361  aligncenter" title="HTML kod jednog unosa na Wallu" src="http://nikola.plejic.com/blog/wp-content/uploads/2010/10/2010-10-31-095611_3520x1080_scrot-300x128.png" alt="HTML kod jednog unosa na Wallu" width="300" height="128" /></a><br />
<span style="font-size: 80%;">HTML kod jednog unosa na Wallu</span></p>
<p>Bilo bi odlično kad bi unutra bila i poneka informacija o svakoj stranici koje smo fan i ponešto o svakom od prijatelja, no ne vjerujem da će taj feature osvanuti u bližoj budućnosti &#8212; to više nisu <em>osobni</em> podaci, i njihova bi dostupnost povukla novi niz problema s privatnošću. Naravno, postoji tu još puno prostora za poboljšanje, no <strong>za početak</strong> je ovo dovoljno dobar korak u pravom smjeru.</p>


<h3>Povezani postovi:</h3><p>Nema povezanih postova.</p>]]></content:encoded>
			<wfw:commentRss>http://nikola.plejic.com/blog/brzinski-pogled-na-facebookov-download-your-information-feature/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://nikola.plejic.com/blog/brzinski-pogled-na-facebookov-download-your-information-feature/</feedburner:origLink></item>
		<item>
		<title>File upload in Clojure &amp; Compojure</title>
		<link>http://feedproxy.google.com/~r/NikolaPlejic/~3/e1Xu2NsZD7c/</link>
		<comments>http://nikola.plejic.com/blog/file-upload-in-clojure-compojure/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 18:47:50 +0000</pubDate>
		<dc:creator>Nikola Plejić</dc:creator>
				<category><![CDATA[(Web) Development]]></category>
		<category><![CDATA[English posts]]></category>

		<guid isPermaLink="false">http://nikola.plejic.com/blog/?p=315</guid>
		<description><![CDATA[Compojure is coming to be a really nice framework which is, together with the excellent Enlive templating/transformation library, enough to make this Lisp n00b take a shot at developing a toy project or two in a Lisp dialect. I struggled a bit today to do a file upload: it&#8217;s a relatively recent feature in the framework [...]

<h3>Povezani postovi:</h3>
Nema povezanih postova.]]></description>
			<content:encoded><![CDATA[<p><a href="http://compojure.org/">Compojure</a> is coming to be a really nice framework which is, together with the excellent <a href="http://github.com/cgrand/enlive">Enlive</a> templating/transformation library, enough to make this Lisp n00b take a shot at developing a toy project or two in a Lisp dialect. I struggled a bit today to do a file upload: it&#8217;s a relatively recent feature in the framework and although it&#8217;s pretty straightforward, it took me a while to get it up to speed. Here&#8217;s a really basic and primitive example which assumes you have clojure.contrib, Ring, Compojure and Enlive installed.</p>
<p><span id="more-315"></span></p>
<p>The key step is to wrap your upload handling route with the <code>wrap-multipart-params</code> middleware from the <code>ring.middleware.multipart-params</code> namespace. The route responsible for the file upload is the latter one:</p>
<pre lang="lisp">(defroutes public-routes
  (GET "/" [] (render (index)))
  (mp/wrap-multipart-params
    (POST "/file" {params :params} (upload-file (get params "file")))))</pre>
<p>(<code>file</code> in the <code>(get params "file")</code> call is the name of the <code>input</code> field.)</p>
<p>Next, here&#8217;s the <code>upload-file</code> handler function called by the route which just takes the file and copies it to a file named <code>file.out</code> in the current project directory:</p>
<pre lang="lisp">(defn upload-file
      [file]
      (ds/copy (file :tempfile) (ds/file-str "file.out"))
      (render (upload-success)))</pre>
<p>(<code>ds</code> is an alias for the <code>clojure.contrib.duck-streams</code> namespace, and <code>render</code> is a function which takes a template and returns its string representation. <code>upload-success</code> is an Enlive template.)</p>
<p>Voila! Not hard at all. Also check out the <a href="http://gist.github.com/562624">gist with complete code and template files</a>.</p>


<h3>Povezani postovi:</h3><p>Nema povezanih postova.</p>]]></content:encoded>
			<wfw:commentRss>http://nikola.plejic.com/blog/file-upload-in-clojure-compojure/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://nikola.plejic.com/blog/file-upload-in-clojure-compojure/</feedburner:origLink></item>
		<item>
		<title>List of participants in the Croatian War of Independence published without authorization, chaos ensues</title>
		<link>http://feedproxy.google.com/~r/NikolaPlejic/~3/3jpudm_TjgI/</link>
		<comments>http://nikola.plejic.com/blog/list-of-participants-in-the-croatian-war-of-independence-published-without-authorization-chaos-ensues/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 14:15:34 +0000</pubDate>
		<dc:creator>Nikola Plejić</dc:creator>
				<category><![CDATA[English posts]]></category>

		<guid isPermaLink="false">http://nikola.plejic.com/blog/?p=289</guid>
		<description><![CDATA[On Tuesday, April 6th, an unknown person or group published the controversial list of participants in the Croatian War of Independence. The list was kept secret by the Croatian government, claiming its publishing would be illegal. The infamous document contains the information on about half a million Croatian defenders. The number of participants in the war [...]

<h3>Povezani postovi:</h3>
Nema povezanih postova.]]></description>
			<content:encoded><![CDATA[<p>On Tuesday, April 6th, an unknown person or group <a href="http://www.registarbranitelja.com/">published the controversial list of participants</a> in the <a href="   http://en.wikipedia.org/wiki/Croatian_War_of_Independence">Croatian War of Independence</a>.</p>
<p>The list was kept secret by the Croatian government, claiming its publishing would be illegal. The infamous document contains the information on about half a million Croatian defenders. The number of participants in the war and their identity is a topic of great debate in Croatian politics, as allegedly many people on the list don&#8217;t belong there and weren&#8217;t actively participating in the defense of Croatia during the period between 1991 and 1995, but are using the rights and benefits given to the participants by the Croatian government. Although many politicians, including the Croatian president Ivo Josipović, as well as some of the participants in the war are requesting the list to be publicly available, the government refused to change the laws necessary for its &#8220;legal&#8221; publishing.<span id="more-289"></span></p>
<p>The news about the availability of the register was brought to attention by the Croatian media and spread quickly. The list isn&#8217;t complete, and lacks at least the data about the employees of the Croatian Ministry of Internal Affairs. Judging by the comments, the available data is generally correct, with minor errors. I personally tried a query or two for certain people I knew were participating in the war, and it seems to be credible.</p>
<p>The Croatian government announced it will prosecute the individuals responsible.</p>
<h2>Blocked by Croatian ISPs?</h2>
<p>Currently, the list isn&#8217;t accessible from any of the major Croatian internet service providers. This could be possible due to the site&#8217;s host throttling the probably enormous traffic from Croatia, but also due to Croatia&#8217;s ISPs blocking the access to the website. No official information about this is available at the time of writing.</p>
<p>The website is accessible from other countries, including Slovenia, and can be accessed from Croatia by using a proxy.</p>
<p><strong>Update (17:20)</strong> The website www.registarbranitelja.com currently seems to be inaccessible globally. <a href="http://proxify.co.uk/p/011010A1000100/687474703a2f2f7777772e72656769737461726272616e6974656c6a612e636f6d2f">Some proxy sites</a> do display the homepage from cache, but not the search page, probably due to its dynamic nature.</p>
<p><strong>Update (18:15)</strong> The website&#8217;s hosting company, InvisiHosting LLC, said to the <a href="http://www.vecernji.hr/vijesti/vlasnik-servera-nema-sanse-da-otkrijemo-tko-je-objavio-registar-clanak-122369">Croatian news portal Vecernji.hr</a> they don&#8217;t have any plans of disclosing the identity of the author. They also said their servers are currently struggling with the high traffic and demand, and that it should be accessible soon. The website still isn&#8217;t accessible from Croatia, but it can be accessed through proxys and relays such as <a href="https://www.torproject.org/">Tor</a>.</p>
<div id="attachment_300" class="wp-caption aligncenter" style="width: 310px"><a href="http://nikola.plejic.com/blog/wp-content/uploads/2010/04/2010-04-07-182318_3200x1080_scrot.png" rel="lightbox[289]"><img class="size-medium wp-image-300" title="2010-04-07-182318_3200x1080_scrot" src="http://nikola.plejic.com/blog/wp-content/uploads/2010/04/2010-04-07-182318_3200x1080_scrot-300x184.png" alt="" width="300" height="184" /></a><p class="wp-caption-text">The website is accessible through relays such as the Tor network</p></div>
<h2>Marko Rakar in jail?</h2>
<p>Not long after the list went public, someone mentioned the name of the famous Croatian blogger and politics consultant Marko Rakar &#8211; Mrak, claiming he was involved in the publishing of the list. Mrak is the editor of the collaborative blog Pollitika, one of the largest communities in Croatia, and was responsible for making the Croatian voters list publicly available due to certain cases of dead people voting in elections. He voluntarily went to the police as he assumed he&#8217;d probably be the first place they&#8217;d investigate, and by the recent news from his attorney, is being held in custody for unknown reasons.</p>
<p>Marko Rakar should be released from custody during the evening.</p>
<p><strong>Update</strong> Mrak was released from custody. His home and office were searched by the police.</p>


<h3>Povezani postovi:</h3><p>Nema povezanih postova.</p>]]></content:encoded>
			<wfw:commentRss>http://nikola.plejic.com/blog/list-of-participants-in-the-croatian-war-of-independence-published-without-authorization-chaos-ensues/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://nikola.plejic.com/blog/list-of-participants-in-the-croatian-war-of-independence-published-without-authorization-chaos-ensues/</feedburner:origLink></item>
		<item>
		<title>(G)Vim: postavljanje opcija u ovisnosti o direktoriju</title>
		<link>http://feedproxy.google.com/~r/NikolaPlejic/~3/Idx-Iy5icGI/</link>
		<comments>http://nikola.plejic.com/blog/gvim-postavljanje-opcija-u-ovisnosti-o-direktoriju/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 20:58:17 +0000</pubDate>
		<dc:creator>Nikola Plejić</dc:creator>
				<category><![CDATA[(Web) Development]]></category>
		<category><![CDATA[GNU/Linux]]></category>

		<guid isPermaLink="false">http://nikola.plejic.com/blog/?p=274</guid>
		<description><![CDATA[Paralelni rad na nekoliko različitih projekata1 može biti zanimljiv, ali i frustrirajuć ukoliko ti projekti koriste različite konvencije za pisanje koda. Vim spašava stvar sa svojih nekoliko načina za korištenje paralelnih konfiguracija. Svako rješenje ima svojih prednosti, no najjednostavnijim se i najefikasnijim u mojem slučaju pokazalo dodavanje sljedeće linije u ~/.vimrc: au BufRead,BufNewFile /path/do/foldera/* setl [...]

<h3>Povezani postovi:</h3>
Nema povezanih postova.]]></description>
			<content:encoded><![CDATA[<p>Paralelni rad na nekoliko različitih projekata<sup>1</sup> može biti zanimljiv, ali i frustrirajuć ukoliko ti projekti koriste različite konvencije za pisanje koda. Vim spašava stvar sa svojih <a href="http://stackoverflow.com/questions/1889602/multiple-vim-configurations/1889707">nekoliko načina za korištenje paralelnih konfiguracija</a>.<span id="more-274"></span></p>
<p>Svako rješenje ima svojih prednosti, no najjednostavnijim se i najefikasnijim u mojem slučaju pokazalo dodavanje sljedeće linije u ~/.vimrc:</p>
<pre lang="vim">
au BufRead,BufNewFile /path/do/foldera/* setl noexpandtab
</pre>
<p>Gornji primjer će za sve fileove koji se nalaze unutar foldera /path/do/foldera (i ispod njega) koristiti &#8220;prave&#8221; tabove umjesto spaceova koji su moja defaultna konfiguracija. Hvala, Vim.</p>
<p><sup>1</sup> <i>(&#8220;Paralelni rad na nekoliko različitih projekata&#8221; ujedno i vrlo dobro opisuje razloge radi kojih je ovaj blog mrtav više od pola godine.)</i></p>


<h3>Povezani postovi:</h3><p>Nema povezanih postova.</p>]]></content:encoded>
			<wfw:commentRss>http://nikola.plejic.com/blog/gvim-postavljanje-opcija-u-ovisnosti-o-direktoriju/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nikola.plejic.com/blog/gvim-postavljanje-opcija-u-ovisnosti-o-direktoriju/</feedburner:origLink></item>
		<item>
		<title>Zašto Wolfram|Alpha neće ubiti Google, i zašto to nije bitno</title>
		<link>http://feedproxy.google.com/~r/NikolaPlejic/~3/FkWBk-K1hSc/</link>
		<comments>http://nikola.plejic.com/blog/zasto-wolframalpha-nece-ubiti-google-i-zasto-to-nije-bitno/#comments</comments>
		<pubDate>Thu, 21 May 2009 14:52:09 +0000</pubDate>
		<dc:creator>Nikola Plejić</dc:creator>
				<category><![CDATA[Web aplikacije]]></category>
		<category><![CDATA[Znanost]]></category>

		<guid isPermaLink="false">http://nikola.plejic.com/blog/?p=219</guid>
		<description><![CDATA[Od svog predstavljanja, Wolfram&#124;Alpha ne prestaje privlačiti pozornost tehnološki osvještenijeg dijela populacije. Reakcije su mnoge, od izrazito pozitivnih do izrazito negativnih, a mnoge od njih pokazuju određeno nerazumijevanje koncepta same aplikacije. Tko i što je Wolfram Research? Prije nego što krenemo u detaljniji pogled u Alphu treba predstaviti njihove stvaraoce &#8212; Wolfram Research, na čijem [...]

<h3>Povezani postovi:</h3>
Nema povezanih postova.]]></description>
			<content:encoded><![CDATA[<p>Od svog predstavljanja, Wolfram|Alpha ne prestaje privlačiti pozornost tehnološki osvještenijeg dijela populacije. Reakcije su mnoge, od izrazito pozitivnih do izrazito negativnih, a mnoge od njih pokazuju određeno nerazumijevanje koncepta same aplikacije.<span id="more-219"></span></p>
<h3>Tko i što je Wolfram Research?</h3>
<p><img class="size-full wp-image-222" title="wolframlogo" src="http://nikola.plejic.com/blog/wp-content/uploads/2009/05/wolframlogo.jpg" alt="Wolfram Research - Makers of Mathematica" width="200" height="135" align="left" /></p>
<p>Prije nego što krenemo u detaljniji pogled u Alphu treba predstaviti njihove stvaraoce &#8212; <a href="http://www.wolfram.com/">Wolfram Research</a>, na čijem čelu stoji karizmatični i ponešto kontroverzni <a href="http://en.wikipedia.org/wiki/Stephen_Wolfram">Stephen Wolfram</a>. Wolframovci su najpoznatiji po iznimno moćnoj <a href="http://en.wikipedia.org/wiki/Mathematica">Mathematici</a>, softveru s kojim su upoznate generacije inženjera različitih struka i koji obuhvaća alate za računalnu algebru, numeričke kalkulacije, statistiku i još mnogo grana matematike, a u sebi sadrži bogatu bazu astronomskih, fizikalnih, kemijskih, lingvističkih, financijskih i inih podataka na koje se ti alati mogu primijeniti.</p>
<h3>Zašto Alpha nije ni Google ni Wikipedija</h3>
<p>Wolfram|Alpha je praktički Mathematica na steroidima prenesena na web, s (blago rečeno) nadopunjenom bazom kojoj se upiti šalju engleskim jezikom. Za sada sam primijetio dvije glavne zamjerke koje se protežu kroz većinu osvrta: <a href="http://www.techcrunch.com/2009/05/15/putting-wolfram-alpha-to-the-test-not-super-impressed-but-here-are-50-invites/">starost podataka</a> i <a href="http://rep.hr/vijesti/internet/tresla-se-brda-rodio-se-wolfram-alpha/423/">nedostatak određenih informacija</a>. Oba problema su poprilično ozbiljna ukoliko se Alpha promatra kao tražilica, od čega će Wolframovci vrlo vjerojatno teško moći pobjeći s obzirom na već stvoreni dojam i na <em>user interface</em> koji izrazito podsjeća na, primjerice, Google.</p>
<p>No, već u logotipu stoji da Alpha nije tražilica, nego <em>computational knowledge engine</em><a name="foothref" href="#footnote">*</a>, te stoga prikuplja <strong>podatke</strong>, i to strukturirane podatke kojima zna manipulirati. To otprilike znači da imate nevjerojatno veliku bazu (10+ <em>trilijuna</em> redova) s kojom možete vršiti raznorazne kalkulacije. Evo nekoliko primjera (klik za veću sliku):</p>
<div style="text-align: center;"><a rel="lightbox" href="http://nikola.plejic.com/blog/wp-content/uploads/2009/05/internetusers.png"><img class="size-medium wp-image-227" title="internetusers" src="http://nikola.plejic.com/blog/wp-content/uploads/2009/05/internetusers-300x207.png" alt="Usporedba korisnika interneta u Europi i Americi" width="300" height="207" /></a></p>
<p><a rel="lightbox" href="http://nikola.plejic.com/blog/wp-content/uploads/2009/05/stanovnici.png"><img class="size-medium wp-image-227" src="http://nikola.plejic.com/blog/wp-content/uploads/2009/05/stanovnici-300x207.png" alt="Eksponencijalna funkcija s omjerom stanovnika Beograda i Zagreba kao argumentom" width="300" height="207" /></a></p>
<h3><a rel="lightbox" href="http://nikola.plejic.com/blog/wp-content/uploads/2009/05/integracija.png"><img class="size-medium wp-image-234" src="http://nikola.plejic.com/blog/wp-content/uploads/2009/05/integracija-300x293.png" alt="Površina New Yorka pomnožena s određenim integralom funkcije e^(x^2)" width="300" height="293" /></a></h3>
</div>
<p>Iz ovog vrlo malog uzorka je vidljiva prava moć Alphe. Podaci možda nisu najaktualniji, ali aktualnost lagano pada u drugi plan jer podatke nije toliko teško aktualizirati koliko je teško razviti ovakve alate za manipulaciju. Upravo tu leži glavna razlika između Alphe i svega ostaloga: ostali mogu imati najaktualnije podatke na svijetu, ali s njima ne mogu ništa, osim ih prikazati krajnjem korisniku. (Disclaimer: Google navodno radi na svom odgovoru, <a href="http://blogoscoped.com/archive/2009-05-12-n39.html">Google Squaredu</a>, ali o tome ćemo kad to vidimo.)</p>
<h3>Koga briga?</h3>
<p>Iako mnogo ljudi koristi tražilice i enciklopedije, mali broj njih zapravo želi raditi kompleksne matematičke manipulacije podacima na koje naiđu. No, Wolfram Alpha može poslužiti mnogo širem krugu ljudi od znanstvenika:</p>
<ul>
<li>s obzirom na bogatu bazu <a href="http://www58.wolframalpha.com/examples/MathematicalFunctions.html">matematičkih funkcija</a> i podataka iz prirodnih i društvenih znanosti, može pomoći osnovnoškolcima i srednjoškolcima u lakšem razumijevanju gradiva,</li>
<li>izrazito pojednostavljuje istraživanje (ne samo znanstveno, nego i istraživanje za članak na vašem blogu) s obzirom da stavlja fokus na <strong>podatak</strong>, što izrazito povećava omjer signala i šuma,</li>
<li>olakšava stavljanje podataka u kontekst jednostavnim manipulacijama (npr. omjerima),</li>
<li>igranje podacima može biti zabavno :).</li>
</ul>
<h3>Ni Wolfram nije savršen&#8230;</h3>
<p>Da ne bi sve ostalo na pohvalama, Wolfram ima još puno posla. Neki <a href="http://www58.wolframalpha.com/input/?i=ljubljana+to+zagreb+%2F+ljubljana+to+wien">relativno</a> <a href="http://www58.wolframalpha.com/input/?i=Log[population+of+new+york]">jednostavni</a> upiti još ne rade, a iako je zadavanje upita na engleskom odličan feature koji funkcionira dosta dobro, osobno bih volio vidjeti i neki egzaktniji način izvlačenja podataka iz baze (primjera radi, Population[New York] umjesto &#8220;population of new york&#8221;). API je za sada ograničen i ne postoji neka detaljnija dokumentacija niti primjer izrade aplikacija koje bi se bazirale na Alphi.</p>
<p>No uz sve to, smatram da će ovakvi servisi uvelike olakšati život ljudima koji traže i obrađuju informacije. Ne, Alpha neće ubiti Google jer vam neće reći kako implementirati binarno stablo u C-u, niti će ubiti Wikipediju jer vam neće objasniti zašto je došlo do trenutnog teritorijalnog spora Hrvatske i Slovenije, ali neće biti ni obrnuto jer trenutno aktualni web servisi nisu svjesni podataka kojima raspolažu koliko je to Alpha.</p>
<p><small><a name="footnote" href="#foothref">*</a> Ukoliko netko ima pametan prijevod za ovo, neka javi u komentarima. :)</small></p>


<h3>Povezani postovi:</h3><p>Nema povezanih postova.</p>]]></content:encoded>
			<wfw:commentRss>http://nikola.plejic.com/blog/zasto-wolframalpha-nece-ubiti-google-i-zasto-to-nije-bitno/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://nikola.plejic.com/blog/zasto-wolframalpha-nece-ubiti-google-i-zasto-to-nije-bitno/</feedburner:origLink></item>
		<item>
		<title>Vidimo se na BarCampu Zagreb!</title>
		<link>http://feedproxy.google.com/~r/NikolaPlejic/~3/0OpGB0Yfo7k/</link>
		<comments>http://nikola.plejic.com/blog/vidimo-se-na-barcampu-zagreb/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 17:44:20 +0000</pubDate>
		<dc:creator>Nikola Plejić</dc:creator>
				<category><![CDATA[Hrvatski web]]></category>

		<guid isPermaLink="false">http://nikola.plejic.com/blog/?p=195</guid>
		<description><![CDATA[U Zagrebu će se 23. siječnja 2008. održati drugi po redu BarCamp Zagreb, jedna u nizu sličnih malih IT i web konferencija koje se održavaju širom svijeta. Bangkok, Taipei, Kiev, Hong Kong, Washington, Los Angeles i Toronto samo neki su u nizu BarCampova, događaja temeljenih na jedinstvenoj organizaciji: BarCamp je besplatan, a “upad” se naplaćuje [...]

<h3>Povezani postovi:</h3>
Nema povezanih postova.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://barcamp.ini.hr/"><img class="size-full wp-image-197 aligncenter" title="banner_barcamp_468" src="http://nikola.plejic.com/blog/wp-content/uploads/2009/01/banner_barcamp_468.jpg" alt="Pridružite se najmanjoj IT i web konferenciji koja je osvojila svijet!" width="468" height="60" /></a></p>
<p>U Zagrebu će se 23. siječnja 2008. održati drugi po redu <a href="http://barcamp.ini.hr/">BarCamp Zagreb</a>, jedna u nizu sličnih malih IT i web konferencija koje se održavaju širom svijeta. Bangkok, Taipei, Kiev, Hong Kong, Washington, Los Angeles i Toronto samo neki su u nizu BarCampova, događaja temeljenih na jedinstvenoj organizaciji: <strong>BarCamp je besplatan</strong>, a “upad” se naplaćuje kroz aktivno sudjelovanje sudionika u područjima <strong>IT i web tehnologija, komunikacija i poduzetništva</strong>.<span id="more-195"></span></p>
<p>Budući da sam prošlogodišnje izdanje BarCampa propustio, a rekli su mi da je bilo odlično, ovo očito ne smijem. S obzirom na interesantan format same (anti?)konferencije i najavljena predavanja, ne može biti loše. Stoga, trk na <a href="http://barcamp.ini.hr/prijava/">prijavu</a> (broj mjesta je ograničen!) i rezervirajte svoje mjesto.</p>
<p>Vidimo se na BarCampu!</p>


<h3>Povezani postovi:</h3><p>Nema povezanih postova.</p>]]></content:encoded>
			<wfw:commentRss>http://nikola.plejic.com/blog/vidimo-se-na-barcampu-zagreb/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://nikola.plejic.com/blog/vidimo-se-na-barcampu-zagreb/</feedburner:origLink></item>
		<item>
		<title>Kako je Creative Commons album zaradio 1,6 milijuna dolara</title>
		<link>http://feedproxy.google.com/~r/NikolaPlejic/~3/fpSNyw3W9yo/</link>
		<comments>http://nikola.plejic.com/blog/kako-je-creative-commons-album-zaradio-16-milijuna-dolara/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 18:24:42 +0000</pubDate>
		<dc:creator>Nikola Plejić</dc:creator>
				<category><![CDATA[Copyright]]></category>
		<category><![CDATA[creative commons]]></category>

		<guid isPermaLink="false">http://nikola.plejic.com/blog/?p=172</guid>
		<description><![CDATA[Umjetnik koji sustavno i uspješno prkosi svim glazbenim i poslovnim trendovima, Trent Reznor, ima razloga za slavlje. Trent je vođa one man benda Nine Inch Nails (NiN), čitateljima ovoga bloga poznatog barem po soundtracku za legendarni Quake 2. Njegov je album, Ghosts I-IV, najprodavaniji album na Amazonovoj MP3 trgovini za 2008. godinu. Revolucija u distribuciji [...]

<h3>Povezani postovi:</h3>
Nema povezanih postova.]]></description>
			<content:encoded><![CDATA[<p>Umjetnik koji sustavno i uspješno prkosi svim glazbenim i poslovnim trendovima, <a href="http://en.wikipedia.org/wiki/Trent_Reznor">Trent Reznor</a>, ima razloga za slavlje. Trent je vođa one man benda <a href="http://www.nin.com/">Nine Inch Nails</a> (NiN), čitateljima ovoga bloga poznatog barem po soundtracku za legendarni Quake 2. Njegov je album, Ghosts I-IV, <a href="http://creativecommons.org/weblog/entry/11947">najprodavaniji album</a> na Amazonovoj MP3 trgovini za 2008. godinu.<span id="more-172"></span></p>
<h3>Revolucija u distribuciji i licenciranju glazbe</h3>
<p style="text-align: center;"><img class="size-full wp-image-179" title="nin-top10" src="http://nikola.plejic.com/blog/wp-content/uploads/2009/01/nin-top10.png" alt="Prva pozicija Nine Inch Nailsa na listi najprodavanijih albuma 2008. godine" width="367" height="201" /></p>
<p>Ništa čudno, s obzirom na ugled i veličinu benda kao što je NiN. No, ući u društvo bendova kao što su Coldplay, Death Cab for Cutie, Beck i Keane s <strong>mračnim ambijentalnim</strong> albumom izdanim pod liberalnom<strong> Creative Commons</strong> <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/">licencom</a> koja dopušta nesmetano i potpuno legalno umnožavanje i remiksiranje uradka u nekomercijalne svrhe čak i za tako velik bend nije toliko mala stvar.</p>
<p>Trent je prvi dio albuma (Ghosts I) ponudio <a href="http://ghosts.nin.com/main/order_options">besplatno za download</a> u raznim formatima (od MP3-ica, do lossless FLAC formata, <strong>bez DRM-a</strong>) i uploadao ga na <a href="http://thepiratebay.org/torrent/4059158/Nine_Inch_Nails_-_Ghosts_I_%282008%29">The Pirate Bay</a>, najpopularniji BitTorrent tracker na internetu. Ostala tri dijela su se mogla kupiti za <strong>5 dolara</strong> u istom rasponu formata na službenom siteu benda. Radi licence, ubrzo su se&#8212;i sasvim legalno&#8212;na torrentima pojavila i ostala tri dijela albuma.</p>
<h3>Poslovni model? Da, postoji!</h3>
<p><img class="size-full wp-image-182" title="nin-ghosts_i-iv" src="http://nikola.plejic.com/blog/wp-content/uploads/2009/01/nin-ghosts_i-iv.jpg" alt="Naslovnica albuma Ghosts I-IV" width="180" height="180" align="left" /></p>
<p>Unatoč svemu je limitirano deluxe izdanje albuma, koje je koštalo <strong>300 dolara</strong>,  rasprodano u rekordnom roku. Da bi svi mogli downloadati album, morali su upogoniti dodatne servere radi ogromne navale. U roku od <strong>tjedan dana</strong> su fanovi za album platili više od <a href="http://leisureblogs.chicagotribune.com/turn_it_up/2008/03/reznors-one-wee.html">1,6 milijuna dolara</a>.</p>
<p>Naravno, da je ovakav potez povukao neki manje poznat bend ili umjetnik, teško da bi završio ovako uspješno. To je ujedno i argument kojeg vrlo često koriste skeptici prema ovakvim metodama licenciranja i distribucije glazbe, pri čemu zanemaruju činjenicu da bi ti isti, manje poznati izvođači teško postigli ovakav uspjeh i da iza njih stoji velika izdavačka kuća.</p>
<p>Napokon, izvođače nitko ne sprječava da na drugi način pokriju promociju svojih radova koju bi inače obavio neki od ogromnih izdavača, primjerice outsourceanjem marketinškog dijela posla nekome tko se u to razumije ili suradnjom s izdavačkom kućom koja razumije što je Creative Commons i podržava ga.</p>
<h3>Što dalje?</h3>
<p>S druge strane, ono što ovaj eksperiment pokazuje jest nešto čega su fanovi glazbe svjesni već neko vrijeme: ljudi koji žele kupovati CD-e ih kupuju i kad je glazba dostupna besplatno; ljudi koji ih žele piratizirati će to raditi bez obzira na oblik zaštite koji im izdavačke kuće pokušavaju nametnuti.</p>
<p>Trent očito smatra da je pokus uspješan, jer je nedugo nakon izdavanja albuma Ghosts I-IV izdao još jedan album, <a href="http://theslip.nin.com/">The Slip</a>, pod jednako liberalnom licencom.</p>
<p style="text-align:center;"><img class="size-medium wp-image-185" title="nin-cclogolarge" src="http://nikola.plejic.com/blog/wp-content/uploads/2009/01/nin-cclogolarge-300x71.png" alt="Creative Commons" width="300" height="71" /></p>
<p><a href="http://www.creativecommons.org/">Creative Commons</a> nudi vrlo moćan set alata koji omogućuju vrlo liberalno licenciranje uz čuvanje prava autora. Ostaje nadati se da će ovaj uspjeh ohrabriti da sve više umjetnika prigrli ovaj oblik licenciranja i nove, uz malo truda superiornije metode distribucije njihovih radova.</p>


<h3>Povezani postovi:</h3><p>Nema povezanih postova.</p>]]></content:encoded>
			<wfw:commentRss>http://nikola.plejic.com/blog/kako-je-creative-commons-album-zaradio-16-milijuna-dolara/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://nikola.plejic.com/blog/kako-je-creative-commons-album-zaradio-16-milijuna-dolara/</feedburner:origLink></item>
		<item>
		<title>Sretni blagdani!</title>
		<link>http://feedproxy.google.com/~r/NikolaPlejic/~3/0HhvTtUC35k/</link>
		<comments>http://nikola.plejic.com/blog/sretni-blagdani/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 20:38:44 +0000</pubDate>
		<dc:creator>Nikola Plejić</dc:creator>
				<category><![CDATA[Meta]]></category>

		<guid isPermaLink="false">http://nikola.plejic.com/blog/?p=153</guid>
		<description><![CDATA[Povodom nadolazećih blagdana, želim svim čitateljima ovog bloga sretan Božić i sve najbolje što mogu poželjeti u novoj 2009. godini. Hvala na čitanju, komentarima, linkovima, mailovima, tweetovima i ostalim metodama &#8220;komunikacije 2.0&#8243;! Slijedi malo statistika (bazirano na Google Analyticsu) i kratak osvrt na godinu: ovaj blog je pokrenut 24. srpnja, kao nastavak bloga Homo Ludens [...]

<h3>Povezani postovi:</h3>
Nema povezanih postova.]]></description>
			<content:encoded><![CDATA[<p>Povodom nadolazećih blagdana, želim svim čitateljima ovog bloga sretan Božić i sve najbolje što mogu poželjeti u novoj 2009. godini. Hvala na čitanju, komentarima, linkovima, mailovima, tweetovima i ostalim metodama &#8220;komunikacije 2.0&#8243;!</p>
<p>Slijedi malo statistika (bazirano na Google Analyticsu) i kratak osvrt na godinu:<span id="more-153"></span></p>
<ul>
<li>ovaj blog je pokrenut <strong>24. srpnja</strong>, kao nastavak bloga <a href="http://homoludens.wordpress.com/">Homo Ludens</a></li>
<li>blog ste posjetili oko <strong>1700</strong> puta, s oko <strong>3500</strong> pregleda stranica</li>
<li><strong>najpopularniji</strong> post je uvjerljivo <a href="http://nikola.plejic.com/blog/programiranje-i-informatika-je-li-fakultet-potreban/">Programiranje i informatika &#8211; Je li fakultet potreban?</a>, a ujedno ste na njega i najviše linkali; iza njega slijedi članak <a href="http://nikola.plejic.com/blog/open-source-softver-za-matematiku-i-prirodne-znanosti/">Open source softver za matematiku i prirodne znanosti</a></li>
<li><strong>najbolji referrer</strong> je Google, a od stranica je na vrhu <a href="http://www.croportal.net/">Croportal</a>; na trećem i četvrtom mjestu su <a href="http://www.webmajstori.net/">Webmajstori</a> i <a href="http://www.twitter.com/">Twitter</a></li>
<li>neki od interesantnijih <strong>queryja</strong> na tražilicama preko kojih ste došli na stranicu:
<ul>
<li><em>analiza stava kineziologija</em> (hvala <a href="http://www.maratz.com/">Maratzu</a> na ovome)</li>
<li><em>imam fakultet i ne radim</em></li>
<li><em>jeli sa fakultetom bolje u životu</em></li>
<li><em>kako steći volju i upornost</em> (ukoliko je autor queryja ovo saznao, neka mi se javi)</li>
<li> <em>matematicka analiza ne shvacam</em> (suosjećam, pogledati točku iznad)</li>
<li><em>ne zelim da se bavim informatikom</em></li>
</ul>
</li>
<li>korišteni <strong>browseri</strong>: Firefox (65.96%), Internet Explorer (18.98%), Opera (8.67%), Safari (3.86%), Chrome (1.45%), Mozilla (0.78%), Konqueror (0.30%)</li>
<li>korišteni <strong>operativni sustavi</strong>: Windows (79.64%), Linux (15.30%), Macintosh (4.58%), iPhone, SunOS, SymbianOS, ostali / neodređeno (ukupno ispod 1%)</li>
</ul>
<p>Rekao bih da je 2008. bila dobra godina za hrvatski web &#8212; pokrenuto je nekoliko novih projekata, nekoliko starih je osvježeno. Web polako dobiva na popularnosti, što dijelom dugujemo činjenici da je, iako možda na krivi način, šira javnost otkrila sveprisutni Facebook, o kojem već pričaju i bakice na tržnici.</p>
<p>Naravno, prostora za poboljšanje nikad ne nedostaje, te smatram da se imamo mnogočemu veseliti u nadolazećoj godini na webu općenito. Razvojne platforme se konstantno razvijaju, a svakim se danom pojavljuju uzbudljivi ljudi koji se s njima ne boje napraviti nešto novo.</p>
<p>Sljedeći susret zakazujem za nekad iza Nove godine, a do tada me slobodno pratite i javite se na <a href="http://www.twitter.com/nikolaplejic">Twitteru</a>. Ugodni blagdani!</p>


<h3>Povezani postovi:</h3><p>Nema povezanih postova.</p>]]></content:encoded>
			<wfw:commentRss>http://nikola.plejic.com/blog/sretni-blagdani/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://nikola.plejic.com/blog/sretni-blagdani/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 0.299 seconds -->

