#ruby - 19 March 2017
« Back 1 day Forward 1 day »
[01:52:00] knight33: I'm trying to learn Ruby right now, and am finding myself sorta stuck knowing the basics, but needing more practice, and not sure where to progress from here. Any suggestions? Do I need to do more problems, if so, from where? Am I suppose to be building apps?
[01:57:01] elomatreb: knight33: Building something is of course the best way to practice, if you have an idea for something you should try
[02:00:10] elomatreb: If you're after practice, remember that it neither has to be the most complicated thing nor an original idea. It's perfectly valid to reimplement something existing
[02:31:09] HippoDippo: where is a good place for me to paste some code, so i can share it with anyone who can help me. Github's gist?
[02:48:36] HippoDippo: anyone tell me why i am getting a syntax error, "unexpected keyword_end" ? here is the code: https://gist.github.com/anonymous/6907123fd218e4bee57645c4ff9e68ae
[02:50:35] ChickeNES: Anyone know of a library for parsing ruby that's not itself in ruby? I wanted to experiment with writing my own ruby implementation but would love to skip writing the parser portion if possible. I've tried google but all I've found so far has been libraries for writing parsers in ruby, or ruby parsers also written in ruby.
[02:50:52] elomatreb: HippoDippo: There is no ++/-- in Ruby, it tries to make a binary + out of it and hits the end
[03:09:20] ruby[bot]: elomatreb: # => /tmp/execpad-3313fe7a74a8/source-3313fe7a74a8:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/756905)
[03:09:43] ruby[bot]: elomatreb: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `' for nil:NilClass
[03:10:17] ruby[bot]: prometheanfire: # => uninitialized constant List (NameError) ...check link for more (https://eval.in/756906)
[03:10:25] elomatreb: Anyway, `cmd` seems to be an array. If you want to add an element to it, use << instead
[03:10:29] ruby[bot]: prometheanfire: # => undefined method `+' for Array:Class (NoMethodError) ...check link for more (https://eval.in/756908)
[03:22:10] elomatreb: HippoDippo: Normally it would (try to, if the website would work ._.) execute that code and print the result, but you need to be authed with NickServ for it to accept your input
[03:23:48] HippoDippo: elomatreb: Ohh i see. I just thought i would give it a shot because i noticed it in your prev convo
[03:29:22] prometheanfire: elomatreb: working now, just needs tests :D https://github.com/prometheanfire/puppet/commit/d1b2c89f4c6c048c9b827d3c7d4f7f9049d61034
[08:32:39] Joufflu: So I started playing with "each_with_index" for a school assignment and this is what I have: https://repl.it/GX66/3 ...right now I can transform the 0's into 1s at the specified index; just wondering how I can do something similar but with a nested array i.e. r = [[0,1,0][0,1,0][0,1,0]]
[12:38:45] irc2000: Problem is.. now.. that you can build up the infrastructure just to have some dictator to take it over or some gypsies tearing it down so that they can sell the copper
[17:08:19] Zequal: Hey guys, what is your preferred method of installing Ruby on Ubuntu? (16.04, if that matters) RBENV or RVM, thoughts?
[17:12:44] havenwood: Zequal: For dev, ruby-install + chruby: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
[17:13:41] havenwood: Zequal: For prod, consider a Brightbox-maintained Ruby package: https://www.brightbox.com/docs/ruby/ubuntu/
[17:14:25] havenwood: Zequal: Or you can `sudo ruby-install --latest --system ruby` to install a single Ruby to /usr/local on your server.
[17:14:51] havenwood: Zequal: The conventional wisdom is that you don't need to switch Rubies on a server so you don't need a Ruby version switcher.
[19:59:35] ruby[bot]: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[20:00:18] irc2000: I hate humanity. We're not all working for the greater good but often for the greater bad
[20:01:51] irc2000: instead of researching actual human enhancement, we scam sick people with fake medicines
[20:12:05] ruby[bot]: +bbbb $a:irc2000$#ruby-banned irc3k!*@*$#ruby-banned irc2000!*@*$#ruby-banned *!*@gateway/tor-sasl/irc2000$#ruby-banned
[20:12:05] ruby[bot]: ruby[bot] kicked irc2000: offense, see http://ruby-community.com/pages/user_rules