« Back to channel list

#ruby - 11 September 2018

« Back 1 day Forward 1 day »
[00:02:27] eckhardt_: has joined #ruby
[00:08:15] ramfjord: has joined #ruby
[00:08:20] Xiti: has joined #ruby
[00:12:33] cagomez: has joined #ruby
[00:14:06] renkon: has joined #ruby
[00:14:22] ramfjord: has joined #ruby
[00:14:41] renkon: hi, when creating a Proc with a block with 1 argument, result matches what i´m expecting. However, when I add a second argument to my block, it will always return false. any idea why?
[00:15:35] cagomez_: has joined #ruby
[00:16:14] renkon: this is the code: https://dpaste.de/3Lor . when adding another parameter to the block it will always return false
[00:16:18] mistergibson: has joined #ruby
[00:16:56] havenwood: renkon: Show the example that returns false?
[00:17:08] renkon: like, just editing | original_list | to | original_list , something_else |
[00:17:34] havenwood: renkon: And you're also changing how the proc is being called?
[00:18:04] havenwood: renkon: Are you then calling the proc with two arguments, since you added a second?
[00:18:09] bmurt: has joined #ruby
[00:18:36] havenwood: renkon: When you say it returns false, do you mean returns falsey? I'm assuming it's just: nil
[00:18:48] havenwood: renkon: Procs don't have strict arity like lambdas.
[00:19:02] havenwood: >> proc { |a, b| b }.call 42
[00:19:07] renkon: havenwood: https://dpaste.de/Uy0e (updated with the method that is being used inside). this is how the class invokes the proc: https://dpaste.de/pMJC and last but not least here's a test: https://dpaste.de/0KHs
[00:19:32] havenwood: >> lambda { |a, b| b }.call 42
[00:19:44] havenwood: #!> ArgumentError: wrong number of arguments (given 1, expected 2)
[00:21:46] renkon: isn't it like: Lambdas check the number of arguments, while procs do not
[00:22:36] renkon: [2] pry(main)> Proc.new { |a, b| b }.call 42
[00:22:42] havenwood: renkon: There are a few differences between procs and lambdas, but one of this is indeed that lamdas balk when you call them with the wrong number of args and procs return `nil`.
[00:22:54] renkon: indeed, but i'm not using a lambda. i'm using a proc
[00:23:01] redlegion: has joined #ruby
[00:23:11] havenwood: renkon: Right, so if you add an arg, but don't call it with that arg, the arg will be `nil`.
[00:23:13] havenwood: I said it badly.
[00:23:28] havenwood: renkon: With a lambda, you'd get an argument error for the missing arg.
[00:23:35] havenwood: renkon: With a proc, the missing arg is nil.
[00:23:42] havenwood: (Which is falsey.)
[00:24:04] renkon: indeed, second argument would be falsy, but then why would all the rest be false too?
[00:24:10] havenwood: renkon: I'm just guessing you're adding a second proc arg, but not providing a second argument when calling it.
[00:24:29] apeiros: has joined #ruby
[00:24:52] havenwood: renkon: I don't know why it'd change the return value of your proc altogether offhand. Have you been able to simplify it to a test case that shows off the issue or only just seeing it with your full code at this point?
[00:25:23] havenwood: renkon: You're not actually using the second proc argument?
[00:25:51] havenwood: renkon: Did you just add the second argument as a first step towards actually doing something, and that inexplicably caused things to fail?
[00:26:13] havenwood: renkon: Is it just destructuring your Array test? What's failing?
[00:26:22] renkon: havenwood: yes. I'm planning to add a second argument to call basically, and when adding it to the block of list method, it automatically goes falsy for all cases
[00:26:30] havenwood: renkon: Ahhh
[00:26:33] renkon: and yes, it's making list(..).call(...) return false
[00:26:44] havenwood: renkon: All of the tests?
[00:26:49] renkon: all of the *list* tests.
[00:26:59] renkon: some don't fail cause they expect it to be false
[00:27:38] havenwood: >> proc { |a, b| b }.call [1, 2]
[00:27:47] havenwood: renkon: ^ it's destructuring the Array arg
[00:28:50] havenwood: >> proc { |a| a }.call [:x, :y] #=> [:x, :y]
[00:28:52] havenwood: proc { |a, b| a }.call [:x, :y] #=> :x
[00:29:40] renkon: is there any mechanism so as not to break the array and treat it as a single parameter?
[00:34:15] havenwood: renkon: It's one of the reasons I prefer lambdas.
[00:34:55] havenwood: renkon: You can always call the proc with two arguments.
[00:35:23] havenwood: renkon: Destructuring won't occur unless they're an argument mismatch.
[00:35:53] renkon: ok i will try to use a lambda then.
[00:36:37] havenwood: renkon: A lambda would be the most explicit. But with a lambda you'll also have to call it with the actual number of arguments.
[00:36:47] renkon: just to be sure, can i create a lambda of type "CombinableProc", which is like a "son" of Proc class?
[00:36:48] patr0clus: has joined #ruby
[00:37:16] renkon: and, havenwood, could I use default values for lambdas? or that's unallowed? No problem if that's the case, because my CombinableProc would default a nil value for it otherwise.
[00:37:47] orbyt_: has joined #ruby
[00:38:21] havenwood: renkon: Yes, you can use default values with lambdas.
[00:38:46] havenwood: renkon: And it'd prevent destructuring, so the Array would appear together as the first arg.
[00:39:22] havenwood: renkon: A default value wouldn't work with a proc, since it'd still destructure.
[00:39:45] havenwood: I mean default values work with procs generally, but not in this case where you're trying to prevent the destructuring.
[00:39:51] renkon: last question: how would I be able to create a lambda of type CombinableProc (class that extends Proc)?
[00:41:09] brandoncc: has joined #ruby
[00:50:52] havenwood: renkon: Interestingly a proc can't become a lambda, even if it's wrapped in a lambda.
[00:51:22] havenwood: renkon: I don't know an OO way to inherit from a lambda proc offhand.
[00:51:23] renkon: i found that I can use .extend at least with a module, that might do the trick
[00:51:24] havenwood: >> lambda(&proc {}).lambda?
[00:58:35] krawchyk: has joined #ruby
[01:03:14] akem: has joined #ruby
[01:09:28] johnny56: has joined #ruby
[01:23:20] apeiros: has joined #ruby
[01:25:57] renkon: thank you very much havenwood your help has been really useful
[01:26:03] cagomez: has joined #ruby
[01:26:20] havenwood: renkon: you're welcome, any time
[01:28:26] renkon: and now it's the last question regarding context, do you have any idea why does this happen: https://i.imgur.com/gDiA0ZF.png
[01:28:49] renkon: when I set J to some value, it shows that value, and if i force 'self.j' it would work as expected.
[01:29:06] renkon: its like context is being mixed up
[01:29:46] dar123: has joined #ruby
[01:30:42] esrse: has joined #ruby
[01:30:50] LiftLeft: has joined #ruby
[01:31:43] havenwood: renkon: Either `j()` or `self.j` will explicitly call the method, otherwise the local variable has precedence.
[01:32:18] renkon: OK, I'll write it down, thank you very much for everything.
[01:36:27] akem: has joined #ruby
[01:46:59] gnufied: has joined #ruby
[02:18:54] kotepillar_: has joined #ruby
[02:19:48] sparc: has joined #ruby
[02:21:02] sparc: I'm confused about hashes in Ruby.
[02:21:02] sparc: Why is it I need to reference keys as hash[:key_name]?
[02:21:02] sparc: When I use hash['key_name'] I get nil.
[02:22:36] sparc: For instance: https://dpaste.de/7rv8
[02:23:21] apeiros: has joined #ruby
[02:23:46] akem: has joined #ruby
[02:23:53] havenwood: sparc: 'peep' and :peep are different things
[02:24:20] havenwood: sparc: Rails has a thing called HashWithIndifferentAccess, but regular Hashes distinguish between Symbols and Strings.
[02:24:50] havenwood: sparc: 'peep' == :peep #=> false
[02:24:57] sparc: I guess I need to make sure I'm constructing the hash with string keys.
[02:25:07] sparc: If that's possible
[02:25:19] havenwood: sparc: Yes, you can use whatever you want as a key.
[02:25:22] sparc: Thanks, havenwood
[02:25:30] havenwood: sparc: Things that aren't immutable are preferable, but it's not mandatory.
[02:25:43] havenwood: are immustable**
[02:25:48] havenwood: sparc: no prob
[02:27:15] kotepillar_: has joined #ruby
[02:32:18] arescorpio: has joined #ruby
[02:34:09] ramfjord: has joined #ruby
[03:00:52] akemot: has joined #ruby
[03:05:14] sspreitz: has joined #ruby
[03:10:07] braincrash: has joined #ruby
[03:18:30] kotepillar_: has joined #ruby
[03:24:45] akemot: has joined #ruby
[03:24:51] apeiros: has joined #ruby
[03:26:45] akemot: has joined #ruby
[03:29:53] chamunks: has joined #ruby
[03:34:33] gix: has joined #ruby
[03:37:24] cpruitt: has joined #ruby
[03:40:05] kotepillar_: has joined #ruby
[03:42:35] dellavg_: has joined #ruby
[03:44:17] bga57: has joined #ruby
[04:02:16] titanmaru: has joined #ruby
[04:06:12] _whitelogger: has joined #ruby
[04:06:28] knight33: has joined #ruby
[04:11:43] akem: has joined #ruby
[04:14:15] akem: has joined #ruby
[04:29:24] DTZUZO: has joined #ruby
[04:39:36] Furai: has joined #ruby
[04:47:32] cpruitt: has joined #ruby
[04:50:57] dionysus69: has joined #ruby
[04:55:22] kotepillar_: has joined #ruby
[05:21:01] reber: has joined #ruby
[05:25:42] apeiros: has joined #ruby
[05:25:46] graphene: has joined #ruby
[05:30:08] kotepillar_: has joined #ruby
[05:33:37] MoritaShinobu: has joined #ruby
[05:38:32] cpruitt: has joined #ruby
[05:51:59] kapil___: has joined #ruby
[06:00:23] cpruitt: has joined #ruby
[06:14:16] Nicmavr: has joined #ruby
[06:24:32] apeiros: has joined #ruby
[06:31:54] aupadhye: has joined #ruby
[06:39:45] aupadhye: has joined #ruby
[06:40:29] Freshnuts: has joined #ruby
[06:46:52] sauvin: has joined #ruby
[06:52:37] yohji: has joined #ruby
[06:53:24] cpruitt: has joined #ruby
[07:03:44] Beams: has joined #ruby
[07:05:41] crankharder: has joined #ruby
[07:06:24] clemens3_: has joined #ruby
[07:15:23] aupadhye: has joined #ruby
[07:17:57] dionysus69: has joined #ruby
[07:19:04] kotepillar_: has joined #ruby
[07:21:08] aufi: has joined #ruby
[07:22:50] mikecmpbll: has joined #ruby
[07:22:55] bak1an: has joined #ruby
[07:24:02] apeiros: has joined #ruby
[07:24:44] kotepillar_: has joined #ruby
[07:26:46] graphene: has joined #ruby
[07:31:00] cpruitt: has joined #ruby
[07:33:40] dionysus70: has joined #ruby
[08:08:14] tuor: has joined #ruby
[08:08:52] jottr: has joined #ruby
[08:08:58] jokke: has joined #ruby
[08:09:12] tuor: hi, I have installed the rvm package from the ppa: ppa.launchpad.net/rael-gc/rvm/ubuntu/.
[08:10:10] Knappe: Hi, i've asked this question yesterday already but I can't scroll up far enough to see if I got an answer. Can anybody recommend a gem for chatting in IRC? I know there is cinch but I believe, since it's a bot framework, it could be overkill. All I need to do is connect to a IRC channel, sned a bunch of messages, evaluate the replys and disconnect again.
[08:10:47] graphene: has joined #ruby
[08:11:23] tuor: Now I have tried to install ruby with rvm, but I got a lot of erros like this: tar: binscripts: Cannot utime: Operation not permitted
[08:11:48] RougeR: has joined #ruby
[08:12:18] tuor: What could be the problem?
[08:14:47] Knappe: Seems like a permission issue. Try with sudo maybe
[08:18:41] johnny56: has joined #ruby
[08:20:46] tuor: Knappe: did the trick thx.: rvmsudo rvm get stable
[08:22:12] dr3wo: has joined #ruby
[08:22:46] apeiros: has joined #ruby
[08:23:57] tuor: Knappe: checkout https://freenode.irclog.whitequark.org/ruby/2018-09-10 for the history of yersturday
[08:24:31] tuor: s/yersturday/yesterday
[08:24:51] Knappe: cool thanks
[08:27:25] tuor: found it in the channel description. ;)
[08:30:55] cpruitt: has joined #ruby
[08:34:00] tuor: :) -> ruby-2.5.1 - #compiling.....
[08:34:45] lxsameer: has joined #ruby
[08:46:31] ramfjord: has joined #ruby
[08:52:18] aufi_: has joined #ruby
[08:54:16] kotepillar_: has joined #ruby
[08:54:33] NL3limin4t0r: Hey all, I'm trying to write a gem for Rails. (Don't worry this question is not specificly Rails related.) I want to prepend my module to an existing Rails module. This works fine, however the module is included before my gems prepends itself to that module. This in turn means that my prepended module is never called. What's the best way to resolve this? Should I just prepend the class that includes the module?
[08:54:35] NL3limin4t0r: Or is there some way to make an inclution more like a reference (adopting futere changes to the module)?
[08:54:44] NL3limin4t0r: Let me provide you with an easy example:
[08:55:07] NL3limin4t0r: >> module A; def hello; puts 'hello from a';
[08:55:26] NL3limin4t0r: ^ oops, wasn't done yet
[08:57:30] NL3limin4t0r: >> module A; def hello; puts 'hello from a'; end; end; class Foo; include A; end; module B; A.prepend self; def hello; super; puts 'hello from b'; end; end; Foo.new.hello
[08:57:55] kotepillar_: has joined #ruby
[08:58:51] NL3limin4t0r: ACTION pokes ruby[bot]
[09:00:32] NL3limin4t0r: #=> hello from a
[09:01:21] dionysus69: has joined #ruby
[09:02:40] mikecmpbll: has joined #ruby
[09:02:47] NL3limin4t0r: So this negates the prepended module, because A was included before B was prepended. If I were to reopen Foo and include A again the result would be: "hello from a\nhello from b"
[09:12:36] cpruitt: has joined #ruby
[09:16:24] NL3limin4t0r: Formated example: https://dpaste.de/UREw
[09:22:21] maufart__: has joined #ruby
[09:36:45] roshanavand: has joined #ruby
[09:39:35] roshanavand: has joined #ruby
[09:40:44] mememeIAMME: has joined #ruby
[09:41:09] mememeIAMME: Is there somebody who could help me with some code?
[09:41:16] mememeIAMME: Very simple program
[09:42:30] im0nde: has joined #ruby
[09:43:19] im0nde: Hi, I'm using rvm with 2.5.1. Installed pkg-config gem successfully, but the executable cant be found.
[09:43:35] im0nde: Do I need to do something to allow gem executables to be found?
[09:43:58] dionysus69: do you mean wrappers?
[09:44:08] im0nde: While building the native extensions for the gem gruff, it fails due to missing pkg-config
[09:44:17] im0nde: dionysus69:
[09:44:26] im0nde: but the gem is installed
[09:44:58] im0nde: (I can see pkg-config in gem list)
[09:45:12] mememeIAMME: Line 8 is never being executed, anybody know why? https://dpaste.de/c9XT
[09:45:21] dionysus69: just type whereis pkg-config?
[09:46:05] im0nde: dionysus69: no results
[09:46:50] im0nde: dionysus69: I would prefer not to install system-wide packages, but rvm-managed gems
[09:47:37] dionysus69: just do gem install pkg-config
[09:47:56] im0nde: dionysus69: I did that, it runs successfull
[09:48:01] dionysus69: it won't be systemwide, it will be part of that specific ruby version assigned by rvm in that moment
[09:48:25] im0nde: dionysus69: right, but I can'f find it even though it is installed
[09:48:28] dionysus69: where is pkg-config should then return results, if not then maybe something specific is happening for that package
[09:49:11] dionysus69: whereis rails returns for me for example: rails: /home/user/.rvm/gems/ruby-2.5.1/bin/rails
[09:49:53] dionysus69: im0nde: ohh, maybe you are typing the name of the gem incorrectly, try with underscore
[09:50:38] im0nde: dionysus69: no, it seems the executables are not fould. Do I have to modify the path?
[09:50:55] dionysus69: no no, ok let me try install that gem
[09:52:05] im0nde: In the end my goal is to install gruff, but it does not find pkg-config.
[09:52:19] im0nde: running pkg-config in the shell gives "command not found"
[09:52:33] dionysus69: for me it returns Must specify package names on the command line
[09:53:12] mememeIAMME: Hi, I am trying to learn ruby for an upcoming interview. I am more used to C# so this is quite new. I haven't had problems until now, creating a program that removes vowels from a string if the vowel is at a odd number index. This is not only returning nil, but line 8 isn't running at all. https://dpaste.de/c9XT
[09:53:21] dionysus69: where is returns pkg-config: /usr/bin/pkg-config /usr/lib/pkg-config.multiarch /usr/share/man/man1/pkg-config.1.gz, but from what I see it may conflict with system package, not sure
[09:53:22] im0nde: what does "which pkg-config" return dionysus69 ?
[09:53:36] dionysus69: - /usr/bin/pkg-config
[09:53:57] im0nde: dionysus69: So you have installed it system-wide then
[09:53:59] dionysus69: which is not a ruby gem, it has to conflict with OS package
[09:54:16] pradhvan: has joined #ruby
[09:54:18] dionysus69: if it were installed by rvm it had to be in home dir .rvm
[09:54:57] dionysus69: im0nde: I just deleted gem and still returns that path
[09:55:46] pradhvan: Hey I am facing a problem " WARNING: You don't have /root/.gem/ruby/2.5.0/bin in your PATH," when I try to install jekyll
[09:56:28] pradhvan: I tried adding PATH=$PATH:/home/pradhvan//.gem/ruby/2.5.0/bin export PATH to the bashrc but it does not work
[09:56:37] pradhvan: Can anyone help ? Thanks :)
[09:57:24] im0nde: dionysus69: soo... what do I have to do?
[09:57:53] mememeIAMME: I'm having a hard time getting help as well, don't feel bad.
[09:58:09] dionysus69: no idea im0nde, I would check rvm dir for that gem manually, you cannot rely on env var $PATH
[09:58:55] mememeIAMME: pradhvan I don't think many people are active at the moment.
[09:59:14] NL3limin4t0r: mememeIAMME: Your if statement is incorrect. You currently have `if vowels.include? str[i] && i.odd?` This will first execute `str[i] && i.odd?` which has either `true` or `false` as result. Than checks if `vowels` include this result.
[09:59:24] NL3limin4t0r: This is always false
[09:59:47] NL3limin4t0r: The line should be `if vowels.include?(str[i]) && i.odd?`
[10:00:57] mememeIAMME: NL3limin4t0r Ah I assumed the && would seperate them, I'm used to using () on everything now that I don't have to I am getting confused. Thanks!
[10:01:54] pradhvan: mememeIAMME, I agree I guess. Can you look at it ?
[10:02:43] NL3limin4t0r: mememeIAMME: Your while isn't very ruby-ish. You can replace it with `str.each_char.with_index do |c, i|`
[10:03:07] dr3wo: has joined #ruby
[10:04:10] mememeIAMME: pradhvan Does this article include a solution? https://github.com/jekyll/jekyll-docs/issues/5
[10:04:57] mememeIAMME: NL3limin4t0r Interesting, I'm not quite understanding the meaning of all that but I'll stare at it for a few minutes and sure to get it haha
[10:05:20] pradhvan: mememeIAMME, it's totally different
[10:05:31] mememeIAMME: NL3limin4t0r So it loops through every character that has an index?
[10:05:51] mememeIAMME: NL3limin4t0r Which would be... all of them
[10:06:09] NL3limin4t0r: mememeIAMME: see http://ruby-doc.org/core-2.5.1/String.html#method-i-each_char, http://ruby-doc.org/core-2.5.1/Enumerator.html#method-i-with_index
[10:06:12] mememeIAMME: NL3limin4t0r c would be the character and i the index
[10:07:59] NL3limin4t0r: It loops through all characters, `with_index` part adds the index to the loop starting from 0 by default.
[10:08:23] c0ncealed2: has joined #ruby
[10:09:23] mememeIAMME: NL3limin4t0r so with_index is basically the i in " for(int i = 0; i < x; i++) "
[10:09:43] NL3limin4t0r: Is ruby[bot] up??
[10:10:28] NL3limin4t0r: mememeIAMME: yep
[10:10:29] pradhvan: Has anyone else faced the issue of path ?
[10:10:39] sticaz: has joined #ruby
[10:11:28] mememeIAMME: pradhvan My help consists solely on googling, I am very new to ruby. Sorry :(
[10:11:57] mememeIAMME: pradhvan I literally pasted your error into google, dunno what else to do.
[10:12:13] NL3limin4t0r: pradhvan: in your question above you say that you've added the path to "bashrc" I guess you mean ".bachrc"
[10:12:24] pradhvan: mememeIAMME, I haven't written a single line of ruby , just want to run jelkyll server locally
[10:12:33] mememeIAMME: Thank you NL3limin4t0r
[10:13:04] NL3limin4t0r: have you already restarted the terminal, or sourced ".bashrc" from the terminal? Otherwise changes aren't in effect.
[10:13:13] pradhvan: NL3limin4t0r, you meant .bashrc right ?
[10:13:26] mememeIAMME: pradhvan What version of jeckyll are you trying to use?
[10:13:37] akem: has joined #ruby
[10:13:44] pradhvan: mememeIAMME, jekyll-3.8.3
[10:14:23] NL3limin4t0r: pradhvan: yep, now I'm making typos myself xD
[10:16:16] mememeIAMME: pradhvan Ruby -v and gem -v are you using versions 2.2.5 ?
[10:16:22] pradhvan: NL3limin4t0r, i pasted this https://dpaste.de/46gx and closed the terminal and ran this source ~/.bashrc
[10:17:16] pradhvan: mememeIAMME, ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] and gem is 2.7.7
[10:17:42] mememeIAMME: pradhvan https://jekyllrb.com/docs/installation/ Says it requires 2.2.5
[10:18:05] mememeIAMME: I guess newer should work too..
[10:18:23] pradhvan: mememeIAMME, 2.2.5 and above it says
[10:18:42] mememeIAMME: pradhvan Sorry, I must need sleep.
[10:19:19] pradhvan: mememeIAMME, it's afternoon where I live
[10:19:33] mememeIAMME: pradhvan 5 in the morning here lol
[10:19:57] pradhvan: mememeIAMME, getting a taste of dev life :-P
[10:20:25] NL3limin4t0r: The exports in my .bashrc do it in a single line and have quotes, I don't know if that makes a differance: `export PATH="$PATH:$HOME/.gem/ruby/2.5.0/bin"`
[10:20:45] pradhvan: I am trying to fix a PR on github and need to see the changes I made I Need to run the server
[10:20:52] mememeIAMME: pradhvan Definately. Trying to get in as much studying as I can. Need in the IT industry, have an interview with AppAcademy on Monday so I'm trying to learn a whole new language in a week 0.0
[10:21:29] mememeIAMME: pradhvan The transition from C++ and C# to Ruby is quite odd.
[10:22:10] pradhvan: mememeIAMME, haha I tried C++ for a month in college than I found Python never mover since :-P
[10:23:26] mememeIAMME: pradhvan I've noticed a lot of similarities between python and ruby, too bad I only studied python for 2 days.
[10:24:30] pradhvan: NL3limin4t0r, did not work :(
[10:25:04] pradhvan: mememeIAMME, I have been doing it for 2 years now and hopefully will doing a lot more professionally
[10:25:29] mememeIAMME: pradhvan Do you have a programming job?
[10:25:51] pradhvan: mememeIAMME, will be graduating this year
[10:26:01] pradhvan: so I guess will have one in future
[10:26:30] mememeIAMME: pradhvan Awesome! I dropped out after 2 weeks :) It was too boring
[10:26:52] mememeIAMME: pradhvan And that's why I am a Machinist
[10:26:56] pradhvan: mememeIAMME, engineering ?
[10:27:04] EnderMB: has joined #ruby
[10:27:41] pradhvan: mememeIAMME, I will be finishing 4 years now of CS hahaha
[10:28:19] mememeIAMME: pradhvan I have nothing but admiration for you. You must be a very patient human
[10:28:37] EnderMB: Hey all, I've got a small Rubocop question. If I have a test that is throwing a RSpec/DescribeClass error on a line similar to "describe command('bash ...') ...", what would be the best way to resolve this to describe what is tested?
[10:28:42] pyrmont: mememeIAMME: && has higher precedence and so your conditional won't work the way that you think it will. It's evaluating str[i] && i.odd? before it then calls include?. You need to put parentheses around str[i].
[10:29:34] pradhvan: mememeIAMME, :)
[10:29:46] mememeIAMME: ppyrmont Yes, NLimin4t0r helped me out with that. This language is quite different than what I am used to. Thank you
[10:29:59] pyrmont: No worries.
[10:30:17] pyrmont: Was just skimming the history.
[10:30:44] mememeIAMME: Anybody have experience with AppAcademy?
[10:32:17] pradhvan: has left #ruby: ("Leaving")
[10:32:21] akem: has joined #ruby
[10:33:17] aupadhye: has joined #ruby
[10:39:04] akem: has joined #ruby
[10:39:28] jottr: has joined #ruby
[10:41:18] akemot: has joined #ruby
[10:46:51] roshanavand: has joined #ruby
[10:46:52] ramfjord: has joined #ruby
[10:47:42] apeiros: has joined #ruby
[10:48:32] roshanavand: has joined #ruby
[10:48:53] roshanavand: has joined #ruby
[10:58:18] bak1an: has joined #ruby
[11:02:12] mikecmpbll: has joined #ruby
[11:03:17] TvL2386: has joined #ruby
[11:03:45] TvL2386: has joined #ruby
[11:05:58] roshanavand: has joined #ruby
[11:08:59] cpruitt: has joined #ruby
[11:09:32] kotepillar_: has joined #ruby
[11:24:56] jottr: has joined #ruby
[11:25:16] NL3limin4t0r: has joined #ruby
[11:32:31] jmcgnh: has joined #ruby
[11:36:45] akemot: has joined #ruby
[11:37:44] AJA4350: has joined #ruby
[11:43:52] VladGh: has joined #ruby
[12:01:40] nowhere_man: has joined #ruby
[12:10:00] CrazyEddy: has joined #ruby
[12:12:24] CustosLimen: has joined #ruby
[12:12:27] thy0: has joined #ruby
[12:12:40] CustosLimen: I used to take all of these dirs and put them in path "${HOME}/.gem/ruby/*/bin"
[12:12:59] CustosLimen: but it seems gem does not install them there anymore
[12:13:03] CustosLimen: or maybe my gemrc is wrong
[12:13:29] snickers: has joined #ruby
[12:15:36] MoritaShinobu: has joined #ruby
[12:18:09] DTZUZO: has joined #ruby
[12:19:06] gnufied: has joined #ruby
[12:22:02] graphene: has joined #ruby
[12:30:15] thy0: has joined #ruby
[12:37:35] lyr: has joined #ruby
[12:39:25] lyr: Hey. Quick question just for my curiosity, I'm not looking for a solution : I tried a hotfix on a gitlab (ruby + passenger), it didn't showed up when tested straight away. Is there a cache or compilation mecanism (like *.py => *.pyc file for python) in ruby ?
[12:45:51] gnufied: has joined #ruby
[12:47:15] ramfjord: has joined #ruby
[12:49:33] RougeR: has joined #ruby
[12:51:00] sonne: lyr: i think passenger reloads the app based on triggers, such as touching config.ru. just picking from very old memories though.
[12:56:53] jottr: has joined #ruby
[12:58:19] znz_jp: has joined #ruby
[13:02:23] mikecmpbll: has joined #ruby
[13:06:36] knight33: has joined #ruby
[13:21:01] kotepillar_: has joined #ruby
[13:22:03] zapata: has joined #ruby
[13:26:49] jnix: has joined #ruby
[13:29:50] vonfry: has joined #ruby
[13:30:09] akemot: has joined #ruby
[13:31:19] gr33n7007h: has joined #ruby
[13:35:36] leitz: has joined #ruby
[13:38:16] bak1an: has joined #ruby
[13:39:36] donofrio: has joined #ruby
[13:43:46] fluxAeon: has joined #ruby
[13:48:52] Azure: has joined #ruby
[13:49:03] Inline: has joined #ruby
[13:50:25] Inline: has joined #ruby
[13:56:17] DLSteve_: has joined #ruby
[13:57:43] SeepingN: has joined #ruby
[13:57:59] tristanp: has joined #ruby
[13:58:46] argoneus: has joined #ruby
[14:04:00] lomex: has joined #ruby
[14:04:53] gnufied: has joined #ruby
[14:10:25] aupadhye: has joined #ruby
[14:10:47] brodul: has joined #ruby
[14:13:10] orbyt_: has joined #ruby
[14:18:26] argoneus: has joined #ruby
[14:21:35] chouhoulis: has joined #ruby
[14:34:47] thejs: has joined #ruby
[14:37:04] ramfjord: has joined #ruby
[14:44:09] desperek: has joined #ruby
[14:53:37] argoneus: has joined #ruby
[15:01:29] bmurt: has joined #ruby
[15:04:34] Puffball: has joined #ruby
[15:05:08] mikecmpbll: has joined #ruby
[15:05:46] nowhere_man: has joined #ruby
[15:08:11] knight33: has joined #ruby
[15:10:14] akem: has joined #ruby
[15:11:16] argoneus: has joined #ruby
[15:14:18] z64: this is really stumping me. rubocop is claiming that `Bar` in `module Foo::Bar` is missing a top level docs comment in a specific file (`Bar` spans multiple files). However, YARD renders just fine, and we do exactly this with other modules and it does not trigger a warning..
[15:21:04] brandoncc: has joined #ruby
[15:23:26] argoneus: has joined #ruby
[15:24:20] bomb: has joined #ruby
[15:29:56] bijan_: has joined #ruby
[15:31:44] bmurt: has joined #ruby
[15:37:32] tenderlove: has joined #ruby
[15:45:09] thejs: has joined #ruby
[15:50:24] Emmanuel_Chanel: has joined #ruby
[15:54:20] conta1: has joined #ruby
[15:54:30] MoritaShinobu: has joined #ruby
[15:55:20] fluxAeon: has joined #ruby
[15:56:28] rippa: has joined #ruby
[15:57:26] chouhoulis: has joined #ruby
[16:00:51] dionysus70: has joined #ruby
[16:03:33] cagomez: has joined #ruby
[16:07:24] brandoncc: has joined #ruby
[16:10:53] lxsameer: has joined #ruby
[16:14:17] Synthead: has joined #ruby
[16:15:50] bijan_: has joined #ruby
[16:15:56] lxsameer: has joined #ruby
[16:17:43] cthulchu: has joined #ruby
[16:22:13] lxsameer: has joined #ruby
[16:27:33] Synthead: I added BUNDLE_BUILD__BYEBUG='--with-cflags=-Wno-error=attributes' to my environment, and "bundle config" confirms that it's in there. However, when I run "bundle", it still raises an error when compiling byebug: https://gist.github.com/synthead/59d70a500a17f2df751dc5891b44ed63
[16:28:08] Synthead: If I cd to the byebug gem sources, edit Makefile and tack -Wno-error=attributes in there, "make" works
[16:28:11] Synthead: What am I missing?
[16:36:06] thejs: has joined #ruby
[16:37:03] [Butch]: has joined #ruby
[16:44:28] bijan_: has joined #ruby
[16:45:08] donofrio: has joined #ruby
[16:48:39] arand: has joined #ruby
[16:54:01] Nicmavr: has joined #ruby
[17:01:03] lxsameer: has joined #ruby
[17:01:50] cagomez: has joined #ruby
[17:05:28] hays_: has joined #ruby
[17:05:35] hays_: how does !true work?
[17:05:39] hays_: I was looking at :!.methods
[17:06:05] hays_: and it seems like :!.send_public(true) won't do it
[17:06:23] cagomez: has joined #ruby
[17:07:36] DTZUZO: has joined #ruby
[17:07:59] bijan_: has joined #ruby
[17:08:26] johnny56: has joined #ruby
[17:08:42] hays_: nvermind.
[17:10:51] havenwood: hays: You found unary operators?
[17:12:16] havenwood: hays: class TrueClass; def !@; 42 end end; !true #=> 42
[17:13:31] havenwood: the operator is highest precedence: https://ruby-doc.org/core/doc/syntax/precedence_rdoc.html
[17:14:01] havenwood: >> class TrueClass; def +@; false end end; !+true
[17:15:20] baweaver: ....waitasecond
[17:15:26] baweaver: havenwood: bad ideas are coming
[17:15:32] baweaver: well, worse than I had last night: https://github.com/baweaver/hesh
[17:15:40] havenwood: baweaver: i saw that!
[17:15:48] baweaver: Quick little toy
[17:15:59] baweaver: Going to Fog City Ruby tonight?
[17:16:05] havenwood: baweaver: i kept misreading it: Heck.of_infinite_hash
[17:16:08] havenwood: baweaver: yup!
[17:16:29] baweaver: Danged parking lot is filling up 20m earlier than normal, so working remote until around 3-4ish when everyone bails
[17:16:53] havenwood: My zip line got me here quickly!
[17:18:04] bak1an: has joined #ruby
[17:18:06] baweaver: I always thought ! was just a keyword, forgot unaries exist
[17:19:22] bijan_: has joined #ruby
[17:21:38] ski7777: has joined #ruby
[17:23:10] bak1an_: has joined #ruby
[17:24:24] mroutis: has joined #ruby
[17:24:33] mikecmpbll: has joined #ruby
[17:26:48] bak1an: has joined #ruby
[17:29:44] eckhardt_: has joined #ruby
[17:30:17] bijan_: has joined #ruby
[17:41:01] lxsameer: has joined #ruby
[17:41:14] bijan_: has joined #ruby
[17:41:30] eman0n: has joined #ruby
[17:42:53] graphene: has joined #ruby
[17:45:13] jottr: has joined #ruby
[17:46:01] lxsameer: has joined #ruby
[17:46:48] cagomez: has joined #ruby
[17:48:25] ivanskie: has joined #ruby
[17:48:46] Fusl: has joined #ruby
[17:51:02] lxsameer: has joined #ruby
[17:52:12] bijan_: has joined #ruby
[17:53:01] ramfjord: has joined #ruby
[18:01:16] dinfuehr: has joined #ruby
[18:02:28] cagomez: has joined #ruby
[18:03:12] bijan_: has joined #ruby
[18:07:15] illuzion: has joined #ruby
[18:08:26] roshanavand: has joined #ruby
[18:14:04] Pierreb: has joined #ruby
[18:14:46] bijan_: has joined #ruby
[18:22:51] j0bk: has left #ruby: ("Leaving")
[18:25:54] bijan_: has joined #ruby
[18:29:13] SeepingN: has joined #ruby
[18:30:51] lxsameer: has joined #ruby
[18:31:36] Mike11: has joined #ruby
[18:37:01] bijan_: has joined #ruby
[18:39:52] IanMalcolm: has joined #ruby
[18:41:57] nowhere_man: has joined #ruby
[18:46:35] cagomez: has joined #ruby
[18:47:20] graphene: has joined #ruby
[18:48:36] bijan_: has joined #ruby
[18:50:50] graphene: has joined #ruby
[18:54:18] cagomez: has joined #ruby
[19:00:13] bijan_: has joined #ruby
[19:04:18] cagomez: has joined #ruby
[19:04:39] graphene: has joined #ruby
[19:07:19] thejs: has joined #ruby
[19:11:42] bijan_: has joined #ruby
[19:13:13] RougeR: has joined #ruby
[19:13:54] chouhoulis: has joined #ruby
[19:22:26] dellavg_: has joined #ruby
[19:23:04] bijan_: has joined #ruby
[19:23:56] chouhoulis: has joined #ruby
[19:26:40] graphene: has joined #ruby
[19:34:45] bijan_: has joined #ruby
[19:35:05] dviola: has joined #ruby
[19:36:43] cd: has joined #ruby
[19:44:29] beowuff: has joined #ruby
[19:46:03] jottr: has joined #ruby
[19:46:21] bijan_: has joined #ruby
[19:52:23] sagax: has joined #ruby
[19:57:21] audy: baweaver: <3 .of_infinite_hash
[19:57:50] bijan_: has joined #ruby
[20:02:11] sameerynho: has joined #ruby
[20:05:24] bak1an: has joined #ruby
[20:05:53] herbmillerjr: has joined #ruby
[20:08:40] graphene: has joined #ruby
[20:09:28] bijan_: has joined #ruby
[20:16:28] nowhereman: has joined #ruby
[20:19:08] jottr: has joined #ruby
[20:26:52] graphene: has joined #ruby
[20:28:48] bijan_: has joined #ruby
[20:39:45] bijan_: has joined #ruby
[20:40:49] bsamorim: has joined #ruby
[20:41:14] bsamorim: Guys, is there any solid ruby lib to manage forever-running background jobs?
[20:42:02] bsamorim: Resque-schedule doesn't seem to offer that feature
[20:51:18] bijan_: has joined #ruby
[20:51:18] jottr: has joined #ruby
[21:02:01] Fusl: has joined #ruby
[21:02:27] bijan_: has joined #ruby
[21:04:52] illuzion: has joined #ruby
[21:10:34] sticaz: has joined #ruby
[21:13:40] bijan_: has joined #ruby
[21:18:53] akem: has joined #ruby
[21:21:44] graphene: has joined #ruby
[21:24:39] bijan_: has joined #ruby
[21:24:53] Azure: has joined #ruby
[21:27:18] moei: has joined #ruby
[21:28:50] thejs: has joined #ruby
[21:32:31] mroutis: has joined #ruby
[21:35:53] bijan_: has joined #ruby
[21:43:35] eckhardt_: has joined #ruby
[21:47:35] bijan_: has joined #ruby
[21:52:56] bijan_: has joined #ruby
[22:03:57] duderonomy: has joined #ruby
[22:05:54] illuzion: has joined #ruby
[22:07:03] akemot: has joined #ruby
[22:12:17] weaksauce: has joined #ruby
[22:14:46] bijan_: has joined #ruby
[22:23:37] graphene: has joined #ruby
[22:40:05] audy: bsamorim: what do you mean forever-running?
[22:40:13] audy: if it's forever-running then it's a process not a job, no?
[22:40:21] bijan_: has joined #ruby
[22:47:31] bijan_: has joined #ruby
[22:47:37] zapata: has joined #ruby
[22:48:48] cagomez: has joined #ruby
[22:51:34] cagomez_: has joined #ruby
[22:52:33] jottr: has joined #ruby
[22:53:52] bijan_: has joined #ruby
[22:55:22] Azure: has joined #ruby
[23:05:27] bijan_: has joined #ruby
[23:06:32] lxsameer: has joined #ruby
[23:11:46] patr0clus: has joined #ruby
[23:16:29] thy0: has joined #ruby
[23:16:44] bijan_: has joined #ruby
[23:18:43] johnny56: has joined #ruby
[23:24:25] thy0: has joined #ruby
[23:31:59] bijan_: has joined #ruby
[23:36:34] bijan__: has joined #ruby
[23:38:33] beeman: has joined #ruby
[23:40:53] bijan_: has joined #ruby
[23:42:17] druonysus: has joined #ruby
[23:50:46] dar123: has joined #ruby
[23:53:54] bijan_: has joined #ruby
[23:59:30] j0bk: has joined #ruby