<reactormonk>
nate_h, default rescue will catch StandardError
<Spooner_>
nate_h, by default, rescue captures StandardError - was that your question?
mephux has joined #ruby
<nate_h>
Spooner_, reactormonk my question was, if you inherit Exception instead of StandardError, will your rescue MyCustomError also catch exceptions that were caused by environmental exceptions and not just your raise statement.
<Gate>
the question is if you have a class inherited directly from exception and rescue your class will it inadvertently catch other exceptions
pettsson has quit [Remote host closed the connection]
<Gate>
IOW is: class CampaignError < Exception; end; begin; rescue CampaignError => e; end; a bad idea
emmanuelux has quit [Remote host closed the connection]
tjbiddle has quit [Ping timeout: 240 seconds]
<jokke>
can i define a method that i can call like this foo << bar?
<Spooner_>
nate_h, No, it won't. You should still just inherit from StandardError though, so that others will rescue it.
backjlack has quit [Remote host closed the connection]
<nate_h>
hmm, can I have multiple rescues in a begin block?
<Gate>
ah, that makes more sense
<Gate>
nate_h: yes
<Spooner_>
jokke, Yes, you need to def <<(x)
kiwnix has joined #ruby
<jokke>
at least def foo<< item doesnt work
<jokke>
ah i need the parentheses
<Spooner_>
If it inherits from Exception, then it will not be caught because no-one catches those ;)
mengu has joined #ruby
<Gate>
don't do the end until after the last rescue
<Muz>
nate_h: yes, as you can essentially use it to provide different pieces of logic depending on the type of error hit
billiam has quit [Quit: Leaving]
<nate_h>
i must have an extra end or something
onemanjujitsu has joined #ruby
cbnoonan has left #ruby [#ruby]
<Spooner_>
nate_h, You can have both multiple rescues and single rescues that rescue more than one type of exception.
advorak_ has joined #ruby
carloslopes has quit [Remote host closed the connection]
fgro has quit [Ping timeout: 264 seconds]
<Spooner_>
But remember that it will try to match the first rescue first, before trying the second, so it might get caught before you expect it to.
<nate_h>
looks like you don't put end after the exception if you have more then one.
jgarvey has quit [Quit: Leaving]
hiroyuki has quit [Remote host closed the connection]
tjbiddle has joined #ruby
mockra has quit [Remote host closed the connection]
hiroyuki has joined #ruby
advorak has quit [Ping timeout: 276 seconds]
<Spooner_>
nate_h, Yeah, only ever one end.
mjs2600 has joined #ruby
FloatingWeed has joined #ruby
Cymurai has quit [Quit: Leaving]
billyoc has quit [Remote host closed the connection]
ahokaomaeha has joined #ruby
mjs2600-phone has quit [Ping timeout: 272 seconds]
<chiel>
hmm.. it should be possible to restart thin with guard right, if files changes?
hiroyuki has quit [Ping timeout: 245 seconds]
mjs2600 has quit [Ping timeout: 272 seconds]
SCommette has quit [Quit: SCommette]
huoxito has joined #ruby
beaky has quit [Quit: Lost terminal]
jpfuentes2 has joined #ruby
tjbiddle_ has joined #ruby
__BigO__ has joined #ruby
the_mentat has quit [Quit: Computer has gone to sleep.]
<chiel>
i have no idea how to use it to restart thin when stuff changes >.<
mnaser has joined #ruby
mmitchell has quit [Ping timeout: 264 seconds]
yshh has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
daemoen has quit [Quit: WeeChat 0.3.9.2]
phantasm66 has quit [Client Quit]
cdt has joined #ruby
<dcope>
Hey all
<dcope>
Is there a more safe version of strptime that will return null if the datetime can't be parsed?
bawigga has quit [Ping timeout: 245 seconds]
dr_neek has joined #ruby
EvanR has joined #ruby
EvanR is now known as Guest57788
echosystm has quit [Quit: leaving]
mxweas has quit [Quit: Computer has gone to sleep.]
adeponte has quit [Remote host closed the connection]
ianbrandt has joined #ruby
__BigO__ has quit [Remote host closed the connection]
daemoen has joined #ruby
pjwal has joined #ruby
<pjwal>
how do I detect at runtime whether i am in 1.8.7 mode or 1.9.3 mode?
h4mz1d has quit [Ping timeout: 264 seconds]
mengu has quit [Quit: Leaving]
<banister`sleep>
pjwal: RUBY_VERSION
<pjwal>
ah, thanks
<postmodern>
RUBY_VERSION > '1.9.'
SCommette has joined #ruby
h4mz1d has joined #ruby
tommyvyo has joined #ruby
aantix_ has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
aantix_ has quit [Client Quit]
ggamel has joined #ruby
mjs2600 has quit [Ping timeout: 272 seconds]
tjbiddle_ has joined #ruby
piotr_ has quit [Ping timeout: 272 seconds]
io_syl has quit [Ping timeout: 252 seconds]
NihilistDandy has joined #ruby
aantix has quit [Ping timeout: 264 seconds]
idkazuma has quit [Remote host closed the connection]
pjwal has quit [Quit: Page closed]
taoru has joined #ruby
io_syl has joined #ruby
spaceships has joined #ruby
reppard has quit [Quit: leaving]
recycle_ has quit [Remote host closed the connection]
tjbiddle has quit [Ping timeout: 244 seconds]
tjbiddle_ is now known as tjbiddle
thams has quit [Quit: thams]
h4mz1d has quit [Ping timeout: 240 seconds]
the_mentat has quit [Quit: Computer has gone to sleep.]
thams has joined #ruby
__BigO__ has joined #ruby
marr has quit [Ping timeout: 264 seconds]
jfelchner2 has quit [Ping timeout: 256 seconds]
mjs2600 has joined #ruby
mikepack has quit [Remote host closed the connection]
dr_neek_ has joined #ruby
dallasm has joined #ruby
swarley| has joined #ruby
onemanjujitsu has joined #ruby
kiwnix has quit [Changing host]
kiwnix has joined #ruby
itsdavem has quit [Remote host closed the connection]
felipe_Brz has joined #ruby
dr_neek has quit [Ping timeout: 272 seconds]
dr_neek_ is now known as dr_neek
rupee has joined #ruby
<felipe_Brz>
i have a ruby source file to which I've added some bogus code intentionally. I now run the code via cmd ruby Network.rb and no errors get printed to the screen, is this right?
DaZ has quit [Read error: Operation timed out]
Hecatic has joined #ruby
<felipe_Brz>
when we run an .rb file on the cli doesn't it get checked for syntax correctness?
agarie has quit [Remote host closed the connection]
DaZ has joined #ruby
dougireton1 has quit [Quit: Leaving.]
DaZ is now known as Guest43651
ebobby has joined #ruby
adkron has joined #ruby
jrist is now known as jrist-afk
tjbiddle_ has joined #ruby
hmarr has quit [Quit: Computer has gone to sleep.]
rowsdower has joined #ruby
stkowski has quit [Quit: stkowski]
JMcAfreak has quit [Ping timeout: 252 seconds]
tcstar has quit [Ping timeout: 244 seconds]
nightsu has joined #ruby
zenloop has quit [Quit: zenloop]
tjbiddle has quit [Ping timeout: 260 seconds]
tjbiddle_ is now known as tjbiddle
macclearich_ has quit [Quit: Leaving.]
pen has joined #ruby
thams has quit [Quit: thams]
subbyyy has joined #ruby
dr_neek_ has joined #ruby
joofsh has quit [Remote host closed the connection]
dhutton has joined #ruby
matti__ has quit [Quit: Reconnecting]
inokenty has quit [Quit: Leaving.]
matti has joined #ruby
matti has quit [Changing host]
matti has joined #ruby
pierre1 has quit [Ping timeout: 260 seconds]
pcarrier has quit [Ping timeout: 264 seconds]
dr_neek has quit [Ping timeout: 272 seconds]
dr_neek_ is now known as dr_neek
thams has joined #ruby
jamescarr has quit [Quit: jamescarr]
mibitzi has joined #ruby
chendo_ has quit [Ping timeout: 264 seconds]
cdt has quit [Ping timeout: 272 seconds]
nightsu has quit [Quit: Leaving]
nightsu has joined #ruby
__BigO__ has quit [Remote host closed the connection]
<aaronmacy>
I have an array of integers, and I'm trying to remove all integers from the array that aren't consecutive with at least one other integer in the array. So if I have the array [1,2,4,5,7], I want to return [1,2,4,5]. Here's what I have so far (it just returns the original array): https://gist.github.com/amacy/4719476#file-gistfile1-rb
Niamkik has joined #ruby
thams has quit [Quit: thams]
<jokke>
aaronmacy: what is consecutive?
<unstable>
razieliyo: Check out #gosu
pierre1 has joined #ruby
<razieliyo>
unstable: thanks
<jokke>
aaronmacy: ?
<aaronmacy>
jokke: in this case, x and y would be consecutive if x + 1 = y or if x - 1 = y
<jokke>
ah
onemanjujitsu has quit [Quit: onemanjujitsu]
<jokke>
okay
Bosox20051 has quit [Quit: Leaving]
<aaronmacy>
That gist has the latest attempt (I can't figure out why it's not working)
<aaronmacy>
#vim on Freenode has almost 900 users in it right now, FYI
<jokke>
aaronmacy: yes, i asked the question some 10 mins ago, and nothing
<aaronmacy>
ah
<jokke>
strike that
<jokke>
just got an answer :D
angusiguess has quit [Ping timeout: 276 seconds]
<aaronmacy>
tim pope to the rescue
Virunga has quit [Remote host closed the connection]
mattbl has joined #ruby
ner0x has quit [Remote host closed the connection]
ner0x has joined #ruby
nari has joined #ruby
tenderlove has quit [Remote host closed the connection]
pdamer has quit [Quit: pdamer]
Monie has quit [Quit: Quit]
dhutton has quit [Quit: Leaving]
<[Neurotic]>
Heya, if anyone is familiar with writing custom filters for rake-pipeline, is there an easy way to get the current output directory in `generate_output` ?
mmitchell has joined #ruby
reppard has joined #ruby
mattbl has quit [Client Quit]
itsdavem has joined #ruby
bl3k has joined #ruby
mibitzi has quit [Quit: Leaving]
itsdavem has quit [Remote host closed the connection]
mattbl has joined #ruby
nathan28 has joined #ruby
itsdavem has joined #ruby
<nathan28>
i'm pulling my hair out on this one, i'm trying to set up a sinatra app run out of nginx in a chroot, but can't quite figure out how to get passenger to load up a config.ru properly from that chroot
Niamkik_ has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
<nathan28>
i've got rvm set up for systemwide usage too
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
ttt has joined #ruby
razieliyo has quit [Remote host closed the connection]
mmitchell has quit [Ping timeout: 244 seconds]
<nathan28>
should i just attempt to manually move over the gems into the chroot?
Niamkik has quit [Ping timeout: 276 seconds]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
joeycarmello has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
itsdavem has quit [Remote host closed the connection]
wr has joined #ruby
techlife has quit [Ping timeout: 276 seconds]
mhf has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
mhf has joined #ruby
michaelmartinez has joined #ruby
nfk has quit [Quit: yawn]
Guest43651 is now known as DaZ
onemanjujitsu has quit [Quit: onemanjujitsu]
icole has quit [Remote host closed the connection]
joeycarmello has joined #ruby
rupee has quit [Ping timeout: 252 seconds]
techlife has joined #ruby
halogenandtoast has quit [Quit: halogenandtoast]
mattbl has quit [Quit: This computer has gone to sleep]
pen has quit [Remote host closed the connection]
arya has quit [Ping timeout: 276 seconds]
angusiguess has joined #ruby
mattbl has joined #ruby
NiteRain has quit [Ping timeout: 246 seconds]
chrisan has quit [Ping timeout: 276 seconds]
Hanmac2 has quit [Ping timeout: 246 seconds]
nathan28 has quit [Quit: leaving]
chrisan has joined #ruby
drumroll has joined #ruby
<drumroll>
k I'm having a hell of time with ruby install still
<drumroll>
got rvm installed, ran "rvm requirements"
hakunin_ has quit [Remote host closed the connection]
<ryanf>
in general I'm not a huge rabl fan, but it sounds like exactly what you are looking for
yshh has joined #ruby
Umren has quit [Read error: Connection reset by peer]
c0rn has quit [Ping timeout: 246 seconds]
elico has joined #ruby
divout has quit [Ping timeout: 260 seconds]
<sabooky>
ryanf: I tried messing with that.. but it doesn't play too nice with OpenStruct objects
<sabooky>
I might be able to get rabl to work, but seems overly complicated and ugly. What I'm trying to do is create simple to read/write json templates that allow inheritanc
<sabooky>
inheritance*
Spooner_ has quit [Quit: Leaving]
<sabooky>
Is there a templating language that would be easy to work with (for generating json outside of rails)
ebobby has quit [Quit: Lost terminal]
c0rn has joined #ruby
dougireton has joined #ruby
ggamel has quit [Remote host closed the connection]
Cymurai has joined #ruby
<krz>
I've got {"bad"=>"true", "bar"=>"true", "foo"=>"true"} whats a good way to check if the keys have "foo" or "bar"?
<havenwood>
krz: hash.keys.any? { |k| k =~ /foo|bar/ }
<krz>
is there another way without having to use regexp?
joofsh has quit [Remote host closed the connection]
halogenandtoast has quit [Quit: halogenandtoast]
kpshek has quit [Ping timeout: 248 seconds]
hbpoison has joined #ruby
divout1 has quit [Ping timeout: 272 seconds]
Cork has joined #ruby
dallasm has quit [Remote host closed the connection]
txdv has quit [Read error: Connection reset by peer]
txdv has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
bigmac has joined #ruby
h4mz1d has quit [Ping timeout: 276 seconds]
iamjarvo1 has quit [Quit: Leaving.]
kmurph has quit [Quit: kmurph]
spaceships has quit [Quit: leaving]
billiam has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
<billiam>
I'm trying to use PTY.spawn to deal with an interactive prompt (that isn't guaranteed to be there). Is there a way to tell when the prompts are complete and I'm getting 'real' standard out again?
thams has joined #ruby
dougireton has quit [Quit: Leaving.]
joeycarmello has joined #ruby
derick_skibotn has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
liquid-silence has quit [Ping timeout: 264 seconds]
dougireton has joined #ruby
liquid-silence has joined #ruby
liquid-silence has quit [Read error: Connection reset by peer]
liquid-silence has joined #ruby
liquid-silence has quit [Read error: Connection reset by peer]
divout has joined #ruby
dmiller has quit [Ping timeout: 252 seconds]
rvmeier has quit [Quit: Leaving]
uris has quit [Quit: Leaving]
mneorr has quit [Ping timeout: 245 seconds]
dougireton has quit [Client Quit]
cupakromer has quit [Quit: Computer has gone to sleep.]
zenloop has joined #ruby
quest88 has joined #ruby
Retistic has quit [Quit: Retistic]
txdv has quit [Read error: Connection reset by peer]
txdv has joined #ruby
dougireton has joined #ruby
Cymurai has quit [Quit: Leaving]
fphilipe has joined #ruby
billy_ran_away has quit [Ping timeout: 246 seconds]
Jon30 has quit [Ping timeout: 255 seconds]
billy_ran_away has joined #ruby
rippa has joined #ruby
xpen has joined #ruby
goraxe has joined #ruby
billiam has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
goraxe has quit [Client Quit]
otters has quit [Ping timeout: 244 seconds]
tjbiddle has joined #ruby
browndawg has joined #ruby
bigmac has quit [Quit: Leaving]
alex__c2022_ has joined #ruby
jasond has quit [Ping timeout: 246 seconds]
sinusss has joined #ruby
thams has quit [Quit: thams]
alex__c2022 has quit [Read error: Connection reset by peer]
alex__c2022_ is now known as alex__c2022
mahmoudimus has quit [Quit: Computer has gone to sleep.]
a_a_g has joined #ruby
elico has quit [Ping timeout: 276 seconds]
elico has joined #ruby
bradleyprice has quit [Remote host closed the connection]
nignaztic has joined #ruby
cableray has quit [Ping timeout: 256 seconds]
yojimbo_ has quit [Quit: This computer has gone to sleep]
goganchic has joined #ruby
c0rn has joined #ruby
Myconix has quit [Read error: Connection reset by peer]
SQLDarkly has quit [Read error: Connection reset by peer]
Elhu has joined #ruby
techlife has joined #ruby
ryanf has quit [Quit: leaving]
mneorr has joined #ruby
FloatingWeed has joined #ruby
FloatingWeed has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
plotter has quit [Ping timeout: 272 seconds]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ahokaomaeha has joined #ruby
po has joined #ruby
sinusss has quit []
mneorr has quit [Remote host closed the connection]
Xeago has joined #ruby
cparen has quit [Quit: cparen]
cha1tanya has joined #ruby
po_ has quit [Ping timeout: 272 seconds]
uzzer has joined #ruby
kmurph has quit [Quit: kmurph]
Al__ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
uzzer has left #ruby [#ruby]
browndawg has joined #ruby
cdt has joined #ruby
toekutr has quit [Remote host closed the connection]
lupine has quit [Ping timeout: 264 seconds]
lele has joined #ruby
po_ has joined #ruby
sepp2k has joined #ruby
<shevy>
dumdedum
<shevy>
what alternatives are there other than using yaml for storing data, in ruby ?
bigkevmcd has quit [Quit: Ex-Chat]
bigkevmcd has joined #ruby
<tobiasvl>
JSON?
po has quit [Ping timeout: 272 seconds]
havenwood has joined #ruby
alup has quit [Ping timeout: 260 seconds]
main has joined #ruby
ozgura has joined #ruby
taoru_ has quit [Remote host closed the connection]
taoru has joined #ruby
wreckimnaked has joined #ruby
blaxter has joined #ruby
<Hanmac_>
xml ? :D
main has quit [Max SendQ exceeded]
kristofers has joined #ruby
po has joined #ruby
main has joined #ruby
zeade has joined #ruby
osaut has quit [Quit: osaut]
anderse has joined #ruby
po_ has quit [Ping timeout: 244 seconds]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
ushijima has joined #ruby
<ushijima>
hi
nkr has joined #ruby
zeade has quit [Ping timeout: 252 seconds]
Spami has quit [Client Quit]
noxoc has joined #ruby
buibex has joined #ruby
havenwood has quit [Remote host closed the connection]
Vainoharhainen has joined #ruby
lupine has joined #ruby
po_ has joined #ruby
lancepantz is now known as lancepantz_
pavilionXP has joined #ruby
sepp2k has quit [Ping timeout: 272 seconds]
TomyLobo has joined #ruby
po has quit [Ping timeout: 272 seconds]
<shevy>
hmm
<ushijima>
?
<shevy>
ushijima no, my hmm is in response to what tobiasvl and especially Hanmac wrote
<shevy>
xml ... :\
<ushijima>
lol
JonnieCache has joined #ruby
kerframil has joined #ruby
kerframil has quit [Changing host]
kerframil has joined #ruby
xbayrockx has joined #ruby
Hanmac_ has quit [Ping timeout: 245 seconds]
xbayrockx is now known as wf2f
nari has quit [Ping timeout: 276 seconds]
xybre has joined #ruby
xybre has quit [Changing host]
xybre has joined #ruby
Xeago has quit [Remote host closed the connection]
<shevy>
Hanmac I now have 2404 registered programs
kerframil has quit [Client Quit]
Xeago has joined #ruby
cdt has quit [Remote host closed the connection]
workmad3 has joined #ruby
plotter has joined #ruby
po has joined #ruby
stetho has joined #ruby
hamed_r has joined #ruby
sepp2k has joined #ruby
backjlack has quit [Remote host closed the connection]
po_ has quit [Ping timeout: 272 seconds]
po has quit [Client Quit]
dcwu has quit [Quit: Leaving.]
kmurph has joined #ruby
kmurph has quit [Client Quit]
slainer68 has joined #ruby
osaut has joined #ruby
chendo_ has joined #ruby
rdark has joined #ruby
elico has quit [Quit: elico]
osaut has quit [Client Quit]
stonevil has joined #ruby
zeade has joined #ruby
jayne_ is now known as jayne
banister`sleep has quit [Remote host closed the connection]
steventux has joined #ruby
banister`sleep has joined #ruby
zeade has quit [Ping timeout: 240 seconds]
elaptics`away is now known as elaptics
frey has joined #ruby
DrCode has quit [Ping timeout: 276 seconds]
<frey>
Hello. I don't know if I should ask this here, but I'm trying to run "rvmsudo passenger-install-apache2-module" and I'm getting the following: "Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. export rvmsudo_secure_path=1 to avoid the warning.[sudo] password for chili:". Do you know how I can fix this?
<frey>
I'm running CentOS 6.3.
<chiel>
JonnieCache: when you mentioned you use guard to restart your app, which server do you use in dev?
jgrevich has quit [Remote host closed the connection]
samphippen has joined #ruby
DrCode has joined #ruby
brianpWins has quit [Quit: brianpWins]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
aaronmacy has quit [Quit: Leaving.]
<shevy>
frey absolutely no idea, never heard of rvmsudo either, seems super specialized knowledge
<Xeago>
shevy: heard of it, it makes sure supo's environment variables and shell config is loaded with rvm stuf
browndawg has quit [Ping timeout: 246 seconds]
<Xeago>
sudo's, I knew there was something weird there xD didn't spot it
<Xeago>
frey: is /etc/sudoers world readable?
<Xeago>
that is the only thing that I can think of
<shevy>
hehe
<Xeago>
otherwise, try #rvm or stuff
xpen has quit [Remote host closed the connection]
nomenkun has quit [Read error: Connection reset by peer]
cdt has joined #ruby
<wf2f>
anyone manipulated .WAV files?
nomenkun has joined #ruby
larmeh_ has joined #ruby
chussenot has joined #ruby
rakl has quit [Quit: sleeping]
baroquebobcat has joined #ruby
<shevy>
apeiros did once
<shevy>
hmm or rather
<shevy>
he used beep instead
arya has quit [Ping timeout: 248 seconds]
oposomme has joined #ruby
<shevy>
if you have a ruby script that cuts .wav files, lemme know!
timmow_ has joined #ruby
TomyLobo has quit [Quit: Standby mode...]
yacks has quit [Remote host closed the connection]
pavilionXP has quit [Read error: Connection reset by peer]
baroquebobcat has quit [Client Quit]
parus has quit [Ping timeout: 260 seconds]
parus has joined #ruby
Hanmac_ has joined #ruby
arturaz has joined #ruby
itsdavem has joined #ruby
arya has joined #ruby
cba has joined #ruby
baphled has joined #ruby
grzywacz has joined #ruby
grzywacz has quit [Changing host]
grzywacz has joined #ruby
gosshedd has joined #ruby
adkron has quit [Ping timeout: 245 seconds]
moos3 has joined #ruby
zeade has joined #ruby
<JonnieCache>
chiel: thin. sometimes puma
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
chrisan has joined #ruby
<shevy>
I think I know why perl is inferior to ruby
<shevy>
it is not fairly flexible however. if I would rewrite this in ruby, I would use one class for this whole procedure
lkba has quit [Ping timeout: 255 seconds]
chussenot has quit [Quit: chussenot]
matchaw_ has quit [Ping timeout: 272 seconds]
<shevy>
and even though I tend to rewrite my classes every once in a while, it always seems more logical and better structured than such free-form writing of scripts
<hoelzro>
shevy: I can tell you as someone who has used for Perl for 7 years that that is not a typical Perl script.
icole has joined #ruby
zeade has quit [Ping timeout: 276 seconds]
AndChat| has quit [Ping timeout: 245 seconds]
<chiel>
JonnieCache: ah, do you have an example of using it with thin? I looked around a bunch but I couldn't find much
<shevy>
can I sneak-view into your perl code hoelzro :D
<chiel>
I've never used guard before so I was a bit... lost.
<Xeago>
shevy: check clintongormley on github/cpan, he does a ton of perl
chussenot has joined #ruby
<shevy>
thanks hoelzro
<chiel>
JonnieCache: i am using sinatra though, so even if that's the case i don't mind :p
<larmeh_>
hi there. does anyone know if the "newcocoa" tool is broken for newer xcode versions (specifically xcode 4.5)? newcocoa -c always fails with "Error while reading `English.lproj/Main.nib'"
<chiel>
seems i don't even have libnotify installed - oops. :p
decoponi_ is now known as decoponio_
<wildcard0>
you may want the -dev[el] too if you're compiling there
decoponio has quit [Ping timeout: 260 seconds]
Akuma has joined #ruby
<chiel>
yea
shock_one has quit [Remote host closed the connection]
decoponio_ is now known as decoponio
poikon_ has joined #ruby
<chiel>
wonder if i will have to recompile ruby now ;_;
<chiel>
that would be somewhat annoyinh.
<wildcard0>
probably not
Liothen has quit [Remote host closed the connection]
<wildcard0>
probably just the gem
taoru has quit [Remote host closed the connection]
arya_ has joined #ruby
wf2f has quit []
poikon has quit [Ping timeout: 245 seconds]
FloatingWeed has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
roadt_ has joined #ruby
<chiel>
hm, weird, doesn't bundler have an uninstall?
berserkr has joined #ruby
<wildcard0>
you can do like rvm ver@gemset do gem uninstall package
<wildcard0>
or rbenv or whatever you use
FloatingWeed has joined #ruby
arkiver has joined #ruby
hbpoison has quit [Ping timeout: 244 seconds]
roadt__ has quit [Ping timeout: 260 seconds]
cba has quit [Read error: Connection reset by peer]
<chiel>
yea, know i can uninstall just a single gem, just seems weird you cannot uninstall an entire gemset
<wildcard0>
in rvm you can do rvm gemset delete
<wildcard0>
apparently, also rvm gemset empty <gemset>
<wildcard0>
which empties but does not delete
<chiel>
yeah, i use rbenv, they don't have gemsets
moos3 has quit [Quit: Computer has gone to sleep.]
<larmeh_>
hi there. does anyone know if the "newcocoa" tool is broken for newer xcode versions (specifically xcode 4.5)? newcocoa -c always fails with "Error while reading `English.lproj/Main.nib'"
<chiel>
hmm ok, that fixed the libnotify error at least.
buibex has quit [Remote host closed the connection]
<wildcard0>
that's cool
<chiel>
now i just get this when typing exit into guard:
<chiel>
Guard::Puma failed to achieve its <stop>, exception was:
<chiel>
> [#7B6DE74B592C] EOFError: end of file reached
<chiel>
i wonder if i'm supposed to "gracefully" shut down gaurd or something
<wildcard0>
sounds like it missed an end somewhere?
cableray has quit [Quit: cableray]
FloatingWeed has quit [Remote host closed the connection]
<chiel>
yea, but no idea were
tfittsy has quit [Ping timeout: 255 seconds]
buibex has joined #ruby
Kudos_ is now known as Kudos
Kudos has quit [Changing host]
Kudos has joined #ruby
niklasb has joined #ruby
eka has joined #ruby
zerba has joined #ruby
<shevy>
hmm if it would miss an end, would it not report another error?
<shevy>
but when you look into config.log, it may be that another .so file is instead broken, and thus the check for whether gtk works or not, is failing
gosshedd has quit [Quit: Lost terminal]
kmurph has joined #ruby
<Hanmac_>
shevy i think ruby syntax error messages should be more help full ... an newbee mybe does not know the diff between $end and kEND
<shevy>
so in fact, gtk might work perfectly well, just some other .so file could be broken
<shevy>
yeah Hanmac_
lkba has joined #ruby
<shevy>
but ruby is the way how matz designed it :-)
* lupine
vaguely recalls someone on here talking about a ruby/irb patch to allow perl-like "\<var-name>" to get hold of a reference to a variable. anyone know what I'm talking about ?
b1rkh0ff has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
<shevy>
no idea lupine but sounds interesting
kmurph has quit [Client Quit]
b1rkh0ff has joined #ruby
<lupine>
it's not particularly google-able ^^
ferdev has quit [Ping timeout: 248 seconds]
Xeago has joined #ruby
<shevy>
yeah... like how to google for the splat operator when you dont know it is called splat :D
<tobiasvl>
haha :)
b1rkh0ff has quit [Read error: Connection reset by peer]
<shevy>
I didn't know about the splat operator at all for about 2 years of using ruby myself
<Xeago>
atleast you will never forgot what it is called when you know it
<shevy>
Xeago, yeah, it looks like a squished bug on the screen ... *
<shevy>
*splat*
<shevy>
like in this old batman comic series on tv
<shevy>
*ZING* *ZACK*
<banister`sleep>
lupine: it was a patch by charliesome
<wildcard0>
lupine: neat. all the way down or are you calling c libs below?
<lupine>
ours is not to wonder why, etc
<lupine>
wildcard0, I've got a C extension that wraps libvnc
<csmrfx>
charliesome: no self-evaluating parser, true
<shevy>
tobiasvl I think php is an awful language, but I can understand why it became popular. you can really start building things quickly, even if they suck. I can't tell you how long it took me to get better in perl alone :(
<wildcard0>
lupine: cool that sounds like a neat app
<charliesome>
csmrfx: writing functional style code is a total pain in the ass in javascript
<lupine>
that's all stalled at the moment on getting a void * from one C extension (the libvnc wrapper's framebuffer) to another C extension (smoke bindings for Qt, constructor for QPainter, etc)
<wildcard0>
php can be used horribly. but it does run some fairly huge sites, given lots of hackers
<shevy>
yeah, lots of workers can build a pyramid
<csmrfx>
charliesome: it's not really a functional language
<tobiasvl>
wildcard0: neither of those things are pro or contra for the language though
<lupine>
there are Evil Hacks Aplenty - I could encode the pointer as a Fixnum and pass it into ruby, which could then pass it down to the other extension, for instance - but I don't really want to do that
<shevy>
today, noone builds a pyramid anymore though :(
<wildcard0>
apparently, lots 20 workers can rewrite php in c++ :)
<charliesome>
csmrfx: that's one of the hallmarks of lisp dialects, that they're mostly impure functional languages
<tobiasvl>
any language can be used horribly (maybe not python) and any language can be used for cool projects
justsee has quit [Quit: Leaving...]
<charliesome>
tobiasvl: oh believe me, python can be used horribly
<wildcard0>
tobiasvl: well it's possible to scale it. and it's possible to maintain a large codebase
<csmrfx>
php became popular because apachers needed something to script with, and php was that (still is?) heap of libraries for templating
<wildcard0>
any language can be used horribly
<banister`sleep>
lupine: why not just use a wrapped struct
mhf has joined #ruby
<csmrfx>
charliesome: yeah well, ecma is still moving
fermion has joined #ruby
<ogamita>
wildcard0: the difference is whether when you use the language horribly you get programs that crash and can't be sold, or whether you get programs that can show a nice splash screen and be sold.
<lupine>
banister`sleep, I'm using them. I don't see how it solves the problem, though
<ogamita>
I'd tend to favor the former.
<banister`sleep>
lupine: it's just nicer than storing the pointer in a fixnum :)
hbpoison has joined #ruby
<wildcard0>
heh that's an entertaining way to look at it
<csmrfx>
Standardization is a wonderful thing!
<lupine>
banister`sleep, that was for the purposes of getting the pointer from one C extension to another
<csmrfx>
Ruby should copycat EcmaScripts strategy, standards wise
<csmrfx>
Them Europeans love to write standards, after all
<banister`sleep>
lupine: yeah i would still pass a data wrapped struct, but no biggy
<lupine>
it's evil enough that I'm not going to pursue it, of course
<charliesome>
csmrfx: ruby is iso standardized
<csmrfx>
wait what did I miss
<shevy>
csmrfx well they have an ISO standard since a few years now
<charliesome>
csmrfx: ISO/IEC 30170:2012
<shevy>
and mruby does not follow it completely hahaha :D
justsee has joined #ruby
justsee has quit [Read error: Connection reset by peer]
<csmrfx>
Holy Cow
<ogamita>
ISO is International, not European.
gift has quit [Remote host closed the connection]
<csmrfx>
Nice
<shevy>
https://github.com/mruby/mruby - "mruby is the lightweight implementation of the Ruby language complying to (part of) the ISO standard."
h8R has quit [Ping timeout: 264 seconds]
<charliesome>
however MRI is to the ruby standard what JScript is to ecmascript
hamed_r has quit [Ping timeout: 272 seconds]
h8R has joined #ruby
<csmrfx>
I think JScript is dead
<chiel>
anyone know how to customise the colours guard uses to do tmux notifications?
<shevy>
wildcard0, sure, for the time, people want to buy games with perfect graphics, but after you did that a few dozen times, I just can't help but wonder that this *must* become boring
<shevy>
there were so many old games, that had awful graphics, but playing them was really fun
iMath has quit [Ping timeout: 276 seconds]
iMath1 has joined #ruby
mhf has joined #ruby
<shevy>
but I guess noone wants to buy games with shitty graphics :(
<csmrfx>
There is Only One Game. Thou Shalt Not Play Other Dwarf Fortresses.
havenwood has joined #ruby
<csmrfx>
(except maybe Nethack)
<wildcard0>
heh
<wildcard0>
i wrote a cube game last year
<wildcard0>
it was cute
<wildcard0>
i got to play with sparse octrees
banister`sleep is now known as hero_unit
<wildcard0>
shevy: a lot of those games still are coming out. you just have to look places that aren't gamestop :/
mhf has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 244 seconds]
lolzie has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
filipe has joined #ruby
iMath1 has quit [Ping timeout: 276 seconds]
nomenkun has quit [Ping timeout: 264 seconds]
rubyist has quit [Quit: Leaving]
poikon_ has quit [Remote host closed the connection]
nomenkun_ has joined #ruby
poikon has joined #ruby
dickery has joined #ruby
gestahlt has quit [Read error: Connection reset by peer]
gestahlt has joined #ruby
templaedhel has joined #ruby
carloslopes has quit [Ping timeout: 272 seconds]
zigomir has quit [Quit: zigomir]
nathan28 has joined #ruby
locriani_ has quit [Read error: Connection reset by peer]
lurch_ has joined #ruby
<nathan28>
i've got a nub rvm question, if i've got a multi-user rvm install set up, anyone in the rvm group can install gems for systemwide use, right?
locriani has joined #ruby
havenwood has quit [Remote host closed the connection]
<wildcard0>
nathan28: that's how it's supposed to work
yacks has joined #ruby
<lurch_>
hi, can ruby retrieve array environment variables? ie: export VAR=(a b c); ruby -e "puts ENV['VAR']"
io_syl has quit [Ping timeout: 264 seconds]
<nathan28>
wildcard0: so what's the preferred method to get a systemwide gem? i'm tripping on passenger on this VPS i'm building
megha has joined #ruby
<wildcard0>
so that's not how i do it
<wildcard0>
but it's a reasonable way to do it
<wildcard0>
personally, i set a per-user rvm up in the user running the app
<wildcard0>
that way, developers cant change prod stuff without going through the build system
<JonnieCache>
with every version of osx and xcode it gets harder to build stuff
<shevy>
JonnieCache come to the dark side
plotter has joined #ruby
<shevy>
come to linux!
<shevy>
and besides, apple likes llvm, doesn't it all get better now? :-)
<wildcard0>
osx. great ssh terminal
<Hanmac_>
we have cookies and daemons :D
<shevy>
lol wildcard0
<lurch_>
shevy: thanks, but it was bash syntax. it's how i would run it from a shell script to keep the quoting intact
hbpoison has quit [Ping timeout: 256 seconds]
carloslopes has joined #ruby
<shevy>
lurch_ hmmm
<JonnieCache>
shevy: lots of stuff, including ruby, doesnt work properly with llvm
<shevy>
JonnieCache :(
<wildcard0>
llvm is quite annoying, especially the way apple has it built
<JonnieCache>
im now trying to build an old version of gcc that actually works with ruby and it wont build that because of xcode and its insanity
<wildcard0>
it takes me like 2 days to get a mac set up to be uesful for me
hbpoison has joined #ruby
<shevy>
wildcard0, hah... when I install a linux distribution from 0, the first thing I do is get ruby
<shevy>
after that, I use ruby scripts to setup the machine
<JonnieCache>
its a joke. thing is its worth the bother of setting up osx because the desktop env actually works
dickery has left #ruby [#ruby]
<wildcard0>
you know, i cant find a linux distro im super happy with either
ada2358 has quit [Read error: Operation timed out]
<shevy>
wildcard0 me neither, they all stink and suck. I end up compiling from source, but that is also annoying and one gets a lot of hassle, and way too much time spent doing that
io_syl has quit [Quit: Computer has gone to sleep.]
<shevy>
gobolinux was cool, but the devs did not have enough time past-student life
chussenot has quit [Quit: chussenot]
<JonnieCache>
in conclusion im going to go and live in a forest and eat rabbits. my operating system will be a big knife.
<shevy>
hahaha
<wildcard0>
i kinda want something between centos and gentoo. arch maybe? if you could upgrade without it breaking every time
<shevy>
ok how could this work wildcard0
<wildcard0>
haha
<shevy>
I know of a swedish guy who went from gentoo to arch, he said arch is the best distribution
<shevy>
2 years later he went back to gentoo because, and I quote him, "gentoo gave me more control, and I needed that"
<JonnieCache>
lol
<JonnieCache>
he doesnt need more control he needs other things to do with his time
<JonnieCache>
gentoo is insane
<wildcard0>
well for a single dev box, gentoo is kinda spectacular
<wildcard0>
i often need to compile webservers with weird flags
<shevy>
--enable-kinky ?
<wildcard0>
heh
<shevy>
on that note, I hate how apache change its default config format
<wildcard0>
often for certain kinds of proxies or asymetric routing
clooth has joined #ruby
<wildcard0>
but for a production box, i really dont use much besides centos
<wildcard0>
so i end up with 1 gentoo box and 100k centos boxes
<JonnieCache>
scientific linux is supposedly better than centos these days
filipe has quit [Ping timeout: 246 seconds]
<JonnieCache>
its CERN's redhat fork
<wildcard0>
i've heard that. but i already have a crapload of centos boxes
blaxter has quit [Ping timeout: 246 seconds]
huoxito has joined #ruby
<wildcard0>
and it's not THAT much better
<JonnieCache>
yeah best to keep the homogeneity
ferdev has joined #ruby
ferdev_ has joined #ruby
pskosinski has joined #ruby
<wildcard0>
ive been experimenting with arch in vms
fir_ed has quit [Ping timeout: 272 seconds]
<wildcard0>
so i never have to worry about upgrading
<wildcard0>
and when i've broken it horribly, just deleting it and pulling up a new one
guns has quit [Ping timeout: 248 seconds]
<shevy>
man you guys are geeks
<shevy>
the only true operating system is the RubyOS
<wildcard0>
heh
arkiver has quit [Quit: Leaving]
<wildcard0>
work requires me to be a geek. it's better than the last shop where they wanted me to be all corporate
<wildcard0>
java itself isn't so bad. and i like the jvm. it's just the way they were doing it drove me crazy
pen has quit [Remote host closed the connection]
ada2358 has joined #ruby
<wildcard0>
like it was the only answer to anything
<gestahlt>
Hi, stupid question: How the hell do i do math? Ive got 2 strings var1 and var2. I have to replace a few chars in both of the strings (.gsub("s","")) and when i print both strings, it looks good.. The numbers i need.
advorak_ has quit [Remote host closed the connection]
<Xeago>
gestahlt: convert them to integers: #to_i
<gestahlt>
But when i try to do math like var1.to_i + var2.to_i it wont work
<JonnieCache>
wildcard0: well there are gains to be had from that kind of system, consolidation or whatever. the problem is when nontech managers with no perspective get carried away with it for its own sake
<wildcard0>
it just wasn't the right culture for me
<wildcard0>
im sure it works for them. htey make asstuns of money
<gestahlt>
7Lets say var1 is 12 and var2 is 14, my addition gives me 1214. I can reason with this kind of logic but its not the number i need
Nisstyre-laptop has joined #ruby
swarley| has quit [Ping timeout: 256 seconds]
cha1tanya has quit [Quit: Leaving]
<JonnieCache>
gestahlt: with strings, + joins them together
<JonnieCache>
gestahlt: if you convert them back to numbers by calling .to_i on them like Xeago said, + will add the numbers like you expect
<gestahlt>
JonnieCache: But since i did a type conversion with .to_i it shouldnt be joining both vars, should it?
<gestahlt>
I did call .to_i
gyre007 has joined #ruby
jeer has joined #ruby
<wildcard0>
gestahlt: can you pastebin your code?
<gestahlt>
oh, both vars are also an array
<gestahlt>
Sure
<himsin>
hi, this is not working for me, <%= f.select :guests, (1..15).to_a, selected: 3 %> but it is still by default set to 1
<JonnieCache>
gestahlt: ah well + also concatenates arrays
daniel_- has quit [Ping timeout: 252 seconds]
alup has joined #ruby
buibex has joined #ruby
<JonnieCache>
himsin: #rubyonrails
<gestahlt>
Internet SLOW! Me ANGRY!
<Hanmac_>
gestahlt: when you do: var1 + var2 or var1.to_i + var2.to_i the objects are all unchanged ... even when you do var1+=var2 its does create an new object and the orginal var1 is still the same as before
<himsin>
JonnieCache, ok. I tried there but nobody responded
pavilionXP has joined #ruby
<gestahlt>
Hanmac_: So you mean i have to create a new var with the explicit type of int?
s1n4 has joined #ruby
<gestahlt>
basetyp
<Hanmac_>
no
ryanh has quit [Quit: Computer has gone to sleep.]
<Hanmac_>
ruby does all for you
buibex has quit [Remote host closed the connection]
<Hanmac_>
you could do var3 = var1.to_i + var2.to_i
osaut has joined #ruby
<tobiasvl>
gestahlt: ruby is dynamically typed
<Xeago>
gestahlt: #to_i returns a new object, it doesn't modify the object it is being called on
<gestahlt>
pastebin.com/SVCptjuR
<Hanmac_>
ruby is also strong typed so you cant change the type of an object
hamed_r has joined #ruby
itsdavem has quit [Remote host closed the connection]
<tobiasvl>
gestahlt: use puts instead of print, that automatically adds a \n on the end (also you don't have to concatenate two hardcoded strings ;)
anderse has quit [Quit: anderse]
<gestahlt>
thanks tobi
<charliesome>
Hanmac_: ah but you can!~
<Hanmac_>
charliesome yeah but only I :D
<Hanmac_>
with one execption: you could make an Masqurade object, that react like an object of an different type ... but with this you still cant fool C-Functions
kazi1 has joined #ruby
<charliesome>
IO.reopen
kazi1 has left #ruby [#ruby]
<gestahlt>
Foolish fools got fooled by a fool that fooled the fools
blaxter has joined #ruby
<gestahlt>
Okay, so, what did i do wrong?
<gestahlt>
More ketchup?
backjlack has joined #ruby
angusiguess has joined #ruby
<wildcard0>
gestahlt: you can do wininstall[7].to_i + ...
<Hanmac_>
with reopen yeah you could redirect something, but its still an IO object ... for sample you cant turn an A object into an B object without delegating (and masquading)
kpwz has quit [Ping timeout: 240 seconds]
<wildcard0>
also winboot[4].to_i
daniel_- has joined #ruby
lolzie has quit [Ping timeout: 245 seconds]
<Hanmac_>
gestahlt beware ! gsub! can return NIL if nothing is changed
yshh has joined #ruby
roadt__ has joined #ruby
<wildcard0>
ya you may want to ( .. .gsub! ... || 0 )
<wildcard0>
so it always returns a real number. or check the output and toss and fail if approperiate
hero_unit has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Hanmac_>
no i mean that he should use gsub without !
nfk has joined #ruby
vlad_starkov has joined #ruby
berserkr has quit [Quit: Leaving.]
angusiguess has quit [Ping timeout: 264 seconds]
<wildcard0>
hmm. oh ya, he doesn't use that variable again
<wildcard0>
i guess he doesn't need it changed
roadt_ has quit [Ping timeout: 246 seconds]
<Hanmac_>
such ! methods should be used in something like that val.gsub!("s","") ? "changed" : "unchanged"
divout has quit [Remote host closed the connection]
<shevy>
I really dont like the ! methods that much
clocKwize has joined #ruby
<shevy>
I love ? methods though
gestahlt has quit [Read error: Connection reset by peer]
kpwz has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
kmurph has joined #ruby
n1x has quit [Quit: Ex-Chat]
kmurph has quit [Client Quit]
<Hanmac_>
i only use ? methods when they are not part of a attr_accessor pair
gestahlt has joined #ruby
<gestahlt>
waaaaa
pu22l3r has joined #ruby
<wildcard0>
im bad. i'll monkey patch ? methods in
<gestahlt>
wildcard0: but i did it just like that?
arya has quit [Ping timeout: 276 seconds]
<wildcard0>
i added a String#is_time? the other day
pu22l3r has quit [Remote host closed the connection]
<gestahlt>
wildcard0: validation happens before. its a field that cannot be empty
<wildcard0>
gestahlt: see the gsub! above
pu22l3r has joined #ruby
a_a_g has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
templaedhel has joined #ruby
<gestahlt>
wildcard0: i removed the gsub completly. to_i leaves out the char which i tried to remove :)
<shevy>
wildcard0 it's nice, String#is_time?, only problem is when you build software based on that, and wish to distribute it to other people
<gestahlt>
but it doesnt change the result...
arya has joined #ruby
<wildcard0>
shevy: this is only for a particular app. it's definitely not for distribution
<shevy>
what I would love to have would be a simple way to restore to the default-ruby state again
<wildcard0>
gestahlt: which variable is empty?
kmurph has joined #ruby
<shevy>
so all custom modifications to the core ruby classes are reset
<gestahlt>
wildcard0: NONE. Both have a value (9755532 and 20244)
<gestahlt>
and i need those added up
dustint has joined #ruby
<gestahlt>
the latter one was 20244s where i removed the s with gsub. I left gsub out and applied .to_i and it gives me the value without the s.. means that the to_i call worked
hal52 has joined #ruby
<wildcard0>
so after the .to_i calls, what does it output?
<hal52>
hello
<gestahlt>
it outputs 975553220244
yacks has quit [Ping timeout: 246 seconds]
<gestahlt>
if i add both values with .to_i
<gestahlt>
just like in the pastebin
ttt has quit [Remote host closed the connection]
Al__ has quit [Ping timeout: 272 seconds]
<wildcard0>
on like 6?
<wildcard0>
*line 6?
rmartin has joined #ruby
pdamer has joined #ruby
Al__ has joined #ruby
a_a_g has joined #ruby
<gestahlt>
wildcard0. nevermind, i found the issue
<gestahlt>
problem was in front of the computer
templaedhel has quit [Ping timeout: 240 seconds]
hybris has joined #ruby
moos3 has joined #ruby
<Hanmac_>
ah an Layer8 problem
Al___ has quit [Ping timeout: 272 seconds]
<wildcard0>
haha
<wildcard0>
ok
<gestahlt>
I relied on the print output.. which i didnt do a newline. replaced prints with puts and.. well yeah, now it makes sense..
<heftig>
bcakpe
<gestahlt>
Im working on a vm and im doing everything in nano without syntax highlighting.. so.. waaaaah
nightsu has joined #ruby
lessless has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
<Hanmac_>
shevy infomation: i may get my libarchive-ruiby faster into work ... BUT with some features for the moment left out ... Archive.new("data.tar") << "file" << "file" << file" << "file" guess how many files are added and inside the tar when it was empty at the begining?
fphilipe_ has quit [Remote host closed the connection]
<matti>
;p
idkazuma has joined #ruby
<hero_unit>
Hanmac_: guten tag.
mengu has quit [Read error: Connection reset by peer]
<lessless>
I just want to call SingleTool.useful_action(something) :)
fphilipe has quit [Read error: Connection reset by peer]
mengu has joined #ruby
yacks has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
<Hanmac_>
matti yeah but you know what you mean
fphilipe has joined #ruby
dmiller has quit [Ping timeout: 256 seconds]
poikon_ has quit [Remote host closed the connection]
m8 has joined #ruby
<matti>
Hanmac_: I know ;]
<Hanmac_>
heftig have you an better idea how it should look like ? (please notic what i want to show with my sample)
poikon has joined #ruby
<heftig>
just Archive.new("data.tar").add "file1", "file2", "file3"
<heftig>
or a = Archive.new("data.tar"); a.add "file"; a.add "file", a.add "file"
<heftig>
s/,/;/
<Hanmac_>
heftig, hm that does not work because of optional parameters (usefull stuff to filter) , but .add(["file1","file2","file3"]) odes
daniel_- has quit [Ping timeout: 264 seconds]
<heftig>
make optional parameters a hash, and you can filter them out
<heftig>
.add "file1", "file2", "file3", foo: true, bar: false
<heftig>
the last element of args (assuming def add(*args)) will be a hash, so just pop it off the array
odyssey4me has quit [Read error: Connection reset by peer]
<Hanmac_>
heftig, they are allready an hash, but shere is a second param that does not fit into the hash
tetley has quit [Ping timeout: 246 seconds]
theRoUS has joined #ruby
theRoUS has joined #ruby
odyssey4me has joined #ruby
mengu_ has quit [Client Quit]
<heftig>
and that would be?
poikon_ has joined #ruby
poikon is now known as Guest35219
poikon_ is now known as poikon
vlad_starkov has quit [Remote host closed the connection]
fedza has joined #ruby
<Hanmac_>
.add io, "path"
matchaw_ has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
<Hanmac_>
its for IO objects, because they does not have an name/path itself
Guest35219 has quit [Ping timeout: 272 seconds]
<Hanmac_>
PS: about the feature that is maybe important but i currently need to drop: adding files into an achive does will (currently) not overwrite existing files
mark_locklear has joined #ruby
poikon_ has joined #ruby
<shevy>
Hanmac_ 4x the same file
<shevy>
because you used << four times
<shevy>
ruby can be so logical :D
kmurph has quit [Quit: kmurph]
cantonic has quit [Quit: cantonic]
vlad_starkov has quit [Ping timeout: 252 seconds]
larmeh_ has left #ruby [#ruby]
<Hanmac_>
shevy yeah and do you would suspect that it in the archive is four times the same file?
girija_ has quit [Ping timeout: 272 seconds]
<heftig>
Hanmac_: i don't see why .add io, "name", "realfile", io2, "name2" wouldn't work
xemu has joined #ruby
<heftig>
i guess you could make them [io, "name"], "realfile", [io2, "name2"] if you want one element per file
<Hanmac_>
heftig ... because it does make the parsing more complicated ...
poikon has quit [Ping timeout: 272 seconds]
<Hanmac_>
hm ok with the second one we chould talk about
pdamer has joined #ruby
bjeanes- has quit [Ping timeout: 248 seconds]
yshh has quit [Remote host closed the connection]
alta has quit [Ping timeout: 248 seconds]
cantonic has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
NiteRain has quit [Ping timeout: 246 seconds]
alta has joined #ruby
backjlack has quit [Read error: Connection reset by peer]
Asher2 has joined #ruby
bjeanes has joined #ruby
Asher has quit [Read error: Connection reset by peer]
<Hanmac_>
shevy so you are okey with that it does not overwrite older entries currently?
NiteRain has joined #ruby
backjlack has joined #ruby
<Xeago>
is it "I was then told that derp happened" or 'than' ?
angusiguess has joined #ruby
<tobiasvl>
that
<tobiasvl>
then
<Xeago>
thanks
<chiel>
hmm.. wonder if i can get guard to somehow start in 3 directories at the same time :D
slainer68 has joined #ruby
Al___ has joined #ruby
a_a_g has quit [Quit: Leaving.]
Jon30 has joined #ruby
moos3 has joined #ruby
pdamer has quit [Quit: pdamer]
mklappstuhl has joined #ruby
joofsh has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
Al__ has quit [Ping timeout: 272 seconds]
x0F_ is now known as x0F
NiteRain has quit [Ping timeout: 246 seconds]
<mklappstuhl>
hey, I'm using Sidekiq for background job processing and for some wierd reason my queue is not namespaced under "sidekiq:" which makes my tests fail :sad-panda:. The setup is correct according to sidekiqs docs and everything else like stats are properly namespaced
<mklappstuhl>
Any ideas?
haxrbyte_ has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
haxrbyte has quit [Ping timeout: 252 seconds]
anderse has joined #ruby
anderse_ has joined #ruby
m8 has quit [Quit: Sto andando via]
matchaw_ has joined #ruby
dallasm has joined #ruby
jeer has quit []
inokenty has joined #ruby
anderse has quit [Ping timeout: 255 seconds]
anderse_ is now known as anderse
invisime has joined #ruby
invisime has quit [Client Quit]
yacks has quit [Ping timeout: 244 seconds]
subbyyy has joined #ruby
jeer has joined #ruby
chussenot has quit [Quit: chussenot]
zenloop has joined #ruby
ebouchut has quit [Quit: Quitte]
jeer has quit [Client Quit]
mjs2600 has quit [Ping timeout: 272 seconds]
baphled has joined #ruby
chussenot has joined #ruby
s1n4 has quit [Quit: leaving]
segv- has joined #ruby
yacks has joined #ruby
hero_uni_ has joined #ruby
sambio has joined #ruby
hero_unit has quit [Ping timeout: 272 seconds]
TomJ_ has joined #ruby
TomJ_ has quit [Changing host]
TomJ_ has joined #ruby
sayan has joined #ruby
invisime has joined #ruby
baphled has quit [Ping timeout: 276 seconds]
zenloop has quit [Quit: zenloop]
ffranz has joined #ruby
TomJ has quit [Ping timeout: 264 seconds]
TomJ_ is now known as TomJ
Nisstyre-laptop has quit [Ping timeout: 276 seconds]
apeiros_ has joined #ruby
halogenandtoast has joined #ruby
jerius has joined #ruby
otters has joined #ruby
zigomir has joined #ruby
nightsu has quit [Ping timeout: 272 seconds]
pdamer has joined #ruby
mikecmpbll has joined #ruby
subbyyy has quit [Ping timeout: 255 seconds]
Mo0O_ has quit [Quit: leaving]
pdamer has quit [Client Quit]
tommyvyo has joined #ruby
templaedhel has joined #ruby
tommyvyo has quit [Remote host closed the connection]
sayan has quit [Read error: Connection reset by peer]
renanoronfle has quit [Quit: This computer has gone to sleep]
iamjarvo has joined #ruby
<shevy>
Hanmac_ if << is use, I think I would assume that it is four times in the archive
zeade has joined #ruby
<shevy>
Hanmac_ this is how Array works in ruby too, there is a .uniq method to kill duplicates, perhaps you could have such a method too, to sanitize the dataset in the archive if wanted
<Xeago>
what do you call it if something lasts longer than expected?
<Hanmac_>
currently << o is only an alias-like for .add o
<shevy>
I think too much automatism may be bad, unless a user could fine tune all of it
samphippen has joined #ruby
<shevy>
yeah, that seems fine
<shevy>
Xeago lazy
<shevy>
:)
<Xeago>
shevy: agreed
<shevy>
Xeago "post-life" or "survived expected life time" or something
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<Xeago>
did I miss something, got dc'd?
<shevy>
I often eat food that is over shelf life
<Hanmac_>
shevy: i may add an flag into the options for :overwrite, and when its true it automatic takes care of
ananthakumaran has quit [Read error: Connection reset by peer]
<Xeago>
shevy: occasionally, depends on the food tho..
<shevy>
I have eggs in my fridge that are "bad" since 2 months
<shevy>
but I broke one open and it looks (almost) perfect
<Xeago>
ewyhhh
<shevy>
I think if I boil it, I could still eat it
<Xeago>
boil it in shell atleast
<Hanmac_>
shevy did you do the water test?
<shevy>
hehe 2 months is a bit much... but a few weeks for eggs should be ok
<shevy>
Hanmac hmm no, I just broke one open to have a look
<Xeago>
oh the water test, a recommendation
<shevy>
it depends on the egg, I also had cheaper eggs that died quickly
<shevy>
they were all fluffy inside from some kind of fungus
<shevy>
I think these eggs here had a thicker casing
<Hanmac_>
"Eggs: now with fluffy stuff"
<Xeago>
shevy: anyways... what is it called?
<shevy>
ok enough about #eggs :D
<shevy>
Xeago, is there a word for that?
<shevy>
"post life-expectancy"
Tbbe has quit [Quit: Tbbe]
<shevy>
"senesence" - for aging hahaha"
<shevy>
oops, senescence
<Xeago>
The meeting had a longer post life-expectencay?
<shevy>
no
<Xeago>
I figured already :P
<shevy>
write
Konboi has quit [Remote host closed the connection]
<shevy>
"The boring meeting took way longer than fucking expected."
hbpoison has quit [Ping timeout: 264 seconds]
rippa has joined #ruby
<shevy>
or use... "outlasted"... or some other sugar-coated wording
havenwood has joined #ruby
<Xeago>
"depending on the time taken for other graduates."
<shevy>
I mean, people would expect a meeting to have a start time, and an end time
<shevy>
"The graduate was especially dumb, so the meeting took much longer than expected until this git answered all of our questions properly."
<Xeago>
shevy: in this particular case it is not concerning a meeting, rather a series of presentations
<Xeago>
that may or may not last as long as the estimated time
<shevy>
Hanmac_ yeah I swear... fungus... funghi build fluffy things, some kind of spores and networks
templaedhel has quit [Ping timeout: 256 seconds]
<shevy>
Xeago, to me it sounds very much as if you try to perfect everything
hiroyuki has joined #ruby
<Xeago>
nah, just rather over questioning me
ttt has joined #ruby
<shevy>
you need an english style guide book!
balr0g has joined #ruby
* balr0g
says hello to all... \o
<Xeago>
I need a bigger vocabulary
<shevy>
go into a library, pick one, sit down, read it for 2 hours, that's it
<shevy>
Xeago, no, really... english in essence is a very simple language
<shevy>
sure it has lots of words, more than the german language has, but in essence good english tries to remain concise and up to the point
<Xeago>
uhu, I am feeling limited in my ability to express my thoughts
<shevy>
and only when you are able to express what you want in a simple way, should you add a sugar-coat to them
danielpcox has joined #ruby
<shevy>
I too!
<Xeago>
shevy: I am failing to express in a simple way..
<shevy>
especially when I try to speak english
<Muz>
The irony of the grammatical error there.
<shevy>
I then watch monty python videos
aknagi has joined #ruby
<shevy>
The awesome contribution of Muz there.
yacks has quit [Quit: Leaving]
<JonnieCache>
shevy: mycelium
<JonnieCache>
is what youre thinking of
<shevy>
JonnieCache ah yeah
<shevy>
the scary, body-invading mycelium
<shevy>
I always think of that when I watch invasion of the body snatchers again
<JonnieCache>
hmm if its invading your body you might want to shower more often
ttt has quit [Ping timeout: 256 seconds]
<JonnieCache>
oh is that what happens in that movie. havent seen it
<shevy>
haha
<shevy>
yeah, it was more a plant though... and it cloned the human it invaded
yojimbo_ has quit [Quit: Leaving]
erlingur has joined #ruby
lessless has quit [Quit: system needs to be rebooted]
buibex has joined #ruby
__BigO__ has joined #ruby
mengu has joined #ruby
v0n has joined #ruby
hbpoison has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
Goldman82 has quit []
<shevy>
how do you guys write documentation for your ruby projects (which you would then publish as gems)?
krz has joined #ruby
<apeiros_>
yard + prosa-text
havenwood has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 256 seconds]
<hal52>
i read the wxWidget HtmlWindow supports basic css. does this mean that wxruby also supports it? its just a wrapper i guess? so the underlying thing should be the same which means it should support it, right?
<Hanmac_>
shevy i use rdoc ... but it should be parsable for yard too
renanoronfle has joined #ruby
<shevy>
hmm going to read up on yard
Lubinski has joined #ruby
Lubinski has joined #ruby
Lubinski has quit [Changing host]
<Hanmac_>
hal52 maybe it is not nessary ... i dont know if wxruby allready support htmlWindow, maybe is the wx-version of wxruby to old ... (maybe the function was not ported?)
tfittsy has quit [Ping timeout: 245 seconds]
zeade has quit [Read error: Connection timed out]
plotter has joined #ruby
hbpoison has joined #ruby
aquaranto has joined #ruby
<hal52>
Hanmac_: i see
<Hanmac_>
apeiros_ they do it again, they relased an new ruby patchlevel version
sailias has joined #ruby
tfittsy has joined #ruby
arya has quit [Ping timeout: 248 seconds]
sayan has joined #ruby
arya has joined #ruby
<gestahlt>
This might not be ruby related (it is to my project tho) but do you know what sectors 0 to 2048 are from a harddrive? Is this MBR?
<gestahlt>
Hm, im a bit uncertain what method i should try to apply to do a partition image backup (manually)
erry is now known as yrre
__BigO__ has quit [Remote host closed the connection]
osaut has quit [Read error: Connection reset by peer]
<gestahlt>
Would it make sense to backup 0 - 2048?
<Hanmac_>
hm i dont know if its still <2048 on GPT disks
osaut has joined #ruby
<gestahlt>
Windows uses 2 partitions.. a 100MB boot partition where the bootloader is located and a seperate windows installation
<gestahlt>
in some cases its the same
TomyLobo has joined #ruby
<Hanmac_>
gestahlt you could do an backout of the entire harddisk ... including all partion and MBR and other stuff
yrre is now known as erry
cupakromer has joined #ruby
ananthakumaran has joined #ruby
jrafanie has joined #ruby
<gestahlt>
Hanmac_: Thats what i try to avoid. The issue is, we got here plenty of systems that need reimaging (we do refurbishing here) and i try to create a tool to optimize this whole process (I will open source it, dont worry)
hbpoison has quit [Ping timeout: 245 seconds]
<mklappstuhl>
hey, I'm using Sidekiq for background job processing and for some wierd reason my queue is not namespaced under "sidekiq:" which makes my tests fail :sad-panda:. The setup is correct according to sidekiqs docs and everything else like stats are properly namespaced. Any ideas where to look?
<gestahlt>
Hanmac_: The issue with writing pure images are plenty. Example: dd images take very long and are very huge, you cannot restore an image to a smaller harddrive and so on
jgarvey has joined #ruby
mephux has quit [Excess Flood]
<gestahlt>
I thought of a method to use the best of 2 worlds
jonahR has joined #ruby
<gestahlt>
Like WIM i will just copy the windows files into an archive and create the windows install partition dynamically
<melty>
lol
* workmad3
prefers the process of using automated installation scripts and configuration management, rather than disk imaging
pdamer has joined #ruby
<gestahlt>
For OEM Recovery partitions i will use DD
<apeiros_>
does somebody know how I exclude specific files from a git diff?
<gestahlt>
workmad3, autmated installers take very long and we have to install OEM Crapware where you cant automate the setup process
<Hanmac_>
i tryed to make an VM out of an installed Windows7 but i failed :(
<hoelzro>
apeiros_: diff between index and working copy?
<hoelzro>
or two revisions?
<apeiros_>
two revisions
<workmad3>
gestahlt: sucks to be you then? :P
<workmad3>
gestahlt: sorry, couldn't help that :)
mephux has joined #ruby
<workmad3>
gestahlt: in fairness, I've never attempted, or even wanted to attempt, automatic installation of windows
<gestahlt>
workmad3: Not really. I kinda like working on such stuff. Im trying to help a different department. I also work in my own with automated installers, just i can keep the bloated oem crapware out :)
<Xeago>
apeiros_: probably the easiest is to checkout a revision
<gestahlt>
workmad3: I did and its a pain in the ass. Thankfully my own department i only have to do solaris. For my colleage (for which i write that stuff) its Windows :). I might want to include later a nice interface to create automated installs, but first priority is getting a fast and small windows image
<Xeago>
and then git diff othercommit that.file
<apeiros_>
Xeago: ?
<apeiros_>
I'm comparing two revisions, and I have a couple of files which change which I don't want to show up in that diff
<gestahlt>
And automated installs have also the disadvantage that you do not backup OEM REcovery partitions
<gestahlt>
as said, i want the systems factory fresh. It might be a good idea to save the MBR for this
Lubinski has quit [Read error: Connection reset by peer]
<workmad3>
apeiros_: are they files you always want to not diff (because they're binary or something) or just this specific diff?
<apeiros_>
this specific diff
shock_one has joined #ruby
quest88 has joined #ruby
<apeiros_>
hand-porting a couple of changes :-/
<Xeago>
you could just specify the files you want a diff of?
<Xeago>
if you have a shell that supports globbing that might be easier
<apeiros_>
well, I could first generate a list of all changed files, then manually remove those I don't want, and supply the result
answer_42 has joined #ruby
balr0g has quit []
ebouchut has joined #ruby
<gestahlt>
Say, since the MBR is also holding record of the partition table, if i restore the mbr to a harddrive of different size, thus different partition sizes, would be a real mess, wouldnt it?
<lectrick>
Can anyone think of a reason why my YAML.load_file chokes on files with comments in them (lines delimited with #)?
v0n has quit [Ping timeout: 255 seconds]
yshh has quit [Ping timeout: 272 seconds]
<apeiros_>
lectrick: no
<lectrick>
I looked at the yaml spec and sure enough, comments are supposed to be ignored
<workmad3>
apeiros_: that's probably the easiest
<lectrick>
all I get from YAML.load_file('path/to/file/with/just/comments.yaml') is: false
<lectrick>
apeiros_: ^
<gestahlt>
Hell, the mbr should be created with your partitioning tool anyway, so i can save myself the pain
<apeiros_>
lectrick: care to paste the file?
<lectrick>
also, good morning apeiros_
<apeiros_>
it probably consists of multiple documents
<workmad3>
apeiros_: there's plenty of filter options for git-diff, but there dosen't seem to be a way to exclude specific files (rather than include)
<apeiros_>
.load_file only loads the first document
<apeiros_>
workmad3: indeed
<Xeago>
apeiros_: you could just stash the files you don't want to show up
<apeiros_>
there seem to be config options, though
<apeiros_>
Xeago: as said, comparing two revisions
<apeiros_>
nothing left to stage
<Xeago>
ah, missed that
<apeiros_>
lectrick: that's empty?
<lectrick>
I apologize for not using gist, I don't like the fact that every gist is now tied to me as like a repo
solidoodlesuppor has joined #ruby
Lubinski has joined #ruby
spinagon has joined #ruby
Lubinski has quit [Changing host]
Lubinski has joined #ruby
<lectrick>
apeiros_: well... like I said it has 2 comments, YAML.load_file chokes on it returning 'false'
<apeiros_>
for whatever reason YAML defaults to false, not nil
<apeiros_>
lectrick: expected behavior
<apeiros_>
that's not "choking"
<apeiros_>
YAML.load('') # => false
itsdavem has quit [Remote host closed the connection]
rippa has quit [Read error: Connection reset by peer]
jrajav has joined #ruby
<lectrick>
apeiros_: well, Bundler is now choking on it because of this line: @local_config = File.exist?(local_config_file) ? YAML.load_file(local_config_file) : {}
<apeiros_>
lectrick: you probably should not have an *empty* yaml file
<lectrick>
later on it tries @local_config[thing] and chokes because false is not indexable :)
<lectrick>
apeiros_: well, I wanted to remember those configs for when I want to turn them on...
<apeiros_>
bundler obviously expects the yaml file to contain at least a hash
<apeiros_>
and yours doesn't
frankkany has joined #ruby
<lectrick>
apeiros_: fine, but still, this used to work and suddenly yaml doesn't understand comments :O
<apeiros_>
this is not about the comments. it's about your yaml file being empty.
hamed_r has quit [Quit: Leaving]
Targen has quit [Ping timeout: 240 seconds]
breakingthings has joined #ruby
<lectrick>
apeiros_: this file has worked for a while now, but I did some gem reinstallation yesterday
<gestahlt>
HRM
<gestahlt>
I cant devide
<lectrick>
or rather some rvm gemset finagling
<gestahlt>
decide
Coolhand has quit [Remote host closed the connection]
frankkany has quit [Remote host closed the connection]
<gestahlt>
Basically, i dont need the MBR when i do partitioning anyway?
<apeiros_>
lectrick: look, you can keep haggling over it or just fix your yaml file. a plain '{}' will be sufficient
codecop has quit [Remote host closed the connection]
<lectrick>
apeiros_: heh look i can just rename the file to config.bak and be done with it. I just wanted a way to memoize the setting names without acting on them
<lectrick>
apeiros_: for context this is a .bundler/config file FYI
tcstar has quit [Ping timeout: 252 seconds]
kstephens has quit [Ping timeout: 260 seconds]
NiteRain has joined #ruby
<workmad3>
apeiros_: something like 'git diff `find . -type f -not -name "first-file" -and -not -name "second-file" | xargs`
kstephens has joined #ruby
pcarrier has joined #ruby
<apeiros_>
workmad3: wow, that's ugly. I think I'll go with `git diff A B -- manually generated file list`
megha is now known as baba
<workmad3>
apeiros_: guess it depends how big the file list is :)
fourq has joined #ruby
stopbit has joined #ruby
baba has quit [Quit: WeeChat 0.4.0]
guiguidoc has joined #ruby
<shevy>
hmmm
zeade has joined #ruby
<shevy>
how would I turn or display a string like "3.33333333333333" into a string of "3.33" ideally in a very short way?
dallasm has quit [Remote host closed the connection]
<hoelzro>
shevy: would '435.3333333' be displayed as '435.33'?
<shevy>
hmm yeah... I think I am fine by displaying only at-maximum 2 post-digit positions
<apeiros_>
you want proper round or is truncate ok?
Goles has joined #ruby
<hoelzro>
shevy: I would to_f and use printf
<apeiros_>
i.e., "6.666666" -> "6.67" or "6.66" ?
<hoelzro>
er, sprintf
<shevy>
apeiros_ hmmmm good question...
<shevy>
both would be fine right now, but I have not thought about it much, I'd only need something quick for "14.52%"
<shevy>
and right now it would be "14.5222222" which wouldn't be that useful for displaying
<hal52>
i would like to ask something not directly related to ruby: does someone of you work as a freelancer? currently i am working from 8 to5, and i need to have better working times. preferably working from home. leaving my currently company is not a big problem for me.
arya has joined #ruby
<hal52>
but i would like to talk with someone who is working from home and/or freelancing, or working per project
dmiller has quit [Ping timeout: 276 seconds]
yshh has joined #ruby
carloslopes has quit [Remote host closed the connection]
daniel_- has joined #ruby
elico has joined #ruby
jtharris has joined #ruby
failshell has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
quest88 has quit [Quit: quest88]
casheew has quit [Read error: Connection reset by peer]
haxrbyte_ has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby
casheew has joined #ruby
haxrbyte has joined #ruby
jlast has joined #ruby
<Xeago>
btw, just to be off topic, sight range here is 1.5 meters
<aknagi>
hal52: I'm working from home as a freelancer. I could get much more as a contractor though.
havenwood has joined #ruby
tylersmith has joined #ruby
k610 has joined #ruby
<matti>
Xeago: ?
xk_id_ has quit [Read error: Connection reset by peer]
<lessless>
shevy, it's in the separate file in the /lib directory
notmoose has joined #ruby
renanoronfle has joined #ruby
<notmoose>
hi guys im working with the Nokogiri xml reader, does anyone here have experience with it?
<hoelzro>
notmoose: I've used it once or twice
poikon_ has joined #ruby
<Hanmac_>
notmoose i use it for one of my gems
roadt__ has quit [Ping timeout: 245 seconds]
<shevy>
lessless what shall I say to that, the file works on the pastie :)
poikon_ has quit [Remote host closed the connection]
<lectrick>
any way to get any ruby code I run to run my .irbrc file first?
<lectrick>
sort of a global ruby config
<shevy>
lectrick can you reformulate this
poikon_ has joined #ruby
<shevy>
you want to eval the content of irbrc before running a file like foo.rb ?
jamescarr has quit [Quit: jamescarr]
<shevy>
hmm let's try to find out how irb calls its config
<shevy>
IRB.start(__FILE__)
hbpoison has joined #ruby
Tbbe has quit [Ping timeout: 264 seconds]
<shevy>
IRB.conf
generalissimo has joined #ruby
wyhaines has joined #ruby
asdfqwer has joined #ruby
<shevy>
IRB.run_config <--- this one sounds good
poikon has quit [Ping timeout: 272 seconds]
chussenot has quit [Ping timeout: 272 seconds]
chussenot__ is now known as chussenot
<lectrick>
shevy: yeah something like that. I suppose these things only work in IRB by default
ananthakumaran1 has joined #ruby
zastern has joined #ruby
<shevy>
good
<shevy>
I hate IRB code
<shevy>
please look at this:
<shevy>
@TRACER_INITIALIZED = false
<lectrick>
lol
<shevy>
@CONF[:LOAD_MODULES] = []
<shevy>
anyway, I think the relevant code is in init.rb
<shevy>
IRB.init_config(ap_path)
ananthakumaran has quit [Read error: Connection reset by peer]
<shevy>
you should be able to call this from the commandline
<shevy>
via -e or something like that
<shevy>
omg...
<shevy>
look at this:
<Hanmac_>
huch i must have done something shitty with irb because i get "deadlock detected" :D
<shevy>
while opt = ARGV.shift
pcarrier has quit []
<shevy>
it uses ARGV directly inside a method! :(
<lectrick>
shevy: lol. hey, it's a very console-jockey way to code, back in the day
<shevy>
if you run a big ecosystem of different .rb files, there is only one ARGV when you startup
<shevy>
I *always* assign argv to internal variables, usually @ivars, and only after sanity checking
<shevy>
$LOAD_PATH.unshift(*load_path)
<shevy>
print $!.class, ": ", $!, "\n"
<shevy>
it also uses for loops
<shevy>
for err in $@[0, $@.size - 2]
<shevy>
lectrick, quiz ... what does the above ^^^ code do?
n1x has quit [Quit: Ex-Chat]
<Hanmac_>
shevy have you ever tryed to run irb inside of irb? :D
<shevy>
Hanmac, I think that works, yeah... subsessions or?
<lectrick>
shevy: well, i'm sure that if you looked at your own 5-year-old code, you'd... wait, FOR loops? FOR LOOPS ARE INEXCUSABLE
<lectrick>
:)
<shevy>
lectrick I do these things with my old code
v0n has joined #ruby
joshman_ has joined #ruby
elplatt has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
<shevy>
- improve it to make it better
<shevy>
- rewrite it to make it better
<Hanmac_>
shevy yes and it is more cool when you do "irb Object.new"
<shevy>
- stop using it
<shevy>
- deleting it
plotter has quit [Ping timeout: 264 seconds]
<shevy>
that works?
<shevy>
lemme try
<lectrick>
shevy: it iterates through that gloooobal? is that a global? $@ is ruby magic innit. and it sets err to each of whatever the hell that is, in turn
beliveyourdream has quit [Remote host closed the connection]
<csmrfx>
ah well, ultimately it is a CS problem and applies poorly to wetware
Al__ has joined #ruby
mmitchell has joined #ruby
hit has left #ruby [#ruby]
b1rkh0ff has joined #ruby
beaky has joined #ruby
Al__ has left #ruby [#ruby]
<beaky>
hello
hit has joined #ruby
<lectrick>
csmrfx: but do you get it? if wetware is a purely materialistic process, it is theoretically computable (in its entirety, given all the variables... even if theoretically this is very large). And if it's computable, it is subject to the halting problem. Fin.
chrishunt has joined #ruby
Coolhand has quit [Remote host closed the connection]
grokking_tries has joined #ruby
<grokking_tries>
hello
<beaky>
hello
<lectrick>
hallo
Richmond has joined #ruby
<grokking_tries>
i'm trying to grok trie prefix search in ruby
roadt_ has quit [Ping timeout: 272 seconds]
hbpoison has joined #ruby
<csmrfx>
lectrick: I kind of agree, but the conclusion is incorrect. We only know about the material aspects of our wetware (at least so far), but still to claim that it is even theoretically possible to reduce into a computational problems is fantasy
<lectrick>
anyway, back to my original original question- there's no way to have a bit of ruby as part of a "global ruby config", I guess
<lectrick>
csmrfx: but if it is completely material, then it must be computable, otherwise countless physics/chemistry simulations we've been depending on are wrong :O
Banistergalaxy has quit [Ping timeout: 256 seconds]
Coolhand has joined #ruby
<csmrfx>
lectrick: has someone proven it is computable? we cant even model couple of drops of water reliably for one single second....
<lectrick>
csmrfx: my conclusion is that it's not completely material, but what else I cannot say. :)
emocakes has joined #ruby
arya_ has joined #ruby
<csmrfx>
approximating reality, 's all
<lectrick>
csmrfx: we can't model a single living cell yet, that would be an achievement
tylersmith has quit [Quit: tylersmith]
<emocakes>
hey all
arya has quit [Ping timeout: 248 seconds]
<csmrfx>
(cell has amazing levels of complexity)
geekbri has joined #ruby
tcstar has joined #ruby
<lectrick>
yep
<hero_uni_>
emocakes: this is all a dream, sleep peacefully. Your mother has a head of long white hair.
<emocakes>
I'm wondering if it is possible to create a multi-level hash from transposing an array?
<lectrick>
biology's original GPU
poikon_ has quit [Remote host closed the connection]
<csmrfx>
heh protein folding math au naturel
<lectrick>
I mean general processing unit
<emocakes>
i can create your standard hashmap, but i would like something with multiple levels, would it be best for me to use #map instead then?
<csmrfx>
emocakes: yes, probably
poikon has joined #ruby
<emocakes>
danke csmrfx
<lectrick>
csmrfx: yeah i happen to be running worldcommunitygrid.org on my machines :)
<csmrfx>
emocakes: for multiple levels you'd want a recursive array walk
<Hanmac_>
emocakes: "no one wants to build a wall .... or a airport or a train station" :P
<chiel>
emocakes: ah, fair enough, may as well then!
<chiel>
ta
<emocakes>
pretty much, paid holiday for me the gf
<shevy>
Hanmac_ haha... politicans are the same everywhere
cantonic has quit [Quit: cantonic]
<csmrfx>
18 days until 2.0
geggam has quit [Remote host closed the connection]
<emocakes>
oh chiel, one thing is new GC
jlast has quit [Remote host closed the connection]
poikon has quit [Read error: Connection reset by peer]
<emocakes>
chiel, I forgot you did ruby
<emocakes>
I somehow assume that all mootools guys use PHP and whip themselves at nigh
dhruvasagar has joined #ruby
<chiel>
emocakes: yea, tinker is written in ruby :p
<emocakes>
:p
poikon has joined #ruby
<chiel>
hell no
* csmrfx
trembles anti-pre-
<emocakes>
yup, I remember about tinker
<emocakes>
i just found out they have a thing called sqlfiddle :O
chrishunt has joined #ruby
<chiel>
yea
<chiel>
i'm moving away from mysql for tinker :p
<Hanmac_>
emocakes how did you fly to berlin? with a dreamliner? :P
<chiel>
cause the data is not really relational anymore
<emocakes>
chiel, I played with mongodb and mongoid
Banistergalaxy has quit [Ping timeout: 276 seconds]
Spooner has joined #ruby
<ShellFu>
So I wrote an ENC for puppet in ruby using mongodb as a backend. Im going to share it with you folks, and remember im a unix admin so dont beat me to unmerciful :)
<emocakes>
and its pretty noice, but im back to postgresql and using hstore for things which aren't always there
<JonnieCache>
ShellFu: do they not have speed cameras in your country?
<ShellFu>
Im so fast the speed camera catches nothing but a blur and what they think is a middle finger!
<ShellFu>
They dont have em on freeways/highways/tollways
<ShellFu>
though sometimes they air patrol and you get a ticket in the mail, but meh.... what can ya do?
<JonnieCache>
ah right no indeed. here (uk) everyone drives as fast as they like on motorways (autobahn) as well
plotter has joined #ruby
<JonnieCache>
not quite 200kph though
<Hanmac_>
shevy what do you think about topaz? :P
<JonnieCache>
lol
<JonnieCache>
i think its blown his mind
Banistergalaxy has quit [Ping timeout: 276 seconds]
gestahlt has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121129151842]]
a_a_g has quit [Quit: Leaving.]
<Hanmac_>
i wonder where is the backward like python interpreter in ruby :D
kpshek has quit []
keymone has joined #ruby
Banistergalaxy has joined #ruby
otters has joined #ruby
poikon has quit [Remote host closed the connection]
poikon has joined #ruby
ahokaomaeha has quit [Ping timeout: 276 seconds]
roadt_ has joined #ruby
seagreen has quit [Ping timeout: 248 seconds]
danielpcox has joined #ruby
stormetrooper has joined #ruby
Neomex has joined #ruby
s1n4 has quit [Quit: leaving]
Neomex has quit [Client Quit]
<workmad3>
JonnieCache: also they don't on the m62
<workmad3>
JonnieCache: because of the average speed camera trap along the roadworks :P
Al__ has joined #ruby
<JonnieCache>
its relatively rare to have speed cameras on motorways though isnt it?
rismoney has quit [Ping timeout: 252 seconds]
<JonnieCache>
roadworks are an obvious exception
Banistergalaxy has quit [Ping timeout: 276 seconds]
<workmad3>
JonnieCache: they're also adding in more, it's what makes the 'managed motorway sections' different... they have permanent speed cameras installed along those gantries that also give info
rismoney has joined #ruby
<Hanmac_>
there are also speed cameras on walking areas ... while you can trigger it with fast running :P
<JonnieCache>
oh yeah those things
<workmad3>
JonnieCache: but yeah, other than that, relatively rare... more common to have points where police have set up a speed trap
roadt__ has quit [Ping timeout: 272 seconds]
dr_bob has joined #ruby
rismoney has quit [Remote host closed the connection]
rismoney has joined #ruby
<JonnieCache>
tbh i have little sympathy for people who get upset over speed limits. the saving on journey time you get with a 10mph increase in speed is not enough to justify the increased risk to other road users
hbpoison has joined #ruby
Banistergalaxy has joined #ruby
<workmad3>
JonnieCache: same... although I don't drive :)
<Hanmac_>
about the permanent speed cameras, some of them could rotate so "Beware!" :P
<JonnieCache>
me neither. that probably contributes to my lack of concern for drivers issues :)
<workmad3>
Hanmac_: why would they need to rotate?
<Hanmac_>
workmad3 normaly one speed camera can only see one direction ... to look into the other direction they rotate
Morkel has quit [Quit: Morkel]
fphilipe has joined #ruby
<workmad3>
Hanmac_: they have the gantries on both sides of the motorway
<workmad3>
Hanmac_: and each side of the motorway is one-direction only
<Hanmac_>
sometimes they dont have the space or money for two cameras ...
<workmad3>
Hanmac_: the places they're installing them on motorways, they do
smeb has left #ruby [#ruby]
tjbiddle has joined #ruby
<workmad3>
Hanmac_: especially as we're talking 6 lanes, so just rotating generally isn't enough
Vert has quit [Read error: Connection reset by peer]
<Hanmac_>
workmad3 they do them on other ways too (i mean them in the city)
<workmad3>
Hanmac_: yeah, city cameras are different :)
bean has joined #ruby
<workmad3>
Hanmac_: although the standard ones in the UK are fixed-direction... they also tend to be mounted at the side of the road rather than in a gantry over it
i_s has joined #ruby
<notmoose>
is it possible to make global variables in ruby?
otters has quit [Ping timeout: 252 seconds]
poikon has quit [Remote host closed the connection]
rismoney has quit [Ping timeout: 264 seconds]
<rking>
notmoose: All day every day. $foo = 1
poikon has joined #ruby
petersaints has joined #ruby
<notmoose>
rking: so $foo = 1 is global and foo = 1 local?
<rking>
notmoose: I'll pretend to spare you the warning about "Are you sure you want a global?" while veiling it in a mention saying that I'm not going to mention it within a comment saying I'm pretending to do that.
<rking>
notmoose: Yep
Kuifje has quit [Read error: Connection reset by peer]
kold has joined #ruby
<v0n>
does this work: a = this_may_raise() rescue this_succeed_anyway()
<v0n>
?
jpfuentes2 has joined #ruby
thams has joined #ruby
pen has joined #ruby
<Mon_Ouie>
It might. It rescues any StandardError exception.
Kuifje has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
hbpoison has quit [Ping timeout: 256 seconds]
poikon_ has joined #ruby
hbpoison has joined #ruby
halogenandtoast has quit [Quit: halogenandtoast]
<Mon_Ouie>
(And in that case the expression evaluate to the part after the rescue)
osaut has quit [Quit: osaut]
<Mon_Ouie>
It can hide certain bugs though, so it's usually a bad idea not to specify the type of exception you want to rescue
Vert has joined #ruby
casheew has quit [Read error: Connection reset by peer]
maskact has joined #ruby
<JonnieCache>
and it can be slow so dont do it all over the place just because its convenient
<JonnieCache>
ie. inside loops in html templates
<v0n>
you're right Mon_Ouie, I prefer do_stuff();rescue ThisException; ensure_stuff(); retry; end
poikon_ has quit [Remote host closed the connection]
guiguidoc has quit [Remote host closed the connection]
xclite has quit [Remote host closed the connection]
casheew has joined #ruby
<Hanmac_>
v0n ruby has ensure too
poikon_ has joined #ruby
balr0g has quit [Ping timeout: 248 seconds]
poikon has quit [Ping timeout: 272 seconds]
<v0n>
Hanmac_: yep, but doesn't apply here. It's for a "get_or_create" method, where get() might raise, so rescue create() if it does
the_mentat has quit [Ping timeout: 264 seconds]
hydrozen has joined #ruby
seagreen has joined #ruby
* v0n
isn't clear but understands himself
xclite has joined #ruby
seagreen has quit [Max SendQ exceeded]
geekbri has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
poikon has quit [Remote host closed the connection]
<Gate>
sweet
answer_42 has quit [Ping timeout: 276 seconds]
poikon has joined #ruby
Uranio has quit [Quit: while you reading this, a kitty dies]
gosshedd has joined #ruby
kristofers has quit [Read error: Connection reset by peer]
Uranio has joined #ruby
poikon_ has joined #ruby
robacarp has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby
greenysan has joined #ruby
kristofers has joined #ruby
timmow_ has quit [Remote host closed the connection]
poikon has quit [Read error: Operation timed out]
steventux has quit [Ping timeout: 248 seconds]
sayan has joined #ruby
mrsolo has joined #ruby
<relixx>
emocakes: ok, thanks
<havenwood>
shevy: p385 not p384 :P
<havenwood>
oh Ruby version numbers....
robacarp has joined #ruby
robacarp is now known as Guest25206
<havenwood>
semantic versioning ftw?
<shevy>
havenwood hmmmmmm
<shevy>
I am happy
<shevy>
today is a good day
<shevy>
I found out the reason why I could not compile gmp
<shevy>
ABI=32 ./configure
<shevy>
it wants this
<shevy>
yeah havenwood
<shevy>
the link is: ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p385.tar.bz2
<shevy>
but you know why I had p384 there?
kpshek has quit []
<shevy>
go to distrowatch.com and look at the left side box
<shevy>
you will see ruby with this link here: ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p384.tar.bz2
<shevy>
since I was lazy, I copy/pasted that link :\ :/
<shevy>
they have it listed as "ruby ? 1.9.3-p384"
<shevy>
I dunno why
ExxKA has joined #ruby
LouisRoR has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
zerba has quit [Remote host closed the connection]
aaronmacy has joined #ruby
poikon_ has quit [Read error: Connection reset by peer]
poikon has joined #ruby
hukl has joined #ruby
io_syl has joined #ruby
Al__ has quit [Quit: Al__]
imami|afk is now known as banseljaj
dougireton has quit [Quit: Leaving.]
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
aedorn has joined #ruby
iamjarvo has joined #ruby
<havenwood>
shevy: Someone typo'd 374 with 385 to produce 384, betcha.
poikon has quit [Read error: Connection reset by peer]
<shevy>
haha :D
poikon has joined #ruby
Guest25206 has quit [Remote host closed the connection]
Atlantic777 has quit [Excess Flood]
<aedorn>
so.. Topaz.. Ruby on Python ...
mattbl has joined #ruby
adeponte has joined #ruby
Atlantic777 has joined #ruby
Atlantic777 has quit [Changing host]
Atlantic777 has joined #ruby
Virunga has quit [Remote host closed the connection]
abcdefg_ has joined #ruby
graft_ has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
tworker has joined #ruby
purp has joined #ruby
<shevy>
quite insane
pyrac_ has quit [Quit: pyrac_]
Atlantic777 has joined #ruby
Atlantic777 has quit [Excess Flood]
<shevy>
hey... there is one thing in python that is interesting, the docstrings
icole has joined #ruby
<shevy>
I document all my ruby classes
Atlantic777 has joined #ruby
Atlantic777 has quit [Excess Flood]
<shevy>
but I would like to query this information, so that it could then be displayed on commandline, in a generic format
<shevy>
any ideas what to do?
<tworker>
how does the & work when used with collect or map? Like collection.collect(&:to_s)
<shevy>
tworker it somehow magically turns this into a proc which gets called on all the elements
Atlantic777 has joined #ruby
Atlantic777 has quit [Excess Flood]
<lupine>
tworker, it calls to_proc on the symbol, which returns a proc that calls the symbol
aaronmacy has quit [Quit: Leaving.]
Atlantic777 has joined #ruby
Atlantic777 has quit [Changing host]
Atlantic777 has joined #ruby
<lupine>
lambda { send(self) } or some such
Atlantic777 has quit [Excess Flood]
ExxKA has quit [Quit: This computer has gone to sleep]
<tworker>
brb, gotta try that
<lupine>
that gets passed as the block to the collect method
elplatt_ has joined #ruby
Atlantic777 has joined #ruby
Atlantic777 has joined #ruby
Atlantic777 has quit [Changing host]
Atlantic777 has quit [Excess Flood]
Atlantic777 has joined #ruby
Atlantic777 has quit [Excess Flood]
aaronmacy has joined #ruby
F1skr has quit [Quit: WeeChat 0.4.0]
rodj has quit [Quit: Page closed]
sailias has joined #ruby
Atlantic777 has joined #ruby
graft_ has joined #ruby
graft_ has quit [Changing host]
graft_ has joined #ruby
ahokaomaeha has joined #ruby
noxoc has quit [Quit: noxoc]
Atlantic777 has left #ruby [#ruby]
poikon has quit [Read error: Connection reset by peer]
elplatt has quit [Ping timeout: 264 seconds]
elplatt_ is now known as elplatt
poikon has joined #ruby
rismoney has quit [Remote host closed the connection]
<tworker>
are we way off base? ["1","2","3"].collect {|i| :to_i.to_proc }
rismoney has joined #ruby
LouisRoR has joined #ruby
hero_uni_ is now known as hero_unit
pen has quit [Remote host closed the connection]
pen has joined #ruby
relixx has quit [Read error: Connection reset by peer]
relixx has joined #ruby
Targen has joined #ruby
otay has quit [Ping timeout: 245 seconds]
dougireton has joined #ruby
sandGorgon has quit [Quit: Leaving]
chrishough has joined #ruby
vlad_starkov has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
codecop has joined #ruby
dougireton has quit [Client Quit]
ferdev|away has quit [Quit: Leaving...]
buibex has joined #ruby
poikon has quit [Read error: Connection reset by peer]
balr0g has joined #ruby
mklappstuhl has quit [Ping timeout: 245 seconds]
poikon has joined #ruby
<mehwork>
Anyone know why i get this message when i run irb: cannot load such file -- ap
razibog has quit [Ping timeout: 272 seconds]
ferdev- has joined #ruby
poikon has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
<epochwolf>
Are $1 and $! threadsafe?
poikon has joined #ruby
decoponio has quit [Quit: Leaving...]
renanoronfle has quit [Quit: This computer has gone to sleep]
Atlantic777 has joined #ruby
Atlantic777 has quit [Changing host]
Atlantic777 has joined #ruby
hmarr has quit [Quit: Computer has gone to sleep.]
main has joined #ruby
bricker is now known as bricker`LA
bricker`work is now known as bricker
banjara has quit [Ping timeout: 272 seconds]
ferdev- has quit [Read error: Connection reset by peer]
motto has joined #ruby
daniel_-_ has quit [Quit: WeeChat 0.3.9.2]
ferdev_ has joined #ruby
nightsu has quit [Ping timeout: 255 seconds]
Pandaen has joined #ruby
dougireton has joined #ruby
ranjan has joined #ruby
<ranjan>
Hi all, anybody here. i am facing difficulty in serving a rails app in sub-uri using apache reverse proxy. any help
davetherat has quit [Remote host closed the connection]
melty has quit [Remote host closed the connection]
davetherat has joined #ruby
m8 has quit [Ping timeout: 260 seconds]
brandon|work has quit [Ping timeout: 272 seconds]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<mehwork>
epochwolf: cli parsing is usually done in a single thread on startup, then other threads are started
ahokaomaeha has joined #ruby
rodj has joined #ruby
rowsdower has quit [Quit: Konversation terminated!]
<mehwork>
so i think the same goes for other globals like that
<epochwolf>
mehwork: um… $1 for regex and $! for last exception
<mehwork>
i know
brandon|work has joined #ruby
<havenwood>
ranjan: Which Rack web server are you using?
<mehwork>
had to catch myself, because i thought i was in a diff channel at first, but i know :p
_nitti has quit [Remote host closed the connection]
<epochwolf>
mehwork: if I have multiple threads doing regex operations, will they clobber $1, $2, etc.
<ranjan>
havenwood: i tried both with Webrick and thin
Hanmac_ has joined #ruby
<mehwork>
idk, but i would avoid using those all together in that case
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
<epochwolf>
mehwork: so __FILE__ is unreliable as well?
ratcheer has joined #ruby
emmanuelux has joined #ruby
<havenwood>
ranjan: Passenger has a nice Apache module, but I personally like Unicorn.
<mehwork>
for examle, you can use splat instead to assign to a non global
ratcheer has left #ruby [#ruby]
stonevil has quit [Quit: stonevil]
clooth has quit [Quit: clooth]
<ranjan>
do you mean changing the rack web server will fix the issue?
<epochwolf>
mehwork: I know how to work without them.
vlad_starkov has quit [Read error: Connection timed out]
<ranjan>
havenwood: do you mean changing the rack web server will fix the issue?
<epochwolf>
it just makes for verbose code
hybris` has quit [Read error: Connection reset by peer]
<GeekOnCoffee>
epochwolf: you're holding it wrong
<epochwolf>
GeekOnCoffee: thanks
<ranjan>
havenwood: the error i am getting in the log is something related to routing
<GeekOnCoffee>
epochwolf: no problem, any time
<havenwood>
ranjan: No, I was just rambling. Paste a gist of the log?
pyrac has joined #ruby
ahokaomaeha has quit [Ping timeout: 256 seconds]
Virunga has joined #ruby
<havenwood>
ranjan: You actually might want to refer to the Passenger Apache sub-uri instructions just to get the right Rails Apache settings for your virtualhost
<havenwood>
ranjan: There may be Rails specific issues, in which case #RubyOnRails may be more helpful.
<mehwork>
epochwolf: shrug, i haven't done any multi-threading code in ruby. Mainly because i haven't needed to but also would probalby avoid it if i had to since MRI seems to suck at it from what i've read. As always, it requires a deep understanding to do properly
fiyero has joined #ruby
<ranjan>
havenwood: Ok
<epochwolf>
mehwork: I'm looking at jruby for threading
<ranjan>
havenwood: from a basic search i could find that its something related to rails 3 and above
<mehwork>
if anyone has any good resources on understanding writing good threaded code in mri ruby i'd love to read it
templaedhel has joined #ruby
<ranjan>
havenwood: thank you and let me try on #RubyOnRails
templaedhel has quit [Read error: Connection reset by peer]
kpshek has joined #ruby
<mehwork>
yeah jruby is probably the way to go
templaedhe has joined #ruby
Hecatic has quit [Client Quit]
templaedhe has quit [Client Quit]
jrist is now known as jrist-afk
fiyero has quit [Quit: leaving]
LouisRoR has quit [Ping timeout: 272 seconds]
plotter has quit [Remote host closed the connection]
russt has quit [Quit: russt]
neku has joined #ruby
tworker has quit [Quit: leaving]
<mehwork>
when i run: foreman run irb it says: cannot load such file -- ap. Whatever that means. THen i do: puts ENV["RACK_ENV"] and it says: development
<mehwork>
well, irb without foreman says that too. ANy ideas?
* Hanmac_
does not care about threaded code
plotter has joined #ruby
<Muz>
Do you have a .irbrc file in your home directory; mehwork?
<mehwork>
sounds like irb is trying to require some module called ap.rb for some reason
<Muz>
Chances are it's calling 'require "ap"' or similar.
nightsu has joined #ruby
cardoni has joined #ruby
<mehwork>
oh duh, it is
<mehwork>
thanks! ahha i made that 6 months ago when i first attempted ruby. And forgot about it until i resumed learning ruby last week
mephux has quit [Excess Flood]
poga has joined #ruby
poga has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
mephux has joined #ruby
wmoxam has joined #ruby
clocKwize has joined #ruby
the_mentat has joined #ruby
dougireton has joined #ruby
autumn has quit [Ping timeout: 255 seconds]
phinfonet has joined #ruby
dmiller has joined #ruby
waxjar has quit [Ping timeout: 264 seconds]
mjolk has quit [Quit: Leaving]
stnly has quit [Ping timeout: 240 seconds]
thomasfedb has quit [Ping timeout: 245 seconds]
zigomir has joined #ruby
shevy has quit [Ping timeout: 244 seconds]
grayson has joined #ruby
iambic has joined #ruby
tvw has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 246 seconds]
iamjarvo has quit [Excess Flood]
maxmanders has joined #ruby
maxmanders has quit [Client Quit]
angusiguess has joined #ruby
iamjarvo has joined #ruby
shashin has joined #ruby
poikon has quit [Remote host closed the connection]
<lectrick>
So RUBY_VERSION gives me the ruby version, but is there a global available that also gives me the patchlevel?
spinagon has quit [Ping timeout: 240 seconds]
elaptics is now known as elaptics`away
codezombie has joined #ruby
<mehwork>
lectrick: require 'rbconfig'
noxoc has joined #ruby
<mehwork>
you can do things like RUBY_PATCHLEVEL
kirun has joined #ruby
russt has joined #ruby
woolite64_ has joined #ruby
Asher2 has quit [Quit: Leaving.]
carraroj has quit [Ping timeout: 246 seconds]
nightsu has quit [Ping timeout: 276 seconds]
Asher has joined #ruby
<lectrick>
mehwork: it seems to already be included by default
<codezombie>
so, I was just talking with a friend, and came across some info that my beloved Symbol.to_proc is at least twice as slow as using a block. However, while I can find lots of information on the fact that it's slower, I can't find any info why. So, why is Symbol.to_proc slower than using a block?
jamescarr has joined #ruby
<hero_unit>
codezombie: is this on ruby 1.8 or ruby 1.9 ?
Xeago has quit [Remote host closed the connection]
jamescarr has quit [Read error: Connection reset by peer]
alex__c2022_ has joined #ruby
nomenkun has joined #ruby
matchaw_ has quit [Remote host closed the connection]
jamescarr has joined #ruby
alex__c2022 has quit [Ping timeout: 240 seconds]
alex__c2022_ is now known as alex__c2022
iamjarvo has quit [Quit: Leaving.]
rismoney has quit [Ping timeout: 276 seconds]
ahokaomaeha has joined #ruby
balr0g has quit []
billiam has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
<emocakes>
chiel, change of plans, 6 hours in london :p
interactionjaxsn has quit [Remote host closed the connection]
<matti>
Qantourisc: gem install mysql --version '= 2.8.1'
<gener1c>
if i have an array like this [[1],[2],[3],[4]] and i want to merge couples in it according to a condition is there a function to mutate it like this?
<Qantourisc>
yea ... and my package manager doesn't has this slotted :/ (multiple version possible)
<matti>
If they use gem / Ruby Gems right, it will be able to require version they want.
<gener1c>
and decide the order of the resulting elements
petersaints_ has joined #ruby
<gener1c>
[1]+[2] or [2]+[1] if id like
<matti>
gener1c: map? select? inject?
<gener1c>
but that will create a new one
<gener1c>
wait why does it matter...
robbyoconnor has joined #ruby
<Qantourisc>
matti: lets just say the ruby in my package manager is horible
jonahR has quit [Client Quit]
petersaints has quit [Ping timeout: 256 seconds]
<matti>
Qantourisc: Hm?
<matti>
Qantourisc: ;]
jonahR has joined #ruby
<Qantourisc>
matti: for 1 mysql is not slotted (means different version can be insalled
sayan has quit [Ping timeout: 255 seconds]
timmow has quit [Remote host closed the connection]
<Mon_Ouie>
~> a.b.c is like >= a.b.c and < a.(b+1)
<matti>
Qantourisc: What is your package manager?
<matti>
Mon_Ouie: He got two links with examples ;p
<Mon_Ouie>
Ah
<matti>
;p
<Qantourisc>
matti: well the package manager is not quite at fault here, but rather pacakge-database: gentoo
<matti>
Portage.
<matti>
I am not sure how Portage handles installing Ruby Gems.
<Qantourisc>
matti: and more exaltly: the package manager that do the ruby things :)
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
<Qantourisc>
matti: seems to work-ish
bradleyprice has joined #ruby
<matti>
But either way, you can install it yourself.
<codezombie>
hero_unit: 1.9
<Qantourisc>
matti: how do i "gem-cleanup" :)
<Qantourisc>
matti: ok it fails horible at gem installation
Uranio has quit [Quit: while you reading this, a kitty dies]
Crunchcat has joined #ruby
<Qantourisc>
just installed mysql-2.8.2 -> not listed in gem list
woolite64 has joined #ruby
<Qantourisc>
and this is why: no ruby19 target :p
poikon has joined #ruby
<matti>
Qantourisc: .2 also will satisfy ~>
<Qantourisc>
matti: i mean, it didn't install it for ruby19
poikon has quit [Remote host closed the connection]
<matti>
Aha
<matti>
;d
mikeg has joined #ruby
billy_ran_away has quit [Ping timeout: 255 seconds]
<Qantourisc>
matti: if they leave it at this state they are better of at saying "sorry just install the gems yourself, our packages are crap"
ananthakumaran1 has quit [Quit: Leaving.]
<Qantourisc>
next problem "cannot load such file -- rack/openid"
adkron has joined #ruby
<Qantourisc>
openid is installed before that i got "cannot load such file -- openid"
<Qantourisc>
matti: any hints on that one ? :/
Seich is now known as seich
Virunga has quit [Remote host closed the connection]
<Qantourisc>
matti: lets try to install an older version, might be it :p
kaen has quit [Remote host closed the connection]
<dolan`>
any developers looking for work?
ushijima has joined #ruby
ananthakumaran has joined #ruby
<gener1c>
maybe combination
clooth has joined #ruby
kaen has joined #ruby
ahokaomaeha has quit [Ping timeout: 264 seconds]
<Qantourisc>
dolan`: goes up and down the work i need, but i'm no ruby expert, can code, but didn't do any ruby
clooth has quit [Remote host closed the connection]
<dolan`>
:P
pskosinski has quit [Quit: Drama: Copyright infringement according to Quinton Reeves, Red Eclipse developer: http://pawelk.pl/quinton-reeves]
ahokaomaeha has joined #ruby
pyrac has joined #ruby
<Qantourisc>
matti: found a "solution" delete the openid plugin :p
frem has joined #ruby
adeponte has quit [Remote host closed the connection]
elplatt has quit [Remote host closed the connection]
s1n4 has quit [Quit: leaving]
elplatt has joined #ruby
asdfqwer has quit [Read error: Connection reset by peer]
pettsson has joined #ruby
woolite64 has quit [Ping timeout: 255 seconds]
maxmanders has quit [Ping timeout: 245 seconds]
d2dchat has joined #ruby
ner0x has quit [Quit: Leaving]
adkron has quit [Ping timeout: 256 seconds]
JMcAfreak has joined #ruby
nicoulaj has joined #ruby
<matti>
Qantourisc: ;p
dshap has joined #ruby
dshap has left #ruby [#ruby]
dshap has joined #ruby
_nitti has joined #ruby
anderse has quit [Quit: anderse]
dshap has left #ruby [#ruby]
maxmanders has joined #ruby
<billiam>
PTY.spawn's reader IO appears to be what the terminal actually receives. Anybody know how to get the process's actual standard out at the same time?
_nitti_ has joined #ruby
bean has joined #ruby
lurch_ has joined #ruby
dougireton has quit [Quit: Leaving.]
_nitti has quit [Ping timeout: 244 seconds]
Natural^ has joined #ruby
Natural^ has left #ruby [#ruby]
failshell has quit [Remote host closed the connection]
jacobw has joined #ruby
cableray has joined #ruby
sailias has quit [Quit: Leaving.]
nopolitica has quit [Quit: leaving]
<shevy>
are you still in despair over PTY man :-)
<zykes->
/files/etc/apache2/apache2.conf/directive[26] < how does one in Ruby extract number within the [] only from that string ?
brianpWins has quit [Quit: brianpWins]
Virunga has joined #ruby
jacobw has quit [Client Quit]
SQLDarkly has joined #ruby
nicoulaj has quit [Remote host closed the connection]
jacobw has joined #ruby
pcarrier has joined #ruby
txdv has quit [Read error: Connection reset by peer]
<shevy>
zykes- depends. must you use a regex?
woolite64 has joined #ruby
txdv has joined #ruby
<billiam>
shevy, yessir. Hoping to stumble on somebody who knows the answer already
<zykes->
shevy: not necassarely
piotr_ has joined #ruby
<matti>
Haha.
kmurph has joined #ruby
<matti>
net-ssh gem 2.2.2 will pull something else that requires 2.6.5 and then conflict occurs ;p
<Qantourisc>
Thanks for help, but don't know enoug of ruby to give any :/
Qantourisc has left #ruby [#ruby]
dougireton has joined #ruby
<matti>
;]
woolite64_ has joined #ruby
<shevy>
x = "/files/etc/apache2/apache2.conf/directive[26]"
<shevy>
'['+x.split('[')[-1] # => "[26]"
<shevy>
granted, that looks ugly though
<aedorn>
that hurts my eyes
<shevy>
hahaha :D
<zykes->
Why is ruby horrible with re ...
<SQLDarkly>
Hey All I have an array like:> params = ["class1", "class2", "timezone:timezone=America/Denver"]< Using inject i have a hash like: >{"class2"=>nil, "class1"=>nil, "timezone:timezone"=>"America/Denver"}<. My question is how can I modify my inject which is >params.inject({}) { |hash, element| k, v = element.split("="); hash[k] = v; hash }< to reflect the hash like: >"{"class2"=>nil, "class1"=>nil, "timezone => { timezone"=>"America/Den
<shevy>
oh you can use regex
<shevy>
let's see
wheeler has joined #ruby
workmad3 has joined #ruby
JMcAfreak has quit [Remote host closed the connection]
renanoronfle has joined #ruby
<shevy>
x = "/files/etc/apache2/apache2.conf/directive[26]"
<shevy>
x =~ /(\[.+\])+/
<shevy>
$1 # => "[26]"
<shevy>
there you go
<zykes->
is that supported in 1.8.x shevy ?
<shevy>
yeah
<shevy>
if you dont want to use $1 you have to use MatchData object and MatchData[1] or whatever to get the match, try it in irb
<aedorn>
it's read ahead for ], and don't set a back reference
<Sou|cutter>
I'm noticing an inconsistent test failure that seems to indicate that a Tempfile no longer exists. A number of my tests create a Tempfile copied from the same source file - is there a possible race condition in Tempfiles being deleted? (are Tempfiles guaranteed unique?)
<shevy>
aha aedorn
JMcAfreak has joined #ruby
pskosinski has joined #ruby
<aedorn>
(?<=\[) would be read behind for a [, and don't set a back reference in 1.9+
vlad_starkov has joined #ruby
<billiam>
I need to: a) run a process and get its standard out, and b) respond to its interactive prompts (which are written to /dev/tty depending on system)
<shevy>
read behind and look ahead scares me
<aedorn>
billiam: so you want Expect for Ruby?
<shevy>
I constantly look back already to see if my cat is in attempt to leap onto my shoulders
<billiam>
aedorn, yes and no
<billiam>
That will handle the b) part
sepp2k has quit [Ping timeout: 272 seconds]
nicoulaj has joined #ruby
<billiam>
but doesn't get me access direct access to the process's standard out (what would be redirected with > process.log)
ner0x has joined #ruby
chrishough has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<billiam>
I could probably use PTY.spawn('command > /tmp/file') { expect etc.} or some such, but I really don't want to write to a real file.
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<aedorn>
I am relatively confused .... PTY.spawn spawns both input and output
ranjan has quit [Quit: Leaving]
IceDragon has joined #ruby
statarb3 has quit [Client Quit]
kyouso has joined #ruby
andrewsfreeman has joined #ruby
<andrewsfreeman>
*Cough* I have a question that I hope won't come off as inane...
<shevy>
oh no
<shevy>
I don't like the beginning
<andrewsfreeman>
:)
<andrewsfreeman>
lol
<andrewsfreeman>
I've grown tired of WordPress development and have started to learn Ruby/Rails...
<shevy>
oh no...
<andrewsfreeman>
Since rubygems was hacked, is this still a worthwhile venture?
<shevy>
I don't like the end ...
mfridh has quit [Read error: Operation timed out]
<shevy>
no
<shevy>
stay with php man
<shevy>
until you are an old man
reset has joined #ruby
<shevy>
I dare you!!!
<shevy>
I double dare you!!!!!!!
grzywacz has quit [Ping timeout: 272 seconds]
<billiam>
aedorn, from what I can tell, that gives you the in and out of the terminal itself. If a process both writes to the terminal directly, and has some standard out, they'll appear combined in spawn
maxmanders has quit [Ping timeout: 264 seconds]
SeanLazer has joined #ruby
mahmoudi_ has joined #ruby
<zykes->
what does str[/\d+(?=\])/] return really ?
<zykes->
a new string or some regex match stuff ?
<havenwood>
andrewsfreeman: The RubyGems vulnerability has been patched, and RubyGems is running on a totally new infrastructure now. No reason to avoid Ruby
WrErase has quit [Quit: leaving]
nricciar has quit [Ping timeout: 264 seconds]
<SeanLazer>
hey guys i have a weird one: i'm using a gem that's lazy with its error raising and is raising a pretty generic error that i need to rescue. is it possible to rescue errors based on the message that was passed along with the error?
<zykes->
shevy: ?
stonevil has joined #ruby
<shevy>
zykes- well actually
<andrewsfreeman>
havenwood, thanks. I've been using some gems for a while (SASS, etc.) but that is reassuring.
<shevy>
zykes- I have no idea, I copy/pasted from aedorn
<shevy>
zykes-, use my regex /\d\d+/
<shevy>
it is much simpler to understand!!!
<andrewsfreeman>
and shevy - if it's WP, I'll use PHP until then ;)
<shevy>
digit digit!
<andrewsfreeman>
have a good day ya'll, I appreciate it
maxmanders has joined #ruby
<shevy>
andrewsfreeman you only want to hear positive news :(
<shevy>
andrewsfreeman when I started with ruby, there was no rails and no rubygems!
mhf has joined #ruby
<shevy>
people did everything from scratch
<shevy>
nowadays a webshop is one line of rails code.......
<aedorn>
billiam: I don't know if I'm understanding this right. You have a process that you spawn that has standard output/error, and input, and then also has another IO pipe to another tty? Like a serial console?
awkwords has joined #ruby
<Hanmac_>
shevy was it the time when Programmers clash Stones together to make Code?
<billiam>
aedorn, correct, the process writes to /dev/tty directly
<shevy>
Hanmac_ YES
<shevy>
it was when PHP was super popular
<billiam>
as well as normal stdin/out
<shevy>
when it crushed and destroyed perl
<billiam>
(the process is git, if that helps put it in context)
<shevy>
and from the ashes of dust and decay rose the child of perl.... the ruby
mahmoudimus has quit [Ping timeout: 272 seconds]
<shevy>
at first noone understood her, for she was speaking only in poetric riddles
<shevy>
but soon it all started to make sense
<Hanmac_>
shevy then you are are older then the "you are older than ..." jokes :P
<zykes->
shevy: which one was yours ? :)
<shevy>
and lo and behold, rails emerged
<shevy>
zykes-, dunno... I hated gems until 2 years ago
<shevy>
and right now I am still on 1.8.x so don't take me too seriously please
<shevy>
but I have the new 1.9.x compiled now :P
<zykes->
shevy: I mean what was your regex like ? : )
<zykes->
.slice or ?
rezzack has joined #ruby
Crunchcat has quit [Quit: Grey's Anatomy for you and me]
clocKwize has quit [Quit: clocKwize]
plotter has quit [Remote host closed the connection]
<shevy>
ah no
kmurph has joined #ruby
<shevy>
the [] works on string objects
<havenwood>
Interesting results with new Ruby implementation Topaz benchmark compared to Ruby 1.9, Ruby 2.0, JRuby, RBX, Maglev, MacRuby, and MRuby: https://gist.github.com/havenwood/4724778
<shevy>
inside it, you can pass a regex via //
<havenwood>
Now if Topaz would implement IO.gets...
benlieb has quit [Quit: benlieb]
<shevy>
zykes- "abcdef55jjj"[/\d\d+/] # => "55"
workmad3 has quit [Read error: Connection reset by peer]
<SQLDarkly>
I cannot find where to split my hash. Should I split it after inject or before while its still an array? Trying different things in IRB, but I cant seem to get it.
mfridh has joined #ruby
<havenwood>
SQLDarkly: Gist example?
<shevy>
SQLDarkly always opt for the simplest solution, if in doubt!
jlast_ has joined #ruby
erlingur has joined #ruby
<SQLDarkly>
im trying :) here is the original question. NOt long enough for gist but ill put it up there if you prefer
<shevy>
why the f... is topaz faster than ruby 1.9?
<SQLDarkly>
Hey All I have an array like:> params = ["class1", "class2", "timezone:timezone=America/Denver"]< Using inject i have a hash like: >{"class2"=>nil, "class1"=>nil, "timezone:timezone"=>"America/Denver"}<. My question is how can I modify my inject which is >params.inject({}) { |hash, element| k, v = element.split("="); hash[k] = v; hash }< to reflect the hash like: >"{"class2"=>nil, "class1"=>nil, "timezone => { timezone"=>"America/Den
maxmanders has quit [Ping timeout: 252 seconds]
<shevy>
with that speed it wont take long and we have a ruby as fast as C!!!!!!
<havenwood>
shevy: JIT maybe? This is only bench on it I've done so far.
<SQLDarkly>
yeah Ive been in irb trying different ways to achieve the result I want in the final hash, but shit lol its proving difficult with my non |33t knowledge
<shevy>
SQLDarkly can you make the simplest, shortest demo example
rezzack has quit [Client Quit]
enroxorz-work has joined #ruby
<shevy>
like array = [1,2,3,4] ... end result hash = { '1' => 2, '3' => 4 }
main has quit [Ping timeout: 255 seconds]
carraroj has quit [Quit: Konversation terminated!]
renanoronfle has quit [Quit: This computer has gone to sleep]
jlast__ has joined #ruby
jlast has quit [Ping timeout: 244 seconds]
<SQLDarkly>
sure just a sec
<epochwolf>
does anyone know if libxml-ruby has a strict mode like nokogiri?
maxmanders has joined #ruby
jlast_ has quit [Read error: Connection reset by peer]
<shevy>
let me try to wrap my brain around this :-)
<shevy>
ok let's see... that does not seem trivial on first glance
_nitti_ has quit [Remote host closed the connection]
<aedorn>
billiam: /dev/tty still requires a file descriptor... you don't really write direct to /dev/tty, but to an FD which acts as your IO stream. If you know what that descriptor is, you can open it and read it
<shevy>
SQLDarkly can it be ugly code? or must it be a one liner
_nitti has joined #ruby
<SQLDarkly>
doesnt have to be a oneliner, but being new to ruby id like the "ruby way" of tackling that task
<SQLDarkly>
doesnt have to be magical though lol
<SQLDarkly>
just functional.
<shevy>
well
<shevy>
one liners are much harder for my brain
<shevy>
I usually call Hanmac for one liners
AndChat| has joined #ruby
<IceDragon>
SQLDarkly: key, value = (str =~ /(\S+):(\S+)=(\S+)/ ? [$1, {$2 => $3}] : [str, nil]) # does this help?
<matled>
.map { |s| s.split(":", 2) }.map { |a,b| b and [a, Hash[*b.split("=", 2)]] or [a] }]
<matled>
inside a Hash[...]
<aedorn>
Well, guess that statement isn't totally true.. you can certainly write to it and it will display back on the active terminal, but that information is still available in the IO from PTY.spawn
<SQLDarkly>
testing.....
queequeg1 has quit [Ping timeout: 248 seconds]
<billiam>
aedorn, I'm not a c guy, but I believe it really is writing directly to /dev/tty
<shevy>
:(
<shevy>
you guys are all way faster than I am, this is no fun ...
<shevy>
SQLDarkly but see how fast they are when the problem is small? ;)
the_mentat has quit [Quit: Computer has gone to sleep.]
<zykes->
shevy: how does one get path[/\d+(?=\])/] to be a Fixnum so I can use it with +X ?
Banistergalaxy has quit [Ping timeout: 272 seconds]
thibauts has joined #ruby
<billiam>
aedorn, yeah. I'm able to respond to it via pty.spawn, the issue is I can't get the non-direct-to-tty output from there. Does that make sense?
ozgura has quit [Remote host closed the connection]
<billiam>
rather, I can only get both the content written to /dev/tty and the stdout at the same time, potentially combined.
kmurph has quit [Quit: kmurph]
carloslopes has quit [Remote host closed the connection]
<aedorn>
billiam: It does, but you still need to know where the "non-direct-to-tty output" goes before you could possibly read it. The way git works with git_terminal is by opening /dev/tty for writing, and then opening another buffer for input. It then echoes input back to the output buffer.
<shevy>
{"3"=>{"4"=>"5"}, "2"=>nil, "1"=>nil}
<shevy>
that is the output
<shevy>
1.8.7 can not first report "1" etc.. as far as I know
allaire has joined #ruby
<aedorn>
billiam: So you'll need to provide an example of something that doesn't get displayed, then we can figure out exactly where that goes to and you can read it from that data point.
<shevy>
I think 1.9.x can
hmarr has joined #ruby
<Hanmac_>
SQLDarkly my last line should work on 1.8.7
nricciar has joined #ruby
haxrbyte has quit [Remote host closed the connection]
<shevy>
it does Hanmac_ ! i tested
<billiam>
aedorn, I'm confused. The non-direct-to-tty output just goes to standard out.
haxrbyte has joined #ruby
<SQLDarkly>
sure does
<SQLDarkly>
works EXACTLY the way i needed
russt has joined #ruby
<billiam>
the direct to tty output can be accessed/responded to via pty.spawn. When I do that, I can't tell how to get the process's standard out in a nice variable somewhere
dougireton has quit [Remote host closed the connection]
<SQLDarkly>
thanks a tonne I was beating my head in hopes the mush would spill out something
dougireton has joined #ruby
<aedorn>
Okay. I'm less confused. redirect it
<aedorn>
billiam: Run your command and redirect back to /dev/tty : git .... > /dev/tty
nat_home has joined #ruby
<aedorn>
Or whatever stream you have open and then read it from there
LouisRoR has joined #ruby
idkazuma has joined #ruby
zastern_ has joined #ruby
<Hanmac_>
shevy do yo like golfing?
mahmoudimus has joined #ruby
<shevy>
no I hate it
<billiam>
aedorn, ok, that's somthing I don't know how to do within a ruby context. Let's say I've figured out how to create some kind of iobuffer : io. pty.spawn just accepts a simple command line.
<Hanmac_>
>> p ["1", "2", "3:4=5"].inject({}){|h,s|s=~(/(\w+):?(.+)?/);h[$1]=$2&&Hash[*$2.split('=')];h}
<shevy>
the end result always looks like awful crap
<shevy>
I should write a gem called: requir 'docstrings' hahaha
<shevy>
damn, typo
<shevy>
require 'docstrings'
<shevy>
ERROR: Could not find a valid gem 'docstring' (>= 0) in any repository
<shevy>
ERROR: Possible alternatives: bitstring, brstring, duckstrings, fabstring, xstring
<zykes->
shevy: that's just horrible :p
<shevy>
wtf... duckstrings
<shevy>
what is that
<zykes->
shevy: strings of ducks :p
mengu has quit [Ping timeout: 264 seconds]
<zykes->
or ducks on a string if you will :p
<billiam>
aedorn, that could certainly be an actual filesystem file (but would require me to make one), or something like /dev/tty (to output directly to the console), but ideally, I'd just want it in a variable or buffer I create or... somthing.
<Hanmac_>
"duck" 'duck' %q{duck}
danneu has joined #ruby
<shevy>
zykes- hehe
<shevy>
please Hanmac_
<shevy>
I think you try to abuse ruby ...
<shevy>
wtf... that quits my irb
<shevy>
why does this quit my irb?!
eldariof has quit []
<shevy>
%q{duck} alone does not hmm
<Hanmac_>
you mean my string or do you mean "duckstring"? :P
<shevy>
aha
<shevy>
"duck" 'duck' %q
<shevy>
quits my irb
<shevy>
Hanmac_ your %q thing
<zykes->
shevy: warning, there be killer ducks in thy ruby
<zykes->
:p
Akuma has quit [Read error: Connection reset by peer]
<shevy>
is this normal?
<Hanmac_>
shevy try an 1.9 irb
Choobie has left #ruby ["End"]
zastern has joined #ruby
<nat_home>
stack level too deep (SystemStackError) means that you ran out of memory or there is a limit somewhere set in the system or ruby on how deep you can go ?
rezzack has joined #ruby
<shevy>
Hanmac_ just tried, same result... hmm... perhaps I pull in some faulty libary
<shevy>
nat_home usually this is a neverending recursive loop
<Hanmac_>
lol? it works for me ... oO
shock_one has quit [Ping timeout: 260 seconds]
<shevy>
def foo; loop { foo() }; end
<shevy>
yeah Hanmac_ no idea
v0n has quit [Read error: Connection reset by peer]
v0n has joined #ruby
thibauts has joined #ruby
adeponte has joined #ruby
<Hanmac_>
have you something in your irbrc?
rmartin has quit [Remote host closed the connection]
jlast__ has quit [Remote host closed the connection]
<Hanmac_>
shevy ... let me guess ... something defines the q method as alias for quit right? :P
zastern_ has quit [Ping timeout: 252 seconds]
benlieb has joined #ruby
jrist-afk is now known as jrist
dougireton has quit [Quit: Leaving.]
<shevy>
Hanmac_ hmmm yeah
<nat_home>
shevy: in my case it's not
<shevy>
I use q to quit it hahaha
<shevy>
and q in bash is an alias to start irb
<shevy>
so I press q to switch :D
<shevy>
how strange... that this interferes with %
<shevy>
oh well
<Hanmac_>
% is a method
<shevy>
ohhhhhh
bawigga has quit [Ping timeout: 246 seconds]
jlast has joined #ruby
adeponte has quit [Ping timeout: 264 seconds]
dougireton has joined #ruby
bricker has quit [Ping timeout: 244 seconds]
<Hanmac_>
shevy thats why this is valid: "duck" 'duck' %%q{duck}
<invisime>
any idea why I might get the ol' "Errno::ENOENT - No such file or directory" during a call to IO.write?
<lectrick>
Is there any way to get notified if I'm redefining a method in a context?
<bean>
invisime: because you're writing to a nonexistent file. Have any code?
<lectrick>
Doesn't Ruby have some horribly broken "verbose" mode that will actually tell you stuff like that?
DrCode has quit [Remote host closed the connection]
mengu has joined #ruby
mattbl has joined #ruby
ahokaomaeha has quit [Client Quit]
<Hanmac_>
lecktrick: there is a :method_added hook
<Hanmac_>
for Module
ryanh has quit [Max SendQ exceeded]
<invisime>
bean: IO.write is supposed to create the file.
ahokaomaeha has joined #ruby
<invisime>
but the problem is that the directory wasn't there.
DrCode has joined #ruby
ryanh has joined #ruby
<invisime>
because someone forgot to enforce a step in our business logic.
dmiller has quit [Ping timeout: 246 seconds]
<invisime>
figured it out almost as soon as I typed it.
<invisime>
XD
dmiller has joined #ruby
<JoeyJoeJo>
Ok, I've install the rake version I want, but I'm still getting an error saying it can't find rake-0.9.2.2. How can I tell where it's looking for rake?
stormetrooper has quit [Quit: Fighting Jedi scum]
erichmenge has quit [Quit: Arrivederci!]
davidcelis has quit [Quit: K-Lined.]
clocKwize has joined #ruby
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
moshee has quit [Ping timeout: 245 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
binaryplease has joined #ruby
rismoney has quit [Ping timeout: 276 seconds]
thone_ has joined #ruby
<Hanmac_>
lecktrick there are 13 hidden functions in ruby that are called as a Hook ... try to find the other 12
erichmenge has joined #ruby
emergion has joined #ruby
withnale has joined #ruby
<apeiros_>
13?
<apeiros_>
hm
__BigO__ has quit [Remote host closed the connection]
<Hanmac_>
yeah apeiros_ or do you think this is a bad omen? :P
trollissimo is now known as recruiterissimo
<apeiros_>
no, just more than expected
<apeiros_>
6 came to my mind immediately
LouisRoR has quit [Ping timeout: 255 seconds]
<apeiros_>
searching for the other 7
cr3 has quit [Quit: leaving]
thone has quit [Ping timeout: 260 seconds]
<apeiros_>
does stuff called by e.g. Marshal count too?
<Hanmac_>
but you are right there are some missing
shashin has joined #ruby
the_mentat has joined #ruby
<apeiros_>
if initialize is on it, initialize_copy should too
russt has joined #ruby
<Hanmac_>
yeah, did you know that are methods you CANT define in ruby? even with define_method?
recruiterissimo is now known as generalizzimo
<apeiros_>
such as?
<Hanmac_>
allocate for sample ... when you try to define it you get a evil warning :P
<apeiros_>
that's actually a good idea
peregrine81 has joined #ruby
<apeiros_>
didn't get one…
<apeiros_>
[5] pry(main)> class Foo; def self.allocate; super; end; end
<apeiros_>
=> nil
gosshedd has quit [Quit: Lost terminal]
<Hanmac_>
... huch .. last time i get a warning ...
hit_ has joined #ruby
<Hanmac_>
hm apeiros_ do you know what the Data class is for? :P
<apeiros_>
iirc something internal
rezzack has joined #ruby
<Hanmac_>
yeah, for some reason its used for C-Wrapped Objects too (i dont know why its needed)
hit has quit [Ping timeout: 264 seconds]
hit_ is now known as hit
slainer68 has joined #ruby
gyre007 has joined #ruby
noxoc has quit [Quit: noxoc]
arturaz_ has quit [Read error: Connection reset by peer]
<RubyPanther>
having builtin types distinguishable from Ruby defined types and C defined extensions makes optimization possible
noxoc has joined #ruby
<Hanmac_>
its still a bit confusing why the Data class is needed ...
kaen has quit [Read error: Connection reset by peer]
aedorn has left #ruby ["Leaving"]
<apeiros_>
also annoying that it is top-level
<RubyPanther>
IMO not nearly as annoying as arm-linux-androideabi/bin/ld: libruby-static.a(dir.o): in function dir_seek:dir.c(.text+0x1a10): error: undefined reference to 'seekdir'
roadt_ has quit [Ping timeout: 272 seconds]
end_guy has joined #ruby
<Hanmac_>
its also annoying about that "-static" in the name
aedorn has joined #ruby
ddd has joined #ruby
<RubyPanther>
well, static is ideal for embedded devices
roadt_ has joined #ruby
francisfish has joined #ruby
lindenle_ has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
<lindenle_>
I am trying to use Socket.getaddrinfo from irb and it says Socket is undefined. Do I need to load something?
<Hanmac_>
isnt the *.a allready showing that its an static lib?
russt has quit [Quit: russt]
ddd has quit [Client Quit]
poikon has quit [Remote host closed the connection]
roadt_ has quit [Max SendQ exceeded]
ddd has joined #ruby
roadt_ has joined #ruby
<lindenle_>
nm
<lindenle_>
require 'socket'
<havenwood>
lindenle_: aye
<RubyPanther>
well, yes. But it doesn't help with intent. It gets named differently presumably so when you build both the linker doesn't choose the static when you wanted the dynamic
greenysan has quit [Ping timeout: 255 seconds]
ddd has left #ruby [#ruby]
russt has joined #ruby
ddd has joined #ruby
<RubyPanther>
the naming doesn't bother me at all since the whole reason I'm trying to cross-compile is so I can embed the lib. I'll be specifying it by name anyways.
<RubyPanther>
its a freakin rabbit hole
<Hanmac_>
ithink its from the time where it does matter ... current compiler should inteligent enouth to pick the right libs
chrisan has quit [Quit: Seppuku!]
<RubyPanther>
how would it know what is "right?"
<Hanmac_>
i dont know but other libs can do it too ...
jgarvey has quit [Quit: Leaving]
seme has joined #ruby
<Hanmac_>
about Coss-compile i need it too someday ... maybe for mingw or i386
<RubyPanther>
other libs don't help you out and if you build both you will only get the static linked unless you specify special options. The idea here is that if you didn't specify anything you want shared. If you want static you're listing it. So it is fair to make you name it.
samlt has quit [Ping timeout: 264 seconds]
greenysan has joined #ruby
d2dchat has quit [Remote host closed the connection]
<RubyPanther>
well as far as trying to compile ruby on linux for arm using google's android-ndk compiler... it was 6 layers of onion to get past configure, another few (including a couple ruby patches) to get gcc happy... and now the linker informs me I'm going to need to extend the C stdlib that comes with the ndk
noxoc has quit [Quit: noxoc]
ngoldman has joined #ruby
<Hanmac_>
i thought that i386 may be easier because i allready have the i386 packages installed ... so i thought i can use it for cross compile ...
rakl has joined #ruby
michaelmartinez_ has joined #ruby
backjlack has quit [Remote host closed the connection]
freakazoid0223 has joined #ruby
<seme>
can anyone help me. I'm trying to use Thor and it works well except for global options (I think class_option). For some reason if I move some common options from method_option to class_option I can't get my commands to work
<seme>
anyone else run into this issue?
Lubinski has quit [Ping timeout: 264 seconds]
whowantstolivef1 has joined #ruby
reppard has joined #ruby
<Sigma00>
Thor.hammer
michaelmartinez has quit [Ping timeout: 276 seconds]
michaelmartinez_ is now known as michaelmartinez
kmurph has quit [Quit: kmurph]
<seme>
:)
<v0n>
you can't do "include ModuleFoo" in a config.ru file? oO
<v0n>
undefined method `include' for #<Rack::Builder:0x000000019b0dd8
<apeiros_>
v0n: you must be in the context of a module/class in order to include
stonevil has quit [Ping timeout: 264 seconds]
<v0n>
apeiros_: no
<apeiros_>
yes
benlieb has joined #ruby
<apeiros_>
include is Module#include, it doesn't just work everywhere
kojul has joined #ruby
mengu has joined #ruby
allaire has quit []
_nitti has quit [Remote host closed the connection]
<v0n>
apeiros_: http://ix.io/4iS <-- not in a class/module context
kmurph has joined #ruby
gabrielrotbart has joined #ruby
<apeiros_>
yes, it is
kojul has quit [Remote host closed the connection]
<v0n>
I don't get it
stonevil has joined #ruby
kojul has joined #ruby
jonahR has quit [Quit: jonahR]
<apeiros_>
$ ruby -e 'Object.new.instance_eval do include Math end'
kpshek has quit []
<apeiros_>
-e:1:in `block in <main>': undefined method `include' for #<Object:0x007fc78a094148> (NoMethodError)
whowantstolivef1 has quit [Client Quit]
<Hanmac_>
the main object is a bit different ... be happy that there is no MainClass :P
Spooner has joined #ruby
<v0n>
boring... so no workaround to include a module in config.ru?
sailias has joined #ruby
<apeiros_>
extend
purp has quit [Quit: purp]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<v0n>
apeiros_: doesn't work
<apeiros_>
doesn't work sucks as description. do better.
phantasm66 has quit [Quit: *sleeeep….]
ahokaomaeha has joined #ruby
<lupine>
extend it instead ?
<v0n>
apeiros_: can you adapt the way you speak please, I'm not your dog.
dolan` has quit []
Monie has quit [Quit: Quit]
<apeiros_>
for somebody who thinks "doesn't work" was good enough - no.
elplatt has quit [Quit: elplatt]
<v0n>
waw :)
jrabbit has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
brianpWins has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby
nomenkun has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<nat_home>
Called Logical NOT Operator. Use to reverses the logical state of its operand. If a condition is true then Logical NOT operator will make false.
<nat_home>
!(a && b) is false.
alanp has quit [Ping timeout: 255 seconds]
<nat_home>
I see
<nat_home>
sorry
mengu_ has quit [Quit: This computer has gone to sleep]
johndouthat has quit [Ping timeout: 272 seconds]
bwlang has left #ruby [#ruby]
hadees has quit [Quit: hadees]
apeiros_ has quit [Remote host closed the connection]
kmurph has joined #ruby
seba4 has quit [Ping timeout: 272 seconds]
piotr__ has joined #ruby
piotr_ has quit [Ping timeout: 264 seconds]
plotter has joined #ruby
kyouso has quit [Ping timeout: 264 seconds]
apeiros_ has joined #ruby
johndouthat has joined #ruby
dustint has quit [Quit: Leaving]
jimeh has quit [Quit: Computer has gone to sleep.]
beilabs_ has joined #ruby
dougireton has joined #ruby
dougireton has quit [Client Quit]
bean has quit [Quit: Computer has gone to sleep.]
<Eiam>
nat_home: the number 9 is truthy so, the negation of truth is false
seme has quit [Quit: leaving]
havenwood has joined #ruby
jimeh has joined #ruby
spider-mario has quit [Remote host closed the connection]
alex__c2022 has quit [Quit: alex__c2022]
beilabs_ has quit [Quit: Leaving]
<nat_home>
elam I got it thanks, I read too fast, I was looking for ~ in fact
beilabs_ has joined #ruby
<apeiros_>
binary not?
sailias has quit [Quit: Leaving.]
<beaky>
a
<apeiros_>
b
seba4 has joined #ruby
beilabs_ is now known as beilabs
moted has quit [Remote host closed the connection]
beaky has left #ruby [#ruby]
kiwnix has quit [Quit: Leaving]
philcrissman has quit [Read error: Connection reset by peer]
jpfuentes2 has quit [Read error: No route to host]
<yakko>
epochwolf: it was in my example script for multistaging
<yakko>
let me find the url
gabrielrotbart has joined #ruby
<epochwolf>
yakko: so you wrote it?
francisfish has quit [Remote host closed the connection]
fir_ed has joined #ruby
rezzack has quit [Quit: Leaving.]
_nitti has joined #ruby
lurch_ has joined #ruby
<yakko>
epochwolf: found the bastard, I'm using caphub and it uses railsware/capistrano-multiconfig and I confused it with capistrano/capistrano-ext :)
Goles has joined #ruby
billiam has quit [Quit: Leaving]
apeiros_ has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
<marwan_>
hi, i want to ask a question about rails and rest
_nitti has quit [Ping timeout: 264 seconds]
kirun has quit [Quit: Client exiting]
rezzack has joined #ruby
<shevy>
I feel so dirty... I am editing an old .php file of mine
anderse has quit [Quit: anderse]
<shevy>
marwan_ most rails expert are on #rubyonrails
<havenwood>
marwan_: What REST question, I'm curious?
<marwan_>
oh, thanks, didn't know it is exits
<marwan_>
ok
<marwan_>
in rest, in the url you identify just the resource
<marwan_>
and use the methods of http
bawigga has quit [Quit: Computer has gone to sleep.]
<marwan_>
so if you want to make new user for exaple
<marwan_>
you make post
<marwan_>
what if you want to make a log in
<marwan_>
just check if the user registered before
statarb3 has quit [Ping timeout: 264 seconds]
cobragoat has joined #ruby
<havenwood>
marwan_: POST should be used to modify entire resources. PUT to create them. Rails uses PATCH since it most often modifies part of a resource, not the whole thing like POST.
Mon_Ouie has quit [Ping timeout: 264 seconds]
anachronistic has quit [Quit: anachronistic]
<havenwood>
marwan_: Sounds like you'd want GET there.
<havenwood>
marwan_: If you aren't modifying the resource, but just querying it.
solidoodlesuppor has quit [Remote host closed the connection]
danneu has quit [Quit: WeeChat 0.3.8]
<havenwood>
Oh how we slavishly follow that thesis, and it sacred verbs! :P
mmitchell has quit [Remote host closed the connection]
pskosinski has quit [Read error: Connection reset by peer]