<?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:blogger='http://schemas.google.com/blogger/2008' 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-5338095480733018105</id><updated>2025-09-06T01:18:15.376+02:00</updated><category term="lisp"/><category term="common lisp"/><category term="symbolicweb"/><category term="linux"/><category term="sw-mvc"/><category term="debian"/><category term="ubuntu"/><category term="bugs"/><category term="clojure"/><category term="widget"/><category term="ccl"/><category term="clos"/><category term="combo-box"/><category term="commit"/><category term="concurrency"/><category term="dataflow"/><category term="desktop recording"/><category term="dynamic variables"/><category term="execution context"/><category term="functional"/><category term="gc"/><category term="jvm"/><category term="macro"/><category term="postgresql"/><category term="reactive"/><category term="sbcl"/><category term="standards"/><category term="sw-stm"/><category term="w3c"/><category term="web"/><category term="9.10"/><category term="alter table"/><category term="amop"/><category term="android"/><category term="book"/><category term="browser"/><category term="bsd"/><category term="build tool"/><category term="caching"/><category term="callbacks"/><category term="cast"/><category term="chrome"/><category term="chromium"/><category term="communication"/><category term="conservative"/><category term="container"/><category term="copyleft"/><category term="copyright"/><category term="crackle"/><category term="css sucks layout overflow w3c-are-evil w3c design chat"/><category term="dialog"/><category term="eql-specialization"/><category term="etag"/><category term="events"/><category term="ffmpeg"/><category term="firefox"/><category term="fork"/><category term="garbage collection"/><category term="git github"/><category term="gpl"/><category term="h264"/><category term="hardware"/><category term="haskell"/><category term="hd-555"/><category term="headphones"/><category term="http"/><category term="http 304"/><category term="idea for the future"/><category term="imperative"/><category term="internet"/><category term="java"/><category term="karmic"/><category term="kde distro linux gnome unity kubuntu"/><category term="law"/><category term="leak"/><category term="localhost"/><category term="memory"/><category term="message passing"/><category term="microsoft"/><category term="mobile"/><category term="model"/><category term="mop"/><category term="music"/><category term="mvc"/><category term="networking"/><category term="oss"/><category term="paradigms"/><category term="pci latency"/><category term="precise"/><category term="processes"/><category term="programming paradigms"/><category term="pure"/><category term="rant"/><category term="readtable"/><category term="recursion"/><category term="refresh"/><category term="scala"/><category term="scalability"/><category term="screencast"/><category term="screencasting"/><category term="screenshots"/><category term="sennheiser"/><category term="skype"/><category term="slot-value-using-class"/><category term="sound blaster"/><category term="sql"/><category term="static"/><category term="stm"/><category term="stream"/><category term="strong copyleft"/><category term="subdomain"/><category term="subdomains"/><category term="sw-db"/><category term="symbolicweb clojure lisp rewrite"/><category term="syntax"/><category term="theora"/><category term="twitter"/><category term="ui"/><category term="video"/><category term="vlc"/><category term="vp8"/><category term="weak copyleft"/><category term="webm"/><category term="x window system"/><category term="xfce"/><title type='text'>defgeneric</title><subtitle type='html'>Collection of random stuff from &lt;a href=&quot;https://www.quanto.ga/&quot;&gt;www.quanto.ga&lt;/a&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://defgeneric.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-5348813950169547178</id><published>2019-10-12T10:12:00.000+02:00</published><updated>2019-10-12T10:12:42.111+02:00</updated><title type='text'>Clojure: different JVM options for different JVMs</title><content type='html'>I sometimes use OpenJ9 instead of Hotspot -- and so I need different JVM options depending on what VM / compiler I use. Here&#39;s one way of doing this; in &lt;i&gt;~/.lein/profiles.clj&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;{:user&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;{:global-vars {*warn-on-reflection* true, *unchecked-math* :warn-on-boxed, *print-length* 100}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; :plugins [[lein-ancient &quot;LATEST&quot;]]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; :jvm-opts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; #=(eval&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;(concat&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [&quot;--illegal-access=deny&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;-XX:-OmitStackTraceInFastThrow&quot; ;; See http://stackoverflow.com/a/2070568/160305 ..and this is also interesting http://blogs.atlassian.com/2011/05/if_you_use_exceptions_for_path_control_dont_fill_in_the_stac/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ;; OpenJ9 stuff&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (when (clojure.string/includes? (System/getProperty &quot;java.vm.name&quot;) &quot;OpenJ9&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&quot;-Xquickstart&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;;; TODO: https://github.com/eclipse/openj9/issues/4205&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(str &quot;-Xshareclasses:name=&quot; (last (clojure.string/split (System/getenv &quot;PWD&quot;) #&quot;/&quot;)))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;-Xscmx1g&quot; ;; https://www.eclipse.org/openj9/docs/xscmx/&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;])))}}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/5348813950169547178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/5348813950169547178'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2019/10/clojure-different-jvm-options-for.html' title='Clojure: different JVM options for different JVMs'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-3698457989140378701</id><published>2018-10-19T22:45:00.002+02:00</published><updated>2018-10-19T23:01:57.031+02:00</updated><title type='text'>OpenWRT 18.06.1 on the TL-MR3020</title><content type='html'>The new OpenWRT images are too big for the old TL-MR3020, but by removing IPv6 support I got these working just fine on my (HW ver. 1.9):&amp;nbsp;&lt;a href=&quot;https://drive.google.com/drive/folders/1f6XLDQLhvdm9SyTQeFWjZ8tf9f6QCtpR?usp=sharing&quot;&gt;https://drive.google.com/drive/folders/1f6XLDQLhvdm9SyTQeFWjZ8tf9f6QCtpR?usp=sharing&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
..I can provide other custom builds of OpenWRT if people are interested.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijXmYfOZLbQz5alPVU6rRyk2wDw7WaxgoSTqAPoJTz5FoaI1KUXabIKyWLrMux4wy6GWSMY2QzJ266JHINzZNy-tpPGgCj_9SPCzeNHMeHAiDp0jQNr4AK3AC5uzPUhqJEh0IJ0Lba6Jo/s1600/Screenshot_2018-10-19_23-45-47.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;595&quot; data-original-width=&quot;962&quot; height=&quot;393&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijXmYfOZLbQz5alPVU6rRyk2wDw7WaxgoSTqAPoJTz5FoaI1KUXabIKyWLrMux4wy6GWSMY2QzJ266JHINzZNy-tpPGgCj_9SPCzeNHMeHAiDp0jQNr4AK3AC5uzPUhqJEh0IJ0Lba6Jo/s640/Screenshot_2018-10-19_23-45-47.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
....some notes to self:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
make -j4 image PROFILE=&quot;tl-mr3020-v1&quot; PACKAGES=&quot;-ip6tables -odhcp6c -kmod-ipv6 -kmod-ip6tables -odhcpd-ipv6only -luci-proto-ipv6 kmod-usb-core kmod-usb2 -kmod-usb-ohci luci&quot;&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;..using the `tiny` images.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&lt;/blockquote&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/3698457989140378701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/3698457989140378701'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2018/10/openwrt-18061-on-tl-mr3020.html' title='OpenWRT 18.06.1 on the TL-MR3020'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijXmYfOZLbQz5alPVU6rRyk2wDw7WaxgoSTqAPoJTz5FoaI1KUXabIKyWLrMux4wy6GWSMY2QzJ266JHINzZNy-tpPGgCj_9SPCzeNHMeHAiDp0jQNr4AK3AC5uzPUhqJEh0IJ0Lba6Jo/s72-c/Screenshot_2018-10-19_23-45-47.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-2102069365686587128</id><published>2014-04-25T20:01:00.004+02:00</published><updated>2015-03-10T17:07:25.652+01:00</updated><title type='text'>Extract audio or music as is (copy) from video using FFmpeg</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;I keep forgetting how to do this. Note to self:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ffmpeg -i input.mp4 -vn -c:a copy output.aac&lt;/span&gt;&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, here&#39;s how I make sure music downloaded from e.g. YouTube can be played on my phone:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;for f in *.m4a; do ffmpeg -y -i &quot;$f&quot; -acodec copy -movflags faststart &quot;$f.aac&quot;; done&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/2102069365686587128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/2102069365686587128'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2014/04/extract-audio-or-music-as-is-copy-from.html' title='Extract audio or music as is (copy) from video using FFmpeg'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-4700263025991320401</id><published>2014-04-23T15:02:00.001+02:00</published><updated>2014-09-09T13:26:29.214+02:00</updated><title type='text'>Xubuntu 14.04: Black screen (Light Locker)</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;
Yeah, Xubuntu 14.04 shouldn&#39;t have shipped with Light Locker. They should have used XScreenSaver for now. Here&#39;s how to fix black screen after unlocking or resuming after suspend:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo apt-get install xscreensaver&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo apt-get remove light-locker light-locker-settings&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
There&#39;s an issue talking about this here: &lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1259339&quot;&gt;https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1259339&lt;/a&gt; &amp;nbsp;..but none of the suggestions there worked for me.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The Xubuntu devs will probably fix this later, and I&#39;ll switch to Light Locker then; when it actually works; not before.&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/4700263025991320401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/4700263025991320401'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2014/04/xubuntu-1404-black-screen-light-locker.html' title='Xubuntu 14.04: Black screen (Light Locker)'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-6839834264933397262</id><published>2014-04-07T11:03:00.001+02:00</published><updated>2014-04-09T18:55:53.786+02:00</updated><title type='text'>Clojure: How to detect transaction (STM) retries</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;Here&#39;s a simple snippet that gives you an idea how to detect transaction (STM) retries in Clojure:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;(let [n (atom 0)]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; (dosync&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; (if-not (zero? @n)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (println &quot;try &amp;gt;= 2 of transaction&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (do&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (swap! n inc)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (println &quot;first try of transaction&quot;)))))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;...of course this won&#39;t trigger retries, but you get the idea.&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/6839834264933397262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/6839834264933397262'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2014/04/clojure-how-to-detect-transaction-stm.html' title='Clojure: How to detect transaction (STM) retries'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-2229376282241531707</id><published>2013-10-08T21:43:00.000+02:00</published><updated>2016-09-02T14:34:02.874+02:00</updated><title type='text'>Essential tools for telecommuting</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;i&gt;..yet another work in progress post as of Sep 29. 2013.. ..will update this later!&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Software&lt;/h3&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
First of all; Mosh:&amp;nbsp;&lt;a href=&quot;http://mosh.mit.edu/&quot;&gt;http://mosh.mit.edu/&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Mosh improves work via SSH drastically. I run Emacs inside Tmux on servers; highly recommended. Anyone who works while on the road &lt;i&gt;must&lt;/i&gt;&amp;nbsp;try Mosh. Each connection dropout (e.g. while on a train) will seem invisible to you!&lt;br /&gt;
&lt;br /&gt;
Also&amp;nbsp;&lt;a href=&quot;http://justgetflux.com/&quot;&gt;http://justgetflux.com/&lt;/a&gt;&amp;nbsp;will probably keep my eyes in working condition for another 10+ years. &lt;i&gt;UPDATE:&amp;nbsp;&lt;a href=&quot;http://jonls.dk/redshift/&quot;&gt;http://jonls.dk/redshift/&lt;/a&gt; is better than flux!&lt;/i&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Wi-Fi amplifier and external antenna&lt;/h3&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
I&#39;m currently using:&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Amplifier:&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/gp/product/B0035APGP6/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B0035APGP6&amp;amp;linkCode=as2&amp;amp;tag=aefresearchco-20&quot; target=&quot;_blank&quot;&gt;Alfa AWUSO36NH&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Antenna:&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/gp/product/B0034CQSKW/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B0034CQSKW&amp;amp;linkCode=as2&amp;amp;tag=aefresearchco-20&quot; target=&quot;_blank&quot;&gt;TP-LINK TL-ANT2408C&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
..I&#39;m considering a directional antenna too. Heck this setup might be a good idea in any case as I sit with my laptop on my, well, lap a lot. I.e., I can disable the internal Wi-Fi radio to avoid &lt;a href=&quot;https://encrypted.google.com/search?hl=en&amp;amp;q=wifi%20radiation&quot; target=&quot;_blank&quot;&gt;radiation&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
To get the most out of a setup like this, I do this to increase radio power and disable Wi-Fi power saving etc.:&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo iw reg set BO&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo iwconfig wlan1 power off&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo iwconfig wlan1 txpower fixed&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo iwconfig wlan1 txpower 2000mW&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Laptop&lt;/h3&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Avoid glossy screens.&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Encrypt your home partition!&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Don&#39;t use a swap partition – or if you do (get more memory instead); encrypt this too.&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Investing in a &lt;a href=&quot;http://www.storagereview.com/ssd_vs_hdd&quot; target=&quot;_blank&quot;&gt;SSD instead of HDD&lt;/a&gt; is very much worth the extra money needed. If the laptop I like comes with a HDD I remove it and put it in an external cabinet (USB).&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Mobile phone dedicated to role as Wi-Fi router (tether)&lt;/h3&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Avoid iPhones as these cannot tether in all cases.&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Get a decent Android phone; make sure it has a strong 2G/3G/4G radio.&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;You&#39;ll need two phones if you need to be available on your normal phone number.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Communication: text&lt;/h3&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Where privacy is not important I use Gmail.&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Where privacy does matter I use Pidgin or Jitsi with encryption (OTR):&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Off-the-Record_Messaging&quot;&gt;http://en.wikipedia.org/wiki/Off-the-Record_Messaging&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Communication: voice&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;I&#39;m currently using Mumble. You can setup your own server on a cheap VPS. Make sure you&#39;re using the latest version with support for the Opus codec as this will save you bandwidth:&amp;nbsp;&lt;a href=&quot;https://launchpad.net/~mumble/+archive/release&quot;&gt;https://launchpad.net/~mumble/+archive/release&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;You&#39;ll probably need a headset – as echo cancellation does not always work too well!&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Adjust your Mumble settings; I use the lowest quality with full noise cancellation:&lt;/li&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;quality: 8.0 kb/s&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;audio per packet: 60ms&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;noise suppression: -60dB&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;max amplification: 1.00&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
I find Jitsi or perhaps Pidgin interesting as I&#39;m not 100% happy with Mumble for various reasons.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
..that&#39;s pretty much it – I think. Stuff like an issue tracker, Git etc. should be used by everyone regardless of whether they are telecommuters or not.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/2229376282241531707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/2229376282241531707'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2013/10/essential-tools-for-telecommuting.html' title='Essential tools for telecommuting'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-6068767661408321986</id><published>2013-04-30T06:32:00.002+02:00</published><updated>2013-05-27T11:39:49.292+02:00</updated><title type='text'>Ubuntu 13.04 (Raring Ringtal) and Intel GPU; fix for slow graphics performance</title><content type='html'>I just did an upgrade to 13.04 and noticed that the graphics performance was sluggish. Creating an &lt;i&gt;/etc/X11/xorg.conf&lt;/i&gt; file and putting this in it then rebooting helped here (ThinkPad L520):&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Section &quot;Device&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Identifier &quot;Card0&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Driver &quot;intel&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Option &quot;AccelMethod&quot; &quot;uxa&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; #Option &quot;AccelMethod&quot; &quot;sna&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;EndSection&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Update: I also had problems mounting USB disks etc.. Here&#39;s how I solved that on my machine:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo ppa-purge ppa:langdalepl/gvfs-mtp&lt;/span&gt;&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/6068767661408321986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/6068767661408321986'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2013/04/ubuntu-1304-raring-ringtal-and-intel.html' title='Ubuntu 13.04 (Raring Ringtal) and Intel GPU; fix for slow graphics performance'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-8449589653043096526</id><published>2013-04-05T19:06:00.002+02:00</published><updated>2015-05-11T02:34:16.605+02:00</updated><title type='text'>SSH: Forwarding, etc. </title><content type='html'>I&#39;m going to write down how to do port forwarding and other things with SSH here – because I keep forgetting how to do it, and wasting 10 minutes reading man-pages and Googling around every time I do is getting old. I&#39;ll add to this post in the future.&lt;br /&gt;
&lt;h3&gt;
Basic port forwarding&lt;/h3&gt;
&lt;div&gt;
All connections on port &lt;i&gt;9998&lt;/i&gt; on &lt;i&gt;localhost (127.0.0.1)&lt;/i&gt; will now go to port &lt;i&gt;5432&lt;/i&gt; on &lt;i&gt;100tb.nostdal.org&lt;/i&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ssh -fNT -L 9998:127.0.0.1:5432 fod@100tb.nostdal.org&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;This&#39;ll create a background process – and if your connection goes stale for whatever reason killing it works. Look it up using &lt;i&gt;ps -AF | grep ssh&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;h3&gt;
AutoSSH&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
AutoSSH can be used to make sure a tunnel, or set of tunnels in this case, stays up:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/usr/bin/autossh -fNT -L 4444:127.0.0.1:4444 -L 4445:127.0.0.1:4445 -L 7657:127.0.0.1:7657 -L 6668:127.0.0.1:6668 -L 7654:127.0.0.1:7654 -R 4242:127.0.0.1:80 afoss.nostdal.org&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
The above will setup several tunnels. 4445 locally will be forwarded to 4445 on aafoss.nostdal.org and so on. I&#39;ve put this string in &quot;Application Autostart&quot; under &quot;Sessions and Startup&quot; in Xubuntu (XFCE) so my tunnels are up after a reboot also.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/8449589653043096526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/8449589653043096526'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2013/04/ssh-forwarding-etc.html' title='SSH: Forwarding, etc. '/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-3764739490919110243</id><published>2013-02-16T13:07:00.000+01:00</published><updated>2013-02-16T13:13:09.965+01:00</updated><title type='text'>Opus 1.1-x (git) audio test</title><content type='html'>&lt;h3&gt;
Source&lt;/h3&gt;
Source:&lt;br /&gt;&lt;a href=&quot;http://www.lindberg.no/hires/test/2L48SACD_14_stereo_96k.flac&quot;&gt;http://www.lindberg.no/hires/test/2L48SACD_14_stereo_96k.flac&lt;/a&gt;&amp;nbsp;(&lt;b&gt;&lt;i&gt;85.8MB&lt;/i&gt;&lt;/b&gt;) &lt;br /&gt;from&amp;nbsp;&lt;a href=&quot;http://www.2l.no/hires/index.html&quot;&gt;http://www.2l.no/hires/index.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Encoded using Opus from Git (02.16.2013) with standard options (i.e. VBR):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ time opusenc 2L48SACD_14_stereo_96k.flac 2L48SACD_14_stereo_96k.opus&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Encoding using libopus 1.1-alpha-28-g6044907 (audio)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-----------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;Input: 96kHz 2 channels&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Output: 2 channels (2 coupled)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20ms packets, 96kbit/sec VBR&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;Preskip: 352&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Encoding complete &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-----------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Encoded: 5 minutes and 13.82 seconds&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Runtime: 8 seconds&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (39.23x realtime)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Wrote: 4291832 bytes, 15691 packets, 316 pages&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bitrate: 108.504kbit/s (without overhead)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;Instant rates: 85.2kbit/s to 194kbit/s&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (213 to 485 bytes per packet)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Overhead: 0.827% (container+metadata)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;real&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;0m8.631s&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;user&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;0m8.545s&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sys&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;0m0.064s&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3&gt;
Result&lt;/h3&gt;
The resulting Opus file is &lt;i style=&quot;font-weight: bold;&quot;&gt;4.3MB&lt;/i&gt;, here:&lt;br /&gt;
&lt;a href=&quot;http://100tb.nostdal.org/nostdal.org/audio/2L48SACD_14_stereo_96k.opus&quot;&gt;http://100tb.nostdal.org/nostdal.org/audio/2L48SACD_14_stereo_96k.opus&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The same result encoded in FLAC for convenience since Opus cannot be played back everywhere, yet:&lt;br /&gt;
&lt;a href=&quot;http://100tb.nostdal.org/nostdal.org/audio/2L48SACD_14_stereo_96k-opus.flac&quot;&gt;http://100tb.nostdal.org/nostdal.org/audio/2L48SACD_14_stereo_96k-opus.flac&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
...can you tell the difference between the source and the result?&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/ABX_test&quot;&gt;http://en.wikipedia.org/wiki/ABX_test&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/3764739490919110243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/3764739490919110243'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2013/02/opus-11-x-git-audio-test.html' title='Opus 1.1-x (git) audio test'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-3775175419957011256</id><published>2013-01-25T01:53:00.003+01:00</published><updated>2013-01-25T02:09:13.764+01:00</updated><title type='text'>Logitech C920 webcam: H264 full HD mode stream to file on Linux</title><content type='html'>This works using&amp;nbsp;&lt;a href=&quot;https://launchpad.net/~videolan/+archive/master-daily&quot;&gt;https://launchpad.net/~videolan/+archive/master-daily&lt;/a&gt;&amp;nbsp;:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;vlc &#39;v4l2:///dev/video1:chroma=H264:width=1920:height=1080:fps=30&#39;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
To stream this to a file:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cvlc &#39;v4l2:///dev/video1:chroma=H264:width=1920:height=1080:fps=30&#39; --sout &#39;#file{dst=webcam-test.mp4,no-overwrite}&#39;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/3775175419957011256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/3775175419957011256'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2013/01/logitech-c920-webcam-h264-full-hd-mode.html' title='Logitech C920 webcam: H264 full HD mode stream to file on Linux'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-8905248022265785825</id><published>2013-01-10T05:45:00.001+01:00</published><updated>2013-01-12T00:29:35.325+01:00</updated><title type='text'>Databases as an extension of memory: STM + DB transactions = ♥</title><content type='html'>&lt;br /&gt;
&lt;h3&gt;
&lt;i&gt;..or how databases&amp;nbsp;doesn&#39;t really&amp;nbsp;need to be regarded as I/O&lt;/i&gt;&lt;/h3&gt;
The problem with I/O is that it&#39;s tricky when combined with transactions. Since memory transactions (&lt;a href=&quot;http://en.wikipedia.org/wiki/Software_transactional_memory&quot; target=&quot;_blank&quot;&gt;STM&lt;/a&gt;)&amp;nbsp;need to retry on conflicts just like database transactions do -- one end up with multiple I/O calls:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;user&amp;gt; (let [r (ref nil)]&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (future&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(dosync&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (ref-set r &quot;one&quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (println &quot;one&quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (Thread/sleep 1000)))&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (dosync&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(ref-set r &quot;two&quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(println &quot;two&quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Thread/sleep 1000)))&lt;br /&gt;two&lt;br /&gt;one&lt;br /&gt;two&lt;br /&gt;nil&lt;br /&gt;user&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;div&gt;
The same problem applies when dealing with a database from an outside transaction too; one&#39;ll end up with multiple entries for e.g. the same person and so on.&lt;/div&gt;
&lt;br /&gt;
..but there&#39;s a way around this. Databases have something &quot;normal&quot; I/O doesn&#39;t have; they have &amp;nbsp;their own transactions. We can run two transactions at the same time in parallel; one for data in memory and one for data in the database -- then commit them &lt;u&gt;together&lt;/u&gt;, or indeed roll back &lt;u&gt;both&lt;/u&gt; if &lt;u&gt;either&lt;/u&gt; detects a conflict.&lt;br /&gt;
&lt;br /&gt;
This is tricky to get right, and for this to actually work both transactions need support for intermediate pre-commit stages where things won&#39;t roll back. Only when &lt;u&gt;both&lt;/u&gt; transactions are in these stages at the &lt;u&gt;same time&lt;/u&gt; can full finalization of the commits be done. If &lt;u&gt;either&lt;/u&gt; fails because of a conflict or anything; both roll back.&lt;br /&gt;
&lt;br /&gt;
In &lt;a href=&quot;http://www.postgresql.org/&quot; target=&quot;_blank&quot;&gt;PostgreSQL&lt;/a&gt;, this stage can be entered via&amp;nbsp;&lt;a href=&quot;http://www.postgresql.org/docs/9.2/static/sql-prepare-transaction.html&quot; target=&quot;_blank&quot;&gt;prepared transactions&lt;/a&gt;.&amp;nbsp;On the &lt;a href=&quot;http://clojure.org/&quot; target=&quot;_blank&quot;&gt;Clojure&lt;/a&gt; end, things are a bit trickier as Clojure doesn&#39;t have anything like this per say -- but &lt;a href=&quot;http://clojure.github.com/clojure/branch-master/clojure.core-api.html#clojure.core/set-validator!&quot; target=&quot;_blank&quot;&gt;&lt;i&gt;Ref&lt;/i&gt;&amp;nbsp;validators&lt;/a&gt; will work! Check out the &lt;i&gt;do-mtx&lt;/i&gt;&amp;nbsp;function here:&lt;br /&gt;
&lt;a href=&quot;https://github.com/lnostdal/SymbolicWeb/blob/4f3304721b32b3db1e87d4a6d20c2318ec499a7b/src/symbolicweb/database_common.clj#L114&quot; target=&quot;_blank&quot;&gt;https://github.com/lnostdal/SymbolicWeb/blob/4f3304721b32b3db1e87d4a6d20c2318ec499a7b/src/symbolicweb/database_common.clj#L114&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
..further, the process that&#39;ll make these two transactions dance together via these stages is known as a &lt;a href=&quot;http://en.wikipedia.org/wiki/Two-phase_commit_protocol&quot; target=&quot;_blank&quot;&gt;two-phase commit&lt;/a&gt;. This is done in the &lt;i&gt;do-2pctx&lt;/i&gt; function here:&lt;br /&gt;
&lt;a href=&quot;https://github.com/lnostdal/SymbolicWeb/blob/4f3304721b32b3db1e87d4a6d20c2318ec499a7b/src/symbolicweb/database_common.clj#L137&quot; target=&quot;_blank&quot;&gt;https://github.com/lnostdal/SymbolicWeb/blob/4f3304721b32b3db1e87d4a6d20c2318ec499a7b/src/symbolicweb/database_common.clj#L137&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Rolling back the transactions are done using exceptions, and the newer Clojure constructs &lt;a href=&quot;http://clojure.github.com/clojure/branch-master/clojure.core-api.html#clojure.core/ex-info&quot; target=&quot;_blank&quot;&gt;ex-info&lt;/a&gt; and &lt;a href=&quot;http://clojure.github.com/clojure/branch-master/clojure.core-api.html#clojure.core/ex-data&quot; target=&quot;_blank&quot;&gt;ex-data&lt;/a&gt; are used to communicate the intent of the roll-back; abort or retry. I must admit I sometimes miss the &lt;a href=&quot;http://sbcl.org/&quot; target=&quot;_blank&quot;&gt;Common Lisp&lt;/a&gt; &lt;a href=&quot;http://www.gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html&quot; target=&quot;_blank&quot;&gt;condition and restart system&lt;/a&gt;&amp;nbsp;here,&amp;nbsp;but this will do just fine..&lt;br /&gt;
&lt;br /&gt;
Anyway, this of course opens up for some interesting performance related problems since the Clojure STM is optimistic, but the sheer convenience and simplicity of this is worth it in some cases. Later, when or if needed, I&#39;m considering adding a pessimistic STM to Clojure to improve this. I have a very crude and quite horribly written one laying around for Common Lisp:&amp;nbsp;&lt;a href=&quot;https://github.com/lnostdal/SW-STM&quot; target=&quot;_blank&quot;&gt;https://github.com/lnostdal/SW-STM&lt;/a&gt;, but I think it has some core potential.&lt;br /&gt;
&lt;br /&gt;
..OK, that&#39;s it for now. I might post some examples to show this stuff off or whatever later.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/8905248022265785825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/8905248022265785825'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2013/01/databases-as-extension-of-memory-stm-db.html' title='Databases as an extension of memory: STM + DB transactions = ♥'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-9073822019381942527</id><published>2012-12-22T17:08:00.000+01:00</published><updated>2013-01-02T18:13:42.751+01:00</updated><title type='text'>Clojure STM: ON-COMMIT construct</title><content type='html'>&lt;br /&gt;
I&#39;ve sometimes missed an &lt;i&gt;ON-COMMIT&lt;/i&gt; like construct for the &lt;a href=&quot;http://clojure.org/refs&quot; target=&quot;_blank&quot;&gt;Clojure STM&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://clojure.org/agents&quot; target=&quot;_blank&quot;&gt;Agents&lt;/a&gt; work with the Clojure STM, but sometimes using &lt;a href=&quot;http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/future&quot; target=&quot;_blank&quot;&gt;Futures&lt;/a&gt; seem more fitting as&amp;nbsp;an Agent only executes one action at any point in time. Also, exceptions in Agents won&#39;t roll back Clojure side transactions..&lt;br /&gt;
&lt;br /&gt;
The problem with using Futures directly from a DOSYNC context, of course, is that they will be executed or &quot;spawned&quot; several times as the STM does its retries.&lt;br /&gt;
&lt;br /&gt;
I&#39;m not sure this is the best or only way to do something like this, but anyway:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.refheap.com/paste/7814/fullscreen&quot;&gt;https://www.refheap.com/paste/7814/fullscreen&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;(def ^:dynamic *on-commit-fns*)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;(defmacro on-commit [&amp;amp; body]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; `(swap! *on-commit-fns* conj (fn [] ~@body)))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;(defmacro with-on-commit-ctx [&amp;amp; body]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &quot;It is possible to do I/O in the ON-COMMIT bodies. If an exception is thrown in an ON-COMMIT the MTX (DOSYNC) will roll back.&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; `(binding [*on-commit-fns* (atom [])]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;(let [on-commit-fns# (ref nil)]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(set-validator! on-commit-fns#&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(fn [v#]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(when v#&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(try&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@(future&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (doseq [^Fn on-commit-fn# v#]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (on-commit-fn#)))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(catch Throwable e#&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(throw (clojure.stacktrace/root-cause e#)))))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;true))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(let [res# (do ~@body)]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(ref-set on-commit-fns# @*on-commit-fns*)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;res#))))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;;;; Testing it:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;user&amp;gt; (let [r (ref 0)]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (future&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(dosync&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (with-on-commit-ctx&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(println &quot;frst: trying..&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(ref-set r 1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(let [r-value (ensure r)]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(on-commit (println &quot;first:&quot; r-value)))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Thread/sleep 500))))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (future&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(dosync&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (with-on-commit-ctx&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(println &quot;second: trying..&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(ref-set r 2)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(let [r-value (ensure r)]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(on-commit (println &quot;second:&quot; r-value)))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Thread/sleep 1000)))))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#&amp;lt;core$future_call$reify__3390@1bfb3209: :pending&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;frst: trying..&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;second: trying..&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;second: trying..&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;second: trying..&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;second: trying..&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;second: trying..&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;first: 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;second: trying..&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;second: 2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;user&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/9073822019381942527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/9073822019381942527'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2012/12/clojure-stm-on-commit-construct.html' title='Clojure STM: ON-COMMIT construct'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-7960920563154299839</id><published>2012-12-04T21:31:00.000+01:00</published><updated>2012-12-04T21:40:18.707+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="functional"/><category scheme="http://www.blogger.com/atom/ns#" term="haskell"/><category scheme="http://www.blogger.com/atom/ns#" term="pure"/><title type='text'>Hello Haskell World</title><content type='html'>&lt;br /&gt;
I sometimes wonder why I don&#39;t play around with &lt;a href=&quot;http://en.wikipedia.org/wiki/Haskell_(programming_language)&quot; target=&quot;_blank&quot;&gt;Haskell&lt;/a&gt; more. Perhaps I&#39;d miss the Lisp syntax -- and the macros? The run-time seems very interesting from what little I know about it. Perhaps it would be &quot;too pure&quot; for my tastes? &lt;a href=&quot;http://en.wikipedia.org/wiki/Rust_(programming_language)&quot; target=&quot;_blank&quot;&gt;Rust&lt;/a&gt; seems interesting too ...&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ ls&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;hello.hs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ cat hello.hs&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;module Main where&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;main = putStrLn &quot;Hello, World!&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ ghc --make -O2 hello.hs -o hello&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[1 of 1] Compiling Main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( hello.hs, hello.o )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Linking hello ...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ ls -l&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;total 1036&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-rwxr-xr-x 1 lnostdal lnostdal 1048016 Dec &amp;nbsp;4 21:20 hello&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rw-r--r- 1 lnostdal lnostdal &amp;nbsp; &amp;nbsp;1218 Dec &amp;nbsp;4 21:20 hello.hi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rw-r--r- 1 lnostdal lnostdal &amp;nbsp; &amp;nbsp; &amp;nbsp;51 Dec &amp;nbsp;3 04:54 hello.hs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rw-r--r- 1 lnostdal lnostdal &amp;nbsp; &amp;nbsp;3552 Dec &amp;nbsp;4 21:20 hello.o&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ ./hello&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Hello, World!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ strip -s hello&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ ls -l&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;total 736&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-rwxr-xr-x 1 lnostdal lnostdal 737312 Dec &amp;nbsp;4 21:20 hello&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rw-r--r- 1 lnostdal lnostdal &amp;nbsp; 1218 Dec &amp;nbsp;4 21:20 hello.hi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rw-r--r- 1 lnostdal lnostdal &amp;nbsp; &amp;nbsp; 51 Dec &amp;nbsp;3 04:54 hello.hs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rw-r--r- 1 lnostdal lnostdal &amp;nbsp; 3552 Dec &amp;nbsp;4 21:20 hello.o&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ ldd hello&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;linux-vdso.so.1 =&amp;gt; &amp;nbsp;(0x00007fff6b1ce000)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;libgmp.so.10 =&amp;gt; /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f8ded458000)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;libffi.so.5 =&amp;gt; /usr/lib/x86_64-linux-gnu/libffi.so.5 (0x00007f8ded24b000)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;libm.so.6 =&amp;gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8decfc8000)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;librt.so.1 =&amp;gt; /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8decdc0000)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;libdl.so.2 =&amp;gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8decbbc000)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;libc.so.6 =&amp;gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8dec831000)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;libpthread.so.0 =&amp;gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8dec615000)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/lib64/ld-linux-x86-64.so.2 (0x00007f8ded6dd000)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ ./hello&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Hello, World!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$&amp;nbsp;&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/7960920563154299839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/7960920563154299839'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2012/12/i-sometimes-wonder-why-i-dont-play.html' title='Hello Haskell World'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-2128792182606438050</id><published>2012-12-01T13:49:00.001+01:00</published><updated>2012-12-01T13:54:28.880+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="skype"/><title type='text'>Skype 4.1 on Debian &quot;testing&quot; / &quot;wheezy&quot; on AMD64 arch</title><content type='html'>&lt;br /&gt;
Microsoft has their &lt;a href=&quot;http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish&quot; target=&quot;_blank&quot;&gt;cold hands&lt;/a&gt; on Skype now so how long it will be around no one knows. For now, they still release Linux and Android versions -- and this works with the latest (as of this post) 4.1 version using Debian &quot;testing&quot; / &quot;wheezy&quot; on AMD64:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;dpkg --add-architecture i386&lt;br /&gt;apt-get update&lt;br /&gt;apt-get install libpulse0:i386&lt;br /&gt;wget -O skype-install.deb http://www.skype.com/go/getskype-linux-deb&lt;br /&gt;dpkg -i skype-install.deb&lt;br /&gt;apt-get install -f&lt;/span&gt;&lt;/blockquote&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/2128792182606438050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/2128792182606438050'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2012/12/skype-41-on-debian-testing-wheezy-on.html' title='Skype 4.1 on Debian &quot;testing&quot; / &quot;wheezy&quot; on AMD64 arch'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-2941545863148501251</id><published>2012-10-03T11:55:00.000+02:00</published><updated>2018-03-25T16:38:10.618+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="desktop recording"/><category scheme="http://www.blogger.com/atom/ns#" term="ffmpeg"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="screencast"/><category scheme="http://www.blogger.com/atom/ns#" term="screencasting"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="vp8"/><category scheme="http://www.blogger.com/atom/ns#" term="webm"/><title type='text'>Linux screencasting: FFmpeg, H264, VP9, Opus</title><content type='html'>I&#39;ll collect various and hopefully useful ways of doing screencasts or desktop recordings on Linux here. The focus is not on screencasts for e.g. gaming here; for this you should up the FPS among other things.&lt;br /&gt;
&lt;br /&gt;
Note that you&#39;ll need to adjust the &lt;i&gt;-s&lt;/i&gt;&amp;nbsp;option to match the screen resolution of your setup. Also note that I&#39;m assuming 10 FPS is OK; this can adjusted with the&amp;nbsp;&lt;i&gt;-r&lt;/i&gt;&amp;nbsp;option.&lt;br /&gt;
&lt;h3&gt;
Lossless H264 (video)&amp;nbsp;+ Opus (audio) =&amp;gt; Matroska (MKV) container&lt;/h3&gt;
&lt;div&gt;
The &lt;i&gt;-preset&lt;/i&gt;&amp;nbsp;option can be set to &lt;i&gt;medium&lt;/i&gt;&amp;nbsp;if your CPU can handle it (for smaller file size), but something like this:&lt;/div&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;ffmpeg -thread_queue_size 1024 -f alsa -i pulse -f x11grab -r 10 -s 1920x1080 -i :0.0 -c:a libopus -c:v libx264 -qp 0 -preset ultrafast desktop-recording-$(date -u +%Y-%m-%d-%s).mkv&lt;/span&gt;&lt;/blockquote&gt;
When done you can and should compress it further:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;nice ffmpeg -i desktop-recording.mkv -c:a copy -c:v libx264 -qp 0 -preset veryslow desktop-recording-final.mkv&lt;/span&gt;&lt;/blockquote&gt;
The &lt;i&gt;-qp&amp;nbsp;&lt;/i&gt;parameter can be adjusted if you want to go from lossless (0) to lossy (&amp;gt; 0) compression; higher values means lower quality.&lt;br /&gt;
&lt;br /&gt;
By prefixing with the&amp;nbsp;&lt;i&gt;nice&lt;/i&gt;&amp;nbsp;command, the &lt;i&gt;ffmpeg&lt;/i&gt;&amp;nbsp;program will run more as a background task not disrupting other work you want to do while this finishes.&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
Lossless VP9 (video) + Opus (audio) =&amp;gt; Matroska (MKV) container&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
The new VP9 codec takes up too much CPU on my now old laptop, so I stick with lossless H264 (above) when recording – then reencode the resulting file to VP9 after I&#39;m done recording:&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;nice ffmpeg -i desktop-recording.mkv -c:a copy -c:v libvpx-vp9 -lossless 1 desktop-recording-final.mkv&lt;/span&gt;&lt;/blockquote&gt;
&lt;h3&gt;
Well compressed VP9&lt;/h3&gt;
The above is lossless encoding. For screencasting it seems doing very strong recompression like this is generally &quot;good enough&quot; and leads to very small file sizes. This will also transcode your audio from stereo to mono (&lt;i&gt;-ac 1)&lt;/i&gt; in Opus format:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;nice ffmpeg -i desktop-recording.mkv&amp;nbsp;-c:a libopus -ac 1 -b:a 64k -c:v libvpx-vp9 -b:v 0 -crf 50 -tile-columns 4 -threads 8 desktop-recording-final.mkv&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&amp;nbsp;Smaller values for &lt;i&gt;crf&lt;/i&gt;&amp;nbsp;means better quality.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/2941545863148501251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/2941545863148501251'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2012/10/ffmpeg-webm-vp8-desktop-recording-with.html' title='Linux screencasting: FFmpeg, H264, VP9, Opus'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-5996913066443439995</id><published>2012-10-02T16:48:00.001+02:00</published><updated>2012-10-03T11:57:20.482+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="desktop recording"/><category scheme="http://www.blogger.com/atom/ns#" term="h264"/><category scheme="http://www.blogger.com/atom/ns#" term="http"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="stream"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="vlc"/><title type='text'>VLC H264 desktop and audio recording or streaming via HTTP on Linux</title><content type='html'>&lt;h3&gt;
&lt;/h3&gt;
&lt;i&gt;&lt;b&gt;Update: Also see &lt;a href=&quot;http://blog.nostdal.org/2012/10/ffmpeg-webm-vp8-desktop-recording-with.html&quot;&gt;this post&lt;/a&gt;&amp;nbsp;for an example using FFmpeg; VLC has been giving me a hard time with this in some cases.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;h3&gt;
HTTP stream&lt;/h3&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: xx-small;&quot;&gt;cvlc screen:// --screen-fps=10 --input-slave=pulse://&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;--sout &quot;#transcode{venc=x264,vcodec=h264,fps=10,vb=600,acodec=mp3,channels=2,ab=128,audio-sync}:std{access=http,mux=ts,dst=/stream.mp4}&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Now you can watch: &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;vlc http://localhost:8080/stream.mp4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Use pavucontrol to select input device.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Stream to file&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: xx-small;&quot;&gt;cvlc screen:// --screen-fps=10 --input-slave=pulse:// --sout &quot;#transcode{venc=x264,vcodec=h264,fps=10,vb=600,acodec=mp3,channels=2,ab=128,audio-sync}:std{access=file,mux=mp4,dst=desktop-cap-$(date -u +%Y-%m-%d-%s).mp4}&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This stuff is sort of a black art; working examples are hard to come by. I hope it&#39;s useful.&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/5996913066443439995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/5996913066443439995'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2012/10/vlc-h264-desktop-and-audio-recording-or.html' title='VLC H264 desktop and audio recording or streaming via HTTP on Linux'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-1801342516224759163</id><published>2012-04-27T23:17:00.001+02:00</published><updated>2012-04-28T11:28:35.404+02:00</updated><title type='text'>http_build_query from PHP to Clojure</title><content type='html'>This is based on http_build_query from PHP ( &lt;a href=&quot;http://php.net/manual/en/function.http-build-query.php&quot;&gt;http://php.net/manual/en/function.http-build-query.php&lt;/a&gt;) and basically builds URL-encoded query strings from (nested) Clojure maps and vectors.&lt;br /&gt;
&lt;br /&gt;
There&#39;s probably an already existing lib with a function for this around on Github somewhere, but its friday and I wrote this for fun...&lt;br /&gt;
&lt;br /&gt;

