despai has quit [Quit: This computer has gone to sleep]
mathias2 has quit [Ping timeout: 265 seconds]
aspires has joined #ruby
dkb20k has quit [Ping timeout: 244 seconds]
lampd1 has quit [Remote host closed the connection]
soulcake has joined #ruby
St1gma has quit [Read error: Connection reset by peer]
St1gma has joined #ruby
funburn has joined #ruby
gregoriokusowski has joined #ruby
<rpag_>
wald0, C is bare bones
Avahey has joined #ruby
<momomomomo>
jesus still on that conversation? :|
<banister>
wald0 C has strcmp
poweratom_ has joined #ruby
aep has joined #ruby
<banister>
and 'string' isn't even a type in C
<wald0>
momomomomo: nope, jesus doesn't exist
jdj_dk has quit [Ping timeout: 244 seconds]
<banister>
you just have a null-terminated array of chars
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kirun has quit [Quit: Client exiting]
c0def00d has quit [Quit: c0def00d]
dermothaughey has joined #ruby
aep has quit [Ping timeout: 256 seconds]
fuhgeddaboudit has joined #ruby
fuhgeddaboudit has quit [Remote host closed the connection]
aep has joined #ruby
thumpba has joined #ruby
<volty>
@sin, @sout, @wait_thr = Open3.popen2("cmd ...") // so I write some text to @sin and right after read_nonblock from @sout, should I interlace the two calls with a small delay (say 0.05) ?
pandaant has quit [Remote host closed the connection]
<omosoj>
hey all, i have a question about ar associations. a store has_many products, and a store has_one storesale. how do i relate storesale to products?
mugiwara has quit []
thumpba has quit [Remote host closed the connection]
<rpag_>
omosoj, by joining #rubyonrails
Juanchito has quit [Quit: Connection closed for inactivity]
Kricir has joined #ruby
<jhass>
worse, he already asked there
<omosoj>
rpag_, is AR not a part of ruby as well?
<jhass>
AR is written in ruby, it's part of rails
NoNMaDDeN has quit [Ping timeout: 244 seconds]
Lingos_ has quit [Ping timeout: 250 seconds]
<rpag_>
omosoj, what jhass said
<omosoj>
i asked in the other room about 10 minutes ago. no bites. i've been trying to learn this for a while and getting frustrated. ugh
<jhass>
omosoj: 10 minutes is nothing in IRC terms
<omosoj>
i've talked to some people who use AR without rails, so i thought it might be appropriate to ask in here as well
sevenseacat has joined #ruby
lampd1 has joined #ruby
<jhass>
response times of 4 hours and more are not unusual in less popular channels
<banister>
omosoj probably storesale has_many products through: store (if you need to)
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bMalum has quit [Quit: bMalum]
<banister>
idk
<jhass>
banister: you should found #new2rails :P
Insti has quit [Ping timeout: 264 seconds]
<banister>
nah :)
<omosoj>
banister, that's what i thought might work, but you seem unsure
volty has quit [Ping timeout: 264 seconds]
<banister>
omosoj try it?
volty has joined #ruby
<wald0>
bankair: null array of chars what thing? jesus?
<banister>
it'll work
<wald0>
oops, banister i meant
<banister>
wald0 idk what you're asking me
<wald0>
well, in any case, for sure ruby "string" is totally different than a string of chars in c, is a totally different design
<wald0>
which is good and bad, in both ones :)
usrj has left #ruby ["AndroIRC"]
<banister>
C barely has arrays
<omosoj>
banister, and products belong_to storesale too?
fabrice31 has joined #ruby
jdj_dk has joined #ruby
<banister>
omosoj no, belongs_to implies it has a foreign key
danijoo has joined #ruby
crazydiamond has joined #ruby
kireevco has joined #ruby
<omosoj>
banister, yes, i see. it is unnecessary b/c storesale has a foreign key for store, goes there, then goes to all the products connected to that store. is that basically what happens?
rshetty has joined #ruby
<banister>
omosoj yep
rudisimo has quit [Remote host closed the connection]
<omosoj>
k, thanks :)
ramfjord has quit [Ping timeout: 272 seconds]
Miron has quit [Ping timeout: 240 seconds]
thumpba has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
<omosoj>
banister, sorry, one last question. when you go through a table, do you need to consider its foreign keys at all?
uber has quit [Changing host]
uber has joined #ruby
Channel6 has quit [Quit: Leaving]
<banister>
omosoj what do u mean?
Channel6 has joined #ruby
<omosoj>
basically, is the through table functioning as a joins table that needs both tables' foreign keys?
rshetty has quit [Ping timeout: 264 seconds]
delianides has joined #ruby
delianides has quit [Remote host closed the connection]
delianides has joined #ruby
<omosoj>
banister ^
Insti has joined #ruby
Lingo has quit [Quit: Be back later ...]
diegoviola has quit [Quit: WeeChat 1.0.1]
nateberkopec has quit [Quit: Leaving...]
Kricir has quit [Remote host closed the connection]
fgo has joined #ruby
wald0 has quit [Quit: Lost terminal]
luckyruby has joined #ruby
dkphenom has joined #ruby
dkphenom has quit [Max SendQ exceeded]
dkphenom has joined #ruby
dkphenom has quit [Max SendQ exceeded]
<banister>
omosoj: you're doing this: select products.* from products join store where products.store_id = store.id where store.id = (that particular) storesale.store_id
dkphenom has joined #ruby
diegoviola has joined #ruby
thumpba has quit [Remote host closed the connection]
<banister>
omosoj so it's just the regular: store.products except it's starting with the storesale (which has a reference back to the store)
<banister>
nothing fancy
delianides has quit [Ping timeout: 272 seconds]
oo_ has quit [Remote host closed the connection]
<dkphenom>
hi, i have an array of strings, how do I print a print an array element which contains a substring?
<omosoj>
banister, got it, thanks
SCHAAP137 has quit [Quit: Leaving]
<banister>
sorry that should be an 'on' rather than a 'where' (the first one)
nkumari has quit [Remote host closed the connection]
funburn has quit [Ping timeout: 264 seconds]
<omosoj>
k
<dkphenom>
nm, answered my own quesiton :)
ramfjord has joined #ruby
mikepack has joined #ruby
nkumari has joined #ruby
nkumari has quit [Read error: Connection reset by peer]
nkumari has joined #ruby
nkumari has quit [Remote host closed the connection]
thumpba has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sargas has quit [Quit: Leaving]
nkumari has joined #ruby
haon99 has joined #ruby
mathias2 has joined #ruby
Jake232 has joined #ruby
sdwrage has joined #ruby
dkb20k has joined #ruby
<haon99>
Hi! I'm currently trying to save the binary output of a RMagick/MiniMagick object (via .to_blob) into mongo's gridFS, but seeing the error: "string contains null byte"
it0a has joined #ruby
<haon99>
Unsure what the root of the problem could be? Perhaps an encoding issue?
Fire-Dragon-DoL has quit [Quit: Leaving.]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Frank_Jameso has quit [Remote host closed the connection]
kobain has joined #ruby
mathias2 has quit [Ping timeout: 250 seconds]
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
dkb20k has quit [Ping timeout: 240 seconds]
<banister>
haon99 i dont know much about mongo, but maybe you can store the blog in a different field type other than string?
<banister>
strings (at least in C) treat null bytes specially, it indicates the end of a string
<banister>
if there's a pure binary type you can use, try that instead
<banister>
blob*
dermothaughey has quit [Remote host closed the connection]
<haon99>
banister: I can save the output of open(self.image_url) into gridFS without a problem
<haon99>
somehow the output of .to_blob is what's causing issues.
dermothaughey has joined #ruby
<banister>
haon99 you can always base64 encode it or something
<haon99>
I noticed the output of .to_blob is a long binary encoded string, whereas open(self.image_url) returns: #<Tempfile:/var/folders/4s/88_0g83d12nfj8m8z_93f54r0000gn/T/open-uri20141116-2987-181m4ho>
nkumari has quit [Remote host closed the connection]
<haon99>
Maybe I can create a tempfile object to feed it into?
<haon99>
Tempfile.new('temp').write(image.to_blob) outputs: #<Encoding::UndefinedConversionError: "\xFF" from ASCII-8BIT to UTF-8>
thsig has quit [Remote host closed the connection]
arescorpio has joined #ruby
dermothaughey has quit [Ping timeout: 258 seconds]
jimbach has quit [Remote host closed the connection]
jimbach has joined #ruby
cleopatra has quit [Quit: Saliendo]
sirene is now known as cleopatra
byprdct has quit [Read error: Connection reset by peer]
hiyosi has quit [Ping timeout: 240 seconds]
wex13r has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
rshetty has joined #ruby
dermothaughey has joined #ruby
byprdct has joined #ruby
jimbach has quit [Ping timeout: 258 seconds]
x1337807x has quit [Read error: Connection reset by peer]
oculus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rshetty has quit [Ping timeout: 264 seconds]
aspires has quit []
josephndenton has joined #ruby
DarkCthulhu has left #ruby ["Leaving"]
nobitanobi has quit [Remote host closed the connection]
arup_r has joined #ruby
nonks has joined #ruby
byprdct has quit [Quit: sleeping]
St1gma has quit [Read error: Connection reset by peer]
arup_r has quit [Client Quit]
St1gma has joined #ruby
arup_r has joined #ruby
poweratom_ has quit [Quit: Be back later ...]
nkumari_ has joined #ruby
atomical has joined #ruby
rustshaman has joined #ruby
zacts- has joined #ruby
mary5030 has quit [Remote host closed the connection]
nkumari has quit [Ping timeout: 265 seconds]
corehook has joined #ruby
mathias2 has joined #ruby
arrubin has quit []
volty has quit [Quit: Konversation terminated!]
tyll has quit [Ping timeout: 240 seconds]
crazydiamond has quit [Ping timeout: 245 seconds]
nonks has quit [Ping timeout: 250 seconds]
Mars` has joined #ruby
bahar has quit [Ping timeout: 255 seconds]
lemur has quit [Ping timeout: 258 seconds]
nkumari_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
mathias2 has quit [Ping timeout: 272 seconds]
nkumari has joined #ruby
byprdct has joined #ruby
lemur has joined #ruby
bahar has joined #ruby
tyll has joined #ruby
rkazak has left #ruby [#ruby]
airdeluxe has joined #ruby
St1gma has quit [Read error: Connection reset by peer]
dermothaughey has quit [Remote host closed the connection]
St1gma has joined #ruby
dermothaughey has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mars` has quit [Ping timeout: 272 seconds]
NoNMaDDeN has joined #ruby
bahar has quit [Ping timeout: 272 seconds]
MrDoctor2 has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
mary5030 has quit [Remote host closed the connection]
MrDoctor2 has joined #ruby
bahar has joined #ruby
mary5030 has joined #ruby
renderful has joined #ruby
magic_ has joined #ruby
dermothaughey has quit [Ping timeout: 255 seconds]
zacts- has quit []
ZaRDaK has quit [Read error: Connection reset by peer]
ZaRDaK has joined #ruby
Cache_Money has joined #ruby
mugiwara_ has joined #ruby
Channel6 has quit [Quit: Leaving]
mary5030 has quit [Ping timeout: 272 seconds]
luriv has quit [Ping timeout: 258 seconds]
<mugiwara_>
I'm about to read some tutorials on Ruby Gems. I am still not totally sure about the concept, and don;t know how to use them. I learned modules, which seem to be a way to have code span multiple files, like most projects would. But gems.. they are like plugins written by other people? And you would 'require' them just like modules?
renderful has quit [Ping timeout: 255 seconds]
sinequanon has joined #ruby
<BraddPitt>
a gem is a packaged library or collection of code that provides some function
<BraddPitt>
you can include them in your own program so that you have access to that code
slawrence00 has joined #ruby
divi has joined #ruby
<BraddPitt>
and yes, you 'require' them similar to modules
<BraddPitt>
except that you include modules, not require
<mugiwara_>
ah yes, you're right
omosoj has quit [Quit: leaving]
<mugiwara_>
I found a tutorial on tutsplus to explain to to me, very similar to how you did
<mugiwara_>
BraddPitt: Also, gems are pretty much the equivalent of pypi packages that I would install using pip. Makes sense! :]
sinequanon has quit [Ping timeout: 258 seconds]
<mugiwara_>
I learned rvm a little while ago, so I just created a new gemset, I will practice installing and uninstalling gems
nkumari has quit [Remote host closed the connection]
amystephen has quit [Quit: amystephen]
davedev24_ has joined #ruby
procat has joined #ruby
KramerC has joined #ruby
chipotle has quit [Quit: cya]
Jake232 has quit [Ping timeout: 256 seconds]
freerobby has joined #ruby
Photism has quit [Quit: Leaving]
<mugiwara_>
I want to continue learning Ruby by working with Twitter and YouTube API. Since most big sites now use oauth, should I get ONE gem for oauth and learn to manually code for Twitter and YouTube, or use "gem install twitter" and use pre-made gems?
divi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrDoctor2 has quit [Remote host closed the connection]
razieliyo_ has joined #ruby
razieliyo has quit [Read error: No route to host]
MrDoctor2 has joined #ruby
Techguy305|2 has quit [Remote host closed the connection]
aspires has joined #ruby
sailias has joined #ruby
freerobby has quit [Quit: Leaving.]
Channel6 has joined #ruby
tus has quit []
hiyosi has joined #ruby
<BraddPitt>
the gems are generally just wrappers for the HTTP calls with some helper methods thrown in
deject3d_ has joined #ruby
mattstra_ has joined #ruby
mugiwara_ has quit []
sailias has quit [Quit: Leaving.]
hiyosi has quit [Ping timeout: 265 seconds]
<BraddPitt>
with ActiveRecord, suppose I have a an Order table with user_id column and order belongs_to user. Is it faster to call user.id or user_id from the Order model class?
oo_ has quit [Remote host closed the connection]
<BraddPitt>
i would think user_id since the order is read into memory and we dont have to hit the DB to read the user_id attribute of the model
<rpag_>
user_id is faster
<rpag_>
it returns an integer
<rpag_>
no AR object to read, no association to load
<rpag_>
s/read/create/
<BraddPitt>
still seems to be firing a SQL query
<BraddPitt>
i dont get why
<BraddPitt>
this is for a Orders#show method
oo_ has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
<BraddPitt>
just `puts "#{user_id}" to server console window
<BraddPitt>
ah
<BraddPitt>
i think this is from the Devise gem
<BraddPitt>
perhaps?
<BraddPitt>
yeah, it is
<BraddPitt>
derf, i had a before_action to auth a user
kyb3r_ has quit [Read error: Connection reset by peer]
kyb3r_ has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Techguy305 has joined #ruby
takitakitaki has joined #ruby
nkumari has joined #ruby
nkumari has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 250 seconds]
kevr has quit [Ping timeout: 256 seconds]
klmlfl has joined #ruby
oo_ has quit [Remote host closed the connection]
Photism has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
oo_ has joined #ruby
mathias2 has joined #ruby
farkdiber has quit [Remote host closed the connection]
kevr has joined #ruby
Lingos_ has joined #ruby
kevr has quit [Changing host]
kevr has joined #ruby
iamjarvo has joined #ruby
arup_r has quit [Quit: Leaving.]
drawingthesun has joined #ruby
nonks has joined #ruby
nonks has quit [Remote host closed the connection]
BlackGear has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Techguy305|2 has joined #ruby
mathias2 has quit [Ping timeout: 256 seconds]
Lingos_ has quit [Ping timeout: 244 seconds]
St1gma has quit [Read error: Connection reset by peer]
braincrash has quit [Quit: bye bye]
St1gma has joined #ruby
jgrevich_ has joined #ruby
j_mcnally has joined #ruby
anaeem1_ has joined #ruby
XX1 has quit []
Techguy305 has quit [Ping timeout: 265 seconds]
jgrevich has quit [Ping timeout: 255 seconds]
jgrevich_ is now known as jgrevich
braincrash has joined #ruby
fabrice31 has joined #ruby
mary5030 has joined #ruby
_5kg has quit [Ping timeout: 240 seconds]
tlarevo has joined #ruby
rudisimo has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
testcore has joined #ruby
fabrice31 has quit [Ping timeout: 255 seconds]
anaeem1 has joined #ruby
rshetty has joined #ruby
kumarat9pm has joined #ruby
flori has quit [Ping timeout: 245 seconds]
flori has joined #ruby
techsethi has joined #ruby
gsd has joined #ruby
arescorpio has quit [Excess Flood]
takitakitaki has quit [Quit: Leaving]
Techguy305|2 has quit [Remote host closed the connection]
rudisimo has quit [Remote host closed the connection]
jgrevich has quit [Read error: No route to host]
klmlfl has quit [Remote host closed the connection]
poweratom_ has joined #ruby
aspires has quit []
cirn0 has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cirn0 has quit [Client Quit]
corehook has quit [Ping timeout: 258 seconds]
luckyruby has quit [Remote host closed the connection]
corehook has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
aspires has joined #ruby
kp666 has joined #ruby
jenrzzz has joined #ruby
MattB2 has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 255 seconds]
mary5030 has quit [Remote host closed the connection]
chipotle has joined #ruby
St1gma has quit [Read error: Connection reset by peer]
sumark has quit [Remote host closed the connection]
sumark has joined #ruby
nfk has quit [Quit: yawn]
techsethi has joined #ruby
koderok has quit [Quit: koderok]
i0n has joined #ruby
hiyosi has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
x77686d has quit [Quit: x77686d]
fgo has quit [Quit: WeeChat 1.0]
sinequanon has joined #ruby
jlast has joined #ruby
josephndenton has quit [Ping timeout: 255 seconds]
hiyosi has quit [Ping timeout: 265 seconds]
BTRE has quit [Quit: Leaving]
BTRE has joined #ruby
<dkphenom>
i have hash of arrays like this: entries = {"First, Last"=>["(954) 555-1234, (cell)", "(954) 727-1895, (work)"]}, how can I update the (work) contact within the array of the hash?
razieliyo_ has quit [Quit: Saliendo]
pengin has joined #ruby
tlarevo has quit [Ping timeout: 264 seconds]
jlast has quit [Ping timeout: 258 seconds]
tlarevo has joined #ruby
adriancb has joined #ruby
siwica has joined #ruby
siwica has quit [Remote host closed the connection]
oo_ has joined #ruby
ferr has quit [Remote host closed the connection]
aspires has quit []
Abhijit has joined #ruby
adriancb has quit [Ping timeout: 240 seconds]
aspiers has joined #ruby
techsethi has quit [Quit: techsethi]
Photism has quit [Quit: Leaving]
<zenspider>
dkphenom: how would you update it if it were just a string?
Cache_Money has quit [Quit: Cache_Money]
<dkphenom>
zenspider can I pm you?
<zenspider>
no
<BraddPitt>
dkphenom you can use regex (which you have to, since its one long string)
<BraddPitt>
but it would be better to do some data massaging before you put it into the hash
<BraddPitt>
will cause much fewer headaches later on
pengin has quit [Remote host closed the connection]
tlarevo has quit [Ping timeout: 240 seconds]
<dkphenom>
why do I need to regex it? i could fetch the entries based on the contact (work or cell), then map it? im just confused by the hash of arrays notation....
<BraddPitt>
"(954) 727-1895, (work)"
<zenspider>
again, how would you update it if it were just a string?
<BraddPitt>
do you want to maintain the (work) bit of the string?
<dkphenom>
string = "blah blah"
<dkphenom>
but i dont see hwo that applies, im having problem knowing how to chain select the name withinin the hash and the appropriate element of the array so that I can then assign to it
<BraddPitt>
entries["First, Last"][0]
<BraddPitt>
will return "(954) 555-1234, (cell)
<BraddPitt>
missed a closing quote but you get the idea
<BraddPitt>
entries["First, Last"][1] will return "(954) 727-1895, (work)"
_5kg has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
duncannz has quit [Ping timeout: 265 seconds]
mleung has joined #ruby
Channel6 has quit [Quit: Leaving]
Lingos_ has joined #ruby
mleung has quit [Client Quit]
havenwood has joined #ruby
<zenspider>
dkphenom: that's not updating a string. that's setting a variable
duncannz has joined #ruby
<dkphenom>
if string is some string, thats how I would update it
<gr33n7007h>
something like this maybe: entries.map {|k,v| v[-1] = "updated" }
deject3d_ has joined #ruby
NoNMaDDeN has quit [Remote host closed the connection]
Lingos_ has quit [Ping timeout: 255 seconds]
xymbol has quit [Quit: Be back later ...]
avrc has quit [Quit: this channel is bakas]
<dkphenom>
hmmm
<dkphenom>
so i need the index of the element in the array
<dkphenom>
can't just select based on value
ZaRDaK has quit [Read error: Connection reset by peer]
omosoj has joined #ruby
<BraddPitt>
you have no values, they are array elements
<BraddPitt>
all you have are indices
<BraddPitt>
hence why i suggested to massage the data into a more "proper" hash format
xymbol has joined #ruby
fedexo has quit [Ping timeout: 244 seconds]
Techguy305 has quit [Ping timeout: 255 seconds]
jdj_dk has quit [Ping timeout: 256 seconds]
fabrice31 has joined #ruby
ARCADIVS has joined #ruby
jlast has joined #ruby
corehook has quit [Remote host closed the connection]
parzzix has quit [Read error: Connection reset by peer]
poweratom_ has joined #ruby
fabrice31 has quit [Ping timeout: 245 seconds]
i0n has quit [Quit: snooze]
it0a has quit [Quit: WeeChat 1.0.1]
techsethi has joined #ruby
Techguy305 has joined #ruby
<dkphenom>
why can't i just do entries[name].index(value) = new_value
St1gma has quit [Read error: Connection reset by peer]
St1gma has joined #ruby
jlast has quit [Ping timeout: 240 seconds]
<gr33n7007h>
dkphenom, does this work "string" = "new string"
<dkphenom>
no
<dkphenom>
im confused sigh
SweetSweetCandy has joined #ruby
siso has quit [Ping timeout: 272 seconds]
St1gma has quit [Read error: Connection reset by peer]
St1gma has joined #ruby
SweetSweetCandy has quit [Remote host closed the connection]
byprdct has quit [Quit: by]
parzzix has joined #ruby
corehook has joined #ruby
vimer has joined #ruby
kireevco has joined #ruby
<gr33n7007h>
dkphenom, entries[name].index(value) that just return an integer
<gr33n7007h>
so doing 2 = new_value is not going to work
t_mmyv has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Avahey has quit [Quit: Connection closed for inactivity]
unshadow has joined #ruby
bMalum has quit [Quit: bMalum]
<shevy>
hey godd2
<shevy>
what will be your next game?
lxsameer has quit [Ping timeout: 255 seconds]
<unshadow>
What is the right way to perform multilpe test on a veriable, lets say I have this string = "Today is a nice day", now I want to do something like this: if string.match(/Today/) do this; end; if string.match(/nice/) do this also; end
<godd2>
unshadow do you want both outcomes to happen, or only the first one that matches?
<tobiasvl>
neither will elsif
<unshadow>
both
<godd2>
yea then just do separate if statements
<unshadow>
no better way ?
Mia has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
<godd2>
the if statement already *is* the better way
<godd2>
unless youd rather dabble in lower level syntax
<unshadow>
lower level syntex ?
ctp has joined #ruby
<godd2>
unshadow i mean coding in a different language like C
<unshadow>
oh... I see, no thanks XD
<godd2>
without know much more about your problem though, we cant offer a good solution.
hiyosi has joined #ruby
<godd2>
It might turn out you should create a new class or it might turn out you just need a couple if statements
<unshadow>
I think you got my problem, it was just that in ruby I usually except everything to be very nicely coded, and a few if-end one after another just looks silly
AlexRussia has quit [Ping timeout: 255 seconds]
livathinos has quit [Ping timeout: 258 seconds]
<unshadow>
but thats what i'll do
<godd2>
well if you want, put some sample code in a gist for one of us to look at
BTRE has quit [Read error: Connection reset by peer]
<godd2>
unshadow yea separate if statements is fine since youre doing two logically different things. i.e. in one you're colorizing renegotiation, and in the other you're colorizing crime
AlexRussia has joined #ruby
<unshadow>
godd2, ok , cool :)
<godd2>
I mean, yes there's probably room for some abstraction here, but as long as this works it looks okay
lxsameer has quit [Quit: Leaving]
elaptics`away is now known as elaptics
matcouto has joined #ruby
<godd2>
shevy L)
<godd2>
:)*
techsethi has joined #ruby
Guest6439 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_5kg has quit [Ping timeout: 256 seconds]
sigurding has joined #ruby
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
<shevy>
I have to read up on audio theory before I can even understand anything
<shevy>
all I know... the higher the frequency, the faster it swings right?
spastorino has joined #ruby
kevinxu has joined #ruby
<godd2>
and it dont mean a thing if it aint got that swing
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alex88 has joined #ruby
kevinxu is now known as Guest90344
joonty has joined #ruby
ctp has joined #ruby
olivier_bK has joined #ruby
ixti has joined #ruby
kumarat9pm has quit [Ping timeout: 240 seconds]
ChoiKyuSang has joined #ruby
duncannz has quit [Remote host closed the connection]
mkrank has joined #ruby
AliRezaTaleghani has joined #ruby
Olivertynes has joined #ruby
RitterJack has quit [Ping timeout: 245 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
<zenspider>
all the midi libs have either fallen into disrepair or suck
bergelmir has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Client Quit]
giuseppesolinas has joined #ruby
<zenspider>
I was hacking with dean hudson and he got me hooked up doing CoreAudio on osx, so then I just generated notes via sine waves and a lookup table
<zenspider>
but it was tedious and felt wrong
<bergelmir>
can someone tell me how to do a "curl -4 <host>" (resolve only ipv4 addresses) with net::http?
<zenspider>
tho he did use my code to hook it up to an ipad keyboard for remote playing
<godd2>
zenspider lookup tables is the way to go for pcm.
hmsimha_ has quit [Ping timeout: 255 seconds]
<zenspider>
my code was shite. and/or coreaudio had some jitter
<zenspider>
I tend to believe it was my code until proven otherwise :)
teddyp1cker has quit [Ping timeout: 256 seconds]
wolflee has quit [Quit: (null)]
elcheckito has joined #ruby
RitterJack has joined #ruby
narcan has joined #ruby
Juanchito has joined #ruby
<godd2>
I do need to learn CoreAudio. I have integration of windows multimedia and ALSA on linux, but hopefully I'll get the core of my gem to a point where someone can code their own interface :P
wolflee has joined #ruby
jheg has joined #ruby
mikepack has joined #ruby
<zenspider>
ok. I should sleep
<zenspider>
far too early, but the conf demands
bMalum has quit [Ping timeout: 244 seconds]
neoxquick has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
omosoj has quit [Ping timeout: 264 seconds]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
BTRE has joined #ruby
corehook has quit [Remote host closed the connection]
corehook has joined #ruby
corehook has quit [Remote host closed the connection]
cek has joined #ruby
elcheckito has quit [Ping timeout: 264 seconds]
<cek>
how do i set a future breakpoint in byebug?
mikepack has quit [Ping timeout: 272 seconds]
d4nku has joined #ruby
rylev has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cek>
oh, seems supplying full path is enough
thsig has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
thsig_ has joined #ruby
narcan has joined #ruby
<olivier_bK>
hy all
d4nku has quit [Ping timeout: 256 seconds]
hmsimha_ has joined #ruby
iinzg has quit [Read error: Connection reset by peer]
elcheckito has joined #ruby
thsig has quit [Read error: Connection reset by peer]
BTRE has quit [Quit: Leaving]
AlSquire has joined #ruby
BTRE has joined #ruby
cassianoleal has joined #ruby
iinzg has joined #ruby
BTRE has quit [Client Quit]
AlSquire has quit [Client Quit]
iinzg has quit [Read error: Connection reset by peer]
<cek>
hmm, it still outputs 2 empty lines
cek has left #ruby [#ruby]
iinzg has joined #ruby
St1gma has quit [Read error: Connection reset by peer]
St1gma has joined #ruby
nagaraj has joined #ruby
iinzg has quit [Max SendQ exceeded]
t_p has quit [Quit: Computer has gone to sleep.]
_5kg has joined #ruby
rdark_ has joined #ruby
iinzg has joined #ruby
Spami has joined #ruby
rdark has quit [Ping timeout: 245 seconds]
govg has quit [Quit: leaving]
iinzg has quit [Read error: Connection reset by peer]
<Duckily>
anyone know why rails might be rendering json inside of html template? its a failrly new app but let me know if you would like something pastied
razieliyo has joined #ruby
razieliyo has joined #ruby
<apeiros>
Duckily: #rubyonrails
<Duckily>
whoops sorry wrong channel
<Duckily>
stupid irc client
Takle has quit [Remote host closed the connection]
<jackmanarakat>
has anyone been to a programming bootcamp?
d4nku has joined #ruby
dangerousdave has joined #ruby
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
<mnemon>
jackmanarakat: what's that?
<jackmanarakat>
what do you mean mnemon
<mnemon>
what is a programming bootcamp?
<mnemon>
what do you do there etc.
Takle has joined #ruby
<Abhijit>
where boots are thrown at programmers who dont program good.
<mnemon>
:)
<jackmanarakat>
mnemon: it's a super intensive 12 week rails course
<jackmanarakat>
by some divine miracle i managed to get accepted
<jackmanarakat>
but i don't feel like i'm ready because i cheated on the homework
<jackmanarakat>
by looking at the answers
<jackmanarakat>
:(
reinaldob has quit [Remote host closed the connection]
stef204 has joined #ruby
ldnunes has joined #ruby
davidhq has joined #ruby
vimer has quit [Quit: leaving]
havenwood has quit [Remote host closed the connection]
ctp has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ctp has quit [Client Quit]
tkuchiki has joined #ruby
reinaldob has joined #ruby
codecop has joined #ruby
hanmac1 has joined #ruby
thsig has joined #ruby
NoNMaDDeN has quit [Remote host closed the connection]
tvw has joined #ruby
St1gma has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
St1gma has joined #ruby
<jmdade>
jackmanarakat: I did one many years ago. Just make sure you get the pre-reading done and expect 12 very long hard weeks. You'll be fine then.
tkuchiki has quit [Ping timeout: 250 seconds]
<jackmanarakat>
jmdade: i cheated on the prereading
<jackmanarakat>
actually i have an assignment due today and i am cheating on it :(
<jmdade>
I hope your tutors aren't in here then ;)
<jackmanarakat>
i did manage to get some things right by myself, do you think i'm not cut out to be a programmer?
<jmdade>
I think you should put the effort into catching up. Maybe 'fess up to the tutors and see if they can help you catch up? I don't see why you'd be any less a programmer for this, but a good grounding will help you be successful.
hiyosi has joined #ruby
tokik has quit [Ping timeout: 240 seconds]
<jackmanarakat>
jmdade: the bootcamp hasn't started yet, it's just the required readings and prepwork that i'm cheating on now
<jmdade>
In my opinion you are only cheating yourself there. It'll make the actual camp much harder than you need it to be.
st1gma1 has joined #ruby
St1gma has quit [Read error: Connection reset by peer]
<jackmanarakat>
oh boy... it's not that i want to cheat, it's that i don't understand how it's done
<jackmanarakat>
so i take a peek and memorize the solution
<jackmanarakat>
maybe that's a terrible approach
rshetty has joined #ruby
<jmdade>
This is probably too off topic for this channel, PM me.
<jackmanarakat>
thank you
<workmad3>
jackmanarakat: that's how most people start learning... but it's important to not just memorize solutions but to actually figure them out once you've looked at it
Macaveli has quit [Ping timeout: 255 seconds]
mikecmpbll has joined #ruby
<jackmanarakat>
workmad3: a few things i do not understand when i looked up the answers, but i did for others
tlarevo has joined #ruby
st1gma1 has quit [Read error: Connection reset by peer]
hiyosi has quit [Ping timeout: 272 seconds]
st1gma1 has joined #ruby
<ccooke>
jackmanarakat: Chances are, you won't be the only person who looked at the answers to get in. Try going through them and trying to work out *why* the solutions work
<ccooke>
then see if you can find similar problems to solve online
<jheg>
o/
<jackmanarakat>
wow thank you
<ccooke>
jackmanarakat: that doesn't mean it's a good thing to do, because you *will* have made it harder for yourself
jackmanarakat_ has joined #ruby
<jackmanarakat_>
ccooke: i hope you're right about me not being the only one that's cheating
<jackmanarakat_>
hello???
<ccooke>
jackmanarakat_: I'm at work :-)
eka has joined #ruby
<jackmanarakat_>
oh sorry guys
<ccooke>
currently about to join a conference call
<jackmanarakat_>
something is wrong with my connection
<jheg>
trying to better understand getts and setters and something im not sure of is how these two bits of code really differ as they both seem to do the same .. https://gist.github.com/jheg/61e2961150e564d92ca3
<jheg>
*getters
jackmanarakat has quit [Ping timeout: 246 seconds]
n008f4g_ has quit [Ping timeout: 245 seconds]
<jackmanarakat_>
jheg: that's what i don't like about ruby, the semantics are not beginner friendly
<ccooke>
jackmanarakat_: Good luck. I'm unlikely to be aroundd now. Moving a datacentre.
<jackmanarakat_>
there are far too many ways to do the same thing which to me is very confusing
mathias2 has quit [Ping timeout: 240 seconds]
<jheg>
I’m not so sure - I think it’s very beignner friendly
<jackmanarakat_>
ccooke: i wish you the best of luck!
<jheg>
v easy to read compared to other languages I’ve seen :)
<cek>
you'll never find the best way, just do the work
<jackmanarakat_>
this is a very simple example
<jackmanarakat_>
it's not the best example but i think you'll get the point
fgo has joined #ruby
samflores has left #ruby [#ruby]
<hanmac1>
jheg: obj.name= value always return value, only obj.send(:name=, value) MIGHT return something different
<jheg>
jackmanarakat_: sorry what does that example illustrate?
st1gma1 has quit [Read error: Connection reset by peer]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
st1gma1 has joined #ruby
<jackmanarakat_>
jheg: the complexity of the ruby language
<jackmanarakat_>
you can do things more than one way
<jackmanarakat_>
which is very confusing to me
Bira has joined #ruby
<jheg>
hanmac1: thanks
dangerousdave has quit [Ping timeout: 244 seconds]
<jheg>
jackmanarakat_: those two examples just look like you’ve given your vars different names though?
<apeiros>
jackmanarakat_: doesn't mean you have to learn all the ways at once
<jackmanarakat_>
well it's a terrible example
<jheg>
:)
<jackmanarakat_>
but i hate how there is more than one way of doing it
<jackmanarakat_>
if vs when while vs until and so on
<jheg>
imagine if there wasn’t that would be worse
<jackmanarakat_>
:(
arup_r has joined #ruby
jlast has joined #ruby
airdeluxe has quit [Ping timeout: 250 seconds]
spyderman4g63 has joined #ruby
<apeiros>
jackmanarakat_: maybe look into python then. they pride themselves with having "the one way"
nfk has joined #ruby
<jackmanarakat_>
apeiros: well i have to learn ruby for rails and i like the syntax of ruby much better
<jheg>
where you learning jackmanarakat_ ?
shemerey has joined #ruby
<jackmanarakat_>
i'm going to be going to a bootcamp which i feel totally unprepared for
<arup_r>
I have series of items wc:product:meta:b06a053f31c8b737e5c93c1d8c, wc:product:b06a053f31c8b737e5c93c1d8c , wc:product:b06a053f31c8b737e5c93c1d8c .... Where I want to filter only values where **meta** is not present..using Regex. How to do so ?
<jheg>
class based or online?
<jheg>
i’m currently doing an online one hence my interest
<arup_r>
I tried \Awc:product: ... But it is not correcr'
spyderman4g63 has quit [Client Quit]
<jheg>
in fact having spent the past couple of months doing one day a week and the occasional evening i’ve taken 3 months off work starting today to get stuck into the online one im doing
jdj_dk has joined #ruby
<hanmac1>
arup_r: huch what kind of fomat is that?
<arup_r>
It is a id number
<jackmanarakat_>
jheg: it's live :)
<jackmanarakat_>
i'm flying there in a few weeks
<jheg>
hanmac1: Would I be correct in saying that the first example in my code is a setter method but the second is not?
<jheg>
nice one
shemerey has quit [Client Quit]
<jheg>
live would have been my first choice but the cost was 5 to 10 times that of an online solution and plus it would have been too much time away from gf and kids :(
t_mmyv has joined #ruby
<arup_r>
hanmac1: I want to filter only where meta is not present in the number
Guest2671 has quit [Quit: This computer has gone to sleep]
mathias2 has joined #ruby
jeanlinux has quit [Remote host closed the connection]
<hanmac1>
jheg: hm yes and no ... ruby does not have extra "setter methods" ... only the parser does return always val when the function is called as obj.name = val .... like as i said if you call the function with send it does not always return val
fabrice31 has quit [Remote host closed the connection]
<zmyrgel>
mainly interested on what application server to use
<zmyrgel>
preferable something that I can deploy on Centos7 and Windows so I can devel on my laptop and deploy to our Windows box
unclouded has joined #ruby
Takle has quit [Remote host closed the connection]
cleopatra has quit [Ping timeout: 272 seconds]
Axy has quit [Read error: Connection reset by peer]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
narcan has joined #ruby
techsethi has quit [Quit: techsethi]
<jheg>
should attr_* only be used when you ONLY need to either return the instance variable or set the instance variable but anything else the method should be written into the class seperately?
nagaraj has quit [Ping timeout: 255 seconds]
<jheg>
for example if as part of an objects instantiation a code is assigned to @special_code but at no point would I want that info to be read I should create a method that hides part of the @special_code rather than using attr_*
toertore has joined #ruby
<jhass>
jheg: attr_reader :foo is a shortcut to writing def foo; @foo; end;. attr_writer :foo is a shortcut to writing def foo=(v); @foo = v; end; attr_accessor is a shortcut to writing attr_reader :foo; attr_writer :foo; That's all there is to it
phutchins has joined #ruby
nagaraj has joined #ruby
jlast has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
mkaesz has quit [Ping timeout: 240 seconds]
agit0 has joined #ruby
tlarevo has quit [Ping timeout: 265 seconds]
Takle has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
sprihodko has quit [Quit: (null)]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tgandrews has quit [Quit: tgandrews]
ndrei has joined #ruby
jackmanarakat_ has quit [Quit: Page closed]
Mateon2 is now known as Mateon1
agjacome has quit [Quit: leaving]
agjacome has joined #ruby
agjacome has quit [Client Quit]
Takle_ has joined #ruby
tkuchiki has joined #ruby
Takle has quit [Read error: Connection reset by peer]
<jheg>
thanks jhass I was kind of hoping that would be the reply :)
jlast has quit [Ping timeout: 258 seconds]
tvw has quit []
tvw has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
hiyosi has joined #ruby
nagaraj has quit [Quit: nagaraj]
mathias2 has quit [Read error: Connection reset by peer]
mathias3 has joined #ruby
arup_r has quit [Remote host closed the connection]
maasha has joined #ruby
<maasha>
Converting numbers into string string representation of equal length with leading zeros:
<maasha>
"%05b" % 690
<maasha>
-> "1010110010", however,
hiyosi has quit [Ping timeout: 240 seconds]
<maasha>
oh, sod it.
AliRezaTaleghani has quit [Ping timeout: 245 seconds]
corehook has quit [Remote host closed the connection]
<apeiros>
was that a question?
<maasha>
"%10b" % 156 -> " 10011100" where is my leading zeros?
wpp has joined #ruby
<apeiros>
you didn't specify you wanted leading zeros
<jheg>
easier to reference it then as well I suppose right?
c0def00d has joined #ruby
c0def00d has quit [Client Quit]
<jheg>
ssn[-1]
<gerep>
Hi all. I'm using system('serf agent') to run my serf instance. $? should return this "serf aget" pid?
blackmesa has quit [Ping timeout: 272 seconds]
<godd2>
that's my thinking. but of course, there are many ways to do it
mmozuras has joined #ruby
vimer has quit [Quit: leaving]
<godd2>
jheg or better yet, @ssn.last
<jhass>
gerep: yes
<jhass>
unless it double forks or something like that
vt102 has joined #ruby
<jheg>
cool ta
<gerep>
Because when I try to get the PID is returns a different number, always one lower like $?.id = 20210, ps aux | grep serf = 20211
<mostlybadfly>
Good morning all
doodlehaus has joined #ruby
<jhass>
gerep: does it daemonize?
<ta>
jheg: thanks
<jheg>
lol
<gerep>
jhass: I'm running it like this: `serf agent -rpc-addr=127.0.0.1:8087 >/dev/null 2>&1`
<jhass>
gerep: consider using Kernel#spawn for that behavior
<gerep>
jhass: otherwise it would stop in the serf process
paulfm has joined #ruby
<workmad3>
jheg: I'd expect it does... otherwise the system call would block until it had finished :)
<gerep>
jhass: ok, thanks a lot :)
echooo1 has quit [Quit: echooo1]
govg has joined #ruby
<workmad3>
*jhass ^^ (sorry jheg)
<jhass>
gerep: this way you spawn a shell and I guess you get the pid of that one
paulfm has quit [Client Quit]
<godd2>
jheg If I saw the code "xxx-xx-#{@ssn.last}" it would be much easier to read
<gerep>
jhass: ok, I'm reading about it now =)
tlarevo has quit []
dj_zubehoer has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<jheg>
very true
NoNMaDDeN has joined #ruby
<gerep>
jhass: still different pid :(
Rx_o has joined #ruby
<jhass>
are you sure it doesn't fork?
ThaDick has joined #ruby
<jhass>
or do you still do the >/dev/null ?
<godd2>
jheg of course, the tradeoff here is that if you want to display the entire social, you have to reconstruct it, but the solution there is to make a class for SSN that does that sort of stuff for you. as I said, its a design decision.
kumarat9pm has quit [Read error: Connection reset by peer]
kumarat9pm has joined #ruby
rudisimo has quit [Remote host closed the connection]
decoponio has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rkalfane has joined #ruby
rippa has joined #ruby
sorpaas_ has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
BlackGea_ has quit [Quit: ZZZzzz…]
dANO has joined #ruby
klmlfl has joined #ruby
einarj has quit [Remote host closed the connection]
Kricir has joined #ruby
sambao21 has joined #ruby
iamjarvo has joined #ruby
unclouded has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
tagrudev has quit [Remote host closed the connection]
ghr has quit [Read error: No route to host]
moritzs has joined #ruby
ghr has joined #ruby
wm3|away has quit [Ping timeout: 258 seconds]
<shevy>
godd2 yeah
corehook has quit [Remote host closed the connection]
glaksmono has quit [Quit: This computer has gone to sleep]
glaksmono has joined #ruby
<godd2>
shevy then it looks like there is demand for this. I'll do more work on this gem so there can be reading and writing to wav files: https://github.com/RSMP/riffy
AFKGeek has quit [Quit: Fades into the shadows]
stef204 has joined #ruby
aaronrl has joined #ruby
<shevy>
\o/
<shevy>
apeiros wrote it all in a single (!) .rb file back then
<shevy>
"Flanders (Belgium) hosts a number of criteriums, as does the Netherlands"
<shevy>
sometimes I can't believe Wikipedia is serious
tjsousa has joined #ruby
<shevy>
In german the singular word is "Kriterium", the plural is "die Kriterien"; apparently english deviates from this ... singular: criterion, plural: criteria
timonv_ has quit [Remote host closed the connection]
rikai has joined #ruby
rismoney1 has joined #ruby
ramfjord has joined #ruby
geggam has joined #ruby
narph has joined #ruby
tier has joined #ruby
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
mg^ has quit [Quit: Leaving]
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
michaeldeol has joined #ruby
anaeem1 has joined #ruby
mistermocha has joined #ruby
<s2013>
im trying to divide elements of an array into 5 buckets as evenly as possible.
tesaf has joined #ruby
<s2013>
what would be the most efficient way? i cant seem to skip sorting it
waxjar has joined #ruby
agit0 has quit [Quit: Leaving]
rjl has quit [Ping timeout: 258 seconds]
havenwood has quit [Ping timeout: 250 seconds]
St1gma has quit [Read error: Connection reset by peer]
DaniG2k has joined #ruby
<ericwood>
depends on what the criteria is for the buckets
St1gma has joined #ruby
unclouded has quit [Ping timeout: 272 seconds]
<s2013>
basically if you had 15 numbers lets say.. youd put them in 5 buckets.. so 3 numbers in each bucket.. but the buckets are the bottom 20, next 40, etc..
<Way-n-e>
is one way to open /create IO in file or memory?
<jhass>
does StringIO do what you want?
deric_skibotn has joined #ruby
<Way-n-e>
jhass: for memory yes, but sometimes i need write my stream to file
Hanmac has quit [Ping timeout: 265 seconds]
mleung has joined #ruby
i0n has quit [Quit: snooze]
<Way-n-e>
is IO.sysopen is IO.memopen?
troyready has joined #ruby
teddyp1cker has joined #ruby
<Way-n-e>
or other way?
jdj_dk has quit [Remote host closed the connection]
Fire-Dragon-DoL has joined #ruby
bubu_aa has quit [Ping timeout: 246 seconds]
<pizzahead>
I'm using net:http to make web requests and I'm trying to add a rescue for 500 errors but I must be doing it wrong. i've tried rescue, rescue exceptions and then I tried this but it didn't help http://tammersaleh.com/posts/rescuing-net-http-exceptions/
<jhass>
StringIO and File both include IO, can't you just conditonalize the creation?
<jhass>
Way-n-e: ^
Cyberheb has quit [Quit: Computer has gone to sleep.]
<jhass>
pizzahead: "didn't help"
oculus has joined #ruby
<jhass>
I'm sure you can describe your problem better than that
<Way-n-e>
jhass: ok, where is example IO ?
<pizzahead>
jhass: it never hit the rescue
<Way-n-e>
tutorial?
<jhass>
Way-n-e: I thought you already know how to open a File?
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Way-n-e>
how write in binmode 10 bytes ti IO
<jhass>
pizzahead: code & error message / actual behavior vs. expected behavior
mistermocha has quit [Remote host closed the connection]
<pizzahead>
jhass: I have an API that randomly throws 500 internal server errors. I'm assuming that it's not really being treated by net::http as a real exception so it would never hit the rescue block?
<jhass>
pizzahead: show code
<jhass>
& error message it produces
<Way-n-e>
jhass: some data are in file sored, some is simple a string
<jhass>
let's try godd2's method
<jhass>
Way-n-e: why?
<Way-n-e>
for example 'file:test.txt' -encodingbase64-> stream.mem print -> 'file:out.txt'
sigurding has quit [Quit: sigurding]
<Way-n-e>
do You know what is BIO in OpenSSl?
Avahey has joined #ruby
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
pizzahead: but yes, I don't think it throws an exception
vectra has quit [Ping timeout: 265 seconds]
byprdct_ has joined #ruby
RitterJack has quit [Remote host closed the connection]
<jhass>
Way-n-e: no. What is it?
<jhass>
my openssl manpage doesn't contain that string
moritzs has quit [Ping timeout: 264 seconds]
<Way-n-e>
streams ;-) cascaded streams with filter
Soda has joined #ruby
Timgauthier has joined #ruby
bricker`work has joined #ruby
<jhass>
I still don't get what your actual problem is
RandyT has joined #ruby
mleung has quit [Quit: mleung]
nkumari has joined #ruby
<jhass>
you only describe some vague solution you ultimately want without showing that you did any kind of serious research or experimentation
byprdct has quit [Ping timeout: 264 seconds]
jheg has quit [Quit: jheg]
<jhass>
sounds like you want to retrofit something you saw somewhere onto your actual problem
Hanmac has joined #ruby
last_staff has quit [Quit: last_staff]
ozialien_ has quit [Read error: Connection reset by peer]
<pizzahead>
jhass: I have it connecting to hamms which is throwing whatever error I specify in status. This is stripped down from my script that was getting 500's every so often against an API I'm trying to get data from.
tier_ has joined #ruby
atomical has joined #ruby
despai has joined #ruby
<jhass>
and what's your problem?
<pizzahead>
jhass: it skips the rescue block and ends
whatasunnyday has joined #ruby
<jhass>
it skips line 8 too?
whatasunnyday has quit [Client Quit]
gregoriokusows-1 has joined #ruby
momomomomo has joined #ruby
<pizzahead>
jhass: #<Net::HTTPInternalServerError 500 INTERNAL SERVER ERROR readbody=true>
Ulrike_Rayne has quit [Ping timeout: 244 seconds]
gregoriokusowski has quit [Ping timeout: 250 seconds]
<pizzahead>
jhass: must not be a real exception to net::http?
<jhass>
no
<jhass>
HTTPInternalServerError is a subclass of HTTPResponse
adriancb has quit [Remote host closed the connection]
nkumari has quit [Remote host closed the connection]
tier has quit [Ping timeout: 272 seconds]
x1337807x has joined #ruby
ZaRDaK has joined #ruby
jshultz has joined #ruby
clauswitt has joined #ruby
ndrei has joined #ruby
sailias has quit [Quit: Leaving.]
visof has quit [Ping timeout: 272 seconds]
sailias has joined #ruby
visof has joined #ruby
econerd4ever has joined #ruby
Eiam has joined #ruby
ringarin has joined #ruby
olivier_bK has joined #ruby
az7ar has joined #ruby
hiyosi has quit [Ping timeout: 265 seconds]
entrenador has joined #ruby
oo_ has joined #ruby
baweaver has joined #ruby
wallerdev has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
benzrf|offline is now known as benzrf
larissa has quit [Quit: Leaving]
tgandrews has quit [Quit: tgandrews]
fabrice31 has joined #ruby
sdwrage has joined #ruby
oo_ has quit [Ping timeout: 250 seconds]
wm3|away has quit [Ping timeout: 258 seconds]
sigurding has joined #ruby
nkumari has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
fabrice31 has quit [Ping timeout: 245 seconds]
renderful has quit [Remote host closed the connection]
visof has quit [Ping timeout: 256 seconds]
despai has joined #ruby
Ulrike_Rayne has joined #ruby
<Timgauthier>
so shevy my favourite PHP based CMS updated
kyb3r_ has joined #ruby
<Timgauthier>
they're removing logic from the templates and putting them in controlloers now! :D
<Timgauthier>
next step, convert to ruby! :P
sdwrage has quit [Quit: This computer has gone to sleep]
m8 has joined #ruby
mkaesz has quit [Ping timeout: 255 seconds]
bahar has quit [Ping timeout: 255 seconds]
Hobogrammer has joined #ruby
moritzs has joined #ruby
SCHAAP137 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bahar has joined #ruby
treehug88 has quit [Read error: Connection reset by peer]
mkaesz has joined #ruby
sarmiena_ has joined #ruby
treehug88 has joined #ruby
sdwrage has joined #ruby
bluOxigen has quit [Ping timeout: 250 seconds]
oculus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhwhite has quit [Ping timeout: 245 seconds]
kireevco has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
zacstewart has quit [Remote host closed the connection]
adriancb has joined #ruby
Ulrike_Rayne has quit [Ping timeout: 244 seconds]
mkaesz has quit [Remote host closed the connection]
WillAmes has quit [Remote host closed the connection]
JakePee has quit [Read error: Connection reset by peer]
WillAmes has joined #ruby
Ulrike_Rayne has joined #ruby
corehook has quit [Remote host closed the connection]
whoisjake has joined #ruby
az7ar is now known as az7ar_away
<apeiros_>
Timgauthier: wow… that logic does not belong into templates was common knowledge even back when I still did php
oculus has joined #ruby
<apeiros_>
and it took them *this* long to figure?
kireevco has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
ThaDick_ has joined #ruby
kireevco has joined #ruby
<havenwood>
pipework: Ruby 3.0 \o/
ThaDick has quit [Ping timeout: 265 seconds]
ThaDick_ is now known as ThaDick
oculus has quit [Client Quit]
<havenwood>
llvm jit and static typing, brave new world
oculus has joined #ruby
vimer has joined #ruby
timonv_ has quit [Ping timeout: 245 seconds]
dkphenom has joined #ruby
aclearman037 has quit [Quit: I'm out!]
magic_ has quit [Read error: Connection reset by peer]
<havenwood>
we should have a #ruby birds of a feather :)
tier_ has quit [Ping timeout: 272 seconds]
arup_r has quit [Ping timeout: 244 seconds]
tier has joined #ruby
<Timgauthier>
apeiros_ they originally didn't expect people to put logic in the templates, but to use templates, but that ended up not making much sense, so they rewrote the software for version 2 and so now kirbycms has controllers for logic
entrenador has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aclearman037 has joined #ruby
<apeiros_>
havenwood: lünk?
<havenwood>
keynote isn't over yet, hmm
<shevy>
Timgauthier they are crazy
jimbach has quit [Remote host closed the connection]
<havenwood>
apeiros_: matz said there'd be concurrency, but didn't talk about details
<Timgauthier>
indeed
spyderman4g63 has joined #ruby
<shevy>
Timgauthier you poor man - married now but still having to write PHP for a living
<shevy>
:>
<havenwood>
apeiros_: for jit just suggested llvm was possible
<apeiros_>
havenwood: o0
spider-mario has joined #ruby
<havenwood>
apeiros_: and optional static typing, said it's better than comments
<apeiros_>
concurrency? we already have that. did he mean removal of GIL?
<Timgauthier>
shevy i wish i was making a living at it :(
mikecmpbll has joined #ruby
oculus has quit [Ping timeout: 264 seconds]
<havenwood>
apeiros_: yeah, buh bye GVL
renderful has joined #ruby
rudisimo has quit [Remote host closed the connection]
<havenwood>
apeiros_: but not sure how yet
<apeiros_>
what conf?
<havenwood>
apeiros_: RubyConf
<apeiros_>
damn. haven't been at a single conf for 2 years now
<apeiros_>
this sucks :(
entrenador has joined #ruby
tier has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
<havenwood>
apeiros_: go next year!
Way-n-e has left #ruby [#ruby]
sigurding has quit [Read error: Connection reset by peer]
<apeiros_>
:-S
<havenwood>
he's talking about how static typing and duck typing now
tier has joined #ruby
<havenwood>
mentioning Typescript
mikepack has quit [Remote host closed the connection]
nkumari has quit [Remote host closed the connection]
<Xeago_>
apeiros_: if you know a conf you're going to, mention it to me please :>
<havenwood>
apeiros_: release for 3.0 to be released within the next one to ten years, hehe
<Xeago_>
I was hoping to attend this years velocity in barcelona
clauswit_ has joined #ruby
<banister>
Xeago_ hoi, hoe gaat het Meneer?
St_Marx has quit [Quit: Ex-Chat]
<apeiros_>
Xeago_: sure. same thing back :D
entrenador has quit [Client Quit]
lolmaus has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
<robertt_dex>
shevy: you can see how he create several "files" under it
TeresaP has joined #ruby
momomomomo has quit [Quit: momomomomo]
<robertt_dex>
s2013: __END__ will requiere a parser if you plan to have several file using it. Ruby will just parse the __END__ content of the first file.
AlSquire has quit [Quit: This computer has gone to sleep]
mary5030 has quit [Remote host closed the connection]
<shevy>
huh wait
<shevy>
ruby will not read the second __END__ right?
<robertt_dex>
no it wont
<robertt_dex>
just the file that gets called by the ruby bin
<shevy>
ah but the example there uses only one __END__
<rpag_>
isn't DATA just scoped to whatever file you're in?
<robertt_dex>
the rest of them will be ignored
<robertt_dex>
no it's not
hiyosi has joined #ruby
<robertt_dex>
required files wont get parsed
baweaver has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
<eam>
hm, ruby doesn't support -P
<apeiros_>
DATA relates only to the main file being executed
<apeiros_>
but __END__ works in all files
<shevy>
ack we have an apeiros clone
tier has joined #ruby
<s2013>
jij
<s2013>
huh
<robertt_dex>
apeiros: works as comment, but it's not easy to access
<wsmoak>
so coll.find() returns a cursor. I can .each over it and .to_json on each item… but it needs to have [ ] around the whole thing and commas in between.
<s2013>
its a lot closer, atleast as far as # of elements go
renderful has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JDiPierro has joined #ruby
<wsmoak>
(just looked. definitely not mongoid. I don’t need a mapper, just good json for angular to work on)
omosoj has joined #ruby
Juanchito has quit [Quit: Connection closed for inactivity]
Takle has quit [Remote host closed the connection]
blackmes1 has joined #ruby
zB0hs has joined #ruby
Xeago has quit [Remote host closed the connection]
<Hanmac>
s2013: it has a different result than your function, but i still thinks there is something broken with yours ... that group by does port them as evenly as possible
blackmesa has quit [Ping timeout: 250 seconds]
timonv_ has joined #ruby
jdj_dk has joined #ruby
jlast has quit [Remote host closed the connection]
<s2013>
Hanmac, what would be broken? i need to make sure i tworks all the time
jlast has joined #ruby
oculus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<s2013>
i tried with random arrays and they all seemed to have given the right results but i don tknow
<Hanmac>
s2013: i dont know i only say i got a different result with group_by than with your function ... that means something is fishy there ... and it does smell after a school homework
<s2013>
lol.. i wish.. my last cs class was about 10 years ago
cleopatra has joined #ruby
<s2013>
i would love to be studying cs than being out in the real world
<s2013>
doesnt work for that case... my code i know works cause i tested it with tons of different combinations.. but i feel it can be more efficient but what you said is pretty close
<Hanmac>
it seems i get ignored ... i did say ceil is better than +1 ... and that you need .sort. ... and thats why i dont like to help with homework
karmatr0n has joined #ruby
pizzahead has quit [Ping timeout: 255 seconds]
tier has quit [Remote host closed the connection]
renderful has joined #ruby
<jhass>
don't forget to .fdiv
thsig has joined #ruby
<Hanmac>
s2013: thats final form: data.sort.each_slice(data.size.fdiv(5).ceil).to_a
<s2013>
k let me try
Hijiri has joined #ruby
<s2013>
i have never seen fdiv, interesting
tus has quit [Ping timeout: 240 seconds]
it0a has joined #ruby
<s2013>
oh that just divides by the float. cool
teddyp1cker has quit [Ping timeout: 256 seconds]
dANO has quit []
cleopatra has quit [Quit: Saliendo]
<s2013>
>> data = [1,2,3,4,5,6]; data.sort.each_slice(data.size.fdiv(5).ceil).to_a
<jhass>
kinda odd that none of the many Kernel#spawn options provides this
jheg has quit [Quit: jheg]
<BenjiWiebe>
jhass: Ah...figured it out, kinda.
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<BenjiWiebe>
jhass: Because of the wrapper program having the egid set to (in this case) 1012, the *real* gid (rgid) of the script itself is set to 1012.
mary5030_ has quit [Remote host closed the connection]
delianides has quit [Ping timeout: 240 seconds]
<BenjiWiebe>
I need to look up the primary group of the user running it...
Mars` has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
giuseppesolinas has joined #ruby
<jhass>
mmh, I'm actually not sure yet if change_privilege actually drops
jheg has joined #ruby
<BenjiWiebe>
now I get EPERM!!
<BenjiWiebe>
Seems I have no way of accessing the user's real GID.
jdj_dk has quit [Remote host closed the connection]
junmapro has joined #ruby
moted has joined #ruby
moted has quit [Client Quit]
<junmapro>
how do we check what type of thing the object is?
dj_zubehoer has joined #ruby
synergyz has quit [Ping timeout: 245 seconds]
<junmapro>
i mean ifit's astring or an array or whatnot
<junmapro>
integer
<jhass>
meh, there was a time where I understood all the gid, egid and so on stuff, all gone already
jenrzzz has joined #ruby
<jhass>
junmapro: .class for example
mary5030 has joined #ruby
<jhass>
.inspect gives a programmer friendly representation
BenjiWiebe has quit [Quit: Konversation terminated!]
<shevy>
the question must be "Object, do you have this?"
_br_ has quit [Ping timeout: 250 seconds]
<shevy>
apeiros explained that once
<junmapro>
jhass: my real problem is that i'm trying to create a program that capitalizes multiple words and excludes the little words that aren't meant to be capitalized
<apeiros>
2nd vs. 3rd person in method names?
<shevy>
it would be proper english, but the wrong question for the object
<jhass>
junmapro: and why do you need to know whether something is an array?
dj_zubehoer has joined #ruby
<junmapro>
i'm thinking of turning the title into an array and then scanning for each word, if it's on the list, it won't capitalize it, but if it isn't it will continue capitalizing each item in the array
delianides has joined #ruby
<ericwood>
if it's reading like english it might as well have a few aliases for grammar
baweaver has joined #ruby
<godd2>
>> [].kind_of? Array # I know it's not the same as is_a?
<junmapro>
input ===> "this is a title" output ====> "This is a Title"
St1gma has quit [Read error: Connection reset by peer]
<shevy>
it's more like japanglish
dj_zubehoer has quit [Remote host closed the connection]
<jhass>
junmapro: I don't see why you would need to check whether something is an array there :)
St1gma has joined #ruby
bricker`work has joined #ruby
thsig has joined #ruby
kireevco1 has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
xymbol has quit [Quit: Be back later ...]
almostworking has joined #ruby
Duckily has quit [Quit: Duckily]
kish is now known as fdemocracy
almostworking has left #ruby [#ruby]
Guest2671 has joined #ruby
<rpag_>
jhass, I prefer "===" over is_a?/kind_of?, since BasicObject implements === but not the other two
Bira has joined #ruby
<jhass>
I prefer === nowhere
bmichelsen has quit [Ping timeout: 255 seconds]
<jhass>
it's for case statements, that's all
<rpag_>
you don't like, Array === obj ?
<jhass>
no
_br_ has joined #ruby
<jhass>
the .is_a?'s should be rare too
<rpag_>
Array === obj works the same as obj.is_a?(Array), and if 'Array' is dynamic(could be BasicObject), it'll work in that case too, so thats why i prefer it
<jhass>
You can't trick Module#=== though
hiyosi has joined #ruby
<rpag_>
trick it?
kasperti_ has quit []
momomomomo has quit [Quit: momomomomo]
<jhass>
class PretendedArray; def is_a?(klass); klass == Array; end; end;
synergyz has joined #ruby
<jhass>
harms duck typing even more than is_a? does
dangerousdave has joined #ruby
Guest2671 has quit [Client Quit]
<rpag_>
i dont follow
davidhq has joined #ruby
garethrees has quit [Ping timeout: 250 seconds]
<jhass>
>> class PretendedArray; def is_a?(klass); klass == Array; end; end; obj = PretendedArray.new; [obj.is_a?(Array), Array === obj]
timonv_ has quit [Remote host closed the connection]
ClarusCogitatio has quit [Ping timeout: 264 seconds]
econerd4ever has joined #ruby
Duckily has joined #ruby
paulfm has quit []
JDiPierro has quit [Remote host closed the connection]
aclearman037 has quit [Quit: I'm out!]
ClarusCogitatio has joined #ruby
samuel02 has quit []
centrx has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 250 seconds]
valeriansaliou has joined #ruby
mathias3 has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thsig has quit [Ping timeout: 255 seconds]
Areessell has quit [Read error: Connection reset by peer]
revoohc has quit [Quit: revoohc]
MattB2 has joined #ruby
delianides has quit [Remote host closed the connection]
valeriansaliou has quit [Client Quit]
<junmapro>
jhass: well the only algorithm i can think of is capitalize all the words in the list unless they're in the white list
<junmapro>
unless one of the words is in the whitelist
_br_ has quit [Ping timeout: 264 seconds]
<jhass>
"the list"? start by defining your input, where does it come from, what do you need to do with it in order 1) apply capitalization 2) exclude certain words from capitalization
benzrf is now known as benzrf|offline
mathias3 has quit [Ping timeout: 250 seconds]
kevinfagan_ has quit [Ping timeout: 250 seconds]
sindork_ has quit [Ping timeout: 250 seconds]
ThaDick has quit [Quit: ThaDick]
nobitanobi has quit [Remote host closed the connection]
<godd2>
junmapro word.split wont change what's in the word variable
tgandrews has quit [Quit: tgandrews]
kevinfagan has joined #ruby
<jhass>
junmapro: start by using variable names that actually describe their value
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
how can a word contain multiple words
<jhass>
word.each do |words|
freerobby has quit [Quit: Leaving.]
<jhass>
that doesn't make any sense
<airdeluxe>
-_-
<junmapro>
i still don't get what .each do |stuff| really does
<junmapro>
:(
<junmapro>
jhass: what do you mean by using a variable name that describes their value
<jhass>
word = 'foo'; words = 'foo bar'; words = ['foo', 'bar']
<jhass>
see, these make sense
<jhass>
it's a single word, or it's multiple words
<godd2>
junmapro collection.each do |yielded_member| will take each member of the collection and yield it to the yielded_member variable for a single loop
warreng has joined #ruby
<jhass>
word.each do |words|, word is a single word. You iterate over that single word. expecting to yield words ?
iamjarvo has joined #ruby
<jhass>
how can a word contain multiple words?
<jhass>
that's confusing and doesn't help you to understand your code
carlosoliveira has quit [Quit: Connection closed for inactivity]
nobitanobi has quit [Ping timeout: 255 seconds]
dkphenom has joined #ruby
omosoj has quit [Quit: leaving]
tkuchiki has joined #ruby
havenwood has joined #ruby
thsig has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has quit [Ping timeout: 264 seconds]
thsig has quit [Client Quit]
shredding has quit [Quit: shredding]
Alina-malina has quit [Ping timeout: 272 seconds]
St_Marx has joined #ruby
aspiers has quit [Ping timeout: 245 seconds]
nobitanobi has joined #ruby
teddyp1cker has joined #ruby
procat has quit [Ping timeout: 250 seconds]
jxf has quit [Ping timeout: 240 seconds]
benzrf|offline is now known as benzrf
sambao21 has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
teddyp1cker has quit [Ping timeout: 258 seconds]
it0a has quit [Quit: WeeChat 1.0.1]
byprdct_ has quit [Quit: by]
jlast has quit [Remote host closed the connection]
jxf has joined #ruby
jerius has quit [Ping timeout: 240 seconds]
jlast has joined #ruby
aspiers has joined #ruby
dj_zubehoer has joined #ruby
Bira has joined #ruby
doodlehaus has quit [Remote host closed the connection]
Alina-malina has joined #ruby
moritzs has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tus has quit [Ping timeout: 245 seconds]
codecop has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
oculus has joined #ruby
dj_zubehoer has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 250 seconds]
Bira has quit [Ping timeout: 255 seconds]
josephndenton has quit [Ping timeout: 255 seconds]
zzzbra has quit [Remote host closed the connection]
ghr has joined #ruby
x1337807x has joined #ruby
zzzbra has joined #ruby
banister has joined #ruby
nateberkopec has quit [Quit: Leaving...]
jenrzzz has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
cj has left #ruby [#ruby]
rshetty has joined #ruby
ClarusCogitatio has quit [Ping timeout: 240 seconds]
x1337807x has quit [Ping timeout: 255 seconds]
kireevco1 has joined #ruby
dcope has left #ruby [#ruby]
kireevco has quit [Ping timeout: 245 seconds]
Alina-malina has quit [Ping timeout: 272 seconds]
josephndenton has joined #ruby
sinequanon has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
ghr has joined #ruby
ClarusCogitatio has joined #ruby
rshetty has quit [Ping timeout: 256 seconds]
chrisja has quit [Quit: leaving]
Vivekananda has joined #ruby
Alina-malina has joined #ruby
sailias has quit [Quit: Leaving.]
shemerey has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dj_zubehoer has joined #ruby
aspiers has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
nkumari has quit [Remote host closed the connection]
s2013 has quit [Quit: Leaving]
silkfox has quit [Ping timeout: 272 seconds]
Nogbit has joined #ruby
nkumari has joined #ruby
Kricir has quit [Remote host closed the connection]
deric_skibotn has quit [Ping timeout: 258 seconds]
freerobby has joined #ruby
visof has joined #ruby
zzzbra has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
jobewan has quit [Quit: Leaving]
tkuchiki has quit [Ping timeout: 256 seconds]
nkumari has quit [Ping timeout: 258 seconds]
ClarusCogitatio has quit [Ping timeout: 256 seconds]
deric_skibotn has joined #ruby
lektrik has quit [Ping timeout: 255 seconds]
hmsimha_ has joined #ruby
zzzbra has joined #ruby
phutchins has quit [Quit: Lost terminal]
phutchins has joined #ruby
ClarusCogitatio has joined #ruby
Mateon1 has quit [Ping timeout: 272 seconds]
emmesswhy has joined #ruby
nkumari has joined #ruby
Riking is now known as Rikimg
<dukedave>
Has anyone here used Hashie's coercion and and 'Trash' functionality at the same time?
ramfjord has quit [Ping timeout: 245 seconds]
visof has quit [Ping timeout: 258 seconds]
woven has joined #ruby
oculus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
oculus has joined #ruby
mathias3 has joined #ruby
ramfjord has joined #ruby
n_blownapart has quit [Remote host closed the connection]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
kireevco has joined #ruby
treehug8_ has quit []
kireevco1 has quit [Read error: Connection reset by peer]
mathias3 has quit [Ping timeout: 255 seconds]
beowuff has joined #ruby
beowuff has left #ruby [#ruby]
n_blownapart has joined #ruby
rshetty has joined #ruby
Alina-malina has quit [Ping timeout: 265 seconds]
Darryl_ has quit [Quit: Connection closed for inactivity]
woven has quit [Ping timeout: 255 seconds]
kaawee has joined #ruby
xymbol has joined #ruby
<kaawee>
Hello! How do I build a gem which depends on one list of gems if the platform is JRuby and on a different list of gems if the platform is MRI?
<rpag_>
kaawee, build two gems, one for MRI, one for JRuby
giuseppesolinas has joined #ruby
<pipework>
havenwood: Hey, are you at the rubyconfs?
sambao21 has joined #ruby
Alina-malina has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
<havenwood>
pipework: yup yup
<havenwood>
pipework: we should hang out
<pipework>
havenwood: Where at? I'm listening to the ruby idioms at like 25.
jhwhite has joined #ruby
rshetty has quit [Ping timeout: 240 seconds]
Channel6 has joined #ruby
<havenwood>
pipework: my battery is about to die, i need to plug in. but i'm planning on Deoptimizing Ruby after the break
<pipework>
havenwood: You find me, I'm the ginger with the dogen.
Squarepy has quit [Read error: Connection reset by peer]
<etech0_>
got it. So what's the stuff in Rescue?
st1gma1 has quit [Read error: Connection reset by peer]
nobitanobi has quit []
st1gma1 has joined #ruby
pocketprotector_ has joined #ruby
parzzix has quit [Ping timeout: 264 seconds]
TeresaP has quit [Ping timeout: 246 seconds]
fumduq has joined #ruby
<jhass>
subclasses of Exception
Channel6 has quit [Remote host closed the connection]
woven has joined #ruby
<etech0_>
what's the point?
<jhass>
rescuing exceptions
pietr0 has joined #ruby
etech0 has quit [Quit: Page closed]
banana-socks has joined #ruby
vectra has quit [Ping timeout: 258 seconds]
delianides has joined #ruby
emmesswhy has quit [Quit: Leaving]
<banana-socks>
I'm writing a ruby script, and want to display a number as curerncy. For some reason the number_as_currency method is giving me an error. Why could that be?
<jhass>
banana-socks: maybe it doesn't exist
delianides has quit [Remote host closed the connection]
<banana-socks>
it says "undefined method"
delianides has joined #ruby
<jhass>
okay, it doesn't exist
phutchins has quit [Ping timeout: 272 seconds]
delianides has quit [Client Quit]
<banana-socks>
typo. I meant to write that I'm using number_to_currency
<banana-socks>
does that one exist?
<jhass>
not in core or stdlib ruby
<rpag_>
it's from rails
<banana-socks>
aha!
<rpag_>
actionview helper
<banana-socks>
is there any similar method that would work in plain ruby?
<jhass>
String#% should get you close enough
<rpag_>
check the source of the method
<banana-socks>
where do i find the source?
<MattB2>
banana-socks: or just use actionview helper
valeriansaliou has joined #ruby
<jhass>
I wouldn't add actionview as a dependency for just one of its helpers