<kandinski>
I now have rbenv and rbenv shims in my path, but `bundle install` installs the gems to my system. Quite confusing.
mmitchell has quit [Ping timeout: 240 seconds]
Spaceboy has quit [Remote host closed the connection]
Spaceboy has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
Russell^^ has quit [Quit: Russell^^]
<waxjar>
isn't that a bug in asciidoc? it's clearly loaded, because if you look at the backtrace of the error it raises an error
jlwestsr has joined #ruby
bronson has quit [Quit: bronson]
jds_ has quit [Remote host closed the connection]
grzywacz has quit [Quit: :wq]
nat2610 has joined #ruby
cakehero has joined #ruby
nat2610 has quit [Client Quit]
<kandinski>
waxjar: yeah, but still I can't believe this is a bug in the github project, because it's a showstopper. It has to be my install/configuration
chimkan has quit [Quit: chimkan]
SuperrMann has joined #ruby
timonv has joined #ruby
bakis has quit [Ping timeout: 245 seconds]
manizzle_ has quit [Ping timeout: 252 seconds]
jrist-afk is now known as jrist
nat2610 has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
x82_nicole has quit [Quit: Computer has gone to sleep.]
nari has quit [Ping timeout: 246 seconds]
_solomon has quit [Quit: _solomon]
xclite has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
twopoint718 has joined #ruby
seanstickle has joined #ruby
Nisstyre-laptop has quit [Ping timeout: 244 seconds]
<waxjar>
but the error originates from a file in that gem, so it can't be anything with bundler or your path
jslowe has quit [Read error: Connection reset by peer]
CaptainJet has joined #ruby
timonv has quit [Ping timeout: 248 seconds]
burlesona has joined #ruby
bakis has joined #ruby
bakis has quit [Changing host]
bakis has joined #ruby
sn0wb1rd has joined #ruby
bricker has joined #ruby
<burlesona>
Question re: testing methods for a helper module. In Sinatra (and other cases) there's a local oject/method 'request' which you can call in your views, and also helper methods can call it. If I want to write tests for a helper method, though, that request object isn't available inside the method. What's the appropriate way to stub a local variable/method like that so it's available in the module method you're testing?
<kandinski>
waxjar: yeah, been chasing a wild goose. Thanks. I'll try to install it on MacOS and on a clean Ubuntu instance, see if it's either a Mac/Ubuntu difference or some cruft on my system.
<shevy>
hmm guys, stylistic question
<shevy>
given a class, in def initialize, let's say you have:
<shevy>
def initialize(a, b)
xastion has quit [Quit: Lost terminal]
<shevy>
set_b(b)
<waxjar>
you could just clone the project from github kandinski, see if it raises the same error without sinatra?
<shevy>
set_a(a)
<shevy>
it's better to do this in order as the arguments come in, right?
<kandinski>
waxjar: I cloned the project from github. It's just that it uses sinatra as its frontend.
<seanstickle>
shevy: yes
fire_wall has quit [Ping timeout: 252 seconds]
<shevy>
set_a() and set_b() are just examples, the real code is larger and different... it just struck me that I was calling in opposite order in old code, and did not know why I do so
<kandinski>
waxjar: otherwise, what did you mean?
<shevy>
ok seanstickle
<waxjar>
shevy: it's what i would expect if i were glancing over the code
<shevy>
yeah I too! my own code confused me hehe :)
<waxjar>
kandinski, nvm then. i thought u were trying to use asciidoc in a sinatra app of your own
solidoodlesuppor has quit [Remote host closed the connection]
<kandinski>
waxjar: no, this is a project that uses sinatra and asciidoc, and it happens to install the asciidoc gem from github too (probably because they have fixed or added stuff). Thanks a lot.
khimera has quit [Quit: khimera]
Axsuul has joined #ruby
cakehero has quit [Ping timeout: 252 seconds]
xnm has quit [Ping timeout: 248 seconds]
alanp_ is now known as alanp
axl_ has joined #ruby
twopoint718 has quit [Ping timeout: 255 seconds]
cakehero has joined #ruby
manizzle has joined #ruby
cakehero has quit [Max SendQ exceeded]
cakehero has joined #ruby
arya has quit [Ping timeout: 260 seconds]
cakehero has quit [Max SendQ exceeded]
cirwin has left #ruby [#ruby]
cakehero has joined #ruby
nat2610 has quit [Quit: Leaving.]
cakehero has quit [Max SendQ exceeded]
tommyvyo_ has joined #ruby
hsbt is now known as hsbt_away
GoGoGarrett has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
arya has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
<shevy>
this is interesting, they use something similar to the old chris pine "learn to program" example
<shevy>
but, it is interactive!
<shevy>
people dont need to use offline irb... they can try right as they read the tutorial :)
<seanstickle>
Yeah, I sent that to my research colleagues at work
<seanstickle>
To try and wean them from SPSS
<shevy>
hehehe
<shevy>
well, I love the old chris pine tutorial... but man, interactive really rocks
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
jds_ has joined #ruby
<shevy>
I could run and write ruby scripts in the cloud! :D
bricker has quit [Quit: Lost terminal]
nat2610 has joined #ruby
<kandinski>
hmm, the output of `bundle viz` is of no use in a bug report, I guess. This is something they already know. Apart from the traceback on the console and the sinatra show_exception output, what else should I put in a bug report?
<kandinski>
yeah, did that too, explained I am using rbenv and 1.9.3.psomething as per the instructions
jonathanwallace1 has quit [Ping timeout: 250 seconds]
dmiller has joined #ruby
burlesona has quit [Remote host closed the connection]
AndChat| has quit [Ping timeout: 264 seconds]
thone_ has quit [Ping timeout: 250 seconds]
Banistergalaxy has joined #ruby
vasile has quit [Ping timeout: 265 seconds]
<shevy>
\o/ you made them happy already, now they must make you happy, after you sent the report
igro has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 260 seconds]
<xybre>
Looking for a way to simply find and map an enumerable. ex: {a: 1, b:2}.find_and_map {|key, value| if key == :a; value; end } #=> 1
<xybre>
So it would find the first match and return the result of the block, instead of the full element.
dmiller has quit [Ping timeout: 265 seconds]
<xybre>
find returns [:a, 1]
<xybre>
And map returns [1, nil]
<kandinski>
havenn: I see you submitted to the Magic Book Project. Did you get it running? On which platform?
jeffreybaird has quit [Quit: jeffreybaird]
<xybre>
So I'm looking for a simple hybrid without compact'ing or explict returns in the middle of the loop, or having to do nil checks if the search fails.
babinho has quit [Remote host closed the connection]
arya has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
Banistergalaxy has joined #ruby
buibex has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jds_ has quit [Ping timeout: 248 seconds]
jjang has quit [Remote host closed the connection]
danneu has quit [Ping timeout: 260 seconds]
moshee has quit [Ping timeout: 264 seconds]
moshee has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
PhilK has quit [Read error: Operation timed out]
pkircher has quit [Quit: pkircher]
tommyvyo has quit [Ping timeout: 252 seconds]
mmitchell has joined #ruby
PhilK has joined #ruby
_nitti has joined #ruby
krawchyk has joined #ruby
mmitchell has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 255 seconds]
pr0ton has joined #ruby
tommyvyo has joined #ruby
<pr0ton>
i have some questions about thin
<pr0ton>
i'm running Sinatra with it
<pr0ton>
: i run my program as "ruby -rubygems server.rb"
<pr0ton>
how can i set thin specific settings without moving over to config.ru / config.yml ?
<pr0ton>
alternately is there a nice way for me to move to using thin for running my servers ?
<pr0ton>
any tutorials… most of them i found were outdated / confusing
CaptainJet has quit []
pyr0commie has quit [Remote host closed the connection]
stkowski has quit [Quit: stkowski]
_nitti has quit [Ping timeout: 240 seconds]
robotmay has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
robotmay has joined #ruby
LouisGB has quit [Ping timeout: 256 seconds]
freeayu has joined #ruby
Jasko has joined #ruby
ewag has joined #ruby
robotmay has quit [Ping timeout: 264 seconds]
arya has quit [Ping timeout: 264 seconds]
<waxjar>
pr0ton: ruby server.rb --help will give you all help options iirc
daniel_hinojosa has quit [Ping timeout: 265 seconds]
danneu has joined #ruby
<pr0ton>
waxjar: sure, but those give me options for sinatra
<pr0ton>
i want to modify the thin options
<waxjar>
ah, well thin --help then :) sinatra passes them on automatically (see sinatra's --help)
<pr0ton>
oh really?
<pr0ton>
thats neat
<xybre>
So heres my solution to my above question, I jsut wonder if theres an easier way: github.com/acook/find_and_map
<pr0ton>
waxjar: doesn't seem to do that!
<xybre>
I literally just wrote that to solve my problem.
arya has joined #ruby
<pr0ton>
waxjar: it throws this - "sinatra/main.rb:15:in `<class:Application>': invalid option: --max-persistent-conns (OptionParser::InvalidOption)"
fyolnish has joined #ruby
Naeblis has joined #ruby
werdnativ has quit [Ping timeout: 244 seconds]
sailias has joined #ruby
fyolnish has quit [Remote host closed the connection]
ckrailo has quit [Quit: Computer has gone to sleep.]
johnmilton has quit [Remote host closed the connection]
daniel_hinojosa has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
apeiros_ has joined #ruby
<waxjar>
hmm, i could swear it did that pr0ton, i think i'm confusing it with some other tool then
<pr0ton>
so there must be another way to solve it
daniel_- has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
<pr0ton>
right now i just have a simple file server.rb
<pr0ton>
which just declares endpoints as it is
<pr0ton>
now i'd like to convert it into a class which inherits from Sinatra::Base
<pr0ton>
and then run it in config.ru?
<pr0ton>
does that sound right?
dagnachew has joined #ruby
dmiller has joined #ruby
nateberkopec has quit [Quit: Leaving...]
mathie has quit [Ping timeout: 260 seconds]
apeiros_ has quit [Ping timeout: 255 seconds]
LouisGB has joined #ruby
lenovodroid has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
Nick|laptop has joined #ruby
Xeago has joined #ruby
pyreal has quit [Read error: Connection reset by peer]
igro has joined #ruby
marr has quit [Ping timeout: 240 seconds]
leonardorb has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
mdpatrick has joined #ruby
pyreal has joined #ruby
slainer68 has quit [Remote host closed the connection]
cczona has joined #ruby
cakehero has quit [Remote host closed the connection]
jenrzzz has joined #ruby
cczona has quit [Client Quit]
<mdpatrick>
Say I have the following array… first_array = [["bill, "some other data"], ["jenny", "some other data"]] … how would I find out the position the array containing jenny within first_array?
_solomon has joined #ruby
<mdpatrick>
Coming from PHP background and the conflation PHP does between what Ruby calls hash and actual array has presented a challenge for me :)
<mdpatrick>
So I want to see if I am iterating over the array and I get to dec-1945
cakehero has joined #ruby
<mdpatrick>
How many years I have left until the end of the array
<seanstickle>
Why?
<mdpatrick>
based on the length of historic_market_data
cakehero has quit [Max SendQ exceeded]
<blazes816>
use a real data structure
<blazes816>
make a struct probably
kzrl has quit [Ping timeout: 260 seconds]
banjara has quit [Quit: Leaving.]
cakehero has joined #ruby
tyfighter has quit [Quit: tyfighter]
aetcore has quit [Ping timeout: 248 seconds]
<seanstickle>
mdpatrick: I know I sound boorish, but I want to get to the heart of your need, and see if there is a more Rubyish way of doing it for you
centipedefarmer has quit [Remote host closed the connection]
<seanstickle>
mdpatrick: whenever people bring up indexes, it's usually because they're applying PHP or Perl style knowledge to Ruby, which is usually a bad fit
<mdpatrick>
seanstickle: Function takes a number of years to run a calculation on, and a specific year to begin calculation at. If use inputs 30 years, but they told the function to start in 2009 it needs to raise an exception
<mdpatrick>
hehe… yup, well, that about sums it up :)
<seanstickle>
Ah, interesting.
<seanstickle>
You might could do something like this
<seanstickle>
Note: may cause weirdness due to floating point numbers
<seanstickle>
Do you just need to print this?
brianpWins has joined #ruby
pkrnj has joined #ruby
mathie has quit [Ping timeout: 244 seconds]
pkrnj has quit [Client Quit]
mascool has quit [Read error: Operation timed out]
gridaphobe has quit [Ping timeout: 252 seconds]
dmiller has joined #ruby
beachandbytes has joined #ruby
headius has joined #ruby
statarb3 has quit [Remote host closed the connection]
aharris6 has quit [Remote host closed the connection]
Choobie has joined #ruby
arya has quit [Ping timeout: 265 seconds]
Naeblis has quit [Quit: Leaving]
arya has joined #ruby
rakl has joined #ruby
aharris6 has joined #ruby
havenn has joined #ruby
Drekonus has quit [Quit: Leaving.]
babonk has joined #ruby
babonk has quit [Changing host]
babonk has joined #ruby
L1 has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
khimera has joined #ruby
headius has quit [Quit: headius]
vasile has quit [Read error: Operation timed out]
khimera has quit [Client Quit]
khimera has joined #ruby
_nitti has joined #ruby
havenn has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 240 seconds]
jeffreybaird has quit [Quit: jeffreybaird]
rohit has joined #ruby
axl_ has quit [Quit: axl_]
Zolrath has quit [Ping timeout: 252 seconds]
GitNick has joined #ruby
ryanf has quit [Quit: leaving]
slainer68 has joined #ruby
td123 has joined #ruby
pkrnj has joined #ruby
<td123>
I am trying to use the ruby mongodb driver to delete a specific record, and it seems like I should be deleting something, but in reality, it is left in the database when I query for it again: https://gist.github.com/4221668
khimera has quit [Quit: khimera]
slainer68 has quit [Ping timeout: 265 seconds]
macmartine has joined #ruby
forced_request has quit [Read error: Connection reset by peer]
locriani has quit [Read error: Operation timed out]
elico has joined #ruby
banjara has joined #ruby
aganov has joined #ruby
Juul has quit [Ping timeout: 252 seconds]
pen has joined #ruby
locriani has joined #ruby
jds has joined #ruby
hamed_r has joined #ruby
Proshot has joined #ruby
xnm has joined #ruby
coliflor has quit [Ping timeout: 245 seconds]
pdtpatrick has quit [Remote host closed the connection]
timonv has joined #ruby
buibex has joined #ruby
Morkel has joined #ruby
jds has quit [Ping timeout: 256 seconds]
bronson has quit [Quit: bronson]
piotr_ has joined #ruby
_nitti has joined #ruby
Proshot has quit [Quit: Leaving]
Proshot has joined #ruby
cauffe has joined #ruby
rippa has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g1 has joined #ruby
banjara has quit [Quit: Leaving.]
yshh has joined #ruby
_nitti has quit [Ping timeout: 240 seconds]
<cauffe>
Anyone here use Ruby with Cocos2D?
charliesome has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
banjara has joined #ruby
matrixise has quit [Ping timeout: 265 seconds]
cauffe has quit [Client Quit]
Morkel has quit [Read error: Connection reset by peer]
Morkel_ has joined #ruby
kil0byte_ has quit [Remote host closed the connection]
aaronmacy has joined #ruby
slainer68 has joined #ruby
pen has quit [Remote host closed the connection]
haxrbyte_ has quit [Ping timeout: 246 seconds]
iaj has quit [Quit: leaving]
zigomir has joined #ruby
dr_bob has joined #ruby
slainer68 has quit [Ping timeout: 265 seconds]
fire_wall has quit [Ping timeout: 252 seconds]
rakl has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
lenovodroid has joined #ruby
foohey has joined #ruby
filipe has joined #ruby
rhys has quit [Ping timeout: 246 seconds]
virtuose has quit [Read error: No route to host]
lampe2 has joined #ruby
stnly has quit [Ping timeout: 244 seconds]
iaj has joined #ruby
rippa has quit [Ping timeout: 264 seconds]
tvw has quit [Remote host closed the connection]
<dawkirst>
Hello. Stupid question (really new to Ruby): I'm including a few gems, and then I want to include a class in a separate file. The application isn't finding that class. I'm assuming this has something to do with the load path?
jds has joined #ruby
k610 has joined #ruby
BadLarry has quit [Ping timeout: 246 seconds]
brandon__ has joined #ruby
virtuose has joined #ruby
<dawkirst>
nm, sorted with the require_relative
<charliesome>
you should probably avoid require_relative
jsilver has joined #ruby
<charliesome>
instead, put code code in a lib directory and add that to the load path
brandon_ has quit [Ping timeout: 260 seconds]
hsbt is now known as hsbt_away
BadLarry has joined #ruby
timonv has quit [Remote host closed the connection]
segv- has joined #ruby
verto is now known as verto|off
stnly has joined #ruby
fire_wall has joined #ruby
Shamgar has quit [*.net *.split]
jbw has quit [*.net *.split]
alta has quit [*.net *.split]
voodoofish has quit [*.net *.split]
Bosma has quit [*.net *.split]
dawkirst2 has quit [*.net *.split]
wereHamster has quit [*.net *.split]
Yarou has quit [*.net *.split]
Guedes has quit [*.net *.split]
maxmanders has quit [*.net *.split]
mnaser has quit [*.net *.split]
asuka has quit [*.net *.split]
xsdg has quit [*.net *.split]
Derander has quit [*.net *.split]
ionte has quit [*.net *.split]
kandinski has quit [*.net *.split]
hackeron has quit [*.net *.split]
shadewin1 has quit [*.net *.split]
sixteneighty has quit [*.net *.split]
tessi has quit [*.net *.split]
RailWolf has quit [*.net *.split]
matled has quit [*.net *.split]
witchdoc has quit [*.net *.split]
klaas has quit [*.net *.split]
xea has quit [*.net *.split]
cout has quit [*.net *.split]
six has quit [*.net *.split]
phreax has quit [*.net *.split]
goraxe has quit [Write error: Connection reset by peer]
witchdoc has joined #ruby
witchdoc has quit [Changing host]
witchdoc has joined #ruby
wereHamster has joined #ruby
xsdg has joined #ruby
cout has joined #ruby
matled has joined #ruby
kandinski has joined #ruby
sixteneighty has joined #ruby
Shamgar has joined #ruby
asuka has joined #ruby
xea has joined #ruby
phreax has joined #ruby
ionte has joined #ruby
Bosma has joined #ruby
hackeron has joined #ruby
six has joined #ruby
maxmanders has joined #ruby
Yarou has joined #ruby
shadewind has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
alta has joined #ruby
Guedes has joined #ruby
voodoofish has joined #ruby
jbw has joined #ruby
RailWolf has joined #ruby
rhys has joined #ruby
dawkirst2 has joined #ruby
goraxe has joined #ruby
klaas has joined #ruby
mnaser has joined #ruby
tessi has joined #ruby
mathie has joined #ruby
Derander has joined #ruby
undersc0re97 has joined #ruby
jimeh has joined #ruby
NiteRain has quit [Ping timeout: 246 seconds]
baphled has joined #ruby
margle has joined #ruby
rellin2 has quit [Ping timeout: 260 seconds]
tonini has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
pcarrier has joined #ruby
buibex has quit [Remote host closed the connection]
jackbrownhf has quit [Quit: Sto andando via]
nemesit has joined #ruby
Ruler_Of_Heaven_ is now known as pipopopo
sspiff has joined #ruby
hoelzro|away is now known as hoelzro
arturaz has joined #ruby
epwhorl has quit [Quit: Leaving]
fire_wall has quit [Ping timeout: 260 seconds]
cardoni has joined #ruby
hotovson has joined #ruby
Hanmac_ has joined #ruby
apeiros_ has joined #ruby
xnm has quit [Ping timeout: 248 seconds]
c0rn has quit []
eldariof has quit [Ping timeout: 246 seconds]
beachandbytes has joined #ruby
tvw has joined #ruby
Virunga has joined #ruby
nat2610 has joined #ruby
ryanf has joined #ruby
fire_wall has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
Phoop has joined #ruby
zz_chrismcg is now known as chrismcg
jwang has joined #ruby
robustus has joined #ruby
bigmac has quit [Ping timeout: 250 seconds]
Elhu has joined #ruby
beachandbytes has quit [Ping timeout: 265 seconds]
_nitti has joined #ruby
baphled has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
cardoni has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
kil0byte has joined #ruby
klune has joined #ruby
_nitti has quit [Ping timeout: 248 seconds]
cableray has quit [Quit: cableray]
lolcathost has joined #ruby
igro has joined #ruby
straind has quit [Ping timeout: 248 seconds]
matrixise has joined #ruby
r0bby has joined #ruby
bigmac has joined #ruby
nat2610 has quit [Quit: Leaving.]
jds has quit [Remote host closed the connection]
eldariof has joined #ruby
igro has quit [Quit: Computer has gone to sleep.]
robbyoconnor has quit [Ping timeout: 255 seconds]
cableray has joined #ruby
tvw has quit [Read error: Connection reset by peer]
r0bby has quit [Read error: Connection reset by peer]
wereHamster has quit [Changing host]
wereHamster has joined #ruby
r0bby has joined #ruby
odyssey4me has joined #ruby
BiHi has joined #ruby
greenarrow has quit [Ping timeout: 264 seconds]
rdark has joined #ruby
greenarrow has joined #ruby
nomenkun has joined #ruby
nomenkun_ has joined #ruby
slainer68 has joined #ruby
lolmaus has joined #ruby
fyolnish has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
nomenkun has quit [Ping timeout: 246 seconds]
robotmay has joined #ruby
mguy has quit [Ping timeout: 244 seconds]
r0bby_ has joined #ruby
marr has joined #ruby
wildcard0 has quit [Ping timeout: 260 seconds]
adambeynon has joined #ruby
leonardorb has joined #ruby
r0bby has quit [Ping timeout: 250 seconds]
bluOxigen has joined #ruby
mguy has joined #ruby
pcarrier has quit []
Vainoharhainen has joined #ruby
lenovodroid has quit [Ping timeout: 244 seconds]
LouisGB has joined #ruby
jds has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
ephemerian has joined #ruby
jojosiao has joined #ruby
dekz has quit [Remote host closed the connection]
browndawg has quit [Ping timeout: 246 seconds]
moeSeth has quit [Remote host closed the connection]
cableray has quit [Quit: cableray]
Zai00 has joined #ruby
nari has quit [Ping timeout: 245 seconds]
browndawg has joined #ruby
nilg has quit [Ping timeout: 260 seconds]
Rix has quit [Ping timeout: 245 seconds]
vjt has quit [Ping timeout: 264 seconds]
jds has quit [Ping timeout: 255 seconds]
emergion has joined #ruby
bel3atar has quit [Ping timeout: 246 seconds]
_JamieD_ has quit [Quit: _JamieD_]
margle has quit [Quit: Computer has gone to sleep.]
robotmay has quit [Remote host closed the connection]
Rix has joined #ruby
_nitti has joined #ruby
elico has quit [Quit: elico]
yaroslav has joined #ruby
workmad3 has joined #ruby
_nitti has quit [Ping timeout: 246 seconds]
browndawg has quit [Ping timeout: 246 seconds]
gyre007 has joined #ruby
browndawg has joined #ruby
ircmouser has joined #ruby
ExxKA has joined #ruby
bel3atar has joined #ruby
wallerdev has quit [Quit: wallerdev]
hoelzro is now known as hoelzro|away
elaptics`away is now known as elaptics
adeponte has quit [Remote host closed the connection]
F1skr has joined #ruby
lkba has quit [Ping timeout: 255 seconds]
vjt has joined #ruby
klune has quit [Ping timeout: 245 seconds]
cdt has joined #ruby
cdt has quit [Read error: Connection reset by peer]
leonardo_ has joined #ruby
timmow has joined #ruby
cdt has joined #ruby
igro has joined #ruby
Synthead has quit [Write error: Broken pipe]
pcarrier has joined #ruby
leonardorb has quit [Ping timeout: 246 seconds]
yaroslav has quit [Quit: yaroslav]
pcarrier has quit [Ping timeout: 260 seconds]
mahmoudimus has joined #ruby
pcarrier has joined #ruby
dekz has joined #ruby
moeSeth has joined #ruby
ikaros has joined #ruby
<shevy>
yeah
<shevy>
interesting that people don't love require_relative that much
maasha has joined #ruby
<maasha>
hi
<Hanmac_>
imo they are only to lazy to change ther own code
hoelzro|away is now known as hoelzro
<maasha>
How can I add an extend call to some Class' initialize method?
krz has quit [Quit: krz]
ryanf has quit [Quit: leaving]
<Hanmac_>
show us what you want to do
Synthead has joined #ruby
<maasha>
I want to add a line self.extend(Foo) to the initialize method for a Class that I otherwise dont want to mess with.
tk___ has joined #ruby
<maasha>
I can open the class and redefine the initialize method, but then I risk breaking it.
<maasha>
I think
<JonnieCache>
create a module with its own initialize method and mix that module into your class
<apeiros_>
the module's initialize will not be invoked
<JonnieCache>
in your new module's initialize method, call super and this will call the previous initialize
<JonnieCache>
well something like that will work surely?
<apeiros_>
the module is considered the parentclass
<JonnieCache>
hmmm
<apeiros_>
so its initialize is "behind" the class' own initialize
<apeiros_>
you can "savely" redefine initialize, like so:
<Hanmac_>
you could use "super if defined?(super)"
mafolz has joined #ruby
<JonnieCache>
does super work like that in the context of a reopened class?
<apeiros_>
alias initialize_without_FEATURE initialize; def initialize_with_FEATURE(*args, &block); initialize_without_FEATURE(*args, &block); do_your_stuff; end; alias initialize initialize_with_FEATURE
<JonnieCache>
i was hoping to avoid recommending alias_method_chain
<apeiros_>
Hanmac_: you'd still have to modify the original class' initialize
aaronmacy has quit [Quit: Leaving.]
<maasha>
Surely there must be a real simple way.
<apeiros_>
again, an included module's method comes *after* the class' own methods
<Hanmac_>
if A is a module included in B than the method chain is [B,A,Object] so defining initialize in A does not affect anything when B does not call super ...
schaary has joined #ruby
<apeiros_>
since the module will be a "superclass" of the class which includes the module
aaronmacy has joined #ruby
<apeiros_>
Hanmac_: correct
tonini has quit [Remote host closed the connection]
nkts has joined #ruby
tobinharris has quit [Quit: tobinharris]
browndawg1 has joined #ruby
banjara has quit [Quit: Leaving.]
browndawg has quit [Ping timeout: 246 seconds]
aaronmacy has quit [Client Quit]
aruntomar has left #ruby [#ruby]
<workmad3>
and all of this just adds to the 'prefer composition over inheritance' arguments :)
* maasha
is confused
hotovson has quit [Remote host closed the connection]
<workmad3>
maasha: it's a whole set of implicit behaviour and rules to do with inheritance (with module mixin being a form of inheritance), which get convoluted when you start dealing with overrides and further convoluted when you're dealing with overriding 'hook' methods
<maasha>
Hanmac_: yes, that is nice. I was just trying to avoid extending each instance of Seq.
<workmad3>
maasha: and the simplest way to avoid such issues is frequently to restructure your code so that you're not (mis-)using inheritance
<maasha>
workmad3: yeah, I think its confusing. I woud like better organization if possible.
<workmad3>
maasha: grab the book 'Practical Object Oriented Design in Ruby'
<workmad3>
maasha: that should at the very least give you food for thought ;()
<workmad3>
*;)
<maasha>
workmad3: so my current organization is totally fubar, or there is room for improvement after digesting advanced literature?
<workmad3>
maasha: there's always room for improvement
hamed_r has quit [Ping timeout: 264 seconds]
<workmad3>
maasha: part of being practical is recognising when it's worth the extra investment
wildcard0 has joined #ruby
<maasha>
workmad3: thats why I am asking! :o)
Solnse2 has joined #ruby
xlogic has joined #ruby
slainer6_ has joined #ruby
sepp2k has quit [Quit: Leaving.]
<workmad3>
maasha: and that's why I'm pointing you at that book... it explains various strategies, styles and approaches in a much better way than IRC can, IMO
Solnse has quit [Ping timeout: 245 seconds]
slainer68 has quit [Read error: Connection reset by peer]
<Hanmac_>
sometimes i dont care about "strategies" because sometimes i know it better :P
<workmad3>
it's basically down to code design, which requires a fair bit of context in order to make informed decisions... and explaining the context takes space and time
slainer68 has joined #ruby
<maasha>
sure. right thanks.
<workmad3>
Hanmac_: sure, and that's part of being practical too :)
_nitti has joined #ruby
wargasm1 has quit [Ping timeout: 240 seconds]
slainer6_ has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
<dawkirst>
Is FileUtils.mv supposed to overwrite files?
mafolz has quit [Read error: Connection reset by peer]
fire_wall is now known as hack
_nitti has quit [Ping timeout: 240 seconds]
wermel has joined #ruby
lkba has joined #ruby
RickSchmitty has joined #ruby
mafolz has joined #ruby
timonv has joined #ruby
jenrzzz has joined #ruby
adeponte has joined #ruby
adeponte has quit [Remote host closed the connection]
matthewrobbins has quit [Ping timeout: 248 seconds]
matthewrobbins has joined #ruby
matthewrobbins has quit [Client Quit]
matthewrobbins has joined #ruby
tvw has joined #ruby
Xeago has joined #ruby
odyssey4me has quit [Read error: Connection reset by peer]
odyssey4me has joined #ruby
hack has quit [Read error: Operation timed out]
wildcard0 has quit [Ping timeout: 252 seconds]
nerd has joined #ruby
nerd is now known as hack
larissa has joined #ruby
ddd has joined #ruby
buibex has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
Spaceboy has quit [Remote host closed the connection]
Goles has joined #ruby
sepp2k has joined #ruby
nomenkun has joined #ruby
wildcard0 has joined #ruby
xpen__ has quit [Remote host closed the connection]
Averna has joined #ruby
segv- has quit [Quit: segv-]
buibex has quit [Read error: Connection reset by peer]
cmarques has joined #ruby
kil0byte_ has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
Naeblis has joined #ruby
<shevy>
dawkirst hmm lemme test
kil0byte has quit [Ping timeout: 240 seconds]
<shevy>
dawkirst seems to be the case that it will silently overwrite
<Naeblis>
Is there something like ipython for Ruby?
<Xeago>
irb tho you should use pry
<Xeago>
ruby comes with irb
<sepp2k>
Naeblis: What does ipython offer that plain python does not (or more to the point what does it offer that IRB does not)?
<Naeblis>
yes, I'm familiar with irb. I'd like tab-completion and syntax highlight anyway.
<sepp2k>
Naeblis: irb has tab completion
mafolz has quit [Ping timeout: 265 seconds]
<kapowaz>
anybody here used Guard with SASS / Bourbon? I'm using it in a project and Guard raises this exception when I save the application.css.scss file: Sass::SyntaxError: File to import not found or unreadable: bourbon
<Naeblis>
sepp2k, well, ipython's main advantage is the notebook, tbh.
<Naeblis>
how can I get tab-completion?
<sepp2k>
What's that?
<Naeblis>
interactive in-browser python
lushious has quit [Remote host closed the connection]
Goles has quit [Remote host closed the connection]
samphippen has joined #ruby
nkts has quit [Remote host closed the connection]
<sepp2k>
Naeblis: Put require 'irb/completion' into your .irbrc
zigomir has quit [Quit: zigomir]
Solnse2 has quit [Ping timeout: 260 seconds]
<Naeblis>
thanks
mafolz has joined #ruby
<Naeblis>
also, just found wirble
<Xeago>
wirble is nice, also irb_rocket
<Xeago>
looks cool and saves vertical space
jackbrownhf has quit [Ping timeout: 264 seconds]
BiHi has quit [Quit: Computer has gone to sleep]
hemanth_ has quit [Ping timeout: 264 seconds]
BiHi has joined #ruby
BiHi has quit [Client Quit]
fcoury has joined #ruby
banisterfiend has quit [Remote host closed the connection]
googya has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
bel3atar has quit [Ping timeout: 246 seconds]
rakunHo has quit [Remote host closed the connection]
matthewrobbins has quit [Quit: matthewrobbins]
odyssey4me has quit [Read error: Connection reset by peer]
odyssey4me has joined #ruby
gbchaosmaster has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
slainer68 has joined #ruby
kil0byte_ has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
<banisterfiend>
Naeblis: if u want other ipython-like features aside from tab completion (like source/doc browsing and debugging features) then check out pry: http://pryrepl.org
<Naeblis>
banisterfiend, awesome!
hotovson has joined #ruby
grauwoelfchen has joined #ruby
browndawg1 has left #ruby [#ruby]
kil0byte has joined #ruby
bel3atar has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Hanmac_>
that is the only link you should klick from banister, you should avoid the others
igro has joined #ruby
timonv has quit [Remote host closed the connection]
niklasb has joined #ruby
grauwoelfchen has quit [Quit: grauwoelfchen]
ddd has quit [Quit: rebooting to fix display. damned iStats]
<falkenbt>
how would I do something like: a=b <- if b is set otherwise a=c in the best way?
timonv has joined #ruby
<Xeago>
a = b || c
<Xeago>
?
<falkenbt>
does not work if b is not set
<Xeago>
you mean not declared?
<falkenbt>
yes
<Xeago>
or defined?
<falkenbt>
both :)
<Xeago>
a = c; a = b if defined?(b) or something
<Xeago>
or a ternary if
ddd has joined #ruby
<Xeago>
a = defined?(b)?b:c
Goles has joined #ruby
<falkenbt>
thanks. could you explain what the ?b:c does?
<Xeago>
?: is an inline if, or ternary if if I remember correctly
<Xeago>
conditional ? true : false
fyolnish has joined #ruby
ewag has joined #ruby
osvico has joined #ruby
margle has joined #ruby
paolooo has joined #ruby
<Hanmac_>
PS: you cant trust defined?(localvariable)
samphippen has quit [Quit: Computer has gone to sleep.]
<falkenbt>
it is a global variable
ffranz has joined #ruby
frihd has joined #ruby
<k610>
how should i set a configuration file (username & password) for my gem ?
vlad_starkov has joined #ruby
<Hanmac_>
global variables are more worse
luminous has joined #ruby
jds has joined #ruby
<Hanmac_>
falkenbt global variables are set to nil when used undefined, so you should not have a problem
banisterfiend has quit [Ping timeout: 252 seconds]
<falkenbt>
hmm..I have to find out what this thing does. An object gets instantiated through a file. I want to use a default value for "a" unless there is something else set in the file.
shiin has joined #ruby
jds has quit [Ping timeout: 248 seconds]
moos3 has joined #ruby
_nitti has joined #ruby
tobinharris has joined #ruby
zigomir has joined #ruby
nari has joined #ruby
_nitti has quit [Ping timeout: 240 seconds]
<Hanmac_>
then you should not get problems because there should no value "undefined", they should be nil
<alx->
hey, i have to run an external ffmpeg process. what's the best way to do this? how can i know when the process is finished or whether it timed out?
<ichilton>
Does require load into the same scope as the current file?
pcarrier has joined #ruby
<apeiros_>
ichilton: no. require loads into toplevel.
<ichilton>
Ah
<apeiros_>
also, local variables in toplevel of a file stay local to that file.
mikepack has quit [Remote host closed the connection]
osvico has joined #ruby
leonardo_ has quit [Remote host closed the connection]
<ner0x>
Trying to contact the maintainer of geocoder... but no email or anything to be found... How do I find this out? (new to ruby and the community)
* ner0x
is trying to contribute. :)
emergion has joined #ruby
Dwarf has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
emergion has quit [Client Quit]
jharris has joined #ruby
alee has quit [Remote host closed the connection]
levicole has joined #ruby
atmosx has joined #ruby
_solomon has quit [Quit: _solomon]
osvico has quit [Ping timeout: 252 seconds]
larissa has quit [Quit: Leaving]
sebastianb has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
chendo_ has joined #ruby
chendo_ has quit [Changing host]
chendo_ has joined #ruby
aetcore has joined #ruby
Averna has joined #ruby
vasile has quit [Ping timeout: 252 seconds]
solidoodlesuppor has joined #ruby
sailias has joined #ruby
<JonnieCache>
ner0x: send him a message on github i guess
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
rippa has joined #ruby
adamnbowen has joined #ruby
alee_ has joined #ruby
chussenot has joined #ruby
khimera has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
freeayu has quit [Remote host closed the connection]
zigomir has quit [Quit: zigomir]
arya has joined #ruby
beachandbytes has joined #ruby
niklasb has joined #ruby
s0ber has quit [Remote host closed the connection]
s0ber has joined #ruby
<ner0x>
JonnieCache: How the hell do you do that? I've been looking for 10 minutes. lol
Targen has joined #ruby
alanp has quit [Quit: No Ping reply in 180 seconds.]
alanp has joined #ruby
Targen has quit [Remote host closed the connection]
<GeekOnCoffee>
pretty sure github doesn't have messages anymore
glupo has joined #ruby
<GeekOnCoffee>
ner0x: how are you trying to contribute?
vlad_starkov has quit [Remote host closed the connection]
kil0byte_ has joined #ruby
beachandbytes has quit [Ping timeout: 264 seconds]
<ner0x>
GeekOnCoffee: Adding two backend lookups.
margle has quit [Quit: Computer has gone to sleep.]
elico has joined #ruby
<GeekOnCoffee>
ner0x: you could file an issue/pull request
muloka has joined #ruby
<GeekOnCoffee>
if you've got it coded with tests, file a pull request, otherwise I'd suggest filing an issue to see if he'd be open to merging it
tobinharris has quit [Quit: tobinharris]
<GeekOnCoffee>
given that there are recent commits on it though, I imagine he would be
<ner0x>
GeekOnCoffee: That's the plan. I wanted to ask his advice on one of the lookups since it's sort of unorthodox.
bbttxu has joined #ruby
dmiller_ has joined #ruby
kil0byte has quit [Ping timeout: 264 seconds]
Goles_ has joined #ruby
carlyle has joined #ruby
huoxito has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
CamonZ has joined #ruby
tk___ has quit [Quit: ばいばい]
hsbt is now known as hsbt_away
dmiller has quit [Ping timeout: 246 seconds]
Goles has quit [Ping timeout: 240 seconds]
elico has quit [Remote host closed the connection]
stopbit has joined #ruby
lampe2 has quit [Quit: Leaving.]
tagrudev has quit [Quit: 0_o]
nerd has quit [Quit: WeeChat 0.3.9.2]
rhys has quit [Quit: Leaving]
juarlex has quit [Read error: No route to host]
heftig has quit [Quit: leaving]
mikepack has joined #ruby
Takehiro has quit [Remote host closed the connection]
alex__c2022 has joined #ruby
dmiller has joined #ruby
nerd has joined #ruby
schaary has quit [Quit: Leaving.]
_alejandro has quit [Remote host closed the connection]
banisterfiend has joined #ruby
leonardorb has joined #ruby
Takehiro has joined #ruby
dmiller_ has quit [Ping timeout: 265 seconds]
virtuose has quit [Read error: Operation timed out]
whowantstolivefo has joined #ruby
obryan has joined #ruby
<JonnieCache>
ner0x: make a pull request with an initial version of your code then, with a message asking for feedback
virtuose has joined #ruby
<JonnieCache>
by making a pull request youre not saying "MERGE THIS CODE AS-IS!" pull requests almost always go through several iterations
cakehero has joined #ruby
IrishGringo has joined #ruby
bluOxigen has quit [Ping timeout: 252 seconds]
jlwestsr has quit [Quit: Ex-Chat]
<Hanmac_>
hm that remind me ... i need to add Licence information to my bindings on github ...
<rking>
Hanmac_: CC0 FTW
<banisterfiend>
Hanmac_: write it in german
<Hanmac_>
currently my bindings miss any information about Licence, but i want to mark them as LGPLv3
<rking>
Hanmac_: Any license that requires you to include the license is a virus
_solomon has joined #ruby
kil0byte has joined #ruby
<Hanmac_>
how does the users know that my code is LPGLv3 when i dont notic that?
<rking>
You say it's CC0, then anyone looking at your codebase knows it's completely, truly free from restrictions. If some doofsauce other guy clones your work and does something weird with it, it's on them.
kil0byte_ has quit [Ping timeout: 260 seconds]
hamed_r has quit [Ping timeout: 264 seconds]
chimkan_ has quit [Ping timeout: 265 seconds]
headius has joined #ruby
<shevy>
I think Hanmac likes restrictions
postmodern has quit [Ping timeout: 252 seconds]
<shevy>
"everytime you modify this code, you must send me one bottle of beer."
hamed_r has joined #ruby
SCommette has joined #ruby
vasile has joined #ruby
<Hanmac_>
"or a jar of honey"
iamjarvo has joined #ruby
Goles_ has quit [Remote host closed the connection]
NiteRain has joined #ruby
Goles has joined #ruby
tobinharris has joined #ruby
<Hanmac_>
rking i would like it that you could use my binding in each project, but i want that forks are forced to be free too
<rking>
Hanmac_: If you love it, let it go.
notwen has quit [Quit: Lost terminal]
<shevy>
like a marriage
<shevy>
do we have ruby code in GPL?
<rking>
Yes, just like a… wait no
<shevy>
most ruby code seems to have more liberal ones similar to the BSD ones
pavilionXP has quit [Ping timeout: 264 seconds]
<shevy>
or perhaps I can't remember otherwise :\
<ner0x>
JonnieCache: That I can do.
chad6 has quit [Read error: Connection reset by peer]
cakehero has quit [Quit: Computer has gone to sleep.]
cpruitt has joined #ruby
enroxorz-work has joined #ruby
fumbe has quit [Read error: Operation timed out]
infinitiguy has quit [Quit: Leaving.]
jgarvey has joined #ruby
v0n has joined #ruby
Mnkras-Laptop has joined #ruby
Mnkras-Laptop has quit [Changing host]
Mnkras-Laptop has joined #ruby
fumbe has joined #ruby
infinitiguy has joined #ruby
kpshek has joined #ruby
infinitiguy has quit [Read error: Connection reset by peer]
hsbt_away is now known as hsbt
infinitiguy has joined #ruby
<Hanmac_>
shevy my bindings are nearly 99% C++ code
BeLucid_ has quit [Read error: Connection reset by peer]
nemesit has joined #ruby
arya has quit [Ping timeout: 244 seconds]
tjbiddle has joined #ruby
dobbymoo` has quit [Remote host closed the connection]
juarlex has joined #ruby
Mnkras-Laptop has quit [Quit: Mnkras-Laptop]
BeLucid has joined #ruby
theRoUS has quit [Quit: Leaving]
jgarvey has quit [Ping timeout: 246 seconds]
odyssey4me has quit []
tobinharris has quit [Quit: tobinharris]
lampe2 has joined #ruby
generalissimo has joined #ruby
nemesit has quit [Ping timeout: 256 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
eldariof has quit [Ping timeout: 252 seconds]
kil0byte has quit [Remote host closed the connection]
ewag has joined #ruby
wookiehangover has joined #ruby
tjbiddle_ has joined #ruby
hsbt is now known as hsbt_away
danneu has joined #ruby
C0deMaver1ck has joined #ruby
lolcathost has quit [Ping timeout: 255 seconds]
lolcathost has joined #ruby
lolcathost has quit [Client Quit]
s1n4 has quit [Quit: leaving]
bradhe has quit [Remote host closed the connection]
lolcathost has joined #ruby
sepp2k has quit [Quit: Leaving.]
tjbiddle has quit [Ping timeout: 246 seconds]
tjbiddle_ is now known as tjbiddle
tobinharris has joined #ruby
cakehero has joined #ruby
bradhe has joined #ruby
Phoop has quit [Quit: Phoop]
jrajav has joined #ruby
jgarvey has joined #ruby
lampe2 has quit [Quit: Leaving.]
jonahR has joined #ruby
frihd has quit [Read error: Operation timed out]
cj3kim has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
malte_ has quit [Quit: malte_]
bradhe has quit [Ping timeout: 265 seconds]
nemesit has joined #ruby
xclite has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo1 has joined #ruby
<UukGoblin>
hi
peregrine81 has quit [Quit: Goodbye.]
Nisstyre-laptop has quit [Ping timeout: 244 seconds]
<UukGoblin>
is there a way to check if the .rb file currently being processed was require()d from somewhere else (as opposed to called directly from commandline)?
abner_ has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
kidoz has joined #ruby
tvw has quit [Remote host closed the connection]
maletor has joined #ruby
beiter has joined #ruby
moshee has quit [Ping timeout: 260 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
jonathanwallace has joined #ruby
frihd has joined #ruby
Hanmac_ has quit [Ping timeout: 245 seconds]
jonathanwallace has quit [Client Quit]
jonathanwallace has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
jhowarth has joined #ruby
<rking>
UukGoblin: caller works
dkannan has joined #ruby
pvh has joined #ruby
Spaceghost|cloud has joined #ruby
dekz has joined #ruby
ctevie has joined #ruby
d2dchat has joined #ruby
mafolz has quit [Quit: mafolz]
_nitti has quit [Remote host closed the connection]
mattupstate has joined #ruby
mattupstate has left #ruby [#ruby]
mattupstate has joined #ruby
rektide has joined #ruby
NimeshNeema has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
<maetthew>
I'm new to Ruby and I cannot figure out why this won't save with DataMapper. I included the console message and the concerned files in this Gist. The #save in mention is located at line 93 in tf2mixbot.rb -- https://gist.github.com/4226004
GoGoGarrett has joined #ruby
Guest30882 is now known as Jackneill
Jackneill has quit [Changing host]
Jackneill has joined #ruby
philips_ has quit [Excess Flood]
BadLarry has quit [Ping timeout: 255 seconds]
aetcore has quit [Ping timeout: 248 seconds]
davidcelis has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
nomenkun has quit [Remote host closed the connection]
philips_ has joined #ruby
Edwan has quit [Quit: Edwan]
jrist-afk is now known as jrist
aetcore has joined #ruby
BadLarry has joined #ruby
nemesit has quit [Read error: Connection reset by peer]
jeffreybaird has quit [Quit: jeffreybaird]
nemesit has joined #ruby
arya has joined #ruby
nerd has quit [Quit: WeeChat 0.3.9.2]
hsbt_away is now known as hsbt
nerd has joined #ruby
zodiak has joined #ruby
vasile has joined #ruby
dmiller_ has quit [Ping timeout: 260 seconds]
DaZ has joined #ruby
heyduck has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
burlesona has joined #ruby
burlesona has left #ruby [#ruby]
elkclone has joined #ruby
<lectrick>
I did not know that if you have a method def with one of the middle args defaulted, you can pass one less arg than the apparent arity of that method when you call it:
<rking>
lectrick: Positional args are dead. Keywords FTW
bradhe has joined #ruby
<rking>
Oh wait Smalltalk's been doing that all along say whaaat?
doug has joined #ruby
<doug>
given a Module, how can i enumerate the things defined within it?
dmiller has quit [Ping timeout: 256 seconds]
AlSquire has joined #ruby
<rking>
doug: "things"?
daniel_- has joined #ruby
proper337 has joined #ruby
AlSquirikou has quit [Read error: Connection reset by peer]
<lectrick>
rking: yeah i know. either in ruby 2.0 directly or via options hashes today :)
<rking>
doug: There's mod.methods, mod.constants
<lectrick>
doug: also mod.instance_methods, mod.class_methods etc
<rking>
lectrick: Yeah. AFAIK the 2.0 stuff is only callee sugar, right? Like we already have the full functionality in 1.9 from the caller side.
<doug>
things, like stuff.
cdt has quit [Ping timeout: 246 seconds]
babonk has joined #ruby
babonk has joined #ruby
babonk has quit [Changing host]
mpereira has joined #ruby
<doug>
doohickeys if you must
chussenot has quit [Quit: chussenot]
<workmad3>
doug: thingamabobs?
<lectrick>
rking: yeah, if you pass in a hash you automatically get local vars defined as the keys of that hash? that sort of thing?
<rking>
class Module; def stuff; [constants, methods, instance_methods] end end
<rking>
(I didn't see .class_methods)
<workmad3>
rking: that would be self.class.methods
ephemerian has quit [Quit: Leaving.]
<workmad3>
rking: and don't forget about instance_variables
<rking>
lectrick: Yeah, which is great and will encourage more of the practice, but I'm thinking we could already be designing the externally-facing APIs the same, if we weren't lazy on the method implementations.
luminous has quit [Quit: leaving]
<rking>
workmad3: Of a Module?
<workmad3>
rking: it's still an instance of something ;)
TomRone has quit [Ping timeout: 265 seconds]
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
<workmad3>
rking: and also, don't forget about singleton_class.methods, just in case...
<workmad3>
it's not like you can make the request any more ridiculous after all... :P
niklasb has quit [Ping timeout: 252 seconds]
<rking>
Haha
apeiros_ has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
delinquentme has joined #ruby
<delinquentme>
gem to do speed testing on ruby?
<lectrick>
require 'bm'
<lectrick>
delinquentme: ^ (it's the Benchmark gem and object)
<apeiros_>
require 'autoperfimprover', and your whole ruby will run ~250% faster
<maetthew>
I'm new to Ruby and I cannot figure out why this won't save with DataMapper. I included the console message and the concerned files in this Gist. The #save in mention is located at line 93 in tf2mixbot.rb -- https://gist.github.com/4226004
<workmad3>
delinquentme: although you'll get nicer and more detailed output from the benchmark stuff :)
<lectrick>
apeiros_: I did that for our unit tests and made them run in half the time. The black magic was making them use an in-memory sqlite db instead of mysql like the rest of the test suite :O
Dreamer3 has quit [Quit: Leaving...]
<rking>
apeiros_: You mean the falcon patch?
<delinquentme>
workmad3, i like dirty
<workmad3>
which, despite lectrick's claim, isn't a gem, it's a part of the stdlib
<apeiros_>
lectrick: the second part of the magic would be to use transactions ;-)
<delinquentme>
>_<;;;;
<lectrick>
So there ARE instances when a simple require might zip up your tests, if you're clever enough
<lectrick>
workmad3: ah yes. it's not a gem. it's stdlib.
* apeiros_
wonders whether pg has in-memory tables too…
mlue has quit [Quit: leaving]
<lectrick>
apeiros_: i hope so. mysql does although they are too broken
mlue has joined #ruby
<rking>
lectrick: How are they broken? (This is a FUD-free zone)
* lectrick
automatically assumes anything ugly or broken in mysql is beautiful and functional in postgres
<lectrick>
rking: Have you ever tried actually using them?
love_color_text has quit [Remote host closed the connection]
<rking>
lectrick: No. I just don't like general "is broken" comments. I can't take anything away from that
TomRone has joined #ruby
jakehow has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby
<lectrick>
rking: Here's an exercise. Take a Rails test suite, and have it try to use an in-memory mysql database. You will run into the limitations fairly quickly. It's a totally different database type with its own set of limitations (including things you can't do with the schema, etc.)
willob has quit [Remote host closed the connection]
<apeiros_>
lectrick: oooh, different db engine?
<apeiros_>
like myisam vs. innodb?
<lectrick>
rking: It would be great if it was just, say, "innodb as RAM disk"... but it's not
<lectrick>
apeiros_: yeah. it's a different table type entirely
* apeiros_
finds it also funny how the important stuff is only in innodb, yet all perf-tests for mysql are with myisam…
<lectrick>
and there's a bunch of gotchas. in essence- without a lot of maintenance, not usable, at least for testing production code that normally runs on top of things like innodb
<apeiros_>
no idea how it is today. today I have to frack around with oracle :(
<workmad3>
apeiros_: and even better, the perf tests are deliberately written to not actually expose the myisam limitations... such as it's table-level lock on inserts
<apeiros_>
workmad3: so it's still that way? :)
werdnativ has joined #ruby
BiHi has quit [Quit: Computer has gone to sleep]
<workmad3>
apeiros_: I've encountered several 'benchmarks' of mysql that do that :)
slainer68 has quit [Remote host closed the connection]
<lectrick>
workmad3: yeah that page lists some of the gotchas/caveats, but there are more than are listed there, as I found out the hard way
bradhe has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
tjbiddle has quit [Ping timeout: 246 seconds]
<lectrick>
i am not keen on mysql, especially after the Oracle acquisition
a_a_g has joined #ruby
willob has joined #ruby
<lectrick>
If anything I consider postgres in a separate league above it, and postgres could use some competition because mysql is not it
<workmad3>
lectrick: is the memory table transactional? that's not mentioned at all there :)
<lectrick>
workmad3: good question. it may not be. not sure.
hamed_r has quit [Quit: Leaving]
<workmad3>
lectrick: postgres has competition... oracle :P
<lectrick>
workmad3: also it might be impossible to join across in-memory tables and on-disk ones.
<apeiros_>
workmad3: only in enterprises
<apeiros_>
outside enterprises, oracle is a non-option
<lectrick>
workmad3: oracle seems bloated and crusty.
<apeiros_>
(well, not talking about oracle's mysql)
jenrzzz has joined #ruby
<apeiros_>
lectrick: it doesn't just seem, it *is*
jakehow has joined #ruby
<apeiros_>
it's a fracking turd. that's what it is.
<apeiros_>
and the argument "but you get support with it!" - I can't hear that anymore
<lectrick>
he said it, not me. rking had a good point about not accepting simple "it sucks" arguments :)
<apeiros_>
if you have to weigh every question you have against the budget, you never get support
tPl0ch has joined #ruby
delinquentme has quit [Quit: Leaving]
lurch_ has quit [Quit: lurch_]
under has joined #ruby
<lectrick>
i suppose the competition for both mysql and postgres are nosql solutions
<apeiros_>
lectrick: ok, 1000 items limit in IN() queries, been ~50x slower than sqlite for a query of mine, 30 chars limit on *all* identifiers (tables, columns, sequences, …)
<walbert>
perhaps something like Eloquent Ruby would fit you. I'm a fan of it, personally - but it won't hold your hand if you don't understand what an if statement is or such.
bradhe has joined #ruby
voodoofish430 has joined #ruby
<rking>
rdk: Oh, and after you get done with that tutorial (or during, if you're not afraid to see some output differences), gem install pry-plus and then use pry everywhere where you would've used irb
maletor has quit [Quit: Computer has gone to sleep.]
Adget has joined #ruby
iamvery has joined #ruby
<rdk>
rking: thanks , i will go through your link
<rking>
rdk: Feel free to ask any and all questions. It's fun to help people transition.
fred909 has joined #ruby
tobinharris has joined #ruby
<rdk>
walbert: can I order this book ? " Eloquent Ruby"
arusso has left #ruby [#ruby]
lolmaus has quit []
dankest has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
tobinharris has quit [Client Quit]
Uranio has quit [Quit: WeeChat 0.3.8]
maletor has joined #ruby
<walbert>
rdk: Yeah, that's the one I'd recommend if you have some C and C++ experience.
AlSquire has quit [Read error: Connection reset by peer]
matrixise has quit [Ping timeout: 252 seconds]
answer_42 has quit [Quit: WeeChat 0.3.9.2]
AlSquire has joined #ruby
answer_42 has joined #ruby
<lectrick>
rdk: you can always use http://tryruby.org/ to get a feel for the lang if you're a complete noob
iamvery has quit [Client Quit]
Shamgar has joined #ruby
iamvery has joined #ruby
<iamvery>
What's the _right_ way to bundle private/offline gems? I was using `bundle package`, but I didn't like the idea of including the packaged gems in my repo. Ideally, I don't want to host these gems
gbchaosmaster has joined #ruby
tenmilestereo has joined #ruby
<iamvery>
(btw, I tried #bundler but its pretty quiet there)
mascool has joined #ruby
dr_bob has left #ruby [#ruby]
<C0deMaver1ck>
iamvery: do these gems have their own repos?
<shevy>
my right way is to avoid bundler
<iamvery>
yes, but only locally for now
<iamvery>
It would never been published on GH
dmiller has joined #ruby
wermel has quit [Remote host closed the connection]
<iamvery>
It COULD be put on a locally hosted repo, but I wanted to avoid that setup for now if possible
arietis has quit [Quit: Computer has gone to sleep.]
AlSquire has quit [Ping timeout: 256 seconds]
<C0deMaver1ck>
I was gonna say you could use the whole
cakehero has joined #ruby
<C0deMaver1ck>
'gem "blah", :git => "git://"
tjbiddle_ has joined #ruby
<iamvery>
@C0deMaver1ck I imagined being able to commit and/or supply the .gem for only my private repos and somehow pointing the Gemfile to that
<walbert>
yeah, I think that the argument to :git could simply be an absolute path to a local git repo
<C0deMaver1ck>
^
jenrzzz has quit [Ping timeout: 264 seconds]
<iamvery>
@walbert it can, but I didn't necessarily want to code a path for other devs sake
mmitchel_ has quit [Remote host closed the connection]
<rking>
You can use gem 'foo', path: 'some/path'
<iamvery>
realy I could just put in comments / readme that its expected to exist
<rking>
Which combines well with git submodules added to the project tree
<iamvery>
@rking that's an idea!
<gyre007>
is there any good gem with AWS utilities ? I would only need S3 upload simple utility
<gyre007>
cant find any..
<iamvery>
so I could add the other repos as a submodule?
arietis has joined #ruby
rakuN has quit [Ping timeout: 246 seconds]
<walbert>
gyre007: AWS publishes their own gem. 'aws-sdk'
<rking>
iamvery: Yep, and it works great — except people will have to start cloning recursively
DaZ has quit [Ping timeout: 240 seconds]
<ner0x>
After looking at the docs is there a way to specify you want index 0, 3, and 4 from array var_array ?
<gyre007>
walbert: thats SDK dude
<gyre007>
I want functional tool
<rking>
Otherwise it's a great way to stay in sync. E.g. the outer repo tells you that the submodule is dirty
<iamvery>
@rking that's an interesting options.. i think i quite like
<ner0x>
I know varray[index, length] but not selecting each individually.
<rking>
But you can edit the submodule code in-place as you need
<iamvery>
@rking i haven't dealt with submodules much so I'm not sure about their quriks... can you check them at at particular branches, tags, etc?
a_a_g has quit [Quit: Leaving.]
<rking>
iamvery: For sure.
AlSquire has joined #ruby
<rking>
iamvery: You're basically committing the submodule as a url + commit to the outer tree.
<banisterfiend>
rking: most people even on #git says submodules suck big time
brianpWins_ has joined #ruby
<banisterfiend>
maybe they've improved with recent git releases though, i hvaen't kept up
<iamvery>
@rking I see, so it is tied to a particular commit in the sub-repository
<rking>
So if you cd into the submod and do stuff, then commit there, when you cd back to the outer it shows up as a diff where the one commit became the new one.
brianpWins has quit [Read error: Connection reset by peer]
brianpWins_ is now known as brianpWins
pogo has quit [Read error: Connection reset by peer]
<rking>
banisterfiend: No, it's just some people are made of weaksauce.
<iamvery>
@rking thanks for the idea. I'm going to look into it
heyduck_ has joined #ruby
pogo has joined #ruby
tommyvyo has joined #ruby
<rking>
iamvery: Yes, and 'git pull' to the outer dir updates the submodule.
<iamvery>
@rking I see...
<rking>
banisterfiend ♥ FUD, 4ever.
heyduck has quit [Ping timeout: 265 seconds]
heyduck_ is now known as heyduck
punkrawkR^Home has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
heftig has quit [Quit: leaving]
<walbert>
rking: I thought you had to do a "git submodule foreach git pull" to update all submodules?
<ner0x>
invalid byte sequence in UTF-8 # while doing a split.
JustinAiken has joined #ruby
<ner0x>
Seems the city is french. Ideas?
jenrzzz has joined #ruby
<banisterfiend>
rking: i used them a while ago and found them a pain, anyway, i've since forgotten why i found them a pain though
<rking>
walbert: That would move each of those submodules' HEAD forward to their upstream. But once *you* do that and teest the updates + commit to the outer repo, all *I* have to do is 'git pull' the outer
<iamvery>
@banisterfiend @rking Is there a way to reference a .gem directly vs. look up in a source or path?
chussenot has joined #ruby
Solnse has joined #ruby
DaZ has joined #ruby
<iamvery>
I tried using :path => 'directory/containing/gem_file' but it doesn't seem to actually install the gem when I bundle install. I just bundles successfully using the dependency tree i guess
<rking>
banisterfiend: Thanks for the link. Now I'm 100% sure that people are being whiny when they oppose submodules. It takes some adjusting, yes, but they're entirely workable.
<rking>
iamvery: gem 'foo', :path => refers to the directory that has the foo.gemspec
<elementz>
hi all. i am a bit stuck. i have an array of strings. on those strings i would like to run the strip!-function. e.g. : >> foo[0].each{|k| k}
<elementz>
=> ["Mo ", "06:00 - 08:00 ", " "]
Russell^^ has joined #ruby
<iamvery>
@rking right on :-/
Adget has quit [Read error: Operation timed out]
<elementz>
running strip on that array like so: >> pp foo[0].each{|k| p k.strip!}
<elementz>
returns nil for each value. what am i missing?
d2dchat has joined #ruby
<rking>
iamvery: I could be wrong (I've never done it), but if I wanted to use a specific .gem file, I'd look at the `source foo` directive, normally just `source :rubygems`. Surely you could provide your own URL for it, and that URL could possibly just be a local path
<rking>
iamvery: But when designing these Bundler-related solutions be sure to keep in mind the chief benefit of Bundler is that everything stays in sync between developers and deployments.
<iamvery>
@rking thanks for the tip, I'm reading up on the bundler site now
Takehiro has quit [Read error: Connection reset by peer]
Adget1 has quit [Read error: Operation timed out]
<walbert>
elementz: the arguments passed to each are immutable, and assuming foo is your array, you probably don't want to iterate through its first element[0] - you want to iterate through the whole array. I think you want something like new_foo = foo.map{ |k| k.split }
Takehiro has joined #ruby
<iamvery>
@rking right :-/... keeps feeling like the final solution will require us to have privately hosted gems... we'll get there eventually i guess
<rking>
(So if you were to do like :path => '../somegem', and that path isn't in the clone, then people have to sync that ../somegem dir outside of the bundler workflow)
<rking>
iamvery: That doesn't sound like a bad solution. If I had infrequently-varying private gems, I'd do exactly that. If they're frequently-varying I'd use a submodule + gem … :path =>
lushious has joined #ruby
<iamvery>
@rking yeah this is a pretty fluid app. Its very much experimental so there will probably be frequent updates all around
<rking>
iamvery: Are you likely to be using the outer app, then need to make a change in the gem to support it?
filipe has quit [Remote host closed the connection]
<iamvery>
@rking I would say I'm more likely to edit the outer app, but both are fair game for sure
<walbert>
iamvery: that's a pretty strong argument for using source control for your gems, though, no? :)
Adget has joined #ruby
<iamvery>
@walbert we certainly are, just not hosted at the moment
<rking>
iamvery: Well, in that case I would personally do the submodule thing. If you have problems feel free to nick-ping or privmsg me about it
<elementz>
walbert: hmm. actually, my datastructure looks more like this: foo = [["a", "b"]["c","d"]] thats why i wrote foo[0]
wargasm has joined #ruby
hydrozen has joined #ruby
<iamvery>
@rking cool man. I'm going to do some more reading on this and see what I can find out. Thanks for all your help
<rking>
Np. ☺
BoomCow has joined #ruby
Choobie has left #ruby ["End"]
<elementz>
walbert: maybe its better i post my real data: [["Mo ", "06:00 - 08:00 ", " "], ["Di ", "06:00 - 08:00 ", " "], [" ", "17:00 - 20:00 ", "sometext "]]
baphled has joined #ruby
<walbert>
elementz: if everything is nested consistently, then perhaps new_foo = foo.map{ |bar| bar.map{ |k| k.split } }
glupo has quit [Remote host closed the connection]
<elementz>
walbert: kk. will try that
<elementz>
walbert: thank you
willob has quit [Remote host closed the connection]
<walbert>
strip, rather - not split.
Banistergalaxy has quit [Ping timeout: 252 seconds]
<elementz>
oh yeah, overread that too. hehe
sn0wb1rd has joined #ruby
willob has joined #ruby
babonk has quit [Quit: babonk]
bricker has quit [Quit: leaving]
bricker has joined #ruby
tjbiddle_ has quit [Read error: Connection reset by peer]
alexim has joined #ruby
tjbiddle has joined #ruby
rakuN has joined #ruby
wallerdev has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
mikepack has quit [Remote host closed the connection]
banjara has joined #ruby
AlSquirrel has joined #ruby
AlSquire has quit [Read error: Connection reset by peer]
twopoint718 has joined #ruby
mathie has quit [Quit: Sleeping...]
alfism has quit [Quit: alfism]
nemesit has quit [Read error: Connection reset by peer]
Zai00 has quit [Quit: Zai00]
jekotia has joined #ruby
AlSquirikou has joined #ruby
rdk has left #ruby [#ruby]
Solnse has quit []
AlSquirrel has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
iamvery has quit [Remote host closed the connection]
AlSquirikou has quit [Read error: Connection reset by peer]
aetcore has joined #ruby
sepp2k has quit [Remote host closed the connection]
Highschool has joined #ruby
artm has joined #ruby
philcrissman has quit [Remote host closed the connection]
AlSquire has joined #ruby
schaerli has joined #ruby
AlSquire has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
gbchaosmaster has quit [Ping timeout: 255 seconds]
philcrissman has joined #ruby
falkenbt has quit [Ping timeout: 245 seconds]
dmiller has quit [Remote host closed the connection]
dukedave has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
jackbrownhf has quit [Quit: Sto andando via]
bakis has quit [Ping timeout: 246 seconds]
<elementz>
walbert: thats so strange, running upcase on the strins in my array works without problems: foo.map{|k| k.map{|j| pp j.upcase}} => returns each string as uppercase. When running strip or strip! on those string elements still does not change anything at all.
wallerdev has quit [Quit: wallerdev]
daniel_- has joined #ruby
grzywacz has quit [Ping timeout: 240 seconds]
<apeiros_>
elementz: careful with map + strip! (the bang version), strip! can return nil
x82_nicole has quit [Quit: Computer has gone to sleep.]
<elementz>
apeiros_: yeah, thats what i get: either nil when running with strip! But strip also does not change anything on my string array
<apeiros_>
elementz: care to paste a minimal reproduceable case?
<apeiros_>
(preferably on gist.github.com)
<elementz>
apeiros_: sure, hold on
gbchaosmaster has joined #ruby
<dukedave>
Hey all, I have day-of-the-week as a symbol, e.g. :wednesday. I'd like to turn it into something I can call + on with an Integer to move that number of day.
<dukedave>
I bet there's an elegant solution out there? :)
bakis has joined #ruby
bakis is now known as Guest73603
donkdonk has joined #ruby
<apeiros_>
dukedave: array of all weekdays, +Array#index +Integer#% (modulo)
<donkdonk>
anyone know some good reading material on passenger vs. unicorn?
osvico has joined #ruby
x82_nicole has joined #ruby
<dukedave>
apeiros_: Hmm, yes, that kind of thing :)
JustinAiken has left #ruby [#ruby]
<dukedave>
I was hoping to wrap it up in one object, rather than maintaining the array and index separately
jlwestsr has joined #ruby
<dukedave>
But I suppose it's not so bad
<apeiros_>
dukedave: sure, a proper class is a good idea
<doug>
but method arg, arg && cond is clearly different from method arg, arg and cond
<apeiros_>
I think zenspiders quickref lists precedence
<apeiros_>
but if your code requires you to think about precedence, then it's IMO not clear enough.
<doug>
oh ya, ryan davis
<doug>
i'm kinda suspicious of "making the code clear"
theRoUS has joined #ruby
Mon_Ouie has joined #ruby
kirun has joined #ruby
<doug>
had people tell me i don't need comments or any documentation whatsoever if i write my code clearly enough
<doug>
but i'm pretty sure that's total bullshit
slainer68 has joined #ruby
<apeiros_>
it's not
<apeiros_>
you need documentation as not everybody wants to read your code
<apeiros_>
but you can omit almost all in-code comment
<doug>
i haven't seen an example of that that truly works for me
moshee has quit [Ping timeout: 250 seconds]
<doug>
and plenty of examples to the contrary
<apeiros_>
i.e., "docs as summary and guide to entry points" is always a good idea IMO. no matter how well written the code is.
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
<apeiros_>
hm, I've seen plenty of code that was a pleasure to read
tjbiddle_ has joined #ruby
hotovson has joined #ruby
<apeiros_>
but the opposite is clearly far more often the case :-/
arya has joined #ruby
<doug>
i imagine some of the arguments are along the lines of "well, if that's not clear, refactor!" without taking into consideration that the refactoring might require that you spend 3 hours touching 7 levels of calls and submitting 3 pull requests as a result
Vert has joined #ruby
enroxorz-work has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
<apeiros_>
if you have 7 levels of calls in the refactor of one method, then you've an issue right there :-p
<apeiros_>
coupling is bad, m'kay?
tjbiddle has quit [Ping timeout: 240 seconds]
tjbiddle_ is now known as tjbiddle
<apeiros_>
anyway, my opinion on in-code comments: if you explain *what* your code does there, then your code is bad.
Coolhand|laptop has quit [Quit: No Ping reply in 180 seconds.]
wallerdev has joined #ruby
Coolhand|laptop has joined #ruby
geekbri has quit [Remote host closed the connection]
<apeiros_>
(or your expectation of your fellow coders ability is very low :D)
lolcathost is now known as Catnaroek
Virunga has quit [Remote host closed the connection]
darthdeus has joined #ruby
DatumDrop has quit [Remote host closed the connection]
guns has joined #ruby
Takehiro has joined #ruby
shevy has quit [Read error: Operation timed out]
c0rn has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 244 seconds]
dawkirst has quit [Ping timeout: 255 seconds]
dawkirst2 has quit [Ping timeout: 264 seconds]
undersc0re97 has quit [Quit: Leaving]
gyre007 has quit [Remote host closed the connection]
arya has joined #ruby
abner_ has quit [Quit: Saindo]
gbchaosmaster has quit [Ping timeout: 264 seconds]
c0rn has joined #ruby
nomenkun has joined #ruby
<dukedave>
apeiros_: Further to my day-of-week question earlier: I'd like a DayOfWeek class to behave like a symbol for identity purposes.
<dukedave>
So in my case I'd like to be able to initialize a Hash with { DayOfWeek(:tuesday): 123 }, and later do hash[DayOfWeek(:tuesday)]
<dukedave>
Does that sound like a good idea?
<dukedave>
E.g. when I say Wednesday + 2, I want to get the system Friday, not a new Friday
Takehiro has quit [Ping timeout: 255 seconds]
danshultz has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
<apeiros_>
that sounds like a sensible thing to do
frihd has joined #ruby
<apeiros_>
I'd simply use a multiton pattern. i.e., DayOfWeek(:tuesday) # => DayOfWeek::Tuesday
<apeiros_>
in that case, you wouldn't even need to do anything special
<apeiros_>
otherwise you have to implement #hash and #eql?
SuperrMann has joined #ruby
Banistergalaxy has joined #ruby
grzywacz has joined #ruby
_nitti_ has joined #ruby
<dukedave>
apeiros_: Ah excellent, I didn't know that was the name for that pattern
Slivka has joined #ruby
Slivka has quit [Remote host closed the connection]
<Xeago>
anyone know a tutorial on ruby http stuff?
<Xeago>
or nice gems?
<wildcard0>
rails? :)
Choobie has joined #ruby
bel3atar has joined #ruby
dmiller_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
<invisime>
not rails. sinatra. :-P
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
twopoint718 has joined #ruby
nemesit has joined #ruby
aquaranto has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
<wildcard0>
bah, too heavywight. HttpServer !
<wildcard0>
i like of code
bradhe has joined #ruby
<wildcard0>
er 1 line of code
<wildcard0>
i can type
rakl has joined #ruby
DatumDrop has quit [Remote host closed the connection]
postmodern has joined #ruby
davidcelis has joined #ruby
Goles has joined #ruby
eldariof has quit []
<postmodern>
rking, all licenses require you include the license
bel3atar has quit [Ping timeout: 252 seconds]
<postmodern>
rking, also copyright requires you at least include Name/Date/Author
postmodern has quit [Client Quit]
<rking>
postmodern better run.
<rking>
That's some ignorant stuff right there.
reset has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
postmodern has joined #ruby
<rking>
postmodern: Totally false.
<rking>
You're saying I have no right to release something and tell people they don't have to include my name on it? C'mon. Use some friggin common sense.
<postmodern>
rking, all licenses must include LICENSE/COPYING file is what i meant
<postmodern>
rking, otherwise it's considered all rights reserved code
noric has joined #ruby
<rking>
So let's say I do echo Public domain. Do what you want. > LICENSE
<rking>
Then you take that code and use it however you want, private commercial, say. And then I come back and try to sue you for copyright violation.
DrShoggoth has quit [Ping timeout: 246 seconds]
<rking>
Under what court of law will I win that lawsuit?
dmiller_ has quit [Remote host closed the connection]
dmiller_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<rking>
postmodern: Right. The default copyright is all rights reserved.
<rking>
But I can (and do) exercise that right to give that right away.
<postmodern>
rking, yep, copyright and common sense don't mix :P
ryanlecompte has quit [Ping timeout: 246 seconds]
<rking>
No, so far we haven't mentioned any non-common sense thing.
jsilver has quit [Read error: Connection reset by peer]
osvico has joined #ruby
<rking>
It's good that rights are reserved by default.
ryanlecompte has joined #ruby
c0rn has joined #ruby
axl_ has quit [Quit: axl_]
<noric>
I'm writing a non-graphical game engine in ruby and have performance problems. The game is a server and the process lifetime is measured in weeks. I've heard that GC can be a bottleneck for long-running 1.9.2 processes which create and destroy objects on a sub-second basis. I prefer ruby but am also considering python or the JVM. What's the deal with GC and 1.9.2 perf for long-running processes?
funnyfingers has joined #ruby
blaxter has quit [Quit: foo]
monkegjinni has joined #ruby
musl has quit [Quit: WeeChat 0.3.9.2]
<C0deMaver1ck>
noric: you'll probably be better off running it on JRuby
dankest is now known as dankest|away
Virunga has joined #ruby
igro has quit [Quit: Computer has gone to sleep.]
burgestrand has joined #ruby
bel3atar has joined #ruby
tenmilestereo has quit [Quit: Leaving]
<funnyfingers>
When sending a multipart/form-data post to ruby as cgi, should I be able to stream in bytes or does it have to be encoded. If encoded, do I have to change the encoding when I hit a binary file?
workmad3 has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
<noric>
C0de: I know JRuby has true parallelism vs the GIL in MRI. I see it now supports 1.9 (I'm a bit outdated :). In broad strokes, will JRuby give me the stability and perf I need for a long-running game server with lots of I/O, mem, cpu, and object creation/destruction?
x82_nicole has joined #ruby
<noric>
C0de: Simply, do any red flags come to mind?
lampe2 has joined #ruby
<noric>
C0deMaverick: ^
elementz_ has joined #ruby
elementz_ has quit [Changing host]
elementz_ has joined #ruby
booski is now known as dimka
axl_ has joined #ruby
elementz has quit [Read error: Operation timed out]
bel3atar has quit [Ping timeout: 244 seconds]
arya_ has joined #ruby
dmiller_ has quit [Remote host closed the connection]
<havenn>
noric: If you are worried about 1.9 GC, install falcon patch for Ruby 1.9.3 or use 2.0.0-dev then no prob.
workmad3 has quit [Ping timeout: 252 seconds]
Xeago has quit [Read error: Connection reset by peer]
<havenn>
noric: JRuby has a slowish startup time and first few operations can cost but very, very stable.
artm has quit [Quit: artm]
Xeago has joined #ruby
<havenn>
1.9.3 --fatch falcon or JRuby 1.7.1 are both very nice options.
<davidcelis>
keep in mind the falcon patch is not applicable to p327
axl_ has quit [Client Quit]
<eka>
davidcelis: not it is AFAIK
<havenn>
s/fatch/patch
donkdonk has left #ruby [#ruby]
<eka>
havenn: also GFLAGS is good option to speed up ruby
Jasko2 has quit [Read error: Connection reset by peer]
Coolhand|laptop has quit [Read error: Connection reset by peer]
Jasko2 has joined #ruby
lampe2 has joined #ruby
<davidcelis>
eka: Huh, I tried using burke's updated gist to patch 327 and it gets build failures, just like it was before
cmarques has quit [Ping timeout: 252 seconds]
<eka>
davidcelis: I did it with rvm
joeycarmello has quit [Ping timeout: 255 seconds]
<davidcelis>
And it installed p327?
affix has quit [Ping timeout: 260 seconds]
<eka>
davidcelis: yes
<eka>
let me see
beilabs has quit [Remote host closed the connection]
<davidcelis>
hm
<eka>
davidcelis: yes
<eka>
davidcelis: I used --patch falcon
<eka>
davidcelis: what time this gives you? time ruby -e "count = 0; while(count < 100000000); count = count + 1; end; puts count"
riley526 has joined #ruby
Coolhand|laptop has joined #ruby
riley526 has quit [Client Quit]
<davidcelis>
eka: it didn't install at all; like it said, there are build failures
joeycarmello has joined #ruby
bel3atar has quit [Ping timeout: 260 seconds]
<davidcelis>
the patch fails for me using rbenv on OS X
riley526 has joined #ruby
<eka>
davidcelis: not using rbenv... rvm on osx also
<davidcelis>
:(
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
perun_ has quit [Ping timeout: 248 seconds]
mathie has joined #ruby
<pizzahead>
anyone have a suggestion for an alternative to bluepill?
stkowski has quit [Quit: stkowski]
<eka>
pizzahead: you want to make daemon scripts? is there any reason not to do a normal one and use supervisord?
pothibo has joined #ruby
<eka>
pizzahead: I see... you can try supervisord... works with any executable
rosscooperman has joined #ruby
affix has joined #ruby
elkclone has quit [Quit: It's never too late to unplug and run.]
mathie has quit [Ping timeout: 244 seconds]
snearch has joined #ruby
ryanf has joined #ruby
geekbri has quit [Remote host closed the connection]
<pizzahead>
eka: we've had bluepill controlling rails on our servers but I'm seeing an issue where it doesn't seem to be aware that it is spawning multiple processed of bluepilld and unicorn. after some time one process of each is running but it looks like it's delaying startup time and I'd like to fix it. bluepill has been handy with respawning unicorn when there have been memory or cpu issues detected.
funnyfingers has left #ruby [#ruby]
<pizzahead>
eka: I've found other mentions of it and there seems to be patches up to 0.60 that supposedly help but I can't figure out why it's happening and upgrading to 0.60 didn't help
daniel_- has quit [Ping timeout: 252 seconds]
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
cakehero has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
jlast has quit [Remote host closed the connection]
x82_nicole has joined #ruby
musl has joined #ruby
CamonZ has joined #ruby
perun_ has joined #ruby
cakehero has quit [Client Quit]
hotovson has quit [Remote host closed the connection]
<Eiam>
is there such a thing as a ruby audio book? =0 I wonder if it would do me any good
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
<wildcard0>
Eiam: code samples are hard in audio
<Eiam>
I suddenly find myself having 1+ hour commutes now that my motorcycle is gone and thought gosh, I sould spend that time doing something useful
twopoint718 has quit [Ping timeout: 250 seconds]
<Eiam>
yeah, i figured it could have some problems..
<maetthew>
I'm new to Ruby and I cannot figure out why this won't save with DataMapper. I included the console message and the concerned files in this Gist. The #save in mention is located at line 93 in tf2mixbot.rb -- https://gist.github.com/4226004
<waxjar>
there are podcasts (ruby rogues i believe)
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
twopoint718 has joined #ruby
gridaphobe has joined #ruby
mark_locklear has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
byennen has joined #ruby
niklasb has joined #ruby
<waxjar>
maetthew, try not to nest your if-statements so deeply. it reads incredibly annoying and is generally not necessary
<maetthew>
waxjar, I know this is due to my noob-status :)
<maetthew>
I don't know how it should be done otherwise
<Eiam>
could have a handle_response method
<Eiam>
that encapsulates all that logic for you, it looks like almost the same set of cases with slightly diffferent language
Mon_Ouie has quit [Ping timeout: 240 seconds]
<Eiam>
could use a case as those don't have as much indention involved in them
<Eiam>
case/switch
beiter has quit [Quit: beiter]
pothibo has quit [Quit: pothibo]
jrunning2 has quit [Ping timeout: 244 seconds]
<apeiros_>
oy, wow, 800 ppl in the channel?
<apeiros_>
awesome
byennen has quit [Remote host closed the connection]
<Eiam>
I see success, something went wrong, already running, you need to sign up, invalid informatin
<Eiam>
you could move ALL those failure cases to a single case
<waxjar>
maetthew: are you sure line 93 is ever executed though? it seems like no error is raised
lindenle has quit [Ping timeout: 260 seconds]
pothibo has joined #ruby
<maetthew>
waxjar, if i do a "if @signup.save puts "done" else puts "fail" end"
<maetthew>
it returns "fail"
daniel_- has joined #ruby
rosscooperman has quit [Quit: rosscooperman]
Mon_Ouie has joined #ruby
DrShoggoth has quit [Remote host closed the connection]
<waxjar>
might be some constraints of the db
osvico has quit [Ping timeout: 276 seconds]
<waxjar>
too long a string or something.
<wildcard0>
check your log to see if the db is returning errors
jenrzzz has quit [Ping timeout: 250 seconds]
<wildcard0>
it could be just a typo in a yml file or something
<maetthew>
wildcard0, the log of sqlite3 it self?
<maetthew>
there is no yml files btw
<wildcard0>
im not sure how you're calling the db
<wildcard0>
so...at some point your db connection should return data. you should take a look at that
L1 has joined #ruby
L1 has quit [Changing host]
L1 has joined #ruby
jenrzzz has joined #ruby
Zai00 has joined #ruby
<wildcard0>
also, verify you can run the same query on the command line with the same user/pass
<waxjar>
ah, that's it probably, you don't connect to a db anywhere.
<maetthew>
waxjar; wildcard0: The database connection looks like this
<maetthew>
my other methods work with the database. it's just this method I'm having problems with for some reason
<wildcard0>
do other methods write to it?
<maetthew>
yes
<maetthew>
cmd_signup and cmd_setupmix works as expected
<wildcard0>
sec, looking at the datamapper docs
snearch has quit [Quit: Verlassend]
<maetthew>
thanks
<waxjar>
ah ok, well i think you're giving it some data that the database doesn't like. you could try checking the errors on @singup, see if any validations failed
<wildcard0>
where does that :debug stuff go?
<wildcard0>
it will probably give you clues
<waxjar>
should go to stdout
workmad3 has joined #ruby
<maetthew>
waxjar, hmm i'm not following. How would i go about to check errors on @signup?
Catnaroek is now known as lolcathost
mildfate has joined #ruby
<pr0ton>
waxjar: i have a system design question
sailias has quit [Read error: No route to host]
<pr0ton>
can you help me?
grzywacz has quit [Ping timeout: 248 seconds]
<mildfate>
I have a hash which represents multiple metro stations. The key-value pairing is station_name -> Station Object. Within each Station Object is the station's name (in a field). Is this poor practice? I.e. having the redundancy of the station name mapping to the station object which already has a station name field?
<mildfate>
Is there a pattern that resolves this simply?
<gbchaosmaster>
pr0ton: Just ask, if anyone can help they will.
<pr0ton>
okay
<pr0ton>
so i'm writing a ruby service that does this
Nimsical has joined #ruby
bbttxu has quit [Quit: bbttxu]
<wildcard0>
mildfate: i see no problem with that if it work with your application
<pr0ton>
it uses httpclient to make a request and it serves back the response
<pr0ton>
i'm using nahi's HTTPClient and making async calls (which i believe runs it in a ruby thread)
<pr0ton>
i've written it to use sinatra and thin
<mildfate>
wildcard0: Ok, it just felt weird writing it that way
<pr0ton>
now thin's config says it's set to a maximum of 1024 connections
savage- has quit [Remote host closed the connection]
<pr0ton>
but when i lsof the process, and look for open TCP connections, there are only 30 inbound connections
<pr0ton>
and 5-6 outbound connections
<pr0ton>
shouldn't i be getting better throughput ?
<wildcard0>
mildfate: you could use a symbol if you wanted to save space :)
<mildfate>
nah
davidcelis has quit [Quit: K-Lined.]
undersc0re97 has quit [Quit: Leaving]
emmanuelux has joined #ruby
<pr0ton>
gbchaosmaster: my alternative is to spin up multiple instances (thin start -s50) and then use something like nginx to load balance (alternately it's really easy for me to modify my program to pick a random port from the range of created instances
Zai00 has quit [Quit: Zai00]
tommyvyo has quit [Quit: Computer has gone to sleep.]
<yaymukund>
The require seems to fail. if I open up irb and try to `require 'myapp'`, that fails too.
DrShoggoth has joined #ruby
froy has quit [Quit: kablam!]
<yaymukund>
oo looks like bundle exec myapp works. I am using rbenv
jrunning1 has quit [Ping timeout: 264 seconds]
<apeiros_>
yaymukund: lib is not in the load path
<apeiros_>
$LOAD_PATH
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
alanp_ has joined #ruby
mildfate has quit [Quit: Leaving.]
g-ram has joined #ruby
<postmodern>
yaymukund, ruby -Ilib bin/command
<apeiros_>
+1
alanp has quit [Disconnected by services]
alanp_ is now known as alanp
digitalcakestudi has quit [Read error: Operation timed out]
<yaymukund>
doesn't the $LOAD_PATH stuff in my gemspec fix that?
Animawish has left #ruby [#ruby]
emergion has joined #ruby
<postmodern>
yaymukund, no, the gemspect is only loaded when building the gem
digitalcakestudi has joined #ruby
theRoUS has quit [Ping timeout: 276 seconds]
jrist-afk is now known as jrist
<yaymukund>
ah
<waxjar>
in development run with the -I flag like postmodern said, if it's installed in a gem, the lib is automatically in the load path, so require 'whatever' will work
<yaymukund>
gonna test a bit more, I think that makes sense
<waxjar>
*installed as a gem (e.g. production)
solidoodlesuppor has quit [Remote host closed the connection]
<yaymukund>
so if I've already run, `gem install myapp`, shouldn't the lib be in the load path?