Anyway, here&#39;s the code: &lt;a href=&quot;https://refheap.com/paste/2421/fullscreen&quot;&gt;https://refheap.com/paste/2421/fullscreen&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/1801342516224759163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/1801342516224759163'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2012/04/httpbuildquery-from-php-to-clojure.html' title='http_build_query from PHP to Clojure'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-690994237721240427</id><published>2011-12-08T09:13:00.001+01:00</published><updated>2012-09-19T06:15:17.984+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="browser"/><category scheme="http://www.blogger.com/atom/ns#" term="caching"/><category scheme="http://www.blogger.com/atom/ns#" term="chrome"/><category scheme="http://www.blogger.com/atom/ns#" term="chromium"/><category scheme="http://www.blogger.com/atom/ns#" term="etag"/><category scheme="http://www.blogger.com/atom/ns#" term="firefox"/><category scheme="http://www.blogger.com/atom/ns#" term="http 304"/><category scheme="http://www.blogger.com/atom/ns#" term="refresh"/><title type='text'>Reloading or refreshing a web page really fast; a &quot;third refresh method&quot;</title><content type='html'>Perhaps some or even most of you out there know this, but there seems to be at least&amp;nbsp;&lt;i&gt;three&lt;/i&gt; ways of reloading or refreshing a page in Chrome / Chromium -- and in Firefox too as far as I can tell. The two commonly known ones are (I&#39;m using Linux here; Windows and Mac might have different key bindings):&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;Ctrl-r&lt;/i&gt;, which does a normal reload; polling the servers for updates (with help from&amp;nbsp;&lt;i&gt;If-Modified-Since&lt;/i&gt; or&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/HTTP_ETag&quot;&gt;etags&lt;/a&gt; or similar) for each external resource, and loads from local browser cache on &lt;i&gt;HTTP 304 Not Modified&lt;/i&gt; type responses.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Ctrl-Shift-r,&amp;nbsp;&lt;/i&gt;which does what&#39;s commonly known as a hard refresh; fully reloading all content and external resources, completely ignoring the browser cache.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
But there&#39;s another way of refreshing a page that&#39;s even faster than C&lt;i&gt;trl-r&amp;nbsp;&lt;/i&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Press&amp;nbsp;&lt;i&gt;Alt-d&lt;/i&gt;&amp;nbsp;then press E&lt;i&gt;nter -- &lt;/i&gt;or press C&lt;i&gt;trl-l&lt;/i&gt;&amp;nbsp;then press E&lt;i&gt;nter.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
This sort of does what &lt;i&gt;Ctrl-r&lt;/i&gt;&amp;nbsp;does, except it doesn&#39;t check (&quot;poll&quot;) whether the servers has any updates with regards to external resources. It&#39;ll do a normal request for the resource directly referred to in the address bar of course -- which means most dynamic data will be fetched anew, but external resources are to a much larger extent fetched from the local cache.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;JavaScript&lt;/span&gt;&lt;br /&gt;
This refresh type can be done via JavaScript also. Instead of doing &amp;nbsp;&lt;i&gt;window.location.reload();&amp;nbsp;&lt;/i&gt;&amp;nbsp;do &amp;nbsp;&lt;i&gt;window.location.href = window.location.href;&lt;/i&gt;&amp;nbsp;but note that this will not work if your URL has a fragment identifier (hash part).&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/690994237721240427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/690994237721240427'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2011/12/reloading-or-refreshing-web-page-really.html' title='Reloading or refreshing a web page really fast; a &quot;third refresh method&quot;'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-6479483655121502928</id><published>2011-12-07T18:31:00.001+01:00</published><updated>2011-12-07T20:00:28.366+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alter table"/><category scheme="http://www.blogger.com/atom/ns#" term="cast"/><category scheme="http://www.blogger.com/atom/ns#" term="postgresql"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><title type='text'>PostgreSQL:  ALTER TABLE ==&gt; &quot;cannot be cast&quot;</title><content type='html'>Altering a column type in PostgreSQL involves some cast trickery. As a note to myself and perhaps others Googling around for solutions, here goes:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ALTER TABLE &quot;my_table&quot; ALTER COLUMN &quot;product_price&quot; TYPE bigint USING 0::bigint;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/blockquote&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/6479483655121502928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/6479483655121502928'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2011/12/postgresql-alter-table-canot-be-cast.html' title='PostgreSQL:  ALTER TABLE ==&gt; &quot;cannot be cast&quot;'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-3882557615601501225</id><published>2011-08-26T03:41:00.004+02:00</published><updated>2013-01-04T19:41:36.530+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="clojure"/><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="postgresql"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="w3c"/><category scheme="http://www.blogger.com/atom/ns#" term="xfce"/><title type='text'>My preferred software stack</title><content type='html'>&lt;i&gt;Last update: 9 September 2012&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
I get questions about my preferred software stack from time to time, so here it is -- and for further reference:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Linux&quot;&gt;Linux&lt;/a&gt; (&lt;a href=&quot;http://en.wikipedia.org/wiki/Debian&quot;&gt;Debian&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Ubuntu_(operating_system)&quot;&gt;Xubuntu&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Android_(operating_system)&quot;&gt;Android&lt;/a&gt;): On server, desktop, laptop and phone.&amp;nbsp;Xubuntu is really the &lt;i&gt;only&lt;/i&gt;&amp;nbsp;sensible thing to use on the desktop or laptop at the moment; both for beginners and &quot;advanced&quot; users.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Clojure&quot;&gt;Clojure&lt;/a&gt;&amp;nbsp;(on the &lt;a href=&quot;http://en.wikipedia.org/wiki/Java_Virtual_Machine&quot;&gt;JVM&lt;/a&gt;):&amp;nbsp;Well thought out and designed.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://netty.io/&quot;&gt;Netty&lt;/a&gt;: Scalable I/O for the JVM.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Lighttpd&quot;&gt;lighttpd&lt;/a&gt;: Excellent as a &lt;a href=&quot;http://en.wikipedia.org/wiki/Reverse_proxy&quot;&gt;reverse-proxy&lt;/a&gt;&amp;nbsp;for dynamic back-ends as&amp;nbsp;it is the only front-end that does proper &lt;a href=&quot;http://en.wikipedia.org/wiki/Multiplexing&quot;&gt;I/O multiplexing&lt;/a&gt; with its back-ends last time I checked.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Postgresql&quot;&gt;PostgreSQL&lt;/a&gt;: &lt;a href=&quot;http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL&quot;&gt;http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL&lt;/a&gt;&amp;nbsp;also see&amp;nbsp;&lt;a href=&quot;http://www.youtube.com/watch?v=1PoFIohBSM4&quot;&gt;http://www.youtube.com/watch?v=1PoFIohBSM4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;..and I target &lt;a href=&quot;http://www.w3.org/standards/&quot;&gt;the Web&lt;/a&gt;: &lt;a href=&quot;http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol&quot;&gt;HTTP&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/HTML&quot;&gt;HTML&lt;/a&gt;(&lt;a href=&quot;http://en.wikipedia.org/wiki/HTML5&quot;&gt;5&lt;/a&gt;), &lt;a href=&quot;http://en.wikipedia.org/wiki/CSS&quot;&gt;CSS&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/JavaScript&quot;&gt;JavaScript&lt;/a&gt; (&lt;a href=&quot;http://en.wikipedia.org/wiki/ECMAScript&quot;&gt;ECMAScript&lt;/a&gt;), &lt;a href=&quot;http://en.wikipedia.org/wiki/AJAX&quot;&gt;AJAX&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Comet_(programming)&quot;&gt;Comet&lt;/a&gt; (and &lt;a href=&quot;http://en.wikipedia.org/wiki/WebSocket&quot;&gt;WebSocket&lt;/a&gt;) +++.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGHrm2Hu4F3QEJ2XbmQ9CjX8Esa1HWZS2ogk7YNW8gEDFStR3Gxw90w-kWd1eajcoIeL2ujc3PGR02hpwXE6IVX2hl7UGAj-wa_Nx4RTkVdv3zC2EFts6qo-3FXy8CISdUpS27uQClTXc/s1600/IMG_20110707_192646.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGHrm2Hu4F3QEJ2XbmQ9CjX8Esa1HWZS2ogk7YNW8gEDFStR3Gxw90w-kWd1eajcoIeL2ujc3PGR02hpwXE6IVX2hl7UGAj-wa_Nx4RTkVdv3zC2EFts6qo-3FXy8CISdUpS27uQClTXc/s320/IMG_20110707_192646.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;I do know and use other technologies, but I prefer to&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Interoperability&quot;&gt;interop&lt;/a&gt;&amp;nbsp;with them or use them only when strictly needed, e.g. &lt;a href=&quot;http://en.wikipedia.org/wiki/C_(programming_language)&quot;&gt;C&lt;/a&gt; for some embedded platforms -- as opposed to doing my main development in or with them. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here&#39;s some more:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Emacs&quot;&gt;Emacs&lt;/a&gt; for all editing etc., with&amp;nbsp;&lt;a href=&quot;https://github.com/clojure/tools.nrepl&quot;&gt;nREPL&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;https://github.com/kingtim/nrepl.el&quot;&gt;nREPL.el&lt;/a&gt;&amp;nbsp;as a &lt;a href=&quot;http://en.wikipedia.org/wiki/Clojure&quot;&gt;Clojure&lt;/a&gt; front-end.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Tmux&quot;&gt;tmux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/GNU_Compiler_Collection&quot;&gt;GCC&lt;/a&gt; for &lt;a href=&quot;http://en.wikipedia.org/wiki/C_(programming_language)&quot;&gt;C&lt;/a&gt;, with&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Gdb&quot;&gt;GDB&lt;/a&gt;, &lt;a href=&quot;http://www.kdbg.org/&quot;&gt;Kdbg&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Data_Display_Debugger&quot;&gt;DDD&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Valgrind&quot;&gt;Valgrind&lt;/a&gt; for debugging.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Git_(software)&quot;&gt;Git&lt;/a&gt;: distributed (source code) revision control system.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Rsync&quot;&gt;rsync&lt;/a&gt;, and the front-end &lt;a href=&quot;http://en.wikipedia.org/wiki/Grsync&quot;&gt;Grsync&lt;/a&gt;.&amp;nbsp;I use these for both backup purposes and for keeping my desktop and laptop in sync.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/3882557615601501225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/3882557615601501225'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2011/08/my-preferred-software-stack.html' title='My preferred software stack'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGHrm2Hu4F3QEJ2XbmQ9CjX8Esa1HWZS2ogk7YNW8gEDFStR3Gxw90w-kWd1eajcoIeL2ujc3PGR02hpwXE6IVX2hl7UGAj-wa_Nx4RTkVdv3zC2EFts6qo-3FXy8CISdUpS27uQClTXc/s72-c/IMG_20110707_192646.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-5558897824195900699</id><published>2011-07-26T13:09:00.004+02:00</published><updated>2012-10-04T07:21:47.292+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="clojure"/><category scheme="http://www.blogger.com/atom/ns#" term="garbage collection"/><category scheme="http://www.blogger.com/atom/ns#" term="gc"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="jvm"/><category scheme="http://www.blogger.com/atom/ns#" term="scala"/><category scheme="http://www.blogger.com/atom/ns#" term="scalability"/><category scheme="http://www.blogger.com/atom/ns#" term="twitter"/><title type='text'>Others (Twitter!) moving to the JVM also</title><content type='html'>It seems I&#39;m not alone having&amp;nbsp;&lt;a href=&quot;http://blog.nostdal.org/2011/04/on-being-stuck.html&quot;&gt;struggled&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://blog.nostdal.org/2011/05/clojure-as-way-out.html&quot;&gt;with&lt;/a&gt; &lt;a href=&quot;http://blog.nostdal.org/2011/07/and-so-it-begins-symbolicweb-has.html&quot;&gt;issues&lt;/a&gt; related to Garbage Collection. Others, even Twitter, are also moving to the JVM:&amp;nbsp;&lt;a href=&quot;http://www.youtube.com/watch?v=ohHdZXnsNi8&amp;amp;feature=player_detailpage#t=219s&quot;&gt;http://www.youtube.com/watch?v=ohHdZXnsNi8&amp;amp;feature=player_detailpage#t=219s&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Also see&amp;nbsp;&lt;a href=&quot;https://dev.twitter.com/blog/twitter-open-source-and-jvm&quot;&gt;https://dev.twitter.com/blog/twitter-open-source-and-jvm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Update: some more links;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;Twitter (Ruby -&amp;gt; Scala) - &lt;a href=&quot;http://www.readwriteweb.com/hack/2011/07/twitter-java-scala.php&quot;&gt;http://www.readwriteweb.com/hack/2011/07/twitter-java-scala.php&lt;/a&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Foursquare (PHP -&amp;gt; Scala) - &lt;a href=&quot;http://www.scala-lang.org/node/5130&quot;&gt;http://www.scala-lang.org/node/5130&lt;/a&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Facebook (PHP/C++ -&amp;gt; PHP on JVM) - &lt;a href=&quot;http://nerds-central.blogspot.com.au/2012/08/facebook-moving-to-jvm.html&quot;&gt;http://nerds-central.blogspot.com.au/2012/08/facebook-moving-to-jvm.html&lt;/a&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Tumblr (PHP -&amp;gt; Scala) - &lt;a href=&quot;http://highscalability.com/blog/2012/2/13/tumblr-architecture-15-billion-page-views-a-month-and-harder.html&quot;&gt;http://highscalability.com/blog/2012/2/13/tumblr-architecture-15-billion-page-views-a-month-and-harder.html&lt;/a&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Square (Ruby -&amp;gt; Java/JRuby) - &lt;a href=&quot;http://www.quora.com/Square-Inc-1/What-is-the-technology-stack-behind-Square&quot;&gt;http://www.quora.com/Square-Inc-1/What-is-the-technology-stack-behind-Square&lt;/a&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
Also check out the other OSCON 2011 videos rolling in right now:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.youtube.com/user/OreillyMedia#g/c/93FC98105B19725C&quot;&gt;http://www.youtube.com/user/OreillyMedia#g/c/93FC98105B19725C&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Update: In particular loving the Steve Yegge talk.&lt;/i&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/5558897824195900699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/5558897824195900699'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2011/07/others-twitter-moving-to-jvm-also.html' title='Others (Twitter!) moving to the JVM also'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-2936409531283207825</id><published>2011-07-19T23:56:00.010+02:00</published><updated>2011-07-20T02:50:28.434+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="symbolicweb clojure lisp rewrite"/><title type='text'>..and so it begins; SymbolicWeb has started its migration to Clojure</title><content type='html'>This&#39;ll just be a quick announcement since the state of this thing doesn&#39;t warrant anything else at the moment, but I&#39;ve begun the transition of &lt;a href=&quot;http://blog.nostdal.org/search/label/symbolicweb&quot;&gt;SymbolicWeb&lt;/a&gt; to Clojure. The Git repository can be found here:&amp;nbsp;&lt;a href=&quot;https://github.com/lnostdal/SymbolicWeb&quot;&gt;https://github.com/lnostdal/SymbolicWeb&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For some background on why I&#39;m doing this, see the previous posts&amp;nbsp;&lt;a href=&quot;http://blog.nostdal.org/2011/04/on-being-stuck.html&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://blog.nostdal.org/2011/05/clojure-as-way-out.html&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Even though this thing is very incomplete, any comments or e-mails regarding the code even at this point would be most welcome.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh15fJrtK8aSUTTTKFqUYh92KlCDOgz9dAnBmzTjAgcpHDnJAbIqsVf-Yr3C6lyBNnztnrE2gJS-nbjD_psOioNW8BH1EhmLz0DkSy47cvLfttCnp2Zmb6sthZKpM3We33HchWfE6GNRZE/s1600/IMG_20110705_211306.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh15fJrtK8aSUTTTKFqUYh92KlCDOgz9dAnBmzTjAgcpHDnJAbIqsVf-Yr3C6lyBNnztnrE2gJS-nbjD_psOioNW8BH1EhmLz0DkSy47cvLfttCnp2Zmb6sthZKpM3We33HchWfE6GNRZE/s320/IMG_20110705_211306.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;...the following is probably more or less a set of notes to self:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;I&#39;m not happy with how some of things are &quot;bootstrapped&quot;. The FIND-OR-CREATE-APPLICATION-INSTANCE and similar stuff seems off.&lt;/li&gt;
&lt;li&gt;The HTTP request and response need to be decoupled. This&#39;ll lead to way better design and performance. A look at&amp;nbsp;&lt;a href=&quot;https://github.com/lnostdal/SymbolicWeb/blob/82a971195af56f3ed0f1771b59de5f77b6ad1960/src/symbolicweb/core.clj#L30&quot;&gt;HANDLE-COMET-REQUEST&lt;/a&gt; should reveal the reason for this.&lt;/li&gt;
&lt;li&gt;I&#39;m not sure how to go about the above yet. I&#39;m thinking I should in the process probably switch to a better back-end right away; something like Netty, but then again Real Life issues are pressing on so maybe later.&lt;/li&gt;
&lt;li&gt;Obviously I need some sort of URL-based routing so the same JVM instance can host multiple applications.&lt;/li&gt;
&lt;li&gt;The low-level stuff for dealing nicely with HTML and CSS doesn&#39;t exist yet.&lt;/li&gt;
&lt;li&gt;There are no widgets here at all.&lt;/li&gt;
&lt;li&gt;No MVC system or anything exists yet.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;..that&#39;s it for now; good night!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/2936409531283207825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/2936409531283207825'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2011/07/and-so-it-begins-symbolicweb-has.html' title='..and so it begins; SymbolicWeb has started its migration to Clojure'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh15fJrtK8aSUTTTKFqUYh92KlCDOgz9dAnBmzTjAgcpHDnJAbIqsVf-Yr3C6lyBNnztnrE2gJS-nbjD_psOioNW8BH1EhmLz0DkSy47cvLfttCnp2Zmb6sthZKpM3We33HchWfE6GNRZE/s72-c/IMG_20110705_211306.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-3240615773718458504</id><published>2011-07-02T20:08:00.011+02:00</published><updated>2012-09-19T05:18:48.360+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="kde distro linux gnome unity kubuntu"/><title type='text'>Ubuntu: how to deal with (or not) Unity</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;UPDATE: Since this was written I&#39;ve moved more and more to XFCE:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;http://www.psychocats.net/ubuntu/purexubuntu&quot;&gt;http://www.psychocats.net/ubuntu/purexubuntu&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Problem&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
The recent changes in Ubuntu have been problematic for me and &lt;a href=&quot;http://lwn.net/Articles/438678/&quot;&gt;others&lt;/a&gt;. I&#39;m talking of course about the major switch from Gnome 2.x to &lt;a href=&quot;http://en.wikipedia.org/wiki/Unity_(user_interface)&quot;&gt;Unity&lt;/a&gt;. It&#39;s a complete paradigm shift in that they are trying to unite how one interact with software on the desktop and on a typical netbook, tablet/pad or phone. Unfortunately it doesn&#39;t work very well.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It feels sort of&amp;nbsp;embarrassing to have recommended this OS to other people as something that is simple, stable and &quot;just works and stays that way&quot; when Ubuntu goes about this major change. Also, running &quot;Classic Mode&quot; seems silly as Gnome 2.x probably won&#39;t be supported for long.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;What to do?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;edit: I&#39;ve switched to XFCE (Xubuntu) since I wrote this post.&lt;/i&gt;&lt;br /&gt;
Well, I decided to switch to &lt;a href=&quot;http://www.kde.org/&quot;&gt;KDE&lt;/a&gt;&amp;nbsp;or &lt;a href=&quot;http://www.kubuntu.org/&quot;&gt;Kubuntu&lt;/a&gt;. Yup. ...and even though I&#39;ve never used KDE before it has been a &lt;i&gt;very&lt;/i&gt; positive experience actually.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
I didn&#39;t actually do a complete reinstall of the OS, opting instead to simply remove all Gnome related packages and replace them with KDE ones. I followed this excellent guide:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.psychocats.net/ubuntu/purekde&quot;&gt;http://www.psychocats.net/ubuntu/purekde&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Anyway, multiple monitor support works as it should; I can place panels on each monitor and only windows from each separate monitor shows up in the task manager widgets placed on their respective panels.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://hphotos-snc6.fbcdn.net/280844_10150295502205813_688375812_9359859_7034395_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://hphotos-snc6.fbcdn.net/280844_10150295502205813_688375812_9359859_7034395_o.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Alt+F2 pops up a simple &quot;Search/run program&quot; dialog at the top of the screen which is fast and has way more features than what was found in the vanilla Gnome 2.x &quot;Run program&quot; dialog.&lt;br /&gt;
&lt;br /&gt;
For video and movie playback I prefer SMPlayer instead of the standard KDE Dragon Player. SMPlayer is of course available in the package manager. Just hit Alt+F2 and start typing &quot;package&quot; and KPackageKit will show up; hit enter.&lt;br /&gt;
&lt;br /&gt;
Another benefit is that I don&#39;t end up with all the bloatware Canonical adds to the typical standard Gnome desktop for Ubuntu.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;A sort of rolling distro&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Another great thing about KDE or Kubuntu is that they have a PPA for the desktop packages:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sudo apt-add-repository ppa:kubuntu-ppa&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;sudo apt-add-repository ppa:kubuntu-ppa/backports&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;sudo aptitude update&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;sudo aptitude dist-upgrade&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This means I get the best of many worlds. I get a stable set of core packages from Ubuntu with updates with regards to security related issues and bug fixes related to typical driver issues -- and, I get the latest and greatest stable desktop release.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Also, installing &lt;a href=&quot;http://www.google.com/chrome/&quot;&gt;Google Chrome&lt;/a&gt; will automatically configure the repository settings necessary to keep itself up-to-date. Which again is great; both desktop and browser is up-to-date, while the more core packages stays rock solid and stable.&lt;br /&gt;
&lt;br /&gt;
Updating core packages is what makes a 100% rolling release distro more complex to deal with anyway; I don&#39;t need or want that.&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/3240615773718458504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/3240615773718458504'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2011/07/ubuntu-how-to-deal-with-or-not-unity.html' title='Ubuntu: how to deal with (or not) Unity'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-8178522464718323196</id><published>2011-05-08T15:40:00.005+02:00</published><updated>2011-07-27T14:52:43.536+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="book"/><category scheme="http://www.blogger.com/atom/ns#" term="build tool"/><category scheme="http://www.blogger.com/atom/ns#" term="ccl"/><category scheme="http://www.blogger.com/atom/ns#" term="clojure"/><category scheme="http://www.blogger.com/atom/ns#" term="concurrency"/><category scheme="http://www.blogger.com/atom/ns#" term="jvm"/><category scheme="http://www.blogger.com/atom/ns#" term="lisp"/><category scheme="http://www.blogger.com/atom/ns#" term="stm"/><title type='text'>Clojure as a way out</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0upbOOeWcNMd0VBDINlaE8yuL57VQa8w2lRHmklMa17wdYtAhOQZ-hsSLkANCje2k59W1gZPM4_aZm_vtqLnKhlS8nkCGCIRSEtbdt2BuN8O4IwIUnhBQ8s9daKTQCGcYJHVR4Lo3Tq4/s1600/tree.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0upbOOeWcNMd0VBDINlaE8yuL57VQa8w2lRHmklMa17wdYtAhOQZ-hsSLkANCje2k59W1gZPM4_aZm_vtqLnKhlS8nkCGCIRSEtbdt2BuN8O4IwIUnhBQ8s9daKTQCGcYJHVR4Lo3Tq4/s400/tree.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/div&gt;As briefly mentioned in the &lt;a href=&quot;http://blog.nostdal.org/2011/04/on-being-stuck.html&quot;&gt;previous post&lt;/a&gt; I don&#39;t think &lt;a href=&quot;http://clojure.org/&quot;&gt;Clojure&lt;/a&gt; is very mature, but it still seems to be the best way out for me. In a way the &lt;a href=&quot;http://en.wikipedia.org/wiki/Java_Virtual_Machine&quot;&gt;JVM&lt;/a&gt; really is a or the killer feature. The JVM run-time, the API it provides and the available external libraries and projects is just too good and complete to disregard when combined -- even with Clojure itself still being sort of an infant.&lt;br /&gt;
&lt;br /&gt;
I tried &lt;a href=&quot;http://ccl.clozure.com/&quot;&gt;CCL&lt;/a&gt; for a while, but it lacks a lot of non-trivial stuff like &lt;a href=&quot;http://www.sbcl.org/manual/#Timers&quot;&gt;timers&lt;/a&gt;, support for &lt;a href=&quot;http://www.sbcl.org/manual/#Atomic-Operations&quot;&gt;atomic operations&lt;/a&gt;&amp;nbsp;and more; stuff&amp;nbsp;that&#39;s really needed to do what I want to do. It also seems to have some &quot;weird bugs&quot;&amp;nbsp;ಠ_ಠ&amp;nbsp;of its own which I won&#39;t bring up here. In the end I can&#39;t bring myself to trust it, and the community around it seems stale compared to &lt;a href=&quot;http://www.sbcl.org/&quot;&gt;SBCL&lt;/a&gt;&amp;nbsp;and Clojure.&lt;br /&gt;
&lt;br /&gt;
Some negative notes on Clojure:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;I don&#39;t see why it doesn&#39;t have support for classic &lt;a href=&quot;http://en.wikipedia.org/wiki/Object-oriented_programming&quot;&gt;OO&lt;/a&gt; style programming in addition to what it already supports seeing as it has a &lt;a href=&quot;http://en.wikipedia.org/wiki/Software_transactional_memory&quot;&gt;STM&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I&#39;m not sure I agree with how the STM is implemented. It has been a long time since I last looked at Clojures STM though; perhaps things have changed. I recall thinking it could cause &lt;a href=&quot;http://en.wikipedia.org/wiki/Resource_starvation&quot;&gt;resource starvation&lt;/a&gt; for instance -- and what about &lt;a href=&quot;http://clojure.higher-order.net/?p=50&quot;&gt;write skew&lt;/a&gt;? I&#39;m not sure I agree with &lt;a href=&quot;http://clojuredocs.org/clojure_core/clojure.core/ensure&quot;&gt;the solution&lt;/a&gt; to this, but perhaps the main idea with Clojure anyway is to use its STM only as a sort of fallback and instead mainly focus on the other concurrency support inherent in the language. Still not sure how realistic this is ...&lt;/li&gt;
&lt;li&gt;The &lt;a href=&quot;http://common-lisp.net/project/slime/doc/html/&quot;&gt;Slime&lt;/a&gt; integration isn&#39;t really there yet.&lt;/li&gt;
&lt;li&gt;..there&#39;s probably more; I&#39;ll add more points later as I encounter them..&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;On a positive note it seems possible to generate code of at least decent quality with regards to performance now:&amp;nbsp;&lt;a href=&quot;http://www.skuro.tk/2011/01/24/performance-boost-in-clojure-1-3/&quot;&gt;http://www.skuro.tk/2011/01/24/performance-boost-in-clojure-1-3/&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
So anyway, I&#39;ve decided to spend the summer with the new, now in April, Clojure book:&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/gp/product/1935182641/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=nostdal-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399349&amp;amp;creativeASIN=1935182641&quot;&gt;&lt;i&gt;The Joy of Clojure: Thinking the Clojure Way&lt;/i&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1935182641&amp;amp;camp=217145&amp;amp;creative=399349&quot; style=&quot;border: none !important; margin: 0px !important;&quot; width=&quot;1&quot; /&gt;.&amp;nbsp;I&#39;m really hoping this will work out as I&#39;m at quite a loss as to what to do next if this fails. I have thought about and dismissed, some fully others close, many other potential ways out and ideas already.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s the Clojure version of the code posted at the end of the &lt;a href=&quot;http://blog.nostdal.org/2011/04/on-being-stuck.html&quot;&gt;previous post&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;user&amp;gt; (let [obj (java.lang.ref.WeakReference. (list 42))]
        (System/gc)
        (.get obj))
