<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for rgzdev</title><link>http://disqus.com/by/rgzdev/</link><description></description><atom:link href="http://disqus.com/rgzdev/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 21 Dec 2009 11:22:54 -0000</lastBuildDate><item><title>Re: Python, Surprise me!</title><link>http://wordaligned.org/articles/python-surprise-me#comment-26776604</link><description>&lt;p&gt;Because named tuples are so good, that's why, they make the code self documenting and are easier to use, you can unpack them in assignments or use names to get contents out  of it, you don't have to worry about the order of the elements changing, and if in the future a proper class is required you can just write the class and the rest of the code will be already compatible.&lt;/p&gt;&lt;p&gt;collections.namedtuple is a great data type, but the boilerplate to create them makes it awkward. compare with native syntax for sets, it saves you about 5 characters, named tuples require an import to begin with, and the interface of named tuples can (mostly) be deduced from the first call so definition is unnecessary.&lt;/p&gt;&lt;p&gt;I suggest {width=42, hight=36} but [width=42, hight=36] can also work, (width=42, hight=36) looks like a function call.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Mon, 21 Dec 2009 11:22:54 -0000</pubDate></item><item><title>Re: Python, Surprise me!</title><link>http://wordaligned.org/articles/python-surprise-me#comment-25957305</link><description>&lt;p&gt;it is clearer [GlaDOS]To me[/GlaDOS] but you are right too, that's eager evaluation although I doubt it would be a bottle neck. Why would I want to emulate erlang tuples? Erlang functions can return informally typed values, think of it like light weight classes so if you have `Current_speed = {1000, milesperhour}.` it can't accidentally get mixed with kilometers in the function distance({Speed, meterspersecond}, {Time, seconds}) -&amp;gt;  {Speed * Time, meters}.&lt;/p&gt;&lt;p&gt;But that's not the main reason for wating native syntax for named tuples.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Wed, 16 Dec 2009 12:42:30 -0000</pubDate></item><item><title>Re: Python, Surprise me!</title><link>http://wordaligned.org/articles/python-surprise-me#comment-25928040</link><description>&lt;p&gt;sorry, messed that up, I didn't bother to run the examples, about tuple(42), you are right but then again i don't remember the last time I used a single item tuple.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Wed, 16 Dec 2009 02:44:38 -0000</pubDate></item><item><title>Re: Python, Surprise me!</title><link>http://wordaligned.org/articles/python-surprise-me#comment-25915128</link><description>&lt;p&gt;# instead of:&lt;br&gt;if (1900 &amp;lt; year &amp;lt; 2100 and 1 &amp;lt;= month &amp;lt;= 12&lt;br&gt;    and 1 &amp;lt;= day &amp;lt;= 31 and 0 &amp;lt;= hour &amp;lt; 24&lt;br&gt;    and 0 &amp;lt;= minute &amp;lt; 60 and 0 &amp;lt;= second &amp;lt; 60): # Looks like a valid date&lt;br&gt;    return 1&lt;br&gt;# you could've done:&lt;br&gt;return int(all(&lt;br&gt;    1900 &amp;lt; year &amp;lt; 2100,&lt;br&gt;    1 &amp;lt;= month &amp;lt;= 12,&lt;br&gt;    1 &amp;lt;= day &amp;lt;= 31,&lt;br&gt;    0 &amp;lt;= hour &amp;lt; 24,&lt;br&gt;    0 &amp;lt;= minute &amp;lt; 60,&lt;br&gt;    0 &amp;lt;= second &amp;lt; 60&lt;br&gt;)) # Looks like a valid date&lt;/p&gt;&lt;p&gt;I actually like to write `x = tuple()` or `x = tuple(42)`, it's more clear to me.&lt;br&gt;The following syntaxes were also possible too and better than right now&lt;br&gt;empty tuple = (,)&lt;br&gt;empty set = {,}&lt;br&gt;I've said this before but what I really really really would like is native syntax for named tuples like this:&lt;br&gt;`return {width=42, height=36}`&lt;br&gt;this should automagically create a new collections.namedtuple instance, probably binded to __main__.namedtuple_width__height, and return the namedtuple_width__height instance in a single step.&lt;/p&gt;&lt;p&gt;Imagine, we'd be able to emulate erlang's use of atom/value fairly easy.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Tue, 15 Dec 2009 21:21:18 -0000</pubDate></item><item><title>Re: jQuery Snippet #1: URL Parameter Fetching</title><link>http://kennethreitz.com/blog/jquery-snippet-1-url-parameter-fetching/#comment-24326733</link><description>&lt;p&gt;Thanks but I have been using the jqURL plugin for over a year and I really prefer it.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Mon, 30 Nov 2009 06:47:47 -0000</pubDate></item><item><title>Re: PiTiVi Creator Responds To Readers Fears&amp;#8230;</title><link>http://www.omgubuntu.co.uk/2009/11/pitivi-creator-responds-to-readers-fears/#comment-23659925</link><description>&lt;p&gt;Indeed I've used GIMP several times since I installed Karmic (letting aside all the times I've used it since 2003) yet I've not installed a video editor yet.&lt;/p&gt;&lt;p&gt;And not yet for red eye removal, I've recently done things in GIMP that I consider trivial yet F-Spot can't do.&lt;/p&gt;&lt;p&gt;And still I've not installed a video editor yet. But we are missing the point of windows imitation here guys.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Fri, 20 Nov 2009 18:23:58 -0000</pubDate></item><item><title>Re: Poll Time: Happy With GIMP&amp;#8217;s Going From Lucid?</title><link>http://www.omgubuntu.co.uk/2009/11/poll-time-happy-with-gimps-going-from-lucid/#comment-23503963</link><description>&lt;p&gt;Indeed insted of chopping it off it makes more sense to replace it with something like Nathive.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Wed, 18 Nov 2009 22:19:31 -0000</pubDate></item><item><title>Re: Ubuntu Music Store Coming In Lucid &amp;#8211; Gets Detailed</title><link>http://www.omgubuntu.co.uk/2009/11/ubuntu-music-store-coming-in-lucid-gets-detailed/#comment-23482486</link><description>&lt;p&gt;They should integrate this with Banshee so I can uninstall it immediately.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Wed, 18 Nov 2009 16:19:27 -0000</pubDate></item><item><title>Re: Fewer Games To Be Included In Ubuntu Lucid Lynx</title><link>http://www.omgubuntu.co.uk/2009/11/fewer-games-to-be-included-in-ubuntu-lucid-lynx/#comment-23474368</link><description>&lt;p&gt;Definitively agree on splitting the games package&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Wed, 18 Nov 2009 14:24:34 -0000</pubDate></item><item><title>Re: GIMP to be removed lucid</title><link>http://www.omgubuntu.co.uk/2009/11/gimp-to-be-removed-from-lucid-f-spot-has-challengers/#comment-23473794</link><description>&lt;p&gt;I think for an integrated viewer and editor gThumb is, or should I say, always was was the right choice for the novice user. The kind of user that really likes a dedicated viewer with no editing like me can handle using two apps and F-Spot  is not, and will never be light way or easy to use because it does something different altogether.&lt;/p&gt;&lt;p&gt;On the other hand I'm kind of sad GIMP is going to be removed, GIMP was kind of a WOW app that just impressed users, they are like, "yeah but does it has a paint?" and you could say "yes but it is more of a photoshop". While including a simple image editor is also necessary I think that ubuntu should include at least one professional grade editor tool.&lt;/p&gt;&lt;p&gt;The space argument is ridiculous considering today's hard disks.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Wed, 18 Nov 2009 14:15:01 -0000</pubDate></item><item><title>Re: Google ChromeOS To Become Available Next Week (Apparently!)</title><link>http://www.omgubuntu.co.uk/2009/11/google-chromeos-to-become-available-next-week-apparently/#comment-22951004</link><description>&lt;p&gt;But if you can download stuff what is the point of using a javascript office suit in your browser instead of loading one from your harddisk?&lt;/p&gt;&lt;p&gt;AFAIK the selling point is that this is NOT a general purpose OS, it's basically a twitter/facebook/gmail/youtube terminal.&lt;/p&gt;&lt;p&gt;What's with post picture? Are you seriously that tired of ubuntu? Are you going to rename the blog to OMGoogle!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Fri, 13 Nov 2009 16:53:10 -0000</pubDate></item><item><title>Re: Gnome 3 – A Quick Visual Tour</title><link>http://www.omgubuntu.co.uk/2009/09/gnome-3-%e2%80%93-a-quick-visual-tour/#comment-22481660</link><description>&lt;p&gt;We still have XFCE&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Mon, 09 Nov 2009 18:35:15 -0000</pubDate></item><item><title>Re: Gnome 3.0 To Be Delayed Until September 2010?</title><link>http://www.omgubuntu.co.uk/2009/11/gnome-3-0-to-be-delayed-until-september-2010/#comment-21871354</link><description>&lt;p&gt;As long as I can shut it down its fine by me, If it becomes mandatory I'll switch to xfce.&lt;/p&gt;&lt;p&gt;That's the reason I didn't switch to KDE 4.0 as was planning to, they made plasma mandatory, as in "you can set up your desktop anyway you want as long as it is constrained in crippled stupid plasmoids."&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Wed, 04 Nov 2009 12:57:29 -0000</pubDate></item><item><title>Re: Quirky Wallpaper Series: KDE Edition</title><link>http://www.omgubuntu.co.uk/2009/11/quirky-wallpaper-series-kde-edition/#comment-21771576</link><description>&lt;p&gt;Only if you wanna lose your desktop icons.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Tue, 03 Nov 2009 13:00:10 -0000</pubDate></item><item><title>Re: More Google Wave Invites! Get &amp;#8216;em now!</title><link>http://kennethreitz.com/blog/more-google-wave-invites-get-em-now/#comment-21398845</link><description>&lt;p&gt;Desperate they seek&lt;br&gt;like the flowers beg for spring&lt;br&gt;the Google invites.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Fri, 30 Oct 2009 19:59:42 -0000</pubDate></item><item><title>Re: Maximum of an empty sequence?</title><link>http://wordaligned.org/articles/maximum-of-an-empty-sequence#comment-6873236</link><description>&lt;p&gt;Type your comment here.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Wed, 04 Mar 2009 11:50:05 -0000</pubDate></item><item><title>Re: Maximum of an empty sequence?</title><link>http://wordaligned.org/articles/maximum-of-an-empty-sequence#comment-6850068</link><description>&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; [1, 2] + [3, 4]&lt;br&gt;[1, 2, 3, 4]&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a = [1, 2], [3, 4]&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; sum(a)&lt;br&gt;Traceback (most recent call last):&lt;br&gt;  File "&amp;lt;pyshell#1&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;br&gt;    sum(a)&lt;br&gt;TypeError: unsupported operand type(s) for +: 'int' and 'list'&lt;/p&gt;&lt;p&gt;I once had to write something like&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; list_sum = lambda seq: reduce(lambda x, y: x+y, seq, [])&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Tue, 03 Mar 2009 17:38:02 -0000</pubDate></item><item><title>Re: Athesim and Science</title><link>http://frethink.com/2009/02/06/athesim-and-science/#comment-6064893</link><description>&lt;p&gt;Type your comment here.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Sat, 07 Feb 2009 03:09:50 -0000</pubDate></item><item><title>Re: Athesim and Science</title><link>http://frethink.com/2009/02/06/athesim-and-science/#comment-6064869</link><description>&lt;p&gt;Type your comment here.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Sat, 07 Feb 2009 03:06:35 -0000</pubDate></item><item><title>Re: Our world may be a giant hologram</title><link>http://frethink.com/2009/01/17/our-world-may-be-a-giant-hologram/#comment-5254139</link><description>&lt;p&gt; If our universe turns out to be a projection from a 2D universe let me speculate that this 2D universe is a projection from a 1D universe which in turn is really an illusion created by a pulsating 0D point, if there is anything that I'd be tempted to call god it would be that.&lt;/p&gt;&lt;p&gt; How long until we start crashing airplanes into buildings in the name of the pulsating point?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Sat, 17 Jan 2009 22:03:58 -0000</pubDate></item><item><title>Re: Our world may be a giant hologram</title><link>http://frethink.com/2009/01/17/our-world-may-be-a-giant-hologram/#comment-5253952</link><description>&lt;p&gt;Type your comment here.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Sat, 17 Jan 2009 21:58:17 -0000</pubDate></item><item><title>Re: code-formatting people: I need your help</title><link>http://blog.tplus1.com/blog/2008/12/12/code-formatting-people-i-need-your-help/#comment-4385276</link><description>&lt;p&gt; You are not a fan of OOP are you? A functional language like Erlang seems more apropiate for you, Python's parameter passing is not side effect free so your issue #2 doesn't apply much.&lt;/p&gt;&lt;p&gt; Instead of returning tuples and dictionaries you should be returning class instances where the breaking down into separate lines is more natural. I for one can't understand why  selected and disabled aren't properties or methods of employee.&lt;/p&gt;&lt;p&gt; This also makes the code more readable for collaborators, experience tells me highly functional programs tend to be terse on documentation. If you are programming in Python is probably because  you appreciate readability, so not only do I expect you to use intermediary variables, I even expect you to give them descriptive names so everybody knows what that value you just calculated is.&lt;/p&gt;&lt;p&gt; I understand you have your style and respect it and given that most of your code is written to work like this its probably a bad idea to switch now, so I'll simply encourage you to follow the advises given by Gary and David about proper indentation.&lt;/p&gt;&lt;p&gt; Nice post, cheers.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rgzdev</dc:creator><pubDate>Sat, 13 Dec 2008 05:03:23 -0000</pubDate></item></channel></rss>