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]
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...
<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?
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?
<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>
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?
[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"?
<_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
<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?
<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
<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
<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/
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
<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
<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.
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?
<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
<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]
<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
<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
<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
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?
<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...
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?
<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]
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]
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?
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
<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
<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>
<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
<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()
<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
<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
<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
<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)
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>
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]
<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
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]