nil
user&amp;gt; 
&lt;/pre&gt;&lt;br /&gt;
(..there might be some Clojure wrappers for doing this built into Clojure, clojure-contrib or some other libraries..)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-8ITz2pqSjTE6dzcEaQ2xbj4nYRqjHR86jXOYVZF5PIdvu6mTG41-UBoMAhC6uLNPYK9HQXy4qPv4wj6C2YW7H1v4aFmx1e7-VhLyJwgXo_zq2qfWnZatDtjj-lA1bFhRAeedKmBDJn8/s1600/2011-05-07+20.06.09.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;61&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-8ITz2pqSjTE6dzcEaQ2xbj4nYRqjHR86jXOYVZF5PIdvu6mTG41-UBoMAhC6uLNPYK9HQXy4qPv4wj6C2YW7H1v4aFmx1e7-VhLyJwgXo_zq2qfWnZatDtjj-lA1bFhRAeedKmBDJn8/s400/2011-05-07+20.06.09.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/8178522464718323196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/8178522464718323196'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2011/05/clojure-as-way-out.html' title='Clojure as a way out'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0upbOOeWcNMd0VBDINlaE8yuL57VQa8w2lRHmklMa17wdYtAhOQZ-hsSLkANCje2k59W1gZPM4_aZm_vtqLnKhlS8nkCGCIRSEtbdt2BuN8O4IwIUnhBQ8s9daKTQCGcYJHVR4Lo3Tq4/s72-c/tree.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-5338095480733018105.post-5031221569985958983</id><published>2011-04-25T23:53:00.003+02:00</published><updated>2011-04-27T23:45:46.817+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ccl"/><category scheme="http://www.blogger.com/atom/ns#" term="common lisp"/><category scheme="http://www.blogger.com/atom/ns#" term="conservative"/><category scheme="http://www.blogger.com/atom/ns#" term="gc"/><category scheme="http://www.blogger.com/atom/ns#" term="leak"/><category scheme="http://www.blogger.com/atom/ns#" term="lisp"/><category scheme="http://www.blogger.com/atom/ns#" term="memory"/><category scheme="http://www.blogger.com/atom/ns#" term="precise"/><category scheme="http://www.blogger.com/atom/ns#" term="sbcl"/><title type='text'>On being stuck</title><content type='html'>I&#39;m stuck -- really stuck. You see,&amp;nbsp;&lt;a href=&quot;http://www.sbcl.org/&quot;&gt;SBCL&lt;/a&gt; has a &lt;a href=&quot;http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)#Precise_vs._conservative_and_internal_pointers&quot;&gt;conservative GC&lt;/a&gt; which leads me down dead ends constantly while I&#39;m trying to find the cause of a leak. As a sort of note to self:&lt;br /&gt;
&lt;blockquote&gt;&lt;b&gt;You do &lt;i&gt;not&lt;/i&gt; want to end up with memory related problems when using a language or language implementation with a conservative GC.&lt;/b&gt;&lt;/blockquote&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
..and of course it seems memory or resource related problems are just bound to pop up from time to time when dealing with bigger projects, so being able to debug this properly is important.&lt;br /&gt;
&lt;br /&gt;
This has taught me a very painful lesson for sure. I haven&#39;t written a line of code in months.&lt;br /&gt;
&lt;br /&gt;
I&#39;m not sure what I should do next; perhaps port everything to &lt;a href=&quot;http://ccl.clozure.com/&quot;&gt;CCL&lt;/a&gt;? I&#39;ve also been thinking about &lt;a href=&quot;http://www.scala-lang.org/&quot;&gt;Scala&lt;/a&gt;,&amp;nbsp;but non-Lisp doesn&#39;t seem very &quot;fun&quot;, and I cannot seem to take &lt;a href=&quot;http://clojure.org/&quot;&gt;Clojure&lt;/a&gt; seriously. I don&#39;t know ...&lt;br /&gt;
&lt;br /&gt;
Using &lt;em&gt;&lt;a href=&quot;http://www.cliki.net/trivial-garbage&quot;&gt;trivial-garbage&lt;/a&gt;&lt;/em&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;CL-USER&amp;gt; (lisp-implementation-type)
&quot;Clozure Common Lisp&quot;
CL-USER&amp;gt; (let ((x (tg:make-weak-pointer (list 42))))
           (tg:gc :full t)
           (tg:weak-pointer-value x))
NIL
CL-USER&amp;gt; 
&lt;/pre&gt;&lt;br /&gt;
&lt;pre&gt;CL-USER&amp;gt; (lisp-implementation-type)
&quot;SBCL&quot;
CL-USER&amp;gt; (let ((x (tg:make-weak-pointer (list 42))))
           (tg:gc :full t)
           (tg:weak-pointer-value x))
(42)
CL-USER&amp;gt; 
&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/5031221569985958983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338095480733018105/posts/default/5031221569985958983'/><link rel='alternate' type='text/html' href='http://defgeneric.blogspot.com/2011/04/on-being-stuck.html' title='On being stuck'/><author><name>lnostdal</name><uri>http://www.blogger.com/profile/02815573744512388906</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIs5SHFx2nOHb-hcIjbPg5lrGhvVb7l0tnIU0GpqrqVq7un2pnajDSSuecaltHqc5K-gDd4fQjokyCaJB1DlyXQ2q1xs-zrS27F6Fzu-qJtw3gMYDFBNbK13Tkyfcd_w/s64/imgpsh_fullsize.jpg'/></author></entry></feed>