mahmoudimus has quit [Quit: Computer has gone to sleep.]
forgot has joined #ruby
timebomb has joined #ruby
timebomb has left #ruby ["Segmentation fault (core dumped)"]
mjolk has joined #ruby
S1kx has quit [Quit: Leaving]
moos3 has joined #ruby
huoxito has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
mjolk2 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
phipes has joined #ruby
haylon has joined #ruby
adeponte has quit [Remote host closed the connection]
rellin has quit [Ping timeout: 250 seconds]
bradyl0ve has quit [Quit: Leaving...]
bradhe has joined #ruby
banisterfiend has joined #ruby
rismoney1 has joined #ruby
<haylon>
For exception handling in Ruby, when i use the line print file, "==", STDIN, "\n" will that give the ruby error for what i didnt prepare for?
Coolhand has joined #ruby
Hanmac1 has joined #ruby
forgot has left #ruby [#ruby]
lolcathost has quit [Quit: leaving]
mike-- has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
Hanmac has quit [Ping timeout: 245 seconds]
havenn has joined #ruby
jonahR_ has joined #ruby
oGminor has joined #ruby
<oGminor>
what is an efficient way to express "if x == 2 or x == 3 or x == 4" if there is a way
<seanstickle>
if [2,3,4].include? x
mike-- has quit [Ping timeout: 252 seconds]
<seanstickle>
or: if [2,3,4] & x
jonahR has quit [Ping timeout: 255 seconds]
jonahR_ is now known as jonahR
<oGminor>
I was thinking about using the include one
<oGminor>
ok cool thanks
<haylon>
For exception handling in Ruby, when i use the line print file, "==", STDIN, "\n" will that give the ruby error for what i didnt prepare for?
lolcathost has joined #ruby
<swarley>
what
<swarley>
What didn't you prepare for?
<foohey>
hmm seems open-uri doesn't make difference between proxy errors and request error ?
<foohey>
it's hard to find out what's wrong :(
<haylon>
swarley: if the user didnt input a file name that they want to open correctly, would that output the error code to use for an excption, or am i looking at this the wrong way?
aharris6 has quit [Remote host closed the connection]
<foohey>
because I have an array of proxies and want to push out dead proxies
<swarley>
It would give you an exception sure, something along the line of undefined method or variable
sumim has joined #ruby
bradhe has quit [Ping timeout: 250 seconds]
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
habstinat has quit [Ping timeout: 256 seconds]
<swarley>
but it's bad practice to rely on exceptions for something trivial like that
habstinat has joined #ruby
<haylon>
swarley: I was reading about it, and there was a piece of code that i didnt understand
graeme has quit [Quit: graeme]
pwelch has quit [Quit: pwelch]
havenn has quit [Ping timeout: 244 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
pu22l3r has joined #ruby
<haylon>
if the user did put in a bad file name, for example, then i could use the retry statement and force a default file name?
<haylon>
but that line i showed up before, print file, "==", STDIN, "\n" would just show the error code?
<swarley>
But really, that shouldn't be how you go about doing that
<haylon>
ok, that makes more sense, thank you swarley
<swarley>
No problem
jobicoppola has joined #ruby
prettymuchbryce has left #ruby [#ruby]
gsj1 has quit [Quit: Leaving.]
phipes has quit [Ping timeout: 272 seconds]
phipes_ is now known as phipes
postmodern has joined #ruby
banisterfiend is now known as banister`sleep
Guest29403 has quit [Read error: Connection reset by peer]
haylon has quit [Remote host closed the connection]
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
SwooshyCueb has quit [Excess Flood]
SwooshyCueb has joined #ruby
<shevy>
hmm... I am repackaging my .tar.bz2 into .tar.xz
<seanstickle>
What is an xz?
<shevy>
dunno, some archive format... it has better package ratio than .tar.bz2
<shevy>
I have about 12 gigs in .tar.bz2 locally
<shevy>
all my ruby files together are like...
jeffreybaird has joined #ruby
<shevy>
6.1M in .tar.xz
<banister`sleep>
seanstickle: sup stick
<seanstickle>
banister`sleep: halloo
sumim has quit [Ping timeout: 246 seconds]
<gbchaosmaster>
shevy: xz is LZMA compression IIRC, the same that 7-Zip uses. It has a much better compression ratio, but takes longer to pack/unpack.
<shevy>
oh well I hope it's worth it, a ruby script scans through all .tar.bz2 and repackages them right now
<shevy>
can barely watch youtube videos right now... laggy :\
bradhe has joined #ruby
freakazoid0223 has quit [Quit: Leaving]
<banister`sleep>
seanstickle: sup stick
<seanstickle>
So you said.
<banister`sleep>
seanstickle: what is up
Jasko has quit [Read error: Connection reset by peer]
gsj has joined #ruby
<seanstickle>
banister`sleep: if you want to distinguish your question from a typical phatic exchange, you have to be more explicit.
Jasko has joined #ruby
<banister`sleep>
seanstickle: answer the q or i call the cops
<seanstickle>
I'll wait for the five-oh
centipedefarmer has quit [Remote host closed the connection]
_huoxito has joined #ruby
pcarrier has quit []
reppard has quit [Quit: leaving]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
SCommette has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
wf2f has quit [Read error: Connection reset by peer]
SCommette has quit [Client Quit]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
mahmoudimus has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
adeponte has joined #ruby
nat2610 has joined #ruby
yshh_ has joined #ruby
yshh has quit [Read error: Connection reset by peer]
<Godd2>
does anyone actually hold up their wrists while typing?
<seanstickle>
Is that a thing?
nat2610 has quit [Client Quit]
<Godd2>
well it's in every ergonomic diagram
<Godd2>
I was wondering if Im jsut lazy or if no one actaully does that
chaosis has quit [Read error: Connection reset by peer]
Dreamer3 has joined #ruby
mike-- has joined #ruby
jcr has quit [Quit: Leaving]
aetcore has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
SwooshyCueb has quit [Excess Flood]
Jasko has joined #ruby
SwooshyCueb has joined #ruby
havenn has joined #ruby
benlieb has joined #ruby
huoxito has quit [Quit: Leaving]
<swarley>
I'm too lazy to
<swarley>
I was taught to hold them up, but i stopped that pretty quickly
<seanstickle>
I learned on a manual typewriter, so I had to hold them up back then.
<seanstickle>
There was no wrist-rest!
<seanstickle>
These days, to hell with it.
bradhe has joined #ruby
rippa has quit [Ping timeout: 255 seconds]
himsin has joined #ruby
adkron has joined #ruby
benlieb has quit [Quit: benlieb]
neiled has quit [Quit: Computer has gone to sleep.]
Norrin has quit [Ping timeout: 246 seconds]
havenn has quit [Remote host closed the connection]
ewag has joined #ruby
<otters>
ugh I fucking hate weechat's plugin system
davorb has quit [Ping timeout: 240 seconds]
pcarrier has joined #ruby
belga_ has joined #ruby
davorb has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
kiyoura has quit [Quit: Leaving]
Norrin has joined #ruby
gsj has quit [Quit: Leaving.]
cyong has joined #ruby
gsj has joined #ruby
uc has joined #ruby
pu22l3r has quit [Remote host closed the connection]
rondale_sc has joined #ruby
radic has joined #ruby
pu22l3r has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
bigmac has quit [Ping timeout: 255 seconds]
Jasko has joined #ruby
QKO_ has joined #ruby
radic_ has quit [Ping timeout: 248 seconds]
moshee has quit [Ping timeout: 246 seconds]
QKO has quit [Ping timeout: 264 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
uc has quit [Remote host closed the connection]
lolcathost has quit [Quit: Testing, testing...]
hemanth_ has joined #ruby
benlieb has joined #ruby
uc has joined #ruby
uc has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
banjara has joined #ruby
chord has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
Bosox20051 has joined #ruby
bigmac has joined #ruby
benlieb has quit [Quit: benlieb]
xnm has joined #ruby
hemanth_ has joined #ruby
<chord>
are there languages other than Ruby that let you pass in a lambda to OpenFile() which guarantess the file is closed if an exception is thrown in the execution of the lambda
adkron has quit [Ping timeout: 248 seconds]
kil0byte has quit [Remote host closed the connection]
<reactormonk>
chord, about any language with destructors
<chord>
I mean based around lambdas not scopes with destructors
bradhe has joined #ruby
<reactormonk>
I'm sure lispy languages support that
<chord>
but no imperative languages?
Gooder` has quit [Read error: Connection reset by peer]
Gooder`` has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
lolcathost has quit [Quit: leaving]
lolcathost has joined #ruby
<reactormonk>
chord, well, you can do that even with java with a bit of interface hacking
seanstickle has quit [Quit: seanstickle]
baroquebobcat has joined #ruby
<chord>
but no imperative language other than ruby has built in syntax support for it?
rondale_sc has quit [Quit: rondale_sc]
jeffreybaird has quit [Quit: jeffreybaird]
<yfeldblum>
chord, C#, python, boo, and others have support for similar things
<ryanf>
I'm sure nodejs has a file api that works that way
<ryanf>
python has a "with" concept that can do that iirc, but it doesn't use lambdas
<chord>
yfeldblum: really? example code please
<yfeldblum>
chord, in .net, the file class would implement IDisposable and the calling code would use using; in python, a similar thing would be done with with
pu22l3r has quit [Remote host closed the connection]
<chord>
and in Boo?
rondale_sc has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
yewton_ has quit [Excess Flood]
yewton_ has joined #ruby
ner0x has joined #ruby
hemanth_ has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
yewton_ has quit [Excess Flood]
<yfeldblum>
chord, also using `using` and `IDisposable` in boo, although you can also do your own AST transformation steps and hook into the compiler that way in boo
yewton_ has joined #ruby
bigmac has quit [Ping timeout: 248 seconds]
sandGorgon has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
araujo has quit [Quit: Leaving]
d2dchat has joined #ruby
fenton has joined #ruby
thams has quit [Read error: Connection reset by peer]
thams has joined #ruby
mike-- has quit [Quit: Lost terminal]
Gooder`` has quit [Read error: Connection reset by peer]
sandGorgon1 has joined #ruby
Gooder`` has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
nat2610 has joined #ruby
rondale_sc has quit [Quit: rondale_sc]
sandGorgon has quit [Read error: Connection reset by peer]
banister`sleep has quit [Read error: Connection reset by peer]
xpen has joined #ruby
<fenton>
where can i find the definition of self.methods ?
<fenton>
how can i convert it into a string?
<reactormonk>
fenton, use pry, show-method
<fenton>
reactormonk: okay, I'll look up what pry is...i just couldn't find it on the web searching under methods for the ruby 1.9.3 api...???
<reactormonk>
fenton, gem install pry; pry
<reactormonk>
actually && works better in this sutiation
neurotech has quit [Remote host closed the connection]
monkegjinni has joined #ruby
SCommette has joined #ruby
earthquake has joined #ruby
bradhe has joined #ruby
Shrink has quit [Ping timeout: 252 seconds]
chord has quit [Ping timeout: 245 seconds]
Bosox20051 has quit [Ping timeout: 252 seconds]
avdeveloper has joined #ruby
<avdeveloper>
I'm trying to increment a number within a hash by setting its value to the number within a different hash, but both are being incremented.
<avdeveloper>
hash[num] = another_hash[num].next
<avdeveloper>
after this line, another_hash[num] == hash[num]; I believe it's passing not just the value but actually the address of another_hash[num] so when I increment hash[num] I'm, in turn, incrementing another_hash[num] as well
<avdeveloper>
so how do I just get the value of another_hash[num] and not the address?
nat2610 has quit [Quit: Leaving.]
xpen has quit [Read error: Connection timed out]
<iamjarvo>
hash[num] = another_hash[num] + 1 avdeveloper why not that?
xpen has joined #ruby
<avdeveloper>
iamjarvo: I did that, and for some odd reason, it's still updating another_hash[num]
<avdeveloper>
ok I think I found an alternative way: duplicate the hashes themselves then just increment the value in the element
jobicoppola has quit [Quit: Computer has gone to sleep.]
<iamjarvo1>
where are getting round and previous_round>
<avdeveloper>
in an instance of a Mongoid model
nat2610 has joined #ruby
<avdeveloper>
round and previous round are the last two rounds in Game object
<iamjarvo1>
you can do round.wins.object_id == previous_round.wins.object_id and see if that returns true or false
<avdeveloper>
oooh
<avdeveloper>
ok
<avdeveloper>
ah!
<avdeveloper>
I found the problem
<iamjarvo1>
did it return true?
<avdeveloper>
it turns out that I WAS copying the exact hash in another function call
<avdeveloper>
yes
Slivka has joined #ruby
<avdeveloper>
I was setting round.wins = previous_round.wins
<avdeveloper>
I should do round.wins = previous_round.wins.dup instead right?
tjbiddle has joined #ruby
eroen-falcon has joined #ruby
eroen-falcon has left #ruby [#ruby]
chazbo has joined #ruby
<iamjarvo1>
yea
browndawg has joined #ruby
swex_ has joined #ruby
swex has quit [Ping timeout: 265 seconds]
<FDj>
I'm porting a Rails app from 1.8.7 to 1.9.2. Now I run into invalid UTF-8 errors. I can fix those in the case I'm seeing them with http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/ -- am I supposed to do this with each and every string my app sees?
<FDj>
looks like such a framework thing to do
nat2610 has quit [Quit: Leaving.]
<avdeveloper>
iamjarvo1: thanks, it works now
mjolk2 has quit [Quit: This computer has gone to sleep]
xpen_ has joined #ruby
ner0x has quit [Remote host closed the connection]
zommi has joined #ruby
himsin has quit [Ping timeout: 256 seconds]
xpen has quit [Ping timeout: 264 seconds]
jgrevich_ has joined #ruby
Edward__ has quit [Ping timeout: 245 seconds]
postmodern has quit [Ping timeout: 264 seconds]
elsifaka has joined #ruby
jgrevich has quit [Ping timeout: 245 seconds]
jgrevich_ is now known as jgrevich
bradhe has joined #ruby
xpen_ has quit [Remote host closed the connection]
love_color_text has quit [Remote host closed the connection]
xpen has joined #ruby
cyong has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby
postmodern has joined #ruby
xpen has quit [Client Quit]
xpen has joined #ruby
Nisstyre-laptop has joined #ruby
chazbo has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit: Computer has gone to sleep.]
yewton_ has quit [Excess Flood]
chazbo has joined #ruby
SCommette has quit [Quit: SCommette]
yewton_ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
ABK has joined #ruby
baroquebobcat has joined #ruby
bradhe has quit [Ping timeout: 244 seconds]
asuka_ has quit [Read error: Operation timed out]
tjbiddle has quit [Quit: tjbiddle]
yewton_ has quit [Excess Flood]
yewton_ has joined #ruby
<Godd2>
How come when I override the NilClass and create a 'new' method, irb still tells me that it's an undefined method for NilClass?
Takehiro has quit [Remote host closed the connection]
xpen has quit [Read error: Connection timed out]
xpen has joined #ruby
<Mon_Ouie>
Because you didn't define NilClass.new
<Mon_Ouie>
Show your code, but I suspect you just defined NilClass#new
<Mon_Ouie>
(Either way, I'm pretty sure there is no way to instanciate NilClass from Ruby — if at all)
nazty has quit [Read error: Connection reset by peer]
nazty has joined #ruby
<avdeveloper>
how would you override NilClass in the first place MonQuie?
Takehiro has joined #ruby
<wildcard0>
i think id prefer method_missing?
hemanth_ has quit [Read error: Connection reset by peer]
<Mon_Ouie>
Oh, didn't see that part. I'd guess NilClass = Class.new would (but nil.is_a? NilClass would be false then)
<Mon_Ouie>
But again, he probably didn't do it like that
asuka has joined #ruby
bradhe has joined #ruby
<ryanf>
I actually just played with it a bit and it's impossible
<ryanf>
in the end you get a typeerror because alloc doesn't work
hemanth_ has joined #ruby
<wildcard0>
that kinda makes sense
<ryanf>
uh I mean allocate
Takehiro has quit [Ping timeout: 244 seconds]
zommi has quit [Ping timeout: 244 seconds]
segv- has joined #ruby
avdeveloper has quit [Quit: avdeveloper]
lolmaus has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
<Godd2>
I don't know why I'd ever want to do that, but I can
segv- has quit [Quit: segv-]
burgestrand has joined #ruby
daniel_hinojosa has joined #ruby
<Godd2>
Though it seems odd that while I can set a to nil by a = nil, I can't set a to nil with a = NilClass.new since there's only supposed to be one instance of NilClass and it's supposed to me nil
hamfz_ has joined #ruby
<Godd2>
to be nil*
_huoxito has quit [Quit: Leaving]
wargasm has left #ruby [#ruby]
neiko has joined #ruby
<SirFunk>
hey i have a small ruby app (padrino) running on a VPS that i need to send some e-mails from (low volume just a couple notifications/day) anything simpler i can do than a full blown postfix setup?
xpen_ has joined #ruby
zommi has joined #ruby
cableray has joined #ruby
adeponte has quit [Remote host closed the connection]
xpen has quit [Ping timeout: 264 seconds]
<ryanf>
SirFunk: there are lots of email-as-a-service things
<neiko>
exit
neiko has quit [Client Quit]
crackfu has quit [Remote host closed the connection]
<ryanf>
sendgrid and amazon ses come to mind
<SirFunk>
i'll check those out thanks
oldB has quit [Quit: oldB]
timonv has joined #ruby
<SirFunk>
oh bah.. amazon's free tier only works if you are running on ec2 (i am not)
<SirFunk>
sengrid sounds like an option though
<SirFunk>
i doubt i would hit 200/day
haxrbyte has joined #ruby
<wildcard0>
nearlyfreespeech.net ?
<ryanf>
isn't that just hosting?
<wildcard0>
i heard they were doing services now
<wildcard0>
maybe im wrong
Chryson has quit [Quit: Leaving]
burgestrand has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
iamjarvo1 has quit [Quit: Leaving.]
iamjarvo has joined #ruby
jgrevich has quit [Remote host closed the connection]
love_color_text has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Client Quit]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
yshh_ has quit [Read error: Connection reset by peer]
yshh has joined #ruby
eka has joined #ruby
banister`sleep has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
answer_42 has joined #ruby
yewton_ has quit [Excess Flood]
Axsuul has quit [Ping timeout: 265 seconds]
yewton_ has joined #ruby
thams has quit [Read error: Connection reset by peer]
thams has joined #ruby
jkl1337 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
tagrudev has joined #ruby
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
eka has quit [Ping timeout: 272 seconds]
tomku has quit [Quit: WeeChat 0.3.9.2]
tomku has joined #ruby
Shrink has quit [Client Quit]
Mon_Ouie has quit [Ping timeout: 272 seconds]
burgestrand has joined #ruby
hamfz_ has quit [Ping timeout: 244 seconds]
phipes has quit [Quit: phipes]
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
robustus has quit [Ping timeout: 276 seconds]
<davidcelis>
they are also a registrar
<davidcelis>
you can't do rails with NFS
<davidcelis>
only static (or PHP)
robustus has joined #ruby
cableray has quit [Ping timeout: 260 seconds]
hamfz_ has joined #ruby
mockra has quit [Remote host closed the connection]
love_color_text has quit [Remote host closed the connection]
d34th4ck3r has joined #ruby
haxrbyte has joined #ruby
qwerxy has joined #ruby
love_color_text has joined #ruby
blaxter has joined #ruby
a_a_g has joined #ruby
WanderingGlitch has quit [Changing host]
WanderingGlitch has joined #ruby
yacks has quit [Quit: Leaving]
timonv has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
haxrbyte has quit [Ping timeout: 265 seconds]
yacks has joined #ruby
burgestrand1 has joined #ruby
ABK has quit [Ping timeout: 246 seconds]
love_color_text has quit [Ping timeout: 256 seconds]
xpen_ has quit [Remote host closed the connection]
xpen has joined #ruby
burgestrand has quit [Ping timeout: 272 seconds]
haxrbyte_ has quit [Ping timeout: 265 seconds]
kil0byte has joined #ruby
hamfz_ has quit [Ping timeout: 260 seconds]
rellin has joined #ruby
browndawg has quit [Ping timeout: 272 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
statarb3 has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
statarb3 has quit [Changing host]
statarb3 has joined #ruby
Jasko has joined #ruby
Elhu has joined #ruby
Morkel has joined #ruby
Xeago has joined #ruby
Takehiro has quit [Remote host closed the connection]
cj3kim has joined #ruby
timonv has joined #ruby
aganov has joined #ruby
mafolz has joined #ruby
browndawg has joined #ruby
xpen has quit [Read error: Connection timed out]
mahmoudimus has quit [Remote host closed the connection]
adeponte has joined #ruby
xpen has joined #ruby
mahmoudimus has joined #ruby
mockra has joined #ruby
nqe has joined #ruby
burgestrand1 has quit [Read error: Connection reset by peer]
cj3kim has quit [Quit: This computer has gone to sleep]
morf has joined #ruby
[eDu] has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
shiroginne has joined #ruby
burgestrand has joined #ruby
daniel_hinojosa has quit [Ping timeout: 244 seconds]
Hanmac has joined #ruby
mercwithamouth has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
mockra has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
x82_nicole has quit [Quit: Computer has gone to sleep.]
jprovazn has joined #ruby
ephemerian has joined #ruby
charliesome has joined #ruby
Takehiro has joined #ruby
pavilionXP__ has quit [Quit: Forget progress by proxy. Land on your own moon.]
eldariof has joined #ruby
pavilionXP has joined #ruby
araujo has joined #ruby
nilg has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
tungd has joined #ruby
Takehiro has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
adeponte has joined #ruby
haxrbyte_ has joined #ruby
lolcathost has quit [Ping timeout: 260 seconds]
andrewhl has quit [Remote host closed the connection]
FDj has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
FDj has joined #ruby
robotmay has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
dr_bob has joined #ruby
Slivka has quit [Remote host closed the connection]
d34th4ck3r has quit [Ping timeout: 250 seconds]
tPl0ch has joined #ruby
lolcathost has joined #ruby
elsifaka has quit [Ping timeout: 244 seconds]
pen has joined #ruby
piotr_ has joined #ruby
Beoran__ has joined #ruby
elsifaka has joined #ruby
lolcathost has quit [Ping timeout: 248 seconds]
xnm has quit [Quit: WeeChat 0.3.8]
Jasko has quit [Read error: Connection reset by peer]
ephemerian has quit [Quit: Leaving.]
Jasko has joined #ruby
bradhe has quit [Remote host closed the connection]
Beoran_ has quit [Ping timeout: 255 seconds]
bradhe has joined #ruby
mneorr has quit [Ping timeout: 252 seconds]
qwerxy has quit [Quit: offski]
phelps has quit [Ping timeout: 255 seconds]
bradhe has quit [Ping timeout: 264 seconds]
Solnse has joined #ruby
Elhu has joined #ruby
phelps has joined #ruby
haxrbyte has joined #ruby
ephemerian has joined #ruby
kil0byte_ has joined #ruby
haxrbyte_ has quit [Ping timeout: 250 seconds]
mockra has joined #ruby
darth has joined #ruby
kil0byte has quit [Ping timeout: 264 seconds]
tyfighter has quit [Quit: tyfighter]
mockra has quit [Ping timeout: 248 seconds]
phelps has quit [Ping timeout: 260 seconds]
dr_bob has quit [Quit: Leaving.]
rippa has quit [Ping timeout: 272 seconds]
mercwithamouth has quit [Ping timeout: 265 seconds]
main has joined #ruby
hoelzro|away is now known as hoelzro
yshh_ has joined #ruby
yshh has quit [Read error: Connection reset by peer]
phelps has joined #ruby
fyolnish has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
xpen_ has joined #ruby
jimeh has joined #ruby
xpen_ has quit [Remote host closed the connection]
xpen_ has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
xpen has quit [Ping timeout: 264 seconds]
nari has quit [Ping timeout: 245 seconds]
phelps has quit [Ping timeout: 255 seconds]
vlad_starkov has joined #ruby
mikecmpbll has joined #ruby
caleb_io has quit [Quit: caleb_io]
kevinfagan has joined #ruby
phelps has joined #ruby
Takehiro has joined #ruby
straind has quit [Ping timeout: 244 seconds]
fatninja has left #ruby [#ruby]
clocKwize has joined #ruby
bradhe has joined #ruby
burgestrand has quit [Read error: Connection reset by peer]
phelps has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby
phelps has joined #ruby
alup has quit [Quit: Leaving]
alup has joined #ruby
schaerli has joined #ruby
cableray has joined #ruby
DarthGandalf has quit [Ping timeout: 244 seconds]
pcarrier has quit []
nari has joined #ruby
rellin has quit [Ping timeout: 264 seconds]
blacktulip has joined #ruby
<witchdoc>
hi all
zigomir has joined #ruby
arturaz has joined #ruby
nemesit has joined #ruby
tvsutton has quit [Ping timeout: 245 seconds]
ttt has quit [Disconnected by services]
DarthGandalf has joined #ruby
ttt_ has joined #ruby
geeksir has joined #ruby
matrixise has joined #ruby
banjara has quit [Quit: Leaving.]
Vainoharhainen has joined #ruby
kil0byte has joined #ruby
nomenkun has joined #ruby
tvw has joined #ruby
<Hanmac>
witchdoc do you have questions?
<witchdoc>
Hanmac: no
beiter has joined #ruby
dr_bob has joined #ruby
<hoelzro>
Hanmac: he does this every day =)
kil0byte_ has quit [Ping timeout: 244 seconds]
geeksir has quit [Quit: GeekSir]
Solnse has quit [Ping timeout: 260 seconds]
gordon1775 has joined #ruby
blacktulip has quit [Remote host closed the connection]
banjara has joined #ruby
elaptics`away is now known as elaptics
gordon1775|2 has joined #ruby
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
pavilionXP has joined #ruby
gordon1775 has quit [Ping timeout: 252 seconds]
slainer68 has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
timonv has joined #ruby
Vert has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 248 seconds]
timonv has quit [Remote host closed the connection]
Takehiro has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
JohnBat26 has joined #ruby
Takehiro has joined #ruby
apeiros_ has joined #ruby
lkba has quit [Quit: Bye]
io_syl has quit [Quit: Computer has gone to sleep.]
segv- has joined #ruby
eph3meral has quit [Quit: eph3meral]
fyolnish has joined #ruby
slainer68 has quit [Remote host closed the connection]
ikaros has joined #ruby
gyre007 has joined #ruby
schaerli has quit [Remote host closed the connection]
dr_bob has quit [Quit: Leaving.]
mockra has joined #ruby
jbw has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
segv-_ has joined #ruby
segv- has quit [Ping timeout: 264 seconds]
segv-_ is now known as segv-
tvw has quit [Remote host closed the connection]
chussenot has joined #ruby
gyre007 has quit [Ping timeout: 264 seconds]
jbw has joined #ruby
tps_ has quit [Quit: tps_]
yshh_ has quit [Read error: Connection reset by peer]
Takehiro has quit [Remote host closed the connection]
yshh has joined #ruby
gyre007 has joined #ruby
mockra has quit [Ping timeout: 272 seconds]
JonnieCache has joined #ruby
dr_bob has joined #ruby
haxrbyte_ has joined #ruby
Averna has joined #ruby
JonnieCache has quit [Client Quit]
haxrbyte has quit [Read error: Connection reset by peer]
JonnieCache has joined #ruby
cdt has joined #ruby
timmow has joined #ruby
rdark has joined #ruby
segv- has quit [Ping timeout: 255 seconds]
atno has quit [Ping timeout: 272 seconds]
pcarrier_ has joined #ruby
berserkr has joined #ruby
Iszak has joined #ruby
jds__ has quit [Quit: Lost terminal]
segv- has joined #ruby
segv- has quit [Client Quit]
bradhe has joined #ruby
cableray has quit [Quit: cableray]
Steppen has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
u89 has joined #ruby
slainer68 has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte has joined #ruby
pen has quit [Remote host closed the connection]
thone_ has joined #ruby
ewag has quit [Ping timeout: 264 seconds]
thone has quit [Ping timeout: 255 seconds]
segv- has joined #ruby
guns has quit [Quit: guns]
schaary has joined #ruby
dr_bob has quit [Quit: Leaving.]
xpen_ has quit [Remote host closed the connection]
zcl0ud has joined #ruby
geeksir has joined #ruby
mahmoudimus has joined #ruby
dr_bob has joined #ruby
geeksir has left #ruby [#ruby]
d34th4ck3r has joined #ruby
alexspeller has joined #ruby
main has quit [Ping timeout: 265 seconds]
<jcrawford>
can anyone here suggest a good book to learn ruby? I have 15 years with php so i am not foreign to programming :)
cousine has joined #ruby
<jcrawford>
so i don't need some book to dumb down the concepts :)
Gadgetoid has quit [Read error: Connection reset by peer]
graeme has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
kil0byte has quit [Ping timeout: 246 seconds]
<hoelzro>
jcrawford: "The Ruby Programming Language" is excellent
<hoelzro>
it doesn't shy away from details
<jcrawford>
thanks hoelzro i will see if it's on Amazon
tvw has joined #ruby
<jcrawford>
never thought i would learn a new language to use a tool lol
<jcrawford>
but want to use Github pages with Jekyll :)
<jcrawford>
kicking Wordpress to the curb
<Xeago>
jcrawford: the 'language' I learned from that was YAML
<jcrawford>
nice just got it on my Kindle :)
browndawg has quit [Ping timeout: 272 seconds]
<jcrawford>
i've used YAML in the past, it's been a while though
<Xeago>
not seen a bit of ruby on my own blog
main has joined #ruby
<jcrawford>
Xeago: well to use Github Pages the only server side they support is Jekyll which is written in Ruby and to extend it and make my blog what I want it to be requires Ruby :)
kil0byte has joined #ruby
<workmad3>
jcrawford: github pages only supports static pages
banjara has quit [Quit: Leaving.]
<workmad3>
jcrawford: it's just that they also support running jekyll on push to generate it
<Xeago>
jcrawford: any extensions to jekyll won't be on github's jekyll
<jcrawford>
workmad3: yes but Jekyll generates them on every commit to the repo
<jcrawford>
no but they will be in my _plugins directory :)
bricker is now known as bricker`away
<workmad3>
jcrawford: you can use any static site generator you want, you just need to alter your deploy process (see octopress)
<jcrawford>
in my repo which will be run
<Xeago>
jcrawford: no it won't run
<Xeago>
atleast not on github
<workmad3>
jcrawford: I know exactly how jekyll and github pages works ;)
<jcrawford>
hmm really? damn..
alexspeller has quit [Remote host closed the connection]
<Xeago>
jcrawford: ever heard of heroku?
<jcrawford>
so i could theoretically use a php based generator so long as it deployed properly
<Xeago>
jcrawford: as long as it spits out html
<jcrawford>
Xeago: heard of it, not sure what it is
<jcrawford>
interesting
<Xeago>
jcrawford: you can easily host a tiny app there
<workmad3>
jcrawford: not theoretically... you can
<Xeago>
that generates the html as needed
<Xeago>
and then you have full control over the running code
Jasko has quit [Read error: Connection reset by peer]
<Xeago>
which is what I am planning on doing
<workmad3>
jcrawford: you just turn off jekyll on your pages repo and push static html instead
<workmad3>
jcrawford: which is exactly what octopress (with all its customised jekyll stuff) does
<jcrawford>
ahh
<Xeago>
you are also locked to githubs markdown processor
<jcrawford>
for some reason i thought the _plugins would run
Jasko has joined #ruby
<jcrawford>
Xeago: that's fine with me :)
yacks has quit [Read error: Connection reset by peer]
Gadgetoid has joined #ruby
staafl has quit [Quit: Leaving]
samphippen has joined #ruby
<jcrawford>
workmad3: so if I generate straight html with Liquid and leave Jekyll processing on it would still process the Liquid tags right?
<Xeago>
jcrawford: the directory structure is different
<workmad3>
jcrawford: more likely, github will barf on your repo and not deploy if you leave jekyll on at that point
<jcrawford>
hm
vlad_starkov has quit [Remote host closed the connection]
cousine has quit [Remote host closed the connection]
<Xeago>
jcrawford: in any case, you wouldn't want that. Heroku is awesome
<Xeago>
a sinatra app with a /public directory is all you need there for static html
browndawg has joined #ruby
alexspeller has joined #ruby
d34th4ck3r has quit [Ping timeout: 265 seconds]
cousine has joined #ruby
<Xeago>
you can easily use liquid/jekyll as a gem to generate /public on the fly
<JonnieCache>
why not just code a blog in sinatra, and instead of generating straight html, use caching headers and a free cloudfront account
<Xeago>
so much stuff is free now
k610 has joined #ruby
<JonnieCache>
and you have the same thing with no static file generation stage
<JonnieCache>
you could put the app on a heroku free account and still serve millions of visitors
yacks has joined #ruby
<Xeago>
what appeals people the most is the simpleness of generation, not the benefits/use of it
<jcrawford>
reading up on Heroku now
nkts has joined #ruby
krisfremen has quit [Remote host closed the connection]
<JonnieCache>
Xeago: how exactly is it simple
<Xeago>
run jekyll
krisfremen has joined #ruby
krisfremen has quit [Changing host]
krisfremen has joined #ruby
<Xeago>
open _site
<Xeago>
click index.html
<Xeago>
done
<JonnieCache>
depends how you define simple i suppose
<Xeago>
for people new to terminal stuff
<Xeago>
that is simple ;)
<jcrawford>
i am not foreign to terminal :D
<JonnieCache>
to me thats a whole layer of abstraction between just generating html on the fly and having the cdn take care of storing that static html
<jcrawford>
just VERY VERY sick of wordpress
<JonnieCache>
youre doing exactly the same thing but with a lame build step for no reason
atno has joined #ruby
<Xeago>
JonnieCache: yes, but to many people buildsteps and such things are 'arcane'
<Xeago>
and for them being able to see a plain old html file
cousine_ has joined #ruby
<Xeago>
can't call it exciting, but they are like wow
bigmcq77_ has joined #ruby
<Xeago>
I can use all my nineties tools on that
cousine has quit [Read error: Connection reset by peer]
<JonnieCache>
if you cant comprehend http caching etc just use tumblr or whatever ;)
bigmcq77 has quit [Read error: Connection reset by peer]
bigmcq77_ is now known as bigmcq77
phelps has quit [Ping timeout: 256 seconds]
<jcrawford>
what intrigued me about Github Pages was that it was free, static (very performant), but allowed some dynamic content using Liquid markup
<jcrawford>
only dynamic on processing, static after processing :)
<workmad3>
JonnieCache: actually, my rationale for using octopress is quite different - lets me use my normal editors to create my posts and then a 'rake gen_deploy' to run jekyll and push the new build to github, where it gets served
cousine_ has quit [Remote host closed the connection]
woolite64 has quit []
phelps has joined #ruby
<JonnieCache>
actually yeah that is the advantage isnt it. being able to use flat files, which is actually much better than a db in the context of a personal blog
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<JonnieCache>
and once youre doing that it makes perfect sense to generate the whole site like that
mockra has joined #ruby
<workmad3>
you see, it does make sense ;)
<jcrawford>
it's limited but if you don't require complexity :)
<JonnieCache>
there are some very blogs built entirely with git hooks
<workmad3>
yeah, which is frequently the case for a personal blog
<JonnieCache>
*very nice
Xeago has quit []
<workmad3>
and hell, nowadays with the amount of stuff people have figured out how to do in pure JS, it's not even a case of 'no complexity'
<workmad3>
it's just 'no server'
tvw has quit [Remote host closed the connection]
Xeago has joined #ruby
<jcrawford>
workmad3: very true
<workmad3>
comments, etc. with disqus, facebook comments, whatever... you could quite easily do a smooth, single-page site... you could serve static json up in that case, I suspect
ewag has joined #ruby
<JonnieCache>
yeah thats gotta be the next big thing
<JonnieCache>
a single page version of jekyll built in backbone or whatever
mockra has quit [Ping timeout: 272 seconds]
atno has quit [Ping timeout: 256 seconds]
macsim has joined #ruby
bradhe has joined #ruby
<jcrawford>
so workmad3 if i were to use any generator i just need to make sure it goes into _site right?
<jcrawford>
upon deployment
<Xeago>
don't think so jcrawford
Banistergalaxy has quit [Read error: Connection reset by peer]
<jcrawford>
Xeago: i am talking for GitHub pages :)
<Xeago>
jcrawford: what do you mean?
<Xeago>
the output of jekyll?
<Xeago>
I think github overrides the configuration file for that value
theRoUS has quit [Read error: Connection reset by peer]
k610 has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 245 seconds]
theRoUS has joined #ruby
yfeldblum has joined #ruby
<alexspeller>
macsim: Are you sure you're using the right ruby version? If you're getting a syntax error it could be because you're running on ruby < 1.9
tk__ has joined #ruby
cek has joined #ruby
<macsim>
alexspeller, ah yep I'm on ruby 1.8
nari has quit [Ping timeout: 245 seconds]
nari has joined #ruby
<alexspeller>
That'll be it then, there is a new "javascript-like" hash syntax supported in 1.9
<alexspeller>
in 1.8, hashes have to be like {:foo => "bar"}
<alexspeller>
1.9 also supports {foo: "bar"}
tvw has joined #ruby
<alexspeller>
so in your gemfile, change gem "mysql2", group: :mysql to gem "mysql2", :group => :mysql
<alexspeller>
but really, upgrading to 1.9 is a better idea if you can
agarie has joined #ruby
<macsim>
alexspeller, I change ruby to 1.9.1 but error still the same
<shevy>
never knew steam, and XML is going to steal time of your life anyway man
banjara has joined #ruby
<Sou|cutter>
oh cmon now, the answer isn't always to avoid xml
<Sou|cutter>
it's not that bad
<shevy>
right
<shevy>
the more XML the better
bbttxu has joined #ruby
grzywacz has joined #ruby
<maetthew>
shevy, well i don't think I have any alternatives as it seems Steam returns everything in XML
<maetthew>
or perhaps that's just how steam-condenser retrieves it
<maetthew>
dunno
<shevy>
dont know either but could make sense, many use XML as their main format
mercwithamouth has joined #ruby
<maetthew>
the #steam-condenser channel doesn't give much help either
jeffreybaird has joined #ruby
<maetthew>
3 people in there with insane idle times :)
<Xeago>
maetthew: have you tried using a proxy or something to dump the xml you get?
<maetthew>
Xeago, no idea what you're talking about :)
<shevy>
not many folks in that channel :D
<Sou|cutter>
you should definitely look at the raw service responses
<Sou|cutter>
it could be that the lib is masking the issue
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
<Sou|cutter>
(this is general advice, I don't know steam condenser)
<maetthew>
Sou|cutter, hmm I'm quite ruby noob. How do I do that?
<maetthew>
do you mean bypass steam-condenser and try to do it manually?
<maetthew>
see if same error is given?
<Sou|cutter>
that's one way, sure
jtharris has joined #ruby
<maetthew>
hmm ok. then i have to figure out how to do that :)
<maetthew>
but atleast you gave me a new option
supertramp has joined #ruby
supertramp is now known as Guest50805
Guest50805 is now known as supertramp`
<Sou|cutter>
you could use the VCR gem to record a request/response to look at it
<maetthew>
hmm ok. will look into that
<maetthew>
thanks
<Sou|cutter>
or set up a proxy
cantonic has quit [Quit: cantonic]
<supertramp`>
hey, could someone help me out? i'm trying to install a gem but it keeps telling me that it doesn't find the bz2 dir even if i specify it manually (windumb)
<supertramp`>
and this line "libbz2 not found, maybe try manually specifying --with-bz2-dir to find it?" all the time
<shevy>
supertramp` what is the "bz2 dir"?
<shevy>
ok good
<shevy>
so it can not find libbz2
<shevy>
that means, in the most likely case, that your machine does not have 100% of
<supertramp`>
yes exactly, i downloaded it from there
<shevy>
how did you install bzip2
lurch_ has joined #ruby
enroxorz-work has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
<shevy>
also, I dont think you gave us the name of the gem so far :\
<supertramp`>
i unpacked it somewhere on my hdd and specified the path to it with --with-bz2-dir="C:/bzip2/"
<shevy>
hmmm damn
<shevy>
the quotes are required?
d34th4ck3r has joined #ruby
<maetthew>
shevy, it's the same gem i'm trying to fiddle with. steam-condenser :)
<maetthew>
i've tried helping him but i'm at loss with windows
GeekOnCo- has quit [Ping timeout: 244 seconds]
<shevy>
I am too
<shevy>
linux is annoying enough as is, windows only worse :(
<maetthew>
seems ruby is not working well on windows
<Xeago>
maetthew: something like vcr could be used
<Xeago>
or alternatively something like charles
<shevy>
how do you install this steam thing?
<maetthew>
Xeago, yeah thanks. Got it from Sou|cutter
<shevy>
maetthew, well for basic ruby things, windows is fine
<shevy>
problem is compiling stuff
<shevy>
you can even use ruby-gnome on windows to build GUIs
Nimsical has joined #ruby
<shevy>
they look ugly, but they work
<maetthew>
oh
<maetthew>
shevy, btw supertramp` says he disconnected but cannot re-connect :)
Emmanuel_Chanel has joined #ruby
<maetthew>
if you wonder where he went
enroxorz-work is now known as USAUSAUSAUSA
banjara has quit [Ping timeout: 248 seconds]
USAUSAUSAUSA has left #ruby [#ruby]
sailias has joined #ruby
[eDu] has joined #ruby
bradhe has joined #ruby
supertramp` has quit [Ping timeout: 255 seconds]
stopbit has joined #ruby
<shevy>
lol
<shevy>
seems he fights several problems at the same time :D
<maetthew>
yeah :D
<maetthew>
so weird. he's connected to quakenet
<shevy>
hopefully he doesn't add "broken leg" to the list of his problems
<maetthew>
but he says in his browser he's offline :)
<maetthew>
hahah
bradhe has quit [Read error: Connection reset by peer]
<shevy>
I have a cheap ISP, I often get disconnected... sometimes I cant reconnect for about two minutes, it's annoying, I miss the last ~30 seconds of a conversation before I disconnect
<shevy>
but at least it's cheap :\
<maetthew>
yeah i guess you get what you pay for :)
bradhe has joined #ruby
ner0x has joined #ruby
GoGoGarrett has joined #ruby
lurch_ has quit [Quit: lurch_]
_hemanth_ has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
<Xeago>
shevy: screen + irssi with 700 EC2 thingyes lasts a long time
_hemanth_ has quit [Max SendQ exceeded]
adamnbowen has joined #ruby
Coolhand has quit [Ping timeout: 264 seconds]
rondale__ has joined #ruby
cakehero has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
jeffreybaird has joined #ruby
_hemanth_ has joined #ruby
ttt_ has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
Virunga has quit [Remote host closed the connection]
<jcrawford>
shevy: that's no reason to not like a language lol
thisirs has joined #ruby
Goles has joined #ruby
<atmosx>
I don't like PHP because of the badge
<shevy>
jcrawford it was really cumbersome, you knew that it was such a small error but you had to go and correct it, if you have to do that a lot it just is less fun compared to i.e. ruby or python
<atmosx>
looks so 1995
<jcrawford>
:)
<shevy>
the old matz interview convinced me in favour of ruby
<jcrawford>
lol atmosx
<shevy>
"The Philosophy of Ruby"
theRoUS_ has joined #ruby
<shevy>
"Instead of emphasizing the what, I want to emphasize the how part: how we feel while programming. That's Ruby's main difference from other language designs. I emphasize the feeling, in particular, how I feel using Ruby."
<lessless>
what are solutions to compare uniqueness among the set of texts?
m3pow has joined #ruby
<apeiros_>
a set is unique already
<apeiros_>
you mean an array of strings?
buibex has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
elico has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
hsbt_away has joined #ruby
hsbt_away is now known as hsbt
<atmosx>
lessless: there's an algorithm.
seanyo has joined #ruby
Kuifje has joined #ruby
nilg has quit [Read error: Connection reset by peer]
<atmosx>
actually, algorithms but there's one for "similar texts". You could do that using sha1, depending on the number of possible texts there are other hashes, md5 is faster but bigger collision % and so forth.
<cek>
wondering what rules govern lambda {} defiition
_hemanth_ has quit [Max SendQ exceeded]
<cek>
lambda do; block; end doesn't define lambda, but supplies block to anonymous proc
tagrudev has left #ruby ["lolst"]
havenn has joined #ruby
Bosox20051 has joined #ruby
<atmosx>
cek: I never use lambda and yiled. I don't understand them :-/
_hemanth_ has joined #ruby
<cek>
you, poor monadist
<lessless>
Lol, in seo world: I mean in generated texts with predefined synonyms :)
clocKwize has quit [Quit: clocKwize]
<apeiros_>
atmosx: you shouldn't use cryptographic hash algorithms for something like that
kil0byte has joined #ruby
<atmosx>
apeiros_: why not?
<apeiros_>
because they're more expensive
<atmosx>
hmm
<atmosx>
continue :-P
<atmosx>
what should I use instead?
<atmosx>
for word (small text) fingerprinting?
lkba has joined #ruby
<apeiros_>
.hash
<atmosx>
hash
<atmosx>
hmm
<apeiros_>
or just use rubys datastructures, which already make use of that
<apeiros_>
like Hash or Set.
hsbt has quit [Ping timeout: 264 seconds]
* atmosx
reading the documentation
<apeiros_>
you only use cryptographic hashing if you expect adversarial behavior.
_nitti has quit [Remote host closed the connection]
_hemanth_ has quit [Max SendQ exceeded]
<atmosx>
by adversarial behavior you mean "collisions" ?
<cek>
hmm, actually, i was wrong :/
<apeiros_>
atmosx: not just collisions. systematically generated collisions.
<apeiros_>
with the aim of bringing your system down.
<cek>
use crc32c, proven by ages!
<apeiros_>
crc32 for example is very weak against such attacks :-p
kil0byte_ has quit [Ping timeout: 255 seconds]
<atmosx>
I have a database of almost 500.000 words which I need to fingerprint in order to able quickly search through them for possible matches, in my case should I use hash instead?
bradhe has joined #ruby
<atmosx>
I use sha1 now
<atmosx>
md5 had a collision every 500.000 entries it was not optimal
<apeiros_>
atmosx: and how do you search through your sha1's?
_hemanth_ has joined #ruby
<apeiros_>
atmosx: you will *always* have collisions with hashing (unless you use perfect-hashing, which comes with its own expenses)
zomgbie has joined #ruby
alex__c2022 has joined #ruby
<atmosx>
apeiros_: I have an sqlite3 db which contains words/sha1/other_values/
banjara has joined #ruby
<apeiros_>
atmosx: errr…
<apeiros_>
atmosx: how long are words on average?
<cek>
scans every row. great
<apeiros_>
like natural language words?
<atmosx>
apeiros_: they are natural Greek (utf-8) words.
<atmosx>
it's the aspell-dictionary to be exact.
<apeiros_>
then you're doing pointless work.
<atmosx>
no idea the avg length should be something like 4 or 5 or 6
<atmosx>
apeiros_: y so?
<apeiros_>
an index on the word column + exist query will be tons faster and more reliable than your sha hashing.
<atmosx>
works though
<apeiros_>
additionally it saves you space.
<atmosx>
wait a minute
<atmosx>
what is exist query?
thmzlt has joined #ruby
SCommette has joined #ruby
<atmosx>
query supported by sqlite3 to match existing record?
<atmosx>
and you think I could use the word for that instead of sha1 or the word?
u89 has quit [Remote host closed the connection]
jlast has joined #ruby
<apeiros_>
you can query for the word directly
<apeiros_>
where word=yourword
<atmosx>
yeap
<apeiros_>
no need for hashing. your hashing will be *slower* since you make neither use of a hashtable nor save space.
havenn has quit [Ping timeout: 272 seconds]
buibex has joined #ruby
<atmosx>
so you say I should entirely remove hash from the db since they are not useful at all, in this scenario
<atmosx>
hm
<atmosx>
okay
kstephens has quit [Ping timeout: 248 seconds]
<apeiros_>
well, I guess if you only want to test whether the word is in the db: "SELECT 1 FROM tablename where word=? LIMIT 1"
<apeiros_>
atmosx: yes
<lectrick>
What is the error class I should be inheriting from by default (if I can't find one in the hierarchy that serves as a semantically-relevant parent class)? I remember seeing a blog post where someone pointed out that most Rubyists inherit from the wrong class, like Exception instead of StandardError, or something... Can someone refresh my memory?
<apeiros_>
and don't forget to add an index on the word column
<apeiros_>
lectrick: StandardError
<atmosx>
apeiros_: I have an index column, should I remove that and make the word table index?
<apeiros_>
or lower if possible (e.g. ArgumentError)
kstephens has joined #ruby
<apeiros_>
atmosx: what do you mean, you have an index column?
<atmosx>
well in datamapper format: dm-sqlite-adapter
<lectrick>
apeiros_: had no doubt you could answer that, haha. So inherit from StandardError (or ArgumentError if it makes sense) unless some other error makes more sense, right? And never Exception? Or is there a use case for inheriting from Exception?
<apeiros_>
you actually have a column named 'index'?
rondale__ has joined #ruby
<atmosx>
property :id, Serial # primary serial key
* atmosx
coppied from vim and ctrl+v after lol
<apeiros_>
lectrick: correct. yes, there are use cases for exception. but unless you have something in the order of a NoMemoryError which should not be rescued…
<apeiros_>
atmosx: that's not an index
<atmosx>
I have a primary serial key for each entry (wrod).
igor has joined #ruby
<lessless>
lol, it's impossible to measure a rate on uniqueness with cryptographic algorithms ;( And all text must must meet given criteria of uniqueness, which can vary
<apeiros_>
(thought, the primary key will have an index automatically)
<lectrick>
apeiros_: got it
<atmosx>
apeiros_: in sqlite3 format is "id integer primary key" <-- isn't that an index?
<apeiros_>
lectrick: define 'uniqueness'
<apeiros_>
gah
<apeiros_>
lessless: define 'uniqueness'
<apeiros_>
atmosx: only because it's a primary key
<apeiros_>
atmosx: google 'sql add index'
<apeiros_>
meh, actually `create`, not `add`. railsism…
hsbt_away has joined #ruby
<apeiros_>
atmosx: note, a db will usually only use *one* index per query per table.
<lessless>
apeiros_, measure of difference between each other. Let's assume I have text with 500 words, and from 2 to 7 synonyms for 300 words, right? And I want all the variants of source text which will be different from original not less than by 75%
<lessless>
Variations are made by substituting words with synonyms
u89 has joined #ruby
<apeiros_>
lessless: that's pretty unrelated to uniqueness :-p
<atmosx>
apeiros_: so I should use an index the words, which are unique
<atmosx>
and get over with it. hmm
<atmosx>
nice
<atmosx>
make ssense
<apeiros_>
lessless: so you're looking for text similarity algorithms
<apeiros_>
atmosx: yes. sqlite will be very fast, even for 500k words
<lessless>
cool, that clarifies things out... continue, please >:)
<apeiros_>
atmosx: if you want faster, use a hashtable in memory.
<apeiros_>
lessless: I know nothing for large texts, only that such algorithms exist. I use them on small data and those are very expensive.
rakunHo_ has joined #ruby
<apeiros_>
lessless: but "text similarity" should get you going on google
<apeiros_>
atmosx: still on 1.8 syntax? :-p
<lessless>
by expensive you mean cpu resources?
banjara has quit [Ping timeout: 264 seconds]
<atmosx>
I haven't use hashes before, I avoided them like the plague I'm not really accustom to either => or : : values :-) that's what I've seen in the datamapper examples
mafolz has quit [Read error: Connection reset by peer]
rakunHo has quit [Ping timeout: 272 seconds]
<lessless>
how small is yours data? maybe i can check sentences one after another, assigning a rating and calculating rating for the whole text in the end ;)
lurch_ has joined #ruby
<apeiros_>
lessless: 2-3 words, 5-20 chars
tvw has quit [Ping timeout: 272 seconds]
<lessless>
:(
<cek>
didn't know clousures can be invoked via proc[*args]
nmeum has quit [Quit: WeeChat 0.3.8]
<apeiros_>
it's about typos in names, streets etc. for me ;-)
<apeiros_>
cek: you can also do proc.(*args)
<cek>
not in 187
<apeiros_>
correct
awarner has quit [Read error: Connection reset by peer]
headius_ has joined #ruby
<apeiros_>
but who is still on 1.8.7?
<apeiros_>
that's like… 5y old…
awarner has joined #ruby
rondale__ has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
thisirs has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
maesbn has quit [Remote host closed the connection]
iamjarvo has joined #ruby
eldariof has quit [Ping timeout: 252 seconds]
skcin7 has quit [Ping timeout: 265 seconds]
dborges has joined #ruby
elsifaka has quit [Quit: Veloma e!]
nanothief has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
<apeiros_>
lessless: had any success?
<lessless>
sure, there is a gem for it! ;)
zomgbie has quit [Read error: Connection reset by peer]
<apeiros_>
oh, do tell
generalissimo has joined #ruby
banister`sleep has quit [Remote host closed the connection]
jgrevich_ has joined #ruby
baroquebobcat has joined #ruby
nanothief has quit [Ping timeout: 255 seconds]
vlad_starkov has joined #ruby
banister`sleep has joined #ruby
<apeiros_>
lessless: ?
jgrevich has quit [Ping timeout: 264 seconds]
jgrevich_ is now known as jgrevich
<lessless>
check out levenshtein-ffi
banister`sleep has quit [Remote host closed the connection]
bananastalktome has joined #ruby
thams has quit [Quit: thams]
<apeiros_>
hm, I'd say levenshtein is a bad fit for text similarity
<apeiros_>
that's per-character
<apeiros_>
I'd use something like https://github.com/makaroni4/amatch with e.g. jarowinkler (that's the one I use, I didn't think it'd scale so well to larger texts)
replore_ has quit [Remote host closed the connection]
<apeiros_>
you might also want to use something like ruby-stemmer to first stem the text. not sure how well that plays along with jaro, though
mfridh has quit [Ping timeout: 250 seconds]
lurch_ has quit [Quit: lurch_]
vlad_starkov has quit [Ping timeout: 255 seconds]
banjara has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
jprovazn has quit [Quit: Leaving]
_bart has joined #ruby
norm has joined #ruby
axl_ has quit [Quit: axl_]
phelps has quit [Ping timeout: 256 seconds]
woolite64 has joined #ruby
<norm>
i've got a UTF-8 encoded string that is invalid. i run it through .encode("UTF-8", :invalid => :replace). the result of .valid_encoding? is now true (good), but when i try to .squeeze it, i get "invalid byte sequence in UTF-8"
<norm>
any ideas?
aganov has quit [Remote host closed the connection]
<_bart>
So I have installed the new relic gem, created the config/newrelic.yml file, but I don't see new relic inserted in my public/index.html file. (I'm not using Rails), what to do?
<k610>
my ruby process gets : "Killed" when i run it on a lower spec machine with same rvm config ? how can i check the logs for what happened ?
<atmosx>
k610: what process is it? maybe too much ram resources are needed
friskd has quit [Quit: friskd]
<atmosx>
k610: you on windows?
<k610>
i think i have a memory leak in my script
thmzlt has quit [Remote host closed the connection]
nwertman has joined #ruby
<apeiros_>
norm: insufficient information. I suggest you provide the string you originally have (.unpack("C*") and provide the resulting array)
<k610>
okay found that it's better to create a new instance of Mechanize.new for each page i request
cascalheira has joined #ruby
<k610>
when i ran this script which leaked sometimes my unix box would kill the process outputing "Killed" buy sometimes it would freeze the whole machine. How can I avoid any freeze when i run a ruby script ?
<norm>
apeiros_: it's a binary file of considerable size :)
<apeiros_>
_bart: you probably want #rubyonrails, not #ruby
<apeiros_>
norm: then reduce your problem first.
mahmoudimus has joined #ruby
<apeiros_>
find a subset of the string for which that error still exists.
<_bart>
apeiros_: no, this is no way related to rails
<nkts>
HI, how to debug ruby variables and objects? I'm a bit tired of "puts .." in my code only for debug purposes
subr00t has joined #ruby
Godd2 has quit [Ping timeout: 245 seconds]
xclite has joined #ruby
<apeiros_>
nkts: gdb, pry, ruby-debug
<nkts>
but it's interactive
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
<apeiros_>
nkts: don't know what you're trying to tell me with that.
phelps has joined #ruby
MikeH has joined #ruby
<MikeH>
Hi, whilst I'm not a ruby dev - does this error mean anything useful to anyone here? http://pastebin.com/WY7Qr6TL
<k610>
so how can i prevent a ruby script to crash my machine when i run it ?
bananastalktome has quit [Quit: bananastalktome]
havenn has joined #ruby
entrenador has quit [Ping timeout: 264 seconds]
<eka>
k610: by not running it?
<apeiros_>
MikeH: it means that you're trying to process non-utf-8 data as utf-8
<Kuifje>
eka: flawless logic
<apeiros_>
k610: use a proper OS? (a crashing app should not crash your machine…)
joeycarmello has joined #ruby
<Mon_Ouie>
MikeH: Either that CFPropertyList is misinterpreting encodings in the file or the files you're processing are misformated
<dborges>
k610: nice -n 20 ruby myscript.rb
banjara has quit [Ping timeout: 264 seconds]
thmzlt has joined #ruby
<_nitti>
it is one hell of a thing to get a ruby script to crash your machine.
mneorr has joined #ruby
<Mon_Ouie>
system "halt" :p
<Mon_Ouie>
(well, that's not a brutal crash — just a shutdown)
<k610>
dborges, thx i'll try that
berserkr has joined #ruby
<MikeH>
apeiros_, Mon_Ouie: Given that there is no input from the terminal, could my terminal encoding have an impact on that? (Either locally to my machine, or to the remote server I'm running the application on?)
<k610>
apeiros_, i'm on ubuntu 10.04 but have only 300mb ram and running some other heavy processes
Axsuul has joined #ruby
Vendethiel has joined #ruby
<Vendethiel>
mmh
schaary has quit [Quit: Leaving.]
<apeiros_>
k610: so?
<apeiros_>
k610: that means your machine will swap and become slow. that's not crash.
<Vendethiel>
hi. I can define self.+@ on a class, true ? Why can't I define self.a@, ie ? (also, I'm struggling to find where .+@ is initially defined)
<apeiros_>
if your machine becomes too slow, either upgrade your machine or write better code.
entrenador has joined #ruby
<Mon_Ouie>
MikeH: No, that library is processing property list files. The encoding of those files matter. But your locales do affect the default encoding used by Ruby.
<hoelzro>
Vendethiel: it's special
<apeiros_>
Vendethiel: only +@ and -@ exist
<apeiros_>
and those are for prefixed calls. e.g. -a, +b
zomgbie has joined #ruby
<Vendethiel>
I got this one ;). It's pretty amazing. Where are those defined ?
<k610>
apeiros_, it's a remote vm once it hangs my ssh disconnects and i cannot control the rogue script
dborges has quit [Quit: Leaving]
<eka>
k610: you made that script or is a 3rd party? make sure there is no malicious code
<Vendethiel>
(on which class/module, I mean)
hoelzro is now known as hoelzro|away
<waxjar>
i'm guessing Fixnum Vendethiel
<k610>
eka, i solved the script already need to Mechanize.new before each agent.get when doing many agent.get
<apeiros_>
k610: man nice/renice
nilg has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<apeiros_>
k610: also not really a ruby issue
phelps has quit [Ping timeout: 265 seconds]
<Vendethiel>
waxjar: apparently not (?)
<apeiros_>
if a ruby based process can turn your machine unusable, then any process can.
<Vendethiel>
ah - there's -@ documented but not +@ (??)
Virunga has quit [Remote host closed the connection]
<apeiros_>
k610: I'd try nice/renice. if that doesn't help, I'd ask in #ubuntu on how to stop a process from consuming too many resources, or rather, why your ssh disconnects…
verto|off is now known as verto
<Vendethiel>
waxjar: thanks :)! Fixnum also has a -@. Thanks for your quick answers guys
verto is now known as Guest89218
hsbt has quit [Ping timeout: 272 seconds]
<apeiros_>
Vendethiel: ah, gah, forgot false in .instance_methods(false)
phelps has joined #ruby
<apeiros_>
Vendethiel: anyway, 5.method(:-@).owner could have told you
Guest89218 is now known as verto
<apeiros_>
it seems Fixnum actually adds -@ on its own again
<Vendethiel>
ah, I was looking for that. thanks !
buibex_ has joined #ruby
<Vendethiel>
yeah
<apeiros_>
but it may well be that it's documented higher up in the hierarchy
Virunga has joined #ruby
buibex has quit [Read error: Connection reset by peer]
dtwdb has joined #ruby
tps_ has joined #ruby
friskd has joined #ruby
cousine has quit [Remote host closed the connection]
gordon1775|2 has quit [Ping timeout: 252 seconds]
Slivka has quit [Remote host closed the connection]
Solnse has joined #ruby
x82_nicole has joined #ruby
mafolz has quit [Remote host closed the connection]
<heftig>
waxjar: like any overloading, needs to be done carefully, or you make your code hard to comprehend
niklasb has joined #ruby
Drewch has quit [Remote host closed the connection]
hsbt_away has joined #ruby
Vendethiel has left #ruby [#ruby]
hsbt_away is now known as hsbt
_nitti has quit [Remote host closed the connection]
Godd2 has joined #ruby
roychri has joined #ruby
Drewch has joined #ruby
JDubs has joined #ruby
<JDubs>
Hey guys! o/
Drewch has quit [Remote host closed the connection]
bairui_ has joined #ruby
<Godd2>
hola JDubs, you still chippin away at Project Euler?
tjbiddle has quit [Ping timeout: 255 seconds]
<JDubs>
Not atm, working on finishing a project
blazes816 has joined #ruby
adkron has joined #ruby
bairui has quit [Ping timeout: 255 seconds]
havenn has quit [Remote host closed the connection]
<JDubs>
Godd2: what you working on?
banjara has joined #ruby
havenn has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<Godd2>
Reading the Java tutorial
alvaro_o has joined #ruby
PragCypher has joined #ruby
jasond has joined #ruby
<arturaz>
ah, java...
a_a_g has joined #ruby
<arturaz>
Godd2, is that for fun or you have to use java? ;) If its for fun, scala is way better choice for a static lang
tjbiddle has joined #ruby
buibex_ has quit [Read error: Connection reset by peer]
tjbiddle_ has joined #ruby
havenn has quit [Ping timeout: 265 seconds]
_alejandro has quit [Remote host closed the connection]
lowkey has quit [Ping timeout: 246 seconds]
<lectrick>
agreed on scala. really makes the JVM look like the best part of Java
lowkey has joined #ruby
bbttxu has quit [Quit: bbttxu]
<Godd2>
self-marketability
samphippen has quit [Quit: Computer has gone to sleep.]
<JDubs>
Godd2: you go bro :)
tjbiddle has quit [Ping timeout: 255 seconds]
tjbiddle_ is now known as tjbiddle
axl_ has joined #ruby
_bart has quit [Quit: _bart]
yshh has joined #ruby
<wildcard0>
the jvm is totally the best part of java :)
<Godd2>
certainly its popularity is something to account for
hoelzro|away is now known as hoelzro
<Godd2>
not saying that makes the language itself better
graeme has joined #ruby
<wildcard0>
ive had a lot of luck using it to bridge languages. so i have some jruby code that works with jython code and maybe even some actual java code
<wildcard0>
compile them all out to classes, it all works fairly well
arietis has joined #ruby
hsbt has quit [Ping timeout: 255 seconds]
davidcelis has joined #ruby
kil0byte has quit [Remote host closed the connection]
<JDubs>
Godd2: do you use vim?
<Godd2>
JDubs: I do not. I know its capabilities but Im in NetBeans right now
Solnse has quit [Ping timeout: 255 seconds]
<JDubs>
Hmm
voodoofish430 has joined #ruby
<JDubs>
Anyone use vim that can help me with a copy paste problem? I can copy/paste inside vim, but not paste to an outside application like my web browser :(
tPl0ch has quit [Quit: Verlassend]
<clooth>
howdy bros
<clooth>
o/
<Godd2>
try copying form visual mode
punkrawkR has joined #ruby
cousine has quit [Remote host closed the connection]
banjara has quit [Ping timeout: 255 seconds]
tjasko__ has quit [Read error: Connection reset by peer]
hsbt_away has joined #ruby
hsbt_away is now known as hsbt
<hoelzro>
JDubs: what OS? are you using mouse mode? terminal or GVim?
pyr0commie has joined #ruby
tungd has quit [Quit: leaving]
itchyouch has joined #ruby
<Godd2>
JDubs: yea I just opened GVim and I can copy from vim to browser
<supertramp`>
hello, i've been here earlier because i had a problem installing a gem
hoelzro is now known as hoelzro|away
<supertramp`>
i get the message "libbz2 not found, maybe try manually specifying --with-bz2-dir to find it?" as i try to run "gem install bzip2-ruby -- --with-bz2-dir="C:\bzip2\"
punkrawkR^Home has quit [Ping timeout: 252 seconds]
<supertramp`>
any solution? google didn't really help out
alexspeller has quit [Remote host closed the connection]
cousine has joined #ruby
_nitti has joined #ruby
pratz has joined #ruby
pratz has left #ruby [#ruby]
igor_ has joined #ruby
<supertramp`>
i wonder why it does that because i don't think i've done anything wrong with unpacking bzip2 as i downloaded it from the official site
<Godd2>
lol SQL is the second most requested language job on craigslist
apeiros_ has quit [Remote host closed the connection]
blaxter has quit [Ping timeout: 246 seconds]
<emergion>
Anyone know of an equivalent to`encode_www_form' for Ruby 1.8.7
lurch_ has joined #ruby
<emergion>
? Just pulled an all nighter, deployed to a server running 1.8.7, kablam
schaerli has joined #ruby
mneorr_ has joined #ruby
mrsolo has joined #ruby
Guest is now known as asteve
sn0wb1rd has quit [Quit: sn0wb1rd]
asteve has quit [Changing host]
asteve has joined #ruby
Mon_Ouie has joined #ruby
_Mon_Ouie_ has quit [Ping timeout: 264 seconds]
lurch_ has quit [Client Quit]
xrl has left #ruby [#ruby]
sn0wb1rd has joined #ruby
gridaphobe has joined #ruby
tjbiddle_ has joined #ruby
io_syl has joined #ruby
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle_ is now known as tjbiddle
mneorr_ has quit [Remote host closed the connection]
pcarrier has joined #ruby
fred909 has joined #ruby
mascool has joined #ruby
chussenot has quit [Quit: chussenot]
arietis has quit [Quit: Computer has gone to sleep.]
elico has joined #ruby
KevinSjoberg has joined #ruby
browndawg has quit [Quit: Leaving.]
mneorr has joined #ruby
pu22l3r has joined #ruby
hemanth_ has quit [Read error: Connection timed out]
hemanth_ has joined #ruby
arietis has joined #ruby
Phoop has quit [Quit: Phoop]
bricker`away is now known as bricker
burgestrand has joined #ruby
axl__ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
pewter_tao has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
maletor has joined #ruby
axl_ has quit [Ping timeout: 264 seconds]
axl__ is now known as axl_
generalissimo has quit [Remote host closed the connection]
hydrozen has joined #ruby
k610 has quit [Ping timeout: 250 seconds]
maletor has quit [Read error: Connection reset by peer]
maletor_ has joined #ruby
mneorr has quit [Remote host closed the connection]
maletor_ has quit [Max SendQ exceeded]
yshh has quit [Remote host closed the connection]
<hydrozen>
Hi. I'm using couchrest to do some requests on a couchdb database…. I'm running my code on a vagrant virtual machine and I randomly get this error when running a task that does a lot of requests: Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2). The error does not seem to occur if I run my code on my mac instead of the VM (but the database is still running on the VM). What does Errno::EADDRNOTAVAIL anyways?
<hydrozen>
It's occuring in net/http.
Briney has joined #ruby
maletor has joined #ruby
<JDubs>
Can anyone help me with vim please? I can't get copy to paste outside of vim :(
<tworkin>
JDubs: you want #vim, but the basic problem is that the vim copy-buffer isnt the same thing as the X11 or Gnome clipboard
<tworkin>
use your terminal to copy, not yXy
itchyouch has joined #ruby
<JDubs>
tworkin: No one is helping me in #vim, how do I do that? i just want to pastie to pastie.org
darthdeus has joined #ruby
<hydrozen>
you can't copy paste with the mouse?
samphippen has quit [Quit: Computer has gone to sleep.]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
cek has quit [Ping timeout: 245 seconds]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
cek has joined #ruby
JohnBat26 has joined #ruby
c0rn has joined #ruby
c0rn has quit [Excess Flood]
elux has joined #ruby
<tworkin>
hydrozen: this has to do with TCP implementation differences between osx and your VM. add a pause between calls to connect() / retry the connect() a few times before you give up.
c0rn has joined #ruby
c0rn has quit [Excess Flood]
gridaphobe has quit [Ping timeout: 272 seconds]
lessless has quit [Read error: Connection reset by peer]
<JDubs>
hydrozen: nope :/
<tworkin>
basically the TCP stack isnt quite done with the previous connection yet
c0rn has joined #ruby
c0rn has quit [Excess Flood]
<JDubs>
hydrozen: when I try to do that, copy is greyed out
<tworkin>
use a different terminal...
rismoney1 has left #ruby [#ruby]
<tworkin>
or cat your file to a commandline paste uploader
slainer68 has quit [Remote host closed the connection]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
thatguycraig has left #ruby [#ruby]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
Briney has quit [Quit: Briney]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
<hydrozen>
tworkin: you think I can have that issue even when everything is running in the VM? It's weird, wasn't really happening before and I've been using this VM for a while.
rdark has quit [Quit: leaving]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
Briney has joined #ruby
<Godd2>
JDubs: ctrl+c
<tworkin>
yeah
subr00t has quit [Read error: Connection reset by peer]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
zigomir has quit [Quit: zigomir]
<Godd2>
if you yank a line, it will copy the text to the vim clipboard
<apeiros_>
banister`sleep: so if you'd edit -i 1 again after [2], you'd still get the original? (that'd be good IMO :-) )
<banister`sleep>
apeiros_: yes you do
<banister`sleep>
apeiros_: the original stays intact
<apeiros_>
great, then I didn't pay enough attention when I watched your last one :)
darthdeus has joined #ruby
<apeiros_>
makerbreakr: and where do you have problems with that?
emmanuelux has joined #ruby
supertramp has joined #ruby
bluOxigen has joined #ruby
supertramp is now known as Guest13002
<apeiros_>
makerbreakr: Hash#include? tests against the keys, not the values
<makerbreakr>
ah
<apeiros_>
ri Hash#include?
<apeiros_>
(in your shell)
<apeiros_>
or if you use pry: `? Hash#include?` (in pry)
rezzack has joined #ruby
Briney has quit [Quit: Briney]
banjara has joined #ruby
entrenador has quit [Quit: leaving]
vlad_starkov has quit [Remote host closed the connection]
Slivka has quit [Read error: Connection reset by peer]
gbchaosmaster has joined #ruby
mneorr has joined #ruby
Slivka has joined #ruby
Briney has joined #ruby
dmerrick has joined #ruby
<JDubs>
Why would this line give me "comparison of string with nil failed" ?
<JDubs>
state_data = state_data.sort_by{|s, c| s unless s.nil?}
<JDubs>
state_data is a hash
icole has joined #ruby
replore has joined #ruby
huoxito has joined #ruby
Banistergalaxy has quit [Ping timeout: 256 seconds]
andrewhl_ has joined #ruby
andrewhl has quit [Ping timeout: 265 seconds]
geekbri has quit [Remote host closed the connection]
<apeiros_>
JDubs: because your sort_by block returns nil in some cases
replore has quit [Ping timeout: 255 seconds]
etehtsea has joined #ruby
<canton7>
JDubs, what are you trying to achieve when s is nil?
<apeiros_>
try ["foo", nil].sort
<apeiros_>
(that's the minimal case of what happens)
<JDubs>
apeiros_ but there aren't any nil blocks in my hash...
<apeiros_>
JDubs: ruby claims otherwise
<apeiros_>
or you're misrepresenting the error you got
Banistergalaxy has joined #ruby
<JDubs>
apeiros_ I added a .flatten just in case now, but now im getting a cannot compare string with fixnum
<apeiros_>
flatten does not remove nils
subr00t has joined #ruby
<apeiros_>
and "just in case" measures mean you're doing something wrong IMO.
<apeiros_>
JDubs: what are you trying to do?
<JDubs>
apeiros: just wanted to see if that would make it work, I did a puts to check the hash, I see no nil elements
<apeiros_>
JDubs: ok, we can keep guessing or you can provide a reproduceable case
<apeiros_>
I say your hash contains nil as key
<apeiros_>
or your error happens somewhere else
_alejandro has joined #ruby
<apeiros_>
also, note that after sort_by (a successful one, of course), state_data will be an array (of [key, value] arrays)
<JDubs>
apeiros_ good to know! thanks
<JDubs>
:)
doodleha_ has joined #ruby
doodlehaus has quit [Read error: Connection reset by peer]
<JDubs>
apeiros_ btw you were right, there was a nil, I couldn't see it because I was using my gedit term which is white text on grey background with no colorcoding lol.
<makerbreakr>
how would you guys go about deleting all files in a directory, unless it is a :title in a hash?
burgestrand has quit [Quit: Leaving.]
fms has joined #ruby
fms is now known as ebobby
wermel has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 260 seconds]
<apeiros_>
makerbreakr: I'd convert that assets thingy of yours into a single set (ri Set) of titles
<apeiros_>
hm, actually… an array is sufficient
<apeiros_>
then I'd glob the target directory, and then use Array#- to determine which files to delete
_Mon_Ouie_ has joined #ruby
Steppen has joined #ruby
banister`sleep has quit [Ping timeout: 250 seconds]
<bricker>
How would you say, "remove any hyphens from the end of a string"? str.gsub(/-{1,}$/, "") ... or is there a better way, maybe using "chomp"?
pewter_tao has left #ruby [#ruby]
<apeiros_>
bricker: {1,} == +
<apeiros_>
and in your case, just -* is fine
fred909 has quit [Ping timeout: 252 seconds]
<apeiros_>
bricker: also, $ is *not* end of string. \z is. $ is end of line.
<bricker>
apeiros_: thanks - this is only a one-line string anyways, but I appreciate the clarification
axl_ has quit [Quit: axl_]
<JDubs>
apeiros: wow I just found out that I can use multiple arguments for enumerators for arrays >1d!! xD
tvw has joined #ruby
<bricker>
apeiros_: /-*\z/ is better, thanks!
axl_ has joined #ruby
<apeiros_>
bricker: since it's only a single replacement, you can also use sub instead of gsub
My_Hearing has quit [Ping timeout: 272 seconds]
<apeiros_>
(I doubt it makes a difference, though)
eroc has quit [Quit: eroc]
aetcore has left #ruby [#ruby]
riley526 has joined #ruby
thmzlt has quit [Remote host closed the connection]
<bricker>
apeiros_: does it really make a difference in this case if I use -+ or -* ?
doodlehaus has joined #ruby
<apeiros_>
no idea
<bricker>
It seems saying "match 0 or more hyphens at the end of the string", because that doesn't really make sense
<apeiros_>
the result is the same
<bricker>
seems weird*
<bricker>
okay, thanks
rippa has quit [Ping timeout: 260 seconds]
<apeiros_>
you'd have to test whether performance of one is better than the other
<bricker>
apeiros_: probably negligible on a ~50 character string
<apeiros_>
probably
<yxhuvud>
depends on how often you do it
ryanf has quit [Quit: leaving]
doodleha_ has quit [Ping timeout: 245 seconds]
<yxhuvud>
though I'd expect + and - to have roughly the same performance. Just avoid having multiple so that you won't get any backtracking. *that* can kill performance.
<kirotan>
What's a good gui toolkit, other than shoes?
<yxhuvud>
*+ and *
<bricker>
apeiros_: thanks for the suggestion about "sub" though, it's significantly faster than gsub
<apeiros_>
bricker: really?
dtwdb has quit [Quit: Page closed]
<apeiros_>
that's unexpected
havenn has quit [Remote host closed the connection]
<bricker>
apeiros_: yes, and * is about 1/3 faster than +
<bricker>
apeiros_: said that backwards, + is faster
havenn has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
andrewhl_ has quit [Ping timeout: 272 seconds]
elaptics is now known as elaptics`away
<cek>
multiplication is faster? that's something
katherinem13 has quit [Quit: Might IS right.]
<bricker>
cek: sorry, talking about regular expression
geekbri has joined #ruby
andrewhl has joined #ruby
<apeiros_>
bricker: ah, ok. that's not surprising :) but sub is indeed faster than gsub in this case (~20% on a large set of iterations), which surprises me (since the sub is at the end of the string, so gsub can terminate all the same)
<swarley>
because /(?:foo)*/ is about the same as doing /(?:(?:foo)+)?/
katherinem13 has joined #ruby
jjbohn has quit [Quit: Leaving...]
gordon1775|2 has joined #ruby
havenn has quit [Ping timeout: 244 seconds]
andrewhl_ has joined #ruby
keyvan has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
gbchaosmaster has quit [Ping timeout: 250 seconds]
andrewhl has quit [Read error: Connection reset by peer]
thams has quit [Quit: thams]
thams has joined #ruby
AndChat| has joined #ruby
cousine has quit [Remote host closed the connection]
Jasko has quit [Read error: Connection reset by peer]
elux has quit [Quit: Bye!]
Jackneill is now known as Guest25886
<JDubs>
Okay guys: http://pastie.org/5544234 <--If I use a single method, everything works fine on its own...However when I call more than one method, any method after the first does not work for some reason. Could it have to do with @file?
gyre007 has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 272 seconds]
cjs226 has joined #ruby
<swarley>
JDubs; you have to give more information than that
<JDubs>
swarley: ummm
manizzle has joined #ruby
<swarley>
What do you mean it only works when you call a single method
<swarley>
What's the error output?
<JDubs>
No error, just the subsequent methods no longer generate output
Kruppe has quit [Ping timeout: 252 seconds]
<JDubs>
I don't know a lot about how IO works, but could it be after the first method reads a file, now the reader is at the end of the file so nothing else can be loaded by the methods?
fred909 has joined #ruby
<swarley>
I'm not sure how CSV works as far as IO, but you may want to try adding @file.rewind to the end of a method to see
kn330 has quit [Read error: Connection reset by peer]
darthdeus has joined #ruby
tjbiddle has quit [Ping timeout: 260 seconds]
tjbiddle_ is now known as tjbiddle
<Guest13002>
could someone help me out installing bzip2? im getting a few errors
Guest13002 is now known as supertramp`
banister`sleep has quit [Remote host closed the connection]
banister`sleep has joined #ruby
pen has joined #ruby
geekbri has quit [Remote host closed the connection]
io_syl has joined #ruby
rakl has quit [Quit: sleeping]
<bricker>
Is there a pattern for having a module that adds behavior to the initialization of the included object, without having to call "super" in every class which includes the module? Maybe this is a dumb question
aetcore has joined #ruby
aetcore has left #ruby [#ruby]
rakl has joined #ruby
<mjbjr>
I'm using 'x.slice!(/\$.*/)' to return dollar amount substrings, how do I return only the first occurrence of one of those?
cousine has joined #ruby
hemanth_ has joined #ruby
cousine has quit [Remote host closed the connection]
qwerxy has joined #ruby
hemanth_ has quit [Max SendQ exceeded]
jtharris has joined #ruby
hemanth_ has joined #ruby
banister`sleep has quit [Ping timeout: 272 seconds]
hemanth_ has quit [Max SendQ exceeded]
<burgestrand>
bricker: there is, but unfortunately it is not until ruby 2.0 that comes out in february. ruby 2.0 preview is out now, however.
neurotech has joined #ruby
hemanth_ has joined #ruby
chichou has quit [Remote host closed the connection]
<burgestrand>
bricker: what you can do is rename (or save) the first method, undefine it, redefine it with your own method, and then do your magic.
zastern has joined #ruby
nomenkun has quit [Remote host closed the connection]
<burgestrand>
… possibly.
<bricker>
burgestrand: interestingm
<zastern>
Is there a way to put multiple booleans in the conditions for a single if statement? Right now I'm doing it by nesting if statements, and I feel like that can't *possibly* be right
<burgestrand>
zastern: yes, by logical AND
bairui_ is now known as bairui
<burgestrand>
zastern: if something && something_else && something_else…
<neurotech>
In this example from GitHub's ruby style guide: email_with_name = "#{user.name} <#{user.email}>" - what's the difference between #{} and <#{}> ?
<zastern>
burgestrand: hmm I tried to use AND and i got a syntax error
<zastern>
burgestrand: oh with &&, ok, i tried an actual AND
<zastern>
thanks!
<burgestrand>
zastern: hehe, I say AND because you can use "&&" or "and" (lowercase), but they have slightly different meanings
<zastern>
burgestrand: mm alright. well, i know bash, so && sits right with me
<apeiros_>
neurotech: that there's a < > in the resulting string around that ;-)
<burgestrand>
zastern: in most cases, what you want is "&&", and it behaves like you expect
<neurotech>
Oh right
<neurotech>
hah
<neurotech>
thanks apeiros_
qwerxy has quit [Client Quit]
andrewhl has joined #ruby
Kuifje has quit [Ping timeout: 272 seconds]
mjbjr has left #ruby ["Leaving"]
chichou has joined #ruby
chichou has quit [Remote host closed the connection]
banister`sleep has joined #ruby
tenmilestereo has quit [Quit: Leaving]
bradhe has quit [Ping timeout: 265 seconds]
hemanth_ has quit [Max SendQ exceeded]
rakl has quit [Ping timeout: 252 seconds]
hemanth_ has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
rakunHo_ has quit [Read error: Connection reset by peer]
hemanth_ has quit [Max SendQ exceeded]
r0bby has joined #ruby
pu22l3r has quit [Ping timeout: 260 seconds]
hemanth_ has joined #ruby
replore has joined #ruby
slash_me is now known as slash_nick
alexspeller has joined #ruby
Morkel has quit [Quit: Morkel]
rakl has joined #ruby
bricker has quit [Ping timeout: 244 seconds]
doodleha_ has joined #ruby
hemanth_ has quit [Max SendQ exceeded]
robbyoconnor has quit [Ping timeout: 252 seconds]
hemanth_ has joined #ruby
bricker has joined #ruby
doodlehaus has quit [Ping timeout: 265 seconds]
robotmay_ has joined #ruby
replore has quit [Ping timeout: 244 seconds]
robotmay has quit [Read error: Connection reset by peer]
enderonrails has joined #ruby
mercwithamouth has joined #ruby
hemanth_ has quit [Max SendQ exceeded]
GoGoGarrett has quit [Remote host closed the connection]
thatguycraig has joined #ruby
hemanth_ has joined #ruby
hemanth_ has quit [Max SendQ exceeded]
enderonrails has left #ruby [#ruby]
hemanth_ has joined #ruby
hemanth_ has quit [Max SendQ exceeded]
zommi has quit [Quit: Leaving.]
zomgbie_ has quit [Ping timeout: 244 seconds]
zomgbie has joined #ruby
hemanth_ has joined #ruby
schaerli has quit [Remote host closed the connection]
jrajav has quit [Quit: I tend to be neutral about apples]
rellin has joined #ruby
SeoxyS has joined #ruby
kenneth has quit [Read error: Connection reset by peer]
skaczor has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 252 seconds]
EPIK has quit []
<reactormonk>
zastern, in which direction?
hemanth_ has joined #ruby
zastern_ has joined #ruby
mengu_ has quit [Quit: Konversation terminated!]
bradhe has joined #ruby
fryguy has left #ruby ["WeeChat 0.3.9"]
jeffreybaird has quit [Quit: jeffreybaird]
zastern has quit [Ping timeout: 260 seconds]
kil0byte has joined #ruby
sailias has quit [Quit: Leaving.]
<mattsgarrison>
My Google-fu has failed me, I was hoping someone could help. For reference, this is in a Rails project but I think it's a generic Ruby question. I've got a namespace "Problems", within that I've got a bunch of classes with various names (read: not predictable), but which share a base class that provides a common interface, though unique logic to each problem class. I'm looking for a way to essentially iterate through the classes within the namespace a
<mattsgarrison>
nd call a method that accepts an argument. Since they're lazily loaded, Namespace.constants is an empty array until each class has been used. Is there another or better way to "discover" the class names within a namespace?
zomgbie has quit [Quit: Lost terminal]
tommyvyo has quit [Ping timeout: 272 seconds]
<zastern_>
apeiros_: zed shaw said so on twitter, thats why i ask
<apeiros_>
mattsgarrison: lazy loaded means those classes don't exist
<apeiros_>
you can't iterate something that doesn't exist
<apeiros_>
and .constants would be the way. but as you already figured, that only works for existing things.
ukd1 has joined #ruby
hotovson has quit [Remote host closed the connection]
<apeiros_>
mattsgarrison: what you can do is just preload all classes instead of using the lazy loading mechanism
main has quit [Read error: Connection reset by peer]
bradhe has quit [Remote host closed the connection]
pwelch_ has joined #ruby
pwelch_ has quit [Client Quit]
doodleha_ has quit [Remote host closed the connection]
kil0byte has quit [Remote host closed the connection]
JDubs has quit [Quit: JDubs]
rondale_sc has quit [Quit: rondale_sc]
replore has joined #ruby
kil0byte has joined #ruby
<mattsgarrison>
apeiros: thanks
pwelch has quit [Ping timeout: 272 seconds]
cakehero has joined #ruby
_nitti has quit [Remote host closed the connection]
berserkr has quit [Quit: Leaving.]
io_syl has quit [Ping timeout: 246 seconds]
main has joined #ruby
tommyvyo has joined #ruby
adkron has joined #ruby
billy_ran_away has quit [Read error: Operation timed out]
cakehero has quit [Client Quit]
billy_ran_away has joined #ruby
replore has quit [Ping timeout: 255 seconds]
kil0byte has quit [Remote host closed the connection]
io_syl has joined #ruby
cakehero has joined #ruby
ukd1 has quit [Quit: leaving]
hemanth_ has quit [Read error: Connection reset by peer]
catphish has joined #ruby
jaygen_ has joined #ruby
jaygen has quit [Read error: Operation timed out]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
atmosx has joined #ruby
medik has joined #ruby
medik has quit [Excess Flood]
andrewhl has quit [Ping timeout: 272 seconds]
medik has joined #ruby
hemanth_ has joined #ruby
<catphish>
if i want to ensure that only one thread is allowed access to a resource (identified by a fixnum for example), is there a simple way to check if the resource id is in a hash and if not, add it instantaneously?
jaygen_ has quit [Read error: Operation timed out]
io_syl has quit [Read error: Operation timed out]
cjs226 has quit [Ping timeout: 260 seconds]
jaygen has joined #ruby
jaygen has quit [Remote host closed the connection]
<catphish>
or will i need to create a lock to check and set the value
tjbiddle_ has joined #ruby
hemanth_ has quit [Max SendQ exceeded]
jtharris has quit [Read error: Connection reset by peer]
<catphish>
i wondered if a simple ($resources[id] ||= Thread.current) == Thread.current was a good enough locking mechanism
lenovodroid has joined #ruby
tjbiddle_ has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby
wargasm has quit [Ping timeout: 250 seconds]
<catphish>
or whether i need to put a mutex around such an operation
tjbiddle has quit [Ping timeout: 244 seconds]
io_syl has joined #ruby
hemanth_ has joined #ruby
jtharris has joined #ruby
tjbiddle has joined #ruby
supertramp` has quit [Ping timeout: 248 seconds]
eph3meral has joined #ruby
lenovodroid has quit [Read error: Connection reset by peer]
<stompyj>
catphish: thanks, I couldn't find one either. Trying to figure out if theres a faster way to deploy it besides building it. It's 90% of our chef build time
pewter_tao has joined #ruby
<catphish>
i build manually in production
ddd1 has joined #ruby
<catphish>
doesn't really need to happen often
<pewter_tao>
I've result = something, and return (result[1])
<pewter_tao>
how do I get it to output the return value?
ddd is now known as Guest99517
<catphish>
you could tar up your own build
<catphish>
but i hate doing that
ddd1 is now known as ddd
tommylommykins is now known as tommylommykkkins
freeayu has joined #ruby
headius has quit [Quit: headius]
Guest99517 has quit [Ping timeout: 245 seconds]
nanothief has joined #ruby
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
sealeaf1 has joined #ruby
<sealeaf1>
Hi, does anyone here use Spinach?
ViperMaul|_ has quit [Read error: Connection reset by peer]
<pewter_tao>
havenn: hmm it still fails out of checking files
<havenn>
pewter_tao: What does your code look like? Gist?
Nykolla_ has quit [Ping timeout: 272 seconds]
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
<havenn>
I'm not sure I understand what you're doing. If you exit 1, the script will exit. If want to get a list of the failures, check command #success? and make a list of them, you can exit 1 at the very end (if you want?) when there is 1 or more failure.