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!
this_dude has quit [Ping timeout: 252 seconds]
<blood> Radar: node.has_elements? -> !node.element_children.empty? for REXML -> Nokogiri
<blood> cant find anything else in API
<blood> that look right?
<Radar> bbl
psychicist__ has quit [Ping timeout: 240 seconds]
<havenwood> %w[fee fi fo fum].tap { |a| next if a.empty?; a.delete_at a.each_with_index.min.last }
\void has joined #ruby
quazimodo has quit [Remote host closed the connection]
varesa| has quit [Remote host closed the connection]
this_dude has joined #ruby
<this_dude> wow i couldnt get the nickserv to identify me for the longest time...weird...anyways im back
erratic has quit [Quit: this server has gone to sleep]
<Radar> how do we know it's the real you?
<this_dude> the chat log isnt showing anything..anything hppen while i was gone
<this_dude> lol
<havenwood> this_dude: a few of us solved the problem in ways we like but we don't want to spoil it for you ;-D
<Radar> this_dude: it's been quiet
<this_dude> hmm
GodFather has joined #ruby
AJA4350 has quit [Quit: AJA4350]
<this_dude> I just not got the chanserv welcome message lol..i think my tether signal is weak
<this_dude> now*
<baweaver> food time, off I go.
DTZUZO has quit [Ping timeout: 272 seconds]
<this_dude> about to start my exam after i finish playing theQ..have fun eating
<blood> given the following XML using Nokogiri: https://gist.github.com/bloodmc/ea92142b8b0f83f3ef15a1915cb7aee6 , @document.xpath(xpath) finds nothing. Any idea?
<blood> This is without namespaces
<blood> oh forgot the xpath again
<blood> xpath '/weblogic-web-app/session-descriptor'
al2o3-cr has quit [Quit: WeeChat 2.2]
<blood> oh it is working nm, something else is wrong
GodFather has quit [Ping timeout: 240 seconds]
<this_dude> well i hit a roadblock on my exam
<mroutis> what went wrong, this_dude ?
<this_dude> i need to take a dna strand
<this_dude> i.e. ACCGGGTTTT
<mroutis> yep
<this_dude> reverse it, and then return the complement
<Radar> What's the complement supposed to look like?
<this_dude> this is what i have
<this_dude> basiclly a==t and c==g
<Radar> Ok then.
<this_dude> idk whats wrong w my code but its just returning what i put in
<this_dude> i fixed it to .reverse.split but now i cant get it to replace the letters
<this_dude> and i only have 5 minutes left for this question
<Radar> this_dude: your code works for me
<this_dude> hm
<this_dude> really?
<Radar> Well, for a single letter it did
GodFather has joined #ruby
<this_dude> so it passed that minitest?
<Radar> No, it failed.
<Radar> You might not be splitting correctly.
<Radar> > "AAATTT".split
<Radar> >> "AAATTT".split
<ruby[bot]> Radar: # => ["AAATTT"] (https://eval.in/1046895)
<Radar> That's probably not what you want todo.
<this_dude> nope
<this_dude> .to
<this_dude> .to_a*?
<Radar> .chars
<mroutis> try using "puts" on your code, so you can debug what's going on with your variables; +1 if you use `binding.pry` or `byebug`
<this_dude> yay
<this_dude> ty
<this_dude> it worked when i changed it from .reverse.split to .reverse.chars
<Radar> this_dude: >> "AAA AAA".split
<Radar> because split splits by default on sapces
<Radar> spaces*
<this_dude> next question
<this_dude> ok i know how to do it basiclly except
<this_dude> it was .chars for a strsing
<this_dude> string*
<this_dude> how do i do the exact same thing for a number
<this_dude> like 630
sameerynho has quit [Ping timeout: 256 seconds]
chouhoulis has joined #ruby
<this_dude> nvm
<this_dude> num.to_s.chars
<Radar> this_dude: num.digits
<this_dude> its fine i did it the long way with that^
<Radar> >> 123.digits
<ruby[bot]> Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Radar> >> 123.digits
<this_dude> im glad i finished that last one so fast
<ruby[bot]> Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Radar> ruby[bot]: go have a lie down plz
<this_dude> this final one is crazy complicated
<this_dude> this one is gonna screw me..idk how to write the string[i] when given multiple strings
<this_dude> what is the total sum of a-z.ord?
<Radar> this_dude: how would you find out if "this is a sentence" contained the letter a?
<this_dude> why ?
<Radar> this_dude: because if you can find that out, then you can also check for b, c, d, etc.
<Radar> Finding out if it contains a is a small step towards solving this problem
<this_dude> im gonna try to write this to just add the .ord value of each string and if its equal to the sum of all letters a-z print true else false
<Radar> ok, sure.
<this_dude> but idk what the sum of a-z is
<Radar> [11:14:07] <Radar>this_dude: how would you find out if "this is a sentence" contained the letter a?
<this_dude> >> (a..z).ord.sum
<ruby[bot]> this_dude: # => undefined local variable or method `a' for main:Object (NameError) ...check link for more (https://eval.in/1046898)
<Radar> this_dude: You asked for hints and I'm dropping them.
<this_dude> >> ("a".."z").ord.sum
<ruby[bot]> this_dude: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Radar> this_dude: plz stop obsessing about .ord. It is not the answer.
<this_dude> i=0 while i < string.length if string[i]=="a" return true else false end i+=1 end
<this_dude> 2847 is the sum of the alphabet
<Radar> this_dude: is there a shorter way
<Radar> this_dude: Maybe there's a way to check if a string INCLUDES a particular substring?
<this_dude> if there is its a method im unfamiliar with...like .scan or something
<this_dude> the fact that input is a number of strings, and then the strings is messing me up
<this_dude> because they only start the function as def isPangram(strings)
<this_dude> so idk where its gonna put the number of strings
Rootsudo has joined #ruby
<Radar> So what's strings then?
<Radar> Can you get it to output what they are?
<this_dude> the test code inputs this 4 we promptly judged antique ivory buckles for the next prize we promptly judged antique ivory buckles for the prizes the quick brown fox jumps over the lazy dog the quick brown fox jump over the lazy dog
<this_dude> sorry didnt mean to past that text....thts what it inputs^
<this_dude> i only have 15 mins left omg
apeiros has quit [Remote host closed the connection]
<this_dude> dude im gonna fail hahaha
<this_dude> i have no idea how to do this
<this_dude> literally
<mroutis> this_dude, a string is just "an array of characters" in C, right?
mr_rich101 has quit [Quit: ZNC - http://znc.in]
<this_dude> yes
<this_dude> 10 minutes ahahaha
<mroutis> so, you want to know if those characters are the whole alphabet, isn't it?
<this_dude> this is what i have
<this_dude> correct
<mroutis> how did you solved the countHoles one? can't you take some inspiration from there?
mr_rich101 has joined #ruby
<this_dude> that was easy
<mroutis> so this is
<this_dude> the problem with this one is i dont understand why the test input is a number and then random strings
<mroutis> the input is "an array of strings"
<this_dude> MY CODE ISNT GIVING ANY OUTPUT I DONT UNDERSTAND WHY
<this_dude> im freaking out
<mroutis> and you need to return 0 or 1 for each of those strings, testing if they are pangram
<this_dude> 6 minutes
<this_dude> correct
<mroutis> ['a', 'abcdefghijklmnopqrstwxyz'] #=> [0,1]
<mroutis> isn't it?
<this_dude> yes
<this_dude> omg please hurry im literally about to cry
<this_dude> 5 minutes
<this_dude> why isnt this doing anything?!
<mroutis> now, do you understand why the input is an array of strings? and what you must output?
<mroutis> why are you adding your strings?
<mroutis> strings.sum
<this_dude> NO
<this_dude> I dont get it
<this_dude> and my brain freaking out isnt helping
<mroutis> dude, you are doing ['a', 'abcdefghijklmnopqrstwxyz'].sum
<Radar> Still obsessing about ord and summing the characters I see.
<Radar> Hopefully this failure will be a great lesson.
<this_dude> SO WHAT DO I DO
<Radar> I told you twice.
<this_dude> ITS NOT A LESSON ITS RUINING MY LIFE
<Radar> [11:18:51] <Radar>this_dude: Maybe there's a way to check if a string INCLUDES a particular substring?
<Radar> [11:16:03] <Radar>[11:14:07] <Radar> this_dude: how would you find out if "this is a sentence" contained the letter a?
<this_dude> so WHAT DO I DO
<this_dude> .include?!
<Radar> Sure.
<mroutis> yep ^
<Radar> >> "this is a sentence".include?("a")
<Radar> >> "this is a sentence".include?("b")
<ruby[bot]> Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<ruby[bot]> Radar: # => false (https://eval.in/1046899)
<Radar> ruby[bot]: don't you fail me now
<Radar> Ok, so now that we've got that, what if we wanted to check a range of letters?
<Radar> ("a".."z").<what> { |c| string.include?(c) }
<this_dude> if string.include("a".."z")==true puts 1 else puts 0
<this_dude> dude one minute
<this_dude> omg omg omg
<Radar> Nobody will give you the answer. It's not our test.
<this_dude> 20 seconds
<this_dude> thanks :)
<mroutis> if a string include a range? mhm I don't think that works
<this_dude> this was my last chance
<this_dude> times up
<this_dude> i failed
<this_dude> :)
<Radar> and now you can never ever try again?
<this_dude> correct
<Radar> for all time?
<this_dude> correct
<this_dude> i failed the admission req
<this_dude> :)
<Radar> Welp. Time to find something else to do then.
<Radar> >> ("a".."z").all? { |c| string.include?(c) }
<ruby[bot]> Radar: # => undefined local variable or method `string' for main:Object ...check link for more (https://eval.in/1046901)
<Radar> >> string = "the quick brown fox jumps over the lazy dog"; ("a".."z").all? { |c| string.include?(c) }
<ruby[bot]> Radar: # => true (https://eval.in/1046902)
<this_dude> dude
<Radar> >> strings = ["the quick brown fox jumps over the lazy dog"]; strings.all? { |s| ("a".."z").all? { |c| string.include?(c) } }
<ruby[bot]> Radar: # => undefined local variable or method `string' for main:Object ...check link for more (https://eval.in/1046903)
<this_dude> idk how to use those kind of codes
<Radar> >> strings = ["the quick brown fox jumps over the lazy dog"]; strings.all? { |s| ("a".."z").all? { |c| s.include?(c) } }
<this_dude> and i shouldnt have needed it for the exam
<ruby[bot]> Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Radar> Time you learned. You would've passeed.
<Radar> passed*
<this_dude> there should be a way to do it the long way
<Radar> this_dude: I am going to tell you one. final. time.
<Radar> Nobody writes Ruby like you're saying they should write Ruby.
<this_dude> NO. that info wasnt in the resources given and they specifically said i only need what they gave me
<Radar> Now that you've failed _three separate times_ it is time you learned the right way. Spend a month doing that. Then apply again.
<Radar> And if you can't apply _there_ then there are plenty of other places to apply to.
<this_dude> just because you dont agree with the way they wanted me to code my answers doesnt mean i shouldnt code them how im told
<this_dude> im soooo frustrated rn
<this_dude> why cant you understand that i needed to know how to do it the long way
GodFather has quit [Ping timeout: 240 seconds]
<Radar> !mute this_dude
<Radar> Ok, time out for 1hr.
<Radar> Why can't you understand that your code would work if you did it the short way too?
kapil___ has quit [Quit: Connection closed for inactivity]
Rootsudo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has joined #ruby
mroutis has quit [Remote host closed the connection]
this_dude has left #ruby [#ruby]
mroutis has joined #ruby
apeiros has quit [Ping timeout: 272 seconds]
mroutis has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
mroutis has joined #ruby
alfiemax_ has quit [Ping timeout: 240 seconds]
<blood> any idea how i convert this to Nokogiri?
fmcgeough has joined #ruby
<blood> @document.root.elements.delete_all("session-descriptor/cookie-name/*[not(@Puppet::Util::XmlFile.Managed)]")
<blood> as ex
<blood> basically deleting anything that doesnt have that attribute
<Radar> !unmute this_dude
<blood> I know I can just loop through each node and handle it but wondering if there was a shorter way like it is done in this repo
aphprentice_ has quit [Quit: Connection closed for inactivity]
gheegh has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
apeiros has joined #ruby
apeiros has quit [Ping timeout: 272 seconds]
tty has quit [Quit: tty]
fmcgeough has quit [Quit: fmcgeough]
tty has joined #ruby
arescorpio has joined #ruby
apeiros has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has quit [Ping timeout: 260 seconds]
maryo has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
maryo has quit [Client Quit]
<blood> got it all working in Nokogiri =)
fmcgeough has joined #ruby
fmcgeough has quit [Client Quit]
mrush has quit [Read error: Connection reset by peer]
Rootsudo has joined #ruby
cadillac_ has quit [Quit: I quit]
alfiemax has joined #ruby
mroutis has quit [Ping timeout: 256 seconds]
aniarya82 has joined #ruby
braincrash has quit [Quit: bye bye]
apeiros has joined #ruby
<Radar> blood: congrats :)
gix has joined #ruby
apeiros has quit [Ping timeout: 256 seconds]
braincrash has joined #ruby
_whitelogger has joined #ruby
ciro has quit [Quit: WeeChat 2.2]
z3uS has quit [Quit: /dev/null]
thy0 has quit [Quit: TTFN]
z3uS has joined #ruby
apeiros has joined #ruby
apeiros has quit [Ping timeout: 272 seconds]
<blood> Radar: thanks, im just having trouble with generating xml files properly.
<blood> files that do not exist
mrush has joined #ruby
<blood> @document = Nokogiri::XML::Builder.new(:encoding => 'UTF-8').to_xml , shouldn't this work for an empty xml document
s2013 has joined #ruby
s2013 has quit [Client Quit]
<mrush> is there a way to set a default string encoding for an entire script
s2013 has joined #ruby
s2013 has quit [Client Quit]
<mrush> i think i need to override the default
<mrush> encoding for the string class
c_h_s has joined #ruby
arescorpio has quit [Quit: Leaving.]
herbmillerjr has joined #ruby
apeiros has joined #ruby
Rootsudo has quit [Read error: Connection reset by peer]
DTZUZO has joined #ruby
mroutis has joined #ruby
blood has quit []
kapil___ has joined #ruby
aniarya82 has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 256 seconds]
mojtaba has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
mozzarella has quit [Remote host closed the connection]
sylario has quit [Quit: Connection closed for inactivity]
mozzarella has joined #ruby
mroutis has quit [Remote host closed the connection]
<mrush> can i manually place a gem into c:\ruby192\lib\
ryuteki has joined #ruby
<mrush> in python you just drop libraries into c:\python\Lib\
duderonomy has joined #ruby
p4p0l0 has joined #ruby
\void is now known as Time-Wrap
Time-Wrap is now known as \void
Inline has quit [Quit: Leaving]
\void is now known as Time-Wrap
Time-Wrap is now known as \void
aufi has joined #ruby
c_h_s has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mrush> nm
agent_white has quit [Ping timeout: 260 seconds]
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
alfiemax has quit [Remote host closed the connection]
dellavg has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
dviola has quit [Quit: WeeChat 2.2]
dionysus69 has joined #ruby
ur5us has quit [Remote host closed the connection]
varesa_ has joined #ruby
Freshnuts has joined #ruby
Freshnuts has quit [Max SendQ exceeded]
Freshnuts has joined #ruby
apeiros has quit [Remote host closed the connection]
Freshnuts has quit [Max SendQ exceeded]
Freshnuts has joined #ruby
apeiros has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
dhollin is now known as dhollinger
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
DTZUZO has quit [Ping timeout: 244 seconds]
mojtaba has quit [Quit: Leaving.]
dionysus69 has joined #ruby
p4p0l0 has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
p4p0l0 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
p4p0l0 has quit [Ping timeout: 268 seconds]
asphyxia has joined #ruby
clemens3 has joined #ruby
mroutis has joined #ruby
mroutis has quit [Remote host closed the connection]
ferhaty has joined #ruby
dellavg has quit [Read error: Connection reset by peer]
dellavg has joined #ruby
Dbugger has joined #ruby
ryuteki has quit [Quit: leaving]
aufi has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
c0ncealed2 has quit [Remote host closed the connection]
Some-body_ has joined #ruby
DarthGandalf has quit [Ping timeout: 260 seconds]
Some-body_ is now known as DarthGandalf
c0ncealed2 has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Ping timeout: 272 seconds]
alex`` has joined #ruby
mikecmpbll has joined #ruby
<asphyxia> hi guys, if I have a function outside of the main program, calling an integer variable that I use later on in the program, how can I declare it as an integer in the global function?
<asphyxia> Because currently I get told that it's undefined
<asphyxia> e.g. in another language I would say myValue: Integer
<tbuehlmann> can you gist what you have?
<ruby[bot]> asphyxia: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<asphyxia> oh so that's what you meant by gist I thought meant it as an expression of speech haha
moei has quit [Quit: Leaving...]
<tbuehlmann> okay, and what exactly is the error you're getting?
<tbuehlmann> oh I see
<tbuehlmann> your calculate_age method uses year_born, but the method doesn't know about it. so you could simply have a second method parameter for that and call the method like calculate_age(prompt, year_born)
<asphyxia> so I don't need to declare the data type in that function?
<asphyxia> I'm very new to ruby, sorry if that seems like a silly question
lxsameer has joined #ruby
wildermind has joined #ruby
erratic has joined #ruby
psychicist__ has joined #ruby
Beams has joined #ruby
conta has joined #ruby
tristanp has joined #ruby
yokel has joined #ruby
tristanp has quit [Ping timeout: 248 seconds]
<asphyxia> As Ruby is dynamically typed, it does not require
<asphyxia> type information on parameters and return values
<asphyxia> 1/2 hr later
<tbuehlmann> right, you can't do that
reber has joined #ruby
Freshnuts has quit [Quit: Leaving]
moei has joined #ruby
Beams has quit [Quit: .]
tty has quit [Quit: tty]
claudiuinberlin has joined #ruby
Beams has joined #ruby
teclator has joined #ruby
Burgestrand has quit [Quit: Closing time!]
gregf_ has joined #ruby
Emmanuel_Chanel has joined #ruby
alfiemax has joined #ruby
alex`` has quit [Ping timeout: 248 seconds]
dellavg has quit [Remote host closed the connection]
dellavg has joined #ruby
dellavg has quit [Remote host closed the connection]
dellavg has joined #ruby
Pip has joined #ruby
amelliaa has joined #ruby
agent_white has quit [Quit: night]
Pip has quit [Quit: Leaving]
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
Beams has quit [Quit: .]
sticaz has joined #ruby
aufi has joined #ruby
tristanp has joined #ruby
Beams has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
evdubs has quit [Ping timeout: 265 seconds]
tristanp has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
gheegh has joined #ruby
snickers has joined #ruby
Tempesta has quit [Quit: See ya!]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
dionysus70 is now known as dionysus69
Beams has quit [Quit: .]
Beams has joined #ruby
Tempesta has joined #ruby
cabotto has joined #ruby
conta has quit [Quit: conta]
mondz has quit [Remote host closed the connection]
n13z has quit [Quit: leaving]
mondz has joined #ruby
augcesar has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
AJA4350 has joined #ruby
alex`` has joined #ruby
cabotto has quit []
DTZUZO has joined #ruby
noobineer has quit [Ping timeout: 240 seconds]
fmcgeough has joined #ruby
mistergibson has joined #ruby
fmcgeough has quit [Client Quit]
tristanp has joined #ruby
tristanp has quit [Ping timeout: 272 seconds]
alfiemax_ has quit [Ping timeout: 255 seconds]
vondruch has joined #ruby
KeyJoo has joined #ruby
KeyJoo has quit [Max SendQ exceeded]
alex`` has quit [Ping timeout: 240 seconds]
KeyJoo has joined #ruby
snickers has quit [Quit: Textual IRC Client: www.textualapp.com]
KeyJoo has quit [Quit: KeyJoo]
fmartingr has joined #ruby
fmcgeough has joined #ruby
conta1 has joined #ruby
jcalla has joined #ruby
fmcgeough has quit [Ping timeout: 256 seconds]
asphyxia has quit [Ping timeout: 240 seconds]
conta1 has quit [Quit: conta1]
conta1 has joined #ruby
Burgestrand has quit [Quit: Closing time!]
bmurt has joined #ruby
c0ncealed2 has quit [Remote host closed the connection]
c0ncealed2 has joined #ruby
ricer2 has quit [Quit: Caught SystemExit exception.]
ricer2 has joined #ruby
alex`` has joined #ruby
GodFather has joined #ruby
mojtaba has joined #ruby
fmcgeough has joined #ruby
Burgestrand has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
mojtaba has quit [Ping timeout: 268 seconds]
aupadhye has joined #ruby
akaiiro has joined #ruby
dellavg has quit [Read error: Connection reset by peer]
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dellavg has joined #ruby
gheegh has joined #ruby
akaiiro has quit [Remote host closed the connection]
gnufied has joined #ruby
marius has quit [Quit: baj]
marius has joined #ruby
Burgestrand has quit [Quit: Closing time!]
claudiuinberlin has quit [Ping timeout: 256 seconds]
akaiiro has joined #ruby
mojtaba has joined #ruby
schaary has quit []
Inline has joined #ruby
Burgestrand has joined #ruby
Rapture has joined #ruby
mikecmpb_ has joined #ruby
bijan_ has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
kapil___ has joined #ruby
croberts has joined #ruby
ferhaty has quit [Quit: ferhaty]
exchgr has joined #ruby
duderonomy has joined #ruby
bijan_ has quit []
blood has joined #ruby
<blood> https://dpaste.de/o7bO I'm trying to have each node be a child of previous in xml but not sure how to do this when I use `xml.send`.
mojtaba has quit [Quit: Leaving.]
<blood> Ideally i would like to just pass an xpath that is created in XML without having to iterate through each node
<blood> Also, this is for a new XML file that does not exist
<apeiros> so `nodes = %w[foo bar baz]` should become <foo><bar><baz></foo></bar></baz>
<apeiros> ?
<blood> yup exactly
<blood> but is there no way to just specify a complete xpath?
<apeiros> you'd use recursion for that
<apeiros> I'm not aware of any
<blood> right but in the builder it needs to be within the block
<blood> so how would i do that in ruby?
<apeiros> you can recurse even with a block
<blood> I'm using recurse within the root block but not sure how to create a block as I go through
<blood> Only other thing I can think of to make this easier is to just generate an XML with root node then use xpath to insert everything else
<apeiros> there are probably nicer ways, but I'm currently working on something else, so maybe this will at least help you: https://dpaste.de/BaG2
<blood> thanks
yo61 has quit []
yo61 has joined #ruby
<blood> worked perfect, thanks again
s2013 has joined #ruby
gr33n7007h1 has joined #ruby
gr33n7007h1 is now known as al2o3-cr
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aupadhye has quit [Ping timeout: 244 seconds]
bmurt has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
amelliaa has quit [Quit: -]
apeiros has quit []
mojtaba has joined #ruby
apeiros_ has joined #ruby
mojtaba has quit [Quit: Leaving.]
vondruch has quit [Quit: vondruch]
mojtaba has joined #ruby
Burgestrand has quit [Quit: Closing time!]
apeiros_ has quit [Remote host closed the connection]
ogres has joined #ruby
mojtaba has quit [Quit: Leaving.]
rippa has joined #ruby
apeiros_ has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
tycoon177 is now known as docker-priest
dbrandon has joined #ruby
docker-priest is now known as tycoon177
dbrandon is now known as dbrandon-
dviola has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
mroutis has joined #ruby
chouhoulis has joined #ruby
hotpancakes has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
polishdub has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
teclator has quit [Disconnected by services]
r29v has joined #ruby
gheegh has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
s2013 has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
mojtaba has joined #ruby
conta1 has quit [Quit: conta1]
raulp has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
dbrandon- is now known as dbrandon
chrisseaton has joined #ruby
sanscoeur has joined #ruby
jcarl43 has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
Beams has quit [Quit: .]
mikecmpb_ has quit [Quit: inabit. zz.]
mojtaba has quit [Quit: Leaving.]
dellavg has quit [Ping timeout: 272 seconds]
cthulchu has joined #ruby
Eiam has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3 has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
gheegh has joined #ruby
sameerynho has joined #ruby
dellavg has joined #ruby
hotpancakes has quit [Remote host closed the connection]
herbmillerjr has quit [Quit: Konversation terminated!]
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
hotpancakes has joined #ruby
hotpancakes has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
<mroutis> join #nixos
* mroutis ashamed
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mroutis> not promoting, my pinky couldn't reach the slash :/
<apeiros_> as you should be. everybody knows it's 🥖join
s2013 has joined #ruby
catsed has joined #ruby
mozzarel1 has joined #ruby
mozzarella has quit [Read error: Connection reset by peer]
postmodern has quit [Read error: Connection reset by peer]
cats has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 272 seconds]
postmodern_ has joined #ruby
mozzarel1 is now known as mozzarella
catsed is now known as cats
mroutis has quit [Quit: leaving]
mroutis has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
<mroutis> apeiros_: what kind of black magic was that! didn't know about <tab>
timmow_ has quit [Ping timeout: 260 seconds]
axsuul has joined #ruby
AJA4350 has quit [Quit: AJA4350]
cagomez has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
timmow has joined #ruby
pwnd_nsfw has quit [Ping timeout: 260 seconds]
<baweaver> Playing with ideas for a future talk, scale from 1 to 5, with 1 being no interest and 5 being in love with the ideas, what do you make of this one: https://twitter.com/keystonelemur/status/1028901018921185280
<baweaver> apeiros_: _might_ have been watching too much Archer and Baccano.
<cthulchu> I missed out
<cthulchu> no idea what the idea was
<cthulchu> also debugging in Ruby is very-very easy
<cthulchu> try debugging in asm
hotpancakes has quit [Remote host closed the connection]
<baweaver> Mind, the target audience is newbies.
<mroutis> unfair comparison, everything in assembly is hard
<cthulchu> oh, well, the cartoons would be really good for kids
<baweaver> Meaning that it very well may not be easy for them.
<havenwood> baweaver: 5, but I'm a a sucker for investigations!
<cthulchu> mroutis, the point was everything in Ruby is easy :)
<havenwood> baweaver: What do you call an alligator in a vest?
<baweaver> investigator
<apeiros_> baweaver: given how "dick tracey" the tracy lends itself to "trace", I'm amused you didn't use something in that direction as a name (tho, I guess dick tracy isn't really "noir")
apeiros_ is now known as apeiros
gheegh has joined #ruby
s2013 has joined #ruby
<havenwood> Point Tracey, the TracePointer.
<cthulchu> ha
<cthulchu> I like it
<baweaver> You can't pay me enough to get on stage and say dick tracey though
ogres has quit [Quit: Connection closed for inactivity]
<cthulchu> lol
<baweaver> The idea is to make stories to cover basic concepts, and maybe a few advanced ones.
alfiemax has joined #ruby
<mroutis> baweaver: 5 (not target audience, tho it would be awesome that beginners understand how to debug/understand what's going on with their code)
kevinsjoberg has joined #ruby
<mroutis> it could help to reduce the frustration at the start of their learning curve
<baweaver> Other ideas include "The Pattern Matching Express" (===, patterns, western), "The Most RSpectacular Show on Earth!" (testing, circus)
wildermind has quit [Quit: Connection closed for inactivity]
<baweaver> "It's a Jungle Out There" (refactoring, Madagascar)
s2013 has quit [Ping timeout: 248 seconds]
alfiemax has quit [Ping timeout: 248 seconds]
<baweaver> "Professor When" (logging, monitoring, investigations)
bijan_ has joined #ruby
<Caerus> id´d watch it for sure
mrush has quit [Ping timeout: 244 seconds]
<Caerus> saw the slides for the one you just did. Couldn´t find the actual talk though
gigetoo has joined #ruby
<baweaver> It's not out yet.
<baweaver> Remember the talk only happened about a week and a half ago
Freshnuts has joined #ruby
jenrzzz has joined #ruby
<baweaver> Hrm. Na, "Professor When" may make a good Git talk. Screwing around with timelines and such
sauvin has quit [Read error: Connection reset by peer]
bsamorim has joined #ruby
mroutis has quit [Ping timeout: 240 seconds]
<bsamorim> Hi, given MRI's GIL, do I have to use synchronization mechanisms such as locks for sharing an array between two threads? My case is a bit more specific: the threads would just push/pop to/from the array, respectively. The order in which the push and pops would actually be executed would be irrelevant - I just wanted to know if they could be considered atomic.
<bsamorim> Please interpret "MRI" as "Most popular ruby interpreter for > 2.0 rubies"
wildermind has joined #ruby
<apeiros> bsamorim: yes
akaiiro has quit [Remote host closed the connection]
<bsamorim> apeiros: k, thx
<apeiros> bsamorim: GIL does not magically remove race conditions for shared resources.
<bsamorim> apeiros: it doesn't, but it certainly helps to enable these operations to be thread-safe by default
<bsamorim> they are in python, for instance
<bsamorim> *in CPython
<apeiros> thread-safe is a word most people sadly completely misunderstand.
orbyt_ has joined #ruby
<bsamorim> apeiros: it isn't really a formal concept ;)
<bsamorim> I explained what I meant by thread-safe in the first message's last sentence
<apeiros> I'm not sure it really isn't. I have an understanding of what it is supposed to be, but never bothered with looking up whether there's a formal definition for that.
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> anyway, amending what I previously wrote: if you're only using push & pop and don't mind which item is actually popped, and pop occasionally returning nil (depending on how your threads use the array it's a possibility), then you don't need to synchronize.
Freshnuts has quit [Quit: Leaving]
<bsamorim> apeiros: that's fine by me...thanks!
<apeiros> but honestly, you still should. atomic behavior of push/pop is not guaranteed.
<bsamorim> apeiros: k, thanks!
<apeiros> <3 pry-doc's ability to dig into C sources
agent_white has joined #ruby
jalcine has quit [Ping timeout: 240 seconds]
fmartingr has quit [Quit: Connection closed for inactivity]
fmcgeough has quit [Quit: fmcgeough]
reber__ has joined #ruby
akaiiro has joined #ruby
reber has quit [Ping timeout: 256 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bijan_ has quit [Quit: Textual IRC Client: www.textualapp.com]
konsolebox has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
Emmanuel_Chanel has joined #ruby
mroutis has joined #ruby
adambeynon_ has joined #ruby
skmp_ has joined #ruby
seanh_ has joined #ruby
tycoon177_ has joined #ruby
cttttt_ has joined #ruby
KnownSyntax_ has joined #ruby
BuildTheRobots_ has joined #ruby
tycoon177 has quit [Disconnected by services]
tycoon177_ is now known as tycoon177
LenPayne_ has joined #ruby
tjbp_ has joined #ruby
mnem has joined #ruby
xMopx- has joined #ruby
hotpancakes has joined #ruby
justache has quit [*.net *.split]
snapcase has quit [*.net *.split]
AndroidKitKat has quit [*.net *.split]
ec has quit [*.net *.split]
adambeynon has quit [*.net *.split]
Sina has quit [*.net *.split]
tjbp has quit [*.net *.split]
jonjitsu[m] has quit [*.net *.split]
haylon[m] has quit [*.net *.split]
Chew has quit [*.net *.split]
BuildTheRobots has quit [*.net *.split]
skmp has quit [*.net *.split]
seanh has quit [*.net *.split]
daemonwrangler has quit [*.net *.split]
cttttt has quit [*.net *.split]
KnownSyntax has quit [*.net *.split]
knight_ has quit [*.net *.split]
mnemon has quit [*.net *.split]
LenPayne has quit [*.net *.split]
ujjain has quit [*.net *.split]
tbuehlmann has quit [*.net *.split]
xMopx has quit [*.net *.split]
adambeynon_ is now known as adambeynon
skmp_ is now known as skmp
KnownSyntax_ is now known as KnownSyntax
BuildTheRobots_ is now known as BuildTheRobots
cttttt_ is now known as cttttt
seanh_ is now known as seanh
xMopx- is now known as xMopx
dinfuehr has quit [Ping timeout: 240 seconds]
ujjain has joined #ruby
drbrain has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
drbrain has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
Samian has joined #ruby
<Samian> Anyone here use a company wiki at work? My company uses team services and we have a office 365 subscription, so we could host a wiki through those things, but they're both slow. SO I'm looking for alternatives
clemens3 has joined #ruby
AndroidKitKat has joined #ruby
<canton7> we've used gollum with success before
jenrzzz has quit [Ping timeout: 240 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
psychicist__ has quit [Ping timeout: 268 seconds]
orbyt_ has joined #ruby
fmcgeough has joined #ruby
Puffball has quit [Remote host closed the connection]
sanscoeu_ has joined #ruby
dviola has quit [Quit: WeeChat 2.2]
Puffball has joined #ruby
sanscoeur has quit [Ping timeout: 272 seconds]
DLSteve_ has joined #ruby
dellavg has quit [Ping timeout: 240 seconds]
<sonOfRa> Crossposting from #rubyonrails since it's not specific: Can anyone explain to me this really odd behaviour? https://gist.github.com/sonOfRa/0ea3af35ff2cfaf301f860f717569497
<sonOfRa> Essentially, once any block is entered, user (or any variable that gets assigned user, or any of its contents) becomes nil
<baweaver> instance_eval of some sort I'd guess.
<baweaver> where's connect defined?
<apeiros> why do you use abort instead of e.g. p?
<apeiros> baweaver: user is an lvar, though
<sonOfRa> needed a quick way to print it out to the screen in rails
<apeiros> so a method shouldn't be able to shadow it
<apeiros> sonOfRa: use p twice instead of abort. otherwise we're not sure the context is the same
<apeiros> you can use something like `puts "="*100` if you want to highlight it in the output
<apeiros> sonOfRa: also, you write "This fails because user is suddenly nil" - please provide the exact error. you wouldn't be the first to misrepresent an exception.
<sonOfRa> NoMethodError (undefined method `dn' for nil:NilClass): is the actual error
<baweaver> Is this called once, or multiple times?
LenPayne_ is now known as LenPayne
<sonOfRa> With p it seems to be now called multiple times, actually, and I don't quite see why (yet)
<sonOfRa> hang on
<baweaver> because I'd bet a nil user got passed into another call somehow if it is called multiple times.
<baweaver> hence apeiros's context mention above.
<apeiros> yeah, hence abort = bad for figuring stuff :)
<apeiros> so first call you have a user, and any subsequent call you don't
<sonOfRa> gist is updated with the update. Interesting. I wonder where the user went
<sonOfRa> d'oh
<apeiros> yeah, so it gets called twice. and second call with a nil arg.
<sonOfRa> Left some of the old to-be-refactored code in there
<sonOfRa> Thanks for the hint, this would have taken ages with the abort way
<apeiros> and don't do `p user.inspect`, just `p user`
<apeiros> p already invokes inspect.
<sonOfRa> I see
<sonOfRa> Been a while since I last touched this project, and it's the only ruby thing I've ever done
<sonOfRa> Removing the old code did the trick
<apeiros> which btw. means you can do handy stuff like: `p some_label: some_value, some_other_label: some_other_value`
dviola has joined #ruby
Eiam_ has joined #ruby
Puffball has quit [Remote host closed the connection]
Rootsudo has joined #ruby
Eiam has quit [Ping timeout: 276 seconds]
Puffball has joined #ruby
alex`` has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 265 seconds]
hotpancakes has joined #ruby
dviola has quit [Quit: WeeChat 2.2]
GodFather has quit [Ping timeout: 240 seconds]
akaiiro has quit [Ping timeout: 248 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sanscoeu_ has quit [Remote host closed the connection]
sanscoeur has joined #ruby
mojtaba has joined #ruby
gheegh has joined #ruby
GodFather has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
beowuff has quit [Ping timeout: 244 seconds]
tty has joined #ruby
dreamthese has joined #ruby
nicesignal has quit [Remote host closed the connection]
dreamthese has quit [Remote host closed the connection]
nicesignal has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
beowuff has joined #ruby
Dbugger has quit [Ping timeout: 265 seconds]
dviola has joined #ruby
hotpancakes has quit [Remote host closed the connection]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
patr0clus has joined #ruby
exchgr` has joined #ruby
exchgr has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby
sameerynho has quit [Ping timeout: 244 seconds]
hotpancakes has quit [Client Quit]
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
sanscoeur has quit [Read error: Connection reset by peer]
sanscoeur has joined #ruby
bsamorim has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
nfk has joined #ruby
beowuff has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
alfiemax has joined #ruby
beowuff has joined #ruby
chouhoulis has quit [Ping timeout: 265 seconds]
reber__ has quit [Remote host closed the connection]
beowuff has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Rootsudo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
polishdub has quit [Quit: leaving]
Chew has joined #ruby
apeiros has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
DarthGandalf has quit [Ping timeout: 260 seconds]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
arekushi has quit [Quit: Gateway shutdown]
Some-body_ has joined #ruby
apeiros has joined #ruby
patr0clus has quit [Remote host closed the connection]
patr0clus has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
Some-body_ has quit [Ping timeout: 272 seconds]
orbyt_ has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
clemens3 has quit [Ping timeout: 240 seconds]
Some-body_ has joined #ruby
rfoust has joined #ruby
apeiros has joined #ruby
herbmillerjr has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ianbrown78 has quit [Quit: Connection closed for inactivity]
apeiros has quit [Ping timeout: 272 seconds]
herbmillerjr has quit [Excess Flood]
herbmillerjr has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
thy0 has joined #ruby
DarthGan- has joined #ruby
Some-body_ has quit [Ping timeout: 260 seconds]
r29v has quit [Quit: r29v]
thy0_ has joined #ruby
thy0 has quit [Ping timeout: 244 seconds]
mistergibson has quit [Quit: Leaving]