apeiros changed the topic of #ruby to: Ruby 2.1.4; 2.0.0-p594; 1.9.3-p550: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
josephndenton has joined #ruby
moritzs has joined #ruby
jimms has quit []
b3itz has joined #ruby
AlSquire has joined #ruby
troyreadyy has joined #ruby
shevy has quit [Ping timeout: 255 seconds]
<MattB> a = {blah: 5, foo: 10, bar: 15}; a = a.values; sum = a.inject(&:+).to_f; a.map! { |n| n / sum * 100.0}; a = Hash[(0...a.size).zip(a)]; a
beneggett has quit [Ping timeout: 256 seconds]
failshell has joined #ruby
<MattB> >> a = {blah: 5, foo: 10, bar: 15}; a = a.values; sum = a.inject(&:+).to_f; a.map! { |n| n / sum * 100.0}; a = Hash[(0...a.size).zip(a)]; a
<eval-in__> MattB => {0=>16.666666666666664, 1=>33.33333333333333, 2=>50.0} (https://eval.in/217532)
maestrojed has joined #ruby
<zenspider> you just threw ordering out the window
<zenspider> these requirements sure look like BS to me
failshell has quit [Remote host closed the connection]
<b3itz> hey guys, so i need to loop through a txt file "inFile" line by line and parse the data into an array. the data in the inFile is structured like, 33, 55, 22 etc. how in the world do i take that inFile and parse it into an array/?
<jenrzzz> MattB: you're gonna need to access a.values no matter what you do, so there's not much to be gained by avoiding the intermediate arrays
balazs has quit [Ping timeout: 258 seconds]
<b3itz> obiously i need to loop throigh the file line by line... inFile.each_line do |line|?
balazs has joined #ruby
troyready has quit [Ping timeout: 250 seconds]
geggam has quit [Ping timeout: 265 seconds]
<zenspider> b3itz: obviously?
<jenrzzz> MattB: but you could do some shenanigans like hash.each.with_index.with_object({}) do |(k, v), i, h|... if you want to keep it all in a block and avoid calling Hash[]
<pontiki> b3itz: it's a comma-separated line?
<gr33n7007h> b3itz, ARGF.each do |line| ....
it0a has joined #ruby
<b3itz> pontiki: no, just using the return button
klaut_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
<jenrzzz> b3itz: that sounds like a CSV file. have you checked out the CSV module?
cpruitt has quit [Quit: cpruitt]
<pontiki> ok, never mind
<b3itz> jenrzzz: this is an assignment using a txt file my prof provided
<pontiki> homework?
<pontiki> hah
<jenrzzz> ah. what part are you stuck on?
<MattB> jenrzzz: Okay thanks.
<b3itz> yes homework. Well, i have the file opened File.open('input.txt', 'r')
<b3itz> then im not sure how to loop through and create an array out of each line
michael3 has joined #ruby
<b3itz> 11 55 29 68 22 => i need to then read that line in, and create an array, data, [11, 55, 29, 68, 22]\
<eam> b3itz: what methods are available on your file object?
<b3itz> eam: not sure what you mean..
<eam> the_file = File.open('input.txt', 'r') # now, what methods are available to call on the_file?
<lampd1> jenrzzz: but he doesn't need to parse an html file
<lampd1> lol ;)
<eam> b3itz: read through jenrzzz's link, try using some of those methods documented there
<jenrzzz> this is srs business for srs programmers
<jenrzzz> no jokes allowed
<jenrzzz> you could put an eye out
<lampd1> all jokes aside, i need to dig into some file parsing right now too :(
TeresaP has quit [Quit: Page closed]
<b3itz> ok lemme take a look real quick, am i on the right track thinking i need to use a for loop to iterate through and seperate items in the array by the space?
<lampd1> hooray for APIless software \o/
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MattB> jenrzzz: That's an abomination: hash.each.with_index.with_object({}) do |(k, v), i, h| ! :-) Think I'll stick with Hash[]
<jenrzzz> MattB: yep :)
<jenrzzz> b3itz: you should almost never use a for loop in ruby
<b3itz> jenrzzz: you can see i've mostly studied java lol
<b3itz> what should i use??
<Authenticator> b3itz: Implement it via the CSV lib for testing and code your impementation to have the same interface (if possible) and return the same values. Reverse engineer it to the level desired for class.
fmcgeough has joined #ruby
freerobby has quit [Quit: Leaving.]
reinaldob has joined #ruby
fmcgeough has quit [Client Quit]
<MattB> b3itz #each is your friend when it comes to iteration, but Ruby has other methods to split a string into an array by separator.
pauly_oc has joined #ruby
shevy has joined #ruby
siaw has joined #ruby
<siaw> anyone here? :)
<jenrzzz> nope
<siaw> @jenrzzz i have a question for you
<MattB> nah
<benzrf> >> [1, 2, 3].with_object
<eval-in__> benzrf => undefined method `with_object' for [1, 2, 3]:Array (NoMethodError) ... (https://eval.in/217536)
<benzrf> interesting.
Fire-Dragon-DoL has quit [Quit: Leaving.]
t_mmyv has joined #ruby
Spami has joined #ruby
reinaldob has quit [Remote host closed the connection]
zil2 has joined #ruby
mikecmpbll has quit [Remote host closed the connection]
<elektronaut> siaw: check the case - dir, not Dir
kireevco has quit [Read error: Connection reset by peer]
<siaw> elektronaut: and i’m good?
<atmosx> hello
<b3itz> QUICK! someone find the missing "end"! http://pastebin.com/S7nWCcdB
<atmosx> Google launched Cloud Platform, 300 USD free trial https://cloud.google.com
<atmosx> impressive
<MattB> Ah, in the excitement I missed that we lost one of the steps along the way:
<MattB> >> a = {blah: 5, foo: 10, bar: 15}; a = a.values; sum = a.inject(&:+).to_f; a.map! { |n| n / sum * 100.0}; a = Hash[(0...a.size).zip(a)]; a
<eval-in__> MattB => {0=>16.666666666666664, 1=>33.33333333333333, 2=>50.0} (https://eval.in/217537)
zorak8 has joined #ruby
<MattB> We're not summing the values before calcualting the percentage.
<zil2> Can anyone help me on this? Driving me nuts... - http://stackoverflow.com/questions/26746625/ruby-if-regex-help-needed
<atmosx> MattB: did you pull that off now? impressive too :-)
<atmosx> zil2: can show the entire script?
<MattB> it should be {0=>100.0, 1=>83.3333, 2=>50.0}
dkb20k has joined #ruby
siaw has left #ruby [#ruby]
ozialien has joined #ruby
linojon has joined #ruby
enebo has quit [Quit: enebo]
<MattB> ie. Sum of all three values as percentage of total, sum of second and third (as percentage), third only (as %).
<MattB> That's why I was using the index in the first place, to track where I was up to in the array...
freerobby has joined #ruby
<zil2> atmosx - it is really really long and awkward/has many related files, can show you via teamviewer on the machine
ghostmoth has quit [Quit: ghostmoth]
dkb20k has quit [Ping timeout: 255 seconds]
tkuchiki has quit [Remote host closed the connection]
<atmosx> zil2: can you upload the method or the *lines* where the code which you can't get to work is? I mean like 3 lines up/down or the entire method (if it's part of a method).
tkuchiki has joined #ruby
<atmosx> zil2: if you can upload it to github, I'm not opening a TM session now with a stranger :-P
<zil2> heh, even as you as the controller!? No worries, I'll try to upload...
adriancb has quit [Remote host closed the connection]
<jenrzzz> MattB: can you specify the problem clearly in a gist with expected input and output?
<MattB> Yes, good idea - we were getting there by iteration, but with a step missed it's gonna be hard to back track.
phutchins has quit [Ping timeout: 265 seconds]
b3itz has quit [Quit: Page closed]
phutchins has joined #ruby
<atmosx> zil2: actually you need to show (in the SO post too) the convet_err() method mus tbe defined somewhere
tkuchiki has quit [Ping timeout: 265 seconds]
<jenrzzz> zil2: does convert_err return a string?
<atmosx> zil2: first things first: That code is wrong. You can't use #{} outside of a double-quote string "#{var}" or var
<atmosx> zil2: so in your case should be: convert_err(results["status"]) =~ /Uknown/ in line 4
<zil2> I have never used ruby before now, I am a c# dev, I have never seen #{} and after googling for ages, I can't even find a refrence that shows what it is... I'll try to dig out convert_err now
<atmosx> now if you can show the convert_err method would be fine
<atmosx> remove the #{} you don't need it. Adding the double quotes will work too, but will add up confusion.
<jenrzzz> zil2: #{} is used for string interpolation. e.g. "foo-#{1 + 2}" => 'foo-3'
Pupeno has joined #ruby
cashnguns has joined #ruby
crocket has joined #ruby
<crocket> How do I get the number of processors without installing any ruby module?
shevy has quit [Ping timeout: 264 seconds]
<jenrzzz> crocket: cat /proc/cpuinfo
<zil2> atmosx- jenrzzz - http://pastebin.com/CwBHiTnj
<atmosx> `grep -c processor /proc/cpuinfo`.to_i
Pupeno_ has quit [Ping timeout: 264 seconds]
<crocket> jenrzzz, Yuck
burritocat has quit [Ping timeout: 244 seconds]
<crocket> That's very OS-specific
<jenrzzz> cpuinfo is very OS-specific
<crocket> /proc/cpuinfo doesn't exist in windows.
<crocket> I just need to get the number of hardware threads.
<jenrzzz> i don't think you can do this with pure ruby
<jenrzzz> the sys-cpu gem will though
<atmosx> crocket: in BSd either, but I suggest you go with the 'system' gem then or you write your own method.
sevenseacat has joined #ruby
<crocket> Woo
Musashi007 has quit [Quit: Musashi007]
oo_ has joined #ruby
<zil2> atmosx trying to run now iwth modifications you said
rshetty has joined #ruby
<atmosx> zil2: do you know what the results["status"] variable should return? What kind of class? String or Symbol? Because I'm getting the idea you're expecting a symbol there.
Kricir has joined #ruby
<jenrzzz> atmosx: i think it might be anything. #convert_error(err) returns "Unknown Error" unless [:required, :no_response].include?(err)
razieliyo has quit [Quit: Saliendo]
<zil2> atmosx: sorry, I don't have a clue :( http://pastebin.com/CwBHiTnj is the script, I can't say more than that other than poste other bits
Joufflu has joined #ruby
<atmosx> zil2: did you run the modification I gave to see if the error is reproduced?
<atmosx> in line 4?
<zil2> atmosx - I am trying to run it now, just takes ages to actually get to a response of unknown!
rshetty has quit [Ping timeout: 244 seconds]
pauly_oc has quit [Ping timeout: 250 seconds]
<zil2> it is like 1 in 50000 runs (can do about 2-3 a second) but it just output then failed... so, idea is to rerun when it comes up
razrunelord has joined #ruby
<atmosx> zil2: your code should look like this now http://pastebin.com/8wKQrEUe
jonr22 has joined #ruby
skolman_ has quit [Remote host closed the connection]
<atmosx> oh I see
tokik has quit [Ping timeout: 255 seconds]
Joufflu has quit [Read error: Connection reset by peer]
skolman has joined #ruby
louism2wash has joined #ruby
<zil2> yep, that is what I have - so far so good... I mean, when I tried, it kept doing the retry no matter what/on anything... it is processing now!
<louism2wash> Hey guys, is there any standard for what goes into your a lib directory in a Ruby project? That's where I am putting my class files. Thanks.
baroquebobcat has quit [Quit: baroquebobcat]
zB0hs has joined #ruby
djbkd__ has joined #ruby
rshetty has joined #ruby
graft has joined #ruby
Wolland has joined #ruby
shevy has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<zil2> woot! atmosx: It worked! :) Retried the failed one! Thank you so much!
<atmosx> zil2: so you're okay? Also that code segment you showed, uses if/else ... I think might be better style to use exceptions http://ruby.bastardsbook.com/chapters/exception-handling/ but if it works and it's complicated better not touch it :-)
<atmosx> zil2: no worries, that was easy :-)
djbkd_ has quit [Ping timeout: 245 seconds]
<atmosx> zil2: glad to help
<graft> okay, so i can do Circle.new.is_a? Shape, but what about the equivalent for the class? Circle.is_a? Shape doesn't do what I want
djbkd_ has joined #ruby
<zil2> honestly, I am not sure how much I will be using ruby/this in future... just needed something quick and paid someone who sent it, then dropped off the radar when we needed this slight modification on errors...
<atmosx> louism2wash: is your program going to be a gem or something?
<Radar> the who?
goodenough has joined #ruby
<zil2> atmosx: if on stack overflow, please reply with that tiny mod and I'll upvote/mark as answer when I can
abstrakt has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
<MattB> Okay, I"m back! :-)
<louism2wash> atmosx: no, I just thought that lib was a ruby standard??? Is there a standard place to put my class files I guess would be a better way to ask that question :)
<atmosx> zil2: A guy already replied, I'm on SO too but never mind ;-) Upload that guy's answer, it was correct.
<porfa> hey guys, instead of telling a string to delete specific characters str.[2..-1] cant i specify a patern instead?
<MattB> Here's a pastie: http://pastebin.com/MyE5nYtq
<MattB> Basic question is, what's better than: a.map!.with_index{|v, i| (a[i..a.count].inject(&:+).to_f/total*100.0)}
<zil2> atmosx - I couldn't get his answer to work / the framework I am using (custom interpreter in this app) doesn't seem to support .include
<atmosx> zil2: I see, okay. Give me 2 minutes
Wolland has quit [Ping timeout: 265 seconds]
djbkd__ has quit [Ping timeout: 255 seconds]
<MattB> jenrzzz: you still around?
<atmosx> zil2: okay I add an answer to your SO post :-)
<zil2> atmosx - I can't upvote without 15 rep! but, marked as answer anyway
<zil2> thanks again for your help
<atmosx> zil2: no prob :-)
skolman has quit [Remote host closed the connection]
skolman_ has joined #ruby
<atmosx> I'm off t bed bye all
icarus has quit [Ping timeout: 250 seconds]
tvw has quit []
aaronrl_ has joined #ruby
St_Marx has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv_ has joined #ruby
aaronrl has quit [Ping timeout: 244 seconds]
<jenrzzz> MattB: yeah, was fixing my tmuxinator config. what's up?
<MattB> I posted a pastebin: http://pastebin.com/MyE5nYtq
<jenrzzz> zil2: it's #include?, with a question mark
<MattB> WOuld you mind taking a look?
<MattB> Thanks!
<jenrzzz> porfa: yes, you can pass a regex to String#[] and it will return whatever matches
sdegutis has joined #ruby
<sdegutis> The main benefit of Clojure over Ruby so far appears to be the complete lack of worrying about method name collisions.
<MattB> The main bit is what to do instead of: a.map!.with_index{|v, i| (a[i..a.count].inject(&:+).to_f/total*100.0)}
Jake232 has joined #ruby
ephemerian has quit [Quit: Leaving.]
<jenrzzz> sdegutis: also it's like orders of magnitude faster
jimbach has joined #ruby
<sdegutis> Not JRuby.
<sdegutis> jenrzzz: Meh.
<jenrzzz> yeah, i meant MRI
<jenrzzz> dat JVM
<sdegutis> jenrzzz: I don't really see that as a primary advantage.
<sdegutis> jenrzzz: The majority of my app's job is translating one string to another string. Pretty easy stuff.
<jenrzzz> nah, but it's a pretty nice secondary advantage
<jenrzzz> i've been wanting to do a clojure project for a while
mikepack has quit []
IrishGringo has joined #ruby
Joufflu has joined #ruby
timonv_ has quit [Ping timeout: 258 seconds]
robustus has quit [Ping timeout: 255 seconds]
<jenrzzz> MattB: so, what question is this data answering exactly? how many users have registered in the past N weeks?
<MattB> Oh, I think Authenticator may have hinted at a solution, but I missed it because he did it an array of vowels, not numbers (so sum but not percentage. Does this look better:
mikepack has joined #ruby
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
<sdegutis> jenrzzz: Be prepared to rewrite everything from scratch.
<MattB> >> a = [1,2,3,4,5] ; a.length.times.collect {|i| a[i..-1].sum / a.sum.to_f * 100}; a
<eval-in__> MattB => undefined method `sum' for [1, 2, 3, 4, 5]:Array (NoMethodError) ... (https://eval.in/217542)
<zenspider> back to sum... wow
x1337807x has joined #ruby
<MattB> >> a = [1,2,3,4,5] ; a.length.times.collect {|i| a[i..-1]..inject(&:+) / a..inject(&:+).to_f * 100}; a
<eval-in__> MattB => /tmp/execpad-ae4225e61ba1/source-ae4225e61ba1:2: syntax error, unexpected .. ... (https://eval.in/217543)
mdarby has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<MattB> Ach. bother! :)
<jenrzzz> sdegutis: well, it'll be a new project :P is the stdlib very sparse or are you just saying that cause it's a lisp?
<MattB> >> a = [1,2,3,4,5] ; a.length.times.collect {|i| a[i..-1].inject(&:+) / a..inject(&:+).to_f * 100}; a
<eval-in__> MattB => Array can't be coerced into Fixnum (TypeError) ... (https://eval.in/217544)
Fusl has quit [Ping timeout: 245 seconds]
<MattB> Okay, I'll stop now!
<MattB> >> a = [1,2,3,4,5] ; a.length.times.collect {|i| a[i..-1].inject(&:+) / a.inject(&:+).to_f * 100}; a
<eval-in__> MattB => [1, 2, 3, 4, 5] (https://eval.in/217545)
michael_mbp has quit [Excess Flood]
<sdegutis> jenrzzz: Compojure + Ring + Hiccup isn't nearly convenient as just using Rails.
<MattB> >> a = [1,2,3,4,5] ; b = a.length.times.collect {|i| a[i..-1].inject(&:+) / a.inject(&:+).to_f * 100}; b
<eval-in__> MattB => [100.0, 93.33333333333333, 80.0, 60.0, 33.33333333333333] (https://eval.in/217546)
thagomizer has quit [Quit: Leaving.]
robustus has joined #ruby
<MattB> Got there in the end!!!
<MattB> So, which is worse? :-)
<jenrzzz> sdegutis: oh, i wouldn't expect or want it to be
marr has quit [Ping timeout: 245 seconds]
<sdegutis> jenrzzz: Especially Rails's security stuff.
Fusl has joined #ruby
<zenspider> MattB: you're suffering from a severe lack of clarity. This whole thing is a mess from top to bottom.
<sevenseacat> yeah i hate when things are conventient too
<sdegutis> There's nothing. Literally nothing. That helps you out.
michael_mbp has joined #ruby
goodenough has quit [Remote host closed the connection]
<sdegutis> sevenseacat: lol
apeiros has quit [Remote host closed the connection]
<sevenseacat> convenient
<MattB> Sorry jenrzzz, missed your question, an apologies to all for the code spam
<jenrzzz> sdegutis: i'm looking to escape from dhh's magical universe to one of my own creation
apeiros has joined #ruby
<sdegutis> jenrzzz: Okay then Clojure is totally for you.
<MattB> jenrzzz: IT's basically looking at number sign-ins per week against number of sign-ups for a cohort
<sevenseacat> i prefer to have a solid foundation made by people smarter than me
<sdegutis> jenrzzz: I totally wanted that too. But after doing Clojure web app full time for a few years, I'm kind of wanting something a little bit more automagical.
<MattB> zenspider: could you be more specific, you're sffering from a severe lack of clarity ;-)
mary5030 has quit [Ping timeout: 272 seconds]
<jenrzzz> MattB: what's wrong with what we had before? you can just sum the percentages of weeks before if you want to get the running totals
<sevenseacat> this isnt going to end well
<jenrzzz> sevenseacat, sdegutis: yeah, that's why I haven't done a clojure project yet
skolman_ has quit [Remote host closed the connection]
<sdegutis> :)
<jenrzzz> but someday someone will come up with a stupid idea and i will agree to build it for them just to play with some new tech
<MattB> jenrzz, I must be missing something obvious then - otherwise, given the simple array of percentages, I'm back to .map.with_index to iterate over it and sum the percentages.
<MattB> This gives the desired result: a = [1,2,3,4,5] ; b = a.length.times.collect {|i| a[i..-1].inject(&:+) / a.inject(&:+).to_f * 100}; b
<MattB> As does this: a.map!.with_index{|v, i| (a[i..a.count].inject(&:+).to_f/total*100.0)}
<jenrzzz> MattB: then just use that?
<jenrzzz> idk, if you are asking for design feedback or best practices, you can't just limit it to the tiny aspect that you're stuck on
<jenrzzz> we need the big picture to come up with the optimal solution
<jenrzzz> what do you do with that hash after it gets returned? try to focus this method on just the transformations that need to be applied to make the data useful
<jenrzzz> the summed/running percentages sound more specific to the analysis part than the transformation part, which is why it makes more sense imo to return the hash with each week's percentage
triple_b has joined #ruby
<MattB> I see what you're saying then
<MattB> It gets dumped to a Rails view, and graphed
<MattB> The graph library expects the numbered hash format, with the percentages summed....
<MattB> I tried it with the plain percentages, but you can't compare cohorts, as the discrete percentages get thinned out, the longer ago the cort signed up
<jenrzzz> is it a JS graphing library or ruby?
VanillaGoat__ has joined #ruby
<jenrzzz> also, where does this functionality live in your app?
IrishGringo has quit [Ping timeout: 244 seconds]
<MattB> It's google charts (JS) via Chartkick (Ruby)
<MattB> At the moment the code is in the User model
<jenrzzz> what's the method called?
<MattB> User.cohorts
dkb20k has joined #ruby
hiyosi has quit [Ping timeout: 265 seconds]
jonr22 has joined #ruby
tkuchiki has joined #ruby
sdegutis has quit [Quit: Leaving...]
VanillaGoat_ has quit [Ping timeout: 260 seconds]
djbkd__ has joined #ruby
dkphenom has joined #ruby
<jenrzzz> so you're just doing <%= sexy_chart(Users.cohorts) %> ?
jottr has quit [Ping timeout: 245 seconds]
<MattB> Exactly
<jenrzzz> is there more to this method than the code you showed us? how long is it?
djbkd_ has quit [Ping timeout: 240 seconds]
rshetty has quit [Read error: Connection reset by peer]
Kricir has quit []
dkb20k has quit [Ping timeout: 260 seconds]
<MattB> That's it, bar the line that pulls the values from the db, which is using the groupdate Gem to group the data by week
godd2 has quit [Ping timeout: 250 seconds]
<MattB> Let me post the whole thing as a pastie...
<jenrzzz> yeah, it'll help to see it in situ
rshetty has joined #ruby
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<MattB> Hree we go: http://pastebin.com/12KS1NM1 (Don't laugh please!)
dseitz has joined #ruby
freerobby has quit [Quit: Leaving.]
j_mcnally has joined #ruby
<jenrzzz> MattB: why 1..6?
<jenrzzz> the last 6 weeks?
rshetty has quit [Remote host closed the connection]
<MattB> Ah, so that's 6 monthly cohorts - one hash of the type we've been discussing, in an array. Sorry, forgot about that bit.
<MattB> one hash per month
<MattB> User.where(created_at: n.month.ago.beginning_of_month..n.month.ago.end_of_month) picks up the users who signed up that month
<MattB> for 1 - 6 months ago
rshetty has joined #ruby
<Blizzy> how would I get an exit message when I use Ctrl+C on a Ruby script?
maestrojed has quit [Quit: Computer has gone to sleep.]
echooo has joined #ruby
djbkd_ has joined #ruby
echooo1 has quit [Ping timeout: 260 seconds]
<MattB> Handling Ctrl-C in Ruby: http://zguide.zeromq.org/rb:interrupt
tier has joined #ruby
<jenrzzz> MattB: so, i think this is *ok* if you just want to draw the graph and be done with it. but if you expect to be doing a lot more with cohort analysis, it'd be worth it to do some better design here
<jenrzzz> you definitely want to extract a couple methods from #cohorts
<Blizzy> thank you, MattB.
goodenough has joined #ruby
djbkd__ has quit [Ping timeout: 258 seconds]
<MattB> jenrzzz: I'm new to cohort analysis, so this was a first experiment, as is probably painfully obvious! What methods would you extract as a starting point?
<MattB> (And thanks BTW!)
pietr0 has quit [Ping timeout: 260 seconds]
arescorpio has joined #ruby
beneggett has joined #ruby
razrunelord has quit [Remote host closed the connection]
<lampd1> <3 that feeling when you transition from knowing about something to grokking it
i_s has quit [Remote host closed the connection]
<jenrzzz> lampd1: what are you newly grokking?
tlarevo has joined #ruby
<lampd1> jenrzzz: actually just started down the path of trying to grok a few new things ;)
<benzrf> lampd1: learn haskell
<benzrf> there will be so much stuff to grok
<benzrf> it is just nuts
viet_power has quit [Ping timeout: 240 seconds]
<lampd1> nty
hamakn has quit [Remote host closed the connection]
snath has joined #ruby
<benzrf> oh?
hamakn has joined #ruby
renderful has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jimbach has quit [Remote host closed the connection]
<lampd1> maybe after i've moved on from working on learning ruby/rails and python a bit better :P
botwin has joined #ruby
<lampd1> and xtlang, lol
goodenough has quit [Remote host closed the connection]
<lampd1> heh, can't even type.
hamakn has quit [Ping timeout: 265 seconds]
davidhq has joined #ruby
bricker has quit [Ping timeout: 258 seconds]
enebo has joined #ruby
davidhq has quit [Client Quit]
renderful has quit [Ping timeout: 250 seconds]
djbkd has quit [Quit: My people need me...]
aspires has joined #ruby
enebo has quit [Client Quit]
<jenrzzz> MattB: here's how I would start https://gist.github.com/jenrzzz/3a165b135495a8d0359e
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jenrzzz> MattB: lines 6-8 should be in another method, but i'm not sure what to call it
livingstn has joined #ruby
<MattB> Wow, thank you very much! I was half-way through having a go myself, but this is much better!
mikepack has quit [Remote host closed the connection]
hackeron_ has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gsd has joined #ruby
gsd has quit [Client Quit]
hackeron has quit [Ping timeout: 258 seconds]
nobitanobi has quit []
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jbw has quit [Ping timeout: 245 seconds]
bluOxigen has joined #ruby
rshetty has quit [Remote host closed the connection]
hamakn has joined #ruby
tier has quit [Remote host closed the connection]
triple_b has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jenrzzz> zenspider: can you tell me everything is going to be okay?
leslie1 has joined #ruby
<porfa> guys im in need of help, i just dont know what to do :( im fetching a url adn some products have [0][?href?], [1][?href?],[2][?href?]... some products just have one link, so when it tries to get [1][?href"] it quits and stops getting the rest of the data :(
<jenrzzz> porfa: code plz
<porfa> ok, posting
dkb20k has joined #ruby
Akuma has quit [Ping timeout: 250 seconds]
<jenrzzz> zenspider: why do good things happen to bad people?
melik has quit [Quit: (null)]
DTSCode has quit [Ping timeout: 272 seconds]
michael3 has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
rshetty has joined #ruby
krz has joined #ruby
<porfa> dont blow the coffee out of your mouth, this is my first ever going at programing, *ever*
<jenrzzz> what are you trying to do?
<porfa> i am trying to get all the image file links from that url
msmith_ has joined #ruby
<porfa> and other data, and exporting to csv
<porfa> the output is alredy formated for my csv needs
jdj_dk has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
<porfa> if there was a way for ruby to count the numver of links before i actually request them, then it would know how many links to go after
stunder has joined #ruby
stunder has quit [Client Quit]
<porfa> or i cold just put some command to ignore and carry on with the script if thats possible, i would be ok with that, though its the easy way out
zil2 has quit []
stunder has joined #ruby
bigkevmcd has quit [Ping timeout: 256 seconds]
jbw has joined #ruby
<pontiki> porfa, probably a stupid question, but why do you have semi-colons separating things instead of commas for part of your output in the puts statement?
parabolize has joined #ruby
<pontiki> another question, why do you get the images if you only want their urls?
<porfa> my other software acepts csv product info formated like that
<pontiki> semi-colon separated files?
<porfa> because the urls are .asph?docwtv
yfeldblum has quit [Remote host closed the connection]
<porfa> pontiki: yes
<pontiki> weird as
wjimenez5271 has joined #ruby
<porfa> for ie.. ?name;description;image1, image2, image3;weight"
<pontiki> that's not a csv
<porfa> i know what csv stands for, im sorry about
Cat_1 has quit []
<porfa> it?s just the software calls it ?csv import? and i?ve been using it for quite a while
<pontiki> and, like, at line 68, uriimg1 is not the same as mechaimg1 after you run the get?
jottr has joined #ruby
<porfa> let me check
mikepack has joined #ruby
Takle has quit [Remote host closed the connection]
<porfa> na
<pontiki> must be some redirects going on then... that makes sense
aspires has quit []
jottr has quit [Ping timeout: 245 seconds]
<porfa> i just though of a way to do it
<porfa> fetch all the data from //article and get only the textlinks that end in .jpg
<porfa> seems cleaner
beef-wellington has quit [Ping timeout: 244 seconds]
Areessell__ has quit [Quit: (null)]
Areessell__ has joined #ruby
viet_power has joined #ruby
leslie2 has joined #ruby
x1337807x has joined #ruby
stunder has quit [Quit: Screw you guys I'm going home]
<jenrzzz> porfa: this might get you a little closer https://gist.github.com/jenrzzz/3abffeef6de6f341c41e
goodenough has joined #ruby
jumbotron has joined #ruby
jumbotron has left #ruby [#ruby]
<porfa> jenrzzz: thank you, i just learned something! :)
leslie1 has quit [Ping timeout: 250 seconds]
D9 has joined #ruby
optiz0r has quit [Ping timeout: 258 seconds]
optiz0r has joined #ruby
moritzs has quit [Remote host closed the connection]
bmurt has joined #ruby
snath has quit [Ping timeout: 256 seconds]
jshultz has quit [Quit: Connection closed for inactivity]
patrick99e99 has quit [Ping timeout: 250 seconds]
mgorbach has quit [Quit: ZNC - http://znc.in]
kaspergrubbe has quit [Remote host closed the connection]
troyreadyy has quit [Ping timeout: 272 seconds]
<jenrzzz> zenspider: where do rubyists go when they die?
bmurt has quit [Client Quit]
abstrakt has quit [Quit: Leaving]
mgorbach has joined #ruby
cmxu has joined #ruby
<MattB> jenrzzz: Makes me sad that I will /never/ be able to churn out code the way you can. I think from now on I should leave programming to the professionals! :-)
bmurt has joined #ruby
Spami has quit [Ping timeout: 244 seconds]
<pontiki> porfa, as a first effort? this is pretty good
<jenrzzz> heh, all i've done all day is answer questions in IRC because i'm unable to churn out the code people pay me for
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jenrzzz> other people's problems always seem easier, if not more fun :P
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki> hehe, jenrzzz
<porfa> lucky me! ahah
User458764 has joined #ruby
<porfa> that mechanize thing you did looks awesome, again thank you!
jjasonclark has quit [Quit: jjasonclark]
gsd has joined #ruby
timonv_ has joined #ruby
<pontiki> you can save a bit by doing something like: image_urls = doc.search('li.image').map{|i| i.children.first['href']}
<pontiki> saves all that ugly xpath cruft
Jake232 has joined #ruby
<porfa> how does it know its image urls?
<pontiki> 'li.image'
droidburgundy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<pontiki> which maps to <li class="image">
blackjid_ has quit [Ping timeout: 244 seconds]
<pontiki> or to actually map to your xpath before the //a, you could do doc.search('.image') which matches any tag with class="image"
DTSCode has joined #ruby
lucywerther has joined #ruby
timonv_ has quit [Ping timeout: 244 seconds]
<pontiki> i like css selectors a lot better than xpaths
<jenrzzz> ditto
<pontiki> let me see, to get the whole of that xpath as a css selector, you'd do: doc.search('.image a')
lucywerther has left #ruby ["Leaving"]
zorak8 has quit [Ping timeout: 244 seconds]
<pontiki> which finds the links inside each element with class="image"
KC9YDN has quit [Read error: Connection reset by peer]
blackjid_ has joined #ruby
jumbotron has joined #ruby
<pontiki> combining with the mechanize..get to retrieve the real url:
jumbotron has left #ruby [#ruby]
<MattB> jenrzzz, here's what I ended up with (not largely different to your very helpful refactoring): http://pastebin.com/caAcD0jB
charliesome has joined #ruby
<pontiki> image_urls = doc.search('.image > a').map {|i| mechanize.get("http://www.tristar.eu#{i["href"]}").uri }
<pontiki> i think
<pontiki> anyway
<pontiki> good stuff!
<pontiki> honestly, i had to spend quite some time figuring out what you were doing with the xpaths
<MattB> I struggled with the name for the second method too, but it'll do for now :)
triple_b has quit [Read error: Connection reset by peer]
drago777 has left #ruby [#ruby]
rshetty has quit [Remote host closed the connection]
jjasonclark has joined #ruby
tyll_ has joined #ruby
triple_b has joined #ruby
rshetty has joined #ruby
<pontiki> MattB: i'd write a scope for the User.where().group_by bit
t_mmyv has quit [Quit: Textual IRC Client: www.textualapp.com]
jjasonclark has quit [Client Quit]
<MattB> pontiki: isn't a scope just a method by another name though on this case?
oniMaker has quit [Ping timeout: 250 seconds]
Spami has joined #ruby
<MattB> (in this case)
<pontiki> it is, but they're more descriptive
<pontiki> and more usable
wang has quit [Ping timeout: 265 seconds]
wang has joined #ruby
<pontiki> retain the method you have for .count.value, but using the scope
tyll has quit [Ping timeout: 250 seconds]
oo_ has quit [Remote host closed the connection]
Areessell__ has quit [Quit: (null)]
<MattB> I guess that would be more correct, although not sure what it might ever be reused for! :-)
<crocket> Is ruby on rails good with websockets?
yetanotherdave has quit [Ping timeout: 240 seconds]
oniMaker has joined #ruby
rshetty has quit [Ping timeout: 265 seconds]
<pontiki> also, you know there is #rubyonrails channel?
botwin has quit [Remote host closed the connection]
<crocket> pontiki, I couldn't remember it.
<pontiki> not that you haven't been getting great help here; i just know there are some denizens of #ruby that really hate talking about rails :P
Imofftopic has joined #ruby
<pontiki> oh, crocket, yeah, i was addressing that to MattB , but yeah
<crocket> pontiki, Why?
<pontiki> you'll have to ask them when they start to whinge. :)
<crocket> Why do ruby people hate rails?
<MattB> pontiki, yes, but I originally came to ask a ruby question about using map, and the scope (hoho) gradually expanded!
<pontiki> see previous answer, crocket
<porfa> i?ve noticed the text output is quite diferent from before
<porfa> is there another method to transform text ? :o
<pontiki> um, porfa, there are a huge number of methods that transform text
<porfa> but i just want to [2..-5]
<MattB> jenrzzz went from helping answer my original question to refactoring my godawful Rails method, so we ended up talking Rails in #ruby.
<porfa> im sorry
<MattB> I did wonder how long it would take someone to complain ;-)
<pontiki> i need more context, porfa
<MattB> Everyone's being very patient with me. :-)
<pontiki> *what* text, what do you want from it, etc
<pontiki> MattB: *i'm* not complaining!!
<pontiki> i <3 <3 <3 rails
<pontiki> (not that it doesn't sometimes frustrate me greatly, too. :) )
<porfa> its outputing this "[\"Bluetooth, cobertura ate : 10 m\" from ?specs2? and before it was outputing ?Bluetooth, cobertura ate : 10 m?
<porfa> my quotations marks are switched to questions marks, what the hell
<pontiki> i think something is being mistranslated in our character encodings, porfa
<pontiki> i don't see the difference
jenrzzz has quit [Ping timeout: 244 seconds]
<pontiki> ah, ok
<MattB> <3 Ruby, <3 Rails, do not have the brains to be good at either. Oh well!
<pontiki> put it in a pastie, then, porfa, that usually works
<rpag> rails doesn't require a brain :P
<pontiki> and here we have it!!
<pontiki> crocket: ask rpag why they hate rails
<MattB> rpag: then I'm officially brain-dead! LOL
<crocket> rpag, Just because rails doesn't require a brain, it doesn't mean rails is bad.
<pontiki> i think most of them hate rails because rails made ruby popular
<crocket> It could mean the opposite
<rpag> hate is a pretty strong word
wallerdev has quit [Quit: wallerdev]
mib_mib has joined #ruby
<rpag> i just dislike the path rails has taken so far
<pontiki> and they can't have their tiny little exclusive niche
<crocket> Rails is so good that anyone can use it.
<sevenseacat> or when people say ruby they automatically presume you mean rails
<rpag> pontiki, you're being hella presumptuous
<pontiki> rpag: i am, yes
<pontiki> "rails doesn't require a brain" is rather presumptuous as well
<rpag> it was a joke
<pontiki> if not downright insulting
<rpag> hence the ':P'
Musashi007 has joined #ruby
<pontiki> so is mine
Wolland has joined #ruby
<rpag> oh okay then
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rpag> on a serious note, i don't think rails is the best way to build a web application anymore, at least not since javascript frameworks started popping up everywhere
<benzrf> tbh rails DOESNT require a brain
Imofftopic has quit [Remote host closed the connection]
<rpag> i'd probably use something like sinatra with a javascript and regular HTML in the "views"
livingstn has quit []
<pontiki> alright, set you pet earthworm writing a rails app, then benzrf
<pontiki> oh wait! earthworms have a brain!
<sevenseacat> benzrf: wow lol
bmurt has quit []
Wolland has quit [Ping timeout: 250 seconds]
DTSCode has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
melik has joined #ruby
<rpag> Gemfile-driven development
snath has joined #ruby
Asher1 has joined #ruby
yfeldblum has joined #ruby
DTSCode has joined #ruby
Adran is now known as Madran
Cache_Money has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Asher has quit [Ping timeout: 272 seconds]
Asher1 is now known as Asher
magic_ has joined #ruby
<MattB> pontiki: is this more like what you had in mind? : http://pastebin.com/4wCY6cKv
<pontiki> rpag: i can't disagree with the notion of js frameworks being a way forward for web apps. i'm headed in that direction as well.
jonr2219 has joined #ruby
<pontiki> also, i <3 <3 <3 sinatra
<MattB> (Last rails post here I promise. It genuinely did start as a pure ruby question! :)
jonr2219 has quit [Remote host closed the connection]
<pontiki> yeah, MattB
g0bl1n has quit [Quit: g0bl1n]
<rpag> MattB, just a heads up that 'private' doesn't apply to your class method
<rpag> there is private_class_method for that though
lucyinthesky has joined #ruby
<rpag> or, class << self; private :foo; end
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
<MattB> See, that's why Rails isn't for zombies like me :-D
luriv has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
<rpag> nah, it's just something you should be aware of
<pontiki> does that need to be a class method?
stretchlimo has joined #ruby
<MattB> Which one?
<pontiki> percent_retention_by_period
jonr22 has quit [Ping timeout: 256 seconds]
porfa has quit [Quit: porfa]
<rpag> i think it does, it's called from another class method
* JDHankle tries to hack together gtk3 and vagrant
porfa has joined #ruby
<MattB> Dumb question - where should I put it otherwise? It's pretty specific, and only used by this class...
stretchlimo has quit [Client Quit]
adriancb has joined #ruby
lucyinthesky has left #ruby ["Leaving"]
<pontiki> idk, i'm not sure what the overall thing is for
<pontiki> not really sure why those are in a persistence model
adriancb has quit [Read error: Connection reset by peer]
ixti has quit [Ping timeout: 245 seconds]
adriancb has joined #ruby
jimbach has joined #ruby
<pontiki> maybe they should be in a presenter model
<MattB> As a whole it formats data for graphing cohorts, so yes, it's probably in the wrong place, but it was the easiest place to start from :-)
byprdct has joined #ruby
bigmac has joined #ruby
duncannz has joined #ruby
byprdct_ has quit [Ping timeout: 256 seconds]
<MattB> And I still struggle to know where best to put things. Fat model, skinny controllers, no, no , skinny everything, no presenters, no decorators. Agh!
<pontiki> there are no shortage of opinions
<JDHankle> I'm trying to get vagrant and gtk3 to talk to each other. The only way I can think to do this is to create a vagrant plugin and somehow deamonize the gtk3 code using `vagrant whatever start|stop`. The alternative appears to be to write a cli wrapper, which sounds awful.
<pontiki> and p.much anything i might say over irc is going to be woefully incomplete
<jenrzzz> there are a lot of right ways to do it
<jenrzzz> only you have the knowledge to decide which is best
<pontiki> sometimes what's right in one place is wrong in another, that's where it gets fun
<pontiki> but it never requires a brain, or thinking!!
<pontiki> just using a robot!!
<MattB> :-) I"ll be okay then.
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oleo__ has joined #ruby
oleo is now known as Guest78399
wjimenez5271 has quit [Ping timeout: 272 seconds]
xenomorph is now known as {xenomorph}
goshdarnyou has joined #ruby
Guest78399 has quit [Ping timeout: 244 seconds]
tokik has joined #ruby
tlarevo has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
<MattB> Right, it's 3:45am, so I will thank you all for your generous help (esp. jenrzzz, pontiki) and and call it a night.
<pontiki> sleep well
viet_power has quit [Ping timeout: 250 seconds]
<jenrzzz> cheers!
SpikeMaster has joined #ruby
<MattB> Thanks, g'night.
{xenomorph} is now known as xenomorph
MattB has quit []
dh64 has quit [Quit: Konversation terminated!]
mattstratton has joined #ruby
Xiti has quit [Quit: Leaving]
chrisja has quit [Quit: leaving]
triple_b has quit [Read error: Connection reset by peer]
mattstratton has quit [Read error: Connection reset by peer]
triple_b has joined #ruby
mattstratton has joined #ruby
Xiti has joined #ruby
oo_ has joined #ruby
DTSCode has quit [Ping timeout: 245 seconds]
JBreit has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
jwang__ has joined #ruby
agrinb has joined #ruby
luckyruby has joined #ruby
emmesswhy has joined #ruby
phutchins has quit [Ping timeout: 244 seconds]
radic has joined #ruby
viet_power has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
yetanotherdave has joined #ruby
arup_r has joined #ruby
JBreit has left #ruby ["Leaving"]
kobain has joined #ruby
mattmcclure has quit [Quit: Connection closed for inactivity]
bigmac has quit [Read error: Connection reset by peer]
radic_ has quit [Ping timeout: 245 seconds]
<jimmyhoughjr> im having trouble with either rvm or rbenv on debian
<jimmyhoughjr> I can't seem to get bash to find the commands, even when i add the appropraite lines to the .bashrc
<tmoore> jimmyhoughjr: did you load a new shell?
<jenrzzz> jimmyhoughjr: did you `source ~/.bashrc` or reload your shell?
<jimmyhoughjr> i was ssh'd in, i closed the connection and relogged in
braincrash has quit [Quit: bye bye]
SpikeMaster has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
Imofftopic has joined #ruby
<jenrzzz> jimmyhoughjr: where did you install them? also, which would you rather use?
<jimmyhoughjr> i suppose rbenv
<jimmyhoughjr> in my home folder, im going back through the rbenv steps now
rshetty has joined #ruby
Imofftopic has quit [Client Quit]
wjimenez5271 has joined #ruby
shortCircuit__ has joined #ruby
braincrash has joined #ruby
snath has quit [Ping timeout: 260 seconds]
<jenrzzz> jimmyhoughjr: i think you might need to source your .bashrc from your .bash_profile
<jenrzzz> jimmyhoughjr: SSH'ing in is a login shell
<jimmyhoughjr> it seems to be working now, I think i had forgot to append the shims to .bashrc
snovity has quit [Ping timeout: 245 seconds]
<jimmyhoughjr> im setting up rails4 on a beaglebone black
freerobby has joined #ruby
<jimmyhoughjr> they recommended ruby 2.1.0 if i recall
<jenrzzz> why rails?
jjconti has joined #ruby
<jjconti> hi
StephenA1 has joined #ruby
<jjconti> is there someonewith experience developing simple 2d games in ruby?
<jjconti> Im wondering which is the state of the art
<rpag> jjconti, #gosu ?
<jjconti> gosu or rubygame?
<jjconti> other?
<jjconti> I've experience using pygame
StephenA1 has quit [Client Quit]
<jimmyhoughjr> cuz its better than jnode.js imo
DTSCode has joined #ruby
mib_mib has quit [Ping timeout: 255 seconds]
<jimmyhoughjr> "node.js"
<jjconti> is any of this two similar to pygame rpag?
jottr has joined #ruby
<rpag> jjconti, not familiar with pygame
<jjconti> gosu seems more live that rubygame
<jimmyhoughjr> jenrzzz why not?
<jenrzzz> jimmyhoughjr: yeah, but on limited hardware like beaglebone, rails brings a lot more bloat than you probably need
<rpag> http://www.libgosu.org/ @ jjconti
<jenrzzz> jimmyhoughjr: there are some smaller ruby web frameworks that might be better-suited
<jimmyhoughjr> maybe, but ill see in testing, node.js with cloud9 would max the cpu a lot
<jimmyhoughjr> such as?
viet_power has quit [Ping timeout: 258 seconds]
pen has joined #ruby
<jimmyhoughjr> I'm pretty new to ruby as well, so i was planning on going through their tutorials
<jenrzzz> jimmyhoughjr: sinatra maybe? depends on what you want to do
<jjconti> jimmyhoughjr: sinatra, cuba, grape
<jimmyhoughjr> well i want a fairly small web app, and ill use a ruby gem out there for accessing the gpio on the board
<jimmyhoughjr> are there any tutorials for sinatra simmilar to the ones for rails?
<jimmyhoughjr> id love something tdd oriented
<jenrzzz> jimmyhoughjr: the sinatra readme is a good place to start: http://www.sinatrarb.com/intro.html
<jenrzzz> it's hella simple so you'll probably pick it up quick
<jimmyhoughjr> their homepage is nice
jottr has quit [Ping timeout: 256 seconds]
<jimmyhoughjr> most of the ruby ive doen was hacking step definitions for iOS UATs with the frank-cucumber gem
<jenrzzz> and you're probably not gonna find a TDD-oriented microframework. apart from rails, they don't try to push any workflows on you
luckyruby has quit [Remote host closed the connection]
<jimmyhoughjr> as long as i can write tests if i want to easily, thats my main concern
<jimmyhoughjr> i still need to work through the koans though
<jenrzzz> jimmyhoughjr: if you do modular sinatra instead of the everything-in-one-file approach, it's pretty easy to test
<jimmyhoughjr> it looks pretty enticing
<jimmyhoughjr> seems as easy as node.js was for handling requests
robbyoconnor has joined #ruby
BlackGear has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benzrf> >> 'Mr Jock, TV quiz PhD, bags few lynx.'.downcase.gsub(/\W/, '')
<eval-in__> benzrf => "mrjocktvquizphdbagsfewlynx" (https://eval.in/217568)
<benzrf> hm
<benzrf> >> 'Mr Jock, TV quiz PhD, bags few lynx.'.downcase.gsub(/\W/, '').chars.to_a.sort.join
<eval-in__> benzrf => "abcdefghijklmnopqrstuvwxyz" (https://eval.in/217569)
mary5030_ has joined #ruby
<jimmyhoughjr> web development is so much more complicated than say iOS or windows
KC9YDN has joined #ruby
agrinb has quit [Remote host closed the connection]
cashnguns has quit [Remote host closed the connection]
DLSteve has quit [Ping timeout: 272 seconds]
shortCircuit__ is now known as hellNo
arup_r has quit [Quit: Leaving.]
hellNo is now known as shortCircuit
jenrzzz has quit [Ping timeout: 265 seconds]
wjimenez_ has joined #ruby
shortCircuit is now known as shortCircuit__
shortCircuit__ is now known as supermanBlack
wjimenez5271 has quit [Ping timeout: 265 seconds]
rubie has joined #ruby
<rubie> hi all: i was wondering if anyone out there knew of any other beginners that were hungry to learn as much Ruby as humanly possible. I would love to have someone to skype with and talk through problems with, maybe even build something. Thanks!
Xuerian has joined #ruby
Wolland has joined #ruby
wjimenez_ has quit [Ping timeout: 244 seconds]
mib_mib has joined #ruby
Wolland_ has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
krz has joined #ruby
pyon has joined #ruby
wjimenez5271 has joined #ruby
Wolland has quit [Ping timeout: 245 seconds]
timonv_ has joined #ruby
hornairs has quit [Ping timeout: 260 seconds]
siwica has quit [Ping timeout: 256 seconds]
kp666 has joined #ruby
krz has quit [Client Quit]
krz has joined #ruby
Madran is now known as Adran
timonv_ has quit [Ping timeout: 265 seconds]
krz has quit [Client Quit]
krz has joined #ruby
rshetty has quit [Remote host closed the connection]
snath has joined #ruby
rshetty has joined #ruby
jjconti has quit [Remote host closed the connection]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<jimmyhoughjr> jenrzzz sinatra seems to perform much better
fandi has quit [Remote host closed the connection]
jimbach has quit [Remote host closed the connection]
Vile` has quit [Remote host closed the connection]
mib_mib has quit [Ping timeout: 244 seconds]
snath has quit [Ping timeout: 255 seconds]
Areessell__ has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
krz has joined #ruby
Vile` has joined #ruby
D9 has quit [Quit: Leaving]
mdarby has joined #ruby
krz has quit [Client Quit]
krz has joined #ruby
maestrojed has joined #ruby
Pupeno_ has joined #ruby
kyb3r_ has joined #ruby
louism2wash has quit [Ping timeout: 258 seconds]
Areessell__ has quit [Ping timeout: 265 seconds]
msmith_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
Pupeno has quit [Ping timeout: 255 seconds]
goodenough has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
jwang__ has quit [Ping timeout: 265 seconds]
<rpag> jimmyhoughjr, than rails?
louism2wash has joined #ruby
jwang__ has joined #ruby
byprdct has quit []
<jimmyhoughjr> than node, i havent tried rails on it, had issues with dependencies and bundler not be able to find sqlite3 and what not
arescorpio has quit [Excess Flood]
wjimenez5271 has quit []
jdj_dk has quit [Remote host closed the connection]
mary5030_ has quit [Remote host closed the connection]
<jimmyhoughjr> so i guess a url param can be any part of the url after the root?
<jimmyhoughjr> (I'm tyring to grok some code from a tutorial)
jasooon has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
djbkd has joined #ruby
omosoj has joined #ruby
tlarevo has joined #ruby
djbkd_ has quit [Ping timeout: 264 seconds]
Mia has joined #ruby
lcj has joined #ruby
keen___________ has joined #ruby
IrishGringo has joined #ruby
keen__________ has quit [Ping timeout: 245 seconds]
snath has joined #ruby
Morkel has joined #ruby
snath has quit [Client Quit]
lcj has quit [Quit: 离开]
mdarby has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
snath has joined #ruby
longchangjin has joined #ruby
blackjid_ has quit [Ping timeout: 265 seconds]
adriancb has quit [Remote host closed the connection]
agrinb has joined #ruby
goodenough has joined #ruby
jwang__ has quit [Ping timeout: 272 seconds]
blackjid_ has joined #ruby
epitron has quit [Ping timeout: 250 seconds]
goodenough has quit [Client Quit]
ndrei has joined #ruby
jrvlima has joined #ruby
epitron has joined #ruby
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
<Authenticator> Is there a way to use catch/throw (not raise/rescue) from a sub-thread?
agrinb has quit [Ping timeout: 265 seconds]
Cache_Money has quit [Quit: Cache_Money]
jenrzzz has quit [Quit: leaving]
jenrzzz has joined #ruby
epitron has quit [Remote host closed the connection]
sinequanon has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
epitron has joined #ruby
epitron has joined #ruby
epitron has quit [Changing host]
Aranshada|W has joined #ruby
Aranshada|W has left #ruby [#ruby]
spastorino has quit [Quit: Connection closed for inactivity]
akamel has quit [Quit: Leaving.]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duncannz has quit [Read error: Connection reset by peer]
YourKicks has joined #ruby
duncannz has joined #ruby
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
YourKicks has quit [Client Quit]
arup_r has joined #ruby
longchangjin has quit [Quit: 离开]
diegoviola has quit [Read error: Connection reset by peer]
jwang__ has joined #ruby
snath has quit [Ping timeout: 255 seconds]
rshetty has quit [Remote host closed the connection]
henesy has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
st1gma1 has joined #ruby
mib_mib has joined #ruby
omosoj has left #ruby [#ruby]
<henesy> is it possible to get ruby to run a while loop while a separate (external) command executes?
rshetty has joined #ruby
<henesy> example: while [system 'wget arbitraryfile.txt']
<eam> henesy: system already does that
<Authenticator> Until that command stops - like to print a '*' status every second or something?
<henesy> yeah
tlarevo_ has joined #ruby
t_p has joined #ruby
<henesy> more or less that
<eam> henesy: you can use wait() to poll for completion of your children
lemur has joined #ruby
mib_mib has quit [Ping timeout: 244 seconds]
<henesy> can just do a while (wait(system 'wget file') != true) ?
<eam> no, you'll need to read up a little bit on nonblocking waitpid
tlarevo has quit [Ping timeout: 256 seconds]
st1gma1 has quit [Quit: Leaving.]
<eam> or you could start a separate thread
mikepack has quit [Remote host closed the connection]
st1gma1 has joined #ruby
st1gma1 has quit [Changing host]
st1gma1 has joined #ruby
leslie2 has quit [Ping timeout: 250 seconds]
larissa has quit [Quit: Leaving]
leslie1 has joined #ruby
crocket has left #ruby ["Leaving"]
zachrab has joined #ruby
zachrab has quit [Read error: Connection reset by peer]
Channel6 has joined #ruby
noop has joined #ruby
<henesy> so
<henesy> it's also possible in this situation
aewffwea has joined #ruby
<st1gma1> Are you trying to read anything back from the command?
<henesy> to do a system 'nohup wget file'; while ((system 'ls -a . | grep -i file') != true
<st1gma1> Or simply wait for it to be done before you proceed?
<henesy> the second option
zachrab has joined #ruby
<henesy> it's just pulling a fle
<henesy> *file
<st1gma1> system is what you want to do. It is a blocking call. Your program will have to wait for it to complete.
jenrzzz has quit [Quit: leaving]
jenrzzz has joined #ruby
<henesy> gonna do a while then waiting for system to return true, easier than i thought
jenrzzz has quit [Client Quit]
<st1gma1> system(wget http://blah.com/blah.zip)
<st1gma1> unless $?==0
<st1gma1> puts "There was an error"
<st1gma1> exit 1
<st1gma1> end
jenrzzz has joined #ruby
jottr has joined #ruby
<henesy> $? is child status?
ARCADIVS has joined #ruby
leslie1 has quit [Ping timeout: 244 seconds]
<henesy> i can put a test for "internet" connection beforehand with a ping test
jenrzzz has quit [Client Quit]
jenrzzz has joined #ruby
leslie1 has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
epitron has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
JohnBat26 has joined #ruby
zachrab has quit [Remote host closed the connection]
zachrab has joined #ruby
jrvlima has quit [Remote host closed the connection]
epitron has joined #ruby
jrvlima has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
epitron has joined #ruby
epitron has quit [Changing host]
timonv_ has joined #ruby
<Authenticator> t = Thread.new { $r = system('sleep','1') } ; loop do ; puts '*' ; sleep 1 ; break unless t.alive? ; end
jrvlima has quit [Client Quit]
zachrab has quit [Ping timeout: 256 seconds]
balazs has quit [Ping timeout: 258 seconds]
snath has joined #ruby
Musashi007 has joined #ruby
timonv_ has quit [Ping timeout: 255 seconds]
agrinb has joined #ruby
rockdon__ has quit [Quit: Textual IRC Client: www.textualapp.com]
bricker`work has joined #ruby
rockdon has joined #ruby
<Authenticator> Or, def show_alive s ; print "processing #{s}: " ; t = Thread.new { loop do ; print '*' ; sleep 1 ; end } ; yield ; ensure ; t.kill ; end ; show_alive('pings') { o = `ping -c5 google.com >/dev/null` }
agrinb has quit [Ping timeout: 265 seconds]
iwishiwerearobot has joined #ruby
<sevenseacat> dafuq
<henesy> Authenticator, thanks, i'll paste that for future reference, I got a temporary enough fix...i think...doesn't do what I want it to do exactly, i'll come back to this tomorrow
blueOxigen has joined #ruby
IrishGringo has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
<Authenticator> sevenseacat: ?
<shevy> Authenticator it's a potty-mouthed cat obviously
iwishiwerearobot has quit [Ping timeout: 260 seconds]
oleo__ has quit [Quit: Verlassend]
<rpag> st1gma1, $? would be nil or a Process::Status object.
Abhijit has joined #ruby
terlar has joined #ruby
<rpag> for example: $?.exitstatus == 0
jaequery has joined #ruby
<st1gma1> yeah you are correct rpag
<st1gma1> I didn't think it throughly
BlackGear has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
magic_ has quit [Read error: Connection reset by peer]
Neozonz|Disc has quit [Ping timeout: 244 seconds]
mengu has joined #ruby
tagrudev has joined #ruby
josephndenton has quit [Ping timeout: 258 seconds]
luriv has joined #ruby
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
psy_ has quit [Read error: Connection reset by peer]
sigurding has joined #ruby
chipotle has quit [Quit: cya]
IrishGringo has quit [Ping timeout: 260 seconds]
<badhatter> Is there a way to convert a Gemfile.lock into a Gemfile
danijoo_ has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
Channel6 has quit [Quit: Leaving]
mocchi has quit [Quit: ZNC - http://znc.in]
neoxquick has quit [Read error: Connection reset by peer]
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
DjDeaf has joined #ruby
Areessell__ has joined #ruby
<epitron> badhatter: hmm.. you could turn the dependencies into a tree
<epitron> then look for the roots
<epitron> sorry, into a bunch of trees
<epitron> tree clustering!
<badhatter> heh....
<badhatter> rephrase that please
xenomorph is now known as {xenomorph}
supermanBlack is now known as aThousandCats
<rpag> Bundler::LockfileParser could most likely do it
<epitron> Gemfile.lock has all the packages that depend on other packages
<epitron> but it's not in a format where you can see what all the roots are
<epitron> so, if you merge all those little things into bigger trees..
<rpag> LockfileParser can get the roots, and their dependencies
<badhatter> ah
<epitron> there ya go :)
{xenomorph} is now known as xenomorph
mistermocha has quit [Remote host closed the connection]
aThousandCats is now known as supermanBlack
mistermocha has joined #ruby
Areessell__ has quit [Ping timeout: 256 seconds]
Morkel_ has joined #ruby
ramfjord has joined #ruby
Morkel has quit [Ping timeout: 255 seconds]
Morkel_ is now known as Morkel
mib_mib has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
last_staff has joined #ruby
nrsk has joined #ruby
jgrevich has joined #ruby
st1gma1 has quit [Quit: Leaving.]
mib_mib has quit [Ping timeout: 244 seconds]
zmyrgel has joined #ruby
Macaveli has joined #ruby
<jgrevich> What’s the best way to do the equivalent of `openssl rsa -in your-site-encrypted.key -out your-site.key` in Ruby?
<arup_r> I set the option as mentioned here.. http://www.ruby-doc.org/stdlib-2.0/libdoc/irb/rdoc/IRB.html#module-IRB-label-Auto+indentation Autoindent is not working in my IRB
agrinb has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
viet_power has joined #ruby
nfk has joined #ruby
agrinb has quit [Ping timeout: 250 seconds]
mib_mib has joined #ruby
Neozonz has joined #ruby
echooo has quit [Ping timeout: 264 seconds]
havenwood has quit []
lolmaus has joined #ruby
<shevy> arup_r how do you test that?
<shevy> like what do you type
<tagrudev> morning
<arup_r> I ran irb
codecop has joined #ruby
ta has quit [Remote host closed the connection]
<arup_r> then was typing ruby code..
<arup_r> found.. no indentation ..
<arup_r> Let me show you a Gist
bal has joined #ruby
<shevy> hmm weird
<shevy> I just enabled it as well
<shevy> in the past when I started "def foo"
<shevy> then hit enter
fandi has joined #ruby
<shevy> It was indented
jasooon has joined #ruby
<shevy> right now it is not hmm
mib_mib has quit [Ping timeout: 244 seconds]
<arup_r> shevy: see those **end** not indented
orionstein has quit [Ping timeout: 272 seconds]
tvw has joined #ruby
<shevy> ah ok but the rest gets indented?
<arup_r> Yes...
<shevy> lucky you
<shevy> I don't get any indent at all :-)
zachrab has joined #ruby
<arup_r> same here :-(
anarang has joined #ruby
Jarboe has quit []
<shevy> you got the other indents!
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jasooon has quit [Ping timeout: 265 seconds]
Spami has joined #ruby
terlar has quit [Quit: WeeChat 1.0.1]
zachrab has quit [Ping timeout: 245 seconds]
SouL has joined #ruby
apeiros has quit [Remote host closed the connection]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
apeiros has joined #ruby
<arup_r> hahaha
<arup_r> So should I report a bug ? :-)
<arup_r> shevy: ^
<gizmore> arup_r: pepcacs are not bugs
<arup_r> Ok.. So then what it is ?
Neozonz has quit [Ping timeout: 255 seconds]
<arup_r> Not working as documented...
<gizmore> i only read one of your lines of text
<gizmore> if shevy agrees it´s a bug, file it
coderhs has joined #ruby
<gizmore> but first check if it´s already filed
<gizmore> if it is filed already, bump it, confirm bla
chrishough has joined #ruby
<gizmore> i hate bugreporting, it´s easier to code bugfree
Neozonz has joined #ruby
Neozonz has quit [Changing host]
Neozonz has joined #ruby
Neozonz|Disc has joined #ruby
<arup_r> I set the option as mentioned here.. http://www.ruby-doc.org/stdlib-2.0/libdoc/irb/rdoc/IRB.html#module-IRB-label-Auto+indentation Autoindent is not working in my IRB.. But not working
godd2 has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
<gizmore> arup_r: wow... thank you for that
<arup_r> For what ? :-)
<gizmore> i didn´t know there is a .irbrc
rubie has quit [Ping timeout: 246 seconds]
<arup_r> hahaha.. Then give me a prty..
<arup_r> ;)
<gizmore> join #shadowlamb for #party
<gizmore> (it´s a mud)
<arup_r> Sure.. I'll if my manager allows me
<arup_r> ;)
<gizmore> fire him :)
<gizmore> or invite him
<arup_r> Ssssshhh! He sits beside me.. ;)
<gizmore> that sounds very productive for a manager
Neozonz has quit [Ping timeout: 258 seconds]
<gizmore> you can also visit #cool-managers channel :)
<shevy> hey
<shevy> filing bugs against irb I would think is hopeless
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gizmore> hey shevy \o
<gizmore> i think a correct fix would be to remove auto-indent... why would it do that?
<shevy> hehe
psy_ has joined #ruby
<gizmore> the auto-complete sounds interesting though =)
valeriansaliou has joined #ruby
psyprus has joined #ruby
shevy has quit [Remote host closed the connection]
sinkensabe has joined #ruby
DTSCode has quit [Quit: Leaving]
<gizmore> To enable autocompletion for irb, add the following to your .irbrc: .... where should the .irbrc go? home?
<gizmore> i use rbenv
kamil has joined #ruby
st1gma1 has joined #ruby
shevy has joined #ruby
<shevy> how many chmod values are possible for a file?
st1gma1 has quit [Changing host]
st1gma1 has joined #ruby
<shevy> 8 ** 3 ?
nyanz has quit []
<shevy> hmm
<gizmore> 2^3 * 4
<shevy> wait
<shevy> how do you get to that
<gizmore> 4 octal values
HewloThere has joined #ruby
<shevy> we have?
<gizmore> 7777 for ouch
<shevy> let me think
<gizmore> all sticky
rshetty has quit [Remote host closed the connection]
<shevy> well let's ignore the leading there and only look at things like 777
<gizmore> 2^3 * 3 then
<shevy> hmm
<shevy> >> (2 ** 3) * 3
<eval-in__> shevy => 24 (https://eval.in/217675)
<shevy> k so 24?
<gizmore> i guess
<gizmore> hmm
<shevy> guess I am missing a few then
codezomb has joined #ruby
<shevy> I think there may be more though
<shevy> I am at 21 now
<gizmore> >> 2 ** 9
agjacome has joined #ruby
<eval-in__> gizmore => 512 (https://eval.in/217677)
<gizmore> even 512?
valeriansaliou has quit [Ping timeout: 240 seconds]
<gizmore> 9 bits
<gizmore> 000
<gizmore> 001
<shevy> yeah that might be more accurate
<gizmore> 512 i think
<gizmore> linux is awesome
<shevy> each slot has ... 0 ... 1 ... 4 ... 5 ... 6? ... 7
<gizmore> math sucks, though!
<shevy> haha
psyprus has quit [Read error: Connection reset by peer]
<shevy> can 5 be reached?
<gizmore> i think 9 bits = 512
yfeldblum has quit [Ping timeout: 244 seconds]
<gizmore> each octal value has 3 bits
<gizmore> so 9 bits = 2^9 permutations
<shevy> oh we have ... Execute (+1) Write (+2) Read (+4) and nothing which should be (+0) 0
<shevy> so we have ... 0,1,2,3,4,5,6,7
<shevy> damn that is a lot
<gizmore> 0 is a state too
<gizmore> it means "no permission"
<gizmore> 3 bits
<gizmore> 3 * 3 bits = 9 bits
<shevy> so we have 8 states and 3 slots
<gizmore> 9 bits = 2^9 states
<gizmore> >> 2 ** 9
<eval-in__> gizmore => 512 (https://eval.in/217679)
<gizmore> are you going to enum them?
maestrojed has quit [Quit: Computer has gone to sleep.]
<shevy> oh well
<shevy> that's too many states for me
<gizmore> try umasks and "is it a dir?"
<shevy> hehe
weaksauce has quit [Ping timeout: 255 seconds]
<gizmore> tip: dirs can have +x
<gizmore> freely, i guess... back to sticky bits!!
<shevy> ok another question
<shevy> I have a file USAGE.md for a gem
hanmac1 has joined #ruby
<shevy> where should I put it, and how to denote it properly in the .gemspec file?
<gizmore> shevy:
<gizmore> s.extra_rdoc_files = [
<gizmore> "README.rdoc"
<gizmore> ]
<gizmore> err damn, you got md
<shevy> hmm
<shevy> ok
<shevy> but somehow I think I do this already yet it won't show up on rubygems.org docu
<shevy> let me check
valeriansaliou has joined #ruby
bricker`work has quit [Ping timeout: 240 seconds]
aganov has joined #ruby
<gizmore> lol.... really...
coderhs has quit [Read error: Connection reset by peer]
<gizmore> "Clicking through the docs for valid values of 'options' - and find nothing. Just coder things"
coderhs has joined #ruby
<gizmore> i think best is grep options gems/rdoc
<gizmore> i think best is grep -R options gems/rdoc
bricker`work has joined #ruby
andikr has joined #ruby
<shevy> I have no rdoc, only .md files
<shevy> you put them into a special directory?
HewloThere has quit [Remote host closed the connection]
Deele has joined #ruby
<gizmore> i checked some existing lib how they do it
<gizmore> maybe try to check gemspeck of a project you like to adapt
andrewlio has joined #ruby
henesy has quit [Quit: Ex-Chat]
<shevy> do you have gems?
<gizmore> shevy: i am also writing a gemspec. still trying to split my chatbot in multiple gems :) – http://cxg.de/_0cd232.htm
<shevy> ah ok so you have at least one gem there
<gizmore> i cloned purple_ruby and fixed it
<gizmore> and cloned validates_as_email and fixed it (version bump)
<shevy> hmm
<gizmore> the purple_ruby patches were... i am proud of them... but i never messed with gemspecs
<shevy> I can not find ricer-fullbot on rubygems.org
<gizmore> its not created yet
* shevy spanks gizmore
<shevy> code faster!
<gizmore> i am trying gem "ricer-bot", path: '../ricer-bot'
<gizmore> to dev the split
<gizmore> ricer bot has a gemfile
<shevy> k
<gizmore> ricer-core will get renamed to ricer-bot
<gizmore> ricer-fullbot is a demo project which uses ricer-bot, ricer-rss, ricer-websockets, ricer-purple
<shevy> I don't see it on rubygems.org
rippa has joined #ruby
<gizmore> its only github
<gizmore> i am new to all this
mistermocha has joined #ruby
<shevy> seems as if there are a lot of github-only based projects :(
<shevy> not only with you, in general really
davidhq has joined #ruby
valeriansaliou has quit [Ping timeout: 250 seconds]
<gizmore> yeah... it´s nice
<gizmore> you can clone with a single click
<gizmore> do a patch online
<gizmore> voial
<gizmore> i like it
<gizmore> github has done great to oss
<sevenseacat> github is pretty awesome.
<gizmore> yeah!
<sevenseacat> not perfect, but awesome.
<gizmore> btw, all my gem hashes fail
<gizmore> i always have to calc sha512 collisions
terlar has joined #ruby
<hanmac1> shevy & gizmore hm maybe for "patch online" something like that? ;P https://orionhub.org
<gizmore> digicert tls... seriously?
<gizmore> blank page without js
<gizmore> seriously?
<gizmore> Sorry, your browser is not supported. The latest version of Chrome, Firefox or Safari web browser is recommended.
<gizmore> Continue anyway?
<gizmore> i think i might still fake my UA to playstation4
<gizmore> indeed
<gizmore> hanmac1: on github you just click "clone", then patch it, and in your gemfile you use gem 'purple-ruby', git: 'gizmore/purple--ruby'
fandi has quit [Remote host closed the connection]
<gizmore> can do with activerecord too
jottr has joined #ruby
agrinb has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
<hanmac1> gizmore: hm yeah, but that is if you want to edit your cloned repo more online than only doing one-file-commits
<gizmore> it´s great for experimenting, and works
<gizmore> you can also checkout your clone, and work seriously
sinkensabe has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
lxsameer has joined #ruby
<gizmore> with all that history and linking on github, it´s easy to merge different people ideas
<gizmore> and a clone is just a single click away... i like github :)
rbrs has joined #ruby
<gizmore> i am not getting paid by github... and i felt bad as i added a second key
siaw has joined #ruby
<gizmore> crypto always does make me feel bad though
zorak8 has joined #ruby
DjDeaf_ has joined #ruby
<hanmac1> gizmore: i didnt say anthing against github ... with that orionhub you can sign in with your github account and can edit your repositories there too
DjDeaf has quit [Read error: Connection reset by peer]
<gizmore> ah okay ... it looked like a disfunctional notepad to me
<siaw> i want to create a class that accepts a directory as an argument in the constructor will this be OK? http://gyazo.com/7d493724d8c2b2ee08c217937e01e301
renderful has joined #ruby
agrinb has quit [Ping timeout: 265 seconds]
<gizmore> siaw: i think a shorter notation might be: def initalize(@dir); end
jottr has quit [Ping timeout: 258 seconds]
<siaw> yeah ok but is my code correct. i doubt it
<gizmore> siaw: also think about what type "dir" is
<sevenseacat> thatsa syntax error
<sevenseacat> and no, your code is not correct, you pass in directory and then access dir
<gizmore> siaw: is "dir" a string, or a File::Directory::Whatever object
<gizmore> oh, and yes, 2 basic errors with syntax i guess
<siaw> i want it to accept a file directory
sinkensabe has joined #ruby
<gizmore> 1 basic "logical" error only... you assign @dir with an unknown var "dir"
terlar has quit [Quit: WeeChat 1.0.1]
<hanmac1> siaw & gizmore: def initalize(dir); @dir = dir; end
lw_ has joined #ruby
oniMaker has left #ruby ["Peace"]
iamdoo2 has joined #ruby
<sevenseacat> without the typo in initialize preferably
<gizmore> >> class Hellow; def initialize(@word); end; def yo; puts @word; end; end; Hellow.new("hi").yo
<eval-in__> gizmore => /tmp/execpad-451ae5c06c43/source-451ae5c06c43:2: formal argument cannot be an instance variable ... (https://eval.in/217689)
timonv_ has joined #ruby
<gizmore> >> class Hellow; def initialize(@word=word); end; def yo; puts @word; end; end; Hellow.new("hi").yo
<eval-in__> gizmore => /tmp/execpad-f534d1de76d8/source-f534d1de76d8:2: formal argument cannot be an instance variable ... (https://eval.in/217690)
terlar has joined #ruby
<gizmore> hmm
<hanmac1> gizmore: i told you, doesnt work that way
francisfish has joined #ruby
renderful has quit [Ping timeout: 264 seconds]
<gizmore> i can swear i have seen a short syntax for that
<sevenseacat> i also said it was a syntax error.
<gizmore> last ruby newsletter
<siaw> i am not looking for a short syntax
bricker`work has quit [Quit: leaving]
<siaw> i just want to have the code working and accepting a directory as an argument :)
marcdel has joined #ruby
lw has quit [Ping timeout: 265 seconds]
nrsk has quit [Ping timeout: 256 seconds]
<gizmore> siaw: you should also settle what type the "dir" argument is
<gizmore> is it a dir object or a string
<siaw> will this be ok?
<siaw> dir is a file
<siaw> like a text file example
<siaw> that’s the kind of object it is
<gizmore> in your new example, @dir will be a string, no?
<siaw> nope
<gizmore> (i am not saying it´s good or bad)
ta has joined #ruby
<gizmore> >> File.dirname('/')
<eval-in__> gizmore => "/" (https://eval.in/217691)
<gizmore> >> File.dirname('/tmp')
<eval-in__> gizmore => "/" (https://eval.in/217692)
<gizmore> >> File.dirname('/tmp').length
<eval-in__> gizmore => 1 (https://eval.in/217693)
<gizmore> seems to be a string, for me
<gizmore> >> File.dirname('/tmp').force_encoding('utf8')
<eval-in__> gizmore => unknown encoding name - utf8 (ArgumentError) ... (https://eval.in/217694)
<shevy> siaw gyazo is bad because we can not quickly copy paste
timonv_ has quit [Ping timeout: 255 seconds]
Areessell__ has joined #ruby
<siaw> ah ok
<shevy> siaw as for the name to your method, you can not pass def initialize(some_name); @foo = something_else <--- where did some_name go?
dawkirst has joined #ruby
<gizmore> *for the name of your argument variable
<shevy> siaw what I usually do there is to pass this into a setter method
<hanmac1> shevy, it goes out of the window ... and never looked back ;P
<shevy> man
<shevy> whoever invented those image-capture thingies
<shevy> for code elements :\
<gizmore> shevy: it was hanmac1 and me... come at us bro
<shevy> lol
<hanmac1> gizmore: if i would have done it, it would had automaticly turned into text
<gizmore> yes, automatically with gocr -m 2, and chinese manpower
<gizmore> after the chinese wall, there was the chinese |
<hanmac1> my current editor at work has a "Create Gist..." in the context menu of the file
<gizmore> let us focus on confusing the beginner more
<shevy> eh
<shevy> siaw is dead
<sevenseacat> gizmore: you do a good job of it :P
<shevy> lost in his code
<gizmore> sevenseacat: i aim to please
rdark has joined #ruby
<shevy> gizmore have you been on the chinese wall?
<siaw> yeah im dead :D
<siaw> really
<gizmore> wb siaw!
<shevy> it's super windy
jasooon has joined #ruby
<gizmore> >> class Siaw; def initialize(d); @dir = d; end; end; puts Siaw.new('/')
<eval-in__> gizmore => #<Siaw:0x4142ce08> ... (https://eval.in/217695)
<shevy> and rather steep in several parts, I was scared to fall down
<gizmore> >> class Siaw; def initialize(d); @dir = d; end; def dir_path; @dir; end; end; puts Siaw.new('/').dir_path
<eval-in__> gizmore => / ... (https://eval.in/217696)
codecop has quit [Remote host closed the connection]
iwishiwerearobot has joined #ruby
<gizmore> shevy: i miss you in shadowlamb
hephaestus_rg has quit [Ping timeout: 255 seconds]
<shevy> I need to get work done!
<gizmore> i wanna test weather command :P
<shevy> I need to finish my rewrite of konsole colours
<siaw> aaaaa i think i explained myself badly
<siaw> i want to pass a folder as an argument :D :D
<siaw> in the constructor
<gizmore> sheepman: you should first settle if you use bright or dark background
<gizmore> shevy: you should first settle if you use bright or dark background
<sevenseacat> dark background ftw
<deepy> shevy: base it on solarized dark
<gizmore> siaw: your problem is now to create a dir object?
<sevenseacat> ugh why does everyone love solarized
<shevy> gizmore dark background for konsole
<gizmore> white xterm ftleets
dumdedum has joined #ruby
<deepy> sevenseacat: why don't you?
<shevy> white background in xchat
psyprus has joined #ruby
<siaw> no, not to created a directory object
<sevenseacat> the contrast levels are horrible
<shevy> deepy it is a pessimistic cat
<siaw> to accept a folder as an argument in the class’s constructor
<sevenseacat> half of it doesnt contrast enough and half of it constrasts too much
<deepy> I'm accepting replacements
<gizmore> siaw: you have been given examples of how to copy a parameter into an @instancevar
jasooon has quit [Ping timeout: 244 seconds]
<shevy> siaw there are no "folders" man, it is a directory. inside your setter, simply check on the provided input. if File.directory? your_input_variable_here
<gizmore> def initialize(param); @dir = param; end
shredding has joined #ruby
marcdel has quit []
<gizmore> this copies the argument into @dir
louism2wash has quit [Quit: This computer has gone to sleep]
<siaw> my friend wrote this: https://eval.in/217697
iwishiwerearobot has quit [Ping timeout: 260 seconds]
<gizmore> a loveletter <3
<shevy> looks as if your friend is a weird dude
<shevy> def initialize(dir|*.*)
<shevy> I don't think your friend knows ruby
<deepy> sevenseacat: do you have any suitable replacement for solarized?
<shevy> gizmore I think he does not want to use your code :-)
<gizmore> looks like you guys still have not settled what your class will do and what it needs ... and your friend maybe knows Dir()
<sevenseacat> depends what its for... for my text editor i use a theme called dobdark
<shevy> dogbark!
<deepy> For my terminal and irc client
<shevy> and the catmeow theme
ephemerian has joined #ruby
<sevenseacat> meh i just picked one of the built-in terminal themes
<sevenseacat> and my irc client doesnt do themes
<gizmore> .+todo Distract shevy from work to make him a bum
<shevy> I don't even know what theme I have
arup_r has quit [Remote host closed the connection]
DjDeaf_ has quit []
<shevy> gizmore rewrites are boring
<deepy> I use irssi, irssi and solarized kinda work
<shevy> and I have code like self.class.class_eval { which makes my brain work harder than it should
<gizmore> shevy: thats why there is rewrites with [L]
siaw has left #ruby [#ruby]
<shevy> [L]?
<gizmore> last rule
<gizmore> apache mod_rewrite
<shevy> hah!
<shevy> I abandoned apache!
<gizmore> 503ginx?
<shevy> no
<shevy> I do not read russian
<gizmore> what httpd do you use?
<shevy> I got annoyed with apache when they changed the config format
melik has quit [Quit: (null)]
<gizmore> raptor?
<shevy> so I had to spend time adapting my old httpd.conf
<shevy> I went to lighty!
<gizmore> light... err nice :)
<deepy> nginx <3
<gizmore> nginx seems crappy
<shevy> and ruby autogenerates config (also for apache now, but I am still too annoyed at them to go back)
francisfish has quit [Remote host closed the connection]
<gizmore> all the porn sites 503 all day
nrsk has joined #ruby
<deepy> That's becuase of PHP
<shevy> HOW COMES YOU KNOW
<gizmore> 503 – sincerly, nginx
<gizmore> shevy: a friend told me
<shevy> ARE YOU PORNIES
<shevy> those friends are strange
<deepy> This chat has really gotten out of hand
<shevy> first they write "def initialize(dir|*.*)", then they relate stories about pr0n
<shevy> deepy I like your nick
<gizmore> *.* looks like preparing for a call to Dir()
* deepy tickles shevy
Neozonz|Disc2 has joined #ruby
<shevy> gizmore you should rename your nick to geezy
<gizmore> i sticked with this name
<shevy> yeah gizmore
<shevy> I guess he wanted Dir['*.*'] but could not decide where to use it
<gizmore> yeah, agree
<shevy> we scared away siaw too
<gizmore> so lets first create a class that holds *.*
<shevy> *.* looks like a smiley
dawkirst has quit [Quit: Leaving...]
<shevy> gizmore I think you distract me from coding
<gizmore> ill set an alert to 25m and highlight you again :)
adriancb has joined #ruby
dseitz has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
TomyWork has joined #ruby
sk87 has joined #ruby
klaut has joined #ruby
francisfish has joined #ruby
Neozonz|Disc has quit [Ping timeout: 255 seconds]
bayed has joined #ruby
existensil has quit [Ping timeout: 245 seconds]
existensil has joined #ruby
reinaldob has joined #ruby
troulouliou_dev has joined #ruby
fawefeawfewa has joined #ruby
aewffwea has quit [Ping timeout: 240 seconds]
Juanchito has joined #ruby
adriancb has quit [Ping timeout: 264 seconds]
bigkevmcd has joined #ruby
Hobogrammer has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
francisfish has quit [Remote host closed the connection]
alex88 has joined #ruby
einarj has joined #ruby
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
chrishough has joined #ruby
reinaldob has quit [Ping timeout: 260 seconds]
RitterJack has joined #ruby
tokik has quit [Ping timeout: 250 seconds]
unshadow has joined #ruby
Joufflu has quit [Ping timeout: 244 seconds]
Neozonz|Disc2 has quit [Ping timeout: 244 seconds]
<unshadow> I'm trying to parse out an http response, I got the response in a file (i dont need to "GET" it from a website), I want to parse it for path, body, headers etc.. all the examples I see with NET:HTTP is only available after "GET"ing the response from a URL
<unshadow> is there a way to parse it from a file ?
momomomomo has joined #ruby
linduxed has quit [Ping timeout: 258 seconds]
ruby-help has quit [Ping timeout: 244 seconds]
<gizmore> unshadow: maybe it´s more smart to not save it to a file, unless you really want to
<unshadow> It's not really from a file, it will be from a socket read, I need to parse it directly while its comming in
<unshadow> if it will work from a file it will work on the socket read, all it gets is a string in the end
elaptics`away is now known as elaptics
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
linduxed has joined #ruby
Lingos has joined #ruby
CustosLimen has quit [Ping timeout: 256 seconds]
Lingos has quit [Client Quit]
<unshadow> now NET::HTTP can only parse the response from an "http.request(request)" object which is actually just a "request = Net::HTTP::Get.new(uri.request_uri)"
<unshadow> I dont want to "GET" it, just parse it
<shevy> hmm
<shevy> why do we have the name of the method .to_sym and not .to_symbol ?
eka has joined #ruby
patric100e99 has joined #ruby
ta has quit [Quit: Leaving...]
suy is now known as disperso
Spami has quit [Quit: This computer has gone to sleep]
suy_ is now known as suy
<suy> Is any of this two styles of breaking lines preferred? http://pastie.org/9697138
ta has joined #ruby
<shevy> I have never seen the first variant before
<suy> mm, true, a bit more balanced; longer though
<shevy> I think in general, the shorter the line, the better
timonv_ has joined #ruby
<shevy> ah
<shevy> I just realized
<shevy> your two variants are not equal
<shevy> "DC.Date.Created" vs "DC.Date"
dseitz has joined #ruby
patric100e99 has quit [Ping timeout: 250 seconds]
<suy> oh, yes, but ignore that to illustrate the point :)
<shevy> hehe
<shevy> well I think the \ is rather uncommon
<suy> ok, I'm new to ruby, and I didn't found anything in the styleguide on github
<gizmore> i am using shevy style :)
<shevy> gizmore my style is weird sometimes
<gizmore> so you see were statement started
<shevy> I do sometimes use explicit return for instance
<gizmore> i do to
<gizmore> also i love this
<shevy> you just pretend you to because you want to be shevy's friend!
chthon has joined #ruby
<gizmore> function foo()
<gizmore> {
<gizmore> }
<shevy> wait
<shevy> what is function
<shevy> is this javascript
<gizmore> javascript
<shevy> yes it is!
<gizmore> i do so in php and java too
<shevy> I fell in love with def
<gizmore> def is def
<shevy> hehehe
<gizmore> def is definately deff!
elcheckito has joined #ruby
arup_r has joined #ruby
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
michael_mbp has quit [Excess Flood]
<shevy> gizmore do you use ruby + colours on the terminal?
<gizmore> i only use ruby in irc, since the bot is stable
<gizmore> wait, no... i dreamt that... i think i have no colors
michael_mbp has joined #ruby
<shevy> and IRC colours?
<gizmore> of course... because i don´t know how to disable that
<shevy> lol
<shevy> ohhhh
<shevy> sunshine outside!
<shevy> yesterday it was raining and windy... I guess I can leave my cave today
sn0wb1rd has quit [Ping timeout: 245 seconds]
zachrab has joined #ruby
terrellt has quit [Ping timeout: 272 seconds]
blackjid_ has quit [Ping timeout: 265 seconds]
bri_ has quit [Ping timeout: 240 seconds]
sevenseacat has quit [Remote host closed the connection]
skarn has quit [Ping timeout: 244 seconds]
livathinos has joined #ruby
yfeldblum has joined #ruby
iwishiwerearobot has joined #ruby
ndrei_ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
ndrei has quit [Read error: Connection reset by peer]
zachrab has quit [Ping timeout: 255 seconds]
wlanboy has quit [Ping timeout: 240 seconds]
tvw has quit []
yfeldblum has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> who again is using ruby on windows here?
wlanboy has joined #ruby
bri has joined #ruby
AlexRussia has quit [Ping timeout: 265 seconds]
Spami has joined #ruby
sn0wb1rd has joined #ruby
t_p has quit [Ping timeout: 245 seconds]
kaspergrubbe has joined #ruby
CustosLimen has joined #ruby
jasooon has joined #ruby
dawkirst has quit [Quit: Leaving...]
kaspergrubbe has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
sadgrapeissad has joined #ruby
kaspergrubbe has quit [Client Quit]
<sadgrapeissad> hello guys! I've been banging my head for a while now. I'm creating APIs and I'm using GrapeAPI ... I want to catch a particular exception... how do I do that?
<sadgrapeissad> I wanna catch this --> Grape::Exceptions::ValidationErrors
sigurding has quit [Quit: sigurding]
kaspergrubbe has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
marcdel has quit []
<sadgrapeissad> I tried using rescue_from but a rescue_from :all ...catches it
sigurding has joined #ruby
Timgauthier has joined #ruby
jasooon has quit [Ping timeout: 265 seconds]
josephndenton has joined #ruby
Lingos has joined #ruby
jheg has joined #ruby
coderhs has quit [Ping timeout: 256 seconds]
lsmola has joined #ruby
olivier_bK has joined #ruby
echooo has joined #ruby
mrgrieves has joined #ruby
<mrgrieves> how can I define variables inside a method and then use them outside once the method executed?
tesuji has joined #ruby
josephndenton has quit [Ping timeout: 255 seconds]
troulouliou_dev has quit [Ping timeout: 244 seconds]
troulouliou_dev has joined #ruby
<tobiasvl> mrgrieves: well, besides returning them?
<tobiasvl> you can't, you need to define the variables outside the method's scope somewhere and manipulate them inside the method
<tobiasvl> mrgrieves: defined inside a method, variables only live for the method's scope
sinequanon has quit [Remote host closed the connection]
jack_rabbit has quit [Quit: Leaving]
<mrgrieves> tobiasvl: thanks, so define them outside but assigning values inside is ok
govg has quit [Remote host closed the connection]
Takle has joined #ruby
jack_rabbit has joined #ruby
<hanmac1> mrgrieves: make a gist or a pastie of what you want
cassianoleal has joined #ruby
Wolland_ has quit [Ping timeout: 265 seconds]
lkba has quit [Ping timeout: 265 seconds]
<tobiasvl> mrgrieves: I agree with hanmac1. defining them outside but assigning values inside works, but if it's ok depends. if they're instance variables, then it's very ok. if they're global variables, I dunno.
<shevy> mrgrieves store them e. g. in @ivars
cassianoleal has quit [Client Quit]
MrDoctor has joined #ruby
<shevy> mrgrieves or global variables but they are leaky, they are valid everywhere, so if you have a $debug var, and some other code also has a $debug var, obviously whoever last writes to it wins, so that is kinda bad. you could also abuse constants to store stuff :)
<hanmac1> tobiasvl & shevy i store all my variables in @bagOfHolding ;P
<shevy> why is it not @bag_of_holding
<shevy> why do you have to be so C++ :P
<mrgrieves> thanks guys ... here's a gist https://gist.github.com/dansanabria/4cf350a22e6eb896ac0d
skarn has joined #ruby
<Lingos> I'm working on a ruby project but I got stuck with some simple html/css. The positioning I made works with chrome and firefox but not with safari. Is there any super kind person that can spend 15-20 min paring with me?
<shevy> mrgrieves it is usually best to turn code such as this into a class
pyon has quit [Ping timeout: 245 seconds]
<shevy> what variable is the one that has to be persistent?
<shevy> and btw store this with file ending .rb in a gist, then it will be automatically colourized
<shevy> haha I forgot proper indent :D
<tobiasvl> mrgrieves: shevy is correct, but this looks like a ruby replacement for a shell script really? if you don't want to go the object oriented route, I guess just declare the variable above the method.
<mrgrieves> the problem I'm lokking at (I'm sure there are many but there's one I want to fix in particular) is that I want run_summary to be defined at the last iteration of the mco_retry block
<shevy> but something looks strange
<shevy> oh yeah I forgot one indent level
<tobiasvl> shevy: drink some more coffee
<shevy> I am sitting actually at like 45° in front of the monitor
<shevy> the keyboard is also slanted
<shevy> it is hard to type and read properly that way :)
jenrzzz has quit [Ping timeout: 244 seconds]
__main__ has quit [Ping timeout: 255 seconds]
unshadow has quit [Quit: leaving]
rdark has quit [Quit: leaving]
<shevy> >> cmd = 'test'; last_run = %x( #{cmd} ); last_run
<eval-in__> shevy => (https://eval.in/217714)
<shevy> that is like `` ?
jenrzzz has joined #ruby
terrellt has joined #ruby
zorak8 has quit [Ping timeout: 264 seconds]
anarang has quit [Ping timeout: 264 seconds]
echooo1 has joined #ruby
echooo has quit [Ping timeout: 245 seconds]
francisfish has joined #ruby
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Deele has quit [Ping timeout: 260 seconds]
nrsk has quit [Ping timeout: 256 seconds]
Baluse has joined #ruby
blackjid_ has joined #ruby
<Baluse> hello. Is there anything that would allow to execute a user input expression ? Only simple math .. a1+a2 etc
agrinb has joined #ruby
<TheBrayn> how should I indent the closing ) if I have multiple lines here: https://github.com/bbatsov/ruby-style-guide#no-braces-opts-hash
moritzs has joined #ruby
<mrgrieves> shevy: thanks
jheg has quit [Quit: jheg]
jottr has joined #ruby
<shevy> Baluse one way is eval. another way is to rebuild it, in this case you could split on '+' and sum the parts up
__main__ has joined #ruby
oo_ has quit [Remote host closed the connection]
<shevy> TheBrayn can you show your specific example?
codecop has joined #ruby
rodfersou has joined #ruby
<shevy> otherwise you can start like:
<shevy> user.set(
<shevy> the_hash_here
<shevy> )
jack_rabbit has quit [Quit: Leaving]
<shevy> sometimes you may have to use the {}
jack_rabbit has joined #ruby
<shevy> ah ok that is simpler
<shevy> line 3 should be at the same level as line 1
<shevy> line 2 is correctly indented
ramfjord has joined #ruby
coderhs has joined #ruby
<TheBrayn> strang, because both the gist and emacs indent it the way it is shown here
<canton7> yeah, take line 3 back a tabstop
<TheBrayn> *strange
<canton7> yeah, their indenting algorithms aren't foolproof
<shevy> time to switch from emacs! :)
<canton7> same with any editor :P
<shevy> NOTEPAD FOREVER
<TheBrayn> ed
oo_ has joined #ruby
<shevy> that is a bit too hardcore for me
<TheBrayn> because it's the standard
<canton7> if your editor doesn't do any auto-indenting, then you won't have problems ;)
<canton7> (I kid of course)
agrinb has quit [Ping timeout: 265 seconds]
<shevy> mine does not!
<shevy> I always have to hit the space key
jottr has quit [Ping timeout: 258 seconds]
<canton7> really? >< "tap tap BANG BANG BANG BANG tap tap tap BANG BANG BANG BANG BANG BANG"
<shevy> yep
<shevy> but normally in ruby I do not have to write a lot per line
<canton7> so even more hitting space?
<canton7> man, get a half-decent editor, please!
<shevy> I hit space a lot
it0a has quit [Ping timeout: 256 seconds]
sadgrapeissad has quit [Quit: Page closed]
<shevy> I would get supermad if an editor would auto-indent incorrectly
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
<canton7> at the very least set it up so tab inserts 2 spaces :P
<canton7> half the amount of key-banging
<shevy> I never use tabs
<shevy> I used a hammer to wipe out the tab and caps lock key!
unshadow has joined #ruby
<canton7> in almost every editor ever you can configure it so that the tab button inserts spaces
<shevy> and the MS logo on my keyboard
vsipuli has joined #ruby
<shevy> yeah but you have to hit the tab key
<canton7> I normally map caps lock onto something else too :P
<canton7> tried backspace for a while, but couldn't get into the habit
<shevy> my left hand sits mostly near ... ctrl ... alt ... and the left side of the alphabet roughly
dangerousdave has joined #ruby
<shevy> hmm let me check which hand uses space
<Baluse> thanks shevyl
moritzs has quit [Ping timeout: 240 seconds]
<shevy> oh... right hand, my thumb there
<shevy> weird
<unshadow> why when I read a file in "rb" mode I get a string like this: "��`I�%&/m�J�J��t�`$ؐ@���" but when I use unpack("B*") I get 0101010 ?
unshadow has quit [Client Quit]
unshadow has joined #ruby
anarang has joined #ruby
<unshadow> Why when I read a file in "rb" mode I get a string with wierd shapes, but, when I do .unpack("B*") on a string I get 010101010 ? isnt the "rb" flag stands for read binery ?
<tobiasvl> unshadow: yes. if you use "rb", you read the bytes
<tobiasvl> that's how the byte values are printed
<canton7> unshadow, the 'b' just means "don't do end-of-line character conversion"
Macaveli has joined #ruby
<canton7> it doesn't mean "convert to some other format"
Macaveli has quit [Read error: Connection reset by peer]
iamdoo2 has quit []
Macaveli has joined #ruby
Takle has quit [Read error: Connection reset by peer]
Takle_ has joined #ruby
<unshadow> I see, how can I use the "rb" logic on a string ?
<canton7> not sure what you're asking
<canton7> ruby won't do automatic end-of-line conversion on a string
<canton7> just when reading/writing files
<apeiros> canton7, unshadow: 'rb' also sets encoding to binary
momomomomo has quit [Quit: momomomomo]
Wolland has joined #ruby
<apeiros> unshadow: how are you printing that string?
<apeiros> unshadow: also what does `p yourstring.encoding` print?
nrsk has joined #ruby
klaut has quit [Remote host closed the connection]
<apeiros> unshadow: also code please. that unpack("B*") result looks highly suspicious. you pasted *7* bits. that makes no sense whatsoever.
davidhq has joined #ruby
<unshadow> Well, My issue is that, I'm trying to use gzip on an HTTP gziped response, I split the response to headers and body, on the body I'm trying to decompress the string using gzip, I'm keep getting "not in gzip format", doing a little bit of googling I saw that when this happens for files, you need to read them in "rb" mode
<unshadow> my string returns UTF-8
<unshadow> and the 7 bits is just an example :) not the real deadl
kyb3r_ has quit [Quit: Leaving]
<apeiros> what ruby version?
<unshadow> ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-linux]
Wolland has quit [Ping timeout: 272 seconds]
<apeiros> then again: code please. it makes no sense.
<apeiros> reading a file with rb results in a binary encoded string
tvw has joined #ruby
<apeiros> (I just checked, behavior exists back since 1.9)
rshetty has joined #ruby
<unshadow> Let me re parse my question as it seems to mislead you (3 sec)
<unshadow> sorry for my english btw :/
AkashicLegend has joined #ruby
<apeiros> your english seems to be just fine. I'm not a native speaker either btw.
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #ruby
Insanity133 has joined #ruby
ghr has joined #ruby
iwishiwerearobot has quit [Remote host closed the connection]
Takle has joined #ruby
kaspergr_ has joined #ruby
<gizmore> unshadow: use doublequotes like this "#{rubycodehere}"
Takle_ has quit [Read error: Connection reset by peer]
leslie1 has quit [Quit: Leaving.]
<gizmore> the rubycodehere does call #to_s implicitly
kaspergrubbe has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
workmad3 has joined #ruby
oo_ has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
<unshadow> here is the code + the http response
BlackGear has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
duncannz has quit [Ping timeout: 264 seconds]
<unshadow> you can see that in the code I split the headers and body, then try to "unzip" (gunzip?) the body
<apeiros> I don't see any read with "rb" in this?
<gizmore> unshadow: use a http client
BlackGear has quit [Client Quit]
<apeiros> body = data.split("\n\n").to_a[1..-1].join("\n") # broken right there already.
<unshadow> yeha... I dont read this from a file, I get it as a string, then, I get the "not in GZIP format", when googling the error the solution is using a read "rb"
<gizmore> or activeshootme.domagic
<apeiros> header/body separation is \r\n\r\n
<Timgauthier> uh oh, i'm doing php again :(
<apeiros> and if you have something *before* this code which removes the \r's, then you have your culprit already.
<gizmore> what if it is chunked?
<gizmore> or it is 7bit encoded?
<gizmore> what if spdy comes?
<apeiros> also, if data.encoding returns utf-8, something is off before that code anyway. it should be binary.
mengu has quit [Remote host closed the connection]
__main__ has quit [Read error: Connection reset by peer]
<unshadow> why ? the http states : Content-Type: text/html; charset=utf-8
Spleeze has quit [Ping timeout: 265 seconds]
<apeiros> unshadow: it also states content-encoding gzip
jasooon has joined #ruby
<apeiros> so either your thingy unzips the data for you, or it should give you the binary gzip
<gizmore> unshadow: btw zlib != gzlib
<apeiros> because gzipped data is not utf-8.
<unshadow> I sohuld use "gzlib" ??
<gizmore> it could be a reason
<apeiros> (which is also exhibited by all those "�" invalid character signs in your output)
jack_rabbit has quit [Ping timeout: 265 seconds]
<apeiros> gizmore: Gzip reader is for gzip
<unshadow> how would I re-encode the data to binery format ?
<unshadow> from the UTF-8 ?
<apeiros> so while zlib maybe != zlib, it's perfectly suitable to read gzipped data.
<apeiros> *!= gzlib
<unshadow> maybe the to_s messes with the encoding ?
<gizmore> hmm really?
<apeiros> unshadow: fix the code before the code you pasted
<gizmore> unshadow: utf8 encoding issues should only mangle the output a tiny bit... your gzip decoding is not fine yet
<apeiros> unshadow: if the data is otherwise undamaged, force_encoding('binary') will do. but since you split on \n\n instead of \r\n\r\n I'd say your data is damaged.
iwishiwerearobot has joined #ruby
<apeiros> gizmore: dude. you're telling nonsense. stop.
<gizmore> i am just saying that there is not an utf8 problem yet
<unshadow> Thanks ! I'll look into it now
RealMarc has joined #ruby
reinaldob has joined #ruby
<apeiros> unshadow: also your output looks as if whatever you used to get the data did not properly read chunked data. the chunk lenght seems to be still in it.
<apeiros> ^ is a guess, though. I may be wrong on that.
jasooon has quit [Ping timeout: 265 seconds]
Lingos has quit [Quit: Be back later ...]
<apeiros> well, an educated guess. "26de\n" does not look like the start of gzip. it does very much look like length part of chunked encoding.
<gizmore> apeiros: sounds like we have a winner
<unshadow> hm.....
Avahey has quit [Quit: Connection closed for inactivity]
Timgauthier has quit [Ping timeout: 258 seconds]
<unshadow> this means I need to wait from more data to come to build the full gziped page ?
<apeiros> unshadow: we're back at: show code. the relevant. the one which gets (and seems to mangle) your data.
<apeiros> this means whatever you use to read your data does not speak http 1.1.
joonty has joined #ruby
<unshadow> it's not
<unshadow> it reads form socket
<unshadow> raw data
Spleeze has joined #ruby
<apeiros> use a proper http lib then
<gizmore> i said that 20 min ago
<apeiros> the other option is to read the >100 pages of http spec.
yfeldblum has quit [Ping timeout: 245 seconds]
<apeiros> and implement a proper http reader. I somehow think that's not what you want to do.
RitterJack has quit [Remote host closed the connection]
<unshadow> hahah yeha... but, I do have a problem, I cant use an HTTP lib as I do alot of manipulation in the socket/tcp/ssl level
vifino has joined #ruby
Deele has joined #ruby
<unshadow> the whole code is a proxy
<gizmore> unshadow: use a http lib that somewhat is ... not bad?
vifino has quit [Remote host closed the connection]
<apeiros> I feel sorry for whoever has to use that proxy.
<unshadow> hahah
<gizmore> apeiros: it is also a firewall :)
<apeiros> no, seriously. you obviously don't know the protocol and didn't bother to read up on it.
<gizmore> sigfaults all outgoing
__main__ has joined #ruby
<unshadow> the proxy works great, the only issue I get is the Gzip, all the other little things are taken care of
<apeiros> yeah, sure…
<unshadow> :/
ericli has joined #ruby
Timgauthier has joined #ruby
<apeiros> you have proper keep-alive, proper cache header settings, etc.?
<gizmore> apeiros: it is "works great on one php testpage"
<apeiros> you process all headers explicitly for proxies and more. right?
<apeiros> let me guess, the answer is "no".
<unshadow> yeha, even cookie menagment
<gizmore> you do encoding:7bit?
<ericli> hi, how do I do this transform: http://fpaste.org/148032/14151829/
<ericli> thanks
moritzs has joined #ruby
<apeiros> ericli: your input is yaml?
<ericli> apeiros, right
<ericli> apeiros, but just wanna finish it in small lines
<apeiros> ericli: might want to mention such details, you know?
<apeiros> ericli: so what have you tried so far?
<ericli> apeiros, I have no knowledge about ruby but just need to do that :(
TPBallbag has joined #ruby
rylev has joined #ruby
<ericli> apeiros, the configuration tool is written by ruby
<apeiros> oh. ok. you want free work. sorry. maybe somebody else in here does that.
<shevy> ericli if you have a yaml dataset then you need to change it towards the second - but the second is not valid ruby so I am confused
sevenseacat has joined #ruby
<shevy> [host01]:[host02]:[etc] <-- invalid ruby
Wolland has joined #ruby
<gizmore> hosts.join('[:').']'
<shevy> {"hosts"=>["host01", "host02"]}
<txdv> you ran away yesterday
<ericli> well, just to connect them in a string
<shevy> ericli the simplest way is to store a yaml file locally, start irb, and load it via: x = YAML.load_file("name_of_your_yaml_file_here.yml")
rshetty_ has joined #ruby
<gizmore> '['+hosts.join(']:[')+']'
wald0 has joined #ruby
<shevy> hehe
troulouliou_dev has quit [Quit: Leaving]
<gizmore> ~o´ <-- supergizmore
workmad3 has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 258 seconds]
czaks has quit [Ping timeout: 250 seconds]
Timgauthier has quit [Quit: Textual IRC Client: www.textualapp.com]
<gizmore> ericli: you can load the file with Yaml.load() ... then use the weird join above
<gizmore> to port it to the weird string you want
<ericli> gizmore, sure, thanks a lot
<gizmore> yw :)
kaspergr_ is now known as kaspergrubbe
mkaesz has joined #ruby
Timgauthier has joined #ruby
rshetty has quit [Ping timeout: 250 seconds]
decoponyo has joined #ruby
Hightower666 has joined #ruby
Wolland has quit [Ping timeout: 245 seconds]
Takle has quit [Read error: Connection reset by peer]
DrCode has quit [Remote host closed the connection]
Takle has joined #ruby
Nahra has joined #ruby
workmad3 has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
decoponio has quit [Ping timeout: 250 seconds]
zwer has quit [Remote host closed the connection]
zwer has joined #ruby
Lingos has joined #ruby
jack_rabbit has joined #ruby
wasamasa has quit [Ping timeout: 250 seconds]
decoponio has joined #ruby
agrinb has joined #ruby
vsipuli has quit []
DrCode has joined #ruby
Xeago has joined #ruby
vsipuli has joined #ruby
vsipuli has quit [Changing host]
vsipuli has joined #ruby
workmad3 has joined #ruby
decoponyo has quit [Ping timeout: 258 seconds]
dr0p has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
b1nd has quit [Ping timeout: 240 seconds]
rdark has joined #ruby
agrinb has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
rshetty has joined #ruby
<dr0p> hello, does anyone use rubocop with ubuntu ? I cannot find way to disable checking linelenght. Github: Metrics/LineLength: Enabled: false doesn't work
b1nd has joined #ruby
Takle has quit [Remote host closed the connection]
Lingos has quit [Quit: Be back later ...]
jenrzzz has joined #ruby
Lingos has joined #ruby
TPBallbag is now known as weewillywinkiwi
garethrees has joined #ruby
Insanity133 has quit [Read error: Connection reset by peer]
rshetty_ has quit [Ping timeout: 250 seconds]
czaks has joined #ruby
anarang has quit [Quit: Leaving]
anarang has joined #ruby
ghr has quit [Read error: Connection reset by peer]
weewillywinkiwi is now known as TPBallbag
Mohan has quit [Read error: Connection reset by peer]
marr has joined #ruby
patrick99e99 has joined #ruby
ldnunes has joined #ruby
Mohan__ has joined #ruby
workmad3 has joined #ruby
zachrab has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
clarkk has joined #ruby
patrick99e99 has quit [Ping timeout: 250 seconds]
sigurding has quit [Quit: sigurding]
unshadow has quit [Quit: leaving]
kyoshero has quit [Quit: Leaving]
Areessell__ has quit [Quit: (null)]
workmad3 has joined #ruby
arup_r_ has joined #ruby
<clarkk> I have an ubuntu system and I'm trying to work out how I installed ruby some time ago. I have a ~/.rvm directory and the environment is set up fine. Can anyone explain how it got there?
zachrab has quit [Ping timeout: 245 seconds]
Takle has joined #ruby
<clarkk> or how I can work out what procedure I used?
Macaveli_ has joined #ruby
Macaveli has quit [Read error: No route to host]
workmad3 has quit [Read error: Connection reset by peer]
pwestlund has joined #ruby
wasamasa has joined #ruby
wasamasa has quit [Changing host]
wasamasa has joined #ruby
arup_r has quit [Ping timeout: 264 seconds]
oo_ has joined #ruby
danjordan has joined #ruby
Naeblis has joined #ruby
<disperso> clarkk: but what do you want exactly? reproduce it in other place?
Wolland has joined #ruby
zwer has quit [Remote host closed the connection]
djstorm has joined #ruby
zwer has joined #ruby
workmad3 has joined #ruby
jack_rabbit has quit [Ping timeout: 264 seconds]
Macaveli_ has quit [Ping timeout: 255 seconds]
<clarkk> disperso: I'm just trying to document my procedure so that it's not so much of a struggle next time i have to set it up. I also have an OS X system, and yes, I will need to document that too, and also get it up to date, but I'm just dealing with the ubuntu box for now
workmad3 has quit [Read error: Connection reset by peer]
Wolland has quit [Ping timeout: 255 seconds]
fsapo has joined #ruby
Insanity133 has joined #ruby
workmad3 has joined #ruby
<disperso> clarkk: well, the difference between them, I guess that it will be that both linux distributions and os x have a ruby version shipped built in. The rest is pretty much the same, no? Add configuration to your .bashrc, .zshrc, etc.
workmad3 has quit [Read error: Connection reset by peer]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Xeago has quit [Remote host closed the connection]
robustus is now known as robustus|Off
Fire-Dragon-DoL has joined #ruby
Lingos has quit [Quit: Be back later ...]
<shevy> clarkk you probably installed rvm
Takle has quit [Remote host closed the connection]
<clarkk> disperso: when you run the rvm installer, as per the instructions, ie \curl -sSL https://get.rvm.io | bash -s stable --ruby does it put everything in ~/.rvm and leave no other trace anywhere else on the file system, regardless of where you ran that command?
<shevy> clarkk you also probably have an additional ruby
<shevy> the ubuntu ruby
<gr33n7007h> I need help, what I'm trying to do is iterate from 0.0.0.0 to 255.255.255.255 going like 0.0.0.1, 0.0.0.2, 0.0.0.3 ... 255.255.255.255 ?
<shevy> clarkk yes
mib_mib has joined #ruby
<clarkk> shevy: no, I haven't installed it from the ubuntu repos
<shevy> ok so you have only one ruby
<shevy> that makes it all even simpler!
<gr33n7007h> would i need 4 loops?
<shevy> if you remove .rvm in your home dir, you have eliminated ruby completely :)
<shevy> gr33n7007h well
<shevy> gr33n7007h the max value is 255 for each position right?
<gr33n7007h> shevy yes
<shevy> ruby won't know this unless you tell it specifically
Insanity144 has joined #ruby
workmad3 has joined #ruby
josephndenton has joined #ruby
<shevy> so you have these values
<shevy> (0..255).(0..255).(0..255).(0..255)
<clarkk> shevy: so the "bash -s stable" is what installs the files, and then deletes any downloaded install files?
St_Marx has quit [Ping timeout: 250 seconds]
<gr33n7007h> yes
<shevy> dunno what bash -s does
jonathan_alban has joined #ruby
<apeiros> gr33n7007h: (2**32).times do |i|
pyon has joined #ruby
<apeiros> gr33n7007h: what you have is 4 bytes, each byte represented individually as its numeric value 0-255.
<gr33n7007h> apeiros, ok yep
Takle has joined #ruby
<gr33n7007h> listening
mib_mib has quit [Ping timeout: 244 seconds]
St_Marx has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
Lingos has joined #ruby
<Timgauthier> shevy help
Insanity133 has quit [Ping timeout: 260 seconds]
<Timgauthier> i'm doing php again :(
Xeago has joined #ruby
DrCode has quit [Quit: ZNC - http://znc.in]
<jonathan_alban> @Timgathier, I'm stuck doing php at the moment too
<shevy> Timgauthier hahaha
<shevy> omg
<shevy> php attack
<Timgauthier> jonathan_alban lets cry
<Timgauthier> shevy even worse, its php and js
<jonathan_alban> ;-(
<Timgauthier> i'm trying to make this work https://gist.github.com/anonymous/a1100d33d9898d90c7e9
<apeiros> gr33n7007h: well, all you have to do is extract the individual bytes from the value. Also see IPAddr.ntop
sigurding has joined #ruby
<Timgauthier> i don't know how to fix the script part to make just a url
josephndenton has quit [Ping timeout: 245 seconds]
<shevy> gr33n7007h here is my stupid one: https://gist.github.com/shevegen/2369cc7af1eabbb369d5
<Timgauthier> instaed of a url that is a sfw link
workmad3 has joined #ruby
<gr33n7007h> this is what I thought but: 0.upto(255) { |a| 0.upto(255) {|b| 0.upto(255) {|c| 0.upto(255) {|d| puts "#{a}.#{b}.#{c}.#{d}; end; end; end; end but it seems so wrong
DrCode has joined #ruby
<gr33n7007h> ah, shevy yours is similar to mine
<shevy> hehe
<clarkk> ok thanks disperso and shevy - I think I've got it
cmxu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jasooon has joined #ruby
<gr33n7007h> apeiros, looking at IPAddr.ntop now thanks
<shevy> gr33n7007h yeah I am sure there are better solutions
<gr33n7007h> apeiros, solution looks the right one
moritzs has quit [Remote host closed the connection]
lampd1_ has joined #ruby
coderhs has quit [Ping timeout: 255 seconds]
<shevy> what is your new code now?
<apeiros> gr33n7007h: well, it's eather what you did or a single iteration over all 4 billion values in a single iteration and converting the value
<workmad3> gr33n7007h: (0..255).to_a.repeated_combination(4).each {|a,b,c,d| puts "#{a}.#{b}.#{c}.#{d}"}
<shevy> no big deal - chuck norris counted to Infinity
<shevy> twice
finferl has joined #ruby
lampd1 has quit [Ping timeout: 250 seconds]
snovity has joined #ruby
<shevy> that is the first time I am seeing .repeated_combination(4)
<workmad3> >> [1,2].repeated_combination(2).to_a
<eval-in__> workmad3 => [[1, 1], [1, 2], [2, 2]] (https://eval.in/217755)
Xeago_ has joined #ruby
<gr33n7007h> apeiros, single iteration seems more likely
tesuji has quit [Ping timeout: 258 seconds]
<workmad3> >> [1,2].repeated_permutation(2).to_a
<eval-in__> workmad3 => [[1, 1], [1, 2], [2, 1], [2, 2]] (https://eval.in/217756)
<workmad3> gr33n7007h: ah, should be repeated_permutation, not repeated_combination, sorry
DrCode has quit [Client Quit]
ndrei_ has quit [Ping timeout: 245 seconds]
<gr33n7007h> workmad3, ah thanks workmad3 :)
rshetty has quit []
lampd1 has joined #ruby
jasooon has quit [Ping timeout: 250 seconds]
<workmad3> gr33n7007h: you could also do [*0.255] to get the initial array
<gr33n7007h> workmad3, both seem to work
workmad3 has quit [Read error: Connection reset by peer]
Xeago has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
<workmad3> 0..255
<workmad3> my typing is screwed today :)
<gr33n7007h> :)
<workmad3> bleh, also got a bouncing connection...
workmad3 has quit [Read error: Connection reset by peer]
lampd1_ has quit [Ping timeout: 255 seconds]
kevinfagan has quit [Max SendQ exceeded]
claymore has joined #ruby
<apeiros> (2**32).times do |i| printf "%d.%d.%d.%d\n" % [i].pack("N").unpack("C4") end
<apeiros> not sure what's more work. might well be that nested iteration is less work for ruby.
<Timgauthier> wewt, i made some of that work, but now i get a forbidden error... i'm not even sure its a php issue lol
mengu has joined #ruby
mengu has joined #ruby
kevinfagan has joined #ruby
Insanity144 has quit [Read error: Connection reset by peer]
Insanity133 has joined #ruby
vsipuli has quit []
s51itxsyc has joined #ruby
<gr33n7007h> apeiros, awesome work thanks :)
<apeiros> advantage of above approach: you can easily modify it to print any range.
<gr33n7007h> or cool i see
iwishiwerearobot has quit [Remote host closed the connection]
dualz has joined #ruby
agrinb has joined #ruby
spacemud has quit [Ping timeout: 240 seconds]
mkaesz has quit [Ping timeout: 250 seconds]
jottr has joined #ruby
Darryl_ has joined #ruby
<gr33n7007h> this is what i come up with: (2**32).times { |i| puts IPAddr.new_ntoh([i].pack('N')) } is that the same as your apeiros ?
<gr33n7007h> but this way seems sluggish
<apeiros> essentially. IPAddr has quite a bit of overhead, though
rylev has quit [Remote host closed the connection]
claymore has quit [Ping timeout: 272 seconds]
<gr33n7007h> think i'll stick to yours or workmads seem to be faster
clarkk has quit [Remote host closed the connection]
<gr33n7007h> thanks guys
agrinb has quit [Ping timeout: 272 seconds]
jottr has quit [Ping timeout: 244 seconds]
Naeblis has left #ruby ["Textual IRC Client: www.textualapp.com"]
AkashicLegend has quit [Ping timeout: 245 seconds]
AkashicLegend has joined #ruby
claymore has joined #ruby
claymore has quit [Changing host]
claymore has joined #ruby
Vile` has quit [Remote host closed the connection]
bigkevmcd has quit [Ping timeout: 250 seconds]
Lingos has quit [Quit: Be back later ...]
<dualz> i have a question, what net framework and your opinion why, should I be using for ruby when doing an angular based site? I'm trying to decide between sinatra and rails
spacemud has joined #ruby
klaut has joined #ruby
anarang has quit [Ping timeout: 256 seconds]
bigkevmcd has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Vile` has joined #ruby
iwishiwerearobot has joined #ruby
tkuchiki has joined #ruby
mkaesz has joined #ruby
ssarah has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
DrCode has joined #ruby
rylev has joined #ruby
tkuchiki has quit [Ping timeout: 258 seconds]
<disperso> dualz: both are fine IMHO for an API.
<disperso> depends on many other things, why I'd chose one or the other
claw_ has joined #ruby
DrCode has quit [Client Quit]
DrCode has joined #ruby
AkashicLegend has quit [Remote host closed the connection]
claw has quit [Ping timeout: 264 seconds]
DrCode has quit [Remote host closed the connection]
Wolland has joined #ruby
kaspergrubbe has quit [Read error: No route to host]
kaspergr_ has joined #ruby
anarang has joined #ruby
Areessell__ has joined #ruby
rbrs has quit [Quit: Leaving]
rshetty has joined #ruby
DrCode has joined #ruby
DrCode has quit [Remote host closed the connection]
Wolland_ has joined #ruby
Macaveli has joined #ruby
Wolland has quit [Read error: Connection reset by peer]
Lingos has joined #ruby
sk87 has joined #ruby
Takle has quit [Remote host closed the connection]
Wolland has joined #ruby
kith has quit [Quit: kith]
jottr has joined #ruby
DrCode has joined #ruby
coderhs has joined #ruby
psyprus has quit [Ping timeout: 258 seconds]
Wolland_ has quit [Ping timeout: 272 seconds]
Lingos has quit [Remote host closed the connection]
renderful has joined #ruby
bMalum has joined #ruby
kith has joined #ruby
jnollette has joined #ruby
Wolland has quit [Ping timeout: 245 seconds]
bMalum has quit [Client Quit]
renderful has quit [Ping timeout: 250 seconds]
TPBallbag has quit [Remote host closed the connection]
mib_mib has joined #ruby
psyprus has joined #ruby
DjDeaf has joined #ruby
amundj has quit [Ping timeout: 245 seconds]
arup_r has joined #ruby
mib_mib has quit [Ping timeout: 240 seconds]
IrishGringo has joined #ruby
jgrevich has quit [Quit: jgrevich]
oo_ has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
amundj has joined #ruby
arup_r_ has quit [Ping timeout: 256 seconds]
jasooon has joined #ruby
TPBallbag has joined #ruby
spastorino has joined #ruby
TPBallbag has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
amundj has quit [Ping timeout: 240 seconds]
jasooon has quit [Ping timeout: 265 seconds]
techsethi has joined #ruby
bMalum has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
Macaveli has joined #ruby
amundj has joined #ruby
agrinb has joined #ruby
toretore has joined #ruby
agrinb has quit [Ping timeout: 265 seconds]
spyderman4g63 has joined #ruby
moritzs has joined #ruby
jimbach has joined #ruby
ndrei has joined #ruby
SouL has quit [Ping timeout: 244 seconds]
garethrees has quit [Ping timeout: 240 seconds]
arup_r has quit [Remote host closed the connection]
bayed has quit [Quit: Connection closed for inactivity]
SouL has joined #ruby
workmad3 has joined #ruby
fandi has joined #ruby
yfeldblum has joined #ruby
zachrab has joined #ruby
arup_r has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kaspergrubbe has joined #ruby
kaspergr_ has quit [Read error: Connection reset by peer]
ruber has joined #ruby
klaut has joined #ruby
siaw has joined #ruby
<siaw> hey guys, how else can i write this in ruby?
TPBallbag has joined #ruby
<txdv> >> !!false
<eval-in__> txdv => false (https://eval.in/217778)
<txdv> >> !!nil
<eval-in__> txdv => false (https://eval.in/217779)
<ruber> Is it possible to use rbenv with $GEM_HOME to avoid having to reinstall gems for every minor version Ruby update, ie. a single collection of gems for all versions?
<txdv> looks like the shortest way to do it siaw
yfeldblum has quit [Ping timeout: 265 seconds]
<siaw> shouldn’t be the shortest way. i need ANOTHER way to do it :D
zachrab has quit [Ping timeout: 240 seconds]
<txdv> >> not not false
<eval-in__> txdv => false (https://eval.in/217780)
<txdv> >> not not nil
<eval-in__> txdv => false (https://eval.in/217781)
<txdv> :D
<txdv> Which is basically the same, just the operator is named differently
<txdv> >> funny = true; def joke(i); i; end; not not joke funny
<eval-in__> txdv => true (https://eval.in/217782)
davedev24_ has quit [Remote host closed the connection]
Takle has joined #ruby
abuzze has quit [Remote host closed the connection]
shredding has quit [Quit: shredding]
shredding has joined #ruby
godd2 has quit [Ping timeout: 255 seconds]
robustus|Off is now known as robustus
moritzs has quit [Ping timeout: 250 seconds]
<shevy> wtf
Musashi007 has quit [Quit: Musashi007]
echooo1 has quit [Quit: echooo1]
hiyosi has joined #ruby
<siaw> can someone please check is this is correct for me? if not make suggestions to correct it?
krisquigley has joined #ruby
krisquigley has quit [Client Quit]
Timgauthier is now known as timgauthier_away
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<txdv> what is that ::Article?
Musashi007 has joined #ruby
<shevy> lol
ruber has quit [Ping timeout: 265 seconds]
<shevy> random syntax in the hope that it will magically work
siwica has joined #ruby
josephndenton has joined #ruby
Wolland has joined #ruby
<siaw> article class is here: https://eval.in/217792
banister_ has joined #ruby
Insanity133 has quit [Remote host closed the connection]
<siaw> and more on the file in question https://eval.in/217793
banister has quit [Ping timeout: 245 seconds]
abuzze has joined #ruby
<siaw> instruction: https://eval.in/217794
SouL has quit [Remote host closed the connection]
josephndenton has quit [Ping timeout: 245 seconds]
danjordan has quit [Quit: danjordan]
Wolland has quit [Ping timeout: 255 seconds]
lolmaus has quit [Remote host closed the connection]
lolmaus has joined #ruby
ohwhoa has joined #ruby
klaut has quit [Remote host closed the connection]
dANO_ has joined #ruby
sanguisdex1 has quit [Quit: Leaving.]
<ohwhoa> Help me please to choose a tool for queries. I want use only raw sql quries without any orm's. Thanks.
Timgauthier has joined #ruby
danjordan has joined #ruby
ubra has joined #ruby
Areessell__ has quit [Quit: (null)]
iamjarvo has joined #ruby
iwishiwerearobot has quit [Remote host closed the connection]
dkphenom has joined #ruby
sk87 has joined #ruby
moritzs has joined #ruby
<gr33n7007h> wtf is post_mortem_method?
mib_mib has joined #ruby
siaw has left #ruby [#ruby]
<gr33n7007h> had a look at source using pry: show-source Module#post_mortem_method still don't get it
<gr33n7007h> ruby is a dark horse
sanguisdex has joined #ruby
Neozonz has joined #ruby
mib_mib has quit [Remote host closed the connection]
<shevy> lol
<shevy> post_mortem_method(meth)
<shevy> Wraps the meth method with Debugger.post_mortem {?} block.
Musashi007 has quit [Quit: Musashi007]
<shevy> meth synthamine drug
psy_ has quit [Ping timeout: 264 seconds]
<shevy> Walter White is in da house
Neozonz|Disc has joined #ruby
Neozonz|Disc has joined #ruby
<gr33n7007h> :D
<Timgauthier> shevy lol
<pontiki> ohwhoa: you can just use the apropriate gem for the type of database you're using...
<Timgauthier> shevy you ever work with aws?
<shevy> Timgauthier nope
<Timgauthier> don't
<Timgauthier> lol
<shevy> lol
<shevy> tell you, I am kinda stuck in the 1998 era of the www
lw_ has quit [Quit: s]
<Timgauthier> you get shit like this https://d34oapiz2jbm97.cloudfront.net/nln-video/blank_video.mp4?Expires=1415194265&Signature=G6-aHtGl9~1Fr-9BFaJr16Rh3JFvjkq7fwFcRA-xNlZsf5zzbAdvaiSfMmf77~ZvHIvLqeBt5dbOfikubRtT7RJCGEKpMwHZ2ywqVW4MLOG7ZDEYCjtGG49ANnkYMqWVoWDIHRZcWU7R4DuvNhaKiH4ZkD8Z~BaVmbn9mpDPmcPPHui4evWO40w6~TAbq1VTAEDdbXpghdwkqR2oxie0xUbWN3iRwVKZTESxplJZ9DfOqT7m4-3qKhS~w-essCSTfAxSFEY6gW~CxYF6fEhy55gzQX7-c3NO91HuHtec7Ox7v2ZXHkyQ8FBYMIxDS0LNEl23~
<Timgauthier> ACWGgRnWcUi0~-aoA__&Key-Pair-Id=APKAJKGQDVCYFKQY774Q
<Timgauthier> yea it even breaks irc lol
<shevy> ack
ohwhoa has quit [Quit: woah!]
<Timgauthier> that... is a url
<shevy> you need an URL shortener there
<Timgauthier> and it doesn't work
<shevy> it's because you work with php
<Timgauthier> i can't use a url shortener, that shits the authentication for the url
<shevy> it makes you a worse programmer
<Timgauthier> the best part is what you get when you "hit" that url... xml that says its broke :(
<shevy> yeah
Neozonz has quit [Ping timeout: 255 seconds]
<shevy> you are in a world of sadness
<shevy> X M L
lw has joined #ruby
Neozonz|Disc2 has joined #ruby
Photism has quit [Quit: Leaving]
<Timgauthier> a picture is shorter http://dsh.re/6045b
<Timgauthier> yeah, they don't even have code on how to do this with ruby
<Timgauthier> plus i'm not even sure how to use ruby on this server :P
jasooon has joined #ruby
Timgauthier has quit [Max SendQ exceeded]
<shevy> this is just sad
lw has quit [Client Quit]
agrinb has joined #ruby
Neozonz|Disc has quit [Ping timeout: 255 seconds]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Timgauthier has joined #ruby
klaut has joined #ruby
nateberkopec has joined #ruby
g0bl1n has joined #ruby
Neozonz|Disc2 has quit [Ping timeout: 244 seconds]
znst has joined #ruby
jasooon has quit [Ping timeout: 265 seconds]
agrinb has quit [Ping timeout: 245 seconds]
znst has quit [Client Quit]
znst has joined #ruby
_maes_ has joined #ruby
AlexRussia has joined #ruby
iwishiwerearobot has joined #ruby
robustus is now known as robustus|Off
VanillaGoat_ has joined #ruby
moritzs has quit [Ping timeout: 265 seconds]
<Timgauthier> wow
<Timgauthier> now it just broke completely
<Timgauthier> it won't even do ssl now
VanillaGoat__ has quit [Ping timeout: 265 seconds]
klaut has quit [Remote host closed the connection]
phutchins has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
robustus|Off is now known as robustus
benzrf|offline is now known as benzrf
dumdedum has quit [Quit: foo]
ndrei has joined #ruby
<shevy> YES
<shevy> you are getting closer to your goal
krz has joined #ruby
<shevy> can you of you kde users test this string
<shevy> in irb -> puts "\e[38;2;106;90;205m(2) hello world!\e[39;49m"
<shevy> hmm ... is \e[39;49m the right code to restore the prior setting again?
joast has quit [Quit: Leaving.]
ARCADIVS has quit [Quit: ARCADIVS]
b1nd has quit [Ping timeout: 255 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
Xeago_ has quit [Remote host closed the connection]
linojon_ has joined #ruby
linojon has quit [Ping timeout: 244 seconds]
linojon_ is now known as linojon
Akuma has joined #ruby
IrishGringo has quit [Ping timeout: 265 seconds]
moritzs has joined #ruby
<gr33n7007h> apeiros, you still here?
DjDeaf has quit []
<apeiros> a bit
swilr has quit [Ping timeout: 256 seconds]
<apeiros> shevy: there's no code for resetting to prior setting. there's only code to remove all codes: \e[0m
elcheckito has quit [Quit: WeeChat 1.0.1]
<gr33n7007h> just a little question what if i wanted to start from the left hand side eg 1.0.0.0 2.0.0.0 what do a pack it with?
<apeiros> shevy: iow, to reset to prior, you must know what prior setting was.
b1nd has joined #ruby
<shevy> hmm ok
tlarevo has joined #ruby
<gr33n7007h> in your example
swilr has joined #ruby
<apeiros> gr33n7007h: reverse the string returned by pack("N")
elcheckito has joined #ruby
<gr33n7007h> ah, of course so stupid me sometimes :) thanks
<shevy> stupid you!
<gr33n7007h> I know :(
<shevy> yay!
tlarevo_ has quit [Ping timeout: 265 seconds]
<shevy> but don't you worry, I still haven't understood the pack ways
<benzrf> pack is for lusers
<benzrf> pack is a dumb perlism
<benzrf> pack is sheet
poulet_a has joined #ruby
Takle has quit [Remote host closed the connection]
workmad3 is now known as wm3|away
<shevy> how does haskell handle binary data benzrf
Abhijit has quit [Quit: Leaving]
<gr33n7007h> apeiros, so pack('N') 32bit unsigned (nbo) big endienne go from right to left in memory?
kp666 has quit [Quit: Leaving]
psy_ has joined #ruby
wald0 has quit [Ping timeout: 258 seconds]
MattB has joined #ruby
cpruitt has joined #ruby
dr0p has quit [Quit: Ex-Chat]
joast has joined #ruby
rbrs has joined #ruby
dr0p_ has joined #ruby
codezomb has quit [Ping timeout: 240 seconds]
livingstn has joined #ruby
rshetty has joined #ruby
wald0 has joined #ruby
triple_b has joined #ruby
<gr33n7007h> Just test with pack('V') little endienne and pack('L') native endienne both 32 bits go from left to right, must study these concepts
<MattB> Any thoughts on whether collect is more idiomatic than map, or are they seen as largely interchangeable?
robustus has quit [Ping timeout: 250 seconds]
<gr33n7007h> map ftw
<MattB> Heh
dr0p_ has quit [Remote host closed the connection]
Areessell__ has joined #ruby
<gr33n7007h> also 4 chars shorter
techsethi has quit [Ping timeout: 245 seconds]
zachrab has joined #ruby
tier has joined #ruby
<MattB> Just I was using map when I posted a question here yesterday, but several answers came back using collect...
<gr33n7007h> personal preference i suppose
robustus has joined #ruby
Takle has joined #ruby
<MattB> Guess I want to make sure some open source code is most readable, but maybe I'm overthinking!
cpruitt has quit [Quit: cpruitt]
aclearman037 has joined #ruby
benzrf is now known as benzrf|offline
arup_r has quit [Remote host closed the connection]
IrishGringo has joined #ruby
robustus is now known as robustus|Off
reinaldob has quit [Remote host closed the connection]
<gr33n7007h> I wouldn't think it would matter either are perfectly fine
Wolland has joined #ruby
<MattB> map it is then!
<gr33n7007h> :)
bmurt has joined #ruby
lxsameer has quit [Quit: Leaving]
byprdct has joined #ruby
jerius has joined #ruby
moritzs has quit [Ping timeout: 255 seconds]
Takle has quit [Remote host closed the connection]
Wolland has quit [Ping timeout: 255 seconds]
davidhq has joined #ruby
shazaum has joined #ruby
Takle has joined #ruby
timonv_ has quit [Remote host closed the connection]
hhutch has joined #ruby
coderhs has quit [Quit: Leaving]
bmurt has quit [Ping timeout: 264 seconds]
St_Marx has quit [Remote host closed the connection]
Neozonz has joined #ruby
Neozonz has joined #ruby
benzrf|offline is now known as benzrf
User458764 has joined #ruby
Neozonz|Disc has joined #ruby
jheg has joined #ruby
MattB is now known as MattB2_
ta has quit [Remote host closed the connection]
<apeiros> gr33n7007h: yeah, pack with V instead of N is better than using N and reversing it
sambao21 has joined #ruby
zB0hs has joined #ruby
agrinb has joined #ruby
<gr33n7007h> apeiros, ok, will pack with the V flag instead then :)
josephndenton has joined #ruby
oo_ has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
MattB2_ has quit [Quit: TTFN]
Neozonz has quit [Ping timeout: 265 seconds]
MattB has joined #ruby
ConstantineXVI has joined #ruby
MattB is now known as MattB2_
ghr has joined #ruby
agrinb_ has joined #ruby
exgf has quit [Quit: ( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
St_Marx has joined #ruby
ndrei has joined #ruby
exgf has joined #ruby
MattB2_ has quit [Client Quit]
agrinb has quit [Ping timeout: 272 seconds]
josephndenton has quit [Ping timeout: 250 seconds]
MattB2 has joined #ruby
Neozonz|Disc has quit [Ping timeout: 265 seconds]
jonathan_alban has quit [Quit: Textual IRC Client: www.textualapp.com]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hhutch has quit [Quit: ERC (IRC client for Emacs 25.0.50.1)]
hhutch has joined #ruby
jasooon has joined #ruby
<alex88> is there an option to force overwrite executables during gem install?
Neozonz has joined #ruby
Neozonz has quit [Changing host]
Neozonz has joined #ruby
beef-wellington has joined #ruby
droidburgundy has joined #ruby
<gr33n7007h> >> "dGhlIHF1aWV0ZXIgeW91IGJlY29tZSwgdGhlIG1vcmUgeW91IGFyZSBhYmxlIHRvIGhlYXI=".unpack('m0').first
<eval-in__> gr33n7007h => "the quieter you become, the more you are able to hear" (https://eval.in/217828)
pushpak has joined #ruby
max96at|off is now known as max96at
lemur has quit [Read error: Connection reset by peer]
lemur has joined #ruby
robbyoconnor has quit [Ping timeout: 265 seconds]
Luser has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
jasooon has quit [Ping timeout: 244 seconds]
iamjarvo has joined #ruby
robustus|Off is now known as robustus
Xeago has joined #ruby
benzrf is now known as benzrf|offline
allcentury has joined #ruby
Neozonz has quit [Ping timeout: 258 seconds]
it0a has joined #ruby
Pupeno has joined #ruby
Neozonz has joined #ruby
Neozonz has quit [Changing host]
Neozonz has joined #ruby
Pupeno_ has quit [Ping timeout: 265 seconds]
zlude has joined #ruby
enebo has joined #ruby
Timgauthier is now known as timgauthier_away
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: zzz]
sailias has joined #ruby
oleo has joined #ruby
<zlude> Hello! I'm doing a iteration from database to get all data listed, but i what to send it by e-mail, how can i do for this iteration output be sent by Mail.deliver body?
kamil has quit [Quit: Leaving...]
tier has quit [Remote host closed the connection]
Xeago_ has joined #ruby
mattstratton has joined #ruby
znst has quit [Remote host closed the connection]
<jhass> zlude: what did you try so far?
jaequery has joined #ruby
orionstein has joined #ruby
davedev24_ has joined #ruby
engineered_acade has joined #ruby
engineered_acade is now known as Cat_1
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tier has joined #ruby
shredding has quit [Quit: shredding]
cpruitt has joined #ruby
ghr has quit [Read error: Connection reset by peer]
garethrees has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
Xeago has quit [Ping timeout: 272 seconds]
dumdedum has joined #ruby
<zlude> jhass, look: http://pastie.org/private/bzvyl3dwqnp5fahyy9hrg puts "Id: #{circuito.id}" returns me all rows associated to user "me", when in run in console i get result, but now can i sent by my Mail.delivery? how can i put this output in body?
moritzs has joined #ruby
<jhass> non-English code always makes me sad :(
<zlude> jhass, let me english it for you.
<jhass> anyway, don't use puts but build a string instread
krz has quit [Quit: WeeChat 1.0.1]
andrewcarter has quit [Quit: Connection closed for inactivity]
<jhass> no need
davedev24_ has quit [Ping timeout: 272 seconds]
tlarevo has quit [Remote host closed the connection]
<jhass> zlude: Have a look at String#<<, Array#join, Array#map and so on
Channel6 has joined #ruby
<alex88> hi guys, is there an option to force overwrite executables during gem install?
Takle has quit [Remote host closed the connection]
paulfm has joined #ruby
<jhass> alex88: does gem install --help list any?
adriancb has joined #ruby
<alex88> jhass: nope, just --force but that's to force dependencies
<jhass> alex88: then you can guess the answer
<alex88> kk great.. :S
<alex88> thanks jhass
<jhass> alex88: but you might be interested in gem pristine
<alex88> not sure how that can help
<alex88> unless you mean removing other versions
<alex88> before installing
sepp2k has joined #ruby
anarang has quit [Quit: Leaving]
sepp2k has quit [Client Quit]
<jhass> gem pristine should rewrite bin's too iirc
<jhass> in fact has an option to only rewrite those
moritzs has quit [Remote host closed the connection]
larissa has joined #ruby
<alex88> to restore, I'm dealing with damn aws opsworks that installs bundled ruby in the same folder where system ruby installs gem's executables
supermanBlack has quit [Remote host closed the connection]
<zlude> jhass, i'm a little bit confused, i'm a beginner in ruby, in php it appears more easy to do i guess.
<jhass> zlude: did you read some basic ruby tutorials?
agrinb_ has quit [Remote host closed the connection]
<jhass> zlude: you can do basically the same as in php to do string building, but there are nicer alternatives
ndrei has joined #ruby
doev has joined #ruby
DaniG2k has joined #ruby
<jhass> >> [1, 2, 3, 4].map {|n| n.to_s(2) }.join(".") # zlude, to just scratch the surface
<eval-in__> jhass => "1.10.11.100" (https://eval.in/217832)
cpruitt has left #ruby [#ruby]
Xeago_ has quit [Remote host closed the connection]
sevenseacat has quit [Quit: Leaving.]
Macaveli has quit [Remote host closed the connection]
Insanity133 has joined #ruby
reinaldob has joined #ruby
patrick99e99 has joined #ruby
fsapo has quit [Remote host closed the connection]
<bahar_> hello everyone... big question... which task queuing gem is easier to use: backburner/sidekiq?
pushpak has quit [Quit: Linkinus - http://linkinus.com]
ClarusCogitatio has quit [Ping timeout: 265 seconds]
Insanity133 has quit [Ping timeout: 264 seconds]
<hanmac1> jhass: or:
<hanmac1> >> [1, 2, 3, 4].map(&"%b".method(:%)).join(".")
<eval-in__> hanmac1 => "1.10.11.100" (https://eval.in/217833)
<jhass> bahar_: never looked at backburner but from the readme examples, Sidekiqs API looks a lot less redundant for me with more sane defaults chosen for you
klaut has joined #ruby
Takle has joined #ruby
joonty has quit [Quit: Leaving]
<jhass> hanmac1: that's not even fewer characters!
balazs has joined #ruby
ClarusCogitatio has joined #ruby
patrick99e99 has quit [Ping timeout: 265 seconds]
Takle_ has joined #ruby
Takle has quit [Read error: Connection reset by peer]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
byprdct has quit []
davedev24_ has joined #ruby
failshell has joined #ruby
banister_ has quit [Read error: Connection reset by peer]
<bahar_> jhass: thats good, because it looks like sidekiq is more actively maintained, too
<rdark> basically I want to ensure that an array (correct XML terminology?) is emptied and only contains my wanted entry
SethDusek5 has joined #ruby
SethDusek5 has left #ruby [#ruby]
banister has joined #ruby
Wolland has joined #ruby
<jhass> rdark: nope, no arrays in xml
* rdark goes into the wrong room
silkfox has joined #ruby
<rdark> jhass: just out of interest, whats the equivilant in XML?
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> O
failshell has quit [Client Quit]
<jhass> sorry
<jhass> I'm not sure I'd say there's one
vifino has joined #ruby
<jhass> XML is a tree structrue
banister is now known as banisterfiend
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
peta_ has joined #ruby
beef-wellington has quit [Ping timeout: 240 seconds]
<jhass> so "a node with only leave childs" maybe?
ndrei has quit [Ping timeout: 250 seconds]
beef-wellington has joined #ruby
<jhass> *leaf
agjacome has quit [Quit: leaving]
Wolland has quit [Ping timeout: 255 seconds]
mikecmpbll has joined #ruby
oo_ has quit [Remote host closed the connection]
viet_power has quit [Ping timeout: 245 seconds]
silkfox has quit [Ping timeout: 240 seconds]
jaequery has joined #ruby
mdarby has joined #ruby
coderhs has joined #ruby
coderhs has quit [Remote host closed the connection]
hamakn has quit [Remote host closed the connection]
timonv_ has joined #ruby
sk87 has joined #ruby
sk87 has quit [Client Quit]
jaequery has quit [Client Quit]
at3560k has joined #ruby
hamakn has joined #ruby
<at3560k> Hi there, I've googled a bit, but haven't found quite what I'm looking for... could someone recommend an examplary cookbook or gist with an ini file/singleton pattern for an application config?
ndrei has joined #ruby
klaut has quit [Remote host closed the connection]
<banisterfiend> apeiros ping
SethDusek5 has joined #ruby
<apeiros> pong
<apeiros> *sob*, headache doesn't help solving equations. not having done it for years doesn't help either :-(
gigetoo has quit [Read error: Connection reset by peer]
peta_ has quit [Remote host closed the connection]
<Cat_1> What equation?
peta_ has joined #ruby
peta_ has left #ruby [#ruby]
hamakn has quit [Ping timeout: 255 seconds]
<apeiros> Cat_1: calculating interception course in 2d space
jgrevich has joined #ruby
ericli has quit [Quit: This computer has gone to sleep]
gigetoo has joined #ruby
ducklobster has quit [Ping timeout: 246 seconds]
<Cat_1> Good luck sir :)
SethDusek5 has left #ruby [#ruby]
rkalfane has joined #ruby
kobain has joined #ruby
<apeiros> I think I have solved it. but I keep getting wrong results :-/
kobain has quit [Changing host]
kobain has joined #ruby
<Cat_1> Equations of motion are fun
<jhass> at3560k: there's a ton of context missing in your question
<Cat_1> gist it?
mib_mib has joined #ruby
<apeiros> it doesn't seem to be difficult. but I lost practice and headache doesn't help either :-/
klaut has joined #ruby
agrinb has joined #ruby
klaut has quit [Remote host closed the connection]
troulouliou_dev has joined #ruby
<apeiros> Cat_1: it's JS. but I'm happy if somebody takes a look :)
<twohlix> I'll take a look
Fractional has joined #ruby
Dude007 has joined #ruby
<apeiros> https://gist.github.com/apeiros/30d729d9e833a2f439ec intercept is the relevant function
doev has quit [Ping timeout: 264 seconds]
<twohlix> trying to find the closest intercept?
<apeiros> target* are the ship which you want to intercept. own* is the intercepting ship.
<apeiros> yes
<zlude> jhass, I don't know if my question was clear before. So, look here: http://pastie.org/private/ewfs8n1rse7otgmvvro4q
beef-wellington has quit [Ping timeout: 265 seconds]
<Fractional> What's more right? class Foo; @updater = Updater.new; def initialize(a); @a = a; end; end or: class Foo; def initialize(a); @updater = updater.new; @a = a; end; end?
<twohlix> k, and maxspeed is the magnitude of the xy vector you can do. 0 acceleration time?
<jhass> zlude: doesn't change my answer
<at3560k> jhass: I'm a bit new to ruby, have found the ini file and am writting a command line driven application. There'll be typical options such as "debug" that could override a user's .rc file. I was simply looking for an...idiomatic way to write this. Looking at ini file documentation, I'd expect it to use...symbols instead of strings
Photism has joined #ruby
nucatus has joined #ruby
<apeiros> assuming constant velocity of the target ship and assuming we can immediately turn in that direction and travel at full speed
<twohlix> k, cool
Ankhers has joined #ruby
agrinb_ has joined #ruby
<apeiros> twohlix: correct
<apeiros> would be too complex if I'd factor that stuff in too :D
Macaveli has joined #ruby
Fractional has quit [Client Quit]
<twohlix> yea, you'd be doing some calculus :)
Fractional has joined #ruby
<Fractional> .
<Fractional> What's more right? class Foo; @updater = Updater.new; def initialize(a); @a = a; end; end or: class Foo; def initialize(a); @updater = updater.new; @a = a; end; end?
<apeiros> I'll leave that as an exercise for people implementing adjutants :D
msmith_ has joined #ruby
<Fractional> Sorry if double post, I believe I was disconnected.
<apeiros> (adjutants will be pieces of code which take over tasks for you - such as managing your ships)
mib_mib has quit [Ping timeout: 240 seconds]
agrinb__ has joined #ruby
Areessell__ is now known as Areessell
Neozonz|Disc has joined #ruby
<apeiros> Fractional: the two are not equivalent
agrinb has quit [Ping timeout: 272 seconds]
<jhass> at3560k: this one? http://www.rubydoc.info/gems/inifile seems to normalize to strings internally
<apeiros> so there's none "being more right". you'll have to say what you intend to do
<at3560k> jhass: yes, I'm reading the documentation on ersion 3.0 right now
<Fractional> apeiros, how are they not equivalent? Both are declaring and initializing @a in the constructor. The difference is where @updater gets declared and initialized.
<apeiros> twohlix, Cat_1: I'd gist the equations. but they're scribbled by hand on paper :D
<twohlix> yea
<twohlix> I've figured the EQs out i think
<Fractional> Is there a reason to why my teacher decides to declare and initialize variables outside of the constructor, if it does not have anything to do with the constructors parameters?
<apeiros> Fractional: yes, first one does not have @updater in your Foo instances
<apeiros> >> class Foo; @x = 1; end; Foo.new.instance_variables
<eval-in__> apeiros => [] (https://eval.in/217845)
<jhass> at3560k: I'd suggest you get pry (pryrepl.org), load the gem and play around a bit ;)
yfeldblum has joined #ruby
<at3560k> All I'm getting at is looking at those documents, from what I've seen is that it feels...different from other ruby I've been using. I would expect the sections to be :symbols. I can write it, but it feels... like I'm not understanding a use pattern
<apeiros> >> class Foo; @x = 1; end; Foo.instance_variables
<eval-in__> apeiros => [:@x] (https://eval.in/217846)
axl_ has joined #ruby
<apeiros> Fractional: ^ compare those two pieces of code and their output
lampd1 has quit [Remote host closed the connection]
agrinb_ has quit [Ping timeout: 272 seconds]
<Fractional> Oh right.
<Fractional> Thank you :P
<Cat_1> I'm assuming you want a = sqrt(targetVelocityX*targetVelocityX + targetVelocityY*targetVelocityY - ownMaxVelocity*ownMaxVelocity)
SpaceKookie has quit [Ping timeout: 256 seconds]
<at3560k> I'll look into it...thanks
jaequery has joined #ruby
Neozonz has quit [Ping timeout: 265 seconds]
jasooon has joined #ruby
<Cat_1> Looks like you're trying to do a pythagorean identity there
nemesit|znc has quit [Ping timeout: 256 seconds]
viet_power has joined #ruby
ohcibi_ has joined #ruby
t_mmyv has joined #ruby
dcopeland_ has joined #ruby
tagrudev has quit [Remote host closed the connection]
<jhass> at3560k: well you generally don't want to convert user input (like configuration files) to symbols, so the gem rightfully keeps the internal structures as strings. But at least things like Inifile#[] seems to call #to_s on the argument, so you can very well pass a symbol and it should work
<apeiros> I'll try to transcribe my equations. but give me a second first. want to check something first.
<apeiros> well, second == ~5min :)
agrinb__ has quit [Ping timeout: 272 seconds]
kalleth has quit [Ping timeout: 256 seconds]
ohcibi has quit [Ping timeout: 256 seconds]
lele has quit [Ping timeout: 256 seconds]
dcopeland has quit [Ping timeout: 256 seconds]
bauruine has quit [Ping timeout: 256 seconds]
<at3560k> So maybe I've been learning an anti-idiom... good to know.
<at3560k> thanks
last_staff has quit [Remote host closed the connection]
dcopeland_ is now known as dcopeland
kalleth has joined #ruby
<apeiros> Cat_1: pythagoras only comes in as a part of the equation - ownVelocityX^2 + ownVelocityY^2 == maxOwnVelocity^2
Fractional has quit [Quit: Leaving]
<apeiros> where ^ --> ** in ruby terms
Fractional has joined #ruby
<Spami> by any chances does anyone knows how to remove ruby-install and all rubies ?
<Fractional> .
heftig_ has joined #ruby
<balazs> does anyone know if Fog::AWS::SQS has a state in it ? I cannot seem to receive the same messages twice, even though it is not deleted from the queue.
rshetty has quit [Remote host closed the connection]
nucatus_ has joined #ruby
SpaceKookie has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
jaequery has quit [Client Quit]
eka_ has joined #ruby
andikr has quit [Remote host closed the connection]
Constant_ has joined #ruby
<twohlix> apeiros, you shouldn't have to do quadratic at all
Hightower666 has quit [Ping timeout: 244 seconds]
ClarusCogitatio has quit [Ping timeout: 258 seconds]
<balazs> duh, nm, must be the Default Visibility Timeout
wm3|away is now known as workmad3
edwardly_ has joined #ruby
nemesit|znc has joined #ruby
jottr_ has joined #ruby
mayamai has joined #ruby
BlackGear has joined #ruby
ClarusCogitatio has joined #ruby
tessi_zz has quit [Ping timeout: 264 seconds]
edwardly has quit [Excess Flood]
iamayam has quit [Ping timeout: 264 seconds]
nucatus has quit [Ping timeout: 264 seconds]
gizmore has quit [Ping timeout: 264 seconds]
mayamai is now known as iamayam
heftig has quit [Ping timeout: 256 seconds]
<MattB2> Cat_1, or: sqrt(targetVelocityX**2 + targetVelocityY**2 - ownMaxVelocity**2) ??
jrdnull has quit [Ping timeout: 256 seconds]
jottr has quit [Read error: Connection reset by peer]
snath has quit [Ping timeout: 256 seconds]
papal has quit [Ping timeout: 256 seconds]
gilmour has quit [Ping timeout: 256 seconds]
jasooon has quit [Ping timeout: 260 seconds]
ubra has left #ruby [#ruby]
mdarby has quit [Ping timeout: 256 seconds]
ConstantineXVI has quit [Ping timeout: 256 seconds]
eka has quit [Ping timeout: 256 seconds]
Cat_1 has quit [Ping timeout: 256 seconds]
reek has quit [Ping timeout: 256 seconds]
BlackGear has quit [Max SendQ exceeded]
gizmore has joined #ruby
gizmore has quit [Changing host]
gizmore has joined #ruby
iceden has quit [Ping timeout: 264 seconds]
edwardly_ is now known as edwardly
bauruine has joined #ruby
tessi_zz has joined #ruby
papal has joined #ruby
iceden has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
jrdnull has joined #ruby
BlackGear has joined #ruby
gilmour has joined #ruby
ubra has joined #ruby
mary5030 has joined #ruby
gr33n7007h has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
klaut has joined #ruby
Constant_ has quit [Client Quit]
ConstantineXVI has joined #ruby
arup_r has joined #ruby
Cat_1_ has joined #ruby
<Cat_1_> man my internet connections' been whacky lately
Neozonz|Disc2 has joined #ruby
manzo has joined #ruby
aclearma_ has joined #ruby
ClarusCogitatio has quit [Ping timeout: 250 seconds]
gsd has joined #ruby
geggam has joined #ruby
mikeg has joined #ruby
Neozonz|Disc has quit [Ping timeout: 265 seconds]
<apeiros> hm, it seems to be a problem with numeric stability when "a" goes towards zero in the quadratic equation
<apeiros> otherwise it seems to produce proper results
aclearman037 has quit [Ping timeout: 258 seconds]
BlackGear has quit [Read error: Connection reset by peer]
<apeiros> Cat_1_: what's the rationale for using sqrt there?
BlackGear has joined #ruby
<apeiros> I'll gist the equations. transcribing now. will take a couple of minutes I guess.
byprdct has joined #ruby
Neozonz has joined #ruby
ClarusCogitatio has joined #ruby
gsd has quit [Client Quit]
<electrical> Hi all. i have a string version of a hash due to limitation of the gemspec file ( metadata field ) is there a nice way to convert it into a real hash? would like to avoid using 'eval' :-)
renderful has joined #ruby
Neozonz|Disc2 has quit [Ping timeout: 255 seconds]
<workmad3> electrical: I'd suggest storing it as a string of json or yaml
robustus is now known as robustus|Off
rostam has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
klaut has quit [Remote host closed the connection]
mikeg has quit [Ping timeout: 258 seconds]
<jhass> ^ but I wonder if there's actually anything enforcing that restriction?
BlackGear has quit [Client Quit]
RTG` has joined #ruby
<jhass> looks like just a plain hash to me
beef-wellington has joined #ruby
rostam has joined #ruby
<electrical> jhass: yeah indeed :-(
mdarby has joined #ruby
<electrical> workmad3: storing as json could be possible yeah
Neozonz|Disc has joined #ruby
Neozonz|Disc has joined #ruby
gsd has joined #ruby
sigurding has quit [Quit: sigurding]
Channel6 has quit [Quit: Leaving]
hanmac1 has quit [Quit: Leaving.]
robustus|Off is now known as robustus
momomomomo has joined #ruby
BlackGear has joined #ruby
marcdel has joined #ruby
larissa has quit [Quit: Leaving]
BlackGear has quit [Max SendQ exceeded]
Takle_ has quit [Remote host closed the connection]
BlackGear has joined #ruby
robbyoconnor has joined #ruby
heftig_ is now known as heftig
Neozonz has quit [Ping timeout: 265 seconds]
Neozonz has joined #ruby
govg has joined #ruby
oleo is now known as Guest97114
oleo__ has joined #ruby
Takle has joined #ruby
oleo__ has quit [Read error: Connection reset by peer]
<zlude> jhass, i give up.
finferl has quit [Remote host closed the connection]
<jhass> zlude: what did you try?
<jhass> (don't paste the same thing again)
mostlybadfly has joined #ruby
Neozonz|Disc has quit [Ping timeout: 258 seconds]
rkalfane has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
marcdel has quit [Ping timeout: 265 seconds]
robbyoconnor has quit [Client Quit]
rkalfane has joined #ruby
ClarusCogitatio has quit [Ping timeout: 245 seconds]
<shevy> haha
<jhass> did you read some basic ruby tutorial like I suggested?
<shevy> paste it!
<shevy> show it man!
oleo__ has joined #ruby
<zlude> jhass, in fact, i really don't understand what you means with your example. I search in web how do that, but don't work! i create a var @test = "test" and call body "#{@test}", nothing on email body is going. just if i put static text. body "test" so, works.
<shevy> ack
Xiti has quit [Quit: Leaving]
<shevy> I just saw it jhass
rkalfane has quit [Client Quit]
Guest97114 has quit [Ping timeout: 255 seconds]
<shevy> rails-attack on my poor eyes
* ddv yawns
<shevy> this is all highly domain specific code zlude
VanillaGoat has joined #ruby
dseitz has joined #ruby
Fractional has quit [Remote host closed the connection]
lele has joined #ruby
Neozonz|Disc has joined #ruby
Neozonz|Disc has joined #ruby
livathinos has quit []
ClarusCogitatio has joined #ruby
lampd1 has joined #ruby
<shevy> zlude btw your example above must work: body "#{@test}" is the same as body "test", if @test has been given a content
<zlude> shevy, i really trying to code just using ruby. uses sendmail without rails etc, the full code example is here: http://pastie.org/private/ewfs8n1rse7otgmvvro4q
<zlude> shevy, but don't work.
<shevy> no this is not possible
kaspergrubbe has quit [Read error: Connection reset by peer]
<zlude> shevy, i do @test = "test" and then.. body "#{@test}", nothing on email body
<tobiasvl> zlude: you have some weird quotation marks in that code
<shevy> nope
<jhass> zlude: show the "doesn't work" example
<shevy> but btw, in that example you can omit the #{} -> body @test
kaspergrubbe has joined #ruby
<tobiasvl> or is it just my font
jaequery has quit [Client Quit]
VanillaGoat_ has quit [Ping timeout: 255 seconds]
Neozonz has quit [Ping timeout: 244 seconds]
<shevy> body "" # How can i get the output from 'books' in my e-mail body?
<shevy> what do you mean with books precisely
jaequery has joined #ruby
<jhass> tobiasvl: probably a combination of pastebin.com and your font
<shevy> this here?
<shevy> books = @author.books
<tobiasvl> zlude: I'm guessing you want to use the output that you puts on line 39? you never use that output for anything besides printing it to screen
<tobiasvl> put the result from the each block into a string and use that?
<shevy> zlude always keep your code as simple as possible
Xiti has joined #ruby
<jhass> shevy: it's fairly simple already
<shevy> I dunno
bal has quit [Quit: bal]
<jhass> zlude: still waiting for your actual attempt, not your "I don't know further, solve it for me"
bigkevmcd has quit [Ping timeout: 245 seconds]
ki0 has joined #ruby
<shevy> he writes stuff like "How can i get the output from 'books' in my e-mail body?" but I don't see 'books', I see 'book' like book.id
sk87 has joined #ruby
<zlude> <shevy> "books = @author.books" ?
<shevy> is that books?
Wolland has joined #ruby
<shevy> I mean I don't know what it returns
lampd1 has quit [Client Quit]
<shevy> you probably want a string representation
<shevy> that's kinda hard to debug remotely!
<tobiasvl> I'm 100% sure zlude means he wants books to be the concatenation of the strings from all iterations on line 39
<tobiasvl> so zlude, do that
<shevy> aha
<shevy> now that is a lot clearer to me
<jhass> tobiasvl: already pointed him to map and join
<shevy> yes zlude have you used .map?
<shevy> I guess he gave up
tlarevo has joined #ruby
<zlude> shevy, I really don't understand how map can help me.
Neozonz|Disc2 has joined #ruby
agrinb has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fandi has quit [Remote host closed the connection]
jaequery has joined #ruby
<shevy> well
jaequery has quit [Max SendQ exceeded]
<shevy> what is books
<jhass> zlude: let's work on that when we figured out why passing a static variable to body didn't work for you
hhutch has quit [Ping timeout: 264 seconds]
jaequery has joined #ruby
<jhass> for that you need to show the actual code
jenrzzz has quit [Ping timeout: 240 seconds]
josephndenton has joined #ruby
geggam has quit [Ping timeout: 240 seconds]
Neozonz has joined #ruby
Neozonz|Disc has quit [Ping timeout: 255 seconds]
Macaveli has quit [Ping timeout: 256 seconds]
jimmyhoughjr has joined #ruby
<zlude> shevy / jhass, code + database modeling: http://pastie.org/private/5mm022jrhnzv3vorj4ztsg
<shevy> well see
<shevy> I would collect everything into the variable books
Avahey has joined #ruby
<shevy> then you simply pass that variable towards the method called body()
<zlude> shevy / jhass, I don't want to you guys make it for me... i really want to UNDERSTAND how do that.
geggam has joined #ruby
rshetty has joined #ruby
<shevy> right now all you do is: puts "Id: #{book.id} | Title: #{book.title} | Author: #{@author.name} | Published: #{book.published}"
<shevy> you output it
<shevy> you don't collect it
<jhass> zlude: I'm asking for your attempts to pass a variable to body
workmad3 is now known as wm3|busy
agrinb has quit [Ping timeout: 265 seconds]
<apeiros> Cat_1_, twohlix: https://gist.github.com/apeiros/30d729d9e833a2f439ec - updated gist to include the equations
Neozonz|Disc2 has quit [Ping timeout: 255 seconds]
Dude007 has quit []
<zlude> shevy, so, what is collect it?
wang has quit [Ping timeout: 244 seconds]
<apeiros> I think I have to special case a ~= 0
<shevy> zlude well, we need to agree that you want to send some text towards body() right?
oleo__ is now known as oleo
braincra- has joined #ruby
<twohlix> apeiros, there is always the case where the thing you're trying to intercept is faster than the ship you're using to intercept. Sometimes they'll have an intersection point, sometimes they wont.
rkalfane has joined #ruby
oleo has quit [Quit: Verlassend]
wang has joined #ruby
<apeiros> twohlix: yes, that's when the quadratic equation yields no result
<zlude> shevy, I want to send in body the @author.books from "Linda Liukas"
Neozonz|Disc has joined #ruby
hamakn has joined #ruby
josephndenton has quit [Ping timeout: 250 seconds]
<shevy> he never says yes or no :(
Bounga has joined #ruby
<apeiros> twohlix: there's also the case where it has the same speed and same heading -> uninterceptable too. also yields no result for quadratic.
<shevy> ah ok non-native english speaker
oleo has joined #ruby
msmith__ has joined #ruby
<shevy> zlude you can run debug statements in your code; require 'pp'; pp @author.books - it probably won't work alone as it is not a string, and body() probably wants a string or?
braincrash has quit [Ping timeout: 264 seconds]
Neozonz has quit [Ping timeout: 255 seconds]
<shevy> ok excellent
<shevy> that is an Array
<zlude> shevy, sure
<shevy> it contains weird objects like #<Book id:
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> you need to get a string representation from these, or at least the text you seek from these
<shevy> hence why you can use .map on that Array
<shevy> then you should have a string, and you can join it via something like .join("\n") or .join("<br>") if it is HTML I suppose
msmith_ has quit [Ping timeout: 272 seconds]
geggam has quit [Ping timeout: 264 seconds]
<shevy> you can use the line you already use for your puts statement there
<shevy> books = @author.books.map { |book| "Id: #{book.id} | Title: #{book.title} | Author: #{@author.name} | Published: #{book.published}" }.join("<br>")
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> but I would not write it like that, I would break it into small chunks so that my poor brain and my poor eyes don't have to stare at long lines
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
braincrash has joined #ruby
dkb20k has quit [Remote host closed the connection]
mib_mib has joined #ruby
ClarusCogitatio has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
yfeldblum has joined #ruby
psy_ has quit [Read error: No route to host]
<zlude> shevy, why renaming.. books = @author.books.map... to @books = @author.books.map don't work?
<shevy> huh?
stunder has joined #ruby
<shevy> why should this not work?
<shevy> it works fine
momomomomo_ has joined #ruby
Xeago_ has joined #ruby
braincra- has quit [Ping timeout: 256 seconds]
terlar has quit [Ping timeout: 258 seconds]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zlude> @books = @author.books.map and body @books, don't work. books = @author.books.map and body books, works!
ClarusCogitatio has joined #ruby
<apeiros> twohlix, Cat_1_: https://gist.github.com/apeiros/30d729d9e833a2f439ec - updated the code. this seems to work correctly now. returns null if interception is not possible.
kamil has joined #ruby
<twohlix> nice
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<jhass> zlude: that's because some weird ruby trick Mail.deliver does
mistermocha has joined #ruby
<jhass> zlude: it changes the scope for where @instance_variables are looked up
mib_mib has quit [Ping timeout: 240 seconds]
<jhass> which then also allows you to call methods like to in that scope
freerobby has joined #ruby
<shevy> aaaah
<shevy> how evil
momomomomo has quit [Ping timeout: 264 seconds]
momomomomo_ is now known as momomomomo
jottr_ has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 244 seconds]
<apeiros> I think not all of the result cases I handle for the quadratic equation should be possible, though :)
ql6wlld has joined #ruby
aganov has quit [Remote host closed the connection]
msmith_ has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr_ has joined #ruby
Xeago has quit [Ping timeout: 265 seconds]
moritzs has joined #ruby
Neozonz|Disc has quit [Ping timeout: 265 seconds]
Neozonz has joined #ruby
Neozonz has quit [Changing host]
Neozonz has joined #ruby
msmith__ has quit [Ping timeout: 255 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
noop has quit [Read error: Connection reset by peer]
<zlude> shevy and jhass, thank you a lot guys, and I'm sorry for my fucking newbie skills :/ i'll continuing on study.
zachrab has quit [Remote host closed the connection]
<shevy> hey that is non trivial zlude
jasooon has joined #ruby
<shevy> I did not keep in mind that it could change the meaning of @ivars
<shevy> I find that really evil
coderhs has joined #ruby
<shevy> it hopefully is not matz approved!
<jhass> zlude: I could have pointed that out a lot earlier if you just shared your actual attempt ;)
zachrab has joined #ruby
<jhass> so don't be sorry for being new to ruby
sambao21 has joined #ruby
oo_ has joined #ruby
_maes_ has joined #ruby
<zlude> jhass, shevy... means my code is a shit? I really like webapps, and i will learn Rails soon, but i really need to try to understand ruby first. So i'm trying to do with just ruby somethings possible with php.
<shevy> zlude dunno, there is not a lot of your code is it? you just use a lot of code written by other people
ixti has joined #ruby
<jhass> zlude: no, that's totally not what I'm saying
<shevy> jhass there is the language barrier!
<jhass> zlude: you always shared the "last working" state, why I asked for the state that actually fails
<zlude> shevy, wtf! i write by hand code by code in this example.
<MattB2> in your _order partial render order.line_items
Neozonz has quit [Ping timeout: 244 seconds]
<shevy> zlude well you just use code written by others really ;)
<jhass> MattB2: channel
<MattB2> jhass sorry
maestrojed has joined #ruby
CustosLimen has quit [Ping timeout: 255 seconds]
dangerousdave has joined #ruby
<zlude> shevy, I'm not a php prog, i'm newbie in php too, i'm beginning with dev, so a friend said, php sucks, learn ruby. so i come to ruby instead php
Pete_____ has joined #ruby
jasooon has quit [Ping timeout: 240 seconds]
<shevy> learn php first - you will want to switch at a later time anyway :)
zachrab has quit [Ping timeout: 245 seconds]
Pupeno_ has joined #ruby
WillAmes has quit [Remote host closed the connection]
<shevy> apeiros wrote a lot of php code when he was young
Neozonz has joined #ruby
<shevy> and look what he now does - rails, rails, rails
oo_ has quit [Ping timeout: 258 seconds]
<jhass> zlude: note that shevy talks a lot of nonesense if the day is long, don't take all of it too seriously ;)
<apeiros> shevy says that right after I pasted javascript :-p
WillAmes has joined #ruby
<shevy> well now that is an option
<shevy> zlude you could learn javascript first
<zlude> jhass, but, my code in this example, my Ruby code is bad written? or not.. i'm using it surely.?
doev has joined #ruby
<jhass> there's not much room in there for bad code tbh
<zlude> shevy, i know a little bit of javascript
Xeago_ has quit [Remote host closed the connection]
<jhass> zlude: whatever language it is, focus on one to learn programming. picking up new languages is a lot easier afterwards
Hijiri has quit [Quit: WeeChat 1.0.1]
nrsk has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Pupeno has quit [Ping timeout: 255 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
havenwood has joined #ruby
snath has joined #ruby
<jheg> o/
<zlude> jhass, thank you! i'm loving you guy. lol
Neozonz has quit [Read error: Connection reset by peer]
Ankhers has quit [Ping timeout: 250 seconds]
<jheg> any ideas why I might be getting this error in irb folks? $ wget -O feedzilla.json http://api.feedzilla.com/v1/categories/8/articles.json
<jheg> sorry ...
spyderman4g63 has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
<jheg> unknown regexp options - ap
Neozonz has joined #ruby
Neozonz has quit [Changing host]
Neozonz has joined #ruby
<canton7> without seeing your input, not a clue
<jhass> because there are no such regexp options
jjasonclark has joined #ruby
moritzs has quit [Remote host closed the connection]
TPBallbag is now known as JessysMom
psy_ has joined #ruby
maestrojed has quit [Quit: Textual IRC Client: www.textualapp.com]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
aspires has joined #ruby
chrishough has joined #ruby
Neozonz has quit [Read error: Connection reset by peer]
Neozonz|Disc has joined #ruby
Neozonz|Disc has joined #ruby
<jheg> thanks for the link jhass - The error was from this line …
<jheg> so is it to do with -O or wget?
i_s has joined #ruby
<jheg> or neither :)
<havenwood> jheg: that's not ruby
JessysMom is now known as HOTMILF4U
<apeiros> lol?
<jhass> yep, no ruby
Insanity133 has joined #ruby
<jheg> of course
<apeiros> "why does ruby complain about this non-ruby code?!?" well, no idea :-D
mkaesz has quit [Remote host closed the connection]
* jheg looks sheepish
HOTMILF4U is now known as TPBallbag
* jheg slowly exists irb
<jheg> exits
<jheg> ffs
<apeiros> twohlix: now on to the next problem - intercept with an "orbit" (since weapons have an optimal firing distance) :)
<apeiros> though, I'll probably not do that now. exercise for adjutant implementors too.
jheg has quit [Quit: jheg]
<apeiros> providing intercept and orbit functions should be sufficient to get started
weemsledeux has joined #ruby
weemsledeux has joined #ruby
<jhass> you game devs, I'll never get you. All wannabe mathematicians
mistermocha has joined #ruby
<apeiros> jhass: guess why I totally support my wife studying maths :-p
noop has joined #ruby
<apeiros> statistics will come in handy for balancing
manzo has quit [Ping timeout: 245 seconds]
<apeiros> too sad she's not interested in computer games. well… not yet… *cooks up plans to drag her into it*
<Fire-Dragon-DoL> are there any function to select an array of indexes of elements of an array? I need to pick index 3,7 and 10 from array
<apeiros> Fire-Dragon-DoL: values_at
<Fire-Dragon-DoL> thanks apeiros, and that's the right trick by the way :P
Insanity133 has quit [Ping timeout: 260 seconds]
Neozonz|Disc has quit [Ping timeout: 265 seconds]
geggam has joined #ruby
Neozonz has joined #ruby
TomyWork has quit [Ping timeout: 250 seconds]
jshultz has joined #ruby
lkba has joined #ruby
beneggett has joined #ruby
bigkevmcd has joined #ruby
klaut has joined #ruby
j_mcnally has joined #ruby
einarj has quit [Remote host closed the connection]
oo_ has joined #ruby
momomomomo_ has joined #ruby
jherbst has joined #ruby
akamel has joined #ruby
jaequery has joined #ruby
momomomomo has quit [Ping timeout: 265 seconds]
momomomomo_ is now known as momomomomo
Neozonz|Disc has joined #ruby
Neozonz|Disc has joined #ruby
manzo has joined #ruby
shredding has joined #ruby
patric100e99 has joined #ruby
manzo has quit [Remote host closed the connection]
zB0hs has joined #ruby
momomomomo has quit [Client Quit]
oo_ has quit [Ping timeout: 264 seconds]
Neozonz has quit [Ping timeout: 255 seconds]
treehug88 has joined #ruby
triple_b has quit [Read error: Connection reset by peer]
triple_b has joined #ruby
jfran has joined #ruby
lmickh has joined #ruby
patric100e99 has quit [Ping timeout: 245 seconds]
agrinb has joined #ruby
gsd has joined #ruby
jobewan has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
tobago has quit [Remote host closed the connection]
zachrab has joined #ruby
techsethi has joined #ruby
iwishiwerearobot has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
Neozonz|Disc has quit [Ping timeout: 255 seconds]
agrinb has quit [Ping timeout: 244 seconds]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shredding has quit [Quit: shredding]
Akuma has quit [Ping timeout: 255 seconds]
zachrab has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
mistermocha has quit [Remote host closed the connection]
dANO_ has quit []
techsethi has quit [Quit: techsethi]
Luser has quit [Ping timeout: 265 seconds]
Akuma has joined #ruby
fawefeawfewa has quit [Ping timeout: 264 seconds]
Takle has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
Morkel has quit [Quit: Morkel]
sambao21 has joined #ruby
Neozonz has joined #ruby
mwagner_ has joined #ruby
mwagner_ has quit [Client Quit]
wagster has joined #ruby
TPBallbag has quit [Remote host closed the connection]
bricker`work has joined #ruby
Fractional has joined #ruby
avril14th has joined #ruby
<Fractional> Anyone here who offers code reviews for student-level code? Please message me. It's < 1000 lines. Would be appreciated :)
olivier_bK has quit [Ping timeout: 250 seconds]
jwang__ has quit [Ping timeout: 265 seconds]
garethrees has quit [Ping timeout: 255 seconds]
Snowstormer has joined #ruby
<avril14th> Hello, how does one write a ruby regex that could turn the string 'some key is the key' into the array ['some key', ' is the key'] (when using String#match) ?
mib_mib has joined #ruby
<havenwood> Fractional: Paste a link to a Gist here in the channel?
skolman_ has joined #ruby
ghostmoth has joined #ruby
dkb20k has joined #ruby
<Fractional> Github repisotiry link: https://github.com/Freddan962/GosuPlus
<jhass> avril14th: .scan(/[^ ]+ [^ ]+/)
<Fractional> repository*
skolman_ has quit [Remote host closed the connection]
triple_b has joined #ruby
alex88 has quit []
danjordan has quit [Quit: danjordan]
beef-wellington has quit [Ping timeout: 264 seconds]
neoxquick has joined #ruby
agrinb has joined #ruby
wagster has quit [Quit: Textual IRC Client: www.textualapp.com]
skolman_ has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<avril14th> jhass: 'key' appears nowhere in the regex, how can be?
* avril14th goes trying
<jhass> oh, three words
shazaum_ has joined #ruby
<jhass> avril14th: maybe make a list with real world examples, I think your abstraction is wrong or at least confusing
Neozonz has quit [Read error: Connection reset by peer]
<havenwood> avril14th: what are the rules for where to split?
beef-wellington has joined #ruby
Neozonz has joined #ruby
Neozonz has quit [Changing host]
Neozonz has joined #ruby
<havenwood> avril14th: more examples of correct split!
Darryl_ has quit [Quit: Connection closed for inactivity]
BlackGear has quit [Ping timeout: 244 seconds]
shazaum has quit [Ping timeout: 258 seconds]
<avril14th> 'some weird sentence with weird whatever 12384786/&() things in the weird' => ['some weird',' sentence with weird',' whatever 12384786/&() things in the weird']
mib_mib has quit [Ping timeout: 244 seconds]
allcentury has quit [Ping timeout: 245 seconds]
<avril14th> split up to a given word (in above example 'weird')
<jhass> avril14th: stop the abstractions already
<shevy> that is a weird sentence
Snowstormer is now known as Paramore
lw has joined #ruby
roolo has quit [Remote host closed the connection]
<jhass> if that's your real example this sounds like homework
<jhass> in which case I only give you hints: split + lookbehind assertion
momomomomo has joined #ruby
agrinb has quit [Ping timeout: 265 seconds]
<avril14th> homewhat?
AlexRussia has quit [Quit: WeeChat 1.1-dev]
pandaant has quit [Remote host closed the connection]
pietr0 has joined #ruby
AlexRussia has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
moritzs has joined #ruby
roolo has joined #ruby
jasooon has joined #ruby
dkb20k has quit [Ping timeout: 265 seconds]
sailias has quit [Read error: Connection reset by peer]
sailias has joined #ruby
AlexRussia has quit [Client Quit]
ndrei has quit [Ping timeout: 256 seconds]
AlexRussia has joined #ruby
Hijiri has joined #ruby
<shevy> homesex
bigkevmcd has quit [Ping timeout: 255 seconds]
Neozonz has quit [Read error: Connection reset by peer]
Jake232 has joined #ruby
reisl has joined #ruby
Neozonz has joined #ruby
Neozonz has quit [Changing host]
Neozonz has joined #ruby
TPBallbag has joined #ruby
<shevy> you have come to the weird part of the internet
<shevy> welcome to #ruby!
lw has quit [Read error: Connection reset by peer]
romistrub has joined #ruby
lw has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
troyready has joined #ruby
tier has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
<romistrub> what kind of Error should I raise if a received string does not match the expected format?
Neozonz has quit [Read error: Connection reset by peer]
<romistrub> for example, if I'm validating an HTTP request, and the request is malformed
jwang__ has joined #ruby
Neozonz has joined #ruby
Neozonz has quit [Changing host]
Neozonz has joined #ruby
<avril14th> romistrub: 400 Bad Request I would do
TPBallbag has quit [Remote host closed the connection]
<romistrub> avril14th: sure, that's what I'll send, but in the code itself, should I create my own Exception class called BadRequest? and if so, which Exception should it inherit from?
<avril14th> romistrub: this is your own organization to decide
<jhass> in doubt StandardError
sailias has quit [Quit: Leaving.]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
sailias1 has joined #ruby
jasooon has quit [Ping timeout: 265 seconds]
<romistrub> hmm, ok, thanks guys
otherj has joined #ruby
<avril14th> romistrub: my way: use api-pie gem and rescue the exception it throws
<gsd> are there any tools / services that will automatically email me when either ruby or one of my gems has an updated version
ki0 has quit [Ping timeout: 250 seconds]
reisl has quit [Read error: Connection reset by peer]
<jhass> gsd: gemnasium.com
<jhass> there is at least one more but I forgot its name
renderful has quit [Remote host closed the connection]
reisl has joined #ruby
<gsd> this looks great
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tlarevo has quit [Remote host closed the connection]
tvw has quit []
tlarevo has joined #ruby
thagomizer has joined #ruby
dangerousdave has joined #ruby
emlosis has joined #ruby
klaut has quit [Remote host closed the connection]
ta has joined #ruby
<shevy> gymnasium!
<shevy> let's work out
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gsd> do you even lift bro?
<shevy> dunno
<shevy> it interferes with coding when you have heavy arms
tier has joined #ruby
<gsd> or wings as i like to call them
<shevy> hehe
mikecmpbll has quit [Ping timeout: 240 seconds]
tier has quit [Remote host closed the connection]
maestrojed has joined #ruby
oo_ has joined #ruby
Jake232 has quit [Read error: Connection reset by peer]
TPBallbag has joined #ruby
<havenwood> Fractional: You might consider using RubyGems-style file structure and namespacing. Something like: http://barkingiguana.com/2011/12/13/how-i-structure-rubygems/
treehug8_ has joined #ruby
rshetty has quit [Remote host closed the connection]
melik has joined #ruby
Gadgetoi- has joined #ruby
Gadgetoid has quit [Ping timeout: 272 seconds]
Gadgetoi- is now known as Gadgetoid
oo_ has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
reisl is now known as larissa
treehug88 has quit [Ping timeout: 265 seconds]
<Fractional> havenwood: Thank you, will look into it. Is there anything else you are thinking of?
emlosis has left #ruby ["Leaving"]
klaut has joined #ruby
<havenwood> Fractional: It's nice to have the file structure mirror the namespace. Think about what namespace your code should be in.
botwin has joined #ruby
<avril14th> and if you don't follow the structur Rails will complain if u use rails
hamakn has quit [Remote host closed the connection]
<havenwood> Fractional: Typically we require each file individually, explicitly.
jimmyhoughjr has joined #ruby
hamakn has joined #ruby
kwd has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
<wm3|busy> avril14th: you can ignore the file structure in rails... you just need to explicitly require stuff like in normal ruby... it'll complain if you let anything fall back to autoloading that isn't in the convention-based structure
poulet_a has quit [Quit: Quitte]
<wm3|busy> avril14th: i.e. it falls back to being as difficult as normal ruby, rather than not being possible ;)
chthon has quit [Ping timeout: 245 seconds]
klaut has quit [Remote host closed the connection]
<Fractional> havenwood, Ok, got it. Will re-organise file structure, follow the RubyGems-style file structure and namespacing. Is there anything else you see in the code? I appreciate all feedback :D
allcentury has joined #ruby
<havenwood> Fractional: Just in case you don't know the globbing double splat, what you're requiring in those three lines is equivalent to: Dir['lib/**/*.rb']
hmsimha has joined #ruby
centrx has joined #ruby
mtakkman has joined #ruby
<havenwood> Fractional: looking
einarj has joined #ruby
<Fractional> havenwood: Oh, that's cool!
<avril14th> wm3|busy: indeed but you may expose yourself to strange behaviors, such as ActiveSupport::Concern modules complaining about multiple loadings or simple plain autoloading of failes failing silently
<havenwood> Fractional: drop the './' prefix too
<havenwood> Fractional: also the .rb suffix
<havenwood> oh, nvm
hamakn has quit [Ping timeout: 244 seconds]
<havenwood> from the require, but not your glob
<havenwood> meh
<wm3|busy> avril14th: heh :) I don't touch ActiveSupport::Concern modules, and autoloading just doesn't engage if the constant is already present (which is why rails has always needed you to do things like load monkey-patch files in lib/ext manually)
<wm3|busy> avril14th: but yeah, it's less than ideal, and it can be awkward to work around
treehug8_ has quit [Read error: Connection reset by peer]
treehug88 has joined #ruby
aclearma_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> Fractional: If you don't need to support 1.8, which is past end-of-life, then I think 1.9-style Hash syntax when keys are Symbols is nice.
wallerdev has joined #ruby
<Fractional> havenwood, I agree with you - are you referring to the resourceloader?
josephndenton has joined #ruby
<havenwood> Fractional: so `left: body.position.x` instead of `:left => body.position.x`: https://github.com/Freddan962/GosuPlus/blob/master/lib/collision.rb#L11
DaniG2k has quit [Quit: leaving]
<Fractional> havenwood: Ok, thanks!
treehug8_ has joined #ruby
nucatus_ has quit [Remote host closed the connection]
mtakkman` has joined #ruby
<havenwood> Fractional: When lines get crazy long, with multiple parts it can be a good sign to do an extract method refactor: https://github.com/Freddan962/GosuPlus/blob/master/lib/gui/button.rb#L19
<havenwood> Fractional: *code change for the humans :)
Timgauthier has joined #ruby
Timgauthier is now known as timgauthier_away
weaksauce has joined #ruby
mattmcclure has joined #ruby
timgauthier_away is now known as Timgauthier
dkphenom has joined #ruby
treehug88 has quit [Ping timeout: 265 seconds]
francisfish has quit [Remote host closed the connection]
Takle has joined #ruby
mtakkman has quit [Ping timeout: 255 seconds]
wm3|busy is now known as workmad3
<Fractional> havenwood, good idea! :)
josephndenton has quit [Ping timeout: 265 seconds]
<Fractional> havenwood, is there a prettier way to do the active? method in button.rb?
Pupeno has joined #ruby
sepp2k has joined #ruby
<havenwood> Fractional: just keep the middle line
<havenwood> Fractional: @active can only be `nil` or `false`, and line 32 returns correctly it seems
doev has quit [Ping timeout: 260 seconds]
Hijiri has quit [Ping timeout: 265 seconds]
momomomomo has quit [Quit: momomomomo]
timonv_ has quit [Remote host closed the connection]
<havenwood> Fractional: is that what you want? ^
timonv_ has joined #ruby
<havenwood> Fractional: @active = false if @active
<Fractional> havenwood, will have to check in a moment! Working on the refactoring, thanks a lot for all the feedback ! :)
moritzs has quit [Remote host closed the connection]
dkphenom has quit [Ping timeout: 245 seconds]
timonv_ has quit [Remote host closed the connection]
Pupeno_ has quit [Ping timeout: 245 seconds]
<havenwood> Fractional: No prob.
spider-mario has joined #ruby
danman has joined #ruby
diegoviola has joined #ruby
<Fractional> havenwood, nope I wanted the state before the changed state to handle my button clicking events (in example_state.rb#update)
einarj has quit [Remote host closed the connection]
androidbruce has joined #ruby
Timgauthier has quit [Max SendQ exceeded]
<havenwood> Fractional: Ahh
tier has joined #ruby
avril14th has quit [Remote host closed the connection]
<havenwood> odd
kaspergr_ has joined #ruby
Timgauthier has joined #ruby
emmesswhy has joined #ruby
ptrrr has joined #ruby
rylev has quit [Remote host closed the connection]
tercenya_ has joined #ruby
benzrf is now known as benzrf|offline
rostam has quit [Read error: Connection reset by peer]
uxp_ has joined #ruby
Timgauthier has quit [Max SendQ exceeded]
jjasonclark has quit [Quit: jjasonclark]
jayne has quit [Read error: Connection reset by peer]
uxp has quit [Read error: Connection reset by peer]
Spami has quit [Quit: This computer has gone to sleep]
rostam has joined #ruby
klaut has joined #ruby
jimmyhoughjr has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Ping timeout: 255 seconds]
mdarby has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tercenya has quit [Ping timeout: 264 seconds]
<Fractional> havenwood, I know what I am missing - a gemfile!
<havenwood> Fractional: Seems strange to respond to `active?` by changing `@active`'s state to `false`, then return the past state which is no longer the case.
renderful has joined #ruby
<havenwood> Fractional: Gemfile ftw!
<Authenticator> Is there a way to use catch/throw (not raise/rescue) from a sub-thread?
<Fractional> havenwood, it's only going to contain one gem, but might as well go for it!
<wallerdev> no
auxbuss has joined #ruby
altamic has joined #ruby
<Fractional> havenwood, will write up documenting in my to-do list
jayne has joined #ruby
agrinb has joined #ruby
<havenwood> Fractional: Why don't you cut a gem? Use a gemspec: http://guides.rubygems.org/make-your-own-gem/
kirun has joined #ruby
<Fractional> havenwood, *rolls eyes* that looks like something 'big' boys only do :P
klaut has quit [Remote host closed the connection]
tvw has joined #ruby
<mg^> I created my own first gem recently. Wasn't so bad.
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claw_ has quit [Read error: No route to host]
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claw_ has joined #ruby
Pete_____ has quit [Remote host closed the connection]
<lsone> imo rolling a gem early in your ruby career is a really good idea.
<havenwood> Fractional: Maybe take a look at what Bundler generates with: bundle gem gosu_plus
jcdesimp has joined #ruby
jaequery has joined #ruby
<havenwood> Fractional: Just fill in the blanks.
jaequery has quit [Max SendQ exceeded]
<lsone> puts a whole new meaning to reusable code across multiple projects, even if it is only ever used by you
<Fractional> havenwood, don't have bundler installed. On Windows atm.
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
robustus is now known as robustus|Off
idoru has quit [Quit: Working as programmed]
jcdesimp has quit [Client Quit]
<havenwood> Fractional: gem install bundler
agrinb has quit [Ping timeout: 250 seconds]
<Fractional> havenwood, got it!
Gadgetoid has quit [Ping timeout: 245 seconds]
jaequery has joined #ruby
<havenwood> Fractional: but yeah, simple enough to create a gem by hand ;)
<havenwood> Fractional: a skill worth leveling up on
idoru has joined #ruby
tlarevo has quit [Read error: Connection reset by peer]
mib_mib has joined #ruby
tlarevo has joined #ruby
<Fractional> havenwood, I am confused now. It created a git repository within my already existing git repository :o
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has joined #ruby
<Fractional> havenwood, is this how things should be?
porfa has quit [Ping timeout: 244 seconds]
<havenwood> Fractional: the command creates a new directory for your new gem, it's just a presumption bundler makes
<havenwood> Fractional: you can nuke the directory it creates, it's just a template for creating a gem from scratch
<havenwood> Fractional: there're more than one ways to do it too
<havenwood> tools other than bundler, plenty of folk just do it by hand, or write their own gem generator
baroquebobcat has joined #ruby
boombadaroomba has joined #ruby
porfa has joined #ruby
jenrzzz has joined #ruby
mib_mib has quit [Ping timeout: 244 seconds]
Gadgetoid_ has joined #ruby
<Fractional> havenwood, what name does the 'nuke' command go under?
<workmad3> Fractional: 'rm -rf' on a *nix
kaspergr_ has quit [Remote host closed the connection]
<workmad3> Fractional: on windows... right click and 'delete'? :P
<Fractional> workmad3, oh, thought you had to do more. Nevermind.
allcentury has quit [Ping timeout: 265 seconds]
<workmad3> Fractional: :)
Peter__ has joined #ruby
payne__ has joined #ruby
workmad3 is now known as wm3|away
auxbuss has quit [Quit: I'm gone.]
lw has quit [Quit: s]
payne__ has quit [Read error: Connection reset by peer]
__MysT has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
centrx has quit [Ping timeout: 255 seconds]
m8 has joined #ruby
Timgauthier has joined #ruby
Gadgetoid_ is now known as Gadgetoid
Gadgetoid is now known as gadgetoid
nucatus has joined #ruby
gadgetoid is now known as Gadgetoid
rshetty has joined #ruby
<Fractional> havenwood, how do I generate the gemfiles with bundler in working directory?
rdark has quit [Quit: leaving]
JohnBat26 has joined #ruby
shredding has joined #ruby
Insanity133 has joined #ruby
moritzs has joined #ruby
klaut has joined #ruby
jasooon has joined #ruby
bMalum_ has joined #ruby
<havenwood> Fractional: copy the generated files to your working directory
icarus has joined #ruby
bMalum has quit [Ping timeout: 255 seconds]
bMalum_ is now known as bMalum
Peter__ has quit [Remote host closed the connection]
aclearman037 has joined #ruby
<havenwood> Fractional: you can check `bundle help gem` but i don't think bundler has sophisticated options, you're left to your own devices
klaut has quit [Remote host closed the connection]
<havenwood> it just has basic bootstrapping from scratch
rshetty has quit [Ping timeout: 272 seconds]
<Fractional> havenwood, oh ok thank you for the advice. Will definitely do this.
Insanity133 has quit [Ping timeout: 258 seconds]
fr1eza has joined #ruby
ubra has left #ruby [#ruby]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jasooon has quit [Ping timeout: 272 seconds]
tlarevo_ has joined #ruby
Takle has quit [Remote host closed the connection]
<Fractional> havenwood, your spotting of the odd button#active? method handling helped me solve a bug. Thank you!
altamic has quit [Quit: altamic]
<boombadaroomba> Maybe better luck here. I need help with a conditional statement. https://gist.github.com/JasonY1/b9518ccf14b5d158d026 I want it to ensure end_date is after start_date but end_date is not required to create event.
sailias has quit [Quit: Leaving.]
sailias has joined #ruby
otherj has quit [Quit: .]
kaspertidemann has joined #ruby
davispuh has joined #ruby
tlarevo has quit [Ping timeout: 244 seconds]
TPBallbag has quit [Remote host closed the connection]
Musashi007 has joined #ruby
<wallerdev> boombadaroomba: what do you need help with? whats the issue
shredding has quit [Quit: shredding]
emmesswhy has quit [Quit: This computer has gone to sleep]
tlarevo_ has quit [Ping timeout: 256 seconds]
jaequery has joined #ruby
centrx has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has quit [Max SendQ exceeded]
<boombadaroomba> wallerdev: i think i figured it out. writing the question out helped me take a step back and evaluate
<wallerdev> :)
jaequery has joined #ruby
<boombadaroomba> I always get problems solved here. Thanks!
ramfjord has quit [Ping timeout: 260 seconds]
sevvie has joined #ruby
akamel has quit [Quit: Leaving.]
owen2 has joined #ruby
tier_ has joined #ruby
mdarby has joined #ruby
chrishough has joined #ruby
Areessell has quit [Quit: (null)]
Takle has joined #ruby
tier_ has quit [Remote host closed the connection]
iwishiwerearobot has joined #ruby
tier has quit [Read error: Connection reset by peer]
jherbst has quit [Quit: Textual IRC Client: www.textualapp.com]
m8 has quit [Quit: Sto andando via]
tier has joined #ruby
m8 has joined #ruby
jjasonclark has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kaspergrubbe has joined #ruby
byprdct has quit [Ping timeout: 265 seconds]
Takle has quit [Remote host closed the connection]
ctp has joined #ruby
iwishiwerearobot has quit [Ping timeout: 260 seconds]
jaequery has joined #ruby
jaequery has quit [Max SendQ exceeded]
jaequery has joined #ruby
mdarby has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
byprdct has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fwaokda has joined #ruby
tlarevo has joined #ruby
<fwaokda> I setup ruby with rbenv, but I can't seem to figure out how to execute my ruby script. can anyone help me out?
mengu has joined #ruby
michael_mbp has quit [Excess Flood]
jaequery has quit [Client Quit]
<fwaokda> I put "#!/usr/bin/env ruby" at the begininng of the script, but running "ruby myfile.rb" doesn't work. I did "which ruby" and get "/home/username/.rbenv/shims/ruby"
<romistrub> Does Ruby infinitely loop if I do this: begin something rescue MyError raise MyError end (i.e. I'm raising the error within the rescue clause)
TPBallbag has joined #ruby
<jhass> romistrub: no
iago-x86 has left #ruby [#ruby]
<romistrub> fwaokda: what's the error output in the shell?
michael_mbp has joined #ruby
<romistrub> jhass: thx
yfeldblum has joined #ruby
<shevy> romistrub if you want looping rescues, you could use retry :)
<shevy> begin rescue retry profit! end
TPBallbag has quit [Remote host closed the connection]
<fwaokda> huh just typed it now and it works... i really don't know what has changed... :( romistrub, thanks for helping me ... figure it out?
jdj_dk has joined #ruby
bmurt has joined #ruby
lolmaus has joined #ruby
<romistrub> fwaokda: anytime :P
Areessell has joined #ruby
<romistrub> shevy: thxu but I was just trying to figure out the Exception handling behaviour
<shevy> retry!
timonv_ has joined #ruby
sailias has quit [Quit: Leaving.]
mistermocha has joined #ruby
jimmyhoughjr has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
rkalfane has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
sailias has joined #ruby
tier has quit [Remote host closed the connection]
ndrei has joined #ruby
j_mcnally has quit [Ping timeout: 255 seconds]
iamjarvo has joined #ruby
mistermocha has quit [Remote host closed the connection]
claymore has quit [Ping timeout: 265 seconds]
mtakkman` has quit [Remote host closed the connection]
chrisja has joined #ruby
lw has joined #ruby
jenrzzz has joined #ruby
patrick99e99 has joined #ruby
wm3|away has quit [Ping timeout: 244 seconds]
dkb20k has joined #ruby
michael4 has joined #ruby
claymore has joined #ruby
treehug88 has joined #ruby
timonv_ has quit [Ping timeout: 256 seconds]
<bahar_> has anyone here set up backburner or beaneater for job queuing?
xMopxShell has quit [Ping timeout: 250 seconds]
xMopxShell has joined #ruby
havenwood has quit [Remote host closed the connection]
treehug8_ has quit [Ping timeout: 255 seconds]
sk87 has joined #ruby
zwer has quit [Remote host closed the connection]
DLSteve has joined #ruby
zwer has joined #ruby
havenwood has joined #ruby
dkb20k has quit [Ping timeout: 258 seconds]
sk87 has quit [Client Quit]
St_Marx has quit [Quit: Ex-Chat]
luckyruby has joined #ruby
rylev has joined #ruby
Takle has joined #ruby
mib_mib has joined #ruby
dumdedum has quit [Quit: foo]
skolman_ has quit [Remote host closed the connection]
otherj has joined #ruby
lw has quit [Quit: s]
skolman_ has joined #ruby
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
nrsk has joined #ruby
rylev has quit [Ping timeout: 260 seconds]
kaspertidemann has quit []
mib_mib has quit [Ping timeout: 244 seconds]
timonv_ has joined #ruby
ki0 has joined #ruby
nrsk has quit [Client Quit]
corehook has joined #ruby
TPBallbag has joined #ruby
centrx has quit [Ping timeout: 250 seconds]
corehook has quit [Client Quit]
lw has joined #ruby
altamic has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lolmaus has quit [Ping timeout: 240 seconds]
ki0 has quit [Remote host closed the connection]
psyprus has quit [Ping timeout: 258 seconds]
jasooon has joined #ruby
patrick99e99 has quit [Quit: Lost terminal]
mikecmpbll has joined #ruby
omosoj has joined #ruby
ashdr0 has joined #ruby
ashdr0 has left #ruby ["Leaving"]
govg has quit [Remote host closed the connection]
jottr has joined #ruby
otherj has quit [Quit: .]
cpruitt has joined #ruby
iamjarvo has joined #ruby
decoponio has quit [Quit: Leaving...]
Hijiri has joined #ruby
jasooon has quit [Ping timeout: 245 seconds]
otherj has joined #ruby
allcentury has joined #ruby
tier has joined #ruby
jottr_ has quit [Ping timeout: 272 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
otherj has quit [Client Quit]
psyprus has joined #ruby
sevvie has quit [Ping timeout: 245 seconds]
ki0 has joined #ruby
dkphenom has joined #ruby
ptrrr has quit [Quit: ptrrr]
jtdowney has joined #ruby
josephndenton has joined #ruby
lolmaus has joined #ruby
jtdowney has quit [Max SendQ exceeded]
ptrrr has joined #ruby
jtdowney has joined #ruby
Ankhers has joined #ruby
jtdowney has quit [Max SendQ exceeded]
jjasonclark has quit [Quit: jjasonclark]
jtdowney has joined #ruby
emmesswhy has joined #ruby
jtdowney has quit [Max SendQ exceeded]
jtdowney has joined #ruby
francisfish has joined #ruby
stunder has quit [Quit: Screw you guys I'm going home]
jtdowney has quit [Max SendQ exceeded]
ki0 has quit [Remote host closed the connection]
skolman_ has quit [Remote host closed the connection]
jtdowney has joined #ruby
ConstantineXVI has quit [Remote host closed the connection]
jtdowney has quit [Max SendQ exceeded]
b1nd has quit [Ping timeout: 240 seconds]
josephndenton has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
otherj has joined #ruby
jtdowney has joined #ruby
Rapier- has joined #ruby
jtdowney has quit [Changing host]
jtdowney has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
wald0 has quit [Ping timeout: 240 seconds]
djstorm has quit [Ping timeout: 255 seconds]
<Rapier-> Anyone happen to come across ruby functionality to extract internal domain name from SMTP (NTLM AUTH) challenge response?
mengu__ has joined #ruby
Hightower666 has joined #ruby
emmesswhy has quit [Quit: Leaving]
govg has joined #ruby
tercenya_ has quit []
mengu has quit [Ping timeout: 250 seconds]
tercenya has joined #ruby
<sweeper> is there a convention documented somewhere for commands to be included with gems?
lolmaus has quit [Ping timeout: 240 seconds]
sinkensabe has quit [Remote host closed the connection]
shredding has joined #ruby
ballpointcarrot has joined #ruby
b1nd has joined #ruby
mengu__ has quit [Ping timeout: 256 seconds]
freerobby has quit [Quit: Leaving.]
Peter__ has joined #ruby
freerobby has joined #ruby
yfeldblum has joined #ruby
nateberkopec has quit [Quit: Leaving...]
timonv_ has quit [Remote host closed the connection]
nateberkopec has joined #ruby
pushpak has joined #ruby
renderful has quit [Remote host closed the connection]
Jake232 has joined #ruby
gaganjyot has joined #ruby
Neozonz has quit [Quit: Leaving]
renderful has joined #ruby
klaut has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
reinaldob has quit [Remote host closed the connection]
einarj has joined #ruby
iamjarvo has joined #ruby
centrx has joined #ruby
francisfish has quit [Remote host closed the connection]
slester has joined #ruby
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agrinb has joined #ruby
dseitz has joined #ruby
lw has quit [Quit: s]
dangerousdave has joined #ruby
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
patrick99e99 has joined #ruby
beneggett has quit [Ping timeout: 244 seconds]
beneggett has joined #ruby
rodfersou has quit [Quit: leaving]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
mattstratton has joined #ruby
klaut has quit [Ping timeout: 264 seconds]
gr33n7007h has joined #ruby
aspires has quit []
Pupeno_ has joined #ruby
agrinb has quit [Ping timeout: 244 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
chrishough has quit [Ping timeout: 255 seconds]
zorak8 has joined #ruby
jtdowney has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
otherj has quit [Quit: .]
chrishough has joined #ruby
klaut has joined #ruby
Pupeno has quit [Ping timeout: 265 seconds]
jtdowney has joined #ruby
jtdowney has quit [Max SendQ exceeded]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
noop has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
jtdowney has joined #ruby
benzrf|offline is now known as benzrf
jtdowney has quit [Client Quit]
chrishough has quit [Client Quit]
chrishough has joined #ruby
t_mmyv has quit [Quit: Textual IRC Client: www.textualapp.com]
benzrf is now known as benzrf|offline
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TPBallbag has quit [Remote host closed the connection]
mikeg has joined #ruby
TPBallbag has joined #ruby
ConstantineXVI has joined #ruby
siwica1 has joined #ruby
IrishGringo has quit [Ping timeout: 258 seconds]
arup_r has quit [Quit: Leaving.]
timonv_ has joined #ruby
siwica has quit [Ping timeout: 256 seconds]
jheg has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benzrf|offline is now known as benzrf
rshetty has joined #ruby
benzrf is now known as benzrf|offline
skolman has joined #ruby
dangerousdave has joined #ruby
timonv_ has quit [Ping timeout: 264 seconds]
mib_mib has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Bounga has quit [Quit: Bounga]
bgamari has joined #ruby
<bgamari> How does one get rake to start a subprocess with a modified environment?
triple_b has joined #ruby
rshetty has quit [Ping timeout: 256 seconds]
naftilos76 has joined #ruby
iamjarvo has joined #ruby
tlarevo has quit [Remote host closed the connection]
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #ruby
skolman has quit [Ping timeout: 255 seconds]
tlarevo has joined #ruby
ldnunes has quit [Quit: Leaving]
ballpointcarrot has quit [Ping timeout: 255 seconds]
postmodern has quit [Quit: Leaving]
triple_b has quit [Client Quit]
dangerousdave has quit [Client Quit]
livingstn has quit []
dangerousdave has joined #ruby
ctp has joined #ruby
mib_mib has quit [Ping timeout: 244 seconds]
Peter__ has quit [Remote host closed the connection]
t_mmyv has joined #ruby
Blizzy has quit [Ping timeout: 250 seconds]
Xiti` has joined #ruby
g0bl1n has quit [Quit: g0bl1n]
failshell has joined #ruby
lw has joined #ruby
lw has quit [Max SendQ exceeded]
jtdowney has joined #ruby
aspires has joined #ruby
lw has joined #ruby
jtdowney has quit [Max SendQ exceeded]
danman has quit [Quit: danman]
jtdowney has joined #ruby
jaequery has joined #ruby
jtdowney has quit [Max SendQ exceeded]
<shevy> so I am wondering why I created a clas
<shevy> *class
<shevy> when I instead should have simply kept on using a module instead
jtdowney has joined #ruby
Xiti has quit [Ping timeout: 258 seconds]
jtdowney has quit [Max SendQ exceeded]
larissa has quit [Quit: Leaving]
jtdowney has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
jtdowney has quit [Max SendQ exceeded]
mdarby has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hightower666 has quit [Ping timeout: 255 seconds]
jasooon has joined #ruby
snath has left #ruby ["Leaving"]
JohnBat26 has quit [Remote host closed the connection]
jtdowney has joined #ruby
mdarby has quit [Client Quit]
TPBallbag has quit [Remote host closed the connection]
jtdowney has quit [Max SendQ exceeded]
<centrx> shevy, it's okay, Class inherits from Module, so it's still a module
blueOxigen has quit [Ping timeout: 250 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
tlarevo has quit [Ping timeout: 244 seconds]
<ddv> shevy, I use modules when I want to share behaviour between classes
jtdowney has joined #ruby
<shevy> ddv but you could subclass
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
b1nd has quit [Ping timeout: 255 seconds]
jtdowney has quit [Max SendQ exceeded]
shredding has quit [Quit: shredding]
shazaum_ has quit [Quit: Leaving]
jtdowney has joined #ruby
dangerousdave has joined #ruby
spyderma_ has joined #ruby
jtdowney has quit [Max SendQ exceeded]
spyderman4g63 has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
jtdowney has joined #ruby
jtdowney has quit [Max SendQ exceeded]
jasooon has quit [Ping timeout: 245 seconds]
jtdowney has joined #ruby
triple_b has joined #ruby
jtdowney has quit [Max SendQ exceeded]
Craft___ has joined #ruby
mdarby has joined #ruby
jtdowney has joined #ruby
mdarby has quit [Client Quit]
<romistrub> allo
<romistrub> recommended ruby testing framework?
jtdowney has quit [Max SendQ exceeded]
<romistrub> looking at you, jhass :P
jtdowney has joined #ruby
jtdowney has quit [Changing host]
jtdowney has joined #ruby
<jhass> rspec 3 :P
bluenemo has joined #ruby
<jhass> I guess most here are minitest'ers
MattB2 has quit [Remote host closed the connection]
ballpointcarrot has joined #ruby
psyprus has quit [Read error: Connection reset by peer]
psyprus has joined #ruby
<centrx> romistrub, minitest is simpler than rspec, rspec is more advanced
charliesome has joined #ruby
<romistrub> thanks guys :)
francisfish has joined #ruby
quikole has joined #ruby
<romistrub> any of yall have experience with yaml?
it0a has quit [Quit: WeeChat 1.0.1]
shredding has joined #ruby
<jhass> don't ask meta questions
<shevy> romistrub yaml is easy: YAML.load_file('foo.yml')
<centrx> What is a what is a meta question?
<romistrub> hahaha
<jhass> I said don't!
<tobiasvl> I'm So Meta, Even This Acronym
<shevy> programming is so meta
<shevy> and quikole is spamming
Xeago has joined #ruby
<havenwood> YAML::Store, YAML::DBM, we're crawling in YAML
momomomomo has joined #ruby
govg has quit [Remote host closed the connection]
<havenwood> err, swimming in YAML
sigurding has joined #ruby
b1nd has joined #ruby
sinkensabe has joined #ruby
<porfa> From a number of strings puts gives me, how do i extract the one that contains *FR* ?
Xeago_ has joined #ruby
<jhass> puts returns nil
<shevy> porfa go get your string, then .grep on it
skolman_ has joined #ruby
<shevy> or .scan
<shevy> or .select!
<porfa> ok, i know how to use grep, but how do i call grep form whitin ruby? the same way i call .tr ?
<shevy> yes
<havenwood> >> ['nope', 'nada', 'yupFRindeed', 'anotherFR'].grep /FR/
<eval-in__> havenwood => ["yupFRindeed", "anotherFR"] (https://eval.in/217985)
<jhass> shevy: stop guessing and admit you have no idea what his data structure is either
<shevy> jhass I am not guess, I am providing guides
<jhass> porfa: you told us nothing about your datastructure, we can only guess stuff
Timgauthier is now known as timgauthier_away
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<porfa> jhass: im very sorry, i always forget or ahve little knowledge on that, im new to programing and ruby is my first ever attemp to program, im really really ?high? level rightnow
<porfa> ??
jenrzzz has joined #ruby
naftilos76 has quit [Remote host closed the connection]
<jhass> porfa: Please share your code on https://gist.github.com
josephndenton has joined #ruby
Xeago has quit [Ping timeout: 272 seconds]
<porfa> i am trying to get only the link that containts FR from ?temp = doc.xpath('//*[(@id = "Downloads")]//article ').collect {|node| node.text.strip}'
<porfa> so i will just grep the output, because atm is the only way i know how
agrinb has joined #ruby
MattB2 has joined #ruby
sinkensabe has quit [Ping timeout: 272 seconds]
ssarah has quit [Ping timeout: 250 seconds]
<jhass> so you got an Array (collect or its shorter alias map return one)
<jhass> Array got a methods Array#grep
<jhass> havenwood demonstrated its usage above
mikeg has quit [Remote host closed the connection]
ghostmoth has quit [Quit: ghostmoth]
<jhass> or you can probably extend to xpath to match it
maasha has joined #ruby
<jhass> [contains(text(), 'FR')] or something
bMalum has quit [Quit: bMalum]
dkb20k has joined #ruby
<havenwood> or check #include? 'FR' when mapping then #compact
_maes_ has joined #ruby
<havenwood> when collecting* >.>
josephndenton has quit [Ping timeout: 265 seconds]
agrinb has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby
* jhass is still a .select.map'per
Peter__ has joined #ruby
moritzs has quit [Remote host closed the connection]
rbrs has quit [Remote host closed the connection]
siwica1 has quit [Remote host closed the connection]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
altamic has quit [Quit: altamic]
siwica has joined #ruby
Craft___ has quit [Quit: Craft___]
jtdowney has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
einarj has quit [Remote host closed the connection]
dkb20k has quit [Ping timeout: 250 seconds]
timonv_ has joined #ruby
owen2 has quit [Ping timeout: 265 seconds]
Peter__ has quit [Read error: Connection reset by peer]
Pete_____ has joined #ruby
siwica has quit [Remote host closed the connection]
Insanity133 has joined #ruby
siwica1 has joined #ruby
spider-mario has quit [Ping timeout: 255 seconds]
m4rCsi has quit [Remote host closed the connection]
ejfinneran has joined #ruby
charliesome has quit [Quit: zzz]
Peter__ has joined #ruby
Pete_____ has quit [Ping timeout: 258 seconds]
Marfi_ has joined #ruby
b1nd has quit [Ping timeout: 260 seconds]
Insanity133 has quit [Ping timeout: 258 seconds]
benzrf|offline is now known as benzrf
b1nd has joined #ruby
Peter__ has quit [Client Quit]
kaspertidemann has joined #ruby
mkaesz has joined #ruby
ejfinneran has quit [Client Quit]
<rpag> .map is nicer cuz less characters to type
naftilos76 has joined #ruby
stunder has joined #ruby
sigurding has quit [Quit: sigurding]
<shevy> yes
_djbkd has joined #ruby
<shevy> the .collect-ers must die
<naftilos76> Has anybody used ruby to connect to a mail server? I am connected as we speak but i can only access root messages (inside inbox). How can i access subfolders?
PNDPO has joined #ruby
<tobiasvl> what gem is that?
<kyle__> But I like .collect
pietr0 has quit [Quit: pietr0]
<jhass> and what protocol?
mike32 has joined #ruby
<jhass> kyle__: that goes away
timonv_ has quit [Remote host closed the connection]
<rpag> i think the stdlib has Net::IMAP and Net::POP
<kyle__> Noooooooooo
<kyle__> jhass: Which version does it go away in?
<jhass> I mean the feeling
<kyle__> Ahh.
Peter__ has joined #ruby
ghostmoth has joined #ruby
<rpag> kyle__, think of the hard drive space you end up wasting! :P
Peter__ has left #ruby [#ruby]
nucatus has quit []
renderful has quit [Remote host closed the connection]
kamil has quit [Quit: Linkinus - http://linkinus.com]
bMalum has joined #ruby
<jhass> naftilos76: if you want any help you need to answer the follow up questions
b1nd has quit [Ping timeout: 264 seconds]
robustus|Off has quit [Ping timeout: 255 seconds]
<jhass> apeiros: quikole spams
x1337807x has joined #ruby
st1gma1 has quit [Read error: Connection reset by peer]
mib_mib has joined #ruby
b1nd has joined #ruby
<apeiros> jhass: go ahead :)
quikole was banned on #ruby by jhass [*!~quikole@213.143.61.89]
<naftilos76> jhass: what would those be?
quikole was kicked from #ruby by jhass [quikole]
yetanotherdave has joined #ruby
vectra has quit [Ping timeout: 272 seconds]
gsd has joined #ruby
<jhass> apeiros: thanks. You know I had no problem to make this more permanent :P
<apeiros> naftilos76: "22:10 tobiasvl: what gem is that?" for example
<kyle__> I think it's imap.select, and in the terms of that library you're looking at a "box" not a folder.
<kyle__> I think.
m4rCsi has joined #ruby
<kyle__> Whoever it was asking about the imap library
shredding has quit [Quit: shredding]
ballpointcarrot has quit [Ping timeout: 255 seconds]
<apeiros> jhass: hm? freenode irc doesn't let you add channel access flags just because you're op
robustus has joined #ruby
<naftilos76> sorry, i thought it was irrelevant to my question
<jhass> apeiros: mmh, I always forget that
xanderwebs has joined #ruby
<apeiros> naftilos76: also "22:10 jhass: and what protocol?"
_djbkd has quit [Remote host closed the connection]
<banisterfiend> xanderwebs sup civilian
<naftilos76> i am using 'net/pop' gem
<xanderwebs> sup banisterfiend
lw has quit [Quit: s]
<banisterfiend> not a lot, just meditating on my immense ruby knowledge and feeling k00
Rapier- has quit [Ping timeout: 265 seconds]
claymore has quit [Read error: Connection reset by peer]
<rpag> lol
<apeiros> *sob*, I always forget how atan2 works, even though it is trivially simple :-|
Marfi_ has left #ruby ["Wychodzi"]
<naftilos76> i connected to my email server but all i had in hand was : pop.emails (array) and with each array element i could do element.pop to get the full body of the message
mib_mib has quit [Ping timeout: 244 seconds]
byprdct has quit []
<xanderwebs> sup rpag
<naftilos76> I did not see any methods that let me access subfolders in my inbox (see http://ruby-doc.org/stdlib-1.8.7/libdoc/net/pop/rdoc/Net/POP.html)
<jhass> why do you use the 1.8.7 docs?
Fractional has quit [Read error: Connection reset by peer]
<naftilos76> because i use ruby 1.8.7
<naftilos76> :)
<jhass> but that's very old and out of support
<rpag> ello xanderwebs
maasha has quit [Quit: Page closed]
<naftilos76> well i find it fine for my needs and besides i cannot just delete everything and go to ruby 2
<naftilos76> that takes time and time is not something i have right now
<jhass> well, I have no time to learn 8 years old ruby
<naftilos76> sorry man
<naftilos76> np
<naftilos76> the ruby 2 page doesn't give any info about accessing subfolders either, so it is of no use
ndrei has joined #ruby
<jhass> I'm using IMAP since 6 years, so my memory is not good, but does pop even have a concept of mailboxes?
<naftilos76> 1.8.7 and 2.0 are identical
mike32 has quit [Quit: Leaving]
iamjarvo has joined #ruby
<naftilos76> well, you could have pointed that out a little earlier man
rylev has joined #ruby
<naftilos76> that is my mistake
<naftilos76> thanks
Pupeno has joined #ruby
Pupeno has joined #ruby
<jhass> mmh, RFC seems to indicate you can choose one in the APOP authentication
speakingcode is now known as bgswanson
<jhass> but that might be server implementation dependent
<naftilos76> i am reading the imap page which seems to be fine for my case
speaking1ode has joined #ruby
rkalfane has joined #ruby
speaking1ode is now known as vongrippen
_djbkd has joined #ruby
Pupeno_ has quit [Ping timeout: 265 seconds]
kiki_lamb has quit [Ping timeout: 260 seconds]
jasooon has joined #ruby
kiki_lamb has joined #ruby
aspires has quit []
sambao21 has joined #ruby
jheg has quit [Quit: jheg]
kaspertidemann has quit [Ping timeout: 258 seconds]
botwin has quit [Quit: Leaving]
cibs has quit [Ping timeout: 272 seconds]
vongrippen has quit [Quit: leaving]
jtdowney has joined #ruby
bgswanson is now known as speakingcode
jtdowney has quit [Max SendQ exceeded]
cibs has joined #ruby
jtdowney has joined #ruby
jasooon has quit [Ping timeout: 265 seconds]
ctp has joined #ruby
jtdowney has quit [Max SendQ exceeded]
ballpointcarrot has joined #ruby
jtdowney has joined #ruby
bMalum has quit [Quit: bMalum]
jtdowney has quit [Client Quit]
Macaveli has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ki0 has joined #ruby
Xeago_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
malcolmva has quit [Quit: Leaving]
iamjarvo has joined #ruby
chrishough has quit [Ping timeout: 255 seconds]
malcolmva has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
andrewlio has quit [Quit: Leaving.]
byprdct_ has joined #ruby
einarj has joined #ruby
russt has joined #ruby
chrishough has joined #ruby
ki0 has quit [Ping timeout: 250 seconds]
bMalum has joined #ruby
agrinb has joined #ruby
pietr0 has joined #ruby
hamakn has quit [Ping timeout: 250 seconds]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bMalum has quit [Client Quit]
davasaurous has joined #ruby
bMalum has joined #ruby
beneggett has joined #ruby
tier_ has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
baroquebobcat has joined #ruby
agrinb has quit [Ping timeout: 272 seconds]
b1nd has quit [Ping timeout: 272 seconds]
danman has joined #ruby
renderful has joined #ruby
bluenemo has quit [Quit: Verlassend]
tier_ has quit [Remote host closed the connection]
bmurt has quit []
tier has quit [Ping timeout: 265 seconds]
tier has joined #ruby
WhereIsMySpoon_ is now known as WhereIsMySpoon
WhereIsMySpoon has quit [Changing host]
WhereIsMySpoon has joined #ruby
Paradox has quit [Ping timeout: 272 seconds]
geggam has quit [Remote host closed the connection]
paulfm has quit []
<porfa> what am i doing wrong? i have ?temp? and i want to grep the line that has ?producto? in wtv ?temp? contains, so temp.grep(/producto/) right?
mattstratton has quit [Ping timeout: 272 seconds]
Paradox has joined #ruby
benzrf is now known as benzrf|offline
mattstratton has joined #ruby
tier has quit [Remote host closed the connection]
<rpag> porfa, it's a single element array, temp[0].each_line.grep(/Producto.pdf/) may work
vsipuli has joined #ruby
b1nd has joined #ruby
<rpag> tested here and seems to work fine
slester has quit [Remote host closed the connection]
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lw has joined #ruby
Pete_____ has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspires has joined #ruby
PNDPO_ has joined #ruby
JohnBat26 has joined #ruby
rshetty has joined #ruby
PNDPO has quit [Ping timeout: 256 seconds]
aspires has quit [Client Quit]
yfeldblum has quit [Ping timeout: 265 seconds]
jheg has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
bluenemo has joined #ruby
beneggett has joined #ruby
owen2 has joined #ruby
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
davispuh has quit [Ping timeout: 250 seconds]
aaronrl has joined #ruby
rshetty has quit [Ping timeout: 265 seconds]
aspires has joined #ruby
davispuh has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jheg> my gfs brother has kindly offered to buy me a ruby book for my birthday - any recommendations?
St_Marx has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jheg> for a beginner
elaptics is now known as elaptics`away
<jheg> I already have Programming Ruby 1.9 & 2.0
<rpag> The Ruby Programming Language, but it might be a bit dated by now
<jheg> ah thanks will check it out
ConstantineXVI has quit [Quit: Leaving...]
aaronrl_ has quit [Ping timeout: 255 seconds]
<rpag> it's co-authored by the creator of ruby
<jheg> That’s the thing with books I suppose - things move so fast
<rpag> yeah
<jheg> ah OK cool
<rpag> especially ruby
<rpag> it was written in the 1.9 days but 2.0 has quite a few new features that won't be covered
atomical has joined #ruby
<rpag> if you know 1.9 ruby, it's a good start :)
ctp has joined #ruby
<jhass> jheg: maybe Design patterns in ruby for a generally useful intermediate topic, just don't take the code samples too seriously
<jheg> thanks i’m very new to programming full stop so its mainly the fundamentals I’m looking to get a good grounding on
chrishough has joined #ruby
<jheg> ah cheers jhass will check that out too
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshel_ has joined #ruby
josephndenton has joined #ruby
einarj has quit [Remote host closed the connection]
amigo99 has joined #ruby
b1nd has quit [Ping timeout: 255 seconds]
StephenA1 has joined #ruby
davasaurous has quit [Remote host closed the connection]
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
Ankhers has quit [Ping timeout: 250 seconds]
failshell has quit [Ping timeout: 258 seconds]
<jheg> thanks for the tips guys, night o/
jheg has quit [Quit: jheg]
failshel_ has quit [Ping timeout: 240 seconds]
anothersmith has joined #ruby
mib_mib has joined #ruby
gagan has joined #ruby
jimbach has quit [Remote host closed the connection]
StephenA1 has quit [Client Quit]
x1337807x has joined #ruby
klaas has quit [Quit: ZNC - http://znc.sourceforge.net]
charliesome has joined #ruby
Pete_____ has quit []
PNDPO_ has quit [Quit: Leaving...]
gagan has quit [Read error: Connection reset by peer]
gaganjyot has quit [Quit: Leaving]
benzrf|offline is now known as benzrf
davasaurous has joined #ruby
codecop has quit [Remote host closed the connection]
omosoj has quit [Ping timeout: 272 seconds]
mib_mib has quit [Ping timeout: 244 seconds]
rylev has quit []
b1nd has joined #ruby
ptrrr has quit [Quit: ptrrr]
omosoj has joined #ruby
siwica1 has quit [Remote host closed the connection]
iwishiwerearobot has joined #ruby
max96at is now known as max96at|off
dkphenom has joined #ruby
davidhq has joined #ruby
jdj_dk has quit [Remote host closed the connection]
siwica has joined #ruby
akamel has joined #ruby
davidhq has quit [Client Quit]
gr33n7007h has quit [Remote host closed the connection]
tskogberg has quit [Remote host closed the connection]
tskogberg has joined #ruby
Pupeno_ has joined #ruby
Areessell has quit [Quit: (null)]
allcentury has quit [Ping timeout: 244 seconds]
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
<Lewix> damn it's cold
iwishiwerearobot has quit [Ping timeout: 260 seconds]
Pupeno has quit [Ping timeout: 245 seconds]
mkaesz has quit [Remote host closed the connection]
vifino has quit [Quit: Oh, what does this button do?]
hephaestus_rg has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claw_ has quit [Remote host closed the connection]
jasooon has joined #ruby
b1nd has quit [Ping timeout: 272 seconds]
mkaesz has joined #ruby
mkaesz has quit [Remote host closed the connection]
Joufflu has joined #ruby
_lexjm has joined #ruby
lele has quit [Quit: Coyote finally caught me]
geggam has joined #ruby
kotk_ has joined #ruby
d4nku has joined #ruby
<bricker`work> Yeah if you're a sucker and live anywhere except Southern California
<porfa> rpag: thank you!
<bricker`work> where it is currently a nice 85 degrees
lele has joined #ruby
kotk has quit [Ping timeout: 265 seconds]
b1nd has joined #ruby
Joufflu_ has joined #ruby
godd2 has joined #ruby
jasooon has quit [Ping timeout: 260 seconds]
omosoj has quit [Quit: leaving]
yetanotherdave has quit [Ping timeout: 258 seconds]
vsipuli has quit []
Joufflu_ has quit [Client Quit]
hmsimha has quit [Ping timeout: 255 seconds]
agrinb has joined #ruby
adriancb has quit [Ping timeout: 255 seconds]
adriancb has joined #ruby
Soliah has joined #ruby
davidhq has joined #ruby
bluenemo has quit [Quit: Verlassend]
davidhq has quit [Client Quit]
Soliah has quit [Client Quit]
skolman_ has quit [Remote host closed the connection]
hephaestus_rg has quit [Quit: Lost terminal]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<atmosx> heh
<atmosx> sup sup
dkb20k has joined #ruby
agrinb has quit [Ping timeout: 265 seconds]
naftilos76 has quit [Remote host closed the connection]
jaequery has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
kirun has quit [Quit: Client exiting]
yfeldblum has joined #ruby
momomomomo has quit [Quit: momomomomo]
momomomomo has joined #ruby
b1nd has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
dkb20k has quit [Ping timeout: 250 seconds]
beef-wellington has quit [Ping timeout: 250 seconds]
balazs has quit [Ping timeout: 258 seconds]
Insanity133 has joined #ruby
danman has quit [Quit: danman]
Xeago_ has joined #ruby
mikeg has joined #ruby
allcentury has joined #ruby
Rapier- has joined #ruby
Drakevr has quit [Ping timeout: 245 seconds]
jdj_dk has joined #ruby
hmsimha has joined #ruby
Xeago has quit [Ping timeout: 250 seconds]
Insanity133 has quit [Ping timeout: 244 seconds]
ballpointcarrot has quit [Ping timeout: 255 seconds]
jerius has quit [Ping timeout: 258 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
b1nd has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
allcentury has quit [Ping timeout: 265 seconds]
Drakevr has joined #ruby
msmith_ has quit [Remote host closed the connection]
jdj_dk has quit [Ping timeout: 256 seconds]
m8 has quit [Quit: Sto andando via]
razieliyo has joined #ruby
razieliyo has joined #ruby
spyderma_ has quit [Remote host closed the connection]
Lewix has quit [Read error: Connection reset by peer]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has quit []
Lewix has joined #ruby
dangerousdave has joined #ruby
b1nd has quit [Ping timeout: 265 seconds]
badhatter has quit [Read error: Connection reset by peer]
sailias has quit [Quit: Leaving.]
vifino has joined #ruby
badhatter has joined #ruby
badhatter has joined #ruby
diegoviola has quit [Quit: WeeChat 1.0.1]
troyready has quit [Quit: Leaving]
b1nd has joined #ruby
<melik> hi there everyone; im looking for a ruby library that will return an array of an Apache/Nginx directory listing
<melik> does such a thing exist?
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
dangerousdave has quit [Quit: Textual IRC Client: www.textualapp.com]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yetanotherdave has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has joined #ruby
it0a has joined #ruby
zorak8 has quit [Quit: Leaving]
Musashi007 has quit [Quit: Musashi007]
<jhass> should be fairly easy to parse with Nokogiri if not
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblu_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 272 seconds]
skolman has joined #ruby
skolman has quit [Remote host closed the connection]
skolman_ has joined #ruby
amigo99 has quit [Ping timeout: 258 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
enebo has quit [Quit: enebo]
mary5030 has quit [Remote host closed the connection]
mib_mib has joined #ruby
dorei has joined #ruby
Meeh has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
x1337807x has quit [Client Quit]
jaequery has joined #ruby
Meeh has joined #ruby
treehug88 has quit []
axl_ has quit [Quit: axl_]
jtdowney has joined #ruby
mib_mib has quit [Ping timeout: 250 seconds]
Pupeno has joined #ruby
Pupeno has joined #ruby
icole has joined #ruby
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
jdj_dk has joined #ruby
Pupeno_ has quit [Ping timeout: 265 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
_maes_ has quit [Ping timeout: 244 seconds]
chrisja has quit [Quit: leaving]
mkaesz has joined #ruby
jasooon has joined #ruby
agrinb has joined #ruby
jtdowney has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
g0bl1n has joined #ruby
JaMz- has joined #ruby
fr1eza has quit []
razieliyo has quit [Quit: Saliendo]
mkaesz has quit [Ping timeout: 255 seconds]
JaMz- has left #ruby [#ruby]
jasooon has quit [Ping timeout: 255 seconds]
<porfa> i want to replace every ?, in specs with ?\n?? so, specs2 = "#{specs}".tr(??,?,?\n ??)
agrinb has quit [Ping timeout: 272 seconds]
<porfa> wron encondings, sorry
jobewan has quit [Quit: Leaving]
boombadaroomba has quit [Remote host closed the connection]
aspires has quit []
danman has joined #ruby
JaMz has joined #ruby
Takle has quit [Remote host closed the connection]
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
<porfa> ok, i want to replace every Ñ Ò, Ñin specs with Ñ \n¥ Ñ so specs2 = Ò#{specs}.tr(ÔÒ,Õ , Ô\n¥Õ)
renderful has quit [Remote host closed the connection]
<porfa> whats wrong with that synthax? itÕs replacing ALL of the , instead of only Ò,
anothersmith has quit [Remote host closed the connection]
jaequery has joined #ruby
jaequery has quit [Client Quit]
emmesswhy has joined #ruby
jaequery has joined #ruby
bigmac has joined #ruby
<jaequery> anyone know of a good lightweight orm , possibly for sql w/ bind params that supports postgres hstore?
wm3|away has joined #ruby
<jhass> porfa: how about adding some "quotes"?
<toretore> how about using a proper charset
<toretore> UTF8 UTF 8 UTF*
pen has quit [Read error: Connection reset by peer]
eyckelboom has joined #ruby
pen has joined #ruby
DLSteve has quit [Quit: Leaving]
rshetty has joined #ruby
Takle has joined #ruby
havenwood has joined #ruby
<porfa> jhass: doesnÕt seem to work :(
toretore has quit [Quit: This computer has gone to sleep]
<jhass> I guess your charset is still wrong then
aspires has joined #ruby
<porfa> how do you know my charset is wrong,? and where, here on the irc or on the terminal? i dont know hwo to change it :(
<porfa> argh
<porfa> ok
<porfa> thank you i see it just fin ehere
<jhass> make sure your client sends utf-8
<porfa> i’ve just choosen “encoding” utf-8 in my irc client…is everything ok? quotes —> “
tokik has joined #ruby
yfeldblu_ has quit [Ping timeout: 272 seconds]
<porfa> exclamation mark —> ? singles quotes —> ‘
siaw has joined #ruby
mattstratton has joined #ruby
<jhass> the exclamation mark is still weird
<jhass> the quotes are quotes but not the ascii variants
<dorei> it showed a question mark
rshetty has quit [Ping timeout: 245 seconds]
<porfa> it’s “utf-8” i need to change my irc client… im so sorry about this, i’ve been flooding the channel with help requests when i cant even paste right
<porfa> im sorry it was meant to be question mark —> ? exclamation mark = !
<siaw> hi can someone rewrite this in a different way for me? https://eval.in/218016
<jhass> siaw: why, what's wrong with it?
bMalum has quit [Quit: bMalum]
<siaw> nothing i just want like a different way to write it
<siaw> :)
<jhass> why?
bMalum has joined #ruby
<siaw> because i want to see how someone else thinks :)
User458764 has joined #ruby
<jhass> I'd write it that way exactly
bMalum has quit [Client Quit]
robustus is now known as robustus|Off
g0bl1n has quit [Quit: g0bl1n]
<WhereIsMySpoon> i dont even remember what &: does
<WhereIsMySpoon> or :+
<WhereIsMySpoon> well :+ is a symbol for add i guess
<porfa> new try…. i want to replace every — “, —in specs with — \newline+bulletpointchar• — so specs2 = “#{specs}.tr(‘“,’ , ‘\n•’) is taking all my commas not the quotation+comma
akamel has quit [Quit: Leaving.]
<crome> not sure about the full context but activesupport has #sum
<siaw> well i ask cause learning ruby i realised that i write some code that does one thing and another person write another code that does the same thing but in a different way so i wanted to see how someone would write it
Sgeo_ has joined #ruby
<WhereIsMySpoon> porfa: if im understanding correctly, did u try to escape the quotation marks?
KC9YDN has quit [Remote host closed the connection]
<jhass> porfa: the quotes are still the typographically correct ones, not " and ' like ruby expects them, so it's still a bit hard to follow
<jhass> but note that '\n' == "\\n"
brendenb has quit [Max SendQ exceeded]
brendenb has joined #ruby
momomomomo has quit [Quit: momomomomo]
Sgeo has quit [Ping timeout: 258 seconds]
boombadaroomba has joined #ruby