It's common in Ruby to see some code setup a Struct like this:
class Specialized < Struct.new(:whatever)
# ... define custom methods here...
endIf you'd like a taste of Docker, here's how to get my silly Taco app running under Docker on your machine.
... using instructions from https://github.com/noplay/docker-osx
curl https://raw.github.com/noplay/docker-osx/0.8.0/docker-osx > /usr/local/bin/docker-osx
chmod +x /usr/local/bin/docker-osx
I hereby claim:
To claim this, I am signing this object:
this is a test
test complete! but what about normal lists?
| # Some userland app code | |
| $LOAD_PATH.unshift "." | |
| require 'lib' |
| module Refinement | |
| refine Object do | |
| def new_method | |
| 'new method!' | |
| end | |
| end | |
| end | |
| class Thing | |
| using Refinement |
| $ ruby huffman.rb this is a test of compression | |
| input length in bits 232 (29 * 8) | |
| Binary 1111100000100011001000110100101101111101000111111001111100110111010111001110001101111010000001001110110 | |
| Encoded string length in bits: 103 | |
| Compression: 44.396551724137936% | |
| Decoded: this is a test of compression |
| Fedifeed implementation notes | |
| Two components | |
| Server implements a few endpoints | |
| /reblogs — returns accounts that you reblog the most | |
| /core_servers — returns the instances who host most of the accounts you follow | |
| /favourites — returns users that you favourite the most | |
| Client hits those endpoints, and then: |