9 ms·
One base class to rule them all.
- Confusion 15y agoI'm sorry, but why is this joke being upvoted so much? It hardly seems HN material to me: I'm sure we've all jokingly considered about something like this once. I doubt anyone learned anything from it.
- jtchang 15y agoWow a pull request and forks already. Is there anything Ruby can't do?
- damncabbage 15y agoI'd be laughing if I didn't fear that I'd someday be running into (or working with) someone who uses this.
- derwildemomo 15y agoexactly my first thought..
- coreycollins 15y agoI was cringing all the way down through this article. Thank god for the last paragraph.
- stuffihavemade 15y agoGreat gem. But why not include it in module form so I can mix it into BasicObject?
- JonnieCache 15y agoI think I may have just had a brain hemorrhage.
- joshuaxls 15y agoAs long as we're being silly with Ruby metaprogramming, my favorite: https://github.com/thorncp/fsck https://github.com/thorncp/fsck Fsck allows you to express your feelings while you're developing. It does this by allowing you to add words to method names on the fly.
- idonthack 15y agoHow clever. I've been inspired, I'm going to write a module named "mkfs" and it will do absolutely nothing related to making a filesystem
- deleted 15y ago[deleted]
- phillmv 15y agoYeah! Your joke library that appeals to a niche audience is really going to fill that second page of google results.
- socratic 15y agoOne issue with the current karma-less HN is that one cannot visually determine who won an exchange such as this one. Is there a mechanism for determining the karma of a particular comment with additional effort?
- RodgerTheGreat 15y agoI'm getting some serious Poe's Law vibes from this thing. If not for the disclaimer I would be rightly terrified.
- garybernhardt 15y agoI was tempted to leave the disclaimer off, both in the README and the blog post. But I think there's a strong enough chance of someone actually using it as it is... ;)
- jerf 15y agoClearly the next step is to hook this up to http://www.goto.info.waseda.ac.jp/~fukusima/ruby/python/doc/index.html http://www.goto.info.waseda.ac.jp/~fukusima/ruby/python/doc/... , https://github.com/zephirworks/ruby-perl https://github.com/zephirworks/ruby-perl , and http://jmettraux.wordpress.com/2009/03/16/ruby-to-lua/ http://jmettraux.wordpress.com/2009/03/16/ruby-to-lua/ . Truly one language to rule them all.
- harel 15y agoI started reading this seriously and at some point just burst out laughing. First 'tech text' to make me laugh like that. Very good.
- KevinEldon 15y agoThis base class (all your methods are belong to us?) is amusing, but the screencasts on Destroy All Software are pretty helpful. The $9/month was worth it for the continuous performance testing w/ RSpec explanation: https://www.destroyallsoftware.com/blog/2011/continuous-automated-performance-testing https://www.destroyallsoftware.com/blog/2011/continuous-auto... I am in no way affiliated w/ Destroy All Software other than being a happy new customer.
- rohitarondekar 15y agoThe screencasts are definitely very helpful. Also since they are not very long, they don't take much time to watch and you learn quite a lot.
- mcbarry 15y agoI was inspired by sysfunboost.sh (swaps two system binaries) and made fun-boost.rb which does the same thing with two methods. https://github.com/lmc/fun-boost.rb https://github.com/lmc/fun-boost.rb
- sli 15y agoHuh... I had no idea that a cantaloupe has five days.
- jroseattle 15y agoIssue #2 (https://github.com/garybernhardt/base/issues/2 https://github.com/garybernhardt/base/issues/2) is pure gold. What license is this released under? I would assume an awesome base class needs a corresponding awesome license.
- saurik 15y agoMy preference would be "all OSI approved licenses; not any one in particular, but all of them at once" (and yes: this might legally conflict, but I think that would be a feature in this case, allowing for even more hilarious descriptions).
- garybernhardt 15y agoDone: https://github.com/garybernhardt/base/commit/65e8ca5d432be72bbc16f625de002ba90e0f4006 https://github.com/garybernhardt/base/commit/65e8ca5d432be72...
- bdonlan 15y agoIANAL, but it's my understanding that there's no particular conflict here. You'd be licensing the same work under multiple licenses; if any one of them authorizes some particular use, that's enough to be an affirmative defense against copyright infringement. If you violate the terms of one license, that particular license may become void, but as long as some others remain, you're fine. In other words, licenses don't make certain uses of works forbidden; they make them _permitted_. If you license it under both GPLv3 and BSD, and someone does something permitted under BSD but forbidden under GPLv3, the GPLv3 can't forbid the BSD license. That said, the current wording (the 'union of the terms specified' by all OSI licenses) is not multiply licensing, but something far stranger...
- spullara 15y agoHey, look! They made C! :)
- silentbicycle 15y agoOf course it's Ruby.
- garybernhardt 15y agoI could port it to Python if you want? ;) I probably wouldn't have done this when Python was my main language, though. That community has a much harder time laughing at itself than Ruby's does.
- silentbicycle 15y agoMaybe C or k? ;)
- cbs 15y agoPython already has one base class to rule them all, `object`. From just the title I thought that's what the post was going to be about.
- Luyt 15y agoThe same thing in Python would require you to import all modules, and place all functions and classes in those modules in one class. Probably can be done, but whether it's useful?
- draegtun 15y agoFortunately the Perl community have no trouble laughing at itself either! So here's a port to Perl :) https://gist.github.com/1204277 https://gist.github.com/1204277 Moose's MOP makes this "port" quite easy (as does Perl having multiple inheritance!). Does mean it only works on Moose classes but a universal approach is also possible but it wouldn't be as succinct!
- dwhitney 15y agoawsome
- jpr 15y agoSadly, this isn't seen as the wake up call it should be, but as a joke.
- adgar 15y agoPull request 5: Auto-require every gem. https://github.com/garybernhardt/base/pull/5 https://github.com/garybernhardt/base/pull/5 Wow.
- JonnieCache 15y agoMy favourite idiotic ruby gem: Tenderlove's NeverSayDie, which allows you to resuce segfaults. https://github.com/tenderlove/neversaydie https://github.com/tenderlove/neversaydie I seem to remember a gem that allowed for inline assembly too, but perhaps fortunately I can't remember what it's called.
- judofyr 15y agoWilson: https://github.com/seattlerb/wilson https://github.com/seattlerb/wilson
- JonnieCache 15y agoAh, thanks, and now I've remembered where I saw these: tenderlove's "Worst Ideas Ever" talk at rubyconf, where he and ryan davis basically try and run all this shit at the same time, so they're rescuing segfaults then fixing them using inline assembly, cross compiling rails 2.3's AST into XML and then executing it, cross compiling rails into PHP, and all sorts of awful shit. Hilarious. http://confreaks.net/videos/198-rubyconf2009-worst-ideas-ever http://confreaks.net/videos/198-rubyconf2009-worst-ideas-eve...