<Eiam>
elsif this key exists and this keys value is "woowoo"
<kenneth>
but if i have *any* code that isn't a valid validation, i get a SystemStackError: stack level too deep error
<kenneth>
so doing a puts "hello" from within my block throws this weird exception
yshh has quit [Remote host closed the connection]
falieson has joined #ruby
<kenneth>
i imagine it's something being wrong with my method_missing method? but i can't figure out what. printing at the top of method missing does nothing :(
yshh has joined #ruby
agarie_ has joined #ruby
yshh has quit [Remote host closed the connection]
<falieson>
I use this to perform an XML call in google spreadsheet, what's the right way to do the equivalent in ruby? pastebin.com/QZbDqXLa
idkazuma has quit [Remote host closed the connection]
timmow has joined #ruby
rdo has quit [Ping timeout: 252 seconds]
etcetera has quit []
NiteRain has joined #ruby
agarie has quit [Ping timeout: 256 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
phasma_ is now known as phasma
blaines has quit [Quit: Computer has gone to sleep.]
hogeo has joined #ruby
dmerrick has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
mikepack has quit [Remote host closed the connection]
pioz has quit [Quit: This computer has gone to sleep]
benweint has quit [Quit: Computer has gone to sleep.]
Vert has quit [Remote host closed the connection]
Vivekananda has joined #ruby
internetishard has joined #ruby
<internetishard>
how do I rescue a parse exception in ruby?
<internetishard>
It still halts if I put 'rescue' after it...
evenix has joined #ruby
jnoob22 has joined #ruby
<evenix>
hi guys
<evenix>
im looking for a ruby gem that would allow me to do some advance finance manipulation
dmerrick has quit [Ping timeout: 248 seconds]
<evenix>
like calculating Equilibrium Price
<vyrus001>
jesus h christ getting pcaprub installed is murder
<vyrus001>
still cant get this thing to work and its been 2 days
ehaliewicz has quit [Remote host closed the connection]
slainer68 has joined #ruby
<internetishard>
oh nvm
tomsthumb has joined #ruby
markalanevans has quit [Ping timeout: 264 seconds]
hoelzro has quit [Remote host closed the connection]
KazW has quit [Remote host closed the connection]
<mklappstuhl>
is there a destructive version of Array.push that changes the receiver object
rezzack has quit [Quit: Leaving.]
KazW has joined #ruby
<internetishard>
how do I skip some code and continue in a certain spot after an exception
<internetishard>
momomomomo: does that mean I have to use throw and catch and I can't just drop a rescue in if I want a loop to not halt on a certain error?
<Vivekananda>
hey everyone. what is the best data structure to employ for this --- I have as input an array of strings. I am trying to get all distinct pairs of strings out of the same array and match them against each other for common letters. Then I want for each string to have a rank based on how many others it matches to
deric_skibotn has quit [Ping timeout: 252 seconds]
<internetishard>
momomomomo: it doesn't give an example for do using rescue. All you have to do is "do" at a certain spot after the rescue and it will skip the code between rescue and do?
ZachBeta has joined #ruby
<Vivekananda>
momomomomo: hmm but I am interested in more of the underlying data structure I should use and would give good results. I guess I need good insert and lookup times
evenix has quit [Remote host closed the connection]
evenix_ has quit [Remote host closed the connection]
arya has quit [Ping timeout: 260 seconds]
BSaboia has joined #ruby
internetishard has quit [Read error: Operation timed out]
emmanuelux has quit [Remote host closed the connection]
bricker`LA has joined #ruby
mockra has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
Bosox20051 has quit [Quit: Leaving]
_maes_ has joined #ruby
wesside has joined #ruby
arya has joined #ruby
banjara has quit [Quit: Leaving.]
tommyvyo has quit [Quit:]
PixelCrumbs has joined #ruby
blinton has joined #ruby
rotham has quit [Quit: Leaving]
ttt has joined #ruby
toekutr has joined #ruby
<breakingthings>
Dearest #rubby: How would I go about testing a method's return value, when that return value is an object that is being stubbed...? (RSpec, for reference)
arya has quit [Ping timeout: 245 seconds]
adrian has joined #ruby
syamajala has quit [Quit: leaving]
jnoob22 has quit [Remote host closed the connection]
maletor has joined #ruby
blinton has quit [Quit: blinton]
sleetdrop has joined #ruby
mando_ has joined #ruby
adrian- has joined #ruby
arya has joined #ruby
doritostains has quit [Ping timeout: 252 seconds]
chrishough has joined #ruby
yangchenyun has joined #ruby
marcdel has joined #ruby
welandB has joined #ruby
love_color_text has joined #ruby
<yangchenyun>
Anyone could help 'flatten' this code with nested iterations?
<yangchenyun>
Each iteration has some conditions attached to it, but I want to write all those conditions in one place instead of scattering them around different interations.
<welandB>
It's difficult to know what the constraints of the series are if you have junk data in the example.
rickruby has joined #ruby
<welandB>
You could just use modulo for integer iterations. It wouldn't save any time but would be flatter.
tish has left #ruby [#ruby]
<yangchenyun>
This is a simplified version, the case is I have asome arrays needed to iterate through and each need to pass some tests.
sambao21 has joined #ruby
io_syl has quit [Read error: Operation timed out]
adrian has quit [Ping timeout: 260 seconds]
<yangchenyun>
This could array could contain any data type not just integer.
<welandB>
Do you want to decrease the complexity of the algorithm or just simplify the code?
sambao21 has quit [Client Quit]
sayan has joined #ruby
BSaboia has quit [Ping timeout: 252 seconds]
<yangchenyun>
simplify the code.
sambao21 has joined #ruby
<yangchenyun>
The problem I am facing is: I need to interate through a bunch of lists, and there are separated conditions which needs to be satisfied by the list. conditons are not independent.
sambao21 has quit [Client Quit]
shevy has quit [Ping timeout: 252 seconds]
<yangchenyun>
This solution and algorithm works for me, but it is hard to maintain and read.
Targen has joined #ruby
dustint has joined #ruby
<yangchenyun>
conditions are scattered around each iteration level.
sambao21 has joined #ruby
<yangchenyun>
and the nesting is hard to read.
Yakko has quit [Ping timeout: 255 seconds]
<Vivekananda>
anyone around ?
<welandB>
if arr1.include?("1") && arr2.include?("2") && ... arrn.include?("n")
<welandB>
You can break lines for conditionals on && operator. You can also use \ to break lines.
<Vivekananda>
I was off for a bit but was askign people here about what would be a good Data structure for comparing an array of strings to itself so that each string is comnpared to each other string
<welandB>
For readability.
<breakingthings>
Does anyone know how would I go about testing a method's return value, when that return value is an object that is being stubbed in RSpec?
<yangchenyun>
Thx, this works for this example. The real problems have more complex conditions.
<yangchenyun>
and each might be dependent.
<yangchenyun>
such as if (n4 == n3) do something...
geggam has joined #ruby
<yangchenyun>
if (n3 + n2 == n4) do something...
<welandB>
breakingthings: Can you not use the line `p rspec_object' as a debug line in code?
rsahae has joined #ruby
kofno has quit [Remote host closed the connection]
<breakingthings>
welandB: It's an RSpec::Mocks:Mock object...
maletor has quit [Quit: Computer has gone to sleep.]
<breakingthings>
I guess I could just assert that it matches my mock.
sambao21 has quit [Quit: Computer has gone to sleep.]
<welandB>
Vivekananda: you could hash the string I guess and search for it in a tree.
<welandB>
How big is the array that the processing time is burdensome?
radic has joined #ruby
newUser1234 has joined #ruby
falieson has quit [Remote host closed the connection]
<Vivekananda>
well it can have variable lengths and I have to try two ways
noahsussman has joined #ruby
<Vivekananda>
one for a modest length of like 200
<Vivekananda>
another for a dictionary length
<Vivekananda>
:)
kofno has joined #ruby
radic_ has quit [Ping timeout: 256 seconds]
shevy has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
kofno has quit [Remote host closed the connection]
<Vivekananda>
welandB: has the string meaning ?
<Vivekananda>
I create hashes for all the strings ?
<Vivekananda>
each individual string ?
ckrailo has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
cha1tanya has joined #ruby
sambao21 has joined #ruby
joast has quit [Ping timeout: 252 seconds]
markalanevans has joined #ruby
timmow has joined #ruby
Es0teric has quit [Read error: Connection reset by peer]
rickmasta has joined #ruby
lorn_ has quit [Ping timeout: 245 seconds]
mattbl has joined #ruby
Opettaja has joined #ruby
sambao21 has quit [Client Quit]
newUser1234 has quit [Remote host closed the connection]
Es0teric has joined #ruby
newUser1234 has joined #ruby
<welandB>
Vivekananda: "hashing" a value/object is different than the "hash" data structure.
<welandB>
Hashing involves applying an algorithm to a value that creates a unique number of a fixed length.
timmow has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has quit [Quit: Leaving]
<welandB>
You can search for that value in a data structure like a tree.
<welandB>
Or you could just use the Array class's include?() method.
<welandB>
Which is what I'd recommend unless it severely degrades system performance.
mattbl has quit [Ping timeout: 252 seconds]
BaconRose has joined #ruby
ebollens has quit [Quit: ebollens]
dhruvasagar has quit [Ping timeout: 252 seconds]
fivetwentysix has joined #ruby
Nisstyre-laptop has joined #ruby
arya has quit [Ping timeout: 264 seconds]
bigmac has joined #ruby
Gruu_ has joined #ruby
arya has joined #ruby
heliumsocket has joined #ruby
thejefflarson_ has joined #ruby
lewis_ has joined #ruby
<Vivekananda>
welandB: hmm so I have to first lookup how to hash a string in ruby and then how to create a tree structure and then how to look up a string in it
<Vivekananda>
also how efficient is regex comparison
<Vivekananda>
is it linear ? or lesser?
tommyvyo has joined #ruby
noahsussman has quit [Quit: Unexpected SpanishInquisitionException]
krz has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
lewis has quit [Ping timeout: 260 seconds]
snorkdude has quit [Quit: snorkdude]
joast has joined #ruby
al3xnull has quit [Remote host closed the connection]
pskosinski has quit [Quit: pskosinski]
al3xnull has joined #ruby
ChronocityLC has quit [Ping timeout: 252 seconds]
al3xnull has quit [Read error: Connection reset by peer]
Opettaja has quit [Quit: WeeChat 0.4.0]
PixelCrumbs has left #ruby [#ruby]
al3xnull has joined #ruby
osvico has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
<welandB>
Vivekananda: I have no idea. I'm sure it is not linear. Obviously varies by implementation, too.
pkrnj has joined #ruby
aapzak has quit [Ping timeout: 260 seconds]
verysoftoiletppr has quit []
Nisstyre-laptop has quit [Quit: Leaving]
aapzak has joined #ruby
verysoftoiletppr has joined #ruby
therrell has joined #ruby
dagnachew has quit [Quit: WeeChat 0.4.0]
slyv has quit [Quit: Computer has gone to sleep.]
danman has joined #ruby
tommyvyo has quit [Quit:]
angusiguess has joined #ruby
danman has quit [Client Quit]
LaPetiteFromage has quit [Quit: LaPetiteFromage]
<bnagy>
Vivekananda: use a Hash
kofno has quit [Ping timeout: 252 seconds]
tommyvyo has joined #ruby
<bnagy>
if your collection has no duplicates, anyway
echevemaster has quit [Ping timeout: 248 seconds]
emocakes has quit [Quit: emocakes]
<Vivekananda>
bnagy: hey :)
<Vivekananda>
okay I was thinking that too
<Vivekananda>
but insertion in hash is bad isnt it ?
alvaro_o has quit [Quit: Ex-Chat]
rsahae has left #ruby [#ruby]
<bnagy>
you're talking about an n**2 problem, almost everything is 'bad'
chrisnicola has joined #ruby
<bnagy>
but a Hash will get you a lot of win for almost no coding effort
drale2k has quit [Quit: Leaving...]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
<welandB>
I have no idea how ruby implements its Hash class.
zeade has joined #ruby
drale2k has joined #ruby
<bnagy>
it uses Object#hash
therrell has quit [Quit: therrell]
Guest19721 is now known as ferd
ferd is now known as fred
fred has quit [Changing host]
fred has joined #ruby
mahmoudimus has joined #ruby
pkrnj has quit [Remote host closed the connection]
xpen has joined #ruby
kofno has joined #ruby
arya has quit [Ping timeout: 256 seconds]
seoaqua has joined #ruby
dustint has quit [Ping timeout: 260 seconds]
kofno has quit [Remote host closed the connection]
mattbl has joined #ruby
arya has joined #ruby
fivetwentysix has quit [Quit: fivetwentysix]
pkrnj has joined #ruby
callmeivan_ has joined #ruby
al3xnull has quit [Remote host closed the connection]
al3xnull has joined #ruby
callmeivan has quit [Ping timeout: 252 seconds]
droppedonmyhead has joined #ruby
callmeivan_ is now known as callmeivan
mattbl has quit [Client Quit]
araujo has quit [Ping timeout: 264 seconds]
kenneth has quit [Quit: kenneth]
terrorpup has quit [Quit: Leaving]
girija has joined #ruby
Gruu_ has quit [Quit: Gruu_]
timmow has joined #ruby
jarin has quit [Quit: WeeChat 0.4.0]
al3xnull has quit [Ping timeout: 255 seconds]
dhruvasagar has joined #ruby
akashj87 has joined #ruby
callmeivan has quit [Ping timeout: 264 seconds]
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
al3xnull has joined #ruby
sayan has quit [Read error: Connection reset by peer]
timmow has quit [Ping timeout: 252 seconds]
newUser1234 has quit [Remote host closed the connection]
markalanevans has quit [Quit: markalanevans]
franicsw has joined #ruby
aapzak has quit [Ping timeout: 245 seconds]
girija has quit [Ping timeout: 246 seconds]
franicsw has left #ruby [#ruby]
thetristan has quit [Quit: thetristan]
Cultofmetatron has quit [Remote host closed the connection]
aapzak has joined #ruby
al3xnull has quit [Ping timeout: 255 seconds]
Zeev_ has quit [Quit: Leaving]
Kruppe has quit [Remote host closed the connection]
Zeev_ has joined #ruby
callmeivan has joined #ruby
sambao21 has joined #ruby
ckrailo has joined #ruby
sambao21 has quit [Client Quit]
cha1tanya has quit [Quit: Leaving]
arusso_ has quit [Changing host]
arusso_ has joined #ruby
sambao21 has joined #ruby
akashj87 has quit [Ping timeout: 240 seconds]
mockra has joined #ruby
<dyeske>
any ffi users in here?
chxane has quit [Ping timeout: 260 seconds]
robscomputer_ has joined #ruby
jbueza has quit [Quit: Leaving.]
tylersmith has joined #ruby
Andromeda has joined #ruby
<Vivekananda>
bnagy: thanks
mando_ has quit [Remote host closed the connection]
chrisnicola has quit [Quit: This computer has gone to sleep]
markalanevans has joined #ruby
theRoUS has joined #ruby
newUser1234 has joined #ruby
bigmac has quit [Quit: Leaving]
shevy has quit [Ping timeout: 260 seconds]
callmeivan has quit [Read error: No route to host]
callmeivan has joined #ruby
newUser1234 has quit [Remote host closed the connection]
chrisnicola has joined #ruby
al3xnull2 has quit [Read error: No route to host]
rickruby has quit [Remote host closed the connection]
kenneth has joined #ruby
sayan has joined #ruby
kenneth has quit [Client Quit]
lmf40 has quit [Ping timeout: 264 seconds]
callmeivan has quit [Read error: No route to host]
callmeivan has joined #ruby
al3xnull has joined #ruby
chxane has joined #ruby
mockra has quit [Remote host closed the connection]
rippa has joined #ruby
bigmac has joined #ruby
mootpointer has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Inside has quit [Ping timeout: 252 seconds]
divout has joined #ruby
zeade has quit [Quit: Leaving.]
shevy has joined #ruby
Cultofmetatron has joined #ruby
havenwood has joined #ruby
knapper_tech has quit [Read error: Connection reset by peer]
JohnBat26 has joined #ruby
bigmac has quit [Quit: Leaving]
arya_ has joined #ruby
huoxito has quit [Quit: Leaving]
akashj87 has joined #ruby
robscomputer_ has quit [Remote host closed the connection]
callmeivan has quit [Ping timeout: 260 seconds]
arya has quit [Ping timeout: 252 seconds]
icy` has quit [Read error: No route to host]
callmeivan has joined #ruby
dmiller has quit [Ping timeout: 276 seconds]
rippa has quit [Ping timeout: 240 seconds]
mohamed78 has joined #ruby
uris has quit [Quit: Leaving]
ozzloy has quit [Read error: Operation timed out]
ozzloy has joined #ruby
ozzloy has joined #ruby
ozzloy has quit [Changing host]
c0rn has joined #ruby
breakingthings has quit []
paper_ has quit [Remote host closed the connection]
miso1337 has quit [Quit: afk]
geggam has quit [Ping timeout: 246 seconds]
Lockzi has quit [Ping timeout: 245 seconds]
basex has quit [Quit: basex]
io_syl has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
kofno has joined #ruby
gabrielrotbart has joined #ruby
quazimodo has quit [Ping timeout: 252 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Domon has quit [Remote host closed the connection]
geggam has joined #ruby
Lockzi has joined #ruby
gabrielrotbart has quit [Ping timeout: 245 seconds]
mattbl has joined #ruby
kofno has quit [Ping timeout: 252 seconds]
druiced has joined #ruby
arya_ has quit [Ping timeout: 260 seconds]
sayan has quit [Ping timeout: 252 seconds]
julian-delphiki has joined #ruby
timmow has joined #ruby
knapper_tech has joined #ruby
arya has joined #ruby
miso1337 has joined #ruby
mattbl has quit [Client Quit]
bean has quit [Ping timeout: 245 seconds]
BoomCow has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
mockra has joined #ruby
basex has joined #ruby
mattbl has joined #ruby
rh1n0 has joined #ruby
rh1n0 has quit [Max SendQ exceeded]
rh1n0 has joined #ruby
tommyvyo has quit [Quit:]
freakazoid0223 has quit [Ping timeout: 248 seconds]
dsdeiz_ has joined #ruby
droppedonmyhead has quit [Quit: droppedonmyhead]
dsdeiz has quit [Read error: Connection reset by peer]
rh1n0 has quit [Quit: -- I'm out --]
Nisstyre-laptop has joined #ruby
trollface is now known as Paradox
rh1n0 has joined #ruby
bricker`1A has joined #ruby
van7hu has joined #ruby
<van7hu>
hi
<Paradox>
ih
<van7hu>
i'm using backtrack r3, after apt-get upgrade, and try using metasploit with msfconsole, i got Could not find rake-10.0.4 in any of the sources
newres has joined #ruby
<van7hu>
Run `bundle install` to install missing gems.
van7hu has quit [Read error: Connection reset by peer]
<beaky>
yes, drop communicates it best
dankest has joined #ruby
<Vivekananda>
havenwood: hmm so suppose I have a = [1 ,2 ,3 ,4 ,5 ] and I say -- a.each do |x| ; puts a ; (remove first two elements) ; end. The result I want to obtain from this is
<Vivekananda>
1 , 2 , 3 ,4 , 5 then I want 3, 4 ,5 and then 5 and then nil and the code should run for only these 4 Iterations
generalissimo has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 264 seconds]
wesside has quit [Quit: Computer has gone to sleep.]
mohamed78 has quit []
robscomputer_ has joined #ruby
<havenwood>
Vivekananda: TL;DR: until a.size.zero? do puts a; a.slice! 0..1; a.shift && puts('nil') if a.one? end
jtperreault has quit [Quit: WeeChat 0.3.7]
keyo has left #ruby [#ruby]
keyo has joined #ruby
keyo has left #ruby [#ruby]
puppeh has joined #ruby
nightfalcon has quit [Ping timeout: 257 seconds]
timmow has joined #ruby
cobragoat has quit [Remote host closed the connection]
danslo has joined #ruby
<bnagy>
havenwood: that's.. awful
<havenwood>
bnagy: Isn't it!
<bnagy>
use a.empty? not .size.zero?
<bnagy>
I have nfi why you're slicing one and then shifting when you could just shift 2
<havenwood>
bnagy: The gist is less hacky.
<bnagy>
and the && there is just ugly control flow for no good reason
robscomputer_ has quit [Remote host closed the connection]
<havenwood>
bnagy: just being silly with the one-liner
pitzips has quit [Ping timeout: 264 seconds]
robscomputer_ has joined #ruby
emergion has joined #ruby
angusiguess has quit [Ping timeout: 255 seconds]
slainer68 has joined #ruby
<bnagy>
puts a and a.shift 2 until a.empty?
<bnagy>
but the requirement to puts nil at the end is suk, no real code would ever do that
julian-delphiki is now known as bean
<havenwood>
bnagy: [5].shift 2 #=> [5]
fschuindt has joined #ruby
maletor has joined #ruby
<bnagy>
haha wow
Guest__ has joined #ruby
workmad3 has joined #ruby
<bnagy>
wonder why they did that :/
akashj87__ has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 252 seconds]
samuel02 has joined #ruby
tylersmith has quit [Quit: tylersmith]
<havenwood>
i'm on benedryl and not thinking clearly, the stuff works for alergy but ruins my brain
answer_42 has quit [Ping timeout: 276 seconds]
<bnagy>
havenwood: oh wait, it's all fine
akashj87 has quit [Ping timeout: 240 seconds]
<bnagy>
it doesn't loop - you just used an anonymous array and got a different one back
<havenwood>
bnagy: Yeah, it does modify the receiver. >.> I'm just muddle-headed tonight.
druiced has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
akashj87__ has quit [Quit: Leaving]
emergion has quit [Quit: Computer has gone to sleep.]
MachinShin has joined #ruby
twoism has joined #ruby
emocakes has joined #ruby
xpen has quit [Ping timeout: 264 seconds]
twoism has quit [Remote host closed the connection]
<MachinShin>
anyone here use tmuxinator? i get this error: "/usr/bin/tmuxinator:4: in `require': no such file to load -- tmuxinator (LoadError) from /usr/bin/tmuxinator:4" . i tried to follow this: https://github.com/aziz/tmuxinator
pitzips has joined #ruby
twoism_ has joined #ruby
twoism_ has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
norio has joined #ruby
Guest__ is now known as shellox_
twoism has joined #ruby
twoism has quit [Remote host closed the connection]
tommyvyo has joined #ruby
twoism has joined #ruby
dsdeiz_ has joined #ruby
Elhu has joined #ruby
dsdeiz has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
ph^ has joined #ruby
Elhu has quit [Client Quit]
ananthakumaran has joined #ruby
<MachinShin>
ah. figured it out. one of the fixes (somewhere else) said to install using --no-wrappers, that's wrong
<workmad3>
hmm... the black wind is here... anyone gone crazy yet?
<MachinShin>
sing your screams
<MachinShin>
screams of blood
<workmad3>
:)
ananthakumaran1 has quit [Ping timeout: 252 seconds]
Vainoharhainen has joined #ruby
dhruvasagar has joined #ruby
kofno has joined #ruby
jdunck has joined #ruby
tommyvyo has quit [Quit:]
thebastl has joined #ruby
emptyflask has joined #ruby
dsdeiz has joined #ruby
kofno has quit [Ping timeout: 252 seconds]
tonini has quit [Remote host closed the connection]
fschuindt has quit [Read error: Connection reset by peer]
dsdeiz_ has quit [Ping timeout: 245 seconds]
keymone has joined #ruby
monkegjinni has joined #ruby
keymone has quit [Remote host closed the connection]
jprovazn has joined #ruby
dsdeiz has quit [Read error: Connection reset by peer]
mattbl has quit [Quit: This computer has gone to sleep]
justsee has quit [Ping timeout: 256 seconds]
clocKwize has joined #ruby
Arzaga has joined #ruby
sambio has quit []
jhn has quit [Ping timeout: 256 seconds]
Burgestrand has quit [Quit: Burgestrand]
<bnagy>
you mean Set? yeah.
<bnagy>
it's stdlib though so you have to require 'set' first
divout has joined #ruby
yannis has joined #ruby
v0n has quit [Read error: Operation timed out]
pduin has joined #ruby
backjlack has joined #ruby
bigkevmcd has quit [Quit: Ex-Chat]
bigkevmcd has joined #ruby
<MachinShin>
sigh. so tmuxinator is broken, and hasn't been maintained in over 2 years.. but there's tmuxification. i'm trying it now, it was updated less than 1month ago..
norio has quit [Ping timeout: 276 seconds]
mockra has quit [Remote host closed the connection]
BizarreCake has joined #ruby
filipe has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
julian-delphiki has joined #ruby
hamed_r has joined #ruby
dagobah has joined #ruby
mando_ has joined #ruby
MachinShin has left #ruby ["Of course i would give the Devil the benefit of law! For my own safety's sake."]
BadQuanta has quit [Quit: Leaving]
timonv has quit [Remote host closed the connection]
skroon has joined #ruby
BadQuanta has joined #ruby
dsdeiz_ has joined #ruby
tonini has joined #ruby
dsdeiz has quit [Ping timeout: 256 seconds]
tonini has quit [Remote host closed the connection]
bean has quit [Ping timeout: 256 seconds]
tonini has joined #ruby
mando_ has quit [Ping timeout: 276 seconds]
danslo has quit [Quit: danslo]
Hanmac has quit [Ping timeout: 252 seconds]
robscomputer_ has quit [Ping timeout: 245 seconds]
chiel has quit [Remote host closed the connection]
anderse has joined #ruby
Beoran_ has quit [Ping timeout: 252 seconds]
pitzips has quit [Ping timeout: 252 seconds]
decoponio has quit [Quit: My PC will be rebooting]
Arzaga has quit [Quit: Computer has gone to sleep.]
Nisstyre-laptop has quit [Ping timeout: 252 seconds]
quazimodo has joined #ruby
agarie_ has quit [Remote host closed the connection]
lewis_ is now known as lewix
lewix has joined #ruby
lewix has quit [Changing host]
robscomputer has joined #ruby
dawkirst has quit [Remote host closed the connection]
indyrl has quit [Quit: Leaving.]
Macaveli has joined #ruby
angusiguess has joined #ruby
mafolz has joined #ruby
robscomputer has quit [Remote host closed the connection]
forced_request has quit [Read error: Connection reset by peer]
robscomputer has joined #ruby
cobragoat has joined #ruby
mahmoudimus has joined #ruby
bonty_ssh has quit [Remote host closed the connection]
nightfalcon has joined #ruby
paper_ has joined #ruby
angusiguess has quit [Read error: Operation timed out]
dankest has quit [Quit: Leaving...]
nomenkun has quit [Remote host closed the connection]
bonty_ssh has joined #ruby
danslo has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
mattbl has joined #ruby
Ontolog has joined #ruby
Kirotan has quit [Ping timeout: 245 seconds]
supki has joined #ruby
cobragoat has quit [Ping timeout: 252 seconds]
dankest has joined #ruby
yann_ck has joined #ruby
palyboy has quit []
yannis has quit [Quit: Bye!]
emocakes has quit [Ping timeout: 252 seconds]
maxmanders has joined #ruby
pi3r has joined #ruby
bonty_ssh has quit [Remote host closed the connection]
timmow_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
alup has joined #ruby
maxmanders has quit [Client Quit]
kofno has joined #ruby
Kirotan has joined #ruby
bonty_ssh has joined #ruby
KevinSjoberg has joined #ruby
Hanmac has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
lmf40 has joined #ruby
TheFuzzball has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
twoism has quit [Ping timeout: 245 seconds]
Hanmac has quit [Remote host closed the connection]
maxmanders has joined #ruby
yann_ck has quit [Quit: Computer has gone to sleep.]
mahmoudimus has joined #ruby
kofno has quit [Ping timeout: 252 seconds]
dr_bob has joined #ruby
mneorr has joined #ruby
pioz has joined #ruby
rburton- has joined #ruby
matayam has joined #ruby
blacktulip has joined #ruby
Beoran has joined #ruby
Al___ has joined #ruby
DrCode has quit [Remote host closed the connection]
thatRD has joined #ruby
Burgestrand has joined #ruby
Ontolog has quit [Remote host closed the connection]
snearch has joined #ruby
DrCode has joined #ruby
ttt has quit [Read error: Connection reset by peer]
ttt has joined #ruby
robscomputer has quit [Ping timeout: 276 seconds]
toekutr has quit [Remote host closed the connection]
knapper_tech has quit [Read error: Operation timed out]
Hanmac has joined #ruby
vlad_starkov has joined #ruby
bigkevmcd has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
Rumsteak has quit [Quit: Rumsteak]
m8 has joined #ruby
bigkevmcd has joined #ruby
buscon has joined #ruby
k610 has joined #ruby
k611 has joined #ruby
enriclluelles has joined #ruby
pavilionXP has joined #ruby
camilasan has joined #ruby
vlad_starkov has joined #ruby
k610 has quit [Client Quit]
k611 has quit [Client Quit]
tjbiddle_ has joined #ruby
sk87 has joined #ruby
ant384 has joined #ruby
tjbiddle has quit [Ping timeout: 248 seconds]
tjbiddle_ is now known as tjbiddle
beiter has joined #ruby
apeiros has joined #ruby
niceguyjames has joined #ruby
elaptics`away is now known as elaptics
swex has joined #ruby
paper__ has joined #ruby
paper_ has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 252 seconds]
hmarr has joined #ruby
monkegjinni has joined #ruby
ephemerian has joined #ruby
razibog has joined #ruby
Sacha_ has joined #ruby
Zai00 has joined #ruby
Neandre has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
a_a_g has quit [Quit: Leaving.]
chussenot has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
decoponio has joined #ruby
kofno has joined #ruby
Morkel has quit [Quit: Morkel]
monkegji_ has joined #ruby
dankest has quit [Quit: Leaving...]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
monkegjinni has quit [Read error: Operation timed out]
kofno has quit [Ping timeout: 252 seconds]
threesome has joined #ruby
slainer68 has joined #ruby
emptyflask has quit [Remote host closed the connection]
Andromeda has quit [Remote host closed the connection]
tootooroo has quit [Ping timeout: 256 seconds]
Bry8Star_ has quit [Ping timeout: 276 seconds]
jrn has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
<jrn>
hi, I want to know how to create class header methods. Like you may now from Ruby On Rails the "before_filter"-method, how to define such methods?
Yakko has quit [Ping timeout: 264 seconds]
Morkel has joined #ruby
yugui_zzz is now known as yugui
<apeiros>
def self.before_filter
<apeiros>
or define them in a module and do `extend YourModuleName`
<apeiros>
@ jrn
<jrn>
so it must be a class method?
yann_ck has joined #ruby
<jrn>
I write a pastie, sec
vlad_starkov has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
megha has joined #ruby
maletor has joined #ruby
baba has quit [Ping timeout: 264 seconds]
monkegji_ has quit [Remote host closed the connection]
monkegjinni has joined #ruby
sonda has joined #ruby
<josh__>
Mon_Ouie, config.ru:20:in `block in <main>': undefined method `post' for #<Rack::Builder:0x000000012d8df8> (NoMethodError)
answer_42 has joined #ruby
<Mon_Ouie>
Are you trying to use sinatra?
hmarr has joined #ruby
<Mon_Ouie>
If so, you'll probably need to require it before you can use it ;)
Rumsteak has joined #ruby
gyre007 has joined #ruby
<josh__>
i am yes
<josh__>
require what exactly?
<josh__>
require sinatra ?
<Mon_Ouie>
Yes
<josh__>
you do man! :)
<josh__>
balls, tht fixed the error
<josh__>
thank you Mon_Ouie :)
<josh__>
but it's still not asking me for auth
monkegjinni has quit [Remote host closed the connection]
Elhu has joined #ruby
eka has joined #ruby
nomenkun has joined #ruby
vlad_starkov has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
blaxter_ is now known as blaxter
robustus has joined #ruby
baphled has joined #ruby
mose_ is now known as mose
ananthakumaran has joined #ruby
Weazy has quit [Quit: leaving]
Weazy has joined #ruby
Rumsteak has quit [Quit: Rumsteak]
skroon has quit [Ping timeout: 245 seconds]
Weazy has quit [Client Quit]
kofno has joined #ruby
ananthakumaran1 has quit [Ping timeout: 264 seconds]
himsin has quit [Ping timeout: 252 seconds]
melnik has joined #ruby
melnik has quit [Remote host closed the connection]
melnik has joined #ruby
Xeago has joined #ruby
kofno has quit [Ping timeout: 252 seconds]
tevio has joined #ruby
peta_ has joined #ruby
paper__ has quit [Remote host closed the connection]
chandankumar has quit [Quit: Leaving]
peta_ has left #ruby [#ruby]
peta_ has joined #ruby
rawng has quit [Quit: WeeChat 0.4.1-dev]
lewix has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
marcdel has quit []
melnik has quit [Remote host closed the connection]
melnik has joined #ruby
shreya has joined #ruby
hamed_r has quit [Quit: Leaving]
<shreya>
hi all , i was installing ruby on ubuntu raring , and used $ \curl -L https://get.rvm.io | bash -s stable --ruby to install it. However , it told me taht W: Failed to fetch http://archive.canonical.com/ubuntu/dists/oneiric/Release Unable to find expected entry 'partnerdeb-src/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
<shreya>
E: Some index files failed to download. They have been ignored, or old ones used instead
<shreya>
How do I remove this error ?
tootooroo has joined #ruby
BSaboia has joined #ruby
foobArrr has joined #ruby
<JonnieCache>
thats a very specific error. maybe ask in the rvm channel
<shreya>
oh ok
pcarrier has joined #ruby
<JonnieCache>
i hear theyre very helpful
skroon has joined #ruby
timmow_ has joined #ruby
admin0 has joined #ruby
snearch has quit [Quit: Verlassend]
marcgg has quit [Ping timeout: 256 seconds]
xpen has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
lkba has joined #ruby
maxmanders has joined #ruby
marcgg has joined #ruby
camilasan has quit [Remote host closed the connection]
Zeev__ has joined #ruby
maxmanders has quit [Client Quit]
lmx has quit [Quit: lmx]
jlebrech has joined #ruby
<jlebrech>
is there a framework agnostic generator dsl?
maxmanders has joined #ruby
Zeev_ has quit [Ping timeout: 252 seconds]
marcgg has quit [Ping timeout: 246 seconds]
LennyLinux has joined #ruby
<JonnieCache>
eh?
<JonnieCache>
what are you generating?
<jlebrech>
adding sequel migrations in a ramaze app
<JonnieCache>
so you want to generate sequel migrations independantly of your web framework?
Rumsteak has joined #ruby
<jlebrech>
not sure
marcgg has joined #ruby
<jlebrech>
i want the gem to have models and to be able to rake the migrations
<JonnieCache>
well sequel doesnt have migration generators like activerecord
<JonnieCache>
you kind of have to make that stuff yourself, its annoying
<jlebrech>
i've built one
<jlebrech>
not all myself mind, there was a gist for it
<jlebrech>
just tweaked it to be more ramazing
vlad_starkov has quit [Remote host closed the connection]
<JonnieCache>
well i dont really undestand what you need then :)
nkr has joined #ruby
<jlebrech>
where would you put the migrations?
<jlebrech>
in the gem, and how do you run them?
<jlebrech>
wouldn't you need to generate those migration into the db/migrations folder of the app
chendo_ has quit [Quit: Leaving...]
chandankumar_ has joined #ruby
freeayu__ has joined #ruby
Macaveli has joined #ruby
freeayu has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
chandankumar_ has quit [Quit: Leaving]
<jlebrech>
need to sit down and try this out myself
a_a_g has joined #ruby
a_a_g has quit [Client Quit]
<JonnieCache>
yeah put them in a db/migrations folder
jon_than_ has joined #ruby
<JonnieCache>
or wherever you feel really
maxmanders has quit [Quit: Computer has gone to sleep.]
a_a_g has joined #ruby
chendo_ has joined #ruby
Burgestrand has quit [Quit: Burgestrand]
Demux has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
Gruu_ has joined #ruby
xpen has quit [Ping timeout: 252 seconds]
melnik has quit [Remote host closed the connection]
melnik has joined #ruby
Demux has joined #ruby
Gruu_ has quit [Read error: Connection reset by peer]
qohelet_ has joined #ruby
ij has quit [Quit: WeeChat 0.3.9.2]
love_color_text has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
maxmanders has joined #ruby
jprovazn has quit [Quit: Leaving]
monkegji_ has joined #ruby
<jlebrech>
JonnieCache, In the db/migrations folder of my gem? what's the convention? keep gem migration in the gem. how do you run them from the gem? just put the rakefile in mygem/bin ?
admin0 has quit [Read error: Connection reset by peer]
kofno has joined #ruby
<JonnieCache>
hmmm you would need some kind of rake task that copies them into the app's migrations folder
<JonnieCache>
it would need to rewrite the dates in the filenames when it did that
<JonnieCache>
rails has a whole system for this, you could check it out for ideas
monkegjinni has quit [Ping timeout: 264 seconds]
Macaveli has quit [Quit: This computer has gone to sleep]
charliesome_ has joined #ruby
charliesome_ is now known as charliesome
chase-work has joined #ruby
camilasan has joined #ruby
kofno has quit [Ping timeout: 252 seconds]
sayan has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
br4ndon_ has joined #ruby
rickruby has quit [Remote host closed the connection]
<marwinism>
uhm, after I updated my .vimrc and ruby now has problems loading gems, because it's looking for a file with <gemname>. any clues what's fubar?
rickruby has joined #ruby
Macaveli has joined #ruby
vise890 has joined #ruby
LaPetiteFromage has joined #ruby
maxmanders has joined #ruby
ngcazz has joined #ruby
k610 has joined #ruby
br4ndon has quit [Ping timeout: 260 seconds]
melnik has quit [Remote host closed the connection]
<ngcazz>
hi
melnik has joined #ruby
Domon has quit [Remote host closed the connection]
rickruby has quit [Ping timeout: 245 seconds]
paper_ has joined #ruby
Sacha_ has quit [Ping timeout: 256 seconds]
blaxter has quit [Ping timeout: 276 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
paper_ has quit [Remote host closed the connection]
reset has quit [Ping timeout: 245 seconds]
DarkFoxDK has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 255 seconds]
dsdeiz has joined #ruby
dsdeiz_ has quit [Read error: Connection reset by peer]
dmerrick has joined #ruby
jtperreault has quit [Quit: WeeChat 0.4.0]
endure has joined #ruby
cantonic_ has joined #ruby
chussenot has quit [Quit: chussenot]
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
jtperreault has joined #ruby
classix has quit [Ping timeout: 246 seconds]
atno has quit [Ping timeout: 246 seconds]
paper_ has joined #ruby
timmow has quit [Remote host closed the connection]
classix has joined #ruby
chussenot has joined #ruby
timmow has joined #ruby
p8952 has quit [Remote host closed the connection]
tommyvyo has joined #ruby
dmerrick has quit [Ping timeout: 252 seconds]
DarkFoxDK has joined #ruby
dmiller has joined #ruby
workmad3 has joined #ruby
LaPetiteFromage has joined #ruby
sailias has quit [Quit: Leaving.]
airtonix_ has joined #ruby
freeayu__ has quit [Ping timeout: 264 seconds]
timmow has quit [Ping timeout: 252 seconds]
airtonix has quit [Ping timeout: 245 seconds]
freeayu has joined #ruby
vlad_starkov has joined #ruby
bonty_ssh has quit [Remote host closed the connection]
dustint has joined #ruby
shellox_ has quit [Quit: Computer has gone to sleep.]
pcarrier has quit [Ping timeout: 264 seconds]
yshh has quit [Remote host closed the connection]
chendo__ has quit [Quit: Computer has gone to sleep.]
Spooner_ has joined #ruby
palyboy has joined #ruby
maxmanders has joined #ruby
pcarrier has joined #ruby
csaunders has joined #ruby
csaunders has quit [Client Quit]
tommyvyo has quit [Quit:]
csaunders has joined #ruby
chussenot has quit [Quit: chussenot]
dsdeiz_ has joined #ruby
maxmanders has quit [Client Quit]
Neandre has joined #ruby
Spooner_ has quit [Remote host closed the connection]
BSaboia has quit [Ping timeout: 252 seconds]
dsdeiz has quit [Ping timeout: 256 seconds]
lewix has joined #ruby
Spooner_ has joined #ruby
quazimodo has quit [Ping timeout: 252 seconds]
swex has quit [Remote host closed the connection]
quazimodo has joined #ruby
swex has joined #ruby
divout has quit [Remote host closed the connection]
danslo has joined #ruby
maxmanders has joined #ruby
atno has joined #ruby
marcgg_ has joined #ruby
marcgg has quit [Ping timeout: 264 seconds]
al3xnull has joined #ruby
chussenot has joined #ruby
gyre008 has joined #ruby
Bofu2U has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
sailias has joined #ruby
mark_locklear has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
monkegji_ has quit [Remote host closed the connection]
dustint has quit [Remote host closed the connection]
krz has quit [Quit: krz]
monkegjinni has joined #ruby
Spooner_ has quit [Remote host closed the connection]
FND has joined #ruby
yashshah__ has quit [Ping timeout: 248 seconds]
mneorr_ has quit [Remote host closed the connection]
<FND>
hi - is there a way to intercept/hijack Foo::Bar to report an error? I wanna deprecate the entire Foo namespace, but method_missing alone doesn't suffice
jtperreault has left #ruby ["WeeChat 0.3.7"]
jtperreault has joined #ruby
<paper_>
FND: const_missing?
<FND>
paper_: I'll try that, thanks
<FND>
that works, thank you paper_
<paper_>
np
sayan has joined #ruby
p8952 has joined #ruby
carloslopes has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
bonty_ssh has joined #ruby
mneorr has joined #ruby
niceguyjames has joined #ruby
arya has joined #ruby
sayan has quit [Ping timeout: 252 seconds]
v0n has joined #ruby
F1skr has joined #ruby
sambao21 has joined #ruby
jkamenik has joined #ruby
nezumi has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
monkegji_ has joined #ruby
forced_request has joined #ruby
dustint has joined #ruby
osvico has joined #ruby
knapper_tech has joined #ruby
m8 has quit [Quit: Sto andando via]
welandB has quit []
anonymuse has joined #ruby
monkegjinni has quit [Ping timeout: 245 seconds]
maxmanders has joined #ruby
bonty_ssh has quit [Ping timeout: 246 seconds]
skroon has quit [Ping timeout: 252 seconds]
monkegji_ has quit [Remote host closed the connection]
ZachBeta has quit [Quit: Computer has gone to sleep.]
Czupa has quit [Remote host closed the connection]
ntzrmtthihu777 has joined #ruby
oponder has joined #ruby
wargasm1 has joined #ruby
yshh has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
br4ndon_ has quit [Ping timeout: 252 seconds]
jerius has joined #ruby
huttan has joined #ruby
wargasm has quit [Ping timeout: 256 seconds]
ixti has joined #ruby
<ntzrmtthihu777>
anyone here familiar with rubysdl?
<peta_>
Is it possible to do something like:
matchaw has quit [Read error: Connection reset by peer]
pskosinski has joined #ruby
<paper_>
ntzrmtthihu777: wh do u want to use that, there's usually better options like libgosu.org
matchaw has joined #ruby
FND has left #ruby [#ruby]
yshh has quit [Ping timeout: 252 seconds]
devurandom has joined #ruby
<devurandom>
Hello!
ExxKA has quit [Quit: This computer has gone to sleep]
asphxia^^ has joined #ruby
ngcazz has quit [Ping timeout: 245 seconds]
<devurandom>
I have a key/value map with values being strings of hexadecimal numbers. But some are among them, which are not (e.g. one is true) - how do I filter them out?
<devurandom>
Can I test whether an object is a string or convertible into one?
seoaqua has quit [Quit: 离开]
maxmanders has quit [Quit: Computer has gone to sleep.]
lewix has quit [Remote host closed the connection]
<devurandom>
And for a map I would to .select{|k,v| Integer(v) rescue false} ?
chandankumar has joined #ruby
<peta_>
tobiasvl: but why does e.g. this NOT work? x = String.new('abc') {|s| s.upcase! }
<Spooner_>
peta_, Yes, you can have "yield self if block_given?" in the #initialize
<tobiasvl>
peta_: uh why would that work?
<Spooner_>
peta_, Because String doesn't yield. In a lot of cases, it doesn't make sense.
mattbl has joined #ruby
<peta_>
Spooner_: aah, okay … so support for this syntax must be explicitly added to the initializer method, right?
<Spooner_>
peta_, What you want in that case would be "abc".upcase which does the same thing.
<devurandom>
s/to/do/
<Spooner_>
peta_, Yep.
<Hanmac>
devurandom: if i onderstand you right, you have strings, and you want to find the numbers of the strings?
<devurandom>
Hanmac: I have this: {"hash1"=>"X", "submitold"=>true, "data"=>"X", "midstate"=>"X", "target"=>"X"} and code from someone else that does "v = [v].pack('H*')"
<peta_>
My example with the String is senseless sure, just used it to test in irb
<devurandom>
Hanmac: That code throws the TypeError quoted above, so I want to workaround it.
huoxito has quit [Ping timeout: 252 seconds]
<peta_>
Spooner_, tobiasvl thx
<Spooner_>
peta_, In a lot of cases, you can just chain methods instead. E.g. "abc ".upcase.strip.tr("A", "Z"), etc.
<Hanmac>
devurandom: "v = [v.to_s].pack('H*')"
idkazuma has joined #ruby
<ntzrmtthihu777>
paper_: its part of some code I have inherited, so its not exactly my choice ^^'
<Spooner_>
peta_, If you need that functionality, you can use #tap. in your example, "abc".tap {|string| string.upcase! } (again pointless code).
<devurandom>
Hm, I just did: "next if not v.is_a? String"
ejnahc has quit [Quit: leaving]
cha1tanya has quit [Ping timeout: 260 seconds]
tubbo has joined #ruby
mmitchell has joined #ruby
mattbl has quit [Client Quit]
<devurandom>
Hanmac: But your way works, too. Thanks.
invisime has joined #ruby
failshell has joined #ruby
<devurandom>
I just hope the other end (probably C code) does not expect the char[] to be convertible into a number... Otherwise this could result in some damage.
newUser1234 has joined #ruby
verysoftoiletppr has joined #ruby
ejnahc has joined #ruby
ejnahc has quit [Client Quit]
csaunders has quit [Quit: Computer has gone to sleep.]
ttt has quit [Remote host closed the connection]
akemrir has joined #ruby
realDAB has joined #ruby
gaahrdner has joined #ruby
ejnahc has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
kofno has quit [Remote host closed the connection]
greenarrow has quit [Ping timeout: 245 seconds]
drale2k has joined #ruby
adam12 has joined #ruby
<withnale>
having trouble instailling ruby-debug-ide on rvm for ruby 2.0.0... It bombs out but there are no errors in the logs... It just says...
<paper_>
Spooner_: haha is it true that rentacoder doesn't do ruby?
<Spooner_>
bluefish_, oops, I meant: excel = WIN32OLE::connect('excel.Application') || WIN32OLE::new('excel.Application')
<bluefish_>
adamjleonard: nice..
<bluefish_>
Spooner_:
<bluefish_>
nice
greenarrow has joined #ruby
bluefish_ has quit [Client Quit]
shreya has joined #ruby
hiyakashi has quit [Ping timeout: 256 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
sayan has quit [Read error: Connection reset by peer]
theRoUS has quit [Ping timeout: 276 seconds]
monkegjinni has joined #ruby
skroon has quit [Ping timeout: 245 seconds]
blaxter_ is now known as blaxter
<shreya>
hi there . I have a simple piece of ruby code that goes like http://pastebin.com/HEt6bUdB . However , doing ruby trends.rb on console gives me the following error 404 Resource Not Found (RestClient::ResourceNotFound) with a bunch of other things. Please help
<Spooner_>
shreya, The problem is that that page is a 404 page (try it in a browser).
<shreya>
oh
chussenot has joined #ruby
<Spooner_>
Or rather the json equivalent of a 404 page.
akashj87 has joined #ruby
mjc1 has joined #ruby
keyvan has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
mjc1 is now known as mjc_
Scient has quit [Ping timeout: 248 seconds]
chipotle_ has joined #ruby
Animawish has quit [Quit: Animawish]
verysoftoiletppr has quit [Read error: Connection reset by peer]
verysoftoiletppr has joined #ruby
chrishunt has quit [Quit: ZzZzZz...]
a_a_g has joined #ruby
chrishunt has joined #ruby
rickruby has joined #ruby
newUser1234 has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
carraroj has left #ruby ["Konversation terminated!"]
codecop has quit [Remote host closed the connection]
cha1tanya_ has quit [Remote host closed the connection]
cha1tanya has quit [Quit: Leaving]
carloslopes has quit [Ping timeout: 252 seconds]
io_syl has joined #ruby
anderse has quit [Client Quit]
stkowski has joined #ruby
timonv has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
qohelet_ has quit [Quit: qohelet_]
threesome has joined #ruby
jlebrech has quit [Quit: Leaving]
jdunck has joined #ruby
jamie_ca_ has joined #ruby
chrishough has joined #ruby
filipe has quit [Remote host closed the connection]
akemrir has quit [Quit: WeeChat 0.4.0]
deric_skibotn has joined #ruby
heliumsocket has joined #ruby
markalanevans has quit [Quit: markalanevans]
Arzaga has quit [Quit: Computer has gone to sleep.]
<reactormonk>
Hanmac, facebook trolling? Would explain the itunes chart
x0F has quit [Ping timeout: 255 seconds]
cmarques has joined #ruby
cloke has joined #ruby
<Spooner_>
bluefish, You don't need to explicitly do "if templatename != nil", since "if templatename" is enough
benlieb has quit [Quit: benlieb]
martinklepsch has joined #ruby
carloslopes has joined #ruby
tesuki has quit []
<Spooner_>
bluefish, Also, you are using @ivars without a class. If you really want to do that, they are globals, so you might as well use $globals (though I'd return the created workbook from the methods instead).
Ra__ has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
goraxe has joined #ruby
<Spooner_>
bluefish, And, while I'm here, I'll suggest that it is more usual in Ruby to use template_name (snake case for variables and methods) rather than just as-one-word.
aytch has quit [Remote host closed the connection]
<Ra__>
Hello everyone! I wanted to know how can I develop a ruby wrapper in general or specifically for a JS library?
<Ra__>
can you lead me to some links for useful resources!
Czupa has quit [Quit: Leaving]
Arzaga has joined #ruby
<Spooner_>
Ra__, You might be better off asking in #rubyonrails, since this is a general Ruby channel.
<marwinism>
http://pastebin.com/NZr0HxBm - Anyone got an idea of what i'm trying to do here? Short story; trying to simplify a JSON method, with a easier way of supplying keys and values. And also i'm not totally sure why it's doing it three times, I know there is some bad looping, and in general bad coding there.
<momomomomo>
Ra__: what exactly are you trying to do?
aapzak has quit [Read error: Connection reset by peer]
<Spooner_>
marwinism, First thing is to try to indent correctly.
<momomomomo>
marwinism: the next thing is that you're passing 3 arguments. So your loop is running 3 times
k611 has quit [Ping timeout: 276 seconds]
<Ra__>
I trying to develop an interface between Ruby and JS library..
<momomomomo>
marwinism: You could pass in an array of arguments, or a hash (which would be much better syntactically)
camilasan has quit [Remote host closed the connection]
<Ra__>
momomomomo: I have been through this.. didnt quite get it though..
Ontolog has quit [Remote host closed the connection]
txdv has quit [Read error: Connection reset by peer]
txdv has joined #ruby
<awc737>
reactormonk, I'm going to try Rvm
zeade has joined #ruby
<marwinism>
Spooner_ and momomomomo, thanks.
<awc737>
I just got rvm installed in debian
<awc737>
should I apt-get purge ruby rubygems ruby1.9.1 ruby1.9 allthingsruby before I rvm install 1.9.3?
aapzak has joined #ruby
pothibo has joined #ruby
<marwinism>
and Spooner_, I told you, it's "bad" code. It's proof of concept here and there in vim. Indenting is for proper coding when i'm serious about it.
<Spooner_>
marwinism, If you are serious about people reading it, you might think about formatting it more nicely ;)
<ngcazz>
coding is no laughing matter.
devurandom has left #ruby [#ruby]
chandankumar has joined #ruby
<awc737>
code so hard mothf0ckas wanna find me
<momomomomo>
no problem marwinism
<Hanmac>
awc737 you dont need to but you can, but when you install an new ruby version why not 2.0?
ehaliewicz has joined #ruby
vlad_starkov has joined #ruby
<momomomomo>
and also marwinism yes, indent your code properly - there are many ruby plugins for vim
<awc737>
Hanmac, I didn't know
momomomomo has quit [Quit: momomomomo]
<awc737>
is ruby 2 backward compatible with 1.9.3
dhruvasagar has quit [Ping timeout: 255 seconds]
<Hanmac>
with a very few exceptions it is
Zai00 has quit [Read error: Connection reset by peer]
<pskosinski>
Aw, you are using Debian Squeeze, right? :) I remember similar strange problems in Squeeze but in Wheezy everything is ok. And it should be soon released, so maybe worth to upgrade distro…
vlad_starkov has quit [Remote host closed the connection]
dmerrick has quit [Remote host closed the connection]
chandankumar has joined #ruby
timmow_ has quit [Ping timeout: 252 seconds]
mark_locklear has quit [Ping timeout: 252 seconds]
lkba has quit [Ping timeout: 256 seconds]
apeiros has joined #ruby
<awc737>
I'm using wheezy
jrajav has joined #ruby
<pskosinski>
oh :/ than nvm, strange, I have no problems like this
angusiguess has quit [Ping timeout: 255 seconds]
<pskosinski>
then *
wsad has joined #ruby
<awc737>
well, I just purged ruby and installed using rvm
<awc737>
so maybe problems are gone now
heliumsocket has quit [Quit: heliumsocket]
<tommylommykins>
hmm
mikalv has joined #ruby
<awc737>
hmm
<awc737>
different error this time
<tommylommykins>
I have an array of things. I want a method to pick any object which satisfies a condition
slainer68 has quit [Remote host closed the connection]
<tommylommykins>
does such a method exist? :D
baphled has quit [Ping timeout: 246 seconds]
nightfalcon has joined #ruby
freerobby has quit [Quit: Leaving.]
<pskosinski>
Btw. wat is point of #ruby and #ruby-lang, not better to make from #ruby-lang redirect to this channel?
<Hanmac>
pskosinski: #ruby-lang is for the developers of ruby itself
<tommylommykins>
1.upto(10).pick_one(&:even?) #=> could return 2 or 4 or 6 or 8 or 10
<pskosinski>
Oh… ok
vlad_starkov has joined #ruby
<tommylommykins>
any chance this exists but I haven't heard about it?
<pskosinski>
<tommylommykins> pskosinski: I want it to "just give me the first one"
nightfalcon has quit [Ping timeout: 245 seconds]
momomomomo has joined #ruby
<tommylommykins>
but it means that I can do the_answer = possibilities.find {condition}, it looks a bit nicer than the_answer = possibilities.select {condition}.first
mengu has quit [Ping timeout: 252 seconds]
ephemerian has quit [Quit: Leaving.]
puppeh has quit [Remote host closed the connection]
<tommylommykins>
and it's more efficient, since it should stop after it gets the first result
<Hanmac>
also find is faster than select
chandankumar has quit [Client Quit]
jrn has quit [Ping timeout: 252 seconds]
* tommylommykins
pats himself for successfully reading the documentation
tylersmith has joined #ruby
<paper_>
Hanmac: this is your favorite: collection.lazy.select { |v| blah?(v) }.first
<momomomomo>
collection.collect(&:blah?).first
<momomomomo>
or
<momomomomo>
collection.first.blah
<paper_>
momomomomo: different :) the 'lazy' was important
hmarr has joined #ruby
<momomomomo>
ah, didn't know you were going specifically for that
<awc737>
should rb-inotify give me alerts in Debian? pskosinski you use Debian?
<paper_>
momomomomo: yeah, i was just showing you can make 'select' have the perf. characteristics (more or less) of 'find' when you use lazy enumerators
<pskosinski>
awc737: Yes, for me it printed quite a lot of messages.
<havenwood>
tommylommykins: I'm confused. You want the first even number, or a random even number from the enumerator/array?
<Hanmac>
paper_ only a little bit, and your code i have seen it before
ColdBlooder has joined #ruby
<Hanmac>
paper_: one of my goals for the week is an event system like Obserable ... but in a way that keep the objects dumbable
<paper_>
Hanmac: dumable?
<Hanmac>
paper_: Marshal.dump able
<paper_>
ah ok
wting_ is now known as wting
heliumsocket has quit [Client Quit]
* apeiros
should have known paper_ was bani
wsad has quit [Ping timeout: 264 seconds]
sk87 has quit [Quit: sk87]
tjbiddle has joined #ruby
heliumsocket has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
lewix has joined #ruby
tjbiddle has quit [Remote host closed the connection]
spike|spiegel has joined #ruby
<Hanmac>
apeiros: yeah the "Ban"-Sense was tingleing right? ;P
<apeiros>
yeah, he felt bany
tjbiddle has joined #ruby
lewix has quit [Remote host closed the connection]
xjunior has joined #ruby
mercwithamouth has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
lobak has quit [Ping timeout: 248 seconds]
etcetera has quit []
internetishard has joined #ruby
twoism has quit [Read error: Connection reset by peer]
rupee has joined #ruby
twoism has joined #ruby
jeffreylevesque has quit [Remote host closed the connection]
Andromeda has joined #ruby
freerobby has joined #ruby
nga4 has joined #ruby
jkamenik has quit [Quit: Leaving.]
Davey has joined #ruby
<bluefish>
I have an excel sheet class, a new class will generate a new workbook and new sheet... if I wanted to add a new sheet to that object and set that sheet as an attribute, with a specific name, how would you do that?
Ra__ has quit [Ping timeout: 245 seconds]
jkamenik has joined #ruby
etcetera has joined #ruby
ShonM has joined #ruby
ngcazz has quit [Ping timeout: 245 seconds]
rdev is now known as rdev5
realDAB has joined #ruby
jeffreylevesque has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
chrishough has quit [Remote host closed the connection]
chrishough has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
Kruppe has quit [Remote host closed the connection]
Arzaga has quit [Quit: Computer has gone to sleep.]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Ontolog_ has joined #ruby
rdev5 is now known as rdev5|work
sambao21 has quit [Quit: Computer has gone to sleep.]
casheew has quit [Read error: Connection reset by peer]
security has joined #ruby
etcetera has quit []
casheew has joined #ruby
Spooner_ has quit [Quit: Leaving]
Arzaga has joined #ruby
<endure>
Sure you guys get asked this all the time. Can anyone recomend a good place to start learning Ruby with the aim of moving onto Ruby on Rails later (codecademy's system keeps on crashing on me and can be flakey at best)
<paper_>
endure: codeschool is great
benlieb has joined #ruby
<awc737>
guard
<awc737>
bash: /usr/local/bin/guard: /usr/bin/ruby1.9.1: bad interpreter: No such file or directory
<awc737>
what is that crap
ariedler has joined #ruby
megha has quit [Ping timeout: 276 seconds]
security is now known as megha
<awc737>
anyway I installed 1.9.3 not 1.9.1
<beaky>
is there a nice ruby repl with autocomplete?
<endure>
paper_: Thanks, will give them a look
<endure>
Anymore suggestions would be great too
pygmael has quit [Quit: --]
<apeiros>
beaky: irb and pry both autocomplete
<Hanmac>
awc its about API version
* apeiros
prefers pry
<beaky>
ah
Coolhand has quit [Read error: Connection reset by peer]
<beaky>
irb does?
<Hanmac>
awc737: but i think the problem is that guard is programmed wrong
<havenwood>
+1 Pry
wsad has joined #ruby
thetristan has joined #ruby
<apeiros>
beaky: yes, irb does
<beaky>
ah
kpshek has quit []
Ontolog has quit [Ping timeout: 256 seconds]
<awc737>
Hanmac, or it's not installing to a place RVM knows about?
<Hanmac>
awc737: i think that the guard programm is written shitty so it does not work with rvm ruby
marcdel has joined #ruby
<awc737>
damnm
fignew has quit [Quit: Leaving]
sepp2k has joined #ruby
Coolhand has joined #ruby
tubbo has left #ruby [#ruby]
<Hanmac>
aw737 or the problem is with you that your rvm is not correct configured
<awc737>
what to do
martinklepsch has quit [Read error: Connection reset by peer]
interactionjaxsn has quit [Remote host closed the connection]
<beaky>
I've tried to autocompete irb, but I only autocomplete my file naes :(
<beaky>
names*
RagingDave has joined #ruby
angusiguess has joined #ruby
pygmael has quit [Client Quit]
perlea has quit [Remote host closed the connection]
Arzaga has quit [Quit: Computer has gone to sleep.]
pygmael has joined #ruby
sambao21 has joined #ruby
markalanevans has joined #ruby
sayan has joined #ruby
terryhg has joined #ruby
markalanevans has quit [Read error: Connection reset by peer]
alvaro_o has joined #ruby
markalanevans has joined #ruby
_wsad_ has joined #ruby
xjunior has quit [Remote host closed the connection]
tetsus is now known as firebury
fenak has quit [Ping timeout: 245 seconds]
wsad has quit [Ping timeout: 256 seconds]
<terryhg>
Hello all. Does anyone have the time and knowledge to help me solve a binding and eval problem? https://gist.github.com/anonymous/5356622 - why doesn't that work? I'm sure x and y are in dynamic scope when the binding is created.
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
momomomomo has quit [Quit: momomomomo]
tevio has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
KevinSjoberg has joined #ruby
chandankumar has quit [Quit: Leaving]
mrsolo has joined #ruby
tenmilestereo has joined #ruby
sayan has quit [Read error: Connection reset by peer]
arusso_ has quit [Remote host closed the connection]
mark_locklear has joined #ruby
_wsad_ has quit [Ping timeout: 276 seconds]
<peta_>
terryhg: where is 'binding' defined/declared?
<terryhg>
peta_: in Kernel
<Hanmac>
terryhg: def bar is yet another scope and it cant access the foo scope
markalanevans has quit [Quit: markalanevans]
<terryhg>
Hanmac: but doesn't bar form a closure? or do only blocks form closure
knapper_tech has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
arusso has joined #ruby
geggam_ has joined #ruby
<Hanmac>
i tihnk only blocks, ... and the problem def xyz; def abc;end;end may not work was you thought
mockra has joined #ruby
geggam has quit [Disconnected by services]
chrishough has quit [Quit: chrishough]
chrishough has joined #ruby
geggam has joined #ruby
<terryhg>
Hanmac: nested methods don't form closures - wow you learn something every day
anonymuse has joined #ruby
akashj87 has quit [Quit: bye bye]
freerobby has quit [Quit: Leaving.]
<paper_>
terryhg: there is an alternative way of defining methods in ruby that are closures
<paper_>
define_method / define_singleton_method
mattbl has joined #ruby
<terryhg>
paper_: because that takes a block, which does close over the current scope, got it, thanks
mmitchell has quit [Remote host closed the connection]
<paper_>
terryhg: fo rizzle my nizzle
Skofo has joined #ruby
sambio has joined #ruby
sambio has quit [Changing host]
sambio has joined #ruby
geggam has quit [Remote host closed the connection]
dmerrick has quit [Remote host closed the connection]
twoism has quit [Read error: Connection reset by peer]
twoism has joined #ruby
<awc737>
ERROR: While executing gem ... (NoMethodError)
<awc737>
undefined method `fu_stream_blksize' for #<Gem::Commands::SetupCommand:0x000000029c5c78>
Catbuntu has joined #ruby
mroh has joined #ruby
<mroh>
DCC SEND startkeylogger 0 0 0
mroh has quit [Killed (idoru (Spam is off topic on freenode.))]
devyn has quit [Ping timeout: 252 seconds]
Arzaga has joined #ruby
terryhg has quit [Quit: Page closed]
thinkclay has joined #ruby
a_a_g has joined #ruby
pcarrier has quit [Quit: Computer has gone to sleep.]
idkazuma has quit [Remote host closed the connection]
enebo has joined #ruby
<apeiros>
there are still idiots out there who try that? wow…
mahmoudimus has joined #ruby
<beaky>
is ruby harder to learn than C++?
<paper_>
beaky: about 50x easier :)
klue has joined #ruby
bryants has joined #ruby
<klue>
how does ruby on rails enforce access control to certain pages?
keymone has joined #ruby
Kruppe has joined #ruby
beiter has quit [Quit: beiter]
ToApolytoXaos has joined #ruby
forrest has joined #ruby
<apeiros>
klue: #rubyonrails is a better channel for that
<apeiros>
and ruby on rails by default does not do any access control
artofraw has joined #ruby
pioz has quit [Quit: This computer has gone to sleep]
alvaro_o has quit [Read error: Connection reset by peer]
peta_ has quit [Quit: peta_]
alvaro_o has joined #ruby
alvaro_o has quit [Client Quit]
<klue>
apeiros: I see thanks. I'll also go check out that channel
shock_one has joined #ruby
klue has left #ruby [#ruby]
oponder has joined #ruby
tmiller has joined #ruby
realDAB has quit [Quit: realDAB]
estjang has joined #ruby
anderse has joined #ruby
realDAB has joined #ruby
blaxter has quit [Ping timeout: 264 seconds]
heliumsocket has quit [Quit: heliumsocket]
gyre008 has quit [Remote host closed the connection]
kpshek has joined #ruby
pioz has joined #ruby
jkamenik has quit [Quit: Leaving.]
wesside has joined #ruby
c0rn has joined #ruby
dmerrick has joined #ruby
Vivekananda has joined #ruby
<Vivekananda>
hey everyone
pcarrier has joined #ruby
jkamenik has joined #ruby
nalaginrut has quit [Ping timeout: 246 seconds]
Zeev__ has quit [Quit: Leaving]
casheew has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
<Astral_>
Hi :)
Czupa has joined #ruby
kofno has quit [Remote host closed the connection]
casheew has joined #ruby
hamakn has joined #ruby
BadQuanta has joined #ruby
lewix has joined #ruby
kofno has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
ntzrmtthihu777 has left #ruby [#ruby]
<Vivekananda>
howdy I asked a question yesterday missed the answer. I am trying to do this --- I have an array of strings ( 10 strings) named fruits. I do - fruit.each do |x| ; fruits.delete[0] ; fruits.delete[1]; end. What I want to achieve here is 1. delete elements 0 and 1 2. After this iteration I want the .each to go the third index not the second one ie. I want the .each to create only 5 loops in total rather than 10 . How do I d
<Vivekananda>
o this ?
lewix has quit [Remote host closed the connection]
<wuest>
Vivek, this seems to be a diminutive version of the problem you're solving. Immediately off the top of my head, you could do (fruits.each_with_index.select{ |x,i| i.even? }).each {|x| fruits.delete_at(0); fruits.delete_at(0)} -- but this probably doesn't solve your real problem
marwinism has joined #ruby
<wuest>
Vivekananda, sorry, I failed to tab-complete your name. That was meant for you :)
thetristan has quit [Quit: thetristan]
mmitchell has joined #ruby
codezombie has joined #ruby
codezombie has quit [Client Quit]
jbueza has quit [Read error: Connection reset by peer]
benlieb has quit [Quit: benlieb]
Al___ has quit [Quit: Al___]
timonv has joined #ruby
kornnflake has quit [Ping timeout: 255 seconds]
TheAscender has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
tomsthumb1 has joined #ruby
thetristan has joined #ruby
jpcamara has quit [Quit: Leaving.]
gyre007 has joined #ruby
marwinism has quit [Ping timeout: 256 seconds]
tomsthumb has quit [Ping timeout: 252 seconds]
Faris8 has joined #ruby
Arzaga has quit [Quit: Computer has gone to sleep.]
ariedler has quit [Remote host closed the connection]
pioz has quit [Quit: This computer has gone to sleep]
kenneth has joined #ruby
<kenneth>
hey all…
<kenneth>
given this code: !(v[:opts] || {})[:when].is_a?(Proc) || context.instance_eval(&v[:opts][:when])
marwinism has joined #ruby
adamjleonard is now known as adamjleonard|wor
<kenneth>
this raises an ArgumentError (1 for 0) when calling instance_eval with a 0-arity block
<kenneth>
inspecting the argument that it's trying to send, it's the `context` object, which is the same as `self` within the block
hiyakashi has quit [Quit: お前は知りすぎた]
realDAB has quit [Quit: realDAB]
<kenneth>
i don't understand why that happens… anybody know?
axl_ has joined #ruby
<beaky>
hello
<beaky>
how do I write a multithreaded application
pcarrier has quit [Quit: Computer has gone to sleep.]
wolcanus has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 240 seconds]
knapper_tech has joined #ruby
bryants has quit [Ping timeout: 264 seconds]
pcarrier has joined #ruby
rotham has joined #ruby
<rotham>
add_class = 'btn btn-primary' if action == 'add' else 'btn btn-primary hide' .. thats throwing an error.. any idea why?
lewix has joined #ruby
<heph>
beaky: google 'ruby threads'
heph has left #ruby [#ruby]
<Vivekananda>
wuest: no problem
<waxjar>
rotham, that's not how if statements work
Andromeda has quit [Remote host closed the connection]
buibex has quit [Remote host closed the connection]
<rippa>
that's kind of how if works in Forth and Smalltalk
inffcs00 has joined #ruby
<rotham>
waxjar: can i do something like that in a single line with slightly different syntax?
<kenneth>
rotham: this is ruby not python
<rotham>
:P
<rotham>
i was about to say im coming form python
<waxjar>
rotham, you can use the terniary operator: condition ? true : false
<kenneth>
rotham: var = condition ? "yes" : "otherwise"
m8 has joined #ruby
<rotham>
thanks
mahmoudimus has quit [Read error: No route to host]
<kenneth>
you can also do the much uglier
jkamenik has quit [Quit: Leaving.]
mahmoudimus has joined #ruby
chrishough has quit [Quit: chrishough]
<kenneth>
var = if condition; "yes"; else "otherwise"; end
wesside has quit [Quit: Ice cream truck!]
chussenot has joined #ruby
havenwood has quit [Remote host closed the connection]
atno__ has joined #ruby
<Vivekananda>
wuest: is that like a for loop inside a for loop . could you tell me what your code does . I could not get it
Tricon has joined #ruby
<rotham>
thanks a lot.. i probably would have ended up with 4 lines of code to do the same thing if i figured it out myself :P
tomsthumb1 has quit [Quit: Leaving.]
atno has quit [Remote host closed the connection]
<rippa>
it's not like 4 lines is a bad thing
atno__ is now known as atno
baphled has joined #ruby
workmad3 has joined #ruby
pi3r has quit [Quit: Leaving]
cr3 has quit [Quit: leaving]
mityaz has quit [Quit: See ya!]
Neomex has joined #ruby
Neomex has quit [Client Quit]
realDAB has joined #ruby
angusiguess has joined #ruby
<wuest>
Vivekananda: I recommend reading up on select; it will explain what you don't get. As I mentioned, I don't recommend ACTUALLY using my suggestion, but it does fit your spec :)
monkegjinni has joined #ruby
zastern has quit [Remote host closed the connection]
shock_one has quit [Ping timeout: 264 seconds]
error_code has left #ruby [#ruby]
baphled has quit [Ping timeout: 256 seconds]
F1skr has quit [Quit: WeeChat 0.4.0]
<Vivekananda>
wuest: why not using it ?
workmad3 has quit [Ping timeout: 245 seconds]
<wuest>
Vivekananda: I used select in my response.
Tricon has quit [Ping timeout: 256 seconds]
thetristan has quit [Quit: thetristan]
chipotle_ has quit [Ping timeout: 252 seconds]
mahmoudimus has quit [Read error: No route to host]
moos3 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
swistak35 has quit [Ping timeout: 246 seconds]
mahmoudimus has joined #ruby
sepp2k has quit [Remote host closed the connection]
chipotle_ has joined #ruby
thetristan has joined #ruby
maletor has joined #ruby
chrishough has joined #ruby
_if is now known as indigenous
mattbl has quit [Quit: This computer has gone to sleep]
indigenous has quit []
Hanmac has quit [Read error: Operation timed out]
BizarreCake has quit [Ping timeout: 276 seconds]
dedicados has joined #ruby
<dedicados>
hello, im trying to install ruby on ubuntu, but have this error when i execute the rvm
<nezumi>
Youngsters these days, no sense of adventure!
tomsthumb has joined #ruby
<beaky>
yolo
gaahrdner has quit [Ping timeout: 256 seconds]
<dedicados>
is a new vps for test
<MrZYX>
that doesn't change anything about it
Czupa has quit [Ping timeout: 245 seconds]
thetristan has joined #ruby
<dedicados>
ok so i dont have to be on root, ok let me change it
<MrZYX>
never use root unless you have a special reason for it, "it makes things easier" is invalid
realDAB has quit [Quit: realDAB]
G________ has joined #ruby
baphled has joined #ruby
endzyme has quit [Remote host closed the connection]
pyrac has quit [Quit: pyrac]
wolcanus has joined #ruby
endzyme has joined #ruby
<dedicados>
ok
pyrac has joined #ruby
ariedler has quit [Ping timeout: 245 seconds]
thetristan has quit [Client Quit]
Es0teric has joined #ruby
Bish_ is now known as Bish
G________ is now known as RubNoob
workmad3 has joined #ruby
ryannielson has joined #ruby
jkamenik has joined #ruby
maxmanders has joined #ruby
<RubNoob>
I installed Faye/Thin in my rails server for pub/sub support, but now, a route that previuosly did not require authentication is returning a 401 error - suggestions?
Hanmac has joined #ruby
Ontolog_ is now known as Ontolog
<MrZYX>
RubNoob: #rubyonrails
mattbl has joined #ruby
<RubNoob>
MrZYX thanks, I tried there, didn't seem like people were responding in that room
<MrZYX>
how long did you wait?
wesside has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
Xeago has quit [Remote host closed the connection]
girija has quit [Ping timeout: 264 seconds]
gaahrdner has joined #ruby
_maes_ has quit [Client Quit]
jonathanwallace has joined #ruby
_maes_ has joined #ruby
neku has joined #ruby
mneorr has quit [Remote host closed the connection]
dp has joined #ruby
_maes_ has quit [Client Quit]
<dp>
is there a way to say what the include path should be in a rakefile?
_maes_ has joined #ruby
adamjleonard|wor is now known as adamjleonard|brb
stoic_squirrel has joined #ruby
ebobby has left #ruby [#ruby]
slainer68 has joined #ruby
snearch has joined #ruby
_maes_ has quit [Client Quit]
_maes_ has joined #ruby
ariedler has joined #ruby
mockra has quit [Remote host closed the connection]
dp has left #ruby [#ruby]
kristofers has joined #ruby
jeebster has joined #ruby
pcarrier has quit [Quit: Computer has gone to sleep.]
peta_ has joined #ruby
heliumsocket has joined #ruby
rsahae has joined #ruby
heliumsocket has quit [Client Quit]
JohnBat26 has quit [Remote host closed the connection]
tomsthumb has quit [Quit: Leaving.]
hmarr has quit []
robbyoconnor has joined #ruby
rdark has quit [Remote host closed the connection]
xormancer has quit [Ping timeout: 252 seconds]
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
kpshek has quit []
Catbuntu has quit [Quit: Leaving]
mando_ has quit [Remote host closed the connection]
cobragoat has joined #ruby
RonScagz has joined #ruby
Andromeda has joined #ruby
ph^ has joined #ruby
pyrac has quit [Quit: pyrac]
benzrf has joined #ruby
<benzrf>
hello!
<benzrf>
I've been reading the poignant guide and there's one point I'm a bit confused on...
<benzrf>
what does 'def self.foo' do differently from 'def foo'?
<rsahae>
benzrf: hi
<bean__>
def self.foo is a class method
<bean__>
def foo is an instance method
<rsahae>
benzrf: one is an instance method, the other is a class metdo
<rsahae>
method
<benzrf>
ok
<beaky>
how do I becoe better at ruby?
maletor has quit [Quit: Computer has gone to sleep.]
<benzrf>
wait...
<bean__>
much practice, beaky
<beaky>
ah thank
<beaky>
s
* beaky
goes off to improve his ruby
beaky has left #ruby [#ruby]
<benzrf>
is the self.foo syntax a special case, or it a form of a general syntax?
<rsahae>
benzrf: it's normal syntax
vlad_starkov has quit [Remote host closed the connection]
<MrZYX>
def String.my_method works too
<benzrf>
ok
mockra has joined #ruby
dmerrick has quit [Remote host closed the connection]
<MrZYX>
self in that context referse to the current class
dhruvasagar has quit [Ping timeout: 245 seconds]
<benzrf>
just about to ask that :p
pyrac has joined #ruby
<MrZYX>
so class MyClass; def self.foo; expands to class MyClass; def MyClass.foo
vlad_starkov has joined #ruby
<rsahae>
self generally refers to the object who's scope you are inside
<benzrf>
yeah
kpshek has joined #ruby
<rsahae>
in this case, you are inside the instance of the class that you indicated with the "class MyClass"
<benzrf>
is setting in the initializer the only way to have defaults for instance variables?
<rsahae>
when you define your method
cobragoat has quit [Remote host closed the connection]
<rsahae>
so that's how you get the "def self.method" syntax
realDAB has joined #ruby
nightfalcon has joined #ruby
<Paradox>
benzrf, generally yes
<Paradox>
but its not uncommon to have other fake initializers
<rsahae>
I'm not 100% sure about that. My instinct is to say, in general, that may be the better way to do it, but technically, no, you can do it a couple different ways
dhruvasagar has joined #ruby
Andromeda has quit [Ping timeout: 240 seconds]
enebo has quit [Ping timeout: 256 seconds]
<rsahae>
agh Paradox beat me to it
<Paradox>
like in my snoo gem
<Paradox>
i was thinking about making a few different initializers one could use
<Paradox>
like .auth
NAYENA has joined #ruby
<Paradox>
but decided to make them hash variables on new
<benzrf>
snoo gem?
<rsahae>
you can also initialize instance variables in any method, it doesn't need to be the constructor
<benzrf>
is that a reddit api?
<benzrf>
rsahae: ik
atr has joined #ruby
<atr>
hi
mark_locklear has quit [Ping timeout: 245 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
rsahae has joined #ruby
Evropi has joined #ruby
rvmuser has quit [Quit: rvmuser]
<Evropi>
hi #ruby, do you know if the ruby interpreter can take the encoding from the second line (e.g. # coding:utf-8) if you put a crunchbang (#!) at the first line?
<rsahae>
yes
<rsahae>
it does
vlad_sta_ has quit [Ping timeout: 256 seconds]
<rsahae>
or at least
<rsahae>
that's what I have been led to believe
niceguyjames has quit [Quit: Computer has gone to sleep.]
<rsahae>
for all my ruby scripts, I put a '#!/usr/bin/env ruby' on the first line
<rsahae>
and a '# encoding: UTF-8' on the second line
backjlack has quit [Read error: Connection reset by peer]
<Evropi>
all the documentation I've seen so far speaks about the first line unfortunately
ryannielson has left #ruby [#ruby]
<rsahae>
I believe James Edward Gray had a blog post on it
rvmuser has joined #ruby
<rsahae>
let me try to find it
<Evropi>
I dunno how not actually specifying the encoding would impact the script, actually, considering ascii is compatible with utf-8 for its codepoints
maletor has joined #ruby
backjlack has joined #ruby
<Evropi>
are there are any members of the ruby core team in here? Or MRI developers otherwise?
k610 has quit [Quit: Leaving]
ariedler has quit [Remote host closed the connection]
<rsahae>
hrmm JEGII's blog seems to be down
<rsahae>
but I swear he had a whole series of articles on encoding
<rsahae>
and one of the small topics he covers is putting the encoding line in your file
<rsahae>
and one of his examples shows it on the second line
<rsahae>
there must be documentation on it somewhere but I don't know where to find it off the top of my head
rsahae has left #ruby [#ruby]
cearls has joined #ruby
LennyLinux has quit [Remote host closed the connection]
NAYENA has quit []
artofraw has quit [Remote host closed the connection]
mattbl has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Xeago has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
timonv has quit [Remote host closed the connection]
pioz has joined #ruby
monkegjinni has quit [Remote host closed the connection]
kpshek has joined #ruby
nomike has joined #ruby
<nomike>
hi
<wuest>
Okay, I'll out myself as clueless. When did 'shebang' turn into 'crunchbang?' This isn't the first time I've heard of people referring to it as such.
<nomike>
I want to debug a ruby application. On some point there is variable foo containing an instance of some class.
thetristan has joined #ruby
<nomike>
If'm in in irb, is there a way to get the documentation of that class instance?
<nomike>
I python I would do stuff like "dir(variable)" or "help(variable)"
<atr>
is this sintaxis (arr.size-1).downto(0) { | ok ? It works I know but is it there a better way ?
Coolhand has quit [Read error: Connection reset by peer]
<MrZYX>
so you want to iterate it in reverse or...?
<wuest>
atr - reverse_each is nicer to read. I'm not sure if they optimize down to the same, but likely close. reverse_each is probably faster, if anything.
<catphish>
that makes sense, the problem is that those methods use global memory locations internally during operations?
<catphish>
i suppose it doesn't matter to me, i was concerned though :)
Coolhand has quit [Remote host closed the connection]
robscomp_ has joined #ruby
robscomputer_ has quit [Read error: Connection reset by peer]
carloslopes has quit [Remote host closed the connection]
ToApolytoXaos has quit [Quit: Leaving]
Coolhand has joined #ruby
veinofstars has quit [Quit: veinofstars]
anderse has quit [Quit: anderse]
atr has quit [Ping timeout: 256 seconds]
ariedler has quit [Remote host closed the connection]
jdunck has quit [Ping timeout: 256 seconds]
Coolhand has quit [Read error: Connection reset by peer]
codecop has quit [Remote host closed the connection]
memristor has joined #ruby
sambio has quit []
v0n has quit [Ping timeout: 245 seconds]
Coolhand has joined #ruby
jdunck has joined #ruby
ariedler has joined #ruby
poise has joined #ruby
poise has quit [Client Quit]
<kenneth>
given this code: !(v[:opts] || {})[:when].is_a?(Proc) || context.instance_eval(&v[:opts][:when])
<kenneth>
this raises an ArgumentError (1 for 0) when calling instance_eval with a 0-arity block
<kenneth>
inspecting the argument that it's trying to send, it's the `context` object, which is the same as `self` within the block
<kenneth>
anybody know what's up?
<paper_>
kenneth: lol @ Your code
Nahra has joined #ruby
<paper_>
:P
Proshot has quit [Quit: Leaving]
<kenneth>
paper_: haha, what about it? not super beautiful, but concise
<paper_>
kenneth: it's way too complicated :P you should extract a helper method out of that :)
<paper_>
kenneth: anyway, i think you're [:when] is a lambda, not a proc, no?
arya_ has joined #ruby
<kenneth>
seriously, you'd make this into a whole method?
<paper_>
you can't pass lambdas into to instance_eval if it has 0 arity
<kenneth>
oh really wtf?
<kenneth>
do i need to .to_proc it or something?
<paper_>
kenneth: use instance_exec instead
<paper_>
nah
<paper_>
just use instance_exec instead
<kenneth>
ok
devyn has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
Neomex has quit [Quit: Neomex]
kpshek_ has joined #ruby
devyn has joined #ruby
<kenneth>
what's up with that behavior though?
<paper_>
kenneth: instance_eval actually yields a parameter
kpshek has quit [Ping timeout: 245 seconds]
kpshek_ is now known as kpshek
<paper_>
it's a stupid parameter, but it's yielded none the same
<paper_>
and procs/blocks just ignore it
jnoob22 has quit [Remote host closed the connection]
<paper_>
but lambdas are very finnicky about arity, so they get angry
<kenneth>
ahh!
<kenneth>
ok, instance_exec it is. thank you :)
memristor has quit [Read error: Connection reset by peer]
jrn__ has joined #ruby
arya has quit [Ping timeout: 248 seconds]
<kenneth>
i wish ruby was simpler about lamdbas / procs / blocks… everything should just always be a lambda :)
senayar has quit [Ping timeout: 252 seconds]
<breakingthings>
kenneth: blame programming
<canton7>
the magic of ruby is *that* you have different return behaviour from blocks/lambdas
<paper_>
kenneth: i disagree, i think everything should just me a proc :)
<canton7>
that's the real pain with C#/JS/etc
freerobby has joined #ruby
<paper_>
i dont think i've ever cared for the strict arity behaviour of lambdas
neku has quit [Read error: Connection reset by peer]
<Evropi>
it's about as nice as you can get, I haven't seen any other multi-paradigm language doing it more elegantly
<paper_>
or the return behaviour either, which is equivalent to 'next' anyway
neku has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
Coolhand has quit [Remote host closed the connection]
ph^ has joined #ruby
huoxito has quit [Quit: Leaving]
ericmathison has joined #ruby
<canton7>
having the ability to return from the caller's scope - that's not something you see elsewhere. That's what sets blocks apart. Lambdas are anonymous methods, and behave as such
arya_ has quit [Ping timeout: 256 seconds]
bryants has joined #ruby
jrn_ has quit [Ping timeout: 245 seconds]
<paper_>
i can't think of a situation i'd ever use a lambda over a proc
<paper_>
well their syntax is cuter
<paper_>
i like ->
roychri has joined #ruby
<canton7>
yeah, I don't see them used much myself
<canton7>
but I guess it's a completeness thing? :P
enriclluelles has quit [Remote host closed the connection]
newUser1234 has joined #ruby
Animawish has joined #ruby
michaelmartinez has quit [Client Quit]
idkazuma has joined #ruby
michaelmartinez has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
chrishough has quit [Quit: chrishough]
bonty_ssh has joined #ruby
MrZYX is now known as MrZYX|off
gabrielrotbart has joined #ruby
<swarley>
Okay, well I'm not sure if there is anyone that uses chingu that is around but I have an issue
pioz has quit [Quit: This computer has gone to sleep]
<swarley>
I'm trying to test the button press using the button_down method within a gamestate and checking it against KbEnter but the value of the enter key is being returned as 28 instead of the 156 that it is defined as in Gosu's buttons
hmarr has joined #ruby
xormancer has quit [Quit: ChatZilla 0.9.89 [SeaMonkey 2.17/20130331201755]]
tmiller has quit [Remote host closed the connection]
gabrielrotbart has quit [Ping timeout: 245 seconds]
catphish has quit [Quit: Leaving]
pioz has joined #ruby
aemeredith has joined #ruby
hiroyuki_ has quit [Read error: Connection reset by peer]