Activity Graph

Page 1 of 4 | Next »


[18:56:22] wolffles: has joined #ruby
[21:18:05] wolffles: Quit: wolffles


[03:40:48] wolffles: has joined #ruby
[04:06:03] wolffles: i have to find the decimal value for “hello” where ‘a’ =0 ‘b’ = 1 … ‘z’ = 25, and somehow ‘bb’ = 27, ‘hello’ = 3276872 what formula do i use?
[04:08:57] wolffles: i was thinking that but this problem has the test saying that bb is 27
[04:09:19] wolffles: what gem is that?
[04:13:52] wolffles: think someone could help me wiht the formula? my head hurts from trying for so long
[06:16:40] wolffles: Quit: wolffles


[03:04:57] wolffles: has joined #ruby
[03:41:24] wolffles: Quit: wolffles


[01:28:46] wolffles: hey there guys im trying to use a craiglist bulk poster i found on github but im having trouble making it work.
[01:28:57] wolffles: is there anyone able to walk me through this?
[01:29:56] wolffles: this is the page https://github.com/boyhavoc/craigs_gem_pub
[01:31:21] wolffles: getting it to post
[01:35:19] wolffles: im assuming that aswell
[01:38:14] wolffles: my first problem is that $ruby file.rb returns an error which i dont understand
[01:38:54] wolffles: so someone told me to try ‘$bundle exec ruby file.rb’ and it works fine
[01:39:08] wolffles: but then the code itself doesnt post
[01:39:43] wolffles: Users/wolfgang/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- craigs_gem (LoadError)
[01:39:44] wolffles: from post1.rb:1:in `<main>'
[01:39:44] wolffles: from /Users/wolfgang/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
[01:43:42] wolffles: ill give it a try
[06:25:51] wolffles: Quit: wolffles
[12:50:01] wolffles: has joined #ruby
[12:54:56] wolffles: Quit: wolffles
[13:43:07] wolffles: has joined #ruby
[17:51:06] wolffles: Quit: wolffles


[17:30:48] wolffles: has joined #ruby
[20:10:37] wolffles: Quit: wolffles
[22:37:24] wolffles: has joined #ruby


[07:39:48] wolffles: has joined #ruby
[10:11:14] wolffles: Quit: wolffles
[10:22:15] wolffles: has joined #ruby
[10:59:57] wolffles: Quit: wolffles


[00:41:56] wolffles: Quit: wolffles


[21:14:09] wolffles: has joined #ruby
[21:16:13] wolffles: would this be considered bad practice? array.combination(2).find{|a,b| array[a] + array[b] == 0};rescue
[21:19:12] wolffles: if i used rescue to return nil?
[21:25:26] wolffles: rescuing a typeError. examples would be array=[1,3,5] & array[1,3,5,-3]. and its just the indexes are the requirement for the practice.
[21:28:19] wolffles: this is what i get when array = [1,3,5] “TypeError: nil can't be coerced into Fixnum”
[21:29:46] wolffles: so i used rescue to escape it. just wondering if that is good practice cuz ive read some arguements online.
[21:31:34] wolffles: yeah it was werid to me too but i found you can use the values to find the indices within the block, instead of using more methods to convert them to the index
[21:33:59] wolffles: its just one of those practice problems
[21:34:12] wolffles: here i have 3 different solutions
[21:34:14] wolffles: https://eval.in/572305
[21:37:22] wolffles: believe it or not it passes the tests
[21:38:25] wolffles: like i said i found out you can return indexes buy doing array[element] within the block
[21:40:24] wolffles: pipework: permutation would return the same solution twice just reversed
[21:40:33] wolffles: i dont need repeats


[05:26:19] wolffles: has joined #ruby
[06:41:36] wolffles: Quit: wolffles


[04:54:38] wolffles: has joined #ruby
[04:58:09] wolffles: :”+” => :+ how to x = “+” ; :+x => :+
[04:58:25] wolffles: idk if that makes sense
[08:44:24] wolffles: Read error: Connection reset by peer


[01:53:08] wolffles: Quit: wolffles
[02:31:30] wolffles: has joined #ruby
[02:33:33] wolffles: Client Quit
[02:37:02] wolffles: has joined #ruby
[03:11:41] wolffles: Quit: wolffles
[03:49:58] wolffles: has joined #ruby
[04:40:35] wolffles: i cant seem to initialize this subclass and its method. https://eval.in/551858 can someone show or explain to me how to make it work?
[04:56:17] wolffles: baweaver: yeah i was getting frustrated and put the subclass inside the parent class the end is at the bottom
[05:05:23] wolffles: i havent had to use classes until last week
[05:05:31] wolffles: and im absolutly lost
[05:08:17] wolffles: i cant find an indepth tutorial that go beyond the basics
[05:09:11] wolffles: im looking at it
[05:27:25] wolffles: soo i tried to apply what went wrong in my example to my actual problem and im still getting unitiialized constant… what am i doing wrong this time? https://eval.in/551874
[05:37:46] wolffles: shevy: :D thank you! i was losing it lol
[06:05:54] wolffles: Ox0dea: does it have to be <=> and succ? or can i name them anything?
[06:18:33] wolffles: so these are called mixin?
[07:42:53] wolffles: Quit: wolffles


[23:56:32] wolffles: has joined #ruby


[02:49:36] wolffles: has joined #ruby
[02:58:39] wolffles: remember me guys?
[07:15:17] wolffles: Quit: wolffles
[18:33:29] wolffles: has joined #ruby
[19:07:44] wolffles: can someone explain to me why the parameter needs to be n = 1 … if you call repeter(3) isnt n = 3? so it doesnt really matter what you set the default value to right? https://eval.in/550324
[19:10:03] wolffles: apeiros: repeater(n) was my first trial test fails
[19:11:07] wolffles: executes the default block - failed
[19:12:06] wolffles: the spec just calls it doesnt it? i dont get the question
[19:12:43] wolffles: passes just a reg integer
[19:12:50] wolffles: it "executes the default block 3 times" do
[19:12:51] wolffles: repeater(3) { n += 1 }
[19:12:53] wolffles: expect(n).to eq(3)
[19:15:08] wolffles: i guess what im confused about is what it means by default block? is it the “block_was_executed” block? or the {n += 1}
[19:16:38] wolffles: tobiasvl: no.
[19:16:53] wolffles: i understand the default block failed
[19:17:16] wolffles: ive been thinkign this was the default block { block_was_executed = true }
[19:17:27] wolffles: im starting to think its {n +=1}
[19:19:08] wolffles: line 10 failed
[19:19:22] wolffles: in ‘repeater'
[19:23:07] wolffles: okay im looking at my command line and its using a diff spec cuz i just copied and pasted to eval
[19:23:26] wolffles: its the first test that fails
[19:23:42] wolffles: the one that is named "executes the default block"
[19:23:55] wolffles: is that right?
[19:25:33] wolffles: without a parameter and the default value is 0 then right?
[19:25:53] wolffles: which means the block was never invoked?
[19:40:25] wolffles: apeiros: thanks for the help, i understand arguments much more now and how to read spec
[21:43:22] wolffles: Quit: wolffles


[02:41:19] wolffles: Quit: wolffles


[22:18:56] wolffles: has joined #ruby


[21:00:16] wolffles: has joined #ruby
[22:45:42] wolffles: Quit: wolffles


[01:03:48] wolffles: has joined #ruby
[03:16:13] wolffles: Quit: wolffles


[15:36:13] wolffles: has joined #ruby
[15:42:57] wolffles: how to break Prime.include? #non-prime
[15:43:10] wolffles: and just return false?
[15:52:12] wolffles: apeiros: i ran include? on an infinate range that will never return true. how would i break the loop
[18:35:10] wolffles: Quit: wolffles


[01:46:55] wolffles: has left #ruby: ()


[00:47:10] wolffles: has joined #ruby
[00:49:18] wolffles: how would you call multiple values from a hash
[00:57:02] wolffles: mm so hash= {a=>1, b=>2 c=>3} and i want to get [1,2,3] using a,b,c with out doing hash[a] 3 times #manveru
[00:58:58] wolffles: no no values_at is what i needed
[00:59:42] wolffles: there isnt a way to do somehting like hash[:a,:b,:c] ?
[02:47:27] wolffles: Quit: wolffles


[00:54:47] wolffles: Quit: wolffles


[22:52:36] wolffles: has joined #ruby
[22:54:30] wolffles: because your not comparing
[22:54:45] wolffles: your assigning a variable with the second one
[22:55:11] wolffles: or if your trying to add “test” to this than you cant use =
[22:58:42] wolffles: because this[0]
[22:58:57] wolffles: isnt defined
[22:59:35] wolffles: after you define it as an array you can set it to “test”
[23:00:18] wolffles: or this= Array.new
[23:02:19] wolffles: i assume its cuz it cant tell if its an array or something else
[23:02:56] wolffles: like it could be this == “this” but not this == [“this”]
[23:03:43] wolffles: it has to do with classes i think ….. haha idk tho im self taught
[23:10:23] wolffles: how do you run code like that through chat? >>
[23:10:32] wolffles: >> testing = “test”
[23:13:02] wolffles: >> a = “b”
[23:13:31] wolffles: >> a = ‘b’
[23:14:03] wolffles: i dont understand what smart quotes mean. do i not add quotes then?
[23:14:57] wolffles: >>a = ‘’b’’
[23:15:22] wolffles: this is harder than ruby!
[23:15:47] wolffles: i see the difference
[23:16:05] wolffles: i just dont know how to change it
[23:18:48] wolffles: maybe later im trying to upgrade to 2.3 on my mac but uhh the guides i look up all tell me something different
[23:18:59] wolffles: any advice?
[23:20:24] wolffles: ruby 2.3.0?
[23:21:12] wolffles: really now. k the world doesnt make sense anymore
[23:21:33] wolffles: ive have since changed the subject :P
[23:21:57] wolffles: i said id fix that later. im trying to upgrade to 2.3.0 any advice?
[23:25:25] wolffles: how about RVM?
[23:40:55] wolffles: oh rvm was easy :D


[00:06:59] wolffles: how do you read a number with 2 decimals
[02:08:37] wolffles: Quit: wolffles


[23:46:48] wolffles: has joined #ruby


[02:35:32] wolffles: Quit: wolffles


[00:08:20] wolffles: please explain why my code doesnt work :[ https://eval.in/518367
[00:10:01] wolffles: well its the only way i can think of
[00:12:39] wolffles: its an exception on the ???guidelines???
[05:17:21] wolffles: i dont think its codeacademys fault?
[05:18:32] wolffles: ;D you know
[08:12:37] wolffles: Quit: wolffles
[17:15:15] wolffles: has joined #ruby
[18:25:52] wolffles: Quit: wolffles
[21:30:19] wolffles: has joined #ruby
[21:33:27] wolffles: would this solve any case? https://eval.in/518585
[21:37:07] wolffles: the greater of the two pars of x,y or lesser of the 2 pairs of x,y
[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: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:48] wolffles: lol position[1] not 2
[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: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
[22:07:17] wolffles: no thank you on the n-dimensional figure #DEA7TH
[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:03:05] wolffles: has joined #ruby
[22:40:42] wolffles: im having trouble finding a method that i can use to compare 2 consecuitive values and return it only if all the pairs match
[22:48:43] wolffles: nah each_cons is what i need
[22:49:06] wolffles: how do i compare the two
[22:52:56] wolffles: so ary.each_cons(2) { #check if x < y}.all? true
[22:53:28] wolffles: thats what im trying to do :D
[22:54:25] wolffles: oh no i got it
[22:54:37] wolffles: ary.each_cons(2).all?{|a.b| a < b }
[22:58:01] wolffles: its called ordered vowels
[23:03:49] wolffles: yes those pass :P


[22:59:43] wolffles: i want beef stew going to the store :P
[22:59:53] wolffles: has left #ruby: ()


[06:13:45] wolffles: im just messing around with different solutions
[06:17:59] wolffles: it was one of the first methods that came to mind
[06:18:14] wolffles: but please teach :3
[06:19:31] wolffles: i simplified the code so it doesnt confuse
[06:19:51] wolffles: my code works except for that one error
[06:20:20] wolffles: cuz i ran the test
[06:20:48] wolffles: https://eval.in/516085
[06:21:10] wolffles: see i simplified it
[06:21:25] wolffles: im not good at your wizardry Ox0dea
[06:21:40] wolffles: it is to me :[
[06:21:54] wolffles: you cant literally see my thought process in my code
[06:27:45] wolffles: hey thanks j416
[06:27:52] wolffles: that fixed it :D
[06:28:01] wolffles: and Ox0dea ill give that a try
[06:30:57] wolffles: ill let you know tomorrow
[06:31:07] wolffles: my head hurts from looking at my code
[06:31:56] wolffles: i cry every time you do that
[06:32:26] wolffles: more like saddness from all the insanity
[06:33:53] wolffles: its getting more compact every day
[06:35:07] wolffles: and i didnt know its possible to new line and method like that
[07:06:45] wolffles: what would you do about it ?
[07:07:31] wolffles: like use different methods?
[07:11:45] wolffles: why stop there
[07:11:59] wolffles: why not divide the work load each of you call 2 more friends
[07:12:27] wolffles: time wise its faster
[07:14:55] wolffles: but thats just one example
[07:15:03] wolffles: imagine having to do it multiple times
[07:16:11] wolffles: not that easy tho
[08:28:52] wolffles: Quit: wolffles
[18:46:57] wolffles: has joined #ruby
[18:54:36] wolffles: i thought this would return more than one value but it doesnt. does count only return 1 value?
[18:54:40] wolffles: https://eval.in/516626