<snkcld>
centrx: i am profiling my jruby app, and i notice that the Kernel.Integer call seems to occupy the most time for my app
rbenv has joined #ruby
bigmac has joined #ruby
bigmac is now known as i8igmac
<snkcld>
i am reading from a CSV file, and inserting into a database for each row, is there any thing i should be considering, that may be causing this mass amount of time in kernel.integer?
iamdoo2 has quit [Ping timeout: 260 seconds]
parduse has quit [Ping timeout: 260 seconds]
rbenv is now known as ohwhoa
<sickweezle>
take care benzrf|afk
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
LexicalScope has joined #ruby
ZadYree has quit [Read error: Connection reset by peer]
iajrz_ has left #ruby [#ruby]
<centrx>
snkcld, It probably means that Integer is being called an excessive number of times, but the speed of each individual call is fast.
<centrx>
snkcld, Would have to see the code
<sickweezle>
snkcld: So, you're converting a CSV to database records?
asteros_ has joined #ruby
<centrx>
Yeah that is another thing, just load the CSV directly into the database without Ruby
clamstar has quit [Quit: Computer has gone to sleep.]
kenneth has quit [Quit: kenneth]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
danshultz has joined #ruby
Megtastique has quit []
kenneth has joined #ruby
tauebel has quit [Quit: Leaving.]
tauebel has joined #ruby
mary5030 has joined #ruby
asteros has quit [Ping timeout: 265 seconds]
asteros_ is now known as asteros
Megtastique has joined #ruby
thesheff17 has quit [Ping timeout: 248 seconds]
cbetta_afk is now known as cbetta
rootshift has joined #ruby
khfeng has quit [Ping timeout: 252 seconds]
<snkcld>
sickweezle: yes
<snkcld>
importing data from a csv, then saving it to a database
bradhe has quit [Remote host closed the connection]
blaz3rz has joined #ruby
<snkcld>
i imagine that every csv field is going to be a string initially, so then must be converted if its going to be stored as an integer, so i am not sure i can avoid this
<centrx>
snkcld, It is much faster to load the CSV directly into the database
mikepack has quit [Remote host closed the connection]
hiall has joined #ruby
IceyEC has joined #ruby
LexicalScope has quit [Ping timeout: 264 seconds]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
tauebel has quit [Quit: Leaving.]
graft has quit [Read error: Operation timed out]
<benzrf>
hmm
mikepack has joined #ruby
<benzrf>
where should i put the js in this project
gja has joined #ruby
gja has joined #ruby
<benzrf>
lib/?
dawkirst has joined #ruby
blaz3rz has joined #ruby
fgo has quit [Remote host closed the connection]
bradhe has joined #ruby
Spami has joined #ruby
tauebel has joined #ruby
robbyoconnor has joined #ruby
fedesilva has joined #ruby
sgnl has joined #ruby
<benzrf>
hello?
sgnl has left #ruby [#ruby]
<benzrf>
would it be reasonable for my middleware to serve a js page directly at a predefined url, or should I make it the user's responsibility to server the script?
<benzrf>
*serve
<centrx>
Is this a PHP question
<benzrf>
what?
blaz3rz has quit [Ping timeout: 245 seconds]
bradleyprice has quit [Ping timeout: 265 seconds]
<centrx>
This channel is now only for PHP
<centrx>
You have travelled back in time, Sir
* benzrf
neatly removes centrx's hands
bradhe has quit [Ping timeout: 252 seconds]
Megtastique has quit []
bradleyprice has joined #ruby
atmosx has quit [Quit: Lost in trance]
<terrellt>
benzrf: Confused. Is this rails?
<benzrf>
no, rack middleware
Megtastique has joined #ruby
<terrellt>
Isn't it strange for middleware to ship with assets? I dunno. I don't think I'd make ruby serve it up, too slow.
kewubenduben has joined #ruby
freerobby has quit [Quit: Leaving.]
allaire has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
necrotic_ has joined #ruby
wynyard has joined #ruby
necrotic_ has quit [Remote host closed the connection]
phutchins has quit [Remote host closed the connection]
thomasxie has joined #ruby
kebabski has quit [Ping timeout: 272 seconds]
<benzrf>
hmm
bradhe has joined #ruby
matchaw has quit [Remote host closed the connection]
Brolen has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
saarinen has joined #ruby
tacos1de has joined #ruby
apeiros has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
kewubenduben has quit [Ping timeout: 240 seconds]
Wolland has quit [Remote host closed the connection]
matchaw has joined #ruby
v0n has joined #ruby
RoxasShadowRS has quit [Read error: Connection reset by peer]
<centrx>
I have entered #php
<benzrf>
ew
<centrx>
One of them is saying regex is crap
<centrx>
The better way is to use: if (strlen($hex) == 32 && $hex === filter_var($hex, FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX))
fgo has joined #ruby
rljohnsn has quit [Quit: Leaving.]
Cooler_ has quit []
Virtualize|away has joined #ruby
hfp is now known as hfp`away
aryaching has quit [Ping timeout: 272 seconds]
pietr0 has joined #ruby
Megtastique has quit []
bradhe has quit [Remote host closed the connection]
h3xdump is now known as hexdump
digital-ghost has quit [Remote host closed the connection]
bricker`1A has joined #ruby
bricker`1A has quit [Client Quit]
mikepack has quit [Remote host closed the connection]
asteros has quit [Quit: asteros]
nhhagen has joined #ruby
IceyEC has quit [Quit: IceyEC]
saarinen has quit [Quit: saarinen]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoyak has quit [Quit: Computer has gone to sleep.]
aryaching has joined #ruby
pietr0 has quit [Quit: pietr0]
pierre1_ has joined #ruby
pierre1_ has quit [Remote host closed the connection]
deric_skibotn has joined #ruby
pierre1_ has joined #ruby
Bumptious has joined #ruby
<deric_skibotn>
Given a bare method name, is there a way to determine at runtime where it lives? I'm trying to debug a sinatra/rspec test and it's not mapping 'get' to Sinatra::Base.get, and I'd like to know what it thinks 'get' is.
Interstellar has left #ruby [#ruby]
<benzrf>
deric_skibotn: method(:get).owner
<deric_skibotn>
thank you
<benzrf>
np
Dude007 has quit [Remote host closed the connection]
<benzrf>
i actually learned about that today because i was having a vaguely related problem :)
<deric_skibotn>
Not documented in pickaxe 1.8 under Method
Brolen has joined #ruby
<benzrf>
i think it's 1.9+
<benzrf>
only
<deric_skibotn>
ok
<deric_skibotn>
I'm using 1.9.3
<benzrf>
wait Norrin
<benzrf>
*no
<benzrf>
huh
butblack has joined #ruby
<deric_skibotn>
thx
asteros has quit [Quit: asteros]
jailbot has quit [Remote host closed the connection]
allaire has quit []
aspires has quit []
benlieb has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
guardianx has joined #ruby
<benzrf>
yup
silentpost has joined #ruby
<sickweezle>
Hmm. If I want to shut down my bot when I start a deploy, I want it in namespace :deploy, and I want "after :started, <thing to call>". I think...
Styles has left #ruby ["Leaving"]
senayar_ has joined #ruby
subbyyy_ has quit [Ping timeout: 272 seconds]
nhhagen has joined #ruby
meatherly has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
<pontiki>
you could have the bot startup/shutdown tasks outside your deploy namespace, there might some other reason to call them not during a deploy
<pontiki>
you'd still have the hooks inside the namespace, tho
aryaching has quit [Ping timeout: 252 seconds]
senayar has quit [Ping timeout: 252 seconds]
<pontiki>
don't take my word for it, tho. i'm still learning capistrano
sassamo has joined #ruby
iamdoo2 has joined #ruby
tauebel has quit [Ping timeout: 248 seconds]
FScottFitzgerald has joined #ruby
<sickweezle>
Already have them outside the name space, so I could troubleshoot.
nhhagen has quit [Ping timeout: 248 seconds]
aryaching has joined #ruby
<sickweezle>
I guess poking about is likely to help me figure out what is going on.
b00stfr3ak has quit [Ping timeout: 240 seconds]
Hobogrammer_ has quit [Ping timeout: 252 seconds]
troyready has quit [Ping timeout: 252 seconds]
nomenkun has joined #ruby
mary5030 has joined #ruby
iamdoo2 has quit [Ping timeout: 245 seconds]
maletor_ has joined #ruby
ianm_ has joined #ruby
estebistec has joined #ruby
dawkirst has quit [Ping timeout: 272 seconds]
mrsolo has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
maletor has quit [Ping timeout: 245 seconds]
bcz1 has joined #ruby
axl_ has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
bcz has quit [Ping timeout: 245 seconds]
dkamioka has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
pr00t has quit [Ping timeout: 272 seconds]
maletor_ has quit [Read error: Connection reset by peer]
fgo has quit [Remote host closed the connection]
<ianm_>
in an app using rubygems, according to ObjectSpace, there are a ton of strings in memory about gems installed, including ones not used. any thoughts on avoid that?
mikepack has joined #ruby
maletor has joined #ruby
Pixels has joined #ruby
blaz3rz has joined #ruby
cbetta is now known as cbetta_afk
jrobertfox has quit [Quit: Take it easy.]
pierre1_ has quit [Remote host closed the connection]
parduse has joined #ruby
pierre1_ has joined #ruby
<centrx>
ianm_, Don't load them all?
snath has joined #ruby
<centrx>
ianm_, What do you mean "an app using rubygems"
Hanmac1 has joined #ruby
pierre1_ has quit [Client Quit]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
bradleyprice has quit [Read error: Connection reset by peer]
pierre1_ has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
<ianm_>
centrx: it's an EventMachine websocket server. I don't think it's loading all gems
mrsolo has left #ruby ["Leaving"]
<sickweezle>
... yeah, I didn't figure it would be as easy as I was thinking. *ponders*
mojjojo has quit [Quit: mojjojo]
dkamioka has joined #ruby
pierre1_ has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
pierre1__ has joined #ruby
silentpost has left #ruby [#ruby]
silentpost has joined #ruby
havenwood has joined #ruby
blaz3rz has quit [Ping timeout: 245 seconds]
pierre1__ has quit [Remote host closed the connection]
pierre1_ has joined #ruby
dawkirst has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
mehlah has quit [Quit: Leaving...]
griffindy has joined #ruby
Bumptious has quit []
mlpinit has quit [Remote host closed the connection]
Bumptious has joined #ruby
ehaliewicz has joined #ruby
pen has quit [Remote host closed the connection]
hamakn has joined #ruby
simoz17 has joined #ruby
dkamioka has joined #ruby
estebistec has quit [Ping timeout: 245 seconds]
rickruby has joined #ruby
simoz18 has joined #ruby
mlpinit has joined #ruby
aryaching has quit [Ping timeout: 265 seconds]
pr00t has joined #ruby
estebistec has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
vpretzel has quit [Remote host closed the connection]
danijoo has quit [Read error: Connection reset by peer]
simoz17 has quit [Ping timeout: 252 seconds]
vpretzel has joined #ruby
danijoo has joined #ruby
benlieb has quit [Quit: benlieb]
maletor has quit [Quit: Computer has gone to sleep.]
sassamo has quit [Remote host closed the connection]
rickruby has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Remote host closed the connection]
sassamo has joined #ruby
shedd has quit [Remote host closed the connection]
nari has joined #ruby
sassamo has quit [Ping timeout: 245 seconds]
Fyyr13 has joined #ruby
danshultz has quit [Remote host closed the connection]
asteros has joined #ruby
danshultz has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
reset has joined #ruby
iamsean has joined #ruby
dkamioka has joined #ruby
axl_ has quit [Quit: axl_]
yfeldblum has joined #ruby
Kricir has joined #ruby
axl_ has joined #ruby
heidi has quit [Quit: Leaving.]
iamsean has quit [Ping timeout: 260 seconds]
danshultz has quit [Ping timeout: 272 seconds]
butblack_ has joined #ruby
butblack has quit [Ping timeout: 265 seconds]
butblack_ is now known as butblack
binaryhat has joined #ruby
x77686d has joined #ruby
Wolland has joined #ruby
* sickweezle
woo!
bradleyprice has joined #ruby
dx7 has joined #ruby
<sickweezle>
YAY! Got it to stop/start daemon as part of the deploy.
yacks has joined #ruby
sensen has joined #ruby
gr33n7007h has quit [Ping timeout: 272 seconds]
Spami has quit [Quit: This computer has gone to sleep]
gr33n7007h has joined #ruby
guardianx has quit [Remote host closed the connection]
fgo has joined #ruby
mocfive has quit [Remote host closed the connection]
rezzack has quit [Ping timeout: 240 seconds]
phinfonet has quit [Quit: exitiing]
bradhe_ has joined #ruby
dx7 has quit [Ping timeout: 272 seconds]
binaryhat has quit [Quit: Leaving]
PrimeFry has joined #ruby
Baluse has quit [Ping timeout: 252 seconds]
hobodave has joined #ruby
butblack has quit [Ping timeout: 265 seconds]
tylersmith has joined #ruby
Baluse has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
davy_ has quit [Remote host closed the connection]
octoberry has joined #ruby
jrhorn424 is now known as zz_jrhorn424
niklasb has quit [Ping timeout: 248 seconds]
benlieb has joined #ruby
rudisimo has quit [Remote host closed the connection]
Lewix has joined #ruby
aryaching has joined #ruby
tylersmith has quit [Ping timeout: 260 seconds]
xcv_ has quit [Remote host closed the connection]
davy_ has joined #ruby
sdwrage has joined #ruby
jpstokes has quit [Remote host closed the connection]
jtdowney has joined #ruby
mary5030 has quit [Remote host closed the connection]
connor_goodwolf has quit [Ping timeout: 245 seconds]
asteros has quit [Quit: asteros]
aryaching has quit [Ping timeout: 252 seconds]
binaryhat has joined #ruby
mj12albert has joined #ruby
khfeng has quit [Ping timeout: 252 seconds]
senayar_ has quit [Remote host closed the connection]
iamdoo2 has joined #ruby
danshultz has joined #ruby
rager has joined #ruby
<rager>
howdy... does anybody know how to use the redis-rb pipeline command?
<rager>
it's got a blank section in the rdoc
connor_goodwolf has joined #ruby
Spami has joined #ruby
iamdoo2 has quit [Ping timeout: 252 seconds]
JasmeetQA has quit [Read error: Connection reset by peer]
FScottFitzgerald has quit []
mlpinit has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
link151 has joined #ruby
mary5030 has joined #ruby
<link151>
what is the best way to build a parameter list to send to a function that needs to conditionally send 3 or 4 parameters
<link151>
but i'm not garunteed i'll have a set limit or page so i want to send the limit / page conditionally, i was doing this by building a hash and passing that into the method call, but having to pass a vanilla string at the beggining makes that approach fail
sassamo has joined #ruby
<link151>
i see the splat operator, does that work for named arrays?
nomenkun has quit [Remote host closed the connection]
<link151>
oh nice, from their sourc `def search(term, options = {})`
<bnagy>
you don't need to splat hashes
<link151>
so i can build the options hash and pass that in and just pass the string in front
w4pm has quit [Ping timeout: 264 seconds]
<bnagy>
yep
LaPetiteFromage has quit [Quit: LaPetiteFromage]
mando has quit []
Spami has quit [Quit: This computer has gone to sleep]
estebistec has quit [Read error: Connection reset by peer]
estebistec has joined #ruby
Amart41 has joined #ruby
asteros has quit [Quit: asteros]
reset has quit [Quit: Leaving...]
robbyoconnor has joined #ruby
LexicalScope has joined #ruby
pu22l3r_ has joined #ruby
sassamo has quit [Remote host closed the connection]
krz has joined #ruby
Amart41 has quit [Ping timeout: 252 seconds]
sassamo has joined #ruby
<benzrf>
clientside is coming along nicely :D
<benzrf>
shit, firefox is freezing up
<benzrf>
i knew i had too many tabs
wiku5_ has quit [Quit: WeeChat 0.3.8]
mikepack has quit [Remote host closed the connection]
shedd has joined #ruby
hfp`away is now known as hfp
Spami has joined #ruby
intuxicated_ has quit [Ping timeout: 245 seconds]
intuxicated_ has joined #ruby
Wolland has quit []
mavcunha has quit [Quit: Computer has gone to sleep.]
sergicles_ has joined #ruby
sergicles_ has quit [Client Quit]
Parker0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
silentpost has left #ruby [#ruby]
LaPetiteFromage has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
sergicles_ has joined #ruby
habanany has joined #ruby
sergicles has quit [Ping timeout: 252 seconds]
sergicles_ is now known as sergicles
iamsean has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
blaz3rz has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
iliketurtles has joined #ruby
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
habanany has quit [Ping timeout: 245 seconds]
iamsean has quit [Ping timeout: 264 seconds]
Mattx has quit [Ping timeout: 248 seconds]
niklasb has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
alvaro_o has quit [Quit: Ex-Chat]
simoz18 has joined #ruby
tylersmith has joined #ruby
freerobby has joined #ruby
dawkirst has joined #ruby
figgleberry has joined #ruby
simoz19 has joined #ruby
octoberry has quit [Ping timeout: 248 seconds]
iamsean has joined #ruby
agent_white has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
ixti has quit [Ping timeout: 272 seconds]
habanany has joined #ruby
simoz18 has quit [Ping timeout: 264 seconds]
linojon has joined #ruby
cashnguns has joined #ruby
sdwrage has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
dseitz has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
sdwrage has joined #ruby
Mattx has joined #ruby
habanany has quit [Max SendQ exceeded]
kloeri has joined #ruby
estebistec has quit [Read error: Connection reset by peer]
deric_skibotn has quit [Ping timeout: 252 seconds]
shedd has quit [Remote host closed the connection]
shedd has joined #ruby
Yahkob has joined #ruby
Yahkob has left #ruby [#ruby]
mary5030 has quit [Remote host closed the connection]
phipes has quit [Remote host closed the connection]
Yahkob has joined #ruby
Yahkob has left #ruby [#ruby]
valio has joined #ruby
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
Cache_Money has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
phipes has joined #ruby
Yahkob has joined #ruby
Yahkob has left #ruby [#ruby]
rickruby has joined #ruby
freerobby has joined #ruby
larissa has quit [Quit: Leaving]
phipes has quit [Ping timeout: 264 seconds]
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
pu22l3r_ has quit [Remote host closed the connection]
Hobogrammer has joined #ruby
rickruby has quit [Ping timeout: 252 seconds]
Hobogrammer has quit [Client Quit]
Hobogrammer has joined #ruby
freerobby1 has quit [Ping timeout: 272 seconds]
m104 has quit [Quit: bye]
freezey has quit [Remote host closed the connection]
Al__ has joined #ruby
<bnagy>
valio: it's a ZipEntry
<bnagy>
the link you pasted seems to have all the info you need
<valio>
yes I think I will handle it
<valio>
thank you
<bnagy>
otherwise you can just play with irb and look at the instance methods for a ZipEntry
<bnagy>
fwiw I am not super in love with rubyzip
<bnagy>
I tend to just shell out
<bnagy>
especially if you intend to write to the fs anyway
Hobogrammer has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
jblack_ has joined #ruby
Hobogrammer has joined #ruby
sensen has quit [Ping timeout: 248 seconds]
jblack has quit [Ping timeout: 248 seconds]
yasushi has quit [Remote host closed the connection]
decoponio has joined #ruby
iajrz_ has quit [Ping timeout: 245 seconds]
sethen has quit [Quit: Leaving...]
krisbulman is now known as [krisbulman]
sensen has joined #ruby
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
himsin has joined #ruby
[krisbulman] is now known as krisbulman
lfox has quit [Quit: ZZZzzz…]
f4a244c has joined #ruby
deens has joined #ruby
JasmeetQA has joined #ruby
yfeldblum has joined #ruby
angusiguess has joined #ruby
yfeldblu_ has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
jaimef has quit [Ping timeout: 272 seconds]
sparrovv has joined #ruby
yfeldblu_ has joined #ruby
danshultz has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
krisbulman is now known as [krisbulman]
tyl has quit [Read error: Connection reset by peer]
tyl has joined #ruby
tyl has quit [Remote host closed the connection]
sparrovv has quit [Ping timeout: 272 seconds]
jblack_ has quit [Read error: Connection reset by peer]
danshultz has quit [Ping timeout: 252 seconds]
Kricir has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
<agent_white>
git hooks finally working with puppet, and I officially have my servers automated. /high-paws cat
thealch3m1st has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
niklasb has quit [Read error: Operation timed out]
tyl has joined #ruby
synergy__ has quit [Remote host closed the connection]
sergicles has quit [Quit: sergicles]
MJBrune has quit [Read error: Connection reset by peer]
MJBrune has joined #ruby
MJBrune has quit [Changing host]
MJBrune has joined #ruby
thealch3m1st has joined #ruby
havenwood has quit [Remote host closed the connection]
clamstar has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
kitak has quit [Remote host closed the connection]
kevinykchan has joined #ruby
iajrz has joined #ruby
Kricir has quit [Remote host closed the connection]
iajrz is now known as iajrz_
clamstar has quit [Client Quit]
deens has quit []
thealch3m1st has joined #ruby
sensen has quit [Ping timeout: 240 seconds]
ViPi2 has joined #ruby
iamdoo2 has joined #ruby
sensen has joined #ruby
<george2>
is there a ruby equivalent of python's if __name__ == "__main__" ?
<bnagy>
who knows? What does that do? :)
nhhagen has joined #ruby
<george2>
if a script is being run as './myscript.py' or 'python myscript.py', it runs the code inside the if, otherwise (if you are importing the script as a library) it doesn't
<george2>
so you can have a single file simultaneously act as both a library and a standalone executable script
robbyoconnor has quit [Ping timeout: 272 seconds]
iamdoo2 has quit [Ping timeout: 272 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
kitak has joined #ruby
<bnagy>
if __FILE__ == $0
eldosoa has joined #ruby
iajrz_ has quit [Ping timeout: 260 seconds]
phansch has joined #ruby
achru has joined #ruby
baggypants has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<george2>
ha, just found the SO for this same question, thanks :)
coder_neo has joined #ruby
<george2>
evidently this is not often used?
<bnagy>
not really, people usually have separate tests
<george2>
I wonder why I'm being forced to write my assignment this way :/
dkamioka has quit [Remote host closed the connection]
nhhagen has quit [Ping timeout: 252 seconds]
<bnagy>
I've used it about twice, when I have a thing that lets you parse, say, a filetype so you can use it as an app or require it into something bigger
iamsean has quit [Quit: iamsean]
<bnagy>
but unless the parsing is super trivial ( say in that example ) it's better to just write an app that uses the lib
<bnagy>
in fact imho it's probably always better
vpretzel has quit [Remote host closed the connection]
coder_neo has quit [Client Quit]
eldosoa has quit [Client Quit]
iajrz has joined #ruby
<agent_white>
george2: because that's awesome! never knew about it.
eldosoa has joined #ruby
eldosoa has left #ruby [#ruby]
<agent_white>
bnagy: Question! I used your statement with: if...(true) puts 'imalib'; else; puts 'ima exec';
gja has joined #ruby
lemonsparrow has joined #ruby
<lemonsparrow>
web2labs
clamstar has joined #ruby
robbyoconnor has joined #ruby
<bnagy>
hahaha
clamstar has quit [Client Quit]
<agent_white>
bnagy: Lemme rephrase... Your if clause fires when I used `ruby script.rb` or `./script.rb`
phipes has joined #ruby
Solnse has quit [Quit: Leaving.]
<agent_white>
bnagy: the else fires when I load the file via `load 'script.rb'` in irb
iajrz has quit [Ping timeout: 245 seconds]
aniM has joined #ruby
dx7 has joined #ruby
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
bradhe has joined #ruby
sensen_ has joined #ruby
sensen has quit [Ping timeout: 240 seconds]
phipes has quit [Ping timeout: 248 seconds]
agent_white has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
heidi has quit [Quit: Leaving.]
bradleyprice has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
dx7 has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
senayar has joined #ruby
<bnagy>
why not just game = Hangman.new words_file
Hanmac has joined #ruby
sassamo has quit [Ping timeout: 240 seconds]
kevinykchan has quit [Remote host closed the connection]
<bnagy>
then in your initialize, handle defaults etc as you're sanity checking the file
bradhe has quit [Ping timeout: 252 seconds]
<george2>
hangman has initialize(file = 'mydefaultfile')
<george2>
would nil overwrite the default?
<bnagy>
try it
Hanmac1 has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
pen has quit [Read error: Connection reset by peer]
<george2>
it seems to
freerobby has quit [Ping timeout: 240 seconds]
pen has joined #ruby
agent_wh1te has joined #ruby
<bnagy>
now try initialize user_fn; fn = user_fn || 'hangmandefault'
<george2>
is it better to use something like @file = file || 'mydefault' instead of def initialize(file = 'default') ?
Hanmac has quit [Ping timeout: 245 seconds]
pen has quit [Read error: Connection reset by peer]
phansch_ has joined #ruby
<bnagy>
usually they're the same
pen has joined #ruby
<bnagy>
because usually assholes don't pass you an explicit nil as an argument
<george2>
ha
agent_wh1te has quit [Client Quit]
agent_white has quit [Quit: leaving]
phansch has quit [Read error: Operation timed out]
<george2>
well I'm using ARGV.first
<george2>
which seems to be nil if empty
OdNairy has joined #ruby
agent_white has joined #ruby
<george2>
unless I have that wrong
<bnagy>
yeah
kevinykchan has joined #ruby
<george2>
and I can't think of a way to say words_file = ARGV.first || #nothing...
IceDragon has quit [Quit: Space~~~]
<agent_white>
bnagy: Sorry I didn't see your response or if you got mine, disconnected :/
bradleyprice has joined #ruby
Brolen has joined #ruby
<bnagy>
agent_white: __FILE__ is weird in irb
gja has quit [Quit: This computer has gone to sleep]
kevinykchan has quit [Remote host closed the connection]
tagrudev has joined #ruby
Hanmac has joined #ruby
kevinykchan has joined #ruby
Elhu has joined #ruby
mary5030 has joined #ruby
Brolen has quit [Ping timeout: 245 seconds]
senayar has quit [Remote host closed the connection]
w4pm has joined #ruby
cj3kim has joined #ruby
makara has joined #ruby
mary5030 has quit [Ping timeout: 252 seconds]
valio has quit [Ping timeout: 248 seconds]
noop has joined #ruby
vpretzel has joined #ruby
clamstar has joined #ruby
w4pm has quit [Read error: Operation timed out]
vpretzel has quit [Read error: Connection reset by peer]
mengu has joined #ruby
kitak has quit [Remote host closed the connection]
apeiros has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
vpretzel has joined #ruby
kitak has joined #ruby
danshultz has joined #ruby
yasushi has joined #ruby
zipper has joined #ruby
PrimeFry has quit [Ping timeout: 272 seconds]
Virtualize|away has quit [Quit: Leaving...]
kitak has quit [Ping timeout: 245 seconds]
danshultz has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heftig has quit [Quit: Quitting]
shime has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
phipes has joined #ruby
centrx has left #ruby ["Leaving"]
ndrei has joined #ruby
pen has quit [Read error: Connection reset by peer]
clamstar has joined #ruby
pen has joined #ruby
Amart41 has joined #ruby
vpretzel has quit [Read error: Connection reset by peer]
centrx has joined #ruby
vpretzel_ has joined #ruby
kitak has joined #ruby
apeiros_ has quit [Remote host closed the connection]
apeiros has joined #ruby
predator117 has quit [Ping timeout: 248 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
predator117 has joined #ruby
SiliconG has joined #ruby
__class__ has quit [Read error: Connection reset by peer]
Al__ has quit [Quit: Al__]
sputnik13 has joined #ruby
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
Amart41 has quit [Ping timeout: 252 seconds]
vpretzel_ has quit [Read error: Operation timed out]
nism has joined #ruby
iamdoo2 has joined #ruby
apeiros has quit [Ping timeout: 248 seconds]
blaz3rz has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
shime has quit [Ping timeout: 240 seconds]
angusiguess has joined #ruby
sassamo has joined #ruby
shime has joined #ruby
yacks has quit [Quit: Leaving]
nhhagen has joined #ruby
f4a244c has quit [Quit: f4a244c]
iamdoo2 has quit [Ping timeout: 240 seconds]
Hobogrammer has quit [Ping timeout: 272 seconds]
mocfive has quit [Remote host closed the connection]
advorak has quit [Ping timeout: 240 seconds]
__class__ has joined #ruby
angusiguess has quit [Ping timeout: 248 seconds]
nhhagen has quit [Ping timeout: 265 seconds]
SiliconG has quit [Ping timeout: 245 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
davy_ has joined #ruby
fgo has joined #ruby
bradhe has joined #ruby
nism has quit [Quit: This computer has gone to sleep]
klaut has joined #ruby
Astralum has joined #ruby
tylersmith has quit [Remote host closed the connection]
roolo has joined #ruby
pen has quit [Read error: Connection reset by peer]
arietis has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
moshee has quit [Quit: 囧]
pen has joined #ruby
nucc has joined #ruby
nism has joined #ruby
freerobby has joined #ruby
ghr has joined #ruby
Deejay has joined #ruby
Deejay is now known as Guest51111
<zipper>
A good alternative source for gems save for rubygems.org? I found source 'https://production.cf.rubygems.org' on a 2012 stackoverflow question.
<centrx>
Why?
freerobby has quit [Ping timeout: 245 seconds]
bigkevmcd has joined #ruby
standyro2 has joined #ruby
Guest51111 has quit [Client Quit]
yasushi has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
<zipper>
*source
apeiros has joined #ruby
<zipper>
Goddamnit why do people ask why instead of giving a solution then ask why?
<zipper>
My ISP has issues accessing rubygems.org
<centrx>
rubygems.org is the standard one
<centrx>
I don't know of another
<zipper>
It's a provider issue
bradhe has joined #ruby
<zipper>
What else can I do?
<centrx>
Use a proxy or tor?
<zipper>
centrx: How/which proxy should I use? I am trying to access it from a vm on the cloud.
<zipper>
running a bundle install
<centrx>
I thought the cloud could connect to anything
<apeiros>
zipper: people first ask why because the person asking often implies a solution to his problem instead of stating his actual problem.
Fyyr13 has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 252 seconds]
Fyyr13 has joined #ruby
cj3kim has quit [Remote host closed the connection]
<zipper>
centrx: I swear you are full of questios
<zipper>
*questions
<centrx>
What kind of questions?
moshee has joined #ruby
simoz19 has joined #ruby
shime_ has joined #ruby
jprovazn has joined #ruby
<zipper>
This "< centrx> I thought the cloud could connect to anything"
simoz110 has joined #ruby
havenwood has quit [Remote host closed the connection]
tyl has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
ViPi2 has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby
shime has quit [Ping timeout: 272 seconds]
<centrx>
Are you sure that is a question?
gja has quit [Quit: This computer has gone to sleep]
robbyoconnor has quit [Read error: Connection reset by peer]
tyl has joined #ruby
tyl has quit [Remote host closed the connection]
netQT has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
simoz19 has quit [Ping timeout: 264 seconds]
<zipper>
Arrrggghhhhhhhhh all I want to do is get my gems dude!
simoz110 has quit [Ping timeout: 264 seconds]
yacks has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
<agent_white>
zipper: You need to provide some more specific info before you get your socratic guidance.
nucc has quit [Quit: This computer has gone to sleep]
<zipper>
So I have found an alternative but it's in chinese
<agent_white>
zipper: As in... what do you mean your 'isp can't access' it? It's best bet you need to figure out that issue intead of beating around the bush.
<zipper>
Should I want to get stuff from China? Is language barrier an issue? I found it in an answer on stack overflow.
<centrx>
Will you be okay if I quit for the night?
<agent_white>
centrx: I'll cry a little bit, but I think I'll be ok.
<zipper>
agent_white: I talked to the ISP they told me to wait as they fix the issue
<centrx>
So sweet
<zipper>
They blamed it on upstream providers
<shevy>
centrx that was not a question!
<zipper>
Will you people answer the question for crying out loud. You can't help my ISP having issues
<zipper>
but it's got a load of chinese I found it in a stack overflow answer
<shevy>
cool
<shevy>
they don't know the english language
shime_ has quit [Ping timeout: 252 seconds]
therod has joined #ruby
kitak has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
dangerousdave has joined #ruby
angusiguess has joined #ruby
kitak has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
phansch has joined #ruby
<zipper>
Screw it I'm using that Chinese alternative thank you all for asking a load of questions and giving no solution. I hope you are proud of yourselves!
danshultz has joined #ruby
thealch3m1st has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
therod has quit [Ping timeout: 264 seconds]
link151 has quit [Quit: Leaving.]
<zipper>
Just got told NOT to use a source from China. So back to crap!
<shevy>
zipper isn't all your hardware made in china anyway
e^0 has quit [Quit: WeeChat 0.4.1]
altin has joined #ruby
altin has quit [Changing host]
altin has joined #ruby
tesuji has joined #ruby
ndrei has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
sensen_ has quit [Ping timeout: 264 seconds]
vpretzel has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
cj3kim has joined #ruby
link151 has joined #ruby
sensen has joined #ruby
kitak has quit [Remote host closed the connection]
iliketur_ has joined #ruby
iliketur_ has quit [Excess Flood]
bradleyprice has quit [Ping timeout: 252 seconds]
aryaching has joined #ruby
<zipper>
shevy: Good question
iliketurtles has quit [Ping timeout: 248 seconds]
iliketur_ has joined #ruby
Jdubs has joined #ruby
andikr has joined #ruby
<shevy>
did you try the gem sources --add variant? of course you need that host to have the gems in the first place, and I guess most people will always default to rubygems.org
yasushi has quit [Remote host closed the connection]
<zipper>
shevy: That would be ok
charliesome has joined #ruby
<zipper>
shevy: what will I add in place of variant?
vpretzel has quit [Ping timeout: 272 seconds]
<zipper>
as in I don't mind them acting as a mirror for rubygems.org
<shevy>
zipper the specific URL in question
<shevy>
first do "gem env"
<shevy>
you will see the - REMOTE SOURCES: entry
<zipper>
shevy: I am using a gemfile
<zipper>
I am looking for a url to have as the source.
aryaching_ has quit [Ping timeout: 272 seconds]
iamdoo2 has joined #ruby
<shevy>
that is interpreted by bundler?
<shevy>
no idea about bundler, the gem add way relies on gem itself, not bundler
senayar has joined #ruby
<zipper>
Ok I want a url which I can use to get gems
<zipper>
I currently have rubygems.org
havenwood has joined #ruby
e^0 has joined #ruby
aryaching has quit [Ping timeout: 252 seconds]
bradleyprice has joined #ruby
SiliconG has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
iamdoo2 has quit [Ping timeout: 260 seconds]
dx7 has joined #ruby
<shevy>
yeah, that is the default
<shevy>
everyone has that
<shevy>
now you need to find another URL to add there
senayar has quit [Remote host closed the connection]
<shevy>
just like japanese documentation
joonty has joined #ruby
<pontiki>
still, if i did have a situation where i couldn't access rubygems, i'd opt for a mirror
<shevy>
they do the same shit
<shevy>
"us no speak englishiano so us writes in cryptic arcane symbols"
<DouweM>
pontiki: right, but I'd rather have an HTTPS mirror
jaxxstorm has joined #ruby
senayar has joined #ruby
<pontiki>
DouweM: if it's inside the same LAN, why bother?
top4o_ has joined #ruby
fella5s has quit [Ping timeout: 265 seconds]
<DouweM>
pontiki: http://ruby.taobao.org/ isn't inside my LAN. Are we talking about different things?
mailo has quit [Quit: Leaving...]
freerobby has joined #ruby
<zipper>
pontiki: Which mirror?
robbyoconnor has joined #ruby
<pontiki>
my own
einarj has joined #ruby
<zipper>
pontiki: You have a mirror?
camilasan has joined #ruby
<zipper>
for rubygems?
<pontiki>
no, i have no problems accessing rubygems.org
<pontiki>
i'm saying *if i did*
<DouweM>
zipper: I don't know if you've answered this before, but do you know *why* your ISP has trouble connecting with rubygems?
<zipper>
pontiki: I almost got angry for you not directing me to it
mocfive_ has joined #ruby
mocfive has quit [Read error: Connection reset by peer]
<zipper>
That chinese mirror is fast yo!
<zipper>
DouweM: They sent me a weird email
<zipper>
DouweM: "This is to let you know that there may still a problem with accessing this specific site and we have narrowed it down to an issue with one of our upstream providers. We are resolving this with them and will let you know once done"
<zipper>
That was the answer
kate_r has joined #ruby
<DouweM>
zipper: :/ what ISP is this?
netQT has quit [Ping timeout: 252 seconds]
<zipper>
I am happily getting my gems from China
<shevy>
pontiki would you use chinese mirrors?
<zipper>
DouweM: I well it's like this. I am running my server in a VM on the cloud. The dudes who own the cloud or whatever told me that.
<zipper>
So it's their ISP
<pontiki>
i wouldn't, no
<zipper>
and they are secretive it seems
<DouweM>
zipper: and what provider is this? Just curious
mocfive has joined #ruby
<zipper>
DouweM: I am Kenyan using a Kenyan product.
<DouweM>
TaoBao is trustworthy as far as I can see, but I wouldn't use a Chinese mirror w/o SSL either :/
<DouweM>
zipper: ah, all right
<zipper>
DouweM: :(
<zipper>
So I have fucked myself?
<shevy>
zipper well you'd be in the same boat to trust the chinese once you are outside in regards to China anywhere, even in Europe ;-)
freerobby has quit [Ping timeout: 264 seconds]
<apeiros>
[OT] and once again I'm reminded not to look at other people's code :-(
<shevy>
apeiros \o/
<DouweM>
zipper: you should get the ISP to resolve this
shedd has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 264 seconds]
<zipper>
shevy: What?
cj3kim has quit [Remote host closed the connection]
<zipper>
DouweM: I have my VM on Angani
mocfive_ has quit [Ping timeout: 272 seconds]
<shevy>
shevy you mentioned Kenya, I think the situation you gave + having to rely on China being a problem is valid for anyone else outside of China
tylersmith has joined #ruby
<shevy>
then again I don't even trust rubygems.org!
<shevy>
and now that I mention it
<shevy>
I don't trust any of you here either :(
<DouweM>
:(
Rix has joined #ruby
<zipper>
shevy: Yes anyone not Chinese is afraid of china
mocfive has quit [Ping timeout: 272 seconds]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
klaut has quit [Remote host closed the connection]
Wolland has quit [Remote host closed the connection]
troessner has joined #ruby
dangerousdave has joined #ruby
tylersmith has quit [Ping timeout: 252 seconds]
<shevy>
hehe
<shevy>
there are so many of them!
yfeldblu_ has quit [Read error: Connection reset by peer]
<apeiros>
ok, that information about the galois field math (used in QR codes) is interesting. somehow seems familiar, though…
<shevy>
galois? sounds frenchy
claymore has joined #ruby
yfeldblum has joined #ruby
phipes has quit [Remote host closed the connection]
Brolen has joined #ruby
nvrch has joined #ruby
<pontiki>
zipper: NO one wants to take anything from Kenya, except maybe Eritria, but China don't care
<apeiros>
pontiki: whaaat? I loved those millions from the prince of kenya!
pskosinski has quit [Ping timeout: 240 seconds]
bradhe has quit [Remote host closed the connection]
iliketurtles has joined #ruby
aryaching_ has joined #ruby
robbyoconnor has quit [Ping timeout: 264 seconds]
arctarus has joined #ruby
jackneill has quit [Ping timeout: 252 seconds]
Brolen has quit [Ping timeout: 245 seconds]
aryaching has quit [Ping timeout: 245 seconds]
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy>
lol
iliketur_ has quit [Ping timeout: 245 seconds]
clamstar has joined #ruby
link151 has quit [Quit: Leaving.]
jackneill has joined #ruby
<shevy>
pontiki but the chinese build infrastructure there!
<pontiki>
what do you mean "but" ?
Al__ has joined #ruby
aryaching_ has quit [Read error: Connection reset by peer]
therod has quit [Read error: Connection reset by peer]
<pontiki>
i'm off to bed
dfranciosi has joined #ruby
<pontiki>
you lot carry on
zz_karupanerura is now known as karupanerura
ohwhoa has joined #ruby
noname001__ has joined #ruby
<shevy>
pontiki you wrote to not want something from there, but then why build and invest there ;)
angusiguess has joined #ruby
sergicles has joined #ruby
danshultz has joined #ruby
rootshift has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
pskosinski has joined #ruby
angusiguess has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
danshultz has quit [Ping timeout: 240 seconds]
clamstar has quit [Quit: Computer has gone to sleep.]
Deejay_ has joined #ruby
plotter has quit [Remote host closed the connection]
heftig has joined #ruby
pskosinski_ has joined #ruby
gja has joined #ruby
aryaching has joined #ruby
claymore has quit [Ping timeout: 252 seconds]
w4pm has joined #ruby
skiz has joined #ruby
blaxter_ has joined #ruby
pskosinski has quit [Ping timeout: 240 seconds]
cj3kim has joined #ruby
nucc has joined #ruby
netQT has joined #ruby
vpretzel has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
sski has joined #ruby
claymore has joined #ruby
pranny has quit [Quit: Leaving.]
top4o_ has quit [Ping timeout: 245 seconds]
top4o has joined #ruby
tharindu has joined #ruby
w4pm has quit [Ping timeout: 248 seconds]
timonv has joined #ruby
vpretzel has quit [Ping timeout: 245 seconds]
olivier_bk has joined #ruby
nomenkun has joined #ruby
suborbital has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
vjt has quit [Remote host closed the connection]
joonty has quit [Quit: WeeChat 0.4.2]
iamdoo2 has joined #ruby
kate_r has joined #ruby
rdark has joined #ruby
asmodlol has joined #ruby
jlebrech has joined #ruby
cj3kim has quit [Ping timeout: 248 seconds]
netQT has quit [Remote host closed the connection]
lsmola_ has joined #ruby
nucc has quit [Quit: Leaving]
gr33n7007h has quit [Read error: No route to host]
bradhe has joined #ruby
iamdoo2 has quit [Ping timeout: 252 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
larsam has joined #ruby
havenwood has joined #ruby
wildroman2 has joined #ruby
tyl has joined #ruby
phansch has quit [Quit: Leaving]
Fyyr13 has quit [Remote host closed the connection]
francisfish has joined #ruby
francisfish has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
drumusician has joined #ruby
havenwood has quit [Ping timeout: 265 seconds]
Antiarc has joined #ruby
shedd has joined #ruby
joonty has joined #ruby
<Antiarc>
Hey folks; what happens to suspended fibers that belong to a dead thread?
daxroc has joined #ruby
<Antiarc>
You can't resume them to let them finish running, since that'd be a cross-thread call
TMM has joined #ruby
shredding has joined #ruby
RoxasShadowRS has joined #ruby
roolo has joined #ruby
nomenkun has quit [Ping timeout: 272 seconds]
shedd has quit [Ping timeout: 260 seconds]
dangerousdave has joined #ruby
ch0mskiii has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mikecmpbll>
Antiarc: nothing, i guess
chomskiii has joined #ruby
atmosx has joined #ruby
tyl has quit [Ping timeout: 252 seconds]
<Antiarc>
The issue I'm running into is a jruby one (which I realize is jruby-specific) in that fibers are sticking around holding thread handles, which is causing issue
<Antiarc>
I'm just wondering if there's defined behavior for dealing with inaccessible fibers
<Antiarc>
guess not!
ktosiek_ has quit [Ping timeout: 240 seconds]
drumusician has quit [Read error: Operation timed out]
tyl has joined #ruby
tyl has quit [Remote host closed the connection]
<mikecmpbll>
hmm
nomenkun has joined #ruby
tyl has joined #ruby
<mikecmpbll>
i've not done a great deal with fibers, tbh.
nari has quit [Ping timeout: 245 seconds]
<Antiarc>
This one is definitely an issue with the specifics of jruby's implementation of them, but I could work around it with some way to resume and finish fibers cross-thread
<Antiarc>
But I can't seem to find any way to do that
davy_ has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 252 seconds]
<mikecmpbll>
yeah you can't, you'll get a FiberError.
predator117 has joined #ruby
LiohAu has joined #ruby
Xeago has joined #ruby
Vivekananda has quit [Remote host closed the connection]
OZzl has joined #ruby
iajrz has joined #ruby
altin has quit [Ping timeout: 264 seconds]
sickweezle has quit [Ping timeout: 260 seconds]
simoz110 has quit [Ping timeout: 252 seconds]
predator117 has quit [Ping timeout: 240 seconds]
predator117 has joined #ruby
timonv has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 260 seconds]
zipper has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
zipper has joined #ruby
siwica has joined #ruby
zipper is now known as Guest72037
larsam has left #ruby [#ruby]
aganov has joined #ruby
obs has joined #ruby
yuuki has joined #ruby
zeropx has quit [Read error: Connection reset by peer]
zeropx has joined #ruby
predator117 has quit [Ping timeout: 252 seconds]
sensen has quit [Ping timeout: 245 seconds]
yuuki has quit [Client Quit]
Guest72037 has quit [Quit: leaving]
zipper has joined #ruby
ephemerian has joined #ruby
havenwood has joined #ruby
<shredding>
I have a capistrano 2.x project. After starting another project with 3.1 it tries to load capistrano 3.1 in my 2.x project.
havenwood has quit [Read error: Connection reset by peer]
havenn has joined #ruby
<shredding>
How could i force it to use 2.1.15, as specified in my gemfile?
fgo has quit [Remote host closed the connection]
larsam has joined #ruby
iajrz has quit [Ping timeout: 260 seconds]
Xeago_ has joined #ruby
nairys has quit [Quit: nairys]
mengu has quit [Remote host closed the connection]
alex88 has joined #ruby
<alex88>
what's the correct way of doing this "return true unless stored_time = redis.get(match[:id])" ?
<alex88>
so I both get the stored_time variable set and check if that's something not falsy
Xeago_ has quit [Read error: Connection reset by peer]
<alex88>
oh and having redis.get(match[:id]) I get only "syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)" but at the end of file
<alex88>
oh
<alex88>
my fault! was missing an end in another line :(
<alex88>
sorry
saarinen has joined #ruby
hiall has quit [Quit: hiall]
razibog has joined #ruby
Xeago_ has quit [Ping timeout: 240 seconds]
DouweM has quit [Ping timeout: 240 seconds]
gener1c has quit [Read error: Connection reset by peer]
danshultz has quit [Ping timeout: 245 seconds]
siwica has quit [Quit: siwica]
yasushi has joined #ruby
marr has joined #ruby
<shevy>
common mistake
<shevy>
if only we could eliminate "end"
mehlah has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
timonv has joined #ruby
karupanerura is now known as zz_karupanerura
havenn has quit [Read error: Connection reset by peer]
lsmola_ has quit [Ping timeout: 265 seconds]
havenwood has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
drumusician has joined #ruby
dx7 has joined #ruby
lemonsparrow has joined #ruby
jonahR has quit [Quit: jonahR]
bradhe has joined #ruby
yasushi has quit [Ping timeout: 272 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
vpretzel has joined #ruby
saarinen has quit [Ping timeout: 264 seconds]
iajrz has quit [Ping timeout: 252 seconds]
eka has joined #ruby
eka has quit [Client Quit]
havenwood has quit [Ping timeout: 248 seconds]
saarinen has joined #ruby
workmad3 has joined #ruby
pranny has joined #ruby
dx7 has quit [Ping timeout: 252 seconds]
tobago has joined #ruby
DaniG2k has joined #ruby
eka has joined #ruby
pranny has quit [Read error: Connection reset by peer]
pranny has joined #ruby
<LiohAu>
can anybody tell me what syntax should I use to call the "site" function/method (I don't even know what it is) defined like this : http://pastebin.com/77WCBLHy
DouweM has joined #ruby
<shevy>
LiohAu it's in a module
<shevy>
either include Name
<shevy>
then call it
cj3kim has joined #ruby
<LiohAu>
shevy: I read something about the World() thing of cucumber, that inject the module everywhere
bradhe has quit [Ping timeout: 260 seconds]
<LiohAu>
and i understood that calling "site()" was enough
<LiohAu>
but it does not seem to work
top4o has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]]
<shevy>
no idea, I talk about regular ruby
vpretzel has quit [Ping timeout: 252 seconds]
<LiohAu>
I don't know if cucumber is different :(
<shevy>
>> module Foo; def test; puts 'hi there'; end; end; include Foo; test
<tobiasvl>
so either a is truthy or it is set to b
<soahccc>
tobiasvl: it kinda is but I though it would act more like "set if not set already"
<DaniG2k>
if a is present, return a, else set a to b and return a
<tobiasvl>
well, that's how it's used
fgo has quit [Ping timeout: 265 seconds]
phansch has joined #ruby
rickruby has joined #ruby
<apeiros>
sadly, there's no non-nil operator in ruby
shedd has quit [Ping timeout: 252 seconds]
ktosiek_ has joined #ruby
freerobby has joined #ruby
<apeiros>
or actually, "if-nil"
ktosiek_ is now known as ktosiek
<shevy>
hehe
<shevy>
I notice the '-' there
dangerousdave has quit [Client Quit]
diegoviola has joined #ruby
angusiguess has joined #ruby
dangerousdave has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
chomskiii has quit [Read error: Connection reset by peer]
aniM has joined #ruby
<tobiasvl>
a.nil? ? a = 2 : a
<tobiasvl>
maybe
<tobiasvl>
hehe
<soahccc>
I always found it funny that ruby has no identification for just boolean values. if var.is_a?(TrueClass) || var.is_a?(FalseClass)
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
chomskiii has joined #ruby
mengu has quit [Ping timeout: 260 seconds]
<tobiasvl>
var == true || var == false
<tobiasvl>
?
bitri_ has joined #ruby
rickruby has quit [Ping timeout: 252 seconds]
nomenkun has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
bitri_ has quit [Max SendQ exceeded]
<soahccc>
yeah, then I learned that there is no use for it. I came from PHP and I was like "huh, no is_bool?" :)
claymore has quit [Ping timeout: 240 seconds]
freerobby has quit [Ping timeout: 272 seconds]
<tobiasvl>
hehe, yeah. it's kind of strange that both TrueClass and FalseClass are direct descendants of Object
<Hanmac>
tobiasvl: it is important if you use ||= with [] and []= like " obj[key] ||= value " than the []= method is not called when the [] method returns something truely
<tobiasvl>
instead of something like BoolClass
mojjojo has joined #ruby
kitak has quit [Remote host closed the connection]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wildroman2 has quit [Remote host closed the connection]
predator117 has joined #ruby
george2 has quit [Read error: Connection reset by peer]
claymore has joined #ruby
claymore has quit [Changing host]
claymore has joined #ruby
mehlah has quit [Ping timeout: 264 seconds]
george2 has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ckinni has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
iajrz has joined #ruby
<soahccc>
Hanmac: What do you mean exactly? I don't think this is true
mojjojo has quit [Quit: mojjojo]
withnale has joined #ruby
mojjojo has joined #ruby
Jdubs has quit [Remote host closed the connection]
<soahccc>
Hanmac: Ah now I understand what you mean
altin has joined #ruby
altin has joined #ruby
altin has quit [Changing host]
mehlah has joined #ruby
browndawg has joined #ruby
sensen has quit [Ping timeout: 264 seconds]
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
bradleyprice has quit []
sassamo has quit [Read error: Connection reset by peer]
claymore has quit [Ping timeout: 252 seconds]
iajrz has quit [Ping timeout: 245 seconds]
sassamo has joined #ruby
Txandy has joined #ruby
claymore has joined #ruby
lsmola_ has quit [Ping timeout: 252 seconds]
canderson has joined #ruby
_JamieD_ has joined #ruby
klaut has joined #ruby
sski has quit [Remote host closed the connection]
jacobat_ is now known as jacobat
sski has joined #ruby
SHyx0rmZ has joined #ruby
joonty has quit [Ping timeout: 240 seconds]
predator117 has quit [Ping timeout: 252 seconds]
predator117 has joined #ruby
danshultz has joined #ruby
joonty has joined #ruby
mengu has joined #ruby
altin has quit [Ping timeout: 240 seconds]
sski has quit [Ping timeout: 252 seconds]
nari has joined #ruby
Advocation has joined #ruby
sensen has joined #ruby
<eka>
I'm working on a new gem that has dependencies... how to deal with testing the gem itself? any guide on that?
<DouweM>
eka: what are you asking specifically? do you have experience testing ruby apps/libraries
Jdubs has joined #ruby
bradhe has joined #ruby
danshultz has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
senayar has quit [Remote host closed the connection]
<eka>
DouweM: I have experience testing ruby apps. What I'm asking is this, my gem spec has some dependencies, right? so for testing MY gem those dependencies should be installed... should I install them by hand? or? is there a way to do this?\
<DouweM>
eka: put "gemspec" in your Gemfile and use bundler as you're probably used to
iajrz has quit [Remote host closed the connection]
Speed has joined #ruby
sensen has quit [Quit: leaving]
fgo has quit [Remote host closed the connection]
gja has joined #ruby
joonty has quit [Ping timeout: 240 seconds]
<TMM>
I have a question about testing best practices. I'm trying to refactor some tests and what I'm testing for is that for a given input data structure I get an expected function call back. I have got this all working but the setup of the input datastructure is somewhat non-obvious in the code. Is there a good way of handling this sort of setup?
einarj has quit [Remote host closed the connection]
joonty has joined #ruby
ndrei has quit [Read error: Operation timed out]
yfeldblum has joined #ruby
wildroman2 has quit [Remote host closed the connection]
shedd has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
freerobby has joined #ruby
yfeldblu_ has joined #ruby
thecreators has joined #ruby
thecreators is now known as megaworm
ddssc has quit [Ping timeout: 272 seconds]
Deejay_ has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Ping timeout: 240 seconds]
mojjojo has quit [Quit: mojjojo]
srji_ has quit [Quit: leaving]
clamstar has quit [Quit: Computer has gone to sleep.]
pskosinski_ has quit [Remote host closed the connection]
srji has joined #ruby
Deejay_ has joined #ruby
freerobby has quit [Ping timeout: 252 seconds]
yfeldblu_ has quit [Ping timeout: 260 seconds]
jhaig has quit [Ping timeout: 265 seconds]
suborbital has quit [Quit: suborbital]
jprovazn has quit [Ping timeout: 240 seconds]
tyl has quit [Ping timeout: 252 seconds]
standyro2 has quit [Ping timeout: 252 seconds]
Txandy is now known as Txandy|away
mojjojo has joined #ruby
claymore has quit [Ping timeout: 245 seconds]
clamstar has joined #ruby
zoscoy has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyl has joined #ruby
tyl has quit [Remote host closed the connection]
zoscoy has quit [Client Quit]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
alex88 has quit [Quit: Leaving...]
mehlah has quit [Quit: Leaving...]
claymore has joined #ruby
arturaz has quit [Remote host closed the connection]
gja has quit [Quit: This computer has gone to sleep]
ndrei has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
netQT has joined #ruby
mark_locklear has joined #ruby
kewubenduben has joined #ruby
Guest35543 has quit [Changing host]
Guest35543 has joined #ruby
Guest35543 is now known as guyz
shedd has quit [Ping timeout: 260 seconds]
Al__ has quit [Quit: Al__]
krawchyk has joined #ruby
clamstar has joined #ruby
mehlah has joined #ruby
senayar has joined #ruby
canderson has joined #ruby
dx7 has quit [Quit: Leaving...]
vlad_starkov has joined #ruby
dx7 has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
tyl has quit [Ping timeout: 260 seconds]
SiliconG has joined #ruby
shredding has joined #ruby
ringaroses has quit [Quit: Leaving]
predator117 has quit [Ping timeout: 272 seconds]
xcv has joined #ruby
syfon has joined #ruby
OdNairy has joined #ruby
<syfon>
hi mister
RobbieAB has joined #ruby
RobbieAB has left #ruby [#ruby]
mercwithamouth has quit [Ping timeout: 248 seconds]
senayar has quit [Ping timeout: 252 seconds]
Squarepy has joined #ruby
senayar has joined #ruby
browndawg has joined #ruby
kpshek has joined #ruby
ewnd9 has joined #ruby
<syfon>
Listen mister, i need to ask you how to modify this script http://pastebin.com/3EiK5tFq to set minimum word lenght, currently it only supports maximum
<DouweM>
syfon: what have you tried already?
bradhe has joined #ruby
<syfon>
DouweM: to be honest i am not a coder, i know nothing about it. if it would be a linux scrupt thean maybe i would be capable of doing something but in this case i know nothing about ruby
krz has quit [Quit: WeeChat 0.4.2]
<DouweM>
syfon: I'm not convinced this isn't homework or similar, but here you go: change (1..max_words) on line 12 to (min_words..max_words).
<syfon>
DouweM: lol it is not :) i needt to generate some passwords.
<syfon>
hmmm now that was simple
<syfon>
thank you my friend
Wolland has joined #ruby
<DouweM>
syfon: ah, right, I was wondering why the test function didn't do anything interesting
<DouweM>
syfon: good luck with the passwords :p
devyn has quit [Ping timeout: 252 seconds]
<syfon>
yes wish me luck, i am trying to get into my wallet....
m104 has joined #ruby
shredding has quit [Quit: shredding]
bradhe has quit [Ping timeout: 245 seconds]
<DouweM>
syfon: lol, good luck with that. be glad you used a relatively short passphrase
dblessing has joined #ruby
shredding has joined #ruby
<DouweM>
syfon: but still, you're not gonna be able to test all of those
<syfon>
DouweM: i hope i used...
<syfon>
because?
predator117 has joined #ruby
<DouweM>
With 64 different characters and a length of 7 characters, those are 4,398,046,511,104 options
<DouweM>
If you checked one every second, that'll cost you over 140,000 years
devyn has joined #ruby
<DouweM>
so I'd go get some coffee if I were you
phansch has quit [Quit: Leaving]
phansch has joined #ruby
<DouweM>
and that's just for length 7 (I misinterpreted your code)
<syfon>
DouweM: haha, yes i know, maybe i will make my own cryptocurrency to solve this :D
<DouweM>
You're testing lengths 5 through 12, so that's gonna take a lot more time even
<DouweM>
that's literally a better bet than trying to brute force this
v0n has joined #ruby
Brolen has joined #ruby
<syfon>
true, but i am going cut those letters, in the script there is too much of them, co maybe it will takie only 20.000 years, i need to be optimisctic :D
<DouweM>
how many coins did you lose?
TommyBotten has joined #ruby
<syfon>
DouweM: ... they are not lost yet :P
<syfon>
100.000 doge
<syfon>
not much, about $120
devyn has quit [Remote host closed the connection]
netQT has quit [Remote host closed the connection]
<DouweM>
yeah, you're not gonna get that back if you used a random passphrase
ndrei has joined #ruby
<syfon>
DouweM: at the moment i am generating permutations of my standard passwords divided. and using johntheripper to get it
<DouweM>
good luck
<syfon>
the problem is that john does not use gpu for bitcoin wallet cracking
tannerburson has joined #ruby
<syfon>
and that would save a lot of thime 200.000 hasher per secon inseatd od 23...
lemonsparrow has quit [Ping timeout: 245 seconds]
<tobiasvl>
so you didn't just find a wallet? ;)
<syfon>
lol, no, they are not laying in the street do they?:)
aniM has quit [Ping timeout: 245 seconds]
benzrf has joined #ruby
<benzrf>
hey
gener1c has joined #ruby
<DouweM>
hey
<benzrf>
I'm writing a method thatll be interpolated into templates in web apps
<benzrf>
is there a way to get info about the request that is currently being processed?
<benzrf>
rack-based
mengu has quit [Remote host closed the connection]
tobago has quit [Read error: Operation timed out]
<DouweM>
Depends on the server, probably. Rack "itself" doesn't globally expose the request, afaik
wildroman2 has joined #ruby
jpstokes has joined #ruby
wildroman2 has quit [Read error: Connection reset by peer]
<benzrf>
dangerousdave:
<benzrf>
*dang
<benzrf>
sorry dangerousdave <_<
<DouweM>
haha
wildroman2 has joined #ruby
<benzrf>
ack
<dangerousdave>
hello again
<benzrf>
i guess i can have my middleware remember the last request ip or something
<benzrf>
t_t
* Dwarf
np: The Kaiser Chiefs - Ruby
<DouweM>
benzrf: you can have the middleware set a Thread.current["rack.request"] or whatever
<benzrf>
that might not be the thread safe though
<tobiasvl>
ruby ruby ruby ruby!!
angusiguess has quit [Ping timeout: 272 seconds]
<DouweM>
ohooohoohooo
<DouweM>
missed one hooo
<DouweM>
two even
<DouweM>
and the number of o's is completely off
blaxter has quit [Quit: foo]
danshultz has joined #ruby
Txandy is now known as Txandy|away
altin has joined #ruby
aniM has joined #ruby
<syfon>
DouweM: thanks again for your help
<syfon>
bb
syfon has left #ruby [#ruby]
bambuka has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
drumusician has joined #ruby
bambuka has joined #ruby
rmorello has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
vpretzel has joined #ruby
Advocation has quit [Quit: Advocation]
havenwood has quit [Ping timeout: 245 seconds]
rudisimo has joined #ruby
Txandy|away is now known as Txandy
araujo has quit [Read error: Connection reset by peer]
breakingthings has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
v0n has quit [Read error: Operation timed out]
cj3kim has joined #ruby
Brolen has quit [Remote host closed the connection]
m104 has quit [Quit: bye]
tharindu has quit [Quit: Leaving...]
dkamioka has joined #ruby
vpretzel has quit [Ping timeout: 252 seconds]
tannerburson has quit [Quit: tannerburson]
<benzrf>
g2g
benzrf has quit [Quit: leaving]
dkamioka has quit [Remote host closed the connection]
dkamioka has joined #ruby
iamdoo2 has joined #ruby
figgleberry has joined #ruby
cj3kim has quit [Ping timeout: 245 seconds]
tannerburson has joined #ruby
Fyyr13_ has joined #ruby
iamdoo2 has quit [Ping timeout: 240 seconds]
PrimeFry has quit [Ping timeout: 252 seconds]
dkamioka has quit [Ping timeout: 252 seconds]
yacks has joined #ruby
aagdbl has joined #ruby
aagdbl has quit [Client Quit]
synergy_ has joined #ruby
<olivier_bk>
i have a variable where i get a number getime= (ddays*24*60*60)
Advocation has joined #ruby
<olivier_bk>
when i try to execute my script i get undefined method `*'
<olivier_bk>
??
<olivier_bk>
i try without ()
ewnd9 has quit [Ping timeout: 260 seconds]
<olivier_bk>
but i get the same error
angusiguess has joined #ruby
<tobiasvl>
what is ddays?
tvw has joined #ruby
vpretzel has joined #ruby
<tobiasvl>
the error probably says that the object ddays doesn't have an * method
fedesilva has quit [Remote host closed the connection]
<tobiasvl>
i.e. it's not a number, for example
dkamioka has joined #ruby
<tobiasvl>
but without the actual error message it's hard for us to say
jaimef has joined #ruby
AlSquirrel has joined #ruby
tyl has joined #ruby
<olivier_bk>
tobiasvl, ddays it's a variable you must pass a integer 1,2, etc..
<tobiasvl>
i realise it's a variable
<tobiasvl>
but of what type?
<olivier_bk>
ddays= !!Integer(ARGV.shift)
shedd has joined #ruby
<DouweM>
why do you !! it?
<tobiasvl>
okay. the !! turns it into a boolean. booleans don't have a * method.
<olivier_bk>
it 's okai
<olivier_bk>
lol
<olivier_bk>
i didn't see !!
<tobiasvl>
so there's your error. why you're making it is not very clear to me.
tobago has joined #ruby
claymore has quit [Ping timeout: 252 seconds]
kaldrenon has joined #ruby
freezey has joined #ruby
ffranz has joined #ruby
<LadyRainicorn>
class TrueClass; def *(_) ""; end; end
<tobiasvl>
:)
<LadyRainicorn>
^ Ruby-to-JS compiler
claymore has joined #ruby
phansch has quit [Quit: Leaving]
jerius has joined #ruby
shedd has quit [Ping timeout: 248 seconds]
<waxjar>
true * 1 in the js console gives me 1.
allaire has joined #ruby
krz has joined #ruby
tobago has quit [Ping timeout: 252 seconds]
runa has joined #ruby
enebo has joined #ruby
yfeldblum has joined #ruby
<LadyRainicorn>
It was a joke ;p
v0n has joined #ruby
shime has joined #ruby
Megtastique has joined #ruby
<runa>
heyas. I've found myself doing this a lot: "foo.responds_to?(:bar) ? foo.bar : nil" any better way to do it?
<LadyRainicorn>
`class Array; def +(a) to_s+a.to_s+; end; end` is more literal.
Txandy is now known as Txandy|away
<LadyRainicorn>
In Rails, #try
Coolhand is now known as niharvey
altin has quit [Quit: Ex-Chat]
<tobiasvl>
runa: method_missing perhaps?
yasushi has quit [Remote host closed the connection]
<runa>
tobiasvl: for foo.class, you mean?
<LadyRainicorn>
It's pretty easy to add the try method yourself if you're so inclined.
<waxjar>
LadyRainicorn: i wonder what the logic behind it is, though :p
Xeago_ has joined #ruby
LaPetiteFromage has joined #ruby
<LadyRainicorn>
There is no logic in JS.
<DouweM>
LadyRainicorn: #try doesn't check #respond_to? right? I think it just #send's
<runa>
LadyRainicorn: afaik 'try' does a different thing: nil.try(:bar) => nil but "A".try(:bar) will raise an exception
<DouweM>
runa: ;)
<waxjar>
haha
Txandy|away is now known as Txandy
tobago has joined #ruby
<LadyRainicorn>
oh wow my Rails is shit haha
<tobiasvl>
runa: oh yeah nevermind
razibog has quit [Ping timeout: 272 seconds]
_maes_ has joined #ruby
tannerburson has quit [Quit: tannerburson]
t0m0_ has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
bradhe has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
michael_lee has quit [Read error: Connection reset by peer]
Deejay_ has quit [Quit: Computer has gone to sleep.]
sailias has joined #ruby
ItSANgo has quit [Quit: Leaving...]
Deejay_ has joined #ruby
razibog has joined #ruby
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
meatherly has joined #ruby
figglebe_ has joined #ruby
<workmad3>
waxjar: try is implemented like so: 'class NilClass; def try(*args); self; end; end; class Object; def try(m, *args, **kwargs, &blk); self.send(m, *args, **kwards, &blk); end; end' (or close enough to that :) )
fedesilva has joined #ruby
<waxjar>
workmad3: i meant the true * 1 = 1 in javascript :p
<workmad3>
oh right
<workmad3>
waxjar: {} + {} is a fun one in JS too :)
<LadyRainicorn>
waxjar: The actual rationale is weak typing.
<LadyRainicorn>
Everything will try to convert to a string or integer.
mary5030 has quit [Remote host closed the connection]
relix has joined #ruby
<DouweM>
waxjar: the thing here is that the function passed to map is passed the element's index as a second argument, which is the radix in parseInt's case
mary5030 has joined #ruby
<workmad3>
DouweM: hahaha
<DouweM>
so that's not gonna give you [10,10,10,10]
mavcunha has quit [Ping timeout: 265 seconds]
<workmad3>
is there a way to curry an argument on a JS function?
<waxjar>
wonderful! :D
Neomex has quit [Client Quit]
<DouweM>
workmad3: yeah, check out #apply and #call
mengu has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
eshy has quit [Ping timeout: 256 seconds]
mavcunha has joined #ruby
<workmad3>
DouweM: hmm, looks like bind is closer to what I was thinking
SnurpDerp has quit [Remote host closed the connection]
<workmad3>
DouweM: but that doesn't let you leave an argument open, by the looks of things
<DouweM>
workmad3: doesn't that set this or something? I'm not too familiar with #bind
<DouweM>
workmad3: what are you trying to do?
duggiefresh has joined #ruby
havenwood has joined #ruby
<workmad3>
DouweM: I was thinking along the lines of .map(parseInt.bind(_, 10) )
<workmad3>
DouweM: for your map example
wiku5_ has joined #ruby
<workmad3>
DouweM: basically, curry parseInt so that it's a single-parameter function with 10 pre-bound in as the radix
<DouweM>
workmad3: ah, that's pretty interesting
<DouweM>
workmad3: but bind sets the arguments first-to-last, so you can't just override the last one
ItSANgo has joined #ruby
<workmad3>
exactly
<waxjar>
wouldn't .map(function(x,y) { return parseInt(x,10) } do ?
blaxter_ has joined #ruby
<workmad3>
waxjar: it's ugly though ;)
<DouweM>
waxjar: yeah, you can even drop the ',y'
<waxjar>
workmad3: it is :p
<LadyRainicorn>
Yes, but it's quite unexpected and pretty insane.
<workmad3>
although the coffeescript version is somewhat improved...
<DouweM>
waxjar: but that's so counterintuitive :P
<workmad3>
.map (x)-> parseInt(x)
marr has quit [Ping timeout: 272 seconds]
<LadyRainicorn>
(0 == -0) && (1/0 != 1/-0)
<workmad3>
hell, in coffeescript you can even do 'parseInt x for x in ary'
banister has joined #ruby
jobewan has joined #ruby
sambao21 has joined #ruby
<LadyRainicorn>
In fact, (0 === -0)
<workmad3>
but that's somewhat less functional
griffindy has joined #ruby
<DouweM>
workmad3: reads nice though
LaPetiteFromage has quit [Quit: LaPetiteFromage]
<workmad3>
DouweM: I kinda prefer the ary.map (x)->parseInt(x) tbh
<workmad3>
DouweM: what I'd like is a curry function that lets you do something like func.curry(arg_position, value), so you could do parseInt.curry(1, 10) to get a partial application of parseInt with 10 as the second argument (0-indexed, obviously)
wildroman2 has quit [Remote host closed the connection]
<DouweM>
workmad3: right, that would be nice. it's fairly easy to implement
LaPetiteFromage has joined #ruby
<workmad3>
yeah, just a shame that it's not in as standard already :)
angusigu1ss has joined #ruby
<waxjar>
that'd be way sweeter with keyword arguments
<workmad3>
.bind is pretty close, and it does let you do some nice stuff, such as doFooIn = setTimeout.bind(foo.bind("arg1", "arg2")); doFooIn(1000);
<DouweM>
oh, that's pretty neat! although you're messing up foo's first arg now ;)
sergicles has quit [Quit: sergicles]
<LadyRainicorn>
What would be nice is the standard not to change the arguments a function gives based on arity.
<DouweM>
bind's first arg I mean
tannerburson has joined #ruby
<LadyRainicorn>
That is insane behavior.
grvgr has joined #ruby
<DouweM>
LadyRainicorn: are we sure it doesn't just try to pass both args to any function, it just being dropped for those with 1 arg only?
Czupa has joined #ruby
vince0606 has joined #ruby
<DouweM>
but yeah, it's still a really annoying "feature"
camilasan has quit []
<LadyRainicorn>
Ah, that's possible.
<LadyRainicorn>
optional arguments are even worse.
angusigu1ss has quit [Ping timeout: 252 seconds]
<DouweM>
it's a nice feature in theory, automagically having access to the index from your mapped function
sguselnikov has joined #ruby
MattStratton has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
mspah_ has quit [Quit: This computer has gone to sleep]
arietis has quit [Ping timeout: 252 seconds]
<LadyRainicorn>
It's nicer to have a different function for that.
<DouweM>
well, we say that mow
<DouweM>
*now
<shevy>
It is even nicer to play with ponicorns and rainbows rather than code anything!
<DouweM>
if parseInt didn't have the second rarely used arg, chances are no-one would have noticed
<LadyRainicorn>
True that, shevy.
interactionjaxsn has joined #ruby
sparrovv has joined #ruby
Txandy is now known as Txandy|away
Txandy|away is now known as Txandy
<LadyRainicorn>
Not true. There are a lot of things that might take an optional second argument.
<waxjar>
Proc doesnt seem to support currying arguments based on their position either, btw
sparrovv has quit [Remote host closed the connection]
<DouweM>
LadyRainicorn: yeah, you're right. but I can imagine that the people who thought up this "feature" were very content with themselves
<DouweM>
LadyRainicorn: they should've given it 5 minutes more thought do
<DouweM>
which can be said for all of JS
<DouweM>
*though
Brolen has joined #ruby
<LadyRainicorn>
JS should have been bytecode from the start.
<LadyRainicorn>
It was a crazy idea to standardize on a real language for the web.
<LadyRainicorn>
(same with HTML)
ktosiek has quit [Ping timeout: 245 seconds]
jedimind has joined #ruby
Quintus_q has joined #ruby
noop has quit [Ping timeout: 245 seconds]
himsin has joined #ruby
himsin has quit [Client Quit]
<Hanmac>
shevy: look i found Quintus_q ;P
<LadyRainicorn>
Where?
makara has quit [Quit: Leaving]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* Quintus_q
hides
sparrovv has joined #ruby
<shevy>
damn
<shevy>
is he doing ruby finally?
<shevy>
:>
<shevy>
wait! I get it!
<shevy>
he will help you with rxw right Hanmac? OpenRMK will make use of rxw \o/
jobewan has quit [Ping timeout: 240 seconds]
<LadyRainicorn>
rxw?
<Hanmac>
shevy: OpenRMK was the reason why i did begin with rwx ,P
<shevy>
LadyRainicorn XHTML is even better, it has a leading X
<shevy>
which stands for eXtreme. eXtreme HTML!
* LadyRainicorn
wants xxxHTML
<shevy>
if you don't like it, you haven't used it enough yet
aryaching has quit [Quit: sayonara! ^_^]
<Hanmac>
shevy: everything is better with X ;P
<LadyRainicorn>
That is definitely true Hanmac.
<shevy>
Hanmac that was really the reason?
* LadyRainicorn
has the rainbows to prove it.
<shevy>
I thought because you like wxwidgets
<shevy>
your rainbows are awesome LadyRainicorn
<shevy>
better than any LSD trip
<LadyRainicorn>
I know :3
* LadyRainicorn
gives shevy extra rainbows.
wildroman2 has joined #ruby
<shevy>
<3
wildroman2 has quit [Remote host closed the connection]
<Hanmac>
shevy: yeah ... i needed an gui toolkit and then i liked wxwidgets ... (an other friend of mine already made many dialogs in xml files for wx )
freerobby has quit [Quit: Leaving.]
aryaching has joined #ruby
<shevy>
good!
<shevy>
the only surviving competition against ruby-gnome
<freeone3000>
If I'm looking to run a daemon service as a webserver's worker process, using mongodb as IPC, and I want to write the daemon service in Ruby, where should I start?
mansi has joined #ruby
grvgr has joined #ruby
<LadyRainicorn>
1) Don't use mongodb for IPC.
Alina-malina has quit [Quit: Leaving]
iamdoo2 has joined #ruby
<LadyRainicorn>
2) A worker process is not the same thing as a daemon.
<freeone3000>
LadyRainicorn: Why not? Lack of acid compliance, or is using a database for this just not desirable?
thomasxie has quit [Quit: Leaving.]
aryaching_ has joined #ruby
<LadyRainicorn>
Databases are just not the tool for IPC.
<freeone3000>
LadyRainicorn: Well, it runs in the background, independent of the webserver, and survives past killing of its associated terminal. What else do you call that?
<LadyRainicorn>
A daemon.
<shevy>
ponyserver!
<LadyRainicorn>
Yes.
Alina-malina has joined #ruby
<LadyRainicorn>
ponysrv
<shevy>
demon sounds so nasty...
nomenkun has joined #ruby
<LadyRainicorn>
rainbelicangel
<shevy>
freeone3000 runs in the background ... isn't that like a thread?
claymore has quit [Ping timeout: 248 seconds]
Deejay_ has quit [Quit: Computer has gone to sleep.]
<freeone3000>
shevy: Threads have an associated process. I want this to be able to survive if, say, we needed to kill the webserver. For some reason.
aryaching has quit [Ping timeout: 240 seconds]
<LadyRainicorn>
Then just create another process?
<LadyRainicorn>
What do you actually want to do?
benzrf has joined #ruby
<benzrf>
hello
sski has quit [Remote host closed the connection]
<benzrf>
anybody care to test out my half-baked gem?
<benzrf>
you will need to know a tiny bit of js
<benzrf>
:3
ddssc has quit [Quit: Leaving]
<freeone3000>
LadyRainicorn: Well, first, why not a database for IPC? It supports locking and transactions. The only thing it's missing is notification.
NaStYdoG has joined #ruby
Kricir has joined #ruby
<LadyRainicorn>
Oh dear, what gem?
sski has joined #ruby
<benzrf>
well it is not pushed yet
<benzrf>
i would consider ir in alpha or pre-alpha
<freeone3000>
LadyRainicorn: Suppose I could use a dedicated message bus instead. ActiveMQ or the like. That what you're pushing for?
<LadyRainicorn>
IPC is a totally different problem than databases solve. Can you tell us what specifically you want to do?
<freeone3000>
LadyRainicorn: I'm building an administrative dashboard for an internal build tool. This build tool has to run a long-running process (the build), preferably independent of the webserver (because the webserver is big and clunky and so on). If these could be on separate machines, that'd be awesome.
sassamo has quit [Remote host closed the connection]
<shevy>
"<freeone3000> shevy: Threads have an associated process" but aren't there zombie threads too? :)
<workmad3>
freeone3000: sounds like a good fit for ZeroMQ or similar
claymore has joined #ruby
tylersmith has joined #ruby
sassamo has joined #ruby
xcv has quit [Remote host closed the connection]
iamdoo2 has quit [Ping timeout: 272 seconds]
<benzrf>
LadyRainicorn: tryin it?
<benzrf>
:3
xcv has joined #ruby
<waxjar>
zeromq is nice
kobain has joined #ruby
<workmad3>
freeone3000: I've done a similar thing before, where I used RabbitMQ - first I had a message exchange where the web server could put new tasks on, and any worker could come along and pick it up to process
<shevy>
ur mom is nice
<waxjar>
aww
<benzrf>
shevy: *ur mumblerit
<benzrf>
*mum
<shevy>
hehe
<shevy>
I <3 your tab completions
figglebe_ has quit [Ping timeout: 252 seconds]
<workmad3>
freeone3000: then, once a worker had picked it up, it opened a new queue that could be used by the web server to communicate directly with the worker for control messages
sski has quit [Ping timeout: 240 seconds]
<freeone3000>
Okay, so I'm looking at a dedicated message bus. I've done this using Java and ActiveMQ, so that's not the tricky bit. How should a standalone ruby project be structured?
<workmad3>
freeone3000: I normally go with a bin/, lib/, spec/ structure, similar to a gem
<LadyRainicorn>
benzrf: `[] instanceof Object` is true.
<LadyRainicorn>
(so the else if clause in makeClientsideSocket is a non-op.
<LadyRainicorn>
)
yfeldblum has joined #ruby
<benzrf>
LadyRainicorn: it is??
achru has joined #ruby
<benzrf>
oh crud
<benzrf>
ok let me swap that around
kindjal has joined #ruby
<LadyRainicorn>
(this is what I mean when I say JS is hard to code)
tagrudev has quit [Remote host closed the connection]
<benzrf>
fixt
hobodave has joined #ruby
sparrovv has quit [Remote host closed the connection]
Wolland has quit [Remote host closed the connection]
sparrovv has joined #ruby
claymore has quit [Ping timeout: 265 seconds]
bradhe has quit [Ping timeout: 240 seconds]
Wolland has joined #ruby
kcombs has joined #ruby
kitak has quit [Remote host closed the connection]
binaryplease has joined #ruby
mengu has quit []
yfeldblum has quit [Ping timeout: 245 seconds]
kitak has joined #ruby
freezey has quit [Remote host closed the connection]
Es0teric has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
vallieres_ has joined #ruby
sparrovv has quit [Remote host closed the connection]
Neomex has joined #ruby
razibog has quit [Ping timeout: 245 seconds]
sdwrage has joined #ruby
rm_ has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 272 seconds]
olivier_bK1 has joined #ruby
rm_ has joined #ruby
olivier_bK1 has quit [Client Quit]
mary5030 has quit [Remote host closed the connection]
cj3kim has joined #ruby
vlad_sta_ has joined #ruby
olivier_bk has quit [Quit: Quitte]
olivier_bk has joined #ruby
Fyyr13_ has quit [Quit: Leaving...]
freezey has joined #ruby
rm_ has quit [Read error: No route to host]
aryaching has quit []
bradleyprice has joined #ruby
rm_ has joined #ruby
Txandy is now known as Txandy|away
Txandy|away is now known as Txandy
claymore has joined #ruby
aryaching has joined #ruby
zigomir has quit [Remote host closed the connection]
pierre1_ has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cj3kim has quit [Ping timeout: 272 seconds]
Mattx has quit [Ping timeout: 245 seconds]
chipotle has quit [Quit: cya]
MatthewsFace has joined #ruby
axl_ has joined #ruby
mspah_ has joined #ruby
MatthewsFace has quit [Client Quit]
mspah_ has quit [Client Quit]
chipotle has joined #ruby
pushpak has joined #ruby
dangerousdave has joined #ruby
sski has joined #ruby
Xeago_ has quit [Remote host closed the connection]
claymore has quit [Ping timeout: 253 seconds]
bradhe has joined #ruby
alekst has joined #ruby
Xeago has joined #ruby
roychri has joined #ruby
<benzrf>
shevy: sudo gem install clientside
<benzrf>
B)
Solnse has joined #ruby
<benzrf>
shit, should i put examples in the gem/
vlad_starkov has joined #ruby
Megtastique has quit []
tharindu has joined #ruby
<ddd>
example are always good
kevind has joined #ruby
wallerdev has joined #ruby
axl_ has quit [Ping timeout: 245 seconds]
axl__ has joined #ruby
dkamioka has quit [Remote host closed the connection]
<benzrf>
i have an example in the github
<ddd>
for myself, nothing i hate worse these days than a gem w/o examples of how the author actually intended it be used. (but thats just me)
<benzrf>
should it be in the gem
<benzrf>
that is should it be in files
mikepack has joined #ruby
<LadyRainicorn>
examples require Sinatra btw.
dkamioka has joined #ruby
<benzrf>
yeah
<ddd>
oh
<benzrf>
but they are meant to be read more than run
<benzrf>
;)
zoscoy has joined #ruby
<ddd>
yeah, because not everyone will always have inet and you can download the gem and install offline
<benzrf>
you do not need sinatra to use clientside
Alina-malina has quit [Quit: Leaving]
<benzrf>
ok
<roychri>
Hello! I installed rvm and I want to run a command on boot as an unpriviledge user. I created a file in /etc/rc.d/ and I use "su - someuser -c /path/to/rubyscript.rb" and inside that /path/to/rubyscript.rb file I put a shebang line pointing to the rvm ruby (there might be a better way) I am trying to find information about how to do this but all I can find is instructions not to use "sudo" with rvm (the documents talk about tho
<roychri>
se trying to run the commands as root which is NOT what I am doing). Any pointers?
pierre1_ has quit [Quit: Leaving]
mikepack has quit [Client Quit]
pierre1_ has joined #ruby
<ddd>
just thinking if you want to give the greater support with the less effort, putting the example(s) in the gem might be a good idea
phansch has joined #ruby
<roychri>
right now the scritp cannot find the gems I installed on the someuser account
<benzrf>
ok
<shevy>
benzrf one working example is fine, so that other people know how to use it specifically
<benzrf>
how can i recursively include a dir
<ddd>
yeah exactly
<shevy>
a working example is actually the best initial documentation :)
fveillette has joined #ruby
pierre1__ has joined #ruby
pierre1__ has quit [Client Quit]
<fveillette>
I have issue with win32-service library can someone help me
vlad_sta_ has quit [Ping timeout: 248 seconds]
<benzrf>
wait, gem build will use your gemfile for deps right?
grvgr has left #ruby [#ruby]
duggiefresh has quit [Read error: Connection reset by peer]
sski has quit [Ping timeout: 272 seconds]
<ddd>
no, it should be using the gemspec
<shevy>
no
pierre1__ has joined #ruby
<benzrf>
oh dang
eshy has joined #ruby
duggiefresh has joined #ruby
pierre1__ has quit [Read error: Connection reset by peer]
<shevy>
the dependencies will have to be matched by the one who downloads the gem
<shevy>
and gem normally takes care of that
mikepack has joined #ruby
<benzrf>
is it good practice to have gemspec import the deps from gemfile?
arctarus has quit [Remote host closed the connection]
<shevy>
dunno. gemspec is a ruby file, you can use any ruby code in it
<shevy>
in one project I read a file called "DEPENDENCIES"
<DouweM>
benzrf: define deps them in gemspec, reference gemspec from gemfile
<shevy>
but in general I prefer the stupid old fashioned linear way - one dep after the other
boboc has joined #ruby
<havenwood>
benzrf: yeah, normal to have `gemspec` in your Gemfile (for a gem).
<fveillette>
I have issue with win32-service library can someone help me
axl__ has quit [Ping timeout: 265 seconds]
<havenwood>
benzrf: With gems ignore the Gemfile.lock and have Gemfile point at gemspec.
angusigu1ss has joined #ruby
ewnd9 has joined #ruby
<ddd>
benzrf well i use bundler myself. in its case you put the deps *you* as the dev need in the Gemfile, and at the very very bottom add the line 'gemspec'. In the gemspec you follow the rubygem's API for specifying what the user would need
dkamioka has quit [Ping timeout: 265 seconds]
<ddd>
like add_dependency etc
bradhe has quit [Remote host closed the connection]
<DouweM>
ddd: y u no use add_development_dependency?
figgleberry has joined #ruby
Alina-malina has joined #ruby
<DouweM>
ddd: that way they'll be listed on rubygems.org as well, which is interesting
phinfonet has joined #ruby
<havenwood>
+1 #add_development_dependency
geggam_ has joined #ruby
oso96_2000 has joined #ruby
<ddd>
douwem because then it makes the gem require those for development. but what if they don't want to use pry etc.
pierre1_ has quit [Ping timeout: 248 seconds]
_maes_ has joined #ruby
<ddd>
only reason i say use the Gemfile. I mean use add_development_dependency for the core that the gem needs in order to do development with it or on it
stkowski has joined #ruby
<DouweM>
ah okay, you want to add rspec for example to the gemspec, but not pry?
<ddd>
but I use Gemfile for those files *I* would use that they might not
<benzrf>
crap bbiab
ndrei has joined #ruby
<ddd>
right
<benzrf>
class kicked in
geggam_ is now known as geggam
<benzrf>
readin backlog l8r
<DouweM>
all right, that makes some sense
<shevy>
ddd may be studying diesel engines but he sure knows his ruby \o/
freerobby has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
<ddd>
i'm a self taught developer, so I'm not sure if all my choices are absolutely correct.
pranny has quit [Quit: Leaving.]
<havenwood>
i already have my own gems installed, gemspec for others
phansch has quit [Remote host closed the connection]
Txandy is now known as Txandy|away
<DouweM>
ah, ddd was the guy building dtf :P
<ddd>
yeah
<DouweM>
havenwood: yeah, that's what I do as well
Mattx has joined #ruby
<ddd>
never worked for a coding house or anything, so my choices might be wrong. idk
<havenwood>
There was a coding house in New Orleans...
Neomex has quit [Ping timeout: 252 seconds]
<shevy>
there is more than one way ddd
<DouweM>
haha
<ddd>
douwem hey dtf got me rolling pretty damned well on learning straight ruby
phansch has joined #ruby
<ddd>
learned a WHOLE lot working on that, even if its not up to snuff
<havenwood>
what's dtf?
<havenwood>
i know the traditional meaning.. >.>
<zellio>
havenwood: dynamic type fixing
<DouweM>
it sure does have a rememberable name
<ddd>
Deryl's Testing Framework
<ddd>
I wrote it to help test RVM stuff
angusigu1ss has quit [Ping timeout: 264 seconds]
phansch has quit [Remote host closed the connection]
<ddd>
github.com/dtf-gems/dtf
<DouweM>
ddd: were you not aware of the conventional meaning or did you just not care?
jedimind has quit [Read error: Connection reset by peer]
yedimind has joined #ruby
<ddd>
i wasn't aware at the time
phansch has joined #ruby
claymore has joined #ruby
<ddd>
the more i hang out in this and the rails channel the more i realize just how much i don't know hehe
bean has joined #ruby
blaxter_ has quit [Ping timeout: 272 seconds]
<shevy>
in the rails channel as well
Txandy|away is now known as Txandy
<shevy>
they must teach you a lot!
<ddd>
actually, radar and others do teach me quite a bit
alekst has quit [Quit: Computer has gone to sleep.]
<shevy>
wheeee radar is here
<ddd>
workmad3, xybre, wmoxam when he talks to me, and others really help(ed) me out
Deejay_ has quit [Quit: Computer has gone to sleep.]
aryaching has quit [Ping timeout: 248 seconds]
tharindu_ has joined #ruby
pen has joined #ruby
ewnd9_ has joined #ruby
Megtastique has joined #ruby
mmcclimon has joined #ruby
shredding has quit [Read error: Connection reset by peer]
<mmcclimon>
exit
mmcclimon has quit [Client Quit]
<LadyRainicorn>
no.
ghr has quit [Quit: Computer has gone to sleep.]
<fveillette>
I have issue with win32-service library can someone help me
<ddd>
my original goal with DTF was to use Marshaling to be able to replay installs etc, record failures, capture the environment and various settings, then let people build entire test suites from different runs in order to make both successful and failing suites they could bisect their setups with
hobodave has quit [Quit: Computer has gone to sleep.]
<ddd>
life got in the way so i let it sit on the back burner for a long time. i'm a few months away from getting back to working on it
acrussell has joined #ruby
acrussell has left #ruby [#ruby]
ewnd9 has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
tharindu has quit [Ping timeout: 265 seconds]
havenwood has joined #ruby
wildroman2 has quit [Remote host closed the connection]
doodlehaus has joined #ruby
shvelo has quit [Ping timeout: 245 seconds]
pietr0 has joined #ruby
philsturgeon has joined #ruby
<v0n>
hi
jrd00 is now known as jrd0
maletor has joined #ruby
<DouweM>
ho
<philsturgeon>
if foo is "2014-01-28 11:05:18 -0500" then why does puts DateTime.parse(foo) give "no implicit conversion of Time into String"?
yedimind is now known as jedimind
<workmad3>
philsturgeon: because 'puts' expects a string
<DouweM>
philsturgeon: you sure foo is a string, and not, say, a Time?
stkowski has quit [Quit: stkowski]
<workmad3>
philsturgeon: and you gave it a DateTime
Macaveli has quit [Ping timeout: 245 seconds]
RaCx has quit [Ping timeout: 251 seconds]
<v0n>
since when we don't need to provide the '&' char to call a method in a block? e.g. [6, 3, 36].reduce(:gcd) instead of [6, 3, 36].reduce(&:gcd)
<workmad3>
hmm... actually, scratch that
<DouweM>
workmad3: that's never mattered, doesn't it just call to_s on whatever you pass it?
<workmad3>
I think DouweM got it :)
<DouweM>
v0n: you do need the &, except for when the method supports symbols explicitly
<DouweM>
v0n: which inject/reduce does
<v0n>
DouweM: ok, so that's a special behavior of reduce()
<DouweM>
v0n: yessir
<v0n>
I'll stick with the & sign for consistency then, thx
havenwood has quit [Ping timeout: 272 seconds]
<philsturgeon>
DouweM: derp. the gem was converting it for me
<philsturgeon>
thanks
<philsturgeon>
twitter gem was turning it from string into time I mean
<philsturgeon>
sneaky sneaky
<DouweM>
philsturgeon: it helps to read errors carefully ;)
claymore has quit [Ping timeout: 265 seconds]
pen has quit [Remote host closed the connection]
<philsturgeon>
DouweM: I would, but im extremely hungover, so im lazywebbing everything
<philsturgeon>
thanks
<DouweM>
oh so you thought you'd waste our time instead of your own?
<DouweM>
I kid, mostly
tannerburson has quit [Quit: tannerburson]
<DouweM>
But please, try your own brain or the googles first
Al__ has joined #ruby
axl_ has joined #ruby
sguselnikov has quit [Quit: Computer has gone to sleep.]
_JamieD_ has quit [Quit: _JamieD_]
<philsturgeon>
DouweM: oh, well now my feelings are hurt
<philsturgeon>
obviously I googled it, and there is literally nothing useful as a response
runa has left #ruby [#ruby]
<philsturgeon>
im grateful for your time, but chill out.
<james_woods>
Hi, I'm trying to make my code fit on 80 chars per line. I have seen some examples where people are using <<-EOF to do that. Unfortunately I cannot find a source on the web on how to use it correctly (it doesnt work for me) can someone point me towards an example?
noname001__ has quit [Ping timeout: 245 seconds]
freezey has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 252 seconds]
roychri has left #ruby ["If you want to know something about me, ask me!"]
arietis has joined #ruby
aspires has joined #ruby
freezey has joined #ruby
<centrx>
james_woods, Make your code have short lines by making the code simpler and modular, not by fancy tricks
<DouweM>
+1
<james_woods>
centrx: well its a string
<shevy>
james_woods people often use <<- because they want a string and dont want to do fancy escaping
yasushi has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
nism has joined #ruby
Txandy is now known as Txandy|away
sivoais has joined #ruby
Xeago_ has joined #ruby
wildroman2 has quit []
heftig has quit [Ping timeout: 252 seconds]
jedimind has quit [Ping timeout: 264 seconds]
phansch has quit [Quit: Leaving]
<benzrf>
bnagy: yo wanna try clientside
<benzrf>
(⊙ω⊙)
Yahkob has joined #ruby
<DouweM>
that's a disturbing face
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
Brolen has quit [Remote host closed the connection]
centr0 has joined #ruby
wildroman2 has joined #ruby
Brolen has joined #ruby
senj has joined #ruby
xcv has quit [Remote host closed the connection]
<centrx>
benzrf, What is this: use Clientside::Middleware
<centrx>
benzrf, Is that where you install the virus
senj has quit [Changing host]
senj has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
Yahkob has quit [Client Quit]
pen has quit [Ping timeout: 264 seconds]
b00stfr3ak has quit [Ping timeout: 260 seconds]
Xeago_ has quit [Ping timeout: 264 seconds]
hobodave has joined #ruby
<benzrf>
lol
hobodave has quit [Client Quit]
mary5030 has joined #ruby
<benzrf>
centrx: it's adding the middleware to the rack stack
<benzrf>
duh
pranny has quit [Read error: Connection reset by peer]
jedimind has joined #ruby
<DouweM>
well, occam's razor says you included a c extension to override the use method to install a virus
Brolen has quit [Read error: Operation timed out]
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
<DouweM>
because obviously this is a c virus
<james_woods>
well that doesnt help me as my string has string variables in it it #{} (its an uri) ..is there any way to add query params to an URI class in ruby? the doc makes me feel that this is not possible
<DouweM>
james_woods: don't build the querystring manually, construct them from a Hash. Will look nicer in code
sahilsk has joined #ruby
<benzrf>
centrx: are you /running/ the example
<james_woods>
DouweM: I tried to do that as well but I doenst look like the URI class is accpeting hashes
<benzrf>
centrx: clientside itself does not require sinatra but the example does
pen has joined #ruby
<centrx>
benzrf, With the "run" command?
sivoais has quit [Ping timeout: 265 seconds]
<benzrf>
centrx: you could install my gemfile ;p
claymore has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
<benzrf>
centrx: i recommend using 'rainbows -E production'
<DouweM>
james_woods: chances are it's not, in which case you should loop over the hash and construct the string representation yourself
<benzrf>
if you don't specify production websockets dont work right
octoberry has joined #ruby
<benzrf>
centrx: youll need to bundle install probably
Davey has joined #ruby
<DouweM>
james_woods: or use an existing lib to do so. such a method is available in Rack (and thus Rails), for example
<centrx>
I don't know...Looks like a lot of viruses in there
<benzrf>
:3
lmickh has joined #ruby
ndrei has joined #ruby
<centrx>
"A simple Rack middleware and JavaScript generator for basic remote method invocation over websockets." - Wait a minute, the whole thing is a virus
<benzrf>
hue
<DouweM>
saturation
<benzrf>
luminosity
snath has quit [Ping timeout: 245 seconds]
<benzrf>
*ou
<DouweM>
brightness
Deejay_ has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
<centrx>
computer
Parker0 has joined #ruby
Deejay_ has joined #ruby
f4a244c has quit [Remote host closed the connection]
claymore has joined #ruby
banister has joined #ruby
shedd has quit []
e^0 has quit [Ping timeout: 248 seconds]
zipper has quit [Quit: Lost terminal]
boboc has quit []
razibog has quit [Ping timeout: 252 seconds]
angusigu1ss has joined #ruby
binaryplease has quit [Ping timeout: 248 seconds]
aryaching has joined #ruby
TMM has quit [Quit: Ex-Chat]
octoberry has quit [Ping timeout: 240 seconds]
khismetix has joined #ruby
_Andres has joined #ruby
senj has quit [Quit: Sleep Now]
claymore has quit [Ping timeout: 260 seconds]
shime has quit [Ping timeout: 248 seconds]
Megtastique has quit []
aniM has quit [Ping timeout: 245 seconds]
dubsteph has joined #ruby
cj3kim has quit [Remote host closed the connection]
wildroman2 has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 240 seconds]
senj has joined #ruby
<shevy>
penis
havenwood has joined #ruby
<benzrf>
ಠ_ಠ
Txandy|away is now known as Txandy
angusigu1ss has quit [Ping timeout: 272 seconds]
mojjojo has quit [Quit: mojjojo]
mojjojo has joined #ruby
claymore has joined #ruby
shvelo has joined #ruby
Solnse has quit [Quit: Leaving.]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
jailbot has joined #ruby
aniM has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
e^0 has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
Hobogrammer_ has joined #ruby
aganov has quit [Quit: Leaving]
razibog has joined #ruby
achru has quit [Ping timeout: 240 seconds]
obs has quit [Quit: Konversation terminated!]
tylersmith has quit [Remote host closed the connection]
TaxmanBD has joined #ruby
RaCx has joined #ruby
Megtastique has joined #ruby
IceDragon has joined #ruby
Czupa has quit [Quit: Wychodzi]
gregoriokusowski has quit [Quit: gregoriokusowski]
<benzrf>
need moar alpha testing
<benzrf>
:3
freezey has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
coca_rails has joined #ruby
troyready has joined #ruby
lmickh has quit [Remote host closed the connection]
Wolland has joined #ruby
olivier_bk has quit [Ping timeout: 260 seconds]
gregoriokusowski has joined #ruby
brunops has quit [Ping timeout: 272 seconds]
sambao21 has joined #ruby
meatherly has quit [Remote host closed the connection]
dagobah has quit [Quit: Leaving...]
jkamenik has quit [Quit: Leaving.]
bradleyprice has quit [Remote host closed the connection]
meatherly has joined #ruby
rljohnsn has joined #ruby
iliketurtles has joined #ruby
benlieb has joined #ruby
iliketurtles has quit [Excess Flood]
nism has quit [Remote host closed the connection]
lmickh has joined #ruby
Txandy is now known as Txandy|away
iamdoo2 has joined #ruby
yacks has quit [Quit: Leaving]
aryaching has joined #ruby
Txandy|away is now known as Txandy
ozgun has quit [Quit: Leaving]
mando has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
razibog has quit [Ping timeout: 240 seconds]
nari has quit [Ping timeout: 240 seconds]
freezey has joined #ruby
wildroman2 has joined #ruby
m8 has joined #ruby
meatherly has quit [Ping timeout: 245 seconds]
robbyoconnor has quit [Ping timeout: 245 seconds]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
snath has joined #ruby
meatherly has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
DaniG2k has quit [Quit: leaving]
Advocation has quit [Quit: Advocation]
iamdoo2 has quit [Ping timeout: 252 seconds]
chipotle has quit [Quit: cya]
tacos1de has joined #ruby
<benlieb>
got no help in ROR so cross-posting: I'm new to using rspec should_receive and having a lot of problems because it "replaces" the method. For example: UserMailer.should_receive(:new_order).with(order) gives undefined method `deliver' for nil:NilClass, since rspec makes the method stop working. How do I deal with this?
timonv has quit [Remote host closed the connection]
<freeone3000>
Some research shows that this is because `rake` forks tests, but this is the only clear place to put a "minitest helper" - as part of the rake task, before it runs. What is the proper way to get test coverage on a multi-test project?
chipotle has joined #ruby
bricker`1A has quit [Ping timeout: 260 seconds]
axl_ has joined #ruby
centrx has joined #ruby
nomenkun has joined #ruby
<centrx>
I have returned
Solnse has joined #ruby
<ddd>
freeone3000 try out cover_me
figgleberry has joined #ruby
niklasb has joined #ruby
Bira has quit []
Guest71830 has quit [Ping timeout: 240 seconds]
olivier_bk has joined #ruby
tzorvas has joined #ruby
tzorvas is now known as Guest29305
dangerousdave has joined #ruby
musty has quit [Changing host]
musty has joined #ruby
blandflakes has quit [Quit: Page closed]
kevind has quit [Quit: kevind]
DanBoy has joined #ruby
blandflakes23 has joined #ruby
awarner has quit [Remote host closed the connection]
razibog has quit [Quit: Leaving.]
benlieb has joined #ruby
awarner has joined #ruby
awarner has quit [Remote host closed the connection]
freezey has joined #ruby
senj has quit [Quit: Sleep Now]
timonv has joined #ruby
einarj has joined #ruby
asmodlol has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
nomenkun has quit [Remote host closed the connection]
<nhmood>
Any improvements/other tips are also welcome
claymore has quit [Ping timeout: 245 seconds]
wiku5_ has quit [Quit: WeeChat 0.3.8]
wiku5_ has joined #ruby
therod has joined #ruby
<Morrolan>
I prefer literals when there's no reason to involve the constructor.
juni0r has quit [Ping timeout: 245 seconds]
Kricir has joined #ruby
claymore has joined #ruby
sLi- has quit [Ping timeout: 272 seconds]
mehlah has quit [Quit: Leaving...]
tharindu_ is now known as tharindu_|away
<freeone3000>
ddd: Looks nice. Doesn't work on JRuby, but that's JRuby's fault. Looking into how to actually get me code coverage.
sLi- has joined #ruby
kevind has joined #ruby
kirun has joined #ruby
ctp has quit [Quit: Leaving...]
nanoyak has joined #ruby
<nhmood>
Morrolan: I guess "" and {} are informative enough to someone reading the code as to what they should represent
sivoais has joined #ruby
<Morrolan>
Certainly.
<Morrolan>
Most people will be way more familiar with string and hash literals than with their respective constructors.
linojon has quit [Quit: linojon]
juni0r has joined #ruby
cj3kim has joined #ruby
mikemar10 has quit []
airdisa has joined #ruby
jmurray_ has joined #ruby
tauebel has left #ruby [#ruby]
sparrovv has joined #ruby
yfeldblum has quit [Remote host closed the connection]
senayar has joined #ruby
rezzack has joined #ruby
yfeldblum has joined #ruby
figglebe_ has joined #ruby
tharindu_|away is now known as tharindu_
figgleberry has quit [Ping timeout: 252 seconds]
octoberry has joined #ruby
standyro2 has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sparrovv has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
cj3kim has quit [Ping timeout: 248 seconds]
<nhmood>
Morrolan: great, thanks for the input
Notte has joined #ruby
bricker_ has joined #ruby
bricker_ is now known as bricker`work
<ddd>
it definitely works on jruby. I've used it on jruby
senayar has quit [Ping timeout: 252 seconds]
Hanmac1 has joined #ruby
roodee has joined #ruby
<ddd>
it wasn't until 2.1 was released that i stopped using jruby, and i've used cover_me (absolute defaults) on almost every project
reset has joined #ruby
tauebel1 has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
<jrhorn424>
scarfacedeb thanks that got me an id, at least. last time i worked on the routes, i was trying to make them prettier and reduce redundancy, since `devise_for` already creates the necessary user routes
figglebe_ has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
<benzrf|afk>
whats cover_me?
benzrf|afk is now known as benzrf
ndrei has quit [Ping timeout: 245 seconds]
<ddd>
code coverage gem
<benzrf>
ahuman:
<benzrf>
*ag
<benzrf>
ugh
<benzrf>
ah
<ddd>
hehe
achru has joined #ruby
ndrei has joined #ruby
<benzrf>
shevy: is clientside working on your end
Davey has joined #ruby
Hanmac has quit [Ping timeout: 265 seconds]
<shevy>
benzrf I got distracted by youtube videos :(
<shevy>
ultimate fails are pretty cool tho
<ddd>
man these last almost 2 weeks I'll be damned if I can get motivated to do dickall
Jdubs has joined #ruby
Squarepy has quit [Quit: Leaving]
interactionjaxsn has quit [Remote host closed the connection]
iceden has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
figgleberry has joined #ruby
dubsteph has quit [Remote host closed the connection]
<freeone3000>
I have a tests/test_helper.rb . This file does not seem to be called with minitest. How do I ensure that a file is included before my tests run, without having to specify it on each test?
jailbot has quit [Read error: Connection reset by peer]
aspires has quit []
nomenkun has quit [Read error: Connection reset by peer]
jailbot has joined #ruby
pel_daniel has joined #ruby
davy_ has joined #ruby
kenneth has quit [Quit: kswizz.com]
jailbot has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
jailbot has joined #ruby
jobewan has quit [Ping timeout: 252 seconds]
meatherly has quit [Ping timeout: 260 seconds]
danman has joined #ruby
vlad_starkov has joined #ruby
chipotle has joined #ruby
nomenkun_ has joined #ruby
nomenkun has quit [Read error: No route to host]
nomenkun has joined #ruby
davy_ has quit [Remote host closed the connection]
subbyyy_ has joined #ruby
simplyaubs has joined #ruby
<benzrf>
how do i schedule a repeating task
<zellio>
benzrf: cron
<benzrf>
in ruby
nomenkun has quit [Read error: Connection reset by peer]
<zellio>
gunna need a little more cotnext than that
Hanmac1 has joined #ruby
<benzrf>
heh
<zellio>
*context
<benzrf>
ok, my gem expects a websocket connection shortly after a page is loaded
soulcake has quit [Ping timeout: 260 seconds]
<benzrf>
so i make a hash storing the id to expect it to have as a key
ckinni has joined #ruby
<benzrf>
i'd like to make it so that if five minutes go by and the id isn't claimed, it gets removed from the hash
<Antiarc>
benzrf: Thread.new + loop + sleep :P
<benzrf>
otherwise that could be a leak
<benzrf>
Antiarc: ya sure?
<benzrf>
does that play well with rack?
SiliconG has quit [Ping timeout: 264 seconds]
nomenkun_ has quit [Ping timeout: 252 seconds]
<Antiarc>
If you synchronize it properly, sure
<shevy>
hehe
<benzrf>
nyehhh
<zellio>
XD
<zellio>
don't do that
nomenkun has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
<Antiarc>
It's the right solution. Just make sure you have one scheduler thread per process and synchronize access to any shared data structures.
therod has quit [Ping timeout: 260 seconds]
<Antiarc>
Alternately you could have the creation time of your data as a field, and every time you allocate a new connection, sweep old ones
<benzrf>
hmmm
<benzrf>
i think i will do that
<Antiarc>
But that would introduce O(n) overhead on connection
<benzrf>
fie
<Antiarc>
So if you have lots of live connections successive connections will be slower
kpshek has quit []
<benzrf>
well this is only for /pending/ connections
<benzrf>
so if you load the page with js off five times in a row..
jailbot has quit [Remote host closed the connection]
phansch has quit [Read error: Connection reset by peer]
phansch has joined #ruby
<benzrf>
what i can do is
<benzrf>
i can have an array of time/id pairs
<benzrf>
and push a new one onto the beginning
nomenku__ has joined #ruby
meatherly has joined #ruby
<benzrf>
that way if the newest one has not expired it will not traverse any more
kitak has quit [Remote host closed the connection]
kpshek has joined #ruby
kitak has joined #ruby
romdi has joined #ruby
alvaro_o has joined #ruby
Asher has quit [Quit: Leaving.]
figgleberry has joined #ruby
simoz110 has joined #ruby
hfp has quit [Ping timeout: 264 seconds]
krisbulman is now known as [krisbulman]
sambao21 has joined #ruby
<romdi>
does anyone know why the yaml gem turns time with a year over 10,000 into a string? dates with a year lower than 10k are deserialized fine, but it breaks at 10k+
<Antiarc>
Likely because it is looking for \d{4} for years, if I had to take an uneducated guess
<romdi>
that would make sense
<romdi>
still a bit odd, since ruby can handle the higher dates just fine
ohwhoa has joined #ruby
Parker0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<LastWhisper>
if I've got pry open within a method, is it possible to see where the method was called from ?
metics has joined #ruby
<waxjar>
there's #caller LastWhisper
<zellio>
freezey: you can change the directory of your proecss but, beyond crazy hacks, cannot and should not influence the parent process
<zellio>
(in this case the calling shell)
<freezey>
pl
<freezey>
ok*
<freezey>
thanks
mando has quit [Remote host closed the connection]
<freezey>
yeah i could hack it in
<freezey>
but wnated to make it clean
<LadyRainicorn>
Oh yeah that would be insane.
<LadyRainicorn>
Why would you possibly want to do that?
nfk has joined #ruby
lmickh has quit [Remote host closed the connection]
<waxjar>
you could return a file path instead, pass that to cd if you want to
lmickh has joined #ruby
mando has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blandflakes23 has quit [Ping timeout: 245 seconds]
benlieb has quit [Quit: benlieb]
shredding has quit [Quit: shredding]
shime has quit [Ping timeout: 245 seconds]
MJBrune has quit [Read error: Connection reset by peer]
diegoviola has quit [Ping timeout: 252 seconds]
Spami has joined #ruby
simplyaubs has quit [Quit: simplyaubs]
aspires has joined #ruby
drumusician has quit [Ping timeout: 260 seconds]
mando has quit [Ping timeout: 260 seconds]
kewubenduben has quit [Ping timeout: 260 seconds]
lfox has joined #ruby
hfp has quit [Ping timeout: 245 seconds]
lmickh has quit [Remote host closed the connection]
MJBrune has joined #ruby
rismoney has joined #ruby
davy__ has joined #ruby
v0n has quit [Read error: Operation timed out]
hfp has joined #ruby
<mzdravkov>
I have a program P where lets say I have variable A. I want to run some script on some event, in the context of P. So if my script to run has "print A", it should print the A from P. I tried with load/require, but it says that there is no such variable A.
sambao21 has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
standyro2 has quit [Ping timeout: 265 seconds]
jmurray has joined #ruby
geekbri has joined #ruby
charliesome has joined #ruby
gregoriokusowski has joined #ruby
<waxjar>
mzdravkov: you want to execute arbitrary code in a running process from another process?
geekbri has quit [Remote host closed the connection]
sethen has joined #ruby
LadyRainicorn has quit [Ping timeout: 265 seconds]
<bricker`work>
mzdravkov: is the variable actually a constant? or is it a local variable?
<mzdravkov>
waxjar: i have only one process. And I want to dynamicly run arbitary code from another file
<mzdravkov>
bricker`work: local variable
robbyoconnor has joined #ruby
<apeiros>
mzdravkov: you'd have to use eval.
tauebel has quit [Quit: Leaving.]
<apeiros>
if you are the author of the dynamically loaded code, that's fine.
<waxjar>
yeah, required/loaded files dont have access to local variables.
<apeiros>
otherwise that's frowned upon for good reason.
krnflake has quit [Ping timeout: 246 seconds]
<apeiros>
yeah, because, *local* :)
vlad_starkov has quit [Remote host closed the connection]
<LastWhisper>
thx waxjar
<mzdravkov>
apeiros: i don't mind using eval, the file is ment to be written by the administrator of the system, who has no good to break the system :D
havenwood has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SCommette has quit [Quit: SCommette]
benzrf has joined #ruby
atmosx has quit [Client Quit]
krnflake has joined #ruby
reset has quit [Read error: Connection reset by peer]
reset has joined #ruby
simplyaubs has joined #ruby
mocfive has joined #ruby
SiliconG has quit [Read error: Connection reset by peer]
<benzrf>
hey
<benzrf>
sup yall
phansch has joined #ruby
withnale has quit [Ping timeout: 252 seconds]
popl has quit [Ping timeout: 272 seconds]
francisfish has quit [Remote host closed the connection]
<asteve>
so I have a test that I need to ensure that method returned 3 records with proper ids; but the order is not guaranteed; here is an outline http://pastie.org/8676538
DanBoy has joined #ruby
<asteve>
how can I rewrite this to be less hacky
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
the message could be improved, I think :)
mlpinit has quit [Remote host closed the connection]
hfp has joined #ruby
iamdoo2 has quit [Ping timeout: 272 seconds]
<apeiros>
asteve: also, data = Array.new(3) { CreateData.new } # instead of that hideous `for` construct
metics is now known as test___
test___ is now known as blablabla_
<ArchBeOS-work>
are there any latency issues known with puts?
blablabla_ is now known as Metics
<MrZYX>
writing to a terminal is just slow and can slow down your application
<apeiros>
I really need a canned message about problem descriptions
reset has quit [Read error: Connection reset by peer]
kpshek has quit []
<MrZYX>
apeiros: we need a bot for that and for goto #ror :P
<apeiros>
ArchBeOS-work: your problem description is not helpful in determining your problem.
<ArchBeOS-work>
apeiros:: no real issue, just a curiousity that i needed killed
klaut has quit [Ping timeout: 245 seconds]
<ArchBeOS-work>
thanks MrZYX
_Andres has quit [Quit: jazz]
<apeiros>
if it's no real issue, then no, there are no latency issues with puts.
<apeiros>
when you hit one, come again.
<apeiros>
alternative answer: yes, puts is utterly non-realtime and makes no guarantee. its latency can't be trusted or relied upon.
<ArchBeOS-work>
am i not allowed to ask general questions about ruby's core libraries and functions unless they are related to a real world issue? i was jsut curious...
<apeiros>
context matters.
<ArchBeOS-work>
i didnt know if it was a big factor or not...
<apeiros>
ArchBeOS-work: you're allowed. your question is just utterly meaningless without context.
<pithagora>
i do it now for my google account and later i will have to change it for my own imap server
<pithagora>
so the google api is not going to work here
simoz110 has quit [Ping timeout: 252 seconds]
Virtualize|away has joined #ruby
robbyoconnor has quit [Ping timeout: 265 seconds]
ohwhoa has quit [Quit: woah!]
reset has quit [Read error: Connection reset by peer]
kpshek has joined #ruby
reset has joined #ruby
james_d_h has joined #ruby
Al___ has joined #ruby
ndrei has quit [Ping timeout: 248 seconds]
<apeiros>
pithagora: might be a gmail related issue. I can reproduce your problem here. I've heard that gmail's IMAP behaves in non-standard ways in a couple of regards.
awarner has joined #ruby
daxroc has joined #ruby
w4pm has quit [Ping timeout: 245 seconds]
<apeiros>
other searches work just fine
iliketurtles has joined #ruby
thesheff17 has quit [Ping timeout: 272 seconds]
iliketurtles has quit [Excess Flood]
e^0 has joined #ruby
<pithagora>
by "other searches" you mean search in other IMAPS?
iliketurtles has joined #ruby
<pithagora>
or within the same gmail?
blsuffolk has joined #ruby
<pithagora>
if i use the ALL flag than it gives results to me as well
<pithagora>
but in my script i will need only the newest message
awarner_ has joined #ruby
<pithagora>
it should run daily and compare if there are new emails and return some status to an external handler
Al___ has quit [Read error: Connection reset by peer]
<apeiros>
pithagora: I mean searches for e.g. subject on the gmail box
<apeiros>
status also lists the message properly as unseen
<mzdravkov>
im curious about this: since lambdas remembers the current scope variables, can I "move" scope from one place to other using lambas. for example, I have a class A with method M, that returns a lambda (the lambda gets all the class vars and etc from the object). Can I get those vars from the lambda?
awarner has quit [Ping timeout: 245 seconds]
standyro2 has joined #ruby
<apeiros>
pithagora: ah, imap.search(["UNSEEN"]) might be what you're after
aouaou has joined #ruby
e^0 has quit [Quit: WeeChat 0.4.1]
vpretzel_ is now known as vpretzel
<pithagora>
aha
<pithagora>
that did the job
Mapley has joined #ruby
aouaou has quit [Client Quit]
<apeiros>
curious as to what .search(["NEW"]) is about in that case…
<apeiros>
maybe mails which came in while connected?
cascalheira has joined #ruby
krnflake has quit [Ping timeout: 252 seconds]
m8 has quit [Ping timeout: 245 seconds]
<apeiros>
hm, nope, doesn't seem like
ohwhoa has joined #ruby
blaz3rz has quit [Remote host closed the connection]
m8 has joined #ruby
jprovazn has quit [Quit: Odcházím]
<pithagora>
as per docs this should be the recent emails with not seen flag set
cascalheira has left #ruby [#ruby]
deception has quit [Quit: Goodbye]
yfeldblum has quit [Remote host closed the connection]
simoz110 has joined #ruby
link151 is now known as solidus-river
IceyEC has quit [Quit: IceyEC]
zeroXten has quit [Ping timeout: 245 seconds]
cj3kim has joined #ruby
airdisa has quit []
simoz111 has joined #ruby
Mapley has quit [Read error: Connection reset by peer]
thesheff17 has joined #ruby
nomenkun_ has joined #ruby
gregoriokusowski has quit [Quit: gregoriokusowski]
justsee has joined #ruby
jmurray has quit [Quit: jmurray]
iamsean has joined #ruby
Txandy has joined #ruby
gregoriokusowski has joined #ruby
krnflake has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
yfeldblum has joined #ruby
danshultz has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 272 seconds]
simoz110 has quit [Ping timeout: 272 seconds]
francisfish has joined #ruby
therod has quit [Ping timeout: 245 seconds]
clamstar has quit [Quit: Computer has gone to sleep.]
alekst has quit [Quit: Computer has gone to sleep.]
krnflake has quit [Ping timeout: 252 seconds]
spider-mario has quit [Read error: Connection reset by peer]
olivier_bk has quit [Remote host closed the connection]
Brolen has joined #ruby
Al___ has quit [Read error: Connection reset by peer]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<s2013>
not sure how i went this long without coming into this situation
<apeiros>
s2013: well… and technically logically inferable…
interactionjaxsn has joined #ruby
<DouweM>
benzrf is learning about bitwise operators?
<benzrf>
i know 'em
<ddd>
it would figure he's green now
<benzrf>
i was just double checkin my memory
devdazed has quit [Ping timeout: 240 seconds]
<ddd>
yellow + blue == green. pick a color damn it
<DouweM>
benzrf: I figured
* apeiros
remembers how he tried to use 2^8 instead of 2**8 and was all confused…
<s2013>
heh
<DouweM>
hah
<benzrf>
apeiros: that's fine in haskell
<benzrf>
;)
xcv has joined #ruby
krnflake has quit [Ping timeout: 252 seconds]
jedimind has quit [Quit: screw you guys, im going home!]
figgleberry has quit [Ping timeout: 265 seconds]
Txandy has quit [Quit: Leaving...]
krnflake has joined #ruby
jedimind has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
james_d_h has quit [Ping timeout: 252 seconds]
Brolen has quit [Remote host closed the connection]
<xybre>
Is there a way to extract the hashed value of a Hash key? Or basically I'm looking for a cheap hashing algo that can be run on objects without doing a bunch of string conversions. I'm generating a caching key for a given list of arguments.
<apeiros>
in recent times I get disproven on things I was sure about!
kcombs has quit [Remote host closed the connection]
<xybre>
I could set it like cache.write([method_name, arguments], value), and then call ti again, but I'll still run into the issue of it not keying on the value of the args.
<DouweM>
:)
<apeiros>
I was pretty sure 1.8 did not seed hashing
<bnagy>
xybre: is the response ever going to be sensitive?
<bnagy>
cause assorted crcs are very fast on strings, but they're trivial to tamper
<xybre>
bnagy: Keys don't need to be cryptographically secure.
<bnagy>
and I'm still not sure exactly what you're 'hashing' - as in what's a request
workmad3 has joined #ruby
ohwhoa has joined #ruby
<xybre>
I'll write an example, because I'm clearly doign a bad joke explaining it.
<xybre>
s/joke/job (heh)
<apeiros>
xybre: beware, though, non-crypto hashes can open a door for DoS
Metics has quit [Quit: who cares of this message, anyway?]
<apeiros>
that said, non-crypto hashes are usually quite a bit faster than crypto hashes
<DouweM>
apeiros: how's that work?
<apeiros>
DouweM: force collisions
gregoriokusowski has quit [Quit: gregoriokusowski]
<DouweM>
apeiros: oh right. I couldn't think of a reason to not have the same hash across processes, but that makes sense. thanks
<apeiros>
DouweM: forcing hash tables to essentially become arrays (or something else, depending on their collision resolution scheme)
<DouweM>
yup, makes sense now
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<bnagy>
having said that, even crypto hashes are crazy fast
JBreit has quit [Read error: Connection reset by peer]
<bnagy>
compared to the workload of a webserver anyway
<apeiros>
with or without hardware support?
<bnagy>
it's PKI that's bad
<bnagy>
even without
robbyoconnor has joined #ruby
mansi has quit [Quit: Leaving...]
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
<apeiros>
I thought without it can be orders of magnitudes. won't matter with your 10 byte string. but if you want to hash larger objects…
<xybre>
apeiros: this can only be used internally and no user input is included in the requests, so hopefully that won't be a huge concern. I should keep an eye on cache keys from this process though jsut in case.
<bnagy>
and you can put it in an external store
<apeiros>
xybre: IMO in most cases there's little point in going over such minute details of security. it takes a quite determined attacker to abuse such a hole.
JBreit has joined #ruby
agjacome has quit [Ping timeout: 240 seconds]
<bnagy>
I think the concern is the string conversion though
<bnagy>
well imho if you can use a crypto hash then Why Not ;)
interactionjaxsn has quit [Remote host closed the connection]
<apeiros>
true
<apeiros>
test with crypto hash. if it's fast enough - enjoy!
<bnagy>
but yeah if you can guarantee that the user can't influence the req, then cool
<xybre>
IF the crypto hash is fast enough, then fine. Low collisions is better after all. I'm not even goign to try bcrypt/scrypt, but sha256 might be a candidate.
<bnagy>
so args is a generic array of whatever-the-hell
yasushi has joined #ruby
roolo has joined #ruby
<apeiros>
xybre: crypto vs. non-crypto should have little to no impact with regards of collisions
<apeiros>
it's about forced collisions
motto has joined #ruby
SiliconG has joined #ruby
<xybre>
bnagy: It's a library function, so its going to be used by a bunch fo subclasses and such to cache arbitrary requests.
<bnagy>
IN B4 BLOOM FILTER
sailias has quit [Quit: Leaving.]
<xybre>
lol
yfeldblum has quit [Read error: Connection reset by peer]
sailias has joined #ruby
phansch has quit [Ping timeout: 272 seconds]
<bnagy>
fastest way I know to convert random guff to a string is Marshal
<xybre>
If we end up dealign with a large enough collection to require a bloom filter, don't worry I won't be approaching it this way.
yfeldblum has joined #ruby
krnflake has quit [Ping timeout: 252 seconds]
m8 has quit [Ping timeout: 252 seconds]
<apeiros>
it's sad that there are no core/stdlib hashing functions with configurable seed
<xybre>
I considered marshall, yeah. Since I can bust cache if there's a language upgrade or whatever.
<bnagy>
msgpack is pretty close in speed
breakingthings has quit []
<apeiros>
xybre: how do you implement the eql? part?
<bnagy>
and much much more portable
<apeiros>
#hash is only one part of the equation…
senayar has quit [Remote host closed the connection]
benzrf has joined #ruby
<benzrf>
via @plt_hulk
<benzrf>
HOW MANY RUBYERS DO IT TAKE TO CHANGE LIGHTBULB?! 4: 1 CHANGES BULB 1 WRITES FRAMEWORK 1 WRITES SPECS AND 1 ADD REMOTE CODE VULNERABILITY!!!
mattsp1290 has quit [Remote host closed the connection]
<bnagy>
for "a thing" I use msgpack and adler just to do crc
<bnagy>
but I think adler is bad as a cache key
<DouweM>
lol
<bnagy>
well.. it makes me nervous anyway
benzrf has left #ruby [#ruby]
<bnagy>
it's sooper fast though
<xybre>
apeiros: for detecting key equality?
<apeiros>
xybre: yes
<xybre>
apeiros: handled by Memcached/Redis
<apeiros>
that sounds like "look there, pixies!" :)
havenwood has quit []
Notte has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
* xybre
waves his hands "these are not the functions you are looking for"
sailias has quit [Ping timeout: 264 seconds]
<xybre>
apeiros: Thing is, I'm not doing equality, I'll just be passing it to the underlying caching layer, and if it returns something, yay, if not, we run the block and set it.
<xybre>
So I expect the string key to match across identical method/arg combinations.
meatherly has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
meatherly has joined #ruby
<xybre>
Since the backend is swappable, I can't trust it to be reliable with anything more complex.
Hanmac1 has joined #ruby
Al___ has quit [Read error: Connection reset by peer]
Amart41 has quit [Remote host closed the connection]
<s2013>
force of habit :\
<xybre>
bnagy: wow
Hanmac has quit [Ping timeout: 260 seconds]
senayar has quit [Remote host closed the connection]
<s2013>
but other than that, can i dry that up or is that fine
mary5030 has quit [Remote host closed the connection]
Amart41 has joined #ruby
griffindy has joined #ruby
<DouweM>
s2013: soo, what you're actually checking is whether the two "agree"? so if they're both true or both false, the end result should be true?
<apeiros>
s2013: that's an exclusive or
vpretzel has quit [Quit: Adios!]
<s2013>
if status = 1 and response = approved then its true.. otherwise its false.. but there are other status and other responses. i dont care about them
freezey has quit [Remote host closed the connection]
<s2013>
baiscally i need to make sure that if status isnt 1 and response is approved its false and vice versa
<DouweM>
s2013: written like that, it's just an and