fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
zeromodulus has quit [Read error: Connection reset by peer]
zeromodulus has joined #ruby
_md has quit [Quit: Leaving...]
srnty has quit [Quit: srnty]
<johnjohnson> I really want to try out ruby motion, but I don't want to spend $200 just to "try" it out :/
<fowl> johnjohnson: they dont mention it but there is a 30 day return policy
t59124 has quit [Remote host closed the connection]
<johnjohnson> Interesting
t39725 has joined #ruby
<johnjohnson> That may be worth pursuing then
mengu has joined #ruby
<banisterfiend> johnjohnson: fowl is tricking u
<seanstickle> That would be an interesting "return"
<johnjohnson> LOL
<seanstickle> Please package up the interpreter and mail it back to us
<johnjohnson> "Sir, thanks for letting me try your product. Please give me my money back."
nari_ has quit [Ping timeout: 244 seconds]
<banisterfiend> johnjohnson: u got punk'd
<johnjohnson> sigh
<fowl> :')
olrrai has quit [Quit: Saliendo]
Nisstyre_ has joined #ruby
jasonLaster has joined #ruby
kuzushi has joined #ruby
<AnarchoTroll> Spooner, Thanks!
srnty_ has joined #ruby
srnty_ has quit [Client Quit]
<Spooner> AnarchoTroll : Glad you noticed my answer after all (it was a little delayed).
banisterfiend has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
Axsuul has quit [Ping timeout: 272 seconds]
<AnarchoTroll> Spooner, I only noticed it because the IRC client was warned me someone had mentioned my nickname :)
SCommette has joined #ruby
kuzushi has quit [Read error: Operation timed out]
SCommette has quit [Client Quit]
philcrissman has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
guns has quit [Quit: guns]
* shevy sniffs the air.
<shevy> I smell Troll on the menu today... LET'S BURN HIM!!!
<shevy> >> puts 'test'
<al2o3cr> (NilClass) nil, Console: test
<shevy> #perl has a curious bot... reports CPAN activity
<shevy> it's a bit spammy though
havenn has quit [Remote host closed the connection]
jtgiri_ has quit [Quit: jtgiri_]
havenn has joined #ruby
jtgiri_ has joined #ruby
vulture has joined #ruby
banseljaj is now known as imami|afk
<vulture> whois imami|afk
<imami|afk> vulture: that'd be me.
<vulture> sorry ^_^ i'm new in irc。i'm testing the command
<vulture> i miss the "/"
kuzushi has joined #ruby
<imami|afk> vulture: It's okay. eventually it becomes a habit
Axsuul has joined #ruby
aantix has quit [Quit: aantix]
guns has joined #ruby
Guest10247 has quit [Ping timeout: 260 seconds]
bpo has joined #ruby
vulture has left #ruby ["离开"]
jjang has quit [Read error: Connection reset by peer]
jjang has joined #ruby
vulture has joined #ruby
jjang has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
jjang has joined #ruby
vulture is now known as vulturecc
vulturecc is now known as vulture
M- has joined #ruby
jjang has quit [Read error: Connection reset by peer]
jjang has joined #ruby
t39725 has quit [Remote host closed the connection]
t66626 has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
moshee has quit [Ping timeout: 260 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Bidness has joined #ruby
Bidness has quit [Remote host closed the connection]
adac has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
abstrusenick has joined #ruby
bigmeow has quit [Quit: WeeChat 0.3.8]
dev_ryan70 has joined #ruby
ChampS666 has quit [Ping timeout: 245 seconds]
ChampS666 has joined #ruby
ChampS666 has quit [Client Quit]
vlad_starkov has quit [Ping timeout: 268 seconds]
nu7hatch has left #ruby [#ruby]
eikko has joined #ruby
iamjarvo has joined #ruby
pridian has quit [Quit: Leaving]
bradhe has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
dev_ryan70 has quit [Ping timeout: 246 seconds]
mwilson- is now known as mwilson
Criztian has joined #ruby
jorge has joined #ruby
beneggett has joined #ruby
jorge has quit [Ping timeout: 240 seconds]
AnarchoTroll has quit [Quit: Leaving]
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
davorb has joined #ruby
pygmael has quit [Read error: Connection reset by peer]
IrishGringo has quit [Remote host closed the connection]
pygmael has joined #ruby
grenierm has joined #ruby
ghanima has joined #ruby
<ghanima> hey gs
<ghanima> sorry hey guys quick question I am in the process of implementing a rest client and doing some research on the Web Their seems to be 2 main options the gem rest_client or ActiveResource
<ghanima> just curious if anyone has any opinion of the 2 options listed above
apok has quit [Quit: apok]
EstanislaoStan has joined #ruby
<EstanislaoStan> I have a general question about how the, I guess it's called the interpreter reads through ruby code. I have a method defined in main that uses a method defined in lines after it and the interpreter complains gives a no method error. But if I define the method inside of, say a class, and then reference a method defined after that method but still inside of the class there are no complaints. Why is that?
t66626 has quit [Remote host closed the connection]
datapolitical has quit [Quit: This computer has gone to sleep]
t39356 has joined #ruby
nwest has joined #ruby
deryl has joined #ruby
fyolnish_ has joined #ruby
artOfWar has joined #ruby
wvms has left #ruby [#ruby]
artOfWar_ has joined #ruby
wvms has joined #ruby
<fowl> EstanislaoStan: the method has to be defined before it is called
davorb has quit [Quit: Computer has gone to sleep.]
marcelfahle has joined #ruby
artOfWar has quit [Ping timeout: 268 seconds]
dev_ryan70 has joined #ruby
bradhe has joined #ruby
ngoldman has quit [Remote host closed the connection]
<fowl> EstanislaoStan: if you call and undefined method from inside a method definition you wont know about it until it hits that point. def a() doesntexist() end you wont get an error when you define this, but if you havent defined doesntexist() by the time you call a() you'll get nomethoderror
Hanmac1 has joined #ruby
Criztian has quit [Remote host closed the connection]
gfontenot has joined #ruby
<ryanf> EstanislaoStan: what he said, and also remember that there's a difference between code that is in a method definition and code that is actually being executed
<ryanf> so if you define two methods, the first one can refer to the second as long as you execute it after they're both defined
Hanmac has quit [Ping timeout: 276 seconds]
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
gfontenot has quit [Client Quit]
Takehiro has joined #ruby
moshee has quit [Ping timeout: 260 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
cakehero has joined #ruby
flu- has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
<EstanislaoStan> Right. Thanks fowl.
<EstanislaoStan> And, yeah, I just realized that ryanf.
<EstanislaoStan> Thanks to you too.
ZachBeta has joined #ruby
grenierm has quit [Quit: grenierm]
dev_ryan70 has quit [Ping timeout: 264 seconds]
davorb has joined #ruby
areil has joined #ruby
apok has joined #ruby
abstrusenick has quit [Quit: abstrusenick]
TheLZA has quit [Remote host closed the connection]
baphled has joined #ruby
<RubyPanther> EstanislaoStan: usually good OOP practices will prevent the problem from even coming up. When you hit that you should ask yourself if your code is too procedural.
Vert has quit [Read error: Connection reset by peer]
bigmeow has joined #ruby
<EstanislaoStan> Yeah. I'm just being lazy and trying to get a very limited program to do something. I'm not planning on expanding on it in the future and if I do, it's small enough that I'll be able to make it OOP really easily.
nari_ has joined #ruby
marcelfahle has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
insecurlex has joined #ruby
jorge has joined #ruby
apok has quit [Ping timeout: 260 seconds]
davorb has quit [Quit: Computer has gone to sleep.]
jenrzzz has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
t39356 has quit [Remote host closed the connection]
t43424 has joined #ruby
jtgiri_ has quit [Quit: jtgiri_]
beneggett has joined #ruby
jorge has quit [Ping timeout: 264 seconds]
beneggett has quit [Client Quit]
apok has joined #ruby
Spooner has quit [Ping timeout: 276 seconds]
flu- has quit [Quit: leaving]
flip_digits has joined #ruby
nerdy has joined #ruby
johnjohnson has quit []
codefriar has quit [Quit: Linkinus - http://linkinus.com]
codefriar has joined #ruby
nari_ has quit [Ping timeout: 245 seconds]
indian has joined #ruby
nerdy has quit [Quit: Computer has gone to sleep.]
<elico> i am tring to do something with gsub on command line\on a file but something gets me wrong
baphled has quit [*.net *.split]
pygmael has quit [*.net *.split]
laen_ has quit [*.net *.split]
carrythezero has quit [*.net *.split]
noam has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
__class__ has quit [*.net *.split]
idoru has quit [*.net *.split]
mahlon has quit [*.net *.split]
jmcphers has quit [*.net *.split]
Guest23084 has quit [*.net *.split]
mr-rich has quit [*.net *.split]
laen_ has joined #ruby
<elico> I want to replace this "render_png("example9")" to "render_png("example9.png")" but i want to do it as a regex because of the number...
<elico> the number changing
<fowl> are you using gsub to edit code? did i read that right?
cakehero has quit [Quit: Computer has gone to sleep.]
<elico> I dont know what to do but i want to replace a string in a code file..
<elico> the simplest way for me is to use regex match or gsub
<fowl> open it in your editor and use find&replace (for me its control H)
jesseatkinson has joined #ruby
<fowl> elico: only god can save you if you chose to stay your path
<elico> no i have 30 files...
mwilson has quit [Disconnected by services]
Takehiro has joined #ruby
<elico> i have a code but it's not a one liner..
<fowl> in that case now is the perfect time to remove all those hardcoded filenames
mwilson- has joined #ruby
<elico> it's not my code...
<elico> i need to run the code once and that's it
radic has quit [Disconnected by services]
radic_ has joined #ruby
<elico> ok will be done in secs..
radic_ is now known as radic
<elico> i want to use it like in sed..
GeneralPatton has joined #ruby
monkey13 has joined #ruby
<elico> i dont remeber how to use variables in sed..
monkey13 has quit [Client Quit]
Takehiro has quit [Ping timeout: 248 seconds]
EstanislaoStan has quit [Quit: Page closed]
GeneralPatton has quit [Quit: Leaving]
Taichouchou2 has joined #ruby
Serosyn has joined #ruby
<elico> fowl: it took one while loop to make them all fine now
thesheff17 has quit [Ping timeout: 268 seconds]
bontaq has joined #ruby
h4mz1d has joined #ruby
pygmael has joined #ruby
<bontaq> hey ruby gents, I'm pretty new. What would be the most ruby way to change the day from a Time instance to the previous day?
deryl has quit [Quit: deryl]
<elico> bontaq: what do you mean by change? it's a variable that you can subtract and add
kuzushi has quit [Ping timeout: 244 seconds]
<bontaq> well, when I try to do a.day = a.day -1, I get an error. I'm terribly sorry if this is a base misunderstanding of how ruby works
<bontaq> a would be a = Time.new()
<fowl> a - (60*60*24)
<fowl> a day in seconds^
<bnagy> roughly
Nanuq has quit [Ping timeout: 245 seconds]
bradhe has quit [Remote host closed the connection]
TheFuzzball has quit [Quit: Leaving...]
<bontaq> thanks fowl, it looks like that'll work :)
<bnagy> looks like Date has the better methods
<bontaq> I'm writing a little app because my city has a very shitty bus time lookup system, so you can probably understand why I'm nervous about times
jorge has joined #ruby
beneggett has joined #ruby
lateau has joined #ruby
<bnagy> ahh DateTime has the Date methods, better
t43424 has quit [Remote host closed the connection]
t8853 has joined #ruby
<bnagy> >> DateTime.now + 1
<al2o3cr> -e:1:in `eval': uninitialized constant DateTime (NameError), from -e:1:in `eval', from -e:1:in `<main>'
jorge has quit [Ping timeout: 245 seconds]
<bnagy> >> require 'date';DateTime.now + 1
<al2o3cr> (DateTime) #<DateTime: 2012-08-28T03:10:02+00:00 ((2456168j,11402s,659124170n),+0s,2299161j)>
<bontaq> oh nice!!
nari has joined #ruby
<bontaq> with DateTime I can just ask a.prev_day.saturday?
<bontaq> man is that smooth
kuzushi has joined #ruby
randomau_ has quit [Read error: Connection reset by peer]
codefriar has quit [Quit: Leaving...]
jorge has joined #ruby
mwilson- is now known as mwilson
mucker has joined #ruby
aldodelgado has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
<bnagy> it also has a really good parser
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
<bnagy> >> require 'date' DateTime.parse "Sep 11, 15:31"
<al2o3cr> -e:1:in `eval': (eval):1: syntax error, unexpected tCONSTANT, expecting $end (SyntaxError), require 'date' DateTime.parse "Sep 11, 15:31", ^, from -e:1:in `<main>'
<bnagy> >> require 'date'; DateTime.parse "Sep 11, 15:31"
<al2o3cr> (DateTime) #<DateTime: 2012-09-11T15:31:00+00:00 ((2456182j,55860s,0n),+0s,2299161j)>
<bnagy> need. coffee.
<elico> >>puts RUBY_VERSION
<al2o3cr> (NilClass) nil, Console: 1.9.3
jorge has quit [Remote host closed the connection]
<elico> >>puts RUBY_PLATFORM
<al2o3cr> (NilClass) nil, Console: x86_64-linux
jorge has joined #ruby
<elico> bnagy: did you work with some graph creating library?
<bnagy> no, I use gnuplot or R
<bnagy> don't do all that much visualisation
cakehero has joined #ruby
coderguy has joined #ruby
coderguy has quit [Client Quit]
emmanuelux has quit [Ping timeout: 252 seconds]
<elico> well i'm not either i just need to create some logs graph on statistics of a server..
<elico> the googlegraph has a very nice and simple api but i need some more then what it gives so I tried and used "rchart" gem which is very very nice but the api i more complex then the google one...
graspee has joined #ruby
seanstickle has quit [Quit: seanstickle]
pingfloyd has quit [Ping timeout: 244 seconds]
<bnagy> use whatever MRTG grew up to become
justinmcp has joined #ruby
butblack has left #ruby [#ruby]
<elico> but mrtg is not in ruby..
<elico> and i want a more colorful graph...
<elico> well thanks... i wasnt thinking about RRD
h4mz1d has quit [Ping timeout: 246 seconds]
<elico> i new i forgot something while concentrating on GD
jasonLaster has quit [Remote host closed the connection]
mucker has quit [Ping timeout: 245 seconds]
<elico> bnagy: and if you are here .. maybe you had some expirence with BDB?
<bnagy> only to not use it
lateau has quit [Quit: Leaving.]
<bnagy> {tokyo|kyoto}cabinet are better
<elico> ok so.. first thanks for the advice..
<bnagy> and tokyo cabinet has a really good ruby ffi wrapper
guns has quit [Quit: guns]
Guedes has quit [Ping timeout: 244 seconds]
<elico> and if so I want to store domains blacklist in the DB
<bnagy> how fast do you need to look them up?
Guest13289 has quit [Quit: Leaving]
<elico> i would like to get them the fastest i can..
<bnagy> some kind of prefix tree then I guess
<elico> for now i am using mysql + redis as ram db
hemanth has joined #ruby
bpo has quit [Quit: bpo]
<elico> bnagy: will you be here later?
<bnagy> yeah it's morning for me
<elico> yea for me too so later... need to couple things
<bnagy> although I appear to have food poisoning again, so I may pass out
bradhe has joined #ruby
pygmael has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
pygmael has joined #ruby
Tearan has joined #ruby
justinmcp has quit [Remote host closed the connection]
lateau has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
Taichouchou2 has quit [Remote host closed the connection]
lateau has quit [Client Quit]
drago757 has joined #ruby
<elico> bnagy: hope you will feel better
Takehiro has quit [Ping timeout: 248 seconds]
rohit has joined #ruby
neersighted has joined #ruby
bontaq has quit [Ping timeout: 272 seconds]
BrokenCog has quit [Quit: leaving]
havenn has quit [Remote host closed the connection]
<elico> bnagy: if you know of a nice document about tokyocabinet i will be more then happy to read about it a bit
havenn has joined #ruby
grizlo42 has quit [Quit: Leaving.]
ananthakumaran has joined #ruby
Nanuq has joined #ruby
<elico> thanks.. i have seen this guy picture somewhere
deryl has joined #ruby
Tomasso has joined #ruby
havenn has quit [Read error: Connection reset by peer]
havenn has joined #ruby
jorge has quit [Remote host closed the connection]
banisterfiend has joined #ruby
jesseatkinson has quit [Quit: jesseatkinson]
grenierm has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
Banistergalaxy has quit [Ping timeout: 260 seconds]
ghanima has quit [Quit: Leaving.]
mascool has joined #ruby
mengu has quit [Read error: Connection reset by peer]
`brendan has quit [Ping timeout: 244 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
Bidness has joined #ruby
guns has joined #ruby
t8853 has quit [Remote host closed the connection]
t85076 has joined #ruby
havenn_ has joined #ruby
Abbas| has quit [Ping timeout: 246 seconds]
Taichouchou2 has joined #ruby
Bidness has quit [Remote host closed the connection]
grenierm has quit [Quit: grenierm]
philcrissman is now known as philcrissman_zzz
pygmael has quit [Read error: Connection reset by peer]
cameron has joined #ruby
cameron has quit [Remote host closed the connection]
pygmael has joined #ruby
centipedefarmer has quit [Quit: This computer has gone to sleep]
grenierm has joined #ruby
ghanima has joined #ruby
Taichouchou2 has quit [Ping timeout: 246 seconds]
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
bradhe has quit [Remote host closed the connection]
SCommette has joined #ruby
banisterfiend has quit [Ping timeout: 264 seconds]
<hemanth> >> [1,2,3].to_s
<al2o3cr> (String) "[1, 2, 3]"
<hemanth> ^ 1.9 right?
deryl has quit [Quit: deryl]
<hemanth> >> [1,2,3].join
<al2o3cr> (String) "123"
<bnagy> >> ?a
<al2o3cr> (String) "a"
<bnagy> obscure version fingerprinting tricks day!
vitor-br has quit [Quit: Saindo]
tommyvYo has quit [Quit: Computer has gone to sleep.]
<hemanth> bnagy, :D
burgestrand has quit [Quit: Leaving.]
bradhe has joined #ruby
situ has joined #ruby
situ has left #ruby [#ruby]
moshee has quit [Remote host closed the connection]
sambio has quit []
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
SCommette has quit [Quit: SCommette]
burgestrand has joined #ruby
burgestrand has quit [Client Quit]
azm has quit [Ping timeout: 240 seconds]
pygmael has quit [Read error: Connection reset by peer]
pygmael has joined #ruby
grenierm has quit [Quit: grenierm]
banisterfiend has joined #ruby
ghanima has quit [Ping timeout: 248 seconds]
deryl has joined #ruby
iori has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
havenn_ has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 246 seconds]
ananthakumaran has quit [Quit: Leaving.]
aantix has joined #ruby
aantix has quit [Client Quit]
noyb has joined #ruby
fantazo has joined #ruby
pygmael has quit [Read error: Connection reset by peer]
jorge has joined #ruby
pygmael has joined #ruby
centipedefarmer has joined #ruby
rohit has quit [Ping timeout: 260 seconds]
thecreators has joined #ruby
jorge has quit [Ping timeout: 252 seconds]
mc0e has joined #ruby
centipedefarmer has quit [Quit: This computer has gone to sleep]
havenn has quit [Remote host closed the connection]
ph^ has joined #ruby
ph^_ has joined #ruby
Taichouchou2 has joined #ruby
AntiTyping has joined #ruby
khakimov has joined #ruby
dev_ryan70 has joined #ruby
t85076 has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
t5212 has joined #ruby
ph^ has quit [Ping timeout: 246 seconds]
a_a_g has joined #ruby
sepp2k has joined #ruby
AntiTyping has quit [Client Quit]
dev_ryan70 has quit [Ping timeout: 272 seconds]
Tomasso has quit [Ping timeout: 265 seconds]
Nisstyre_ has quit [Ping timeout: 246 seconds]
yxhuvud has joined #ruby
aristidesfl has quit []
AlbireoX has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
insecurlex has quit [Remote host closed the connection]
vectorshelve has joined #ruby
a_a_g has quit [Quit: Leaving.]
<vectorshelve> Hi All
drago757 has quit [Quit: drago757]
perryh is now known as perry
ryanf has quit [Quit: leaving]
tonini has joined #ruby
arkiver has joined #ruby
s1n4 has joined #ruby
arkiver has quit [Read error: Connection reset by peer]
ghanima has joined #ruby
bradhe has joined #ruby
bradhe has quit [Remote host closed the connection]
havenn has joined #ruby
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
cjs has joined #ruby
quest88 has quit [Quit: quest88]
wallerdev has quit [Quit: wallerdev]
<cjs> I'm trying to build https://github.com/luislavena/sqlite3-ruby.git, but I can't get setup.rb to accept a parameter for my non-standard sqlite3 location. (This would be the --with-sqlite3-dir=... parameter that extconf.rb, run by setup.rb, accepts.) Where's the best place to get some help with this?
havenn has quit [Remote host closed the connection]
jtgiri_ has joined #ruby
ttilley has joined #ruby
cloud|droid has joined #ruby
<reactormonk> cjs: what about installing it with gem?
zburt has quit [Ping timeout: 252 seconds]
<_br_> cjs: Hm, well you can always build it by hand and install it, no?
a_a_g has joined #ruby
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rohit has joined #ruby
<cjs> I really don't want to bring gem into my build system.
mohits has joined #ruby
<cjs> _br_: I'm trying to build it "by hand," I thought. Or are you saying, don't use setup.rb? Hmm, that sounds like an option....
wvms has quit [Quit: wvms]
djdb has joined #ruby
nim_ has joined #ruby
aldodelgado has joined #ruby
deryl has quit [Quit: deryl]
nim__ has quit [Ping timeout: 246 seconds]
mneorr has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
mneorr has joined #ruby
kiri has joined #ruby
nim__ has joined #ruby
Jck_true has joined #ruby
Banistergalaxy has joined #ruby
eikko has quit [Ping timeout: 252 seconds]
ghanima1 has joined #ruby
ghanima has quit [Ping timeout: 244 seconds]
kiri has left #ruby [#ruby]
nim_ has quit [Ping timeout: 264 seconds]
senny has joined #ruby
moshee has joined #ruby
moshee is now known as Guest79231
Guest79231 has quit [Remote host closed the connection]
Taichouchou2 has quit [Remote host closed the connection]
mwilson has quit [Disconnected by services]
burgestrand has joined #ruby
tagrudev has joined #ruby
mneorr has quit [Remote host closed the connection]
Tearan has quit [Quit: Sleepy Badger....]
maesbn has joined #ruby
axisys has joined #ruby
axisys has quit [Changing host]
axisys has joined #ruby
mosheee has joined #ruby
mosheee is now known as Guest64817
axisys has quit [Client Quit]
mohits has quit [Remote host closed the connection]
indian has quit [Ping timeout: 240 seconds]
fantazo has quit [Remote host closed the connection]
Taichouchou2 has joined #ruby
pdelgallego has joined #ruby
ly_gs has joined #ruby
darren has quit [Remote host closed the connection]
plu has joined #ruby
<plu> hi. I'm using powertop to identify processes causing my cpu to wake up a lot. In the top 5 there are a lot of ruby processes. https://raw.github.com/gist/3486252/d87bf0ab3d6e9094b7263f521afab26711d15531/gistfile1.txt
rohit has quit [Ping timeout: 252 seconds]
ly_gs has quit [Remote host closed the connection]
himsin has quit [Ping timeout: 244 seconds]
Takehiro has joined #ruby
pdelgallego has quit [Quit: pdelgallego]
Guest64817 has quit [Remote host closed the connection]
nim_ has joined #ruby
jtgiri_ has quit [Quit: jtgiri_]
Morkel has joined #ruby
timonv has joined #ruby
mosheeee has joined #ruby
Stalkr_ has joined #ruby
nim__ has quit [Ping timeout: 245 seconds]
c0rn_ has joined #ruby
situ has joined #ruby
Takehiro has quit [Remote host closed the connection]
situ has left #ruby [#ruby]
elico has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
elico has joined #ruby
bradhe has joined #ruby
x0F_ has joined #ruby
x0F has quit [Disconnected by services]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
x0F_ is now known as x0F
mneorr has joined #ruby
RubyPanther has joined #ruby
mahlon has joined #ruby
__class__ has joined #ruby
jmcphers has joined #ruby
carrythezero has joined #ruby
mr-rich has joined #ruby
idoru has joined #ruby
mwilson has joined #ruby
noam has joined #ruby
Guest23084 has joined #ruby
gift has quit [Ping timeout: 276 seconds]
vectorshelve has quit [Changing host]
vectorshelve has joined #ruby
aganov has joined #ruby
skogis has joined #ruby
evelyette has quit [Ping timeout: 265 seconds]
bier_ has quit [Ping timeout: 265 seconds]
aantix has joined #ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
evelyette has joined #ruby
bier_ has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
alanp_ is now known as alanp
Hanmac has joined #ruby
cirwin has joined #ruby
cjs has quit [Quit: Leaving]
gift_ has joined #ruby
jprovazn_away is now known as jprovazn
pskosinski has joined #ruby
guns has quit [Ping timeout: 264 seconds]
etehtsea has joined #ruby
etehtsea is now known as Guest46495
Guest46495 is now known as etehtsea
mahmoudimus has joined #ruby
adeponte has joined #ruby
t5212 has quit [Remote host closed the connection]
nilg has joined #ruby
t46341 has joined #ruby
_bart has quit [Quit: _bart]
sgmac has joined #ruby
zommi has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
sgmac has left #ruby [#ruby]
nari has quit [Ping timeout: 245 seconds]
aantix has quit [Quit: aantix]
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
mahmoudimus has joined #ruby
alup has joined #ruby
Banistergalaxy has quit [Ping timeout: 244 seconds]
mayankkohaley has joined #ruby
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
mayankkohaley has quit [Client Quit]
mayankkohaley has joined #ruby
mayankkohaley has left #ruby [#ruby]
jarred has quit [Quit: jarred]
cloud|droid has quit [Remote host closed the connection]
cloud|droid has joined #ruby
Banistergalaxy has joined #ruby
noyb has quit [Ping timeout: 245 seconds]
Abbas5 is now known as Abbas|
cloud|droid has quit [Remote host closed the connection]
etehtsea has quit [Quit: Computer has gone to sleep.]
lolmaus has joined #ruby
nari has joined #ruby
jjang has quit [Remote host closed the connection]
xorigin has joined #ruby
hoelzro|away is now known as hoelzro
datapolitical has joined #ruby
mascool has quit [Ping timeout: 244 seconds]
Zolrath has joined #ruby
Zolrath has quit [Client Quit]
zigomir has joined #ruby
vjt has quit [Ping timeout: 272 seconds]
Banistergalaxy has quit [Ping timeout: 252 seconds]
artOfWar_ has quit [Ping timeout: 268 seconds]
znake has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
thone has joined #ruby
d3vic3 has joined #ruby
answer_42 has joined #ruby
nim_ has quit [Ping timeout: 244 seconds]
iori has quit [Read error: No route to host]
adeponte has quit [Remote host closed the connection]
arkiver has joined #ruby
Jan_ has joined #ruby
iori has joined #ruby
thone_ has quit [Ping timeout: 264 seconds]
W8uiE5 has joined #ruby
Stalkr_ has quit [Read error: Connection reset by peer]
Stalkr_ has joined #ruby
mosheeee has quit [Remote host closed the connection]
etehtsea has joined #ruby
etehtsea is now known as Guest45519
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
ickmund has joined #ruby
_md has joined #ruby
shadoi1 has quit [Quit: Leaving.]
heftig has joined #ruby
<W8uiE5> tried to install a program which needs rake generate_session_store. That leads me to: http://pastebin.com/Efbf0V3H I have no nowledge about gems, ruby or rake stuff. Would somebody help, please?
pdelgallego has joined #ruby
chriskk has quit [Quit: chriskk]
Bosma has quit [Ping timeout: 265 seconds]
<W8uiE5> and gem list says: http://pastebin.com/WNgpyefM
<Hanmac> W8uiES you could try an newer ruby
nim_ has joined #ruby
eldariof has joined #ruby
Guest5515 has joined #ruby
<W8uiE5> Hanmac: I have installed ruby 1.8.7 with my package manager. which is the best wy to get a newer one?
<hoelzro> W8uiE5: I would say rvm, or rbenv
Stalkr_ has quit [Quit: Leaving...]
cezar has joined #ruby
cezar has quit [Client Quit]
jeff_sebring has quit [Quit: Leaving]
<Hanmac> W8uiES there is an ruby1.9.1-full package too
t46341 has quit [Remote host closed the connection]
t45994 has joined #ruby
dangerousdave has joined #ruby
ikaros has joined #ruby
tvw has joined #ruby
<W8uiE5> Hanmac: Your are right. Do I have to remove other packages than ruby before?
c0rn_ has quit []
indian has joined #ruby
Xeago has joined #ruby
Xeago has left #ruby [#ruby]
Xeago has joined #ruby
_bart has joined #ruby
<_bart> hi
ttilley has quit [Quit: ttilley]
matrixise has joined #ruby
<_bart> how do I rotate (by 90 degrees) an array of strings? Let's say: [["a", "b", "c"], ["d", "e", "f"]] should become [["a", "d"], ["b", "e"], ["c", "f"]]
grizlo42 has joined #ruby
<Jan_> _bart: call .transpose on it
znake has quit [Quit: znake]
Jan_ is now known as DefV
<_bart> Or rather, what I'm really interested in, let's say I have [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]], I want to edit the array to become [["", "", "c"], ["", "", "d"], ["", "d", "e"]]
<Hanmac> W8uiES no you could switch the default ruby version at runtime
<_bart> so that's basically an .uniq on the transposed array
<_bart> Jan_: cool, thanks.
<Xeago> _bart may i ask the logic behind what you are trying to achieve?
<_bart> Xeago: it's about finding unique parts in a set of URLs by splitting on the "/" and then doing what I just described.
<_bart> but .uniq will not help me out
<Hanmac> _bart you maybe want like this?
<Hanmac> >> [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]].transpose.map(&:uniq)
<al2o3cr> (Array) [["a"], ["b", "d"], ["c", "d", "e"]]
ly_gs has joined #ruby
<Xeago> he's stripping uniques, not just unique'ing them..
<_bart> yes
<_bart> I want to keep the uniques in the same array/location
<Xeago> >> >> [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]].transpose.map(&:uniq!)
<al2o3cr> -e:1:in `eval': (eval):1: syntax error, unexpected tRSHFT (SyntaxError), >> [["a", "b", "c"], ["a", "b"..., ^, from -e:1:in `<main>'
<grizlo42> _bart then just left pad it
saschagehlich has joined #ruby
<Xeago> >> [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]].transpose.map(&:uniq!)
<al2o3cr> (Array) [["a"], ["b", "d"], nil]
<Xeago> you want them vertically unique?
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<_bart> vertically yes
<_bart> that's why I thought the .transpose would bring me closer to my goal
<Xeago> I think it puts you further away
<_bart> like I said: [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]] -> [["", "", "c"], ["", "", "d"], ["", "d", "e"]]
<Xeago> you want to strip the common path right?
<_bart> so because the a at index 0 already exists in another array it's removed
<_bart> and because the b at index 1 already exists in another array it's removed
apok has quit [Quit: apok]
<W8uiE5> Hanmac: I've installed that package. Here is a list of what I have now: http://pastebin.com/NyMACUnr ruby -v shows: 1.8.7. How can I switch to 1.9.1?
<_bart> c is the only unique value (comparing to the other arrays) in the first array
<_bart> Xeago: yes you could call that common path I think
<Xeago> this is probably wrong, but how about making it hashes of hashes (of hashes, etc)
<Xeago> so you group them per item
<Hanmac> update-alternatives --config ruby
<Xeago> ["a"=>[["c"],["d"],["d","e"]]
<Xeago> err
<Xeago> you get the point
qwerxy has joined #ruby
<Xeago> my syntax is awfully wrong :\
datapolitical has quit [Quit: This computer has gone to sleep]
<banisterfiend> SeanTAllen: but your heart is in the right place
<banisterfiend> Xeago: *
<Xeago> oh why, ty :)
tvw has quit [Remote host closed the connection]
<Xeago> let's see if I can get proper syntax
<_bart> how about .transpose, then loop through, if it's not entire unique values empty them all, and transpose back?
<banisterfiend> Xeago: http://i.imgur.com/HRxru.jpg
skogis has quit [Read error: Operation timed out]
[Neurotic] has quit [Quit: time to go get some dinner!]
<W8uiE5> Hanmac: sudo update-alternatives --config ruby leads to: Es gibt nur eine Alternative in Link-Gruppe ruby: /usr/bin/ruby1.8 Nichts zu konfigurieren.
<Hanmac> did you install "sudo apt-get install ruby1.9.1-full"?
<Xeago> _bart: { "a" => { "b" => ["c","d"] }, "d" => [ "e" ] }
dhruvasagar has joined #ruby
<Xeago> I'd work with that structure probably
chussenot has joined #ruby
vlad_starkov has joined #ruby
<_bart> Xeago: I also came up with this: [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]].transpose.select { |x| x.uniq.length == x.length }.transpose
<_bart> but I wonder where the "d" ended in the last array
<Xeago> >> [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]].transpose.select { |x| x.uniq.length == x.length }.transpose
<al2o3cr> (Array) [["c"], ["d"], ["e"]]
<W8uiE5> Hanmac: yes
Criztian has joined #ruby
<Xeago> I have no idea
<Xeago> >> [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]].transpose.select { |x| x.uniq.length == x.length }
<al2o3cr> (Array) [["c", "d", "e"]]
<Xeago> >> [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]].transpose.select { |x| x.uniq.length >= x.length-1 }
<al2o3cr> (Array) [["b", "b", "d"], ["c", "d", "e"]]
<Xeago> >> [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]].transpose.select { |x| x.uniq.length >= x.length-1 }.transpose
<al2o3cr> (Array) [["b", "c"], ["b", "d"], ["d", "e"]]
t45994 has quit [Remote host closed the connection]
<_bart> hmm still not it :)
t28876 has joined #ruby
<Xeago> look into group by
<Xeago> banister, would you recommend the hash layout I proposed or try getting it in arrays
senny has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 240 seconds]
<banisterfiend> Xeago: sorry i wasn't listening to u
<W8uiE5> Hanmac: You can take a look for yourself: http://pastebin.com/dsDFvz20
<banisterfiend> Xeago: i dont even know who you are, let alone what u're talking about
<banisterfiend> my guess is you're some genre of eastern-european
Stalkr_ has joined #ruby
<_bart> Xeago: thanks for your help
<banisterfiend> but i haven't investigated
<_bart> Xeago: I can live with this output:
<_bart> >> [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]].transpose.select { |x| x.uniq.length > 1 }.transpose
<al2o3cr> (Array) [["b", "c"], ["b", "d"], ["d", "e"]]
<_bart> it's only stripping the common path when the value is the same in every array
<banisterfiend> banghouse: array.map { |v| v.drop }
<banisterfiend> _bart: [["a", "b", "c"], ["a", "b", "d"], ["a", "d", "e"]].map { |v| v.tap(&:shift) }
<banisterfiend> hmm
<Xeago> why not group it into hashes..
<Xeago> seems so much easier and representable
grizlo42 has quit [Quit: Leaving.]
<Hanmac> Xeago: try it ... but it must work with an undefined amount of string parts
<Xeago> I did try it, just keep adding nested hashes..
<Xeago> however, didn't write code to do it..
<_bart> grouping into hashes seems more complex than required, by using .map, .transpose, .tap or .select I can keep things small and tidy
<_bart> banisterfiend: looks cool, never use :shift or .tap so I'm looking into it
Guest5515 has quit [Ping timeout: 264 seconds]
qwerxy has quit [Quit: offski]
Quadlex is now known as AwayLex
<W8uiE5> Hanmac: Tried sudo apt-get remove ruby ruby1.9.1-full followed by sudo apt-get install ruby ruby1.9.1-full. The error stays.
<Hanmac> ... something is ood with your system ... hm you could remove ruby-full and install only ruby1.9.1-full
beneggett has joined #ruby
<W8uiE5> Hanmac: ok, i'll try
kuzushi has quit [Ping timeout: 268 seconds]
<Hanmac> is "/usr/bin/ruby1.9.1" on your system or is this missing too?
Guest5515 has joined #ruby
kuzushi has joined #ruby
<W8uiE5> Hanmac: Just did sudo apt-get remove ruby ruby1.9.1-full ruby-full. Just wondered, that ll /usr/bin/rub still shows: rubibtex ruby ruby1.8 and ruby -v shows still 1.8.7, too.
<W8uiE5> Hanmac: Is that normal?
elico has left #ruby [#ruby]
<W8uiE5> Hanmac: deinstalled every ruby package now
cirwin has quit [Ping timeout: 276 seconds]
arkiver has quit [Quit: Leaving]
<Hanmac> hm ruby1.8 is still installed
dhruvasagar has quit [Ping timeout: 240 seconds]
mklappstuhl has joined #ruby
dhruvasagar has joined #ruby
<Xeago> does apt-get know about system-ruby?
qwerxy has joined #ruby
<mklappstuhl> How do I evaluate an array to a single true or false depending on whether there is a single "true" inside the array? I'm curious what functions you'd use, I will probably use reduce
JohnBat26 has joined #ruby
<Hanmac> Xeago aptget only installes system-ruby versions
imami|afk is now known as banseljaj
dev_ryan70 has joined #ruby
<mklappstuhl> an array like [false, true, true, false, false]
<hemanth> >> "hemanth".next
<al2o3cr> (String) "hemanti"
<hemanth> :)
charliesome has joined #ruby
<Hanmac> mklappstuhl. so [false, true, true, false, false] should be evaluated to false or true?
<Hanmac> >> [false, true, true, false, false].any?
<al2o3cr> (TrueClass) true
<Hanmac> >> [false, true, true, false, false].one?
<al2o3cr> (FalseClass) false
saschagehlich has quit [Quit: saschagehlich]
<W8uiE5> Hanmac: I removed 1.8 and installed ruby1.9.1-full. now ruby -v shows that ruby is not installed. ll /usr/bin/rub* shows: /usr/bin/rubibtex and /usr/bin/ruby1.9.1
<W8uiE5> Hanmac: done: ln -s /usr/bin/ruby1.9.1 ruby
tonini has joined #ruby
<Hanmac> W8uies okay ... update-alternatives should have worked maybe your system it too old or to ood ...
<mklappstuhl> Hanmac, any? looks good
robustus has joined #ruby
mwilson has quit [Disconnected by services]
dev_ryan70 has quit [Ping timeout: 246 seconds]
mwilson has joined #ruby
mohits has quit [Read error: No route to host]
M- has quit [Quit: This computer has gone to sleep]
Takehiro has quit [Remote host closed the connection]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
arkiver has joined #ruby
<W8uiE5> Hanmac: I work with Kubuntu 10.04. Seems like the upgrade was useless. I have the same error as before: http://pastebin.com/TtbUkufM
Taichouchou2 has quit [Remote host closed the connection]
Kwpolska has quit [Ping timeout: 240 seconds]
<shevy> hehe bundler
mrdodo has joined #ruby
Takehiro has joined #ruby
<Xeago> do you have tools for building c code, W8uiE5?
<shevy> W8uiE5, you probably lack the file mysqlclient.so
<Xeago> how about the dropin mysql client that has no native extension, forgot what it was called
<shevy> sqlite?
<shevy> :D
<Xeago> concurrency? :D
<W8uiE5> Xeago: dpkg --get-selections | grep build shows build-essential install so i would say yes
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego has joined #ruby
<shevy> you don't have mysqlclient.so
<Xeago> I'd assume you do since apt-get builds from source right?
<W8uiE5> shevy: how do you mean that?
<shevy> it is the name of a shared object file, a library
<_bart> banisterfiend: my array is ["a/b/b/c", "a/b/c/c"], these are URLs (so the single characters are normally words), now how do I turn this into ["b", "c"] (the third part of the url) by splitting on "/", then making sure the value is vertically unique?
<shevy> -lmysqlclient will look for .so file first, then for .a file I think
<W8uiE5> shevy: mysql 5.1 is already installed and locate mysqlclient.so shows /usr/lib/libmysqlclient.so.15 /usr/lib/libmysqlclient.so.16 ...
<shevy> hmm
<W8uiE5> Xeago: don't understand your question
<Xeago> it wasn't a question, and you already confirmed the answer
<Hanmac> W8uiES is the mysql dev package installed too?
thecreators has quit [Quit: thecreators]
<banisterfiend> _bart: figure it out yourself homie
<_bart> banisterfiend: I got this .map { |x| x.split("/") }.transpose.select { |x| x.uniq.length > 1 }.transpose
thecreators has joined #ruby
<_bart> >> ["a/a/b", "a/a/c"].map { |x| x.split("/") }.transpose.select { |x| x.uniq.length > 1 }.transpose
<al2o3cr> (Array) [["b"], ["c"]]
<_bart> >> ["a/a/b/c", "a/a/c/c"].map { |x| x.split("/") }.transpose.select { |x| x.uniq.length > 1 }.transpose
<al2o3cr> (Array) [["b"], ["c"]]
<Xeago> you want c/c ?
<_bart> no
<_bart> just the unique value
asteve has joined #ruby
<Xeago> [["b"], ["c"]]?
Takehiro has quit [Remote host closed the connection]
mrdodo has quit [Ping timeout: 246 seconds]
<_bart> >> ["a/a/b/d/d", "a/a/c/d/d"].map { |x| x.split("/") }.transpose.select { |x| x.uniq.length > 1 }.transpose.map { |x| x.join("/") }
<al2o3cr> (Array) ["b", "c"]
<_bart> it seems to work now :)
<_bart> >> ["a/a/b/z/d/d", "a/a/c/y/d/d"].map { |x| x.split("/") }.transpose.select { |x| x.uniq.length > 1 }.transpose.map { |x| x.join("/") }
<al2o3cr> (Array) ["b/z", "c/y"]
<charliesome> !zomg
<al2o3cr> Still alive~
<al2o3cr> NOOOOOOO
thecreators has quit [Client Quit]
<W8uiE5> Hanmac: no. Should i install libmysqlclient-dev 5.1.63 or 5.1.41?
<Hanmac> imo the recent one
_pdelgallego has quit [Remote host closed the connection]
<shevy> good old debian, always making people work for their money
khakimov has quit [Quit: Computer has gone to sleep.]
<Hanmac> he uses 10.04 imo he sould use an more recent too ... like 12.04 or 11.10 ...
Virunga has joined #ruby
yonggu has joined #ruby
<shevy> debian users upgrade once every five years
* Hanmac is a bloody-stupid-nighly user ... he upgrades more then five times per day
fyolnish_ has quit [Remote host closed the connection]
<Paradox> and this is why i use OS X
<Xeago> Paradox: tried upgrading your xnu? :)
<Xeago> I did, it was a pain
berserkr has joined #ruby
<Paradox> Xeago, yah, brew update
peterhellberg has joined #ruby
<Xeago> brew doesn't handle xnu
<Xeago> xnu is your kernel
cloud|droid has joined #ruby
<Paradox> derp
dekroning has joined #ruby
dangerousdave has quit [Remote host closed the connection]
<Paradox> i am not good at this drinking tonight
dangerousdave has joined #ruby
<Xeago> feel free to upgrade nightly :)
t28876 has quit [Remote host closed the connection]
<Xeago> (who said, you can't run custom kernels under osx :D!)
t26406 has joined #ruby
chendo_ has joined #ruby
<W8uiE5> Hanmac: Ok, that solved this error and leads to: http://pastebin.com/8WJS1upX
<chendo_> >> `whoami`
<al2o3cr> , [FATAL] Failed to create timer thread (errno: 11)
<chendo_> >> require "socket" and TCPSocket.new("127.0.0.1", 9999).gets
<al2o3cr> (String) "hello world\n"
<shevy> man
<shevy> this bundler wants to INSTALL THE WORLD
<shevy> first you wanted mysql, now you also want pq
<chendo_> >> File.read('/etc/hosts')
<al2o3cr> -e:1:in `eval': No such file or directory - /etc/hosts (Errno::ENOENT), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<shevy> chendo_ having fun eh :P
<chendo_> somewhat ;p
<shevy> I think the bot shows only six files in bin/
<charliesome> >> fork { require "socket"; TCPServer.new(31337).tap { |s| loop { s.accept.tap { |c| c.puts "charliesome was here"; c.close } } } }
<shevy> you broke it!
<charliesome> >> require "socket" and TCPSocket.new("127.0.0.1", 31337).gets
<al2o3cr> , [FATAL] Failed to create timer thread (errno: 11)
<charliesome> oops
<charliesome> >> require "socket" and TCPSocket.new("127.0.0.1", 31337).gets
<al2o3cr> , [FATAL] Failed to create timer thread (errno: 11)
* shevy points at charliesome
<shevy> it was him!
<charliesome> oops
<charliesome> my bad
<shevy> some days ago we already thought the bot would be unbreakable
<Paradox> man tap is useful
yonggu has quit [Remote host closed the connection]
yonggu has joined #ruby
<W8uiE5> Hanmac: Gone with instaling the dev packag, too.
banisterfiend has quit [Remote host closed the connection]
<Hanmac> W8uiES when an native installation fails look for an similar sounding -dev package ... that mostly solv the problem
banisterfiend has joined #ruby
<Hanmac> shevy the bot is only mostly unbreakable :D
vulture has quit [Quit: 离开]
<shevy> Paradox what can tap be used for?
<Paradox> shevy, anywhere you need to preform operations on something and then pass the changed something on
Taichouchou2 has joined #ruby
<shevy> hmm but most constructs, like .map, return a changed version
<Paradox> yeah
Taichouchou2 has quit [Remote host closed the connection]
<shevy> %w( abc def ghi ).map {|x| x+'y'} # => ["abcy", "defy", "ghiy"]
<Paradox> its useful for hashes i know that
nim__ has joined #ruby
<shevy> hmm
<shevy> I usually break up large constructs into smaller ones
<Paradox> i used it the other day
<shevy> sum = @things.map { |x| x.length }.inject(0) { |a, b| a + b }
<Paradox> but my boozed brain cant remember where
<shevy> I don't like that it takes me longer to process this
nim_ has quit [Ping timeout: 252 seconds]
<shevy> Paradox hah my brain is even lazier than your boozed brain
troessner has joined #ruby
<Paradox> i think i used it in a rails model somewhere
<Paradox> but cant recall
<shevy> ohhhhhh rails
<Hanmac> where tap is cool: node.attach(manager.new_object.tap{|o| o.visible = false})
banisterfiend has quit [Ping timeout: 260 seconds]
<shevy> not.good.for.my.brain
<Paradox> i was bored this weekend
<Paradox> so i wrote a fugly Z39.50 interface in rails
<Hanmac> shevy: @things.map(&:length).inject(:+)
<shevy> ewww
<shevy> my poor eyes
<Paradox> ah! i remember what tap was good for
<Xeago> unix tee?
<Paradox> deleting a key from a hash and getting the remaining hash back
beneggett has quit [Quit: Computer has gone to sleep.]
<shevy> hmm
<charliesome> tap is also useful here
<shevy> upside down
Proshot has joined #ruby
<shevy> like australian delete
Proshot has quit [Remote host closed the connection]
<Paradox> shevy, yeah, but its something i run into often enough to make useful
<Paradox> like…
<Paradox> take a big hash
<Paradox> and throw away all the values that match derp
<Paradox> but continue with the original hash
<Paradox> i dont care about the derpy values
<Paradox> i deleted them
<shevy> lol
<shevy> derpy values
seich- has quit [Ping timeout: 264 seconds]
Tref has quit [Quit: Tref]
nari has quit [Ping timeout: 245 seconds]
seich- has joined #ruby
banisterfiend has joined #ruby
<Paradox> my favorite thing ive built so far was a non-shit bb system in rails
<Paradox> reddit-like
<Paradox> but with more structure
<Paradox> designed to replace forums
<Paradox> but with infinitely threaded comments
<Xeago> comment=nested thread?
<Paradox> yup
* Hanmac gets RTT (Render to Texture) working in this binding
<Paradox> basically, each post has-many comments
<Paradox> and each comment has-one parent and has-one post
<Paradox> if the comment is top-level parent and post are the same
<Paradox> if its down, parent is the comment above it
<TommyBotten> I'm having some trouble expanding/translating a C struct into ruby ( https://gist.github.com/3436634 ). Does anyone have any ideas on how to handle a nested struct/union?
<Paradox> then, through some tricky work, only show 5-6 levels down
<Paradox> and provide links to other levels
chendo_ has quit [Ping timeout: 246 seconds]
Dave has joined #ruby
skogis has joined #ruby
Dave is now known as Guest60361
chendo_ has joined #ruby
Stalkr_ has quit [Read error: Connection reset by peer]
<W8uiE5> What can I do here? http://pastebin.com/swMpVvZN Already googled it and set export RUBYLIB=/usr/lib/ruby/vendor_ruby/1.8/rubygems/, but that changed nothing.
<banisterfiend> Paradox: sup pig
<Paradox> durnk
Stalkr_ has joined #ruby
<Paradox> no drunk im not officer
<banisterfiend> Paradox: what are you drinking, pig
<Paradox> EPIC
<W8uiE5> which ruby shows only /usr/bin/ruby which is a symbolivc link to /usr/bin/ruby1.9.1
<banisterfiend> epic beer?
<troessner> lol
<Paradox> yup
<Paradox> epic beer
<troessner> W8uiE5, you have /home/sdfsa/programme?
<troessner> seriously
<troessner> ?
dangerousdave has quit [Ping timeout: 260 seconds]
<Paradox> imperial red right now
<Paradox> such a nice beer
<troessner> also you shouldnt use 1.8 if possible
<troessner> i think your redmine installation agrees with my point
qwerxy has quit [Quit: offski]
<Paradox> goodnight
Banistergalaxy has joined #ruby
Xeago has quit []
fermion has joined #ruby
<W8uiE5> troessner: http://www.redmine.org/projects/redmine/wiki/RedmineInstall says: Supported RubyGems versions RubyGems <= 1.8. And I have installed rubygems1.8
Xeago has joined #ruby
fermion has quit [Client Quit]
Xeago has quit [Client Quit]
<troessner> W8uiE5, i see. well, according to the error message you need to do a
<troessner> require 'rubygems'
<W8uiE5> troessner: that doesn't help me
<W8uiE5> troessner: where should I do that?
saschagehlich_ has joined #ruby
Takehiro has joined #ruby
Xeago has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
<bnagy> TommyBotten: I suggest looking at FFI
fermion has joined #ruby
<troessner> W8uiE5, line 1 in boot.rb tries to require rubygems
<troessner> which fails
<bnagy> you can use their struct / union support even if you don't actually wrap any libs
<troessner> so it seems like it isnt installed
chussenot_ has joined #ruby
Markvilla has joined #ruby
<bnagy> TommyBotten: otherwise, bindata
pdelgallego has joined #ruby
chussenot has quit [Read error: Connection reset by peer]
chussenot_ is now known as chussenot
Xeago has quit [Changing host]
Xeago has joined #ruby
Abbas| has quit [Ping timeout: 246 seconds]
Taichouchou2 has joined #ruby
<W8uiE5> Thought the same. I'll make a break now. Thanks so far. I'll go on later.
mwilson has quit [Disconnected by services]
<Hanmac> W8uiES an idea would be an dist-upgrade ... your distri looks a bit old
mwilson has joined #ruby
banseljaj is now known as imami|afk
mwilson has quit [Disconnected by services]
elaptics`away is now known as elaptics
mrdodo has joined #ruby
mwilson has joined #ruby
joephelius has joined #ruby
Taichouchou2 has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
Takehiro has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 245 seconds]
cloud|droid has quit [Quit: Leaving]
ikaros has quit [Quit: Ex-Chat]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
mrdodo has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
Virunga has quit [Remote host closed the connection]
torpe22 has joined #ruby
dhruvasagar has joined #ruby
pygmael has quit [Read error: Connection reset by peer]
kirun has joined #ruby
pygmael has joined #ruby
SeySayux has quit [Read error: No route to host]
cakehero has joined #ruby
tk__ has joined #ruby
cakehero has quit [Client Quit]
Jck_true has quit [Read error: Connection reset by peer]
chendo_ has quit [Ping timeout: 244 seconds]
Jck_true has joined #ruby
cakehero has joined #ruby
cakehero has quit [Client Quit]
fyolnish has joined #ruby
timonv has quit [Remote host closed the connection]
chendo_ has joined #ruby
pygmael has quit [Read error: Connection reset by peer]
arquebus has joined #ruby
Criztian has quit []
timonv has joined #ruby
philcrissman_zzz is now known as philcrissman
LouisGB has joined #ruby
Virunga has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego has joined #ruby
SeySayux has joined #ruby
cloud|droid has joined #ruby
LBRapid has joined #ruby
Tomasso has joined #ruby
cloud|droid has quit [Client Quit]
codefriar has joined #ruby
sgmac has joined #ruby
sgmac has left #ruby [#ruby]
dev_ryan70 has joined #ruby
yonggu_ has joined #ruby
<charliesome> >> 1 + 2
<al2o3cr> , [FATAL] Failed to create timer thread (errno: 11)
dhruvasagar has quit [Remote host closed the connection]
<TommyBotten> bnagy: Thanks. I'll look into ut
<TommyBotten> *it
adambeynon has joined #ruby
dev_ryan70 has quit [Ping timeout: 260 seconds]
yonggu has quit [Ping timeout: 245 seconds]
bigkevmcd has quit [Quit: outta here]
bigkevmcd has joined #ruby
vectorshelve_ has joined #ruby
vectorshelve_ has quit [Client Quit]
vectorshelve_ has joined #ruby
<vectorshelve_> Hi
<matti> ;-l
<Xeago> >> 1-1
<al2o3cr> , [FATAL] Failed to create timer thread (errno: 11)
<Xeago> who broke it!?
vectorshelve has quit [Ping timeout: 245 seconds]
vectorshelve_ is now known as vectorshelve
arquebus has quit [Quit: Konversation terminated!]
<Hanmac> Xeago it was charliesome
<al2o3cr> , [FATAL] Failed to create timer thread (errno: 11)
<charliesome> Xeago: my bad
cascalheira has joined #ruby
<Hanmac> >> "haha"
<al2o3cr> (String) "haha"
<Hanmac> :P
<charliesome> oh there we go
<Xeago> >> 1-1
<charliesome> >> require "socket" and TCPSocket.new("127.0.0.1", 31337).gets
<al2o3cr> -e:1:in `eval': Connection refused - connect(2) (Errno::ECONNREFUSED), from (eval):1:in `new', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<al2o3cr> (Fixnum) 0
<charliesome> >> require "socket" and TCPSocket.new("127.0.0.1", 31337).gets
<al2o3cr> (String) "charliesome was here\n"
<charliesome> sweet
<Xeago> >.>
<Xeago> >> require "socket" and TCPSocket.new("127.0.0.1", 31337).gets
<al2o3cr> (String) "charliesome was here\n"
<Xeago> urgh, it is actually up
<Xeago> for more than 1 request.
<Xeago> poor bot
<Hanmac> >> require "socket" and TCPSocket.new("127.0.0.1", 31337).gets
<al2o3cr> -e:1:in `eval': Connection refused - connect(2) (Errno::ECONNREFUSED), from (eval):1:in `new', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<Hanmac> :D
<charliesome> aw
<Xeago> >> require "socket" and TCPSocket.new("127.0.0.1", 31337).gets
<al2o3cr> -e:1:in `eval': Connection refused - connect(2) (Errno::ECONNREFUSED), from (eval):1:in `new', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<Xeago> who's doin stuff with the bot!?
<Xeago> I be confused xD
Virunga has quit [Remote host closed the connection]
W8uiE5 has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120714012003]]
* Hanmac uses his power to reset the bot ... that maybe helps when he fails to create timer
mwilson has quit [Disconnected by services]
<charliesome> >> require "socket" and TCPSocket.new("irc.freenode.net", 6667).tap { |c| c.puts "USER rubymagic rubymagic rubymagic rubymagic"; c.puts "NICK rubymagic"; c.puts "JOIN #ruby"; c.puts "PRIVMSG #ruby :hello world >:)"; c.close }
<al2o3cr> (TCPSocket) #<TCPSocket:(closed)>
mwilson has joined #ruby
<Xeago> I think you need some delays in there
<charliesome> Xeago: it worked on a test channel when i did it locally :\
<charliesome> >> require "socket" and TCPSocket.new("irc.freenode.net", 6667).tap { |c| c.puts "USER rubymagic rubymagic rubymagic rubymagic"; c.puts "NICK rubymagic"; c.puts "JOIN #ruby"; c.puts "PRIVMSG #ruby :hello world >:)" }
<al2o3cr> (TCPSocket) #<TCPSocket:fd 5>
<Xeago> locally is faster
<Xeago> fd 5 :O
<_bart> why is this invalid ruby: items.delete_if { |item| (item[:filename].downcase.include? "more" && item[:filename].length < 20 && item[:url].include? "#") }
<charliesome> Xeago: as in, i ran it locally but it connected to freenode
<charliesome> _bart: replace the && with and
d3vic3 has quit [Read error: Connection reset by peer]
<charliesome> _bart: and has lower precedence than &&
_pdelgallego has quit [Read error: Connection reset by peer]
arkiver has quit [Quit: Leaving]
<Xeago> >> require "socket" and TCPSocket.new("irc.freenode.net", 6667).tap { |c| c.puts "USER rubymagic rubymagic rubymagic rubymagic"; c.puts "NICK rubymagic"; c.puts "JOIN #ruby"; c.puts "PRIVMSG #ruby :hello world >:)" }
<al2o3cr> (TCPSocket) #<TCPSocket:fd 5>
dhruvasagar has joined #ruby
<Hanmac> _bart: items.delete_if { |item| item[:filename].downcase.include?("more") && item[:filename].length < 20 && item[:url].include?("#") }
bluebie has joined #ruby
saschagehlich_ has quit [Quit: saschagehlich_]
pdelgallego has joined #ruby
saschagehlich has joined #ruby
ph^ has joined #ruby
ph^_ has quit [Read error: Connection reset by peer]
Axsuul has quit [Ping timeout: 260 seconds]
emmanuelux has joined #ruby
<_bart> Hanmac: thanks!
vlad_starkov has quit [Remote host closed the connection]
W8uiE5 has joined #ruby
pdelgallego has quit [Ping timeout: 246 seconds]
<matti> Xeago: Freenode might kick you out for not sending ping back.
nari has joined #ruby
<W8uiE5> http://pastebin.com/swMpVvZN Already googled it and set export RUBYLIB=/usr/lib/ruby/vendor_ruby/1.8/rubygems/, but that changed nothing.
vlad_starkov has joined #ruby
<Hanmac> W8uiES not do that ... your ruby should be 1.9.1 you are pointing to ruby1.8 ... that is not a good idea
<Xeago> W8uiE5: do you have access to the gem command?
baphled has joined #ruby
joephelius has quit [Quit: WeeChat 0.3.8]
pdelgallego has joined #ruby
<troessner> _bart, i'd rather use brackets in this case properly
<troessner> to me using "and" is a code smell
<Xeago> ^^
<troessner> so rather: omg(bar) && foo(baz) than omg bar and foo baz
mneorr has joined #ruby
<troessner> ah, just saw that Hanmac pointed that out already
<troessner> :)
jastix has joined #ruby
verto|off is now known as verto
<W8uiE5> Xeago: gem -v show 1.7.2. gem and ruby are both under /usr/bin
<W8uiE5> Xeago: So I would say yes
pdelgallego has quit [Read error: Connection reset by peer]
<Xeago> then I'd have no idea
baphled has quit [Ping timeout: 260 seconds]
pdelgallego has joined #ruby
tonini has quit [Read error: Connection reset by peer]
tonini has joined #ruby
skogis has quit [Ping timeout: 240 seconds]
<W8uiE5> Xeago: Is my export correct?
<Xeago> I don't see anything particularly wrong with it..
<W8uiE5> Xeago: ok. thanks so far
jorge has joined #ruby
<Xeago> try require 'rubygems' in irb
<Hanmac> W8uiES "gem env" what does show?
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<Xeago> what a variety of pastesites you use xD
pdelgallego has quit [Read error: Connection reset by peer]
<W8uiE5> Xeago: that returns true
<Hanmac> W8uiES gem still points to the wrong ruby version ... :(
<Hanmac> i seems its better to upgrade your whole system
<Xeago> or re-install gems
<Xeago> but I'd advice system
<Xeago> try using the -rubygems parameter: ruby -rubygems script/rails server webrick -e production
frogprince_mac has joined #ruby
<Xeago> after changing your ruby env
<Xeago> don't ask me how
<W8uiE5> Xeago: the error stays
geekbri has joined #ruby
<Hanmac> he uses a system that is 2years old ... :(
<Xeago> did you alter gem env?
jorge has quit [Remote host closed the connection]
<W8uiE5> How can I alter gem env?
atmosx has joined #ruby
<atmosx> hello
mneorr has quit [Remote host closed the connection]
ly_gs has quit [Remote host closed the connection]
<W8uiE5> Hanmac: It's strange that 1.8 was installed again.
<W8uiE5> Is there a way to confiugure gem tu use 1.9,1
<Xeago> W8uiE5: what is halting you from installing a more recent version of your os/
franco56 has joined #ruby
Vert has joined #ruby
<W8uiE5> Xeago: I need it on this os
franco56 has left #ruby [#ruby]
nu7hatch has joined #ruby
<Xeago> that doesn't answer the question
<Hanmac> "ls -n /usr/bin/gem1.9.1 /usr/bin/gem"
<_bart> let's say I have an array with [5, 6, 8, 8, 8, 8, 8], then I want to keep only the [8,8,8,8,8] because they are the highest
<Hanmac> "ln -s /usr/bin/gem1.9.1 /usr/bin/gem"
<_bart> how do I do that?
nwest has quit [Quit: Computer has gone to sleep.]
<Xeago> >> a = [5, 6, 8, 8, 8, 8, 8]; a.select { |d| d==a.max }
<al2o3cr> (Array) [8, 8, 8, 8, 8]
<W8uiE5> Hanmac: http://www.redmine.org/projects/redmine/wiki/RedmineInstall says I have to use RubyGems <= 1.8
<Muz> W8uiE5: what OS are you on, and why is RVM or rbenv not an option?
<_bart> thanks Xeago
<Hanmac> Muz he uses Ubuntu10.4
<Hanmac> imo he should upgrade to Ubuntu12.4
dhruvasagar has quit [Ping timeout: 268 seconds]
jorge has joined #ruby
jorge has quit [Remote host closed the connection]
<Muz> imo he should use RVM as there's yet to be any argument raised not to.
dhruvasagar has joined #ruby
<Muz> Much less involved than updating the entire OS which doesn't seem strictly necessary.
<W8uiE5> Muz: what is rvm?
t26406 has quit [Remote host closed the connection]
troessner has quit [Ping timeout: 272 seconds]
<Xeago> ruby version manager
<Muz> W8uiE5: https://rvm.io/
<Xeago> rbenv=ruby environment iirc
t21992 has joined #ruby
<Xeago> both deal with installing rubies
<Xeago> and stuff
<_bart> >> a = [{:id => 5, :t => 5}, {:id => 6, :t => 6}, {:id => 7, :t => 6}]; a.select { |d| d[:t]==a[:t].max }
<al2o3cr> -e:1:in `eval': can't convert Symbol into Integer (TypeError), from (eval):1:in `block in <main>', from (eval):1:in `select', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
mneorr has joined #ruby
<Xeago> if you're new to ruby, I'd recommend rbenv
<Muz> It'll manage your Ruby environment, and set up paths and all that other guff in such a way that you can have multiple types of Ruby installed side by side on one system.
<_bart> Xeago: how do to that when the value is in a hash (like :t in my example value)
<Xeago> look up enumerable _bart
<W8uiE5> Xeago: Don't want to learn ruby. Only what to run this installation.
<Xeago> beeing new != wanting to learn
<Hanmac> _bart:
<Hanmac> >> a = [{:id => 5, :t => 5}, {:id => 6, :t => 6}, {:id => 7, :t => 6}]; a.select { |d| d[:t]==a.max_by{|o|o[:t]}[:t] }
<al2o3cr> (Array) [{:id=>6, :t=>6}, {:id=>7, :t=>6}]
<_bart> Hanmac: thanks!
<Xeago> _bart, still look at enumerable
Markvilla has quit [Quit: Computer has gone to sleep.]
iamjarvo has joined #ruby
LBRapid has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 244 seconds]
d3vic3 has joined #ruby
yonggu_ has quit [Quit: yonggu_]
troessner has joined #ruby
<W8uiE5> Removed 1.9.1 and installed 1.8.7 again. Now it works! Thanks!! (-:
LBRapid has joined #ruby
W8uiE5 has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120714012003]]
<Hanmac> ... W8uiES you may be not getting support for ruby1.8 the next years
matrixise has quit [Read error: Connection reset by peer]
<Xeago> he left already, I hope he knows his systems is in danger
<Xeago> I wouldn't have used it in production
<bluebie> 1.8 is no longer getting security updates? That seems a bit harsh
dhruvasagar has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
matrixise has joined #ruby
<Hanmac> the Maintenance of 1.8.7 is allready over ...
<Xeago> Till june 2013 there are security updates
<Hanmac> and June 2013 it reaches EOL
<Xeago> ^^
<bluebie> ah okay :)
<Xeago> I wonder when osx ships 1.9.x as system ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
<bluebie> lol
<csmrfx> depends on the system
<bluebie> I rather like using homebrew
<cnf> Xeago: i'm gonna bet the same time they ship python 3
<cnf> Xeago: 10.10 :P
<bluebie> I worry if they upgrade OS-X system ruby to 1.9.x then we'll be stuck with whichever version that is for the next 8 years or something insane
<Xeago> bluebie as much as I use rbenv for ruby versioning, a newer base ruby isn't somthing I complain about :)
<bluebie> and tools like homebrew mightn't be maintained as well for people wanting to not be using really old ruby if it wasn't so old for a while
<bluebie> mm yeah :)
<bluebie> it'd be nice to have third party apps at least use ruby 1.9.x
<cnf> tbh, plenty of "production" projects still ask for ruby 1.8.7
<Xeago> btw, I am just as old as ruby, lal
<bluebie> currently having a little trouble getting Chocolat.app to use my brew ruby - so I get syntax errors on any lines which use 1.9 syntax things like json-style hash declarations
aristidesfl has joined #ruby
<Xeago> what do you use for uby versioning?
<Hanmac> i cant wait for "June 2013" ... and then we could send all ruby1.8 askers to #eol
<bluebie> I don't - I installed ruby through homebrew then setup my ~/.profile's PATH env variable to look there first
<bluebie> Which works fine for the terminal, but apps seem not to pick that up
<Xeago> as apps do not source ~/.profile :)
<cnf> i use rbenv
<bluebie> does rbenv work for apps?
<bluebie> I had assumed it worked like rvm - messing with the shell itself
<Xeago> bluebie, symlink brew's ruby into the default path
<Xeago> rbenv uses symlinked shims
<bluebie> ah neat
<Xeago> you invoke ruby, a symlink to a shim, which then figures out the appropriate ruby, and calls it
<Xeago> but just symlink brew's ruby so it gets accessed
<Xeago> or look inside chocolat.app if it ships its own ruby
<Xeago> that'd be a bummer tbh
<bluebie> nah they don't
<bluebie> the chocolat guys are cool
<bluebie> friends of a friend
<bluebie> I'll figure it out properly some time. Not to worry
<Xeago> just symlink brew's ruby
<Xeago> that way everything will use brew's ruby
`brendan has joined #ruby
<bluebie> OS X uses ruby for a bunch of things and I don't know for sure that OS X is ruby 1.9.x compatible
<bluebie> I don't want to do something which might make my main computer unbootable
<Xeago> I have no issue's with my osx ruby at 1.9
<Xeago> most compatibility issue's are backwards, not forward
jcromartie has joined #ruby
arturaz has joined #ruby
<bluebie> kk
AlbireoX has joined #ruby
<burgestrand> bluebie: you’re feeling uneasy because you should be.
iori has quit [Remote host closed the connection]
<burgestrand> I replaced my system ruby with 1.9 the last time I cleaned out my computer. Was a bad idea.
<burgestrand> Most often things didn’t break, just showed annoying warnings. I did have some issues with packages installed via homebrew, however.
<Xeago> true dat burgestrand
<Xeago> just use rbenv :)
<burgestrand> I use rvm, but could just as well use either one. I don’t care as long as I can install multiple rubies, switch between them, and *don’t* need to replace my system ruby.
<Xeago> will rvm be picked up by programs that execute system calls that run ruby?
<Xeago> as rvm won't be sourced
Phelps has joined #ruby
moshee has quit [Ping timeout: 245 seconds]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
<Muz> Depending on how the system calls are executed, it will inherit the environment from the original ruby process.
Abbas- is now known as Abbas5
Abbas5 has quit [Changing host]
Abbas5 has joined #ruby
<Xeago> what if it comes from a cocoa process?
yasushi has joined #ruby
<burgestrand> I sure hope not.
t21992 has quit [Remote host closed the connection]
<Muz> I guess that depends on how the cocoa process was launched and what that in turn inherits.
t43668 has joined #ruby
<Muz> Trivial enough to debug with a test cases though.
<Xeago> it gets launched by the user's launchd, which gets launched by the systems launchd
nwest has joined #ruby
AlbireoX has quit [Remote host closed the connection]
<cnf> burgestrand: my choice for rbenv comes from the fact that ruby is far from my main language
AlbireoX has joined #ruby
<cnf> burgestrand: and rvm hooks into my shell WAY too aggressively for me
<burgestrand> cnf: sorry, I’m not interested.
<cnf> o,O
<cnf> not interested in ruby related chat?
<Muz> rbenv vs rvm, the new dead horse to beat. Who cares about arguing over text editors or indentation?!
<cnf> there is no vs
<burgestrand> I’m tired of rbenv vs. rvm wars. Fight over emacs vs vim or linux vs mac instead ;p
<cnf> pick one that suits you
<cnf> done
<Xeago> we can have a discussion alright
<cnf> have your reasons, feel free to communicate them
<cnf> don't expect anyone else to "switch" because of it
<Xeago> I based my choice on what was easiest to understand
<Xeago> rbenv just installs rubies
<burgestrand> I’ll just go outside now. I’ll see you gentlemen in an hour.
<Xeago> rvm did a hellalot more
<Muz> burgestrand: gentle?!
<cnf> how rude
<bluebie> burgestrand: I heard you promoting BRAND A earlier!
<bluebie> You're such a bastard! REAL people only use BRAND B!
<Xeago> >> "I am still working".length
<al2o3cr> (Fixnum) 18
<bluebie> BRAND A is only used by idiots!
<Xeago> ty bot
<bluebie> Idiots and A CORP employees!
AlbireoX has quit [Ping timeout: 264 seconds]
nanderoo has joined #ruby
Abbas5 is now known as Abbas|
mrdodo has joined #ruby
sgmac has joined #ruby
* JonnieCache|home agress rvm vs rbenv is boring
sgmac has left #ruby [#ruby]
<JonnieCache|home> they dont even really compete
<Xeago> only bloggers put them to compete
<Xeago> so they have stuff to talk about
<Xeago> :\
aldodelgado has quit [Quit: aldodelgado]
mrdodo has quit [Remote host closed the connection]
ananthakumaran1 has joined #ruby
Foxandxss has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
dhruvasa1ar has joined #ruby
mrdodo has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
mrdodo has quit [Remote host closed the connection]
dpk has joined #ruby
sailias has joined #ruby
carloslopes has joined #ruby
Guest45519 has quit [Quit: Computer has gone to sleep.]
tommyvYo has joined #ruby
tommyvYo has joined #ruby
tommyvYo has quit [Changing host]
arpegius has joined #ruby
Abbas| has quit [Ping timeout: 246 seconds]
jorge_ has joined #ruby
Abbas5 has joined #ruby
Abbas5 has quit [Changing host]
Abbas5 has joined #ruby
AlbireoX has joined #ruby
snearch has joined #ruby
AlbireoX has quit [Remote host closed the connection]
<Hanmac> "you are using an outdated ruby. your question will not be answered!"
roolo has joined #ruby
AlbireoX has joined #ruby
Abbas5 is now known as Abbas|
AlbireoX has quit [Read error: Connection reset by peer]
AlbireoX has joined #ruby
<shevy> haha
<shevy> Hanmac, I dont want to reset the bot, I wanna break it :>
philcrissman has quit [Remote host closed the connection]
<vectorshelve> can anyone explain why is test is failing for me? http://pastie.org/4597066 I am trying to create an object and then accessing to check if the value is correct.. but the object doesnt seem to get access
cascalheir has joined #ruby
<Hanmac> shevy but you could annoy users that use the bot for TCP tests :D
dpk has quit [Quit: Ceci n'est pas une broken pipe.]
cascalheira has quit [Ping timeout: 246 seconds]
sailias has quit [Quit: Leaving.]
<Xeago> vectorshelve: is the description property accessible?
AlbireoX has quit [Remote host closed the connection]
<Xeago> or wait
mwilson has quit [Disconnected by services]
AlbireoX has joined #ruby
<vectorshelve> Xeago: yes it is... bt the error is nil class..
<peterhellberg> Writing new specs for an old Rails (2.3) app, using a similarly old version of RSpec… surprisingly fun actually :)
mwilson has joined #ruby
<vectorshelve> Xeago: the object isnt created it seems but create alone passes the test
<Xeago> Microblog.first just returns nil, what are you using as orm?
<Xeago> is it in rails?
<vectorshelve> Xeago: yes
<Xeago> if so, I think you should call .save on @microblog first
<vectorshelve> Xeago: but .create does it ryt ?
Tomasso has quit [Read error: Connection reset by peer]
<Xeago> nope, you save explicitly afaik
<Xeago> create just instantiates
<Xeago> invokes new, initialize and maybe other methods
<Xeago> before_create, and stuff
<Xeago> does it work if you explicitly save?
niklasb has joined #ruby
AlbireoX has quit [Ping timeout: 265 seconds]
<vectorshelve> Xeago: .new and save works
<vectorshelve> Xeago: but http://pastie.org/4597066
d3vic3 has quit [Ping timeout: 256 seconds]
<JonnieCache|home> create saves
<JonnieCache|home> .new doesnt save
<Xeago> does create return the object instantiated?
<JonnieCache|home> yes
d3vic3 has joined #ruby
<Xeago> then why did hte test fail
yasushi has quit [Read error: Connection reset by peer]
<shevy> hehe
workmad3 has joined #ruby
ghanima1 has quit [Quit: Leaving.]
<JonnieCache|home> no bloody idea
yasushi has joined #ruby
Rusher has joined #ruby
<JonnieCache|home> stop the test on line 8 with pry and interrogate the errors object
Abbas| has quit [Read error: Connection timed out]
<JonnieCache|home> youve probably not satisfied your validations
<Xeago> but then save would throw an exception right?
<JonnieCache|home> nope
<vectorshelve> Xeago: well save isnt save!
<Xeago> ah
<Xeago> save! does throw?
Guedes_out is now known as Guedes
Abbas5 has joined #ruby
Abbas5 has quit [Changing host]
Abbas5 has joined #ruby
<JonnieCache|home> yeah
<Xeago> makes sense then :)
<JonnieCache|home> but thats rarely used outside of testing
<Rusher> hi, could somebody explain to me what the yield is for and how to use it?
<Xeago> yield supplies arguments to a block
<Xeago> right?
s1n4 has quit [Quit: leaving]
jorge_ has quit [Remote host closed the connection]
<Rusher> oh well now I understand
<JonnieCache|home> its for calling the block thats been passed it
<JonnieCache|home> *passed in
<JonnieCache|home> among other things
<Xeago> what if no block was passed?
<workmad3> Xeago: it'll error
<JonnieCache|home> it doesnt work i guess. never tried it
<JonnieCache|home> thats why you often see `yield if block_given?`
<workmad3> ^^
<Xeago> >> "derp".each_char.map
<al2o3cr> (Enumerator) #<Enumerator: #<Enumerator: "derp":each_char>:map>
<Rusher> could you write an example?
<Xeago> erhm, look up ruby tag
<workmad3> Xeago: that's a specific example with enumerators :)
<Xeago> it's how I learned it <2 hours ago :3
wallerdev has joined #ruby
<workmad3> >> def foo; yield; end; foo
<al2o3cr> -e:1:in `eval': no block given (yield) (LocalJumpError), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<workmad3> >> def foo; yield; end; foo {}
<al2o3cr> (NilClass) nil
<Xeago> workmad3: was unsure if map yielded, or had a 0method def
<workmad3> Xeago: map (and all the enumerable methods) check if a block has been passed
<workmad3> Xeago: if one has been, then they act normally, otherwise they give you an enumerator
<workmad3> Xeago: it's how they are chainable ;)
bwlang has joined #ruby
gift_ has quit [Ping timeout: 276 seconds]
<vectorshelve> Xeago: got the error... trying to fix it now
aldodelgado has joined #ruby
<Xeago> validation error as JonnieCache|home said?
gift_ has joined #ruby
GoGoGarrett has joined #ruby
kiyoura has joined #ruby
Abbas5 has quit [Ping timeout: 246 seconds]
aldodelgado has quit [Client Quit]
jorge_ has joined #ruby
heftig has quit [Ping timeout: 246 seconds]
peterhellberg has quit [Read error: Connection reset by peer]
mwilson has quit [Disconnected by services]
mwilson has joined #ruby
arpegius has quit [Quit: arpegius]
dpk has joined #ruby
mwilson has quit [Disconnected by services]
mwilson has joined #ruby
heftig has joined #ruby
tdelam_ has joined #ruby
jonathanwallace has joined #ruby
yasushi_ has joined #ruby
tdelam_ has left #ruby [#ruby]
yasushi has quit [Read error: Connection reset by peer]
butblack has joined #ruby
linoj has joined #ruby
butblack has quit [Client Quit]
yasushi_ has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
justinmcp has joined #ruby
cantbecool has joined #ruby
fearoffish has joined #ruby
torpe22 has quit [Remote host closed the connection]
t43668 has quit [Remote host closed the connection]
yasushi_ has joined #ruby
t25097 has joined #ruby
jorge_ has quit [Remote host closed the connection]
yasushi has quit [Ping timeout: 244 seconds]
devdazed has joined #ruby
sepp2k1 has joined #ruby
jorge_ has joined #ruby
yasushi has joined #ruby
yasushi_ has quit [Read error: Connection reset by peer]
deryl has joined #ruby
frogprince_mac has quit [Quit: Leaving...]
sepp2k has quit [Ping timeout: 260 seconds]
mahmoudimus has joined #ruby
<lectrick> I found an old test suite that tries to require this, but it's not available. Anyone know what it is? require 'test/unit/ui/console/testrunner'
dpk has quit [Quit: Asleep at the keyboard.]
yasushi_ has joined #ruby
yasushi has quit [Read error: Connection reset by peer]
<Muz> It's part of Ruby 1.8.*
<lectrick> So can I delete it? Running a test suite "on the console", isn't that a standard thing nowadays?
justinmcp has quit [Remote host closed the connection]
arpegius has joined #ruby
nateberkopec has joined #ruby
mwilson has quit [Disconnected by services]
nim_ has joined #ruby
mwilson has joined #ruby
mwilson has quit [Disconnected by services]
mwilson has joined #ruby
mwilson has quit [Disconnected by services]
yasushi_ has quit [Read error: Connection reset by peer]
<Rusher> now I read about here document, but I don't understand, what's the difference if I use "", or `` like this:
<Rusher> <<"TXT", <<`TXT`
mwilson- has joined #ruby
yasushi has joined #ruby
<Muz> lectrick: well, what was it used for specifically?
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<Rusher> it does the same
wallerdev has quit [Quit: wallerdev]
<Hanmac> Rusher: "<<TXT" works too
nim__ has quit [Ping timeout: 264 seconds]
<Muz> <<TXT and <<"TXT" are the same
<Muz> <<`TXT` would execute the commands in the heredoc iirc.
<Rusher> Muz: but what is it for then?
<Rusher> Muz: why just not to leav ""
<bluebie> Rusher: executing commands in a shell?
jrist has joined #ruby
fmcgeough has joined #ruby
<Muz> As with most things Ruby, I imagine it's a compodium of aesthetic preferences, throw-backs to older langauges, and general wankery over "readability".
<bluebie> O_o
infinitiguy has joined #ruby
<bluebie> If you don't like ruby, just use something else
yasushi has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
<bluebie> there are plenty of languages which follow more traditional ideals of having a small amount of syntax
<Muz> Rusher: see http://pastie.org/4597303
<Rusher> bluebie: I like Ruby
<shevy> Rusher HEREDOCs are often a lot easier, when you can just copy/paste a skeleton, and use a few interpolated variables within it
<Muz> bluebie: not an option if you have to use it in a professional capacity. Secondly, since when was liking Ruby a requisite for knowing, or using the language, or being in here.
<shevy> I use them in my .gemspec files for example
yasushi has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
<hoelzro> I use heredocs primarily for inline SQL
<bluebie> oh man if doing something I don't like was a really substantial part of my job I'd be looking for somewhere else to work
jorge_ has quit [Remote host closed the connection]
<bluebie> I like heredocs for including bits of CSS in tiny single file webapps
joephelius has joined #ruby
emmanuelux has quit [Ping timeout: 252 seconds]
<bluebie> never used the backticks version though - that looks neat!
<shevy> what are the backticks used for there
axl_ has joined #ruby
t25097 has quit [Remote host closed the connection]
<Muz> shevy: each line in the heredoc is executed.
t41672 has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<shevy> hmmm
<Muz> As in, each line is run as if it were in turn wrapped with backticks.
<shevy> sounds a lot like eval
<shevy> oh I see
<shevy> I could use shell scripts in heredocs then :D
grenierm has joined #ruby
<Muz> bluebie: it's not that I dislike Ruby as a whole anyway, just certain parts of it. I'm sure the same could be said of any competent ruby dev.
ksinkar has joined #ruby
<lectrick> Muz: It's used on this line: Test::Unit::UI::Console::TestRunner.new(test_suite).start
<ksinkar> is there any easy way to delete/destroy your objects in ruby? Google search came out with many complex solutions
<shevy> yeah
grenierm has quit [Client Quit]
<shevy> ruby is 80% perfect
<bluebie> I guess that makes me incompetent :)
<shevy> reaching 100% is hard
<bluebie> I'm very happy with ruby :)
<Xeago> happy with ruby 1.9+
<shevy> DIE ENCODING DIEEEEE
<hoelzro> ksinkar: you need to remove all references to an object
<Xeago> not happy with ruby 1.8.7 because I have to convert it :\
<Rusher> sorry for annoying questions, I'm teaching ruby, Is it okey to ask here for smt I don't know?
<bluebie> 1.8 had some problems
<shevy> Rusher this channel is about the programming language ruby
<bluebie> Rusher: Of course!
<shevy> :D
<Rusher> great, thank godness
<Xeago> herpderp, it is not about learning ruby in here, not at all!
<shevy> hehehe
<shevy> herdderp?
<Xeago> feel free to ask to your hearts content
<workmad3> bluebie: foo = "bar" <-- that gets annoying (implicit receiver not hitting object setters)
<kiyoura> ruby > php :)
<workmad3> bluebie: I understand exactly why it doesn't work, it makes sense... but I don't particularly like it :)
imami|afk is now known as banseljaj
<bluebie> workmad3: Oh yes I recall being a bit confused by that recently actually - good point!
<shevy> yeah kiyoura, but unfortunately not on TIOBE
<workmad3> bluebie: there are several annoying edge cases in ruby like that :)
jgarvey has joined #ruby
<bluebie> mmm
<bluebie> My current little project is a game for iPhone in RubyMotion
<workmad3> bluebie: I also dislike the ruby 1.9 hash syntax... or rather, I dislike that I can't use stringy keys in it, because it just causes me confusion between ruby and JSON...
<shevy> what annoys me in ruby - is it too hard to create bindings to GUI Toolkits in it? python folks seem to have less problems with that
<Rusher> I'm teaching via this tut: http://www.tutorialspoint.com/ruby :D most of that I understand, but sometimes there's smt I can't understand :)
<bluebie> It's really great, but sometimes I make a bug which only appears on the real ARM devices and not in the simulator (usually because it depends on accelerometer input or something like that) and get some horrible crashing memory access error
<kiyoura> im wondering why matz coded ruby to use a bottom-up parser, isn't that a main source to its speed problem?
<shevy> Rusher are you sure it is a good tutorial
<hoelzro> shevy: it's all about who has the time and wants to do it
<shevy> because tutorials can teach crap too
cantbecool has quit [Quit: Textual IRC Client: www.textualapp.com]
<hoelzro> kiyoura: I'm pretty sure that's been changed
<hoelzro> as of 1.9, I believe
<workmad3> shevy: what? you don't like the built-in Ruby TCL bindings?
<Rusher> shevy: I hope so
tiripamwe has joined #ruby
<Hanmac> shevy? i make own wx/Ogre/Cegui binding and do not have any problem
<kiyoura> hoelzro, i hope so
<shevy> workmad3 I hate tcl
<workmad3> shevy: :D
<hoelzro> kiyoura: Ruby 1.9 is actually pretty fast
<shevy> people always say "hey... it has improved... 10 years ago it looked awful, now it is ok"
<workmad3> shevy: how about Ruby GTK? or Ruby QT?
<kiyoura> how much faster than 1.8?
lolmaus has quit []
<shevy> and I test it... AND IT STILL LOOKS AWFUL
<bluebie> RubyMotion is lovely when it works, and it seems to work a lot more often than it did when it first came out, but it's still a bit rough when things go wrong on the real devices - the little syntax bugs of MRI seem like no big deal compared to trying to figure out memory access errors when you don't even know which file the bug is in, let alone which line
* hoelzro shrugs
<workmad3> shevy: or hell, you could just use Shoes? :)
<kiyoura> hm
<shevy> workmad3, yeah, it feels as if they lack manpower and developers :(
<shevy> the shoes examples didnt even work last time I tried to use them... at least ruby-gtk examples worked
* workmad3 hasn't done any ruby GUI development...
<shevy> !
machty has joined #ruby
<shevy> see, like 90% of the ruby folks
<Mon_Ouie> Parser performance pretty much doesn't matter
vjt has joined #ruby
headius has joined #ruby
arpegius has quit [Quit: arpegius]
<Mon_Ouie> At worst, it slightly increases down start up time
<kiyoura> hoelzro: i think its worth benchmarking
<Mon_Ouie> -down
<workmad3> Mon_Ouie: at least, it doesn't now 1.9 compiles to bytecode and uses a VM internally...
johnjohnson has joined #ruby
banseljaj is now known as imami|afk
peterhellberg has joined #ruby
<JonnieCache|home> ruby + gui seems to be a losing battle
philcrissman has joined #ruby
wvms has joined #ruby
<hoelzro> JonnieCache|home: why's that?
<peterhellberg> JonnieCache|home: I’m hoping for something like RubyMotion… but for OS X
<JonnieCache|home> not for any technical reason, just because there doesnt seem to be the will
<workmad3> gui dev as a whole seems to be dropping in recent years
<shevy> JonnieCache|home yeah :(
<kiyoura> why would anyone want to use GTK or QT with ruby ]:<
<JonnieCache|home> none of the bindings are really world class
Spooner has joined #ruby
<kiyoura> workmad3: it was never really cool ...
<shevy> agreed
<JonnieCache|home> driving swing from jruby sounds like a good idea. swing is great if you ignore the fact that its in java
<Mon_Ouie> Qt is nice enough for me
<Xeago> There is macruby?
<hoelzro> kiyoura: why not?
<shevy> only for mac elitists
<Xeago> didn't that have gui stuff aswell?
a_a_g has quit [Quit: Leaving.]
<banisterfiend> the problem with Qt is that it doesnt 'just work'
arpegius has joined #ruby
<banisterfiend> there's a bunch of crap u haev to install first, in some cases 100s of megs
wallerdev has joined #ruby
<shevy> I am a hopeless linux man :(
<banisterfiend> and even after installing it, it doesnt always work (at least it didnt for me:P)
johnjohnson has quit [Client Quit]
<Muz> JonnieCache|home: and the fact Swing looks like and runs like pooooo.
n1x has joined #ruby
<workmad3> banisterfiend: it's even more fun if you use homebrew and it compiles QT from source... :D
<kiyoura> shevy: what distro?
<shevy> how cool would it be to write something once, and have it available on every major OS natively
<Xeago> hello tomorrow morning :D!
<JonnieCache|home> Muz: it looks native. if it looks like shit, youre doing it wrong
<banisterfiend> yaeh
<JonnieCache|home> but it is slow yes
<workmad3> banisterfiend: then it's 100s of mb, and hours of time :)
<Xeago> shevy it's called html5
<Muz> JonnieCache|home: "native"?!
<banisterfiend> workmad3: i think i ran into that problem too :)
<Muz> It sticks out like a sore thumb on OS X.
<shevy> kiyoura: I don't believe in distros. I compile everything from source. if I would pick one, then gobolinux's philosophy would come closest to what I want
<banisterfiend> i tried installing directly from the website as well, but that didnt appear to work etehr
<shevy> Xeago, yeah but I have to use javascript :(
<Xeago> use ECMAscript
mneorr has quit [Remote host closed the connection]
<JonnieCache|home> Muz: obv if you want it to look perfect you have to write different UIs for different OSes
<Xeago> or whatever it's called
<JonnieCache|home> it cant magically follow the apple guidelines for you
<shevy> I would be happy with semi-crappy looks
<Mon_Ouie> http://en.wikipedia.org/wiki/File:Gui-widgets.png — that's what Wikipedia says it looks like on X11
johnjohnson has joined #ruby
t41672 has quit [Remote host closed the connection]
<Mon_Ouie> That's very far from using native UI components users are used to
<shevy> well, that looks better than tcl still (hahaha)
<Muz> JonnieCache|home: never expected it to, but the effort:returns ratio is completely out of whack with Swing. I'd rather Qt if going to native-like UI components.
<kiyoura> hoelzro: well i suppose that could be a very 'expressive' GUI app lol
t36858 has joined #ruby
<JonnieCache|home> Mon_Ouie: thats been misconfigured then
<Xeago> give me full text based gui's
<Muz> *going for
<JonnieCache|home> Mon_Ouie: swing comes with a bunch of different, "renderers" i think theyre called
<JonnieCache|home> someting like that
<hoelzro> I think a scripting language like Ruby is perfect for GUIs
awarner has joined #ruby
<Xeago> GUI's suck in general imo
<Xeago> in whatever you make em
<JonnieCache|home> Muz: agreed. but as discussed qt has its own problems. which is why i say it feels lke a losing battle :)
<hoelzro> it's flexible, and GUIs aren't typically performance dependent
johnlcox has joined #ruby
<Muz> JonnieCache|home: well there's that too. Not like GTK is much better, wxWidgets is a joke.
<Muz> At the end of the day if you want nice GUIs, you're going to have to go for an OS/WDM specific solution.
nari has quit [Ping timeout: 264 seconds]
<JonnieCache|home> html5 is fine, as long as you get someone else to do it :)
joshman_ has joined #ruby
<shevy> :P
<workmad3> the problem is that too many GUI toolkits force you to use the same language for both behaviour and laying it out... and unfortunately, procedural languages are pretty poor (IMO) for decent GUI layout code
<Spooner> You could use Fidgit with Ruby/Gosu. That looks terrible in all OSs and is flakey as hell :) (Which is not much worse than the proper GUI toolkits on Ruby at the moment :D).
<kiyoura> i agree with Muz
<shevy> you all make me sad
<Muz> The thing with HTML5 is that there's less of an expectation of it to look and work natively.
<Muz> s/work/function/
JohnBat26 has quit [Remote host closed the connection]
<JonnieCache|home> as ever, managing expectations is the key to making people happy
<kiyoura> workmad3: some language (like C) can be implemented to act object-orientated
tcopp has left #ruby [#ruby]
<kiyoura> languages*
<workmad3> kiyoura: even OO can be pretty poor for laying out GUIs
<Xeago> OO is poor for laying out GUIs
<kiyoura> what would you recommend?
<workmad3> kiyoura: in all honesty... not sure
qwerxy has joined #ruby
<Xeago> I don't think there is anything to encourage it's use of
<Xeago> go back to text based ui's, and all is solved!
<kiyoura> workmad3: solution = dont use GUI's, lol
<Xeago> ^^
<workmad3> kiyoura: markup languages like HTML and XML are probably the best so fair, IMO...
<Muz> Xeago: ah yes, thatpinnacle of UX and usability, ncurses.
<kiyoura> workmad3: like C#'s approach?
<workmad3> *far
<kiyoura> they have an XML-like language for GUIs
mneorr has joined #ruby
zommi has quit [Read error: Connection reset by peer]
<workmad3> kiyoura: is that 'C#' or some aspect of .net windows development? :)
<Xeago> the thing that used to be called wpf right?
<kiyoura> haha
<Xeago> .net*
<kiyoura> xargoon: yeah
<kiyoura> Xeago *
<workmad3> ah, 'windows presentation framework'... yeah
<Xeago> it's now named different
<workmad3> azure?
<Xeago> 'as it's embbedded right into windows 8'
<kiyoura> :S
<Xeago> as is .net 4.5/5
<shevy> oh man
<Xeago> they still use old namespaces and binaries tho
<JonnieCache|home> anyone here tried win8 yet?
<shevy> the evolution of windows is driven by the marketing department
<Xeago> yup
<JonnieCache|home> as bad as they say?
<shevy> have not tried it yet
<kiyoura> will not try it yet
<workmad3> still... the HTML & unobtrusive JS approach works, IMO... HTML gives you your UI, UJS hooks onto it and wires it up to behaviour
centipedefarmer has joined #ruby
<Xeago> it's good for using memory
<Xeago> workmad3, still we need a better transport for html
<kiyoura> the win8 'start' interface is in html5
<workmad3> nothing says that you need to use HTML and JS though
<Xeago> http2 has to be done
jxpx777 has joined #ruby
<JonnieCache|home> Xeago: its being done
JohnBat26 has joined #ruby
<JonnieCache|home> based on spdy
<Xeago> spdy is just a proposal
<workmad3> just a language for defining the interface with appropriate hooks, and a language that can be used to hook in behaviour :)
<Xeago> I had a guest teacher half a year ago, who is in the committee of http2
yekta has joined #ruby
<JonnieCache|home> Xeago: except that its being used a lot already
<jxpx777> What's the correct way to invoke a file Rake task programmatically? I have a file task for file.js that runs fine, but Rake::Task["path/to/file.js"].invoke doesn't work for me
<JonnieCache|home> its as much of a proposal as html5
stopbit has joined #ruby
<Xeago> alot, chrome, google's servers, where else?
<JonnieCache|home> firefox supports it
<JonnieCache|home> nginx supports it
internet_user has joined #ruby
<JonnieCache|home> im sure its being used in a lot of places by now
<JonnieCache|home> anyway google traffic is 30% of the internet or some shit so they count as "a lot" all on their own :)
<Xeago> hmm that's about 50% of usecases
<Xeago> imo
<Xeago> well, lack of information on my end xD
<Xeago> thought spdy was more experimental
paolooo has joined #ruby
cakehero has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
ghanima has joined #ruby
<Xeago> now the sun starts shining on my screen, I have to ask
<Xeago> does anyone here prefere a glossy screen over a mat screen?
<JonnieCache|home> NO. i hate that shit
<Xeago> imo the reflection in mat is worse
<Xeago> JonnieCache|home: glossy?
<deryl> they implemented HTML5 before it was a spec, while *it* was still experimental. that reasoning means nothing in reality
<JonnieCache|home> i hate glossy
<Spooner> jxpx777 : You probably want to have file "path/to/file.js" do end; task :bleh => "path/to/file.js", then you can Rake::Task[:bleh].invoke
<Xeago> deryl, then read proof of concept
t36858 has quit [Remote host closed the connection]
<jxpx777> Spooner: Yah, but I need to pass in a debug parameter to control how the file gets created
yasushi has quit [Remote host closed the connection]
sailias has joined #ruby
t20572 has joined #ruby
SecretAg1nt has quit [Remote host closed the connection]
bfrog has quit [Ping timeout: 244 seconds]
<workmad3> deryl: parts of HTML5 were implemented while it was experimental... hell, about half of the HTML5 spec was adopted from implementations that already existed in some browsers
<jxpx777> That's why I was trying to do it with Rake::Task[].invoke, but it can't find the task by name that way
<Spooner> jxpx777 : Ah, I never needed to do that. Params are a real pain in Rake, I've found, but I'm no expert.
iamjarvo has quit [Ping timeout: 244 seconds]
<workmad3> but other parts were specced out and got quite far before they were adopted (some parts are still not particularly well implemented)
SCommette has joined #ruby
iamjarvo has joined #ruby
<jxpx777> Spooner: Yah, they can be a pain, but their usefulness outweighs the pain for some uses IMHO
<Xeago> css3 spec, is as far as I know atleast 80% made from implementations
<workmad3> something as big as HTML5 (especially if you use the marketting version that includes things that were proposed at roughly the same time, like CSS3 and geolocation) doesn't just 'get implemented' though... bits get implemented piecemeal
<deryl> workmad3: right but a great majority of work was done before it was a bonafide accepted standard. I read the conversation as that writing anything that uses spdy shouldn't be done because its not official yet. did i mistake that?
dpk has joined #ruby
<workmad3> deryl: depends on your definition of 'official' :)
mvangala has joined #ruby
<deryl> ok, we going the word game way here? ;)
<workmad3> deryl: also depends on fallbacks... afaik, a server that can use spdy doesn't have to
<workmad3> deryl: which makes it much less risky to use...
<workmad3> deryl: instead, it can use spdy with clients that are compatible, otherwise it falls back to not using it...
lkba has joined #ruby
arpegius has quit [Quit: arpegius]
<JonnieCache|home> YAY LETS ARGUE SEMANTICS
<deryl> lol
<JonnieCache|home> thats never futile
<workmad3> deryl: and yes, the word game is quite important... I believe that google released the spdy standard and implementations and they worked as-is...
dotemacs has joined #ruby
jtgiri_ has joined #ruby
<workmad3> deryl: so in a sense, it has always been an 'official' google standard...
<lectrick> i want a 1.9.3-compatible version of the evil-ruby gem. I feel dirty.
nari has joined #ruby
<workmad3> deryl: it's just a case of which organisations recognise it, allow its use, etc...
<_bart> unexpected keyword_else, expecting keyword_end (SyntaxError)
<_bart> huh :/
edwardj has joined #ruby
aldodelgado has joined #ruby
Coolhand has quit [Remote host closed the connection]
<dotemacs> Hello, im not sure if it's something to do with my net connection or what but running 'curl -L https://get.rvm.io | bash -s stable --ruby' the connection times out for me. Anybody else seeing this?
rins has joined #ruby
yasushi has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
<hoelzro> dotemacs: try curl -L -v https://get.rvm.io
<hoelzro> see what curl tells you
<Spooner> _bart it means it didn't expect else, but expected end. Not rocket-science! You might get more joy pasting the code for us...
<dotemacs> hoelzro: doing it now, will post a gist of it!
<Hanmac> _bart what did you do? :P
<dotemacs> hoelzro: gist.github.com took to long to load, here is a pastie: http://pastie.org/4597488
<deryl> workmad3: understood. (sorry littlest one home with stomach virus)
dhruvasa1ar has quit [Ping timeout: 246 seconds]
<_bart> got it, I'm having an afternoon brainfreeze
<deryl> doctor's office says he's got 9 other kids from the littlest one's school in his office with the same thing. hehe, kids. they sure know how to share :) willingly or not :)
dev_ryan70 has joined #ruby
zommi has joined #ruby
berserkr has quit [Quit: Leaving.]
<dotemacs> hoelzro: pastie updated, connection time out at github's end, the rackspace servers
workmad3 has quit [Ping timeout: 265 seconds]
Stalkr_ has joined #ruby
jtgiri_ has quit [Quit: jtgiri_]
dev_ryan70 has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
arpegius has joined #ruby
waxjar has joined #ruby
Kwpolska has joined #ruby
Dr4g is now known as Dr4g|bbs
snearch has quit [Quit: Verlassend]
<dotemacs> Is Github down? I'm seeing reports on Twitter... You can access repositories, but not all of Github is functioning. It seem it's been like this for a few days now.
tonini has quit [Remote host closed the connection]
jxpx777 has quit [Quit: Linkinus - http://linkinus.com]
<kiyoura> #ruby should always use gist/gisthub, as github is partly in ruby/RoR :)
<kiyoura> github*
Rusher has left #ruby [#ruby]
<Xeago> seems green..
<mfridh> twitter status messages are so great
<mfridh> "http://t.co/h0d4bRxu and http://t.co/iaGW4mrK should be available again"
<mfridh> ^ from status.github.com
jtgiri_ has joined #ruby
<Xeago> pages is offline atm?
<Xeago> according to status
<Xeago> can you link me the tweets?
<dotemacs> Nah, they are saying now "Partial outage"
skogis has joined #ruby
tagrudev has quit [Remote host closed the connection]
<dotemacs> Xeago: search for 'github down' on Twitter and you'll see a few...
zeknox_ is now known as zeknox
Tearan has joined #ruby
zeknox has quit [Changing host]
zeknox has joined #ruby
<dotemacs> I noticed it when trying to install RVM, run this: try curl -L -v https://get.rvm.io and check the output. See my result: http://pastie.org/4597488
end_guy has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
jjbohn has joined #ruby
Taichouchou2 has joined #ruby
jprovazn is now known as jprovazn_away
jbohn has joined #ruby
mahmoudimus has joined #ruby
v0n has joined #ruby
Taichouchou2 has quit [Remote host closed the connection]
nim_ has quit [Read error: Connection reset by peer]
Taichouchou2 has joined #ruby
tk__ has quit [Quit: ばいばい]
uris has joined #ruby
busybox42 has quit [Quit: Leaving.]
jjbohn has quit [Ping timeout: 246 seconds]
busybox42 has joined #ruby
enroxorz-work has joined #ruby
enroxorz-work has quit [Changing host]
enroxorz-work has joined #ruby
Taichouchou2 has quit [Remote host closed the connection]
Taichouchou2 has joined #ruby
nim_ has joined #ruby
nim_ has quit [Read error: Connection reset by peer]
peterhellberg has quit [Remote host closed the connection]
n1x has quit [Quit: Ex-Chat]
tiripamwe has quit [Ping timeout: 260 seconds]
jclem has joined #ruby
<macer1> I got a lot of rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
<macer1> and high cpu usage -_-
clem- has joined #ruby
<macer1> *rewrites everything to python*
jclem has quit [Ping timeout: 246 seconds]
<Xeago> I fail to see how it is a bug
<macer1> high cpu usage..
<macer1> eating my cpu
<Xeago> I still fail to see that it is a bug
<Xeago> compile ruby how you want it
<macer1> ehh
t20572 has quit [Remote host closed the connection]
t30453 has joined #ruby
headius has quit [Quit: headius]
<macer1> its not a bug its a feature
<Xeago> it is configurable for a reason
headius has joined #ruby
Takehiro has joined #ruby
rcassidy has quit [Ping timeout: 245 seconds]
<macer1> what reason
<Xeago> ask the ruby devs
<Xeago> else
<Xeago> 42
gfontenot has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<shevy> they also said it applied only to 1.8.x
headius has quit [Client Quit]
<shevy> the problem is this whole title
rcassidy has joined #ruby
<shevy> "Fix a bug in Ruby's configure.in"
nari has quit [Ping timeout: 245 seconds]
<shevy> since when is a feature called a bug?
pricees has joined #ruby
headius has joined #ruby
mikepack has joined #ruby
clem- has quit [Remote host closed the connection]
jclem has joined #ruby
Xeago_ has joined #ruby
edwardj has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
SirRamonGabriel has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
MMSequeira has joined #ruby
bluebie has quit [Quit: Linkinus - http://linkinus.com]
Takehiro has quit [Ping timeout: 240 seconds]
velikasha has joined #ruby
MMSequeira has left #ruby [#ruby]
h8R has joined #ruby
velikasha has left #ruby [#ruby]
fermion has quit [Read error: No route to host]
vectorshelve has quit [Quit: Page closed]
sebicas has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<macer1> anyone hereee using bindata?
areil has quit [Remote host closed the connection]
gmci has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
evelyette has quit [Quit: Leaving]
piotr_ has joined #ruby
jclem has quit [Quit: Linkinus - http://linkinus.com]
jclem has joined #ruby
<lectrick> what is the gem 'dl' which is part of the stdlib ?
<Mon_Ouie> An FFI library
t30453 has quit [Remote host closed the connection]
t59366 has joined #ruby
xyon has quit [Quit: WeeChat 0.2.6]
gmci has joined #ruby
xyon has joined #ruby
azm has joined #ruby
edwardj has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
apok has joined #ruby
Takehiro has joined #ruby
akafurious has joined #ruby
Takehiro_ has joined #ruby
fermion has joined #ruby
guns has joined #ruby
guns is now known as Guest10638
MasterIdler_ has joined #ruby
Guest10638 has quit [Client Quit]
aganov has quit [Quit: aganov]
fermion has quit [Client Quit]
centipedefarmer has quit [Quit: This computer has gone to sleep]
saltnvinegar has joined #ruby
machty has quit [Ping timeout: 246 seconds]
machty has joined #ruby
Progster has joined #ruby
Takehiro has quit [Ping timeout: 256 seconds]
x77686d has joined #ruby
saltnvinegar has left #ruby [#ruby]
luist has joined #ruby
<luist> hey guys… why i cant run this command? http://pastie.org/4597818 what am i missing?
ckrailo has joined #ruby
pestouille has joined #ruby
<Hanmac> luist from my view everything looks okay ...
<Hanmac> but you could ask at #bundler
<lectrick> Mon_Ouie: I don't even know what a foreign-function interface library is lol
<lectrick> but google is of course currently enlightening me http://en.wikipedia.org/wiki/Foreign_function_interface
dekroning has quit [Quit: leaving]
maesbn has quit [Remote host closed the connection]
maesbn has joined #ruby
zigomir has quit [Ping timeout: 245 seconds]
ixti has joined #ruby
sixtycakes has joined #ruby
sixtycakes has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
sixtycakes has joined #ruby
Taichouchou2 has quit [Remote host closed the connection]
maesbn has quit [Read error: Operation timed out]
<shevy> sweet sweet bundler
<shevy> Hanmac's secret love
<Hanmac> wasnt that rails and ruby1.8? XD
<Hanmac> lectrcick with it you could use some C-lib functions without needing to make an native binding
mengu has joined #ruby
burgestrand has quit [Quit: Leaving.]
Takehiro_ has quit [Remote host closed the connection]
jtgiri_ has quit [Quit: jtgiri_]
bradhe has joined #ruby
<lectrick> yeah that is a neat idea
Takehiro has joined #ruby
Xeago_ has quit [Remote host closed the connection]
Xeago has joined #ruby
<Hanmac> lectrick i prefer native bindings over FFI ... because i use c++
savage- has quit [Remote host closed the connection]
<lectrick> Hanmac: It sounds like, if you were able to utilize dl, that you couldn't really still call your solution "pure Ruby" tho, eh?
bwlang has left #ruby [#ruby]
<lectrick> Is there an example somewhere of someone using a C++ functionality from Ruby through the DL gem without compiling an interface?
<Mon_Ouie> You can't do that portably, because C++ doesn't provide a standard ABI
<Spooner> lectrick : I suspect most people use the ffi gem rather han DL though. Bit more friendly.
akafurious_ has joined #ruby
jtgiri_ has joined #ruby
<Xeago> Mon_Ouie: what is an ABI?
Takehiro has quit [Remote host closed the connection]
akafurious_ has left #ruby [#ruby]
carloslopes has quit [Quit: Leaving.]
t59366 has quit [Remote host closed the connection]
saturnflyer has joined #ruby
<Mon_Ouie> Abstract Binary Interface, i.e. the way you can use the compiled file. In C there's a standard way to find variables and functions which allow FFI libraries to work. In C++, there isn't (see name mangling).
jgrevich has joined #ruby
t84691 has joined #ruby
<lectrick> Spooner: Yeah, I'm looking at some older code that uses DL though.
akafurious has quit [Ping timeout: 246 seconds]
<Xeago> irc is bad for work
<Xeago> :\
qos has joined #ruby
<rcassidy> so bad
hoelzro is now known as hoelzro|away
asobrasil has joined #ruby
Takehiro has joined #ruby
Taichouchou2 has joined #ruby
Taichouchou2 has quit [Read error: Connection reset by peer]
<shevy> DISCONNECT THEN!!!
Taichouchou2 has joined #ruby
<shevy> PULL THE PLUG!
codefriar has quit [Quit: Linkinus - http://linkinus.com]
<shevy> MAKE IT HAPPEN
workmad3 has quit [Ping timeout: 256 seconds]
berserkr has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
chson has joined #ruby
chson has quit [Remote host closed the connection]
Vert has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
forrest has joined #ruby
eldariof has quit [Ping timeout: 264 seconds]
davidcelis has joined #ruby
Banistergalaxy has quit [Ping timeout: 244 seconds]
Banistergalaxy has joined #ruby
deryl has quit [Quit: deryl]
yekta has quit [Quit: yekta]
dmiller has joined #ruby
Targen has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
philcrissman_z has quit [Quit: Connection closed for inactivity]
bradhe has quit [Ping timeout: 260 seconds]
Taichouchou2 has quit [Remote host closed the connection]
xorigin has quit [Quit: leaving]
_bart has quit [Ping timeout: 245 seconds]
Taichouchou2 has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
heftig has quit [Quit: leaving]
matrixise has quit [Ping timeout: 246 seconds]
Synthead has joined #ruby
S1kx has joined #ruby
edwardj has quit [Remote host closed the connection]
Taichouchou2 has quit [Remote host closed the connection]
Xeago_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
burgestrand has joined #ruby
<lectrick> I have some test code that determines whether a monkeypatch needs to be applied. I want this code to perform a require that I can then undo. Is it possible to do it in a separate thread and just collect its result in a main thread without the require actually applying to the main thread?
<JonnieCache|home> not afaik. you cant undo a require as such
johnjohnson has quit []
<lectrick> not by doing the require in a separate thread you mean
<JonnieCache|home> not at all i dont think
<JonnieCache|home> you'll probably have to make whatever code that youre requiring in such a way that you can toggle it on or off
paulovittor23 has joined #ruby
<lectrick> yeah it's a monkeypatch that has to pre-require some library files to do its test so there's no way really to do that, I was just trying to eliminate the possibility of unknown side effects
Xeago has quit [Ping timeout: 252 seconds]
<davidcelis> lectrick: You could undefine the methods that are added.
aantix has joined #ruby
<davidcelis> oh
pestouille has quit [Quit: pestouille]
<lectrick> basically I have a patch manager that erects a state which allows you to test the necessity of the patch and then only applies it if it's still necessary (and warns you otherwise)
aantix has quit [Remote host closed the connection]
nu7hatch has quit [Remote host closed the connection]
<lectrick> davidcelis: Yeah but the file will probably get required later anyway and although in theory ruby will only require files once, Rails does some autoload magic and whatnot that might make things wonky
aantix has joined #ruby
Tearan has quit [Remote host closed the connection]
chimkan_ has joined #ruby
t84691 has quit [Remote host closed the connection]
<lectrick> I have had a hard-on for eliminating side effect possibility lately after reading up on some functional programming stuff and dealing with our rather large codebase :)
t53158 has joined #ruby
Squarepy has joined #ruby
dpk has joined #ruby
bradhe has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
ringotwo has quit [Remote host closed the connection]
Tearan has joined #ruby
<burgestrand> lectrick: you could stub out require, if that helps.
adeponte has joined #ruby
<burgestrand> it won’t help you unload, but it’ll stop the load in the first place
savage- has joined #ruby
insecurlex has joined #ruby
heftig has joined #ruby
rubylex has joined #ruby
<mikepack> How can I find the file path of a derived class from within a parent class? eg (class Parent; def self.path; ...; end; end class Child; end Child.path #=> path to child class, not parent class)
<lectrick> burgestrand: you mean temporarily stub it out then unstub it so the app load continues as planned?
Goles has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<burgestrand> lectrick: yeah, something like that.
<mikepack> Oops, class Child < Parent; end
<burgestrand> lectrick: stop the require, fake the condition.
baroquebobcat has joined #ruby
<burgestrand> mikepack: a class may be defined in multiple files, not just one.
rubylex has quit [Remote host closed the connection]
qos has quit [Ping timeout: 240 seconds]
<mikepack> burgestrand: Not sure what you mean.
`brendan has quit [Ping timeout: 240 seconds]
<mikepack> burgestrand: you mean there is no canonical path?
<burgestrand> mikepack: there is no single file path to where a class is defined.
<burgestrand> mikekelly: in ruby 1.9 you can find the source location of methods, however.
`brendan has joined #ruby
scriabin has joined #ruby
<burgestrand> … oops.
<burgestrand> mikekelly: not you, go away.
<burgestrand> mikepack: ^
dmiller has quit [Ping timeout: 245 seconds]
<mikepack> burgestrand: That's not a big deal...I just want Child.path to work as expected...
azm has quit [Ping timeout: 244 seconds]
<mikepack> burgestrand: I'm not considering the case of redefining a class
<burgestrand> mikepack: I’m not sure what you’re after.
<lectrick> burgestrand: Faking out classes that you want to then undefine gets a little hairy :)
insecurlex has quit [Ping timeout: 244 seconds]
<mikepack> burgestrand: Let me gist
bradhe_ has joined #ruby
<burgestrand> lectrick: you painted this corner yourself. :p
<lectrick> burgestrand: Indeed I did
bradhe has quit [Read error: Connection reset by peer]
cakehero has quit [Quit: Computer has gone to sleep.]
<mikepack> burgestrand: https://gist.github.com/3490065
apok has quit [Quit: apok]
deryl has joined #ruby
<mikepack> burgestrand: Does that make sense?
<burgestrand> mikepack: ah.
<burgestrand> mikepack: hm, tricky.
mneorr has quit [Remote host closed the connection]
<mikepack> burgestrand: Yeah, not sure it's possible.
<mikepack> burgestrand: without either crawling the inheritance tree or inspecting/manipulating the caller stack
Virunga has joined #ruby
<burgestrand> mikepack: I think you could do an ugly with the caller.
<burgestrand> Yeah.
bradhe_ has quit [Remote host closed the connection]
darren has joined #ruby
mahmoudimus has joined #ruby
bradhe has joined #ruby
<mikepack> :-/
sepp2k1 has quit [Ping timeout: 246 seconds]
<burgestrand> mikepack: what are you doing with this?
<mikepack> creating an in-memory database that works with Rail's default autoload paths
<mikepack> ie, I won't want to directly require the file, I just want it's location so that it's congruent with the autoloads Rails sets up
mrsolo has joined #ruby
<mikepack> I can get the path of the file, but when the file gets autoloaded...I want it to be able to determine it's own location
macmartine has joined #ruby
t53158 has quit [Remote host closed the connection]
<burgestrand> mikepack: and I take it just defining path in every child is not something you want to do.
shevy has quit [Ping timeout: 260 seconds]
<mikepack> burgestrand: That's what it currently does
t61391 has joined #ruby
<mikepack> burgestrand: but that means I need to require the file frist
<mikepack> burgestrand: so that I can do something like Child.path = 'the path I know about'
limeds has joined #ruby
<burgestrand> I’m not sure I follow along but I don’t really need to know anymore. I’m hungry.
<mikepack> :)
<mikepack> thanks anyway
beneggett has joined #ruby
scootiepuff has joined #ruby
bradhe has quit [Ping timeout: 268 seconds]
<burgestrand> I hope you find a nice solution. Tricky things to do in a pretty way.
AntiTyping has joined #ruby
artOfWar has joined #ruby
enyo has quit [Ping timeout: 244 seconds]
brianpWins has quit [Quit: brianpWins]
tnk1 has joined #ruby
cbuxton has joined #ruby
enyo has joined #ruby
arturaz has quit [Ping timeout: 246 seconds]
chimkan_ has quit [Quit: chimkan_]
bradhe has joined #ruby
kenichi has joined #ruby
chussenot has quit [Ping timeout: 246 seconds]
rakm has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ringotwo has joined #ruby
BrokenCog has quit [Quit: leaving]
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
shevy has joined #ruby
bwlang has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
maletor has joined #ruby
mohits has quit [Ping timeout: 246 seconds]
opus has joined #ruby
sepp2k has joined #ruby
ringotwo has quit [Remote host closed the connection]
opus has quit [Client Quit]
caveat- has joined #ruby
ringotwo has joined #ruby
elux has joined #ruby
LBRapid_ has joined #ruby
carloslopes has joined #ruby
carloslopes has quit [Client Quit]
Taichouchou2 has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby
bradhe has joined #ruby
johnjohnson has joined #ruby
troessner has quit [Quit: Leaving]
t61391 has quit [Remote host closed the connection]
t62466 has joined #ruby
LBRapid_ has quit [Client Quit]
apok has joined #ruby
ttilley has joined #ruby
saschagehlich has quit [Ping timeout: 245 seconds]
sneakyness_wk has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
stkowski has joined #ruby
bradhe has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
r0bby has joined #ruby
allanm__ has joined #ruby
BeLucid_ has joined #ruby
roolo_ has joined #ruby
ScottNYC has joined #ruby
artOfWar_ has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
interne__ has joined #ruby
graspee_ has joined #ruby
sixtycak_ has joined #ruby
GoGoGarr_ has joined #ruby
mahmoudimus has joined #ruby
kenichi has quit [Remote host closed the connection]
fyolnish has quit [Remote host closed the connection]
piotr__ has joined #ruby
wangr_ has joined #ruby
ksinkar_ has joined #ruby
Jay_Levitt has joined #ruby
phrame_ has joined #ruby
csmrfx has left #ruby ["ciao"]
chiel_ has joined #ruby
r126l_ has joined #ruby
asuka_ has joined #ruby
pricees_ has joined #ruby
koivula has joined #ruby
Urtokk_ has joined #ruby
lectrick has quit [Remote host closed the connection]
im0b has quit [Remote host closed the connection]
Dr4g|bbs has quit [Remote host closed the connection]
[diecast] has quit [Remote host closed the connection]
fcoury has quit [Read error: Connection reset by peer]
dekz has quit [Remote host closed the connection]
brianpWins has joined #ruby
cakehero has joined #ruby
mxweas_ has joined #ruby
arpegius_ has joined #ruby
[diecast] has joined #ruby
arpegius_ has quit [Client Quit]
aarwine has joined #ruby
roolo_ has quit [Quit: See ya]
dekz has joined #ruby
baphled has joined #ruby
<aarwine> is there any alternative to gem generate_index? What format is the index in? Would it be easy to replicate?
cbuxton has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
AngryParsley has joined #ruby
macer1_ has joined #ruby
bier_ has quit [Ping timeout: 245 seconds]
companion_ has joined #ruby
artOfWar has quit [*.net *.split]
Takehiro has quit [*.net *.split]
piotr_ has quit [*.net *.split]
sixtycakes has quit [*.net *.split]
arpegius has quit [*.net *.split]
pricees has quit [*.net *.split]
GoGoGarrett has quit [*.net *.split]
ksinkar has quit [*.net *.split]
internet_user has quit [*.net *.split]
bluenemo has quit [*.net *.split]
roolo has quit [*.net *.split]
alup has quit [*.net *.split]
graspee has quit [*.net *.split]
mxweas has quit [*.net *.split]
anekos has quit [*.net *.split]
_graham_ has quit [*.net *.split]
asuka has quit [*.net *.split]
robbyoconnor has quit [*.net *.split]
Affix has quit [*.net *.split]
Mon_Ouie has quit [*.net *.split]
saispo has quit [*.net *.split]
koivula_ has quit [*.net *.split]
Urtokk has quit [*.net *.split]
_marvin_ has quit [*.net *.split]
inimino has quit [*.net *.split]
phrame has quit [*.net *.split]
BeLucid has quit [*.net *.split]
allanm_ has quit [*.net *.split]
ggreer has quit [*.net *.split]
rking has quit [*.net *.split]
wangr has quit [*.net *.split]
macer1 has quit [*.net *.split]
companion has quit [*.net *.split]
tris has quit [*.net *.split]
r126l has quit [*.net *.split]
chiel has quit [*.net *.split]
companion_ is now known as companion
macer1_ is now known as macer1
phrame_ is now known as phrame
companion has quit [Changing host]
macer1 has joined #ruby
macer1 has quit [Changing host]
companion has joined #ruby
mxweas_ is now known as mxweas
cirwin has joined #ruby
anekos has joined #ruby
bradhe has quit [Ping timeout: 244 seconds]
_graham_ has joined #ruby
Affix has joined #ruby
Affix has quit [Changing host]
Affix has joined #ruby
tris has joined #ruby
Dr4g|bbs has joined #ruby
c0rn_ has joined #ruby
rking has joined #ruby
alup has joined #ruby
inimino has joined #ruby
bluenemo has joined #ruby
saispo has joined #ruby
ShiintoRyuu has joined #ruby
apok has quit [Remote host closed the connection]
apok has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
pdtpatrick has joined #ruby
Virunga has quit [Remote host closed the connection]
vectorshelve has joined #ruby
cbuxton has joined #ruby
meskyanichi has joined #ruby
baphled has quit [Ping timeout: 245 seconds]
<vectorshelve> Hi
vectorshelve has quit [Client Quit]
lectrick has joined #ruby
_bart has joined #ruby
<ScottNYC> Anyone have any recommendations for any code snippet applications?
<JonnieCache|home> whats a code snippet application?
<ScottNYC> to save and reuse code
<ScottNYC> like code collecter pro
kirun has quit [Ping timeout: 245 seconds]
<yxhuvud> I've never seen the point.
<ScottNYC> or codebox
<JonnieCache|home> why not just use text files?
<JonnieCache|home> or for that matter, your languages's package manager...
bradhe has joined #ruby
<ScottNYC> the idea is to be able to save time by being able to quickly record, access and reuse sippets of code
<lectrick> When did proc.call(x,y) become equivalent to the shorthand proc.(x,y) ?
<JonnieCache|home> ScottNYC: cant your editor do that?
t62466 has quit [Remote host closed the connection]
zommi has quit [Quit: Leaving.]
t89466 has joined #ruby
mascool has joined #ruby
bier_ has joined #ruby
<ScottNYC> yeah it can and thats what I use but Im reading how these dedicated apps have more features like syncing with hosting services like gist or pastebin, API documentation built in for reference, and text expander functionality jonniecache
mneorr has joined #ruby
enroxorz-work is now known as PeeWee
kenichi has joined #ruby
_marvin_ has joined #ruby
<rcassidy> not trying to rag on this idea. but i am genuinely curious why someone would wanna sync with gist or pastebin
<ScottNYC> sharing
<ScottNYC> you can use dropbox im sure
skyjumper has joined #ruby
<skyjumper> is there a cleaner way to do this? https://gist.github.com/3490574
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
PeeWee has left #ruby ["Leaving"]
<fowl> rcassidy: gist is useful because your gist is actually a repo you can push/pull from and if your gist becomes awesome enough you can start a repo and push your gist to it, continuing your work and all the changelogs and such
<JonnieCache|home> skyjumper: im sure you could do it with less characters but it'd look a mess. its fine like that
<skyjumper> JonnieCache|home: yeah it's pretty clean, i was just hoping to learn some ruby tricks
<JonnieCache|home> dont think there are any that really apply there
<fowl> skyjumper: i'd change the last two lines to score.finite? ? score : 0.0
<skyjumper> fowl: good call
<JonnieCache|home> i was gonna suggest that but its less clear, and doesnt really get you anywhere
<JonnieCache|home> its not like its verbose to start with
<cirwin> I'd flip it round: return 0.0 if num_questions_total < 1; return num_questions_correct.to_f / num_questions_total.to_f
<fowl> well it skips an assignment
Morkel has quit [Quit: Morkel]
<cirwin> (without the second return keyword)
baphled has joined #ruby
kvirani has joined #ruby
zx has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
<fowl> (score = correct/total).finite? ? score : 0.0
<fowl> :p
Eldariof-ru has joined #ruby
<JonnieCache|home> unless youre being paid inversely proportional to your linecount, id keep the first one
n_blownapart has joined #ruby
<davidcelis> fowl: ugh
resure has joined #ruby
<fowl> davidcelis: dont hate the player hate the game
<n_blownapart> hi shouldn't this program return the accum array, without needing to use a puts ? thanks. http://pastie.org/4595387
echobravo has joined #ruby
s1n4 has joined #ruby
azm has quit [Ping timeout: 252 seconds]
mwilson- is now known as mwilson
<TTilus> n_blownapart: program has exit status, it does not return any values
im0b has joined #ruby
kn330 has joined #ruby
adamkittelson has joined #ruby
jclem has quit [Quit: Linkinus - http://linkinus.com]
voodoofish430 has joined #ruby
fcoury has joined #ruby
<n_blownapart> thanks TTilus could you elaborate , I haven't come across that idea.
machty_ has joined #ruby
saturnflyer has quit [Ping timeout: 246 seconds]
Virunga has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
saturnflyer has joined #ruby
Rusher has joined #ruby
infinitiguy1 has joined #ruby
<TTilus> n_blownapart: if you put that pastie on pastie-4595387.rb and run `ruby pastie-4595387.rb` you won't get any output to console unless you write stdout/stderr
<TTilus> n_blownapart: puts writes to stdout
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
infinitiguy has quit [Ping timeout: 244 seconds]
khakimov has joined #ruby
Takehiro has joined #ruby
interne__ has quit [Remote host closed the connection]
<n_blownapart> TTilus: that I understand because I ran it both in editor and in pry. but what is the purpose of line 13 here, then? thanks
internet_user has joined #ruby
statarb3 has quit [Quit: Leaving]
<Rusher> guys, I'm teaching about classes in Ruby, but I get only this error in shell: #<People:0x0000000125d7e8>
<TTilus> n_blownapart: methods _do_ return values
skogis has quit [Ping timeout: 252 seconds]
<fowl> Rusher: that's not an error
<TTilus> Rusher: thats not an error
<TTilus> fowl: ;)
<fowl> Rusher: that's the default format #inspect uses to describe an object
imami|afk is now known as banseljaj
<Rusher> well, why can't I see the output
<Rusher> wow
<fowl> Rusher: what output are you expecting
<Rusher> I forgot to call peter.value :D
<TTilus> n_blownapart: implicit return value of a method is the last evaluated expression in the method body
fedez has joined #ruby
<Rusher> hehehe sorry
<TTilus> n_blownapart: without the line 13 my_map would return self (the return value of my_each) instead of accum
t89466 has quit [Remote host closed the connection]
<fowl> Rusher: i was wrong, the #<People:...> was default #to_s, if you do puts peter.inspect you will get a lot more info
t50944 has joined #ruby
<n_blownapart> TTilus: one sec thanks
v0n has joined #ruby
gfontenot has quit []
bradhe_ has joined #ruby
jbohn has quit [Quit: Leaving...]
bradhe has quit [Read error: Connection reset by peer]
tommyvYo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Eldariof59-ru has joined #ruby
insecurlex has joined #ruby
dmiller has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
Eldariof-ru has quit [Ping timeout: 245 seconds]
randomautomator has joined #ruby
emmanuelux has joined #ruby
Bosma has joined #ruby
tommyvYo has joined #ruby
tommyvYo has quit [Changing host]
tommyvYo has joined #ruby
<n_blownapart> TTilus: here, line 11 seems to be resulting in an array, without needing puts. thanks
<n_blownapart> http://pastie.org/4598497 ^^
rubylex has joined #ruby
berserkr has quit [Quit: Leaving.]
<n_blownapart> TTilus: I can't see the distinction in structure between these 2 progs.
Rusher has left #ruby [#ruby]
<fowl> n_blownapart: you asked why you need to use puts to get output...
<n_blownapart> yeah on the first prog. I expected both progs to return an array without p or puts . thanks fowl
rubylex has quit [Remote host closed the connection]
<fowl> n_blownapart: returning != printing
mahmoudimus has quit [Quit: Computer has gone to sleep.]
insecurlex has quit [Ping timeout: 248 seconds]
<n_blownapart> fowl yeah but this second one http://pastie.org/4598497 doesn't take a puts. how do they differ?
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
mneorr has quit [Remote host closed the connection]
<n_blownapart> fowl the first one is here: http://pastie.org/4595387
<fowl> n_blownapart: ...
mneorr has joined #ruby
nicoulaj has joined #ruby
<kiyoura> that's pretty gross
maletor has quit [Ping timeout: 252 seconds]
gfontenot has joined #ruby
<fowl> n_blownapart: how does the one without puts different from the one with puts? the one without puts doesnt print anything out.
<TTilus> n_blownapart: http://pastie.org/4598550
<TTilus> n_blownapart: no, http://pastie.org/4598497 does _not_ output anything
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
dmiller has quit [Ping timeout: 245 seconds]
<TTilus> n_blownapart: if you paste that code to irb/pry they will of course show you what the entered expressions evaluate to, line by line
<Hanmac> fowl i think he is fooled by pry
chimkan_ has joined #ruby
<n_blownapart> TTilus: fowl ok thanks, then it means I don't understand irb / pry's use
<fowl> Hanmac: yes
<n_blownapart> Hanmac: what do you mean?
<fowl> n_blownapart: in pry (or irb) if you do puts "HELLO" what is the return value?
<TTilus> n_blownapart: http://pastie.org/4598566
kidoz has joined #ruby
<fowl> anybody who answers this for him is getting shot
<TTilus> n_blownapart: irb and pry are what are called "repl"s
<n_blownapart> I guess its nil fowl
<TTilus> n_blownapart: it stands for read-eval-print-loop
<TTilus> n_blownapart: emphasize on _print_ ;)
<n_blownapart> so the print is always explicit , for lack of a better way to say it. TTilus fowl
baphled has quit [Ping timeout: 272 seconds]
maletor has joined #ruby
<TTilus> n_blownapart: they evaluate everything they get and _print_ the evaluated value of every expression (well, line)
baphled has joined #ruby
jeff_sebring has joined #ruby
<n_blownapart> banister wants me to learn ruby via pry is that a good approach?
<Hanmac> we have something like repl there too:
<Hanmac> >> puts "HELLO"
<TTilus> n_blownapart: if you run your code using ruby interpreter theres no implicit print, with repl there is
<al2o3cr> (NilClass) nil, Console: HELLO
dev_ryan70 has joined #ruby
aristidesfl has quit []
<TTilus> burgestrand: pry is _very_ good approach
s1n4 has left #ruby ["leaving"]
fyolnish has joined #ruby
<Hanmac> pry is cool ... the bad thing is that it needs a lot of seconds at startup
specialGuest has joined #ruby
<TTilus> burgestrand: oops, sorry, ment n_blownapart
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<TTilus> n_blownapart: pry is _very_ good approach
BrokenCog has quit [Quit: leaving]
t50944 has quit [Remote host closed the connection]
`brendan has quit [Ping timeout: 252 seconds]
BrokenCog has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
t52976 has joined #ruby
mwilson has quit [Disconnected by services]
mwilson has joined #ruby
jrist is now known as jrist-afk
mwilson has quit [Disconnected by services]
Eldariof27-ru has joined #ruby
saschagehlich has joined #ruby
mwilson- has joined #ruby
<n_blownapart> TTilus: ok many thanks. I guess its easier to learn pry then rubyMine ! gave up on that. one last thing. why is line 13 necessary in http://pastie.org/4595387 ..is it because its the last line in the method body?
<n_blownapart> fowl was I right about nil ? grampy
dev_ryan70 has quit [Ping timeout: 260 seconds]
fyolnish has quit [Ping timeout: 240 seconds]
Guest60361 has quit [Quit: Linkinus - http://linkinus.com]
<lectrick> Is there a way to override the "class" keyword to trace something?
<TTilus> n_blownapart: necessity of line 13 depends on what you want my_map to do
<fowl> n_blownapart: yes i just wanted to be sure you knew that distinction
dangerousdave has joined #ruby
<shevy> hehe
<lectrick> where is pry's source code?
<shevy> fowl is a teacher
<lectrick> maybe I can learn something from that
<fowl> lectrick: github/pry/pry
<n_blownapart> TTilus: you mean, put it on the line last in method body, to call puts on it?
<TTilus> n_blownapart: if you want it to work like ordinary map, then you need to return the newly constructed array with "mapped" values, which is for some reason called accum
johnlcox has quit [Ping timeout: 245 seconds]
Eldariof59-ru has quit [Ping timeout: 265 seconds]
<n_blownapart> fowl shevy fowl is a teacher. a student is just where he's at and a teacher will answer a question and its much appreciated by geriatric types.
Guest18152 has joined #ruby
Eldariof-ru has joined #ruby
<n_blownapart> TTilus: thanks, so what would be an alternative? accum I guess just means accumulator array in the example.
johnlcox has joined #ruby
ShadowBelmolve_ has joined #ruby
<TTilus> n_blownapart: if l 13 would be puts accum and you then would write foo = [1,2,3].my_map { |x| x*x }, the var foo would be set to nil and "1\n4\n9" would be printed to console
fyolnish has joined #ruby
<TTilus> n_blownapart: as it is now in pastie, foo would be [1, 4, 9] and nothing would be printed to console
ananthakumaran has quit [Quit: Leaving.]
<TTilus> n_blownapart: accum is just fine...
<n_blownapart> TTilus: very sorry, 1,4,9 ? are they object_id 's ? sorry
<shevy> lol geriatric types?
<shevy> I think the oldest guy here is 42
<TTilus> n_blownapart: [1,4,9] is an array and 1, 4 and 9 are numbers
<TTilus> n_blownapart: elements of that array
bradhe_ has quit [Read error: Connection reset by peer]
Eldariof27-ru has quit [Ping timeout: 272 seconds]
<n_blownapart> TTilus: but the prog. is handling dogs...very sorry I don't follow
bradhe has joined #ruby
<TTilus> n_blownapart: in my example the block is handling numbers, my_map does not care
<TTilus> n_blownapart: numbers are shorter to write and im lazy :)
<n_blownapart> TTilus: ok, the fog is lifting. I'll check it out, gotta go to work. thanks very much shevy fowl et al.
fyolnish has quit [Ping timeout: 265 seconds]
<n_blownapart> thanks TTilus !!
<TTilus> np
* Hanmac uses Defog ... it may be effective
<n_blownapart> Hanmac: TTilus what's that? :)
<TTilus> n_blownapart: judging by your questions, the fog might still be pretty thick, play around and don't give up even if it looks puzzling
<n_blownapart> TTilus: yeah, I've never programmed. even learning pry is a challenge because the documentation has a lot of context that I don't follow. but thanks for the encouragement, really.
nilg has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
* Hanmac thinks that this is not the right channel for poke-jokes :D
mneorr has joined #ruby
kenichi has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
mneorr has joined #ruby
zx has quit [Quit: Leaving]
resure has quit [Remote host closed the connection]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
SegFaultAX|work2 has joined #ruby
flak has joined #ruby
flak is now known as Guest51539
n_blownapart has quit [Remote host closed the connection]
mc0e has quit [Ping timeout: 252 seconds]
dmiller has joined #ruby
foolove has quit [Ping timeout: 244 seconds]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
rippa has quit [Ping timeout: 244 seconds]
foolove has joined #ruby
joephelius has quit [Ping timeout: 246 seconds]
nilg has joined #ruby
dpk has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
aldodelgado has quit [Quit: aldodelgado]
`brendan has joined #ruby
mattp_ has quit [Ping timeout: 268 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
dave_miles has joined #ruby
Guest51539 is now known as rippa
<dave_miles> help list
dave_miles has quit [Quit: Leaving]
dpk has joined #ruby
mattp_ has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
joephelius has joined #ruby
specialGuest has quit [Ping timeout: 246 seconds]
chimkan_ has quit [Quit: chimkan_]
Virunga has quit [Remote host closed the connection]
myth17 has joined #ruby
niklasb has quit [Ping timeout: 272 seconds]
burgestrand has quit [Quit: Leaving.]
burgestrand has joined #ruby
niklasb has joined #ruby
tommyvYo is now known as ztommyvyo
Takehiro has quit [Remote host closed the connection]
ztommyvyo is now known as tommyvyo
Stalkr_ has quit [Read error: Connection reset by peer]
Filuren has joined #ruby
benwoody has left #ruby [#ruby]
chussenot has joined #ruby
workmad3 has joined #ruby
mmercer has quit [Read error: Connection reset by peer]
mmercer has joined #ruby
nai_ has joined #ruby
chussenot has quit [Client Quit]
fermion has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
Stalkr_ has joined #ruby
mahmoudimus has joined #ruby
Filuren has quit [Ping timeout: 244 seconds]
<macer1> hey whats the fastest way of shifting a screen?
ryh has joined #ruby
<macer1> >> a = "asd123"; b = a.split(""); b.shift(3); b.join! ""; puts b
<al2o3cr> -e:1:in `eval': undefined method `join!' for ["1", "2", "3"]:Array (NoMethodError), from -e:1:in `eval', from -e:1:in `<main>'
<macer1> >> a = "asd123"; b = a.split(""); b.shift(3); b=b.join ""; puts b
<al2o3cr> (NilClass) nil, Console: 123
nai_ has quit [Remote host closed the connection]
fermion has quit [Quit: P]
<macer1> uh I mean shifting a string .>.
<macer1> >.>*
<macer1> >> a = "asd123"; b = a.bytes.to_a; b.shift(3); b=b.pack("C*"); puts b
<al2o3cr> (NilClass) nil, Console: 123
jjbohn has joined #ruby
jastix has quit [Quit: Leaving]
<macer1> >> tt = Time.now; 100.times { a = "asd123"; b = a.bytes.to_a; b.shift(3); b=b.pack("C*") }; puts Time.now-tt
<al2o3cr> (NilClass) nil, Console: 0.000208253
qwerxy has quit [Quit: offski]
<macer1> >> tt = Time.now; 100.times { a = "asd123"; b = a.split(""); b.shift(3); b=b.join "" }; puts Time.now-tt
<al2o3cr> (NilClass) nil, Console: 0.001639148
<macer1> the first one is faster...
CoverSlide has quit [Quit: leaving]
CoverSlide has joined #ruby
<rippa> >> tt = Time.now; 100.times { a = "asd123"; b = a[3..-1] }; puts Time.now-tt
<al2o3cr> (NilClass) nil, Console: 7.1598e-05
<rippa> this one is faster
Stalkr_ has quit [Ping timeout: 265 seconds]
CoverSlide has quit [Client Quit]
CoverSlide has joined #ruby
bradhe has quit [Remote host closed the connection]
Takehiro has joined #ruby
ph^ has quit [Remote host closed the connection]
techsurvivor has quit [Ping timeout: 265 seconds]
paolooo has quit [Quit: Page closed]
xorigin has joined #ruby
myth17 has quit [Quit: Leaving]
Bosma has quit [Quit: leaving]
jenrzzz has joined #ruby
mohits has quit [Read error: Connection reset by peer]
Squarepy has quit [Quit: Leaving]
shadoi has joined #ruby
pfaff_ has quit [Quit: Leaving]
Stalkr_ has joined #ruby
wallerdev has joined #ruby
BrokenCog has quit [Quit: leaving]
saschagehlich has quit [Read error: Connection reset by peer]
saschagehlich has joined #ruby
Filuren has joined #ruby
dave_miles has joined #ruby
Stalkr_ has quit [Read error: Connection reset by peer]
Filuren is now known as Stalkr_
ixti has quit [Quit: So Long, and Thanks for All the Fish!]
manizzle has joined #ruby
nilg has quit [Read error: Connection reset by peer]
Takehiro has quit [Remote host closed the connection]
graspee_ has quit [Quit: leaving]
noam has quit [Ping timeout: 240 seconds]
<libryder> i noticed in ruby you can't run multiple when statements… it matches on the first then exits right?
jrist-afk is now known as jrist
<libryder> case true; when true then puts "hi"; when true then puts "also hi"; end
<reactormonk> libryder: no fallthrough, this is correct
bluenemo has quit [Remote host closed the connection]
<libryder> trying to explain to a php friend why this isn't the case
fantazo has joined #ruby
<reactormonk> libryder: you can read articles online about the 'when' fallthrough - it's considered a mistake
<libryder> ok i'll check it out
azm has quit [Ping timeout: 265 seconds]
chriskk has joined #ruby
ScottNYC has quit [Quit: ScottNYC]
<shevy> I have a bunch of methods like this:
<shevy> list 'hello'
<shevy> list 'there'
<shevy> hmmmm
<reactormonk> shevy: aaaand?
<shevy> a bit hard to explain
<shevy> the above works for 90% of my use case
t52976 has quit [Remote host closed the connection]
<shevy> but sometimes I need to customize it more
jxpx777 has joined #ruby
t748 has joined #ruby
<libryder> reactormonk: my google skills seem to be failing me
<shevy> the problem is ... the only way I think I can customize it, is by passing an additional argument
LouisGB has quit [Ping timeout: 246 seconds]
<shevy> or... perhaps a way to modify some value, before I call list()
<shevy> hmmmm
Synthead has quit [Quit: p33 ba115]
<reactormonk> libryder: there's the wikipedia page on fallthrough
<reactormonk> libryder: you can also use a hash as case statement... ;-)
Stalkr_ has quit [Ping timeout: 255 seconds]
x77686d has quit [Ping timeout: 265 seconds]
Tearan has quit [Ping timeout: 244 seconds]
internet_user has quit [Remote host closed the connection]
<lectrick> How do I hook into when a Module is created?
<lectrick> I can hook into when a Class is created via Module.inherited, but that won't seem to work for other modules :/
<Hanmac> lectrick hm no i dont think so ... but yeah that should be some way ... (maybe i make a ticket)
JarJar has joined #ruby
<lectrick> Hanmac: While you're at it, it would be cool to know when a class/module/method definition is ended. I know Matz is averse to too many callbacks tho but :)
<Hanmac> reactormonk i saw a case without an statement, but with methods inside "when" condiontion ... it looks terrible but was valid ruby code
meskyanichi has quit [Quit: Leaving...]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
niklasb has quit [Ping timeout: 252 seconds]
<reactormonk> Hanmac: but invalid style?
<Hanmac> it was invalid in my eyes
jxpx777 has left #ruby ["Linkinus - http://linkinus.com"]
<reactormonk> Hanmac: got me that bit of code?
<Mon_Ouie> lectrick: The only callback when a class definition is closed calls the trace_func (see set_trace_func)
<Hanmac> lectrick an class definition never ends :D you could still add methods to it , everytime you want
<Hanmac> reactormonk i dont think so ... the pastie i make gets invalid
saturnflyer has quit [Ping timeout: 252 seconds]
<lectrick> Mon_Ouie: Yeah, already been in there.
<reactormonk> Hanmac: :-(
bradhe has joined #ruby
Taichouchou2 has quit [Remote host closed the connection]
<Hanmac> reatormonk: but it looked like this: http://pastie.org/4599075
kenichi has joined #ruby
<reactormonk> Hanmac: use tab ;-)
<ksinkar_> how do i do garbage collection before each of my test file is executed in ruby
<reactormonk> Hanmac: hmm, imo better than a bunch of elifs
axl__ has joined #ruby
Takehiro has joined #ruby
meskyanichi has joined #ruby
<Hanmac> no it is not !! in this "case" ifs are better than case
axl__ has quit [Client Quit]
<reactormonk> ksinkar_: GC
sixtycak_ has quit [Remote host closed the connection]
<reactormonk> hum
<shevy> let's abuse !
<shevy> !!!!!!!!! foo
mojo_pojo has joined #ruby
axl_ has quit [Ping timeout: 248 seconds]
<Hanmac> shevy: yours is still valid ruby code :D
Tearan has joined #ruby
saturnflyer has joined #ruby
LouisGB has joined #ruby
<reactormonk> Hanmac: obfuscation ftw?
<shevy> Hanmac I am learning from you
elaptics is now known as elaptics`away
<shevy> case
<shevy> when 'foo'
<shevy> when 'bar'
<shevy> I hate this
dmiller has quit [Remote host closed the connection]
<shevy> I can't look at it and immediately know what this is trying to do
<reactormonk> shevy: I do ;-)
x77686d has joined #ruby
arkiver has joined #ruby
ph^ has joined #ruby
<shevy> what is it trying to do
Xeago has joined #ruby
cascalheir has quit [Quit: Leaving...]
v0n has quit [Ping timeout: 246 seconds]
Axsuul has joined #ruby
reset has joined #ruby
<arkiver> I have a hash as follows one = {:first => ["one", "two", "three"], :second => ["four", "five", "six"]}. Now i want to print: one four , two five , three six. Any generic way to do it ?
hadees has joined #ruby
digitalcakestudi has joined #ruby
heisenmink has joined #ruby
fermion has joined #ruby
<rippa> arkiver: one[:first].zip one[:second]
<rippa> go from there
burgestrand has quit [Quit: Leaving.]
thnee has joined #ruby
burgestrand has joined #ruby
<thnee> why would gem install compass seg fault?? google gives me not much on this.. http://pastebin.com/zWX8TNqj
<arkiver> rippa, Didn;t know about zip. Looks cool. Ill try to write a method for it
t748 has quit [Remote host closed the connection]
<Hanmac> arkiver if you want "p" it directly:
<Hanmac> >>one = {:first => ["one", "two", "three"], :second => ["four", "five", "six"]};one[:first].zip(one[:second]) {|o1,o2| p "#{o1} #{o2}"}
<al2o3cr> (NilClass) nil, Console: "one four", "two five", "three six"
t72535 has joined #ruby
BrianJ has joined #ruby
<Hanmac> thnee: use an newer ruby, your version may be reach the end of life
<Hanmac> (before you) :D
<arkiver> hehe :) I use 1.9.3
johnlcox has quit [Quit: Computer has gone to sleep.]
ringotwo has quit [Read error: Connection reset by peer]
ringotwo has joined #ruby
nanderoo has quit [Quit: Leaving.]
<reactormonk> shevy: a bunch of elifs
<Hanmac> "using ruby1.8 reduce your life span"
<thnee> Hanmac: im on 1.8.7 on debian 6.. i know i have installed compass before on debian 6 without rvm..
datapolitical has joined #ruby
<thnee> Hanmac: so gems dont have versions bound to versions of ruby??
limeds has quit [Quit: limeds]
krz has joined #ruby
<arkiver> In my real app, there will be multiple such :first, :second, :third and so on.. So I am trying to build something generic
specialGuest has joined #ruby
<arkiver> But this is certainly a start :)
<shevy> thnee, hmm looks like it does not. only when a gem depends on a specific rubygems version.... like s.rubygems_version = '1.8.24'
BrianJ has quit [Ping timeout: 252 seconds]
recycle has quit [Remote host closed the connection]
<Hanmac> thnee: they DO! as sample my c-gems are only support MRI1.9+ (and maybe rubinus), my ruby-gems are only supporting 1.9 because of require relative and nicer hash syntax
<shevy> Hanmac is the only guy using debian here :D
<reactormonk> Hanmac: instead of {|o1,o2| ... } {|*o| o.join(" ")}
<Hanmac> shevy, i use ubuntu, its only debianoid
johnlcox has joined #ruby
niklasb has joined #ruby
v0n has joined #ruby
sirish has joined #ruby
<thnee> Hanmac: I have another similar debian 6 with ruby 1.8.7 system where I can do sudo gem install compass successfully
<thnee> it's gotta be something else I missed
piotr__ has quit [Ping timeout: 246 seconds]
<Hanmac> arkiver:
<Hanmac> >>{:first => ["one", "two", "three"], :second => ["four", "five", "six"]}.values.transpose.map {|o| o.join(" ")}.join(",")
<al2o3cr> (String) "one four,two five,three six"
<thnee> but the seg fault without any further information is pretty discouraging
Synthead has joined #ruby
limeds has joined #ruby
<Hanmac> thnee: compare the ruby versions ... maybe the other has some newer patchlevel
xorigin has quit [Quit: leaving]
<thnee> Hanmac: nope they are identical: ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
Stalkr_ has joined #ruby
cantonic has joined #ruby
<thnee> the one that is working is a vmware machine, and the other one is a openvz.. but that shouldnt matter?
Guedes is now known as Guedes_out
c0rn_ has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Remote host closed the connection]
<arkiver> Hanmac, excellent ! But it will work only for 3 values within the array right ? It throws an error if i add :third => ["seven", "eight"]
<Hanmac> "gem install compass -V" may be more informative ...
* arkiver ruby is fun
Takehiro has joined #ruby
<thnee> Hanmac: not really.. :( maybe I'm just best of getting a newer ruby via rvm
ksinkar_ has quit [Quit: Konversation terminated!]
<Hanmac> arkiver: currently it works whenn all keys are the same length ... i try to play with something
<arkiver> Hanmac, cool !
<arkiver> Hanmac, ill try to make it work for diffent key lenghts
jenrzzz has quit [Ping timeout: 256 seconds]
niklasb has quit [Ping timeout: 272 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
<thnee> Hanmac: does this make any more sense? http://pastebin.com/PU7M09ws
<Hanmac> arkiver:
<Hanmac> >> d = {:first => ["one", "two", "three"], :second => ["four", "five", "six"],:third => ["seven", "eight"]}; d.max_by {|k,v| v.size}[1].size.times.map {|i| d.each_key.map {|k| d[k][i] }.join(" ")}.join(", ")
<al2o3cr> (String) "one four seven, two five eight, three six "
geekbri has quit [Remote host closed the connection]
indian has quit [Ping timeout: 244 seconds]
<Hanmac> thnee not much helpfull :( ... but i would recoment to use an newer ruby ... on debian there should be an ruby1.9.1-full package ... (on newer debian ruby-full points to 1.9.1)
_md has quit [Quit: Linkinus - http://linkinus.com]
t72535 has quit [Remote host closed the connection]
dev_ryan70 has joined #ruby
dmiller has joined #ruby
<davidcelis> >> d = {:first => ["four", "sixteen"], :second => ["eight", "twenty-three"],:third => ["fifteen", "forty-two"]}; d.max_by {|k,v| v.size}[1].size.times.map {|i| d.each_key.map {|k| d[k][i] }.join(" ")}.join(" ")
<al2o3cr> (String) "four eight fifteen sixteen twenty-three forty-two"
t95731 has joined #ruby
KarlHungus has joined #ruby
<davidcelis> dem numberz
Beoran__ has quit [Read error: Operation timed out]
robustus has quit [Ping timeout: 244 seconds]
<shevy> demon numberz
<KarlHungus> if a gem is installed during the execution of a script, and i call load, it fails. is there a way to rescue this and rescane the available gems?
<fowl> >>END{puts"FOO"}
<al2o3cr> FOO, Console: (NilClass) nil
<Hanmac> thnee: ruby 1.8 will be die at june 2013
cirwin has left #ruby [#ruby]
<shevy> KarlHungus, what ruby version you use
<KarlHungus> shevy: this is 1.9
<shevy> but yes you can rescue it
Virunga has joined #ruby
<shevy> begin; load "blablablablabla"; rescue LoadError => error; require 'pp'; pp error; end
Eldariof-ru has quit []
<shevy> or require() rather than load()
<thnee> Hanmac: I see, thank you
<fowl> KarlHungus: you have to specifically rescue loaderror
<shevy> KarlHungus what is the name of the gem btw?
<KarlHungus> fowl: yeah, i'm already rescuing the loaderror. how do i rescan the gems?
<arkiver> Hanmac, Thanks !
<davidcelis> KarlHungus: `gem list` ?
<shevy> KarlHungus what does "rescan" mean
<KarlHungus> essentially, i need to block until the gem can be loaded, then load it and move on
sebicas has quit [Quit: sebicas]
<shevy> and if it can not be loaded?
nilg has joined #ruby
<shevy> within rescue, you can use ruby code. you can reload that gem
<shevy> which will most likely fail again ;P
<shevy> enter the loop!
* KarlHungus sighs
<shevy> bruce lee was nothing against a ruby loop
<shevy> oh
<shevy> who was the guy who said ruby guis suck?
<shevy> I need a ruby-gui for merging a .mp3 file
<maletor> Does assigning a CONSTANT with the same name overwrite the space in memory?
<shevy> that is a question for workmad3 and Mon_Ouie
<shevy> and Hanmac
<KarlHungus> begin ; load "foo"; rescue Gem::LoadError => e ; `gem install foo` ; end
<KarlHungus> begin ; load "foo"; rescue Gem::LoadError => e ; `gem install foo` ; load "foo" ; end
codefriar has joined #ruby
<KarlHungus> the load in the rescue block fails
mneorr has quit [Remote host closed the connection]
<KarlHungus> does that make more sense? sorry, i probably wasn't explaining well
<Hanmac> maletor: ... no ... the class only loses its location, but its still alive
<Hanmac> KarlHungus: DONT use load for an require job! and your plan is a bad idea, because the user maybe are not allowed to install gems, or the ruby version that starts the rb file is not the same version gem is pointing too
<KarlHungus> my "plan" is outside the context of the technical question i'm asking, but thanks for the insight :P
sepp2k has quit [Read error: Connection reset by peer]
<maletor> Hanmac: so that may be responsible for a memory leak?
chaplain is now known as thomas
nilg has quit [Read error: Connection reset by peer]
<Hanmac> maletor, not realy ... classes are normaly small compared to ther objects
workmad3 has quit [Ping timeout: 244 seconds]
<shevy> KarlHungus you said before that the load fails. is the rescue clause entered though?
<shevy> also test from irb
<shevy> `gem install foo`
<KarlHungus> shevy: yes, then i install the gem, and try to load again, but that load fails.
<shevy> if ^^^ this works
reset has quit [Quit: Leaving...]
<shevy> what is the name of the gem
<KarlHungus> ? what does that matter?
<shevy> because you have a gem here that misbehaves
<maletor> so if i instantiate a class 60 times a second then the class gets GC'd but the constant still lives on?
thomas is now known as chaplain
<KarlHungus> no, it could be any gem
dev_ryan70 has quit [Ping timeout: 264 seconds]
<shevy> according to you, your gem does not (1) load and (2) can not be installed via ``
brennen has left #ruby ["Leaving"]
<KarlHungus> its doesnt load because its not installed. so i rescue the load error and install it and try to load again
<shevy> yes and you claim that the installation was fine, but you still can not load it
<fowl> KarlHungus: maybe you are requiring the wrong file name
iamjarvo has quit [Ping timeout: 246 seconds]
<Hanmac> why is no one listening??? LOAD IS NOT THE RIGHT WAY WHEN YOU REQUIRE GEMS!!!
<shevy> KarlHungus, did you ensure that the gem is not loaded already by the way?
c0rn_ has joined #ruby
<shevy> when I do require 'pp', it returns true, when I do it again, it returns false
<fowl> KarlHungus: ignore shevy, he's here to confuse and bewilder you
<shevy> when I require a bogus name, I get this: require 'asgkl' LoadError: no such file to load -- asgkl
jbw has quit [Ping timeout: 252 seconds]
gqlewis has joined #ruby
cih_ has joined #ruby
<shevy> I am sure he will find the problem
<KarlHungus> Hanmac: i'm checking how i require/load now.
<KarlHungus> shevy: i will, and its not a syntax error.
<KarlHungus> or a typo ;)
fedez_ has joined #ruby
<shevy> Hanmac will be happy to avoid having to use CAPS :)
Beoran__ has joined #ruby
<Hanmac> some gems differ in the install and in the require name ... so maybe you install "foo-ruby" but require "foo"
<shevy> oh yes
<shevy> require 'bundler'
<shevy> that one fails for me
<shevy> NoMethodError: undefined method `root' for Bundler:Module
<Hanmac> shevy and "require 'bundler'" works for me :D
<Hanmac> so it seems to be an OSI-level 8 error :P
<shevy> I knew you love bundler
<shevy> Hanmac my code works fine for me. I have no interest to debug bundler
cih_ has quit []
<Hanmac> na i dont ... i only installed bundler because you had a problem and i want to test that
otters has quit [Read error: Connection reset by peer]
fedez has quit [Ping timeout: 244 seconds]
<shevy> I???
<shevy> I don't have a bundler problem!
<shevy> I would have one if I would have to use it
<shevy> :)
<shevy> I think there is only one way to save bundler
<shevy> as many people as possible must use it
arkiver has quit [Quit: Leaving]
otters has joined #ruby
gqlewis has quit [Remote host closed the connection]
x77686d has quit [Quit: x77686d]
pfaff_ has joined #ruby
pfaff_ has quit [Client Quit]
x77686d has joined #ruby
ryanallenbobcat has joined #ruby
specialGuest has quit [Quit: WeeChat 0.3.8]
recycle has joined #ruby
icy` has quit [Ping timeout: 272 seconds]
cih0lmes has joined #ruby
heisenmink has quit [Remote host closed the connection]
jbw has joined #ruby
cih0lmes has left #ruby [#ruby]
Stalkr_ has left #ruby ["Linkinus - http://linkinus.com"]
Guest23084 is now known as ged
AlbireoX has joined #ruby
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
johnlcox has quit [Quit: Computer has gone to sleep.]
recycle_ has joined #ruby
reset has joined #ruby
johnlcox has joined #ruby
Virunga has quit [Remote host closed the connection]
CharlieSu has left #ruby [#ruby]
relix has quit []
recycle has quit [Ping timeout: 244 seconds]
Virunga has joined #ruby
luist has quit [Quit: luist]
Mokiwai has joined #ruby
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
mneorr has joined #ruby
pdelgallego has joined #ruby
twosevenzero has joined #ruby
<libryder> where can i find info about all the string literal constructors like %w, %q, %Q?
vandemar has quit [Quit: leaving]
indian has joined #ruby
<libryder> haha nice
rippa has quit [Ping timeout: 265 seconds]
ShiintoRyuu has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
deryldoucette has joined #ruby
<libryder> i'm trying to find some way to make this a little cleaner "011#{@metadata[:call_flow][:country_code]}#{@metadata[:did]}"
<libryder> or #{RECORDPATH}#{@metadata[:recording_file_name]}-in.wav","#{TRANSPATH}/#{new_recording_filename}-in.wav"
<Hanmac> hm i found errors there: http://zenspider.com/Languages/Ruby/QuickRef.html ...
dpk has quit [Quit: Asleep at the keyboard.]
<fowl> Hanmac: zenspider can not make errors, blasphemer!
gfontenot has quit []
deryl has quit [Ping timeout: 246 seconds]
linoj has quit [Ping timeout: 272 seconds]
fantazo has quit [Remote host closed the connection]
<Hanmac> "class Comparable" :D
sailias has quit [Quit: Leaving.]
walbert has quit []
deryl has joined #ruby
deryldoucette has quit [Ping timeout: 248 seconds]
vandemar has joined #ruby
Spaceghostc2c has quit [Excess Flood]
Spaceghostc2c has joined #ruby
matrixise has joined #ruby
asobrasil has left #ruby [#ruby]
dpk has joined #ruby
cascalheira has joined #ruby
LBRapid_ has joined #ruby
cascalheira has quit [Client Quit]
Seus has joined #ruby
LBRapid_ has quit [Client Quit]
LBRapid_ has joined #ruby
Gadgetoid has quit [Remote host closed the connection]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
Gadgetoid has joined #ruby
Morkel has joined #ruby
fyolnish_ has joined #ruby
<Seus> hi all, i'm fairly new to ruby and am using the mysql2 gem and ruby and trying to get a value of a result that's returned…{"id"=>"e135f8cf-e2dc-f1a9-e8fd-4fc64a439b69"} how do i access the value of 'id' in a variable called results? I've tried results["id"] and it says, "undefined method `[]' for nil:NilClass (NoMethodError)"
Takehiro has quit [Remote host closed the connection]
<Guedes> Seus, in fact, that 'results' is nil
<libryder> Seus: i think more info is needed about the code around your problem. results is nil for some reason, so maybe gist the method that is setting results
Takehiro has joined #ruby
<Guedes> so you should investigate why it is nil.
fmcgeough has quit [Quit: fmcgeough]
Speed has quit [Ping timeout: 252 seconds]
LBRapid_ has quit [Client Quit]
dmiller has quit [Remote host closed the connection]
* Hanmac is sometimes nil too
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
fyolnish_ has quit [Ping timeout: 264 seconds]
qwerxy has joined #ruby
jenrzzz has joined #ruby
<fowl> i've been nil before
<fowl> i was young, trying out new things
<shevy> lol
qwerxy has quit [Client Quit]
<shevy> fowl perhaps I should return to #ruby-lang and call zenspider master
kiyoura has quit [Quit: Page closed]
limeds has quit [Quit: limeds]
qwerxy has joined #ruby
Guerrero has joined #ruby
* Hanmac is going into hibernate ...
<AntiTyping> how to setup jasmine so it runs every time I rake?
mikepack has quit [Remote host closed the connection]
Zolrath has joined #ruby
Takehiro has quit [Remote host closed the connection]
carloslopes has quit [Quit: Leaving.]
rakm has joined #ruby
qwerxy has quit [Quit: offski]
banseljaj is now known as imami|afk
machty has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
machty has joined #ruby
<rakm> is there something wrong with this ternary: `@project.save ? render json: 'success' : render json: 'failed'`
<rakm> breaking the same thing out into a if..else works
<rakm> the ternary gives me a syntax error. unexpected tSYMBEG, expecting keyword_do or '{' or '('
v0n has quit [Ping timeout: 246 seconds]
<burgestrand> rakm: it’s ambiguous; if json was a variable the false-branch of the ternary would be 'success' : render json: 'failed'
nicoulaj has quit [Remote host closed the connection]
<burgestrand> rakm: ternary expressions are not too common in ruby however, in most cases you’re better off with a simple if-else statement
<Hanmac> this are the ways:
<Hanmac> @project.save ? (render json: 'success') : (render json: 'failed')
<Hanmac> @project.save ? render(json: 'success') : render(json: 'failed')
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Guest5515 has quit [Quit: Guest5515]
<fowl> render json: (@project.save ? 'success' : 'failed')
t95731 has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
t21047 has joined #ruby
<Hanmac> hm this woshould work too: render json: @project.save ? 'success' : 'failed'
<rakm> thanks fowl Hanmac all those work
Syx has joined #ruby
<Hanmac> removing "()" are like Jenga ... if you remove too much everything will break
<rakm> haha
<fowl> dont be afraid of () they are useful
<rakm> I don't understand why it's breaking in this case though. if I had `true ? 'yes' : 'no'`
<rakm> that would work
<fowl> (puts "not yet"; sleep 1) while not_ready?
Morkel has quit [Quit: Morkel]
<rakm> the branches are just simple ruby statements, why do the parens matter
<RubyPanther> precedence
saturnflyer_ has joined #ruby
saturnflyer has quit [Ping timeout: 240 seconds]
saturnflyer_ is now known as saturnflyer
duncanm has left #ruby [#ruby]
gfontenot has joined #ruby
Guerrero has quit [Ping timeout: 240 seconds]
victor___ has joined #ruby
dave_miles has quit [Quit: Leaving]
cakehero has joined #ruby
asteve has quit []
JarJar has quit [Quit: Leaving]
victor___ has quit [Client Quit]
<RubyPanther> puts "got parens?" if !?!???:?:??::!!?!
chimkan has joined #ruby
dmiller has joined #ruby
mengu has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 246 seconds]
cakehero has quit [Client Quit]
Jay_Levitt has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
joshman_ has quit [Ping timeout: 264 seconds]
v0n has joined #ruby
bwlang has left #ruby [#ruby]
infinitiguy1 has quit [Ping timeout: 245 seconds]
conanbatt has joined #ruby
<conanbatt> Hey Guys. A general question on how Ruby works. Im using a Rack app with Unicorn, and i want to make a post to a third party site. Because i dont want it to lock the thread, i want to fork that post
<conanbatt> but i dont understand how it would wrk. What happens if the request is served and finished, and the fork is still alive? does it live forever? will it get killed?
<conanbatt> i want to avoid using a queue for such a simple thing
<Hanmac> hm there is an #rack channel too ...
yxhuvud has quit [Ping timeout: 248 seconds]
<conanbatt> this is more ruby related than rack i think
dmiller has quit [Remote host closed the connection]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
elux has quit [Quit: Bye!]
<Hanmac> when the object as no reference anymore it gets deleted the next time the GC runs
dmiller has joined #ruby
fedez_ has quit []
matrixise has quit [Ping timeout: 244 seconds]
_pdelgallego has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego is now known as pdelgallego
stopbit has quit [Quit: Leaving]
chendo_ has quit [Ping timeout: 252 seconds]
GoGoGarr_ has quit [Remote host closed the connection]
saturnflyer has quit [Quit: saturnflyer]
baphled has quit [Ping timeout: 245 seconds]
centipedefarmer has joined #ruby
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
chendo_ has joined #ruby
alanp_ has joined #ruby
<RubyPanther> conanbatt: You generally have to do that sort of thing in a different process, and use some kind of IPC (for example drb)
dev_ryan70 has joined #ruby
<conanbatt> like a queue i guess
<RubyPanther> In a webapp there is for one thing not a good way and for another thing, not a good use case that I have seen. Generally long-lived tasks get polled if they are web-based.
theRoUS has quit [Ping timeout: 245 seconds]
v0n has quit [Quit: Leaving]
ZachBeta has joined #ruby
forrest has quit [Quit: Leaving]
alanp has quit [Ping timeout: 252 seconds]
recycle_ has quit [Remote host closed the connection]
mascool has quit [Quit: leaving]
sn0wb1rd has joined #ruby
Takehiro has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
paulovittor23 has quit [Remote host closed the connection]
t21047 has quit [Remote host closed the connection]
kn330 has quit [Ping timeout: 248 seconds]
t3457 has joined #ruby
sailias has quit [Quit: Leaving.]
awarner has quit [Remote host closed the connection]
LBRapid has quit [Quit: Farewell.]
hadees has quit [Quit: hadees]
jenrzzz has joined #ruby
Takehiro has quit [Ping timeout: 245 seconds]
aldodelgado has joined #ruby
uris has quit [Ping timeout: 260 seconds]
kn330 has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
conanbatt has quit [Read error: Connection reset by peer]
DrShoggoth has quit [Quit: Leaving]
saschagehlich has quit [Quit: saschagehlich]
dmiller has quit [Remote host closed the connection]
kvirani has quit [Remote host closed the connection]
answer_42 has quit [Quit: WeeChat 0.3.8]
cascalheira has joined #ruby
pdelgallego has quit [Quit: pdelgallego]
pricees_ has left #ruby [#ruby]
mikepack has joined #ruby
uris has joined #ruby
oddmunds has quit [Quit: leaving]
Kabaka has quit [Ping timeout: 276 seconds]
dangerousdave has quit [Ping timeout: 245 seconds]
johnjohnson has quit []
axl_ has joined #ruby
mikehaas763 has joined #ruby
dmiller has joined #ruby
statarb3 has quit [Quit: Leaving]
<mikehaas763> Hello, has anyone ever used git tags with the capifony multistage extension? I can't figure out how to configure it
recycle has joined #ruby
jjbohn is now known as jjbohn|afk
Danielpk has quit [Quit: Danielpk]
aldodelgado has quit [Quit: aldodelgado]
<mikehaas763> * or capistrano
Danielpk has joined #ruby
hadees has joined #ruby
Kabaka has joined #ruby
mikehaas763 has quit [Quit: Leaving]
havenn has joined #ruby
skipper has joined #ruby
stkowski has quit [Ping timeout: 265 seconds]
GoGoGarrett has joined #ruby
recycle has quit [Remote host closed the connection]
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
t3457 has quit [Remote host closed the connection]
t33904 has joined #ruby
philcrissman has quit [Ping timeout: 260 seconds]
[Neurotic] has joined #ruby
TandemAdam has joined #ruby
yasushi has joined #ruby
yasushi has quit [Remote host closed the connection]
kpshek has joined #ruby
jorge_ has joined #ruby
cakehero has joined #ruby
yasushi has joined #ruby
sirish has quit [Ping timeout: 260 seconds]
havenn has quit [Remote host closed the connection]
Syx has quit [Quit: ( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
skipper has quit [Remote host closed the connection]
havenn has joined #ruby
recycle has joined #ruby
jgarvey has quit [Quit: Leaving]
kpshek has quit [Ping timeout: 272 seconds]
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
yasushi has quit [Ping timeout: 248 seconds]
mwilson- has quit [Excess Flood]
qwerxy has joined #ruby
Foxandxss has joined #ruby
stkowski has joined #ruby
mahmoudi_ has joined #ruby
datapolitical has quit [Quit: This computer has gone to sleep]
recycle has quit [Remote host closed the connection]
qwerxy has quit [Client Quit]
havenn has quit [Ping timeout: 246 seconds]
mahmoudimus has quit [Ping timeout: 245 seconds]
datapolitical has joined #ruby
jhchabran has quit [Ping timeout: 244 seconds]
SCommette has quit [Quit: SCommette]
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
ryanallenbobcat has quit [Ping timeout: 265 seconds]
RichGuk has joined #ruby
specialGuest has joined #ruby
specialGuest has quit [Changing host]
specialGuest has joined #ruby
datapolitical has quit [Client Quit]
RichGuk has left #ruby [#ruby]
AngryParsley is now known as ggreer
ggreer has quit [Changing host]
ggreer has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
recycle has joined #ruby
c0rn_ has joined #ruby
Guest18152 has quit [Remote host closed the connection]
ShadowBelmolve_ has quit [Read error: Connection reset by peer]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
Virunga has quit [Remote host closed the connection]
diegoviola has joined #ruby
wpaulson has joined #ruby
jhchabran has joined #ruby
wallerdev has quit [Quit: wallerdev]
jjbohn|afk is now known as jjbohn
davidcelis has quit [Ping timeout: 252 seconds]
khakimov has joined #ruby
binaryplease has joined #ruby
nari has joined #ruby
datapolitical has joined #ruby
jrist is now known as jrist-afk
noam has joined #ruby
Takehiro has joined #ruby
jtgiri_ has quit [Ping timeout: 272 seconds]
jtgiri__ has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
butblack has joined #ruby
justinmcp has joined #ruby
sailias has joined #ruby
jorge_ has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 244 seconds]
johnlcox has quit [Ping timeout: 252 seconds]
chimkan__ has joined #ruby
deryl has quit [Quit: deryl]
jorge_ has joined #ruby
fyolnish has joined #ruby
justinmcp has quit [Remote host closed the connection]
centipedefarmer has quit [Quit: This computer has gone to sleep]
g_rotbart has joined #ruby
davidcelis has joined #ruby
deryl has joined #ruby
chimkan has quit [Ping timeout: 260 seconds]
chimkan__ is now known as chimkan
jjbohn is now known as jjbohn|afk
fyolnish has quit [Ping timeout: 248 seconds]
havenn has joined #ruby
wpaulson_ has joined #ruby
wpaulson_ has quit [Client Quit]
Seus has quit [Quit: Seus]
wpaulson has quit [Ping timeout: 252 seconds]
philcrissman_ has joined #ruby
null- has joined #ruby
TheShadowFog has quit [Read error: Connection reset by peer]
davidcelis has quit [Ping timeout: 265 seconds]
jorge_ has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
dev_ryan70 has quit [Remote host closed the connection]
Buttons840 has joined #ruby
davidcelis has joined #ruby
RichieEvan has quit [Ping timeout: 244 seconds]
philcrissman_ has quit [Remote host closed the connection]
t33904 has quit [Remote host closed the connection]
t90731 has joined #ruby
dmiller has quit [Remote host closed the connection]
Speed has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
imami|afk is now known as banseljaj
digitalcakestudi has quit [Read error: Connection reset by peer]
machty_ has joined #ruby
guns has joined #ruby
havenn has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
vulture has joined #ruby
qwerxy has joined #ruby
lkba has joined #ruby
jjang has joined #ruby
vulture is now known as vulturecc
vulturecc is now known as vulture
Virunga has joined #ruby
mojo_pojo has left #ruby [#ruby]
Abbas5 is now known as Abbas|
Virunga has quit [Remote host closed the connection]
Quadrant_ has joined #ruby
philcrissman has joined #ruby
Nisstyre_ has joined #ruby
uris has quit [Quit: leaving]
Quadrant has quit [Ping timeout: 268 seconds]
Synthead has quit [Quit: p33 ba115]
mikehaas763 has joined #ruby
sailias has quit [Quit: Leaving.]
<mikehaas763> Hi. I'm new to symfony. Could someone please explain to me what the following line means/is doing
<mikehaas763> server 'production.server.com', :app, :web, :primary => true
dpk has quit [Quit: Asleep at the keyboard.]
<libryder> as much as i love railscasts, i wish he did more stuff with ruby only
<Buttons840> hi, can anyone suggest some ruby tutorials well suited for someone with a strong python background?
luist has joined #ruby
t90731 has quit [Remote host closed the connection]
Aphelion has joined #ruby
t8512 has joined #ruby
r0bby_ has joined #ruby
luist has quit [Read error: Connection reset by peer]
luist has joined #ruby
luist_ has joined #ruby
luist has quit [Read error: Connection reset by peer]
luist_ is now known as luist
nari has quit [Ping timeout: 272 seconds]
axl_ has quit [Quit: axl_]
specialGuest has quit [Ping timeout: 244 seconds]
Kabaka has quit [Ping timeout: 276 seconds]
r0bby has quit [Ping timeout: 244 seconds]
niklasb has quit [Ping timeout: 246 seconds]
ryh has quit [Remote host closed the connection]
centipedefarmer has joined #ruby
<davidcelis> Buttons840: ruby koans