redditkit 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redditkit/client/captcha.rb +1 -1
- data/lib/redditkit/client/links.rb +10 -1
- data/lib/redditkit/client/moderation.rb +5 -6
- data/lib/redditkit/client/search.rb +17 -4
- data/lib/redditkit/client/users.rb +0 -2
- data/lib/redditkit/link.rb +12 -0
- data/lib/redditkit/response/parse_json.rb +3 -3
- data/lib/redditkit/version.rb +1 -1
- data/redditkit.gemspec +4 -1
- data/spec/cassettes/RedditKit_Client_Search/_search/restricts_searches_to_a_specific_subreddit.yml +884 -1
- data/spec/cassettes/RedditKit_Client_Search/_search/returns_a_specific_number_of_results.yml +132 -1
- data/spec/cassettes/RedditKit_Client_Search/_search/returns_search_results.yml +831 -1
- data/spec/redditkit/base_spec.rb +1 -1
- data/spec/redditkit/client/account_spec.rb +3 -3
- data/spec/redditkit/client/links_spec.rb +1 -1
- data/spec/redditkit/client/moderation_spec.rb +1 -1
- data/spec/redditkit/client/multireddits_spec.rb +3 -3
- data/spec/redditkit/client/users_spec.rb +2 -2
- data/spec/redditkit/client/voting_spec.rb +16 -16
- data/spec/redditkit/client_spec.rb +2 -2
- data/spec/redditkit/comment_spec.rb +3 -3
- data/spec/redditkit/link_spec.rb +15 -4
- data/spec/redditkit/multireddit_spec.rb +1 -1
- data/spec/redditkit/thing_spec.rb +1 -1
- data/spec/redditkit/votable_spec.rb +3 -3
- data/spec/redditkit_spec.rb +1 -1
- metadata +46 -12
data/spec/cassettes/RedditKit_Client_Search/_search/returns_a_specific_number_of_results.yml
CHANGED
@@ -127,4 +127,135 @@ http_interactions:
|
|
127
127
|
\"after\": \"t3_sk4qq\", \"before\": null}}"
|
128
128
|
http_version:
|
129
129
|
recorded_at: Sun, 10 Nov 2013 22:21:32 GMT
|
130
|
-
|
130
|
+
- request:
|
131
|
+
method: get
|
132
|
+
uri: http://www.reddit.com/r/ruby/search.json?after&before&count&limit=3&q=ruby&restrict_sr=true&sort&syntax&t
|
133
|
+
body:
|
134
|
+
encoding: US-ASCII
|
135
|
+
string: ''
|
136
|
+
headers:
|
137
|
+
User-Agent:
|
138
|
+
- Faraday v0.8.8
|
139
|
+
Accept-Encoding:
|
140
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
141
|
+
Accept:
|
142
|
+
- "*/*"
|
143
|
+
response:
|
144
|
+
status:
|
145
|
+
code: 200
|
146
|
+
message: OK
|
147
|
+
headers:
|
148
|
+
Content-Type:
|
149
|
+
- application/json; charset=UTF-8
|
150
|
+
X-Frame-Options:
|
151
|
+
- SAMEORIGIN
|
152
|
+
Access-Control-Allow-Origin:
|
153
|
+
- "*"
|
154
|
+
Server:
|
155
|
+
- "'; DROP TABLE servertypes; --"
|
156
|
+
Vary:
|
157
|
+
- accept-encoding
|
158
|
+
Date:
|
159
|
+
- Wed, 08 Jan 2014 06:49:52 GMT
|
160
|
+
Content-Length:
|
161
|
+
- '7430'
|
162
|
+
Connection:
|
163
|
+
- keep-alive
|
164
|
+
body:
|
165
|
+
encoding: UTF-8
|
166
|
+
string: "{\"kind\": \"Listing\", \"data\": {\"modhash\": \"\", \"children\":
|
167
|
+
[{\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
|
168
|
+
\"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
169
|
+
SC_OFF --><div class=\\\"md\\\"><p>Hello <a href=\\\"/r/ruby\\\">/r/ruby</a>
|
170
|
+
</p>\\n\\n<p>I am new to Ruby, however I&#39;ve programmed
|
171
|
+
in C, C++, Java, and C# along with VB.NET, HTML, and minimal Python. </p>\\n\\n<p>I&#39;ve
|
172
|
+
heard that Ruby is a bit different and has quite the steep learning curve.
|
173
|
+
So I ask you...</p>\\n\\n<p>What is the one thing that you wish
|
174
|
+
you knew before starting to learn or really use Ruby?</p>\\n\\n<p>I
|
175
|
+
also plan on using RoR if anyone has thoughts on that as well!</p>\\n\\n<p>Any
|
176
|
+
comments are appreciated! Thanks Guys!</p>\\n</div><!-- SC_ON
|
177
|
+
-->\", \"selftext\": \"Hello /r/ruby \\n\\nI am new to Ruby, however I've
|
178
|
+
programmed in C, C++, Java, and C# along with VB.NET, HTML, and minimal Python.
|
179
|
+
\\n\\nI've heard that Ruby is a bit different and has quite the steep learning
|
180
|
+
curve. So I ask you...\\n\\nWhat is the one thing that you wish you knew before
|
181
|
+
starting to learn or really use Ruby?\\n\\nI also plan on using RoR if anyone
|
182
|
+
has thoughts on that as well!\\n\\nAny comments are appreciated! Thanks Guys!\",
|
183
|
+
\"likes\": null, \"secure_media\": null, \"link_flair_text\": null, \"id\":
|
184
|
+
\"1j9wqw\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
|
185
|
+
false, \"author\": \"ProductiveThings\", \"media\": null, \"score\": 56, \"approved_by\":
|
186
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
187
|
+
\"t5_2qh21\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
188
|
+
null, \"downs\": 9, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1j9wqw/what_is_one_thing_you_wish_you_knew_when_starting/\",
|
189
|
+
\"name\": \"t3_1j9wqw\", \"created\": 1375108691.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1j9wqw/what_is_one_thing_you_wish_you_knew_when_starting/\",
|
190
|
+
\"author_flair_text\": null, \"title\": \"What is one thing you wish you knew
|
191
|
+
when starting Ruby?\", \"created_utc\": 1375105091.0, \"ups\": 65, \"num_comments\":
|
192
|
+
81, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
|
193
|
+
{\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
|
194
|
+
\"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
195
|
+
SC_OFF --><div class=\\\"md\\\"><p>...and thanks to everyone
|
196
|
+
in <a href=\\\"/r/ruby\\\">/r/ruby</a>, <a href=\\\"/r/rails\\\">/r/rails</a>
|
197
|
+
and <a href=\\\"/r/programming\\\">/r/programming</a> who helped
|
198
|
+
me gain not only the skills but the confidence to make the switch. I&#39;ve
|
199
|
+
been a lifelong marketer who always felt unfulfilled and spent nights/weekends/free
|
200
|
+
time learning Ruby, Rails, MySQL, PostgreSQL, jQuery, and more, finally culminating
|
201
|
+
in my first full-time development job. Wish me luck!</p>\\n</div><!--
|
202
|
+
SC_ON -->\", \"selftext\": \"...and thanks to everyone in /r/ruby, /r/rails
|
203
|
+
and /r/programming who helped me gain not only the skills but the confidence
|
204
|
+
to make the switch. I've been a lifelong marketer who always felt unfulfilled
|
205
|
+
and spent nights/weekends/free time learning Ruby, Rails, MySQL, PostgreSQL,
|
206
|
+
jQuery, and more, finally culminating in my first full-time development job.
|
207
|
+
\ Wish me luck!\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
|
208
|
+
null, \"id\": \"1i72ww\", \"secure_media_embed\": {}, \"clicked\": false,
|
209
|
+
\"stickied\": false, \"author\": \"caadbury\", \"media\": null, \"score\":
|
210
|
+
89, \"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
|
211
|
+
\"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\":
|
212
|
+
null, \"author_flair_css_class\": null, \"downs\": 21, \"saved\": false, \"is_self\":
|
213
|
+
true, \"permalink\": \"/r/ruby/comments/1i72ww/on_monday_i_start_a_new_career_as_a_web_developer/\",
|
214
|
+
\"name\": \"t3_1i72ww\", \"created\": 1373686161.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1i72ww/on_monday_i_start_a_new_career_as_a_web_developer/\",
|
215
|
+
\"author_flair_text\": null, \"title\": \"On Monday, I start a new career
|
216
|
+
as a web developer in Ruby on Rails\", \"created_utc\": 1373682561.0, \"ups\":
|
217
|
+
110, \"num_comments\": 49, \"visited\": false, \"num_reports\": null, \"distinguished\":
|
218
|
+
null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\":
|
219
|
+
null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
220
|
+
SC_OFF --><div class=\\\"md\\\"><p>Hello everyone,</p>\\n\\n<p>This
|
221
|
+
is a little framework of mine that I&#39;ve built out of a personal need
|
222
|
+
- basically, I wanted to write a desktop app using Ruby and I found it daunting
|
223
|
+
to say the least.</p>\\n\\n<p>So, I&#39;ve built Freightrain
|
224
|
+
to take care of all the stuff I really shouldn&#39;t care about, like
|
225
|
+
loading interface definitions, cross-toolkit compatibility and the likes.</p>\\n\\n<p>Now
|
226
|
+
I&#39;ve been working on it for almost 2 years (on and off of course)
|
227
|
+
and, since I&#39;ve just fixed it so it loads the newest glade specifications,
|
228
|
+
I thought that I could ask you guys for an evaluation.</p>\\n\\n<p>There&#39;s
|
229
|
+
a little readme on the github page and there are some examples in the /examples
|
230
|
+
folder.</p>\\n\\n<p><a href=\\\"http://github.com/bolthar/freightrain\\\">Link
|
231
|
+
to the github page!</a></p>\\n\\n<p>WHOA! Thanks for the
|
232
|
+
attention, I thought this was going to be ignored...</p>\\n\\n<p>How
|
233
|
+
many of you would be interested in a step by step tutorial over the major
|
234
|
+
features? I will build that if there&#39;s enough interest.</p>\\n</div><!--
|
235
|
+
SC_ON -->\", \"selftext\": \"Hello everyone,\\n\\nThis is a little framework
|
236
|
+
of mine that I've built out of a personal need - basically, I wanted to write
|
237
|
+
a desktop app using Ruby and I found it daunting to say the least.\\n\\nSo,
|
238
|
+
I've built Freightrain to take care of all the stuff I really shouldn't care
|
239
|
+
about, like loading interface definitions, cross-toolkit compatibility and
|
240
|
+
the likes.\\n\\nNow I've been working on it for almost 2 years (on and off
|
241
|
+
of course) and, since I've just fixed it so it loads the newest glade specifications,
|
242
|
+
I thought that I could ask you guys for an evaluation.\\n\\nThere's a little
|
243
|
+
readme on the github page and there are some examples in the /examples folder.\\n\\n[Link
|
244
|
+
to the github page!](http://github.com/bolthar/freightrain)\\n\\nWHOA! Thanks
|
245
|
+
for the attention, I thought this was going to be ignored...\\n\\nHow many
|
246
|
+
of you would be interested in a step by step tutorial over the major features?
|
247
|
+
I will build that if there's enough interest.\", \"likes\": null, \"secure_media\":
|
248
|
+
null, \"link_flair_text\": null, \"id\": \"sk4qq\", \"secure_media_embed\":
|
249
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"bolthar\", \"media\":
|
250
|
+
null, \"score\": 164, \"approved_by\": null, \"over_18\": false, \"hidden\":
|
251
|
+
false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": true,
|
252
|
+
\"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
253
|
+
11, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/sk4qq/freightrain_easy_ruby_desktop_development/\",
|
254
|
+
\"name\": \"t3_sk4qq\", \"created\": 1334952179.0, \"url\": \"http://www.reddit.com/r/ruby/comments/sk4qq/freightrain_easy_ruby_desktop_development/\",
|
255
|
+
\"author_flair_text\": null, \"title\": \"Freightrain - easy Ruby desktop
|
256
|
+
development\", \"created_utc\": 1334948579.0, \"ups\": 175, \"num_comments\":
|
257
|
+
32, \"visited\": false, \"num_reports\": null, \"distinguished\": null}}],
|
258
|
+
\"after\": \"t3_sk4qq\", \"before\": null}}"
|
259
|
+
http_version:
|
260
|
+
recorded_at: Wed, 08 Jan 2014 06:49:52 GMT
|
261
|
+
recorded_with: VCR 2.8.0
|
@@ -841,4 +841,834 @@ http_interactions:
|
|
841
841
|
\"after\": \"t3_18abdk\", \"before\": null}}"
|
842
842
|
http_version:
|
843
843
|
recorded_at: Sun, 10 Nov 2013 22:21:31 GMT
|
844
|
-
|
844
|
+
- request:
|
845
|
+
method: get
|
846
|
+
uri: http://www.reddit.com/search.json?after&before&count&limit&q=ruby&restrict_sr&sort&syntax&t
|
847
|
+
body:
|
848
|
+
encoding: US-ASCII
|
849
|
+
string: ''
|
850
|
+
headers:
|
851
|
+
User-Agent:
|
852
|
+
- Faraday v0.8.8
|
853
|
+
Accept-Encoding:
|
854
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
855
|
+
Accept:
|
856
|
+
- "*/*"
|
857
|
+
response:
|
858
|
+
status:
|
859
|
+
code: 200
|
860
|
+
message: OK
|
861
|
+
headers:
|
862
|
+
Content-Type:
|
863
|
+
- application/json; charset=UTF-8
|
864
|
+
X-Frame-Options:
|
865
|
+
- SAMEORIGIN
|
866
|
+
Access-Control-Allow-Origin:
|
867
|
+
- "*"
|
868
|
+
Server:
|
869
|
+
- "'; DROP TABLE servertypes; --"
|
870
|
+
Vary:
|
871
|
+
- accept-encoding
|
872
|
+
Date:
|
873
|
+
- Wed, 08 Jan 2014 06:49:54 GMT
|
874
|
+
Transfer-Encoding:
|
875
|
+
- chunked
|
876
|
+
Connection:
|
877
|
+
- Transfer-Encoding
|
878
|
+
- keep-alive
|
879
|
+
body:
|
880
|
+
encoding: UTF-8
|
881
|
+
string: "{\"kind\": \"Listing\", \"data\": {\"modhash\": \"\", \"children\":
|
882
|
+
[{\"kind\": \"t3\", \"data\": {\"domain\": \"self.IAmA\", \"banned_by\": null,
|
883
|
+
\"media_embed\": {}, \"subreddit\": \"IAmA\", \"selftext_html\": \"<!--
|
884
|
+
SC_OFF --><div class=\\\"md\\\"><p>Verification: <a href=\\\"http://imgur.com/HL2X9\\\">http://imgur.com/HL2X9</a>
|
885
|
+
</p>\\n\\n<p>Twitter: <a href=\\\"http://twitter.com/Ruby_Knox\\\">http://twitter.com/Ruby_Knox</a>
|
886
|
+
</p>\\n\\n<p>Sorry If I&#39;ve missed anyone&#39;s questions!
|
887
|
+
</p>\\n</div><!-- SC_ON -->\", \"selftext\": \"Verification:
|
888
|
+
http://imgur.com/HL2X9 \\n\\nTwitter: http://twitter.com/Ruby_Knox \\n\\nSorry
|
889
|
+
If I've missed anyone's questions! \\n\", \"likes\": null, \"secure_media\":
|
890
|
+
null, \"link_flair_text\": null, \"id\": \"sk79h\", \"secure_media_embed\":
|
891
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"Ruby_Knox\", \"media\":
|
892
|
+
null, \"score\": 260, \"approved_by\": null, \"over_18\": false, \"hidden\":
|
893
|
+
false, \"thumbnail\": \"self\", \"subreddit_id\": \"t5_2qzb6\", \"edited\":
|
894
|
+
true, \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
895
|
+
140, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/IAmA/comments/sk79h/iama_pornstar_camgirl_ruby_knox_ama/\",
|
896
|
+
\"name\": \"t3_sk79h\", \"created\": 1334954774.0, \"url\": \"http://www.reddit.com/r/IAmA/comments/sk79h/iama_pornstar_camgirl_ruby_knox_ama/\",
|
897
|
+
\"author_flair_text\": null, \"title\": \"IAmA pornstar / camgirl - Ruby Knox.
|
898
|
+
AMA\", \"created_utc\": 1334951174.0, \"ups\": 400, \"num_comments\": 684,
|
899
|
+
\"visited\": false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\":
|
900
|
+
\"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null, \"media_embed\":
|
901
|
+
{}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!-- SC_OFF --><div
|
902
|
+
class=\\\"md\\\"><p>Hello <a href=\\\"/r/ruby\\\">/r/ruby</a>
|
903
|
+
</p>\\n\\n<p>I am new to Ruby, however I&#39;ve programmed
|
904
|
+
in C, C++, Java, and C# along with VB.NET, HTML, and minimal Python. </p>\\n\\n<p>I&#39;ve
|
905
|
+
heard that Ruby is a bit different and has quite the steep learning curve.
|
906
|
+
So I ask you...</p>\\n\\n<p>What is the one thing that you wish
|
907
|
+
you knew before starting to learn or really use Ruby?</p>\\n\\n<p>I
|
908
|
+
also plan on using RoR if anyone has thoughts on that as well!</p>\\n\\n<p>Any
|
909
|
+
comments are appreciated! Thanks Guys!</p>\\n</div><!-- SC_ON
|
910
|
+
-->\", \"selftext\": \"Hello /r/ruby \\n\\nI am new to Ruby, however I've
|
911
|
+
programmed in C, C++, Java, and C# along with VB.NET, HTML, and minimal Python.
|
912
|
+
\\n\\nI've heard that Ruby is a bit different and has quite the steep learning
|
913
|
+
curve. So I ask you...\\n\\nWhat is the one thing that you wish you knew before
|
914
|
+
starting to learn or really use Ruby?\\n\\nI also plan on using RoR if anyone
|
915
|
+
has thoughts on that as well!\\n\\nAny comments are appreciated! Thanks Guys!\",
|
916
|
+
\"likes\": null, \"secure_media\": null, \"link_flair_text\": null, \"id\":
|
917
|
+
\"1j9wqw\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
|
918
|
+
false, \"author\": \"ProductiveThings\", \"media\": null, \"score\": 58, \"approved_by\":
|
919
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
920
|
+
\"t5_2qh21\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
921
|
+
null, \"downs\": 8, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1j9wqw/what_is_one_thing_you_wish_you_knew_when_starting/\",
|
922
|
+
\"name\": \"t3_1j9wqw\", \"created\": 1375108691.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1j9wqw/what_is_one_thing_you_wish_you_knew_when_starting/\",
|
923
|
+
\"author_flair_text\": null, \"title\": \"What is one thing you wish you knew
|
924
|
+
when starting Ruby?\", \"created_utc\": 1375105091.0, \"ups\": 66, \"num_comments\":
|
925
|
+
81, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
|
926
|
+
{\"kind\": \"t3\", \"data\": {\"domain\": \"self.HogwartsRP\", \"banned_by\":
|
927
|
+
null, \"media_embed\": {}, \"subreddit\": \"HogwartsRP\", \"selftext_html\":
|
928
|
+
\"<!-- SC_OFF --><div class=\\\"md\\\"><p><em>Isabella,
|
929
|
+
Richard, and Sebastien find a large, deserted classroom on the 4th floor of
|
930
|
+
the castle. They set to work on getting the room ready for Rubys surprise
|
931
|
+
Birthday Party.</em></p>\\n\\n<p><em>Richard changes
|
932
|
+
the walls to a bright scarlet and bronze striped pattern, and drapes a big
|
933
|
+
banner with &#39;HAPPY BIRTHDAY RUBY&#39; across the back wall. He
|
934
|
+
also sets up the piano Ruby likes to play in the corner.</em></p>\\n\\n<p><em>Isabella
|
935
|
+
gets help from the house elves in preparing all the food and drinks, setting
|
936
|
+
them up on a couple tables off to the side of the room. All the typical party
|
937
|
+
foods are there, including Rubys favorite foods. There&#39;s every kind
|
938
|
+
of drink imaginable, along with some.. special punch. Tables and chairs are
|
939
|
+
set up beside it.</em></p>\\n\\n<p><em>Sebastien sets
|
940
|
+
up the music, making it come from an unseeable source. All kinds of music
|
941
|
+
play to suit everyone&#39;s different taste. He also puts the finishing
|
942
|
+
touches in all the decorations, completely transforming the classroom.</em></p>\\n\\n<p><em>They
|
943
|
+
send out invitations to everyone in the castle, and wait for people (including
|
944
|
+
Ruby) to arrive</em></p>\\n\\n<p>OOC: I&#39;m bad at
|
945
|
+
describing but that&#39;s about the jist of it!</p>\\n</div><!--
|
946
|
+
SC_ON -->\", \"selftext\": \"*Isabella, Richard, and Sebastien find a large,
|
947
|
+
deserted classroom on the 4th floor of the castle. They set to work on getting
|
948
|
+
the room ready for Rubys surprise Birthday Party.*\\n\\n*Richard changes the
|
949
|
+
walls to a bright scarlet and bronze striped pattern, and drapes a big banner
|
950
|
+
with 'HAPPY BIRTHDAY RUBY' across the back wall. He also sets up the piano
|
951
|
+
Ruby likes to play in the corner.*\\n\\n*Isabella gets help from the house
|
952
|
+
elves in preparing all the food and drinks, setting them up on a couple tables
|
953
|
+
off to the side of the room. All the typical party foods are there, including
|
954
|
+
Rubys favorite foods. There's every kind of drink imaginable, along with some..
|
955
|
+
special punch. Tables and chairs are set up beside it.*\\n\\n*Sebastien sets
|
956
|
+
up the music, making it come from an unseeable source. All kinds of music
|
957
|
+
play to suit everyone's different taste. He also puts the finishing touches
|
958
|
+
in all the decorations, completely transforming the classroom.*\\n\\n*They
|
959
|
+
send out invitations to everyone in the castle, and wait for people (including
|
960
|
+
Ruby) to arrive*\\n\\nOOC: I'm bad at describing but that's about the jist
|
961
|
+
of it!\", \"likes\": null, \"secure_media\": null, \"link_flair_text\": null,
|
962
|
+
\"id\": \"1r2tk7\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
|
963
|
+
false, \"author\": \"IsabellaBerry\", \"media\": null, \"score\": 2, \"approved_by\":
|
964
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
965
|
+
\"t5_2ygix\", \"edited\": 1384974641.0, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
966
|
+
\"HGR\", \"downs\": 2, \"saved\": false, \"is_self\": true, \"permalink\":
|
967
|
+
\"/r/HogwartsRP/comments/1r2tk7/rubys_birthday_party/\", \"name\": \"t3_1r2tk7\",
|
968
|
+
\"created\": 1384974315.0, \"url\": \"http://www.reddit.com/r/HogwartsRP/comments/1r2tk7/rubys_birthday_party/\",
|
969
|
+
\"author_flair_text\": \"6th year; Prefect \", \"title\": \"Rubys Birthday
|
970
|
+
Party!\", \"created_utc\": 1384974315.0, \"ups\": 4, \"num_comments\": 809,
|
971
|
+
\"visited\": false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\":
|
972
|
+
\"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null, \"media_embed\":
|
973
|
+
{}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!-- SC_OFF --><div
|
974
|
+
class=\\\"md\\\"><p>...and thanks to everyone in <a href=\\\"/r/ruby\\\">/r/ruby</a>,
|
975
|
+
<a href=\\\"/r/rails\\\">/r/rails</a> and <a href=\\\"/r/programming\\\">/r/programming</a>
|
976
|
+
who helped me gain not only the skills but the confidence to make the switch.
|
977
|
+
\ I&#39;ve been a lifelong marketer who always felt unfulfilled and spent
|
978
|
+
nights/weekends/free time learning Ruby, Rails, MySQL, PostgreSQL, jQuery,
|
979
|
+
and more, finally culminating in my first full-time development job. Wish
|
980
|
+
me luck!</p>\\n</div><!-- SC_ON -->\", \"selftext\": \"...and
|
981
|
+
thanks to everyone in /r/ruby, /r/rails and /r/programming who helped me gain
|
982
|
+
not only the skills but the confidence to make the switch. I've been a lifelong
|
983
|
+
marketer who always felt unfulfilled and spent nights/weekends/free time learning
|
984
|
+
Ruby, Rails, MySQL, PostgreSQL, jQuery, and more, finally culminating in my
|
985
|
+
first full-time development job. Wish me luck!\", \"likes\": null, \"secure_media\":
|
986
|
+
null, \"link_flair_text\": null, \"id\": \"1i72ww\", \"secure_media_embed\":
|
987
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"caadbury\", \"media\":
|
988
|
+
null, \"score\": 88, \"approved_by\": null, \"over_18\": false, \"hidden\":
|
989
|
+
false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
|
990
|
+
\"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
991
|
+
21, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1i72ww/on_monday_i_start_a_new_career_as_a_web_developer/\",
|
992
|
+
\"name\": \"t3_1i72ww\", \"created\": 1373686161.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1i72ww/on_monday_i_start_a_new_career_as_a_web_developer/\",
|
993
|
+
\"author_flair_text\": null, \"title\": \"On Monday, I start a new career
|
994
|
+
as a web developer in Ruby on Rails\", \"created_utc\": 1373682561.0, \"ups\":
|
995
|
+
109, \"num_comments\": 49, \"visited\": false, \"num_reports\": null, \"distinguished\":
|
996
|
+
null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\":
|
997
|
+
null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
998
|
+
SC_OFF --><div class=\\\"md\\\"><p>Hello everyone,</p>\\n\\n<p>This
|
999
|
+
is a little framework of mine that I&#39;ve built out of a personal need
|
1000
|
+
- basically, I wanted to write a desktop app using Ruby and I found it daunting
|
1001
|
+
to say the least.</p>\\n\\n<p>So, I&#39;ve built Freightrain
|
1002
|
+
to take care of all the stuff I really shouldn&#39;t care about, like
|
1003
|
+
loading interface definitions, cross-toolkit compatibility and the likes.</p>\\n\\n<p>Now
|
1004
|
+
I&#39;ve been working on it for almost 2 years (on and off of course)
|
1005
|
+
and, since I&#39;ve just fixed it so it loads the newest glade specifications,
|
1006
|
+
I thought that I could ask you guys for an evaluation.</p>\\n\\n<p>There&#39;s
|
1007
|
+
a little readme on the github page and there are some examples in the /examples
|
1008
|
+
folder.</p>\\n\\n<p><a href=\\\"http://github.com/bolthar/freightrain\\\">Link
|
1009
|
+
to the github page!</a></p>\\n\\n<p>WHOA! Thanks for the
|
1010
|
+
attention, I thought this was going to be ignored...</p>\\n\\n<p>How
|
1011
|
+
many of you would be interested in a step by step tutorial over the major
|
1012
|
+
features? I will build that if there&#39;s enough interest.</p>\\n</div><!--
|
1013
|
+
SC_ON -->\", \"selftext\": \"Hello everyone,\\n\\nThis is a little framework
|
1014
|
+
of mine that I've built out of a personal need - basically, I wanted to write
|
1015
|
+
a desktop app using Ruby and I found it daunting to say the least.\\n\\nSo,
|
1016
|
+
I've built Freightrain to take care of all the stuff I really shouldn't care
|
1017
|
+
about, like loading interface definitions, cross-toolkit compatibility and
|
1018
|
+
the likes.\\n\\nNow I've been working on it for almost 2 years (on and off
|
1019
|
+
of course) and, since I've just fixed it so it loads the newest glade specifications,
|
1020
|
+
I thought that I could ask you guys for an evaluation.\\n\\nThere's a little
|
1021
|
+
readme on the github page and there are some examples in the /examples folder.\\n\\n[Link
|
1022
|
+
to the github page!](http://github.com/bolthar/freightrain)\\n\\nWHOA! Thanks
|
1023
|
+
for the attention, I thought this was going to be ignored...\\n\\nHow many
|
1024
|
+
of you would be interested in a step by step tutorial over the major features?
|
1025
|
+
I will build that if there's enough interest.\", \"likes\": null, \"secure_media\":
|
1026
|
+
null, \"link_flair_text\": null, \"id\": \"sk4qq\", \"secure_media_embed\":
|
1027
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"bolthar\", \"media\":
|
1028
|
+
null, \"score\": 163, \"approved_by\": null, \"over_18\": false, \"hidden\":
|
1029
|
+
false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": true,
|
1030
|
+
\"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
1031
|
+
11, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/sk4qq/freightrain_easy_ruby_desktop_development/\",
|
1032
|
+
\"name\": \"t3_sk4qq\", \"created\": 1334952179.0, \"url\": \"http://www.reddit.com/r/ruby/comments/sk4qq/freightrain_easy_ruby_desktop_development/\",
|
1033
|
+
\"author_flair_text\": null, \"title\": \"Freightrain - easy Ruby desktop
|
1034
|
+
development\", \"created_utc\": 1334948579.0, \"ups\": 174, \"num_comments\":
|
1035
|
+
32, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
|
1036
|
+
{\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
|
1037
|
+
\"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
1038
|
+
SC_OFF --><div class=\\\"md\\\"><p>I&#39;m learning Ruby
|
1039
|
+
on codecademy, and intending to learn rails after that. I was told by a dev
|
1040
|
+
friend that both Ruby and Ruby on Rails are outdated and bloated. He reckons
|
1041
|
+
that Javascript is better and more relevant. Is this true? I&#39;ve been
|
1042
|
+
really enjoying learning, is it worthwhile? </p>\\n</div><!--
|
1043
|
+
SC_ON -->\", \"selftext\": \"I'm learning Ruby on codecademy, and intending
|
1044
|
+
to learn rails after that. I was told by a dev friend that both Ruby and Ruby
|
1045
|
+
on Rails are outdated and bloated. He reckons that Javascript is better and
|
1046
|
+
more relevant. Is this true? I've been really enjoying learning, is it worthwhile?
|
1047
|
+
\", \"likes\": null, \"secure_media\": null, \"link_flair_text\": null, \"id\":
|
1048
|
+
\"1uivc3\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
|
1049
|
+
false, \"author\": \"KingPimpCommander\", \"media\": null, \"score\": 24,
|
1050
|
+
\"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
|
1051
|
+
\"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\":
|
1052
|
+
null, \"author_flair_css_class\": null, \"downs\": 15, \"saved\": false, \"is_self\":
|
1053
|
+
true, \"permalink\": \"/r/ruby/comments/1uivc3/is_ruby_outdated/\", \"name\":
|
1054
|
+
\"t3_1uivc3\", \"created\": 1389021421.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1uivc3/is_ruby_outdated/\",
|
1055
|
+
\"author_flair_text\": null, \"title\": \"Is Ruby outdated?\", \"created_utc\":
|
1056
|
+
1388992621.0, \"ups\": 39, \"num_comments\": 86, \"visited\": false, \"num_reports\":
|
1057
|
+
null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
|
1058
|
+
\"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
|
1059
|
+
\"selftext_html\": \"<!-- SC_OFF --><div class=\\\"md\\\"><p>I&#39;ve
|
1060
|
+
been trying to figure this one out in past few days and I&#39;m quite
|
1061
|
+
unable to come up with reasonable answer.</p>\\n\\n<ul>\\n<li>We
|
1062
|
+
have GitHub, most awesomest <em>social network</em> on the internet.</li>\\n<li>We
|
1063
|
+
have RubyGems, centralized libraries for everything.</li>\\n<li>We
|
1064
|
+
have JRuby, for those who want to stick in the Java world or do some real
|
1065
|
+
threading.</li>\\n<li>We have Rails, possibly the best web framework
|
1066
|
+
available (django people please don&#39;t burry me alive)</li>\\n<li>We
|
1067
|
+
have RSpec and Cucumber, which make me cry when I have to work with JUnit.</li>\\n<li>We
|
1068
|
+
have great cloud hosting solutions like Heroku and Engine Yard.</li>\\n<li>We
|
1069
|
+
have huge number of screencasts and tutorials, especially those high quality
|
1070
|
+
ones (Peepcode, Think Vitamin, Railscasts).</li>\\n<li>Last but
|
1071
|
+
not least, we have Ruby, language which is fun to work with, expressive ...
|
1072
|
+
well you know.</li>\\n</ul>\\n\\n<p>The list could go on
|
1073
|
+
and on, so I guess you get my point. </p>\\n\\n<p>My question
|
1074
|
+
is: <strong>What is missing? What do we need, but don&#39;t (yet)
|
1075
|
+
have?</strong></p>\\n</div><!-- SC_ON -->\", \"selftext\":
|
1076
|
+
\"I've been trying to figure this one out in past few days and I'm quite unable
|
1077
|
+
to come up with reasonable answer.\\n\\n* We have GitHub, most awesomest *social
|
1078
|
+
network* on the internet.\\n* We have RubyGems, centralized libraries for
|
1079
|
+
everything.\\n* We have JRuby, for those who want to stick in the Java world
|
1080
|
+
or do some real threading.\\n* We have Rails, possibly the best web framework
|
1081
|
+
available (django people please don't burry me alive)\\n* We have RSpec and
|
1082
|
+
Cucumber, which make me cry when I have to work with JUnit.\\n* We have great
|
1083
|
+
cloud hosting solutions like Heroku and Engine Yard.\\n* We have huge number
|
1084
|
+
of screencasts and tutorials, especially those high quality ones (Peepcode,
|
1085
|
+
Think Vitamin, Railscasts).\\n* Last but not least, we have Ruby, language
|
1086
|
+
which is fun to work with, expressive ... well you know.\\n\\nThe list could
|
1087
|
+
go on and on, so I guess you get my point. \\n\\nMy question is: **What is
|
1088
|
+
missing? What do we need, but don't (yet) have?**\", \"likes\": null, \"secure_media\":
|
1089
|
+
null, \"link_flair_text\": null, \"id\": \"elygz\", \"secure_media_embed\":
|
1090
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"progfu\", \"media\":
|
1091
|
+
null, \"score\": 40, \"approved_by\": null, \"over_18\": false, \"hidden\":
|
1092
|
+
false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
|
1093
|
+
\"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
1094
|
+
11, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/elygz/what_is_the_biggest_current_problem_in_ruby/\",
|
1095
|
+
\"name\": \"t3_elygz\", \"created\": 1292377299.0, \"url\": \"http://www.reddit.com/r/ruby/comments/elygz/what_is_the_biggest_current_problem_in_ruby/\",
|
1096
|
+
\"author_flair_text\": null, \"title\": \"What is the biggest current problem
|
1097
|
+
in Ruby community?\", \"created_utc\": 1292377299.0, \"ups\": 51, \"num_comments\":
|
1098
|
+
134, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
|
1099
|
+
{\"kind\": \"t3\", \"data\": {\"domain\": \"self.leagueoflegends\", \"banned_by\":
|
1100
|
+
null, \"media_embed\": {}, \"subreddit\": \"leagueoflegends\", \"selftext_html\":
|
1101
|
+
\"<!-- SC_OFF --><div class=\\\"md\\\"><p>at the moment
|
1102
|
+
support have zero reason to upgrade to ruby sightstone because you can already
|
1103
|
+
place 3 wards from your regular sightstone </p>\\n\\n<p>this proposed
|
1104
|
+
change would allow supports to gain a slight advantage in terms of vision
|
1105
|
+
control if they invest in it, and would give an actual benefit to upgrading
|
1106
|
+
sightstone outside of overpaying for a small health gain</p>\\n</div><!--
|
1107
|
+
SC_ON -->\", \"selftext\": \"at the moment support have zero reason to
|
1108
|
+
upgrade to ruby sightstone because you can already place 3 wards from your
|
1109
|
+
regular sightstone \\n\\nthis proposed change would allow supports to gain
|
1110
|
+
a slight advantage in terms of vision control if they invest in it, and would
|
1111
|
+
give an actual benefit to upgrading sightstone outside of overpaying for a
|
1112
|
+
small health gain\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
|
1113
|
+
null, \"id\": \"1u4wpg\", \"secure_media_embed\": {}, \"clicked\": false,
|
1114
|
+
\"stickied\": false, \"author\": \"Wafflezlolqt\", \"media\": null, \"score\":
|
1115
|
+
749, \"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
|
1116
|
+
\"self\", \"subreddit_id\": \"t5_2rfxx\", \"edited\": false, \"link_flair_css_class\":
|
1117
|
+
null, \"author_flair_css_class\": \"curse\", \"downs\": 388, \"saved\": false,
|
1118
|
+
\"is_self\": true, \"permalink\": \"/r/leagueoflegends/comments/1u4wpg/why_not_make_it_so_ruby_sightstone_allows_for_a/\",
|
1119
|
+
\"name\": \"t3_1u4wpg\", \"created\": 1388573270.0, \"url\": \"http://www.reddit.com/r/leagueoflegends/comments/1u4wpg/why_not_make_it_so_ruby_sightstone_allows_for_a/\",
|
1120
|
+
\"author_flair_text\": \"\", \"title\": \"Why not make it so ruby sightstone
|
1121
|
+
allows for a 4th sightward to be placed by the user?\", \"created_utc\": 1388544470.0,
|
1122
|
+
\"ups\": 1137, \"num_comments\": 226, \"visited\": false, \"num_reports\":
|
1123
|
+
null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
|
1124
|
+
\"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
|
1125
|
+
\"selftext_html\": \"<!-- SC_OFF --><div class=\\\"md\\\"><p>Whats
|
1126
|
+
the best way to set up Ruby on Rails on OSx -- Newbie, and trying to figure
|
1127
|
+
out how to use Ruby on rails on my macbook </p>\\n</div><!--
|
1128
|
+
SC_ON -->\", \"selftext\": \"Whats the best way to set up Ruby on Rails
|
1129
|
+
on OSx -- Newbie, and trying to figure out how to use Ruby on rails on my
|
1130
|
+
macbook \", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
|
1131
|
+
null, \"id\": \"zm1uu\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
|
1132
|
+
false, \"author\": \"sirisaac87\", \"media\": null, \"score\": 30, \"approved_by\":
|
1133
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
1134
|
+
\"t5_2qh21\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
1135
|
+
null, \"downs\": 5, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/zm1uu/setup_ruby_on_rails_on_osx/\",
|
1136
|
+
\"name\": \"t3_zm1uu\", \"created\": 1347219823.0, \"url\": \"http://www.reddit.com/r/ruby/comments/zm1uu/setup_ruby_on_rails_on_osx/\",
|
1137
|
+
\"author_flair_text\": null, \"title\": \"Setup Ruby on Rails on OSX -- \",
|
1138
|
+
\"created_utc\": 1347216223.0, \"ups\": 35, \"num_comments\": 54, \"visited\":
|
1139
|
+
false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\": \"t3\",
|
1140
|
+
\"data\": {\"domain\": \"self.ruby\", \"banned_by\": null, \"media_embed\":
|
1141
|
+
{}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!-- SC_OFF --><div
|
1142
|
+
class=\\\"md\\\"><p>So jamesgolick was kind enough to make me moderator
|
1143
|
+
of the community. I want to make a promise to you guys that I&#39;ll do
|
1144
|
+
my best to keep it clean.</p>\\n\\n<p>If you have any requests
|
1145
|
+
please let me know (like a valid link for the side navigation).</p>\\n\\n<p>How
|
1146
|
+
do you want to see r/ruby improved? - A contest, guides, removing spam, etc.
|
1147
|
+
Let me know!</p>\\n</div><!-- SC_ON -->\", \"selftext\":
|
1148
|
+
\"So jamesgolick was kind enough to make me moderator of the community. I
|
1149
|
+
want to make a promise to you guys that I'll do my best to keep it clean.\\n\\nIf
|
1150
|
+
you have any requests please let me know (like a valid link for the side navigation).\\n\\nHow
|
1151
|
+
do you want to see r/ruby improved? - A contest, guides, removing spam, etc.
|
1152
|
+
Let me know!\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
|
1153
|
+
null, \"id\": \"g1pia\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
|
1154
|
+
false, \"author\": \"ViralInfection\", \"media\": null, \"score\": 34, \"approved_by\":
|
1155
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
1156
|
+
\"t5_2qh21\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
1157
|
+
null, \"downs\": 9, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/g1pia/hello_rruby_im_your_new_moderator_how_would_you/\",
|
1158
|
+
\"name\": \"t3_g1pia\", \"created\": 1299819313.0, \"url\": \"http://www.reddit.com/r/ruby/comments/g1pia/hello_rruby_im_your_new_moderator_how_would_you/\",
|
1159
|
+
\"author_flair_text\": null, \"title\": \"Hello r/ruby. I'm your new moderator,
|
1160
|
+
how would you improve r/ruby?\", \"created_utc\": 1299819313.0, \"ups\": 43,
|
1161
|
+
\"num_comments\": 53, \"visited\": false, \"num_reports\": null, \"distinguished\":
|
1162
|
+
null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\":
|
1163
|
+
null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
1164
|
+
SC_OFF --><div class=\\\"md\\\"><p>I&#39;m working my way
|
1165
|
+
through Zed&#39;s <em>Learn Ruby the Hard Way</em> and just
|
1166
|
+
completed my first week-long, make-your-own-game section.</p>\\n\\n<p>Here
|
1167
|
+
it is on github (also my first repo):\\n<a href=\\\"https://github.com/demiankz/escapezeta.git\\\">https://github.com/demiankz/escapezeta.git</a></p>\\n\\n<p>I&#39;ve
|
1168
|
+
used most of what I know about ruby to make this game: functions, global variables,
|
1169
|
+
arrays, if/else, .include?, booleans, and a couple other random things. I
|
1170
|
+
have a feeling that there are major flaws in my code (nested if/else and global
|
1171
|
+
variables first among them, I&#39;m sure).</p>\\n\\n<p>I&#39;d
|
1172
|
+
love to hear how an experienced rubyist would improve on my attempt.</p>\\n</div><!--
|
1173
|
+
SC_ON -->\", \"selftext\": \"I'm working my way through Zed's *Learn Ruby
|
1174
|
+
the Hard Way* and just completed my first week-long, make-your-own-game section.\\n\\nHere
|
1175
|
+
it is on github (also my first repo):\\nhttps://github.com/demiankz/escapezeta.git\\n\\nI've
|
1176
|
+
used most of what I know about ruby to make this game: functions, global variables,
|
1177
|
+
arrays, if/else, .include?, booleans, and a couple other random things. I
|
1178
|
+
have a feeling that there are major flaws in my code (nested if/else and global
|
1179
|
+
variables first among them, I'm sure).\\n\\nI'd love to hear how an experienced
|
1180
|
+
rubyist would improve on my attempt.\", \"likes\": null, \"secure_media\":
|
1181
|
+
null, \"link_flair_text\": null, \"id\": \"1eqond\", \"secure_media_embed\":
|
1182
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"demiankz\", \"media\":
|
1183
|
+
null, \"score\": 41, \"approved_by\": null, \"over_18\": false, \"hidden\":
|
1184
|
+
false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
|
1185
|
+
\"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
1186
|
+
2, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1eqond/my_first_ruby_game_what_did_i_do_rightwrong/\",
|
1187
|
+
\"name\": \"t3_1eqond\", \"created\": 1369109135.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1eqond/my_first_ruby_game_what_did_i_do_rightwrong/\",
|
1188
|
+
\"author_flair_text\": null, \"title\": \"My first Ruby game. What did I do
|
1189
|
+
right/wrong?\", \"created_utc\": 1369105535.0, \"ups\": 43, \"num_comments\":
|
1190
|
+
55, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
|
1191
|
+
{\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
|
1192
|
+
\"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
1193
|
+
SC_OFF --><div class=\\\"md\\\"><p>They only kept one guy on
|
1194
|
+
the API team and he&#39;s been there from the beginning. I&#39;ve
|
1195
|
+
done a few rails projects but not enough to consider myself a rails developer
|
1196
|
+
guru. Any jobs for guys with just ruby experience?</p>\\n</div><!--
|
1197
|
+
SC_ON -->\", \"selftext\": \"They only kept one guy on the API team and
|
1198
|
+
he's been there from the beginning. I've done a few rails projects but not
|
1199
|
+
enough to consider myself a rails developer guru. Any jobs for guys with just
|
1200
|
+
ruby experience?\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
|
1201
|
+
null, \"id\": \"1nylih\", \"secure_media_embed\": {}, \"clicked\": false,
|
1202
|
+
\"stickied\": false, \"author\": \"Solnse\", \"media\": null, \"score\": 29,
|
1203
|
+
\"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
|
1204
|
+
\"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\":
|
1205
|
+
null, \"author_flair_css_class\": null, \"downs\": 8, \"saved\": false, \"is_self\":
|
1206
|
+
true, \"permalink\": \"/r/ruby/comments/1nylih/company_downsized_today_i_got_caught_in_the/\",
|
1207
|
+
\"name\": \"t3_1nylih\", \"created\": 1381207667.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1nylih/company_downsized_today_i_got_caught_in_the/\",
|
1208
|
+
\"author_flair_text\": null, \"title\": \"Company downsized today. I got caught
|
1209
|
+
in the layoff spree. Where is the best place for a ruby dev to search for
|
1210
|
+
a stable job?\", \"created_utc\": 1381204067.0, \"ups\": 37, \"num_comments\":
|
1211
|
+
56, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
|
1212
|
+
{\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
|
1213
|
+
\"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
1214
|
+
SC_OFF --><div class=\\\"md\\\"><p>start with straight ruby
|
1215
|
+
or go to rails?\\nI started with HTML/CSS/PHP/javascript with no frameworks
|
1216
|
+
and am wondering if i would be better to start with straight ruby as well.
|
1217
|
+
</p>\\n\\n<p>Thanks all.!!</p>\\n</div><!-- SC_ON
|
1218
|
+
-->\", \"selftext\": \"start with straight ruby or go to rails?\\nI started
|
1219
|
+
with HTML/CSS/PHP/javascript with no frameworks and am wondering if i would
|
1220
|
+
be better to start with straight ruby as well. \\n\\nThanks all.!!\", \"likes\":
|
1221
|
+
null, \"secure_media\": null, \"link_flair_text\": null, \"id\": \"widgp\",
|
1222
|
+
\"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false, \"author\":
|
1223
|
+
\"swiftpants\", \"media\": null, \"score\": 21, \"approved_by\": null, \"over_18\":
|
1224
|
+
false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\",
|
1225
|
+
\"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
1226
|
+
null, \"downs\": 2, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/widgp/newb_to_ruby_should_i/\",
|
1227
|
+
\"name\": \"t3_widgp\", \"created\": 1342206260.0, \"url\": \"http://www.reddit.com/r/ruby/comments/widgp/newb_to_ruby_should_i/\",
|
1228
|
+
\"author_flair_text\": null, \"title\": \"newb to ruby.. should I\", \"created_utc\":
|
1229
|
+
1342202660.0, \"ups\": 23, \"num_comments\": 50, \"visited\": false, \"num_reports\":
|
1230
|
+
null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
|
1231
|
+
\"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
|
1232
|
+
\"selftext_html\": \"<!-- SC_OFF --><div class=\\\"md\\\"><p>This
|
1233
|
+
is a translation of <a href=\\\"http://www.nikkan.co.jp/news/nkx0220110919aaac.html\\\">an
|
1234
|
+
article by \\u65e5\\u520a\\u5de5\\u696d\\u65b0\\u805e (nikkan)</a> which
|
1235
|
+
is a publication dedicated to industry news in Japan.</p>\\n\\n<p>The
|
1236
|
+
Japan based Ruby language is set to become an international standard in 2012
|
1237
|
+
through the International Organization for Standardization (ISO). Ruby was
|
1238
|
+
already standardized through Japanese Industrial Standards (JIS), and the
|
1239
|
+
focus will now be directed towards its recognition in the global community
|
1240
|
+
by becoming an official ISO standard. This would be the first time a programming
|
1241
|
+
language of Japanese origin would become an ISO standard. The nation of Japan
|
1242
|
+
hopes that this will increase its recognition in the primarily western dominated
|
1243
|
+
software field.</p>\\n\\n<p>Ruby was developed by fellow Yukihiro
|
1244
|
+
Matsumoto at the National Applied Communication Laboratory (Matsue city).
|
1245
|
+
Features such as the ability to architect high level applications with ease
|
1246
|
+
has gained Ruby fast popularity around web development both inside and outside
|
1247
|
+
the country.</p>\\n\\n<p>The ISO standardization of Ruby is being
|
1248
|
+
pushed by the Information-technology Promotion Agency (IPA). Domestically
|
1249
|
+
Ruby became a JIS standard (JIS X3017) in March from a proposal by the Ruby
|
1250
|
+
Standardization Study Working Group.</p>\\n</div><!-- SC_ON
|
1251
|
+
-->\", \"selftext\": \"This is a translation of [an article by \\u65e5\\u520a\\u5de5\\u696d\\u65b0\\u805e
|
1252
|
+
(nikkan)](http://www.nikkan.co.jp/news/nkx0220110919aaac.html) which is a
|
1253
|
+
publication dedicated to industry news in Japan.\\n\\n The Japan based Ruby
|
1254
|
+
language is set to become an international standard in 2012 through the International
|
1255
|
+
Organization for Standardization (ISO). Ruby was already standardized through
|
1256
|
+
Japanese Industrial Standards (JIS), and the focus will now be directed towards
|
1257
|
+
its recognition in the global community by becoming an official ISO standard.
|
1258
|
+
This would be the first time a programming language of Japanese origin would
|
1259
|
+
become an ISO standard. The nation of Japan hopes that this will increase
|
1260
|
+
its recognition in the primarily western dominated software field.\\n\\n Ruby
|
1261
|
+
was developed by fellow Yukihiro Matsumoto at the National Applied Communication
|
1262
|
+
Laboratory (Matsue city). Features such as the ability to architect high level
|
1263
|
+
applications with ease has gained Ruby fast popularity around web development
|
1264
|
+
both inside and outside the country.\\n\\n The ISO standardization of Ruby
|
1265
|
+
is being pushed by the Information-technology Promotion Agency (IPA). Domestically
|
1266
|
+
Ruby became a JIS standard (JIS X3017) in March from a proposal by the Ruby
|
1267
|
+
Standardization Study Working Group.\", \"likes\": null, \"secure_media\":
|
1268
|
+
null, \"link_flair_text\": null, \"id\": \"kk5ln\", \"secure_media_embed\":
|
1269
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"cwgem\", \"media\":
|
1270
|
+
null, \"score\": 61, \"approved_by\": null, \"over_18\": false, \"hidden\":
|
1271
|
+
false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
|
1272
|
+
\"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
1273
|
+
2, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/kk5ln/ruby_to_be_the_first_japanese_made_programming/\",
|
1274
|
+
\"name\": \"t3_kk5ln\", \"created\": 1316409512.0, \"url\": \"http://www.reddit.com/r/ruby/comments/kk5ln/ruby_to_be_the_first_japanese_made_programming/\",
|
1275
|
+
\"author_flair_text\": null, \"title\": \"Ruby to be the first Japanese made
|
1276
|
+
programming language to become an international standard sometime next year\",
|
1277
|
+
\"created_utc\": 1316405912.0, \"ups\": 63, \"num_comments\": 10, \"visited\":
|
1278
|
+
false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\": \"t3\",
|
1279
|
+
\"data\": {\"domain\": \"self.ruby\", \"banned_by\": null, \"media_embed\":
|
1280
|
+
{}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!-- SC_OFF --><div
|
1281
|
+
class=\\\"md\\\"><p>I was going through github, and I came across
|
1282
|
+
a simple tictactoe program. It surprised me how clever the programmer was
|
1283
|
+
with blocks and yields and such. I wrote a tictactoe program myself months
|
1284
|
+
ago when I was learning Ruby, and when I compare the two, my code is very
|
1285
|
+
clunky and not at all as elegant as this programmer. </p>\\n\\n<p>And
|
1286
|
+
now I realize that the best way to improve my skills is to read the code of
|
1287
|
+
programmers who are much more advanced than I am. </p>\\n\\n<p>So
|
1288
|
+
I ask, what are some of the best ruby code that you have ever seen?</p>\\n</div><!--
|
1289
|
+
SC_ON -->\", \"selftext\": \"I was going through github, and I came across
|
1290
|
+
a simple tictactoe program. It surprised me how clever the programmer was
|
1291
|
+
with blocks and yields and such. I wrote a tictactoe program myself months
|
1292
|
+
ago when I was learning Ruby, and when I compare the two, my code is very
|
1293
|
+
clunky and not at all as elegant as this programmer. \\n \\nAnd now I
|
1294
|
+
realize that the best way to improve my skills is to read the code of programmers
|
1295
|
+
who are much more advanced than I am. \\n \\nSo I ask, what are some of
|
1296
|
+
the best ruby code that you have ever seen?\", \"likes\": null, \"secure_media\":
|
1297
|
+
null, \"link_flair_text\": null, \"id\": \"1mwg7o\", \"secure_media_embed\":
|
1298
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"hopengrind\", \"media\":
|
1299
|
+
null, \"score\": 57, \"approved_by\": null, \"over_18\": false, \"hidden\":
|
1300
|
+
false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
|
1301
|
+
\"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
1302
|
+
10, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1mwg7o/what_are_some_of_the_best_ruby_programs_youve/\",
|
1303
|
+
\"name\": \"t3_1mwg7o\", \"created\": 1379872130.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1mwg7o/what_are_some_of_the_best_ruby_programs_youve/\",
|
1304
|
+
\"author_flair_text\": null, \"title\": \"What are some of the best ruby programs
|
1305
|
+
you've ever seen?\", \"created_utc\": 1379868530.0, \"ups\": 67, \"num_comments\":
|
1306
|
+
25, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
|
1307
|
+
{\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
|
1308
|
+
\"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
1309
|
+
SC_OFF --><div class=\\\"md\\\"><p>I&#39;m learning ruby
|
1310
|
+
now and looking forward to finding a job doing front end and app development.
|
1311
|
+
\ Thanks!</p>\\n</div><!-- SC_ON -->\", \"selftext\": \"I'm
|
1312
|
+
learning ruby now and looking forward to finding a job doing front end and
|
1313
|
+
app development. Thanks!\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
|
1314
|
+
null, \"id\": \"1kylfv\", \"secure_media_embed\": {}, \"clicked\": false,
|
1315
|
+
\"stickied\": false, \"author\": \"codemonkei\", \"media\": null, \"score\":
|
1316
|
+
29, \"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
|
1317
|
+
\"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": 1377394522.0, \"link_flair_css_class\":
|
1318
|
+
null, \"author_flair_css_class\": null, \"downs\": 6, \"saved\": false, \"is_self\":
|
1319
|
+
true, \"permalink\": \"/r/ruby/comments/1kylfv/what_are_some_good_projects_to_do_with_ruby_to/\",
|
1320
|
+
\"name\": \"t3_1kylfv\", \"created\": 1377289503.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1kylfv/what_are_some_good_projects_to_do_with_ruby_to/\",
|
1321
|
+
\"author_flair_text\": null, \"title\": \"What are some good projects to do
|
1322
|
+
with Ruby to impress employers?\", \"created_utc\": 1377285903.0, \"ups\":
|
1323
|
+
35, \"num_comments\": 43, \"visited\": false, \"num_reports\": null, \"distinguished\":
|
1324
|
+
null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\":
|
1325
|
+
null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
1326
|
+
SC_OFF --><div class=\\\"md\\\"><p>Even I have just only few
|
1327
|
+
experiences of Ruby, I just become aware of there <em>is</em>
|
1328
|
+
<code>for</code> in Ruby (I saw that when I learned Ruby first).
|
1329
|
+
\ Most of Ruby codes seem to use just <code>Enumerable#each</code>
|
1330
|
+
method instead of <code>for</code> statement, but why? Is there
|
1331
|
+
any reason to prefer <code>Enumerable#each</code> method over
|
1332
|
+
<code>for</code> statement?</p>\\n</div><!-- SC_ON
|
1333
|
+
-->\", \"selftext\": \"Even I have just only few experiences of Ruby, I
|
1334
|
+
just become aware of there *is* `for` in Ruby (I saw that when I learned Ruby
|
1335
|
+
first). Most of Ruby codes seem to use just `Enumerable#each` method instead
|
1336
|
+
of `for` statement, but why? Is there any reason to prefer `Enumerable#each`
|
1337
|
+
method over `for` statement?\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
|
1338
|
+
null, \"id\": \"p1l8k\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
|
1339
|
+
false, \"author\": \"hongminhee\", \"media\": null, \"score\": 26, \"approved_by\":
|
1340
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
1341
|
+
\"t5_2qh21\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
1342
|
+
null, \"downs\": 5, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/p1l8k/why_is_there_forstatement_in_ruby/\",
|
1343
|
+
\"name\": \"t3_p1l8k\", \"created\": 1327833555.0, \"url\": \"http://www.reddit.com/r/ruby/comments/p1l8k/why_is_there_forstatement_in_ruby/\",
|
1344
|
+
\"author_flair_text\": null, \"title\": \"Why is there for-statement in Ruby?\",
|
1345
|
+
\"created_utc\": 1327833555.0, \"ups\": 31, \"num_comments\": 35, \"visited\":
|
1346
|
+
false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\": \"t3\",
|
1347
|
+
\"data\": {\"domain\": \"self.ruby\", \"banned_by\": null, \"media_embed\":
|
1348
|
+
{}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!-- SC_OFF --><div
|
1349
|
+
class=\\\"md\\\"><p>The languages are often compared so I am hoping
|
1350
|
+
my knowledge of python will make learning ruby faster. Maybe the best method
|
1351
|
+
is just to read a ruby book and learn from scratch, I am not sure yet how
|
1352
|
+
similar they are. However if anyone has made the switch and knows what a good
|
1353
|
+
starting point would be or if there are resrouces geared toward switching
|
1354
|
+
I would apperciate the advice. Thanks.</p>\\n\\n<p>Edit: I will
|
1355
|
+
be using ruby as a scripting language. Mosly maintaing and updating existing
|
1356
|
+
scripts that put together XML files used for input for other applications
|
1357
|
+
and things like file management and such. So if there are resrouces geared
|
1358
|
+
towards scripting rather than building ruby applications that would be helpful.</p>\\n</div><!--
|
1359
|
+
SC_ON -->\", \"selftext\": \"The languages are often compared so I am hoping
|
1360
|
+
my knowledge of python will make learning ruby faster. Maybe the best method
|
1361
|
+
is just to read a ruby book and learn from scratch, I am not sure yet how
|
1362
|
+
similar they are. However if anyone has made the switch and knows what a good
|
1363
|
+
starting point would be or if there are resrouces geared toward switching
|
1364
|
+
I would apperciate the advice. Thanks.\\n\\nEdit: I will be using ruby as
|
1365
|
+
a scripting language. Mosly maintaing and updating existing scripts that put
|
1366
|
+
together XML files used for input for other applications and things like
|
1367
|
+
file management and such. So if there are resrouces geared towards scripting
|
1368
|
+
rather than building ruby applications that would be helpful.\", \"likes\":
|
1369
|
+
null, \"secure_media\": null, \"link_flair_text\": null, \"id\": \"pgnbp\",
|
1370
|
+
\"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false, \"author\":
|
1371
|
+
\"f4hy\", \"media\": null, \"score\": 16, \"approved_by\": null, \"over_18\":
|
1372
|
+
false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\",
|
1373
|
+
\"edited\": true, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
1374
|
+
null, \"downs\": 6, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/pgnbp/i_am_a_python_programmer_who_needs_to_learn_ruby/\",
|
1375
|
+
\"name\": \"t3_pgnbp\", \"created\": 1328729735.0, \"url\": \"http://www.reddit.com/r/ruby/comments/pgnbp/i_am_a_python_programmer_who_needs_to_learn_ruby/\",
|
1376
|
+
\"author_flair_text\": null, \"title\": \"I am a python programmer who needs
|
1377
|
+
to learn ruby. Any good resources or advice?\", \"created_utc\": 1328729735.0,
|
1378
|
+
\"ups\": 22, \"num_comments\": 55, \"visited\": false, \"num_reports\": null,
|
1379
|
+
\"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\",
|
1380
|
+
\"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\":
|
1381
|
+
\"<!-- SC_OFF --><div class=\\\"md\\\"><p>I can&#39;t
|
1382
|
+
d/l XCode due to my version of OSX. RVM install commands don&#39;t seem
|
1383
|
+
to make sense within my terminal. Do I need git? </p>\\n\\n<p>I
|
1384
|
+
would like to learn Ruby (then Rails) but so far I&#39;m just frustrated.
|
1385
|
+
</p>\\n\\n<p>Thank you for any help you guys can offer.</p>\\n</div><!--
|
1386
|
+
SC_ON -->\", \"selftext\": \"I can't d/l XCode due to my version of OSX.
|
1387
|
+
RVM install commands don't seem to make sense within my terminal. Do I need
|
1388
|
+
git? \\n\\nI would like to learn Ruby (then Rails) but so far I'm just frustrated.
|
1389
|
+
\\n\\nThank you for any help you guys can offer.\", \"likes\": null, \"secure_media\":
|
1390
|
+
null, \"link_flair_text\": null, \"id\": \"rpwze\", \"secure_media_embed\":
|
1391
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"BeauBeauBeau\",
|
1392
|
+
\"media\": null, \"score\": 18, \"approved_by\": null, \"over_18\": false,
|
1393
|
+
\"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\":
|
1394
|
+
false, \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
1395
|
+
3, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/rpwze/installing_ruby_wo_xcode_on_a_mac_or_why_is/\",
|
1396
|
+
\"name\": \"t3_rpwze\", \"created\": 1333397680.0, \"url\": \"http://www.reddit.com/r/ruby/comments/rpwze/installing_ruby_wo_xcode_on_a_mac_or_why_is/\",
|
1397
|
+
\"author_flair_text\": null, \"title\": \"Installing Ruby w/o XCode on a Mac:
|
1398
|
+
or why is installing Ruby such a pain in the ass? [NOOB] \", \"created_utc\":
|
1399
|
+
1333394080.0, \"ups\": 21, \"num_comments\": 53, \"visited\": false, \"num_reports\":
|
1400
|
+
null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
|
1401
|
+
\"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
|
1402
|
+
\"selftext_html\": \"<!-- SC_OFF --><div class=\\\"md\\\"><p>I&#39;m
|
1403
|
+
going through the Ruby Koans right now as part of trying to learn Ruby. I
|
1404
|
+
just finished the about_blocks koan and I really just don&#39;t understand
|
1405
|
+
how the <code>yield</code> keyword works. Example code from the
|
1406
|
+
koan:</p>\\n\\n<pre><code>def many_yields\\n yield(:peanut)\\n
|
1407
|
+
\ yield(:butter)\\n yield(:and)\\n yield(:jelly)\\nend\\n\\ndef test_methods_can_call_yield_many_times\\n
|
1408
|
+
\ result = []\\n many_yields { |item| result &lt;&lt; item }\\n assert_equal
|
1409
|
+
[:peanut, :butter, :and, :jelly], result\\nend\\n</code></pre>\\n\\n<p>I
|
1410
|
+
can see that <code>result</code> is getting all four yielded values
|
1411
|
+
from <code>many_yields</code>, but I don&#39;t really understand
|
1412
|
+
what&#39;s going on. I especially don&#39;t understand the cases where
|
1413
|
+
yield is called without any values. Can somebody explain this keyword to me?</p>\\n</div><!--
|
1414
|
+
SC_ON -->\", \"selftext\": \"I'm going through the Ruby Koans right now
|
1415
|
+
as part of trying to learn Ruby. I just finished the about_blocks koan and
|
1416
|
+
I really just don't understand how the `yield` keyword works. Example code
|
1417
|
+
from the koan:\\n\\n def many_yields\\n yield(:peanut)\\n yield(:butter)\\n
|
1418
|
+
\ yield(:and)\\n yield(:jelly)\\n end\\n\\n def test_methods_can_call_yield_many_times\\n
|
1419
|
+
\ result = []\\n many_yields { |item| result << item }\\n assert_equal
|
1420
|
+
[:peanut, :butter, :and, :jelly], result\\n end\\n\\nI can see that `result`
|
1421
|
+
is getting all four yielded values from `many_yields`, but I don't really
|
1422
|
+
understand what's going on. I especially don't understand the cases where
|
1423
|
+
yield is called without any values. Can somebody explain this keyword to me?\",
|
1424
|
+
\"likes\": null, \"secure_media\": null, \"link_flair_text\": null, \"id\":
|
1425
|
+
\"kvjrw\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false,
|
1426
|
+
\"author\": \"glenbolake\", \"media\": null, \"score\": 45, \"approved_by\":
|
1427
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
1428
|
+
\"t5_2qh21\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
1429
|
+
null, \"downs\": 3, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/kvjrw/ruby_newbie_i_dont_understand_yield/\",
|
1430
|
+
\"name\": \"t3_kvjrw\", \"created\": 1317324898.0, \"url\": \"http://www.reddit.com/r/ruby/comments/kvjrw/ruby_newbie_i_dont_understand_yield/\",
|
1431
|
+
\"author_flair_text\": null, \"title\": \"Ruby newbie - I don't understand
|
1432
|
+
yield\", \"created_utc\": 1317321298.0, \"ups\": 48, \"num_comments\": 36,
|
1433
|
+
\"visited\": false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\":
|
1434
|
+
\"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null, \"media_embed\":
|
1435
|
+
{}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!-- SC_OFF --><div
|
1436
|
+
class=\\\"md\\\"><p>I fundamentally do not understand the perspective
|
1437
|
+
many Rubyists have. I am not saying it anything is bad, I am saying <em>I
|
1438
|
+
do not understand</em>. I just have a different perspective. I don&#39;t
|
1439
|
+
understand why pragmatic people who don&#39;t seem to be early adopters
|
1440
|
+
are leaving a good tool for tools that should only appeal to early adopters.</p>\\n\\n<p>Please,
|
1441
|
+
let me explain my perspective. I have been working primarily with C++ the
|
1442
|
+
past 15, during that time I have dabbled with Java, PHP, Lua, Perl, Pascal,
|
1443
|
+
HTML/CSS, a couple kinds of assembly, C#/VB, others I wish I could forget
|
1444
|
+
and of course plain old C. I keep going back to C++ because I have a strong
|
1445
|
+
proficiency with it. I have the feeling I can make it do anything. I have
|
1446
|
+
made it solve some interesting problems. There are other reasons too, but
|
1447
|
+
this seems like enough to convey where I am coming from. I invested real time
|
1448
|
+
and effort gaining that proficiency, so I will use C++ when practical an invest
|
1449
|
+
more time learning something else when C++ is not practical.</p>\\n\\n<p>I
|
1450
|
+
see a ton of Rubyists talking about Elixir and Node.js as somekind of wholesale
|
1451
|
+
replacement for Ruby. I understand that the two newer systems provide interesting
|
1452
|
+
interactions with threading systems. That does not seem like a reason to dump
|
1453
|
+
a whole language, a language with multiple independent healthy implementations
|
1454
|
+
(jRuby, Rubunius, Maglev, etc...), particularly when some of them have fixed
|
1455
|
+
threading performance. </p>\\n\\n<p>Or maybe I am missing the
|
1456
|
+
point, maybe this is just about jumping to some popular new toy now that us
|
1457
|
+
old fogeys are onto Ruby? Of course not, all the people I read about in blogs
|
1458
|
+
and watch in talks at the countless Ruby conferences seem like pragmatic people
|
1459
|
+
interested in getting stuff done. Ruby seems like an excellent tool for getting
|
1460
|
+
stuff done. It is extremely easy to express complex ideas quickly. It has
|
1461
|
+
an excellent system for handling libraries. It has access to awesome performance
|
1462
|
+
via its C-API. If C is not your thing, It is mature enough that it is getting
|
1463
|
+
performance optimizations with every new release (of MRI/Yarv at least). These
|
1464
|
+
people invested significant time and effort learning Ruby, will their pragmatism
|
1465
|
+
just let them throw that away?</p>\\n\\n<p>Perhaps my perspective
|
1466
|
+
is wrong and no-one is leaving Ruby? But it seems every other conference talk
|
1467
|
+
someone mentions Elixir while spitting Ruby&#39;s name.</p>\\n\\n<p>Perhaps,
|
1468
|
+
There is something to Elixir/Node I have completely missed? I read their docs
|
1469
|
+
and perused their libraries. They are missing features (and sometimes stability)
|
1470
|
+
like tools only a few years old would.</p>\\n\\n<p>Why leave Ruby?</p>\\n</div><!--
|
1471
|
+
SC_ON -->\", \"selftext\": \"I fundamentally do not understand the perspective
|
1472
|
+
many Rubyists have. I am not saying it anything is bad, I am saying *I do
|
1473
|
+
not understand*. I just have a different perspective. I don't understand why
|
1474
|
+
pragmatic people who don't seem to be early adopters are leaving a good tool
|
1475
|
+
for tools that should only appeal to early adopters.\\n\\nPlease, let me explain
|
1476
|
+
my perspective. I have been working primarily with C++ the past 15, during
|
1477
|
+
that time I have dabbled with Java, PHP, Lua, Perl, Pascal, HTML/CSS, a couple
|
1478
|
+
kinds of assembly, C#/VB, others I wish I could forget and of course plain
|
1479
|
+
old C. I keep going back to C++ because I have a strong proficiency with it.
|
1480
|
+
I have the feeling I can make it do anything. I have made it solve some interesting
|
1481
|
+
problems. There are other reasons too, but this seems like enough to convey
|
1482
|
+
where I am coming from. I invested real time and effort gaining that proficiency,
|
1483
|
+
so I will use C++ when practical an invest more time learning something else
|
1484
|
+
when C++ is not practical.\\n\\nI see a ton of Rubyists talking about Elixir
|
1485
|
+
and Node.js as somekind of wholesale replacement for Ruby. I understand that
|
1486
|
+
the two newer systems provide interesting interactions with threading systems.
|
1487
|
+
That does not seem like a reason to dump a whole language, a language with
|
1488
|
+
multiple independent healthy implementations (jRuby, Rubunius, Maglev, etc...),
|
1489
|
+
particularly when some of them have fixed threading performance. \\n\\nOr
|
1490
|
+
maybe I am missing the point, maybe this is just about jumping to some popular
|
1491
|
+
new toy now that us old fogeys are onto Ruby? Of course not, all the people
|
1492
|
+
I read about in blogs and watch in talks at the countless Ruby conferences
|
1493
|
+
seem like pragmatic people interested in getting stuff done. Ruby seems like
|
1494
|
+
an excellent tool for getting stuff done. It is extremely easy to express
|
1495
|
+
complex ideas quickly. It has an excellent system for handling libraries.
|
1496
|
+
It has access to awesome performance via its C-API. If C is not your thing,
|
1497
|
+
It is mature enough that it is getting performance optimizations with every
|
1498
|
+
new release (of MRI/Yarv at least). These people invested significant time
|
1499
|
+
and effort learning Ruby, will their pragmatism just let them throw that away?\\n\\nPerhaps
|
1500
|
+
my perspective is wrong and no-one is leaving Ruby? But it seems every other
|
1501
|
+
conference talk someone mentions Elixir while spitting Ruby's name.\\n\\nPerhaps,
|
1502
|
+
There is something to Elixir/Node I have completely missed? I read their docs
|
1503
|
+
and perused their libraries. They are missing features (and sometimes stability)
|
1504
|
+
like tools only a few years old would.\\n\\nWhy leave Ruby?\", \"likes\":
|
1505
|
+
null, \"secure_media\": null, \"link_flair_text\": null, \"id\": \"1o6srn\",
|
1506
|
+
\"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false, \"author\":
|
1507
|
+
\"Sqeaky\", \"media\": null, \"score\": 37, \"approved_by\": null, \"over_18\":
|
1508
|
+
false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\",
|
1509
|
+
\"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
1510
|
+
null, \"downs\": 14, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1o6srn/why_elixir_why_nodejs_coming_from_c_ruby_seems/\",
|
1511
|
+
\"name\": \"t3_1o6srn\", \"created\": 1381457829.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1o6srn/why_elixir_why_nodejs_coming_from_c_ruby_seems/\",
|
1512
|
+
\"author_flair_text\": null, \"title\": \"Why Elixir? Why Node.js? Coming
|
1513
|
+
from C++, Ruby seems like a fine language.\", \"created_utc\": 1381454229.0,
|
1514
|
+
\"ups\": 51, \"num_comments\": 46, \"visited\": false, \"num_reports\": null,
|
1515
|
+
\"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.IAmA\",
|
1516
|
+
\"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"IAmA\", \"selftext_html\":
|
1517
|
+
\"<!-- SC_OFF --><div class=\\\"md\\\"><p>Hi Reddit! </p>\\n\\n<p>I&#39;m
|
1518
|
+
Annie. I report on economic policy -- taxes, the economy, Treasury, the IMF,
|
1519
|
+
etc. -- from the D.C. bureau of the New York Times.</p>\\n\\n<p>Until
|
1520
|
+
October, though, I was the Moneybox columnist for Slate. </p>\\n\\n<p>My
|
1521
|
+
last piece for Slate just went up. It&#39;s a big story on how I started
|
1522
|
+
to learn to program in Ruby, and about _why, a legend in the Ruby community
|
1523
|
+
who disappeared two years ago. </p>\\n\\n<p>You can read it here:
|
1524
|
+
<a href=\\\"http://www.slate.com/articles/technology/technology/2012/03/ruby_ruby_on_rails_and__why_the_disappearance_of_one_of_the_world_s_most_beloved_computer_programmers_.html\\\">http://www.slate.com/articles/technology/technology/2012/03/ruby_ruby_on_rails_and__why_the_disappearance_of_one_of_the_world_s_most_beloved_computer_programmers_.html</a></p>\\n\\n<p>You
|
1525
|
+
can read all my Times stuff here: <a href=\\\"http://topics.nytimes.com/top/reference/timestopics/people/l/annie_lowrey/index.html?inline=nyt-per\\\">http://topics.nytimes.com/top/reference/timestopics/people/l/annie_lowrey/index.html?inline=nyt-per</a></p>\\n\\n<p>And
|
1526
|
+
all my Slate stuff here: <a href=\\\"http://www.slate.com/authors.annie_lowrey.html\\\">http://www.slate.com/authors.annie_lowrey.html</a></p>\\n\\n<p>And
|
1527
|
+
you can follow me here: <a href=\\\"https://twitter.com/#!/annielowrey\\\">https://twitter.com/#!/annielowrey</a></p>\\n\\n<p>Ask
|
1528
|
+
me anything! </p>\\n</div><!-- SC_ON -->\", \"selftext\":
|
1529
|
+
\"Hi Reddit! \\n\\nI'm Annie. I report on economic policy -- taxes, the economy,
|
1530
|
+
Treasury, the IMF, etc. -- from the D.C. bureau of the New York Times.\\n\\nUntil
|
1531
|
+
October, though, I was the Moneybox columnist for Slate. \\n\\nMy last piece
|
1532
|
+
for Slate just went up. It's a big story on how I started to learn to program
|
1533
|
+
in Ruby, and about _why, a legend in the Ruby community who disappeared two
|
1534
|
+
years ago. \\n\\nYou can read it here: http://www.slate.com/articles/technology/technology/2012/03/ruby_ruby_on_rails_and__why_the_disappearance_of_one_of_the_world_s_most_beloved_computer_programmers_.html\\n\\nYou
|
1535
|
+
can read all my Times stuff here: http://topics.nytimes.com/top/reference/timestopics/people/l/annie_lowrey/index.html?inline=nyt-per\\n\\nAnd
|
1536
|
+
all my Slate stuff here: http://www.slate.com/authors.annie_lowrey.html\\n\\nAnd
|
1537
|
+
you can follow me here: https://twitter.com/#!/annielowrey\\n\\nAsk me anything!
|
1538
|
+
\", \"likes\": null, \"secure_media\": null, \"link_flair_text\": null, \"id\":
|
1539
|
+
\"qzkdt\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false,
|
1540
|
+
\"author\": \"AnnieLowrey\", \"media\": null, \"score\": 141, \"approved_by\":
|
1541
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"self\", \"subreddit_id\":
|
1542
|
+
\"t5_2qzb6\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
1543
|
+
null, \"downs\": 95, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/IAmA/comments/qzkdt/im_annie_lowrey_an_economic_policy_reporter_for/\",
|
1544
|
+
\"name\": \"t3_qzkdt\", \"created\": 1331919796.0, \"url\": \"http://www.reddit.com/r/IAmA/comments/qzkdt/im_annie_lowrey_an_economic_policy_reporter_for/\",
|
1545
|
+
\"author_flair_text\": null, \"title\": \"I'm Annie Lowrey, an economic policy
|
1546
|
+
reporter for the New York Times and the author of the big Slate article on
|
1547
|
+
Ruby and _why.\", \"created_utc\": 1331916196.0, \"ups\": 236, \"num_comments\":
|
1548
|
+
213, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
|
1549
|
+
{\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
|
1550
|
+
\"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"<!--
|
1551
|
+
SC_OFF --><div class=\\\"md\\\"><p>I would really like to start
|
1552
|
+
a study group for Ruby on Rails for this book <a href=\\\"http://ruby.railstutorial.org/ruby-on-rails-tutorial-book\\\">http://ruby.railstutorial.org/ruby-on-rails-tutorial-book</a>
|
1553
|
+
(if you have better suggestions please let me know) I have just finished the
|
1554
|
+
CodeCademy course for Ruby so I think I have a decent grasp on the Ruby language.
|
1555
|
+
It would be nice if we could have a couple people who are experienced with
|
1556
|
+
Rails help guide us through. I plan on hosting it on my website under the
|
1557
|
+
Ruby on Rails subforum so we can keep all our stuff uncluttered, my website
|
1558
|
+
is called milesftp.com(sorry for the odd name my friend had the domain registered
|
1559
|
+
and so we decided to use it for now). If you guys are interested please let
|
1560
|
+
me know and we will figure something&#39;s out! Thanks. </p>\\n</div><!--
|
1561
|
+
SC_ON -->\", \"selftext\": \"I would really like to start a study group
|
1562
|
+
for Ruby on Rails for this book http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
|
1563
|
+
(if you have better suggestions please let me know) I have just finished the
|
1564
|
+
CodeCademy course for Ruby so I think I have a decent grasp on the Ruby language.
|
1565
|
+
It would be nice if we could have a couple people who are experienced with
|
1566
|
+
Rails help guide us through. I plan on hosting it on my website under the
|
1567
|
+
Ruby on Rails subforum so we can keep all our stuff uncluttered, my website
|
1568
|
+
is called milesftp.com(sorry for the odd name my friend had the domain registered
|
1569
|
+
and so we decided to use it for now). If you guys are interested please let
|
1570
|
+
me know and we will figure something's out! Thanks. \", \"likes\": null, \"secure_media\":
|
1571
|
+
null, \"link_flair_text\": null, \"id\": \"1n9e40\", \"secure_media_embed\":
|
1572
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"valorvision\",
|
1573
|
+
\"media\": null, \"score\": 20, \"approved_by\": null, \"over_18\": false,
|
1574
|
+
\"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\":
|
1575
|
+
false, \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
1576
|
+
8, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1n9e40/creating_a_ruby_on_rails_study_group_please_let/\",
|
1577
|
+
\"name\": \"t3_1n9e40\", \"created\": 1380306666.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1n9e40/creating_a_ruby_on_rails_study_group_please_let/\",
|
1578
|
+
\"author_flair_text\": null, \"title\": \"Creating A Ruby on Rails Study Group,
|
1579
|
+
please let me know if you're interested.\", \"created_utc\": 1380303066.0,
|
1580
|
+
\"ups\": 28, \"num_comments\": 40, \"visited\": false, \"num_reports\": null,
|
1581
|
+
\"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\",
|
1582
|
+
\"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\":
|
1583
|
+
\"<!-- SC_OFF --><div class=\\\"md\\\"><p>Hi there,</p>\\n\\n<p>I
|
1584
|
+
started learning Ruby a few months ago and I bought myself a Microsoft Kinect
|
1585
|
+
Cam as an early X-Mas gift. Of course I&#39;m using Linux (yes your OS-X
|
1586
|
+
is fine too) and don&#39;t even own an X-Box 360 ... so I started the
|
1587
|
+
hacking.</p>\\n\\n<p>After a short time of fiddling with C, I
|
1588
|
+
remembered how much it tends to get on my nerves and how much I love Ruby,
|
1589
|
+
so I thought &quot;<strong>Why not write some Kinect stuff with
|
1590
|
+
Ruby?!</strong>&quot;. After a bit of googling I found exactly no
|
1591
|
+
other projects except</p>\\n\\n<p>---- <a href=\\\"http://openkinect.org/wiki/Ruby_Wrapper#Sample_Code\\\">this
|
1592
|
+
one</a> ----</p>\\n\\n<p>which was empty and so I decided
|
1593
|
+
to <strong>post my first code snippet there</strong>.</p>\\n\\n<p>Sadly
|
1594
|
+
nobody reacted so I have to assume that this project is dead. But what about
|
1595
|
+
you? <em>Anyone interested in bringing some of the Kinect functionality
|
1596
|
+
to Ruby?</em></p>\\n\\n<p><strong>What <del>I</del>
|
1597
|
+
we managed to do:</strong></p>\\n\\n<ul>\\n<li>Control
|
1598
|
+
the Kinects motor</li>\\n<li>Control the Kinects LED</li>\\n<li>Get
|
1599
|
+
accelerometer data</li>\\n</ul>\\n\\n<p><strong>What
|
1600
|
+
is missing (tried but failed):</strong></p>\\n\\n<ul>\\n<li>Get
|
1601
|
+
an image from the RGB cam</li>\\n<li>Get an image from the depth
|
1602
|
+
cam</li>\\n<li><del>Get accelerometer data</del></li>\\n</ul>\\n\\n<p><strong>TL;DR:</strong>
|
1603
|
+
Started to develop a pure Ruby Kinect driver. Who wants to help?</p>\\n\\n<p>PS:
|
1604
|
+
I&#39;m not interested in libfreenect wrappers, I want to create a pure
|
1605
|
+
Ruby driver. (only with libusb i.e.)</p>\\n\\n<p><strong>EDIT:
|
1606
|
+
I&#39;ve put what I got so far on GitHub: <a href=\\\"https://github.com/pachacamac/rinect\\\">see
|
1607
|
+
here</a></strong></p>\\n</div><!-- SC_ON -->\",
|
1608
|
+
\"selftext\": \"Hi there,\\n\\nI started learning Ruby a few months ago and
|
1609
|
+
I bought myself a Microsoft Kinect Cam as an early X-Mas gift. Of course I'm
|
1610
|
+
using Linux (yes your OS-X is fine too) and don't even own an X-Box 360 ...
|
1611
|
+
so I started the hacking.\\n\\nAfter a short time of fiddling with C, I remembered
|
1612
|
+
how much it tends to get on my nerves and how much I love Ruby, so I thought
|
1613
|
+
\\\"**Why not write some Kinect stuff with Ruby?!**\\\". After a bit of googling
|
1614
|
+
I found exactly no other projects except\\n\\n---- [this one](http://openkinect.org/wiki/Ruby_Wrapper#Sample_Code)
|
1615
|
+
----\\n\\nwhich was empty and so I decided to **post my first code snippet
|
1616
|
+
there**.\\n\\nSadly nobody reacted so I have to assume that this project is
|
1617
|
+
dead. But what about you? *Anyone interested in bringing some of the Kinect
|
1618
|
+
functionality to Ruby?*\\n\\n\\n**What ~~I~~ we managed to do:**\\n\\n * Control
|
1619
|
+
the Kinects motor\\n * Control the Kinects LED\\n * Get accelerometer data\\n\\n**What
|
1620
|
+
is missing (tried but failed):**\\n\\n * Get an image from the RGB cam\\n
|
1621
|
+
* Get an image from the depth cam\\n * ~~Get accelerometer data~~\\n\\n\\n\\n**TL;DR:**
|
1622
|
+
Started to develop a pure Ruby Kinect driver. Who wants to help?\\n\\nPS:
|
1623
|
+
I'm not interested in libfreenect wrappers, I want to create a pure Ruby driver.
|
1624
|
+
(only with libusb i.e.)\\n\\n\\n**EDIT: I've put what I got so far on GitHub:
|
1625
|
+
[see here](https://github.com/pachacamac/rinect)**\", \"likes\": null, \"secure_media\":
|
1626
|
+
null, \"link_flair_text\": null, \"id\": \"euka7\", \"secure_media_embed\":
|
1627
|
+
{}, \"clicked\": false, \"stickied\": false, \"author\": \"nexe\", \"media\":
|
1628
|
+
null, \"score\": 29, \"approved_by\": null, \"over_18\": false, \"hidden\":
|
1629
|
+
false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": true,
|
1630
|
+
\"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
|
1631
|
+
6, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/euka7/ruby_kinect_project/\",
|
1632
|
+
\"name\": \"t3_euka7\", \"created\": 1293897993.0, \"url\": \"http://www.reddit.com/r/ruby/comments/euka7/ruby_kinect_project/\",
|
1633
|
+
\"author_flair_text\": null, \"title\": \"Ruby Kinect Project\", \"created_utc\":
|
1634
|
+
1293897993.0, \"ups\": 35, \"num_comments\": 36, \"visited\": false, \"num_reports\":
|
1635
|
+
null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
|
1636
|
+
\"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
|
1637
|
+
\"selftext_html\": \"<!-- SC_OFF --><div class=\\\"md\\\"><p>Dynamic
|
1638
|
+
getters and setters in Perl:</p>\\n\\n<pre><code>sub AUTOLOAD
|
1639
|
+
{\\n my @elements = qw(color age weight height);\\n\\n our $AUTOLOAD;\\n
|
1640
|
+
\ if ($AUTOLOAD =~ /::(\\\\w+)$/ and grep $1 eq $_, @elements) {\\n my
|
1641
|
+
$field = ucfirst $1;\\n {\\n no strict &#39;refs&#39;;\\n
|
1642
|
+
\ *{$AUTOLOAD} = sub { $_[0]-&gt;{$field} };\\n }\\n goto &amp;{$AUTOLOAD};\\n
|
1643
|
+
\ } elsif ($AUTOLOAD =~ /::set_(\\\\w+)$/ and grep $1 eq $_, @elements) {\\n
|
1644
|
+
\ my $field = ucfirst $1;\\n {\\n no strict &#39;refs&#39;;\\n
|
1645
|
+
\ *{$AUTOLOAD} = sub { $_[0]-&gt;{$field} = $_[1] };\\n }\\n goto
|
1646
|
+
&amp;{$AUTOLOAD};\\n } else {\\n croak &quot;$_[0] does not understand
|
1647
|
+
this method\\\\n&quot;;\\n }\\n}\\n</code></pre>\\n\\n<p>In
|
1648
|
+
Ruby:</p>\\n\\n<pre><code>attr_accessor :color, :age, :weight,
|
1649
|
+
:height\\n</code></pre>\\n\\n<p>Yeah.</p>\\n</div><!--
|
1650
|
+
SC_ON -->\", \"selftext\": \"Dynamic getters and setters in Perl:\\n\\n
|
1651
|
+
\ sub AUTOLOAD {\\n my @elements = qw(color age weight height);\\n
|
1652
|
+
\ \\n our $AUTOLOAD;\\n if ($AUTOLOAD =~ /::(\\\\w+)$/ and grep
|
1653
|
+
$1 eq $_, @elements) {\\n my $field = ucfirst $1;\\n {\\n no
|
1654
|
+
strict 'refs';\\n *{$AUTOLOAD} = sub { $_[0]->{$field} };\\n }\\n
|
1655
|
+
\ goto &{$AUTOLOAD};\\n } elsif ($AUTOLOAD =~ /::set_(\\\\w+)$/
|
1656
|
+
and grep $1 eq $_, @elements) {\\n my $field = ucfirst $1;\\n {\\n
|
1657
|
+
\ no strict 'refs';\\n *{$AUTOLOAD} = sub { $_[0]->{$field}
|
1658
|
+
= $_[1] };\\n }\\n goto &{$AUTOLOAD};\\n } else {\\n
|
1659
|
+
\ croak \\\"$_[0] does not understand this method\\\\n\\\";\\n }\\n
|
1660
|
+
\ }\\n\\nIn Ruby:\\n\\n attr_accessor :color, :age, :weight, :height\\n\\nYeah.\",
|
1661
|
+
\"likes\": null, \"secure_media\": null, \"link_flair_text\": null, \"id\":
|
1662
|
+
\"e4upb\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false,
|
1663
|
+
\"author\": \"Perceptes\", \"media\": null, \"score\": 36, \"approved_by\":
|
1664
|
+
null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
|
1665
|
+
\"t5_2qh21\", \"edited\": true, \"link_flair_css_class\": null, \"author_flair_css_class\":
|
1666
|
+
null, \"downs\": 11, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/e4upb/learning_perl_is_making_me_appreciate_ruby_even/\",
|
1667
|
+
\"name\": \"t3_e4upb\", \"created\": 1289518955.0, \"url\": \"http://www.reddit.com/r/ruby/comments/e4upb/learning_perl_is_making_me_appreciate_ruby_even/\",
|
1668
|
+
\"author_flair_text\": null, \"title\": \"Learning Perl is making me appreciate
|
1669
|
+
Ruby even more\", \"created_utc\": 1289518955.0, \"ups\": 47, \"num_comments\":
|
1670
|
+
44, \"visited\": false, \"num_reports\": null, \"distinguished\": null}}],
|
1671
|
+
\"after\": \"t3_e4upb\", \"before\": null}}"
|
1672
|
+
http_version:
|
1673
|
+
recorded_at: Wed, 08 Jan 2014 06:49:54 GMT
|
1674
|
+
recorded_with: VCR 2.8.0
|