<law>
I'm not even using the ffi gem in the program I'm trying to run
<law>
funnily enough, this was all working just fine on Friday. No updates or anything over the weekend, and lo this bites me in the backside on Monday morning
<neohunter>
I'm using cap 2.3.0, this error appear (NoMethodError: undefined method `select!' for ["none"]:Array) with ruby 1.8.7-p374, but works with p370... gem list are exactly the same.. what could be?... or how i can debug that, there is no stacktrace or any file to log for, i tried runnign with -v same result
EllisTAA has quit [Quit: EllisTAA]
devoldmx has joined #ruby
<bnagy>
neohunter: probably the core answer is get the heck off 1.8
<bnagy>
1.9 is pretty much eol, 1.8 is ancient
<neohunter>
I can't is a web service used by a lot of people, we are creating an upgrade but i can just say, disable everything and send clients to competitors.
<neohunter>
:)
bklane has joined #ruby
<bnagy>
well select! vanished as a method at some point, maybe that was it
<bnagy>
I guess fix the code
x-light has joined #ruby
<bnagy>
1.8 is full of security bugs as well, btw
Rollabunna has joined #ruby
xxneolithicxx has joined #ruby
renderful has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
davedev24 has quit []
gener1c has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has quit [Ping timeout: 264 seconds]
<bnagy>
hm.. actually it's kind of weird... it vanished from the docs
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Sou|cutter>
does this happen in some extension module or something? Or is this just something that was changed after writing (but still very very long ago)
bigbadbear has quit [Ping timeout: 268 seconds]
astrobunny has quit [Ping timeout: 255 seconds]
pawnbox has joined #ruby
lemur has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
dikaio has joined #ruby
woodruffw has quit [Quit: And then he took off.]
sanjayu has joined #ruby
woodruffw has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
astrobunny has joined #ruby
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
arescorpio has quit [Quit: Leaving.]
skweek has quit [Ping timeout: 250 seconds]
Rickmasta has joined #ruby
Newtonianb has quit [Ping timeout: 244 seconds]
x-light has quit [Ping timeout: 255 seconds]
<bnagy>
that ref is from 1.6
devoldmx has joined #ruby
dravine has quit [Ping timeout: 264 seconds]
eGGsha has joined #ruby
skweek has joined #ruby
Rollabunna has joined #ruby
perry has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 246 seconds]
EllisTAA has quit [Quit: EllisTAA]
mary5030 has quit [Remote host closed the connection]
perry has joined #ruby
perry has quit [Changing host]
perry has joined #ruby
gustav_ has joined #ruby
mary5030 has joined #ruby
pawnbox has quit [Remote host closed the connection]
arooni has quit [Ping timeout: 240 seconds]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxx has quit [Ping timeout: 246 seconds]
Rollabunna has quit [Ping timeout: 264 seconds]
nofxx has joined #ruby
nofxx has joined #ruby
gustav_ has quit [Ping timeout: 256 seconds]
mary5030 has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
pawnbox has joined #ruby
iamninja_ has quit [Read error: Connection reset by peer]
iamninja_ has joined #ruby
allomov has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
tejasmanohar_ has joined #ruby
tejasmanohar has quit [Ping timeout: 252 seconds]
tejasmanohar_ is now known as tejasmanohar
jenrzzz has quit [Ping timeout: 264 seconds]
Lucky__ has joined #ruby
skade has joined #ruby
skweek has joined #ruby
shoerain has joined #ruby
Kallis has joined #ruby
<shoerain>
i think my google-fu is weak, how would I find a drawing library for ruby? I'm ideally looking for something like Processing in Java or Quil in Clojure. Outputting to bitmap or png would be great...
gustav__ has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 256 seconds]
<arup_r>
shevy: How did you reach to the changelog .. Were you reading Ruby source code ? :)
unshadow has joined #ruby
Burgestrand has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
charliesome has quit [Client Quit]
Xeago has joined #ruby
fluchtreflex has joined #ruby
fluchtreflex has joined #ruby
charliesome has joined #ruby
blaxter has quit [Ping timeout: 255 seconds]
Flying_Squirrel has joined #ruby
emilkarl has joined #ruby
fluchtreflex has quit [Client Quit]
<shevy>
arup_r I use it like a news section
ryanlntn has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
FrankD has quit [Ping timeout: 244 seconds]
<arup_r>
ok... shevy ..
dhjondoh has quit [Quit: dhjondoh]
sanjayu has quit [Ping timeout: 244 seconds]
haraoka has joined #ruby
oniMaker has joined #ruby
Kendos-Kenlen has joined #ruby
ta has quit [Remote host closed the connection]
fluchtreflex has joined #ruby
fluchtreflex has joined #ruby
Xeago has quit [Remote host closed the connection]
rbowlby has quit [Remote host closed the connection]
<shevy>
it's like a readers digest
Xeago has joined #ruby
agent_white has quit [Quit: night]
blaxter has joined #ruby
bronson has joined #ruby
Zai00 has joined #ruby
auzty has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
<tuor>
hi, when i have a if statement with only one line in it (like: if true; do_this; end) but it's to long to write it on one line (more the 80 letters), should I write it with "if ...;..;end" or "... \;if ..." ?
bronson has quit [Ping timeout: 240 seconds]
sanjayu has joined #ruby
<tobiasvl>
why do you have to have it on one line?
dionysus69 has quit [Ping timeout: 240 seconds]
<tobiasvl>
and what do you mean by your second example? ;if ?
marr has joined #ruby
<shevy>
if it is too long, chop it down
Juanchito has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
ryanlntn has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<jhass>
so personally I would keep it since my limit is 120 not 80, so I would even align the = and the if's of the other two lines to it
<tuor>
the difference between the two pastes is what i meen. I would like to write like in the second one (on one line) but it's to long. So the question is: is it ok to write it like this: https://gist.github.com/anonymous/acdd9af77c53de966673
astrobunny has quit [Remote host closed the connection]
<jhass>
but yeah, just break it into a regular if
<jhass>
ah no, that's horrible
<jhass>
do what you posted first, use a regular if
<tuor>
jhass, OK. That was what I wanted to know. :)
workmad3_ has quit [Ping timeout: 250 seconds]
leafybasil has quit [Remote host closed the connection]
<tuor>
I was not focusing on aligning, but shure.
leafybasil has joined #ruby
bruno- has joined #ruby
<jhass>
however you could also do something like def set_connection_option(options, field); @connection[field] = options[field] if better_name_for_whatever_check_key_string_does(options, field); end
poguez_ has quit [Quit: Connection closed for inactivity]
alexherbo2 has joined #ruby
yardenbar has joined #ruby
<tuor>
jhass, the other lines need to be in the first if statement to. (check_key_string is a method which checks if the param1 is a hash, if the key param2 exists and if the value of the key param2 is a not empty string.) I don't know how to call it... It's because options can be set or not and if they are set, they should be the correct datatype.
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
<jhass>
calling a method that sets @templates_list every time it's called and then relying on @templates_list being set is quite horrible, just return the value from that method
piotrj has quit [Remote host closed the connection]
BTRE has quit [Quit: Leaving]
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
southpawlar has quit [Ping timeout: 252 seconds]
arup_r has joined #ruby
piotrj has joined #ruby
ta has joined #ruby
<tuor>
jhass, ok the abstraction thing would be biger changes, so i begin with the other stuff. I'll be back.
Kendos-Kenlen has quit [Quit: Konversation terminated!]
[k- has joined #ruby
DoubleMalt has joined #ruby
pepperbreath has left #ruby [#ruby]
Flying_Squirrel has quit [Ping timeout: 264 seconds]
stamina has joined #ruby
Kendos-Kenlen has joined #ruby
codecop has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
stamina has quit [Client Quit]
VaibhavRajput has joined #ruby
<VaibhavRajput>
what is the different between file open with 'w' and FILE:RDWR mode
<shevy>
what is FILE:RDWR
<[k->
readwrite is w+, or r+, or maybe a+
<[k->
a+ is append though
S_Walker has joined #ruby
<shevy>
I found that I need only either w+ or a+
<canton7>
'w' is File::WRONLY|File::TRUNC|File::CREAT, apparently
drptbl has joined #ruby
<canton7>
'r+' is File::RDWR
slayerjain has joined #ruby
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
<VaibhavRajput>
Where will I get more details about File::WRONLY|File::TRUNC|File::CREAT
slayerjain has quit [Client Quit]
<ZucchiniZe>
never fully learned ruby
<ZucchiniZe>
it is awesome
codecop has quit [Ping timeout: 250 seconds]
liquidmetal has quit [Ping timeout: 246 seconds]
<jhass>
VaibhavRajput: RDONLY open read only, WRONLY open write only, RDWR open for reading and writing, TRUNC truncate (=empty file), CREAT = create (create if not exists)
allomov has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
<VaibhavRajput>
:)
<jhass>
VaibhavRajput: but most people just use r, w, a, r+, rb, wb, w+b
<adaedra>
[k-: can't beat german efficiency.
<jhass>
ab I guess
<jhass>
r being the default, so you rarely see it in code actually
Burgestrand has joined #ruby
piotrj has quit [Remote host closed the connection]
liquidmetal has joined #ruby
piotrj has joined #ruby
bronson has joined #ruby
piotrj has quit [Remote host closed the connection]
iamninja_ has quit [Read error: Connection reset by peer]
lkba_ has joined #ruby
<[k->
i use w+
iamninja_ has joined #ruby
northfurr has joined #ruby
<adaedra>
I use what suits the situation.
lkba has quit [Ping timeout: 256 seconds]
emilkarl has quit [Quit: emilkarl]
codecop has joined #ruby
<jhass>
adaedra: how dare you! being reasonable!
millerti has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 268 seconds]
ruurd has joined #ruby
<adaedra>
sorry
RegulationD has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<VaibhavRajput>
I have multiple thread which is writing and reading into the same file. I wanted to truncate file before writing into it at the same time other thread can read it. I have added File::LOCK_EX. The issue which I am facing is if two thread tries to write into same file the thread truncate the file write it successfully but the second one will just prepend the content followed by first thread content. gist : https://gist.github.com/rajp
<tuor>
jhass, i didn't change the names of all the methods because i want to rethink about how to do it and then directly rewrite with better names.
<tuor>
I just want to do all the other stuff first.
Coldblackice has quit [Ping timeout: 264 seconds]
<quit_rails>
adaedra: nothing.. just bored.. :(
devoldmx has quit [Ping timeout: 250 seconds]
<adaedra>
quit_rails: you do realize it's a bit annoying to have all your nick changes in all channels?
Rickmasta has joined #ruby
<tuor>
To assign to @templates_list comes with how I used it befor. I just didn't removed it (because I don't checked if it's realy changed every where)
dravine has joined #ruby
<quit_rails>
adaedra: not aware of.. sorry
ericjphillips has joined #ruby
<shevy>
tuor I found that this can happen in big projects
<quit_rails>
I was just testing the command.. how it works..
<shevy>
like when you end up with 20 @instance vars, then change a lot of stuff... suddenly you realize that you only need 15 of them at maximum after the rewrite
piotrj has quit [Remote host closed the connection]
quit_rails has quit []
darkf has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
* tuor
is working on list_templates.
tjbiddle has joined #ruby
Zai00 has quit [Quit: Zai00]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
hmm is there a way to find out if a file is "binary or text file"? I need to do "cat input_file_here", but only if it is a text file, "cat foo.mp3" does not give me a lot of useful things
<jhass>
file is pretty good in detecting ascii
Cyther has joined #ruby
quazimodo has quit [Ping timeout: 265 seconds]
tsujp has joined #ruby
Cyther_ has quit [Ping timeout: 264 seconds]
<Burgestrand>
shevy: why only if it is a text file?
Xeago has quit [Remote host closed the connection]
<shevy>
because when I display it on the commandline, "cat foo.mp3" yields nothing useful whereas "cat foo.txt" would
axiomatic_345 has joined #ruby
<Burgestrand>
Maybe foo.txt is just gibberish?
<shevy>
no
p0wn3d has joined #ruby
<Burgestrand>
How do you know?
k3asd` has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
<shevy>
do you store mp3 files in foo.txt or something?
Gnomethrower has quit [Max SendQ exceeded]
devoldmx has joined #ruby
<Burgestrand>
Point being the extension is sufficient to know if it's printable?
joonty has joined #ruby
<shevy>
of course
<certainty>
xD
<Burgestrand>
shevy: You can find out if it's a binary or text file by looking at the extension, so only cat files that aren't mp3!
prestorium has joined #ruby
<shevy>
that is insane
<Burgestrand>
So are platypuses.
dhjondoh has quit [Quit: dhjondoh]
<certainty>
haha
<certainty>
i like them
scripore has joined #ruby
scripore has quit [Remote host closed the connection]
bruno- has quit [Quit: Lost terminal]
workmad3_ has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
cih has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
cih_ has joined #ruby
konsolebox has quit [Max SendQ exceeded]
_el_fer_ has joined #ruby
konsolebox has joined #ruby
darkf has joined #ruby
dhjondoh has joined #ruby
platzhirsch has joined #ruby
tiredcat has joined #ruby
pawnbox has joined #ruby
OrbitalKitten has joined #ruby
amystephen has joined #ruby
rbennacer has joined #ruby
sanjayu has quit [Ping timeout: 260 seconds]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
JDiPierro has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
DoubleMalt has quit [Ping timeout: 256 seconds]
skade has quit [Quit: Computer has gone to sleep.]
elfuego has quit [Quit: elfuego]
Cyther_ has joined #ruby
Flying_Squirrel has joined #ruby
axiomatic_345 has joined #ruby
TvL2386 has joined #ruby
Cyther has quit [Ping timeout: 246 seconds]
cassioscabral has joined #ruby
DrCode has joined #ruby
Porfa has quit [Ping timeout: 255 seconds]
asxbr has joined #ruby
<oddmunds>
shevy: so file(1)?
asxbr has quit [Client Quit]
The_Phoenix has joined #ruby
asxbr has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
<certainty>
+¹
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
favadi has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
k3asd` has quit [Ping timeout: 240 seconds]
The_Phoenix has joined #ruby
relix_ has quit [Read error: Connection reset by peer]
The_Phoenix has quit [Max SendQ exceeded]
relix has joined #ruby
rbennacer has quit [Remote host closed the connection]
but3k4_ has joined #ruby
The_Phoenix has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
OrbitalKitten has quit [Read error: Connection reset by peer]
Klamber|ext has joined #ruby
<[k->
+²
DoubleMalt has joined #ruby
<shevy>
oddmunds yeah
<tobiasvl>
hey oddmunds
<Klamber|ext>
Hey! I have a question about passing by values and references. I searched and found out that Ruby is pass by value. I can understand how that sometimes looks like pass by reference when you pass a object because you actually pass the "pointer" to a function. But is there a way to pass a variable to function and get a value back eg. pass by reference on variables. Or should I create a class just to hack around that ? (Ask if unclear)
<oddmunds>
tobiasvl: heysways
bronson has joined #ruby
Anti-Pizza has quit [Quit: Quit]
pawnbox_ has joined #ruby
Burgestrand has quit []
<Klamber|ext>
I want my function modify a variable passed to it.
jcromartie has joined #ruby
skweek has quit [Remote host closed the connection]
<shevy>
Klamber|ext isn't that the default? anyway, you should always be able to clone strings for a new string object via .dup
pheuko has quit [Ping timeout: 240 seconds]
llua has left #ruby [#ruby]
<shevy>
>> def foo(i); i << 'world'; end; i = 'Hello '; foo(i); i
<shevy>
I still have not fully understood immutable strings
<[k->
like you don't with Unicode
pheuko has joined #ruby
pawnbox has quit [Ping timeout: 265 seconds]
emilkarl has quit [Quit: emilkarl]
bronson has quit [Ping timeout: 256 seconds]
<[k->
pass a variable to a function and get a value back?
yokel has joined #ruby
<Klamber|ext>
[k-: For example... function returns some data, but I also pass a state parameter. I want to get the data returned by function and also read if state was changed.
<certainty>
shevy: what's hard to understand about immutable strings? It's strings you can't mutate
<[k->
Klamber|ext: did you come from languages like haskell by any chance?
roxtrong_ has joined #ruby
<[k->
or are you embracing functional programming in Ruby
<Klamber|ext>
[k-: Nope. Just used to pointers and sutch.
JaReAx has quit [Ping timeout: 240 seconds]
sdwrage has joined #ruby
<adaedra>
Klamber|ext: you can return multiple things in ruby, through an array.
<[k->
but that's generally not how you do things in Ruby
<adaedra>
it's common here
<adaedra>
and you can do `data, state = calc_data(state)`
<[k->
you could use a hash, or a struct
<Klamber|ext>
Would a state object work ?
<Klamber|ext>
It should..
<Klamber|ext>
I'll irb on it.. just a sec
<adaedra>
It means you need to have a way of modifying the object in place.
roxtrongo has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
ndrei has joined #ruby
drewvanstone has joined #ruby
<[k->
how would you know the state has changed if the original state changed under your belt?
<[k->
you won't be able to compare them
<jhass>
Klamber|ext: who said it's pass by value? it's entirely pass by reference
<[k->
true, false would be enough
atomical has joined #ruby
<jhass>
well or all variables are pointers and they're passed by value if that fits your model better
<jhass>
but the objects don't get copied
<oddmunds>
in elixir, it's common to always return tuples like {:ok, data} = calc_data
<certainty>
i think that what he was trying to say
bruno- has quit [Quit: Lost terminal]
Rickmasta has joined #ruby
<[k->
is that pattern matching on :ok?
<oddmunds>
[k-: yeah
bruno- has joined #ruby
<Klamber|ext>
hm.. Maybe I was thinking like C on that.. In Ruby you can raise exceptions, can't you ?
neohunter has quit [Ping timeout: 272 seconds]
<certainty>
you can
<eam>
certainty: exit! does complete successfully. But its side effect is that it terminates ruby and thus all values
<eam>
it returns a non-ruby value to the parent process
moeabdol has joined #ruby
drewvanstone has quit [Ping timeout: 264 seconds]
ndrei has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
<Klamber|ext>
Well in my case I tested that I made a class and passed that alongside my other stuff to function then it becomes pretty easy..
<Klamber|ext>
I might go with that right now..
Xeago has joined #ruby
<certainty>
eam: yes exit does. I was referring to raise
<jhass>
Klamber|ext: that sounds kinda like all your other stuff should be inside that class
decoponio has joined #ruby
<eam>
ah
<jhass>
or a couple of them
<Klamber|ext>
jhass: Nope.
<[k->
we cant provide more help due to the lack of context so..
bmurt has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
<Klamber|ext>
[k-: I understand. I was just asking if there is a way for the function to modify it's parameter so after function ends the parameter value changes remain.
<jhass>
sorry but that wish demonstrates a severe lack of using OOP paradigms
`tim` has joined #ruby
<Klamber|ext>
Like in other languages you can pass by reference or a pointer.
<Klamber|ext>
jhass: That might be.
<[k->
it feels very awkward to me, does not fit in Ruby somehow
<jhass>
hence the motivation for my "use more classes" statement
Rollabunna has joined #ruby
Porfa has joined #ruby
<jhass>
a class is not just a struct you pass a around
skweek has joined #ruby
<jhass>
well, not limited to
<Klamber|ext>
not saying so..
<jhass>
but yeah, probably can't argue this properly without context
DrCode has quit [Remote host closed the connection]
InternetFriend has joined #ruby
phutchins1 has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
Axy has joined #ruby
<Klamber|ext>
For more context. I have a recursive function. I need to know if it's branches found something. There is always someting in the end of one branch. But as recursion starts to end it's cycles i want to know what branch had the thing i was searching. And to do that i thought i would passs a variable that gets changed to true or smth. So I would know after each recursive call if that branch is the link to the thing I'm looking for. That came out a
<adaedra>
Return multiple things!
Rollabunna has quit [Ping timeout: 246 seconds]
pandaant has joined #ruby
<Klamber|ext>
adaedra: And is that the right use of OO ?
<jhass>
IRC has a message length limit of 510 bytes, that includes your prefix, so count with about 450
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kobain has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
tsujp has quit [Quit: tsujp is snoozing]
<adaedra>
The current branch is not really to be saved into the object?
<jhass>
one could argue it is since you're returning an object that's a composition of the values you care about
Mia has quit [Ping timeout: 246 seconds]
SylarRuby has joined #ruby
<Klamber|ext>
Eash brancjh link needs to know if it's on the path to "happyness" :D
<jhass>
build a tree?
<jhass>
mh, or a linked list rather
Burgestrand has joined #ruby
<Klamber|ext>
I wish i had came out with that simple explanation. Yes a tree!
<jhass>
so just build up an array of nodes that forms the path perhaps?
<Klamber|ext>
Yes, pretty mutch.
JDiPierro has joined #ruby
felixr has joined #ruby
<Klamber|ext>
But there is no need for the path to be saved in some different variable.
<jhass>
so [node] + build_path(node)
<yorickpeterse>
ergh, this idea of "MRI == not having to synchronize" is utterly broken
<yorickpeterse>
e.g. seems concurrent-ruby also made that mistake
<Klamber|ext>
Jup.
whippythellama has joined #ruby
cisco has joined #ruby
<jhass>
then each_cons(2) == pairs with good links between them
malconis has joined #ruby
shinnya has joined #ruby
nfk|laptop has joined #ruby
<funkenstrahlen>
hey, I got account.videos which returns a list of video objects. I know want to have a account.videos.contains for a video title which can be accessed by video.title
<funkenstrahlen>
how can I do this in ruby syntax?
pheuko has joined #ruby
noethics has joined #ruby
soc42 has joined #ruby
<jhass>
funkenstrahlen: .select or .find {|video| video.title == title } ?
<jhass>
or .any?
<jhass>
your question isn't too clear
Igorshp has quit [Remote host closed the connection]
favadi has joined #ruby
sgambino has joined #ruby
_el_fer_ has quit [Quit: Leaving]
[k-_ has joined #ruby
noethics has quit [Client Quit]
dirtyonekanobi has joined #ruby
<Klamber|ext>
jhass: I'll keep that each_cons thingy in mind. (Ruby is new for me)
[k- has quit [Read error: Connection reset by peer]
codecop has quit [Remote host closed the connection]
<jhass>
Klamber|ext: just yields each n consecutive items
Flying_Squirrel has quit [Ping timeout: 240 seconds]
<funkenstrahlen>
jhass: I want something like your .find example but with a simple true or false answer for 'does it contain the video.title video element'
<jhass>
funkenstrahlen: that's any?
govg has joined #ruby
<shevy>
certainty yeah so the above code would not work as-is right?
<catphish_>
kinda specific question, does anyone know how to make OpenSSL::SSL::SSLContext honor the cipher order you give it?
unshadow has quit [Quit: leaving]
Pathfinder has quit [Remote host closed the connection]
moeabdol has joined #ruby
Pathfinder has joined #ruby
<funkenstrahlen>
jhass `derpy thank you guys. have it working
<jhass>
?guys funkenstrahlen
<ruboto>
funkenstrahlen, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<jhass>
adaedra: does `derpy feel like a guy?
Burgestrand has quit []
Porfa has quit [Quit: Porfa]
<`derpy>
Nope!
<shevy>
funkenstrahlen is a mighty nick... almost as mighty as platzhirsch, flughafen and Papierkorb ... we also used to have brotspinne
casadei has joined #ruby
<Klamber|ext>
jhass: Coming back from smoke, I relized that but still a useful thingy..
<shevy>
smoking lowers coding productivity!
roxtrong_ has quit [Remote host closed the connection]
nfk|laptop has quit [Read error: Connection reset by peer]
BTRE has joined #ruby
hashrocket has joined #ruby
<theRoUS>
suppose i want to create a gem that's subordinate to an existing namespace? specifically, there's already a 'gitolite' gem, but i want to port gitolite3's Gitolite::Easy to ruby.
devoldmx has quit [Ping timeout: 268 seconds]
dorei has joined #ruby
betsoff has quit [Quit: Page closed]
<theRoUS>
is it acceptable practice to just lay claim to the Gitolite::Easy namespace (e.g., with 'bundle gem gitolite-easy') ?
<adaedra>
I think so
<apeiros>
theRoUS: IMO ask the author
Flying_Squirrel has quit [Ping timeout: 272 seconds]
<apeiros>
theRoUS: also be prepared that the author (of gitolite) may override yours at any time
aganov has quit [Remote host closed the connection]
<theRoUS>
apeiros: 's what i figured; contacting/coordinating with both would be polite :-)
niftylettuce has joined #ruby
unsymbol has quit [Quit: cheerio]
favadi has joined #ruby
unsymbol has joined #ruby
felixr has quit [Ping timeout: 240 seconds]
favadi has quit [Max SendQ exceeded]
southpawlar has joined #ruby
nfk|laptop has joined #ruby
icmax has joined #ruby
icmax has left #ruby [#ruby]
greenarrow has joined #ruby
Xeago has quit [Remote host closed the connection]
beauby has quit [Ping timeout: 240 seconds]
andyrs has joined #ruby
diegobiavati_ has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Quit: Leaving...]
yottanami has quit [Remote host closed the connection]
ngscheurich has quit [Ping timeout: 272 seconds]
diegobiavati has quit [Ping timeout: 265 seconds]
cornerma1 has joined #ruby
ta has quit [Remote host closed the connection]
ta has joined #ruby
<shevy>
theRoUS should be trivial; I think you can check whether the Easy namespace exists, and if it does not, you can add to it, so you can guarantee that your modifications should not conflict with the default gitolite gem
diegobiavati_ has joined #ruby
diegobiavati has joined #ruby
Xeago has joined #ruby
mallu has joined #ruby
cornerman has quit [Ping timeout: 244 seconds]
cornerma1 is now known as cornerman
nateberkopec has joined #ruby
Siyfion has joined #ruby
Newtonianb has joined #ruby
skweek has quit [Remote host closed the connection]
pawnbox_ has quit [Remote host closed the connection]
bruno- has joined #ruby
<Porfa>
hey, I'm cross helping on this one, i just don't get much feedback in the selenium channel, and since it's a well known gem i might get my help here… my question is: when i want to put text into a box i use .sendkeys, but it doesn't remove what's there, for that i have to .clear first.
<Porfa>
my real question is, can i actually .sendkeys BEFORE the existing text?
<Porfa>
i can put the existing text in a var, and send keys wtv + var, but I'm just wondering if there is another way
<apeiros>
moeabdol: well, what do you expect? it's a non-question.
favadi has joined #ruby
<apeiros>
lots of "yes, me"?
lolmaus has joined #ruby
BaroMeter has joined #ruby
<moeabdol>
apeiros: I was hoping to get a "was a great read" and ask about the code
bruno- has quit [Read error: Connection reset by peer]
<shevy>
I did not read it \o/
<apeiros>
then ask for whether somebody can recommend/disrecommend it
favadi has quit [Max SendQ exceeded]
<noethics>
ruby
<apeiros>
and/or if there's alternative books which can be recommended for <topic>
ruurd has quit [Max SendQ exceeded]
<moeabdol>
apeiros: I already have the book, and read reviews about how good it "should" be
icmax has joined #ruby
<moeabdol>
the thing is it seems like the book follows an example of one rails project
ndrei has joined #ruby
<moeabdol>
and I want to follow the book
lolmaus_ has quit [Ping timeout: 240 seconds]
<moeabdol>
and create a git repository of the project
bronson has quit [Ping timeout: 250 seconds]
<moeabdol>
but I was wondering if the project can be diesected into different commits each being a chapter
skweek has joined #ruby
<icmax>
What is a Mutex object used for?
<moeabdol>
or different directories of chapters each has its own copy of the rails project
<moeabdol>
I hope it makes sense!
bruno- has joined #ruby
<noethics>
icmax, sychronization
<noethics>
sync*
_joes_ has quit [Remote host closed the connection]
<icmax>
noethics: How does it work?
<adaedra>
Magic.
<apeiros>
icmax: it blocks access for other threads
<apeiros>
until the locking thread frees the lock again
Xeago has quit [Remote host closed the connection]
haraoka has quit [Ping timeout: 268 seconds]
favadi has joined #ruby
Xeago has joined #ruby
<noethics>
note that mutexes aren't something specific to ruby
<noethics>
you can find out "how they work" with a simple google search
favadi has quit [Max SendQ exceeded]
emilkarl has quit [Quit: emilkarl]
<apeiros>
moeabdol: since I don't have the book - no idea, sorry.
fastAndSlow has quit [Quit: Lost terminal]
sanguisdex has quit [Quit: Leaving.]
<icmax>
noethics: Ok.
<moeabdol>
apeiros: thanks anyways :)
southpawlar has quit [Read error: Connection timed out]
icmax has left #ruby [#ruby]
agit0 has joined #ruby
nfk|laptop has quit [Quit: yawn]
FrankD has joined #ruby
slawrence00 has joined #ruby
sanguisdex has joined #ruby
agit0 has quit [Client Quit]
OrbitalKitten has joined #ruby
ehth77 has joined #ruby
spotted has joined #ruby
asxbr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spotted is now known as Deviad
<Deviad>
Hello
<Klamber|ext>
Hello, Deviad
<Deviad>
I would like to know better how the whole thing of functions like .reverse! for example works
cschneid_ has joined #ruby
<Deviad>
like s.reverse! is accepted and it actually changes s
momomomomo has quit [Ping timeout: 250 seconds]
<Deviad>
while for to_sym it does not work
andyrs has quit [Quit: I'm leaving now, bye.]
momomomomo has joined #ruby
<shevy>
it is mostly a convention for trailing !
yardenbar has quit [Ping timeout: 268 seconds]
havenwood has joined #ruby
<adaedra>
methods ending by ! usually modify object in-place.
<apeiros>
with to_sym, an additional limitation comes into play: strong typing
<apeiros>
you can't change the class of an object in-place.
Flying_Squirrel has joined #ruby
<adaedra>
when their counterpart without a ! will return a new, modified object, without modifying the origin.
allomov has quit [Remote host closed the connection]
<apeiros>
and to_sym (except for Symbol#to_sym) returns an object of a different class. so that can't happen in-place.
riotjones has joined #ruby
<Deviad>
OK I got it clear now
<Deviad>
Ruby already does a great job considering that usually in other languages in case of arrays I can have only numbers or strings
<Deviad>
Ruby accepts everything into an Array...
bklane has joined #ruby
<Deviad>
you do not need to create new data structures like in java
InternetFriend has joined #ruby
InternetFriend has quit [Client Quit]
<Deviad>
I mean a new abstract data type
<shevy>
java is like the business side of OOP
cassioscabral has joined #ruby
<adaedra>
Ruby is dynamically typed, Deviad
tiredcat has quit [Ping timeout: 252 seconds]
<shevy>
ruby is the artist side of OOP
piotrj has quit [Remote host closed the connection]
eminencehc has joined #ruby
<Deviad>
At the moment I am learning ruby through codecademy.com however I would not dislike having a book for university students like those there are out there by Deitel for Java
eminencehc has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 252 seconds]
diegoviola has joined #ruby
TPBallbag has joined #ruby
Rollabunna has joined #ruby
renderful has joined #ruby
eminencehc has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 256 seconds]
<Deviad>
Some of them are outdated, some of authors I dunno how much I can trust and if they teach me good programming principles...
<Deviad>
some by authors*
Zarthus has quit [Quit: ZNC 1.7.x-git-196-5faaf67 - http://znc.in]
Zarthus has joined #ruby
southpawlar has joined #ruby
renderful has quit [Ping timeout: 250 seconds]
Rollabunna has quit [Ping timeout: 240 seconds]
SylarRuby has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
InternetFriend has joined #ruby
ericjphillips has quit [Quit: Leaving.]
<pipework>
Deviad: There are books. Metaprogramming ruby, then The Well Grounded Rubyist, and mroe.
<pipework>
more too
piotrj has joined #ruby
<havenwood>
Deviad: The Second Edition of the Well-Grounded Rubyist is pretty recent.
<shevy>
[k- hmm... my small projects don't really need any work ... and my big projects are either quite complicated, or in transition-phase of rewrites... nobody sane in mind wants to touch that until the code base is cleaner
<ruboto>
[k- # => "??????????????????????????????????????????????????????????????????????????????????????????????????? ...check link for more (https://eval.in/441684)
<ruboto>
[k- # => "??????????????????????????????????????????????????????????????????????????????????????????????????? ...check link for more (https://eval.in/441698)
RxDx has joined #ruby
ericjphillips has quit [Quit: Leaving.]
<RxDx>
please, is there anyway to POST/PUT and entity parameter name without the _attributes suffix? I mean.. why do I have to send beer_attributes {name: "foo"} if I receive beer {name: "bar"}?
ericjphillips has joined #ruby
thebastl has quit [Remote host closed the connection]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
herbst has quit [Remote host closed the connection]
<apeiros>
>> !!%?%%??!!%:!!::%!??!
<ruboto>
apeiros # => /tmp/execpad-2405e9993b90/source-2405e9993b90:2: warning: string literal in condition ...check link for more (https://eval.in/441710)
<ruboto>
eam # => /tmp/execpad-08d76451920a/source-08d76451920a:2: warning: string literal in condition ...check link for more (https://eval.in/441711)
<ruboto>
apeiros # => /tmp/execpad-7a7b7a385e2f/source-7a7b7a385e2f:2: warning: string literal in condition ...check link for more (https://eval.in/441713)
<apeiros>
what? that warning existed in 1.8 already?
A124 has joined #ruby
p0wn3d has quit [Quit: WeeChat 1.3]
TPBallbag is now known as snowy
<eam>
apeiros: it's not a string in 18
snowy is now known as INFO_
casadei has quit [Remote host closed the connection]
p0wn3d has joined #ruby
<apeiros>
%?!!? is one ;-)
Rollabunna has joined #ruby
<eam>
ah
<eam>
what I don't get is why !????::?? - ????::?? isn't 5
MVPhelp has quit [Remote host closed the connection]
<eam>
must be precedence I'm missing
<eam>
is the minus drawing the second part into the else of the ternary?
bricker has joined #ruby
<eam>
it must be
RxDx has quit [Quit: This computer has gone to sleep]
INFO_ has quit []
<apeiros>
don't ask me, I try to avoid ambiguous precedence :D
towski_ has joined #ruby
<adaedra>
Never too much parenthesis.
<adaedra>
too many*
<adaedra>
((((((((((Never.))))))))))
cmoel has joined #ruby
MVPhelp has joined #ruby
devoldmx has joined #ruby
eminencehc has quit [Remote host closed the connection]
<Klamber|ext>
Heh! adaedra, I think I know what you meant by returning multible things now. Remembered seeing it on some intro page.. a,b = m() Now that's real neat!
casadei has quit [Remote host closed the connection]
<adaedra>
it is
rodfersou is now known as rodfersou|lunch
<adaedra>
>> a, b = "Hello, world".split(/[, ]/); [a, b]
<ruboto>
eam # => [true, "busted: f(not true)", false, "busted: f not true", false] (https://eval.in/441732)
ramfjord has joined #ruby
<adaedra>
I prefer cursing in French.
<adaedra>
It's like wiping your ass with silk.
p0wn3d has joined #ruby
piotrj has joined #ruby
<eam>
I prefer baby wipes
momomomomo has joined #ruby
<Porfa>
damn i came across something i've never done before, i'll try to put it into words the best i can, so someone might point me in the right direction. I have an array with strings, the number of strings is random. now, for each occurence in the array, i need to perform a comand the problem for me is that each comand i perform, must change every time acording to the number of the string inside the array, for ie:
<eam>
Porfa: number = 1234; string = "some stuff #{number}"
<[k->
Merovingian: I love French wine, like I love the French language. I have sampled every language, French is my favorite. Fantastic language. Especially to curse with. Nom de dieu de putain de bordel de merde de saloperie de connard d'enculer ta mère. It's like wiping your arse with silk. I love it.
mikecmpbll has quit [Ping timeout: 246 seconds]
<eam>
Porfa: you can build strings out of other variables
<shevy>
like eam just showed you \o/
<adaedra>
Mh, there's a mistake in this quote though.
<[k->
wait, there was a ref?
<[k->
that didnt work in mobile!
<[k->
i had to search for it
<Porfa>
thank you, ill read something now! :)
<[k->
what does that french mean?
<adaedra>
er
<eam>
what does any french mean, really
<adaedra>
I'm not sure it's really translatable
<adaedra>
It's a long cursing
<adaedra>
All you need to know
Mojo_Nixon has joined #ruby
<adaedra>
And listen Lambert Wilson recite it perfectly.
cassioscabral has quit [Quit: cassioscabral]
Mojo_Nixon has joined #ruby
Mojo_Nixon has quit [Client Quit]
<adaedra>
eam: shoot, you guessed. I speak nonsense all day. :(
elfuego has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<Porfa>
i want to print OMG but it's printing f04_000#{unt}
<Porfa>
sorry if the copy paste was out of way, it was just a line i though it was ok
cih has quit [Ping timeout: 246 seconds]
chrisja has joined #ruby
pwnd_nfsw has joined #ruby
InternetFriend has joined #ruby
<shevy>
no it is not the paste
<shevy>
it is the content of the paste
<shevy>
what is nut and why do you use unt
<Porfa>
sorry, its all meant to be nut, I'm just nut i guess
<shevy>
haha
eminencehc has quit [Remote host closed the connection]
<shevy>
you should just use a full var
<shevy>
(:id, "f04_000#{unt}")
<shevy>
(:id, nut)
<Porfa>
hmm i see, nice :)
<shevy>
break things up into small chunks
<shevy>
divide and conquer
<Porfa>
thank you again for showing me the way into the light ;_;
<shevy>
that is not the way
<shevy>
that is just one little baby step
cassioscabral has quit [Quit: cassioscabral]
ponga has quit [Quit: Connection closed for inactivity]
renderful has joined #ruby
lsmola has quit [Ping timeout: 272 seconds]
banjara has joined #ruby
postmodern has joined #ruby
rippa has joined #ruby
piotrj has quit [Remote host closed the connection]
rindolf has joined #ruby
<rindolf>
Hi all.
petricore has joined #ruby
eminencehc has joined #ruby
piotrj has joined #ruby
Jackneill has joined #ruby
cisco has joined #ruby
cisco has quit [Max SendQ exceeded]
hanmac has joined #ruby
cisco has joined #ruby
tfitts has joined #ruby
n008f4g_ has joined #ruby
pandaant has quit [Remote host closed the connection]
tejasmanohar has joined #ruby
beast has quit [Quit: Leaving]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
gandalf!
<tfitts>
if I have [[1,2],[3,4],[5,2]] is there a single-line method that I can sum all of the first element, sum all of the second element, and then divide the resulting sum of the second by the first?
platzhirsch has joined #ruby
<wallerdev>
probably, maybe show an example of the result you want
larissa has quit [Ping timeout: 246 seconds]
<rindolf>
tfitts: does it have to be a single-line?
Alayde has joined #ruby
SebastianThorn has quit [Quit: Lost terminal]
<tfitts>
rindolf: I guess not, but if not I could obviously just assign the variable to an array and then var.collect(&:first).sum / var.collect(&:last).sum
<tfitts>
array to a variable*
davidhq has joined #ruby
<wallerdev>
ohh
liquidmetal has quit [Quit: Leaving]
rushed has quit [Quit: rushed]
SebastianThorn has joined #ruby
sargas has quit [Quit: This computer has gone to sleep]
<tfitts>
eam: I'm still working out how to do it fastest. I have 18000 records that I need to check revenue/profit on for the last month, of which only ~10% have sales in that last month
<Porfa>
puts det1 + entrada.to_a + det2 + det3 < i need to get the value each time like this
<wallerdev>
single line doesnt mean fastest lol
<Porfa>
i had to chop down my strings to get the array value between them, and i can't get it in there
<tfitts>
I know
<Porfa>
i know
<tfitts>
I'm testing a few different solutions
cassioscabral has joined #ruby
<wallerdev>
just keep a running sum for each and divide at the end, should be fastest that way
<eam>
tfitts: if efficiency is a concern, use two variables to hold each sum as you iterate once, and divide them at the end
skweek has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 240 seconds]
<Porfa>
shevy: i can read that code and i can understand what it does, it's beautifull
bronson has quit [Ping timeout: 244 seconds]
shoutsid has quit [Ping timeout: 256 seconds]
dathon has quit [Quit: Leaving.]
info_is_good has joined #ruby
camilasan has quit [Remote host closed the connection]
SylarRuby has quit []
<info_is_good>
Hello, I'm trying to understand ruby's lambdas. How can I translate this, in JavaScript, to Ruby? (function(a){return function(b){return a+b}})(2)(3) -- outputs 5
<info_is_good>
I've used the (lambda { ... }) syntax but got an error, unexpected '('
piotrj has quit [Ping timeout: 264 seconds]
camilasan has joined #ruby
karapetyan has quit [Remote host closed the connection]
rodfersou|lunch is now known as rodfersou
roshanavand has quit [Quit: Leaving]
<apeiros>
info_is_good: only that part of your code won't allow us to tell you where the syntax error is.
dasher00 has joined #ruby
baweaver has joined #ruby
<info_is_good>
apeiros: Okay, I've managed to get it to work (sorry). This is a Lambda Calculus → Ruby transmogrifier. I used the following syntax: (lambda { |a| (lambda { |b| a.call(a.call(a.call(b))) }) }).call((lambda { |a| (lambda { |b| a.call(a.call(a.call(b))) }) })).call(lambda { |a| a+1 }).call(0)
dstarh has joined #ruby
<info_is_good>
Does it look alright? I.e., is the `.call` normal?
DrCode has joined #ruby
<jhass>
>> ->(a) { ->(b) { a+b } }.(2).(3) # literal translation. Idiomatic ruby? nope, far away from it
<apeiros>
.call is normal. but this isn't your example from above anymore?
<apeiros>
.() which jhass just used is expanded to .call() btw.
<info_is_good>
apeiros: it is another example, my bad. jhass that looks briefer, thanks
Flying_Squirrel has joined #ruby
peterhu has quit [Ping timeout: 260 seconds]
Lucky__ has joined #ruby
baweaver has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
karapetyan has joined #ruby
Pathfinder_ has joined #ruby
symm- has joined #ruby
dfockler has quit [Remote host closed the connection]
anisha has joined #ruby
shoutsid has joined #ruby
Anti-Pizza has quit [Quit: Quit]
<info_is_good>
(->(a){(->(b){a.(a.(a.(b)))})}).((->(a){(->(b){a.(a.(a.(b)))})})).(->(a){a+1}).(0) works perfectly. This is multiplication of 3 by 3 using functions. Very clean syntax, I like it. I'll add a transmogrifer to ruby to github.com/maiavictor/caramel. Thank you.
dravine_ has joined #ruby
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
bb010g has quit [Quit: Connection closed for inactivity]
blaxter has quit [Ping timeout: 272 seconds]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dravine has quit [Ping timeout: 272 seconds]
dravine_ is now known as dravine
tkuchiki has quit [Remote host closed the connection]
RxDx has joined #ruby
Xeago has quit [Remote host closed the connection]
Hounddog has quit [Remote host closed the connection]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eminencehc has joined #ruby
axiomatic_345 has quit [Quit: Leaving]
ericjphillips has quit [Quit: Leaving.]
pawnbox has quit [Remote host closed the connection]
prestorium has quit [Quit: Leaving]
fastAndSlow has joined #ruby
<RxDx>
please, is there anyway to POST/PUT the entity parameter name (in json) without the _attributes suffix? I mean.. why do I have to send beer_attributes {name: "foo"} if I receive beer {name: "bar"}?
<ruboto>
RxDx, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
baweaver has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<RxDx>
apeiros, sorry
tfitts has quit [Ping timeout: 250 seconds]
joonty has quit [Quit: joonty]
tfitts has joined #ruby
lolmaus has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
last_staff has joined #ruby
spider-mario has joined #ruby
stamina has joined #ruby
dionysus69 has joined #ruby
FrankD has quit [Ping timeout: 244 seconds]
Kendos-Kenlen has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
NeverDie has joined #ruby
pawnbox has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aaeron has joined #ruby
sargas has quit [Quit: This computer has gone to sleep]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
InternetFriend has joined #ruby
leafybas_ has joined #ruby
Zai00 has joined #ruby
aaeron1 has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
gambl0re has quit [Ping timeout: 256 seconds]
<funkenstrahlen>
looks like rubydoc.info is down?
Flying_Squirrel has quit [Ping timeout: 264 seconds]
aaeron has quit [Ping timeout: 246 seconds]
dome22xl has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
karapetyan has quit [Remote host closed the connection]
<jhass>
nope
leafybasil has quit [Ping timeout: 246 seconds]
_djbkd has quit [Remote host closed the connection]
apt-get has joined #ruby
yqt has joined #ruby
gambl0re has joined #ruby
baweaver has joined #ruby
_djbkd has joined #ruby
Deviad has quit [Ping timeout: 244 seconds]
renderfu_ has joined #ruby
RxDx has quit [Quit: Leaving]
fastAndSlow has quit [Quit: Lost terminal]
roxtrongo has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
soulcake has joined #ruby
renderful has quit [Ping timeout: 252 seconds]
soulcake has quit [Max SendQ exceeded]
grill has joined #ruby
<grill>
what is the proper way to document methods in ruby
soulcake has joined #ruby
soulcake has quit [Max SendQ exceeded]
wilbert has joined #ruby
uxp has quit [Remote host closed the connection]
<pipework>
grill: By writing methods that don't need documentation, and failing that, by using rdoc or yard and filling out as much as you can.
kidoz has joined #ruby
aaeron1 has quit [Quit: Leaving.]
<havenwood>
grill: The simplest, most readable code that possibly works.
<grill>
good lord. what is this language? "we don't need documentation!"
grill has left #ruby [#ruby]
<pipework>
Lul.
<havenwood>
DRY.
<apeiros>
scared 'em away
<havenwood>
;)
<pipework>
I'd say that was for the better.
krz has quit [Quit: WeeChat 1.2]
<pipework>
Let them go on their journey and come back when they're ready to be enlightened.
<havenwood>
I admit I like comments on things worth commenting on.
<pipework>
"# Dear havenwood, I believe this method will be quite to your liking"
<havenwood>
pipework: :)
sargas has joined #ruby
Deviad has joined #ruby
cirenyc has joined #ruby
_el_fer_ has joined #ruby
eminencehc has quit [Remote host closed the connection]
chouhoul_ has joined #ruby
chouhoulis has quit [Read error: Connection reset by peer]
<apeiros>
I knew I had seen *!FUNKMASTAF@* before. prefixed from from yesterday…
bronson has joined #ruby
stamina has quit [Ping timeout: 246 seconds]
renderfu_ has quit []
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eminencehc has joined #ruby
yfeldblum has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
<rmrrn>
okay
roxtrong_ has joined #ruby
ehth77 has left #ruby ["WeeChat 1.2"]
shoutsid has quit []
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unreal has quit [Read error: Connection reset by peer]
devdazed has joined #ruby
unreal has joined #ruby
roxtrongo has quit [Ping timeout: 272 seconds]
rbowlby has quit [Remote host closed the connection]
renderful has joined #ruby
baweaver has quit [Remote host closed the connection]
<Porfa>
hello guys i need dire help ;_; i have do puts inside a loop, but it's printing the thing to the screen instead of the console
<pipework>
Porfa: show us code
<Porfa>
yes sir
evanjs has joined #ruby
<Porfa>
gisting
evanjs_ has quit [Ping timeout: 244 seconds]
EllisTAA has joined #ruby
polishdub has joined #ruby
axiomatic_345 has joined #ruby
ruby-lang362 has joined #ruby
_djbkd has quit [Remote host closed the connection]
biesiad has left #ruby [#ruby]
* ruby-lang362
slaps Guest67071 around a bit with a large fishbot
diegobiavati has joined #ruby
ruby-lang362 has quit [Client Quit]
duoi has quit [Ping timeout: 246 seconds]
duoi has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
SenpaiSilver has joined #ruby
roxtrong_ has quit [Remote host closed the connection]
borodin_ has joined #ruby
crdpink has joined #ruby
miah has joined #ruby
evanjs has quit [Remote host closed the connection]
<borodin_>
probably obvious but I'm not getting it - does anyone know of a good page for "getting started with rbenv"? I am using puppet to install rbenv - it all worked, it even installed a ruby in /opt/rbenv/versions. But I can't figure out how to get rbenv to use this ruby.
tvw has joined #ruby
crdpink2 has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
<borodin_>
i.e. I created a directory and added a .ruby-version file with 2.2.3 in it. I cd there and type rbenv local and it says "rbenv: version `2.2.3' is not installed (set by /home/goob/test/ruby/.ruby-version)"
Flying_Squirrel has joined #ruby
eminencehc has quit [Remote host closed the connection]
<tejasmanohar>
i ran `vagrant init hashicorp/precise32 && vagrant up && vagrant ssh` ... then added some files etc but can't see my files in the host computer in the folder i ran those commands ^
<miah>
tejasmanohar: try #vagrant
<tejasmanohar>
trying to find out where it is O.o
dfockler has quit [Remote host closed the connection]
<tejasmanohar>
yea, seems unresponsive :\
benlieb has quit [Quit: benlieb]
_djbkd has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
skullcrasher has joined #ruby
codecop has quit [Remote host closed the connection]
_djbkd has joined #ruby
baweaver has quit [Remote host closed the connection]
lolmaus has joined #ruby
ta has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 246 seconds]
eminencehc has joined #ruby
InternetFriend has joined #ruby
cih has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
Xeago has joined #ruby
pwnd_nsfw has joined #ruby
jackjackdripper has joined #ruby
barhum2013 has quit [Quit: barhum2013]
barhum2013 has joined #ruby
evanjs has joined #ruby
synasyn has joined #ruby
Flying_Squirrel has quit [Ping timeout: 255 seconds]
Xeago has quit [Remote host closed the connection]
phreakocious has quit [Ping timeout: 256 seconds]
jamesaxl has joined #ruby
<borodin_>
it's inserting the shims
phreakocious has joined #ruby
<borodin_>
I'm missing how you tell rbenv which ruby to use, other than adding a .ruby-version file to every project
<borodin_>
(which I'm doing but it isn't working
shadoi has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
aldodelgado has joined #ruby
Xeago has joined #ruby
phutchins1 has joined #ruby
stamina has joined #ruby
<synasyn>
Hello, I am writing tests for a program calling AWS Ruby SDK v2. The calls to the AWS SDK are numerous and scattered everywhere. I would prefer to not mock the whole AWS SDK, as that would be very time consuming. I tried VCR, but it recorded the network delays and was very slow in testing. Is there any recommended libraries that would stub out the AWS SDK?
<synasyn>
I did try monkey patching, but it is a slow and onerous process
speakingcode has quit [Ping timeout: 252 seconds]
Nowaker has left #ruby [#ruby]
cih has quit [Remote host closed the connection]
dmolina has joined #ruby
Flying_Squirrel has joined #ruby
skade has joined #ruby
glenab has joined #ruby
baweaver has joined #ruby
quazimodo has quit [Ping timeout: 268 seconds]
glenab has quit []
jenrzzz has joined #ruby
renderful has quit []
* woodruffw
test
<apeiros>
test failed. please reboot.
speakingcode has joined #ruby
diego2 has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 264 seconds]
Zai00_ has joined #ruby
diegoviola has quit [Ping timeout: 260 seconds]
hectortrope has quit [Remote host closed the connection]
mxrguspxrt has joined #ruby
eminencehc has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
Zai00_ is now known as Zai00
arturmartins has joined #ruby
diego2 has quit [Client Quit]
bronson has joined #ruby
renderful has joined #ruby
iamninja_ has quit [Read error: Connection reset by peer]
Zai00 has quit [Client Quit]
bruno- has joined #ruby
iamninja_ has joined #ruby
skweek has joined #ruby
bruno- is now known as Guest49012
Soda has quit [Remote host closed the connection]
SylarRuby has joined #ruby
evanjs has quit [Remote host closed the connection]
Zai00 has joined #ruby
sargas has quit [Quit: Leaving]
bronson has quit [Ping timeout: 268 seconds]
Zai00 has left #ruby [#ruby]
maikowblue has joined #ruby
<Deviad>
Does anyone know what is wrong with this:
<Deviad>
my_array.each { |x| puts x ? x % 2 == 0 : puts ""
<Deviad>
}
leafybas_ has quit [Remote host closed the connection]
leafybasil has joined #ruby
leafybasil has quit [Remote host closed the connection]
momomomomo has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
BlkDynmt has joined #ruby
leafybasil has joined #ruby
biesiad has joined #ruby
info_is_good has quit [Quit: Page closed]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Porfa>
whats the problem? the thing is, the command that is commented ( puts driver.find_element(:id,"add").click ) actually works, i don't know why the other one doesnt
ekleog has joined #ruby
<pipework>
Porfa: No, it does a lot more.
speakingcode has joined #ruby
<Papierkorb>
is there a way to catch all ERRNO errors?
Spleeze has joined #ruby
solocshaw has joined #ruby
<Papierkorb>
Stuff like Errno::ENOENT
<pipework>
Papierkorb: What have you tried?
_djbkd has joined #ruby
scripore has joined #ruby
<Papierkorb>
pipework: a plain rescue => err doesn't, iirc rescue Errno => .. didn't either
<pipework>
Papierkorb: Did you try perhaps the whole constant?
<Papierkorb>
rescuing from Errno::ENOENT works, but I want to catch all of them at once
<pipework>
Errno is a namespace.
<pipework>
To catch all of them you either need a list of all of them or you need a superclass of all them.
<pipework>
Or superclasses.
jdawgaz has quit [Max SendQ exceeded]
TomyLobo has quit [Ping timeout: 265 seconds]
rushed has joined #ruby
hays has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
hays has joined #ruby
tuxero has joined #ruby
joonty has quit [Quit: joonty]
yardenbar has quit [Ping timeout: 268 seconds]
<Porfa>
pipework: are you saying i shouldn't use puts?
JDiPierro has quit [Remote host closed the connection]
<pipework>
Porfa: I'm saying you should figure out what it does and why you're using it and how it affects what you're trying to accomplish.
rhg1351 has joined #ruby
ngscheur1 has quit [Ping timeout: 264 seconds]
<Porfa>
"Prints each argument with a new line appended at the end"
baweaver has quit [Remote host closed the connection]
NeverDie has joined #ruby
hlolli has joined #ruby
ngscheur1 has joined #ruby
<pipework>
Porfa: Have you looked at the return value of puts?
<Porfa>
pipework: but why one puts commands works and the other one doesn't?
<Porfa>
how do i do that?
hlolli has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
<Porfa>
the line that is commented, it does everything it should, because for each $number it does that command, and the interpreter sends back "ok"
prestorium has quit [Quit: Leaving]
<pipework>
When you say $number, what do you mean?
rhg1351 is now known as rhg135
<Porfa>
but the one that is being built by vars, doesn't get sent to the interpreter, if i copy paste each one of them and enter them, they work, and "click" the things
Voker57 has quit [Read error: Connection reset by peer]
<Porfa>
number = ALQDETALHESPB.count.to_i
<Porfa>
that
<Porfa>
sorry
<pipework>
Ah, you shouldn't preface with $, because in ruby that means a global variable.
tkuchiki has joined #ruby
<Porfa>
ok
zenguy_pc has quit [Read error: Connection reset by peer]
otacon- has joined #ruby
<pipework>
Porfa: So when you say 'sent to the interpreter', what do you mean? You're printing out values to STDOUT, you're not sending them to the browser through the driver.
allcentury has quit [Ping timeout: 244 seconds]
axiomatic_345 has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
xcesariox has joined #ruby
<Porfa>
this is sent to the interpreter --> puts driver.find_element(:id,"add").click
_el_fer_ has quit [Quit: Leaving]
<Porfa>
how can i get the lines I'm generating sent to the interpreter pipework ?
<pipework>
Porfa: Probably by looking for some methods you could call that let you send input through the driver.
<pipework>
The 'puts' is just writing the result of the expressions to STDOUT, not to the browser.
GarethAdams has quit [Ping timeout: 256 seconds]
<Porfa>
whats the difference between: puts driver.find_element(:id,"add").click
<Porfa>
and driver.find_element(:id, "f04_0001").send_keys(ALQDETALHESPB[1])
<pipework>
Porfa: What I just explained
n_blownapart has quit []
<Porfa>
hmm
<pipework>
Porfa: You may want to pick up a book that'll teach you ruby.
<pipework>
Or something.
tkuchiki has quit [Ping timeout: 246 seconds]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nanoz has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
havenn has quit [Ping timeout: 264 seconds]
ldnunes has quit [Quit: Leaving]
tejasmanohar has quit [Remote host closed the connection]
last_staff has quit [Remote host closed the connection]
GarethAdams has joined #ruby
govg has quit [Ping timeout: 240 seconds]
momomomomo has quit [Quit: momomomomo]
tangentstorm has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
greymeister has joined #ruby
mikeric has quit []
<pipework>
Papierkorb: I don't know what's wrong with it. Are you sure, because `rescue SystemCallError => err` should get the exception
bklane has quit [Remote host closed the connection]
barhum2013 has quit [Quit: barhum2013]
aerozepplin has joined #ruby
jxv has joined #ruby
barhum2013 has joined #ruby
dfockler has quit [Remote host closed the connection]
Flying_Squirrel has joined #ruby
modern has joined #ruby
bklane has joined #ruby
Balzrael has quit [Quit: Leaving]
baweaver has joined #ruby
firstdayonthejob has quit [Ping timeout: 264 seconds]
`tim` has joined #ruby
Porfa has joined #ruby
michaeldeol has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
vdamewood has joined #ruby
<odigity2>
How do I write a method that takes any kind of args and passes them on to another method, so it's like the caller called the second method with the same args?
<odigity2>
I've been experimenting with *args and **kwargs, and I can't quite figure it out.
<drbrain>
odigity2: def outer(*a) inner(*a) end
jobewan has quit [Quit: Leaving]
<drbrain>
if there are keyword args or block, you can add those with , **k, &b
<odigity2>
drbrain, I tried that but I'm getting a TypeError: is not a symbol nor a string
<ruboto>
adaedra # => [1, 2, 3, {:hello=>:world}] ...check link for more (https://eval.in/441870)
<odigity2>
I tried *args by itself, **kwargs by itself, and both together, and I always get that type error
djbkd_ has quit [Read error: Connection reset by peer]
<drbrain>
odigity2: what are the arguments? for send, the first argument must be the method name you're sending to
<EllisTAA>
i’m trying to set up a message feature, and i was wondering if has_many :conversations, as: :recipient, and has_many :conversations, as: :sender makes sense?
<odigity2>
One of those two args are receiving a hash value, and it complains the hash is not a symbol or string
<adaedra>
?rails EllisTAA
<ruboto>
EllisTAA, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
eminencehc has quit [Remote host closed the connection]
barhum2013 has quit [Quit: barhum2013]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<odigity2>
drbrain, crap, do you think I'm running into issues with the native ruby .send() method? I'm not trying to call that, I'm trying to call my own send method (that has nothing to do with passing a message to an object, it's about sending mail)
<odigity2>
drbrain, nope -- I just replaced 'send' with 'foo' as the name for both the class and instance methods (the class method invokes the instance method), same error
<drbrain>
then the send method on that class is probably ruby's send, not the method you think is send
eminencehc has joined #ruby
platzhirsch has joined #ruby
<drbrain>
you can call .method(:send).owner and .source_location on the instance to figure out which #send you're calling
tkuchiki has joined #ruby
rushed has quit [Quit: rushed]
xybre has joined #ruby
tkuchiki has quit [Remote host closed the connection]
rbowlby has quit [Remote host closed the connection]
chouhoulis has joined #ruby
Pathfinder_ has quit [Ping timeout: 240 seconds]
tenderlo_ has joined #ruby
`mrspock has joined #ruby
Keltia_ has joined #ruby
`mrspock has left #ruby [#ruby]
mikecmpbll has quit [Quit: i've nodded off.]
timmow has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has quit [Remote host closed the connection]
dramagods has quit []
clamstar has joined #ruby
theery has quit [Remote host closed the connection]
Spami has joined #ruby
sepp2k has quit [Quit: Leaving.]
RobertBirnie has joined #ruby
karapetyan has quit [Ping timeout: 264 seconds]
CloCkWeRX has joined #ruby
devoldmx has joined #ruby
casadei has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
felixr has quit [Ping timeout: 240 seconds]
yqt has quit [Ping timeout: 252 seconds]
devoldmx has quit [Ping timeout: 268 seconds]
aaeron has joined #ruby
bmurt has joined #ruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rohanezio has joined #ruby
<Rohanezio>
Hey guys! I'm new to ruby and need some help if possible :)
<Porfa>
how can i get data from an array and turn it into a var?
<Porfa>
i want to run a loop and create vars for each element in the array
benlieb has quit [Quit: benlieb]
<Porfa>
is there a public log of this channel? i want to look at my lines in a couple of years
pwnd_nsfw has quit [Ping timeout: 240 seconds]
<adaedra>
Porfa: see topic.
<adaedra>
?code Rohanezio
<ruboto>
Rohanezio, We can't help you without your code, please post it to https://gist.github.com
<otacon->
guys, suppose we have 5 classes which share the same intialize method. is *this alone* enough justification to create a superclass?
chipotle has quit [Quit: cheerio]
<adaedra>
?anyone Rohanezio
<ruboto>
Rohanezio, Just ask your question, if anyone has or can, they will respond.
<adaedra>
better
aerozepplin has quit [Read error: Connection reset by peer]
<Porfa>
adaedra: nice
michaeldeol has joined #ruby
rushed has joined #ruby
<adaedra>
otacon-: are these classes linked to each other?
<Rohanezio>
Ok, so on a webpage, we have a scoreboard, and we need to split them apart so the two teams are seen as different columns instead of one huge column