<pentanol>
csmrfx hm I've installed ruby-rack ruby-builder and after that I get another error: http://pastebin.ca/2865926
phutchins has joined #ruby
Lewix has quit [Ping timeout: 264 seconds]
<Blizzy>
may someone help? I am trying to use ActiveRecord with Ruby, yet I keep getting this error. ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: posts: SEL
<Blizzy>
ECT "posts".* FROM "posts"
manzo has quit [Ping timeout: 256 seconds]
einarj has quit [Remote host closed the connection]
jonr22 has joined #ruby
sussman has quit [Ping timeout: 272 seconds]
djbkd has quit [Remote host closed the connection]
Mook_as1 has joined #ruby
deric_skibotn has joined #ruby
tokik has joined #ruby
jonr22 has quit [Remote host closed the connection]
bluenemo_ has joined #ruby
x1337807x has joined #ruby
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cya]
SilkFox has joined #ruby
jbueza has joined #ruby
jbueza has quit [Remote host closed the connection]
jbueza has joined #ruby
claw has quit [Ping timeout: 240 seconds]
claw_ has joined #ruby
chipotle has joined #ruby
bluenemo has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Remote host closed the connection]
justinmburrous has quit []
skolman_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
PeterBoy has joined #ruby
skolman_ has joined #ruby
spyderman4g63 has joined #ruby
nyanz has joined #ruby
djbkd has joined #ruby
moritzs has joined #ruby
eduardordm has joined #ruby
claw__ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claw_ has quit [Ping timeout: 250 seconds]
troyready has quit [Quit: Leaving]
tkuchiki has quit [Ping timeout: 244 seconds]
skolman_ has quit [Remote host closed the connection]
davasaurous has quit [Remote host closed the connection]
skolman_ has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has quit [Quit: Leaving...]
spyderman4g63 has quit [Remote host closed the connection]
<pentanol>
what gem packet contans? for nil:NilClass (NoMethodError)
spyderman4g63 has joined #ruby
gsd has joined #ruby
SilkFox has quit [Ping timeout: 245 seconds]
xymbol has joined #ruby
djbkd has quit [Remote host closed the connection]
jimbach has joined #ruby
davasaurous has joined #ruby
matchaw_ has quit [Ping timeout: 256 seconds]
jdj_dk has joined #ruby
troyready has joined #ruby
matchaw has joined #ruby
djbkd has joined #ruby
anaeem1 has quit [Remote host closed the connection]
xymbol has quit [Ping timeout: 245 seconds]
spyderman4g63 has quit [Ping timeout: 244 seconds]
Kricir has quit [Remote host closed the connection]
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
moritzs has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
oo_ has joined #ruby
sailias has joined #ruby
siwica has quit [Ping timeout: 256 seconds]
oo_ has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
oo_ has joined #ruby
ghr has joined #ruby
Synthead has quit [Remote host closed the connection]
weaksauce has joined #ruby
Pupeno has joined #ruby
adamnbowen has joined #ruby
eduardordm has quit [Quit: eduardordm]
bruno- has joined #ruby
Pupeno has quit [Remote host closed the connection]
marr has quit []
jjasonclark has joined #ruby
matchaw_ has joined #ruby
lemur has quit [Ping timeout: 258 seconds]
matchaw has quit [Ping timeout: 255 seconds]
ghr has quit [Ping timeout: 260 seconds]
EminenceHC has quit [Remote host closed the connection]
jasooon has joined #ruby
livingstn has quit [Ping timeout: 256 seconds]
Lewix has joined #ruby
Pupeno has joined #ruby
bruno- has quit [Ping timeout: 258 seconds]
davasaurous has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
sevenseacat has joined #ruby
thumpba has joined #ruby
AmBienCeD has joined #ruby
AmBienCeD has joined #ruby
genpaku has quit [Quit: leaving]
oo_ has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
thumpba has quit [Client Quit]
jenrzzz_ has quit [Ping timeout: 245 seconds]
oo_ has joined #ruby
preller has quit [Ping timeout: 256 seconds]
wjimenez5271 has joined #ruby
thumpba has joined #ruby
jasooon has quit [Ping timeout: 265 seconds]
Juanchito has quit [Quit: Connection closed for inactivity]
genpaku has joined #ruby
Takle has joined #ruby
mpistone has quit [Remote host closed the connection]
Insanity133 has joined #ruby
tkuchiki has joined #ruby
omosoj has joined #ruby
djbkd has joined #ruby
cmckee has joined #ruby
freerobby has quit [Quit: Leaving.]
Xeago_ has quit [Remote host closed the connection]
godd2 has quit [Ping timeout: 264 seconds]
preller has joined #ruby
jenrzzz has joined #ruby
Insanity133 has quit [Ping timeout: 255 seconds]
whatasunnyday has left #ruby [#ruby]
claw___ has joined #ruby
banister has joined #ruby
claw__ has quit [Ping timeout: 255 seconds]
wjimenez5271 has quit [Read error: Connection reset by peer]
siwica has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdrew has joined #ruby
wjimenez5271 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
pietr0 has quit [Quit: pietr0]
tkuchiki has joined #ruby
msull92 has joined #ruby
bricker`work has quit [Ping timeout: 245 seconds]
skolman_ has quit [Remote host closed the connection]
skolman_ has joined #ruby
msull92 has quit [Client Quit]
IceDragon has quit [Ping timeout: 256 seconds]
Axy has joined #ruby
wjimenez5271 has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Ping timeout: 250 seconds]
Mia has quit [Ping timeout: 255 seconds]
wjimenez5271 has joined #ruby
graydot has quit [Quit: graydot]
Joufflu has quit [Read error: Connection reset by peer]
Mook_as1 has quit [Quit: Mook_as1]
yfeldblum has quit [Read error: Connection reset by peer]
Joufflu has joined #ruby
ariera has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
yfeldblum has joined #ruby
skolman_ has quit [Ping timeout: 256 seconds]
banister has quit [Ping timeout: 260 seconds]
maestrojed has quit [Quit: Computer has gone to sleep.]
SegFaultAX has quit [Ping timeout: 265 seconds]
mary5030 has joined #ruby
Klumben has quit [Ping timeout: 265 seconds]
TDJACR has quit [Ping timeout: 265 seconds]
jasooon has joined #ruby
jdj_dk has quit [Ping timeout: 265 seconds]
Klumben has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
SegFaultAX has joined #ruby
jimeh has quit [Ping timeout: 265 seconds]
ariera has quit [Ping timeout: 244 seconds]
zorak_ has quit [Ping timeout: 244 seconds]
terrellt has quit [Ping timeout: 265 seconds]
mary5030 has quit [Read error: Connection reset by peer]
AmBienCeD has quit [Read error: Connection reset by peer]
rikai has quit [Quit: No Ping reply in 180 seconds.]
pasties has quit [Ping timeout: 265 seconds]
mary5030 has joined #ruby
xymbol has joined #ruby
skarn has quit [Ping timeout: 265 seconds]
Hijiri has quit [Ping timeout: 244 seconds]
sivoais has quit [Ping timeout: 244 seconds]
sparr has quit [Ping timeout: 265 seconds]
BackEndCoder has quit [Ping timeout: 272 seconds]
unclouded has quit [Ping timeout: 244 seconds]
aspiers has quit [Ping timeout: 265 seconds]
Shidash has quit [Ping timeout: 272 seconds]
adamnbowen has quit [Quit: Computer has gone to sleep.]
mistermocha has joined #ruby
echooo1 has joined #ruby
unclouded has joined #ruby
BackEndCoder has joined #ruby
emmesswhy has joined #ruby
echooo has quit [Ping timeout: 258 seconds]
cmckee has quit [Quit: cmckee]
<omosoj>
anyone use treat?
gilmour_ has joined #ruby
pasties has joined #ruby
Shidash has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
gilmour has quit [Ping timeout: 272 seconds]
User4587_ has joined #ruby
rikai has joined #ruby
aspiers has joined #ruby
PeterBoy has quit [Quit: Bye Bye]
fabrice31 has joined #ruby
User458764 has quit [Ping timeout: 256 seconds]
thumpba_ has joined #ruby
JBreit has joined #ruby
tkuchiki has joined #ruby
renderful has joined #ruby
thumpba has quit [Ping timeout: 256 seconds]
JBreit has left #ruby [#ruby]
psyprus has quit [Ping timeout: 258 seconds]
jimeh has joined #ruby
yetanotherdave has quit [Quit: Lost terminal]
<gkra>
What am I missing? I require 'english' but $PID and $PROCESS_ID are empty strings?
jimbach has quit [Remote host closed the connection]
<gkra>
works in irb...
<gkra>
About ready to tell rubocop to shove it and just use $$.
sparr_ has joined #ruby
fabrice31 has quit [Ping timeout: 265 seconds]
renderful has quit [Ping timeout: 245 seconds]
mrjensen has joined #ruby
cmckee has joined #ruby
adamnbowen has joined #ruby
TDJACR has joined #ruby
[[vedic]] has joined #ruby
psyprus has joined #ruby
IceDragon has joined #ruby
User458764 has joined #ruby
mistermocha has quit [Remote host closed the connection]
wjimenez5271 has quit [Ping timeout: 256 seconds]
jdj_dk has joined #ruby
mrjensen has quit [Ping timeout: 244 seconds]
wjimenez5271 has joined #ruby
<pentanol>
someone around?
gilmour_ has quit [Remote host closed the connection]
<pentanol>
why ruby can't load secret token?
<pentanol>
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:245:in `load': cannot load such file -- /www/redmine-2.4.7/config/initializers/secret_token.rb (LoadError)
AlexRussia has quit [Ping timeout: 255 seconds]
sivoais has joined #ruby
User4587_ has quit [Ping timeout: 256 seconds]
Mars` has quit [Ping timeout: 255 seconds]
ghr has joined #ruby
skarn has joined #ruby
terrellt has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
emmesswhy has quit [Quit: This computer has gone to sleep]
Hijiri has joined #ruby
<pentanol>
ok permissions was wrong
supersym has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
MartynKeigher has joined #ruby
troyready has quit [Ping timeout: 256 seconds]
User4587_ has joined #ruby
emmesswhy has joined #ruby
<MartynKeigher>
hey all.. im getting an error when running a rb job. the rb job is fine.. its the gems it requires look be failing... http://i.imgur.com/S3LEpPo.jpg. any ideas where to start treoubleshooting this?
<koderok>
inside the loop. a[i] does not get assigned anything. It is still nil
<j416>
koderok: I get the feeling that what you're doing can be simplified
<j416>
koderok: what are you trying to do?
robustus|Off has joined #ruby
robustus|Off is now known as robustus
chipotle has joined #ruby
<koderok>
I am just learning Ruby and playing with some examples. In the link I posted, I have a question that why is array element a[i] not being assigned the value of lambda?
<j416>
alright
User458764 has joined #ruby
<j416>
I'm not sure, I haven't seen it before.
tuelz has joined #ruby
<j416>
if you read the array outside of the loop it seems to work.
riceandbeans has joined #ruby
<j416>
oh, wait
yeticry has joined #ruby
<maasha>
I have a problem. My script runs an external command using system() and breaks because the external command didn't finish writing an output file before my scripts continues. What to do?
renderful has quit [Ping timeout: 264 seconds]
User4587_ has quit [Ping timeout: 244 seconds]
<j416>
koderok: for i in 0..1
<j416>
koderok: arrays in ruby are 0-indexed
sinequanon has quit []
<maasha>
AFAICT system does wait for the process external process to finish, but the external process must be forking without waiting or something???
timonv_ has quit [Remote host closed the connection]
pen has quit []
mityaz has joined #ruby
<koderok>
j416: oh right! That was the mistake. Thanks :)
<j416>
:)
tomjoro has quit [Read error: Connection reset by peer]
<j416>
koderok: normally you would avoid this typo by not looping like that, though
<koderok>
j416: can loops be always avoided? I come from C++, Java and Python - so this method of iteration in Ruby using enumerables is new to me
<j416>
koderok: that's also a loop
<j416>
koderok: thing to remember is that for loops in ruby are very rare
<koderok>
j416: yes, sorry.. I mean the for..in kind of loops
<j416>
you can find nicer ways of doing it most of the time.
timonv_ has joined #ruby
<j416>
the first part of your code could for example be: a = [1, 2].map { |i| lambda { i } }
<j416>
koderok: and if you really must use and int like that there's other ways like each_with_index
ahmadajmi has quit [Quit: ChatZilla 0.9.91 [Firefox 33.0/20141011015303]]
<j416>
koderok: and for the array you could also for instance a.pop.call
<j416>
koderok: there are many ways to avoid looping errors
<koderok>
j416: that’s very helpful. Thanks :)
<j416>
koderok: and often you don't even need to use lambda {} because ruby has blocks
Lewix has quit [Remote host closed the connection]
<j416>
(not sure if that made sense, but it's my impression that there is often nicer ways than to use lambda)
Lewix has joined #ruby
<shevy>
when do we need lambdas
<j416>
shevy: anonymous blocks
* j416
shrugs
<shevy>
hehehe
<j416>
I find them useful at times, but more often than not I find that things get better structured if I don't use them
<j416>
because if I need a lambda I might as well define a method
<shevy>
koderok the reason for .each being better in this example is that, other than when you use "for i", you don't have to keep track with an index counter variable i; but you can still get it, also with each, you just use .each_with_index, so you get your counter for free in all cases when you need them
<shevy>
j416 after 10 years with ruby I still have not found out when I really need lambda
Guest32226 has joined #ruby
<j416>
shevy: thanks for proving my point :)
<shevy>
well you said you find them useful at times
<shevy>
I have not reached that point yet
<shevy>
(actually, I have only been using ruby since about 8 years...)
sinkensabe has joined #ruby
AFKGeek has joined #ruby
<j416>
noob
<j416>
:D
jasooon has joined #ruby
<koderok>
wow! experienced people here :)
<j416>
:P
pentanol has quit [Quit: leaving]
<godd2>
shevy case conditions will switch on the return of a lambda
<koderok>
shevy: 8 years experience with ruby! Ruby on Rails or general scripting too?
rshetty has quit [Ping timeout: 240 seconds]
<shevy>
godd2 what does that even mean?
<j416>
shevy: I can't think of a case where I've used one and it was the best solution off the top of my head
jheg has joined #ruby
<godd2>
Ill gist an example, one sec
<shevy>
koderok nope, general purpose. I use ruby for web-stuff but I don't use rails
<j416>
shevy: but I know I have, but only very very few times. Like.. 1 time. :D
Lewix has quit [Ping timeout: 264 seconds]
<shevy>
godd2 has a convincing example j416
psy_ has quit [Remote host closed the connection]
<j416>
shevy: maybe
<koderok>
j416: but, aren’t lambdas termed anonymous functions? Well, there isn’t much difference between that or a block from what I’ve learnt so far..
<j416>
well, yeah..
apeiros has joined #ruby
<j416>
how often do you need anonymous functions?
<shevy>
a block I use all the time
<shevy>
is a block a lambda?
mikepack has joined #ruby
<j416>
shevy: feels like one but it's stuck to something
<j416>
:D
<koderok>
from the discussion of you two, I feel like I really shouldn’t bother much with lambdas and other fancy stuff. I can get my work done with the basic stuff like blocks and procs too..
<jle`>
blocks are lambdas....
<shevy>
ok
<j416>
koderok: yeah, don't make things more complicated than needed
<jle`>
they are technically distinct from ruby lambdas because ruby has an actual construct called "lambda" in the language
timonv_ has quit [Remote host closed the connection]
<j416>
koderok: blocks on the other hand are used _a lot_ in ruby
<shevy>
I did use Proc.new though, in ruby-gnome GUI button callbacks
<shevy>
aaah let me see
Neozonz has joined #ruby
Neozonz has quit [Changing host]
Neozonz has joined #ruby
<jle`>
i think idiomatic ruby libraries try to let you do as much as possible w/ blocks in methods
<shevy>
ok that is better, I can see the lambda rather than the stabby pointer ->
<godd2>
the lambda yields whatever was yielded by case.
hanmac1 has joined #ruby
xcesariox has joined #ruby
nonks has joined #ruby
n_blownapart has joined #ruby
<shevy>
godd2 ok but could I not just use a method there and let it return stuff?
mikepack has quit [Ping timeout: 272 seconds]
<shevy>
hmm
<godd2>
are you asking if there's more than one way to do things in Ruby?
<hanmac1>
shevy: i heard you learning C(++), good enough for making commits for rwx yet?
<shevy>
lol
<godd2>
:P
<shevy>
hanmac1 well C
<j416>
godd2: still, I've yet to find a real use case for that syntax
<shevy>
I can't stand that template crap in C++
<shevy>
hanmac1 that "The C Programming Language" book looks small but it has a lot of stuff packed
* j416
off to work o/
<shevy>
I am re-reading about enums
<hanmac1>
godd2: in ruby there is the good was, the bad way, and the hanmac way ;P
ariera has joined #ruby
ariera has quit [Remote host closed the connection]
skolman_ has quit [Ping timeout: 265 seconds]
ariera has joined #ruby
<godd2>
It was the best of times, it was the hamnac of times...
<koderok>
from what I read, ruby has a lot of ways of doing the same thing, which is why some Python guys don’t like it because Python has the philosophy of having one way of doing a thing
cajone has quit [Read error: Connection reset by peer]
n_blownapart has quit [Quit: Leaving]
moritzs has joined #ruby
echooo has joined #ruby
<godd2>
hmm, perhaps one argument is that treating a lambda like an object requires less setup than treating a method like an object.
<godd2>
after all, a method gets called when it is referenced, but a lambda has to be called explicitly
<godd2>
like, you can't "pass around" a method the same way as easily as you can "pass round" a lambda
<godd2>
(I don't necessarily hold or adhere to these beliefs, Im sorta just playing devils advocate)
echooo has quit [Remote host closed the connection]
deepy has quit [Ping timeout: 272 seconds]
Soda has quit [Remote host closed the connection]
jenrzzz has joined #ruby
mrjensen has quit [Remote host closed the connection]
jgrevich has quit [Quit: jgrevich]
hanmac2 has joined #ruby
Spami has joined #ruby
bayed has joined #ruby
govg has quit [Quit: leaving]
hanmac1 has quit [Ping timeout: 264 seconds]
klaut has joined #ruby
charliesome has joined #ruby
Xeago has joined #ruby
andrewlio has joined #ruby
mengu has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
charliesome has quit [Client Quit]
tesuji has joined #ruby
rshetty has joined #ruby
TomyWork has joined #ruby
cajone has joined #ruby
einarj has joined #ruby
RitterJack has joined #ruby
<hanmac2>
godd2: you can "pass around" methods like lambdas if you turn them to objects first ;P
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adriancb has joined #ruby
jottr_ has joined #ruby
<hanmac2>
koderok: why? sometimes you need them and a lambda might not work for you, (or i use method(something) often)
oo_ has quit [Remote host closed the connection]
M-Technic has quit [Ping timeout: 258 seconds]
oo_ has joined #ruby
<hanmac2>
koderok: also notice that array.each(&sym) does work differently than array.each(&method(sym))
oo_ has quit [Read error: Connection reset by peer]
<godd2>
"It is not recommended to use procs" does that go for #inject(0, :+) which calls to_proc on :+ ?
adriancb has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
<koderok>
hanmac2: You have to be careful using procs. If you call return from within a lambda’s body, you will exit out of the lambda and transfer control to the caller of lambda. But if you execute return from a proc, it will exit from the caller too
Nahra has quit [Ping timeout: 245 seconds]
<hanmac2>
koderok: also that blog page does not say that its not recommended to use procs ... thats whart you say
patrick99e99 has joined #ruby
rshetty has quit [Ping timeout: 258 seconds]
<godd2>
In koderok's defense, it may just be an alternative interpretation of "Proc.new is something that’s hardly ever used to explicitly create blocks because of these surprising return semantics."
<hanmac2>
koderok: yes procs and lambdas are different in that case, what is your point? sometimes i NEED a fast exit from a proc so that it does exist the method too
Juanchito has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
<koderok>
godd2: Yes, :) Also, “It is recommended that you avoid using this form unless absolutely necessary.”
tuelz has joined #ruby
<hanmac2>
koderok: you need to read the whole text block ... its talk about "Proc.new" not procs in general .... oO
<godd2>
That sounds a bit dogmatic, but at the same time almost sounds like "dont use things unless you should" which just begs the question
ayaz has joined #ruby
patrick99e99 has quit [Ping timeout: 260 seconds]
alex88 has joined #ruby
arup_r has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
<Luser>
Hi guys. Is it possible to put every array's element in quotes? I mean I have strings in an array but they are displayed without quotes and i want them in these quotes. I have tried to use map(&:to_s) but no results.
<unshadow>
cool, thanks :)
abuzze_ has joined #ruby
abuzze has quit [Ping timeout: 250 seconds]
TPBallbag has quit [Remote host closed the connection]
unshadow has quit [Client Quit]
timonv^ has joined #ruby
abuzze has joined #ruby
ValicekB has quit [Ping timeout: 265 seconds]
timonv_ has quit [Ping timeout: 256 seconds]
last_staff has quit [Read error: Connection reset by peer]
abuzze_ has quit [Ping timeout: 250 seconds]
bMalum has joined #ruby
sk87 has joined #ruby
rshetty has quit [Ping timeout: 260 seconds]
ringarin has joined #ruby
LekeFly has joined #ruby
last_staff has joined #ruby
abuzze has quit [Remote host closed the connection]
zarubin has joined #ruby
jasooon has quit [Ping timeout: 256 seconds]
abuzze has joined #ruby
zarubin has quit [Client Quit]
bMalum has quit [Read error: No route to host]
zarubin has joined #ruby
doev has quit [Quit: Verlassend]
doodlehaus has joined #ruby
timonv^ has quit [Ping timeout: 258 seconds]
Xeago has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
moritzs has joined #ruby
TPBallbag has joined #ruby
timonv_ has joined #ruby
mengu has quit [Remote host closed the connection]
FirstCav has quit [Ping timeout: 244 seconds]
rshetty has joined #ruby
fsapo has joined #ruby
<shevy>
jheg I found objects simple in the sense of smalltalk-object system. I was watching the old alan kay lectures who converted me into the OOP model (but real objects not the java abomination)
<Psy-Q>
i have a class that's supposed to be a client for a REST API, and i have a method api_compatible? that's supposed to check whether the API version presented by the server is compatible with this client. do i really need to do "if api_compatible?" in every single method that need to contact the API or is there a cleaner way?
<shevy>
Luser calling .to_s on your objects makes no sense; to_s just gets their string output, but you want to modify it by padding it with " characters
<Luser>
Sounds good, but it won't work if there is a float in my array, will it?
<jhass>
Psy-Q: since those are all instance methods, can't you just check and raise in the constructor?
<shevy>
Luser if your object is not a string then either call .to_s on it or "#{var}" while padding, like "\"#{var}\""
<Psy-Q>
jhass: the constructor isn't guaranteed to get a hostname, username or password. but i could make those a requirement, i guess?
<shevy>
>> ['abc','next comes a float', 5.5].map {|entry| '"'+entry.to_s+'"'}
<eval-in__>
shevy => ["\"abc\"", "\"next comes a float\"", "\"5.5\""] (https://eval.in/212696)
<Psy-Q>
jhass: since i need those three to query the server for API version
<jheg>
shevy, thanks - do you find that some apps lends themselves better to the OO way than others when you are building stuff?
<jhass>
Psy-Q: yeah, or you check in the host writer
sinkensabe has quit []
<Luser>
shevy: Weird thing is tried it that way and it still gets output without quotes, no idea why :F
<Psy-Q>
jhass: ooh! yes, good idea
<Psy-Q>
thanks :)
<jhass>
okay, nvm the writer if you need those three
<Psy-Q>
jhass: it might be enough, i'm not sure if that API always needs the username/pass
<jhass>
if you can't use your class with those three set, make them a requirement to the constructor
<Psy-Q>
jhass: i could check for 403 forbidden explicitly and do the right thing
chipotle has joined #ruby
<jhass>
*without
fabrice31 has quit [Remote host closed the connection]
<shevy>
jheg well, because there are so many different styles in ruby, it is hard to say. my style is totally different from others. I call it the idiot style because I don't have to think about my code (and if I have to then the code must be wrong). I tend to use a base skeleton though, most of my (somewhat larger) objects have a reset() method, most have a run() method... hmm
dawkirst has quit [Ping timeout: 244 seconds]
<shevy>
Luser did you use pp on your objects, perhaps the quote is there but puts vs. print difference would not show. hard to say without real ruby code from you
zarubin has quit [Quit: Leaving.]
yakko has quit [Read error: Connection reset by peer]
<Psy-Q>
jhass: i think i'll do that first, makes it all easier. if there are ever instances of this server that work without password, i'll need to check for basic auth optionally anyhow, that complicates many more things
dawkirst has joined #ruby
zarubin has joined #ruby
<shevy>
Luser you also need to accept that ruby itself is cleverer than you are so you must have done a mistake or forgot something ;)
<Luser>
shevy: Yupp, just found it, I was mapping it a bit too early.
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yakko has joined #ruby
<Luser>
Now i just have to remove columns from csv and I am done with that script.
<Luser>
Damn, that was time consuming.
abuzze has quit [Remote host closed the connection]
<jhass>
Luser: the CSV class has a force_quotes option
maasha has quit [Ping timeout: 246 seconds]
abuzze has joined #ruby
<workmad3>
Luser: also, the CSV class will add quotes no matter what if they're necessary
abuzze has quit [Read error: Connection reset by peer]
<workmad3>
and correctly escape quotes within quotes...
abuzze has joined #ruby
siwica1 has joined #ruby
phutchins has joined #ruby
siwica has quit [Ping timeout: 258 seconds]
arup_r has quit [Remote host closed the connection]
timonv^ has joined #ruby
<shevy>
hehe
<shevy>
you are being trumped Luser!
Takle has quit [Remote host closed the connection]
<Luser>
Damn :D.
<Luser>
I was just adding array results to CSV and they were without quotes (numbers/strings/etc) so I have just used mapping and it works fine.
timonv_ has quit [Ping timeout: 256 seconds]
<Luser>
Now the only thing i have to do is remove few columns
<workmad3>
Luser: are you using the CSV library from ruby's stdlib then?
phutchins has quit [Ping timeout: 250 seconds]
<workmad3>
Luser: or are you hand-rolling 'csv' output through string manipulation?
<Luser>
undefined method `delete' for #<CSV:0x007fb55b916cf8> qq
<Luser>
yes, I am using CSV lib.
alem0lars is now known as alem0lars|away
<Luser>
What I do is I read data from XLS, modify it and save into CSV.
<workmad3>
Luser: ok... well one thing to be aware of - if you add a " to the string you're outputting then that becomes part of the data in the CSV column (and would likely be escaped and come out as """ at the start of the entry)
moritzs has joined #ruby
<workmad3>
Luser: which is different from the entry being quoted ;)
renderful has joined #ruby
<Hanmac>
shevy:
<Hanmac>
>> ['abc','next comes a float', 5.5].map {|entry| '"%s"' % entry}
<eval-in__>
Hanmac => ["\"abc\"", "\"next comes a float\"", "\"5.5\""] (https://eval.in/212700)
<Hanmac>
>> ['abc','next comes a float', 5.5].map(&'"%s"'.method(:%))
<eval-in__>
Hanmac => ["\"abc\"", "\"next comes a float\"", "\"5.5\""] (https://eval.in/212703)
<Luser>
workmad3: Quoting looks fine already, thanks. I am struggling with removing columns now.
<shevy>
hey
<shevy>
the bot upcases you hanmac
abuzze has quit [Remote host closed the connection]
<Luser>
workmad3: The thing is I don't know how to exclude some columns, because I add them straight from the XLS file like that: https://gist.github.com/anonymous/37afff14c69d547028c3 where csv_row contains what came from xls
ta has quit [Read error: Connection reset by peer]
moritzs has quit [Remote host closed the connection]
<Luser>
Ok got it using csv_row.delete_at(index)
Takle has joined #ruby
luminor has joined #ruby
ph8 has quit [Changing host]
ph8 has joined #ruby
<Hanmac>
charliesome: hm can you explain where evalin get my name? (because i tryed to change it in my client and he seems to use the wrong name from the "other" hanmac in this channel)
yakko has quit [Read error: Connection reset by peer]
<Luser>
Uhm and delete_at works for some, but for some it doesn't. Weird.
nfk has joined #ruby
timonv^ has quit [Ping timeout: 245 seconds]
xcesariox has joined #ruby
yakko has joined #ruby
nettoweb_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mengu has joined #ruby
<theotherstupidgu>
why dave thomas always say that inheritance is bad?
<theotherstupidgu>
or "the source of all evil"?
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby
abuzze has quit [Remote host closed the connection]
dangerousdave has joined #ruby
lxsameer has joined #ruby
abuzze has joined #ruby
timonv_ has joined #ruby
banister_ has joined #ruby
banister has quit [Read error: Connection reset by peer]
zarubin has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
kp666 has joined #ruby
shazaum has joined #ruby
abuzze has quit [Ping timeout: 258 seconds]
chipotle has joined #ruby
banister_ has quit [Client Quit]
bruno- has joined #ruby
banister has joined #ruby
banister has quit [Client Quit]
arup_r has joined #ruby
bogeyd6 has quit [Ping timeout: 265 seconds]
TPBallbag has quit [Remote host closed the connection]
jottr_ has joined #ruby
timonv^ has joined #ruby
bogeyd6 has joined #ruby
noop has quit [Ping timeout: 265 seconds]
luminor has quit []
doodlehaus has joined #ruby
timonv_ has quit [Ping timeout: 256 seconds]
banister has joined #ruby
jasooon has joined #ruby
abuzze has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jarto has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
doev has joined #ruby
genpaku has quit [Remote host closed the connection]
william3 has quit [Remote host closed the connection]
tesuji has quit [Ping timeout: 255 seconds]
patrick99e99 has joined #ruby
luminor has quit []
dawkirst has quit [Ping timeout: 245 seconds]
jlebrech has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
nrsk has joined #ruby
yakko has quit [Read error: Connection reset by peer]
timonv^ has joined #ruby
YamakasY has quit [Quit: Changing server]
timonv_ has quit [Ping timeout: 245 seconds]
yakko has joined #ruby
luminor has joined #ruby
reisl has joined #ruby
livathinos has joined #ruby
<Psy-Q>
i know about keyword arguments, but if i want a nice constructor that takes {:host => 'foo', :user => 'bar'} etc. and is ruby 1.9 compatible, how would i specify which attributes are required?
patrick99e99 has quit [Ping timeout: 265 seconds]
marr has quit [Ping timeout: 255 seconds]
<jhass>
use Hash#fetch, it raises if you provide no fallback
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
ylluminarious has quit [Ping timeout: 265 seconds]
ptrrr has joined #ruby
nonks has quit [Ping timeout: 246 seconds]
Azure has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
MuffinPimp has joined #ruby
<theotherstupidgu>
shevy, lol
sevenseacat has joined #ruby
Scotteh has quit [Quit: Later, folks]
ChoiKyuSang has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<theotherstupidgu>
shevy, actually I don't think he did, it wasn't the main topic of his talk, all I remmber he said that it would be awesome if we can override < operator and get rid of inheritance
ChoiKyuSang has joined #ruby
mikepack has joined #ruby
bmurt has joined #ruby
nonks has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
[[vedic]] has joined #ruby
Azure has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
timonv_ has quit [Ping timeout: 256 seconds]
apeiros has quit [Ping timeout: 264 seconds]
cassianoleal has joined #ruby
adamnbowen has joined #ruby
TPBallbag has joined #ruby
banister has joined #ruby
timonv_ has joined #ruby
rshetty has quit [Remote host closed the connection]
abuzze_ has joined #ruby
benzrf|offline is now known as benzrf
mikepack has quit [Ping timeout: 245 seconds]
rikai has quit [Ping timeout: 245 seconds]
agjacome has joined #ruby
livingstn has joined #ruby
lxsameer has quit [Read error: Connection reset by peer]
arup_r has quit [Remote host closed the connection]
roolo_ has joined #ruby
TPBallbag has quit [Ping timeout: 240 seconds]
abuzze has quit [Ping timeout: 245 seconds]
yeticry has joined #ruby
jasooon has joined #ruby
triple_b has joined #ruby
[[vedic]] has quit [Ping timeout: 265 seconds]
mbr__ has joined #ruby
Trynemjoel has quit [Ping timeout: 265 seconds]
Morkel has quit [Ping timeout: 265 seconds]
JaTochNietDan has quit [Ping timeout: 265 seconds]
anaeem1 has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
roolo has quit [Ping timeout: 265 seconds]
machete has quit [Ping timeout: 265 seconds]
brushdemon has quit [Ping timeout: 265 seconds]
mbr has quit [Ping timeout: 265 seconds]
tommylommykins has quit [Ping timeout: 265 seconds]
juni0r has quit [Ping timeout: 265 seconds]
Morkel has joined #ruby
parus has quit [Ping timeout: 265 seconds]
ndrst has quit [Ping timeout: 265 seconds]
grubles has quit [Ping timeout: 265 seconds]
tylersmith has quit [Ping timeout: 265 seconds]
matti has quit [Ping timeout: 265 seconds]
grubles has joined #ruby
bascht has quit [Ping timeout: 265 seconds]
brushdemon has joined #ruby
grubles is now known as Guest56120
tommylommykins has joined #ruby
rbrs has quit [Quit: Leaving]
parus has joined #ruby
jottr has joined #ruby
bascht has joined #ruby
matti has joined #ruby
matti has quit [Changing host]
matti has joined #ruby
mkaesz has joined #ruby
machete has joined #ruby
tier has joined #ruby
rikai has joined #ruby
JaTochNietDan has joined #ruby
tylersmith has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
ndrst has joined #ruby
juni0r has joined #ruby
Trynemjoel has joined #ruby
jottr_ has quit [Ping timeout: 244 seconds]
jonathanwallace has quit [Ping timeout: 265 seconds]
wald0 has joined #ruby
chipotle has joined #ruby
jasooon has quit [Ping timeout: 255 seconds]
kp666 has quit [Quit: Konversation terminated!]
shredding has quit [Quit: shredding]
abuzze has joined #ruby
yeticry has quit [Ping timeout: 250 seconds]
Takle has joined #ruby
livingstn has quit [Read error: Connection timed out]
abuzze_ has quit [Ping timeout: 256 seconds]
timonv^ has joined #ruby
livingstn has joined #ruby
yeticry has joined #ruby
jerius has joined #ruby
michael_mbp has quit [Excess Flood]
paulfm has joined #ruby
mfmfmfmfmfmf has joined #ruby
apeiros has joined #ruby
ephemerian has joined #ruby
dkphenom has joined #ruby
timonv_ has quit [Ping timeout: 256 seconds]
michael_mbp has joined #ruby
iamjarvo has joined #ruby
ringarin has quit [Ping timeout: 244 seconds]
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #ruby
workmad3 is now known as wm3|away
iamjarvo has quit [Max SendQ exceeded]
tkuchiki has quit [Remote host closed the connection]
ringarin has joined #ruby
iamjarvo has joined #ruby
tkuchiki has joined #ruby
ptrrr has quit [Quit: ptrrr]
taptapdan has quit [Quit: taptapdan]
ptrrr has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nonks has quit [Ping timeout: 246 seconds]
oo_ has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 272 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rikai has quit [Quit: No Ping reply in 180 seconds.]
abuzze has quit [Remote host closed the connection]
GeorgesLeYeti has joined #ruby
tier_ has joined #ruby
abuzze has joined #ruby
sepp2k has joined #ruby
nonks has joined #ruby
doev has quit [Ping timeout: 244 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sailias has joined #ruby
bigkevmcd has quit [Ping timeout: 256 seconds]
ndrei has joined #ruby
timonv_ has joined #ruby
jottr has quit [Read error: Connection reset by peer]
jottr_ has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
timonv^ has quit [Ping timeout: 265 seconds]
tier has quit [Ping timeout: 255 seconds]
krz has joined #ruby
dawkirst has joined #ruby
dangerousdave has joined #ruby
Xeago has joined #ruby
<benzrf>
hanmac: heh.
abuzze has quit [Ping timeout: 264 seconds]
failshell has joined #ruby
tier_ has quit [Remote host closed the connection]
Xeago_ has joined #ruby
doev has joined #ruby
nonks has quit [Ping timeout: 246 seconds]
failshell has quit [Client Quit]
tier has joined #ruby
atmosx has joined #ruby
moritzs has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
joonty has joined #ruby
spyderman4g63 has joined #ruby
abuzze has joined #ruby
<zai>
/whois kuraiko
dawkirst has quit [Client Quit]
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
Xeago has quit [Ping timeout: 265 seconds]
nor has joined #ruby
foo-bar- has joined #ruby
Takle has quit [Remote host closed the connection]
Channel6 has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
fmcgeough has joined #ruby
sandelius has joined #ruby
atmosx has quit [Quit: Lost in trance]
nonks has joined #ruby
marr has joined #ruby
reisl is now known as larissa
doodlehaus has joined #ruby
arup_r has joined #ruby
william3 has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jottr has joined #ruby
fmcgeough has quit [Ping timeout: 245 seconds]
Channel6 has quit [Quit: Leaving]
jerius has quit []
fmcgeough has joined #ruby
foo-bar- has quit [Quit: leaving]
jottr_ has quit [Ping timeout: 256 seconds]
mary5030 has joined #ruby
krz has quit [Ping timeout: 258 seconds]
byprdct has joined #ruby
rpag has joined #ruby
tkuchiki has joined #ruby
beef-wellington has joined #ruby
bigkevmcd has joined #ruby
ferr has joined #ruby
allcentury has joined #ruby
alem0lars|away is now known as alem0lars
Takle has joined #ruby
tatsuo has joined #ruby
it0a has joined #ruby
nor has quit [Ping timeout: 244 seconds]
jimbach has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
rikai has joined #ruby
fsapo has quit [Remote host closed the connection]
<Luser>
Guys, I have something like that in my code: csv_row.map {|element| "\"#{element}\""} and it's working fine, but i would like to perform that only on strings from that array and leave numbers without quotes, is that possible to do?
mikepack has joined #ruby
obscured has joined #ruby
devdazed has joined #ruby
rshetty has joined #ruby
nor has joined #ruby
iamjarvo has joined #ruby
timonv_ has quit [Ping timeout: 256 seconds]
<ccooke>
Luser: well, to be honest, csv_row.map { |e| e.inspet } will do it
Helious has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<ccooke>
Luser: inspect, even. That'll give you interesting results if you have non string or number values, though
rikai has quit [Quit: No Ping reply in 240 seconds.]
tkuchiki has joined #ruby
<Luser>
csv_row.map {|element| element.is_a?(String) ? "\"#{element}\"" : "#{element}" } is that a good way to do it?
<apeiros>
Luser: unless you told CSV to convert values, all cells will be strings
<kamilc__>
Luser: if you want it to be always a string after mapping - then yes
<apeiros>
or are you building CSV?
triple_b has joined #ruby
tlarevo_ has joined #ruby
mikepack has quit [Ping timeout: 272 seconds]
<Luser>
apeiros: Yeah, what I wanted to achieve is put "strings" into quotes in output CSV and numbers without quotes and my way works, but not sure if it is 'ruby-like'
timonv_ has joined #ruby
TPBallbag is now known as Bonekenende
<apeiros>
Luser: don't roll your own csv generator
<apeiros>
use the CSV stdlib
<Luser>
apeiros: I am using CSV class
jasooon has joined #ruby
Insanity133 has joined #ruby
<apeiros>
then you don't need to wrap yourself
<apeiros>
CSV class already does that
<apeiros>
if you wrap it into quotes yourself, your quotes will be (properly) escaped and part of the value.
<apeiros>
(as opposed to "part of the markup")
tlarevo has quit [Ping timeout: 265 seconds]
chipotle has quit [Quit: cya]
<kamilc__>
Luser: Take a look at the :converters option that you can pass when parsing csv string/file
ptrrr has quit [Quit: ptrrr]
<Luser>
Got it, thank you.
<kamilc__>
I ahven't used that part of the standard lib for a while now, but from what I can see in docs by default it has nil
ctp has joined #ruby
<kamilc__>
np
mary5030 has quit [Remote host closed the connection]
Insanity133 has quit [Ping timeout: 250 seconds]
ariera_ has joined #ruby
rshetty has quit [Remote host closed the connection]
jasooon has quit [Ping timeout: 265 seconds]
siwica1 has quit [Remote host closed the connection]
siwica has joined #ruby
jespada has joined #ruby
ariera has quit [Ping timeout: 240 seconds]
mengu has quit [Remote host closed the connection]
anaeem1 has joined #ruby
xcesariox has joined #ruby
charliesome has quit [Quit: zzz]
techsethi has quit [Quit: techsethi]
timonv^ has joined #ruby
dumdedum has joined #ruby
enebo has joined #ruby
sambao21 has joined #ruby
rikai has joined #ruby
tatsuo has quit [Remote host closed the connection]
rshetty has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
timonv_ has quit [Ping timeout: 256 seconds]
Hijiri has quit [Quit: WeeChat 1.0.1]
Kricir has joined #ruby
IceDragon has joined #ruby
jerius has joined #ruby
foooobear has joined #ruby
ringarin has quit [Ping timeout: 255 seconds]
JBreit has joined #ruby
tkuchiki has quit [Remote host closed the connection]
techsethi has joined #ruby
jobewan has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
ptrrr has joined #ruby
wm3|away has quit [Ping timeout: 260 seconds]
SilkFox has joined #ruby
mengu has joined #ruby
spyderman4g63 has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
spyderman4g63 has quit [Write error: Broken pipe]
timonv_ has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
beef-wellington has quit [Ping timeout: 256 seconds]
timonv^ has quit [Ping timeout: 245 seconds]
Neozonz|Disc2 has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bonekenende is now known as TPBallbag
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
SilkFox has quit [Ping timeout: 250 seconds]
spyderman4g63 has joined #ruby
shredding has joined #ruby
tlarevo_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
patrick99e99 has joined #ruby
CorySimmons has joined #ruby
Avahey has quit [Quit: Connection closed for inactivity]
mary5030 has joined #ruby
CorySimmons has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
renderful has quit [Ping timeout: 265 seconds]
fsapo has quit [Remote host closed the connection]
jenrzzz has joined #ruby
gsd has joined #ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
timonv^ has joined #ruby
wedgeV has quit [Quit: wedgeV]
timonv_ has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 255 seconds]
Lewix has quit [Ping timeout: 256 seconds]
Hanmac has quit [Quit: Leaving.]
micah has joined #ruby
anarang has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 256 seconds]
jerius has quit []
<micah>
I'm having trouble getting Net::SSH to prompt me for a password, in irb I do: Net::SSH.start('192.168.1.22', 'root', :verbose => :debug, :timeout => 60) and it connects, but then fails with Net::SSH::AuthenticationFailed:
codecop has quit [Remote host closed the connection]
vickleford has joined #ruby
jenrzzz has joined #ruby
ariera_ has joined #ruby
Hightower666 has joined #ruby
Hightower666 has quit [Excess Flood]
claw has joined #ruby
claw has quit [Client Quit]
Hightower666 has joined #ruby
Hightower666 has quit [Excess Flood]
<apeiros>
micah: why would it prompt you?
<apeiros>
it's a library, not an application.
tier_ has quit [Remote host closed the connection]
claw___ has quit [Ping timeout: 245 seconds]
<ddv>
:)
claw has joined #ruby
ehlovader has quit [Ping timeout: 272 seconds]
Insanity133 has joined #ruby
Hightower666 has joined #ruby
Hightower666 has quit [Excess Flood]
pauly_oc has joined #ruby
tos9 has left #ruby [#ruby]
cnj has quit [Ping timeout: 260 seconds]
bricker`work has quit [Ping timeout: 265 seconds]
abuzze_ has quit [Remote host closed the connection]
Hightower666 has joined #ruby
Hightower666 has quit [Excess Flood]
Ch0c0late has joined #ruby
dkb20k has quit [Remote host closed the connection]
zz_twistedpixels has quit [Ping timeout: 265 seconds]
rkalfane has joined #ruby
nonks has quit [Ping timeout: 246 seconds]
Hightower666 has joined #ruby
Hightower666 has quit [Excess Flood]
srenatus has joined #ruby
psy has joined #ruby
<srenatus>
hi there. is there any way to IO.read (basically) from a File::Stat object?
nisstyre has quit [Quit: WeeChat 1.0.1]
Insanity133 has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
timonv_ has joined #ruby
Ch0c0late has quit [Client Quit]
<workmad3>
srenatus: I don't think a File::Stat object is an IO object
fsapo has joined #ruby
<workmad3>
srenatus: what would you want it to do?
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
einarj has joined #ruby
ehlovader has joined #ruby
havenwood has joined #ruby
moted has joined #ruby
<srenatus>
workmad3: I want to ensure that the file I read is the file that I checked before, so nothing can exchange the file between the line that checks if it's ok and the line that reads the file
larissa has quit [Quit: Leaving]
jottr has joined #ruby
<srenatus>
workmad3: in other words TOCTOU
toretore has joined #ruby
nisstyre has joined #ruby
timonv^ has quit [Ping timeout: 258 seconds]
lkba has quit [Ping timeout: 250 seconds]
Hightower666 has joined #ruby
Hightower666 has quit [Excess Flood]
<jhass>
srenatus: IO.open the file and then IO#stat it
<micah>
apeiros: hm, its actually in capistrano where I'm having the difficulty, it doesn't seem like the capistrano.set(:password) {ask...} is working
<srenatus>
jhass: thanks
abuzze has joined #ruby
Ankhers has quit [Remote host closed the connection]
Hightower666 has joined #ruby
Hightower666 has quit [Excess Flood]
benzrf|offline is now known as benzrf
Ankhers has joined #ruby
triple_b_ has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
triple_b has joined #ruby
Hightower666 has joined #ruby
Hightower666 has quit [Excess Flood]
dseitz has quit [Quit: nap]
Hightower666 has joined #ruby
mbr__ is now known as mbr
<srenatus>
jhass: IO.open takes an FD, did you mean File.open ?
Kricir has joined #ruby
<apeiros>
those are the same method
jerius has joined #ruby
<srenatus>
hmm IO.open("/tmp/foo") fails for me, File.open works
Xeago_ has quit [Read error: Connection reset by peer]
graydot has joined #ruby
Xeago has joined #ruby
mityaz has quit [Quit: Leaving]
troyready has joined #ruby
cndiv has joined #ruby
Hightower666 has quit [Ping timeout: 258 seconds]
cndiv has quit [Client Quit]
timonv_ has joined #ruby
cndiv has joined #ruby
Guest56120 is now known as grubles
grubles has quit [Changing host]
grubles has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
RitterJack has quit [Remote host closed the connection]
Luser has quit [Remote host closed the connection]
mistermo_ has quit [Remote host closed the connection]
rockdon_ has joined #ruby
apeiros has quit [Remote host closed the connection]
_5kg has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
DrCode has quit [Write error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
St_Marx has quit [Remote host closed the connection]
o0oo0o has quit [Write error: Connection reset by peer]
Ankhers has quit [Write error: Connection reset by peer]
end_guy has quit [Write error: Broken pipe]
spyderman4g63 has quit [Remote host closed the connection]
_5kg has joined #ruby
DrCode has joined #ruby
havenwood has joined #ruby
adriancb has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 245 seconds]
jarjar_prime has joined #ruby
lemur has quit [Remote host closed the connection]
davidbug has joined #ruby
davidbug has quit [Client Quit]
Kricir has joined #ruby
davidbug has joined #ruby
wallerdev has joined #ruby
Xeago has quit [Remote host closed the connection]
fmcgeough has joined #ruby
kireevco has quit [Quit: Leaving.]
Takle has joined #ruby
yakko has quit [Read error: Connection reset by peer]
starless has joined #ruby
mattmcclure has joined #ruby
Helious has joined #ruby
olivier_bK has quit [Ping timeout: 256 seconds]
yakko has joined #ruby
skolman_ has joined #ruby
thagomizer has joined #ruby
timonv^ has joined #ruby
lemur has joined #ruby
dumdedum has quit [Quit: foo]
kaspertidemann has quit []
ghostmoth has joined #ruby
o0oo0o has joined #ruby
mistermocha has joined #ruby
gioele has joined #ruby
nobitanobi has joined #ruby
timonv_ has quit [Ping timeout: 260 seconds]
ndrei has quit [Read error: No route to host]
stunder has joined #ruby
ndrei has joined #ruby
rbrs has joined #ruby
<nobitanobi>
morning folks. For this kind of method: https://gist.github.com/anonymous/f1cb7f3aae3a36d41419 - If country can return nil, what would be a good way to let the caller know? raising an error if country.nil?
siwica has quit [Ping timeout: 264 seconds]
_lexjm has joined #ruby
marcdel_ has quit [Remote host closed the connection]
mistermocha has quit [Read error: Connection reset by peer]
<jhass>
I'd question if an order without one is valid
_lexjm has joined #ruby
<nobitanobi>
jhass: interesting
<nobitanobi>
I think you are right
lemur has quit [Ping timeout: 245 seconds]
<jhass>
if it is, I'd extract the shipping address to an own model and provide shipping_method there
yfeldblum has joined #ruby
yakko has quit [Read error: Connection reset by peer]
lemur has joined #ruby
nonks has joined #ruby
<nobitanobi>
thanks jhass
warreng has left #ruby [#ruby]
sailias has quit [Ping timeout: 245 seconds]
yakko has joined #ruby
bluenemo has quit [Read error: Connection reset by peer]
<rpag>
jhass, have you wrote anything with crystal yet?
michaeldeol has joined #ruby
<jhass>
I made the 2048 sample :P
end_guy has joined #ruby
dkb20k has joined #ruby
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
<rpag>
nice :)
yfeldblum has quit [Ping timeout: 258 seconds]
mistermocha has joined #ruby
cmckee has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn_ has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
cmckee has quit [Client Quit]
gerep has joined #ruby
kireevco has joined #ruby
mistermo_ has quit [Ping timeout: 255 seconds]
allcentury has joined #ruby
Cenderin has joined #ruby
tier has joined #ruby
tier has quit [Remote host closed the connection]
mistermo_ has joined #ruby
ta_ has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
ta has quit [Read error: Connection reset by peer]
timonv^ has joined #ruby
tier has joined #ruby
timonv_ has quit [Ping timeout: 256 seconds]
zarubin has joined #ruby
dkb20k has quit [Ping timeout: 265 seconds]
rshetty has quit [Remote host closed the connection]
mistermo_ has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
qba73 has quit []
Cenderin has left #ruby [#ruby]
i_s has joined #ruby
lemur has quit [Ping timeout: 265 seconds]
rshetty_ has joined #ruby
lemur has joined #ruby
<sheepman>
i have two arrays that are built from a csv file - they both are the same size but i want to populate all nil values with ones from the other if they are not nil. So for instance a = [nil, "two", nil], b = ["one", "two", nil] and i want to end up with ["one", "two", nil] etc.
<sheepman>
any ideas?
allcentury has quit [Ping timeout: 256 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
sheepman: .each_with_index
siwica has joined #ruby
<sheepman>
ok i'll check it, thanks
<gerep>
guys, I'm trying to get the second char on a 3 chars string: AB3, DF4, RT9, etc, I came up with this: /[A-Z](\D)/.match("CD1")[1] but doesn't seems like the best solution. Rubular link: http://rubular.com/r/SXJm02InzH
nonks has quit [Ping timeout: 246 seconds]
Tricon has joined #ruby
<jhass>
gerep: str[1] ?
ndrei has quit [Read error: Connection reset by peer]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pietr0 has joined #ruby
<gerep>
jhwhite: hahahahahaha
<gerep>
jhwhite: damn!!!!
carraroj has joined #ruby
<gerep>
jhwhite: always a better way, thanks a lot
ta has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
sailias has joined #ruby
jarjar_prime has quit [Quit: Sleep time.]
pauly_oc has quit [Ping timeout: 258 seconds]
aspires has joined #ruby
<rpag>
thinking with regexp :)
Spami has quit [Quit: This computer has gone to sleep]
joonty has quit [Quit: Leaving]
bakednotfried has quit [Remote host closed the connection]
Lewix has joined #ruby
jasooon has joined #ruby
michaeldeol has joined #ruby
TomyWork has quit [Ping timeout: 250 seconds]
ndrei has joined #ruby
mfmfmfmfmfmf has joined #ruby
graydot has quit [Quit: graydot]
mfmfmfmfmfmf has left #ruby [#ruby]
timonv_ has joined #ruby
psy has quit [Disconnected by services]
psy_ has joined #ruby
beef-wellington has joined #ruby
axl_ has quit [Quit: axl_]
timonv^ has quit [Ping timeout: 250 seconds]
jasooon has quit [Ping timeout: 264 seconds]
SilkFox has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shredding has joined #ruby
wjimenez5271 has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
maestrojed has quit [Ping timeout: 245 seconds]
<sheepman>
jhass: do you mind giving an example for each_with_index that works for me? sorry i'm still struggling for some reason :(
jheg has quit [Quit: Leaving]
<jhass>
sheepman: b.each_with_index {|v, i| a[i] ||= v }
rshetty_ has quit [Remote host closed the connection]
lemur has quit [Ping timeout: 244 seconds]
ephemerian has quit [Remote host closed the connection]
jerius has quit []
Hobogrammer has quit [Quit: さようなら]
<sheepman>
jhass: As you can tell, im not the best coder but i will decipher that wizardry :) thanks again.
iceden has quit [Ping timeout: 244 seconds]
aspires has quit []
tobiasvl has quit [Ping timeout: 272 seconds]
kireevco1 has joined #ruby
kireevco has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Remote host closed the connection]
econerd4_ has joined #ruby
billy_ran_away_ is now known as billly_ran_away
spyderman4g63 has joined #ruby
cndiv has quit [Quit: WeeChat 0.4.3]
aspires has joined #ruby
billly_ran_away is now known as billy_ran_away
tvl has joined #ruby
gerep_ has joined #ruby
lemur has joined #ruby
<jhass>
sheepman: tbh. it's pretty basic, but feel to ask specific questions if you want something explained
GeorgesLeYeti has quit [Ping timeout: 255 seconds]
djbkd has joined #ruby
Takle has quit [Read error: Connection reset by peer]
Takle has joined #ruby
<Psy-Q>
rubocop told me to fail instead of raising, but i'm not sure that's the good thing to do. i would want to raise when my client class determines it won't be able to talk to the server due to API version mismatch. isn't that OK?
gerep has quit [Ping timeout: 244 seconds]
<rpag>
sounds fine to me
<rpag>
if the class won't be able to be useful or work like its suppose to it sounds fine
william3 has quit [Remote host closed the connection]
timonv_ has quit [Ping timeout: 244 seconds]
banister is now known as banisterfiend
dkb20k has quit [Ping timeout: 244 seconds]
rshetty has joined #ruby
rippa has joined #ruby
sandelius has joined #ruby
<jhass>
syva: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ help
<syva>
okay thanks
<syva>
join #rubyonrails
<syva>
oops
shredding has quit [Client Quit]
<benzrf>
tfw people who think rails = ruby
Takle has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 240 seconds]
<syva>
i dont think rails is ruby, just assumed that people might answer on both subjects here
<syva>
assumed incorrectly
<syva>
thank you for pointing me in the right direction
TPBallbag has quit [Remote host closed the connection]
tier has quit [Remote host closed the connection]
sandelius has quit [Client Quit]
timonv^ has quit [Ping timeout: 256 seconds]
DrCode has quit [Ping timeout: 246 seconds]
o0oo0o has quit [Ping timeout: 246 seconds]
havenwood has quit [Ping timeout: 246 seconds]
mrsolo has joined #ruby
Guest73151 has quit [Ping timeout: 256 seconds]
troyready has joined #ruby
chrishough has joined #ruby
aspires has quit []
Takle has joined #ruby
m8 has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
Tuxero has joined #ruby
tier has joined #ruby
shredding has joined #ruby
RealMarc has joined #ruby
graydot has joined #ruby
Tuxero has quit [Client Quit]
jasooon has joined #ruby
moritzs has quit [Ping timeout: 244 seconds]
elaptics is now known as elaptics`away
_djbkd has joined #ruby
Tuxero has joined #ruby
fabrice31 has joined #ruby
nateberkopec has joined #ruby
ramfjord has joined #ruby
djbkd has quit [Ping timeout: 245 seconds]
lemur has quit [Ping timeout: 272 seconds]
nuck has quit [Ping timeout: 265 seconds]
allcentury has joined #ruby
cassianoleal has quit [Quit: (null)]
lemur has joined #ruby
fr1eza has joined #ruby
fr1eza has joined #ruby
mistermocha has joined #ruby
mrsolo has quit [Quit: Leaving]
iamjarvo has joined #ruby
ghr has quit [Ping timeout: 255 seconds]
IcyDragon has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yakko has quit [Read error: Connection reset by peer]
renderful has joined #ruby
mistermo_ has quit [Ping timeout: 245 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adriancb has joined #ruby
benzrf is now known as benzrf|offline
fabrice31 has quit [Ping timeout: 244 seconds]
<rpag>
whats 'tfw' ?
jasooon has quit [Ping timeout: 250 seconds]
IceDragon has quit [Ping timeout: 244 seconds]
<ruisantos>
i was thinking the same
yakko has joined #ruby
Alina-malina has quit [Ping timeout: 250 seconds]
<IcyDragon>
rpag, ruisantos: "that face when"
dangerousdave has joined #ruby
shredding has quit [Quit: shredding]
<rpag>
ah
<rpag>
hard to keep up :D
<IcyDragon>
tfw, your code explodes and it worked one iteration ago
klaut has quit [Remote host closed the connection]
aspires has joined #ruby
syva has quit [Quit: syva]
jarjar_prime has joined #ruby
econerd4_ has quit [Remote host closed the connection]
Tricon has quit [Quit: Lost terminal]
chrishough has quit [Ping timeout: 260 seconds]
techsethi has quit [Quit: techsethi]
havenwood has joined #ruby
bluOxigen has quit [Ping timeout: 255 seconds]
sk87 has joined #ruby
Takle has quit [Remote host closed the connection]
chrishough has joined #ruby
jerius has quit []
sk87 has quit [Client Quit]
TPBallbag has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
triple_b has joined #ruby
axl_ has joined #ruby
TPBallbag has quit [Remote host closed the connection]
skolman_ has quit [Remote host closed the connection]
ki0 has quit [Ping timeout: 250 seconds]
lemur has quit [Ping timeout: 265 seconds]
Alina-malina has joined #ruby
axl_ has quit [Client Quit]
Xiti has quit [Quit: Leaving]
skolman_ has joined #ruby
lemur has joined #ruby
graydot has quit [Quit: graydot]
mistermocha has quit [Remote host closed the connection]
yxhuvud has quit [Read error: Connection reset by peer]
skolman_ has quit [Ping timeout: 240 seconds]
nor has quit [Ping timeout: 255 seconds]
foooobear has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
aspires has quit []
yetanotherdave has joined #ruby
kirun has joined #ruby
Xiti has joined #ruby
gerep_ has joined #ruby
robbyoconnor has quit [Ping timeout: 250 seconds]
Neozonz|Disc2 has quit [Read error: Connection reset by peer]
chipotle has quit [Quit: cya]
carraroj has joined #ruby
Neozonz|Disc2 has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
skolman has joined #ruby
yxhuvud has joined #ruby
gerep has quit [Ping timeout: 265 seconds]
aspires has joined #ruby
alem0lars is now known as alem0lars|away
mistermocha has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
srenatus has quit [Quit: Connection closed for inactivity]
shredding has joined #ruby
nuck has joined #ruby
SilkFox has joined #ruby
Takle has joined #ruby
gerep has joined #ruby
beef-wellington has quit [Ping timeout: 256 seconds]
shevy has quit [Ping timeout: 264 seconds]
gerep has left #ruby [#ruby]
chrishough has quit [Ping timeout: 240 seconds]
gaganjyot has quit [Quit: Leaving]
sandelius has joined #ruby
Kricir has quit [Remote host closed the connection]
gerep_ has quit [Ping timeout: 245 seconds]
axl_ has joined #ruby
jjasonclark has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby
chrishough has joined #ruby
alem0lars|away is now known as alem0lars
Kricir has joined #ruby
arup_r has quit [Ping timeout: 258 seconds]
dangerousdave has joined #ruby
kallisti5 has joined #ruby
kallisti5 has left #ruby [#ruby]
claymore has joined #ruby
lemur has joined #ruby
davidbug has quit [Quit: davidbug]
Hobogrammer has joined #ruby
arup_r has joined #ruby
wasamasa has quit [Ping timeout: 264 seconds]
koderok has quit [Quit: koderok]
wald0 has quit [Quit: Lost terminal]
TPBallbag has joined #ruby
shevy has joined #ruby
apeiros has joined #ruby
aspires has quit []
dkb20k has joined #ruby
aspires has joined #ruby
Tuxero has left #ruby [#ruby]
jxf has quit [Ping timeout: 264 seconds]
chrishough has quit [Ping timeout: 240 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
tvl is now known as tobiasvl
postmodern has joined #ruby
postmodern has joined #ruby
postmodern has quit [Changing host]
x1337807x has joined #ruby
dkb20k has quit [Ping timeout: 244 seconds]
TPBallbag has quit [Ping timeout: 264 seconds]
_djbkd has quit [Remote host closed the connection]
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Wolland has quit []
mistermo_ has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
machete has quit [Ping timeout: 244 seconds]
chrishough has joined #ruby
timonv_ has joined #ruby
machete has joined #ruby
tjbiddle has joined #ruby
DrCode has joined #ruby
tier has quit [Remote host closed the connection]
russt has joined #ruby
jimbach has quit [Remote host closed the connection]
emmesswhy has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
jimbach has joined #ruby
jimbach has quit [Remote host closed the connection]
wasamasa has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DrCode has quit [Excess Flood]
djbkd has joined #ruby
tier has joined #ruby
DrCode has joined #ruby
dangerousdave has joined #ruby
skolman has quit [Remote host closed the connection]
adriancb has quit [Read error: Connection reset by peer]
jheg has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
skolman_ has joined #ruby
adriancb has joined #ruby
jxf has joined #ruby
lemur has joined #ruby
frem has joined #ruby
jasooon has joined #ruby
govg has quit [Ping timeout: 245 seconds]
SilkFox has quit [Quit: WeeChat 0.4.3]
SilkFox has joined #ruby
Hijiri has quit [Ping timeout: 244 seconds]
skolman_ has quit [Ping timeout: 256 seconds]
Kricir has quit [Remote host closed the connection]
Xeago has joined #ruby
Xeago_ has joined #ruby
timonv_ has quit [Ping timeout: 256 seconds]
byprdct_ has joined #ruby
byprdct_ has quit [Max SendQ exceeded]
byprdct has quit [Ping timeout: 255 seconds]
byprdct_ has joined #ruby
byprdct_ has quit [Max SendQ exceeded]
justinmburrous has quit [Remote host closed the connection]
Hijiri has joined #ruby
byprdct has joined #ruby
gioele has left #ruby [#ruby]
jasooon has quit [Ping timeout: 260 seconds]
[[vedic]] has joined #ruby
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
lemur has quit [Ping timeout: 265 seconds]
Xeago has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
doodlehaus has joined #ruby
lemur has joined #ruby
jottr has joined #ruby
nobitanobi has quit [Remote host closed the connection]
yakko has quit [Read error: Connection reset by peer]
yakko has joined #ruby
tlarevo has quit [Ping timeout: 250 seconds]
Insanity133 has joined #ruby
djbkd has quit [Remote host closed the connection]
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tjbiddle has quit [Quit: tjbiddle]
Insanity133 has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving.]
Vile` has quit [Ping timeout: 255 seconds]
sandelius has joined #ruby
jenrzzz has joined #ruby
techsethi has joined #ruby
cassianoleal has joined #ruby
Vile` has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
perrier has quit [Remote host closed the connection]
perrier has joined #ruby
<crome>
Psy-Q: rubocop is just a tool to enforce coding style for yoruself or within a team. I assume the default settings are just the personal preference of its maker, I don't think you should use it without customization
troulouliou_dev has quit [Remote host closed the connection]
AmBienCeD has joined #ruby
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
razieliyo has quit [Ping timeout: 265 seconds]
maletor has joined #ruby
maletor has quit [Max SendQ exceeded]
kaspertidemann has joined #ruby
abuzze has joined #ruby
razieliyo has joined #ruby
volty has joined #ruby
marr has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
siwica has quit [Ping timeout: 256 seconds]
ndrei has joined #ruby
emmesswhy has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shredding has quit [Quit: shredding]
abuzze has quit [Ping timeout: 240 seconds]
emmesswhy has quit [Client Quit]
ghr has joined #ruby
dangerousdave has joined #ruby
romistrub has joined #ruby
<romistrub>
hello universe
JohnBat26 has joined #ruby
nobitanobi has joined #ruby
jjasonclark has quit [Quit: jjasonclark]
<romistrub>
does myfile.gets wait for a new line to be entered into a file before it attempts to read? I'm getting file.gets => nil ... but file is empty
skolman has joined #ruby
<jhass>
didn't you just answer your question?
ariera has joined #ruby
<volty>
i need to convert the colors of many css files in a programmatic way, to start just black on white. Any suggestions?
aspires has quit []
siwica has joined #ruby
<romistrub>
jhass: I did, I was making sure it wasn't another error causing the problem
<romistrub>
is there a way to make a loop wait until a file has been added to externally before it attempts to read the next line?
ghr has quit [Ping timeout: 272 seconds]
<jhass>
volty: gsub ?
<volty>
enough? :)
<jhass>
romistrub: not really, maybe you want a named pipe?
<volty>
yaaa, you are right, not worth parsing, @ jhass
<romistrub>
jhass: yes, I probably do; how?
<volty>
romistrub: a file is either readable or in eof condition
<romistrub>
dang, was hoping not to have to install another gem :P; thanks tho
<jhass>
romistrub: you don't
techsethi has quit [Quit: techsethi]
visof has quit [Ping timeout: 256 seconds]
<romistrub>
volty: I was under the impression that gets moved the... whatsitcalled... "pointer" (?) forward every time its called, and pauses until something comes up... but I guess that makes no sense, since how would it know when to read from the file. Sigh.
<jhass>
romistrub: there might be an even better solution than a fifo though, hard to tell from what you've said
<jhass>
it does that, but every file ends with an EOF which terminates the stream
kaspergrubbe has quit [Remote host closed the connection]
<romistrub>
Okay, maybe I'm doing this all wrong. I've got a server process running that's accepting on port 80. I don't want to use DRB because this server will be public-facing, so I don't want any more TCPSockets than I need
<jhass>
what is it doing?
aspires has joined #ruby
<romistrub>
The server?
jjasonclark has joined #ruby
<romistrub>
Oh, sorry, forgot an explanation
<romistrub>
I want to be able to communicate with the server from another process
techsethi has joined #ruby
jdj_dk has joined #ruby
<jhass>
still to abstract
<jhass>
*too
<romistrub>
so, for example, the server output to the tty that I started it from, and I can open up another terminal, and send commands to it
Jackneill has quit [Remote host closed the connection]
ghr has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
<apeiros>
break it down into lines with fewer &&'s
neoxquick has joined #ruby
lemur has joined #ruby
<nobitanobi>
apeiros: but shall I place the && in the previous line? Or beginning of first line
<nobitanobi>
I couldn;'t see those rules in the style guide
Hightower666 has joined #ruby
Hightower666 has quit [Excess Flood]
kaspergrubbe has quit []
<apeiros>
my suggestion is NOT about the placement of the &&'s
<apeiros>
it's about restructuring your code. not just rearranging.
<tuelz>
nobitanobi: commented with my opinions
<nobitanobi>
I see apeiros
spider-mario has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
Lewix has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 244 seconds]
Hightower666 has joined #ruby
Hightower666 has quit [Excess Flood]
spider-mario has joined #ruby
Lewix has joined #ruby
Hightower666 has joined #ruby
<nobitanobi>
thanks
noobie_ has joined #ruby
codezomb has joined #ruby
Lewix has quit [Ping timeout: 264 seconds]
bmurt has quit []
aspires has joined #ruby
m8tt8 has joined #ruby
carlyle has joined #ruby
ptrrr has joined #ruby
jheg has quit [Quit: jheg]
anaeem1 has quit [Remote host closed the connection]
m8 has quit [Ping timeout: 244 seconds]
IcyDragon has quit [Quit: Space~~~]
IceDragon has joined #ruby
psyprus has quit [Ping timeout: 258 seconds]
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
triple_b has joined #ruby
dkb20k has joined #ruby
Seich has joined #ruby
tvw has joined #ruby
jjasonclark has quit [Quit: jjasonclark]
AlSquirrel has joined #ruby
mikepack has joined #ruby
davidbug has quit [Quit: davidbug]
AlSquire has quit [Ping timeout: 264 seconds]
pietr0 has quit [Ping timeout: 244 seconds]
dkb20k has quit [Ping timeout: 264 seconds]
moted has quit [Remote host closed the connection]
psyprus has joined #ruby
ghr has joined #ruby
Pupeno_ has joined #ruby
Pupeno has quit [Ping timeout: 245 seconds]
moted has joined #ruby
tier has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 244 seconds]
paulfm has quit []
klaut has joined #ruby
shazaum has quit [Quit: Leaving]
Kricir has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
Hijiri has quit [Ping timeout: 272 seconds]
Oberon4278 has joined #ruby
alem0lars is now known as alem0lars|away
iliketurtles has quit [Quit: zzzzz…..]
mfonda has joined #ruby
lessless has joined #ruby
emmesswhy has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
ctp has joined #ruby
emmesswhy has quit [Client Quit]
xcesariox has quit [Remote host closed the connection]
emmesswhy has joined #ruby
jdj_dk has quit [Remote host closed the connection]
chrishough has joined #ruby
william3 has joined #ruby
Kricir has joined #ruby
<mfonda>
when using a user-defined class as a hash key, is the actual key the result of the hash method or is it the object? i.e. if iterating over a hash, will the keys be the objects?
jjasonclark has joined #ruby
<wallerdev>
keys will be objects
<jhass>
mfonda: the keys will be the object, you need to implement #hash and #eql? for it to properly work though
yfeldblum has quit [Remote host closed the connection]
<jhass>
as those are used internally for the data structure
Hightower666 has quit [Ping timeout: 245 seconds]
<mfonda>
wallerdev, jhass: thanks
carlyle has quit []
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
m8tt8 has quit [Quit: Sto andando via]
jasooon has joined #ruby
lemur has joined #ruby
mfmfmfmfmfmf has joined #ruby
sailias has quit [Ping timeout: 255 seconds]
mfmfmfmfmfmf has left #ruby [#ruby]
techsethi has joined #ruby
KucukMubasir has joined #ruby
AlSquirrel has quit [Quit: This computer has gone to sleep]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lemur has quit [Ping timeout: 255 seconds]
tomas3man has joined #ruby
jasooon has quit [Ping timeout: 265 seconds]
ferr has joined #ruby
renderful has joined #ruby
tomas3man has left #ruby [#ruby]
gsd_ has joined #ruby
TripTastic has joined #ruby
gsd_ has quit [Max SendQ exceeded]
abuzze has joined #ruby
gsd has quit [Ping timeout: 245 seconds]
gsd_ has joined #ruby
sailias has joined #ruby
rbrs has quit [Quit: Leaving]
Takle has quit [Remote host closed the connection]
renderf__ has quit [Ping timeout: 264 seconds]
<benzrf>
05:18 < lambdabot> dons says: Those who would give up essential type safety, to purchase a little liberty, deserve neither liberty nor type safety.
lemur has joined #ruby
jjasonclark has quit [Quit: jjasonclark]
JBreit has quit [Ping timeout: 264 seconds]
<yxhuvud>
heh
rndm has joined #ruby
<apeiros>
/kick lamdbabot jerks are not welcome
abuzze has quit [Ping timeout: 244 seconds]
it0a has quit [Quit: WeeChat 1.0.1]
graydot has joined #ruby
rndm has quit [Quit: WeeChat 0.3.7]
jjasonclark has joined #ruby
Fire-Dragon-DoL has joined #ruby
doodlehaus has quit [Remote host closed the connection]
lw has joined #ruby
cassianoleal has quit [Quit: (null)]
noobie_ has quit [Ping timeout: 246 seconds]
ferr has quit [Ping timeout: 244 seconds]
jjasonclark has quit [Client Quit]
visof has quit [Ping timeout: 256 seconds]
jimmyhoughjr has joined #ruby
<lessless>
is it possible to talk to the rtorrent directly via scgi interface?
emmesswhy has quit [Quit: Leaving]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hijiri has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
jimbach has joined #ruby
diegoviola has quit [Ping timeout: 256 seconds]
lemur has quit [Ping timeout: 272 seconds]
aspires has quit []
lemur has joined #ruby
aspires has joined #ruby
patrick99e99 has joined #ruby
msmith_ has quit [Read error: Connection reset by peer]
jhwhite has joined #ruby
msmith_ has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
sailias has quit [Quit: Leaving.]
tkuchiki has quit [Ping timeout: 258 seconds]
msmith_ has quit [Read error: Connection reset by peer]
skolman has quit [Remote host closed the connection]
sailias has joined #ruby
RichardLitt has joined #ruby
msmith_ has joined #ruby
skolman_ has joined #ruby
Takle has joined #ruby
Takle_ has joined #ruby
Takle has quit [Remote host closed the connection]
yfeldblum has joined #ruby
jobewan has quit [Quit: Leaving]
meshugga_ has joined #ruby
<meshugga_>
heyo
RichardLitt is now known as richardlitt
lemur has quit [Ping timeout: 244 seconds]
<meshugga_>
anyone's got an idea on how to hash a string into a variable length hash in ruby?
<benzrf>
variable length hash?
<benzrf>
that's kind of uh
<benzrf>
kind of an oxymoron
<meshugga_>
yeah :)
jxf has quit [Ping timeout: 240 seconds]
<benzrf>
clearly your nick is accurate
fabrice31 has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
yfeldblum has quit [Read error: Connection reset by peer]
<meshugga_>
well i could just take the first n bytes of md5 or such
yfeldblum has joined #ruby
<meshugga_>
hm hm
Tuxero has joined #ruby
meshugga_ has left #ruby [#ruby]
lw has quit [Quit: s]
sailias has quit [Client Quit]
beneggett has quit [Ping timeout: 272 seconds]
skolman_ has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
lw has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
foureight84 has joined #ruby
lxsameer has quit [Quit: Leaving]
mistermocha has joined #ruby
lemur has joined #ruby
* apeiros
wonders about the reason for such a question
<foureight84>
i am using sinatra with unicorn on nginx on my dev env. how do i execute unicorn so it applies new code changes as i write them?
ptrrr has quit [Quit: ptrrr]
ndrei has quit [Ping timeout: 255 seconds]
fabrice31 has quit [Ping timeout: 264 seconds]
<crome>
rerun
<foureight84>
rerun "unicorn -c unicorn.rb -E dev -D"?
<jaequery>
so how must of a performance degradation will we see if we move to Ruby/Sinatra as opposed to raw PHP?
<momomomomo>
for whomever is ‘i dont know what to do to tweak the jvm / torquebox / jboss'
<crome>
wat
<Cat_1>
You may see an improvement
decoponio has joined #ruby
skolman_ has joined #ruby
<Cat_1>
Oh, not tuning, I'm looking for memory leaks
<crome>
jaequery: I hope you realize your question makes no sense
jaequery_ has joined #ruby
<jaequery_>
disc'd again
ghr has quit [Ping timeout: 240 seconds]
<Cat_1>
Your question of "so how must of a performance degradation will we see if we move to Ruby/Sinatra as opposed to raw PHP?" makes no sense
_lexjm has quit [Quit: afk]
jaequer__ has joined #ruby
jaequer__ has quit [Max SendQ exceeded]
shredding has quit [Quit: shredding]
<ericwood>
you will see +100 performance
<crome>
jaequery: I hope you don't expect us to tell you something like "ruby is exactly 13.2% faster than PHP under arbitrary circumstances"
jaequer__ has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
ki0 has joined #ruby
<Senjai>
Who php
<Senjai>
who php's anymore
marienz has quit [Ping timeout: 612 seconds]
max96at is now known as max96at|off
aspires has quit []
jaequery has quit [Ping timeout: 256 seconds]
<Cat_1>
Dude he needs to work on his availability first before he starts thinking about performance...dude keeps dropping every 5 seconds.
jenrzzz has joined #ruby
jaequery_ has quit [Ping timeout: 245 seconds]
<crome>
guess he is running a PHP client :D
vickleford has quit [Quit: vickleford]
robbyoconnor has joined #ruby
geggam has quit [Ping timeout: 260 seconds]
<Cat_1>
Anyway @momomomomo I'm looking for how to profile memory usage in Torquebox over time...I don't know if JVisualVM can give me that kind of data.
enebo has quit [Quit: enebo]
shredding has joined #ruby
econerd4ever has joined #ruby
mfonda has left #ruby [#ruby]
yakko has quit [Read error: Connection reset by peer]
lessless has quit [Remote host closed the connection]
<Cat_1>
Cool thanks
yakko has joined #ruby
aspires has joined #ruby
Lewix has joined #ruby
lemur has joined #ruby
<momomomomo>
behold, the power of the google
jasooon has joined #ruby
<Cat_1>
I googled, I was just too specific
davasaurous has joined #ruby
thagomizer has quit [Quit: Leaving.]
levity_island_ has joined #ruby
thagomizer has joined #ruby
levity_island has quit [Ping timeout: 240 seconds]
levity_island_ is now known as levity_island
shredding has quit [Quit: shredding]
nevans has quit [Ping timeout: 255 seconds]
nemesit|znc has quit [Quit: quit]
jasooon has quit [Ping timeout: 255 seconds]
davasaurous has quit [Remote host closed the connection]
ki0 has quit [Remote host closed the connection]
beneggett has quit [Read error: Connection reset by peer]
benzrf is now known as benzrf|offline
beneggett has joined #ruby
davasaurous has joined #ruby
ValicekB has joined #ruby
techsethi has quit [Quit: techsethi]
<headius>
Cat_1: there are heap analysis tools that might help
mostlybadfly has quit [Quit: Connection closed for inactivity]
<headius>
you can generate a heap dump from the JVM and then use tools to see the entire memory space... figure out which root belongs to which app and you can find that app's retained memory size
aspires has quit []
<headius>
I'd recommend the Eclipse Memory Anaylzer for that
icarus has quit [Remote host closed the connection]
Zettam has quit [Ping timeout: 255 seconds]
benzrf|offline is now known as benzrf
theotherstupidgu has quit [Quit: leaving]
sdegutis has joined #ruby
<sdegutis>
How does the latest MRI Ruby compare to Ruby 1.9.0?
fabrice31 has quit [Ping timeout: 255 seconds]
jespada has quit [Quit: Leaving]
adriancb has joined #ruby
<havenwood>
sdegutis: favorably
mistermo_ has joined #ruby
ariera_ has joined #ruby
roolo_ has quit [Ping timeout: 255 seconds]
<sdegutis>
Right now we're using Clojure on the JVM. How would modern Ruby MRI compare to that?
mistermocha has quit [Ping timeout: 245 seconds]
adamnbowen has quit [Quit: Computer has gone to sleep.]
<havenwood>
sdegutis: Just in general or anything in specific in mind?
<sdegutis>
Just a general run-of-the-mill shopping cart web app.
mistermo_ has quit [Remote host closed the connection]
ariera has quit [Ping timeout: 250 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snath has quit [Ping timeout: 264 seconds]
leitz has quit [Quit: Nappy time]
msmith_ has joined #ruby
nonks has joined #ruby
adriancb has quit [Ping timeout: 255 seconds]
<havenwood>
sdegutis: I'd think the similarities outweigh the differences. More so even if you compare Clojure and JRuby, which is a great Ruby implementation to run on.
lemur has quit [Ping timeout: 265 seconds]
Lewix has joined #ruby
<sdegutis>
We're using JRuby within the Clojure app for a few asset things (Slim/Sass), and it makes it even slower.
moritzs has quit [Remote host closed the connection]
lemur has joined #ruby
<havenwood>
sdegutis: I'd really not expect a speed up switching to any of the current production Ruby implementations.
<sdegutis>
Cool :)
<sdegutis>
That said, I'm so tired of writing in Clojure.
<havenwood>
sdegutis: The one think MRI would win big on is startup time. :P
<sdegutis>
Been almost 2 years straight now.
<havenwood>
one thing*
<sdegutis>
Oh yeah, that's one of the big things of Ruby that make me want to switch. The other is better selection of web-related libs.
<sdegutis>
Clojure/Java simply have no decent Slim/Sass/etc stuff.
kireevco1 has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
davasaurous has quit [Remote host closed the connection]
kireevco has joined #ruby
iamjarvo has joined #ruby
ariera has joined #ruby
Pupeno has joined #ruby
apeiros has quit [Remote host closed the connection]
icebourg has quit []
aspires has joined #ruby
workmad3 has joined #ruby
<havenwood>
sdegutis: JRuby+Truffle may change the name of the game as far as performance and Ruby. We'll see. :)
apeiros has joined #ruby
<sdegutis>
Hmm. Maybe I should look into Scala.
<havenwood>
meh
<sdegutis>
Anyway, the choice isn't really mine. But I can dream, can't I?
<sdegutis>
Honestly I'd prefer to write a web app in Lua, if for nothing else than the raw simplicity and hopes of speed.
Pupeno_ has quit [Ping timeout: 256 seconds]
michaeldeol has joined #ruby
<havenwood>
sdegutis: mruby is another neat thing on the Ruby front
<havenwood>
speaking of lua-envy
ariera_ has quit [Ping timeout: 260 seconds]
<havenwood>
sdegutis: curious what you think of transducers?
Phonetiki has joined #ruby
<havenwood>
if you've messed with them
<Phonetiki>
hey
<havenwood>
Phonetiki: hi
lemur has quit [Ping timeout: 244 seconds]
<sdegutis>
I haven't yet, but I heard they're really popular to make fun of.
<sdegutis>
I remember seeing lots of good memes about them on twitter.
<sdegutis>
I should probably integrate them into our web app so I don't go crazy.
* havenwood
searches for a burrito emoji
jaequery has joined #ruby
lemur has joined #ruby
davasaurous has joined #ruby
patrick99e99 has quit [Ping timeout: 265 seconds]
Tuxero has quit [Quit: Tuxero]
sdegutis has quit [Quit: Leaving...]
stormbytes has joined #ruby
hackeron has quit [Ping timeout: 264 seconds]
hackeron has joined #ruby
dkphenom has joined #ruby
<havenwood>
Sometimes the cheese on top tastes better.
TPBallbag has joined #ruby
dkb20k has joined #ruby
ariera_ has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has quit [Client Quit]
snath has joined #ruby
robbyoconnor has joined #ruby
Hobogrammer has quit [Ping timeout: 256 seconds]
jonathanwallace has joined #ruby
mary5030 has joined #ruby
ariera has quit [Ping timeout: 272 seconds]
TPBallbag has quit [Ping timeout: 240 seconds]
coderwill has joined #ruby
Xiti` has joined #ruby
dkb20k has quit [Ping timeout: 245 seconds]
Xiti` has quit [Read error: Connection reset by peer]