<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>gar1t.com - Latest Comments</title><link>http://shardingdevnull.disqus.com/</link><description></description><atom:link href="https://shardingdevnull.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 15 Dec 2020 09:01:26 -0000</lastBuildDate><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/2012/07/16/oscon-2012-erlang-kung-fu#comment-5190084764</link><description>&lt;p&gt;Capture breathtaking photos with our affordable astrophotography cameras. And when you're stargazing, Orion's telescope cases and covers, observing gear, red LED flashlights, astronomy books and star charts will make your observing sessions more convenient, comfortable and meaningful.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Accountants UK</dc:creator><pubDate>Tue, 15 Dec 2020 09:01:26 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/so-long-microsoft-asshole.html#comment-3204978523</link><description>&lt;p&gt;This is pure gold! Is the script available somewhere? Would love to quote some of this!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">birgersp</dc:creator><pubDate>Wed, 15 Mar 2017 03:54:14 -0000</pubDate></item><item><title>Re: Erlang Web Development with modlib</title><link>http://www.gar1t.com/blog/modlib.html#comment-2119420194</link><description>&lt;p&gt;Eh, unfortunately no - not that I'm aware of. Psycho is still the closest thing we have for that but it's under developed. I'm hoping to spend some cycles on this in a few months to move things along, including an adapter to Cowboy.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Garrett Smith</dc:creator><pubDate>Mon, 06 Jul 2015 09:58:19 -0000</pubDate></item><item><title>Re: Erlang Web Development with modlib</title><link>http://www.gar1t.com/blog/modlib.html#comment-2114470926</link><description>&lt;p&gt;"the Erlang community needs a drop-dead simple interface that can be used to chain HTTP handlers together"&lt;/p&gt;&lt;p&gt;It's been 3 years, has this happened?&lt;/p&gt;&lt;p&gt;I'm new to Erlang, trying to explore the landscape.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Craig Russell</dc:creator><pubDate>Fri, 03 Jul 2015 09:14:04 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/erlang-the-movie-ii-the-sequel.html#comment-1972236074</link><description>&lt;p&gt;it,s a furious movie free download &lt;a href="http://www.rezaaul.com" rel="nofollow noopener" target="_blank" title="http://www.rezaaul.com"&gt;http://www.rezaaul.com&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rezaul Haque</dc:creator><pubDate>Fri, 17 Apr 2015 05:31:08 -0000</pubDate></item><item><title>Re: Solving Embarrassingly Obvious Problems In Erlang</title><link>http://www.gar1t.com/blog/solving-embarrassingly-obvious-problems-in-erlang.html#comment-1926727754</link><description>&lt;p&gt;Nice article. The refactoring reminds me of 2 of the patterns from Kent Beck's smalltalk best practice patterns:&lt;/p&gt;&lt;p&gt;• &lt;a href="http://c2.com/cgi/wiki?IntentionRevealingNames" rel="nofollow noopener" target="_blank" title="http://c2.com/cgi/wiki?IntentionRevealingNames"&gt;intention revealing names&lt;/a&gt;&lt;br&gt;• &lt;a href="http://c2.com/ppr/wiki/WikiPagesAboutRefactoring/ComposedMethod.html" rel="nofollow noopener" target="_blank" title="http://c2.com/ppr/wiki/WikiPagesAboutRefactoring/ComposedMethod.html"&gt;composed method&lt;/a&gt; - or in this case function&lt;/p&gt;&lt;p&gt;As someone who has spent much more time working in object languages it's interesting to see which of the patterns and ideas I'm comfortable with translate to functional languages. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tooky</dc:creator><pubDate>Wed, 25 Mar 2015 03:36:53 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/techmesh-2012-application-platform.html#comment-1916630574</link><description>&lt;p&gt;Here is a video of the talk: &lt;a href="https://www.youtube.com/watch?v=v31RH8fA_N4" rel="nofollow noopener" target="_blank" title="https://www.youtube.com/watch?v=v31RH8fA_N4"&gt;https://www.youtube.com/wat...&lt;/a&gt;&lt;br&gt;I assume this was a later version.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hernan Soulages</dc:creator><pubDate>Thu, 19 Mar 2015 13:45:50 -0000</pubDate></item><item><title>Re: Solving Embarrassingly Obvious Problems In Erlang</title><link>http://www.gar1t.com/blog/solving-embarrassingly-obvious-problems-in-erlang.html#comment-1915590019</link><description>&lt;p&gt;Hi.&lt;/p&gt;&lt;p&gt;The original code have this lines:&lt;/p&gt;&lt;p&gt;  Name = get_required_attr("name", Msg),&lt;br&gt;  verify_db_name(Name),&lt;/p&gt;&lt;p&gt;Which refactored to:&lt;/p&gt;&lt;p&gt;db_name(Msg) -&amp;gt;&lt;br&gt;  verify_db_name(get_required_attr("name", Msg)).&lt;/p&gt;&lt;p&gt;But they results are different. "Name" variable is not changed by verify_db_name() in original code.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Konstantin</dc:creator><pubDate>Thu, 19 Mar 2015 05:51:21 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/erlang-the-movie-ii-the-sequel.html#comment-1599262193</link><description>&lt;p&gt;This is so utterly brilliant! Gar1t, thank you! I'm now seriously curious about Erlang for the first time. (But first, I'll re-watch it!)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sean Kelly</dc:creator><pubDate>Sun, 21 Sep 2014 13:21:09 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/erlang-the-movie-ii-the-sequel.html#comment-1553466836</link><description>&lt;p&gt;I do exactly the same. Probably we are doomed.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Natt</dc:creator><pubDate>Thu, 21 Aug 2014 16:24:22 -0000</pubDate></item><item><title>Re: Codemotion Rome 2014 - Software As Biology</title><link>http://www.gar1t.com/blog/software-as-biology-rome.html#comment-1428159414</link><description>&lt;p&gt;Awesome talk!&lt;/p&gt;&lt;p&gt;Someone told me that at Facebook, they had different teams competing on writing better VM's and compilers for php, and killed of the losers. If that's true, it would make a nice example of variation and selection in software.&lt;/p&gt;&lt;p&gt;In case anyone else is looking for the video: &lt;a href="http://vimeo.com/82194443" rel="nofollow noopener" target="_blank" title="http://vimeo.com/82194443"&gt;http://vimeo.com/82194443&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mathias Verraes</dc:creator><pubDate>Tue, 10 Jun 2014 04:47:00 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/more-embarrassingly-obvious-problems.html#comment-1391140665</link><description>&lt;p&gt;Haven't tested this code but this is done in a slightly more dependency injection fashion. We could easily turn this code into a bunch of functional stuff using zips and maps but it may be a little more difficult to read. Knowing &lt;code&gt;yield&lt;/code&gt; is useful as well. So:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;import sys&lt;br&gt;import MySQLdb&lt;br&gt;def get_table_row_counts(query):&lt;br&gt;  for table_name in list_tables(query):&lt;br&gt;    yield (table_name, count_table_rows(query, table_name))&lt;br&gt;&lt;br&gt;&lt;br&gt;def count_table_rows(query, table_name):&lt;br&gt;  return query("select count(*) from %s" % table)[0][0]&lt;br&gt;&lt;br&gt;&lt;br&gt;def list_tables(query):&lt;br&gt;  return [row[0] for row in query("show tables")]&lt;br&gt;&lt;br&gt;def get_database_querier(database):&lt;br&gt;  def query(sql):&lt;br&gt;    cur = database.cursor()&lt;br&gt;    cur.execute(sql)&lt;br&gt;    for r in cur:&lt;br&gt;      yield r&lt;br&gt;    cur.close()&lt;br&gt;  return query&lt;br&gt;&lt;br&gt;if __name__ == "__main__":&lt;br&gt;  database = MySQLdb.connect(db = sys.argv[1])&lt;br&gt;  querier = get_database_querier(database = database)&lt;br&gt;  for table, count in get_table_row_counts(query = querier):&lt;br&gt;    print "%s %i" % (table, count)&lt;br&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Note how much more control you have of the inputs in the 'main' method. How flat this functionality is. How we can have a single cursor if we wanted (I'm opening separate cursors here) and close it down thereafter. Functional. Passing. etc.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Scala W</dc:creator><pubDate>Sat, 17 May 2014 16:52:03 -0000</pubDate></item><item><title>Re: Erlang Factory 2014 - Erlang + CZMQ</title><link>http://www.gar1t.com/blog/erlang-czmq.html#comment-1342486184</link><description>&lt;p&gt;Hah - so that's the link :) Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Garrett Smith</dc:creator><pubDate>Thu, 17 Apr 2014 03:21:34 -0000</pubDate></item><item><title>Re: Erlang Factory 2014 - Erlang + CZMQ</title><link>http://www.gar1t.com/blog/erlang-czmq.html#comment-1339166398</link><description>&lt;p&gt;You can add the video if you want :D!&lt;a href="http://vimeo.com/90838366" rel="nofollow noopener" target="_blank" title="http://vimeo.com/90838366"&gt;http://vimeo.com/90838366&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Federico Carrone</dc:creator><pubDate>Tue, 15 Apr 2014 18:25:05 -0000</pubDate></item><item><title>Re: Solving Embarrassingly Obvious Problems In Erlang</title><link>http://www.gar1t.com/blog/solving-embarrassingly-obvious-problems-in-erlang.html#comment-1268948261</link><description>&lt;p&gt;I understand you want to stress the fact that you can create the program without assignments, however when I think out loud I get to 5 steps:&lt;br&gt;I first log the pending operation&lt;br&gt;Then I collect input from the message&lt;br&gt;Then I validate the collected input&lt;br&gt;Then I create the database&lt;br&gt;Then I handle the result&lt;br&gt;for me this results in the following function:&lt;br&gt;handle_db_create_msg(Msg, State) -&amp;gt;&lt;br&gt;    log_operation(db_create, Msg),&lt;br&gt;    Args = create_db_args(Msg),&lt;br&gt;    validate_db_args(Args),&lt;br&gt;    Result = create_db(Args),&lt;br&gt;    handle_db_create_result(Result, Msg, State).&lt;br&gt;Because I like to read left-right, top-down I think this more readable than the nested functions in the original. On the other hand a bit of reformatting and indention may already help a lot.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin</dc:creator><pubDate>Mon, 03 Mar 2014 15:38:02 -0000</pubDate></item><item><title>Re: Solving Embarrassingly Obvious Problems In Erlang</title><link>http://www.gar1t.com/blog/solving-embarrassingly-obvious-problems-in-erlang.html#comment-1237916114</link><description>&lt;p&gt;handle_db_create_result is used within handle_db_create_msg but is never defined. I *guess* that it should be handle_create_db_result?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bob Wilkinson</dc:creator><pubDate>Mon, 10 Feb 2014 04:44:51 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/erlang-the-movie-ii-the-sequel.html#comment-1169868467</link><description>&lt;p&gt;Goodone!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">oddjobsman</dc:creator><pubDate>Thu, 19 Dec 2013 04:32:01 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/nodejs-is-bad-ass-rock-star-tech.html#comment-1098724595</link><description>&lt;p&gt;Thor bless you brother! &lt;a href="http://www.youtube.com/watch?v=F7jSp2xmmEE" rel="nofollow noopener" target="_blank" title="http://www.youtube.com/watch?v=F7jSp2xmmEE"&gt;http://www.youtube.com/watc...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kunthar</dc:creator><pubDate>Sun, 27 Oct 2013 15:48:44 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/erlang-the-movie-ii-the-sequel.html#comment-1049723386</link><description>&lt;p&gt;Well, I confess - I watch it to get to the closing credits. #swoon&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Garrett Smith</dc:creator><pubDate>Wed, 18 Sep 2013 14:30:54 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/erlang-the-movie-ii-the-sequel.html#comment-1049687578</link><description>&lt;p&gt;Is it weird that I watch this once every couple of days?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carlo DiCelico</dc:creator><pubDate>Wed, 18 Sep 2013 14:13:06 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/techmesh-2012-application-platform.html#comment-1026706399</link><description>&lt;p&gt;Sorry for the embarrassingly late reply -- and thank you for inquiring -- but alas, no, this was not recorded.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Garrett Smith</dc:creator><pubDate>Mon, 02 Sep 2013 14:50:30 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/erlang-the-movie-ii-the-sequel.html#comment-912333200</link><description>&lt;p&gt;Now I want to learn Outlaw Techno Psychobitch!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ZoIomon</dc:creator><pubDate>Wed, 29 May 2013 06:53:00 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/writing-beautiful-code-erlang-factory.html#comment-865238975</link><description>&lt;p&gt;These are from Landslide. Alas I have the same problem viewing them on my Android phone :( I'd love some recommendations on a slideshow generator that creates universally readable HTML! The idea of using Landslide in the first place was that it made accessing these slides easy for people.&lt;/p&gt;&lt;p&gt;#fail&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Garrett Smith</dc:creator><pubDate>Tue, 16 Apr 2013 11:52:54 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/writing-beautiful-code-erlang-factory.html#comment-865062168</link><description>&lt;p&gt;Which library did you used to create these slides? Btw, please consider adding on screen buttons if possible. The slides can't be read from a tablet&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Le Viet Bach</dc:creator><pubDate>Tue, 16 Apr 2013 07:52:21 -0000</pubDate></item><item><title>Re: Sharding /dev/null</title><link>http://www.gar1t.com/blog/erlang-the-movie-ii-the-sequel.html#comment-852846700</link><description>&lt;p&gt;Having watched the "new" video, I think I'm going to need some serious therapy... or a stiff drink.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Barry</dc:creator><pubDate>Fri, 05 Apr 2013 04:23:16 -0000</pubDate></item></channel></rss>