apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
<bean> typically you would create a getter and a setter.
<bean> or there is some built in language magic for that, too ;)
emocakes has quit [Quit: emocakes]
<bean> (attr_accessor)
xerxas has joined #ruby
generali_ has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
xaq has joined #ruby
atmosx has quit [Quit: And so the story goes…]
lectrick has joined #ruby
Layke has joined #ruby
picca___ has joined #ruby
rburton- has quit [Quit: Leaving...]
jlast has joined #ruby
jlast has quit [Remote host closed the connection]
Sicp has quit [Quit: Leaving]
statarb3 has quit [Ping timeout: 256 seconds]
zeroeth has joined #ruby
picca__ has quit [Ping timeout: 260 seconds]
d34th4ck3r has quit [Quit: Konversation terminated!]
thejefflarson_ has joined #ruby
emocakes has joined #ruby
picca___ has left #ruby [#ruby]
tomsthumb has quit [Quit: Leaving.]
Guedes has quit [Read error: Connection reset by peer]
tvw has quit []
twoism has quit [Remote host closed the connection]
soulcake has joined #ruby
JuniorSantosHQ has joined #ruby
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
ToApolytoXaos has quit [Quit: Leaving]
Davey has joined #ruby
huoxito has joined #ruby
d2dchat has joined #ruby
zack has quit [Quit: zack]
mercwithamouth has quit [Read error: Operation timed out]
<peteyg> What's Ruby 1.8.7's alternative/equivalent to URI::encode_www_form?
TheFuzzball has quit [Quit: Leaving...]
wmoxam has joined #ruby
hogeo has joined #ruby
geggam has joined #ruby
eliasp has quit [Read error: Operation timed out]
<amh345> bean: amh345, you just want them returned when you call Test2.method2? < yeah basically. the idea here is i have a cron that triggers a method that triggers another class method which uploads the file. but i'd like to get some information on that file passed back. like size etc etc.
<amh345> so i'd like to send back some information to Class1 method1 containing file size and file name /etc
eliasp has joined #ruby
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Remote host closed the connection]
<bean> you'd probably just want some instance variables, and make them accessible with attr_accessible.
<bean> thats the more object oriented way of doing it
<amh345> ok. so i'd have attr_accessible :file_size and then @file_size = file.size in the second class method. but how to i call that file_size from class1? it is as simple as Class2.file_size?
nomenkun has joined #ruby
idkazuma has quit [Remote host closed the connection]
mockra has joined #ruby
tomsthumb has joined #ruby
tomsthumb has quit [Client Quit]
rhys has joined #ruby
Heero has joined #ruby
yshh_ has quit [Remote host closed the connection]
apok has joined #ruby
<rhys> sysadmin learning to code. I need to make 5 of a bunch of stuff, 5 user hashes, 5 methods, 5 function calls. is there an accepted way i should google to do such things?
adkron_ has joined #ruby
mockra has quit [Remote host closed the connection]
Spaceghost|cloud has joined #ruby
<rhys> listing them works for me, but i'm curious if theres a good convention on doing it. use a range.each do blah end ?
<bean> amh345, I wouldn't use a class method for that, i'd use an instance method. So if you have a class that is MyFile, it'd have instance attr_accessible :file_size, and then in the initialize you'd set @file_size = file.size
<bean> and then for each file you'd make, file = MyFile.new(size)
<bean> then you'd have file.file_size
mercwithamouth has joined #ruby
brianherman has joined #ruby
<bean> >> 5.times {}
<eval-in> bean => 5 (http://eval.in/14116)
c0rn_ has joined #ruby
<bean> >> 5.times {|i| puts i}
<eval-in> bean => 0 ... (http://eval.in/14117)
nomenkun has quit [Ping timeout: 258 seconds]
notbrent has joined #ruby
<bean> rhys, 5.times do |my_number| something my_number end
<waxjar> times takes a block without arguments
<amh345> bean, ok i think i get it. not 100% certain on file.file_size (i can't call that from Class1, i dont believe). but you've given me more than enough info! much appreciated.
<waxjar> 1..5.each { |x| a }
<bean> waxjar, touche, I forgot about that
JuniorSantosHQ has quit [Ping timeout: 258 seconds]
idkazuma has joined #ruby
<bean> amh345, one sec, i'll draw you up a thing here quick.
<rhys> bean, thought so. thanks.
<waxjar> well wrapped in parenthesis i guess
<rhys> bean, is it possible that "something" can be a method declaration?
<waxjar> 1.upto(5).each { |x| a } is a little sexier, maybe
<havenwood> waxjar: No need for the #each.
jdunck has joined #ruby
<waxjar> oh wow, really?
hakunin has quit [Ping timeout: 256 seconds]
<havenwood> waxjar: Yup: 1.upto 5 do
hiyakashi has joined #ruby
<waxjar> ruby :3
<havenwood> waxjar: On a range you need each, on an enum it knows! :D
hakunin has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
<waxjar> ah yeah, makes sense
<havenwood> waxjar: Does make it nice and clean: 1.upto(100) { |i| p i }
<bean> amh345, http://eval.in/14129
idkazuma has quit [Ping timeout: 258 seconds]
BSaboia has quit [Ping timeout: 258 seconds]
<bean> rhys, sounds like you're delving into meta programming a bit -- you're just wanting 5 methods?
ZachBeta has quit [Quit: Computer has gone to sleep.]
jasonthesensei has joined #ruby
<rhys> bean, i have an unheathly like of met programming. i do things you should not do in bash.
* bean is also a sysadmin
* bean knows that feel bro
<jasonthesensei> just learning ruby and im getting the error " Mocha deprecation warning: Change require 'mocha' to require 'mocha/setup' " where do i require this in my Gemfile?
<rhys> i had one that every time it ran it would edit itself so the next time it ran every possible action it made was valid. it did that on a 1 minute cron. i loved it, my coworkers... not so much. lol.
MetaCosm has quit [Excess Flood]
<bean> lol nice rhys
<bean> my work would kill me for that one
<waxjar> jasonthesensei: you can give gem an :require option like so gem 'mocha', :require => 'mocha/setup'
<rhys> they replaced my script with sharepoint. jokes on them.
<bean> LOL
adkron has quit [Ping timeout: 245 seconds]
<jasonthesensei> waxjar: does it matter that its during test?
MetaCosm has joined #ruby
<amh345> thanks bean!
<bean> no problem, amh345, wlecome to oop
apok has quit [Quit: apok]
DonRichie has quit [Ping timeout: 240 seconds]
<waxjar> jasonthesensei: warnings are generally just warnings, they won't break the code. but it's probably smart to change it so you can work with future versions without too much hassle
<amh345> im guessing a can pass several args to initialize. to get file_name , size etc
im0b has joined #ruby
DonRichie has joined #ruby
<amh345> bean: in your example. Class2 would be the class that actually writes/has the file information. i see you've stubbed in a 11.2
<bean> yep, you could have it instantiate as many new MyFiles as you want
<jasonthesensei> waxjar: well there must be a problem with my code because i run the test and getanother error as well thanks i will go over my code.
<bean> the stubbed in bit is just to show you that you can infact access file_size from a different class.
jhowarth has joined #ruby
soulcake has quit [Quit: ZNC - http://znc.in]
<bean> amh345, i'd probably store an array of files if I had multiple.
<bean> you might want to do some reading on object oriented programming in ruby :)
baroquebobcat has quit [Quit: baroquebobcat]
Mattx has quit [Read error: Connection reset by peer]
bubblehead has joined #ruby
Matchaw has quit [Read error: Connection reset by peer]
jurassic_ has quit [Quit: jurassic_]
hiyakashi has quit [Quit: お前は知りすぎた]
io_syl_ has joined #ruby
jurassic_ has joined #ruby
io_syl has quit [Read error: Operation timed out]
<amh345> bean the thing im not sure of is how to pass a real filesize val from the file generate method that would be in classTwo into MyFile.new
io_syl_ is now known as io_syl
<amh345> right now it says 1.2
<bean> amh345, yeah, you'll have to, you know, change that into however you're getting file sizes into the program.
* bean assumes amh345 is pretty new to this?
<amh345> i've never used initialize. im readin it now
<bean> oh wow
kofno has joined #ruby
<rhys> fibonacci[x+(x*2)+2] makes really good cuts of time to draw statistics from.
<amh345> reading*
<bean> how have you gotten this far without that, amh345
<amh345> heh
<bean> thats how you instantiate a new class
<amh345> it just hit me today while i was cleaning up some code.
<amh345> i know Class.new
<bean> are you a programmer?
<amh345> i've jsut never used the initialize method
randym has joined #ruby
c0rn has joined #ruby
* bean is a bit mind blown as to how thats even possible.
generali_ has joined #ruby
<bean> how else would you simply set any instance variables without some other bullshit method to set everything up for you
<bean> amh345, is your ultimate goal here to just have a class that contains a list of files and their sizes?
nateberkopec has joined #ruby
c0rn has quit [Client Quit]
kofno has quit [Ping timeout: 245 seconds]
nateberkopec has quit [Client Quit]
<rhys> timer @relevance*@fibonacci[x+(x*2)+2], method :stats${x}
pioz has joined #ruby
<rhys> opps
kofno has joined #ruby
nobitanobi has joined #ruby
<amh345> right now i have a cron that calls a method, writes a file and uploads it. but it's janky. so..
yshh has joined #ruby
<amh345> what i've done is create a table. with all the ids that need file exporting on.
banjara has joined #ruby
Aiur has joined #ruby
<amh345> but as a failsafe. i want to pass back some information to store in the table. such as file name and file size
nomenkun has joined #ruby
<bean> valid.
<amh345> so class1 method1 is run with a cron. method1 goes through the table and says ok, lets output this information to a file. so it hits Class2 method2
ritek has joined #ruby
freakazoid0223 has quit [Ping timeout: 252 seconds]
<amh345> class2 mthod2 actuallu pulls the data from another table, generates the file and it's done. but now i wanted to pass those file_size and file_name deets back to class1 method1 so i can insert into the original table.
<bean> I think you're overengineering this, this sounds like somethere where you dont even need classses.
<amh345> well, i've run into problems. here's whats happened.
<amh345> there's one final step. and that is after the file is generated. it uploads it.
slainer68 has joined #ruby
<amh345> now, sometimes if the file is too large i lose some of it on the upload.
<bean> yeah, do you have any actual code you could show?
<amh345> so im planning on doing this. generate the file. store the file name and size to the table. shortly after (maybe 10 mins) i upload the file using the filename in the table. then i dbl check the file size that's been uploaded against the filesized recorded in the table.
Inside has quit [Ping timeout: 260 seconds]
<bean> what mechanism are you using to upload?
nomenkun has quit [Ping timeout: 255 seconds]
<amh345> right now this is all done. the only difference is there is no table storing the file size/name data. and the cron calls Class2 method2(some_id) directly.
<bean> that sounds terribly jank
<bean> I'm still confused as to how cron calls ruby
<bean> does it call a script that runns the method2
c0rn has joined #ruby
Mattx has joined #ruby
<amh345> uploads are happening using Net::FTP
<bean> and, i have to ask this, are your functions named stuff like "method2"
<amh345> oh. right. cron calls the ruby because this is on rails.
epylinkn has joined #ruby
<amh345> so. rails runner 'Class2.method2(id)'
<amh345> hah no. they're not called method2
<bean> seriously though, is your class called class2
<bean> ok
Ortuna has quit [Quit: Computer has gone to sleep.]
<bean> :p
<amh345> nonon
<bean> good.
<amh345> hah
c0rn has quit [Client Quit]
generali_ has quit [Remote host closed the connection]
<amh345> i just mocked up a really simple example of how to get some data passed back.
<bean> yeah, its not a very clear example.
<bean> :p
<amh345> the method to write the file is like.. several hundred lines.
epylinkn has left #ruby [#ruby]
<amh345> yeah, sorry.
<bean> yep.
<bean> figured.
apeiros_ has joined #ruby
lewix_ has joined #ruby
pioz has quit [Quit: This computer has gone to sleep]
verysoftoiletppr has quit []
<amh345> what i'd love to figure out is how to write the file.. and then wait a bit and THEN call the upload class(i didnt post the upload class example).
<amh345> right now the uploadclass is called directly after the file write.
<bean> I still don't know how you've never used initialize
<bean> like
<bean> how did you learn ruby if not with that
hogeo has quit [Remote host closed the connection]
lng has joined #ruby
Iszak has quit [Quit: Textual IRC Client: www.textualapp.com]
lewix__ has joined #ruby
lng has left #ruby [#ruby]
cam` has joined #ruby
<amh345> i tried to use file.exists(file_name) before the uploader executes since the file only exists after it's written. but it's flawed.
<bean> tbh rails related questions might be better suited for #rubyonrails
<bean> cuz most of us here hate rails
<amh345> bean, i've seen initialize. just never messed with it.
hogeo has joined #ruby
hogeo has quit [Remote host closed the connection]
lewix has quit [Ping timeout: 258 seconds]
hogeo has joined #ruby
<amh345> well, this doesnt really have anything to do with railes, tbh. i mean the only place where rails comes in is the data put into the file.
<amh345> that's why i came in here. because it's a ruby question.
<bean> if it was me i'd be working with raw files, not something terrifying getting pulled out of a rails DB
<bean> *shudder*
xaq has quit [Remote host closed the connection]
S1kx has quit [Quit: Leaving]
apeiros_ has quit [Ping timeout: 246 seconds]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
lewix_ has quit [Ping timeout: 260 seconds]
banjara has quit [Quit: Leaving.]
jimeh has quit [Quit: Computer has gone to sleep.]
karnowski has joined #ruby
baroquebobcat has joined #ruby
generali_ has joined #ruby
rburton- has joined #ruby
nari has quit [Ping timeout: 240 seconds]
codesoda has quit [Remote host closed the connection]
emocakes has quit [Quit: emocakes]
jpfuentes2 has joined #ruby
generali_ has quit [Remote host closed the connection]
SCommette has joined #ruby
wmoxam has quit [Ping timeout: 246 seconds]
piisalie has left #ruby [#ruby]
TorpedoSkyline has joined #ruby
jacobbednarz has quit [Quit: Computer has gone to sleep.]
nobitanobi has quit [Ping timeout: 258 seconds]
wmoxam has joined #ruby
spychalski has quit [Quit: Lost terminal]
mercwithamouth has quit [Ping timeout: 245 seconds]
kristofers has quit []
brianherman has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
brianherman has joined #ruby
flowerhack has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
havenwood has quit [Remote host closed the connection]
epylinkn has joined #ruby
epylinkn has left #ruby [#ruby]
yeban has joined #ruby
nomenkun has joined #ruby
tootooroo has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
tootooroo has joined #ruby
hamakn has joined #ruby
xaq has joined #ruby
Hanmac has joined #ruby
nomenkun has quit [Ping timeout: 258 seconds]
lewix__ has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 240 seconds]
rburton- has quit [Quit: Leaving...]
thufir_ has joined #ruby
chimkan has joined #ruby
niklasb has quit [Ping timeout: 240 seconds]
wmoxam has quit [Ping timeout: 256 seconds]
<amh345> bean: i just tried your example. it makes perfect sense.
<amh345> heh
<amh345> early i was just reading it- without trying
<amh345> my_thing = Two.new < this is what had me confused
banjara has joined #ruby
Domon has joined #ruby
tealmage has joined #ruby
<bean> i figured you'd mess with it and see what i meant.
[0x1a]_ has joined #ruby
bigmac has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
stuartrexking has joined #ruby
angusiguess has quit [Ping timeout: 246 seconds]
<rhys> so i know blah.stuff()? returns a boolean
fourq has joined #ruby
banjara has quit [Ping timeout: 240 seconds]
<rhys> does does blah.stuff()! designate mean? i don't even know what to call these
<rhys> it keeps mentioning convention
<waxjar> the exclamation mark and the question mark are part of the method name
<bean> you mean blah.stuff?() and blah.stuff!()
<bean> yep
<bean> ? means returns a boolean
<bean> ! means, make the change
<bean> instead of returing a new object
AlSquirrel has quit [Read error: Connection reset by peer]
<bean> so if you look at Hash#merge vs Hash#merge! you'll see that you can also call hash#merge! as Hash#update
AlSquire has joined #ruby
<rhys> hash merge was exactly what i was looking at. got it.
Guedes has quit [Ping timeout: 252 seconds]
codesoda has joined #ruby
ttt has joined #ruby
Faris8 has quit [Ping timeout: 255 seconds]
kofno has quit [Remote host closed the connection]
<Quadlex> ffrferf
dmerrick has joined #ruby
sleetdrop has joined #ruby
<amh345> is ruby any good for writing little desktop apps?
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<amh345> widgets and the like?
<amh345> i downloaded something called rubyshoes awhile ago. it was ..ok.
pygmael has joined #ruby
rhys has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
momomomomo has quit [Quit: momomomomo]
casheew has quit [Read error: Connection reset by peer]
<codesoda> you can build apps with macruby
<codesoda> and ios apps with ruby motion
<waxjar> RubyMotion (Ruby for iOS) seems to be pretty hot lately
<codesoda> one there are more DSLs to hide away some of the Cocoa complexity it will be better
<codesoda> might as well write Objective-C at the moment
<codesoda> there is a nice Pod setup now though
mellow888 has joined #ruby
<codesoda> dependencies are managed like ruby gems
<waxjar> do you know of any popular apps written with macruby codesoda ?
<codesoda> I know checkoutapp was done with a derivative using python
<codesoda> surely the macruby wiki would have examples
casheew has joined #ruby
nari has joined #ruby
nomenkun has quit [Ping timeout: 258 seconds]
<zeroeth> amh345: if we're talking guis. there's jruby + java guis, macruby and cocoa, or wxWidgets, probably more around the other toolkits like FLTK or TK
kuzushi_ has joined #ruby
<waxjar> hmm, they don't seems to have a list
slainer6_ has joined #ruby
slainer6_ has quit [Remote host closed the connection]
<amh345> is it worth playing with this stuff or a total waste of time? i know way back when i looked and it wasnt very promising.
jnoob22_ has joined #ruby
<zeroeth> amh345: what do you want this 'desktop' app to do
<amh345> zeroeth: nothing in particular to be honest. i've jsut always wanted to try something. it could literally be anything. like a cpu monitor.
<amh345> my main computer is osx. if that makes a diff
taqutor has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<waxjar> i find the whole Xcode thing really confusing
drbawb1 has joined #ruby
<waxjar> tried it a few times, but i think i didn't have a good guide for it. didn't understand much of it
shevy has quit [Read error: Operation timed out]
<zeroeth> amh345: that could be accomplished in all of the above mentioned frameworks.
bw has joined #ruby
swex_ has joined #ruby
connor_g1odwolf has joined #ruby
<codesoda> you should checkout titanium desktop
<amh345> is there a limit to what you should try? like say.. if i wanted to make a game (i dont, just saying) would it be possible in ruby, or would someone look for something betteR?
fermion_ has joined #ruby
bw is now known as Guest10026
<codesoda> can target linux, winblows osx
aef_ has joined #ruby
<amh345> im getting tired of webapps and rails. i'd like to get better with ruby.. and i figure web apps might be a fun thing to learn
stuartrexking has quit [Quit: Leaving...]
<amh345> err dekstop apps. not webapps
stuartrexking has joined #ruby
<zeroeth> amh345: again.. really depends on what you're trying to make. game/desktop are vague. ruby has game libraries like Chingu/Gosu, or bindings to C++ ones. Or plain ol GLUT+opengl
banjara has joined #ruby
peteyg has quit [Quit: Lost terminal]
pygmael has quit [Quit: pygmael]
angusiguess has joined #ruby
<amh345> zeroeth: ok, cool. so it seems like there isnt really a limit to what it can do.
<amh345> that's kind of what i was wondering.
<amh345> like, oh yeah. you should trying to make an office clone in ruby.
<zeroeth> ruby is just a language, it has bindings to lots of things on various host systems.
<amh345> shouldnt*
rhys has joined #ruby
slainer68 has quit [*.net *.split]
karnowski has quit [*.net *.split]
Spaceghost|cloud has quit [*.net *.split]
drbawb has quit [*.net *.split]
octarine has quit [*.net *.split]
lucaspiller___ has quit [*.net *.split]
justsee_ has quit [*.net *.split]
davidboy has quit [*.net *.split]
rwz has quit [*.net *.split]
niftylettuce has quit [*.net *.split]
kuzushi has quit [*.net *.split]
lele has quit [*.net *.split]
dekz__ has quit [*.net *.split]
swex has quit [*.net *.split]
pitzips has quit [*.net *.split]
darkc0met has quit [*.net *.split]
jnoob22 has quit [*.net *.split]
jcrawford has quit [*.net *.split]
aef has quit [*.net *.split]
swistak35 has quit [*.net *.split]
fermion has quit [*.net *.split]
kzrl has quit [*.net *.split]
connor_goodwolf has quit [*.net *.split]
sebastianb has quit [*.net *.split]
sweet_kid has quit [*.net *.split]
bw_ has quit [*.net *.split]
adam12 has quit [*.net *.split]
d_roge has quit [*.net *.split]
thorncp has quit [*.net *.split]
fermion_ is now known as fermion
<waxjar> netsplit :D
<zeroeth> amh345: http://spooner.github.com/games/wrath/ is a good example of someone writing games (and distributing them as apps)
mikemac has joined #ruby
BeanDip has joined #ruby
MetaCosm has quit [Excess Flood]
darkc0met has joined #ruby
tomsthumb has joined #ruby
sailias has quit [Quit: Leaving.]
drizz_ has joined #ruby
bubblehead has quit [Remote host closed the connection]
MetaCosm has joined #ruby
marwinis1 has joined #ruby
<amh345> zeroeth: hah. thats a cute game.
sailias has joined #ruby
ThePicard90033 is now known as ThePicard
LennyLinux has quit [Remote host closed the connection]
ninegrid_ has joined #ruby
pac1 has quit [Excess Flood]
jani has quit [Write error: Broken pipe]
BeanDip_ has quit [Write error: Broken pipe]
ixx has quit [Write error: Broken pipe]
ninegrid has quit [Write error: Broken pipe]
crazymykl has quit [Remote host closed the connection]
drizz has quit [Remote host closed the connection]
marwinism has quit [Write error: Broken pipe]
elliottc1ble has quit [Remote host closed the connection]
morrolan_ has joined #ruby
davidcel- has joined #ruby
Morrolan has quit [Ping timeout: 435 seconds]
davidcelis has quit [Ping timeout: 435 seconds]
mnaser has quit [Ping timeout: 435 seconds]
davidcel- is now known as davidcelis
davidcelis has joined #ruby
davidcelis has quit [Changing host]
mnaser_ has joined #ruby
sailias1 has joined #ruby
mnaser_ is now known as mnaser
<zeroeth> the sprites are from an opensource set some guy released, but yeah its a nice game, and fun code to look at
<mellow888> hi
<zeroeth> since its got a physics engine too
sailias1 has quit [Read error: Connection reset by peer]
<zeroeth> (bindings to a C++ one that is)
sailias1 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
banjara has quit [Ping timeout: 260 seconds]
<amh345> so it's all packaged in a executable and doesnt require ruby to be installed?
sailias1 has quit [Read error: Connection reset by peer]
sailias2 has joined #ruby
sailias2 has quit [Client Quit]
epochwolf is now known as epochcoyote
codesoda has left #ruby [#ruby]
sailias1 has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
DonRichie has quit [Quit: Verlassend]
<zeroeth> amh345: ruby is in the package
pitzips has joined #ruby
sailias2 has joined #ruby
epochcoyote is now known as epochwolf
sailias2 has quit [Client Quit]
<zeroeth> amh345: there are a few different attempts at distributing stand alone ruby apps, but generally yeah you create an isolated ruby environment with all the gems for your app
lewix has joined #ruby
sailias2 has joined #ruby
sailias2 has quit [Client Quit]
<mellow888> does anyone have any clue how I could take information I read from a tcp socket, and send it to a python program to stream it through a messaging protocol?
techlife has quit [Ping timeout: 245 seconds]
sailias has quit [Ping timeout: 258 seconds]
<amh345> i think im def going to try something. thanks for the info zeroeth
jani has joined #ruby
sailias has joined #ruby
sailias has quit [Client Quit]
<mellow888> client -> myrubyproxy -> python program -> xmpp -> pythonprogram -> rubyproxy -> website
ixx has joined #ruby
jani is now known as Guest88866
shevy has joined #ruby
pac1 has joined #ruby
ixx is now known as Guest62276
sailias has joined #ruby
<zeroeth> amh345: just take it in steps, but when you wanna figure out the release part https://www.ruby-toolbox.com/categories/packaging_to_executables
elliottcable has joined #ruby
Es0teric has joined #ruby
<amh345> awesome. im going to try something shortly
<amh345> i want to see if i can figure out why rubyist hate rails :)
tylersmith has joined #ruby
<zeroeth> amh345: oh and fyi, wrath used OCRA
sailias1 has quit [Ping timeout: 258 seconds]
c0rn has joined #ruby
joshwines_ has joined #ruby
<amh345> i feel like jumping into rails and ruby at the same time is sort of a bad idea. while rails is awesome… you miss a lot of the how it actually works stuff.
sailias has quit [Ping timeout: 258 seconds]
feedbackloop has quit [Ping timeout: 256 seconds]
techlife has joined #ruby
mellow888 has quit [Quit: http://www.kiwiirc.com/ - A hand-crafted IRC client]
julian-delphiki has joined #ruby
nomenkun has joined #ruby
gianlucadv has quit [Ping timeout: 264 seconds]
JuniorSantosHQ has joined #ruby
[Neurotic]_ has joined #ruby
karnowski has joined #ruby
Spaceghost|cloud has joined #ruby
octarine has joined #ruby
davidboy has joined #ruby
swistak35 has joined #ruby
rwz has joined #ruby
dekz__ has joined #ruby
jcrawford has joined #ruby
niftylettuce has joined #ruby
thorncp has joined #ruby
adam12 has joined #ruby
lucaspiller___ has joined #ruby
lele has joined #ruby
sweet_kid has joined #ruby
kzrl has joined #ruby
sebastianb has joined #ruby
d_roge has joined #ruby
[Neurotic]_ has quit [Changing host]
[Neurotic]_ has joined #ruby
radic has joined #ruby
[Neurotic] has quit [Excess Flood]
rmc3 has joined #ruby
mml has quit [Quit: leaving]
Dreamer3__ has joined #ruby
faulkner- has joined #ruby
devyn_ has joined #ruby
[Neurotic] has joined #ruby
babinho_ has joined #ruby
Demux_ has joined #ruby
mtlatif has joined #ruby
deavidsedice has joined #ruby
charliesome has joined #ruby
txdv_ has joined #ruby
d-best has joined #ruby
chong_ has joined #ruby
scrogson_ has joined #ruby
onewheelskyward_ has joined #ruby
nomenkun has quit [Ping timeout: 258 seconds]
radic_ has quit [Ping timeout: 255 seconds]
nomadic_ has joined #ruby
JoeHazzers_ has joined #ruby
Kov|sumika has joined #ruby
gf3_ has joined #ruby
brandon_ has joined #ruby
kevinfagan_ has joined #ruby
nezumi has quit [Excess Flood]
zmanfx has quit [Write error: Broken pipe]
kevinfagan has quit [Write error: Broken pipe]
rmc3_ has quit [Write error: Broken pipe]
onewheelskyward has quit [Write error: Broken pipe]
nomadic has quit [Write error: Broken pipe]
onewheelskyward_ is now known as onewheelskyward
Dreamer3 has quit [Write error: Broken pipe]
Dreamer3__ is now known as Dreamer3
scrogson has quit [Remote host closed the connection]
msch has quit [Remote host closed the connection]
gf3 has quit [Remote host closed the connection]
JoeHazzers has quit [Excess Flood]
Kovensky has quit [Read error: Connection reset by peer]
gf3_ is now known as gf3
JoeHazzers_ is now known as JoeHazzers
Kov|sumika is now known as Kovensky
zmanfx has joined #ruby
moos3 has joined #ruby
nezumi has joined #ruby
franks2_ has joined #ruby
cout_ has joined #ruby
phasma has joined #ruby
lewix has quit [Read error: Connection reset by peer]
asuka_ has joined #ruby
browndawg has joined #ruby
lewix has joined #ruby
tomzx_mac_ has joined #ruby
devyn_ has quit [Changing host]
devyn_ has joined #ruby
techlife has quit [Ping timeout: 260 seconds]
bean has quit [Ping timeout: 245 seconds]
bean__ is now known as bean
tomzx_mac has quit [Ping timeout: 256 seconds]
devyn has quit [Disconnected by services]
devyn_ is now known as devyn
techlife has joined #ruby
JuniorSantosHQ has quit [Ping timeout: 252 seconds]
babinho has quit [*.net *.split]
Guest70829 has quit [*.net *.split]
joast has quit [*.net *.split]
benwoody has quit [*.net *.split]
Demux has quit [*.net *.split]
cout has quit [*.net *.split]
franks2 has quit [*.net *.split]
faulkner has quit [*.net *.split]
d-snp has quit [*.net *.split]
asuka has quit [*.net *.split]
chongyu123 has quit [*.net *.split]
Drakevr has quit [*.net *.split]
deavid has quit [*.net *.split]
txdv has quit [*.net *.split]
faulkner- is now known as faulkner
browndawg has quit [Ping timeout: 240 seconds]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
emmanuelux has quit [Quit: emmanuelux]
techlife has quit [Read error: Connection reset by peer]
techlife has joined #ruby
benwoody has joined #ruby
banjara has joined #ruby
c0rn has quit [Ping timeout: 240 seconds]
c0rn has joined #ruby
emocakes has joined #ruby
scrogson_ is now known as scrogson
gianlucadv has joined #ruby
emergion has joined #ruby
c0rn has quit [Ping timeout: 252 seconds]
banjara has quit [Ping timeout: 246 seconds]
browndawg has joined #ruby
Drakevr has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
tealmage has quit [Remote host closed the connection]
c0rn has joined #ruby
tomzx_mac_ has quit [Ping timeout: 240 seconds]
TorpedoSkyline has quit [Quit: Don't follow me if you don't want hilarity and QUITing to ensue. Also, freelancing and iOS. @TorpedoSkyline]
havenwood has joined #ruby
sandGorgon has joined #ruby
soulcake has joined #ruby
toekutr has quit [Remote host closed the connection]
dmiller1 has joined #ruby
tomzx_mac has joined #ruby
nomenkun has joined #ruby
kofno has joined #ruby
slyv has quit [Quit: Textual IRC Client: www.textualapp.com]
yashshah_ has joined #ruby
kofno has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
pac1 has quit [Ping timeout: 256 seconds]
agarie has quit [Read error: Connection reset by peer]
agarie has joined #ruby
yashshah_ has quit [Ping timeout: 252 seconds]
slainer68 has quit [Ping timeout: 255 seconds]
nfk has quit [Quit: yawn]
bradleyprice has quit [Remote host closed the connection]
cantonic is now known as cantonic|away
<Quadlex> pet hate: When you ask people for advice for a small issue and their response is to tell you why your entire architecture is wrong
brianherman has quit [Read error: Connection reset by peer]
<Quadlex> And even once you admit it is, they can't shut up about it
zeroeth has quit [Ping timeout: 260 seconds]
sandGorgon has quit [Ping timeout: 240 seconds]
adkron_ has quit [Ping timeout: 240 seconds]
crimezon120xx has joined #ruby
banjara has joined #ruby
alainus has joined #ruby
crimezone20xx has quit [Ping timeout: 255 seconds]
dmerrick has quit [Quit: dmerrick]
yashshah_ has joined #ruby
c0rn has quit [Ping timeout: 240 seconds]
<alainus> How is nil treated in a conditional ? nil and nil > false, nil and true > nil, nil ? true : false > false
butblack has joined #ruby
<alainus> nil == false> false
bradleyprice has joined #ruby
jurassic_ has quit [Quit: jurassic_]
<alainus> (nil or true) and (false or true) > true
<alainus> confuzed
<amh345> bean, i hate to bother you again. but im messing with your example. im trying to assign some variable so i can access them directly. right now im returning => #<ClassTwo:0x007fd44966b618 @size="1.2GB", @another_val="testing val"> i see .instance_variables gets the variable name. but no where can i find how to get the value.
ninegrid_ has quit [Quit: brb]
<Quadlex> alainus: Why not pop open irb and have a play?
c0rn has joined #ruby
<havenwood> alainus: nil and false are the only things that aren't true, but nil != false. There are no comparison operators on booleans.
<amh345> oh. wow
<amh345> i finally got it. .instance_variable_get :@size
<havenwood> alainus: +1 irb, or better yet Pry: http://pryrepl.org/
<amh345> i swear i tried that method before with a nil result.
<Quadlex> (Not trying to be unhelpful, I just personally find that dicking around ina REPL is much more satisfying)
<alainus> ok but even if nil is not the same as false, false and nil can be used interchangeably in a conditional statement, right ?
<Quadlex> alainus: Yes, sort of.
<Quadlex> If you're ever checking for "False" explicitly, and you encounter nil, you'll get a (ahem) false positive)
<Quadlex> EG unless student.passed_exam?
<alainus> i guess i'll never check for false explicitly though
banjara has quit [Ping timeout: 256 seconds]
<havenwood> alainus: Methods that end in a question-mark are basically a contract that nil or false is one possible value, since everything else is true.
<Quadlex> If passed_exam is nil, that might be a logical error
<Quadlex> But your code will happily assume they failed the exam
<Quadlex> Perhaps they've just not taken it yet
<havenwood> Yeah, false is nice when its actually false.
<Quadlex> But you can test against the class to ensure falsehood, eg value === false
tylersmith has quit [Quit: tylersmith]
<havenwood> nil === false; #=> false
baba has joined #ruby
<Quadlex> 'sactly
<havenwood> threequaaaaaals
<Quadlex> *guitar riff*
fire has quit [Ping timeout: 258 seconds]
crimezon120xx has quit [Quit: leaving]
<jasonthesensei> can someone recommend a good book on ruby and rails?
<Quadlex> jasonthesensei: Are you new to Ruby or just Rails?
adelcampo has joined #ruby
<otters> ok for some reason this is escaping me
adelcampo is now known as doritostains
nomenkun has joined #ruby
<otters> but I need to convert week difference and day difference between two dates into integers
<jasonthesensei> kind of learning them together
<jasonthesensei> new to both
cantonic|away has quit [Quit: cantonic|away]
<otters> how do I do it
joofsh has quit [Remote host closed the connection]
doritostains has quit [Client Quit]
tokhi has quit [Ping timeout: 245 seconds]
<havenwood> jasonthesensei: Some good Ruby resources listed here: http://www.ruby-lang.org/en/documentation/
cyberarm has quit [Remote host closed the connection]
<jasonthesensei> havenwood: thank you
<havenwood> jasonthesensei: Rails-related questions will get more love in #RubyOnRails.
butblack has quit [Quit: butblack]
nomenkun has quit [Ping timeout: 245 seconds]
matayam has quit [Remote host closed the connection]
<havenwood> jasonthesensei: I think 'The Ruby Programming Language' is great. Ruby Koans is fun. TryRuby.org is a great uber-basic intro.
<Quadlex> jasonthesensei: One thing I've found. The guides on the rails site are quite good, but the 10 minute lets build a blog introduction to Rails is a LIE
matayam has joined #ruby
<Quadlex> Are you in SF? You might want to go to a RailsBridge and see if that's helpful
Matt has joined #ruby
Matt is now known as Guest39740
<havenwood> jasonthesensei: Ruby is great fun. Sinatra might be an easier to start with than Rails.
c0rn has quit [Ping timeout: 240 seconds]
<havenwood> jasonthesensei: Or learn Ruby before you embark on Rails.
<havenwood> jasonthesensei: I think it better to know Ruby and not Rails, than the other way around.
kofno has joined #ruby
eliasp has quit [Remote host closed the connection]
tylersmith has joined #ruby
MagBo has joined #ruby
<havenwood> **as a starting point.
eliasp has joined #ruby
<MagBo> guys, let's say I have a ton of utility scripts in ruby and I want to use those from irb. how do I import stuff there?
epylinkn has joined #ruby
<havenwood> MagBo: First, use Pry not irb. :O Then add requires to your scripts in your .pryrc.
matayam has quit [Ping timeout: 246 seconds]
c0rn has joined #ruby
Demux_ has quit [Ping timeout: 240 seconds]
lewix_ has joined #ruby
<havenwood> MagBo: E.g., to share state between Pry processes with Drb I use the following in my .pryrc: https://gist.github.com/havenwood/5194155
c0rn has quit [Client Quit]
Hanmac has quit [Read error: Connection reset by peer]
xaq has quit [Remote host closed the connection]
tylersmith has quit [Quit: tylersmith]
Hanmac has joined #ruby
<havenwood> MagBo: But if you must, .irbrc.
lewix has quit [Ping timeout: 256 seconds]
Guest39740 has left #ruby ["Leaving"]
mattbl has joined #ruby
epylinkn has left #ruby [#ruby]
<MagBo> havenwood: no-no, I'm ruby noob (work as Erlang senior developer, using Elixir and charmed by ruby)
heftig has quit [Quit: Quitting]
<MagBo> I'll have a look at pry, thanks!
<alainus> can I do "function_a and return if expression" ? (the intention is to execute function_a and return afterwards), or do I have to use a block ?
<Quadlex> MagBo: Ooo, Shiny!
* Quadlex was thinking of learning another language, Erlang was one competitor
<bnagy> alainus: return some_meth if blah should wok
<bnagy> *work
<havenwood> MagBo: Elixir seems awesome!! Just been playing around in iex, but so nice!
<havenwood> Quadlex: If you want to check out Erlang, but love Ruby, Elixir is sweet.
zeroeth has joined #ruby
<Quadlex> havenwood: I'll do so
<Quadlex> I'm trying to do some monkey patching of testing frameworks
kofno has quit [Remote host closed the connection]
heliumsocket has joined #ruby
<alainus> bnagy, so the answer 3 in http://stackoverflow.com/questions/5743534/redirect-to-return is wrong ? (and always means a logical evaluation and not that both statements will be executed)
<Quadlex> I've got a gem which runs an rspec test a few times, and creates a driver inside it (for Selenium)
presto has joined #ruby
<Quadlex> Capybara uses Procs to creat its own drivers, and does so the first time a DSL method is called
yashshah_ has quit [Ping timeout: 256 seconds]
<MagBo> havenwood: yeah, we use it in production and it's great :)
<Quadlex> I'm trying to figure out a nice way of patching the custom capybara drivers we're creating to get the "current" selenium driver from rspec instead, and I've no idea how
<bnagy> alainus: do_something and return works
breakingthings has quit []
kofno has joined #ruby
worstadmin has quit [Ping timeout: 258 seconds]
macabhaird has quit [Ping timeout: 255 seconds]
momomomomo has joined #ruby
worstadmin has joined #ruby
banjara has joined #ruby
<bnagy> huh, weird, looks like meth and return if blah returns nil and return meth if blah returns the result of meth, which is what I expected both to do
<bnagy> so there you go.
rburton- has joined #ruby
worstadmin has quit [Ping timeout: 256 seconds]
heftig has joined #ruby
ananthakumaran has joined #ruby
worstadmin has joined #ruby
eliasp_ has joined #ruby
benlieb has joined #ruby
eliasp has quit [Ping timeout: 245 seconds]
nomenkun has joined #ruby
browndawg has quit [Read error: Connection timed out]
techlife has quit [Ping timeout: 245 seconds]
banjara has quit [Ping timeout: 256 seconds]
rippa has joined #ruby
browndawg has joined #ruby
uris has quit [Quit: Leaving]
kofno has quit [Remote host closed the connection]
w400z has joined #ruby
jurassic_ has joined #ruby
bubblehead has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
matayam has joined #ruby
dmiller1 has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby
eliasp_ has quit [Read error: Connection reset by peer]
eliasp has joined #ruby
worstadmin has quit [Ping timeout: 260 seconds]
techlife has joined #ruby
browndawg has quit [Quit: Leaving.]
mattbl has quit [Quit: This computer has gone to sleep]
bubblehead has quit [Ping timeout: 245 seconds]
end_guy_ has joined #ruby
tomzx_mac has quit [Ping timeout: 255 seconds]
<Quadlex> Time for Fun With Mutexes
end_guy has quit [Ping timeout: 276 seconds]
chessguy has quit [Remote host closed the connection]
presto has quit [Ping timeout: 245 seconds]
worstadmin has joined #ruby
yashshah_ has joined #ruby
divout has joined #ruby
worstadmin has quit [Ping timeout: 240 seconds]
jacobbednarz has joined #ruby
worstadmin has joined #ruby
keanehsiao has joined #ruby
platzhirsch has left #ruby [#ruby]
worstadmin has quit [Remote host closed the connection]
worstadmin has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
banjara has joined #ruby
tomsthumb has quit [Quit: Leaving.]
chaluopa has quit [Remote host closed the connection]
nomenkun has joined #ruby
girija has joined #ruby
akam-it has joined #ruby
Mon_Ouie has quit [Read error: Operation timed out]
worstadmin has quit [Ping timeout: 260 seconds]
worstadmin has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
jnoob22_ has quit [Ping timeout: 258 seconds]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
w400z has quit []
banjara has quit [Ping timeout: 246 seconds]
emocakes has quit [Quit: emocakes]
Villadelfia has quit [Ping timeout: 240 seconds]
eliasp has quit [Ping timeout: 245 seconds]
mahmoudimus has joined #ruby
Villadelfia_ has joined #ruby
rubarLion has joined #ruby
<akam-it> Hello!
SeySayux has quit [Ping timeout: 252 seconds]
eliasp has joined #ruby
<akam-it> is there a function to reverse hex?
yashshah_ has quit [Ping timeout: 240 seconds]
SeySayux has joined #ruby
<akam-it> i.e. i have 0xccf7e314, and I need to reverse it to 14e3f7cc
io_syl has quit [Ping timeout: 252 seconds]
jnoob22 has joined #ruby
icole has joined #ruby
sandGorgon has joined #ruby
jacobbednarz has quit [Quit: Computer has gone to sleep.]
mockra has joined #ruby
io_syl has joined #ruby
SCommette has quit [Quit: SCommette]
BadQuanta has joined #ruby
<havenwood> akam-it: Hrm. Normally, #to_i(16) is the opposite of #hex.
ananthakumaran has quit [Quit: Leaving.]
browndawg has joined #ruby
bradleyprice has quit [Remote host closed the connection]
worstadmin has quit [Ping timeout: 256 seconds]
d2dchat has quit [Remote host closed the connection]
<havenwood> Oh, reverse... I'm slow.
havenwood has quit [Remote host closed the connection]
rickmasta has joined #ruby
axsuul_ has joined #ruby
<axsuul_> How can I track which classes have a module included in?
<axsuul_> i.e. i have a module Foo
momomomomo has quit [Quit: momomomomo]
<axsuul_> i have about 6 classes which include Foo, how do I get those 6 classes?
elkclone has joined #ruby
penzur has joined #ruby
banjara has joined #ruby
<bnagy> if you can modify the module, you could use include hook
<bnagy> otherwise you should look at walking ObjectSpace
robustus has quit [Ping timeout: 248 seconds]
<axsuul_> bnagy: for the hook, where should I store the classes in? class attribute?
<bnagy> uh, wherever makes sense I guess
agarie has quit [Remote host closed the connection]
robustus has joined #ruby
nomenkun has joined #ruby
heftig has quit [Remote host closed the connection]
heftig has joined #ruby
sandGorgon has quit [Remote host closed the connection]
etcetera has joined #ruby
kuzushi_ has quit [Ping timeout: 245 seconds]
<axsuul_> bnagy: Is there such thing as a Module instance variable, so that only Foo can access this instance variable
ARCADIVS has joined #ruby
kofno has joined #ruby
<rickmasta> I can
<rickmasta> I can't get rubygems to install with rvm.
hiyakashi has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
momomomomo has joined #ruby
<akam-it> sonne, i dit that for reverse hex rev = ((0...hexStr.length/2).map {|i|hexStr[i*2,2]}).reverse.join.to_i(16)
<akam-it> *so
<rickmasta> Actually, it's only with ruby 2.0.0
kofno has quit [Ping timeout: 245 seconds]
angusiguess has joined #ruby
yashshah_ has joined #ruby
matayam has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
azlon has joined #ruby
banjara1 has joined #ruby
banjara has quit [Read error: Connection reset by peer]
<axsuul_> Anyone why accessing class instance variables doesn't work, but class_variable_get works?
<axsuul_> calling this at the class level
agarie has joined #ruby
chimkan has quit [Quit: chimkan]
<bnagy> axsuul_: play with a few examples
<bnagy> in particular, try doing p self at various times to see 'where' you are
yashshah_ has quit [Ping timeout: 240 seconds]
matayam has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
akam-it has quit [Quit: Ухожу я от вас]
dhruvasagar has joined #ruby
shadoi has joined #ruby
<julian-delphiki> amh345, hey, just saw your message from forever ago. You can also expose the instance vars with attr_accessor.
shadoi has quit [Client Quit]
<julian-delphiki> so that way you can just do object.file_size
<julian-delphiki> etc
bubblehead has joined #ruby
<amh345> instead of instance_variable_get?
<julian-delphiki> i mean, that works
<axsuul_> Thanks, got it
<julian-delphiki> attr_accessor will expose a getter and setter on the class.
<julian-delphiki> if you know what i mean
<amh345> i already had attr_accessor defined. but i wasnt able to access the var without instance_variable_get
<julian-delphiki> not true at all
azlon has quit [Ping timeout: 260 seconds]
<amh345> hrm
SCommette has joined #ruby
benlieb has quit [Quit: benlieb]
<amh345> julian-delphiki: well thats all i found to work when i was doing the googles.
arya has joined #ruby
kuzushi_ has joined #ruby
<julian-delphiki> you should just be able to throw the attrs in to attr_accessor for that class.
tcopp has quit [Ping timeout: 240 seconds]
heftig has quit [Quit: Quitting]
<julian-delphiki> attr_accessor is the same as: def file_size; @file_size; end, and the equivilent setter
heftig has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
<amh345> maybe ill mess with it some more. but im super tired. ive been at this for awhile now.
tommyvyo has quit [Quit:]
azlon has joined #ruby
elkclone has quit [Ping timeout: 256 seconds]
<julian-delphiki> amh345, http://eval.in/14144
<julian-delphiki> like, thats literally how ruby works
banjara has joined #ruby
banjara1 has quit [Read error: Connection reset by peer]
banjara has quit [Client Quit]
thufir_ has quit [Quit: Leaving.]
<amh345> my initialize has args passed to it.
_emptymag00 has quit [Ping timeout: 258 seconds]
<amh345> maybe i've set this up incorrectly.
<amh345> but it works. ill revisit it shortly.
<julian-delphiki> ok.
sayan has joined #ruby
<amh345> thanks for that snippet though.
<julian-delphiki> vars have to have @ in front of them to be instance vars.
azlon has quit [Ping timeout: 240 seconds]
<julian-delphiki> np
<julian-delphiki> prly bed time for me
<julian-delphiki> almost 1 am here and kinda drunk :S
nomenkun has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<TTilus> julian-delphiki: "My_thing" :)
mahmoudimus has quit [Quit: Computer has gone to sleep.]
connor_g1odwolf is now known as connor_goodwolf
icole has quit [Remote host closed the connection]
<TTilus> Proper_snake_sentence_case :)
<julian-delphiki> TTilus, i'm drunk, :P best name i could come up with
icole has joined #ruby
bubblehead has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
<TTilus> julian-delphiki: not the name, the case, and no offense, just oddly funny casing ive never seen before
answer_42 has joined #ruby
<amh345> ugh. now you've got me wondering about your example, julian-delphiki . hah
<julian-delphiki> TTilus, yeah, i would have cased it better if sober :)
<julian-delphiki> amh345, you really need to do some basic ruby. :)
azlon has joined #ruby
<julian-delphiki> Object oriented programming is important
ninegrid has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
icole_ has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
shock_one has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
jasonthesensei has quit []
icole has quit [Ping timeout: 260 seconds]
axsuul_ has quit [Quit: axsuul_]
azlon has quit [Ping timeout: 256 seconds]
<amh345> julian-delphiki: im trying to decide if i should post what i have, so you can see why i doesnt work for me.
<julian-delphiki> sure
momomomomo has quit [Quit: momomomomo]
<amh345> ok, i hope you get to look at it. hah.
<amh345> one moment.
<TTilus> amh345: any reason why not gkist/pastie it?
<amh345> TTilus: im about to
<TTilus> s/gk/g/
* julian-delphiki expects this to be slightly terrifying
whowantstolivefo has joined #ruby
SCommette has quit [Quit: SCommette]
_emptymag00 has joined #ruby
mephux has quit [Excess Flood]
emergion has quit [Quit: Computer has gone to sleep.]
hiyakash_ has joined #ruby
mephux has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
<amh345> ok.
<amh345> here it is. https://gist.github.com/anonymous/41b025424ea39aa26726 the process begins with CallExport.begin_export
<julian-delphiki> woah
<julian-delphiki> dude
<julian-delphiki> you have no attr_accessor in your FileExport class.
<julian-delphiki> and you're defining @file_size in both classes
<julian-delphiki> thats not at all what you want
<amh345> hrm
<amh345> it seemed a bit confusing when i was doing it.
etcetera has quit []
<amh345> ok, i'll take another swing at it.
azlon has joined #ruby
<waxjar> amh345, have you read about how objects work?
postmodern has quit [Quit: Leaving]
<amh345> well, yeah
<julian-delphiki> you really need to read about object oriented programing
postmodern has joined #ruby
<TTilus> amh345: you might wanna revisit it :)
<waxjar> you'll probably understand it a lot better if you read about it a bit, it's a tricky subject
<TTilus> amh345: is that code supposed to actually do something other than not produce stacktrace?
<amh345> well, it does exactly what i was needing.
<TTilus> amh345: whats the intended use
senayar has joined #ruby
<amh345> intended you was to pass back the file size, file name etc to the original method call. so i can update a table.
<amh345> use*
<TTilus> amh345: i cant see it really is doing anything but adding unnecessary complexity around that "write stuff ot file"
<TTilus> amh345: plain ruby file objec can give you name and size
momomomomo has joined #ruby
<TTilus> amh345: you just seem to pass them around in weird ways
<amh345> im using the File object
azlon has quit [Ping timeout: 256 seconds]
<amh345> it originally was just the write file method and that was it.
jgrevich has quit [Quit: jgrevich]
rickruby has joined #ruby
<amh345> but i had some issues. and needed some more control and information.
azlon has joined #ruby
<julian-delphiki> http://eval.in/14153
tagrudev has joined #ruby
<julian-delphiki> obvs the 1.2G is stubbed.
<amh345> so i set a cron to start the export. it does it's thing. passing the details back. another cron will later on begin the upload of that file to a server based on the information passed bac
<julian-delphiki> you really really need to revist object oriented
<julian-delphiki> I fear for your team if you dont
t-mart has quit [Remote host closed the connection]
<julian-delphiki> you will RARELY find a use for "self.whatever" methods
<julian-delphiki> those are class methods
<TTilus> amh345: do you need ruby, that sounds like a task for shell
* julian-delphiki agrees.
<julian-delphiki> he says he needs to get data out of his terrifying rails DB
greenarrow has quit [Ping timeout: 245 seconds]
greenarrow has joined #ruby
<waxjar> a rails DB?
<amh345> mysql
<julian-delphiki> its a rails app
<waxjar> you don't need rails to get data out of a database
<TTilus> amh345: you export your model data, right?
<amh345> i do
azlon has quit [Ping timeout: 246 seconds]
<TTilus> amh345: id first go without ar, just plain sql
aganov has joined #ruby
puppeh has joined #ruby
<julian-delphiki> he's uploading some terrifying computation of the files, over ftp
<amh345> i really dont want to tear everything down :/
<waxjar> what exactly do you need to do amh345?
arya has quit [Ping timeout: 248 seconds]
azlon has joined #ruby
<TTilus> amh345: u do computation based on youd model data, right?
<TTilus> amh345: and export that?
<amh345> what im doing now is running a cron on a class to export specific data, based on an id.
<julian-delphiki> using rails runner
<amh345> but i find it to be a little hard to track what's happening.
<amh345> i am using rails runner
<TTilus> why not add logging?
<amh345> i want to upload said exported file. but currently it's a little sketchy. so i want to create a master table to control everything. pass data on the file back and at a later time start the uploads.
nomenkun has joined #ruby
<amh345> what will loggin do?
<waxjar> i still don't get it. you're pulling data from a database, produce files with those and put those on an FTP server?
<amh345> logging*
earthquake has joined #ruby
<amh345> yes, waxjar
<waxjar> okay
<amh345> but right now the upload is called directly after the file exports.
<waxjar> do you produce files in a standard format?
<amh345> and i find it's a bit flaky. sometimes the file hasnt finished writing etc etc
<amh345> waxjar: all sorts of formats. there are many different files.
kofno has joined #ruby
regedarek has quit [Ping timeout: 245 seconds]
nomenkun_ has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
<TTilus> amh345: not finished writing?
<julian-delphiki> amh345, why not call the FTP as part of your export
<julian-delphiki> ie. at the end of you generate file command
<TTilus> you have separate thread or processes for upload and fie writer?
<amh345> julian-delphiki: that's what i was doing. but i was getting a lot of people telling me the file was missing data.
subbyyy has quit [Ping timeout: 252 seconds]
<amh345> the ends of the file specifically.
<TTilus> amh345: did you close the file before sending?
<TTilus> amh345: or flush
<amh345> i wrote something to check the file size locally against what it uploaded. and it rarely matchd.
pygmael has joined #ruby
djdb has joined #ruby
<amh345> TTilus: yeah. i did file.close then directly UploadFile.upload_some_file(file_name,blah)
noop has joined #ruby
slightair has joined #ruby
hiyakash_ has quit [Quit: お前は知りすぎた]
hiyakashi has quit [Quit: お前は知りすぎた]
lewix_ has quit [Remote host closed the connection]
<waxjar> do you need to process the data on command or is this a one-off script?
<amh345> the idea here is that i can a) record what SHOULD be in the file in a table. what the file size is and the file name. then slightly later (a few minutes) run another cron for the uploader. uploader pulls the data from the table and that's it.
<amh345> im not sure what you mean waxjar. i export once per night.
<julian-delphiki> you really really need to read up on OOP
emergion has joined #ruby
<julian-delphiki> i dont think you understand object oriented in ruby
azlon has quit [Ping timeout: 245 seconds]
<TTilus> these problems might go deeper then oo design
sayan has quit [Ping timeout: 252 seconds]
azlon has joined #ruby
<julian-delphiki> i'm being a bit harsh right now, but the way you mix up instance vars, instantiating new classes, creating new instance vars, etc, makes me think you dont really know about writing clean OOP in ruby.
kofno has quit [Ping timeout: 240 seconds]
<julian-delphiki> TTilus, sure, but it'd be a lot easier to understand if the code was legible and worked, and didnt stacktrace
<TTilus> julian-delphiki: most definitely
<julian-delphiki> basically, you want an object to encapsulate everything you're doing to the file.
<julian-delphiki> your use of self.whatever functions doesn't really make sense when they should just be functions to perform on the file object.
sayan has joined #ruby
<waxjar> anyway, your best bet would be to find out why the end of the files you're uploading don't end up on the other end, instead of trying to hack around it. it'll only get worse once you go down that road
tootooroo is now known as lolcathost
MrZYX|off is now known as MrZYX
regedarek has joined #ruby
lolcathost is now known as tootooroo
<waxjar> perhaps you're not writing the file to disk before saving, perhaps the connection is a bit wonky.
<julian-delphiki> waxjar, imo it sounds like a script that should be run, not some rails janlk
<amh345> well they do end up on the other end. it's just on occasion they dont match
<julian-delphiki> jank*
<TTilus> amh345: would you be able to stop bein so vague about your usecase
<amh345> vague?
<TTilus> amh345: could you describe in more detail what you are doing and we'll flesh it out together
<amh345> i mentioned earlier exactly what happened
<TTilus> ok
<TTilus> ill visit the log
<amh345> ok. what i need to do is done.
<amh345> but. on occasion there are issues.
<waxjar> you described how you (try) do it, not what you want :)
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
<waxjar> *to do
rickruby has quit [Remote host closed the connection]
azlon has quit [Ping timeout: 252 seconds]
<waxjar> i doubt you *want* to run crons :P
<julian-delphiki> crons are an awful idea.
<julian-delphiki> i'd never run ruby from a ron
<amh345> i just found a sweet gem. so it makes my life easier. but yeah. crons suck.
<julian-delphiki> cron*
<julian-delphiki> and im a sysadmin running > 200 bank websites.
<waxjar> oh wow
chandankumar has joined #ruby
<amh345> i have many sites with many different reports. each site has an id. and many sites need different kinda of reports (formats) and many sites need to be uploaded to different ftp servers. sometimes and api if im lucku.
<amh345> currently i have a cron that calls an export method with an id for that site passed.
<amh345> this sucks because i have to have a frigging cron for each site.
con_mame has joined #ruby
<amh345> aside from that. each night i generate a report(s) and upload to their respective ftps.
mephux has quit [Excess Flood]
<julian-delphiki> if i had to do it that way, i'd have a ruby script that iterated over a list of sites.
<julian-delphiki> and uploaded that way.
chandankumar is now known as chandan_kumar
<amh345> sometimes the reports are not correct on the other end. i do not know why. but they are missing some of the final rows etc etc.
mephux has joined #ruby
azlon has joined #ruby
<julian-delphiki> be sure you're actually writing out the rows.
<julian-delphiki> save the files, as well as FTP them
<julian-delphiki> see if your report is the same as whats on FTP.
con_mame has left #ruby [#ruby]
<amh345> so, the idea here is is that i call a single method. that checks a table for all sites that need reports. that method controls all the exporting of data. and passes the data (names,sizes, records,etc) back to the table.
<waxjar> could it be that the upload cron runs before the produce-the-file cron has finished?
<julian-delphiki> I wouldn't have a different cron for uploading, i'd just upload once report is done
<amh345> then later on i can call a single upload method via cron to go through that table, check the data for exporting.. and then upload it. after it will report back if the upload was successful etc etc
<julian-delphiki> this sounds terrifying, i'd just use some sort of apache access log parser :P
<amh345> so that's it in a nutshell
<amh345> julian-delphiki: see if your report is the same as whats on FTP. < this is what i do. i have an email that gets sent to me saying success on file xyz or failure. most of the time it's failure because size does not match
<julian-delphiki> yeesh
<julian-delphiki> i gotta go to bed
<julian-delphiki> i can probs help more tomorrow.
arturaz has joined #ruby
<julian-delphiki> if i dont get stuck on some dumb sysadmin work
<amh345> waxjar: could it be that the upload cron runs before the produce-the-file cron has finished? < the upload cron doesnt exist yet. this is what im aiming for though. but i want to start that cron maybe 30 mins after file exports.
<waxjar> okay
<waxjar> don't do that :P
momomomomo has quit [Quit: momomomomo]
<waxjar> find your bug instead
<amh345> the reason im going for so much automation and tracking is im going on vacation in a few days. and the last thing i want to be doing is stressing over what the hell happened to my uploads.
<julian-delphiki> imo thats a bad idea, due to iowait, etc, you dont know when your files wil be done
<julian-delphiki> i'd write the file all at once
keanehsiao has quit [Quit: keanehsiao]
<amh345> waxjar: i literally have no clue where the bug is. even if it WAS on the ftp servers end. it's still a problem.
azlon has quit [Ping timeout: 255 seconds]
<amh345> hell, if it's a problem on the ftp server. nothing will help.
jonahR has joined #ruby
sphughes99 has joined #ruby
<julian-delphiki> its not likely that its a problem with the ftp server
<julian-delphiki> if it is, try upload over SCP / rsync
<amh345> unfortunately i dont have any log info for the ftps to know what has happened.
<julian-delphiki> night
<waxjar> you should get some kind of feedback i imagine
<amh345> thanks for the assistance julian-delphiki
<TTilus> amh345: if you are going on vacation in a few days, this is a _very_ bad moment to introduce new automation
<amh345> waxjar: there's a big disconnect once that file is out. and that's a big part of the problem. the other shitty thing is i cant go into the ftp the next day to see what the file looks like
bean has quit [Quit: Computer has gone to sleep.]
<waxjar> you could set up a simple web interface that allows the sites to download the reports from your server in case the upload failed, as a safe guard
<amh345> the OTHER huge problem is that some of these files are encrypted with a pass i dont have.
<amh345> waxjar: a web interface is a way i would love to go.
<amh345> a lot of my clients are moving the api route. which also helps tremendously.
<amh345> or just sit the files on my ftp and let them deal with downloading them.
nari has quit [Ping timeout: 240 seconds]
browndawg has quit [Quit: Leaving.]
azlon has joined #ruby
azlon has quit [Client Quit]
azlon has joined #ruby
dhruvasagar has joined #ruby
berto- has joined #ruby
drale2k has quit [Quit: Leaving...]
sphughes99 has left #ruby [#ruby]
regedarek has quit [Ping timeout: 240 seconds]
sambio has quit []
azlon has quit [Ping timeout: 256 seconds]
nari has joined #ruby
yashshah_ has joined #ruby
filipe has joined #ruby
chaluopa has joined #ruby
rickmasta has quit [Ping timeout: 256 seconds]
regedarek has joined #ruby
spychalski has joined #ruby
amh345 has quit [Ping timeout: 256 seconds]
rickmasta has joined #ruby
postmodern has quit [Ping timeout: 260 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
ritek has quit [Remote host closed the connection]
ritek has joined #ruby
nomadic_ has quit [Quit: -bye-]
pcarrier_ has joined #ruby
amh345 has joined #ruby
drale2k has joined #ruby
spychalski has quit [Ping timeout: 256 seconds]
spychalski has joined #ruby
pitzips has quit [Remote host closed the connection]
fixl has quit [Remote host closed the connection]
azlon has joined #ruby
[rust] has quit [Quit: Leaving]
theRoUS has joined #ruby
a_a_g has joined #ruby
pcarrier_ has quit []
azlon has quit [Ping timeout: 240 seconds]
spychalski has quit [Ping timeout: 240 seconds]
spychalski has joined #ruby
<shock_one> Is there a more concise way to get the file directory than this: File.expand_path(File.dirname(__FILE__)
azlon has joined #ruby
blacktulip has joined #ruby
<MrZYX> on ruby 2.0 there's __dir__, previously, not that I'm aware of
blaxter_ has joined #ruby
postmodern has joined #ruby
<shock_one> I can't use __dir__, but just out of curiosity — is it expanded path or not?
azlon has quit [Ping timeout: 240 seconds]
<MrZYX> even calls realpath behind the scenes iirc
<shock_one> And why the fuck it's in lower case letters?
<MrZYX> because it's a method
arya_ has joined #ruby
spychalski has quit [Ping timeout: 245 seconds]
spychalski has joined #ruby
zeroeth has quit [Ping timeout: 240 seconds]
azlon has joined #ruby
alup has joined #ruby
kofno has joined #ruby
rickmasta has quit [Read error: Connection reset by peer]
timonv has joined #ruby
spychalski has quit [Ping timeout: 255 seconds]
matayam has quit [Remote host closed the connection]
spychalski has joined #ruby
<marcdel> does anyone know why accessing an array of 5 elements with ar[5,0] it returns [] but ar[6,0] returns nil?
<TTilus> MrZYX: if you still care i thought id whip up something rough along the lines i'd be doing if i'd absolutely need to accomplish that in ruby http://pastie.org/private/wcnsnpmrpdwxjzjfnt5hq
<MrZYX> wrong user ;P
kofno has quit [Ping timeout: 245 seconds]
shevy has quit [Ping timeout: 256 seconds]
sayan has quit [Read error: Connection reset by peer]
<TTilus> MrZYX: sorry, ment amn
<TTilus> (/me is wondering ho on earth did i manage to do a typo like that
azlon has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
rickmasta has joined #ruby
blaxter_ has quit [Ping timeout: 256 seconds]
arya_ has quit [Ping timeout: 252 seconds]
Astral_ has joined #ruby
chandan_kumar has quit [Quit: Leaving]
Hanmac1 has joined #ruby
<TTilus> *duh*
Hanmac has quit [Ping timeout: 255 seconds]
<TTilus> amh345: if you still care
arya_ has joined #ruby
spychalski has quit [Ping timeout: 260 seconds]
Astralum has quit [Ping timeout: 240 seconds]
eldariof has joined #ruby
danslo has quit [Quit: danslo]
timonv has quit [Remote host closed the connection]
azlon has joined #ruby
arturaz has quit [Remote host closed the connection]
stuartrexking has quit [Quit: Leaving...]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
arturaz has joined #ruby
spychals1i has joined #ruby
thebastl has joined #ruby
azlon has quit [Ping timeout: 245 seconds]
Faris8 has joined #ruby
arya_ has quit []
azlon has joined #ruby
afd__ has quit [Read error: Connection reset by peer]
nomenkun_ has quit [Remote host closed the connection]
shevy has joined #ruby
bubblehead has joined #ruby
bubblehead has quit [Read error: Connection reset by peer]
spychals1i has quit [Ping timeout: 252 seconds]
bubblehead has joined #ruby
mengu has joined #ruby
blaxter_ has joined #ruby
rburton- has quit [Quit: Leaving...]
obs has joined #ruby
yashshah_ has quit [Read error: Connection reset by peer]
emocakes has joined #ruby
Aiur has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mengu has quit [Client Quit]
[eDu] has joined #ruby
spychalski has joined #ruby
mengu has joined #ruby
mengu has quit [Client Quit]
sleetdrop has joined #ruby
nari has quit [Ping timeout: 240 seconds]
io_syl_ has joined #ruby
robscomputer has quit [Remote host closed the connection]
dhruvasagar has quit [Remote host closed the connection]
ritek has quit [Remote host closed the connection]
io_syl has quit [Ping timeout: 246 seconds]
io_syl_ is now known as io_syl
BizarreCake has joined #ruby
matayam has joined #ruby
dhruvasagar has joined #ruby
Animawish has joined #ruby
yashshah has joined #ruby
spychalski has quit [Ping timeout: 240 seconds]
<Animawish> i'm trying to use yaml in a program, but I'm getting this when I try to run the program: https://gist.github.com/AnimaWish/5283732
bubblehead has quit [Ping timeout: 240 seconds]
spychalski has joined #ruby
ritek has joined #ruby
<MrZYX> Animawish: show code
<MrZYX> now read the error message
Hanmac has joined #ruby
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
<Animawish> change w to r?
<MrZYX> yeah, though I prefer YAML.load_file personally
Hanmac1 has quit [Ping timeout: 252 seconds]
nari has joined #ruby
sleetdrop has quit [Ping timeout: 246 seconds]
spychalski has quit [Ping timeout: 256 seconds]
spychalski has joined #ruby
sleetdrop has joined #ruby
<Animawish> serialization is new territory for me. should I be using yaml? or would marshal be better?
raycloud has quit [Read error: Connection reset by peer]
raycloud has joined #ruby
<MrZYX> hm I think I prefer YAML for simple data structures, like arrays and hashes and marshal to actually store abitrary ruby objects
Demux has joined #ruby
ryanf has left #ruby [#ruby]
chaluopa has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
<Animawish> I'm getting this error now: shows.rb:189:in `block in <main>': private method `puts' called for false:FalseClass (NoMethodError)
<MrZYX> YAML.load_file returns a hash, not a file object
apeiros_ has joined #ruby
[eDu] has left #ruby [#ruby]
arturaz has quit [Remote host closed the connection]
<MrZYX> also it returns false if you point it to an empty file
<Animawish> is there a decent guide for yaml? i feel like i'm stumbling around in the dark, essentially copying some random blog
io_syl has quit [Quit: Computer has gone to sleep.]
decoponio has joined #ruby
<Hanmac> MrZYX: YAML.load_file does not return an hash (anymore) but something that can be turned into an hash
BadQuanta has quit [Ping timeout: 252 seconds]
francisfish has quit [Ping timeout: 240 seconds]
daed has quit [Ping timeout: 252 seconds]
spychalski has quit [Ping timeout: 256 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
daed has joined #ruby
dmoctezuma has joined #ruby
spychalski has joined #ruby
ritek has quit [Ping timeout: 245 seconds]
<MrZYX> Hanmac: are you sure? http://paste.mrzyx.de/show.php?id=1396
hamakn has quit [Remote host closed the connection]
<Hanmac> fu canyou pastie me a yaml test file? currently i dont have some there
kofno has joined #ruby
emergion has joined #ruby
sonda has joined #ruby
hamakn has joined #ruby
emergion has quit [Client Quit]
sleetdrop has quit [Quit: Computer has gone to sleep.]
spychalski has quit [Ping timeout: 246 seconds]
Nisstyre-laptop has quit [Ping timeout: 260 seconds]
<Hanmac> huch you are right it was a hash ... (hm maybe it was json that does not return an hash?)
kofno has quit [Ping timeout: 260 seconds]
spychalski has joined #ruby
arturaz has joined #ruby
sleetdrop has joined #ruby
<MrZYX> JSON.load too looks very hashy to me
wudofyr has quit [Remote host closed the connection]
<Animawish> i'm having a hard time dumping with yaml. "file.puts YAML::dump($series)" is giving the false class error. what should I be doing?
dormousy- has quit [Quit: ZNC - http://znc.in]
<MrZYX> file is false, not a File object
dormousy has joined #ruby
chandankumar has joined #ruby
<Animawish> how do i make it true?
<Animawish> or a file object
<Animawish> :P
<MrZYX> by opening a file
<Animawish> as it stands now file = YAML.load(File.open("/Users/Caius/Documents/Notes/series.yaml"))
chandankumar is now known as chandan_kumar
wudofyr has joined #ruby
<Animawish> isn't a file being opened?
<MrZYX> that gives you the contents of the file, interpreted as YAML, as a hash, not a File object (actually it gives you false currently, likely because the file is empty)
spychalski has quit [Ping timeout: 246 seconds]
<Animawish> :O it workssssssssss
<Animawish> this is the greatest thing ever
<MrZYX> now make it a class and don't use global variables ;)
spychalski has joined #ruby
<Animawish> but dollar signs are my friends :c
<Hanmac> only in your pocket
<MrZYX> actually, they only pretend, they stab you in the back the moment you turn around
Axsuul has quit [Ping timeout: 252 seconds]
<Animawish> they've been lying to me all this time?
<MrZYX> yes
browndawg has joined #ruby
<MrZYX> just carefully step away from them, keeping an eye on them while doing so
<Animawish> if there's one thing I'm bad at in ruby, it's classes.
whowantstolivefo has quit [Ping timeout: 245 seconds]
<Animawish> which is kind of hilarious if you think about it
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<Animawish> because that means i'm kind of missing the entire point
<MrZYX> you're actually kindof working in one currently, try p self.class ;P
<Animawish> :P
<MrZYX> gotta go now, hf ;)
MrZYX is now known as MrZYX|off
<Animawish> thanks for the help MrZYX|off :3
pi3r has joined #ruby
spychalski has quit [Ping timeout: 256 seconds]
spychalski has joined #ruby
mengu has joined #ruby
spychalski has quit [Ping timeout: 245 seconds]
spychalski has joined #ruby
arturaz has quit [Remote host closed the connection]
a_a_g1 has joined #ruby
whowantstolivefo has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
adambeynon has joined #ruby
[eDu] has joined #ruby
a_a_g has quit [Ping timeout: 245 seconds]
penzur has left #ruby [#ruby]
codesoda has joined #ruby
spychalski has quit [Ping timeout: 260 seconds]
maxmanders has joined #ruby
spychalski has joined #ruby
shock_one has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 256 seconds]
thufir_ has joined #ruby
ToApolytoXaos has joined #ruby
bubblehead has joined #ruby
maxmanders has quit [Ping timeout: 240 seconds]
nomenkun has joined #ruby
marcdel has quit []
spychalski has quit [Ping timeout: 240 seconds]
[eDu] has quit [Quit: [eDu]]
Animawish has left #ruby [#ruby]
spychalski has joined #ruby
maxmanders has joined #ruby
dormousy has left #ruby [#ruby]
bubblehead has quit [Ping timeout: 260 seconds]
Fuzai has joined #ruby
shock_one has joined #ruby
Fuzai has quit [Client Quit]
workmad3 has joined #ruby
Boohbah has quit [Ping timeout: 258 seconds]
dnyy has quit [Remote host closed the connection]
jacobbednarz has joined #ruby
azlon has quit [Ping timeout: 260 seconds]
spychalski has quit [Ping timeout: 255 seconds]
spychalski has joined #ruby
vlad_starkov has joined #ruby
Derpfiend has joined #ruby
azlon has joined #ruby
answer_42 has quit [Read error: Operation timed out]
Aiur has joined #ruby
arturaz has joined #ruby
azlon has quit [Ping timeout: 245 seconds]
shock_one has quit [Ping timeout: 252 seconds]
tootooroo has quit [Ping timeout: 252 seconds]
kofno has joined #ruby
azlon has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
drumond1_ has joined #ruby
eldariof has quit [Read error: No route to host]
txdv_ is now known as txdv
nomadic has joined #ruby
drumond19 has quit [Ping timeout: 258 seconds]
mrwn_ has joined #ruby
<mrwn_> hi, how can i combine this two lines into one https://gist.github.com/mrwnmonm/5283963
codecop has joined #ruby
spychalski has quit [Ping timeout: 245 seconds]
kofno has quit [Ping timeout: 255 seconds]
spychalski has joined #ruby
<apeiros_> mrwn_: use parens in your .gsub, then just chain the .sub
<apeiros_> mrwn_: also, don't use @ivars for temporary values, use lvars
azlon has quit [Ping timeout: 245 seconds]
Villadelfia_ has quit [Remote host closed the connection]
SeySayux has quit [Remote host closed the connection]
evangelosavgerin has joined #ruby
<mrwn_> aperiros_: oh thank, i didn't know it can be chained, thanks man
<apeiros_> mrwn_: also, use tab completion for nick names in irc - makes you not typo them :-p
SeySayux has joined #ruby
<evangelosavgerin> Hello guys, Need some help. I'm doing an api call with HTTParty to an API written in Java with Gson, but instead of getting a Json (hash) i'm getting a String. Does anybody know how to parse it?
postmodern has quit [Quit: Leaving]
<apeiros_> evangelosavgerin: JSON.parse
<evangelosavgerin> apeiros_: lemme try
<evangelosavgerin> apeiros_: thanks a lot mate!
<mrwn_> apeiros_: oh i didn't know that, thanks for the info
Villadelfia has joined #ruby
mrwn_ has quit [Quit: Page closed]
azlon has joined #ruby
yacks has quit [Ping timeout: 245 seconds]
My_Hearing has joined #ruby
spychalski has quit [Ping timeout: 256 seconds]
[eDu] has joined #ruby
spychalski has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
yacks has joined #ruby
<evangelosavgerin> ls
<lkba> dir
noop has quit [Ping timeout: 245 seconds]
azlon has quit [Ping timeout: 245 seconds]
azlon has joined #ruby
arturaz has quit [Remote host closed the connection]
_emptymag00 has quit [Ping timeout: 245 seconds]
daniel_- has joined #ruby
spychalski has quit [Ping timeout: 260 seconds]
spider-mario has joined #ruby
spychalski has joined #ruby
emergion has joined #ruby
jacobbednarz has quit [Quit: Laters.]
crazysim has quit [Ping timeout: 252 seconds]
<rubarLion> does irb have a max length for an aarray
<rubarLion> full thing isn't showing
[eDu] has quit [Quit: [eDu]]
<apeiros_> rubarlion: no
yashshah has quit [Read error: Connection reset by peer]
<apeiros_> vanilla irb does not
azlon has quit [Ping timeout: 255 seconds]
yashshah has joined #ruby
rickmasta has quit [Quit: Leaving...]
rickmasta has joined #ruby
jimeh has joined #ruby
azlon has joined #ruby
spychalski has quit [Ping timeout: 255 seconds]
spychalski has joined #ruby
crazysim has joined #ruby
freeayu has quit [Remote host closed the connection]
_bart has left #ruby [#ruby]
buibex has joined #ruby
baba has quit [Quit: WeeChat 0.4.0]
baba has joined #ruby
Skofo has quit [Quit: Leaving]
spychalski has quit [Ping timeout: 245 seconds]
spychalski has joined #ruby
devoper has joined #ruby
rdx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
emptymag00 has joined #ruby
noop has joined #ruby
jnoob22 has quit [Remote host closed the connection]
spychalski has quit [Ping timeout: 256 seconds]
spychalski has joined #ruby
Derpfiend has quit [Quit: Leaving]
mediko has quit [Ping timeout: 240 seconds]
mediko has joined #ruby
skattyadz has joined #ruby
Zolo has joined #ruby
Guedes0 is now known as Guedes
Guedes has quit [Changing host]
Guedes has joined #ruby
spychalski has quit [Ping timeout: 240 seconds]
Neomex has joined #ruby
Neomex has quit [Client Quit]
spychalski has joined #ruby
azlon has quit [Ping timeout: 240 seconds]
nari has quit [Ping timeout: 240 seconds]
buibex has quit [Remote host closed the connection]
_JamieD_ has joined #ruby
eka has joined #ruby
Layke has quit [Ping timeout: 240 seconds]
drale2k has quit [Quit: Leaving...]
ARCADIVS has quit [Quit: WeeChat 0.3.8]
kofno has joined #ruby
Giorgio has joined #ruby
br4ndon has joined #ruby
end_guy_ has quit [Ping timeout: 276 seconds]
browndawg has quit [Quit: Leaving.]
kofno has quit [Ping timeout: 256 seconds]
perun_ has quit [Ping timeout: 264 seconds]
end_guy has joined #ruby
ananthakumaran has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 256 seconds]
dmoctezuma has quit [Remote host closed the connection]
IRLConor_ has quit [Quit: leaving]
IRLConor has joined #ruby
LennyLinux has joined #ruby
charliesome has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby
Zolo has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
drumond1_ has quit [Remote host closed the connection]
Layke has joined #ruby
drumond19 has joined #ruby
andrew12 has quit [Quit: never coming back]
charliesome has joined #ruby
dayepa_ has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
rubarlion2 has joined #ruby
rubarLion has quit [Ping timeout: 260 seconds]
lunarjar has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
bubblehead has joined #ruby
dhruvasagar has joined #ruby
timonv has joined #ruby
daniel_- has quit [Ping timeout: 256 seconds]
Mattx has quit [Remote host closed the connection]
chandan_kumar has quit [Quit: Leaving]
thufir_ has quit [Quit: Leaving.]
bubblehead has quit [Ping timeout: 246 seconds]
punkrawkR has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
buibex has joined #ruby
rubarlion2 has quit [Ping timeout: 256 seconds]
[eDu] has joined #ruby
noop has quit [Ping timeout: 245 seconds]
classix has quit [Ping timeout: 255 seconds]
jonahR has quit [Quit: jonahR]
chandankumar has joined #ruby
classix has joined #ruby
andrew12 has joined #ruby
dkannan has joined #ruby
buibex has quit [Ping timeout: 256 seconds]
emocakes has quit [Quit: emocakes]
Aiur has quit [Read error: Connection reset by peer]
Aiur has joined #ruby
perun_ has joined #ruby
xaq has joined #ruby
angusiguess has joined #ruby
slainer68 has joined #ruby
rubarLion has joined #ruby
whitedawg has joined #ruby
noop has joined #ruby
Iszak has joined #ruby
berto- has quit [Quit: berto-]
davetherat has joined #ruby
drumond19 has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 256 seconds]
tenmilestereo has joined #ruby
whitedawg has quit [Quit: Leaving.]
Domon has quit [Remote host closed the connection]
jnoob22 has joined #ruby
kofno has joined #ruby
Neomex has joined #ruby
dkannan_ has joined #ruby
francisfish has joined #ruby
codesoda has quit [Remote host closed the connection]
justsee has quit [Remote host closed the connection]
dkannan has quit [Ping timeout: 240 seconds]
dkannan_ is now known as dkannan
verysoftoiletppr has joined #ruby
[eDu] has quit [Read error: Connection reset by peer]
sleetdrop has quit [Ping timeout: 240 seconds]
maj has joined #ruby
arya has joined #ruby
rubarLion has quit [Read error: Connection reset by peer]
nkr has joined #ruby
thone_ has joined #ruby
bitZero__ has quit [Ping timeout: 245 seconds]
arya has quit [Ping timeout: 248 seconds]
[eDu] has joined #ruby
bitZero__ has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
thone has quit [Ping timeout: 256 seconds]
eldariof has joined #ruby
[eDu] has quit [Read error: Connection reset by peer]
Sicp has joined #ruby
[eDu] has joined #ruby
sepp2k has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
Giorgio has quit [Ping timeout: 255 seconds]
evangelosavgerin has quit [Ping timeout: 260 seconds]
jurassic_ has quit [Quit: jurassic_]
rubarLion has joined #ruby
arya has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
[eDu] has quit [Quit: [eDu]]
arya has quit [Client Quit]
dylan has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
yashshah has joined #ruby
megha has joined #ruby
Rioji has quit [Remote host closed the connection]
a_a_g1 has quit [Quit: Leaving.]
charliesome has joined #ruby
baba has quit [Ping timeout: 256 seconds]
ananthakumaran has quit [Read error: Connection timed out]
workmad3 has quit [Ping timeout: 252 seconds]
niklasb has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
evangelosavgerin has joined #ruby
tommyvyo has joined #ruby
ananthakumaran has quit [Client Quit]
ananthakumaran has joined #ruby
ASDAIWU has joined #ruby
dsadsdasd has joined #ruby
obs has quit [Read error: Connection reset by peer]
tommyvyo has quit [Client Quit]
obs has joined #ruby
Catbuntu has joined #ruby
Catbuntu is now known as Guest60790
rubarLion has quit [Ping timeout: 246 seconds]
arya has joined #ruby
jimeh has joined #ruby
Zolo has joined #ruby
maj has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
arya_ has joined #ruby
atmosx has joined #ruby
tootooroo has joined #ruby
arya has quit [Ping timeout: 248 seconds]
nari has joined #ruby
tommyvyo has joined #ruby
rubarLion has joined #ruby
end_guy has quit [Ping timeout: 276 seconds]
arya has joined #ruby
arturaz has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
bubblehead has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
EPIK has quit [Ping timeout: 256 seconds]
Aiur has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
jimeh has joined #ruby
tommyvyo has quit [Quit:]
ssms has joined #ruby
verysoftoiletppr has quit []
etank has quit [Quit: WeeChat 0.4.0]
verysoftoiletppr has joined #ruby
atmosx has quit [Quit: And so the story goes…]
burgestrand has joined #ruby
arya has joined #ruby
yshh has quit [Remote host closed the connection]
browndawg has joined #ruby
jimeh has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Remote host closed the connection]
mattso has joined #ruby
<mattso> hey guys
<mattso> has anyone got experience working with an imap library?
Xeago has quit [Remote host closed the connection]
<mattso> I want to be able to send/search/receive e-mails using the library
Zolo has quit [Remote host closed the connection]
<mattso> implementing imap it a tough job so I'de prefer to use a good implementation of it
altivec has quit [Ping timeout: 245 seconds]
jimeh has joined #ruby
mark_locklear has joined #ruby
Iszak has quit [Quit: Computer has gone to sleep.]
arya has quit []
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
jurassic_ has joined #ruby
Sicp has quit [Ping timeout: 256 seconds]
jimeh has quit [Ping timeout: 260 seconds]
rubarLion has quit [Read error: Connection reset by peer]
<apeiros_> mattso: take a look at the `mail` gem
<mattso> apeiros_: thanks
tenmilestereo has quit [Quit: Leaving]
subbyyy has joined #ruby
Doc_X has quit [Remote host closed the connection]
Iszak has joined #ruby
skroon has joined #ruby
[Neurotic] has quit [Remote host closed the connection]
chimkan_ has joined #ruby
yacks has joined #ruby
codesoda has joined #ruby
nfk has joined #ruby
Doc_X has joined #ruby
invisime has joined #ruby
tommyvyo has joined #ruby
divout has quit [Remote host closed the connection]
theRoUS has quit [Ping timeout: 245 seconds]
arya_ has joined #ruby
rubarLion has joined #ruby
nezumi has quit [Ping timeout: 240 seconds]
codesoda has quit [Ping timeout: 240 seconds]
geekbri has joined #ruby
justsee has quit [Ping timeout: 245 seconds]
lewix has joined #ruby
hogeo has quit [Remote host closed the connection]
iPhoneMRZ has joined #ruby
codesoda has joined #ruby
iPhoneMRZ has quit [Remote host closed the connection]
arya_ has quit [Client Quit]
carloslopes has joined #ruby
hogeo has joined #ruby
rubarLion has quit [Ping timeout: 246 seconds]
carloslopes has quit [Remote host closed the connection]
carloslopes has joined #ruby
hashmal has joined #ruby
rubarLion has joined #ruby
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Remote host closed the connection]
jnoob22 has quit [Remote host closed the connection]
dormousy has joined #ruby
hogeo has quit [Ping timeout: 245 seconds]
filipe has quit [Read error: Operation timed out]
jnoob22 has joined #ruby
Guest60790 has quit [Quit: Leaving]
hashmal has quit [Quit: Textual IRC Client: www.textualapp.com]
yashshah has quit [Ping timeout: 256 seconds]
slainer68 has quit [Remote host closed the connection]
yashshah has joined #ruby
jurassic_ has quit [Quit: jurassic_]
chandankumar has quit [Ping timeout: 245 seconds]
tommyvyo has quit [Quit:]
Giorgio has joined #ruby
jurassic_ has joined #ruby
ASDAIWU has quit [Ping timeout: 252 seconds]
krawchyk has joined #ruby
krawchyk has quit [Remote host closed the connection]
<shevy> hmm anyone remembers offhand what .transpose does? I see it in code from someone else...
krawchyk has joined #ruby
dustint has joined #ruby
arya has joined #ruby
Xeago has joined #ruby
browndawg1 has joined #ruby
br4ndon has joined #ruby
evangelosavgerin has quit [Ping timeout: 245 seconds]
wmoxam has joined #ruby
br4ndon_ has joined #ruby
DonRichie has joined #ruby
filipe has joined #ruby
sailias has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
paolooo has joined #ruby
NiteRain has quit [Ping timeout: 255 seconds]
<apeiros_> shevy: well, it does exactly what its name says - it transposes an array. see Array#transpose
<apeiros_> >> [[1,2,3,4],[:a, :b, :c, :d]].transpose
<eval-in> apeiros_ => [[1, :a], [2, :b], [3, :c], [4, :d]] (http://eval.in/14180)
backjlack_ has joined #ruby
<shevy> hmm
<shevy> I think I need a dictionary to understand what the word transpose even means hehehe
<shevy> hmm... "austauschen"
br4ndon has quit [Ping timeout: 260 seconds]
<shevy> ok, that makes sense
<shevy> thanks apeiros_
<apeiros_> well, it's the mathematical transposition, transposing a matrix
backjlack_ has quit [Client Quit]
backjlack has quit [Ping timeout: 264 seconds]
angusiguess has quit [Ping timeout: 256 seconds]
burgestrand has quit [Quit: Leaving.]
codesoda has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 245 seconds]
jgarvey has joined #ruby
dormoose has joined #ruby
mattso has quit [Ping timeout: 245 seconds]
backjlack has joined #ruby
chussenot has joined #ruby
chussenot has quit [Read error: Connection reset by peer]
Guest61083 has joined #ruby
wolcanus has joined #ruby
wolcanus has quit [Remote host closed the connection]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
wolcanus has joined #ruby
krawchyk_ has joined #ruby
krawchyk_ has quit [Remote host closed the connection]
chussenot has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
chussenot has quit [Client Quit]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
Banistergalaxy has quit [Ping timeout: 272 seconds]
chimkan_ has left #ruby [#ruby]
banister_ has quit [Ping timeout: 258 seconds]
br4ndon has joined #ruby
krawchyk has quit [Ping timeout: 246 seconds]
_nitti has joined #ruby
emptymag00 has quit [Read error: Connection reset by peer]
br4ndon_ has quit [Ping timeout: 245 seconds]
br4ndon has quit [Client Quit]
jtharris has joined #ruby
bean has joined #ruby
freeayu has joined #ruby
banisterfiend has joined #ruby
Guest61083 has quit [Ping timeout: 252 seconds]
andrea93 has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
adkron has joined #ruby
ASDAIWU has joined #ruby
joofsh has joined #ruby
breakingthings has joined #ruby
joofsh has quit [Remote host closed the connection]
divout has joined #ruby
andrea93 has quit [Killed (idoru (Spam is off topic on freenode.))]
yshh has joined #ruby
TooTubular has joined #ruby
jerius has joined #ruby
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
yshh has quit [Ping timeout: 245 seconds]
ASDAIWU has quit [Ping timeout: 245 seconds]
cmarques has joined #ruby
tcopp has joined #ruby
niklasb has quit [Quit: WeeChat 0.4.0]
tommyvyo has joined #ruby
bigoldrock has joined #ruby
rubarLion has quit [Ping timeout: 240 seconds]
artem has joined #ruby
benwoody has left #ruby [#ruby]
_nitti has quit [Remote host closed the connection]
heftig has quit [Quit: Quitting]
joofsh has joined #ruby
Sicp has joined #ruby
a_a_g has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
paolooo has quit [Quit: Page closed]
Sicp has quit [Max SendQ exceeded]
Sicp has joined #ruby
niklasb has joined #ruby
angusiguess has joined #ruby
lewix has quit [Remote host closed the connection]
angusiguess has quit [Client Quit]
dhruvasagar has joined #ruby
mmitchell has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
justsee has quit [Ping timeout: 256 seconds]
heftig has joined #ruby
failshell has joined #ruby
alanp has joined #ruby
volte has joined #ruby
lewix has joined #ruby
volte_ has quit [Ping timeout: 256 seconds]
slainer68 has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
ttt has quit [Remote host closed the connection]
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
sleetdrop has joined #ruby
chessguy has joined #ruby
evangelosavgerin has joined #ruby
slainer68 has quit [Ping timeout: 256 seconds]
eldariof has quit [Read error: No route to host]
skroon has quit [Read error: Connection reset by peer]
chessguy has quit [Ping timeout: 245 seconds]
skroon has joined #ruby
ffranz has joined #ruby
ssms_ has joined #ruby
jtharris has quit [Ping timeout: 246 seconds]
thebastl has quit [Read error: Operation timed out]
ssms_ has quit [Client Quit]
hiyakashi has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
ssms has quit [Ping timeout: 240 seconds]
failshell has quit [Remote host closed the connection]
failshell has joined #ruby
[eDu] has joined #ruby
jonathanwallace has joined #ruby
dkannan has quit [Quit: dkannan]
_nitti has joined #ruby
rubarLion has joined #ruby
akashj87 has joined #ruby
Al_ has joined #ruby
mneorr has joined #ruby
Giorgio has quit [Remote host closed the connection]
<shevy> damn
<shevy> today is 1. april
<shevy> the fake-news counter is raising :(
<shevy> increasing, rather...
doodlehaus has joined #ruby
cout_ is now known as cout
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
nricciar has quit [Ping timeout: 255 seconds]
rawler has quit [Ping timeout: 245 seconds]
rawler has joined #ruby
bean has quit [Ping timeout: 240 seconds]
[eDu]_ has joined #ruby
nari has quit [Ping timeout: 256 seconds]
bradleyprice has joined #ruby
[eDu] has quit [Ping timeout: 240 seconds]
[eDu]_ is now known as [eDu]
bean has joined #ruby
cpruitt has joined #ruby
hogeo has joined #ruby
Jork1 has joined #ruby
Jork1 has left #ruby [#ruby]
xaq has quit [Remote host closed the connection]
emmanuelux has joined #ruby
joast has joined #ruby
internet_user has joined #ruby
[eDu] has quit [Ping timeout: 260 seconds]
chandankumar has joined #ruby
sambao21 has joined #ruby
interactionjaxsn has joined #ruby
altivec has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
angusiguess has joined #ruby
maxmanders has joined #ruby
Neomex has quit [Quit: Neomex]
Iszak has quit [Quit: Computer has gone to sleep.]
jpfuentes2 has joined #ruby
SCommette has joined #ruby
joofsh has quit [Remote host closed the connection]
alex__c2022 has joined #ruby
alex__c2022 has quit [Remote host closed the connection]
jtharris has joined #ruby
sonots has joined #ruby
Iszak has joined #ruby
yshh has joined #ruby
buibex has joined #ruby
momomomomo has joined #ruby
nateberkopec has joined #ruby
classix has quit [Ping timeout: 245 seconds]
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
i42n_ has left #ruby [#ruby]
shock_one has joined #ruby
classix has joined #ruby
rubarLion has quit [Read error: Network is unreachable]
Astral__ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
xaq has joined #ruby
sayan has joined #ruby
mneorr has quit [Remote host closed the connection]
puppeh has quit [Remote host closed the connection]
kpshek has joined #ruby
mneorr has joined #ruby
davetherat has quit [Read error: Connection reset by peer]
davetherat has joined #ruby
Astral_ has quit [Ping timeout: 260 seconds]
nobitanobi has joined #ruby
enricostn has joined #ruby
excalq has joined #ruby
Al_ has quit [Quit: Al_]
MissionCritical has quit [Ping timeout: 248 seconds]
Heero has quit [Ping timeout: 260 seconds]
xaq has quit [Ping timeout: 240 seconds]
joofsh has joined #ruby
<enricostn> hi, which ImageMagick gem should I use to get something like `convert -thumbnail 40x40 file.pdf[0] thumb.png` ?
<enricostn> I just need to convert the first pdf page
<enricostn> into a thumbnail
mneorr has quit [Ping timeout: 240 seconds]
momomomomo has quit [Quit: momomomomo]
ndboost has joined #ruby
<bean> rmagick?
<bean> not sure
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
excalq has quit [Read error: Connection reset by peer]
ofcan has joined #ruby
crazed_ is now known as crazed
adamjleonard has joined #ruby
<ofcan> Hi guys, I was just browsing the open source code for Jekyll project and have stumbled upon code I don't understand, can someone please help me? the code with the question is here, thanks > http://stackoverflow.com/questions/15745258/ruby-generating-configuration-hash-with-reduce
awarner has joined #ruby
nobitanobi has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
rubarLion has joined #ruby
arturaz has quit [Read error: Connection reset by peer]
<Hanmac> ofcan: the reduce line us used to turn {key: "value"} into {"key" => "value"}
<Xeago> the {} as an argument adds a hash that can be used to add the k,v pairs to
Mission-Critical has joined #ruby
<Xeago> that hash is then used to assign it to override
theRoUS_ has joined #ruby
pi3r has quit [Quit: Leaving]
theRoUS_ has quit [Changing host]
theRoUS_ has joined #ruby
theRoUS has quit [Disconnected by services]
theRoUS_ is now known as theRoUS
theRoUS_ has joined #ruby
doja has joined #ruby
momomomomo has joined #ruby
freeayu has quit [Remote host closed the connection]
akashj87 has quit [Quit: leaving]
yashshah has quit [Read error: Connection reset by peer]
ryannielson has joined #ruby
breakingthings has quit []
Guest61083 has joined #ruby
pavilionXP has joined #ruby
buibex has quit [Remote host closed the connection]
doja has left #ruby [#ruby]
Al_ has joined #ruby
yashshah has joined #ruby
[0x1a]_ has quit [Changing host]
[0x1a]_ has joined #ruby
[0x1a]_ has joined #ruby
Xeago has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
verysoftoiletppr has quit []
jpfuentes2 has quit [Quit: Textual IRC Client: www.textualapp.com]
Mission-Critical is now known as MissionCritical
yshh has quit [Read error: Connection reset by peer]
endzyme has joined #ruby
yshh has joined #ruby
endzyme has quit [Remote host closed the connection]
[0x1a]_ is now known as [0x1a]
girija has quit [Ping timeout: 255 seconds]
cantonic has joined #ruby
juarlex has quit [Remote host closed the connection]
spider-mario has quit [Remote host closed the connection]
akashj87 has joined #ruby
ndboost has quit [Remote host closed the connection]
endzyme has joined #ruby
niklasb has quit [Read error: No route to host]
endzyme has quit [Read error: Connection reset by peer]
endzyme has joined #ruby
nricciar has joined #ruby
niklasb has joined #ruby
lusory has quit [Quit: leaving]
endzyme has quit [Read error: Connection reset by peer]
endzyme has joined #ruby
Guest61083 has quit [Ping timeout: 240 seconds]
pavilionXP has quit [Read error: Connection reset by peer]
danslo has joined #ruby
jpfuentes2 has joined #ruby
smigg has joined #ruby
dhruvasagar has joined #ruby
maletor has joined #ruby
ttt has joined #ruby
bean has quit [Ping timeout: 240 seconds]
dnyy has joined #ruby
juarlex has joined #ruby
lewix has quit [Remote host closed the connection]
beiter has joined #ruby
nobitanobi has joined #ruby
tagrudev has quit [Remote host closed the connection]
bean has joined #ruby
generalissimo has joined #ruby
TheFuzzball has joined #ruby
aganov has quit [Remote host closed the connection]
ttt has quit [Ping timeout: 276 seconds]
dsadsdasd has quit [Quit: Leaving.]
bean has quit [Client Quit]
internet_user has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
theRoUS_ has quit [Ping timeout: 245 seconds]
kiwnix has joined #ruby
wolcanus has quit [Ping timeout: 245 seconds]
cmarques has quit [Ping timeout: 255 seconds]
theRoUS has quit [Ping timeout: 256 seconds]
huoxito has quit [Quit: Leaving]
Davey has joined #ruby
RedPunch has joined #ruby
momomomomo_ has joined #ruby
momomomomo has quit [Ping timeout: 240 seconds]
momomomomo_ is now known as momomomomo
anonymuse has joined #ruby
<RedPunch> @gist_counts = Hash[@gists.group_by { |g| g.gravatar_url }.map { |g, gists| [g, gists.length] }].sort_by {|_key, value| -value}
<RedPunch> Can somebody please modify that to create a @gists_author map. Given that the gists object has a field author
DrShoggoth has joined #ruby
wolcanus has joined #ruby
hiyakash_ has joined #ruby
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
Iszak has quit [Quit: Computer has gone to sleep.]
hiyakashi has quit [Quit: お前は知りすぎた]
cmarques has joined #ruby
Gwyxx has joined #ruby
havenwood has joined #ruby
workmad3 has joined #ruby
Ng|Adonixx4798 has quit [Read error: Connection reset by peer]
lusory has joined #ruby
geggam_wk has joined #ruby
stuartrexking has joined #ruby
buibex has joined #ruby
stuartrexking has quit [Client Quit]
Iszak has joined #ruby
stuartrexking has joined #ruby
hogeo has quit [Ping timeout: 246 seconds]
mpfundstein has joined #ruby
jlast has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
rippa has joined #ruby
<ofcan> is this valid ruby code? >> if drafts_state = options.delete(:drafts) ? I saw it in some open source project and am wondering why is there no comparison operator instead of equals one?
jgrevich has joined #ruby
icole_ has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
jlast has joined #ruby
ckrailo has joined #ruby
alainus has left #ruby ["Leaving"]
baroquebobcat has joined #ruby
pygmael has quit [Quit: pygmael]
<apeiros_> yes it is valid
<apeiros_> @ ofcan
nobitanobi has quit [Ping timeout: 245 seconds]
<ofcan> apeiros_: can you explain? when I enter that in irb, it returns error...
interactionjaxsn has quit [Remote host closed the connection]
sonots has quit [Remote host closed the connection]
<havenwood> ofcan: If you use a = operator, Ruby knows you meant the == method: warning: found = in conditional, should be ==
<havenwood> **in an if-statement, I mean.
sonots has joined #ruby
rippa has quit [Client Quit]
<ofcan> havenwood: oh! so it is some kind of syntactic sugar?
<sepp2k> ofcan: Well, it's not valid just by itself. The "if" still needs a body and an "end".
rippa has joined #ruby
beiter has quit [Quit: beiter]
<sepp2k> havenwood: I'm pretty sure he didn't intend to use == here.
<havenwood> ofcan: Not sugar so much as throwing a warning but continuing when == makes sense and = doesn't.
nomenkun has quit [Remote host closed the connection]
theRoUS_ has joined #ruby
Al_ has quit [Quit: Al_]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<ofcan> also, where does this 'drafts_state' come from?
<havenwood> ofcan: Looks it up in the options hash.
<sepp2k> ofcan: It's being defined right there.
backjlack_ has joined #ruby
<sepp2k> = is assignment, not equality.
backjlack has quit [Ping timeout: 246 seconds]
<ofcan> sepp2k: defined and compared at the same time?
<sepp2k> No, nothing is being compared.
<havenwood> ofcan: The `=` on line 27 is an error that only works because Ruby is so kind to us. The `=` on line 28 is not an error, it is an assignment operator used correctly!
Xeago has joined #ruby
<sepp2k> havenwood: That's not true. Stop confusing him.
<havenwood> sepp2k: What isn't true?
<ofcan> yup, now I'm confused
<sepp2k> havenwood: That it's an error.
<sepp2k> The = on line 27 is an assignment operator just like on line 28.
<havenwood> sepp2k: Good idea to write -w safe code... If it throws a warning it is wrong.
<sepp2k> havenwood: If you replaced the = with a ==, THAT would be an error.
shock_one has quit [Ping timeout: 240 seconds]
<sepp2k> And Ruby never treats = as an equality operator.
pskosinski has joined #ruby
timonv has quit [Remote host closed the connection]
<ofcan> sepp2k: so we define drafts_state on line 27?
interactionjaxsn has joined #ruby
<havenwood> >> puts 'yes it does' if whatev = true
<eval-in> havenwood => /tmp/execpad-d1d35298ecf3/source-d1d35298ecf3:2: warning: found = in conditional, should be == ... (http://eval.in/14185)
<workmad3> I think what havenwood meant was that line 27 is a syntactically correct construct that could potentially be a typo-error
breakingthings has joined #ruby
<sepp2k> workmad3: But it isn't in this case.
<sepp2k> Line 27 works exactly as intended.
sayan has quit [Read error: Connection reset by peer]
baroquebobcat has quit [Quit: baroquebobcat]
lewix has joined #ruby
obs_ has joined #ruby
<sepp2k> If line 27 contained a ==, that would be a typo error that's syntactically valid.
<workmad3> no, but it's still not the most readable code, and it's so often an error that the interpreter has a warning specifically for it :)
astegman has joined #ruby
<sepp2k> The intent of line 27 is not to compare anything for equality.
<banisterfiend> workmad3: which client side js framework do you use?
<banisterfiend> workmad3: i mean MV*
<ofcan> sepp2k: aaah! got it! :D
bean has joined #ruby
<workmad3> banisterfiend: I don't use one exclusively
<banisterfiend> noob
<workmad3> banisterfiend: hell, the most recent JS stuff I've done, I didn't use one at all :)
backjlack_ has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
<banisterfiend> :P
backjlack has joined #ruby
<banisterfiend> workmad3: which ones have u looked at?
<workmad3> banisterfiend: we started with ember on that stuff, but pulled it out when we were getting event conflicts that we couldn't keep contained within ember (probably through misuse, but was still a problem :) )
<workmad3> banisterfiend: main ones I've done more than just play with are ember and backbone
<sepp2k> havenwood: Since that code prints "yes it does", the = is obviously not interpreted as ==. Otherwise it would complain about whatev not being defined.
_nitti has joined #ruby
<banisterfiend> workmad3: what do you think of backbone, and have you touched any of the frameworked built on top of it like marionette.js ?
bricker`LA has quit [Ping timeout: 256 seconds]
markalanevans has quit [Quit: markalanevans]
obs has quit [Ping timeout: 255 seconds]
vlad_starkov has joined #ruby
<workmad3> banisterfiend: I quite like backbone... it's simple enough that you can mould it to pretty much whatever you want
<havenwood> sepp2k: I'm just pointing out it throws a warning, isn't -w safe code. Error was probably not the correct term, I haven't had coffee yet. Going for coffee now, hopefully will improve my correctness!
markalanevans has joined #ruby
<banisterfiend> workmad3: have you figured out the best way to get it working with websockets rahter than http/rest ?
<workmad3> banisterfiend: if I redid the stuff I've been doing again, I'd probably do it in backbone rather than an abortive attempt at ember initially
<workmad3> banisterfiend: no, I've mostly just used rest apis so far in my js
<sepp2k> havenwood: It only produces a warning when you assign a constant though.
<havenwood> Brewing coffee with paper towels... grr.
<workmad3> banisterfiend: apart from my forays into meteor :)
<sepp2k> havenwood: It will not produce a warning for line 27 of the linked code.
bricker`LA has joined #ruby
<workmad3> banisterfiend: but then the actual comms details are hidden
<workmad3> banisterfiend: what are you playing with?
<havenwood> sepp2k: Uhhg, I just got what you're saying... I'm slow on the uptake - really going to go ghetto brew some coffee now!
tomzx_mac has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<banisterfiend> workmad3: marionette.js (built on backbone) and websockets. I really like it, i had a brief look at ember.js but it seemed like an overcomplicated clusterfuck
mahmoudimus has joined #ruby
moos3 has quit [Ping timeout: 240 seconds]
<workmad3> ember isn't too bad if you have the time to invest in learning it really well, and your UI events are pretty independent
mercwithamouth has joined #ruby
<workmad3> but, at least when I tried it, our UI wasn't really a good fit (but I didn't realise that at the time), it was still in development and changing a lot, and it was not clear at all how to test it
skroon has quit [Read error: Connection reset by peer]
skroon has joined #ruby
<banisterfiend> workmad3: do you use coffeescript primarily?
<workmad3> yeah
psyprus has quit [Changing host]
psyprus has joined #ruby
<workmad3> but then, I also use rails primarily, so I get the compilation in place pretty easy :)
markalanevans has quit [Ping timeout: 255 seconds]
obs_ is now known as obs
a_a_g has quit [Quit: Leaving.]
<workmad3> I think my future 'default' stack for my own projects would probably be minimal backbone with a JS repository wrapping the API rather than trying to build on top of an existing datastore library initially
<workmad3> and I quite like the way I used server-generated html templates that got manipulated by JS, rather than a massive JS templating solution like handlebars
ariedler has joined #ruby
lewix has quit [Remote host closed the connection]
<banisterfiend> workmad3: i guess it depends on how webappy your project is rather than websitey
tylersmith has joined #ruby
<workmad3> yeah, it's something I'd definitely say with JS frameworks... they're a *lot* more project-dependent than the web framework, IMO
lewix has joined #ruby
Qwak has joined #ruby
<workmad3> plain backbone is reasonably minimal, so is a good base to build something on initially, but if you know more about your project then you could make a more appropriate decision about framework
mercwithamouth has quit [Read error: Operation timed out]
<banisterfiend> workmad3: my interest in them is because i want to write cross platform apps, that i would typically have done in cocoa (which wouldn't have been cross platform :P)
<banisterfiend> really i'm doing offline webapp development i guess
cburyta has joined #ruby
Iszak has quit [Quit: Computer has gone to sleep.]
<workmad3> well, you can still do a lot with jQuery, a decent amount of discipline in maintaining app concerns, and local-storage :)
br4ndon has joined #ruby
wolcanus has quit [Remote host closed the connection]
<banisterfiend> workmad3: sure but MVC feels like the right way to do it, so i might as well use an MV* lib :)
<havenwood> Mental note: When wrong today, just yell "APRIL FOOLS!"
maycon__ has joined #ruby
<banisterfiend> workmad3: though backbone kind of confuses me with its take on mvc
<workmad3> banisterfiend: don't be certain on that front ;) the stuff I've been doing has actually fitted a lot more nicely into document-presenter style UI architecture than MVCs :)
<workmad3> banisterfiend: and backbone doesn't give you a full MVC, it gives you MV and leaves you to make a decision on C, P, VM, whatever
<havenwood> workmad3: What's your take on Ember.js?
failshel_ has joined #ruby
<banisterfiend> workmad3: do u have any links on document-presenter stuff? i've never heard of that
sleetdrop has quit [Ping timeout: 260 seconds]
frozenfoxx has joined #ruby
maycon_ has quit [Ping timeout: 255 seconds]
<workmad3> banisterfiend: you have a single document that contains your data, and it gets surrounded by a host of presenters
<workmad3> banisterfiend: it's distinguished from MVC as your document tends to be much lighter in functionality and domain-logic than the model in MVC
<banisterfiend> workmad3: but i want "widgets" :) and MVC seems like the best way to implement those
evangelosavgerin has quit [Ping timeout: 256 seconds]
sleetdrop has joined #ruby
<banisterfiend> workmad3: interesting
chrishough has joined #ruby
failshell has quit [Ping timeout: 256 seconds]
llaskin has joined #ruby
<workmad3> yes, MVC is a great fit for widgets :)
mercwithamouth has joined #ruby
<llaskin> https://gist.github.com/llaskin/3a2f14f0417853fa48b0 can I somehow call method b inside of method a?
ofcan has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<workmad3> banisterfiend: however, it'll be much more similar to traditional UI MVC, rather than the MVC of webapps, which is really closer to model-2 architecture http://en.wikipedia.org/wiki/Model_2
<sepp2k> llaskin: Please don't ask the same question in two channels at the same time. That just leads to confusion.
carloslopes has quit [Remote host closed the connection]
<workmad3> banisterfiend: ws http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller (notice how in that diagram, the model itself is responsible for updating the view)
<llaskin> sorry my bad
<workmad3> s/ws/vs/
<workmad3> banisterfiend: with widgets, what you really get is a host of 'little MVCs'... one for each widget
sonots has quit [Remote host closed the connection]
paradoja has joined #ruby
stuartrexking has quit [Quit: Leaving...]
<workmad3> banisterfiend: in my latest JS-heavy stuff, what we had was a server-side model that contained all the domain logic, on the client what we needed was just the data... so we had a data-store (our document) that contained update logic to maintain consistency with the server, and then a set of widget-ey things that all wrapped around this same document and presented different aspects of it, providing controls to update, etc.
RedPunch has left #ruby [#ruby]
<banisterfiend> workmad3: sounds cool
<workmad3> banisterfiend: it was kinda fun to get working :) but it wasn't really a good fit for ember (or MVC in general) in the client-side stuff
<frozenfoxx> I'm having some real serious issues getting rvm installed on a Debian testing box, anyone got a minute?
unstable has joined #ruby
<workmad3> banisterfiend: if you have more domain-logic in your client, then MVC becomes more reasonable again :)
<frozenfoxx> paste of the specific problem: http://pastie.org/7269485
pygmael has joined #ruby
<frozenfoxx> In short, when I do a rvm install ruby it gets down to where it's going to install rubygems and then chokes since it apparently is having an issue loading ruby...I think
<frozenfoxx> I've tried changing the ruby version to 1.9.3 and that also fails.
<frozenfoxx> Nothing special about the machine, just a straight-up Debian testing box and I've tried the quick system-wide installation method using sudo described on the RVM website.
<unstable> http://www.soulbroken.co.uk/code/sublimephpcs/ .. for php I have this sublime extension which checks my code for the proper idioms, there are facebook debugging tools to find undecared variables, unused variables, wrong number of arguments, etc etc etc. It finds code smell. Which is helpful for training me to produce less code smell. Is there something like this for ruby? Something that will tell me what the ruby/rails idioms are to follow, and find certai
<havenwood> frozenfoxx: How did you install rvm?
dhruvasagar has quit [Ping timeout: 260 seconds]
<Hanmac> frozenfoxx: #rvm and you did you have all build depends of ruby installed?
<frozenfoxx> havenwood: sudo curl -L https://get.rvm.io | sudo bash -s stable
maxmanders has quit [Quit: Computer has gone to sleep.]
<havenwood> frozenfoxx: Like Hanmac said, did you then install everything listed under?: rvm requirements
<frozenfoxx> Hanmac: Yes, I ran the sudo rvm requirements which used apt-get to pull them all. I'll check in #rvm
heliumsocket has joined #ruby
vlad_starkov has joined #ruby
<havenwood> frozenfoxx: Sounds like you did it right.
randomautomator has joined #ruby
<frozenfoxx> havenwood: Trying to, anyway. :)
<havenwood> unstable: There are some good options for Ruby. First that comes to mind is Flay: https://github.com/seattlerb/flay
evangelosavgerin has joined #ruby
etcetera has joined #ruby
sayan has joined #ruby
<unstable> havenwood: Thanks!
macabhaird has joined #ruby
<havenwood> unstable: Bit different approach, but Code Climate is fun too: https://codeclimate.com/
randomau_ has joined #ruby
randomau_ has quit [Remote host closed the connection]
randomautomator has quit [Read error: Connection reset by peer]
webwarlock has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<Hanmac> frozenfoxx: you can also try "apt-get build-dep ruby1.9.1"
sayan has joined #ruby
puppeh has joined #ruby
<frozenfoxx> Hanmac: Alright, I'll try it now.
randomautomator has joined #ruby
alainus has joined #ruby
zeroeth has joined #ruby
<frozenfoxx> Looks like #rvm isn't awake.
nathancahill has joined #ruby
<alainus> what's the opposite of zero?
<frozenfoxx> alainus: depends
<alainus> of .zero?
<alainus> to check if number >= 1
dhruvasagar has joined #ruby
<apeiros_> how about >= 1?
<alainus> sorry > 0
smigg has quit [Remote host closed the connection]
<apeiros_> well then, how about > 0?
<alainus> yeah i was wondering if there's an explicit method for it
<apeiros_> that's pretty explicit
wolcanus has joined #ruby
<havenwood> alainus: class Fixnum; def not_zero?; !self.zero? end end
JuniorSantosHQ has joined #ruby
mikepack has quit [Remote host closed the connection]
<havenwood> s/Fixnum/Numeric
Astral__ has quit [Ping timeout: 246 seconds]
jblack has joined #ruby
<alainus> .nonzero? btw
DonRichie has quit [Ping timeout: 245 seconds]
<alainus> but it returns nil on 0
<frozenfoxx> Hanmac: Nope, didn't fix.
DonRichie has joined #ruby
<havenwood> Why use >= when we can monkey patch core classes, wheee! :O
pygmael has quit [Ping timeout: 256 seconds]
maxmanders has joined #ruby
tylersmith has quit [Quit: tylersmith]
rasbonics has joined #ruby
<havenwood> alainus: #nonzero? seems perfect, can check its truthiness - forgot about that
rasbonics has left #ruby [#ruby]
wargasm has joined #ruby
Voodoofish430 has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
nobitanobi has joined #ruby
nobitanobi has quit [Client Quit]
Rumsteak has joined #ruby
mansgrf has joined #ruby
<breakingthings> no
cantonic is now known as cantonic|away
mansgrf has quit [K-Lined]
<alainus> haha
<breakingthings> yes.
freakazoid0223 has joined #ruby
robscomputer has joined #ruby
Voodoofish430 is now known as evilVoodoofish43
Rumsteak has quit [Client Quit]
Rumsteak has joined #ruby
Rumsteak has quit [Client Quit]
Tricon has joined #ruby
joofsh has quit [Remote host closed the connection]
girija has joined #ruby
NiteRain has joined #ruby
uris has joined #ruby
jgrevich_ has joined #ruby
d3 has quit [Remote host closed the connection]
mityaz has joined #ruby
DarthGandalf has quit [Ping timeout: 258 seconds]
Rumsteak has joined #ruby
DarthGandalf has joined #ruby
rubarLion has quit [Ping timeout: 260 seconds]
Rumsteak has quit [Client Quit]
xibalba has left #ruby ["Leaving"]
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
benlieb has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
zetaspartan2552 has joined #ruby
axl_ has joined #ruby
_nitti has quit [Remote host closed the connection]
Gwyxx has quit [Quit: Leaving]
d3 has joined #ruby
stuartrexking has joined #ruby
linx_0x has joined #ruby
rubarLion has joined #ruby
sonots has joined #ruby
_JamieD_ has quit [Quit: _JamieD_]
RORgasm has joined #ruby
RORgasm has quit [Remote host closed the connection]
RORgasm has joined #ruby
lewix has quit [Remote host closed the connection]
imbric has joined #ruby
io_syl has joined #ruby
Matt has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 240 seconds]
Matt is now known as Guest78366
lewix has joined #ruby
yashshah has joined #ruby
chimkan has joined #ruby
mikepack has joined #ruby
carloslopes has joined #ruby
zetaspartan2552 has quit [Quit: zetaspartan2552]
<imbric> hey guys,
filipe has quit [Remote host closed the connection]
<imbric> I've got a question about using proxy objects. I'd like to make it such that String.new can be called (i.e., existing code doesn't change) but a String proxy is returned
sayan has joined #ruby
<Hanmac> imbric: why do you want that?
<imbric> I've seen a few articles about creating proxy objects, but hey usually require doing something like Proxy.new( other_object)
sambio has joined #ruby
Astralum has joined #ruby
<imbric> its part of a research project that wants to translate certain function calls to RPCs without the original program needing any rewriting
mlr has joined #ruby
mlr has left #ruby [#ruby]
<workmad3> imbric: you can't do that sort of replacement with classes like String or Hash
<workmad3> imbric: because the literal representation bypasses any replacement you can do
<imbric> ok, that's actually fine. We we're playing with String just because its a default Class, but its not the actual class we'd like to do this with
* My_Hearing gazes upon illias' shadow
My_Hearing is now known as Mon_Ouie
<workmad3> imbric: also, there's been a lot of work on making RPC transparent over the years... none of them have worked, because the way you use RPC interfaces needs to be used differently
jbueza has joined #ruby
<workmad3> imbric: transparent RPC is built on the idea that local and remote should be interchangable... but just the fact of network latency makes that an unworkable assumption
heliumsocket has quit [Quit: heliumsocket]
cobragoat has joined #ruby
<workmad3> imbric: however, for other classes, what you can do is 'shim in' proxy-class replacements... e.g. 'class FooProxy; proxy_class = Foo; //do stuff here to make a proxied object and do stuff with it here; end; Foo = FooProxy;'
zeade has joined #ruby
lewix has quit [Remote host closed the connection]
_nitti has joined #ruby
llaskin has left #ruby [#ruby]
Sicp has quit [Ping timeout: 256 seconds]
thebastl has joined #ruby
alex__c2022 has joined #ruby
stevechiagozie has joined #ruby
hamakn has quit [Remote host closed the connection]
rosster has joined #ruby
<rosster> Hi, how do I force ruby to reload a ruby file that I have edited
mahmoudimus has joined #ruby
gristus has joined #ruby
<rosster> I.e in pry I like to test code as I write it
<workmad3> rosster: it's best to restart your runtime generally
<rosster> And would prefer to not have to restart pry each time
T41Ru5 has joined #ruby
<rosster> ye, I guess it is probably better
<rosster> but just thought there maybe a require or load that forces reloading
<workmad3> rosster: you have to clear out existing stuff if you don't want to have potentially weird conflicts
<banisterfiend> rosster: you dont have to restart pry
stevechiagozie has quit [Client Quit]
<banisterfiend> rosster: you can use: reload-code command in pry
<banisterfiend> rosster: reload-code can reload modules/classes/methods/commands
etcetera has quit []
<imbric> workmad3: I sort of understand that, but it still warns about an already initialized constant. Is there a "strict" mode in which this sort of thing would fail instead of warn?
<banisterfiend> rosster: i.e: reload-code MyClass
<banisterfiend> will reload the code for that class
maletor has joined #ruby
<banisterfiend> reload-code MyClass#my_method will reload that method code
<banisterfiend> etc
<rosster> ahh I see
<rosster> perfect thanks!
lewix has joined #ruby
<banisterfiend> rosster: alternatively you can always just use the 'edit' command to modify your code in pry, in which case pry automatically reloads it
RonScagz has joined #ruby
artem has quit [Ping timeout: 260 seconds]
RonScagz has quit [Client Quit]
<rosster> kk cool, will try that then
etcetera has joined #ruby
<workmad3> banisterfiend: any edge-cases where that's potentially unsafe?
<rosster> banisterfiend: is there a way to reload an entire module?
andrew12 has quit [Quit: never coming back]
<banisterfiend> workmad3: well there's situations where it just wont work, i.e their class inherites from a Struct.new()
Rumsteak has joined #ruby
<banisterfiend> rosster: depends what you mean, you mean a module with a bunch of submodules, so u want all those reloaded too?
JuniorSantosHQ has quit [Quit: »¡« Scøøp Script 2004 »!« curta a vida no irc de outra maneira! Pegue já: (www.scoop.com.br) ]
<rosster> yip
<rosster> basically anything in the module reloaded
Guest__ has joined #ruby
rubarLion has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 246 seconds]
Rumsteak has quit [Remote host closed the connection]
<banisterfiend> rosster: i havent implemented that feature yet, but it's not that hard to do i guess. you can file an issue for it: https://github.com/pry/pry/issues
jimeh has joined #ruby
Rumsteak has joined #ruby
buibex has quit [Remote host closed the connection]
jnoob22_ has joined #ruby
thebastl has quit [Remote host closed the connection]
internet_user has joined #ruby
jnoob22 has quit [Ping timeout: 245 seconds]
JMcAfreak has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
maycon__ has quit [Changing host]
maycon__ has joined #ruby
maycon__ is now known as maycon
pskosinski has quit [Quit: pskosinski]
wudofyr has quit [Remote host closed the connection]
joofsh has joined #ruby
eldariof has joined #ruby
wudofyr has joined #ruby
theRoUS_ has quit [Ping timeout: 246 seconds]
theRoUS has quit [Ping timeout: 255 seconds]
rburton- has joined #ruby
shock_one has joined #ruby
Guest1416 is now known as guyz
guyz has quit [Changing host]
guyz has joined #ruby
joofsh has quit [Remote host closed the connection]
soukihei has quit [Read error: Operation timed out]
smigg has joined #ruby
havenwood has quit [Remote host closed the connection]
jonahR has joined #ruby
joofsh has joined #ruby
wishfoundry has joined #ruby
adamjleonard has quit [Quit: Leaving...]
browndawg1 has quit [Quit: Leaving.]
thebastl has joined #ruby
<wishfoundry> can I ask a question
rubarLion has joined #ruby
<Hanmac> no you can only answer :P
rubarLion has quit [Read error: Connection reset by peer]
<rosster> banisterfiend: cool thanks, I don't know how useful a feature it would be to others though
<banisterfiend> rosster: i think it's useful enough, esp since top level modules are often just namespaces
lkba has joined #ruby
<rosster> kk cool
Aiur has joined #ruby
<wishfoundry> I have an array of hashes( e.g. [{key:"value", otherkey: 5}, {key:"other", otherkey: 6}]
adambeynon has joined #ruby
failshel_ is now known as failshell
Guest78366 has quit [Quit: This computer has gone to sleep]
<wishfoundry> but if I return @variable[1], it get's converted to an array
<wishfoundry> (e.g. [[key, "value], [otherkey, 5]] )
TorpedoSkyline has joined #ruby
woolite64 has joined #ruby
<wishfoundry> how can I return as a hash
yashshah has quit [Read error: Connection reset by peer]
TheFuzzball has quit [Ping timeout: 252 seconds]
<sepp2k> wishfoundry: Calling [] on an array of hashes will not convert the hash to an array.
jimeh has quit [Ping timeout: 256 seconds]
soukihei has joined #ruby
yashshah has joined #ruby
mattbl has joined #ruby
<Hanmac> wishfoundry: that should not be converted into an Array
doodlehaus has quit [Remote host closed the connection]
<sepp2k> If @variable[1] returns an array, then @variable must be an array of arrays (or not an array at all)
TheFuzzball has joined #ruby
marcdel has joined #ruby
andrew12 has joined #ruby
<wishfoundry> I have tests confirming this'
<wishfoundry> If I return more than one element, there hashes
<wishfoundry> but if only one, it's an array
zeade has quit [Quit: Leaving.]
sonots has quit [Quit: Leaving...]
TheFuzzball has quit [Max SendQ exceeded]
<wishfoundry> unless I use the slice method
jimeh has joined #ruby
<wishfoundry> which would be an array with only one hash
chrishough has quit [Quit: chrishough]
interactionjaxsn has quit [Read error: Connection reset by peer]
interactionjaxsn has joined #ruby
<sepp2k> wishfoundry: Please pastie a complete, runnable piece of code that reproduces your problem.
jonahR has quit [Remote host closed the connection]
<sepp2k> I assure you that [{foo: 42}, {bar: 23}][1] returns {bar: 23}, not [:bar, 23].
jonahR has joined #ruby
<sepp2k> So there's definitely something else going on in your code.
mrsolo has joined #ruby
razibog has quit [Quit: Leaving.]
jonahR has quit [Remote host closed the connection]
zeade has joined #ruby
dagnachew has joined #ruby
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
ryannielson has quit [Quit: ryannielson]
bricker`LA has quit [Ping timeout: 245 seconds]
Rumsteak has quit [Quit: Rumsteak]
smigg has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
doodlehaus has joined #ruby
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
jimeh has quit [Ping timeout: 255 seconds]
skroon has quit [Read error: Connection reset by peer]
skroon has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
chrishough has joined #ruby
rubarLion has joined #ruby
<sepp2k> wishfoundry: Calling take on a hash returns an array.
<banisterfiend> sepp2k: which feature of 2.0 are you most excited about?
<Hanmac> required hash parameters are new in 2.1dev :P
TheFuzzball has joined #ruby
<banisterfiend> Hanmac: can u give an example of that?
interactionjaxsn has quit [Remote host closed the connection]
wudofyr has quit [Remote host closed the connection]
TheFuzzball has quit [Max SendQ exceeded]
wudofyr has joined #ruby
<sepp2k> banisterfiend: I don't know. It doesn't really have that many revolutionary features. Keyword arguments are nice, but I wouldn't say they excite me.
interactionjaxsn has joined #ruby
<banisterfiend> sepp2k: what about Enumerable#lazy ?
webwarlock has quit [Ping timeout: 272 seconds]
invisime has quit [Quit: Leaving.]
berto- has joined #ruby
TheFuzzball has joined #ruby
<sepp2k> That is nice, but it has been around as a gem for a while.
TheFuzzball has quit [Max SendQ exceeded]
tylersmith has joined #ruby
theRoUS has joined #ruby
amth has joined #ruby
TheFuzzball has joined #ruby
matayam has quit [Remote host closed the connection]
TheFuzzball has quit [Max SendQ exceeded]
<Hanmac> banisterfiend: def meth(reg,opt=4,*rest,optkey: 5,:regkey,**restopt,&block)
marcdel has quit []
KellyLSB_ has quit [Read error: Operation timed out]
obs has quit [Quit: Konversation terminated!]
Rumsteak has joined #ruby
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
interactionjaxsn has quit [Ping timeout: 255 seconds]
dhruvasagar has joined #ruby
Ontolog has joined #ruby
zeroeth has quit [Ping timeout: 264 seconds]
TheFuzzball has joined #ruby
rupee has joined #ruby
jimeh has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
mark_locklear has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
berto- has quit [Quit: berto-]
marcdel has joined #ruby
KellyLSB has joined #ruby
TheFuzzball has joined #ruby
<Hanmac> banisterfiend: was that sample enough?
<banisterfiend> Hanmac: confusing
workmad3 has joined #ruby
<sepp2k> banisterfiend: The point is that if someone calls meth, he has to give a value for regkey, or he gets an ArgumentError.
mark_locklear has joined #ruby
wargasm has quit [Ping timeout: 264 seconds]
<alainus> how can I return nil if a variable is not defined inside an expression? Example: method(var || nil if !var).do_another_thing
<sepp2k> Or did you already understand that and just meant that the syntax looks confusing?
lewix_ has joined #ruby
<banisterfiend> Hanmac: is there any advantage in using normal default values do you think? or should all default values be keyword arguments now?
<banisterfiend> oh
<amth> alainus: defined?(var) ? var : nil
wargasm has joined #ruby
<banisterfiend> weird
<banisterfiend> so this doesn't work: def hello(x, y:2); end
<banisterfiend> hello(1, 3)
<amth> Your version is equivalent to `var || nil`, which is bad if var is falsy.
thebastl has quit [Remote host closed the connection]
buibex has joined #ruby
<alainus> amth, that doesn't work. returns error
lewix has quit [Ping timeout: 272 seconds]
jnoob22_ has quit [Remote host closed the connection]
thebastl has joined #ruby
<amth> Bizarre. It works for me.
jnoob22 has joined #ruby
thebastl has quit [Remote host closed the connection]
<amth> What's RUBY_VERSION?
cmyers has left #ruby [#ruby]
dhruvasagar has quit [Ping timeout: 255 seconds]
joofsh has joined #ruby
<amth> It works on 1.9.3 and 2.0.0.
<sepp2k> banisterfiend: Right, if you use keyword arguments when defining a method, you need to supply those arguments using a hash. You can't use positional arguments in place of keyword arguments.
<amth> alainus: What code are you using exactly?
<banisterfiend> sepp2k: very crippled cmpared to keyword args in other languags aren't they?
<alainus> amth, cart = Cart.where(:user_id => session[:user_id]).find(session[:cart_id])
jimeh has quit [Ping timeout: 256 seconds]
<banisterfiend> seems just a minor papering over a hash
mneorr has joined #ruby
<sepp2k> banisterfiend: Depends on the language.
<alainus> i'd like session[:user_id] to be session[:user_id] or nil
<banisterfiend> sepp2k: i had python in mind :)
<amth> alainus: That doesn't have my snippet in it anywhere.
<sepp2k> banisterfiend: The sematnics of function calls haven't changed at all. f(x: 23, y: 42) still creates a hash and calls f with that hash.
<amth> And I think ActiveSupport has magic for this...
<sepp2k> banisterfiend: They only added syntax to def, which automatically unpacks and validates that hash.
<alainus> amth, yes because I tested (var || nil) in the IRB and didn't work when var is not defined.
<sepp2k> So yes, it's a thin layer of syntax sugar over hashs.
<amth> Yep. That isn't the code I gave you, though.
<amth> The code I gave you was 'defined?(var) ? var : nil`.
<amth> defined? is a keyword, not a method.
spider-mario has joined #ruby
<amth> var is never actually evaluated when you call defined?.
breakingthings has quit []
davetherat has quit [Remote host closed the connection]
<amth> If it were, it would raise an error.
davetherat has joined #ruby
davetherat has quit [Remote host closed the connection]
pioz has joined #ruby
<sepp2k> banisterfiend: But the idea that keyword arguments can't be passed as positional arguments isn't unheard of. It's the same in Common Lisp for example.
davetherat has joined #ruby
bricker has joined #ruby
<alainus> amth, i was hoping for something simpler ( a .or_nil method or similar ). That makes the code very difficult to read and I prefer to simply define the var as nil if not present before in that case
zeade has quit [Quit: Leaving.]
slainer68 has joined #ruby
<amth> def method_missing() nil; end
eliasp_ has joined #ruby
blaxter_ has quit [Ping timeout: 245 seconds]
<amth> That is evil. Don't do it.
presto has joined #ruby
eliasp has quit [Ping timeout: 245 seconds]
<amth> Err, `def method_missing(*a, &b) nil end`
<amth> Or `def method_missing(*a, **kw, &b) nil; end` in 2.0.
thebastl has joined #ruby
dimonzozo has joined #ruby
<amth> Hmm... That actually doesn't work.
zeade has joined #ruby
<amth> (It would still be bad if it did, though.)
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
jimeh has joined #ruby
<amth> Also, why are you using a potentially undefined variable?
<amth> That sounds like a really bad thing to do.
akashj87__ has joined #ruby
thebastl has quit [Remote host closed the connection]
Aiur has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<amth> `var ||= nil` is probably (definitely) a better solution, but that is still bad.
<alainus> amth, because session[:user_id] is simply not set for non-logged in users
akashj87 has quit [Disconnected by services]
<amth> session[:user_id] will be nil, not undefined.
<sepp2k> alainus: [] returns nil if the key doesn't exist.
akashj87__ has quit [Read error: Connection reset by peer]
<alainus> oh.
<Hanmac> banisterfiend: def meth(reg,opt=4,*rest,optkey: 5,regkey:,**restopt,&block); method(:meth).parameters
<Hanmac> returns this for ruby-trunk: => [[:req, :reg], [:opt, :opt], [:rest, :rest], [:keyreq, :regkey], [:key, :optkey], [:keyrest, :restopt], [:block, :block]]
mneorr has quit [Remote host closed the connection]
<alainus> :P
buibex has quit [Remote host closed the connection]
imbric has left #ruby [#ruby]
akashj87 has joined #ruby
<amth> `def method_missing(m) nil end` is a slightly less evil version of the evil solution.
sonda has quit [Remote host closed the connection]
endzyme has quit [Remote host closed the connection]
<amth> (That actually works. I haven't got a chance to play with 2 enough.)
mneorr_ has joined #ruby
alvaro_o has joined #ruby
alvaro_o has quit [Client Quit]
a_a_g has joined #ruby
berto- has joined #ruby
apok has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
interactionjaxsn has joined #ruby
<amth> So what's up with `def method_missing(*a, **kw, &b) [a, kw, b] end`?
jmeeuwen has quit [Ping timeout: 256 seconds]
razibog has joined #ruby
hamakn has joined #ruby
pioz has quit [Quit: This computer has gone to sleep]
IceDragon has joined #ruby
rubarLion has quit [Read error: Connection reset by peer]
<unstable> Can I declare a class in the console?
<amth> Yes.
heliumsocket has joined #ruby
heliumsocket has quit [Client Quit]
jmeeuwen has joined #ruby
hamakn has quit [Ping timeout: 272 seconds]
<spider-mario> unstable: you can make it more comfortable using pry
<spider-mario> pry even lets you edit it afterwards
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
* amth ♥ pry
ebobby has joined #ruby
ebobby has left #ruby [#ruby]
jmeeuwen has quit [Ping timeout: 276 seconds]
danman has joined #ruby
rubarLion has joined #ruby
carlyle has joined #ruby
presto has quit [Read error: Operation timed out]
pen has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
pen has quit [Remote host closed the connection]
pen has joined #ruby
benlieb has quit [Quit: benlieb]
MrZYX|off is now known as MrZYX
sambao21 has joined #ruby
breakingthings has joined #ruby
huoxito has joined #ruby
martxel has quit [Quit: leaving]
martxel has joined #ruby
banjara has joined #ruby
wudofyr has quit [Remote host closed the connection]
wudofyr has joined #ruby
<bricker> Is there any difference if you put "require" inside or outside of a class/module?
eliasp_ has quit [Read error: Connection reset by peer]
<amth> The time at which it is evaluated may matter.
<Hanmac> bricker: you can require in a method too
<amth> It is quite non-standard to put it inside, though.
mattbl has quit [Quit: This computer has gone to sleep]
angusiguess has quit [Ping timeout: 256 seconds]
Neomex has joined #ruby
<amth> But in general, it will probably be equivalent.
<Hanmac> i with for a different method like require_into :P but this is for a feature request
eliasp has joined #ruby
<Hanmac> i wish
rismoney has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<banisterfiend> Hanmac: why not just use eval() for that?
<banisterfiend> because of $LOAD_PATH i guess?
<amth> You should probably not be using code that doesn't use encapsulation.
sayan has joined #ruby
_bart has joined #ruby
<amth> 'instance_load' might be a helpful module, though.
<banisterfiend> Hanmac: i mean: binding.eval(File.read(file)), file
angusiguess has joined #ruby
ARCADIVS has joined #ruby
banister_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
jurassic_ has quit [Quit: jurassic_]
razibog has quit [Quit: Leaving.]
jmeeuwen has joined #ruby
shock_one has quit [Ping timeout: 240 seconds]
razibog has joined #ruby
Matchaw has joined #ruby
c0rn has joined #ruby
<Hanmac> banister_: you said the "e" word twice , whats why you was kicked :P ... and yes i want something that works on gems too
workmad3 has quit [Ping timeout: 260 seconds]
<banister_> Hanmac: u should write it :P
<banister_> it would be useful
<Hanmac> hm ok i will make a ticket for that on the bugtracker
chandankumar has quit [Ping timeout: 245 seconds]
<Hanmac> banister_: did you understand this line now?: def meth(reg,opt=4,*rest,optkey: 5,regkey:,**restopt,&block); method(:meth).parameters
jmeeuwen has quit [Ping timeout: 256 seconds]
Axsuul has joined #ruby
razibog has quit [Client Quit]
Sicp has joined #ruby
kirun has joined #ruby
rburton- has quit [Quit: Leaving...]
senayar has quit [Remote host closed the connection]
berto- has quit [Quit: berto-]
enricostn has quit [Remote host closed the connection]
freerobby has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
a_a_g has quit [Quit: Leaving.]
_wtw_ has joined #ruby
razibog has joined #ruby
marcdel has quit []
blaxter_ has joined #ruby
sambio is now known as sambio_sleep
TheFuzzball has quit [Ping timeout: 255 seconds]
sambio_sleep has quit []
Axsuul has quit [Quit: axsuul]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
jdunck has joined #ruby
TheFuzzball has joined #ruby
oconnore has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
Matt has joined #ruby
Matt is now known as Guest10035
elux has joined #ruby
jmeeuwen has joined #ruby
TheFuzzball has joined #ruby
berto- has joined #ruby
Guest__ has quit [Quit: Computer has gone to sleep.]
TheFuzzball has quit [Max SendQ exceeded]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
theRoUS has quit [Ping timeout: 276 seconds]
adamjleonard has joined #ruby
BadProphet has joined #ruby
wrapids has joined #ruby
TheFuzzball has joined #ruby
MissionCritical has quit [Ping timeout: 245 seconds]
Mattix has joined #ruby
tvw has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
skroon has quit [Read error: Connection reset by peer]
presto has joined #ruby
skroon has joined #ruby
TheFuzzball has joined #ruby
fmendez has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
<wrapids> Is RubyAMF the correct gem to be looking at for doing remote calls to a flash server? I'm essentially looking for the NetConnection equivalent from c#. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetConnection.html#call()
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
theRoUS has joined #ruby
_bart has quit [Quit: _bart]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
blaxter_ has quit [Ping timeout: 240 seconds]
TheFuzzball has joined #ruby
frozenfoxx has quit [Quit: Lost terminal]
girija has quit [Ping timeout: 264 seconds]
pskosinski has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
axl_ has quit [Ping timeout: 240 seconds]
berto- has quit [Quit: berto-]
heliumsocket has joined #ruby
axl_ has joined #ruby
tubbo has left #ruby [#ruby]
sepp2k has quit [Read error: Connection reset by peer]
Mission-Critical has joined #ruby
etcetera has quit []
sepp2k has joined #ruby
berto- has joined #ruby
yacks has quit [Quit: Leaving]
becom33 has joined #ruby
fmendez has left #ruby [#ruby]
<unstable> What is a simple way to generate an array with 10 integers inside it?
Neomex has quit [Quit: Neomex]
<becom33> I need a hash to be sorted .http://pastebin.com/7h6YFUtu I need the ['top'] key always on the top and ['end'] key always in the end
<becom33> how can I do it ?
<Rumsteak> 10.times.map { (rand*100).to_i }
<Rumsteak> I'm a ruby beginner so maybe there's a neater way
<injekt> becom33: you know what hashes are for?
<Politoed> I read "10 times nap"
TheFuzzball has quit [Quit: Leaving...]
<amth> becom33: Struct
<becom33> injekt, well keep values in given keys
<injekt> hashes aren't supported to be sorted, ruby will traverse them in the order you inserted the key/values but that's just a side effect, you should never rely on it
<becom33> unlike array
akashj87 has quit [Read error: Connection reset by peer]
<injekt> supposed*
<amth> becom33: Struct
<becom33> amth, wait
akashj87 has joined #ruby
<injekt> you want an array
<injekt> not a hash
rezzack has joined #ruby
<becom33> injekt, no I need a hash . i use the keys in
<becom33> in my script *
<injekt> arrays are sorted, hashes are not, nor should they ever be. You can sort a hash by turning it into an array, sorting it, then turning it back into a hash
hashmal has joined #ruby
smigg has joined #ruby
<MrZYX> becom33: if you need it sorted you need an array of structs or arrays, not a hash
<amth> s = Struct.new(:a, :b, :c)[1,2,3]; s[1] == 2; s[:c] == 3
fmendez has joined #ruby
techlife has quit [Ping timeout: 256 seconds]
Mission-Critical is now known as MissionCritical
<becom33> MrZYX, the problem is the values Im inserting are somthing like function "imaFunction('some string')" in using key imaFunction to check if the function is already in the hash
lewix_ has quit [Remote host closed the connection]
cburyta has quit [Remote host closed the connection]
<becom33> if I use array it won't work
<injekt> that makes no difference
<becom33> paramter string inside the function is dynamic it changes
<becom33> if I use a array it will insert the same function twise in to the array
<becom33> twice *
wrapids has quit [Ping timeout: 245 seconds]
<injekt> then you want a set
<MrZYX> hm, are sets sorted?
huoxito has quit [Quit: Leaving]
spychalski has quit [Ping timeout: 256 seconds]
<injekt> SortedSet is
<MrZYX> right
<MrZYX> becom33: make a struct or class representing your complex value and implement ==
<injekt> ^
<injekt> this
<becom33> injekt, ok umm Im gonna google about set a little if you could apply set into the script I gave before it would be alot helpfull
spychalski has joined #ruby
<becom33> MrZYX, i'm not sure how struct is going to help ?
<injekt> your custom class/struct should probably implement #hash and #eql?
<amth> It would help with the problem you described first, but not the one you seem to actually have.
Davey has quit [Quit: Computer has gone to sleep.]
toekutr has joined #ruby
BSaboia has joined #ruby
<becom33> I'm not inserting 1,2,3,4 to be sorted
<bakingbread> becom33: maybe you should tell what you are trying to achieve instead of telling what (you think) you need
<injekt> becom33: right, you adapt it to your needs..
<becom33> bakingbread, I did in my before in http://pastebin.com/7h6YFUtu
yashshah has quit [Read error: Connection reset by peer]
<MrZYX> becom33: we already told you that you should abstract your complex value into a class, there you can implement all sorts of comparision operators etc
yashshah has joined #ruby
<injekt> becom33: right, and that's the worst use case for a hash i've ever seen
wargasm has left #ruby [#ruby]
<MrZYX> and then sortedset, array etc will behave just like you want without further effort
Guest10035 has quit [Quit: This computer has gone to sleep]
BizarreCake has quit [Ping timeout: 246 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
etcetera has joined #ruby
<bakingbread> becom33: I don't understand what is the purpose of the script you shared. What should it do?
<injekt> bakingbread: he wants it 'sorted' so key/values are ordered like in the second example
<injekt> again, not what a hash is for
<injekt> and a hash should not be used for this
<bakingbread> sorted how?
<injekt> uh
Es0teric has joined #ruby
paradoja has quit [Ping timeout: 272 seconds]
<injekt> did you read the paste?
xaq has joined #ruby
<bakingbread> yes
<becom33> injekt, ok . is there a way i can get it as a sorted. doesnt matter how it sorted
<injekt> "I want it sort as" ... output
<injekt> becom33: I don't understand what you mean
<becom33> sortted output &
<becom33> shit
<becom33> injekt, ok . is there a way i can get it as a sorted * output *. doesnt matter how it sorted
spychalski has quit [Ping timeout: 264 seconds]
<becom33> shit
<injekt> becom33: yes, enter the key/values in the same order you want them outputted
<becom33> injekt, ok . is there a way i can get it as a sorted * output *. doesnt matter how it stored
jlast_ has joined #ruby
zeroeth has joined #ruby
<injekt> becom33: then no, again, hashes are NOT sorted
chessguy has joined #ruby
<amth> moo.to_a.sort{|a, b| cmp_func(a[0], b[0])}.map{|x|x[1]}
<amth> ;p
<injekt> right, that's an array
<injekt> yes we can convert the hash to an array and then back to a hash
<amth> I was being facetious.
<amth> (Hence the ';p'.)
<injekt> but then it might as well be an array in the first place :)
decoponio has quit [Quit: Leaving...]
nomenkun has joined #ruby
jlast has quit [Ping timeout: 240 seconds]
jurassic_ has joined #ruby
<unstable> In an each iterator for an array.. how can I puts the variable name inside the array?
<unstable> names.each { |name| puts "The #{name} person's name is: #{name[:first_name] + " " + name[:last_name]}" }
presto has quit [Quit: Leaving]
<unstable> names = [first, second, third, fourth, fifth]
jurassic__ has joined #ruby
<unstable> So I want to puts first, second, etc.
<amth> `names.join(' ')`?
<Xeago> ah, you want each_with_index
<unstable> thanks
<Xeago> tho that will give you a number
<unstable> excellent, each_with_index
<unstable> hmm
<unstable> How can I get the variable name?
sambao21 has joined #ruby
sambao21 has quit [Client Quit]
<Xeago> I think active_support has something for turning that into first second etc
<Xeago> names.each_with_index { |name,index| .. }
jurassic_ has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
chrishough has quit [Quit: chrishough]
danslo has quit [Quit: danslo]
Axsuul has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
nomenkun has quit [Remote host closed the connection]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jurassic__ has quit [Client Quit]
jblack has quit [Ping timeout: 264 seconds]
sambao21 has quit [Client Quit]
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
berto- has quit [Ping timeout: 245 seconds]
spychalski has joined #ruby
ukd1 has joined #ruby
berto- has joined #ruby
elaptics`away is now known as elaptics
postmodern has joined #ruby
chrishough has joined #ruby
d3 has quit [Ping timeout: 272 seconds]
Guest61083 has joined #ruby
adambeynon has joined #ruby
tevio has joined #ruby
mneorr_ has quit [Remote host closed the connection]
d3 has joined #ruby
mneorr has joined #ruby
marcdel has joined #ruby
danman has quit [Quit: danman]
wolcanus has quit [Remote host closed the connection]
fmendez has quit [Quit: fmendez]
berto- has quit [Quit: berto-]
hashmal has quit [Ping timeout: 272 seconds]
<alainus> is there a shortcut for a += (b - a)
<alainus> ?
spychalski has quit [Ping timeout: 260 seconds]
<amth> a = b
berto- has joined #ruby
mvangala has quit [Remote host closed the connection]
mvangala has joined #ruby
spychalski has joined #ruby
<amth> alainus: You may enjoy https://en.wikibooks.org/wiki/Algebra
<injekt> lol
mneorr has quit [Ping timeout: 276 seconds]
<amth> However, it should be noted that "This book requires that you first read Arithmetic."
cburyta has joined #ruby
<MrZYX> now you're mean :P
<alainus> hehehe
<alainus> ok
evangelosavgerin has quit [Ping timeout: 256 seconds]
berto- has quit [Ping timeout: 256 seconds]
ARCADIVS has quit [Quit: WeeChat 0.3.8]
<alainus> but no
evangelosavgerin has joined #ruby
<alainus> because i don't want a to be equal to b. I want a to be incremented in the difference that exists between a and b
vlad_starkov has joined #ruby
mneorr has joined #ruby
ryanf_ has joined #ruby
<amth> If a is not equal to b after that, your objects are very strange indeed and should not be using shortcuts.
<amth> I guess sets would behave differently under some circumstances.
<alainus> no.. i'm not explaining myself correctly
tenmilestereo has joined #ruby
megha has quit [Ping timeout: 256 seconds]
huoxito has joined #ruby
<amth> Are a and b numbers?
berto- has joined #ruby
dimonzozo has quit [Quit: dimonzozo]
divout has quit [Remote host closed the connection]
<alainus> yes, but I want that only to work if the increment is positive, not if it's negative. a += (b-a) if (b-a)>0
atmosx has joined #ruby
fmendez has joined #ruby
Hanmac1 has joined #ruby
<bakingbread> alainus: how old are you?
vlad_starkov has quit [Ping timeout: 256 seconds]
mahmoudimus has quit [Read error: Connection reset by peer]
<alainus> bakingbread, 5
wolcanus has joined #ruby
<amth> a = b if b>a
Hanmac has quit [Ping timeout: 256 seconds]
<MrZYX> alanp: a += b-a == a = b-a+a, -a+a=0
<amth> lol
berto- has quit [Client Quit]
_wtw_ has quit [Remote host closed the connection]
<amth> Also, what in heaven's name is this program trying to accomplish?
<bakingbread> a += (b-a) if (b-a)>0 is the same as a = b if b > a
<MrZYX> meh, alanp sorry wrong tab complete
huoxito has quit [Client Quit]
ryanf_ has quit [Quit: leaving]
<unstable> gem update; cd ~/.rbenv/plugins/ruby-build; git clone; rbenv install 1.9.3-p392;
<unstable> Is there anything else I need to do to make sure everything is up to date?
rubarLion has quit [Quit: rubarlion]
<unstable> (I want to be up to date for any of the latest vulnerabilities)
<unstable> s/clone/pull/
<alainus> i guess my question was
<alainus> if there's an operator similar to += that doesn't take negative values
swingha has joined #ruby
<amth> x += y if y > 0
<amth> But `a = b if b > a` is (probably) what you want.
Skofo has joined #ruby
berto- has joined #ruby
Rumsteak has quit [Ping timeout: 240 seconds]
Rumsteak_ has joined #ruby
<amth> I have always maintained that programming doesn't really require math, but I am pretty sure I was wrong on that point now.
mahmoudimus has joined #ruby
ukd1 has quit [Remote host closed the connection]
ukd1 has joined #ruby
<MrZYX> amth: programming requires calculating, not math :P
lewix has joined #ruby
<bakingbread> MrZYX: and math is not about calculation, right? oh... wait
<breakingthings> programming requires problem solving, not calculation!
<amth> It really does require algebra, at least if you don't want statements like `a += (b - a) if (a-b) > 0` in your code.
* breakingthings waits for this to devolve into programming requires peanutbutter, not lawnmower!
<amth> This is really the first time I realized that, though.
chussenot has joined #ruby
<breakingthings> It all depends on what you're doing really
<amth> It is interesting how I never noticed how much algebra I was using.
<amth> (Or really that I was using it at all.)
<MrZYX> math is solving problems too, calculating is what calculators do
ukd1 has quit [Read error: Connection reset by peer]
evangelosavgerin has quit [Ping timeout: 245 seconds]
berto- has quit [Ping timeout: 264 seconds]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
jonathanwallace has joined #ruby
<bakingbread> yes, calculators has nothing to do with math, obviously
<bakingbread> *have
kirun has quit [Quit: Client exiting]
banister_ has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
<amth> Sure, but what goes into them does.
banisterfiend has joined #ruby
mneorr has quit [Remote host closed the connection]
tubbo has joined #ruby
berto- has joined #ruby
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
sambio_sleep has joined #ruby
mneorr has joined #ruby
megha has joined #ruby
sambio_sleep is now known as sambio
hashmal has joined #ruby
sambio has quit [Changing host]
sambio has joined #ruby
thebastl has joined #ruby
jblack has joined #ruby
Hanmac1 is now known as Hanmac
xaq has quit [Remote host closed the connection]
chussenot has quit [Ping timeout: 246 seconds]
skroon has quit [Read error: Connection reset by peer]
skroon has joined #ruby
mneorr has quit [Ping timeout: 260 seconds]
doritostains has joined #ruby
Guedes is now known as Guedes_out
pioz has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
jbueza has quit [Quit: Leaving.]
c0rn has joined #ruby
jbueza has joined #ruby
digifiv5e has joined #ruby
digifiv5e is now known as Guest86739
tomsthumb has joined #ruby
sambao21 has joined #ruby
cburyta has quit [Remote host closed the connection]
chussenot has joined #ruby
cableray has joined #ruby
Hanmac1 has joined #ruby
wolcanus has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
guyz has quit [Ping timeout: 272 seconds]
beneggett has joined #ruby
mityaz has quit [Quit: See ya!]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
jurassic_ has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
Hanmac has quit [Ping timeout: 256 seconds]
<Rumsteak_> For commands like "puts", "print", "rand", etc : how can I get a list of these standalone commands and know from which object/module they come from ?
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
banjara has quit [Client Quit]
mockra has quit [Remote host closed the connection]
banjara has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
<MrZYX> Rumsteak_: most are on Kernel: http://rubydoc.info/stdlib/core/Kernel
<havenwood> Rumsteak_: Using Pry instead of irb helps a ton. E.g., in Pry: $ puts
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
cburyta has joined #ruby
chussenot has quit [Ping timeout: 246 seconds]
<havenwood> Rumsteak_: To see a list of Kernel methods: Kernel.public_methods false
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
<havenwood> Rumsteak_: gem install pry; pry
<Rumsteak_> ok I will try these out. I am new to ruby and I am trying to figure out all the object model. In java you had System.out.println so you knew where it came from at a glance
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
swex has joined #ruby
<amth> ls Kernel
<amth> (in Pry)
crazed has quit [Ping timeout: 264 seconds]
<havenwood> Rumsteak_: Pry is fantastic for that type of exploration.
<MrZYX> Rumsteak_: try p self.class.ancestors
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
benlieb has joined #ruby
<havenwood> Rumsteak_: In Pry, type `help` for a list of the Pry commands. :)
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby
smigg has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
BSaboia has quit [Read error: Connection reset by peer]
thebastl has quit [Remote host closed the connection]
swex_ has quit [Ping timeout: 258 seconds]
jbueza has quit [Quit: Leaving.]
apeiros_ has joined #ruby
_bart has joined #ruby
jbueza has joined #ruby
matchaw_ has joined #ruby
mockra has joined #ruby
senayar has joined #ruby
baroquebobcat has joined #ruby
cantonic has joined #ruby
Matchaw has quit [Ping timeout: 272 seconds]
swingha has quit [Quit: WeeChat 0.4.0]
rads has joined #ruby
cantonic|away has quit [Ping timeout: 240 seconds]
rads has quit [Client Quit]
freerobby has quit [Ping timeout: 256 seconds]
pioz has quit [Quit: This computer has gone to sleep]
heliumsocket has quit [Quit: heliumsocket]
Doc_X has quit [Remote host closed the connection]
twoism has joined #ruby
alolalol has quit [Remote host closed the connection]
crazed has joined #ruby
banjara has quit [Quit: Leaving.]
Matt has joined #ruby
banjara has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
Matt is now known as Guest42534
mrsolo has joined #ruby
visof has quit [Ping timeout: 246 seconds]
Assurbanipal has joined #ruby
dustint has quit [Ping timeout: 246 seconds]
matchaw_ has quit [Ping timeout: 272 seconds]
ph^ has joined #ruby
Iszak has joined #ruby
Guest42534 has quit [Ping timeout: 260 seconds]
_bart has left #ruby [#ruby]
Al_ has joined #ruby
logix812 has joined #ruby
temtess12 has joined #ruby
crazed has quit [Ping timeout: 246 seconds]
temtess12 has quit [Client Quit]
danman has joined #ruby
visof has joined #ruby
spider-mario has quit [Remote host closed the connection]
My_Hearing has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
jlast_ has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has quit [Disconnected by services]
My_Hearing is now known as Mon_Ouie
jlast has joined #ruby
cjs226 has joined #ruby
crazed has joined #ruby
mattbl has joined #ruby
cjs226 has quit [Client Quit]
reset has joined #ruby
nomenkun has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
theRoUS has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
atmosx has quit [Quit: And so the story goes…]
doritostains has quit [Quit: Leaving...]
evangelosavgerin has joined #ruby
marcdel has quit [Ping timeout: 246 seconds]
lahwran is now known as lahwran-
lahwran- is now known as lahwran
heliumsocket has joined #ruby
nkr has quit [Quit: Linkinus - http://linkinus.com]
EPIK has joined #ruby
elux has quit [Quit: Bye!]
beneggett has joined #ruby
xaq has joined #ruby
timonv has quit [Remote host closed the connection]
Majost has joined #ruby
evangelosavgerin has quit [Ping timeout: 272 seconds]
benlieb has quit [Quit: benlieb]
sepp2k has quit [Quit: Leaving.]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
tymat has joined #ruby
tymat is now known as starburst
geekbri has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 240 seconds]
dagnachew has quit [Quit: Leaving]
mneorr has joined #ruby
workmad3 has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
emergion has joined #ruby
tomsthumb has quit [Quit: Leaving.]
<unstable> http://pastebin.com/uXeq5Ev5 .. if I do MathDojo.new.add(9) .. why is it printing 'test', since it is not an array?
<Majost> How would one iterate through an array of hashes, and pick out two hash values from each hash? eg: [{"name"=>"one","foo"=>"bar","blah"=>"bleh"}, {"name"=>"two","foo"=>"rab","blah"=>"blehbleh"}]
slacko3280 has joined #ruby
philcrissman has joined #ruby
bricker_ has joined #ruby
<amth> hashes.map(&get_two_values)
carloslopes has quit [Remote host closed the connection]
bricker has quit [Ping timeout: 256 seconds]
<Hanmac1> Majost:
kpshek has quit []
bricker_ is now known as bricker
slacko3280 has quit [Max SendQ exceeded]
Guedes has joined #ruby
<Hanmac1> >> [{"name"=>"one","foo"=>"bar","blah"=>"bleh"}, {"name"=>"two","foo"=>"rab","blah"=>"blehbleh"}].map{|hash|hash.values_at("name","blah")}
<eval-in> Hanmac1 => [["one", "bleh"], ["two", "blehbleh"]] (http://eval.in/14218)
visof has quit [Read error: Connection reset by peer]
Hanmac1 is now known as Hanmac
choobie has joined #ruby
robscomputer has quit [Read error: Connection reset by peer]
matayam has joined #ruby
robscomputer has joined #ruby
jnoob22 has quit [Remote host closed the connection]
<Majost> Hanmac: ahh! thanks! =)
slacko3280 has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
yashshah has joined #ruby
wmoxam has quit [Ping timeout: 240 seconds]
evangelosavgerin has joined #ruby
lunarjar has quit [Ping timeout: 245 seconds]
matayam has quit [Ping timeout: 240 seconds]
zeroeth has quit [Ping timeout: 245 seconds]
kpshek has joined #ruby
Iszak has quit [Quit: Textual IRC Client: www.textualapp.com]
Neomex has joined #ruby
Neomex has quit [Client Quit]
nedbat has joined #ruby
theRoUS has joined #ruby
codecop has quit [Remote host closed the connection]
doritostains has joined #ruby
Es0teric has quit [Read error: Connection reset by peer]
<apeiros_> unstable: because *args will always be an array
<apeiros_> an array containing all arguments passed to add
sayan has quit [Ping timeout: 272 seconds]
jimeh has quit [Quit: Computer has gone to sleep.]
mengu has quit [Quit: Konversation terminated!]
Guedes has quit [Ping timeout: 276 seconds]
slacko3280 has quit [Max SendQ exceeded]
Matchaw has joined #ruby
tenmilestereo has quit [Quit: Leaving]
Guedes has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
slacko3280 has joined #ruby
Es0teric has joined #ruby
dagnachew has joined #ruby
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
<Hanmac> its funny when you combine *args with **opts :P
ferdev has joined #ruby
Guest61083 has quit [Ping timeout: 264 seconds]
jmeeuwen has joined #ruby
nedbat has left #ruby ["Leaving"]
bradleyprice has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
jlast has quit [Remote host closed the connection]
jmeeuwen has quit [Client Quit]
slacko3280 has quit [Read error: Connection reset by peer]
jmeeuwen has joined #ruby
evangelosavgerin has quit [Ping timeout: 260 seconds]
dinkytoy has joined #ruby
dinkytoy has quit [Client Quit]
failshell has quit [Remote host closed the connection]
jlast has joined #ruby
sepp2k has joined #ruby
kofno has quit [Remote host closed the connection]
end_guy has joined #ruby
eldariof has quit []
megha has quit [Quit: WeeChat 0.4.0]
gristus has quit []
marcdel has joined #ruby
<unstable> apeiros_: http://pastebin.com/m5iBc7SC ... how can I make it so I can do MathDojo.new.add([1, 2]).add([4, 6])
<unstable> I'm just playing around to learn a bit of ruby. I'm not doing anything important. I want to understand self better.
mvangala has quit [Read error: Connection reset by peer]
<breakingthings> unstable: what would you expect that to return?
<unstable> breakingthings: 13
mvangala has joined #ruby
mark_locklear has quit [Ping timeout: 246 seconds]
<apeiros_> unstable: since 0 is neutral in additions, just do def add(int=0, int2=0); int+int2; end
<breakingthings> ^
<apeiros_> unstable: with your old code: `def add(*numbers); numbers.inject(0, :+)
mneorr has quit [Remote host closed the connection]
<apeiros_> err, misses `end`
<unstable> Don't I need 'self' somewhere?
mneorr has joined #ruby
<apeiros_> no. but it makes little sense to have that as a class (since you don't use self)
end_guy has quit [Remote host closed the connection]
<unstable> I want to be able to do add(1, 2) and add([1, 2])
<unstable> [22] pry(main)> MathDojo.new.add([1, 2]).add(1)
<unstable> NoMethodError: undefined method `add' for 3:Fixnum
<apeiros_> unstable: that's generally a bad idea
<apeiros_> normalization should be on the "user" side
end_guy has joined #ruby
<apeiros_> and then you'd do MathDojo.new.add(*[1, 2])
<apeiros_> the * tells ruby to "splat" the array and treat each item in the array as a separate argument
angusiguess has joined #ruby
<apeiros_> i.e., add(*[1, 2]) is equivalent to add(1, 2)
<breakingthings> apeiros_: though silly, one could potentially want to chain add and subtract, and I think that's the sort of thing he is looking for...
<apeiros_> if you insist on a bad solution: `def add(*args); args.flatten(1).inject(0, :+); end`
Guedes has quit [Ping timeout: 240 seconds]
aeontech has joined #ruby
<apeiros_> breakingthings: true, but his class isn't laid out that way
<apeiros_> he'd have to store a state for that
rburton- has joined #ruby
<breakingthings> Very true, but I think that's what he's looking for help on.
<breakingthings> Looks like he's completing it as an assignment.
<apeiros_> have fun showing him then :)
<breakingthings> :)
p0t has joined #ruby
* apeiros_ goes back watching a bit of mlg
crazed has quit [Ping timeout: 256 seconds]
Davey has joined #ruby
<breakingthings> unstable: So, if you want to allow add and subtract to chain you're going to want a few things
mneorr has quit [Ping timeout: 255 seconds]
<breakingthings> 1, you'll want to store the value of this mathdojo object in an instance variable
<apeiros_> breakingthings: ah, and yes of course, you're right. he actually showed that he wants to chain /me blind
<breakingthings> apeiros_: no worries :)
jerius has quit [Read error: Operation timed out]
dagnachew has quit [Quit: Leaving]
<breakingthings> 2, you'll want to add/subtract from that instance variable, and then return the object after each of these chainable methods
<unstable> ok, I'll use an instance variable.
cobragoat has quit [Remote host closed the connection]
mneorr has joined #ruby
Banistergalaxy has joined #ruby
moted has joined #ruby
<breakingthings> unstable: here's what I think I would do in this scenario
workmad3 has quit [Ping timeout: 246 seconds]
<breakingthings> if you need any help understanding what something does just ask
agarie has quit [Read error: Connection reset by peer]
lewix has quit [Remote host closed the connection]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
p0t has left #ruby [#ruby]
artm has joined #ruby
artm has left #ruby [#ruby]
agarie has joined #ruby
<apeiros_> alternative suggestions (work with empty argument lists): `@value += numbers.inject(0, :+)`, or `@value = numbers.inject(@value, :+)`
p0t_ has joined #ruby
<p0t_> If anyone can help me ATM my i can keep my job. hahaha
<breakingthings> This sounds promising.
<p0t_> m trying to install fat free crm on a debian box. Im stuck at the bundle install part. It always errors out sayng thats its missing packages
<unstable> p0t_: pastebin the output
phantasm66 has quit [Quit: *sleeeep….]
[Neurotic]_ is now known as [Neurotic]
zeroeth has joined #ruby
alexyz has quit [Remote host closed the connection]
alexyz has joined #ruby
<p0t_> one sec
mneorr has quit [Remote host closed the connection]
alexyz has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jurassic_ has quit [Quit: jurassic_]
mneorr has joined #ruby
momomomomo has quit [Quit: momomomomo]
doodlehaus has quit [Remote host closed the connection]
crazed has joined #ruby
<amth> breakingthings: MathDojo.subtract() doesn't work right.
<p0t_> unstable: http://pastebin.com/5Xj8dZki it was doing similar errors with other packages so i was installng them as need but i got stuck on this last one. Maybe i forgot a command for the requred pkgs ??
<breakingthings> amth: in what scenario?
<amth> If it has multiple arguments.
Davey has quit [Quit: Computer has gone to sleep.]
ner0x has joined #ruby
etcetera has quit []
<amth> md.subtract(2, 3) will add 1.
<amth> (-= -1)
<amth> You need to inject :+
<breakingthings> ah, good point.
mneorr has quit [Ping timeout: 256 seconds]
<bean> p0t_: how is ruby installed?
<breakingthings> unstable: so yeah be aware of ^ being incorrect if you're using my example.
fixl has joined #ruby
<p0t_> bean: apt-get
<amth> ruby-dev
<amth> @p0t_
<p0t_> apt-get install ruby-dev
<p0t_> ?
<amth> Yeah.
<p0t_> ok runnng bundle install again
skattyadz has quit [Quit: skattyadz]
razibog has quit [Ping timeout: 256 seconds]
Nisstyre has joined #ruby
ph^ has quit [Remote host closed the connection]
fschuindt has joined #ruby
Rumsteak_ has left #ruby [#ruby]
fschuindt has quit [Client Quit]
Rumsteak_ has joined #ruby
etcetera has joined #ruby
robscomputer has quit [Remote host closed the connection]
<p0t_> amth: bean same error
interactionjaxsn has quit [Remote host closed the connection]
* bean has no idea.
<bean> good luck bro
<p0t_> hahaha
pioz has joined #ruby
<p0t_> i must suck cause i cant install any crm for the life of me
<amth> ruby1.8-dev?
<amth> 1.9 is default for me.
TooTubular has quit [Quit: Linkinus - http://linkinus.com]
<amth> You could always check mkmf.log.
<MrZYX> gem install debugger-ruby_source ? (or however it was called)
stef_204 has joined #ruby
eliasp has quit [Remote host closed the connection]
breakingthings has quit []
Rumsteak_ has quit [Quit: Rumsteak_]
Cooler_ has joined #ruby
geggam_wk has quit [Remote host closed the connection]
skattyadz has joined #ruby
<amth> I am pretty sure you are missing development files from the Ruby package.
<Hanmac> maybe the debugger gem was to dump to require rubygems first? :D
alanp_ has joined #ruby
<MrZYX> well, it says extconf.rb:16:in `require': no such file to load -- debugger/ruby_core_source (LoadError)
<Hanmac> amth i think the debugger gem is broken for 1.8 :D
<MrZYX> ^
carlyle has quit [Remote host closed the connection]
<amth> Ahhhh.
<amth> That would explain it.
Al_ has quit [Quit: Al_]
<MrZYX> it's always broken for something
<amth> I haven't used 1.8 since 1.9 came out like 37 decades ago
xaq has quit [Remote host closed the connection]
kpshek has quit []
Rumsteak has joined #ruby
robscomputer has joined #ruby
<Hanmac> yeah and in the newest(12.10) ubuntu finally 1.9 is as default (yeah)
tomsthumb has joined #ruby
<MrZYX> archlinux already has 2.0 as default :P
<amth> I think most people use RVM anyway.
<p0t_> so should i try installing 1.9?
alanp has quit [Ping timeout: 240 seconds]
<amth> I've been on 2.0 for months.
Davey has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
<Hanmac> p0t_ you can install ruby1.9-full and then use update-alternatives to switch the system ruby
axl_ has quit [Quit: axl_]
internet_user has quit [Remote host closed the connection]
<p0t_> apt-get install ruby1.9-full
<p0t_> ?
<havenwood> MrZYX: Seems Arch is the only mainstream package manager that always has the latest patch for Ruby.
astegman has quit [Quit: Out of time]
<p0t_> and im not sure about the second command Hanmac
<MrZYX> havenwood: not only for ruby... ;)
<amth> Arch's dismal failure in crypto has made me want to wipe it off the face of the earth.
danman has left #ruby [#ruby]
ToApolytoXaos has quit [Quit: Leaving]
apeiros_ has quit [Remote host closed the connection]
<havenwood> amth: I'm curious. How did they fail?
<amth> Well, they took forever to implement package signing, it's not by default, and they don't sign the manifest.
jurassic_ has joined #ruby
<amth> The latter being the most serious current problem, given that an unsigned manifest is essentially equivalent to no signing at all.
<havenwood> amth: Now they have it sorted?
robscomputer has quit [Remote host closed the connection]
<Hanmac> p0t_: "update-alternatives --config ruby" and "update-alternatives --config gem"
<amth> No.
drale2k has joined #ruby
<amth> "an unsigned manifest is essentially equivalent to no signing at all."
<MrZYX> amth: hm, did you voice that concerns? I'm certain Allan would appreciate that
wmoxam has joined #ruby
<amth> It's known, and unappreciated.
fschuindt has joined #ruby
spychalski has quit [Ping timeout: 246 seconds]
<MrZYX> source?
<amth> They have repeatedly stated that security is not a significant issue.
cmarques has quit [Ping timeout: 260 seconds]
<Rumsteak> With "pry" gem, can I see what modules an given object includes ?
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
jekotia has joined #ruby
<Rumsteak> or irb
spychalski has joined #ruby
mpfundstein has quit [Remote host closed the connection]
iPhoneMRZ has joined #ruby
zeroeth has quit [Ping timeout: 256 seconds]
iPhoneMRZ has quit [Client Quit]
alex__c2022 has quit [Quit: alex__c2022]
evangelosavgerin has joined #ruby
<MrZYX> thanks
<amth> There's even already a patch for it that hasn't been committed.
xaq has joined #ruby
emergion has joined #ruby
adamjleonard has quit [Quit: Leaving...]
mercwithamouth has quit [Ping timeout: 246 seconds]
<jokke> hi guys. I need to fill out a login form programatically in ruby. I say fill out but i mean post. First i need to access the page though to get the hidden form fields security_token and login_ticket. is there a gem for this?
<p0t_> fatfreecrm need live cds
mneorr has joined #ruby
<p0t_> along with all the other crms
gabrielrotbart has joined #ruby
<Xeago> jokke: you basically need to parse the html?
<jokke> Xeago: yup
<amth> jokke: gem install mechanize
<Xeago> and then do a regular post using that
<jokke> yes
kpshek has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
<jokke> amth: mechanize. i'll look into tha
<jokke> t
<Xeago> nokogiri for html (xml as well?) parsing
gabrielrotbart has joined #ruby
prophile has quit [Changing host]
prophile has joined #ruby
<amth> Xeago: mechanize uses that, but it's dead simple to use.
<amth> It's pretty awesome.
<Xeago> ah, cool
evangelosavgerin has quit [Ping timeout: 240 seconds]
<amth> Definitely one of my favorite gems.
<jokke> seems really cool
<jokke> another question. Are there good books covering test driven development?
<Xeago> jokke: yes, plenty
<Xeago> tldr, write tests first the way you want to, minitest, rspec, cucumber etc
<Xeago> and keep your tests light
<Xeago> however I highly recommend reading them :)
p0t_ has quit [Ping timeout: 245 seconds]
logix812 has quit [Quit: Computer has gone to sleep.]
<jokke> Xeago: recommend reading what?
zeroeth has joined #ruby
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
generalissimo has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
<Xeago> books, instead of just relying on the tldr
maletor has quit [Quit: Computer has gone to sleep.]
banjara has joined #ruby
<Xeago> I don't really keep lists/read books
<Xeago> so can't recommend books besides the names I've seen flying around here
<jokke> alright
mneorr has quit [Ping timeout: 245 seconds]
<Xeago> you should ask again tomorrow, during GMT office hours
<Xeago> a lot of the regulars are not online at the moment
<jokke> i will
<jokke> thanks though
<amth> Oh fuck, it's 6AM...
TorpedoSkyline has quit [Read error: Connection reset by peer]
<Xeago> I often hear devds say, I don't run tests too often because it tooks to long
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
jgarvey has quit [Quit: Leaving]
<Xeago> *why*: have to fire up rails
<Xeago> that is doing it wrong
TorpedoSkyline has joined #ruby
<amth> I have a meeting in like 6 hours...
<Xeago> might consider staying awake besides a powernap
<amth> (and the contract is for like US$60k :x)
<Xeago> yikes
dormousy has quit [Quit: ZNC - http://znc.in]
dormoose has quit [Quit: ZNC - http://znc.in]
emergion has quit [Ping timeout: 264 seconds]
robscomputer has joined #ruby
sambio is now known as Abr1l
tootooroo has quit [Quit: brb]
Abr1l is now known as Guest72592
dormousy has joined #ruby
tootooroo has joined #ruby
Guest72592 is now known as sambio
jdunck has quit [Changing host]
jdunck has joined #ruby
dormoose has joined #ruby
Assurbanipal has quit [Remote host closed the connection]
<amth> Oh well. I think everything will be OK.
jdunck has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
freerobby has quit [Quit: Leaving.]
jdunck has joined #ruby
p0t has joined #ruby
wmoxam has quit [Ping timeout: 260 seconds]
<p0t> does any linux distro come with ruby preinstalled?
<Rumsteak> mac os :p
<v2px> gobolinux had it preinstalled iirc
axsuul_ has joined #ruby
<v2px> but you probably don't want to try that
heliumsocket has quit [Quit: heliumsocket]
Davey has quit [Quit: Computer has gone to sleep.]
yeban has quit [Ping timeout: 258 seconds]
Guest85414 has quit [Ping timeout: 258 seconds]
io_syl has quit [Ping timeout: 246 seconds]
<p0t> what about using rvm to install? would i have to remove anythng if i was using apt-get?
Guest85414 has joined #ruby
tr4656_ has quit [Ping timeout: 258 seconds]
<amth> No, RVM is nice.
<amth> Use it.
Davey has joined #ruby
io_syl has joined #ruby
<v2px> ^
tr4656 has joined #ruby
telling has quit [Ping timeout: 258 seconds]
telling has joined #ruby
telling has quit [Changing host]
telling has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
<havenwood> p0t: There are multiple good ways to manage your Rubies. RVM is a nice option. I use chruby. Nothing wrong with apt-get with update-alternatives either.
philcrissman has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
havenwood has quit [Remote host closed the connection]
<p0t> ok
xargoon has quit [Ping timeout: 245 seconds]
<p0t> im trying to install ruby 1.9.3 using apt get then ill try build install
havenwood has joined #ruby
<wishfoundry> if your on mac you could look into jewelrybox
bluesnow has joined #ruby
timmow has joined #ruby
<wishfoundry> the gui for rvm
arya_ has joined #ruby
BSaboia has joined #ruby
<bluesnow> Hi, rvm list gives me ruby 1.9.3 and ruby -v gives me ruby 1.9.3, but bundle install is using ruby 1.8.2
<bluesnow> gem -v also gives me ruby 1.8.2
wmoxam has joined #ruby
<bluesnow> Anyone know how I can change bundle install to use ruby 1.9.3?
<amth> Use 2.0 for new code.
xargoon has joined #ruby
arya has quit [Ping timeout: 248 seconds]
punkrawkR has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
bradleyprice has joined #ruby
<p0t> An error occurred while installing debugger (1.5.0), and Bundler cannot continue. Make sure that `gem install debugger -v '1.5.0'` succeeds before bundling.
<p0t> thats the same errror everytime
pac1 has joined #ruby
havenwood has quit [Ping timeout: 255 seconds]
niklasb has quit [Ping timeout: 240 seconds]
<amth> Weird. What does mkmf.log say?
<amth> It should be somewhere in .rvm, I think.
<p0t> i havent installed rvm yet
sleetdrop has quit [Ping timeout: 256 seconds]
<p0t> it does say for me to check that log not sure where it s though
<amth> Did you install ruby1.9 and ruby1.9-dev?
sleetdrop has joined #ruby
bluesnow has left #ruby [#ruby]
gabrielrotbart has quit [Remote host closed the connection]
ariedler has quit [Remote host closed the connection]
stardiviner has joined #ruby
<p0t> amth: have you rheard of ths? seems like i can just run the iso
<Xeago> okay, so I have this huge list of gems I want to uninstall, how would I do that while making sure I don't break dependencies of gems not included in that list
spychalski has quit [Ping timeout: 264 seconds]
<amth> Well, you could use a lot of things. I would recommend Ubuntu Server, but approximately everyone disagrees with me.
mengu has joined #ruby
chaluopa has joined #ruby
<Xeago> I wouldn't use such pre built images
fschuindt has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Xeago> outdated components, backdoors etc
mengu has quit [Client Quit]
_nitti has joined #ruby
kpshek has quit []
<amth> RVM is really easy, and will probably work.
kpshek has joined #ruby
rburton- has quit [Quit: Leaving...]
kiwnix has quit [Quit: Leaving]
skattyadz has quit [Quit: skattyadz]
jbueza has quit [Quit: Leaving.]
jbueza has joined #ruby
etcetera has quit []
arya_ has quit [Ping timeout: 248 seconds]
wmoxam has quit [Ping timeout: 240 seconds]
_br_ has quit [Read error: Connection reset by peer]
kpshek has quit [Client Quit]
yashshah has quit [Read error: Connection reset by peer]
ddd has joined #ruby
yashshah has joined #ruby
_nitti has quit [Ping timeout: 246 seconds]
theRoUS has quit [Read error: Connection reset by peer]
ddd is now known as Guest74013
pioz has quit [Ping timeout: 272 seconds]
Guest74013 is now known as ddd
ry4nn has joined #ruby
xaq has quit [Remote host closed the connection]
stardiviner has quit [Quit: stardiviner]
ddd has quit [Client Quit]
ddd has joined #ruby
freerobby has joined #ruby
etcetera has joined #ruby
MrZYX is now known as MrZYX|off
skattyadz has joined #ruby
blacktulip has quit [Remote host closed the connection]
niklasb has joined #ruby
chaluopa has quit [Ping timeout: 272 seconds]
ddd has quit [Client Quit]
jlast has quit [Remote host closed the connection]
ph^ has joined #ruby
arya has joined #ruby
mengu has joined #ruby
jp___ has joined #ruby
jtharris has quit [Quit: WeeChat 0.4.0]
justsee has quit [Ping timeout: 264 seconds]
emocakes has joined #ruby
Evixion has quit []
ddd has joined #ruby
jp___ has quit [Remote host closed the connection]
ddd has quit [Client Quit]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
ddd has joined #ruby
Raboo_ has joined #ruby
Guest61083 has joined #ruby
BSaboia__ has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
Myconix has joined #ruby
agarie_ has joined #ruby
akashj87__ has joined #ruby
bttf has joined #ruby
crazymykl has joined #ruby
twoism_ has joined #ruby
<bttf> whats the standard tabstop for ruby ?
SCommette has joined #ruby
apok_ has joined #ruby
<amth> tab
tylersmith_ has joined #ruby
mikepack_ has joined #ruby
slainer6_ has joined #ruby
arya has quit [Ping timeout: 264 seconds]
<amth> Your fancy IDE will make it whatever it really is. ;p
mengu_ has joined #ruby
<amth> (where fancy IDE is anything other than ed)
codeFiend has joined #ruby
havenwood has joined #ruby
<bttf> amth: i'm using vim
mikekelly has quit [Ping timeout: 240 seconds]
<bttf> if you want to call that an IDE ... ;)
jekotia_ has joined #ruby
<amth> vim can do that. ;p
<bttf> but i just got vim-ruby and the tabs are like 5 spaces
BSaboia__ has quit [Client Quit]
<bttf> can't be right
<amth> :set ts=2
aeontech has quit [Disconnected by services]
codeFiend is now known as aeontech
seich| has joined #ruby
<bttf> yeah but i shouldn't have to dooo thaaatttt
banjara1 has joined #ruby
cburyta_ has joined #ruby
<Xeago> than make .edrc
* bttf dives in to .vim files
dayepa1 has joined #ruby
spanx__ has joined #ruby
k-man has joined #ruby
BSaboia__ has joined #ruby
TDJACR has joined #ruby
wudofyr_ has joined #ruby
IcyDragon has joined #ruby
<k-man> i'm trying to use this ruby gem called ssh-config, i get this error: http://paste.lisp.org/display/136445
Nigel_ has joined #ruby
<k-man> is that due to a missing ruby package? or something else?
<amth> I find it ironic that your Ruby error was pasted on lisp.org.
Raboo has quit [Ping timeout: 258 seconds]
mikemac has quit [Remote host closed the connection]
seich- has quit [Ping timeout: 258 seconds]
xerxas has quit [Ping timeout: 258 seconds]
Kirotan_ has quit [Ping timeout: 258 seconds]
spanx_ has quit [Ping timeout: 258 seconds]
G has quit [Ping timeout: 258 seconds]
<k-man> amth, :)
Raboo_ is now known as Raboo
BSaboia__ has quit [Client Quit]
gabrielrotbart has joined #ruby
senayar_ has joined #ruby
emocakes_ has joined #ruby
<k-man> i have little experience of ruby - it looks like a bug in the gem to me but just want to confirm?
<amth> FileUtils.copy
spanx__ is now known as spanx_
<amth> File doesn't have it for whatever bizarre reason.
Kirotan has joined #ruby
BSaboia__ has joined #ruby
<k-man> hmmm...
<amth> So just sub that and report a bug.
<amth> It should work the same.
<k-man> sub that?
<amth> s/File.copy/FileUtils.copy
niko__ has joined #ruby
<amth> In the gem code.
mikekelly has joined #ruby
DrShoggoth has quit [Ping timeout: 245 seconds]
<amth> Or monkey patch or whatever.
Arzaga has joined #ruby
taqutor has quit [Ping timeout: 258 seconds]
oddraisi1 has joined #ruby
<amth> Or be lazy and wait for the gem author.
sleetdro_ has joined #ruby
bradleyprice has quit [Remote host closed the connection]
<k-man> i'll post a report, thanks
Nom- has quit [Ping timeout: 258 seconds]
Nom- has joined #ruby
lahwran- has joined #ruby
BSaboia has quit [Disconnected by services]
techlife has quit [Ping timeout: 246 seconds]
coaster_ has joined #ruby
BSaboia__ has quit [Client Quit]
BSaboia has joined #ruby
wmoxam has joined #ruby
wmoxam has quit [Client Quit]
zeroeth_ has joined #ruby
predator217 has quit [Ping timeout: 256 seconds]
techlife has joined #ruby
akashj87 has quit [Read error: Connection reset by peer]
mikepack has quit [Read error: Connection reset by peer]
_pacbard has joined #ruby
digifiv5e has joined #ruby
unCork has joined #ruby
apok has quit [Read error: Connection reset by peer]
sepp2k has quit [Ping timeout: 272 seconds]
apok_ is now known as apok
beneggett has quit [Quit: Computer has gone to sleep.]
digifiv5e is now known as Guest16202
eliasp has joined #ruby
NuckingFuts has joined #ruby
jurassic__ has joined #ruby
Sigma00_ has joined #ruby
davetherat has quit [Ping timeout: 272 seconds]
dayepa has quit [Ping timeout: 272 seconds]
Sigma00 has quit [Ping timeout: 272 seconds]
mengu has quit [Ping timeout: 272 seconds]
Cork has quit [Ping timeout: 272 seconds]
Guest86739 has quit [Ping timeout: 272 seconds]
agarie has quit [Ping timeout: 272 seconds]
senayar has quit [Ping timeout: 272 seconds]
IceDragon has quit [Ping timeout: 272 seconds]
Qwak has quit [Ping timeout: 272 seconds]
wudofyr has quit [Ping timeout: 272 seconds]
sleetdrop has quit [Ping timeout: 272 seconds]
Matchaw has quit [Ping timeout: 272 seconds]
ner0x has quit [Ping timeout: 272 seconds]
tvw has quit [Ping timeout: 272 seconds]
d3 has quit [Ping timeout: 272 seconds]
twoism has quit [Ping timeout: 272 seconds]
berto- has quit [Ping timeout: 272 seconds]
tylersmith has quit [Ping timeout: 272 seconds]
andrew12 has quit [Ping timeout: 272 seconds]
T41Ru5 has quit [Ping timeout: 272 seconds]
h8R has quit [Ping timeout: 272 seconds]
decoder_ring has quit [Ping timeout: 272 seconds]
sonne has quit [Ping timeout: 272 seconds]
emocakes has quit [Ping timeout: 272 seconds]
banjara has quit [Ping timeout: 272 seconds]
jurassic_ has quit [Ping timeout: 272 seconds]
Es0teric has quit [Ping timeout: 272 seconds]
slainer68 has quit [Ping timeout: 272 seconds]
stuartrexking has quit [Ping timeout: 272 seconds]
rismoney has quit [Ping timeout: 272 seconds]
coaster has quit [Ping timeout: 272 seconds]
sleetdro_ is now known as sleetdrop
kop has quit [Ping timeout: 272 seconds]
steeve1 has quit [Ping timeout: 272 seconds]
pacbard has quit [Ping timeout: 272 seconds]
zeroeth has quit [Ping timeout: 272 seconds]
jekotia has quit [Ping timeout: 272 seconds]
cburyta has quit [Ping timeout: 272 seconds]
Nuck has quit [Ping timeout: 272 seconds]
lahwran has quit [Ping timeout: 272 seconds]
oddraisin has quit [Ping timeout: 272 seconds]
naquad has quit [Ping timeout: 272 seconds]
Sigma00_ is now known as Sigma00
_pacbard is now known as pacbard
vereteran has joined #ruby
d3 has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
alanp_ is now known as alanp
havenwood has quit [Ping timeout: 245 seconds]
Matchaw has joined #ruby
rismoney has joined #ruby
predator117 has joined #ruby
tevio has quit [Ping timeout: 256 seconds]
BadProphet has quit [Remote host closed the connection]
beneggett has joined #ruby
sonne has joined #ruby
andrew12 has joined #ruby
markvilla has joined #ruby
andrew12 is now known as Guest14488
T41Ru5 has joined #ruby
tylersmith_ is now known as tylersmith
mrsolo has quit [Quit: Leaving]
decoder_ring has joined #ruby
[0x1a] has quit [Ping timeout: 256 seconds]
nezumi has joined #ruby
techlife has quit [Ping timeout: 245 seconds]
tootooroo has quit [Ping timeout: 256 seconds]
steeve1 has joined #ruby
drale2k has quit [Quit: Leaving...]
robbyoconnor has quit [Max SendQ exceeded]
ner0x has joined #ruby
indyrl has joined #ruby
davetherat has joined #ruby
anonymuse has quit [Quit: Leaving...]
Markvill_ has joined #ruby
ffranz has quit [Quit: Leaving]
robbyoconnor has joined #ruby
woolite64_ has joined #ruby
drale2k has joined #ruby
<k-man> amth, /usr/lib/ruby/gems/1.9.1/gems/ssh-config-0.1.2/lib/config_file.rb:122:in `backup': uninitialized constant ConfigFile::FileUtils (NameError) when i change it to FileUtils
markvilla has quit [Quit: markvilla]
Markvill_ is now known as Markvilla
kop has joined #ruby
<Xeago> I have this huge list of gems I want to uninstall, how would I do that while making sure I don't break dependencies of gems not included in that list
Tricon has quit [Quit: Leaving...]
SeySayux has quit [Ping timeout: 256 seconds]
<amth> Oh, you may need to require 'fileutils'.
Guest10026 has quit [Ping timeout: 256 seconds]
bw has joined #ruby
s00pcan has quit [Ping timeout: 256 seconds]
woolite64 has quit [Ping timeout: 256 seconds]
tomsthumb has quit [Quit: Leaving.]
bw is now known as Guest26023
sleetdrop has quit [Ping timeout: 256 seconds]
ddd has quit [Quit: Lost terminal]
Ortuna has joined #ruby
msch has joined #ruby
davetherat has quit [Ping timeout: 256 seconds]
jekotia has joined #ruby
Nigel_ is now known as G
woolite64__ has joined #ruby
s00pcan has joined #ruby
<wishfoundry> Xeago: use bundler
jekotia_ has quit [Ping timeout: 256 seconds]
SeySayux has joined #ruby
NiteRain has quit [Ping timeout: 260 seconds]
sleetdrop has joined #ruby
ddd has joined #ruby
grn has quit [Ping timeout: 256 seconds]
mikepack_ has quit [Remote host closed the connection]
rburton- has joined #ruby
<k-man> amth, oh thanks, that seems to have solved it
grn has joined #ruby
matled has quit [Remote host closed the connection]
<k-man> i suppose i should do a pull request on it
Floydzy has joined #ruby
matled has joined #ruby
banjara1 has quit [Max SendQ exceeded]
nari has joined #ruby
techlife has joined #ruby
Arzaga has quit [Quit: Computer has gone to sleep.]
blaxter_ has joined #ruby
matled has quit [Remote host closed the connection]
axsuul_ has quit [Quit: axsuul_]
stuartrexking has joined #ruby
banjara has joined #ruby
msch has quit [Ping timeout: 256 seconds]
chussenot has joined #ruby
<lectrick> I just fixed a bug where someone was "concat"ing onto an array variable. The problem is, the array variable was initialized to a constant. What happened? The constant kept growing over time to infinity... memory leak city!
chussenot has quit [Client Quit]
<lectrick> I REALLY THINK ruby methods which modify the receiver should ALL end in a !. Geez
Guest85414 has quit [Ping timeout: 256 seconds]
wang has quit [Ping timeout: 256 seconds]
matled has joined #ruby
<amth> That's always icky. It's better than the situation in Python, though.
wang has joined #ruby
<lectrick> what is the situation in Python?
<Xeago> wishfoundry: how would that help me?
<amth> The default argument thing there is really subtle, whereas Ruby constants should be relatively obvious.
Boohbah has joined #ruby
axsuul_ has joined #ruby
<amth> Default arguments are instanstiated at parse time.
<wishfoundry> Xeago: because bundler manages the deps of every gem listed
<wishfoundry> in the gemfile
andrew12_ has joined #ruby
msch has joined #ruby
<amth> def x(a, b=[]): b.append(a) or b
<amth> x(1)
<amth> x(2)
kop has quit [*.net *.split]
woolite64_ has quit [*.net *.split]
steeve1 has quit [*.net *.split]
Guest14488 has quit [*.net *.split]
<Xeago> wishfoundry: globally on my system
<amth> Oh, no implicit return.
<Xeago> therefore there is no gemfile
<wishfoundry> Xeago: you insane?
<Xeago> no?
<amth> x = lambda a, b=[]: b.append(a) or b; x(1); x(2)
<Xeago> gem should know that rails depends on activesupport and others?
<Xeago> let me ask it this way then: how do I generate a list of dependencies of each gem using gem?
<amth> @lectrick
<ddd> gem dependency iirc
<p0t> amth: i thnk i almost got t
MrZYX|off has quit [Ping timeout: 256 seconds]
tootooroo has joined #ruby
<k-man> how do you install a ruby gem from github or from a local source tree?
<Xeago> you specify the source
<p0t> amth: im supposed to add a couple files to my gemfile but idk where it is. any ideas
<Xeago> I think it is with :source => "https://"
sleetdrop has quit [Ping timeout: 256 seconds]
hashmal has quit [Quit: Computer has gone to sleep.]
<ddd> gem --reverse-dependencies dependency rails (and vis versa) sorry was checking the man page
TorpedoSkyline has quit [Quit: Don't follow me if you don't want hilarity and QUITing to ensue. Also, freelancing and iOS. @TorpedoSkyline]
<wishfoundry> p0t: it would be in your root dir of project
<wishfoundry> if you have one
eliasp has quit [Remote host closed the connection]
<p0t> not sure what that is
<p0t> thats prob the issue
eliasp has joined #ruby
<wishfoundry> try this: touch GEMFILE
<amth> p0t: Gemfile in the rails root
MrZYX|off has joined #ruby
emmanuelux has quit [Read error: Connection reset by peer]
casheew has quit [Ping timeout: 256 seconds]
ehc has quit [Ping timeout: 256 seconds]
MrZYX|off is now known as MrZYX
sleetdrop has joined #ruby
akashj87_ has joined #ruby
<p0t> to be honest
<p0t> idk wtf im doing anymore
<p0t> hahahaha
casheew has joined #ruby
<ddd> Xeago: ok, its positionally screwy. you have to put --reverse-dependencies flag after 'dependency' command. it chokes otherwise
ehc has joined #ruby
timmow has quit [Remote host closed the connection]
kop has joined #ruby
skattyadz has quit [Ping timeout: 264 seconds]
andrew12_ has quit [Ping timeout: 256 seconds]
<p0t> im really at the point i need to install something thats out of the box or my ass is grass. is there any easy implementations im willing to install a new distro
pavilionXP has joined #ruby
steeve1 has joined #ruby
<amth> I would recommend Ubuntu Server Edition + RVM.
DrShoggoth has joined #ruby
akashj87__ has quit [Ping timeout: 240 seconds]
<amth> It is quite easy to install from there.
axxT has joined #ruby
<lectrick> amth: heh i guess i don't get python syntax enough to know what's going on there
idkazuma has joined #ruby
<amth> b is always the same list.
skattyadz has joined #ruby
<amth> So every invocation will append to b.
Emmanuel_Chanel has quit [Quit: Leaving]
<amth> It is really non-obvious behavior. I actually had someone commit a 'fix' for my code that relied on it without documentation.
andrew12_ has joined #ruby
joofsh has quit [Remote host closed the connection]
NuckingFuts has quit [Ping timeout: 264 seconds]
JMcAfreak has quit [Ping timeout: 276 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
steeve1 has quit [Ping timeout: 256 seconds]
<lectrick> amth: oh i see, that is weird
<lectrick> amth: so it will just keep growing? even as an argument? wow