Prgrmmn Scraps

Misc bits learned, and shared. Cuz I (robert pitts/rbxbx

Schlagwörter: , ,


Link zum Feed:

Datum des Feedeintrags: 2010-06-16 16:16:48

Um den Feed mit Ihrem Feedreader zu abonnieren kopieren Sie den Pfad von dem RSS-Symbol. Um den vollständigen Feed aufzurufen, klicken Sie auf das RSS Symbol.

rss icon mit text rss

Die folgenden Texte stammen nicht von, sondern direkt aus dem RSS Feed der Homepage Wir zeigen Ihnen in dieser Vorschau die zwölf neuesten Feedeinträge dieses Feeds an.

Die Feedeinträge

  • unchill waaves
    unchill waaves
  • This tumblog is dead-is-dead-is-dead
    You’ll now find me at Same infrequent posts, same lack of attention, same adoration of all impractical, but now with a newer, sadder name. Win win!
  • Decomposition through exposition towards eventual composition
    Decomposition through exposition towards eventual composition or Why FP? Why FP Simple to reason about inputs yield outputs data and behavior are the same Simple to decompose functions are truly first class when everything is composed of functions/data powerful patterns of abstraction become available currying Simple to compose partial application | a function without all it’s arguments simply ret …
  • The problem with blogging is blogging
    There are two things that immediately strike me as problematic when trying to talk to you (dear reader audience), and those are as such: ego and confidence. Perhaps with more concision that could be said as solely confidence.  I need to feel good about what I’m saying to you personally, which I seldom do. I often reflect fondly upon things I’ve done or said or created in the past, but seldom at th …
  • An exploration of the Maybe Monad in Ruby
    A (perhaps crude) exploration of the Maybe Monad in Ruby. I realize this is somewhat treaded turf, however it was done for my own learning, and I think came out pretty clean!  Needs tests and could be made more flexible, yada yada. Usage: nil.maybe { |n| n + 2 + 3 } => nil Which is essentially the same as nil.try(:+, 1).try(:+, 2).try(:+, 3) If the result is nil anywhere in the chain, the block …
  • Object.antialias_method
    I doubt I’d actually do this, but the pattern of defining a method, only to have it return the inverse of another method is common enough. ie: def unregistered? !registered end But alas… stupid ruby things are fun. So there. edit:  Oh, hey common lisp, whatup? complement!
  • Ruby Debug in Ruby 1.9.2
    Currently, ruby-debug19 head is broken in ruby 1.9.2 in your Gemfile, have you happily debugging again.  Thanks to abuiles for finding this solution :) (og thread)
  • Easy Parallelism in Ruby
    Last week, @voxdolo and I were faced with a problem: our application needed to make 3 API calls at once, and while two of the services were ok (finishing in three seconds or so), the third would take up to 8 seconds to retrieve it’s data.  When done synchronously this meant on a good day we’d get out in 14 seconds, which is simply unacceptable. After deciding we didn’t want to manage threads ourse …
  • Pair Program, all the fucking time. (via @johnguenin)
    Pair Program, all the fucking time. (via @johnguenin)
  • Enumerable ! methods and Mongoid
    One should be aware when using ! methods (slice!, map!, etc!) on the collections returned from Mongoid queries ie:  foos does not have foo1..3 shifted from the array as you’d expect, it’s state has not been mutated. I’m not sure if this is by design or otherwise (it most certainly is a by-product of the lazily evaluated nature of Mongoid queries, but for the time being foos = foos.to_a; foos.slice …
  • Install RubyCocoa on RVM
    I’ve been using RVM (and gemsets) to manage my Rubies lately, to much success. I however ran into the issue today of trying to install rspactor (think autotest on ‘roids) which depends on RubyCocoa to monitor changes to the filesystem. As it would turn out, when you vanilla install a Ruby via RVM, RubyCocoa is unsupported. To enable installation of RubyCocoa you’ll need to set a few flags during R …