<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>
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>
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.
<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]
<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.
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
<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.
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
<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]
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.
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]
<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.
<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 :)
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
<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.]
<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]
<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]
<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]
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: 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>
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?
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
<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]
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?
<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]
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
<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
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
<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]
<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]
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]
<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]
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>
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]
<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]
<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.
<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