« Back to channel list

#ruby - 14 February 2016

« Back 1 day Forward 1 day »
[00:00:27] edwinvdgraaf: has joined #ruby
[00:00:39] finisherr: has joined #ruby
[00:00:59] diegoviola: has joined #ruby
[00:01:57] edwinvdgraaf: has joined #ruby
[00:01:58] hinbody: has joined #ruby
[00:02:31] einarj: has joined #ruby
[00:05:17] sneakerhax: has joined #ruby
[00:08:07] felipe: has joined #ruby
[00:08:20] wolffles: please explain why my code doesnt work :[ https://eval.in/518367
[00:08:50] jhass: >> ary = []; ary[134]
[00:08:51] ruby[bot]: jhass: # => nil (https://eval.in/518368)
[00:08:53] jhass: that's why
[00:08:54] bronson: has joined #ruby
[00:09:26] karapetyan: has joined #ruby
[00:09:47] jhass: no idea why you do that ary stuff at all
[00:10:01] wolffles: well its the only way i can think of
[00:10:02] felipe: Hi folks, I'm a begginer in ruby programming, have some experience with java. Any material recommendations? (books or something else)
[00:11:04] felipe: Oh thxs wolffles
[00:11:10] adaedra: ?links felipe
[00:11:10] ruby[bot]: felipe: http://ruby-community.com/pages/links
[00:11:26] rht: has joined #ruby
[00:11:39] jhass: wolffles: https://eval.in/518370
[00:11:49] adaedra: apeiros: the footer of this page could be updated to something like "do a PR here" or something?
[00:11:51] zast: has joined #ruby
[00:12:01] Ox0dea: wolffles: The Y in "system" is a vowel.
[00:12:05] Ox0dea: Just sayin'.
[00:12:22] apeiros: adaedra: "fork me on github" not good enough?
[00:12:39] wolffles: its an exception on the ???guidelines???
[00:12:43] adaedra: apeiros: I'm talking about the existing message
[00:13:10] adaedra: I forgot the corner thing is here, I tend to ignore them as I found them stupid, but that's my opinion
[00:13:28] apeiros: oh, right. there's one. though iirc I wanted to add a way to submit suggestions directly.
[00:13:34] Ox0dea: Who's jheg?
[00:13:53] adaedra: Because the message looks _a bit_ outdated.
[00:14:55] nettoweb: has joined #ruby
[00:15:39] akem: has left #ruby: ("Leaving")
[00:16:11] user083: has joined #ruby
[00:17:11] benlieb: has joined #ruby
[00:19:40] DylanJ: has joined #ruby
[00:21:20] ereslibre: has joined #ruby
[00:21:20] ereslibre: has joined #ruby
[00:22:00] blt: has joined #ruby
[00:24:49] cajone: has joined #ruby
[00:27:15] duncannz: has joined #ruby
[00:27:59] DylanJ: has joined #ruby
[00:29:50] yatish27: has joined #ruby
[00:31:56] sauvin: has joined #ruby
[00:31:58] sauvin: has joined #ruby
[00:33:03] sauvin: has joined #ruby
[00:36:09] s2013: has joined #ruby
[00:36:24] ruby[bot]: -qqq $a:gr33n7007h al2o3-cr!*@* *!*@unaffiliated/gr33n7007h
[00:43:34] blackmesa: has joined #ruby
[00:44:07] dlitvak: has joined #ruby
[00:50:31] r4z3r: has joined #ruby
[00:51:49] askhat: has joined #ruby
[00:51:55] yokel: has joined #ruby
[00:52:45] diegoviola: has joined #ruby
[00:56:31] ferr: has joined #ruby
[00:59:00] ferr: I am looking for some help with gem development, I am having troubles with matching runtime dependencies when setting source to gemfury repo
[00:59:34] ferr: works fine when switching the source to the github repo though... so I am a bit lost
[00:59:38] ferr: any ideas?
[01:04:42] t4nk718: has joined #ruby
[01:06:48] r4z3r: how's it going t4nk718
[01:14:25] DylanJ: has joined #ruby
[01:16:10] jottr: has joined #ruby
[01:19:15] shevy: you killed the tank!
[01:19:59] Domaldel: has joined #ruby
[01:20:37] ferr: the tank was me trying to access via webclient instead of xchat :)
[01:26:05] ferr: has left #ruby: ("Saliendo")
[01:26:16] ferr: has joined #ruby
[01:33:33] nanoz: has joined #ruby
[01:33:48] weemsledeux: has joined #ruby
[01:37:49] shevy: they prefer webchat over xchat :(((
[01:37:52] shevy: what has the world become of...
[01:39:22] gizmore: has joined #ruby
[01:42:12] Spami: has joined #ruby
[01:43:00] gizmore: Is there active model like ActiveRecord::Result.new(User.new, User.new).where(:id => 2).to_json?
[01:44:12] duckpuppy: has joined #ruby
[01:44:38] rht: has joined #ruby
[01:46:20] nodejunkie: has joined #ruby
[01:47:32] eljimmy: has joined #ruby
[01:49:23] richardnixon: has joined #ruby
[01:49:53] askhat: has joined #ruby
[01:57:05] becker_12: has joined #ruby
[01:57:16] JoshGlzBrk: has joined #ruby
[01:59:37] pawnbox: has joined #ruby
[02:01:02] diegoviola: has joined #ruby
[02:01:17] r4z3r: has joined #ruby
[02:01:38] johnmilton: has joined #ruby
[02:03:40] SenpaiSilver: has joined #ruby
[02:14:28] blackmesa: has joined #ruby
[02:16:12] benlieb: has joined #ruby
[02:23:50] babblebre: has joined #ruby
[02:23:54] bronson: has joined #ruby
[02:29:19] pawnbox: has joined #ruby
[02:31:11] youch: has joined #ruby
[02:33:33] lessless: has joined #ruby
[02:39:18] richardnixon: has joined #ruby
[02:44:58] duckpuppy: has joined #ruby
[02:46:41] ramortegui: has joined #ruby
[02:47:26] B1n4r10: has joined #ruby
[02:49:30] sucks_: has joined #ruby
[02:50:29] z3uS: has joined #ruby
[02:54:44] BTRRY: has joined #ruby
[02:55:10] Teru: has joined #ruby
[02:55:53] dexter-tzu: has joined #ruby
[02:56:17] kies^: has joined #ruby
[02:56:43] Rasi: has joined #ruby
[02:59:37] pawnbox: has joined #ruby
[03:01:47] flughafen_: has joined #ruby
[03:03:18] rht: has joined #ruby
[03:05:20] elifoster: has joined #ruby
[03:18:29] Cyrus: has joined #ruby
[03:25:17] Graphettion: has joined #ruby
[03:25:48] benlieb: has joined #ruby
[03:32:20] finisherr: has joined #ruby
[03:33:12] LoneHerm_: has joined #ruby
[03:35:44] ledestin: has joined #ruby
[03:35:49] finisherr: I'm having issues accessing an intance variable after instantiation. Is there anything I have to do outside of specifying the attribute in an attr_accessor method as a symbol?
[03:36:01] finisherr: and set in the initialize method
[03:36:35] becker_12: has joined #ruby
[03:37:54] jgt: has joined #ruby
[03:38:19] Ox0dea: finisherr: https://eval.in/518399
[03:39:20] finisherr: Yeah, that's what isn't working. What I have is a class with an instance variable that is actually an instance of another class (delegation)
[03:39:29] Ox0dea: Post code?
[03:39:32] pawnbox: has joined #ruby
[03:39:52] bronson: has joined #ruby
[03:40:54] Ox0dea: Well, that won't do.
[03:41:37] finisherr: I think I found my issue possibly
[03:41:48] Ox0dea: Forget to `super`?
[03:42:41] finisherr: I just had my attr_accessor under module scope and not class scope
[03:42:44] nofxx: has joined #ruby
[03:42:44] nofxx: has joined #ruby
[03:43:09] azure32: has joined #ruby
[03:43:30] Ox0dea: Hm... what does that even do?
[03:43:49] finisherr: I just put it in the wrong spot accidently
[03:44:17] Ox0dea: Right, but now I'm wondering how you'd actually get hold of an attribute defined that way.
[03:44:26] Ox0dea: Modules aren't instantiable.
[03:44:46] finisherr: The class sits under a module
[03:45:50] duckpuppy: has joined #ruby
[03:46:06] karapetyan: has joined #ruby
[03:46:45] zacstewart: has joined #ruby
[03:49:27] LuckyABA: has joined #ruby
[03:55:03] sankaber: has joined #ruby
[04:01:29] DmitryBochkarev: has joined #ruby
[04:04:03] einarj: has joined #ruby
[04:07:38] blackgoat: has joined #ruby
[04:08:49] rakm: has joined #ruby
[04:09:32] treaki: has joined #ruby
[04:10:35] graphettion_: has joined #ruby
[04:13:21] braincrash: has joined #ruby
[04:17:40] dlitvak: has joined #ruby
[04:20:50] Ebok: has joined #ruby
[04:21:53] s2013: has joined #ruby
[04:22:35] atomical_: has joined #ruby
[04:26:48] Dimik: has joined #ruby
[04:31:16] alphaatom: has joined #ruby
[04:33:54] gix: has joined #ruby
[04:35:14] scottj: has joined #ruby
[04:35:16] benlieb: has joined #ruby
[04:35:38] ensyde_: has joined #ruby
[04:36:26] The_Phoenix: has joined #ruby
[04:36:29] scottj: is there a way to use destructuring to rewrite "outline['foo'] + outline['bar']" to something like "{foo, bar} = outline; foo + bar"?
[04:36:32] baweaver: has joined #ruby
[04:38:55] pawnbox: has joined #ruby
[04:39:45] havenwood: scottj: outline.values_at('foo', 'bar').reduce(:+)
[04:40:16] idefine: has joined #ruby
[04:40:20] havenwood: scottj: yeah, your can do stuff like: foo, bar = outline.values_at 'foo', 'bar'
[04:40:29] idefine: has joined #ruby
[04:40:43] scottj: havenwood: thanks
[04:40:48] havenwood: scottj: no prob
[04:42:23] braincra-: has joined #ruby
[04:46:28] duckpuppy: has joined #ruby
[04:47:31] lessless: has joined #ruby
[04:47:49] sucks: has joined #ruby
[04:48:08] BecomingCoder: has joined #ruby
[04:49:07] atomical: has joined #ruby
[04:52:28] floror: has joined #ruby
[04:55:06] adgtl: has joined #ruby
[04:55:50] adgtl: has joined #ruby
[04:55:54] adgtl: has joined #ruby
[04:59:09] ilhami: has joined #ruby
[05:00:19] perrier_: has joined #ruby
[05:00:59] houhoulis: has joined #ruby
[05:04:14] c0ncealed: has joined #ruby
[05:04:31] benlieb: has joined #ruby
[05:07:13] youngmathimus0: Anyone know how i could count the amount of hits here? https://repl.it/BlUR/64
[05:09:08] konsolebox: has joined #ruby
[05:09:45] nofxx: Youngmathimus0, first, understand why lines 5,6,7 doesn't do anything
[05:10:01] youngmathimus0: just thought it was easier to understand
[05:10:11] nofxx: use a counter, a variable declared outside
[05:11:28] ilhami: I have a problem.
[05:11:33] ilhami: undefined method `include?'
[05:12:01] nofxx: ilhami, paste the full line.... include?' in.... what? NilClass?
[05:12:12] ilhami: it's on codeacademy
[05:12:17] ilhami: undefined method `include?' for nil:NilClass
[05:12:24] ilhami: if user_input.include? "s"
[05:12:24] ilhami: print "sup"
[05:12:53] nofxx: user_input is nil ... just it, got it?
[05:13:23] DEA7TH: has joined #ruby
[05:13:49] ilhami: how can it be nul?
[05:13:54] ilhami: print "Do you like cats?"
[05:13:54] ilhami: user_input = gets.chomp.downcase!
[05:13:56] ilhami: I also have this
[05:14:30] nofxx: that's returning nil... did you get a pop up text input?
[05:14:40] ilhami: I am prompted
[05:14:44] nofxx: bad codeacademy
[05:15:11] nofxx: in real life, when things that can happen you can check both conditions:
[05:15:18] nofxx: if user_input && user_input.include? "s"
[05:16:02] sergey_makagon: has joined #ruby
[05:16:10] nofxx: or ultra rubiesque: if user_input.respond_to?(:include?)
[05:16:21] ilhami: codeacademy is bad right?
[05:16:22] nofxx: in the case, #respond_to? is beautiful
[05:16:29] ilhami: it's not my fault.
[05:16:34] ilhami: Write an if statement in the editor. It should check to see if user_input includes "s".
[05:16:37] ilhami: For now, print a string of your choice to the console if it finds "s".
[05:16:40] ilhami: these are the instructions
[05:16:44] nofxx: use IRB dude
[05:17:21] wolffles: i dont think its codeacademys fault?
[05:17:30] nofxx: hmm... yeah often those courses send you to actually install ruby later
[05:17:45] ilhami: wolffles, whose fault is it? :D
[05:17:49] nofxx: makes sense, sometimes (windows crap) may scare ppl from nice languages
[05:18:32] wolffles: ;D you know
[05:18:37] ilhami: windows crap?
[05:18:56] ilhami: talking about the OS? :D
[05:19:03] nofxx: a nice language is, by sine qua non condition, only nice if it's unix only ;)
[05:19:24] Ox0dea: >> nil&.foo # nofxx
[05:19:25] ruby[bot]: Ox0dea: # => nil (https://eval.in/518403)
[05:19:30] Ox0dea: Welcome to 2.3! :)
[05:19:39] Ox0dea: wolffles: Codecademy is pretty not great.
[05:19:56] Ox0dea: ilhami: https://pine.fm/LearnToProgram/ http://rubykoans.com/
[05:19:56] nofxx: Ox0dea, woa! it'll only check or actually call if it's present too?
[05:20:06] Ox0dea: nofxx: Aye, it does "safe navigation".
[05:20:10] ilhami: but dude I started on the course lol
[05:20:44] Ox0dea: ilhami: https://en.wikipedia.org/wiki/Sunk_cost_fallacy
[05:21:03] ilhami: http://ruby-community.com/pages/links btw it's listed here
[05:21:10] Ox0dea: It shouldn't be.
[05:21:39] Takumo: has joined #ruby
[05:21:40] Takumo: has joined #ruby
[05:22:01] Morrolan: has joined #ruby
[05:22:03] ilhami: which version of Ruby should I use?
[05:22:55] pickandmix: has joined #ruby
[05:23:04] ilhami: Ubuntu 14.04 has 1.9.3p484
[05:23:19] Ox0dea: ilhami: https://www.brightbox.com/docs/ruby/ubuntu/
[05:23:22] LoneHerm_: has joined #ruby
[05:24:52] ilhami: That doesn't tell me what version to use though. :P 2.3.0 ?
[05:26:36] LuckyABA: has joined #ruby
[05:28:36] johny5t4G: has joined #ruby
[05:29:02] johny5t4G: has left #ruby: ()
[05:30:09] ilhami: gem1.9.3 install bundler what am I installing here?
[05:30:11] ilhami: can anyone tell me?
[05:30:26] pickandmix: has joined #ruby
[05:30:27] ilhami: all the libs or what?
[05:34:03] karapetyan: has joined #ruby
[05:39:11] Nilium: has joined #ruby
[05:39:37] becker_12: has joined #ruby
[05:39:51] n00bDev: has joined #ruby
[05:42:00] coyo: has joined #ruby
[05:42:00] coyo: has joined #ruby
[05:47:12] s2013: has joined #ruby
[05:47:15] UtkarshRay: has joined #ruby
[05:47:22] duckpuppy: has joined #ruby
[05:53:04] Kryptonical: has joined #ruby
[05:55:39] pawnbox: has joined #ruby
[05:56:26] pawnbox: has joined #ruby
[05:58:36] LoneHerm_: has joined #ruby
[05:58:38] y2mq37: has joined #ruby
[05:59:04] pickandmix: has joined #ruby
[06:02:04] bronson: has joined #ruby
[06:02:20] baweaver: has joined #ruby
[06:03:17] intrigueD: has joined #ruby
[06:04:27] pickandmix: has joined #ruby
[06:04:51] einarj: has joined #ruby
[06:04:54] rsc___: has joined #ruby
[06:07:46] bluOxigen: has joined #ruby
[06:10:05] speakingcode: has joined #ruby
[06:10:14] Nilium: has joined #ruby
[06:14:35] x64-: has joined #ruby
[06:31:04] moeabdol2: has joined #ruby
[06:31:19] bkxd: has joined #ruby
[06:31:42] tokik: has joined #ruby
[06:34:11] mg^2: has joined #ruby
[06:38:10] moeabdol: has joined #ruby
[06:38:59] lxsameer: has joined #ruby
[06:47:51] awe: has joined #ruby
[06:50:17] mg^2: Time.now.methods.sort
[06:50:28] mg^2: Bah, wrong window
[06:54:07] RegulationD: has joined #ruby
[06:55:59] febuiles: has joined #ruby
[06:59:38] rippa: has joined #ruby
[07:02:37] pickandmix: has joined #ruby
[07:03:18] hakunin_: has joined #ruby
[07:07:49] Marsupermammal: has joined #ruby
[07:10:41] duncanm: has joined #ruby
[07:14:17] arlek: has joined #ruby
[07:17:20] ledestin: has joined #ruby
[07:21:11] gizmore_: has joined #ruby
[07:24:43] moeabdol1: has joined #ruby
[07:35:57] jackjackdripper: has joined #ruby
[07:36:08] mybatman123: has joined #ruby
[07:36:16] mybatman123: has left #ruby: ()
[07:36:48] karapetyan: has joined #ruby
[07:38:54] Chau: has joined #ruby
[07:40:56] yatish27: has joined #ruby
[07:43:59] tvw: has joined #ruby
[07:45:09] jackjackdripper: has joined #ruby
[07:45:56] gizmore: has joined #ruby
[07:50:34] the_drow: has joined #ruby
[07:50:35] einarj: has joined #ruby
[07:50:55] gizmore: has joined #ruby
[07:52:07] p1k: has joined #ruby
[07:54:36] patchedmonkey: has joined #ruby
[07:56:26] stardiviner: has joined #ruby
[07:59:29] Gnut: has joined #ruby
[08:01:43] becker_12: has joined #ruby
[08:02:45] ruby-lang287: has joined #ruby
[08:02:56] Averna: has joined #ruby
[08:03:44] ilhami: was testing something :D
[08:04:33] kaynw80: has joined #ruby
[08:06:33] kaynw80: hy! I'm new to ruby. I come from PHP. My very basic Question: If I want to use a library like Nokogiri, do I have to include the source to my project or do I have to install Nokogiri on my system and tell everyone who uses my program that they have to install Nokogiri as well?
[08:06:37] karapetyan: has joined #ruby
[08:07:11] spider-mario: has joined #ruby
[08:11:21] Nilium: has joined #ruby
[08:15:27] LoneHerm_: has joined #ruby
[08:18:02] Ox0dea: kaynw80: Easiest is to package your thing as a gem and specify Nokogiri as a dependency.
[08:18:22] Ox0dea: Then, when your users go to install your thing, Nokogiri will be installed alongside it if they didn't already have it.
[08:18:45] Ox0dea: http://guides.rubygems.org/make-your-own-gem/
[08:20:19] kaynw80: 0x0dea: that's cool! thank you!
[08:21:01] ilhami: I need to setup a development environment like you do with Vagrant but isn't there a Ruby specific alternative?
[08:25:27] Napear: has joined #ruby
[08:26:13] kaynw80: here's another one - I installed a gem but when I run the program, it says that it cannot load such file
[08:27:31] joonty: has joined #ruby
[08:27:38] sergey_makagon: has joined #ruby
[08:28:57] RegulationD: has joined #ruby
[08:33:38] Jackneill: has joined #ruby
[08:39:07] arlek_: has joined #ruby
[08:43:52] askhat: has joined #ruby
[08:45:05] ht_: has joined #ruby
[08:47:34] firstdayonthejob: has joined #ruby
[08:48:55] dexter-tzu: has joined #ruby
[08:49:06] mdw: has joined #ruby
[08:49:30] duckpuppy: has joined #ruby
[08:53:13] codecop: has joined #ruby
[08:53:48] blur3d: has joined #ruby
[08:54:23] rht: has joined #ruby
[08:54:56] rht: has joined #ruby
[08:56:20] kaynw80: has left #ruby: ()
[08:56:59] pawnbox: has joined #ruby
[08:57:21] kaynw80: has joined #ruby
[08:57:38] william3: has joined #ruby
[08:58:15] ht_: has joined #ruby
[08:58:58] kaynw80: hy! I can't load an installed ruby gem. getting a load error. gem list shows it's installed however. stackoverflow isn't really helping.
[09:04:43] rht: has joined #ruby
[09:05:03] benlieb: has joined #ruby
[09:07:14] apeiros: kaynw80: more details needed. which gem? how do you try to load it? what's the *precise* error you get (copy & paste to gist)
[09:08:09] apeiros: kaynw80: generic answer: in case you've multiple rubies, make sure you're using the same ruby to run the code as you used to install the gem. make sure you actually require the right file (gem-name and file to require don't have to match).
[09:08:22] mlehrer: has joined #ruby
[09:10:20] kaynw80: apeiros: I think I fixed it. The Tutorial I used told me to require 'HTTParty'. However the gem is called 'httparty' (all lower case). I assume that makes no difference on a regular mac but does make a difference in linux. tl;dr it now works because I use require 'httparty'.
[09:13:28] apeiros: kaynw80: it makes a difference on any system with case sensitive filesystem. require works with files, i.e. it takes a path (or part of a path)
[09:14:05] apeiros: and yeah that tutorial is certainly wrong to spell it as `require 'httparty'`, and getting something such basic wrong would make me wary of that tutorial.
[09:14:22] apeiros: *is certainly wrong to spell it as `require 'HTTParty'`
[09:14:42] wwwbukolaycom: has joined #ruby
[09:15:19] kaynw80: apeiros: yap, but regular macs come with a case insensitive fs :) - I still have to get used to a case sensitive fs
[09:15:40] jmdade: has joined #ruby
[09:16:00] apeiros: not quite correct. regular macs have configured case-preserving fs by default. you can have case-sensitive out of the box there too.
[09:16:31] kaynw80: oh didn't know that
[09:16:32] apeiros: but yeah, unless you do something, require 'HTTParty' would work on mac
[09:19:36] blackgoat: has joined #ruby
[09:22:02] sheerfish999: has joined #ruby
[09:22:33] sheerfish999: gem install rqrcode
[09:22:33] sheerfish999: ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
[09:22:33] sheerfish999: bad response Not Found 404
[09:22:45] einarj: has joined #ruby
[09:24:19] apeiros: sheerfish999: works for me. updated rubygems? proxy settings correct? modified gem config?
[09:25:16] sheerfish999: <Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><RequestId>56C047AEFFFC811E30AD83F0</RequestId><HostId>rubygems-china.oss-cn-hangzhou.aliyuncs.com</HostId><Key>quick/Marshal.4.8/rqrcode-0.10.1.gemspec.rz</Key></Error>
[09:25:23] sheerfish999: is that right ?
[09:25:44] sheerfish999: "rqrcode-0.10.1.gemspec.rz"
[09:25:50] mlehrer: has joined #ruby
[09:28:36] karapetyan: has joined #ruby
[09:29:24] stardiviner: has joined #ruby
[09:29:35] zapata: has joined #ruby
[09:33:52] dima_: has joined #ruby
[09:35:25] pickandmix: has joined #ruby
[09:35:35] kmckelvin: has joined #ruby
[09:36:14] DmitryBochkarev: has joined #ruby
[09:37:24] Mon_Ouie: has joined #ruby
[09:39:01] blackmesa: has joined #ruby
[09:39:52] askhat: has joined #ruby
[09:48:14] zeroDivisible: has joined #ruby
[09:50:19] duckpuppy: has joined #ruby
[09:50:23] william3: has joined #ruby
[09:50:42] blackmesa: has joined #ruby
[09:57:22] atmosx: has joined #ruby
[10:00:37] BLuEGoD: has joined #ruby
[10:01:07] atmosx: has joined #ruby
[10:01:07] sandstrom: has joined #ruby
[10:01:49] LoneHermit: has joined #ruby
[10:05:40] bronson: has joined #ruby
[10:06:18] askhat: has joined #ruby
[10:07:51] nanoz: has joined #ruby
[10:09:23] karapetyan: has joined #ruby
[10:10:20] akem: has joined #ruby
[10:13:41] JDeen: has joined #ruby
[10:14:57] n00bDev: has joined #ruby
[10:15:00] JDeen: Hi there. I am wondering if it is wise to overide equal comparator of a class so that some thing like 'Array#include?' will teturn true if an object with similar attribute values is included. If so what method should I override?
[10:16:46] canton7: why not use 'any' and pass a block?
[10:17:05] JDeen: checking...
[10:17:33] antgel: has joined #ruby
[10:18:13] apeiros: jdeen: == should be consistent with <=>
[10:19:40] JDeen: canton7: thanks, i didn't see any in the documentation, but it seems to work, great
[10:21:27] JDeen: apeiros: thanks, so in methods like #include? #find, i think it is using the == operator is it? so probably i will have to also override <=>
[10:21:28] canton7: jdeen, http://ruby-doc.org/core-2.2.0/Array.html#method-i-any-3F ..?
[10:22:05] JDeen: canton7: thanks (y)
[10:22:05] apeiros: jdeen: yes, Array#/Enumerable#include? use ==. Hash#include? otoh uses eql?.
[10:23:01] JDeen: apeiros: great, thanks for the information guys, happy hacking and an enjoyable sunday!
[10:25:54] ph0: has joined #ruby
[10:28:23] karapetyan: has joined #ruby
[10:29:05] blackmesa: has joined #ruby
[10:33:49] Xeago: has joined #ruby
[10:33:55] einarj: has joined #ruby
[10:33:55] sheerfish999: has left #ruby: ("Leaving")
[10:34:25] askhat: has joined #ruby
[10:47:22] voidDotClass: has joined #ruby
[10:48:15] voidDotClass: I have a rails class 'Foo', I have a static method: Foo.allowed_types , which returns an array. I'm trying to set a validation rule to only allow types which are included in the array returned by Foo.allowed_types
[10:48:32] voidDotClass: I'm trying validates :type, presence: true, inclusion: {in: Foo.allowed_types} , but it gives a syntax error
[10:48:54] voidDotClass: just doing self.allowed_types or just allowed_types doesnt work either
[10:50:08] intrigueD: has joined #ruby
[10:51:00] duckpuppy: has joined #ruby
[10:51:54] william3: has joined #ruby
[10:56:12] scottj: has left #ruby: ()
[10:56:57] apeiros: voidDotClass: you should always gist your full exception if you get one. the code you pasted here is syntactically valid
[10:57:07] apeiros: also note that there's no such thing as a "rails class".
[10:57:31] voidDotClass: apeiros, It works only if I move that line below the method definition
[10:57:55] apeiros: uh, yes, you can't call a method before you defined it
[10:58:04] apeiros: but calling an undefined method does not raise a syntax error.
[10:58:32] voidDotClass: apeiros it seems that if the static method is referred in the class def before its declared, then it doesnt work, gives an unknown constant error
[10:58:50] voidDotClass: but if you just move the reference below the method declaration, like in archaic php, then it works
[10:58:52] apeiros: I think you're mixing things up rather wildly
[10:59:02] voidDotClass: let me give you the exact exception then
[10:59:12] apeiros: best along with the code
[10:59:29] apeiros: and yes, you absolutely have to define stuff before using it. can't possibly work any other way.
[10:59:50] voidDotClass: apeiros, /home/ali/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activerecord-4.2.5/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined local variable or method `allowed_types' for Foo (call 'Foo.connection' to establish a connection):Class (NameError)
[11:00:03] apeiros: also note that your validation will validate against the values the method returns at the time of calling `validates`. i.e. it won't be dynamic.
[11:00:15] voidDotClass: that's with validates :type, presence: true, inclusion: {in: allowed_types} , def self.allowed_types
[11:00:15] apeiros: voidDotClass: yeah. that's *not* a syntax error.
[11:00:34] voidDotClass: regardless, it only works if i move that line below the declaration
[11:00:49] apeiros: of course. because it can't call the method if it doesn't exist.
[11:01:41] apeiros: right there where you call `validates`, it'll call allowed_types. and again: the validation will use the array it returns at that time.
[11:02:04] apeiros: so if allowed_types changes over time, it won't affect the validation. given that you use a method, that may not be what you want.
[11:02:09] Outlastsheep: has joined #ruby
[11:02:19] platzhirsch: has joined #ruby
[11:02:20] veleno: has joined #ruby
[11:02:20] tatsuo: has joined #ruby
[11:02:36] apeiros: and if it doesn't change, you probably should use a constant instead of a method.
[11:02:50] SShrike: has joined #ruby
[11:03:13] voidDotClass: it doesn't change over time, its static
[11:04:13] mickey_mouse: has joined #ruby
[11:04:16] apeiros: then use a constant
[11:04:36] donald_duck: has joined #ruby
[11:05:51] voidDotClass: how do you declare a constant? self.CONSTANT_NAME = ... ?
[11:05:51] dolan: has joined #ruby
[11:06:03] apeiros: ConstantName = value
[11:06:15] apeiros: with a ., it's always a method call
[11:06:55] voidDotClass: So if I do TYPES = [], inside class Foo, then i'd be able to call Foo.TYPES ?
[11:07:08] apeiros: no. as said, . is always a method call.
[11:07:11] apeiros: it's Foo::TYPES
[11:07:13] SShrike: has joined #ruby
[11:08:44] voidDotClass: gotcha, thanks.
[11:09:20] pickandmix: has joined #ruby
[11:09:25] apeiros: within the class body of Foo, a plain `TYPES` is sufficient
[11:10:03] konsolebox: has joined #ruby
[11:10:48] becker_12: has joined #ruby
[11:11:40] FooMunki: has joined #ruby
[11:11:45] CloCkWeRX: has joined #ruby
[11:13:01] voidDotClass: apeiros, is there an easier way to do lambdas, something like foo -> {code}?
[11:13:13] voidDotClass: Foo.TYPES.each type -> code ?
[11:13:18] bogs: has joined #ruby
[11:13:23] pihpah: has joined #ruby
[11:13:25] kam270: has joined #ruby
[11:13:52] apeiros: you mean blocks? (lambdas and blocks are different things in ruby)
[11:14:12] apeiros: if so, then no. it's either `.each do |???args???|` or `.each { |???args???|`
[11:14:37] william3: has joined #ruby
[11:14:49] andrewvos: has joined #ruby
[11:15:50] voidDotClass: apeiros, yeah, but i'm sure i'
[11:15:58] voidDotClass: i've seen a shorter syntax somewhere
[11:16:37] apeiros: that wasn't blocks. there's syntax for lambdas: x = ->(???args???) { ???code??? }
[11:16:41] trinaldi: has joined #ruby
[11:18:29] ni291187: has joined #ruby
[11:18:35] FernandoBasso: has joined #ruby
[11:20:52] glazoff: has joined #ruby
[11:24:39] RIK_: has joined #ruby
[11:24:45] sandstrom: has joined #ruby
[11:25:48] binaryplease: has joined #ruby
[11:26:09] patrick_star_10: has joined #ruby
[11:26:15] SCHAAP137: has joined #ruby
[11:28:12] patrick_star_11: has joined #ruby
[11:28:20] patrick_star_12: has joined #ruby
[11:28:24] Ishido: has joined #ruby
[11:29:13] veleno: has joined #ruby
[11:30:32] RegulationD: has joined #ruby
[11:32:04] Macaveli: has joined #ruby
[11:32:28] tubbo: has joined #ruby
[11:37:03] nwhirschfeld: has joined #ruby
[11:37:14] william3: has joined #ruby
[11:38:04] mdw: has joined #ruby
[11:38:06] bogs: has joined #ruby
[11:38:39] dolan: has joined #ruby
[11:41:08] themsay: has joined #ruby
[11:42:05] blackmesa: has joined #ruby
[11:46:06] edwinvdgraaf: has joined #ruby
[11:49:24] askhat: has joined #ruby
[11:49:42] edwinvdgraaf: has joined #ruby
[11:50:36] andrewvos: has joined #ruby
[11:51:52] duckpuppy: has joined #ruby
[11:54:45] the_drow: has joined #ruby
[11:55:34] baweaver: has joined #ruby
[11:56:26] n00bDev: has joined #ruby
[11:56:34] r4z3r: has joined #ruby
[11:57:54] rikai: Ox0dea: somewhat better but probably also slightly worse in some spots, i'm sure.
[12:03:08] symm-: has joined #ruby
[12:05:20] ElFerna_: has joined #ruby
[12:08:51] dionysus69: has joined #ruby
[12:10:07] KINGSABRI_: has joined #ruby
[12:11:45] KINGSABRI: has joined #ruby
[12:13:09] themsay: has joined #ruby
[12:16:33] pandaant: has joined #ruby
[12:17:13] sdothum: has joined #ruby
[12:19:26] moeabdol: has joined #ruby
[12:20:39] mdw: has joined #ruby
[12:21:16] Ebok: has joined #ruby
[12:25:19] binaryplease: has joined #ruby
[12:31:02] edwinvdgraaf: has joined #ruby
[12:32:29] edwinvdgraaf: has joined #ruby
[12:33:53] edwinvdgraaf: has joined #ruby
[12:36:06] edwinvdg_: has joined #ruby
[12:37:40] edwinvdgraaf: has joined #ruby
[12:37:40] KINGSABRI: Hi! can I use a hash key's value as a value for another key within the same hash? (https://gist.github.com/KINGSABRI/3ea6e4c665e6261a0956)
[12:38:21] veleno: has joined #ruby
[12:38:54] william3: has joined #ruby
[12:39:29] edwinvdgraaf: has joined #ruby
[12:40:47] edwinvdgraaf: has joined #ruby
[12:41:04] pushcx: No, because Ruby wouldn't know if you wanted to set the value to ':one' or the value of the ':one' key.
[12:41:53] j2k: KINGSABRI : hash = {one: 1, two: 1 + hash[:one]}
[12:43:03] KINGSABRI: j2k I got NoMethodError: undefined method `[]' for nil:NilClass
[12:44:01] j2k: Your right, I did: hash = {one: 1}; hash = {one: 1, two: 1 + hash[:one]}
[12:44:46] j2k: Yeah I wouldn't try this
[12:44:59] Timberwo|f: has joined #ruby
[12:45:00] j2k: irb(main):001:0> hash = {one: 1}; hash = {one: 2, two: 1 + hash[:one]} => {:one=>2, :two=>2}
[12:45:38] KINGSABRI: yes, it will work of course , but the hash has been defined already
[12:46:01] KINGSABRI: even i tried something like hash = {one: 1, two: 1 + self[:one]}
[12:46:05] KINGSABRI: but it didn't work
[12:46:44] KINGSABRI: my thought was to do all in the same hash
[12:47:21] Mon_Ouie: That's just not possible, the hash doesn't exist until the entire literal has been evaluated
[12:47:29] The_Phoenix: has joined #ruby
[12:47:50] KINGSABRI: That's really make sense
[12:48:29] KINGSABRI: thanks guys
[12:49:04] p1k: has joined #ruby
[12:50:33] r4z3r: has joined #ruby
[12:50:48] LoneHermit: has joined #ruby
[12:51:09] r4z3r: has joined #ruby
[12:52:08] intrigueD: has joined #ruby
[12:52:12] gustavohmsilva: has joined #ruby
[12:52:14] gustavohmsilva: I would love any considerations or even roasts on my code: https://github.com/gustavohmsilva
[12:52:29] duckpuppy: has joined #ruby
[12:53:11] lxsameer: how can i check if a class name stored in a variable is defined or not ?
[12:55:02] r4z3r: lxsameer I think Object.const_defined?(var)
[12:55:39] lxsameer: r4z3r, thanks
[12:57:17] n00bDev: has joined #ruby
[12:59:06] aryaching: has joined #ruby
[13:00:09] timonv: has joined #ruby
[13:03:52] blackmesa: has joined #ruby
[13:04:52] pawnbox: has joined #ruby
[13:05:54] becker_12: has joined #ruby
[13:09:14] Hackbinary: has joined #ruby
[13:12:20] roshanavand: has joined #ruby
[13:13:52] akem: has joined #ruby
[13:14:45] iooner: has joined #ruby
[13:25:17] johnmilton: has joined #ruby
[13:26:06] firstdayonthejob: has joined #ruby
[13:33:03] aryaching_: has joined #ruby
[13:35:47] the_drow: has joined #ruby
[13:36:25] dlitvak: has joined #ruby
[13:39:05] zast: has joined #ruby
[13:40:26] william3: has joined #ruby
[13:42:42] codecop: has joined #ruby
[13:45:09] d0lph1n98: has joined #ruby
[13:45:13] pawnbox: has joined #ruby
[13:50:58] DEA7TH: has joined #ruby
[13:51:03] karapetyan: has joined #ruby
[13:53:14] duckpuppy: has joined #ruby
[13:53:40] ferr: has joined #ruby
[13:54:02] solocshaw: has joined #ruby
[13:54:57] atomical: has joined #ruby
[13:57:31] ljames: has joined #ruby
[13:58:10] baweaver: has joined #ruby
[13:59:17] n00bDev: has joined #ruby
[13:59:21] s2013: has joined #ruby
[14:00:08] aryaching: has joined #ruby
[14:05:03] hightower2: has joined #ruby
[14:05:17] Xeago: has joined #ruby
[14:06:13] hightower2: has left #ruby: ()
[14:06:43] hightower3: has joined #ruby
[14:07:00] blackmesa: has joined #ruby
[14:07:31] bronson: has joined #ruby
[14:07:51] nfk: has joined #ruby
[14:16:18] felixfortis: has joined #ruby
[14:17:04] FooMunki: has joined #ruby
[14:27:47] dlitvak: has joined #ruby
[14:30:12] whiteline: has joined #ruby
[14:32:28] mondok: has joined #ruby
[14:33:15] weemsledeux: has joined #ruby
[14:34:24] gheegh: has joined #ruby
[14:36:31] themsay: has joined #ruby
[14:37:55] sankaber: has joined #ruby
[14:38:10] antgel: has joined #ruby
[14:38:16] shevy: gustavohmsilva https://github.com/gustavohmsilva/CheckVid/blob/master/CheckVid.rb
[14:38:26] ferr: has joined #ruby
[14:38:49] shevy: gustavohmsilva a lot of the syntax is not necessary; puts() the () are not needed; the indent is not consistent and you should consider using a class instead for easier re-use of code in general
[14:41:53] gustavohmsilva: Hum, thanks shevy... I'll read about classes and remove the () from the code
[14:42:02] william3: has joined #ruby
[14:47:51] stardiviner: has joined #ruby
[14:48:11] pawnbox: has joined #ruby
[14:53:27] patchedmonkey: has joined #ruby
[14:54:07] duckpuppy: has joined #ruby
[14:54:56] konsolebox: has joined #ruby
[14:59:38] mdw: has joined #ruby
[15:00:06] n00bDev: has joined #ruby
[15:01:04] Ishido: has joined #ruby
[15:01:29] Ishido: has joined #ruby
[15:02:03] dlitvak: has joined #ruby
[15:03:08] RLa: has joined #ruby
[15:03:50] RLa: i'm debugging this error: LoadError (cannot load such file -- zip/zip), it seems like some gem is missing
[15:04:09] RLa: how do i turn zip/zip into a gem name?
[15:07:19] havenwood: RLa: Looks like rubyzip gem prior to version 1.0 was `require 'zip/zip'` and post 1.0 it's `require 'zip'`.
[15:07:57] symm-: has joined #ruby
[15:08:08] RLa: it's 2013-era codebase, thanks for info, i try deduce which version i need
[15:08:33] havenwood: RLa: If you don't have `require 'zip/zip'` in your code or `gem 'rubyzip'` in your Gemfile, you'll need to hunt down the gems depending on rubyzip and fix them or add the '< 1.0' to your Gemfile manually.
[15:09:32] RLa: will do
[15:09:38] havenwood: If they'd have followed convention it'd be: require 'rubyzip'
[15:09:52] blackmesa: has joined #ruby
[15:10:12] havenwood: But I guess the name "zip" was taken. It happens!
[15:10:19] cmoneylulz: has joined #ruby
[15:10:46] havenwood: Now as long as nobody wants to use the real zip gem with rubyzip...
[15:10:57] RLa: it should be redmine dependency but is somehow missing, one of the plugins requires it
[15:11:40] roshanavand: has joined #ruby
[15:15:34] pushcx: Watch out for 'zipruby' from that era, it has a case sensitivity bug that can destroy data.
[15:16:58] DmitryBochkarev: has joined #ruby
[15:17:03] RegulationD: has joined #ruby
[15:24:40] x77686d: has joined #ruby
[15:26:24] rsc___: has joined #ruby
[15:26:47] Azure: has joined #ruby
[15:27:09] gregf: has joined #ruby
[15:29:14] magic_1: has joined #ruby
[15:29:26] patchedmonkey: has joined #ruby
[15:29:55] kknight: has joined #ruby
[15:30:10] dlitvak: has joined #ruby
[15:31:47] millerti: has joined #ruby
[15:32:05] al2o3-cr: has joined #ruby
[15:32:15] binaryplease: has joined #ruby
[15:32:31] jottr: has joined #ruby
[15:34:59] askhat: has joined #ruby
[15:36:55] aryaching: has joined #ruby
[15:37:24] pdoherty: has joined #ruby
[15:39:26] zacstewart: has joined #ruby
[15:40:16] rodfersou: has joined #ruby
[15:42:34] william3: has joined #ruby
[15:44:51] cmoneylulz: has joined #ruby
[15:49:06] Xeago: has joined #ruby
[15:51:10] Timberwo|f: has joined #ruby
[15:51:58] patchedmonkey: has joined #ruby
[15:52:18] ziyadb: has joined #ruby
[15:52:47] rgtk: has joined #ruby
[15:54:04] blackmesa: has joined #ruby
[15:54:28] dlitvak_: has joined #ruby
[15:54:45] duckpuppy: has joined #ruby
[15:55:00] jmdade: has joined #ruby
[15:58:49] baweaver: has joined #ruby
[16:00:52] n00bDev: has joined #ruby
[16:02:41] mondok: has joined #ruby
[16:03:09] railsForDaiz: has joined #ruby
[16:03:33] Ebok: has joined #ruby
[16:03:51] ready: has joined #ruby
[16:06:38] flughafen_: has joined #ruby
[16:11:12] chouhoulis: has joined #ruby
[16:13:59] zeroDivisible: has joined #ruby
[16:15:07] intrigueD: has joined #ruby
[16:18:46] sankaber: has joined #ruby
[16:19:20] pdoherty: has joined #ruby
[16:23:55] Dimik: has joined #ruby
[16:26:53] LoneHerm_: has joined #ruby
[16:27:09] InSync: has joined #ruby
[16:27:53] millerti: has joined #ruby
[16:28:06] dasher00: has joined #ruby
[16:28:21] the_drow: has joined #ruby
[16:29:20] futilegames: has joined #ruby
[16:30:34] Danishman: has joined #ruby
[16:31:31] IfSync: has joined #ruby
[16:32:07] railsForDaiz: has joined #ruby
[16:32:49] askhat: has joined #ruby
[16:35:17] dlitvak: has joined #ruby
[16:35:31] aryaching_: has joined #ruby
[16:37:10] mdw: has joined #ruby
[16:40:09] dlitvak_: has joined #ruby
[16:42:13] mondok: has joined #ruby
[16:43:07] millerti: has joined #ruby
[16:43:28] becker_12: has joined #ruby
[16:44:22] davedev24: has joined #ruby
[16:45:06] william3: has joined #ruby
[16:46:39] millerti: has joined #ruby
[16:46:45] SCHAAP137: has joined #ruby
[16:50:33] platzhirsch: has joined #ruby
[16:50:52] roshanavand: has joined #ruby
[16:52:04] millerti: has joined #ruby
[16:53:13] decoponio: has joined #ruby
[16:55:30] duckpuppy: has joined #ruby
[16:56:20] nofxx: has joined #ruby
[16:58:27] millerti: has joined #ruby
[17:01:37] n00bDev: has joined #ruby
[17:06:50] idefine: has joined #ruby
[17:08:54] pawnbox_: has joined #ruby
[17:09:49] fedexo: has joined #ruby
[17:11:29] millerti: has joined #ruby
[17:12:42] centrx: has joined #ruby
[17:14:27] benlieb: has joined #ruby
[17:14:45] tatsuo: has joined #ruby
[17:15:15] wolffles: has joined #ruby
[17:17:53] RegulationD: has joined #ruby
[17:18:15] LoneHerm_: has joined #ruby
[17:19:37] volty: has joined #ruby
[17:22:56] arthropododo: has joined #ruby
[17:23:22] edwinvdgraaf: has joined #ruby
[17:24:00] n00bDev: has joined #ruby
[17:24:09] ferr: has joined #ruby
[17:26:15] railsForDaiz: has joined #ruby
[17:28:22] agentmeerkat: has joined #ruby
[17:30:12] askhat: has joined #ruby
[17:32:07] sandstrom: has joined #ruby
[17:32:56] dlitvak: has joined #ruby
[17:33:25] burgestrand: has joined #ruby
[17:36:08] Spami: has joined #ruby
[17:37:22] rkazak: has joined #ruby
[17:38:02] vikaton: has joined #ruby
[17:38:18] mondok: has joined #ruby
[17:43:13] millerti: has joined #ruby
[17:44:53] eljimmy: has joined #ruby
[17:46:29] william3: has joined #ruby
[17:51:25] Anderson69s: has joined #ruby
[17:52:26] baweaver: has joined #ruby
[17:54:16] bronson: has joined #ruby
[17:56:14] duckpuppy: has joined #ruby
[17:57:28] solars: has joined #ruby
[17:57:30] zacstewart: has joined #ruby
[17:59:00] rbennacer: has joined #ruby
[18:02:06] nik0: has joined #ruby
[18:05:49] FooMunki: has joined #ruby
[18:08:20] william3: has joined #ruby
[18:09:40] shevy: code code code
[18:10:00] speakingcode: has joined #ruby
[18:10:06] kaleido: ACTION codes
[18:11:20] j0n3: has joined #ruby
[18:12:30] codecop: has joined #ruby
[18:13:06] rgtk: has joined #ruby
[18:13:32] yfeldblum: has joined #ruby
[18:13:52] blackmesa: has joined #ruby
[18:14:11] platzhirsch: code code code!
[18:16:28] LoneHerm_: has joined #ruby
[18:16:51] ElFerna_: has joined #ruby
[18:20:16] william3: has joined #ruby
[18:26:23] rikai: has joined #ruby
[18:28:42] burgestrand: has joined #ruby
[18:30:30] darkf: has joined #ruby
[18:31:42] JoshGlzBrk: has joined #ruby
[18:33:46] yfeldblum: has joined #ruby
[18:34:35] yfeldblum: has joined #ruby
[18:35:34] Hanmac: shevy: did you see this new apple "feature"? https://pbs.twimg.com/media/Ca92n6PXIAACzZp.jpg
[18:37:01] Ebok: has joined #ruby
[18:38:09] RLa: has left #ruby: ("Leaving")
[18:38:34] cpup: has joined #ruby
[18:40:24] livecodingtv: has joined #ruby
[18:41:47] becker_12: has joined #ruby
[18:43:44] zapata: has joined #ruby
[18:44:31] askhat: has joined #ruby
[18:44:40] dlitvak: has joined #ruby
[18:46:05] askhat: has joined #ruby
[18:47:39] SenpaiSilver: has joined #ruby
[18:48:26] Hanmac: i wonder if they will fix that until the new iphone gets out ... or it should say: "now with 20% more brick"
[18:50:25] railsForDaiz: has joined #ruby
[18:50:57] shevy: they should replace swift with mruby
[18:53:41] william3: has joined #ruby
[18:55:14] Xeago: has joined #ruby
[18:57:00] duckpuppy: has joined #ruby
[18:57:52] baweaver: has joined #ruby
[19:04:04] baweaver: has joined #ruby
[19:04:05] JoshGlzBrk: has joined #ruby
[19:05:22] johnmilton: has joined #ruby
[19:07:24] B1n4r10: has joined #ruby
[19:08:03] karapetyan: has joined #ruby
[19:08:07] Yeomra: has joined #ruby
[19:08:44] Mon_Ouie: has joined #ruby
[19:11:43] william3: has joined #ruby
[19:17:16] weemsledeux: has joined #ruby
[19:17:45] dlitvak: has joined #ruby
[19:19:51] dextertzu: has joined #ruby
[19:20:06] angryz: has joined #ruby
[19:21:04] al2o3-cr: has joined #ruby
[19:22:21] eikood: has joined #ruby
[19:23:06] eikood: has joined #ruby
[19:23:26] eikood: has joined #ruby
[19:24:55] ilhami: I learned a lot
[19:25:00] Graphettion: has joined #ruby
[19:25:28] Spami: has joined #ruby
[19:25:40] JoshGlzBrk: has joined #ruby
[19:28:33] shevy: ilhami come on
[19:29:04] ilhami: what shevy ? I am learning Rails now. :) I already made a blog
[19:29:14] rkazak: has joined #ruby
[19:29:15] shevy: you must go to #rubyonrails
[19:29:25] eikood: has joined #ruby
[19:29:26] ilhami: I am there already. :D
[19:29:43] shevy: I am not :D
[19:29:48] ilhami: come there now ! :)
[19:30:05] shevy: no... I have to write pure ruby commandline apps
[19:30:10] ilhami: shevy, are you on livecoding.tv?
[19:30:12] Gnut: has joined #ruby
[19:30:32] shevy: I am listening to boring university streams about non-computer related things!
[19:30:55] ilhami: heh what is it about? :D
[19:31:26] shevy: no... it is too boring to say. we need to focus on ruby here
[19:31:29] johnmilton: has joined #ruby
[19:35:45] roshanavand: has joined #ruby
[19:36:31] patchedmonkey: has joined #ruby
[19:37:37] rgtk: has joined #ruby
[19:38:37] william3: has joined #ruby
[19:41:26] finisherr: has left #ruby: ()
[19:41:56] askhat: has joined #ruby
[19:42:23] dlitvak_: has joined #ruby
[19:44:08] burgestrand: has joined #ruby
[19:44:20] Ebok: has joined #ruby
[19:45:25] chipotle: has joined #ruby
[19:47:10] karapetyan: has joined #ruby
[19:49:30] rgtk: has joined #ruby
[19:49:47] millerti: has joined #ruby
[19:50:06] crdpink: has joined #ruby
[19:50:44] davedev24: has joined #ruby
[19:51:49] mdw: has joined #ruby
[19:52:23] Jardayn: has joined #ruby
[19:53:26] houhoulis: has joined #ruby
[19:56:49] ur5us: has joined #ruby
[19:57:08] h99h9h88: has joined #ruby
[19:57:20] Satin_: has joined #ruby
[19:57:46] duckpuppy: has joined #ruby
[19:59:04] kirillzh: has joined #ruby
[20:00:15] kirillzh: has joined #ruby
[20:01:10] sandstrom: has joined #ruby
[20:01:15] jottr: has joined #ruby
[20:01:47] Me1612: has joined #ruby
[20:02:13] magic_1: has joined #ruby
[20:02:13] magic_1: has joined #ruby
[20:02:46] Me1612: someone may tell me what's the name of a gem than is... is to write easy html views?
[20:04:41] Satin_: has left #ruby: ()
[20:06:11] havenwood: me16, too late!
[20:06:25] havenwood: I guess they left already.
[20:06:27] apeiros: Errno::ENOPATIENCE
[20:06:44] kirillzh: has joined #ruby
[20:09:52] elifoster: has joined #ruby
[20:10:22] havenwood: So do we say rack-server-pages, sinatra, hanami/view, roda, jekyll, middleman or other?
[20:10:56] burgestrand: has joined #ruby
[20:11:24] doublemalt__: has joined #ruby
[20:12:46] dlitvak: has joined #ruby
[20:13:17] havenwood: shevy: pakyow or volt or just cgi?
[20:13:36] shevy: cgi! cgi!
[20:13:38] shevy: USA! USA!
[20:14:37] SCHAAP137: has joined #ruby
[20:15:03] x77686d: Long, sad story but could somebody who's used rvm to install 2.2.4 on Ubuntu tell me what they see with 'ruby --version' after 'rvm 2.2.4'?
[20:15:42] havenwood: shevy: ruby -rcgi -e "CGI.new.out('status' => 'OK', 'type' => 'text/plain', 'connection' => 'close') { 'OMGWTFBBQCGI'}"
[20:15:42] techietrash: has joined #ruby
[20:17:13] karapetyan: has joined #ruby
[20:18:54] davedev24: has joined #ruby
[20:19:06] dlitvak_: has joined #ruby
[20:21:21] youngmathimus0: has joined #ruby
[20:24:09] spider-mario: has joined #ruby
[20:25:27] eljimmy: has joined #ruby
[20:26:49] havenwood: x77686d: A just-compiled Ruby 2.2.4 on Ubuntu: ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]
[20:27:39] h99h9h88: has joined #ruby
[20:27:52] havenwood: x77686d: (Not RVM but should be the same.)
[20:28:06] x77686d: understood
[20:28:32] havenwood: unless 32-bit of course
[20:29:06] PaulCapestany: has joined #ruby
[20:29:08] havenwood: 2.2.4 is always patch level 230
[20:31:09] havenwood: x77686d: If we can help brighten even just the end of the story let us know!
[20:31:21] william3: has joined #ruby
[20:31:37] havenwood: If it's not already beyond that point.
[20:33:31] rgtk: has joined #ruby
[20:33:55] jottr: has joined #ruby
[20:39:58] askhat: has joined #ruby
[20:40:15] einarj: has joined #ruby
[20:40:27] preyalone: has joined #ruby
[20:41:05] andrewvos: has joined #ruby
[20:41:14] Cohedrin: has joined #ruby
[20:42:43] railsForDaiz: has joined #ruby
[20:43:35] moeabdol1: has joined #ruby
[20:45:23] Ebok: has joined #ruby
[20:45:34] intrigueD: has joined #ruby
[20:46:03] rbennacer: has joined #ruby
[20:46:14] al2o3-cr: has joined #ruby
[20:46:42] sharkman: has joined #ruby
[20:46:44] the_drow: has joined #ruby
[20:47:25] sharkman: a = { car: "red", band: "blue", fan: "purple"}, c, b = a[:car], a[:band]
[20:47:39] sharkman: is there a shorter way to do the second part, like a[:car, :band]
[20:47:49] sharkman: a(*car, band)
[20:47:53] sharkman: something like that?
[20:48:02] blackmesa: has joined #ruby
[20:48:40] idefine: has joined #ruby
[20:48:52] sharkman: actually this is the real code i am working with, it may be clearer actually, pts, fga, fta = box_score[:pts], box_score[:fga], box_score[:fta]
[20:48:57] shevy: a.values_at(:car, :band) # => ["red", "blue"]
[20:49:04] sharkman: ah great thanks
[20:49:16] sharkman: i thought ruby would have something for this
[20:49:28] yqt: has joined #ruby
[20:49:37] shevy: ruby has a lot of stuff hidden, the difficulty is finding it!
[20:49:54] shevy: I still don't even know everything from Enumerable
[20:50:10] RegulationD: has joined #ruby
[20:50:48] mdw: has joined #ruby
[20:52:06] einarj: has joined #ruby
[20:52:42] jimbeaudoin: has joined #ruby
[20:52:48] themsay2: has joined #ruby
[20:55:49] bronson: has joined #ruby
[20:56:08] einarj_: has joined #ruby
[20:56:25] havenwood: shevy: 48 methods, get to it! Which don't you know?
[20:57:09] mhoungbo: has joined #ruby
[20:57:18] mdw: has joined #ruby
[20:57:23] havenwood: http://ruby-doc.org/core/Enumerable.html
[20:58:05] shevy: let's see
[20:58:27] shevy: drop_while cycle collect_concat chunk_chunk_while
[20:58:29] duckpuppy: has joined #ruby
[20:58:52] havenwood: shevy: collect_concat is just flat_map
[20:58:56] shevy: find_all grep_v lazy member? hmmm... way too many
[20:59:03] shevy: but I don't use collect :(
[20:59:06] shevy: long live map!
[20:59:08] havenwood: shevy: grep_v is like grep -v (the inverse of grep)
[20:59:25] shevy: slice_after slice_before slice_when
[21:00:27] yqfvwal: has joined #ruby
[21:00:45] havenwood: shevy: so mostly just fairly recently added ones (except aliases and cycle)
[21:02:30] havenwood: >> [:x, :o].cycle(4).to_a
[21:02:31] ruby[bot]: havenwood: # => [:x, :o, :x, :o, :x, :o, :x, :o] (https://eval.in/518554)
[21:02:50] havenwood: >> [:ok].cycle.size
[21:02:51] ruby[bot]: havenwood: # => Infinity (https://eval.in/518555)
[21:02:51] patchedmonkey: has joined #ruby
[21:03:17] havenwood: shevy: You can give #cycle a number of times to cycle, or if you don't, it'll do it forever.
[21:03:39] PaulCapestany: has joined #ruby
[21:04:31] railsForDaiz: has joined #ruby
[21:04:46] idefine: has joined #ruby
[21:04:48] themsay: has joined #ruby
[21:05:55] PaulCapestany: has joined #ruby
[21:05:57] dlitvak: has joined #ruby
[21:05:59] Zackio: has joined #ruby
[21:06:30] LoneHerm_: has joined #ruby
[21:10:33] havenwood: >> [1, 2, 3].zip [:ok].cycle
[21:10:35] ruby[bot]: havenwood: # => [[1, :ok], [2, :ok], [3, :ok]] (https://eval.in/518560)
[21:10:46] makenoise: has joined #ruby
[21:11:09] havenwood: shevy: %w[tick tock].cycle(4) { |noise| puts noise; sleep 1 }
[21:11:24] shevy: what is this actually used for?
[21:11:28] havenwood: shevy: cycling
[21:12:16] havenwood: >> [:by].cycle.feed(:road)
[21:12:18] ruby[bot]: havenwood: # => nil (https://eval.in/518562)
[21:12:55] mdw: has joined #ruby
[21:13:03] havenwood: oops, I mean: [:bi].cycle
[21:14:31] ixti: has joined #ruby
[21:14:47] Ox0dea: >> class String; def * n; chars.cycle.take(size * n).join end end; 'foobar' * 2.5
[21:14:48] ruby[bot]: Ox0dea: # => "foobarfoobarfoo" (https://eval.in/518564)
[21:14:50] e: has joined #ruby
[21:14:56] thomas: has joined #ruby
[21:20:46] Ebok: has joined #ruby
[21:21:30] einarj: has joined #ruby
[21:21:35] roshanav_: has joined #ruby
[21:22:20] Gnut: has joined #ruby
[21:23:06] sandstrom: has joined #ruby
[21:23:40] Nilium_: has joined #ruby
[21:23:58] askhat_: has joined #ruby
[21:24:36] okdas: has joined #ruby
[21:24:36] okdas: has joined #ruby
[21:25:05] nwhirschfeld_: has joined #ruby
[21:25:30] Zacketh: has joined #ruby
[21:25:36] DEA7TH: Is there a way to DRY multiple method calls on the same object like this: https://gist.github.com/VelizarHristov/127defdc4265bda20240
[21:25:40] einarj: has joined #ruby
[21:26:08] Zacketh: has joined #ruby
[21:26:22] beawesomeinstead: has joined #ruby
[21:26:45] camilasan: has joined #ruby
[21:27:05] LoneHermit: has joined #ruby
[21:27:23] r4z3r: has joined #ruby
[21:27:47] alphaatom: has joined #ruby
[21:27:53] makenoise: Why not just have @user_type = current_staff.type? and leave that logic inside of current_staff
[21:28:06] larsk: has joined #ruby
[21:28:40] crayfishx: has joined #ruby
[21:28:49] mfb2: has joined #ruby
[21:28:53] bodgix: has joined #ruby
[21:29:14] Xeago: has joined #ruby
[21:29:28] mhoungbo: has joined #ruby
[21:29:37] angryz: has joined #ruby
[21:29:39] jimbeaudoin: has joined #ruby
[21:29:57] coyo: has joined #ruby
[21:30:00] zeroDivisible: has joined #ruby
[21:30:15] DEA7TH: makenoise: Yeah I'll do that, but that leaves the same problem for inside current_staff
[21:30:19] wolffles: has joined #ruby
[21:30:23] shevy: has joined #ruby
[21:30:35] DEA7TH: oh, then I can omit [self.] and rewrite it. nice
[21:30:37] gix: has joined #ruby
[21:30:45] thomas: has joined #ruby
[21:30:58] aspiers: has joined #ruby
[21:31:36] thomas: has joined #ruby
[21:32:20] coyo: has joined #ruby
[21:32:20] coyo: has joined #ruby
[21:33:27] wolffles: would this solve any case? https://eval.in/518585
[21:34:01] infernix: has joined #ruby
[21:35:25] dlitvak: has joined #ruby
[21:35:46] thomas1: has joined #ruby
[21:35:47] DEA7TH: wolffles: it's unclear what you mean by big/small and left/right coords
[21:36:37] DEA7TH: small as in minimum numbers for x/y coordinates?
[21:37:07] wolffles: the greater of the two pars of x,y or lesser of the 2 pairs of x,y
[21:38:02] llua: has joined #ruby
[21:38:05] trinaldi: has joined #ruby
[21:38:20] Mon_Ouie: Before thinking about rectangles, try thinking about how you'd solve the 1D version of the problem (finding the intersection of two ranges of numbers)
[21:39:17] wolffles: in the set of cords your given the first array is the bottom left corner, and the second array is the top right corner
[21:39:47] wolffles: oh i see what you mean of left and right
[21:39:49] askhat: has joined #ruby
[21:39:49] DEA7TH: but it's not necessarily the case that any of the rectangles will occupy a corner
[21:40:24] DEA7TH: if the first rectangle is said to take the top left corner, the other rectangle might be farther to the right, but above it; or farther to the left, but below it
[21:41:05] DEA7TH: unless you're flexible on which corner you're looking at - then you get a guarantee yeah
[21:41:35] wolffles: edited https://eval.in/518587
[21:41:55] wolffles: #DEA7TH: could you give me an example of the cords so i can see it visually
[21:42:23] patchedmonkey: has joined #ruby
[21:42:48] wolffles: lol position[1] not 2
[21:43:36] DEA7TH: wolffles: https://gist.github.com/VelizarHristov/d4957f7c0a4bd44f223a
[21:43:49] DEA7TH: 11111 - those are the two rectangles
[21:44:10] wolffles: yes it wouldnt return anything
[21:44:16] wolffles: ohh i see what your saying
[21:44:24] wolffles: okay ya cuz itll still return values
[21:44:30] DEA7TH: then you'd only have right and bottom left corners
[21:44:31] KensoDev: has joined #ruby
[21:44:46] DEA7TH: if you flip that with 90 degrees, you'd instead only have top left and bottom right
[21:45:27] mgorbach: has joined #ruby
[21:45:56] DEA7TH: but the intention was nice
[21:46:38] idefine: has joined #ruby
[21:47:40] millerti: has joined #ruby
[21:48:16] blackmesa: has joined #ruby
[21:48:48] DEA7TH: I'm referring to the corners of the grid btw
[21:49:12] futilegames: has joined #ruby
[21:50:53] mfb2: has joined #ruby
[21:51:59] millerti: has joined #ruby
[21:52:28] wolffles: the problem just got much harder
[21:52:53] wolffles: find a way to check to see if they overlap
[21:53:03] wolffles: dont tell me tho
[21:53:18] inkky: has left #ruby: ("Parted")
[21:58:08] sakix: has joined #ruby
[21:58:10] DEA7TH: starting out with overlapping lines is solid advice
[21:58:36] DEA7TH: try with an n-dimensional figure if you're feeling up for it :P
[21:59:14] duckpuppy: has joined #ruby
[22:00:01] JohnBat26: has joined #ruby
[22:01:16] Azure: has joined #ruby
[22:01:18] gregf: has joined #ruby
[22:04:11] dlitvak: has joined #ruby
[22:06:45] h99h9h88: has joined #ruby
[22:06:55] hays: im on a mac and want to make quick and dirty gui applicatoins. should i use tcl/tk or something else
[22:07:17] wolffles: no thank you on the n-dimensional figure #DEA7TH
[22:07:36] DEA7TH: it's easier than you think
[22:07:40] becker_11: has joined #ruby
[22:08:10] stevemackinnon: has joined #ruby
[22:08:13] DEA7TH: n-dimensional rectangle anyway
[22:08:29] wolffles: i dont think ive gotten that far mathmatically highest math ive done is calc or pre calc and that was years ago lol
[22:09:18] DEA7TH: no math prerequisites, if it works for n = 1-3 it should work for n > 3
[22:09:43] havenwood: hays: In the past the best bet would have been MacRuby, which shipped with OS X. Its successor, RubyMotion, has a $199 per year license to create OS X apps (unless you're a student or otherwise eligible for free).
[22:10:05] hays: hmm.. used 'shoes' ?
[22:10:12] havenwood: hays: Shoes4 on JRuby is another option: https://github.com/shoes/shoes4#readme
[22:10:55] stannard: has joined #ruby
[22:11:53] last_staff: has joined #ruby
[22:16:34] yqfvwal: has joined #ruby
[22:16:38] hays: havenwood: per year wow
[22:16:53] KnownSyntax: has joined #ruby
[22:17:00] KnownSyntax: has joined #ruby
[22:19:15] makenoise: has joined #ruby
[22:20:28] Xeago: has joined #ruby
[22:21:27] marr: has joined #ruby
[22:23:07] terminalrecluse: has joined #ruby
[22:25:20] benlieb: has joined #ruby
[22:26:03] dlitvak: has joined #ruby
[22:26:24] einarj: has joined #ruby
[22:28:06] idefine: has joined #ruby
[22:28:50] baweaver: has joined #ruby
[22:30:36] einarj_: has joined #ruby
[22:30:40] askhat: has joined #ruby
[22:31:04] nodejunkie: has joined #ruby
[22:32:34] Xeago: has joined #ruby
[22:32:38] JoshGlzBrk: has joined #ruby
[22:34:32] railsForDaiz: has joined #ruby
[22:35:41] becker_11: has left #ruby: ("WeeChat 1.4")
[22:37:57] Ishido: has joined #ruby
[22:38:42] benlieb: has joined #ruby
[22:40:29] dextertzu: has joined #ruby
[22:42:10] einarj: has joined #ruby
[22:42:42] zenlot1: has joined #ruby
[22:43:45] shevy: know what would be cool? if rubygems could also show the source code and files like github does
[22:47:43] Graphettion: has joined #ruby
[22:47:55] edwardly: has joined #ruby
[22:48:00] blur3d: has joined #ruby
[22:48:07] hays: havenwood: what about something more like ncurses
[22:48:39] edwardly: has joined #ruby
[22:49:06] tomaz_b: has joined #ruby
[22:50:29] Xeago: has joined #ruby
[22:50:48] einarj: has joined #ruby
[22:51:02] dlitvak: has joined #ruby
[22:51:03] millerti: has joined #ruby
[22:53:22] shevy: the suffering
[22:53:24] shevy: the children!!!
[22:54:25] einarj: has joined #ruby
[22:54:51] CloCkWeRX: has joined #ruby
[22:56:28] ElFerna_: has joined #ruby
[22:56:47] platzhirsch: has joined #ruby
[22:58:38] millerti: has joined #ruby
[22:59:59] duckpuppy: has joined #ruby
[23:00:39] jamw: has joined #ruby
[23:00:57] shevy: hays do not lose your sanity, stop before it is too late
[23:01:11] LuckyABA: has joined #ruby
[23:01:55] einarj_: has joined #ruby
[23:02:32] troulouliou_dev: has joined #ruby
[23:02:41] LuckyABA: has joined #ruby
[23:03:40] rsc___: has joined #ruby
[23:05:16] askhat: has joined #ruby
[23:05:55] einarj: has joined #ruby
[23:08:15] stannard: has joined #ruby
[23:09:43] ss_much: has joined #ruby
[23:09:43] p0p0pr37: has joined #ruby
[23:12:47] einarj: has joined #ruby
[23:13:30] sankaber: has joined #ruby
[23:14:08] shellie_: has joined #ruby
[23:14:51] Kryptonic: has joined #ruby
[23:15:21] Ebok: has joined #ruby
[23:16:43] pibby: has joined #ruby
[23:17:18] baweaver: has joined #ruby
[23:18:15] hjoest: has joined #ruby
[23:21:40] unreal: has joined #ruby
[23:24:29] JoshGlzBrk: has joined #ruby
[23:25:55] Ox0dea: shevy: gem unpack
[23:27:28] ziyadb: has joined #ruby
[23:27:37] drale2k: has joined #ruby
[23:28:01] shevy: Ox0dea I am living in the browser matrix
[23:29:05] patrick_star_11: has joined #ruby
[23:31:32] mickey_mouse: has joined #ruby
[23:31:40] tilllt: has joined #ruby
[23:31:42] yfeldblum: has joined #ruby
[23:32:25] stannard: has joined #ruby
[23:32:45] Ropeney: has joined #ruby
[23:34:32] millerti: has joined #ruby
[23:36:50] roshanavand: has joined #ruby
[23:37:26] askhat_: has joined #ruby
[23:38:20] pibby: has joined #ruby
[23:43:33] KnownSyntax: has joined #ruby
[23:43:35] KnownSyntax: has joined #ruby
[23:46:16] hakunin: has joined #ruby
[23:46:30] super5h33p: has joined #ruby
[23:47:01] super5h33p: has left #ruby: ()
[23:49:27] LoneHerm_: has joined #ruby
[23:52:46] dlitvak: has joined #ruby
[23:53:07] drale2k: Hey guys, i am playing with a GPS tracker from Teltonika (FM1100). I need to parse AVL Data which is sent in hex format
[23:55:01] dmolina: has joined #ruby
[23:55:23] drale2k: i have googled a ton but i can't find a ruby lib that parses Teltonika FM1100. Here is an example of data received https://gist.github.com/drale2k/497e49334e4cd80a3da9
[23:55:38] mhoungbo: has joined #ruby
[23:56:08] voidDotClass: has joined #ruby
[23:57:45] Gnut: has joined #ruby
[23:58:30] finisherr: has joined #ruby
[23:59:24] ElFerna_: has joined #ruby