tag:blogger.com,1999:blog-12467669.comments2023-04-29T07:23:25.825-04:00Jay Fields' ThoughtsJayhttp://www.blogger.com/profile/14491442812573747680noreply@blogger.comBlogger2495125tag:blogger.com,1999:blog-12467669.post-75004399424862321852013-04-22T23:29:13.338-04:002013-04-22T23:29:13.338-04:00I agree with Jay -- NNPP has hardly anything to do...I agree with Jay -- NNPP has hardly anything to do with simple experience. In fact, most NNPP I've met had some years of experience, sometimes many years of experience.<br /><br />Even the one beginner NNPP I met was strikingly different from other beginners -- not ignorance, but a complete inability to grasp essential concepts.<br /><br />Danielhttps://www.blogger.com/profile/07505997833685327219noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-30674784816345365002013-04-22T19:14:59.566-04:002013-04-22T19:14:59.566-04:00@anonymous, in 2009 I'd already gotten pretty ...@anonymous, in 2009 I'd already gotten pretty far in my career. I would easily hire someone with similar experience, and I would hope they wouldn't be NNPP. You could go farther back and find a point at which I lacked experience, but that's not the same as being NNPP. Jayhttps://www.blogger.com/profile/14491442812573747680noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-54261818222460337912013-04-15T13:37:17.709-04:002013-04-15T13:37:17.709-04:00Thank you, Jay, for a great article. It is very he...Thank you, Jay, for a great article. It is very helpful for me, as I just begin to tip my toes into Clojure waters.)Alexander Turokhttps://www.blogger.com/profile/13902719420774359982noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-69324231863883658712013-04-14T00:29:30.693-04:002013-04-14T00:29:30.693-04:00Today, in 2013, would you hire a 2009 version of y...Today, in 2013, would you hire a 2009 version of yourself? would than person now be deemed a NNPP?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-27181045396456392922013-04-04T14:08:07.297-04:002013-04-04T14:08:07.297-04:00Typically this is done by creating a TAGS file, wh...Typically this is done by creating a TAGS file, which can be a bit smarter about the syntax (and also be fairly language-agnostic), but this does the trick too.Philhttp://technomancy.usnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-39369063805726114162013-03-27T14:45:39.061-04:002013-03-27T14:45:39.061-04:00this is a better script. the suggested method abov...this is a better script. the suggested method above would lead to errors when parse_query tries to generate the hashes<br /><br />rack_input = env["rack.input"].read.gsub(/\&[a-zA-Z]+=/,'nnd\0').gsub("nnd&","^^").gsub("&","^*^").gsub("^^","&")<br /> <br />params = Rack::Utils.parse_query(rack_input, "&")<br /> <br />params.each_pair do |k,y|<br /> params[k] = y.gsub("^*^","&")<br /> endAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-77887951785746688232013-03-10T15:36:00.062-04:002013-03-10T15:36:00.062-04:00When you do a when-let you're code is conditio...When you do a when-let you're code is conditional on what expression you have on the right. If you also choose to destructure that value the destructured locals will have no impact on the conditional.<br /><br />In both cases you're expecting when-let to decide based on the destructured value; however it's deciding based on the undestructured value {} in the first example and {:a false} in the second example.Jayhttps://www.blogger.com/profile/14491442812573747680noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-20752365053536872212013-03-08T11:21:18.627-05:002013-03-08T11:21:18.627-05:00wI actually do not understand how these two:
user...wI actually do not understand how these two:<br /><br />user=> (when-let [{a :a} {}] [a]) <br />[nil]<br />user=> (when-let [{a :a} {:a false}] [a])<br />[false]<br /><br />I would think both of those would return nil. I don't understand how those destructuring binds result in truthy values.<br /><br />I see that this is indeed the behavior though. Do you have any further insight on this? I didn't think it was intuitive.Anonymoushttps://www.blogger.com/profile/00787262028833770844noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-41946052811250270192013-02-26T10:12:32.511-05:002013-02-26T10:12:32.511-05:00What do you think about the idea of defining your ...What do you think about the idea of defining your own small functions with meanful names as a kind of DSL?<br /><br />@ramtophttps://www.blogger.com/profile/04690411676978540335noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-70841187325355242892013-02-26T00:38:10.888-05:002013-02-26T00:38:10.888-05:00Totally in home growth groups can only understand ...Totally in home growth groups can only understand from each other. Therefore, your remedy choice aka strategy is restricted to the encounter of few instead of many.Colby Cruzhttp://laithellison.webstarts.com/noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-71175384180241119912013-02-20T03:42:05.338-05:002013-02-20T03:42:05.338-05:00Well, I don't find it difficult to understand....Well, I don't find it difficult to understand.<br /><br />One advantage (in my opinion) is that, as a programmer, I don't have to think about choosing yet another local variable.<br /><br />Also, I find<br /><br /> well_named_collection.map &: well_named_operation<br /><br />very readable, certainly more readable than <br /><br /> well_named_collection.map{ |e| e.well_named_operation }<br /><br />because in this case, I find the braces part to be… well… syntactical overhead.<br />YMMV, of course. <br />Stephanhttp://seasidetesting.com/noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-61165530090314011392013-02-18T18:40:52.355-05:002013-02-18T18:40:52.355-05:00Good read, thanksGood read, thanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-53925229246141653842013-01-30T05:17:32.470-05:002013-01-30T05:17:32.470-05:00I am currently considering using Clojure - to whic...I am currently considering using Clojure - to which I'm still quite new - for an ETL 'problem'. <br /><br />The ETL tools we have (and have had) are awful to work with, and writing this in Java, our bread-and-butter language would mean endless wrapping and unwrapping and plumbing code that is just not all that useful for this particular problem. Of course, I'm going back-and-forth whether I should force my colleagues to use a programming language instead of an ETL tool (easy sell there given our current problems maintaining the tool) and whether if that would be a language, I should pick Clojure. Seems like the best tool for the job, but then again it can be hard to pick up if you haven't done LISP before.<br /><br />Anyway, I had to laugh at your line: <i>I had previously worked in places where getting bonus money was about as likely as meeting your future wife at a JavaOne</i>. Well, I've only once gotten a bonus worth mentioning, but did in fact meet my wife at JavaOne, believe it or not!Eelco Hilleniushttps://www.blogger.com/profile/18171935814979500631noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-19113645147319166702013-01-15T08:38:01.703-05:002013-01-15T08:38:01.703-05:00Excellent introduction! Thanks a lot.Excellent introduction! Thanks a lot.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-60156053886014556252013-01-13T11:51:39.540-05:002013-01-13T11:51:39.540-05:00Hi Jay
Let me introduce myself. My name is Patrok...Hi Jay<br /><br />Let me introduce myself. My name is Patroklos Papapetrou ( http://gr.linkedin.com/in/ppapapetrou/ ) and I recently started the scala-topics.org project. <br /><br />My intention is to create a community with the best content about scala, functional programming, akka etc.<br />I believe that your articles are really valuable so I invite you to take a look at our partner program (http://scala-topics.org/join-us/) and get in touch with me if you're interested.<br />Since the project it just takes its first baby steps I'd greatly appreciate your prompt reply.<br /><br />Looking forward to hearing from you <br />Best RegardsPapapetrou P.Patrokloshttps://www.blogger.com/profile/11741741357981038329noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-78140663443354351862013-01-10T06:33:00.629-05:002013-01-10T06:33:00.629-05:00this is heavily outdated:
// Java calling code
RT...this is heavily outdated:<br /><br />// Java calling code<br />RT.loadResourceScript("interop/core.clj");<br />RT.var("interop.core", "print-string").invoke("hello world");<br /><br />Use this: // Java calling code<br />RT.loadResourceScript("interop/core.clj");<br />RT.var("interop.core", "print-string").invoke("hello world");Hemppohttps://www.blogger.com/profile/00964066108941793577noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-27479571315269155142013-01-10T06:31:25.840-05:002013-01-10T06:31:25.840-05:00this is heavily outdated:
// Java calling code
RT...<br />this is heavily outdated:<br /><br />// Java calling code<br />RT.loadResourceScript("interop/core.clj");<br />RT.var("interop.core", "print-string").invoke("hello world");<br /><br />Use this: // Java calling code<br />RT.loadResourceScript("interop/core.clj");<br />RT.var("interop.core", "print-string").invoke("hello world");Hemppohttps://www.blogger.com/profile/00964066108941793577noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-5018467223800872202013-01-04T07:36:44.357-05:002013-01-04T07:36:44.357-05:00What's the problem? Rails is open source. Stop...What's the problem? Rails is open source. Stop whining, fix it, and submit a pull request.Chris Petersnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-29216491782639163572012-12-18T12:42:54.083-05:002012-12-18T12:42:54.083-05:00@Ben,
redef state actually uses whatever value is ...@Ben,<br />redef state actually uses whatever value is already in there - which can lead to issues if you aren't careful. For example, if you alter some state in test 1 and then use redef state in test 2, you'll not have an empty data structure, you'll have whatever test 1 left in there.<br /><br />If you want a non-empty value, I'd use either with-redefs alone or in combination with redef-state.<br /><br />Thanks for using expectations. <br /><br />Cheers, JayJayhttps://www.blogger.com/profile/14491442812573747680noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-34721203206312231932012-12-15T04:37:58.310-05:002012-12-15T04:37:58.310-05:00Thanks for sharing this.Thanks for sharing this.firesofmayhttps://www.blogger.com/profile/02198451649692833106noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-34863797418678206182012-12-15T04:37:20.633-05:002012-12-15T04:37:20.633-05:00This was really helpful. Thanks for sharing.This was really helpful. Thanks for sharing.firesofmayhttps://www.blogger.com/profile/02198451649692833106noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-79225711498835799962012-12-05T00:35:35.884-05:002012-12-05T00:35:35.884-05:00Thanks for this article! I really need thisThanks for this article! I really need thisAlex Antonovhttp://asiniy.runoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-78520241981779740122012-11-20T22:32:45.745-05:002012-11-20T22:32:45.745-05:00That was a very nice tutorial! Thanks a lot!That was a very nice tutorial! Thanks a lot!Anonymoushttps://www.blogger.com/profile/06859236839072536766noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-17692420957417677182012-11-19T16:37:17.522-05:002012-11-19T16:37:17.522-05:00Is it possible to assign a specific state to your ...Is it possible to assign a specific state to your atoms etc., or does redef-state only make them empty?Ben Whttps://www.blogger.com/profile/06887096661154495898noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-7788445893149142272012-11-16T12:11:07.540-05:002012-11-16T12:11:07.540-05:00Using xargs in combination with find is far prefer...Using <b>xargs</b> in combination with <b>find</b> is <i>far</i> preferable to using the <b>-exec</b> arg of <b>find</b>. The syntax after the <b>-exec</b> arg is ugly and awkward, whereas <b>xargs</b> brings elegance and simplicity.<br /><br />But <b>xargs</b> isn't only useful with <b>find</b>. Any time you need to convert a list of data in the pipe stream (files, strings, whatever) into <i>arguments</i> for a command later in the pipe stream, <b>xargs</b> is the tool to do it.<br /><br />Let's use <b>find/xargs</b> anyway. Let's say, for example, you have a bunch of log files you no longer want, log files with "foo" in the name of the file, and they're all under your current directory. The following will get rid of those files:<br /><br /><b>find . -type f | egrep 'foo.*log$' | xargs rm</b><br /><br />What if you want to remove a bunch of log files where "foo" is not in the <i>name</i> of the file, but rather in the <i>contents</i> of the file? We use <b>xargs</b> <i>twice</i> in the pipe stream to accomplish that, along with an example of <b>awk</b>:<br /><br /><b>find . -type f -name "*.log" | xargs egrep foo | awk -F: '{print $1}' | sort -u | xargs rm</b><br /><br />The commands <b>grep</b> and <b>egrep</b> each have 2 ways of operating on data. The first case is where they're receiving string data from <i>stdin</i>:<br /><br /><b>... | egrep <i>pattern</i></b><br /><br />The second case is where they're given a set of filenames to search through:<br /><br /><b>egrep <i>pattern filename [filename...]</i></b><br /><br />In the <i>first</i> <b>find</b> example above, the list of filenames which were piped into <b>egrep</b> came through <i>stdin</i>, and they were thus treated as strings. In the <i>second</i> <b>find</b> example above, the list of filenames which were piped into <b>xargs egrep</b> got treated as arguments to <b>egrep</b> (because of the magic of <b>xargs</b>), and therefore the filenames represented the actual <i>files</i>, and their contents were searched.<br /><br />I love your blog, Jay Fields!Jimnoreply@blogger.com