<ericmathison>
if you want to just get the directories you could do dir.glob('**/*').reject { |file| File.file?(file) }
<ericmathison>
not sure i entirely understant the documentation about '**' but this method seems to work for me.
<ericmathison>
maybe it will for you too.
havenwood has joined #ruby
zastern has joined #ruby
<axl_>
ericmathison: thanks!
horofox_ has quit [Quit: horofox_]
bigoldrock has quit [Ping timeout: 260 seconds]
tspike has quit [Ping timeout: 248 seconds]
freerobby has joined #ruby
chattmatt has joined #ruby
mocfive has quit [Ping timeout: 264 seconds]
_maes_ has joined #ruby
Spaceghost|work is now known as pipework
athst has joined #ruby
brennanMKE has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
platzhirsch has left #ruby [#ruby]
wmoxam has joined #ruby
apeiros has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
adramalech has joined #ruby
wesside_ has quit [Quit: Computer has gone to sleep.]
brianpWins has quit [Quit: brianpWins]
vwoo has quit [Ping timeout: 260 seconds]
DanKnox is now known as DanKnox_away
<adramalech>
had a question was wondering about writing data structures to tmpfs. I have seen about using tmpfs for database stuff, but was more wanting an alternative to using shared memory.
zastern has quit [Remote host closed the connection]
jlast has joined #ruby
vwoo has joined #ruby
apeiros has quit [Ping timeout: 260 seconds]
justsee has joined #ruby
justsee has joined #ruby
BarnacleBob has quit [Quit: This computer has gone to sleep]
henn1nk has quit [Ping timeout: 248 seconds]
_Renegade has quit [Ping timeout: 260 seconds]
ryan_turner is now known as ryan_turner_
_Renegade has joined #ruby
wmoxam has quit [Ping timeout: 264 seconds]
Elico has joined #ruby
henn1nk has joined #ruby
Es0teric has joined #ruby
coreinfo99 has quit [Ping timeout: 248 seconds]
Es0teric has quit [Client Quit]
wald0 has joined #ruby
<wald0>
how i can downgrade the version of an installed gem ?
<jkline>
wald0: the only way I know is to uninstall the gem and then install a specific version
wmoxam has joined #ruby
<wald0>
jkline: unfortunately i dont know ruby yet, im just installing redmine, can you tell me these commands?
<jkline>
gem uninstall redmine
<jkline>
to install a specific version is a little tricky, it is something like `gem install redmine "= 1.2.3"`
<wald0>
ok let me see
<jkline>
`gem help` and `gem help install` may help too
jerkbot1 has joined #ruby
<jkline>
yeah, see I think I got the syntax wrong, I think you would need `gem install redmine --version "= 1.2.3"`
<wald0>
aah
vwoo has quit [Ping timeout: 248 seconds]
Nisstyre-laptop has quit [Read error: Connection reset by peer]
<ericmathison>
you might find that the Dir['**/*'] syntax is preferable
jarin has joined #ruby
<ericmathison>
or that you prefer Find.find('.') to the method I mentioned above
jimg has joined #ruby
Dummies_freelanc has quit [Remote host closed the connection]
dmiller has joined #ruby
jbueza has quit [Quit: Leaving.]
tylersmith has joined #ruby
jerkbot1 has quit [Remote host closed the connection]
twoism has quit [Remote host closed the connection]
bionhart has joined #ruby
axl_ has quit [Quit: axl_]
jerkbot1 has joined #ruby
slainer68 has joined #ruby
Dummies_freelanc has joined #ruby
jerkbot1 has quit [Remote host closed the connection]
mikepack_ has quit [Remote host closed the connection]
timkohrumel has joined #ruby
tspike has joined #ruby
tchebb has joined #ruby
mmlac-bv has quit [Quit: mmlac-bv]
jerkbot1 has joined #ruby
coreinfo99 has joined #ruby
x1337807x has joined #ruby
ARCADIVS has joined #ruby
Dummies_freelanc has quit [Ping timeout: 256 seconds]
<wald0>
jkline: seems like now i have an error of bundle saying that doesn't found the previous version, i should have used bundle or something like that ?
jerkbot1 has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
<ericmathison>
wald0: yes, you should use bundler.
jerkbot1 has joined #ruby
nazty has quit [Ping timeout: 256 seconds]
<jkline>
My understanding of bundler is that it installs specific versions of dependencies, so if you are installing something that makes use of bundler than you probably want to use it
slainer68 has quit [Ping timeout: 240 seconds]
tspike has quit [Ping timeout: 255 seconds]
hogeo has joined #ruby
<wald0>
more exactly the problem is that the version of the 'mail' gem in 2.5.4 is buggy and i need to downgrade it to 2.5.3
tkuchiki has joined #ruby
zeade has quit [Quit: Leaving.]
mljsimone|away is now known as mljsimone
<wald0>
mmh, i dont found in google how i can install a specific version of something with "bundle" (or to downgrade it)
milardovich has joined #ruby
milardovich has quit [Max SendQ exceeded]
DonRichie has quit [Quit: Verlassend]
ttt has joined #ruby
milardovich has joined #ruby
<jkline>
bundle gets its instructions from Gemfile
baroquebobcat has joined #ruby
<jkline>
and Gemfile.lock
dr_neek has joined #ruby
rsahae_ has quit [Quit: rsahae_]
ttt has quit [Ping timeout: 252 seconds]
ryan_turner_ is now known as ryan_turner
twoism has joined #ruby
twoism has quit [Remote host closed the connection]
brianpWins has joined #ruby
twoism has joined #ruby
dankest has quit [Quit: Leaving...]
bradhe has joined #ruby
dankest has joined #ruby
end_guy has quit [Remote host closed the connection]
brennanMKE has quit [Remote host closed the connection]
end_guy has joined #ruby
dankest has quit [Client Quit]
johnrlive has joined #ruby
ryan_turner is now known as ryan_turner_
v0n has quit [Ping timeout: 255 seconds]
dmiller has quit [Remote host closed the connection]
ravster has joined #ruby
adramalech has quit [Quit: leaving]
luckyruby has quit [Remote host closed the connection]
markalanevans has quit [Quit: markalanevans]
jdunck has quit [Quit: Computer has gone to sleep.]
<ericmathison>
wald0: did you already try following the installation documentation (including running: bundle install --without development test)?
<chattmatt>
anyone a regex expert?
ivanoats_ has joined #ruby
Dummies_freelanc has joined #ruby
vwoo has quit [Ping timeout: 260 seconds]
Mattix has quit [Read error: Connection reset by peer]
luckyruby has joined #ruby
vwoo has joined #ruby
Mattix has joined #ruby
fwaokda has quit []
ivanoats has quit [Ping timeout: 248 seconds]
mmlac-bv has joined #ruby
lyanchih has joined #ruby
<joelteon>
has anyone here had a problem with capybara-webkit's extconf.rb returning 0 and not doing anyhing?
<jkline>
chattmatt: what do you need your regex to match?
banisterfiend has joined #ruby
adramalech has joined #ruby
<chattmatt>
jkline: account.id = 542 AND deleted_at = nil needing to match account, id and 542 (could be any combination of *.* = *)
machuga|away is now known as machuga
buzzybron has joined #ruby
<jkline>
chattmatt: sounds like /(.*)\.(.*) = (.*)/
<jkline>
except you might want to limit what goes in each capture parens
blitz has quit [Quit: This computer has gone to sleep]
<jkline>
. will match any character, you might want only a-z or only word characters, or things that aren't dots
<jkline>
that is a pretty cool website chattmatt . Are you saying you want to match the same expression multiple times against the same line?
<jkline>
the * is greedy by default, it will match the most characters possible
<jkline>
so, you can do a non-greedy match, or match things that aren't the equal sign
<jkline>
also there is probably a method to match multiple times against the same string. In perl it would be /g on the re, but I don't know what it is in ruby
Ortuna has quit [Quit: Computer has gone to sleep.]
<chattmatt>
jkline: ideally, a data structure like [[account, id, 542], [other, name, bob]] is what im looking for… im trying to parse an NSFetchRequest predicate in ObjC to match for relationship properties
Ortuna has joined #ruby
marr has quit [Ping timeout: 248 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<jkline>
chattmatt: you just said a bunch of words I don't know
<paranox>
is it good form to instantiate instance variables in the initialize method, and only in that method?
brennanMKE has quit [Remote host closed the connection]
etruscan has joined #ruby
bakingbread has quit [Ping timeout: 256 seconds]
brennanMKE has joined #ruby
<r0bgleeson>
paranox: yeah it is
twoism has quit [Ping timeout: 276 seconds]
chrishough has quit [Quit: chrishough]
dhruvasagar has joined #ruby
harrymoreno_ has joined #ruby
phipes has quit [Quit: phipes]
ravster has quit [Quit: Leaving.]
synthetix has quit [Ping timeout: 240 seconds]
fierycatnet has joined #ruby
x1337807x has quit [Ping timeout: 248 seconds]
harrymoreno has quit [Ping timeout: 276 seconds]
harrymoreno_ is now known as harrymoreno
freerobby has quit [Quit: Leaving.]
ttt has joined #ruby
bakingbread has joined #ruby
Hanmac1 has joined #ruby
jetblack_ has quit [Quit: leaving]
jetblack has joined #ruby
ttt has quit [Ping timeout: 252 seconds]
GreatSUN_ has joined #ruby
Vivekananda has joined #ruby
iamjarvo has joined #ruby
Vivekananda has quit [Client Quit]
kofno has joined #ruby
AlbireoX has quit [Remote host closed the connection]
Nisstyre-laptop has joined #ruby
adramale1h has joined #ruby
Bosox20051 has joined #ruby
baroquebobcat has joined #ruby
chrishough has joined #ruby
GreatSUN has quit [Ping timeout: 252 seconds]
brennanMKE has quit [Remote host closed the connection]
freerobby has joined #ruby
cpruitt_ has joined #ruby
cpruitt_ has quit [Client Quit]
mmlac-bv has quit [Quit: mmlac-bv]
ttt has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
Guedes has quit [Ping timeout: 255 seconds]
phipes has joined #ruby
cpruitt has quit [Ping timeout: 255 seconds]
jbueza has joined #ruby
brennanM_ has joined #ruby
brennanM_ has quit [Remote host closed the connection]
saarinen has joined #ruby
rsahae_ has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
ivanoats has joined #ruby
mansi has joined #ruby
iamjarvo1 has joined #ruby
ivanoats_ has quit [Ping timeout: 255 seconds]
jkline has quit [Quit: jkline]
iamjarvo has quit [Ping timeout: 256 seconds]
brucelee has joined #ruby
havenwood has quit [Remote host closed the connection]
hollyw00d has joined #ruby
cads has joined #ruby
wmoxam has quit [Ping timeout: 248 seconds]
timkohrumel has quit [Remote host closed the connection]
purpleid1a has quit [Quit: leaving]
hollyw00d has quit [Quit: hollyw00d]
rsahae_ has quit [Quit: rsahae_]
viszu has joined #ruby
mmlac-bv has joined #ruby
jhowarth has joined #ruby
jonahR_ has joined #ruby
pskosinski has quit [Remote host closed the connection]
mljsimone is now known as mljsimone|away
freerobby has quit [Quit: Leaving.]
citizensinspace has joined #ruby
jonahR has quit [Ping timeout: 252 seconds]
jonahR_ is now known as jonahR
baroquebobcat has quit [Quit: baroquebobcat]
rsahae has joined #ruby
radic_ has joined #ruby
rabidpraxis has joined #ruby
slanger has joined #ruby
DrShoggoth has quit [Quit: Leaving]
<slanger>
If I have a class that extends a parent class, how can I set a variable in the child class that can then be accessed through the parent class?
radic__ has quit [Ping timeout: 256 seconds]
<slanger>
Having issues with self.var_name
<slanger>
When I try to access it, I get undefined method self.var_name from the parent
brucelee has quit [Ping timeout: 276 seconds]
mansi has quit [Ping timeout: 276 seconds]
gyre007 has quit [Remote host closed the connection]
dmiller has quit [Remote host closed the connection]
harrymoreno has joined #ruby
Opettaja has joined #ruby
harrymoreno_ has quit [Ping timeout: 255 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
iamjarvo1 has quit [Quit: Leaving.]
bigmac has joined #ruby
Guga_ has quit [Quit: ~]
ryan_turner is now known as ryan_turner_
maroloccio has joined #ruby
gyre007 has quit [Ping timeout: 240 seconds]
dr_neek has quit [Quit: dr_neek]
osvico has quit [Ping timeout: 252 seconds]
harrymoreno_ has joined #ruby
Rix has quit [Ping timeout: 256 seconds]
harrymoreno has quit [Ping timeout: 260 seconds]
harrymoreno_ is now known as harrymoreno
freerobby has joined #ruby
freerobby has quit [Client Quit]
dhruvasagar has joined #ruby
citizensinspace has quit [Quit: citizensinspace]
chattmatt has quit [Quit: chattmatt]
sambao21 has joined #ruby
rsahae has joined #ruby
athst has quit [Quit: athst]
freerobby has joined #ruby
harrymoreno has quit [Ping timeout: 255 seconds]
banisterfiend has quit [Remote host closed the connection]
citizensinspace has joined #ruby
Rix has joined #ruby
synthetix has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
Ortuna has quit [Quit: Computer has gone to sleep.]
brennanMKE has joined #ruby
harrymoreno has joined #ruby
phipes has quit [Quit: phipes]
ivanoats has quit [Remote host closed the connection]
mmlac-bv has quit [Quit: mmlac-bv]
bradhe has joined #ruby
rsahae has quit [Quit: rsahae]
saarinen has quit [Quit: saarinen]
saarinen has joined #ruby
r0bgleeson has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
hadees has joined #ruby
bradhe has quit [Remote host closed the connection]
ihelpsu has left #ruby [#ruby]
pcarrier_ has quit [Quit: Computer has gone to sleep.]
pitzips has quit [Ping timeout: 252 seconds]
tndrbt has joined #ruby
philcrissman_ has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 260 seconds]
philcrissman_ has joined #ruby
mmlac-bv has joined #ruby
dmiller has joined #ruby
bubblehead has quit [Remote host closed the connection]
subbyyy has joined #ruby
adramale1h has quit [Quit: leaving]
razi has quit [Quit: Leaving.]
Rix has quit [Ping timeout: 248 seconds]
iamjarvo has joined #ruby
Cyrus has joined #ruby
harrymoreno has quit [Quit: harrymoreno]
alvaro_o has quit [Quit: Ex-Chat]
browndawg has joined #ruby
zastern has joined #ruby
<zastern>
When I subtract array bar from array foo, e.g. foo - bar, it position is irrelevant right? All matching objects are removed, and the results are returned.
<zastern>
Is that accurate?
<zastern>
the positions of objects in the array are irrelevant, i should say
sandGorgon has joined #ruby
hollyw00d has joined #ruby
dmiller has quit [Ping timeout: 248 seconds]
hoofed has joined #ruby
dallasm has quit [Remote host closed the connection]
luckyruby has quit [Remote host closed the connection]
ryan_turner_ is now known as ryan_turner
luckyruby has joined #ruby
iamjarvo has quit [Ping timeout: 256 seconds]
Rix has joined #ruby
havenwood has joined #ruby
rrecio has joined #ruby
pontiki has joined #ruby
phipes has joined #ruby
rrecio has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
BrianJ has quit [Quit: Computer has gone to sleep.]
ryan_turner is now known as ryan_turner_
v0n has quit [Ping timeout: 252 seconds]
cofin has quit [Quit: cofin]
tndrbt has quit [Quit: tndrbt]
v0n has joined #ruby
Mchl has quit [Ping timeout: 248 seconds]
citizensinspace has quit [Quit: citizensinspace]
pitzips has joined #ruby
tonini has joined #ruby
dmiller has joined #ruby
SegFaultAX has quit [Changing host]
SegFaultAX has joined #ruby
Mchl has joined #ruby
mmlac-bv has quit [Quit: mmlac-bv]
lyanchih has quit [Quit: lyanchih]
brunoro has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
<quazimodo>
can we monkey patch within namespaces?
bubblehead has quit [Read error: Connection reset by peer]
bubblehead has joined #ruby
marr has joined #ruby
<atrR_>
I have certain hex number, for example 00FF11, how can I give it the forma \x00\xFF\x11
<atrR_>
*format
haxrbyte_ has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
slainer68 has quit [Remote host closed the connection]
<canton7>
atrR_, how is it a number if it starts with 0? Does it start off as a string? Is there a fixed length?
<atrR_>
canton7: well I have a integer and I want to get the hex number of that integer (in little endian) with the forma \xAA\xFF\xDD
slainer68 has joined #ruby
<atrR_>
I'm playing with "%x" but I don't get the correct format
tommyvyo has quit [Quit:]
gnagno has joined #ruby
<gnagno>
hello all
<atrR_>
so for example, I have 22222 --> in hex 56CE --> in little endian CE56
thebastl has joined #ruby
<atrR_>
so I would need \xCE\x56
sepp2k has joined #ruby
<gnagno>
I created a new hash that returns as default value another hash, that returns as default value an array: a = Hash.new(Hash.new([])) I want to store something in it with: a[4][:abc] << 'abc' , if I then make a I get back {}, if I make a[4] again I get back {}, but if I make a[4][:abc] I get back my string, how come?
<canton7>
atrR_, look at Array#pack?
dangerousdave has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
dangerousdave has joined #ruby
<atrR_>
canton7: thank you I'm gonna try it
<canton7>
gnagno, use the form of Hash.new that takes a proc
emergion has joined #ruby
<gnagno>
canton7, I try it now
Zai00 has quit [Read error: Connection reset by peer]
brennanMKE has joined #ruby
<canton7>
gnagno, that form of Hash.new returns the *same* object each time the default value is needed, hence what you're seeing
<canton7>
the proc form can create a *new* object each time the default value is needed
joonty has quit [Read error: Connection reset by peer]
<gnagno>
canton7, am I not supposed to save something with this? a[4][:abc] << 'abc'
<canton7>
atrR_, e.g. [0x56CE].pack("V"). Not that that will create the ASCII character if it can, or the \x form if not
buibex has joined #ruby
<canton7>
gnagno, I'm still not getting your behaviour, even when creating the hash the same way as you
<gnagno>
canton7, try to do this: first declare the hash and put something in some position: a = Hash.new(Hash.new([])); a[4][:abc] << 'foo'; now you expect to have something inside right?
<canton7>
gnagno, there's some weird stuff to do with fact that your statement doesn't actually add a new item to the outermost hash, if you don't use the proc form of Hash.new
brennanMKE has quit [Ping timeout: 248 seconds]
obs has joined #ruby
ghr has quit [Ping timeout: 260 seconds]
<canton7>
whereas with the proc form of Hash.new, a new item is explicitely added to the outermost hash by the proc
pootler_ has joined #ruby
jbpros has quit [Quit: jbpros]
Peej has quit [Remote host closed the connection]
cha1tanya has quit [Ping timeout: 276 seconds]
ARCADIVS has quit [Quit: WeeChat 0.3.8]
daniel_- has joined #ruby
vlad_starkov has joined #ruby
brianpWins has quit [Quit: brianpWins]
niklasb has joined #ruby
<apeiros>
joshu: work :)
emergion has quit [Quit: Computer has gone to sleep.]
elaptics has joined #ruby
<joshu>
apeiros ;)
dfdf has quit [Remote host closed the connection]
<Quadlex>
Good Mornooning #ruby
ghr has joined #ruby
cha1tanya has joined #ruby
a_a_g has joined #ruby
<alem0lars>
Quadlex: Good morning
sleetdrop has quit [Ping timeout: 264 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
jbueza has quit [Quit: Leaving.]
haxrbyte has joined #ruby
sleetdrop has joined #ruby
cha1tanya has quit [Ping timeout: 248 seconds]
TIJ has joined #ruby
tesuki has quit [Remote host closed the connection]
tesuki has joined #ruby
schaerli has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
pitzips has joined #ruby
Nigel_ has joined #ruby
alem0lars has quit [Quit: Leaving]
Nigel_ is now known as G
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
haxrbyte has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
vlad_starkov has quit [Remote host closed the connection]
Iszak has joined #ruby
tk___ has joined #ruby
Al__ has quit [Quit: Al__]
dfdf has joined #ruby
eldariof has joined #ruby
stef_204 has quit [Remote host closed the connection]
tesuki has quit [Remote host closed the connection]
talntid2 has quit []
Inside has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
Sherwyn has quit [Remote host closed the connection]
zai has joined #ruby
randomnick has quit [Ping timeout: 276 seconds]
randomnick has joined #ruby
ybart has quit [Quit: ybart]
kofno has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
Nisstyre-laptop has quit [Quit: Leaving]
gstamp has quit [Quit: Computer has gone to sleep.]
gstamp has joined #ruby
kofno has joined #ruby
dfdf has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
Shrink has quit [Ping timeout: 246 seconds]
hogeo has quit [Remote host closed the connection]
shadoi has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
shadoi has joined #ruby
Taranis has quit [Read error: Connection reset by peer]
jerkbot1 has quit [Remote host closed the connection]
Taranis has joined #ruby
binaryplease has joined #ruby
Norrin has quit [Ping timeout: 240 seconds]
Apocalypse has quit [Ping timeout: 240 seconds]
camilasan has quit [Remote host closed the connection]
Amirh1 has joined #ruby
camilasan has joined #ruby
rgoodwin has quit [Ping timeout: 240 seconds]
arusso has quit [Ping timeout: 240 seconds]
nkr has joined #ruby
PhilK has quit [Ping timeout: 240 seconds]
Hien has quit [Ping timeout: 240 seconds]
ShapeShifter499 has quit [Ping timeout: 240 seconds]
Nanuq has quit [Ping timeout: 245 seconds]
DrForr has quit [Ping timeout: 245 seconds]
qun_ has quit [Ping timeout: 264 seconds]
statarb3 has quit [Quit: Leaving]
lkba has joined #ruby
daniel_- has quit [Ping timeout: 276 seconds]
Schuyler has quit [Ping timeout: 264 seconds]
nightfly has quit [Ping timeout: 264 seconds]
jpun_ has quit [Ping timeout: 264 seconds]
bmn_ has quit [Ping timeout: 264 seconds]
Sou|cutter has quit [Ping timeout: 264 seconds]
jpun has joined #ruby
Amirh1 is now known as Amirh
anekos has quit [Ping timeout: 264 seconds]
Nanuq has joined #ruby
arusso_znc has joined #ruby
rgoodwin has joined #ruby
Apocalypse has joined #ruby
nightfly has joined #ruby
camilasan has quit [Ping timeout: 248 seconds]
PhilK has joined #ruby
Amirh has quit [Client Quit]
Schuyler has joined #ruby
Sou|cutter has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
Amirh has joined #ruby
bmn has joined #ruby
Amirh has quit [Client Quit]
k611 has joined #ruby
anekos has joined #ruby
Norrin has joined #ruby
razi has joined #ruby
hexbit has quit [Quit: leaving]
kofno has quit [Remote host closed the connection]
filipe has quit [Read error: Operation timed out]
filipe has joined #ruby
kofno has joined #ruby
Hien has joined #ruby
k610 has quit [Ping timeout: 252 seconds]
hexbit has joined #ruby
sayan has joined #ruby
Amirh has joined #ruby
buibex has quit [Remote host closed the connection]
qun has joined #ruby
_Renegade has joined #ruby
Guga_ has joined #ruby
dfdf has joined #ruby
DrForr has joined #ruby
maroloccio has joined #ruby
daniel_- has joined #ruby
ShapeShifter499 has joined #ruby
vlad_starkov has joined #ruby
razi has quit [Quit: Leaving.]
anderson has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
vlad_starkov has quit [Remote host closed the connection]
anderson has joined #ruby
Shrink has joined #ruby
Shrink has joined #ruby
scrollback has joined #ruby
tesuki has joined #ruby
`p has quit [Remote host closed the connection]
nari has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
Amirh has quit [Quit: Leaving.]
tesuki has quit [Ping timeout: 255 seconds]
emergion has joined #ruby
cj3kim has quit [Remote host closed the connection]
allanm has joined #ruby
TIJ has quit [Quit: Konversation terminated!]
TIJ has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
matrixise has quit [Ping timeout: 245 seconds]
camilasan has joined #ruby
bradhe has joined #ruby
tylersmith has joined #ruby
matrixise has joined #ruby
codecop has joined #ruby
Shrink has quit [Ping timeout: 248 seconds]
bradhe has quit [Ping timeout: 248 seconds]
tylersmith has quit [Ping timeout: 260 seconds]
atno has quit [Ping timeout: 240 seconds]
cj3kim has joined #ruby
tesuki has joined #ruby
tesuki has quit [Remote host closed the connection]
timonv has joined #ruby
TMM has quit [Ping timeout: 260 seconds]
icole has quit [Remote host closed the connection]
jintux has joined #ruby
buibex has joined #ruby
TIJ has quit [Read error: Connection reset by peer]
TIJ has joined #ruby
jimeh has quit [Ping timeout: 260 seconds]
marr has joined #ruby
tvw has joined #ruby
a_a_g has quit [Quit: This computer has gone to sleep]
jimeh has joined #ruby
a_a_g has joined #ruby
Giorgio has joined #ruby
dfdf has quit [Remote host closed the connection]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
nari has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
tesuki has joined #ruby
Monotoko has joined #ruby
reset has quit [Quit: Leaving...]
buibex has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
dfdf has joined #ruby
_veer has quit [Read error: Connection reset by peer]
danslo has quit [Quit: danslo]
robustus has quit [Ping timeout: 248 seconds]
Brando753 has joined #ruby
<Brando753>
hey guys, so I want to convert some 100 or so images that my program generates into a single multipage pdf file, I figure I have to use RMagick but I am unsure on how to convert it so its a single pdf, any ideas?
sayan has quit [Ping timeout: 248 seconds]
xcv has quit [Remote host closed the connection]
robustus has joined #ruby
<joshu>
Brando753 what format are you images in
atno has joined #ruby
<canton7>
There is a pdf library around, I think? Another alternative is to output LaTeX, or reStructuredText, or some other markup language which can then be compiled to pdf by another tooll
<Lennier>
yes, hanmac, i agree but unfortunately an update is not an option :(
alup has quit [Ping timeout: 256 seconds]
<zomg>
but I've been doing development for like 14 years or something
Elico has quit [Ping timeout: 246 seconds]
<quazimodo>
another is specifications and constraints
<quazimodo>
i feel like just because you can do it, devs do all sorts of insane shit
<zomg>
It's usually the bad developers who do that because they don't know of anything better
<quazimodo>
and it's impossible to police
<zomg>
or why what they're doing is wrong
osvico has joined #ruby
<zomg>
it's possible to police but it requires a technical lead in the project to set up guidelines on how the development should be done
<quazimodo>
sure, but I've seen even big projects commit some hard core no nos
* Hanmac
wishes that every PC that uses Ruby1.8 after its date would explode :P
<zomg>
and things like code reviews
DrCode has joined #ruby
hollyw00d has joined #ruby
<zomg>
Often it's also a result of too tight deadlines
<zomg>
Sometimes you need to cut corners when the business types tell you it needs to be done yesterday :P
<quazimodo>
zomg: I totally understand, I've done contract work for clients
<zomg>
Yeah
<quazimodo>
you can't go out and learn mechanical engineering using bro science
<apeiros>
Hanmac: hehe, old, but nice
<quazimodo>
but you can totally go out and learn rails entirely on bro science
<quazimodo>
brotelligence?
Ortuna has joined #ruby
<Lennier>
guys, i'm stuck with this encoding problem for hours
<zomg>
The results of using bro science to build a bridge can be quite fatal unlike the results of building a facebook clone used by your mom and friends
<apeiros>
nagelligence :-p
<zomg>
=)
<Lennier>
does anyone have an idea that i can try out to force the file encoding to utf8?
<lupine>
ruby code file?
<quazimodo>
anyway, feels like dev houses should be making their devs use pen and paper, psuedocoding stuff on paper to work out whether it's even sane
<zomg>
Not gonna help much :D
<Quadlex>
Ther eis a sad confluence f the two concepts zomg
<zomg>
If it looks sane in code it'll look sane on paper too
<zomg>
to them anyway
<zomg>
=)
<quazimodo>
zomg: maybe :0
<Quadlex>
In Australia, any Engineering degree is chartered, meaning it needs to be certified
<Quadlex>
And it's technically illegal to call yourself an engineer without an Engineering degree
<zomg>
I think the only thing that helps is education and bringing in someone more experienced to help sort out the issues
<Hanmac>
Lennier: did you try at #rubyonrails ?
<Quadlex>
But the coursework for the degrees isn't suitable for real-world development >.>
<Quadlex>
It's kind of... nerd broscience
<zomg>
and actually giving a schedule that includes being able to do it properly
<quazimodo>
Quadlex: :D
<Lennier>
hanmac, ok i will ask there, thanks
<quazimodo>
Quadlex: the biomed course work was pretty good
buibex has joined #ruby
<apeiros>
quazimodo: that's why we use ruby
<Quadlex>
All about "Quality" and various means of pretending it's going to be done by writing a lot of docs
<quazimodo>
apeiros: well I've found that i'm writing better code by moving away from the language (I like lisp and ruby among other things), putting it on paper as ideas and architecture, then working out how it makes sense to tie together
blaxter_ has quit [Ping timeout: 248 seconds]
malkomalko has joined #ruby
<zomg>
Usually those methods largely depend on the individual
<apeiros>
I use the autoarchitect brainplugin to create the architecture on the fly
<zomg>
I find writing code in a test-first fashion leads to better quality results as well
k612 has joined #ruby
<zomg>
So before you write any code you write a unit test
<quazimodo>
zomg: thats what I do after my architecture on paper
<Quadlex>
quazimodo: Biomed? At an Aussie uni?
<zomg>
Some people find that approach difficult as well as they find it hard to reason about the code by writing a test first
dmerrick has quit [Read error: Connection reset by peer]
<quazimodo>
Quadlex: yep, my biomed friends were fairly satisfied
<Quadlex>
Ah, you're not an Aussie?
<quazimodo>
I did biomed too, though yet to do that for a job
* Quadlex
is wondering if you went to the same uni
<quazimodo>
no i was at UNSW
JStoker_ has joined #ruby
dmerrick has joined #ruby
<quazimodo>
it was great
<quazimodo>
my mechanical eng friends were less satisfied by what they learnt than my biomed moatse
JStoker has quit [Read error: Connection reset by peer]
JStoker_ is now known as JStoker
k611 has quit [Ping timeout: 256 seconds]
<quazimodo>
Quadlex: :)
krnflake has joined #ruby
henn1nk has joined #ruby
ferdev has quit [Quit: ferdev]
jprovazn has joined #ruby
eka has joined #ruby
rockets has joined #ruby
jbpros has joined #ruby
bradhe has joined #ruby
tylersmith has joined #ruby
buibex has quit [Ping timeout: 240 seconds]
<quazimodo>
zomg: another one is creating DSL's informally... no no no no no no!!! NONONO
_Renegade has joined #ruby
geekbri has joined #ruby
<quazimodo>
simple_form's DSL fucked my life for awhile
<zomg>
lol :P
dfdf has quit [Remote host closed the connection]
atno has joined #ruby
snearch has quit [Quit: Verlassend]
<zomg>
I think part of the problem is that there's a lot of devs with no formal education in compsci
zastern has quit [Ping timeout: 248 seconds]
<zomg>
I have none either, but I have studied compsci books etc.
snearch has joined #ruby
dr_neek has joined #ruby
<quazimodo>
zomg: thing is, ruby is amazing, it makes ideas easy to do so I'm not sure why simple_form worked that way, I know and understand Ruby, which ROCKS for lots of problem domains, including the one simple_form solves... Why must I learn a new informal language/way of doing things
haxrbyte has joined #ruby
rfizzle has joined #ruby
<quazimodo>
zomg: lisp massively suffers from this too, might I add
<zomg>
I can imagine
xcv has joined #ruby
<zomg>
Haven't used Lisp languages much but I did do some stuff with Clojure so I'm somewhat familiar
r0bgleeson has joined #ruby
<zomg>
I can sort of understand DSL's if it makes something easier to do
gstamp has quit [Quit: Computer has gone to sleep.]
<pontiki>
joshu: i prefer the first form (using uri) when i don't necessarily have confidence in the url that the app would be connecting to. OTOH, option 2 (direct values) I use when the connection info is unchanging.
Sccoots has joined #ruby
<zomg>
quazimodo: I have seen it but I was scared and didn't touch it.
<zomg>
lol
ToApolytoXaos has joined #ruby
<joshu>
pontiki ok in this case I'm creating the service this the client is connecting to as well, so I'll use option 2 following your advice
<quazimodo>
zomg: see I consider myself to have a fair amount of technical intelligence and know how - if I don't understand something, usually it's a problem with communication. That being said... I don't fucking get agda
Spami has joined #ruby
buibex has joined #ruby
<quazimodo>
and the documentation out there... it's written for people who already get agda XD
delay has joined #ruby
devoldmx has quit [Ping timeout: 248 seconds]
thebastl_ has joined #ruby
xcv has quit [Remote host closed the connection]
DaniG2k has quit [Quit: Leaving.]
pinage404 is now known as zz_pinage404
xcv has joined #ruby
jimg has joined #ruby
schaerli has quit [Remote host closed the connection]
pskosinski has joined #ruby
nezumi has quit [Ping timeout: 260 seconds]
ericmathison has quit [Quit: leaving]
ewag has joined #ruby
icole has joined #ruby
thebastl has quit [Ping timeout: 276 seconds]
Giorgio has quit [Read error: Connection timed out]
razi has joined #ruby
dr_neek has quit [Quit: dr_neek]
icole has quit [Ping timeout: 246 seconds]
jimg has quit [Ping timeout: 246 seconds]
browndawg has quit [Ping timeout: 246 seconds]
cofin has joined #ruby
ntus1017 has joined #ruby
mikecmpbll has joined #ruby
thebastl_ has quit [Remote host closed the connection]
slainer6_ has joined #ruby
thebastl has joined #ruby
Hanmac has quit [Read error: Operation timed out]
danslo has quit [Quit: danslo]
dawkirst has joined #ruby
dfdf has joined #ruby
slainer68 has quit [Ping timeout: 264 seconds]
theRoUS has joined #ruby
thebastl has quit [Remote host closed the connection]
scrollback has quit [Remote host closed the connection]
browndawg has joined #ruby
cads has quit [Read error: Operation timed out]
a_a_g has joined #ruby
scrollback has joined #ruby
Spami has quit [Ping timeout: 248 seconds]
Trynemjoel has joined #ruby
arya_ has quit []
kil0byte has quit [Remote host closed the connection]
malkomalko has quit []
_Renegade has quit [Quit: _Renegade]
Giorgio has joined #ruby
rafaelcaricio has quit [Remote host closed the connection]
daniel_- has quit [Ping timeout: 276 seconds]
pootler_ has quit [Quit: leaving]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
shadoi has quit [Read error: Connection reset by peer]
subbyyy has joined #ruby
dfdf has quit [Remote host closed the connection]
shadoi has joined #ruby
pootler_ has joined #ruby
brbcoding has joined #ruby
mljsimone|away is now known as mljsimone
<dawkirst>
Hi, really silly question (I'm busy learning): I work a lot with ENV variables, and I find myself spending a lot of time to set up my ENV variables every time I restart my machine. Is there a conventional way to set them up using some sort of config file?
Hanmac has joined #ruby
<noname001>
hi
<noname001>
I am having a problem with some of the part of my script
<noname001>
Unable to load driver 'OBDC'
<noname001>
this is a mesg I am getting
danslo has joined #ruby
<noname001>
I have require rubygems and require dbi
<noname001>
included into my script
<noname001>
any ideas
<noname001>
gem install dbi
<noname001>
gem install dbi-odbc
yalue has joined #ruby
<noname001>
done
<noname001>
any suggestions
<noname001>
?
kreantos has joined #ruby
arya has joined #ruby
<joshu>
dawkirst you can use dotenv gem
<joshu>
you put your ENV variables in a .env file
vlad_starkov has joined #ruby
<dawkirst>
joshu, thanks, will check that out, sounds exactly like what I need
<joshu>
alternatively you can use a config yaml file
<joshu>
dawkirst you would add this to load the file CONFIG = YAML.load(IO.read('./config/config.yml'))
vlad_starkov has quit [Remote host closed the connection]
scrollback has quit [Remote host closed the connection]
<joshu>
and within config.yml specify each variable such as :some_variable value
<joshu>
then when you need some_variable you can do CONFIG[:some_variable]
scrollback has joined #ruby
cofin has quit [Quit: cofin]
jimg has joined #ruby
<dawkirst>
joshu, thanks, makes a lot of sense (building a CONFIG hash), I'll check out the dotenv gem as well (to keep simple I might go with the yaml file approach)
sailias has quit [Ping timeout: 248 seconds]
<joshu>
dawkirst have fun ;)
<dawkirst>
joshu ty :)
PaulePanter has joined #ruby
puppeh has left #ruby ["bb"]
<dawkirst>
joshu, just out of curiosity though, what approach is more common?
<pontiki>
dawkirst: yaml, by far, i think
<pontiki>
it's just so bloody *easy*
persand has quit [Quit: persand]
<joshu>
dawkirst yeah I think so too…I started using dotenv because heroku uses a .env with foreman, but I've also recently been using a CONFIG yaml file.
wesside has joined #ruby
tsunamie has joined #ruby
<pontiki>
rails is just full of yaml
jimg has quit [Ping timeout: 252 seconds]
tsunamie has left #ruby ["Leaving"]
<dawkirst>
joshu, pontiki, thanks
jbpros has quit [Quit: jbpros]
persand has joined #ruby
schaerli has joined #ruby
fuzzyhorns has joined #ruby
jbueza has joined #ruby
kobain has joined #ruby
pipework has quit [Remote host closed the connection]
jlast has joined #ruby
malkomalko has joined #ruby
cads has joined #ruby
<dawkirst>
joshu, I see that dotenv supports different environments (dev, test, production), so that makes it easy (easier than yaml...?), right? That means I simply drop my production and development and production variables in the right files respectively and there I go. What would happen to the variables already set though the Heroku toolbelt?
Lennier has left #ruby [#ruby]
Lennier has joined #ruby
v0n has joined #ruby
Giorgio has quit [Ping timeout: 256 seconds]
<joshu>
dawkirst I'm not sure but I believe that with heroku specifically although you use a .env locally, when you deploy to heroku you don't want to put your .env in the git rpo
bradhe has joined #ruby
<joshu>
repo
breakingthings has joined #ruby
<dawkirst>
joshu, ok, that would make more sense for me as well. Thanks :)
Giorgio has joined #ruby
<joshu>
instead you specify the variables in your .env file using heroku's tool belt, e.g. heroku config:set MY_VAR=something
<joshu>
BUT
Lubinski has joined #ruby
Ortuna has quit [Quit: Computer has gone to sleep.]
<joshu>
I have come across a tool which will read the .env file so you don't have to set each variable manually using the toolbelt
<dawkirst>
joshu, thanks. Also, when I do use dotenv, I'll have to build in a exists? check, otherwise it'll try to require on Heroku, even though the .env file won't be in that repo.
apod has joined #ruby
baordog has joined #ruby
<joshu>
dawkirst yes I think so not sure if dotenv uses env variables set with tool belt if .env file doesn't exist. You could test
bradhe has quit [Ping timeout: 252 seconds]
splittingred has joined #ruby
<dawkirst>
joshu, ok
subbyyy has quit [Ping timeout: 240 seconds]
al3xnull has joined #ruby
Lubinski has quit [Quit: Leaving]
Mattix has quit [Ping timeout: 246 seconds]
tylersmith has quit [Ping timeout: 252 seconds]
Sccoots has quit []
<al3xnull>
Recently, I've been getting errors with downloading gems from rubygems. The certificate verification is probably picking up the firewall certificate and throwing a fit (we face it often) due to SSL being MITM'ed here.
<al3xnull>
Is there a way to trust a certificate in a way the rubygems will be happy with it?
razi has quit [Quit: Leaving.]
tvw has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
browndawg has quit [Quit: Leaving.]
daniel_- has quit [Ping timeout: 276 seconds]
moshee has quit [Ping timeout: 246 seconds]
wesside has quit [Quit: Computer has gone to sleep.]
persand has quit [Quit: persand]
Lubinski has joined #ruby
jamesaxl_ has joined #ruby
bionhart has joined #ruby
philcrissman_ has joined #ruby
jamesaxl has quit [Ping timeout: 276 seconds]
tesuki has quit [Remote host closed the connection]
Mattix has joined #ruby
freeayu has quit [Remote host closed the connection]
gstamp has joined #ruby
ArchBeOS has joined #ruby
ArchBeOS has joined #ruby
moshee has joined #ruby
tesuki has joined #ruby
interactionjaxsn has joined #ruby
binaryplease has quit [Read error: Connection reset by peer]
girija has quit [Ping timeout: 246 seconds]
jbpros has quit [Quit: jbpros]
DaniG2k has joined #ruby
ybart has quit [Quit: ybart]
wmoxam has joined #ruby
tesuki has quit [Remote host closed the connection]
<lupine>
well, the only restriction is that the first letter is a capital
<lupine>
but CamelCase is the norm
dmiller has joined #ruby
ttt has quit [Remote host closed the connection]
<canton7>
Lennier, I don't have any ideas, but you don't say where the problem is. The sequence is @cover_page.registry -> xml string -> stream. At which point does it get converted to ANSI?
johnmilton has joined #ruby
jprovazn has quit [Ping timeout: 248 seconds]
mantas322 has joined #ruby
spider-mario has joined #ruby
<joshu>
lupine ;)
chorkpop has quit [Read error: Connection reset by peer]
<brbcoding>
Sorry for noob question, but, what's the easiest way to get up and running with a rails or sinatra application? Is heroku my best bet? I'm stuck on Winblows, unfortunately... (Sorry if this is the wrong room for this question)
<wuest>
brbcoding: probably better to ask a rails-focused channel, indeed.
dmiller has quit [Ping timeout: 256 seconds]
generalissimo has quit [Remote host closed the connection]
<brbcoding>
kk, will look around... Thanks
Trynemjoel has quit [Ping timeout: 245 seconds]
akells` has joined #ruby
failshell has joined #ruby
BizarreCake has joined #ruby
<Lennier>
canton7: by generating the xml file the string gets converted
MarioEIU has joined #ruby
freerobby has joined #ruby
<Lennier>
in the variable the special characters are correct
<canton7>
Lennier, ok, so it has nothing to do with the stream?
<canton7>
just in the serialisation
arya_ has joined #ruby
<Lennier>
oh, wait
<Lennier>
i have to check
enebo has joined #ruby
adac has quit [Quit: Leaving]
AndChat| has joined #ruby
bakingbread has quit [Ping timeout: 240 seconds]
arya has quit [Ping timeout: 248 seconds]
Banistergalaxy has quit [Ping timeout: 252 seconds]
maxmanders has joined #ruby
<Lennier>
canton7: oh, i was wrong: at the point "xml string" send_data(stream, …) the special characters are converted
franzliedke has joined #ruby
maxmanders has quit [Client Quit]
<Lennier>
within send_data the variable stream has converted characters inside
<franzliedke>
hello. is there a way to execute a class method automatically every time a subclass of my class is defined?
Fire-Dragon-DoL has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
ntus1017 has joined #ruby
buibex has quit [Remote host closed the connection]
Cyrus has quit [Quit: Cyrus.sleep()]
devoldmx3 has quit [Ping timeout: 276 seconds]
ntus1017 has quit [Remote host closed the connection]
axl_ has joined #ruby
dr_bob has joined #ruby
justsee has quit [Ping timeout: 252 seconds]
<joshu>
when you use a module to namespace and you want to call a method within that module do you do MyModule::my_method or MyModule.my_method e.g. dot or double colon?
MrZYX|off is now known as MrZYX
mansi has joined #ruby
freerobby has joined #ruby
Spami has joined #ruby
Spami has joined #ruby
nowthatsamatt has joined #ruby
<ghr>
joshu dot
zeade has quit [Quit: Leaving.]
<joshu>
thank ghr
kevinfagan has quit [Excess Flood]
generalissimo has joined #ruby
kevinfagan has joined #ruby
kevinfagan has quit [Max SendQ exceeded]
kevinfagan has joined #ruby
kevinfagan has quit [Max SendQ exceeded]
devoldmx has joined #ruby
kevinfagan has joined #ruby
breakingthings has quit [Ping timeout: 248 seconds]
kevinfagan has quit [Max SendQ exceeded]
sleetdrop has joined #ruby
sleetdrop has quit [Max SendQ exceeded]
kevinfagan has joined #ruby
kevinfagan has quit [Max SendQ exceeded]
kevinfagan has joined #ruby
ananthakumaran has joined #ruby
sleetdrop has joined #ruby
sleetdrop has quit [Max SendQ exceeded]
kevinfagan has quit [Max SendQ exceeded]
xcv has quit [Ping timeout: 276 seconds]
kevinfagan has joined #ruby
kevinfagan has quit [Max SendQ exceeded]
kevinfagan has joined #ruby
gnagno has quit [Ping timeout: 248 seconds]
rhys has joined #ruby
<Hanmac>
joshu: but i also use :: in some cases
<Hanmac>
like Nokogiri::XML()
<joshu>
Hanmac how do you know when to use which? are they always interchangeable?
_maes_ has joined #ruby
browndawg has joined #ruby
devoldmx3 has joined #ruby
mark_locklear has joined #ruby
mafolz has quit [Read error: Connection reset by peer]
xcv has joined #ruby
<Hanmac>
it depends ...
<Hanmac>
Nokogiri::XML is a constant, Nokogiri::XML() is a method, Nokogiri::xml is a method, Nokogiri::xml() is a method
<Hanmac>
Nokogiri.XML is a method, Nokogiri.XML() is a method, Nokogiri.xml is a method, Nokogiri.xml() is a method
cads has quit [Ping timeout: 276 seconds]
RORgasm_ has joined #ruby
zmike123 has joined #ruby
RORgasm has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 252 seconds]
bionhart has quit [Remote host closed the connection]
Appineer has joined #ruby
<joshu>
Hanmac ok I tried using dot and I got this error "undefined method `NetHttpTimeoutError' for NetHttpTimeoutErrorGem:Module (NoMethodError)
<joshu>
from lib/tropo/test.rb:52:in `<main>'"
<joshu>
but with :: it works
tk___ has quit [Quit: ばいばい]
<joshu>
so I guess it's your first case a constant
devoldmx3 has quit [Read error: Connection reset by peer]
whowantstolivefo has quit [Quit: who wants to live forever ?]
sleetdrop has joined #ruby
buibex has joined #ruby
<Hanmac>
joshu: its a constant
bionhart has joined #ruby
ttt has joined #ruby
<joshu>
Hanmac another question about modules.
gnagno has joined #ruby
denver has joined #ruby
bionhart has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
<joshu>
I read on RubyMonk just now that modules only hold behaviour and not state like classes. Does state refer to having instance variables within the class' methods?
tommyvyo has joined #ruby
Spami has quit [Quit: Leaving]
scrollback has quit [Remote host closed the connection]
persand has joined #ruby
<Hanmac>
hmmm i dont know about that
sambao21 has quit [Quit: Computer has gone to sleep.]
alex__c2022 has joined #ruby
filipe has quit [Ping timeout: 246 seconds]
ttt has quit [Ping timeout: 256 seconds]
tspike has joined #ruby
persand has quit [Client Quit]
kenneth has joined #ruby
kenneth has quit [Client Quit]
Guest7959 has joined #ruby
TMM has quit [Remote host closed the connection]
sambao21 has joined #ruby
TMM has joined #ruby
TMM has quit [Changing host]
TMM has joined #ruby
cofin has joined #ruby
akemrir has quit [Quit: WeeChat 0.4.1]
DomKM has quit [Quit: Leaving.]
<joshu>
ok
Guest7959 is now known as _kenneth
acrussell has joined #ruby
acrussell has left #ruby [#ruby]
vlad_starkov has joined #ruby
vigintas has joined #ruby
BadDesign has joined #ruby
aknewhope has joined #ruby
aknewhope has joined #ruby
aknewhope has quit [Changing host]
generalissimo has quit [Remote host closed the connection]
vigintas has quit [Client Quit]
vigintas has joined #ruby
hogeo has joined #ruby
mfollett has joined #ruby
tylersmith has joined #ruby
w400z has joined #ruby
vigintas has quit [Client Quit]
vigintas has joined #ruby
vlad_starkov has quit [Ping timeout: 255 seconds]
mafolz has joined #ruby
i_s has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
xcv has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 252 seconds]
redgirl has joined #ruby
vlad_starkov has joined #ruby
havenwood has joined #ruby
TIJ has quit [Quit: Konversation terminated!]
maroloccio2 has joined #ruby
timkohrumel has joined #ruby
dhruvasagar has joined #ruby
axl_ has joined #ruby
dr_bob has quit [Quit: Leaving.]
maroloccio has quit [Ping timeout: 260 seconds]
demet8 has quit [Quit: demet8]
scrollback has joined #ruby
wallerdev has joined #ruby
pootler_ has quit [Quit: Lost terminal]
malkomalko has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
sam_5748 has joined #ruby
devoldmx3 has joined #ruby
dr_bob has joined #ruby
gnagno has quit [Ping timeout: 248 seconds]
sleetdrop has quit [Quit: Computer has gone to sleep.]
saarinen has joined #ruby
buibex has quit [Remote host closed the connection]
RORgasm_ has quit [Read error: Connection reset by peer]
pootler_ has joined #ruby
pootler__ has joined #ruby
i_s has quit [Quit: i_s]
RORgasm has joined #ruby
pootler__ has quit [Client Quit]
pootler_ has quit [Client Quit]
vigintas has quit [Remote host closed the connection]
pootler_ has joined #ruby
pootler__ has joined #ruby
wargasm has joined #ruby
stkowski has joined #ruby
devoldmx has quit [Ping timeout: 276 seconds]
ctp has quit [Ping timeout: 248 seconds]
astegman has joined #ruby
Lennier has quit [Quit: Lennier]
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
tylersmith has joined #ruby
bean__ has joined #ruby
ckrailo has joined #ruby
jimg has joined #ruby
generalissimo has joined #ruby
amh345 has joined #ruby
bal has quit [Quit: Leaving]
maroloccio3 has joined #ruby
maroloccio2 has quit [Ping timeout: 264 seconds]
cofin has quit [Quit: cofin]
citizensinspace has joined #ruby
vlad_sta_ has joined #ruby
xcv has joined #ruby
jimg has quit [Ping timeout: 260 seconds]
carloslopes has quit [Remote host closed the connection]
zacts has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
baroquebobcat has joined #ruby
cofin has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
browndawg has quit [Ping timeout: 252 seconds]
ArchBeOS has quit [Ping timeout: 248 seconds]
d2dchat has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
ArchBeOS has joined #ruby
<blz37>
I have ruby 1.9.3 but will there be any problem if I only have rubygems 1.8.
bigoldrock has joined #ruby
arturaz has quit [Ping timeout: 264 seconds]
demet8 has joined #ruby
nari has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
BizarreCake has quit [Read error: Connection reset by peer]
DonRichie has joined #ruby
browndawg has joined #ruby
bigoldrock has quit [Ping timeout: 276 seconds]
maroloccio3 has quit [Ping timeout: 276 seconds]
DomKM has joined #ruby
kleinerdrache has joined #ruby
ffio has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
DonRichie has quit [Quit: Verlassend]
wolcanus has quit [Remote host closed the connection]
xardas has joined #ruby
io_syl has joined #ruby
cburyta has joined #ruby
maroloccio has joined #ruby
gildo has quit [Remote host closed the connection]
DonRichie has joined #ruby
mrdtt has joined #ruby
dmiller has joined #ruby
viszu has joined #ruby
zai has quit [Read error: Connection reset by peer]
pothibo has quit [Quit: pothibo]
sambao21 has joined #ruby
xardas has quit [Changing host]
xardas has joined #ruby
saarinen has quit [Quit: saarinen]
carloslopes has joined #ruby
bionhart has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
Solnse has joined #ruby
denken has quit [Ping timeout: 252 seconds]
lyanchih has quit [Quit: lyanchih]
dmiller has quit [Ping timeout: 252 seconds]
ffio has quit [Read error: Connection timed out]
Davey has joined #ruby
sam_5748 has quit [Quit: Leaving]
x1337807x has joined #ruby
DaniG2k has left #ruby [#ruby]
geggam has joined #ruby
DaniG2k has joined #ruby
bradhe has joined #ruby
apod has quit [Quit: apod]
x1337807x has quit [Client Quit]
ffio has joined #ruby
aknewhope has quit [Quit: Leaving]
<havenwood>
blz37: You might want to: gem update --system
dhruvasagar has joined #ruby
Giorgio has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
JumpMast3r has joined #ruby
malkomalko has joined #ruby
drfreeze has joined #ruby
arya_ has joined #ruby
daniel-s has quit [Disconnected by services]
x1337807x has joined #ruby
daniel-s has joined #ruby
blitz has joined #ruby
deception has quit [Remote host closed the connection]
zeade has joined #ruby
arya has quit [Ping timeout: 264 seconds]
deception has joined #ruby
samuel02 has quit [Remote host closed the connection]
mrdtt has left #ruby ["Leaving"]
axsuul has joined #ruby
x1337807x has quit [Client Quit]
drfreeze_ has quit [Ping timeout: 256 seconds]
ArchBeOS has quit [Ping timeout: 240 seconds]
Criztian has quit [Remote host closed the connection]
w400z has quit []
vlad_sta_ has quit [Remote host closed the connection]
jnix has quit [Ping timeout: 248 seconds]
hogeo has quit [Remote host closed the connection]
brunoro has joined #ruby
<nyuszika7h>
how can I do something like this? my_numbers.filter(:even?)
vigintas has joined #ruby
<Hanmac>
numbers.select(&:even?)
dcunit3d has joined #ruby
ivanoats has joined #ruby
<nyuszika7h>
thanks
x1337807x has joined #ruby
ntus1017 has joined #ruby
timonv has quit [Remote host closed the connection]
dagobah has quit [Remote host closed the connection]
demet8 has quit [Client Quit]
Maoko has joined #ruby
jdunck has joined #ruby
johnrliv_ has joined #ruby
johnrlive has quit [Read error: Operation timed out]
anonymuse has quit [Read error: Operation timed out]
jrajav has joined #ruby
freerobby has joined #ruby
mrdtt has quit [Quit: Leaving]
axsuul has joined #ruby
denken has joined #ruby
jamesaxl has quit [Read error: Operation timed out]
mljsimone is now known as mljsimone|away
delay has joined #ruby
jdunck_ has joined #ruby
ner0x has joined #ruby
ffranz has joined #ruby
jimg has joined #ruby
jdunck has quit [Ping timeout: 264 seconds]
dmiller has joined #ruby
jdunck has joined #ruby
axsuul has quit [Quit: axsuul]
freerobby has quit [Ping timeout: 264 seconds]
cj3kim has joined #ruby
<joshu>
semantic question. Should I do this ENV["HEROKU_URL"] = "http://xxxxxx.herokuapp.com" or this HEROKU_URL = "http://xxxxxx.herokuapp.com" ? And these variable assignments will be at the top of my single source file ;)
slainer6_ has quit [Remote host closed the connection]
Solnse has quit [Ping timeout: 248 seconds]
<MrZYX>
variable = they change during runtime?
jimg has quit [Ping timeout: 276 seconds]
jdunck_ has quit [Ping timeout: 264 seconds]
<joshu>
sorry MrZYX wrong formulation from me
<joshu>
no they are constant throughout the script
vigintas has quit [Remote host closed the connection]
<MrZYX>
then definitely the later
Peej has joined #ruby
amedeiros has quit [Quit: leaving]
tacos1de has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby
tvw has quit []
Solnse has joined #ruby
<joshu>
ok and apeiros showed me once in a previous project which I think you saw using a "class << self alias tap config" would you suggest that as well or just the latter option above?
miskander has quit [Quit: miskander]
c0rn has joined #ruby
amedeiros has joined #ruby
<MrZYX>
depends on the amount of configuration you have I guess
iamjarvo has joined #ruby
mljsimone|away is now known as mljsimone
ctp has joined #ruby
ntus1017 has quit [Remote host closed the connection]
<MrZYX>
if your script only ever runs on heroku I'd also consider just using environment varibales and heroku config
<lectrick>
Is there a way to run Javascript with native Ruby code? (gem etc.)
timonv has quit [Remote host closed the connection]
<fryguy>
lectrick: does ExecJS accomplish what you want?
miskander has joined #ruby
<joshu>
MrZYX this script is not deployed to Heroku but Tropo so everything I do has to be self contained in a single source file ;)
<ghatak>
I have a strange problem with a gem, while trying to install using gem install, it adds a dependency for json 1.6.1 when json.1.8.0 is installed on the system.
mklappstuhl has quit [Remote host closed the connection]
<ghatak>
what/how dependency is calculated ?
nomenkun has quit [Ping timeout: 260 seconds]
pootler_ has quit [Ping timeout: 252 seconds]
pootler__ has quit [Ping timeout: 246 seconds]
<fryguy>
ghatak: gems can specify specific versions or ranges that they require for gems
interactionjaxsn has quit [Remote host closed the connection]
gnagno has joined #ruby
mklappstuhl has joined #ruby
saarinen has joined #ruby
apeiros has joined #ruby
<ghatak>
fryguy: thanks, where is it specified? and how do I modify it ?
interactionjaxsn has joined #ruby
<fryguy>
ghatak: in the gemspec usually
<lectrick>
fryguy: maybe. was hoping for something "purer" i guess :)
<ghatak>
fryguy: makes sense, however I have been unable to find that file. I tried to unpack the gem file using gem unpack. and look for version string in the directory, but I can't find anything
<MrZYX>
if you completely wrap a method into a begin just omit it
iamjarvo has quit [Read error: Connection reset by peer]
Monotoko has quit [Read error: Connection reset by peer]
iamjarvo_ is now known as iamjarvo
<joshu>
this just does POSTing, but I basically need the same thing for GET requests as well. Instead of making two separate methods, one POST and one GET, what about adding an extra argument "request_type" and having an if statement or case statement within to trigger request.body for POST?
Guest17413 has joined #ruby
athst has joined #ruby
<joshu>
MrZYX omit begin but keep rescue? I recall something about an implicit begin correct?
<MrZYX>
yup
persand has joined #ruby
cj3kim has quit [Remote host closed the connection]
<joshu>
MrZYX fixed. how's it looking otherwise? I have tried to make it as "robust" as possible.
<MrZYX>
tbh. I'm pretty inexperienced with Net::HTTP, I just use a wrapper :P
ferdev has quit [Quit: ferdev]
rsahae_ has joined #ruby
citizensinspace has joined #ruby
<joshu>
MrZYX no problem I can't do that for this. What about my suggestion to add an argument to specify the request type to avoid duplicating the method?
tylersmith has joined #ruby
<byprdct>
Morning everyone
<MrZYX>
not sure, I'd first write the get version next to it and look how big the overlap really is
timmow has quit [Ping timeout: 240 seconds]
<MrZYX>
It's already fairly complex
dcunit3d_ has quit [Read error: Connection reset by peer]
tylersmith has quit [Remote host closed the connection]
bean__ has quit [Read error: Connection reset by peer]
Es0teric has joined #ruby
<joshu>
MrZYX ok I'll do that. If anyone around gets their boat rocked by Net:HTTP please eh raise your hands ;) I'd welcome any improvements as my boat is not rocking :P
bklane has quit [Remote host closed the connection]
cj3kim has joined #ruby
jinie_ is now known as jinie
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
Es0teric has quit [Remote host closed the connection]
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
tylersmith has joined #ruby
bean__ has joined #ruby
Apane has joined #ruby
arya_ has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
gyre007 has quit [Remote host closed the connection]
m8 has joined #ruby
iamjarvo has quit [Quit: iamjarvo]
Asher has joined #ruby
saarinen has quit [Quit: saarinen]
miskander has quit [Quit: miskander]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
chattmatt has quit [Quit: chattmatt]
chattmatt has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
mljsimone is now known as mljsimone|away
saarinen has joined #ruby
DanKnox_away is now known as DanKnox
obs has quit [Quit: Konversation terminated!]
tommyvyo has joined #ruby
mark_locklear has quit [Ping timeout: 248 seconds]
arya has joined #ruby
Giorgio has quit [Ping timeout: 264 seconds]
halfie has quit [Read error: Operation timed out]
andrewh_ has quit [Read error: Operation timed out]
jwest has quit [Read error: Operation timed out]
freerobby has joined #ruby
johnrliv_ has quit [Remote host closed the connection]
WanderingGlitch has quit [Read error: Operation timed out]
andrewh has joined #ruby
WanderingGlitch has joined #ruby
ner0x has quit [Quit: Leaving]
Al__ has quit [Quit: Al__]
jwest has joined #ruby
halfie has joined #ruby
johnrlive has joined #ruby
virtuose has quit [Read error: Operation timed out]
monomyth has quit [Read error: Operation timed out]
breadtk_ has quit [Read error: Operation timed out]
chattmatt has quit [Client Quit]
monomyth has joined #ruby
breadtk has joined #ruby
virtuose has joined #ruby
KarlHungus has quit [Read error: Operation timed out]
KarlHungus has joined #ruby
KarlHungus has quit [Changing host]
KarlHungus has joined #ruby
pootler_ has joined #ruby
Solnse has quit [Ping timeout: 248 seconds]
Guest17413 has quit [Changing host]
Guest17413 has joined #ruby
dcunit3d has joined #ruby
jcromartie has joined #ruby
ianbrandt has joined #ruby
Solnse has joined #ruby
atno__ has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
jbueza has left #ruby [#ruby]
mljsimone|away is now known as mljsimone
sambao21 has joined #ruby
icole has joined #ruby
atno has quit [Ping timeout: 246 seconds]
bubblehe_ has joined #ruby
Pochacco has joined #ruby
bigoldrock has quit [Read error: Connection reset by peer]
blaxter_ has quit [Ping timeout: 248 seconds]
bigoldrock has joined #ruby
Pochacco has quit [Client Quit]
Pochacco has joined #ruby
bubblehead has quit [Read error: Connection reset by peer]
<joshu>
Am I correct in that using a hash like this request = { :path => "/path", :body => "something } is faster than assigning two variables path = …. and body = hdhdhd
atno__ is now known as atno
pootler__ has joined #ruby
slash_nick has quit [Ping timeout: 260 seconds]
<MrZYX>
faster as in execution speed?
brunoro has quit [Ping timeout: 276 seconds]
<joshu>
MrZYX yes I guess
<MrZYX>
I doubt that
<MrZYX>
you need to allocate a new object
<MrZYX>
with the hash
<MrZYX>
well, three new objects in the worst case
<joshu>
Oh ok I thought I saw that somewhere…must be dreaming…so assigning each variable individually is preferred? I thought I was being smart
slash_nick has joined #ruby
Pochacco has quit [Client Quit]
slash_nick has quit [Changing host]
slash_nick has joined #ruby
<MrZYX>
don't take it as a performance measure
Pochacco has joined #ruby
<MrZYX>
if you have a method that really needs a ton of arguments and you can't change that fact it can be a better alternative to pass a hash
kayloos has joined #ruby
<MrZYX>
but that's more readability
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<joshu>
ok so few arguments better to stick with no hash?
<MrZYX>
IMO yes
brianpWins has joined #ruby
kirun has joined #ruby
justsee has quit [Ping timeout: 255 seconds]
mfollett has quit [Remote host closed the connection]
brennanMKE has quit [Read error: Connection reset by peer]
rdark has quit [Quit: leaving]
jrajav has joined #ruby
mocfive has joined #ruby
chrishough has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
falk_ has joined #ruby
pitzips has quit [Ping timeout: 255 seconds]
hollyw00d has quit [Quit: hollyw00d]
denver has quit [Remote host closed the connection]
WanderingGlitch has quit [Changing host]
WanderingGlitch has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
mfollett has quit [Ping timeout: 255 seconds]
thesheff17 has quit [Ping timeout: 260 seconds]
cofin has joined #ruby
freerobby has joined #ruby
reset has joined #ruby
khismetix has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
jlast_ has joined #ruby
bionhart has joined #ruby
whowantstolivefo has joined #ruby
jastix has quit [Quit: Leaving]
nomenkun has joined #ruby
beilabs has quit [Ping timeout: 255 seconds]
dougireton has quit [Ping timeout: 264 seconds]
mfollett has joined #ruby
browndawg has joined #ruby
xardas has quit [Changing host]
xardas has joined #ruby
lushious has joined #ruby
ffranz1 is now known as ffranz
deception has quit [Quit: Goodbye]
Hanmac has joined #ruby
alvaro_o has joined #ruby
staafl_alt has quit [Ping timeout: 240 seconds]
schaerli has joined #ruby
cnrk has joined #ruby
devoldmx has joined #ruby
devoldmx3 has quit [Read error: No route to host]
devoldmx3 has joined #ruby
thesheff17 has joined #ruby
LennyLinux has joined #ruby
athst has joined #ruby
pootler_ has quit [Ping timeout: 240 seconds]
devoldmx27 has joined #ruby
bionhart has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 264 seconds]
pootler__ has quit [Ping timeout: 260 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
scrollback has quit [Remote host closed the connection]
scrollback has joined #ruby
c0rn has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
devoldmx3 has quit [Ping timeout: 248 seconds]
kenneth has joined #ruby
Giorgio has joined #ruby
_md has joined #ruby
devoldmx has joined #ruby
<joshu>
I've defined a module LogsAsData with two methods def emit and def drain…Why when I do either of these to call the emit method, LogsAsData.emit or LogsAsData::emit do I get this error "(NoMethodError) undefined method `emit' for LogsAsData:Module with "
ner0x has joined #ruby
khismetix has quit [Ping timeout: 276 seconds]
<joshu>
I have no class within the module is that possibly the reason?
<MrZYX>
because they aren't module_functions
agjacome has joined #ruby
_md has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
devoldmx27 has quit [Ping timeout: 240 seconds]
<fryguy>
joshu: def self.emit and def self.drain
<fryguy>
(among other solutions, but that is probably what you want in this circumstance)
browndawg has quit [Quit: Leaving.]
sambao21 has joined #ruby
thetristan has joined #ruby
gnagno has quit [Ping timeout: 246 seconds]
khismetix has joined #ruby
jerius has joined #ruby
samuel02 has quit [Remote host closed the connection]
<joshu>
fryguy so I still call the method like this LogsAsData.emit but now it will "search" for the method within it's namespace as opposed to before?
<MrZYX>
no
<MrZYX>
did you understand class methods yet?
moted has quit [Read error: Connection reset by peer]
Taranis has left #ruby [#ruby]
pothibo has quit [Quit: pothibo]
<ner0x>
Any easy way to get the number of lines in a file without having to read through the entire thing?
<joshu>
MrZYX a class is like a factory..or blueprint for new objects
<MrZYX>
not classes, class methods
cburyta has quit [Remote host closed the connection]
axsuul has joined #ruby
chichou has quit [Remote host closed the connection]
ssickle has joined #ruby
<terrellt>
ner0x: Nein.
thibauts has quit [Ping timeout: 256 seconds]
juarlex has quit [Read error: Connection reset by peer]
alex__c2022 has joined #ruby
<terrellt>
ner0x: Not only is there not an easy way, it can't be done.
juarlex has joined #ruby
<joshu>
MrZYX a class method defines an object's behaviour?
<terrellt>
ner0x: Well...I guess unless you know the number of characters per line.
mafolz has quit [Ping timeout: 252 seconds]
freerobby has quit [Quit: Leaving.]
<joshu>
MrZYX so a class Rectangle has a method such as perimeter
<MrZYX>
joshu: do you have experience in any other language already?
<joshu>
MrZYX no Ruby is really my main one
<joshu>
I did som C++ at uni but that was not OOP
aedorn has joined #ruby
<joshu>
just command line stuff and no I didn't do comp sci
jlast has joined #ruby
schaerli_ has joined #ruby
<MrZYX>
okay, so the ruby way from ground up
mikepack has joined #ruby
<MrZYX>
a class is an object, too, it's an instance of the class Class
<MrZYX>
as such it can have instance methods too
uxp has quit [Ping timeout: 260 seconds]
<Morrolan>
terrellt: How would you then get the number of lines? Depending on the encoding a character might be more than one byte, so the file's size won't help.
jlast has quit [Remote host closed the connection]
stkowski has quit [Quit: stkowski]
jlast_ has quit [Read error: Connection reset by peer]
schaerli has quit [Ping timeout: 248 seconds]
cburyta has joined #ruby
carloslopes has quit [Remote host closed the connection]
jlast has joined #ruby
<terrellt>
Morrolan: Right, I modify my statement - if you know the precise size that constitutes a "line"
phipes has joined #ruby
<Morrolan>
Heh, okay. :D
<MrZYX>
joshu: now you can define instance methods on an object, foo = Object.new; bar = Object.new; def foo.baz; "Baz"; end; foo.baz #=> "Baz", bar.baz #=> NoMethodError
tbrock has joined #ruby
<MrZYX>
so when defining a class you can add methods to the instance of your class: class Foo; def Foo.baz; "Baz"; end; end; Foo.baz #=> "Baz"; Foo.new.baz #=> NoMethodError;
<ner0x>
terrellt: Terrible.
<terrellt>
ner0x: Hm?
<MrZYX>
inside a class definition the special keyword self is that same instance: class Foo; def self.baz; "Baz"; end; end; is equal and preferred
<MrZYX>
all that basically just applies to modules too
<ner0x>
terrellt: I guess I'll just slurp it in and and iterate over it rather than each_line'ing it.
boblu has quit [Ping timeout: 246 seconds]
<MrZYX>
joshu: so class methods = methods you can call on the class object, instance methods = methods you can call on new instances of that object. class methods on a module object = module methods or module functions
iamjarvo has quit [Quit: iamjarvo]
carloslopes has joined #ruby
whowantstolivefo has quit [Quit: quit]
<terrellt>
ner0x: I've heard you can create a lazy iterator with File.read that won't pull the whole file into memory, but I don't have the source on me.
<MrZYX>
joshu: uhm "methods on a module object = module methods or module functions" would be better worded
<ner0x>
terrellt: 40k lines.
schaerli_ has quit [Remote host closed the connection]
devoldmx3 has joined #ruby
<MrZYX>
joshu: made any sense to you?
<joshu>
MrZYX re-reading a few times one min please ;)
thibauts has joined #ruby
devoldmx has quit [Ping timeout: 248 seconds]
ivanoats has quit [Remote host closed the connection]
scrollback has quit [Remote host closed the connection]
pskosinski has quit [Remote host closed the connection]
maroloccio has quit [Ping timeout: 248 seconds]
jamesaxl has joined #ruby
pskosinski has joined #ruby
<joshu>
MrZYX yes I think it makes sense. So I'm calling the emit module method on the LogsAsData module object, correct?
cburyta has quit [Remote host closed the connection]
scrollback has joined #ruby
<MrZYX>
I'd call it it "calling the emit module method on the LogAsData module" and "calling the emit (instance) method on the LogAsData module object" but yes
cburyta has joined #ruby
uxp has joined #ruby
tonini has joined #ruby
zacts has quit [Ping timeout: 246 seconds]
bean__ has quit [Quit: Computer has gone to sleep.]
supaiku_ has joined #ruby
zacts has joined #ruby
scrollback has quit [Remote host closed the connection]
scrollback has joined #ruby
reset has quit [Quit: Leaving...]
ggordan has joined #ruby
jcromartie has quit [Quit: Computer has gone to sleep.]
Leighton has joined #ruby
d3c has joined #ruby
<aedorn>
I love when I code something that makes no sense the next day but works. It's like black magic.
pitzips has joined #ruby
axsuul has quit [Quit: axsuul]
supaiku has quit [Ping timeout: 248 seconds]
failshell has quit []
mklappstuhl has quit [Remote host closed the connection]
failshell has joined #ruby
kenneth has quit [Quit: kenneth]
sayan has quit [Read error: Connection reset by peer]
<lectrick>
i assume you have a test covering that code which shows some use cases that might shed light on it
marcgg has quit [Read error: No route to host]
athst has quit [Quit: athst]
wu_lmao has joined #ruby
marcgg has joined #ruby
uxp has quit [Remote host closed the connection]
DanKnox is now known as DanKnox_away
<joshu>
ok thanks for the primer MrZYX
wallerdev has joined #ruby
uxp has joined #ruby
JZTech101 has joined #ruby
ivanoats has joined #ruby
jimg has joined #ruby
dcunit3d_ has joined #ruby
chrishough has quit [Quit: chrishough]
<aedorn>
Tests? Nope. This is put together with virtual duct tape and happy thoughts.
rsahae_ has quit [Quit: rsahae_]
dcunit3d has quit [Ping timeout: 260 seconds]
<rfizzle>
Anyone have any experience with sucker_punch?
sambao21 has quit [Quit: Computer has gone to sleep.]
pi3r has quit [Quit: Leaving]
vlad_starkov has joined #ruby
saarinen has quit [Quit: saarinen]
persand has quit [Quit: persand]
iamjarvo has joined #ruby
timonv has quit [Remote host closed the connection]
astegman has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hanmac2 has joined #ruby
jimg has quit [Ping timeout: 260 seconds]
jcromartie has joined #ruby
chorkpop has quit [Read error: Connection reset by peer]
d3c has quit [Quit: Quit]
eldariof has quit [Ping timeout: 276 seconds]
ehaliewicz has joined #ruby
jcromartie has quit [Max SendQ exceeded]
<MrZYX>
you never close the file
ianbrandt has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 276 seconds]
jcromartie has joined #ruby
ianbrandt has joined #ruby
<Munto>
right
<Munto>
I read that ruby does it automatically
geekbri has quit [Remote host closed the connection]
<MrZYX>
built an array with the lines or a single string and then at the end do: File.open("index.html", "w") {|file| file.write File.read("header"); file.write body.join("\n"); file.write File.read("footer"); end
harrymoreno has joined #ruby
<MrZYX>
only if you pass a block to open or if the script ends
<Munto>
oh ok
sepp2k has joined #ruby
<terrellt>
Munto: Nothing terrible happens if you don't close it, but it won't flush everything before exiting.
jarin has joined #ruby
mansi has joined #ruby
kofno has quit [Remote host closed the connection]
<MrZYX>
eh, s/{/do/ of course
pitzips has quit [Quit: Leaving]
kofno has joined #ruby
wolcanus_ has joined #ruby
ELLIOTTCABLE has quit [Read error: Connection reset by peer]
icole has quit [Read error: Connection reset by peer]
icole has joined #ruby
burlyscudd has joined #ruby
burlyscudd has joined #ruby
burlyscudd has quit [Changing host]
ldnunes has quit [Quit: Leaving]
aedorn has quit [Read error: Operation timed out]
jdunck has quit [Ping timeout: 248 seconds]
byprdct has joined #ruby
jonathanwallace has joined #ruby
ghatak has quit [Ping timeout: 255 seconds]
mklappstuhl has joined #ruby
rsahae has quit [Quit: rsahae]
mikepack has joined #ruby
jdunck has joined #ruby
<fmcgeough>
I'm getting an error doing an request = HTTPI::Request.new(url) on a particular server. the url is a https address. The error is state=SSLv3 read server certificate B: certificate verify failed. How do I tell the code to use my cert file ?
kx has joined #ruby
aedorn has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
kofno has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 248 seconds]
<zacts>
I want to install ruby on FreeBSD 9.1 for the first time ever using the language.
<burlyscudd>
anyone know how to kill join annoncements on this here freenode?
<burlyscudd>
"/ignore * JOINS PARTS QUITS" doesn't seem to work for me
<burlyscudd>
(OS X LimeChat)
<havenwood>
burlyscudd: Preferences < Log < Show join/leave events
x1337807x has joined #ruby
<havenwood>
burlyscudd: Err, or is it under Events tab
<havenwood>
burlyscudd: Yeah, under Event not Log
jacobw has quit [Quit: WeeChat 0.4.0]
fuzzyhorns has quit [Remote host closed the connection]
<havenwood>
I don't know the command line command
cads has joined #ruby
dmiller has quit [Remote host closed the connection]
rsahae has joined #ruby
codecop has quit [Remote host closed the connection]
marcgg_ has joined #ruby
RORgasm_ is now known as RORgasm
dmiller has joined #ruby
atmosx has quit [Quit: And so the story goes…]
freerobby has joined #ruby
marcgg has quit [Ping timeout: 264 seconds]
<zacts>
havenwood: ok thanks
<zacts>
I'll check it out
workmad3 has joined #ruby
danneu has joined #ruby
WebDawg has joined #ruby
Dreamer3 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
stkowski has quit [Quit: stkowski]
<WebDawg>
I want to have some code connected out but another piece of code listening for connections in. How do I do something like that?
Giorgio has quit [Ping timeout: 248 seconds]
dagobah has joined #ruby
Ortuna has joined #ruby
<Lubinski>
its called netcat
reset has quit [Quit: Leaving...]
dcunit3d_ has quit [Quit: leaving]
dr_neek has quit [Quit: dr_neek]
c0rn has joined #ruby
delay has quit [Remote host closed the connection]
milardovich has quit [Quit: Leaving]
jonathanwallace has quit [Ping timeout: 240 seconds]
freezey has quit [Remote host closed the connection]
<WebDawg>
I am maintaining an open socket connection with: http://pastebin.com/gSJpkV2D . How would I put that in the background and let the program do other things?
mixel has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
stonevil has joined #ruby
interactionjaxsn has joined #ruby
Michae___ has quit [Remote host closed the connection]
cnrk has quit [Quit: cnrk]
stonevil has quit [Remote host closed the connection]
<WebDawg>
Just tell me something to google at least please.
Michae___ has joined #ruby
<WebDawg>
I was looking into threads but is that the right way?
Michae___ has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
Michae___ has joined #ruby
chorkpop has joined #ruby
<terrellt>
WebDawg: If you want one process to do two concurrent things then yes, threads are what you want.
cnrk has joined #ruby
Al__ has quit [Quit: Al__]
rzs has joined #ruby
crankyco_ has joined #ruby
<WebDawg>
terrellt: I guess that is what I want then. I just want to start a IRC client and host a web based interface. Should I use threads or should I think about doing something else?
interactionjaxsn has quit [Remote host closed the connection]
breakingthings has quit [Quit: breakingthings]
<WebDawg>
I am a n00b and I am just learning atm but I would want it to scale eventually. I just want to learn to code ruby right atm. Right now I want to be able to control the code. If I want to open up 10 servers in a single execution and a web interface for each on a sep port, I would want to do that. I want to be able to add other features down the road too. Like something that polls twitter and relays that information to irc or web serv
devoldmx has quit [Ping timeout: 264 seconds]
reset has joined #ruby
ArchBeOS is now known as enroxorz
baordog has quit [Remote host closed the connection]
tacos1de has quit [Remote host closed the connection]
<WebDawg>
havenwood.
enroxorz is now known as ArchBeOS
tacos1de has joined #ruby
generalissimo has quit [Remote host closed the connection]
cnrk has quit [Quit: cnrk]
zaebst has quit [Quit: leaving]
chipotle has quit [Quit: cya]
<havenwood>
WebDawg: Yeah, if it were guaranteed to be a low number I'd say just use processes. Evented IO with EM or Celluloid::IO would scale better. You could use threads in JRuby.
s3m73x has quit [Remote host closed the connection]
brennanMKE has joined #ruby
citizensinspace has quit [Quit: citizensinspace]
moted has quit [Quit: moted]
xardas has quit [Ping timeout: 276 seconds]
krainbol_ has joined #ruby
mocfive has quit [Remote host closed the connection]
<WebDawg>
I mean lets say I have 100 servers or even 1000. If something goes wary and a thread errors that means the entire process is messed right?
<WebDawg>
It just seems to me that the one process would be huge.
<Quadlex>
Right. I'm now the proud owner of simultaneouslibations.com
sam113101 has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros>
awesome…
krainboltgreene has quit [Ping timeout: 276 seconds]
<joshu>
Quadlex interesting domain what you hosting?
<WebDawg>
I just know irc servers (not written in ruby) are very efficient and can handle huge loads with minimal resources. What are they using?
<apeiros>
my company thinks we (the software development team) has already too much to do and outsourced porting an old intranet app… for a lower 5 digit USD price tag
daniel_-_ has joined #ruby
<apeiros>
I tried - it took me ~2h to port it myself
<joshu>
apeiros lol management
Dummies_freelanc has left #ruby [#ruby]
<apeiros>
yeah, #lolmanagement indeed
<Quadlex>
joshu: A sample app to show off our service
<joshu>
it's not about what you pay but what you get but unfortunately few grasp that concept
daniel_- has quit [Read error: Operation timed out]
tcat2 has joined #ruby
<joshu>
Quadlex cool
rabidpraxis has joined #ruby
<Quadlex>
joshu: The idea is that you can register you owe someone a drink
dmiller has quit [Remote host closed the connection]
<Quadlex>
And if A owe B, B owes C, C owes D and D and A are in the same location, it can tell A to but D a drink
rismoney has joined #ruby
<Quadlex>
It's a derpy little fun idea and mainly intended to show off Sauce Labs' service
<joshu>
I understand
<Quadlex>
But the domain is mine 'cause it was too good a name to pass up. It's way too long... I'll rename it eventually :P
<joshu>
Sauce Labs haha cool names all around
<rismoney>
is there a website to validate a section of ruby code across versions ?
<joshu>
first when I saw it I was thinking xxx :P
<joshu>
haha
<havenwood>
WebDawg: Try Celluloid::IO on JRuby for parallel threads with evented io.
<Quadlex>
We're the premier provider of awesome first impressions
<joshu>
that's a good slogan for both the drink idea and mine..combine the two and you;ve hit gold :P
<havenwood>
WebDawg: "Celluloid::IO is ideal for servers which handle large numbers of mostly-idle connections, such as Websocket servers or chat/messaging systems."
skaby has quit [Read error: Connection reset by peer]
<WebDawg>
havenwood: thanks.
Es0teric has joined #ruby
<Quadlex>
joshu: XXX as in porn?
Davey has quit [Quit: Computer has gone to sleep.]
<joshu>
Quadlex well something naughty
nomenkun has quit [Remote host closed the connection]
daniel_- has joined #ruby
skaby has joined #ruby
huttan_ has joined #ruby
daniel_- has quit [Client Quit]
<Quadlex>
I dunno man... We encourage people to support more browsers
<Quadlex>
Some people think that's naughty
cofin has quit [Quit: cofin]
rabidpraxis has quit [Ping timeout: 252 seconds]
TheFuzzball has joined #ruby
yxhuvud2 has joined #ruby
<joshu>
Quadlex each to his own I guess
yxhuvud has quit [Ping timeout: 252 seconds]
rhys has quit [Quit: Leaving]
<joshu>
anyway I like the idea simple and fun
swwet has joined #ruby
daniel_-_ has quit [Ping timeout: 252 seconds]
<joshu>
next you can create an iOS app
druonysus has joined #ruby
druonysus has joined #ruby
druonysus has quit [Changing host]
thetristan has quit [Quit: thetristan]
ToApolytoXaos has quit [Quit: Leaving]
<Quadlex>
joshu: Heh, definately. Especially since we do testing for that too:P
scrollback has quit [Remote host closed the connection]
<rfizzle>
alright. Thanks
swex has quit [Quit: No Ping reply in 180 seconds.]
swex has joined #ruby
freerobby has quit [Quit: Leaving.]
MrZYX is now known as MrZYX|off
nuba has joined #ruby
dmiller has joined #ruby
kofno has quit [Ping timeout: 252 seconds]
<Dekade>
Hello, I'm new to programming and Ruby and I just wrote a small command-line game. It consists out of 1 class that has some different functions, like walking, eating, resting, he can level up and increase attributes and we keep track of time. now I would like to add something like a save function but I'm kind of lost on how. If anyone could point me in some directions, would be very kind.
<havenwood>
Dekade: Do you want to save to file or db?
pipework has joined #ruby
<Dekade>
to file
nowthatsamatt has quit [Quit: nowthatsamatt]
kayloos has joined #ruby
gyre007 has quit [Remote host closed the connection]
<havenwood>
Dekade: Like to yaml, json, marshal or the like?
geggam has quit [Remote host closed the connection]
wolcanus_ has joined #ruby
druonysus has quit [Ping timeout: 264 seconds]
wolcanus_ has quit [Remote host closed the connection]
<Dekade>
well, I have no clue to be honest :) like I said I'm all kind of new to this
<havenwood>
Dekade: Ruby has PStore for Marshal or YAML::Store for YAML, to persist to disk transactionally.
dankest has joined #ruby
<havenwood>
Dekade: Marshal is faster but not human readable. YAML is usually fast enough.
BadDesign has quit [Read error: Connection reset by peer]
<havenwood>
Dekade: A key/value store DB like Redis would be a popular option as well. Easy to use.
<Dekade>
alright, I'll have a look into those
johnnyfuchs has joined #ruby
wolcanus has quit [Ping timeout: 260 seconds]
A124 has joined #ruby
A124 has quit [Read error: Operation timed out]
TheFuzzball has quit [Quit: Leaving...]
Dummies_freelanc has joined #ruby
wmoxam has quit [Ping timeout: 246 seconds]
tomzx_mac has joined #ruby
tspike has joined #ruby
TheNumb has quit [Ping timeout: 264 seconds]
johnnyfuchs has quit [Remote host closed the connection]
gnagno has quit [Quit: Sto andando via]
superscott[8] has joined #ruby
grn has quit [Ping timeout: 256 seconds]
<havenwood>
Dekade: I wrote a little wrapper for fun around PStore, a gem called Persist. You can: require 'persist'; Persist[:whatever] = {ruby: 'object'}
<havenwood>
Dekade: It is just PStore though, really. :P
jtharris has quit [Quit: WeeChat 0.4.0]
emmanuelux has joined #ruby
crankyco_ has joined #ruby
Nimsical has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
Davey has joined #ruby
icole has quit [Remote host closed the connection]
ccheney has joined #ruby
axsuul has quit [Quit: axsuul]
Elico has joined #ruby
crankyco_ has quit [Ping timeout: 246 seconds]
axsuul has joined #ruby
stkowski has joined #ruby
A124 has joined #ruby
Michae___ has quit [Remote host closed the connection]
Michae___ has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
<dankest>
I want to issue bash commands after opening an SSH connection using system(). When I call 'system "ssh root@asdf.com" however, it opens the connection in the window I'm running Ruby in and hangs. How can I run commangs through Ruby on SSH without it pausing?
<havenwood>
Dekade: Or serialize and store Ruby objects in Redis with Bindi (uber simple wrapper around Ohm that support Marshal, YAML, JSON serialization): https://github.com/havenwood/bindi#readme
Dekade has quit [Read error: Connection reset by peer]
workmad3 has quit [Read error: Operation timed out]
marcgg_ has quit [Read error: No route to host]
Dekade has joined #ruby
<havenwood>
dankest: Run the system() command in its own Thread maybe. (You mean it pauses while blocking to run the ssh command?)
<Dekade>
havenwood: cool thanks I'll keep it around :) I'd like to try to write it myself though, for the sake of learning hehe
marcgg has joined #ruby
yellow5 has quit [Read error: Operation timed out]
rcs has quit [Ping timeout: 264 seconds]
<dankest>
havenwood: When I run system ssh something, it literally opens the ssh connection in the same terminal window I'm running the ruby script
<havenwood>
Dekade: A cool serialization format you might consider storing in is MessagePack. You only have to add a dump and load method and it behaves like YAML, Marshal, or whatever in Ruby.
<dankest>
havenwood: tried it in its own thread, same thing
rcs has joined #ruby
jimg has joined #ruby
mansi has quit [Ping timeout: 276 seconds]
rabidpraxis has quit [Remote host closed the connection]
<rismoney>
any idea on why an rspec expect(@dupemacs).to eq([]) could return expect [] but @dupemacs is Infinity?? My understanding is @dupemacs is an array but what might cause that
freerobby has joined #ruby
davetherat has quit [Ping timeout: 246 seconds]
autumn has quit [Ping timeout: 246 seconds]
enebo has joined #ruby
<havenwood>
dankest: It isn't blocking but is printing ssh responses in terminal? Or something else? You could use `` %x exec etc instead of system()
rfizzle has quit [Quit: Leaving]
burlyscudd has quit [Ping timeout: 246 seconds]
wolcanus has joined #ruby
<Dekade>
thanks man :)
autumn has joined #ruby
jimg has quit [Ping timeout: 241 seconds]
twoism has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
wolcanus has quit [Remote host closed the connection]
twoism has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
athst has quit [Ping timeout: 276 seconds]
ffio has quit [Ping timeout: 264 seconds]
crankyco_ has joined #ruby
<dankest>
havenwood: okay, I have better lingo now
athst has joined #ruby
mikepack has joined #ruby
dangerousdave has quit [Ping timeout: 260 seconds]
<dankest>
I'm trying to ssh to a machine, then ssh to another machine from that one.
horofox has joined #ruby
<dankest>
then run a bunch of stuff, etc, drop back to the first machine, run some commands, and then drop back to MY machine, and run some commands
<dankest>
What's the best tool to do this with in Ruby?
jamesaxl has quit [Ping timeout: 276 seconds]
devoldmx3 has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
orien has joined #ruby
<havenwood>
dankest: You might want to take a look at how Mina does its ssh deploy. Sounds like a similar tactic: http://nadarei.co/mina/
<rismoney>
is there any way to return infinity beside dividing a number into 0.0? Like a datatype issue with hash or arrays?
<havenwood>
rismoney: Float::INFINITY
<dankest>
havenwood: not really doing a deploy
devoldmx has quit [Ping timeout: 240 seconds]
<havenwood>
dankest: Yeah, just that their deployment mechanism is to package the scripts, ssh over, then run the scripts. Seemed applicable, maybe it isn't.
hollyw00d has joined #ruby
hollyw00d has quit [Client Quit]
wmoxam has joined #ruby
devoldmx has joined #ruby
danneu has quit [Quit: Leaving.]
viszu has quit [Quit: Leaving.]
slash_nick has quit [Ping timeout: 264 seconds]
wsterling has quit [Remote host closed the connection]
demet8 has joined #ruby
Dummies_freelanc has quit [Remote host closed the connection]
Dummies_freelanc has joined #ruby
elaptics is now known as elaptics`away
devoldmx has quit [Read error: Connection reset by peer]
ner0x has joined #ruby
citizensinspace has joined #ruby
jetblack has quit [Read error: Connection reset by peer]
citizensinspace has quit [Client Quit]
gstamp has joined #ruby
jduan1981 has joined #ruby
apeiros has quit [Remote host closed the connection]
tcat-d has joined #ruby
apeiros has joined #ruby
Lubinski has quit [Ping timeout: 246 seconds]
hoofed has quit [Quit: hoofed]
tcat has joined #ruby
predator217 has joined #ruby
vwoo has joined #ruby
Cyrus has quit [Quit: Cyrus.sleep()]
nomenkun has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
enebo has quit [Quit: enebo]
ehaliewicz has quit [Remote host closed the connection]