baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://gist.github.com | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
alfiemax has joined #ruby
felix_vs has joined #ruby
felix_vs has quit [Client Quit]
lxsameer has joined #ruby
eckhardt has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
this_dude has joined #ruby
<this_dude> howdy folks
<this_dude> gonna do my first attempt at the ruby exam today...im terrified
<havenwood> this_dude: good luck!
<this_dude> someone screen share with me and help ahahaha
<this_dude> i have team viewer lmao
<Radar> this_dude: which ruby exam?
za1b1tsu has joined #ruby
<Radar> I thought there was multiple levels like silver / gold
<this_dude> i have entrance exams for appacademy to go to coding school for free
<Radar> Oh those.
<this_dude> lmao havenwood
<this_dude> those? :'(
<this_dude> you know about them or what D:
<Radar> I know of them.
<Radar> I've never done them.
<Radar> Could probably pass them tho
postmodern has joined #ruby
mroutis has joined #ruby
eckhardt_ has joined #ruby
apparition47 has joined #ruby
<Radar> this_dude: ok. pop quiz. Write some code to return the hash that has the email "me@ryanbigg.com": https://gist.github.com/radar/6380938f6e11fa8cabb9c2685b43e6cb
lxsameer has quit [Ping timeout: 260 seconds]
<baweaver> Radar ???
eckhardt has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
za1b1tsu has quit [Ping timeout: 256 seconds]
<mroutis> Radar, I didn't understand, maybe I'm late to the conversation
<Radar> mroutis: OK. In that gist there's an array. I want you to write some code that takes that array and returns the hash that contains email: "me@ryanbigg.com"
<Radar> so the return value should be { email: "me@ryanbigg.com", answer: 1 }
<baweaver> user y'mean?
<baweaver> or do you also want to mod the key?
<Radar> uh, yueah
<Radar> user, not email
<Radar> keep the key as-is
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mroutis> array.first { |x| x[:user] == 'me@ryanbigg.com' }
<this_dude> that wouldnt be on my exam
<mroutis> Radar? ^
<this_dude> they said hashes wont be on there
<Radar> this_dude: oh.
<Radar> this_dude: what _is_ on the exam then
<baweaver> users.find(user: 'me@ryanbigg.com') # Hehehehe - https://bugs.ruby-lang.org/issues/14869
<Radar> mroutis: also: spoilers.
s2013 has joined #ruby
<Radar> mroutis: I wouldn't call the variable x.
<mroutis> oh sh... didn't think about spoilers
<mroutis> sorry
<Radar> mroutis: tyvm now I have to think of a new question
* Radar strains
<this_dude> hey whats the way to check if a number is in a range of nums?
<this_dude> a.range?(b,c)
<this_dude> ?
<baweaver> this_dude: Remember IRB
<mroutis> this_dude, should I tell you? or send you a gist?
<mroutis> I don't know if this is part of the quizz
<mroutis> hehehe
<baweaver> Test your code before asking.
<this_dude> just tell me lul
<this_dude> its not
<this_dude> the quiz will need me to write an entire method
<mroutis> range.include? number
<this_dude> oh
<this_dude> range.include? a
<mroutis> [1..10].include? 3
<al2o3-cr> this_dude: (x..y).cover?(z)
<baweaver> Uh
<mroutis> how do you tell IRC ruby bot to execute some code?
<baweaver> >> (1..10).include?(3)
<ruby[bot]> baweaver: # => true (https://eval.in/1045837)
<baweaver> array brackets shouldn't work with that mroutis
<al2o3-cr> splat it
<baweaver> al2o3-cr
<baweaver> wanna see something fun?
<al2o3-cr> sure
<mroutis> that's true, baweaver, I don't know what I was thinking about
<baweaver> behold, and shield thine eyes
ogres has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
<this_dude> youre using === again baweaver
<this_dude> omg xD
<this_dude> luckily i read the stuff you sent me
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> baweaver: TIL, didn't know this either ;)
<this_dude> ok so
<this_dude> i have 60 minutes to answer 3 questions
<this_dude> you guys ready?
<baweaver> To be fair I realized it this morning, tried it, and oh man.
<this_dude> im gonna use you as a resource ahahaha
eckhardt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<mroutis> this_dude, could you give us more context? is this an interview for a job?
<baweaver> That wouldn't exactly be very straightforward now would it?
<this_dude> no
<this_dude> i have to pass 2 exams to get into a coding school
<this_dude> you're 'supposed' to be able to pass with little to no coding experience
<this_dude> but i call bs
<this_dude> these methods are intense
<mroutis> call bs too, indeed
<this_dude> basically i was given 10 days to learn the basics of ruby well enough to code methods and pass the 2 exams
<this_dude> i get 3 tries
<this_dude> im gonna use my first one now to scout out the test
<this_dude> ready guys? D:
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mroutis> are you working fulltime? what did you do with your leasure time, this_dude ? :eyes:
<this_dude> i studied my butt off wdym
<this_dude> im pretty good now ask baweaver
<this_dude> but y'all are my trump card
<mroutis> woah, congrats, this_dude
<this_dude> in case i get stuck hehe
<this_dude> anyways here goes nothin
s2013 has joined #ruby
<mroutis> bring it on
baweaver is now known as lemur
<this_dude> wait not that
<this_dude> ok first problem
<this_dude> write a method that takes an array of numbers and multiplies each number by its position in the array and returns the sum
<this_dude> let me see if i can figure it out
<this_dude> yall keep the answer just in case
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Radar> show us yours :)
<this_dude> im giving myself 20 minutes
<this_dude> cause its 60 minutes and 3 questions
<this_dude> someone ping me if i go over time without coming back here
<this_dude> pls
<mroutis> this_dude, 2 min per question, flash it, dude
dukedave has joined #ruby
r29v has quit [Quit: r29v]
<this_dude> omg omg omg omg
<this_dude> IM TRYING TO DO IT WITH MAPPING AND ITS HARD
<mroutis> it gets easier, this_dude
<mroutis> but you gotta do it everyday
<mroutis> that's the hard part
<mroutis> </quote>
<Radar> no answers plz folks
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<this_dude> guys pls
<this_dude> would that work?
<this_dude> it doesnt give me a way to check
<this_dude> or can someone simplify that with mapping pls
<Radar> this_dude: You're on a computer. Plug it into the irb prompt.
<lemur> IRB
<mroutis> write code to test it and run that code
<Radar> lemur: too slow
<lemur> D:
<this_dude> okokokokok
chouhoulis has joined #ruby
<Radar> Try it in irb. That will let you know if it works.
<Radar> You're lucky here. You know the expected input and output.
<mroutis> chill, Radar, this isn't the west, or is it? :b
<Radar> mroutis: it is
<Radar> mroutis: depends on your perspective though. One person's west is another person's east.
<lemur> Well we can leave the west to you
<this_dude> guys please
<this_dude> i dont have time for everyone to be cryptic
chouhoulis has quit [Remote host closed the connection]
<this_dude> is this correct or not
<lemur> y'know we're not being cryptic.
<mroutis> this_dude, IRB is not being cryptic
<mroutis> IRB is your friend
<lemur> If you have Ruby installed, you can run IRB to try your code
<lemur> we've been over this more than once.
<this_dude> idk how to do thatttttt
<this_dude> i have 6 minutes to finish this one
<this_dude> im terrible under pressure
<this_dude> please
<this_dude> omg
<mroutis> google "how to use IRB"
<mroutis> use your google foo
Creatornator has joined #ruby
<lemur> we're not going to give you answers, you do realize.
<this_dude> WHYYY
<lemur> because that'd be cheating.
<mroutis> https://www.youtube.com/watch?v=lPXWt2ESxVY (the flaming lips - do you realize??)
<this_dude> THATS THE POINT
<this_dude> since when are coders so ethical omgggggggg
<mroutis> this is the west, cowboy, we don't cheat here...
<this_dude> i have 4 minutes
<lemur> This channel is
lemur is now known as baweaver
<this_dude> BAWEAVER YOU SLY DOG
<this_dude> well i think its right
<this_dude> so im submitting it
<this_dude> since noone will help me chec
<this_dude> when i fail
<this_dude> ill be back here to cry
<baweaver> This is why we said to learn IRB
<this_dude> :)
<mroutis> chill and read the docs
<this_dude> next problem
<this_dude> i dont even understand what its asking me for
za1b1tsu has joined #ruby
<this_dude> nvm i understand it
<this_dude> but have no idea where to even start to code that wtf
tag has quit [Quit: Connection closed for inactivity]
<this_dude> you guys have no mercy
<this_dude> please..
<this_dude> im begging you
lxsameer has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
<this_dude> ?
<mroutis> test it, boi
<baweaver> IRB
<this_dude> dude
<this_dude> omg
<mroutis> blind coding is fun but you need to run it at some point
<this_dude> its not working
<this_dude> please tell me whats wrong w it
<this_dude> blind coding isnt fun when its AN EXAM
<mroutis> the interpreter should tell
<this_dude> I DONT USE ONE
<this_dude> I RUN IT THROUGH MY COMMAND LINE
<this_dude> HA I GOT IT OMG
<this_dude> IM A GOD
<this_dude> AHAHA
<this_dude> im going a little crazy
<this_dude> srry
<this_dude> okay last problem
<this_dude> wtf looooool
<this_dude> this one will be the death of me
<this_dude> i have 29 mins to code it
lxsameer has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
arescorpio has joined #ruby
vonfry has joined #ruby
<this_dude> question
<this_dude> how do i put in an array
<this_dude> in irb a
<this_dude> as a response to a gets statement
<baweaver> you don't need gets
<baweaver> just type it in
<this_dude> dude
<this_dude> when i test code
<this_dude> i type it up in notepad
<this_dude> and then run it through my command prompt
<this_dude> with ruby program.rb
<mroutis> you can use "puts" to write to STDOUT, so you can see some output
kapil___ has joined #ruby
<this_dude> for example i have to add this to the end of all of my code
<this_dude> but when my gets is asking for an array of numbers idk how to enter it in my command line without getting an error
<Radar> popcornnnn\
AnLog has quit [Ping timeout: 240 seconds]
<baweaver> Radar: be nice
<Radar> yes boss
<this_dude> ???
<this_dude> ok guys so
<this_dude> this is my last problem
<this_dude> i think i got it but
<this_dude> i have an issue
<Radar> ?enternotspace
<ruby[bot]> Radar: I don't know anything about enternotspace
<Radar> ruby[bot]: c'mon.
<this_dude> it gives me the right answers
<this_dude> but
<this_dude> it does this
<Radar> this_dude: Stop using enter like a spacebar plzkthx
<this_dude> sorry ok
<Radar> this_dude: So with your code... I hope you're formatting it with two-space indentation rather than copying + pasting what you have in those screenshots.
<Radar> this_dude: and it's better to share code at gist.github.com
<this_dude> so
<Radar> this_dude: last warning regarding enter-as-a-spacebar.
<this_dude> my problem is my result is coming back like this http://prntscr.com/kgfdv8
<this_dude> but i need it to come back as an array
<this_dude> i used .to_a
<Radar> this_dude: last warning regarding code output as a screenshot too.
<this_dude> and its still doing that
<this_dude> wait what theres no rule saying i CANT
<Radar> Srsly. Last warning.
<this_dude> it just says when pasting more than 3 lines
<baweaver> Ze hat is out! Ze hat is out!
* baweaver ducks
<this_dude> never says anything about a screenshot
lxsameer has quit [Ping timeout: 260 seconds]
baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://gist.github.com - no screenshots | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
<mroutis> Radar just raised the ban hammer
* baweaver whistles
<this_dude> wow
lxsameer has joined #ruby
<this_dude> changes the rule because i found a loophole
<this_dude> nice
<Radar> !mute this_dude
<Radar> Ok, timeout for you.
<Radar> Maybe don't argue with the ops?
Xiti` is now known as Xiti
<baweaver> Rules are listed, just elided in the channel topic for space reasons.
baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://gist.github.com | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
AJA4350 has quit [Ping timeout: 256 seconds]
dr_blackjack has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dr_blackjack has quit [Remote host closed the connection]
this_dude has quit [Quit: Page closed]
vonfry has quit [Quit: WeeChat 2.2]
wmoxam has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
<Radar> !unmute this_dude
lxsameer has joined #ruby
chouhoulis has joined #ruby
FrankyCyborg has joined #ruby
baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
AJA4350 has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
r3my has joined #ruby
scrptktty has quit [Quit: Connection closed for inactivity]
<r3my> Hi, so I’m trying to solve a balanced brackets koan and am running into a problem with a particular case that I’m stumped on
<r3my> Here’s my code so far https://dpaste.de/mgne
<r3my> I have a class level method that’s signature looks like this: `Brackets.paired?(“{]”)`
<r3my> The "{]” test case fails for me and I’m unsure as to how to deal with it
<r3my> I understand why it fails…but not how to get around it
lxsameer has quit [Ping timeout: 240 seconds]
nicesignal has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
za1b1tsu has joined #ruby
fluxAeon has quit [Quit: Textual IRC Client: www.textualapp.com]
alfiemax has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
za1b1tsu has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 256 seconds]
fluxAeon has joined #ruby
s2013 has joined #ruby
RootSudo has joined #ruby
Creatornator has joined #ruby
<RootSudo> What would be good VM specs for a 500 user webapp on Ruby 2.3, Rails 5.1.1, MySQL, React+Jquery,NodeJS and deabating on Heroku
this_dude has joined #ruby
<this_dude> am i still muted
<this_dude> i failed the test
<RootSudo> nah not muted
<this_dude> kk
tdy has quit [Ping timeout: 240 seconds]
Aetherical has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
jetchisel has quit [Quit: "Unfortunately time is always against us" -- * Morpheus*]
AJA4350 has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r29v has joined #ruby
AJA4350 has joined #ruby
r29v has quit [Client Quit]
ciro has quit [Quit: WeeChat 2.2]
Aetherical has quit [Quit: Page closed]
lxsameer has joined #ruby
<mroutis> RootSudo, is rough to say, as it depends on what the app does and how efficient it performs
alfiemax has quit [Ping timeout: 240 seconds]
<mroutis> why don't you try it on a Heroku and run a load test
<this_dude> is anyone still on
<this_dude> i really need help
bmurt has joined #ruby
<mroutis> what do you need, this_dude?
<mroutis> did you tried to help yourself before asking?
orbyt_ has joined #ruby
<this_dude> yes
<this_dude> i looked it up
<this_dude> but to no avail
samort7 has joined #ruby
mroutis has quit [Remote host closed the connection]
<samort7> I am trying to learn ftp on a simple ruby file (no rails), but when I do require 'net/ftp' it says "no such file to load" - what am I missing?
<this_dude> its basically what i was asking about earlier..i tried to look it up..when creating a method that asks for an array as an input i cant seem to get the command line to take in my input as an array instead of a string
<this_dude> ive tried changing it in the coding as gets.to_a and ive tried inputting it in the command line as [1,2,3]
<this_dude> but i still get the same error stating that my input is being read as a string
cadillac_ has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
alfiemax_ has joined #ruby
<al2o3-cr> this_dude: use eval(gets)
<this_dude> so i would put numbers=eval(gets)?
<al2o3-cr> this_dude: yep.
<this_dude> hmm new info..thanks
chouhoulis has quit [Remote host closed the connection]
<this_dude> oh shoot now its stuck in an endless loop
<this_dude> oh nvm my code is wrong
braincrash has quit [Quit: bye bye]
humam has quit [Quit: leaving]
braincrash has joined #ruby
<Radar> wb this_dude
humam has joined #ruby
<Radar> this_dude: so you failed the test?
<Radar> this_dude: do you still have a copy of the questions?
gix has quit [Disconnected by services]
<this_dude> so uh
<this_dude> it was 3 questions
<this_dude> i got one wrong which == fail...i just asked a friend about the one i was pretty sure i got wrong
<this_dude> i forgot to put +1...thats literally it
<this_dude> im very angry with myself
<Radar> this_dude: hmmm maybe you should've followed this channel's advice 🤔
<Radar> oh well too late now 🤷🏻‍♂️
<this_dude> which was?
<Radar> 1. Gist.
<Radar> 2. Enter not space.
<Radar> 3. Try your code in IRB.
<this_dude> i just now learned how to input an array into the command line
<this_dude> which means i was just now able to check my code from the first question
<Radar> Can you show me the code from the first question?
<this_dude> my answer? or the problem
<Radar> Everything.
<this_dude> so i dont have a copy of the questions but i remember them and i have my code saved...so the first problem was to create a method that takes in an array and returns a sum of (the numbers in the array times their position in the array)
<this_dude> and i used this line
<this_dude> sum = (numbers[i] * i) + sum
<Radar> Ok. An array like: [1,2,3,4,5], and that would then be: [1 * 0, 2 * 1, 3 * 2, 4 * 3, 5 * 4]?
<this_dude> when it shouldve been
<this_dude> sum = (numbers[i] * (i+1)) + sum
<this_dude> corect
<Radar> this_dude: but that can'tve been all of your code. Show me the rest please.
<Radar> For instance, you are not defining `numbers` in that code of yours.
<this_dude> let me uh...figure out how to use gist again gimme a sec ill paste the link here
<Radar> this_dude: dpaste.de or hastebin.com is better if you don't have a GH login
<this_dude> just saw that
<Radar> Ta.
<this_dude> super useful thanks for the change
<this_dude> oh shoot it also shouldn't have been "while i<= numbers.length" should it ...should just been <
<this_dude> shouldve*
<Radar> >> [1,2,3,4,5].with_index
<ruby[bot]> Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Radar> >> [1,2,3,4,5].with_index
<Radar> ruby[bot]: no.
<ruby[bot]> Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Radar> >> [1,2,3,4,5].each_with_index
<ruby[bot]> Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<this_dude> i understand how indexing works
<Radar> Ok. I give up on ruby[bot].
<this_dude> 1 == 0
<Radar> [1,2,3,4,5].each_with_index.to_a
<Radar> => [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4]]
<Radar> this_dude: Do you see that this then gives you a 2D array with the numbers you want?
<this_dude> yeah
<baweaver> Radar: nice hat
<Radar> this_dude: [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4]].map { |e, i| e * i }
<this_dude> oh hey weaver..
<this_dude> im not supposed to know how to use .map
<this_dude> for the test
<Radar> um
<Radar> okayyyyyyy
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> I'm not supposed to know a lot of things
<this_dude> i need to be able to write it out the long way
<baweaver> I know them anyways
<Radar> that's a crap test
<baweaver> Then people give me magic internet points
<Radar> ok, so without map...
s2013 has joined #ruby
<al2o3-cr> this_dude: https://eval.in/1045848
<this_dude> wait isnt that exactly what i had^?
<Radar> And then with ONLY each: https://gist.github.com/radar/000459fd3ce634accd44cfba200f0e20... but this is not idiomatic Ruby at all. I would go as far as to say it is idiotic Ruby.
<this_dude> radar im not supposed to know how to do that
<this_dude> actually...i DONT know how to do that
<baweaver> >> def map(list, &fn) new_list = []; list.each { |v| new_list.push(fn.call(v)) }; new_list end; map([1,2,3]) { |v| v * 2 } # :D
<ruby[bot]> baweaver: # => [2, 4, 6] (https://eval.in/1045849)
<baweaver> bot likes me
<this_dude> @al203-cr isnt that the same as mine? except you incremented the sum in a different way
* baweaver sticks out tongue at Radar
<Radar> baweaver: well done you've gone and blown this guy's brain.
<this_dude> literally
<this_dude> wtf is that
<Radar> this_dude: al2o3-cr actually indented his code correctly...
<baweaver> map!
<al2o3-cr> this_dude: you're incrementing the index outside of the loop
<al2o3-cr> well, trying.
<this_dude> i just saw that
<Radar> Yeah there is that too.
<this_dude> why are you incrementing inside the loop?
<Radar> because i needs to increase as you move through the elements of the array
<Radar> otherwise you only increment it once.
<Radar> and actually your while loop wouldn't finish.
<this_dude> shoot
<Radar> Well this has been fun but I have other things to do. Bye.
<this_dude> okay..
<this_dude> later @radar
<baweaver> def map(list, &fn) return [] if list.empty?; head, *tail = list; [fn.call(head)].concat(map(tail, &fn)); end; map([1,2,3]) { |v| v * 2 }
<baweaver> :D
<baweaver> No each!
lxsameer has joined #ruby
<this_dude> wtf are you saying lol
<al2o3-cr> lol =D
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> the idiomatic way would be something like this; [10,20,30,40,50].map.with_index { |n, i| n * i }.sum
NightMonkey has quit [Quit: ZNC - http://znc.in]
<this_dude> oh al203
<this_dude> its also * (i+1)
lxsameer has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<this_dude> nevermind no its not
lxsameer has joined #ruby
duderonomy has joined #ruby
NightMonkey has joined #ruby
<this_dude> wow so i literally got that question wrong because i incremented i outside of the loop..
<this_dude> i feel like a moron
<zenspider> this_dude: hah. we've all done it
s2013 has joined #ruby
<zenspider> al2o3-cr: (10..50).step(10) ...
<this_dude> im so mad dude...
<this_dude> at myself ofc
<this_dude> i didnt notice because i was busy panicking during the exam
<zenspider> eh. no reason to beat yourself up. we've all done it. even in exams. it's a learning experience
<this_dude> should i just take the test again?
<this_dude> is there anyone still online to help me if i need it
thy0 has quit [Quit: TTFN]
maryo has joined #ruby
<this_dude> i guess thats a no :/
<al2o3-cr> this_dude: it's 4:45am here and have to be up in a few hours. but if you're here later i can give you a helping hand.
<al2o3-cr> i need my 40 winks ;)
lxsameer has quit [Ping timeout: 260 seconds]
<this_dude> alright...ill probably be up around 14 hours from now to try the test again
lxsameer has joined #ruby
<al2o3-cr> zenspider: i always forget Integer#step too :(
<al2o3-cr> anyway, away with the fairies i go, chow for now.
<this_dude> goodnight
<al2o3-cr> o/
<this_dude> talk to you tomorrow when i get ready to fail again lul
<al2o3-cr> this_dude: np.
<this_dude> i also didnt know you can use .size
<this_dude> i always thought it was .length
<al2o3-cr> yeah, the synonymous with each other.
<this_dude> well im gonna get some sleep too
<this_dude> night everyone
this_dude has quit [Quit: Page closed]
lxsameer has quit [Ping timeout: 240 seconds]
maryo has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
AJA4350 has quit [Ping timeout: 256 seconds]
Creatornator has joined #ruby
Creatornator has quit [Client Quit]
NightMonkey has quit [Quit: ZNC - http://znc.in]
AJA4350 has joined #ruby
samort7 has quit [Quit: Leaving]
za1b1tsu has joined #ruby
NightMonkey has joined #ruby
arescorpio has quit [Quit: Leaving.]
lxsameer has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
za1b1tsu has quit [Ping timeout: 240 seconds]
reber has joined #ruby
reber__ has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
apparition47 has quit [Quit: Bye]
AJA4350 has quit [Quit: AJA4350]
lxsameer has quit [Ping timeout: 256 seconds]
Danielss89 has quit [Quit: Bye]
tty has joined #ruby
alfiemax has joined #ruby
alfiemax_ has quit [Ping timeout: 256 seconds]
matthewd has quit [Read error: Connection reset by peer]
eckhardt has joined #ruby
Apocalypse has quit [Quit: Input/Output Error]
cadillac_ has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
scottj has quit [Quit: leaving]
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
Apocalypse has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
maryo has joined #ruby
\void has joined #ruby
Eiam has quit [Ping timeout: 260 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
quazimodo has quit [Ping timeout: 268 seconds]
lxsameer has joined #ruby
quazimodo has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 240 seconds]
sauvin has joined #ruby
lxsameer has joined #ruby
akaiiro has quit [Remote host closed the connection]
apeiros_ has joined #ruby
apeiros_ has quit [Remote host closed the connection]
maryo has quit [Quit: Leaving]
za1b1tsu has joined #ruby
Tempesta has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
kevinsjoberg has joined #ruby
lxsameer has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
Apocalypse has quit [Quit: Input/Output Error]
za1b1tsu has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
Apocalypse has joined #ruby
blackmesa1 has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
alem0lars has joined #ruby
Inline has quit [Quit: Leaving]
mozzarella has quit [Ping timeout: 248 seconds]
mozzarel1 has joined #ruby
mozzarel1 is now known as mozzarella
snickers has joined #ruby
Tempesta has quit [Ping timeout: 240 seconds]
aufi has joined #ruby
Tempesta has joined #ruby
lxsameer has joined #ruby
hays_ has quit [Read error: Connection reset by peer]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hays has joined #ruby
pwnd_nsfw has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
hurricanehrndz has quit [Ping timeout: 240 seconds]
p4p0l0 has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
p4p0l0 has quit [Ping timeout: 256 seconds]
drale2k_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
alfiemax has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
bmurt has quit [Client Quit]
lxsameer has joined #ruby
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
sysvalve has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
<RootSudo> I don't know what I'm doing
<RootSudo> Why am I here
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
alfiemax has joined #ruby
za1b1tsu has joined #ruby
dionysus69 has joined #ruby
clemens3 has joined #ruby
tty has quit [Quit: tty]
vondruch has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
tristanp has joined #ruby
Burgestrand has joined #ruby
alfiemax_ has joined #ruby
desperek has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
TomyWork has joined #ruby
TomyWork has left #ruby ["Leaving"]
TomyWork has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
<TomyWork> sorry about the join spam, i'm not on my own comp here, so i'm authenticating manually, and this +r stuff is killing me
tristanp has quit [Ping timeout: 268 seconds]
<TomyWork> still preferable to the bot situation though :)
avelldiroll has quit [Quit: WeeChat 1.6]
lxsameer has quit [Ping timeout: 268 seconds]
<ArahaelPi> +R, you mean.
psychicist__ has joined #ruby
avelldiroll has joined #ruby
za1b1tsu has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
sylario has joined #ruby
za1b1tsu has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
apeiros_ has joined #ruby
DoubleMalt has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
p4p0l0 has joined #ruby
DarthGandalf has joined #ruby
lxsameer has joined #ruby
mikecmpbll has joined #ruby
<TomyWork> ArahaelPi no, i mean +r on the channel, which blocks unidentified users
vondruch has quit [Read error: Connection reset by peer]
mistym- has joined #ruby
Fridtjof_ has joined #ruby
Biohazard has joined #ruby
bier has joined #ruby
nikivi- has joined #ruby
erratic has joined #ruby
apeiros_ is now known as apeiros
<ArahaelPi> TomyWork: Ah. Yeah, everyone should be identified, even if with a unique email address.
<TomyWork> apeiros uh, i still see evidence of the botspam situation here and there. you should leave that on until that blows over
apeiros has quit [Read error: Connection reset by peer]
apeiros__ has joined #ruby
<TomyWork> apeiros uh, i still see evidence of the botspam situation here and there. you should leave that on until that blows over
<apeiros__> god damit, that cable is feebly connected
apeiros__ is now known as apeiros
<apeiros> TomyWork: saw your message :)
<apeiros> I'm around. if necessary I'll reactivate +r
<apeiros> feel free to ping me
tvw has joined #ruby
eckhardt has quit [Ping timeout: 248 seconds]
Beams has joined #ruby
Kingsy24 has joined #ruby
<Kingsy24> Christel just posted this "denial" on the freenode blog https://freenode.net/news/spam-shake Why does this blog post mention "10.2 million" THREE times?
Kingsy24 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
mojtaba has joined #ruby
za1b1tsu has quit [Ping timeout: 260 seconds]
za1b1tsu has joined #ruby
ferhaty has joined #ruby
<apeiros> ok, I guess +r it still is :D
<apeiros> even if Sigyn works great
vondruch has joined #ruby
ansraliant has quit [Quit: Konversation terminated!]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Read error: Connection reset by peer]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
alex`` has joined #ruby
dhollin3 has joined #ruby
alex`` has quit [Ping timeout: 240 seconds]
<dionysus69> how do I tell god to restart one of the processes it's handling without restarting the god itself
<apeiros> you send a prayer (scnr)
<dionysus69> :D
<TomyWork> i could
<apeiros> TomyWork: you're stronger than I :D
drale2k_ has joined #ruby
dhollinger has quit [Ping timeout: 240 seconds]
<TomyWork> last thing christel posted on twitter is the handshake release post. after that it's just dozens of retweets. maybe someone is pissed off at handshake for some irrational reason... ex team member?
<TomyWork> forgot the 2nd premise: the release post is from about the same time as the start of the spambot attack
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tristanp has joined #ruby
mozzarella has quit [Remote host closed the connection]
mozzarella has joined #ruby
tristanp has quit [Ping timeout: 268 seconds]
vondruch has joined #ruby
alfiemax_ has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
alex`` has joined #ruby
apeiros has quit []
alfiemax has quit [Remote host closed the connection]
ciro has joined #ruby
drale2k_ has joined #ruby
blackmesa1 has quit [Ping timeout: 240 seconds]
arekushi has quit [Ping timeout: 265 seconds]
lunarkitty7 has quit [Ping timeout: 265 seconds]
lunarkitty7 has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
vondruch has quit [Quit: vondruch]
kevinsjoberg has joined #ruby
Burgestrand has quit [Quit: Closing time!]
alem0lars has quit [Ping timeout: 244 seconds]
sticaz has joined #ruby
blackmesa1 has joined #ruby
<gray_-_wolf> Is there noticeable performance impact when using refinements? I'm reading the docs on them and all this activating/deactivating on scope change seems expensive
ArahaelPi has quit [Read error: Connection reset by peer]
yohji has joined #ruby
<gray_-_wolf> Also, if anyone would be so kind, why I'm getting NoMethodError in this snippet https://paste.vpsfree.cz/UAhbdR7+/ ?
arahael1 has joined #ruby
ur5us has joined #ruby
clemens3 has quit [Remote host closed the connection]
beefjoe has joined #ruby
sysvalve has quit [Ping timeout: 240 seconds]
za1b1tsu has joined #ruby
wildermind has joined #ruby
mojtaba has quit [Quit: Leaving.]
sysvalve has joined #ruby
Emmanuel_Chanel has joined #ruby
Burgestrand has joined #ruby
FernandoBasso has joined #ruby
blackmesa1 has quit [Ping timeout: 260 seconds]
<balo> gray_-_wolf: i am not familiar with refinements but refining the class method made me interested :D so i looked for it, maybe it's relevant https://stackoverflow.com/questions/27833447/do-refinements-apply-only-to-instance-methods
<balo> it's a bit trickier
lxsameer has quit [Ping timeout: 268 seconds]
<gray_-_wolf> ooooh, so it's `refine ::String.signleton_class do ...` for me
lxsameer has joined #ruby
<gray_-_wolf> thank you balo :)
Burgestrand has quit [Quit: Closing time!]
yohji has quit [Ping timeout: 256 seconds]
savolla has joined #ruby
<balo> sure. just for educational purposes, could you share what is your use-case to use refinements and add class methods to String?
savolla has quit [Client Quit]
<gray_-_wolf> serialization code, I have bunch of types I want to serialize/deserialize (and one of them is ::String), so I'm basically using `"foo".serialize` and `String.deserialize('bar')`; Since I'm putting stuff onto core class I thought refinements would be good idea
Burgestrand has joined #ruby
c0ncealed2 has quit [Remote host closed the connection]
arahael1 is now known as ArahaelPi
c0ncealed2 has joined #ruby
beefjoe has quit [Quit: Off to install Windows]
beefjoe has joined #ruby
Burgestrand has quit [Quit: Closing time!]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
alex`` has quit [Quit: WeeChat 2.2]
tristanp has joined #ruby
Burgestrand has joined #ruby
yohji has joined #ruby
ur5us has joined #ruby
tristanp has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
arekushi has joined #ruby
alex`` has joined #ruby
gray_-_wolf has quit [Quit: WeeChat 2.2]
za1b1tsu has quit [Ping timeout: 256 seconds]
pulkit4tech has joined #ruby
pulkit4tech has left #ruby [#ruby]
za1b1tsu has joined #ruby
za1b1tsu_ has joined #ruby
apeiros_ has joined #ruby
za1b1tsu has quit [Ping timeout: 240 seconds]
apeiros_ is now known as apeiros
beefjoe has quit [Remote host closed the connection]
AJA4350 has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
clemens3 has joined #ruby
za1b1tsu_ has quit [Ping timeout: 265 seconds]
AJA4350 has quit [Quit: AJA4350]
AJA4350 has joined #ruby
Emmanuel_Chanel has joined #ruby
maryo_ has joined #ruby
Dbugger has joined #ruby
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby
postmodern has quit [Remote host closed the connection]
dr_blackjack has joined #ruby
fmcgeough has joined #ruby
snuz has joined #ruby
maryo_ has quit [Quit: Leaving]
snuz has quit [Client Quit]
snuz has joined #ruby
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snuz has quit [Ping timeout: 265 seconds]
gnufied has joined #ruby
discopatrick has joined #ruby
maryo has joined #ruby
flips has quit [Quit: bbl ...]
flips has joined #ruby
bga57 has quit [Quit: Leaving.]
gnufied has quit [Quit: Leaving]
<dionysus69> so I was dealing with infinite loops with sleep and sometimes I was getting Interrupt Exception, anyone knows potential reasons?
<apeiros> ctrl-C
<apeiros> also if you send it via kill command
<dionysus69> no way, I didnt do anything with it, it would exit by itself
<apeiros> interrupts don't happen on their own, you know? :)
apeiros has quit [Read error: Connection reset by peer]
apeiros__ has joined #ruby
alem0lars has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 268 seconds]
maryo has quit [Quit: Leaving]
ferhaty has quit [Quit: ferhaty]
NightMonkey has quit [Quit: ZNC - http://znc.in]
HoierM has joined #ruby
kevinsjoberg has joined #ruby
bmurt has joined #ruby
reber__ has quit [Ping timeout: 260 seconds]
reber has quit [Ping timeout: 256 seconds]
<dionysus69> it wasn't an interrupt, but interrupt exception, I just did interupt with ctrl-c and it was a totally different error
vondruch has quit [Quit: vondruch]
<dionysus69> it had regular ruby error trace
InfinityFye has joined #ruby
<apeiros__> yes, interrupt exceptions happen on interrupts. hence the name.
apeiros__ is now known as apeiros
Miron has quit [Read error: Connection reset by peer]
Dbugger has quit [Ping timeout: 240 seconds]
blackmesa1 has joined #ruby
drale2k_ has joined #ruby
akofink has joined #ruby
akofink has left #ruby ["WeeChat 2.2"]
vondruch has joined #ruby
Dbugger has joined #ruby
gnufied has joined #ruby
gnufied__ has joined #ruby
gnufied has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
jottr has joined #ruby
mojtaba has joined #ruby
dhollin3 is now known as dhollinger
drale2k_ has quit [Ping timeout: 248 seconds]
quazimodo has quit [Ping timeout: 244 seconds]
augcesar has joined #ruby
quazimodo has joined #ruby
mojtaba has quit [Quit: Leaving.]
pulkit4tech has joined #ruby
pulkit4tech has left #ruby [#ruby]
Rapture has joined #ruby
vondruch has quit [Quit: vondruch]
akaiiro has joined #ruby
maryo_ has joined #ruby
nofxx has joined #ruby
maryo_ has quit [Read error: Connection reset by peer]
savolla has joined #ruby
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Beams_ has joined #ruby
maryo_ has joined #ruby
Beams has quit [Ping timeout: 256 seconds]
maryo_ has quit [Quit: Leaving]
akaiiro has quit [Remote host closed the connection]
Beams_ has quit [Quit: .]
akaiiro has joined #ruby
Beams has joined #ruby
apeiros has quit []
maryo has joined #ruby
blackmesa1 has quit [Ping timeout: 256 seconds]
k0mpa has joined #ruby
<TvL2386> hey everybody! I'm reading about metaprogramming here https://viewsourcecode.org/why/hacking/seeingMetaclassesClearly.html and I followed an example which doesn't output what the blog says it does. Unfortunately it has no date, so I am assuming it just works differently on my ruby-2.5.1. Can someone please look at my little gist and tell me why it doesn't output what I'd expect?
<TvL2386> I've tried to dig through YAML::dump to see if it actually calls :to_yaml_properties somewhere, but I'm lost
apeiros_ has joined #ruby
<dionysus69> lambdas can't be named with question mark at the end like methods?
<apeiros_> lambdas can't be named period
<apeiros_> what you named was a variable
<apeiros_> and no, those can't have question marks at the end.
<dionysus69> ok thanks apeiros_
za1b1tsu_ has joined #ruby
rippa has joined #ruby
HoierM has quit [Ping timeout: 248 seconds]
HoierM has joined #ruby
Burgestrand has quit [Quit: Closing time!]
dionysus69 has quit [Ping timeout: 268 seconds]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
aufi has quit [Ping timeout: 260 seconds]
alem0lars has quit [Ping timeout: 255 seconds]
maryo has quit [Quit: Leaving]
apeiros_ has quit [Remote host closed the connection]
<havenwood> TvL2386: Define #to_yaml_properties in MailTrunk, not at top level.
<havenwood> TvL2386: %i[@driver @route]
<havenwood> TvL2386: (You'll want `[:@driver, :@route]` instead of `[@driver, @route]`.
<havenwood> )
ur5us has joined #ruby
snuz has joined #ruby
apeiros_ has joined #ruby
<havenwood> TvL2386: Oh, I see - you're doing it that way on purpose.
<havenwood> Defining it on the instance, I mean.
ur5us has quit [Ping timeout: 265 seconds]
<havenwood> TvL2386: The only problem I see is the way you're providing the instance variables. It looks like #to_yaml_properties was deprecated a while back.
mynameisdebian has joined #ruby
<havenwood> warn "#{loc}: to_yaml_properties is deprecated, please implement \"encode_with(coder)\""
AJA4350 has quit [Quit: AJA4350]
TomyWork has quit [Ping timeout: 240 seconds]
AJA4350 has joined #ruby
reber has joined #ruby
AJA4350 has quit [Client Quit]
s2013 has joined #ruby
s2013 has quit [Client Quit]
tvw has quit [Remote host closed the connection]
AJA4350 has joined #ruby
akaiiro has quit [Ping timeout: 240 seconds]
AJA4350 has quit [Client Quit]
sysvalve has quit [Quit: Leaving]
<havenwood> TvL2386: Here's an example with YAML and Marshal: https://gist.github.com/havenwood/1e0111232b3e441d3ec60f103212508a
<havenwood> P.S. - Shouldn't this be a "dump" truck?
kapil___ has quit [Quit: Connection closed for inactivity]
clemens3 has quit [Ping timeout: 256 seconds]
p4p0l0 has quit []
_Caerus has joined #ruby
AJA4350 has joined #ruby
Caerus has quit [Ping timeout: 256 seconds]
Blaguvest has joined #ruby
NightMonkey has joined #ruby
za1b1tsu_ has quit [Ping timeout: 248 seconds]
polishdub has joined #ruby
kevinsjoberg has joined #ruby
kevinsjoberg has quit [Client Quit]
kevinsjoberg has joined #ruby
yohji has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
Beams has quit [Quit: .]
darix has quit [Quit: may the packets be with you...]
Emmanuel_Chanel has joined #ruby
mynameisdebian has quit [Remote host closed the connection]
thy0 has joined #ruby
lxsameer has quit [Quit: WeeChat 2.1]
thy0 has quit [Client Quit]
thy0 has joined #ruby
HoierM has quit [Ping timeout: 248 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
TomyLobo has joined #ruby
darix has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
orbyt_ has joined #ruby
Puffball has joined #ruby
s2013 has joined #ruby
akaiiro has joined #ruby
croberts has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
HoierM has joined #ruby
SeepingN has joined #ruby
cadillac_ has quit [Ping timeout: 248 seconds]
zxq2 has joined #ruby
akaiiro has quit [Ping timeout: 244 seconds]
cadillac_ has joined #ruby
orbyt_ has joined #ruby
AJA4350 has quit [Ping timeout: 244 seconds]
AJA4350 has joined #ruby
kevinsjoberg has quit [Read error: Connection reset by peer]
duderonomy has quit [Ping timeout: 240 seconds]
Eiam has joined #ruby
Miron has joined #ruby
maryo has joined #ruby
vasilakisfil has joined #ruby
<vasilakisfil> if you would accept a proc/lambda in some part of your code as an argument, would you check it using responds_to?(:call) or is_a?(Proc) ? The former has the advantage the you can send whatever as long as it responds to call, what is the advantage of the latter ?
<apeiros_> vasilakisfil: I'd usually accept a proc as a block argument. no need to perform checks then (beyond block_given?, but I usually save myself even doing that)
apeiros_ is now known as apeiros
<apeiros> in case you're unaware: using &, you can convert a Proc instance to a block.
<apeiros> >> add1 = ->(val) { val+1 }; [1,2,3].map(&add1)
<ruby[bot]> apeiros: # => [2, 3, 4] (https://eval.in/1046077)
<vasilakisfil> yeah I agree, I do the same when dealing with method arguments. My use case is a hash-based DSL that you can set an option using a symbol or a proc.
<vasilakisfil> cool I didn't know that
HoierM has quit [Quit: Leaving]
jcarl43 has joined #ruby
snickers has joined #ruby
akaiiro has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
s2013 has quit [Client Quit]
_Caerus has quit [Quit: network powercycle]
sonne has quit [Quit: ZNC - http://znc.in]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
sonne has joined #ruby
mojtaba has joined #ruby
vasilakisfil has quit [Ping timeout: 255 seconds]
za1b1tsu has joined #ruby
gnufied__ has quit [Ping timeout: 268 seconds]
maryo has quit [Quit: Leaving]
mojtaba has quit [Quit: Leaving.]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
ur5us has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
<al2o3-cr> why does the proc seem to consume the array; https://eval.in/1046086
cadillac_ has joined #ruby
Caerus has joined #ruby
<apeiros> al2o3-cr: the return value of p *args is *args
AJA4351 has joined #ruby
<apeiros> since `p x, y` is your last expression in the block, the block's return value is [x, y]
<al2o3-cr> apeiros: why is it different with lambda though?
ur5us has quit [Ping timeout: 260 seconds]
<apeiros> different auto-unsplatting-rules
AJA4350 has quit [Ping timeout: 256 seconds]
AJA4351 is now known as AJA4350
<al2o3-cr> apeiros: ah, ok. just thought they would work the same.
<apeiros> na, procs behave like blocks. and for historic reasons they're rather, lets say, liberal in how they auto-splat
<apeiros> lambdas otoh behave like defined methods wrt their arguments
<al2o3-cr> apeiros: that straightened that up then. :)
gnufied__ has joined #ruby
<apeiros> if you explicitly splat, you can get the same behavior btw.
alex`` has quit [Quit: WeeChat 2.2]
<apeiros> oh, actually not, since arity is enforced in lambdas 🙈
nowhere_man has joined #ruby
<al2o3-cr> apeiros: ah, of course yeah.
<al2o3-cr> proc isn't
<al2o3-cr> i get it
<al2o3-cr> oops i'm getting like this dude :(
<baweaver> apeiros: the auto-unsplatting diff is a bug in 2.4+
<apeiros> baweaver: huh? you sure?
<baweaver> should be patched soon iirc.
discopatrick has quit [Quit: Connection closed for inactivity]
<baweaver> I remember because I was pissed off at it and had to patch Qo to use proc instead everywhere
<baweaver> I'd been working on 2.3 because RVM shenanigans
akaiiro has quit [Ping timeout: 268 seconds]
rfoust has joined #ruby
<apeiros> hm
jottr has quit [Ping timeout: 276 seconds]
AJA4350 has quit [Ping timeout: 260 seconds]
tag has joined #ruby
Dbugger has quit [Remote host closed the connection]
wildermind has quit [Quit: Connection closed for inactivity]
jottr has joined #ruby
r29v has joined #ruby
yoshida_ has joined #ruby
kapil___ has joined #ruby
yoshida_ has left #ruby [#ruby]
darkhanb has joined #ruby
jcarl43 has quit [Read error: Connection reset by peer]
blackmesa1 has joined #ruby
jcarl43 has joined #ruby
Inline has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
InfinityFye has quit [Quit: Leaving]
sonne has quit [Ping timeout: 256 seconds]
blackmesa1 has quit [Ping timeout: 256 seconds]
eckhardt has joined #ruby
Creatornator has joined #ruby
sameerynho has joined #ruby
jottr has joined #ruby
reber has quit [Remote host closed the connection]
AJA4350 has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
Creatornator has joined #ruby
c0ncealed2 has quit [Remote host closed the connection]
DTZUZU has quit [Quit: WeeChat 1.9]
c0ncealed2 has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
tty has joined #ruby
eldritch has quit [Ping timeout: 240 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
linuxdaemon has quit [Ping timeout: 260 seconds]
AJA4351 has quit [Ping timeout: 240 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mojtaba has joined #ruby
linuxdaemon has joined #ruby
tdy has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mroutis has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eldritch has joined #ruby
mroutis has quit [Ping timeout: 240 seconds]
Creatornator has joined #ruby
DTZUZU has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
ptx0 has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 240 seconds]
jcalla has quit [Ping timeout: 268 seconds]
blackmesa1 has joined #ruby
Nicmavr has joined #ruby
Dbugger has joined #ruby
eckhardt has joined #ruby
akaiiro has joined #ruby
blackmesa has joined #ruby
blackmesa1 has quit [Ping timeout: 256 seconds]
jcalla has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
d^sh has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
Rapture has joined #ruby
blackmesa1 has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
blackmesa has quit [Ping timeout: 276 seconds]
FernandoBasso has quit [Quit: Page closed]
ptx0_ has joined #ruby
ptx0_ is now known as ptx0
zerowaitstate has joined #ruby
psychicist__ has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
<zerowaitstate> I am writing a test case in RSpec, and I need to mock the result of a factory method, but the result of the call needs to be different based upon the input. In RSpec, the mocks provided appear to rely on the order in which the method is called. I need the mock to return a particular output for a given input, irrespective of the order it is called. How do I do that?
r29v has quit [Quit: r29v]
AJA4350 has joined #ruby
mroutis has joined #ruby
duderonomy has joined #ruby
AJA4351 has joined #ruby
dionysus69 has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
Creatornator has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4350 has joined #ruby
SirFunk_ has quit [Quit: ZNC - http://znc.in]
AJA4351 has quit [Ping timeout: 240 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jcalla has quit [Ping timeout: 240 seconds]
AJA4351 has joined #ruby
jcalla has joined #ruby
blackmesa1 has quit [Ping timeout: 256 seconds]
dr_blackjack has quit []
Blaguvest has quit [Ping timeout: 244 seconds]
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
cagomez has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackmesa1 has joined #ruby
jcalla has quit [Quit: Leaving]
blackmesa1 has quit [Client Quit]
jcarl43 has quit [Read error: Connection reset by peer]
jcarl has joined #ruby
AJA4350 has quit [Ping timeout: 256 seconds]
eckhardt has joined #ruby
AJA4350 has joined #ruby
eckhardt has quit [Client Quit]
Dbugger has quit [Ping timeout: 245 seconds]
nicesignal has joined #ruby
nowhere_man has quit [Ping timeout: 260 seconds]
sameerynho has quit [Ping timeout: 240 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
mojtaba has quit [Quit: Leaving.]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 244 seconds]
AJA4351 has quit [Ping timeout: 260 seconds]
AJA4350 has joined #ruby
r29v has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4350 has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snuz has quit [Quit: WeeChat 2.2]
<al2o3-cr> >> ([?x]*3).map{|*a|a*3}
<ruby[bot]> al2o3-cr: # => [["x", "x", "x"], ["x", "x", "x"], ["x", "x", "x"]] (https://eval.in/1046137)
<al2o3-cr> i need this 3 bytes shorter
eckhardt has joined #ruby
Caerus has quit [Ping timeout: 248 seconds]
<mroutis> >> [[?x]*3]*3
<ruby[bot]> mroutis: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
eckhardt has quit [Client Quit]
AJA4350 has quit [Ping timeout: 240 seconds]
<al2o3-cr> mroutis: by using map only.
TomyLobo has quit [Read error: Connection reset by peer]
arescorpio has joined #ruby
zerowaitstate has quit [Quit: leaving]
akaiiro has quit [Remote host closed the connection]
AJA4350 has joined #ruby
<al2o3-cr> evil this: eval "STDIN.ioctl 0x00005412, \"\u001a\""
RootSudo is now known as rootsudo
akaiiro has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
SirFunk has joined #ruby
AJA4350 has joined #ruby
mroutis has quit [Remote host closed the connection]
Demos_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
eckhardt has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
Caerus has joined #ruby
beowuff has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
beowuff has joined #ruby
SirFunk has quit [Quit: ZNC - http://znc.in]
apeiros has quit [Ping timeout: 240 seconds]
SirFunk has joined #ruby
improv42 has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mroutis has joined #ruby
apeiros has joined #ruby
sonne has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> al2o3-cr: got any cookies?
<baweaver> cause I got yer bytes
<baweaver> >> [ (1..3).map{[?x]*3}, '(1..3).map{[?x]*3}'.size, '([?x]*3).map{|*a|a*3}'.size ]
<ruby[bot]> baweaver: # => [[["x", "x", "x"], ["x", "x", "x"], ["x", "x", "x"]], 18, 21] (https://eval.in/1046145)
Creatornator has joined #ruby
<baweaver> mroutis: al2o3-cr owes us cookies
<baweaver> want in?
orbyt_ has joined #ruby
<al2o3-cr> baweaver: free cookies forever ;)
<baweaver> Trick with map is no one said a dang thing about it needing a param, or that it even needs to respect the left-hand
<al2o3-cr> baweaver: i knew you could do it.
<baweaver> Took me a bit to think of one.
<baweaver> My first thought was making another trick, then I thought screw it: what can we do to cheat?
<al2o3-cr> baweaver: i got a question?
<baweaver> i got an answer?
<al2o3-cr> >> [-> a {}.parameters, proc { |a| }.parameters]
<ruby[bot]> al2o3-cr: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<al2o3-cr> >> [-> a {}.parameters, proc { |a| }.parameters]
<baweaver> bot is screwy
<ruby[bot]> al2o3-cr: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<al2o3-cr> why is lambda required and proc optional?
<baweaver> proc is a lot looser with params
<baweaver> which is why I almost universally prefer lambdas
<baweaver> but wait! Why the heck do you use procs in Qo everywhere!?
<baweaver> Aha! That's the trick, now isn't it
<baweaver> 2.4+ broke implicit destructuring of lambdas
<baweaver> so for compat reasons I had to use procs T-T
<al2o3-cr> baweaver: you're an evil lemur ;)
<mroutis> haha! coool
za1b1tsu has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
<baweaver> al2o3-cr: This means the quality of art in the book just took a massive leap forward.
<baweaver> and the entire conference talk was practice to get there.
<al2o3-cr> baweaver: did you go to art school or was it just a natural gift?
apeiros has quit [Remote host closed the connection]
<al2o3-cr> the only thing i draw is the curtains ;)
<mroutis> maybe a lot of doodling at school :p
<al2o3-cr> mroutis: maybe :)
chouhoulis has quit [Ping timeout: 244 seconds]
<al2o3-cr> some talent that though drawing and ruby!
polishdub has quit [Quit: leaving]
bambanx has joined #ruby
<baweaver> Funny story on that actually
<al2o3-cr> 'baweaver the reducer'. nice name of a ruby god ;)
<baweaver> I had a tendency to sketch when I was done with things. One teacher didn't like that too much, so he confiscated the pad and told me to pay attention. By the time he was back at it, I had another pad out to sketch more. He wasn't amused, so he sent me to ISS after confiscating it and my other sketch books.
<baweaver> Little did he know I had one more up my sleeve.
<baweaver> Nice try though. Football coaches are always the worst teachers.
<al2o3-cr> my best teachers were science and maths.
<baweaver> But no, never had any formal art education. Self-taught. There was one time I was walking around the arts department while the art teacher was giving a presentation on digital work.
<baweaver> I recognized one of my pieces, so I popped in and said so.
<baweaver> She stopped class, grabbed me, and forced me to apply for AP art on the spot my Senior year
<mroutis> desperate teachers ^
Emmanuel_Chanel has joined #ruby
<al2o3-cr> mroutis: or teachers that value talent
<baweaver> So I have a question for you all
<al2o3-cr> go for it
<baweaver> on a scale of 1 to 10, how do the following talk titles jump out to you
<baweaver> The Most RSpectacular Show on Earth! An Illustrated Guide to Testing
<baweaver> The Pattern Matching Express - An Illustrated Guide to FP
<al2o3-cr> >> 22.divmod(7).reduce(:**)
<ruby[bot]> al2o3-cr: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<mroutis> baweaver, your deviantart has a lot of wallpaper potential :p ! nice content
<al2o3-cr> #=> 3
<al2o3-cr> jk, i'd give a 9.5 easily :)
<baweaver> There are two more Reducing Enumerable talks I have mostly plotted
<baweaver> "The Continuing Adventures of Red" and "The Path of Master Scarlett"
<baweaver> The first goes into more Enumerable hackery, the second goes hardcore into transducers
<mroutis> I'd give the FP one an 8 the testing one 4
<baweaver> Here's a fun one for ya: Given a count of seconds, tell me how many (seconds, minutes, hours, days, months, years) that constitutes
<al2o3-cr> mroutis: harsh! =P
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<mroutis> al2o3-cr, sorry, didn't mean it
<baweaver> Eh, maybe not months
<baweaver> we'll say just years
<al2o3-cr> mroutis: i know ;)
<mroutis> baweaver, can you give an example? (input -> output)
<al2o3-cr> i'd use the start of the epoch.
<al2o3-cr> and the Time.class
<al2o3-cr> damn, i'm even typing ruby in a sentence now
<baweaver> seconds_to_units(1_000_000) => [40, 46, 13, 11, 0]
<baweaver> >> UNITS = [60, 60, 24, 365]; def seconds_to_units(s) UNITS.reduce([s]) { |x, u| x.concat(x.pop.divmod(u).reverse) } end; seconds_to_units(1_000_000)
<ruby[bot]> baweaver: # => [40, 46, 13, 11, 0] (https://eval.in/1046147)
<baweaver> yahtzee
<al2o3-cr> baweaver: don't tell me reduce?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<mroutis> ufff :ok_hand:
za1b1tsu has joined #ruby
<baweaver> divmod returns the total times it goes in cleanly with the remainder
<baweaver> So what you do is you reverse that which gives you clean divides, remainder
this_dude has joined #ruby
<baweaver> meaning the next pop is the remainder
<this_dude> howdy folks
<this_dude> hey baweaver
<baweaver> Oh
<baweaver> you need to see
<this_dude> ready to help me fail agian?
<baweaver> >> UNITS = [60, 60, 24, 365]; def seconds_to_units(s) UNITS.reduce([s]) { |x, u| x.concat(x.pop.divmod(u).reverse) } end; seconds_to_units(1_000_000)
<this_dude> again*
<ruby[bot]> baweaver: # => [40, 46, 13, 11, 0] (https://eval.in/1046148)
<mroutis> a wild this_dude appeared
<baweaver> seconds -> seconds, minutes, hours, days, years
<this_dude> hey routis hehe
* this_dude uses study mode...its was super effective
<baweaver> this_dude: get good with IRB before you try it
akaiiro has quit [Remote host closed the connection]
<mroutis> can't agree more ^
<baweaver> al2o3-cr: stack reduction, much fun.
<this_dude> is irb anywhere else except in the command line?
<this_dude> or am i just confused
<al2o3-cr> baweaver: sure is :)
nofxx has quit [Quit: Leaving]
<baweaver> There are online REPLs, but IRB locally yeah
<baweaver> eval.in for instance
<al2o3-cr> this_dude: use pry dude
<this_dude> whats uh
<this_dude> that
<mroutis> gem install pry
<al2o3-cr> gem i pry
<this_dude> ;-;
<this_dude> i still dont know what pry is XD
<mroutis> it is IRB on steroids
<al2o3-cr> big muscles
<baweaver> ?pry
<ruby[bot]> Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<this_dude> oh lord
<this_dude> much wow
<this_dude> well
<baweaver> The problem with IRC is you get the entire fire hose
<this_dude> the questions were mad easy last time i just made a dumb mistake i think i got this
<al2o3-cr> and many opinions
<this_dude> and everyone is here so its a good time
<al2o3-cr> or is that onions
<this_dude> XD
<this_dude> we going into the deep web now?
* this_dude uses .onion to access secret website with all answers to his exam
* this_dude cries because this is all fantasy
<al2o3-cr> nah, just chicken and onions
<this_dude> hehe
<this_dude> i took a prescribed xanax so im calm so i wont freak out on the test this tiem
<this_dude> lets ace this test
<mroutis> lol, this_dude, are you kidding?
<al2o3-cr> this_dude: you don't need that dude, just relax
<this_dude> oh no
<this_dude> they got harder
duderonomy has joined #ruby
<this_dude> guys lmao its a scam
<this_dude> this is the problem (please dont ban me its not a screenshot of code its the problem) http://prntscr.com/kgtoaz
bmurt has joined #ruby
<al2o3-cr> this_dude: fIzZBuZz
<this_dude> ahahaha
Alina-malina has quit [Ping timeout: 240 seconds]
<this_dude> let me code it and then we can see if its right
za1b1tsu has quit [Ping timeout: 248 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> this_dude: remember the modulo operator ;)
<this_dude> yup
<this_dude> ok im done i think
<this_dude> gonna test it now but lets see if you notice any obvious syntax errors
bmurt has joined #ruby
jcarl has quit [Read error: Connection reset by peer]
jcarl43 has joined #ruby
<baweaver> you'd have a much easier time if you indented things properly
<this_dude> oops
<this_dude> hmm
<this_dude> so the result when testing with the number 15 is it goes
<this_dude> 1 2 Fizz and then ends
<this_dude> nvm got it
<this_dude> i typoed elsif
<baweaver> See? Easier to read.
Sembei has joined #ruby
<this_dude> sorry
<this_dude> did i increment i inside the loop correctly?
Pisuke has quit [Ping timeout: 244 seconds]
<al2o3-cr> this_dude: yeah, but fgs indent dude.
<this_dude> there?
<al2o3-cr> this_dude: ALWAYS inc inside
<this_dude> noted
<this_dude> ty
<al2o3-cr> or decrement for that matter.
<this_dude> sounds good
<al2o3-cr> or modulo or what ever
<this_dude> thanks guys..submitting now
<al2o3-cr> this_dude: did you test it first?
noobineer has joined #ruby
<this_dude> yep
<this_dude> worked perfectly
<al2o3-cr> what does 97 give?
<havenwood> ?gist this_dude
<ruby[bot]> this_dude: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<havenwood> ?gist_usage this_dude
<ruby[bot]> this_dude: To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting
<ruby[bot]> a new one.
<havenwood> ?gist-usage this_dude
<this_dude> oh this one is complicated
<this_dude> guaw
<sparr> if !by['group'].nil? && by['group'] != :undef <-- what part of this might possibly throw a "can't convert String into Integer" error?
Alina-malina has joined #ruby
<this_dude> its gives a super long list
<al2o3-cr> sparr: that way to sparse.
<this_dude> in response to your question al203^
<havenwood> sparr: Is `by` an Array?
<this_dude> hey so i know in map theres a way to rotate with .rotate
<this_dude> but
<this_dude> how do i know it in different directions
<havenwood> >> [1, 2, 3].rotate -1
<this_dude> for example in the problem theres a gets value for a right shift and a left shift
<ruby[bot]> havenwood: # => [3, 1, 2] (https://eval.in/1046156)
<this_dude> and when i need it to do both?
<sparr> havenwood: by is a hash, or should be
<this_dude> in the problem it asks for me a left rotate and a right rotate
<this_dude> i need it to do both at the same tiem
<this_dude> time
<havenwood> sparr: []['group'] #!> TypeError: no implicit conversion of String into Integer
<havenwood> this_dude: Rotating left and right at the same time would do nothing, right?
<havenwood> this_dude: Please use text rather than images to represent text when showing example in the channel.
blood has joined #ruby
<sparr> ok, thanks, I'll try to figure out why by is the wrong type
<this_dude> no but for example
jdawgaz has joined #ruby
<this_dude> if i need a 1 left rotation and then 2 right rotation
<this_dude> so i need it to execute the left_rotation followed by right_rotation
<blood> I'm using puppet's xml_fragment module which uses REXML and i'm trying to add support to remove a tag along with its parent assuming parent isn't root. Any idea how I can accomplish this?
<blood> https://github.com/Areson/xml_fragment/blob/master/lib/puppet/util/xml_file.rb#L152 This is where the removal is done for a single tag
<havenwood> this_dude: isn't 1 left and 2 right the same as 1 right?
<this_dude> yep
<this_dude> so can i do this?
<this_dude> res=s.map { |v| v.rotate(leftShifts).rotate(rightShifts)}
<this_dude> or well actually s.chars.map
<this_dude> i gotta hurry only 14 minutes left for this problem
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> this_dude: you're testing us now lol :)
<this_dude> wdym
<this_dude> sorry if im being annoying
ur5us has joined #ruby
<havenwood> headlessCamelsAreAnAbomination
<baweaver> rotate works on an array
<baweaver> so string.chars.rotate ....
<baweaver> Just remember that they want a string back
<baweaver> so you have to have a way to put it back together
<this_dude> .to_s
<baweaver> join, close.
<this_dude> in the code they use to test my answer they put rightShifts = gets.strip.to_i
<this_dude> what is .strip?
<baweaver> >> "string\n".strip
<ruby[bot]> baweaver: # => "string" (https://eval.in/1046161)
<baweaver> I prefer chomp, but doesn't matter.
<this_dude> hmm
<this_dude> im getting a weird answer
<this_dude> here is my code so far
<this_dude> weird error**
<this_dude> and i only have 8 minutes to fix it uhoh
<this_dude> anything stand out as off?
<mroutis> ri String.strip
<mroutis> oh, I thought that ruby bot had ri integrated
<this_dude> whats that
<havenwood> &ri String#strip
<this_dude> minutes
<al2o3-cr> havenwood: `derpy gone too :(
desperek has quit [Quit: xoxo]
<this_dude> i literally dont have time to rad
<this_dude> read
<this_dude> its a timed test
goez has quit [Ping timeout: 245 seconds]
<this_dude> can someone just tell me where my error is please..
<this_dude> i dont see anything wrong??
<al2o3-cr> this_dude: are you for real?
<this_dude> yes..
<mroutis> there's always time for a good lecture on ruby-doc
<al2o3-cr> this_dude: your hair is brown?
<this_dude> yes
<this_dude> omg guys im out of time
<al2o3-cr> this_dude: and you pineapple?
<this_dude> im gonna cry seriously
<this_dude> i cant afford to fail again
<baweaver> It doesn't take a block.
<this_dude> wdym
<al2o3-cr> this_dude: why take the test if it's timed, then come in here asking questions?
<this_dude> s.chars.map { |v| (v.rotate(leftShifts)).rotate(rightShifts) }
<baweaver> Read up
<this_dude> because if i dont ill def fail
<baweaver> Already said as much above.
<this_dude> im trying to debug it
<this_dude> its not working
<baweaver> Then you don't deserve to pass.
<baweaver> Harsh, but that's how it is.
<this_dude> the test is so i can go to school to be taught this stuff
<this_dude> wtf man
<mroutis> failing gives you feedback of your practice/study
<this_dude> um no
<this_dude> i wasnt given the resources i need for mapping
<mroutis> wikipedia -> map
<baweaver> Look at the docs for string#chars
ByronJohnson has quit [Ping timeout: 240 seconds]
<this_dude> its saying undefined method for .rotate
<this_dude> omgggggg
ByronJohnson has joined #ruby
<this_dude> I dont have time to read it!!!
<this_dude> jesus dude!
<this_dude> i only get one more attempt at this test!!
<baweaver> Mate
<baweaver> This channel is not here to help you cheat on applications.
<baweaver> We're already being nice by answering as much as we are.
<this_dude> this channel is here to help me code
<baweaver> and if you keep implying we're here to do so, you'll find yourself on a week-long time out.
<this_dude> thats the whole point
<mroutis> obviously a troll
<this_dude> ???
<this_dude> im not a troll i just need help omg
<baweaver> so choose your next words carefully.
<al2o3-cr> or not listening carefully
MyMind has joined #ruby
<al2o3-cr> this_dude: stop panicking
Sembei has quit [Ping timeout: 260 seconds]
DarthGandalf has quit [Ping timeout: 260 seconds]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
improv42 has quit []
<this_dude> 4 minutes left
<this_dude> and im stuck on #2
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
DarthGandalf has joined #ruby
galaxie has joined #ruby
<galaxie> What's the equivalent of Python's (or at least flake8's) NOQA comment, allowing the linter to ignore a certain line for whatever reason?
<mroutis> this_dude, I'm sorry that you couldn't pass the test by your own, but honestly, if you want to improve your coding/ruby skills and getting a job writting code, you don't need a bootcamp neither help from IRC; at least, you'll need to know how to read english, the rest is on the docs, seriously, people have spend tremendously amount of time writing them
<mroutis> galaxie, depending on the linter you are using, I'm asuming rubocop
<galaxie> mroutis: Oh, I forgot to mention that. Yes, RuboCop.
<mroutis> you need to wrap the code in two comments, #rubocop:disable and #rubocop:enable
<galaxie> mroutis: Wait, there's not a simpler way?
<mroutis> afaik, no, galaxie, and I think is intended
<this_dude> yeah pretty sure i failed
<this_dude> so now that the test is over can you tell me what i did wrong
<this_dude> I learn by understanding the actual solution..not by someone having an epiphany of what i did wrong
<this_dude> swomhow*
<this_dude> somehow**
<al2o3-cr> this_dude: it seems that you want to fail.