<jcblitz>
I have a class that has a method that uses open-uri to make a request to a third party website. Can someone point me to any resources on how I would design that class so my unit tests could mock open-uri to return a dummy response?
thone has quit [Ping timeout: 240 seconds]
dnyy has joined #ruby
bradleyprice has joined #ruby
<csmrfx>
no ptools
Kalhazin has joined #ruby
<shevy>
other methods mention checking for the content
<shevy>
while (b = f.read(256)) do; return true if b[ "\0"]
agarie has quit [Read error: Connection reset by peer]
Kalhazin has quit [Ping timeout: 260 seconds]
muloka has joined #ruby
<csmrfx>
just need to know that file *is* text / utf
<csmrfx>
can't test for every type of binary blob under the sun
mahmoudimus has quit [Quit: Computer has gone to sleep.]
emanu has quit [Quit: emanu]
jobicoppola has quit [Quit: Computer has gone to sleep.]
timonv has quit [Ping timeout: 265 seconds]
agarie has joined #ruby
carlyle has quit [Remote host closed the connection]
<csmrfx>
ahaa, there is a unix way to look at binaryness of file
silverslab has quit [Quit: silverslab]
nateberkopec has quit [Quit: Leaving...]
binarypl1 has joined #ruby
miso1337 has quit [Quit: afk]
yshh has joined #ruby
fyolnish has joined #ruby
silverslab has joined #ruby
volty has quit [Quit: Konversation terminated!]
<pewter_tao>
csmrfx: what are you talking about?
<pewter_tao>
you want to read a binary file?
undecim has joined #ruby
<pewter_tao>
use a hexeditor!
binaryplease has quit [Ping timeout: 255 seconds]
emanu has joined #ruby
<csmrfx>
I want to see that the file is *not* a binary file before testing if it has crunchbang or .rb
sarmiena_ has quit [Quit: sarmiena_]
<undecim>
Can someone explain 1) Why libv8 isn't compiling (http://fpaste.org/UF8h/) and 2) Why it's being installed to .gem/ruby/1.9.1/ when I have ruby version 1.9.3?
sarmiena_ has joined #ruby
SeanTAllen has joined #ruby
cousine has quit [Remote host closed the connection]
<csmrfx>
howcome this test with file doesn't work:
bradleyprice has quit [Remote host closed the connection]
<shevy>
File "build/gyp/gyp", line 12
<shevy>
let's see what this file is
<undecim>
Okay, so it's got "#!/usr/bin/env python" at the top...
<csmrfx>
v8 with python bindings
<undecim>
Maybe it's using the wrong python version
Nimsical has joined #ruby
jsilver has quit [Read error: Connection reset by peer]
synthetix has quit [Ping timeout: 250 seconds]
jsilver has joined #ruby
<undecim>
I just want to get working with rails so I know if I can use it instead of php...
blazes816 has quit [Quit: blazes816]
dmiller has joined #ruby
<csmrfx>
naw you probably dont
<undecim>
But I can't get any js runtime working for rake...
techhelp has joined #ruby
<shevy>
probably
<shevy>
python 2 vs python 3
<shevy>
it's kinda insane to require python when compiling ruby-extensions :D
<undecim>
Yeah...
<shevy>
undecim, php should be much simpler than the rails ecosystem
<undecim>
Well I'll have no idea if rails is for me until I can try it
<csmrfx>
hahaa! I have conquered the binary realm with my eleet haxer0r codez!
squidBits has joined #ruby
<csmrfx>
oh
<csmrfx>
no, not quite
<shevy>
undecim just installing rails, one does not need to compile anything at all
tommyvyo has quit [Quit: Computer has gone to sleep.]
<shevy>
I tried rails in the 1.x days
Virunga has quit [Remote host closed the connection]
matchaw has joined #ruby
<csmrfx>
lol
<shevy>
I got the first tutorial working with sqlite too
Goles has quit [Quit: Computer has gone to sleep.]
<shevy>
but it kind of became more complex, larger... bundler install didnt work for me... the fun went away
<csmrfx>
if this system command returns: ERROR: cannot open `P._1315384786416.png' (No such file or directory)
<undecim>
Well all the tutorials I'm trying are telling me I need to use rake db:create to initialize the db... But that won't run without a JS runtime
<csmrfx>
How can it proceed past the if: if `file #{fn}`[/text/]
<csmrfx>
doesn't make any sense
<shevy>
hmm
<shevy>
rake... another thing I hate
_alejandro has joined #ruby
nwertman has quit [Ping timeout: 255 seconds]
<undecim>
shevy: Can you recommend some literature that gets me started on rails in a sane manner?
darthdeus has quit [Read error: Connection reset by peer]
darthdeus has joined #ruby
darthdeus has quit [Read error: Connection reset by peer]
chimkan has quit [Quit: chimkan]
<csmrfx>
ah, quotes did the magic
<csmrfx>
if `file "#{fn}"`[/text/]
Michael__ has quit [Remote host closed the connection]
<csmrfx>
now if it only had test to see that file is not empty
squidBits has quit [Read error: Connection reset by peer]
squidBits_ has joined #ruby
<undecim>
And there doesn't seem to be any way to get js runtime for rake
<csmrfx>
I tried to one-linerize it but cannot
<shevy>
undecim I bought two rails book, they were so boring that I never finished reading them
squidBits_ is now known as squidBits
<shevy>
undecim, just learn ruby, you will like it more than php ;) no idea about the ruby ecosystem, I am not so thrilled about some of it, like rails
jojosiao has joined #ruby
darthdeus has joined #ruby
darthdeus has quit [Client Quit]
<undecim>
shevy: Well I'm not going to enjoy ruby nearly as much if I don't use it in a context that pertains to the work I'm doing
<csmrfx>
lemon is a nice php framework to use the 1-2 years you are learning.
<shevy>
undecim I use ruby + .cgi still
cableray has quit [Quit: cableray]
BigO has quit [Remote host closed the connection]
<csmrfx>
limonade, whatever
nwertman has joined #ruby
squidBits has quit [Quit: squidBits]
muloka has quit []
<shevy>
hehe
<shevy>
that's something to drink!
<undecim>
*sigh*, well back to php
<csmrfx>
php has so many frameworks that it is impossible to remember
L1 has joined #ruby
<csmrfx>
maybe it was slim, maybe it was lemon, maybe it was limonade
<csmrfx>
haven't really used php as project base in years
twoism has quit [Remote host closed the connection]
<three18ti>
so when is it appropriate to use symbols vs strings for hashes?
<gbchaosmaster>
three18ti: Almost always use symbols as hash keys.
<DanBoy>
a symbol takes up less mem
Michael__ has quit [Remote host closed the connection]
<csmrfx>
when want symbols, when want use one char less : vs =>+""
<shevy>
gbchaosmaster yeah, less characters, but it is inconsistent with how a symbol is otherwise done
Michael__ has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<csmrfx>
hm, or is that 3 chars less
<gbchaosmaster>
shevy: Inconsistent, kinda, but the hash rocket was just so bulky looking.
Michael__ has quit [Remote host closed the connection]
Michael__ has joined #ruby
<shevy>
csmrfx, well for a big hash it can pay off nicely
hackerdude has quit [Remote host closed the connection]
<shevy>
if you have 50 lines of a hash, 50 x -3 characters is quite a lot
lolcathost has quit [Read error: Connection reset by peer]
<three18ti>
gbchaosmaster, yea, but I come from Perl (yes, we all have our crosses to bear... :P ) so the "fat comma" is comfortable for me.
<shevy>
oh
<shevy>
-2 only ... or?
mrsolo has quit [Quit: Leaving]
silverslab has quit [Quit: silverslab]
<shevy>
oh no, -3
epwhorl has quit [Ping timeout: 265 seconds]
<shevy>
I cant count :D
<gbchaosmaster>
three18ti: When in Rome... =P
<shevy>
I think ruby is by now more complex than perl
AlbireoX has quit [Remote host closed the connection]
brad___ has joined #ruby
<three18ti>
why do you say that shevy?
<gbchaosmaster>
New code should definitely use the latest syntax, it's more or less universally preferred.
<three18ti>
gbchaosmaster, +1 ;)
<DanBoy>
i normally go with the big pointer '=>' :P
<gbchaosmaster>
TIL that #ruby is full of heathen. =P
rakl has quit [Quit: sleeping]
<shevy>
three18ti not sure, it feels like that, all the things you must know about ruby
ttt has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<shevy>
I use => too
<shevy>
:)
<DanBoy>
i came from perl tho :D
<three18ti>
it is a fairly comprehensive API. everything being an object is a new concept I'm trying to wrap my head around.
<shevy>
I used perl for like 8 months, then php for ... 20 months
<shevy>
I found php easier than perl
Emmanuel_Chanel has quit [Quit: Leaving]
epwhorl has joined #ruby
<shevy>
three18ti, that concept is quite simple. you have an object foo, you call methods on it, via . foo.bar or if you want it explicit foo.bar()
* three18ti
php ... *shudders*
pewter_tao has quit [Ping timeout: 252 seconds]
fred909 has quit [Ping timeout: 250 seconds]
<three18ti>
it's not that it's a complex concept... it's just that 1.+1 or 1.is_a?(Integer) just seems so foreign.
<shevy>
then your objects can contain data, in @ivars, specifically pertaining to that object in question... class Bla; attr_reader :foo; def initialize; @foo = 5; end; end; bla = Bla.new; bla.foo
<shevy>
# => 5
<three18ti>
(I'll -never- get used to question marks in method names)
<shevy>
well the first is just how the ruby parser wants to see the world
froy has quit [Quit: kablam!]
[Neurotic] has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
<three18ti>
and I know that 1 + 1 is perfectly valid. I was just illustrating.
<DanBoy>
ya you will man
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<shevy>
three18ti question marks are simple!
<shevy>
three18ti class Box; def open?; return @state
<DanBoy>
dude at first i had a problem not putting wrapping blocks in { and }
<shevy>
is your box open or is it not!
<shevy>
this is like written english three18ti
<csmrfx>
ruby is way more sophisticated than perl
aaronmacy has quit [Quit: Leaving.]
<shevy>
in java... it could be is_open()
<shevy>
but you can use this in ruby too
<shevy>
def is_open... def is_it_open... well, that's too much to type, but still you could
<shevy>
DanBoy haha yeah
<three18ti>
I still want to end all my lines with semicolons.
<shevy>
DanBoy what do you prefer... {} or do/end
<shevy>
I loved that I could omit semicolons
nz_henry has joined #ruby
<shevy>
I'll never go back to a language that mandates semicolons
<shevy>
that would leave me only with ruby and python
<three18ti>
visual basic
nz_henry has left #ruby [#ruby]
<csmrfx>
javascript
<csmrfx>
ocaml
<csmrfx>
lisp
<shevy>
yikes
<csmrfx>
scheme
<shevy>
JAVASCRIPT
<csmrfx>
ecmascript
<three18ti>
bash
<csmrfx>
bash has semicolons
<three18ti>
but they aren't required to end a line.
<csmrfx>
oh, they're not?
<csmrfx>
heh thats right
<three18ti>
nope. you have to escape the return with a \ to continue to a new line.
<three18ti>
I think they are required in like if statements: if [ "$1" == "" ]; then
<three18ti>
fi
samphippen has quit [Quit: Computer has gone to sleep.]
alexim has quit [Quit: sleep]
<csmrfx>
yeah
<three18ti>
not that I'm encouraging writing bash...
<csmrfx>
some commands require em
<three18ti>
right.
<shevy>
god, I hate bash the most
<csmrfx>
bash is also not quite a language, more like a heap of expressions
<three18ti>
haha!
<three18ti>
heap of expressions flying in loose formation.
<shevy>
if [ "$1" == "" ] <-- that doesn't give me any meaningful sense
<three18ti>
that means that if there is no first parameter.
<shevy>
cant they do that in the function declaration :(
<shevy>
that's like using global variables
<epwhorl>
I believe javascript doesn't require semicolons.
squidBits has joined #ruby
<three18ti>
function declaration? lol.
<shevy>
yeah that would be sweet
<shevy>
in ruby you could use ENV everywhere, I hate that too
<shevy>
wait
<shevy>
ARGV
<shevy>
:)
<three18ti>
that particular snippet is from a program the fist checks that it has 3 input parameters.
phipes has joined #ruby
<csmrfx>
js dont need, has ASI
<reppard>
hello everyone
<three18ti>
yea, is the equivalent to ARGV
bigmac has joined #ruby
<shevy>
def foo; puts 'hi world' if ARGV[0] == 'run'; end
<reppard>
does anyone know how to return columns in a multidem array?
<three18ti>
ARGV[0] == $1
<shevy>
when I see things like that I must slay three kittens
eka has quit [Remote host closed the connection]
<shevy>
what is a column
<reppard>
array[0][0..19] will return the first row of a grid array
<shevy>
.slice ?
<reppard>
but array[0..19][0] doesnt return the expected value
<shevy>
%w( a b c d e f g ).slice 3,2 # => ["d", "e"]
mikepack has quit [Remote host closed the connection]
<shevy>
well [0..19] gives us all the first ... 20 elements
havenn has quit [Remote host closed the connection]
<reppard>
yes indeed
<reppard>
i have a 20 by 20 grid
<shevy>
ok
<reppard>
so its 20 arrays in an array
TitaniumStudioUs has joined #ruby
<reppard>
i want to collect the columns
<reppard>
like the first element in each array
<csmrfx>
irb
<reppard>
then the second, and so on
<csmrfx>
irb again, and so on
headius has quit [Quit: headius]
<shevy>
with 20 x 20 I think it is: array = Array.new(20) { Array.new(20) }
TitaniumStudioUs has quit [Client Quit]
<reppard>
csmrfx: been racking my brain irb for about 45 minutes =)
<shevy>
that should be 400 nils, I think
epwhorl has quit [Quit: Leaving]
<shevy>
what was the question again? hehehe
<reppard>
haha
epwhorl has joined #ruby
<csmrfx>
there are not that many ways to arrange the params for array of arrays
<reppard>
so i converted a 20 by 20 string of numbers in to a multi dem array
<shevy>
know the movie memento? I feel like that main guy, when trying to code something... what happened before, slipped away from memory
<shevy>
right
<reppard>
i can collect the rows easily
d2dchat has quit [Remote host closed the connection]
<reppard>
array[x][0..19]
brad___ has quit [Quit: leaving]
<reppard>
then i can iterate for x and that snags the rows
<reppard>
but i want the columns
<shevy>
aaaaah
<csmrfx>
lol
<shevy>
so you dont want the ------------
<shevy>
you want the |
<reppard>
indeed =)
<csmrfx>
how is it you cannot swap x and 0..19?
h4mz1d has quit [Ping timeout: 255 seconds]
<reppard>
i mean i want both, i already have the -----
<reppard>
csmrfx: dont know, i tried that as its the obvious solution but that just returns the whole array
sn0wb1rd has joined #ruby
<shevy>
my brain is empty... it can not answer the question right now
<shevy>
let's say, obtain column 5
<shevy>
of the array
<shevy>
we would need
<shevy>
array[5][0]
<shevy>
array[5][1]
<shevy>
array[5][2]
<shevy>
hmm, rather [4]
<csmrfx>
what that latter thing?
<reppard>
where do you guys past to in here?
<shevy>
but never mind that for now
c0rn has quit [Quit: Computer has gone to sleep.]
<reppard>
ill show you
<shevy>
I use pastie.org
<csmrfx>
maybe a range?
<waxjar>
does somebody incidentally know a good article on how Rack works?
krz has joined #ruby
<csmrfx>
how is it your range only works the other way
<shevy>
yeah
<waxjar>
i don't mean its API or whatever, more the idea behind it
nilg has quit [Read error: Connection reset by peer]
Ruler_Of_Heaven_ has joined #ruby
pipopopo has quit [Ping timeout: 264 seconds]
nilg has joined #ruby
xpen has joined #ruby
joeycarmello has quit [Remote host closed the connection]
Michael__ has quit [Remote host closed the connection]
Michael__ has joined #ruby
nga4 has joined #ruby
davidcelis has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
ddd has quit [Quit: Leaving.]
agarie has quit [Remote host closed the connection]
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
vd0 has joined #ruby
Michael__ has quit [Read error: Connection reset by peer]
Michael__ has joined #ruby
omg765 has joined #ruby
mascool has quit [Ping timeout: 244 seconds]
baroquebobcat has joined #ruby
kdridi has quit [Quit: Quitte]
havenn has joined #ruby
Emmanuel_Chanel has joined #ruby
fred909 has joined #ruby
mneorr has quit [Remote host closed the connection]
g_bleezy has joined #ruby
atal421 has joined #ruby
jjbohn is now known as jjbohn|afk
vlad_starkov has joined #ruby
xpen_ has joined #ruby
jjbohn|afk is now known as jjbohn
jjbohn has quit [Quit: Leaving...]
silverslab has quit [Quit: silverslab]
g_bleezy has quit [Read error: Operation timed out]
devdazed has quit [Ping timeout: 255 seconds]
pu22l3r has quit [Remote host closed the connection]
nga4 has quit []
vlad_starkov has quit [Ping timeout: 260 seconds]
xpen has quit [Ping timeout: 264 seconds]
devdazed has joined #ruby
squidBits has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
Nisstyre-laptop has quit [Remote host closed the connection]
agarie has joined #ruby
danneu has joined #ruby
Kruppe has joined #ruby
jackdanger has joined #ruby
Nisstyre-laptop has joined #ruby
medik has quit [Quit: medik has no reason]
freakazoid0223 has quit [Quit: Leaving]
Michael__ has quit [Remote host closed the connection]
Michael__ has joined #ruby
bricker has quit [Remote host closed the connection]
bricker has joined #ruby
devdazed has quit [Ping timeout: 264 seconds]
<bricker>
I have a module that another module depends on, but which I also want to be able to use by itself. Is it safe/prudent to include that module into the other one? Will Ruby handle this intelligently, or will it just override itself?
<bricker>
(if both the standalone and the dependent module are included into one class)
generalissimo has joined #ruby
flip_digits has joined #ruby
nat2610 has quit [Quit: Leaving.]
cconstantine has joined #ruby
banjara has joined #ruby
devdazed has joined #ruby
lunks_ has joined #ruby
Michael__ has quit [Read error: Connection reset by peer]
<lunks_>
Can I somehow use enum_for with sort taking a block?
Michael__ has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
apok_ has joined #ruby
cj3kim has joined #ruby
nat2610 has joined #ruby
ner0x has quit [Quit: Leaving]
apok_ has quit [Read error: Connection reset by peer]
apok_ has joined #ruby
apok has quit [Ping timeout: 240 seconds]
ahuman_ is now known as ahuman
jeffreybaird has quit [Quit: jeffreybaird]
baroquebobcat has quit [Quit: baroquebobcat]
Goles has quit [Ping timeout: 252 seconds]
pothibo has quit [Quit: pothibo]
apok_ has quit [Ping timeout: 240 seconds]
doug has joined #ruby
Goles has joined #ruby
<doug>
what's the shortest way to specify [1,2,3,4,5,6,7,8,9]?
<doug>
or some other monotone interval...
Goles has quit [Max SendQ exceeded]
Goles has joined #ruby
<reactormonk>
doug, [*1..10]
danneu has quit [Ping timeout: 252 seconds]
<doug>
what's the * do?
<reactormonk>
splash operator
dagnachew has quit [Quit: Leaving]
Michael__ has quit [Remote host closed the connection]
<doug>
not the splat operator?
joeycarmello has joined #ruby
hsbt is now known as hsbt_away
<reactormonk>
doug, I prefer a bit less gory names :-)
hsbt_away is now known as hsbt
mneorr_ has joined #ruby
havenn has left #ruby ["Leaving..."]
icole has joined #ruby
vd1 has joined #ruby
yaymukund has quit [Ping timeout: 255 seconds]
vd1 has quit [Read error: Connection reset by peer]
ejholmes has joined #ruby
ryanf has quit [Ping timeout: 256 seconds]
epwhorl has joined #ruby
icole has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
sarmiena_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
reppard has quit [Ping timeout: 256 seconds]
tjbiddle_ has joined #ruby
rellin has joined #ruby
rtd_ has quit [Quit: rtd_]
rtd_ has joined #ruby
jeffreybaird has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
tjbiddle has quit [Ping timeout: 240 seconds]
tjbiddle_ is now known as tjbiddle
eka has joined #ruby
pu22l3r has joined #ruby
bricker has quit [Quit: Lost terminal]
x82_nicole has joined #ruby
eka has quit [Ping timeout: 244 seconds]
jsilver has quit [Read error: Connection reset by peer]
radic has quit [Disconnected by services]
radic_ has joined #ruby
<foucist>
reactormonk: LOL
skaczor has quit [Ping timeout: 248 seconds]
noric has joined #ruby
squidBits has quit [Read error: Connection reset by peer]
g-ram has joined #ruby
ryanf has joined #ruby
zander__ has joined #ruby
alx- has quit [Quit: alx-]
zander__ is now known as Guest2236
nat2610 has quit [Quit: Leaving.]
squidBits has joined #ruby
agarie has quit [Remote host closed the connection]
Guest2236 has quit [Client Quit]
adeponte has joined #ruby
zander___ has joined #ruby
<epwhorl>
I was pleasantly surprised with some of the "non-scripting language" things that ruby has. Still stumped by I can't define a constant after I use it in a method. After all, it finds methods in methods that are only defined after those methods...
<epwhorl>
And by was I meant as I was learning/discovering Ruby
<epwhorl>
I dunno. I guess I thought if a constant was defined directly in the class that it had a class-scope. Apparently not quite true.
<foucist>
well in C don't constants need to be defined before they get used? so they need to be above the method that uses them?
<squidBits>
Yeah, and I think that's where it comes from in Ruby.
<foucist>
epwhorl: but ruby is an interpreted language, so what's going on is the foobar definition gets interpreted first before the foo method calls it
Goles has quit [Quit: Out.]
<epwhorl>
Okay yes. But it seems it's not interpreting constants in the same manner.
<epwhorl>
Why? I'm not so sure I understand the utility.
<epwhorl>
anyways. I must continue. I'll chalk this one up as a misunderstanding.
BoomCow has joined #ruby
Kruppe has quit [Remote host closed the connection]
alanp_ has joined #ruby
_zph has left #ruby [#ruby]
kil0byte has joined #ruby
nat2610 has quit [Quit: Leaving.]
alanp has quit [Ping timeout: 240 seconds]
moshee has quit [Ping timeout: 255 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
segv- has joined #ruby
BigO has quit [Remote host closed the connection]
love_color_text has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
<reactormonk>
epwhorl, just remember that code in methods gets executed when the method is called, not when it is parsed
<reactormonk>
epwhorl, constants, however, are evald the the moment they are parsed
love_color_text has quit [Remote host closed the connection]
<reactormonk>
maybe that helps
arkiver has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
segv- has quit [Quit: segv-]
jsilver has joined #ruby
synthetix has joined #ruby
moshee has quit [Ping timeout: 248 seconds]
moshee has joined #ruby
jeffreybaird has joined #ruby
NiteRain has quit [Ping timeout: 246 seconds]
NiteRain has joined #ruby
Fretta has quit [Quit: Fretta]
ananthakumaran has joined #ruby
vd0 has quit [Remote host closed the connection]
vd0 has joined #ruby
squidBits has quit [Quit: squidBits]
yaymukund has joined #ruby
krzkrzkrz has joined #ruby
<epwhorl>
I can't wait to be out of Windows and into Linux
<epwhorl>
Rails in Windows is so wrong
luckyruby has joined #ruby
techhelp has quit [Quit: Leaving]
NiteRain has quit [Ping timeout: 246 seconds]
g_bleezy has joined #ruby
<epwhorl>
missing :controller >:|
krz has quit [Ping timeout: 252 seconds]
krzkrzkrz is now known as krz
arquebus has joined #ruby
joofsh has quit [Remote host closed the connection]
havenn has joined #ruby
c0rn has joined #ruby
cconstantine has quit [Remote host closed the connection]
L1 has quit [Remote host closed the connection]
vd0 has quit [Quit: Leaving]
<foucist>
epwhorl: try what i'm doing.. vagrant + virtualbox.. ssh into the linux
<reactormonk>
epwhorl, just don't rely on them too much
adeponte has quit [Remote host closed the connection]
havenn has joined #ruby
arkiver has quit [Quit: Leaving]
<epwhorl>
I guess I have always naively relied upon rotating magnetic hard disks and only had one crash.
stkowski has quit [Quit: stkowski]
NullByte has quit [Ping timeout: 260 seconds]
cantonic_ has joined #ruby
rakl has joined #ruby
huoxito has quit [Quit: Leaving]
Solnse has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
Rix has joined #ruby
agarie has quit [Remote host closed the connection]
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
Goopyo has left #ruby [#ruby]
agarie has joined #ruby
DrShoggoth has joined #ruby
Kalhazin|2 has quit [Ping timeout: 265 seconds]
BoomCow has quit [Quit: This computer has gone to sleep]
jackdanger has quit [Quit: Leaving.]
16WABGBA3 has quit [Ping timeout: 255 seconds]
yacks has quit [Ping timeout: 265 seconds]
miso1337 has joined #ruby
jlwestsr has joined #ruby
havenn has quit [Ping timeout: 248 seconds]
meskyanichi has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
chendo_ has joined #ruby
squidBits has quit [Quit: squidBits]
phipes has quit [Quit: phipes]
atal421 has quit [Quit: atal421]
tagrudev has joined #ruby
squidBits has joined #ruby
freeayu_ has joined #ruby
freeayu has quit [Ping timeout: 250 seconds]
agarie has quit [Remote host closed the connection]
emanu has joined #ruby
a_a_g has joined #ruby
agarie has joined #ruby
kn330 has quit [Ping timeout: 240 seconds]
emanu has left #ruby [#ruby]
kn330 has joined #ruby
sqbell has quit [Ping timeout: 255 seconds]
jlwestsr has quit [Ping timeout: 246 seconds]
yacks has joined #ruby
rippa has quit [Ping timeout: 260 seconds]
coderhut has joined #ruby
<reactormonk>
epwhorl, backups.
rakl has quit [Quit: sleeping]
adambeynon has joined #ruby
browndawg has quit [Quit: Leaving.]
jenrzzz has quit [Ping timeout: 256 seconds]
c0rn has quit []
browndawg has joined #ruby
jojosiao has left #ruby [#ruby]
mahmoudimus has joined #ruby
mneorr has joined #ruby
stkowski has joined #ruby
jlwestsr has joined #ruby
chendo_ has quit [Ping timeout: 252 seconds]
jlwestsr has quit [Remote host closed the connection]
chendo_ has joined #ruby
yshh has quit [Read error: Connection reset by peer]
x82_nicole has joined #ruby
yshh_ has joined #ruby
x82_nicole has quit [Ping timeout: 256 seconds]
apok has joined #ruby
sarmiena_ has joined #ruby
x82_nicole has joined #ruby
eka has joined #ruby
eka has quit [Remote host closed the connection]
eka has joined #ruby
cableray has joined #ruby
miso1337 has quit [Quit: afk]
rohit has quit [Quit: Leaving]
eka has quit [Remote host closed the connection]
Shamgar has quit [Read error: Connection reset by peer]
miso1337 has joined #ruby
epwhorl has quit [Ping timeout: 240 seconds]
gabrielrotbart has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
stkowski has quit [Quit: stkowski]
rohit has joined #ruby
doug has left #ruby [#ruby]
JohnBat26 has joined #ruby
chimkan_ has joined #ruby
haxrbyte has joined #ruby
swex has joined #ruby
haxrbyte_ has joined #ruby
eka has joined #ruby
eka has quit [Remote host closed the connection]
Shamgar has joined #ruby
burgestrand1 has joined #ruby
<RubyPanther>
in 97 I had an (already) old HD die, the magnetic disk parts were fine, but the head was the old kind that used a plastic worm drive which died. I had backups on floppy, but disk #32 of the archive was corrupted and I lost all my data.
emmanuelux has quit [Quit: emmanuelux]
chimkan__ has joined #ruby
<RubyPanther>
backups suck, I recommend redundant rotating magnetic drives instead.
emergion has joined #ruby
<squidBits>
uhhhhh, RAID isn't backups.
generalissimo has quit [Remote host closed the connection]
yshh_ has quit [Ping timeout: 240 seconds]
Nisstyre-laptop has quit [Ping timeout: 250 seconds]
undecim has quit [Read error: Operation timed out]
burgestrand has quit [Read error: Operation timed out]
maesbn has joined #ruby
haxrbyte has quit [Ping timeout: 252 seconds]
yshh has joined #ruby
rohit has quit [Quit: Leaving]
chimkan_ has quit [Ping timeout: 252 seconds]
arquebus has joined #ruby
habstina1 has joined #ruby
sn0wb1rd has quit [Remote host closed the connection]
companion has quit [Read error: Operation timed out]
habstinat has quit [Ping timeout: 244 seconds]
headius has quit [Quit: headius]
havenn has joined #ruby
cezar has joined #ruby
ekristen has joined #ruby
<ekristen>
hi
<ekristen>
I have a rake command
<ekristen>
after two minutes it throws an exception saying the script timed out
<ekristen>
but it was in the middle of work
dmiller has quit [Remote host closed the connection]
<hoelzro>
you're not doing anything with the value from the block
<JDubs>
what do you mean?
<hoelzro>
yield(block)
<samotarnik>
hello. how can i use a generic argument in alias_method? i would like for every method in a certain class to "puts __callee__" before it is executed. how do i do that?
<hoelzro>
well, that also doesn't make a lot of sense
<JDubs>
hoelzro: doesn't that run the block?
<hoelzro>
you're giving the block a reference to itself?
<hoelzro>
just yield
<JDubs>
I thought that would make it recursive?
<JDubs>
so it will build a stack
<JDubs>
and can make tags inside of other tags
<hoelzro>
you don't need to do that
<hoelzro>
and it's way confusing
<hoelzro>
try this: @output_stack << yield
<JDubs>
hmmm
<hoelzro>
also, you don't use the block in build_no_end
<JDubs>
yeah, because i'm still trying to figure out how to access the block when it's a string and not a command
<hoelzro>
what do you mean?
<JDubs>
I'm not sure, this is my first dynamic program really :/
<JDubs>
So I'm kind of stumbling my way through lol
<hoelzro>
heh
yacks has joined #ruby
mpd106 has quit [Remote host closed the connection]
cascalheira has joined #ruby
<JDubs>
btw, what you should made the next test pass, now I have to fix my nesting though.
<JDubs>
so I'll tinker with that and be back with more questions I'm sure! :) Will you be here?
txdv has quit [Ping timeout: 245 seconds]
fyolnish has joined #ruby
schaary has joined #ruby
<hoelzro>
I'm always here =)
<hoelzro>
well, except when I'm not.
<hoelzro>
but I'm always in the channel (thanks to tmux), so I'll see your questions
<hoelzro>
I might pop out for lunch, though
grzywacz has joined #ruby
<JDubs>
cool! :)
<samotarnik>
how can one define a 'before_method' in ruby? i.e. a method that gets called before every other method?
browndawg has left #ruby [#ruby]
<arturaz>
samotarnik, you can't without evil mockery
<arturaz>
why do you want ti?
<arturaz>
why do you want it?
<arturaz>
samotarnik, unless, of course, you define a proxy object.
<samotarnik>
let's say i call length on a string instance. what i would like is to have a "puts String: length" before that printed out
<hoelzro>
samotarnik: you mean before *every* method, or just length?
<samotarnik>
every one
<hoelzro>
ok
<hoelzro>
that's evil
<hoelzro>
but you could probably do it with a mixin
timonv has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 244 seconds]
miso1337 has joined #ruby
luckyruby has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
lampe2 has quit [Ping timeout: 252 seconds]
<samotarnik>
i'm lost in rails' stack, trying to figure out some authorization issues i'm having with some rails engine. and i would like to do this for ActiveRecord based classes, to see what is getting called and when
<samotarnik>
does that make sense?
<Hanmac_>
samotarnik you could try to anoy them on #rubyonrails
yacks has joined #ruby
<samotarnik>
LOL
yshh has quit [Remote host closed the connection]
<samotarnik>
it is a ruby issue though...
lampe2 has joined #ruby
<samotarnik>
afk
<Hanmac_>
why do we need to fix it when rails is shitty?
bradhe has quit [Ping timeout: 265 seconds]
hdcool09 has quit [Ping timeout: 244 seconds]
whowantstolivefo has quit [Remote host closed the connection]
<crocket>
Can ruby make me precious?
<keyvan>
my precious...
cousine has quit [Remote host closed the connection]
samotarnik has quit [Ping timeout: 248 seconds]
slainer68 has quit [Ping timeout: 244 seconds]
tps_ has joined #ruby
pencilcheck has joined #ruby
<crocket>
Can ruby get me a better job?
<codecaster>
depends on what's your current job
<Hanmac_>
if you curse yourself with learning rails ---
<crocket>
codecaster, If you compare a ruby job to my current job, almost any ruby job would be better than mine.
<crocket>
I was hired as a programmer, but my job is boss's secretary now.
slainer68 has joined #ruby
shtirlic has quit [Remote host closed the connection]
eykosioux has joined #ruby
_JamieD_ has joined #ruby
havenn has joined #ruby
phelps has quit [Ping timeout: 255 seconds]
xpen_ has quit [Remote host closed the connection]
vasile has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
My_Hearing has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
Chryson has quit [Quit: Leaving]
slainer6_ has joined #ruby
answer_42 has joined #ruby
philomory has quit [Quit: philomory]
slainer68 has quit [Ping timeout: 264 seconds]
<zeroXten>
So, what kind of fun consequences would there be when doing: class NilClass \n def [](x) \n nil \n end \n end ?
havenn has quit [Ping timeout: 264 seconds]
phelps has joined #ruby
jenrzzz has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
reppard has joined #ruby
<waxjar>
nothing? nil[anything] would simply return nil
<zeroXten>
waxjar: yup, so something like x[:this][:does][:not][:exist] will return nil instead of throwing an exception. But, I'm wondering whether that is likely to break either ruby internals or common approaches in ruby apps
<waxjar>
i don't see why it would, NilClass doesn't have an #[] method, so unless it's implemented by some library you're using, it won't cause any problems.
Rezwan has joined #ruby
pencilcheck has quit [Remote host closed the connection]
<waxjar>
zeroXten: google for the Null Object pattern, i think it'll be relevant
<Hanmac_>
Jdubs show us your code you use for testing
My_Hearing has quit [Ping timeout: 240 seconds]
My_Hearing has joined #ruby
alee has quit [Ping timeout: 276 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
<waxjar>
JDubs: ruby methods return only their last expression, in this case build_end(x)
keyvan is now known as love_color_text
rakunHo has quit [Read error: Connection reset by peer]
<waxjar>
so what you want to do is add them to @output_stack and return output stack, probably
<JDubs>
waxjar: The last part of the method is Make
<JDubs>
make joins the stack and returns it
tobinharris has quit [Quit: tobinharris]
<waxjar>
oh right
<JDubs>
waxjar: Sorry, my formatting was bad there :(
zigomir has quit [Quit: zigomir]
jenrzzz has quit [Ping timeout: 265 seconds]
<JDubs>
mage_ I'd help you but I'm not proficient in that sorry :(
<JDubs>
mage_ if you are patient someone will help you though I bet
<waxjar>
JDubs: also read up on method_missing, you didn't implement it correctly right now.
<waxjar>
you forgot to call super, and the second argument should be an array: method_missing(method, *args, &block)
<mage_>
RVM is really a PITA
<mage_>
is there any alternative ?
<waxjar>
mage_: rbenv and chruby are popular
<waxjar>
make sure to uninstall rvm (rvm implode i believe) if you go with rbenv, they don't work together
<mage_>
I'll take a look, thanks
<JDubs>
waxjar: why do I need super? I thought super called the same function on the next class up?
pcarrier has joined #ruby
pcarrier has quit [Client Quit]
pcarrier has joined #ruby
<waxjar>
in case you decide not to do anything, e.g. none of the ifs/elsifs match
codecaster has quit [Ping timeout: 252 seconds]
Gooder has quit [Remote host closed the connection]
<JDubs>
waxjar: why would it be super and not yield? I thought super was for when you are using a subclass, and want to send the command to the same function of a parent class?
tk__ has joined #ruby
Gooder has joined #ruby
<waxjar>
JDubs: every Ruby object is a subclass of Object, which is a subclass of BasicObject (iirc)
larissa has joined #ruby
<waxjar>
right now, the methods of those classes can't be called because you don't call super in method_missing if none of your ifs/elsifs return true
<JonnieCache>
mage_: rbenv is good
igro has quit [Quit: Computer has gone to sleep.]
atmosx has joined #ruby
ddd has joined #ruby
<mage_>
JonnieCache: better than chruby ?
<JDubs>
waxjar: so I just need to add an else super?
<waxjar>
yes
<mage_>
rbenv seems unmaintained ..?
<hoelzro>
method_missing won't get called if the method definition is present in Object/BasicObject
<JonnieCache>
mage_: rbenv just works. its very simple. it doesnt need much work doing on it
bluenemo has joined #ruby
<mage_>
ok :)
<JonnieCache>
mage_: most new work happens on the ruby-build project which is separate
<jsilver>
go rvm
<JDubs>
waxjar: after adding super, I now get this error: Failure/Error: @xml.hello do
<JDubs>
NoMethodError:
<JDubs>
undefined method `hello' for #<XmlDocument:0x000000015da858 @output_stack=[]>
<JonnieCache>
mage_: rbenv doesnt actually build ruby, it requires ruby-build which integrates with it
<JonnieCache>
mage_: ruby-build's last commit was 6 days ago
havenn has joined #ruby
<hoelzro>
JDubs: you're calling super from method_missing?
<JDubs>
hoelzro: that's what waxjar said I needed to add, unless I misunderstood him
h8R has joined #ruby
<hoelzro>
you shouldn't
<hoelzro>
because then it will call method_missing from Object (or BasicObject, I can't remember), which throws an exception
<waxjar>
that means your if or els if doesn't match JDubs :)
<waxjar>
so you found the problem area :)
<hoelzro>
where is this if/elsif?
_Mon_Ouie_ has joined #ruby
<waxjar>
hoelzro, always call super in method_missing if you decide not to act :)
<hoelzro>
oh, then it's ok
My_Hearing has quit [Ping timeout: 240 seconds]
<hoelzro>
I figured the JDubs wouldn't want to in his case, since he's building an XML generator
<hoelzro>
unless this is for something new?
Takehiro has joined #ruby
bradhe has joined #ruby
<JDubs>
hoelzro What do you mean
dr_bob has quit [Quit: Leaving.]
<hoelzro>
I think that I'm misunderstanding something.
havenn has quit [Ping timeout: 252 seconds]
<waxjar>
yea, i didn't attempt to understand the logic, but with an if .. els if, there's always the possibility of deciding not to act, in which case you would use super
<waxjar>
but it seems you would want to use an if else here JDubs, if block_given? yield else build_tag
<hoelzro>
ok, I see now
<hoelzro>
I don't think JDubs has a situation where he wants to call super, since he's using method_missing to generate XML tags of the same name as the called method
jeffreybaird has joined #ruby
<waxjar>
yes
<hoelzro>
also, that second condition will never succeed, will it?
<hoelzro>
oh, nvm
<hoelzro>
I misread it
<JDubs>
man, i'm starting to think I'm never going to get this damn thing working...
<JDubs>
:/
<hoelzro>
although '&& block_given?' is redundant
dr_bob has joined #ruby
<waxjar>
i think you get an empty array if no arguments are passed, so that will never pass, no
<hoelzro>
waxjar is right about the args to method_missing, though
[Neurotic] has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
<nw>
of course, you'll have to replace http://foobar.com with the real url of the aws namespace
AndChat| has quit [Ping timeout: 240 seconds]
daniel_- has quit [Quit: WeeChat 0.3.9.2]
Banistergalaxy has joined #ruby
bradhe has joined #ruby
bwwrd has joined #ruby
philcrissman has quit [Remote host closed the connection]
wermel has joined #ruby
robotmay has joined #ruby
browndawg has joined #ruby
yshh has joined #ruby
h8R has quit [Read error: No buffer space available]
legiao has joined #ruby
odin_ has joined #ruby
<odin_>
how do I find out which dependency insists on "ffi 1.0.11" that doesn't exist for windows, someone "yanked" it without putting in a replacement!
Iszak has joined #ruby
<atmosx>
this ffi is a pain on mac also
<atmosx>
but we have macports
atmosx has quit [Quit: WeeChat 0.4.0-dev]
<odin_>
Gemfile.lock shows "ffi (1.0.11)" as a top level item but it is not declared as such in Gemfile
<odin_>
I have 1.0.9 and 1.2.0 of ffi provided by the runtime install
<odin_>
but bundle insists on wanting 1.0.11 and I can not see which deps is force that,
<redmaverick>
aws is in the xml document.
jeffreybaird has quit [Quit: jeffreybaird]
<odin_>
can I delete Gemfile.lock ?
reppard_ has quit [Ping timeout: 244 seconds]
Banistergalaxy has quit [Ping timeout: 240 seconds]
reppard has quit [Ping timeout: 244 seconds]
yshh has quit [Ping timeout: 265 seconds]
pothibo has joined #ruby
gmci has joined #ruby
gmci is now known as Guest91170
havenn has joined #ruby
<odin_>
should Gemfile.lock be checked into source control management ?
slainer68 has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
<elaptics>
odin_: generally yes
<chiel>
yes
slainer68 has joined #ruby
joofsh has joined #ruby
noric has quit [Ping timeout: 241 seconds]
david` has joined #ruby
nwertman has joined #ruby
noric has joined #ruby
<odin_>
well blowing it away and running "bundle install" has made it decide it is happy with "ffi (1.2.0)" which I do have installed, why it didn't do that update before I do not know, "bundle update" just eats CPU for 30mins doing nothing
jeffreybaird has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<odin_>
is there a "bundle install --use-local-if-exists" mode ?
maasha has joined #ruby
<maasha>
Hello
<odin_>
or a "bundle install --use-local-if-native-part-exists" mode ?
<Hanmac_>
odin_ #bundler
<odin_>
you have a whole channel for it! heh, thanks
noric has quit [Ping timeout: 256 seconds]
noric has joined #ruby
Banistergalaxy has joined #ruby
sailias has quit [Ping timeout: 241 seconds]
<maasha>
I am looking for a way to write a wrapper around this C program that is invoked like this: mummer [options] <reference file> <query file1> . . . [query file32], but I want to avoid disk IO. What are the options. popen3 and?
ner0x has joined #ruby
heisenmink has quit [Remote host closed the connection]
<maasha>
I Perl I think one would go with a C extension and adapters for the files.
jackdanger has joined #ruby
altious has joined #ruby
hsbt_away is now known as hsbt
<maasha>
s/^I/In/
<hoelzro>
maasha: if you would write an XS extension with Perl, why not write a C extension with Ruby?
<odin_>
perl is better! /me ducks
<hoelzro>
odin_: I am also a fan of Perl =)
<hoelzro>
it pays my bills, and remains the language I use most
samphippen has quit [Quit: Computer has gone to sleep.]
<maasha>
hoelzro: so I was reading the chaptor on how to do this in the Ruby Cookbook, but I was not really enlightened on how to deal with the fact that his "mummer" program reads files from disk. I want to avoid the Disk IO overhead.
<Hanmac_>
maasha you could only use c extensions when you have libs and header files in the case of mummer you need popen, C-Extension shoulsd not work
<maasha>
The example in the cookbook is limited.
bradhe has quit [Ping timeout: 252 seconds]
<hoelzro>
maasha: I'm confused; you want to do what mummer does, but without directing mummer's output to a file?
awestroke has joined #ruby
pu22l3r has joined #ruby
rjmt___ has quit [Remote host closed the connection]
jackdanger has quit [Quit: Leaving.]
<maasha>
hoelzro: I dont want to write the input data to files first. I want to pipe it directly to the program without touching the disk.
awestroke has quit [Read error: Connection reset by peer]
<hoelzro>
right
<maasha>
Hanmac_: right
awestroke has joined #ruby
<hoelzro>
you mentioned Perl extensions, so I think you might be able to do the same with Ruby
<hoelzro>
if you just want to do it with pipes, Ruby has fork and pipe just like Perl
<maasha>
hoelzro: yes, so I was looking into it - and didn't really find anything - and then I asked here :o)
niklasb has joined #ruby
<hoelzro>
pipe happens to be on IO
pu22l3r has quit [Read error: Connection reset by peer]
awestroke has quit [Remote host closed the connection]
ttt has joined #ruby
<maasha>
yeah, so how will that impair speed?
<hoelzro>
fork + pipe?
pu22l3r has joined #ruby
<maasha>
using popen3 compared to a C extension
<maasha>
if the latter is somehow possible.
Banistergalaxy has quit [Ping timeout: 240 seconds]
<hoelzro>
well, you incur IO overhead, system call overhead, and the overhead of starting another process
<hoelzro>
but sometimes pipes are the only way
pu22l3r has quit [Remote host closed the connection]
reppard has joined #ruby
reppard_ has joined #ruby
pu22l3r has joined #ruby
igro has quit [Quit: Computer has gone to sleep.]
<maasha>
hoelzro: on a unix system you can create dummy /dev/something files to fool such programs?
redmaverick has quit [Quit: Page closed]
matrixise has quit [Ping timeout: 252 seconds]
<maasha>
I vaguely remembers something like that.
<hoelzro>
maasha: you mean like /dev/fd/*?
<hoelzro>
for process substitution?
<maasha>
hoelzro: not sure. I am exploring possibilities.
<hoelzro>
if you have the option, I would make an extension in C
noric has quit [Ping timeout: 240 seconds]
igro has joined #ruby
<maasha>
hoelzro: I guess I have the option, but how?
<hoelzro>
maasha: README.EXT in the ruby source details the C API
<hoelzro>
the Ruby C API is actually quite nice
kil0byte has joined #ruby
<Hanmac_>
hoelzro in the case of mummer there is no header file as far as i could see
<hoelzro>
ah
<maasha>
hoelzro: yup. read that one (I did play around a lot with inline C)
<hoelzro>
well, then I amend my earlier statement: s/possible/reasonable/
willob has joined #ruby
<hoelzro>
if you don't have the header files and you aren't meant to, I consider it unreasonable =)
<maasha>
I dont know if that has the same limitation?
<Hanmac_>
he could do it using the sourcecode of mummer ... but i would not recoment it, and for the secound i didnt look at the code ...
altious2 has joined #ruby
<hoelzro>
I think that's reasonable, depending on the condition of the source
<maasha>
The mem code is very short and tight
ttt has quit [Ping timeout: 245 seconds]
<Hanmac_>
maasha: i need to say it: when you want to make an C-Extension without access to the header files, you mostly need to write it all by your self ...
Slivka has joined #ruby
<Hanmac_>
when you have header files it does the most job for you ... you only need to convert the output and the input
invisime has joined #ruby
ffranz has joined #ruby
davorb_laptop has joined #ruby
<maasha>
Hanmac_: right. I just heard this guy talking about how easy this was in Perl where you could use an "adaptor" to deal with the input file requirement.
<maasha>
So exploring possibilities :o)
kn330_ has joined #ruby
Goles has joined #ruby
jxriddle has quit [Quit: jxriddle]
clj_newb has joined #ruby
meskyanichi has quit [Read error: Connection reset by peer]
<Hanmac_>
with convert i mean that in your binding when you bind an C(++) lib you need to take care to turn the ruby values into the curespondign C(++) values and back
matrixise has joined #ruby
samphippen has joined #ruby
maesbn has quit [Remote host closed the connection]
<hoelzro>
the nice thing about XS is it handles the translation between Perl types and C/C++ types
kn330 has quit [Ping timeout: 259 seconds]
<hoelzro>
the nasty thing about it is sometimes it screws it up
maesbn has joined #ruby
<hoelzro>
and the Perl C API is not fun to look at
timonv has quit [Remote host closed the connection]
awestroke has joined #ruby
<maasha>
hoelzro: no, here Ruby is much nicer
<odin_>
hmm I initialize my windows environment for PSDK v7.1 x86 Release and "ml.exe" and "cl.exe" and nmake.exe just work, but still it says I need build tools
eph3meral has left #ruby [#ruby]
nateberkopec has joined #ruby
timonv has joined #ruby
<odin_>
hmm ok I need to match with the runtime I have install, never gonna happen in a short space of time
<JonnieCache>
it was much worse before i had an ssd, but thats also probably because i had half the ram
shiin has quit [Quit: Computer has gone to sleep.]
<jrajav>
If I've experienced that, it's been mild enough that I never noticed it...
<JonnieCache>
jrajav: its a common complaint amongst os x users. os x just has some weird stuff in its memory management
<jrajav>
No arguments there
<jrajav>
But arguably, it's better than most alternatives
<sonne>
does $config have any special meaning in ruby? or can i use it at will for my own stuff?
pcarrier has joined #ruby
<jrajav>
I do know that it have some very odd paging behavior
matrixise has quit [Ping timeout: 252 seconds]
Coolhand has joined #ruby
blaxter has quit [Quit: foo]
<JonnieCache>
jrajav: thats pretty much what im talking about
<JonnieCache>
jrajav: im guessing youve probably always had more ram than me relative to the need
<JonnieCache>
the problem is very bad when youre low on ram and using a lot of memory
<jrajav>
Wouldn't doubt it. I intentionally keep things pretty minimal
<jrajav>
The heaviest things I run are Chrome, iTerm, and Macvim
GoGoGarrett has joined #ruby
<JonnieCache>
ah right
<jrajav>
That's pretty much ALL I run, actually :P
<JonnieCache>
well try context switching between a windows 7 VM and a photoshop instance and watch it wince like youve just hit it in the ribs with a hammer
pcarrier has quit [Ping timeout: 252 seconds]
<JonnieCache>
obviously thats expected to an extent but its sometimes WAY worse than it should be
_bart has joined #ruby
<JonnieCache>
(and yes im aware that im misusing "context switch" there :P)
swex_ has joined #ruby
pcarrier has joined #ruby
rippa has joined #ruby
banisterfiend has quit [Remote host closed the connection]
huoxito has joined #ruby
_bart has quit [Client Quit]
<atmosx>
to get UTC time, should I Time.utc(Time.now.to_s) ?
matrixise has joined #ruby
<jrajav>
JonnieCache: Yeah, cutting your ram in half and then stuffing adobe into the gap will do it :P
<JonnieCache>
fortunately now i have a new job with a much faster computer and no frontend responsibilities, and a whole separate box for running windows VMs on. woohoo!
shiin has joined #ruby
<jrajav>
They have some beautiful, powerful software, but DAMN, baby got back
<JonnieCache>
jrajav: the point is its way worse than on windows or linux in that situation
<jrajav>
With the same amount of ram? Running a VM at the same time?
<burgestrand>
atmosx: no
<burgestrand>
atmosx: did you try that one? What does it give you?
<JonnieCache>
obviously it will slow down, but it wont make you worried that its about to physically melt your computer
<burgestrand>
atmosx: what you want is Time#utc not Time.utc
d2dchat has joined #ruby
<jrajav>
I'm not saying OS X doesn't have issues, and I've heard of the exact things you're talking about, but in my experience I've always had more trouble with Windows and Linux. One of the reasons I prefer OS X is that it just works, on every level.
slainer68 has quit [Read error: Connection reset by peer]
<atmosx>
burgestrand: returns always 0 time so its wrong
<jrajav>
Also BSD/Next is sexy.
kn330_ has joined #ruby
<atmosx>
but I found Time.now.utc :D
slainer68 has joined #ruby
<burgestrand>
atmosx: :)
<burgestrand>
atmosx: Time#utc
chimkan has joined #ruby
<JonnieCache>
the other thing my mac does is swap like CRAZY when i first hit the keyboard in the morning. what has it been doing at night to swap out my apps?
tombar has joined #ruby
<Hanmac_>
atmosx Time.now.utc
<JonnieCache>
it literally stops dead for almost a minute sometimes
banisterfiend has joined #ruby
<JonnieCache>
again, the new box isnt so bad
jharris1 has joined #ruby
geekbri has joined #ruby
<JonnieCache>
but yeah at the end of the day thats the same reason i use os x, because its BSD That Works Well(tm) despite its memory management flaws
havenn has joined #ruby
philcrissman has joined #ruby
sailias has joined #ruby
Goles has quit [Ping timeout: 248 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
haxrbyte has joined #ruby
Gooder` has joined #ruby
<atmosx>
JonnieCache: mine too
bradhe has quit [Ping timeout: 252 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
<atmosx>
JonnieCache: but I have a program (kerel module) to log keyboard shortcuts, till you mentioned I thought that was the main reason sometimes the keyboard almost 'stalled'.
bbttxu has joined #ruby
<JonnieCache>
to be fair its probably doing some useful stuff at night but i wish it would just swap my apps back in before i got to work
<atmosx>
Although I had this keyloggerd installed with Lion also and didn't had issues.
Averna1 has quit [Quit: Leaving.]
<atmosx>
JonnieCache: you never shutdown the mac?
obryan has joined #ruby
* atmosx
has a laptop
<JonnieCache>
atmosx: at weekends i do
haxrbyte_ has quit [Read error: Connection reset by peer]
<JonnieCache>
but tbh i use this laptop as a desktop. its just good to be able to pick it up and take it to client meetings occasionally
havenn has quit [Ping timeout: 265 seconds]
Goles has joined #ruby
<atmosx>
macbook pro?
gyre007 has quit [Read error: Connection reset by peer]
<atmosx>
I have a macbook air that comes with me all the time. My iPad (1st version) never comes along, only the mba.
atal421 has quit [Quit: atal421]
<atmosx>
Got to get some sleep.
<atmosx>
Cya ppl
atmosx has quit [Quit: WeeChat 0.4.0-dev]
gyre007 has joined #ruby
philcrissman has quit [Remote host closed the connection]
freeayu_ has quit [Remote host closed the connection]
rjmt___ has joined #ruby
* Hanmac_
has an selfbuilded mini pc ( it is smaller than midi) ... it has QuadCore Cpu and space for 7!-HDDs inside the chasis
Banistergalaxy has quit [Ping timeout: 259 seconds]
[1]SoonerBourne has joined #ruby
tjbiddle has joined #ruby
havenn has joined #ruby
schaary has quit [Quit: Leaving.]
tps_ has joined #ruby
jeffreybaird has joined #ruby
lurch_ has joined #ruby
jonathanwallace has joined #ruby
SoonerBourne has quit [Ping timeout: 240 seconds]
krawchyk has joined #ruby
pcarrier has quit []
[1]SoonerBourne is now known as SoonerBourne
fbernier has quit [Ping timeout: 240 seconds]
fbernier has joined #ruby
Hanmac_ has quit [Quit: Page closed]
Gooder` has quit [Remote host closed the connection]
<digitalcakestudi>
is there a way to see if an item is found in a array for use in a condition? example if i == [1, 2, 3].find(i)
BiHi has quit [Quit: bye]
timonv has quit [Remote host closed the connection]
crodas has quit [Excess Flood]
crodas has joined #ruby
nomenkun_ has joined #ruby
nomenkun has quit [Read error: Operation timed out]
mmitchell has quit [Remote host closed the connection]
philcrissman has joined #ruby
mmitchell has joined #ruby
<banisterfiend>
digitalcakestudi: if [1,2,3].include?(i)
<digitalcakestudi>
thank you
vlad_starkov has joined #ruby
dr_bob has quit [Quit: Leaving.]
timonv has joined #ruby
<lurch_>
where does the "gem environment" command find the location of the ruby executable and the ruby version? I tried overriding RUBY_HOME, RUBYLIB, GEM_HOME, GEM_PATH, prepended install directory to $PATH, but it still uses the one in /usr/bin instead of the one in /opt/upnxt: http://pastebin.com/AYCXie23
ttt has joined #ruby
tps_ has quit [Quit: tps_]
<lurch_>
If i run ruby -v or which ruby, I get the correct one (1.9.3p327) in /opt/upnxt. Also, can't use rvm
ToTo has joined #ruby
ltsstar has quit [Quit: ltsstar]
phantasm66 has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
adamnbowen has joined #ruby
ttt has quit [Ping timeout: 245 seconds]
SoonerBourne has quit [Read error: Connection reset by peer]
<lurch_>
also, for some reason, strace shows "gem environment" is looking for "libruby.so.1.8", not "1.9"
SoonerBourne has joined #ruby
stopbit has joined #ruby
dr_bob has joined #ruby
bradhe has joined #ruby
nemesit has quit [Quit: Leaving...]
jim80net has joined #ruby
swarley-freenode has quit [Ping timeout: 246 seconds]
davorb_laptop has quit [Quit: Computer has gone to sleep.]
tjbiddle_ has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
<lejonet>
I'm trying to find what the % operator is called when you call it on a string, searching for string substition is only yielding results with .sub and .gsub (I'm trying to find information how I'd do if I have more than 1 %s in a string I want to replace with % (bla, bleh))
gyre007 has joined #ruby
bwwrd has quit [Quit: Computer has gone to sleep.]
<hoelzro>
legiao: format operator?
Jasko has quit [Read error: Connection reset by peer]
<lejonet>
ah yeah, that might be the right name for it, as it's like the printf type of replacement
cdt has quit [Read error: No buffer space available]
cdt has joined #ruby
<lurch_>
or string interpolation ?
Banistergalaxy has joined #ruby
<lejonet>
well string interpolation is the #{} thingies
<lejonet>
ah, it wanted me to use [] to give % an array and not (), makes perfect sense as () only delimits a statement and make sure it's run before the insertion
tommyvyo has joined #ruby
ananthakumaran has joined #ruby
lolmaus has joined #ruby
Phoop has quit [Quit: Phoop]
vlad_starkov has quit [Ping timeout: 257 seconds]
jharris1 has quit [Quit: WeeChat 0.3.8]
vlad_starkov has joined #ruby
s1n4 has joined #ruby
jtharris has joined #ruby
IvelfanFr has joined #ruby
<IvelfanFr>
Hello everybody
Jasko has joined #ruby
alejandro_ has quit [Remote host closed the connection]
larissa has quit [Quit: Leaving]
<IvelfanFr>
I wanna learn Ruby, do you have some links which teach easily and slowly Ruby ?
jrajav has quit [Quit: I tend to be neutral about apples]
cousine has quit [Remote host closed the connection]
lurch_ has quit [Quit: lurch_]
Husel has joined #ruby
mneorr has joined #ruby
xAndy is now known as xAndy
bradhe has quit [Ping timeout: 255 seconds]
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
davidcelis has joined #ruby
chimkan has joined #ruby
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
rakm has joined #ruby
mahmoudimus has joined #ruby
tenmilestereo has joined #ruby
rakm has quit [Max SendQ exceeded]
tenmilestereo has quit [Read error: Connection reset by peer]
daniel_hinojosa has joined #ruby
phipes has left #ruby [#ruby]
Coolhand|laptop has quit [Remote host closed the connection]
BoomCow has joined #ruby
phipes has joined #ruby
jgarvey has joined #ruby
BoomCow has left #ruby [#ruby]
Adget has joined #ruby
_nitti has quit [Remote host closed the connection]
jackdanger has quit [Quit: Leaving.]
sarmiena_ has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
lolmaus has quit []
nat2610 has joined #ruby
sarmiena_ has quit [Client Quit]
blazes816 has joined #ruby
_alejandro has joined #ruby
Ziioynx has joined #ruby
thams has joined #ruby
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
rakm has joined #ruby
Fretta has joined #ruby
rakm has quit [Max SendQ exceeded]
lampe2 has quit [Quit: Leaving.]
nomenkun has quit [Remote host closed the connection]
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
blacktulip has joined #ruby
lampe2 has joined #ruby
berserkr has quit [Quit: Leaving.]
rakm has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
jackdanger has joined #ruby
ananthakumaran has joined #ruby
_nitti has joined #ruby
iamjarvo has quit [Quit: Leaving.]
bradhe has joined #ruby
ttt has joined #ruby
eldariof has joined #ruby
Adget has quit [Quit: Adget]
bradhe has quit [Remote host closed the connection]
cdt has quit [Ping timeout: 276 seconds]
matrixise has quit [Ping timeout: 244 seconds]
havenn has quit [Remote host closed the connection]
tvw has joined #ruby
williamcotton has quit [Quit: williamcotton]
williamcotton has joined #ruby
gridaphobe has joined #ruby
bradhe has joined #ruby
gridapho` has joined #ruby
voodoofish430 has joined #ruby
tsp has joined #ruby
tsp has quit [Changing host]
tsp has joined #ruby
mahmoudi_ has joined #ruby
lampe2 has left #ruby ["PART #RubyOnRails :PRIVMSG #elementary :teemperor: trying my best :P"]
ttt has quit [Ping timeout: 245 seconds]
mahmoudimus has quit [Ping timeout: 240 seconds]
dukedave has joined #ruby
dukedave has quit [Client Quit]
havenn has joined #ruby
gridapho` has quit [Client Quit]
cezar has quit [Ping timeout: 255 seconds]
dukedave has joined #ruby
sarmiena_ has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
lorn has quit [Read error: Operation timed out]
Husel has left #ruby [#ruby]
timmow has quit [Quit: is having a nap]
legiao has quit [Ping timeout: 240 seconds]
ExxKA has quit [Quit: This computer has gone to sleep]
slainer6_ has quit [Ping timeout: 259 seconds]
legiao has joined #ruby
yaymukund has quit [Ping timeout: 248 seconds]
cousine has joined #ruby
rdark has quit [Quit: leaving]
Nisstyre has quit [Ping timeout: 244 seconds]
lorn has joined #ruby
chussenot has quit [Quit: chussenot]
gridaphobe has quit [Remote host closed the connection]
chimkan___ has joined #ruby
gridaphobe has joined #ruby
epwhorl has joined #ruby
reppard has joined #ruby
reppard_ has joined #ruby
jackdanger has quit [Quit: Leaving.]
mrsolo has joined #ruby
chimkan has quit [Ping timeout: 265 seconds]
chimkan___ is now known as chimkan
elaptics is now known as elaptics`away
altious has quit [Ping timeout: 255 seconds]
io_syl has joined #ruby
rjmt___ has quit [Ping timeout: 252 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
JohnBat26 has joined #ruby
nerd has joined #ruby
jrist is now known as jrist-afk
reppard_ has quit [Ping timeout: 255 seconds]
banjara has joined #ruby
reppard has quit [Ping timeout: 256 seconds]
the_jeebster has joined #ruby
dmiller has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
drinkspiller has joined #ruby
L1 has joined #ruby
L1 has quit [Changing host]
L1 has joined #ruby
<drinkspiller>
hello friends. I came across some unfamiliar syntax in some inherited code. What is the function of the TWO double-arrows in this code: https://gist.github.com/4260774
<Marius>
hi, could someone point me good init.d script for sinatrarb app?
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
alvaro_o has joined #ruby
<Virunga>
Hi guys, i have a strange error here and i can't figure out what's the cause, could you help me, please? http://pastie.org/5512296 The row 27 is the 3rd in the paste
simplogical has joined #ruby
Solnse has joined #ruby
haxrbyte has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<eka>
Virunga: what is d? what's the content?
squidBits has quit [Quit: squidBits]
epwhorl has quit [Ping timeout: 260 seconds]
<Virunga>
I forgot it, it's a string d = "#{REPORT_DIR}/#{params['node']['name']}"
<Virunga>
eka: ^
simplogical has quit [Client Quit]
<eka>
Virunga: did you try with params[:node][:name] L
<GeekOnCoffee>
_porque: you haven't told us whats wrong
<_porque>
GeekOnCoffee, in the link I'm making a net/http request with the information I need, based on my cURL....
<_porque>
it is running without errors but doesn't generate the expected results
jrajav has joined #ruby
ejholmes has joined #ruby
davidcelis has joined #ruby
<TTilus>
...which would be?
<_porque>
create a new Riak bucket
<_porque>
using cURL from terminal it works...
<TTilus>
what does riak log show?
<_porque>
nothing
Guest___ has joined #ruby
<Guest___>
what's the equivalent of Rails.root for ruby?
c0rn has joined #ruby
Guest___ is now known as asteve
<TTilus>
asteve: there is no
<GeekOnCoffee>
asteve: there's __FILE__
<TTilus>
asteve: unless you happen to mean current working dir, which is not the same thing, but might still be what you want
<GeekOnCoffee>
but it doesn't really work the way Rails.rootdoes
<asteve>
right
<TTilus>
asteve: why dont you tell what you are trying to do and well be way better informed and maybe able to help
<TTilus>
asteve: trying to locate resources?
segv- has quit [Ping timeout: 264 seconds]
buibex has quit [Remote host closed the connection]
arietis has joined #ruby
<arkiver>
I am trying to create a JSON object. I am having some trouble interpolating an object within the json. I tried this: http://pastie.org/5512293 But its not working. Any solution for this ?
<canton7>
you can only interpolate within double quotes, not single quotes
_porque has quit [Quit: Leaving]
<canton7>
so a = 'bar'; s1 = 'foo #{a}'; s2 = "foo #{a}". only s2 == 'foo bar'
<arkiver>
canton7, you mean the outer most single quotes?
Virunga has quit [Remote host closed the connection]
<canton7>
yeah
dmiller has quit [Remote host closed the connection]
yaymukund has joined #ruby
<canton7>
so you either want "{\"customer\"... " or %Q[{"customer" .... ]
apok has joined #ruby
<canton7>
(%Q is equivalent to double quotes, and %q equivalent to single quotes)
<TTilus>
arkiver: im a bit puzzled, what Rails.root has to do with that?
<the_jeebster>
anyone know of a realtime whois database with dev friendly API?
<canton7>
the_jeebster, just google 'ruby whois' - there are plenty of whois parsers out there
matrixise has joined #ruby
<the_jeebster>
canton7: yeah just found a few. thanks good sir!
cakehero has joined #ruby
love_color_text has quit [Remote host closed the connection]
Nisstyre has joined #ruby
<arkiver>
canton7, So i tried obj = JSON('{"customer": {"phone_mobile" : %Q[#{obj.phone_mobile}]}}') and obj = JSON("{"customer": {"phone_mobile" : %Q[#{obj.phone_mobile}]}}")
love_color_text has joined #ruby
<arkiver>
throws a parse/syntax error :-/
generalissimo is now known as generalunchimo
emmanuelux has joined #ruby
dogweather has joined #ruby
<arkiver>
TTilus, I haven't mentioned anything about a Rails.root !
<TTilus>
arkiver: sorry, mixed you with asteve
<arkiver>
TTilus, No probs :)
<TTilus>
arkiver: take a ruby tutorial and look at string literals closely
ttt has joined #ruby
<TTilus>
arkiver: you still have non-interpolating literal
phipes has joined #ruby
_nitti has quit [Ping timeout: 250 seconds]
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo1 has joined #ruby
<TTilus>
arkiver: your outemost quotes need to be of the kind, for which str interpolation is done
<TTilus>
arkiver: single quotes arent
<asteve>
TTilus: I need to open a file that is generally 3 levels above the ruby file that's executing; with Rails.root I can move the file anywhere and it works
danshultz has quit [Read error: Connection reset by peer]
altious has joined #ruby
<arkiver>
canton7, Ohhh sorry saw your answer again.
<TTilus>
asteve: magic consant __FILE__ is your friend
<davidcelis>
arkiver: you also started the JSON string with a single quote and ended it with a double quote.
<davidcelis>
arkiver: your quotes are mismatched
<canton7>
arkiver, or JSON("{\"customer\": { <etc > }}")
pcarrier has quit []
<davidcelis>
oh nevermind, those are two different calls
<TTilus>
asteve: look up that and File.join and .dirname
ahemard has joined #ruby
<arkiver>
I'll do it the right way and try it out
<ahemard>
sup noobs
ahemard has left #ruby [#ruby]
<TTilus>
not much
<TTilus>
(haha, u see the pun!)
arturaz has quit [Ping timeout: 252 seconds]
ttt has quit [Ping timeout: 276 seconds]
sarmiena_ has quit [Quit: sarmiena_]
rakl has joined #ruby
<asteve>
TTilus: ya, I'm using File.join
Russell^^ has joined #ruby
habstinat has quit [Ping timeout: 250 seconds]
<asteve>
but __FILE__ is the location of the current file right?
Nisstyre has quit [Read error: Operation timed out]
<TTilus>
asteve: exactly
robotmay has quit [Remote host closed the connection]
alee has quit [Remote host closed the connection]
<asteve>
right, if I move the file down one directory __FILE__ doesn't help
* arkiver
it works :D
<asteve>
I'm trying to avoid hardcoded paths
eka has joined #ruby
lurch_ has joined #ruby
<TTilus>
File.dirname(__FILE__) is really common idiom
<davidcelis>
$:.unshift File.dirname(__FILE__)
habstinat has joined #ruby
<asteve>
what does $:.unshift do?
eka has quit [Read error: No buffer space available]
<TTilus>
asteve: so how would you cope with changing relative path when using Rails.root?
<davidcelis>
Puts the current file's directory into the LOAD_PATH
eka has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
beiter has quit [Quit: beiter]
<TTilus>
davidcelis: problem was that the file location is not fixed wrt the code file
<asteve>
TTilus: Rails.root is always a constant and the file I'm trying to load is always in Rails.root/config/file
<TTilus>
asteve: ah, just place the path resolution in a code file thet is in a constant relative path from the conf dir
DrShoggoth has quit [Ping timeout: 255 seconds]
nga4 has joined #ruby
<arkiver>
Also I suppose there is no Class for JSON? It is mentioned that to_json "Returns a JSON string representing the model". so obj.to_json.class Return Hash in my case!
<TTilus>
asteve: or use Dir.pwd, whichever scratches your itch
Zai00_ has joined #ruby
mrsolo has joined #ruby
eka has quit [Remote host closed the connection]
squidBits has joined #ruby
Zai00 has quit [Ping timeout: 264 seconds]
Zai00_ is now known as Zai00
DrShoggoth has joined #ruby
<TTilus>
asteve: you could have module MyApp def self.a_path; ... end; end in lib/my_app.rb, and then use MyApp.a_file
<canton7>
arkiver, not that I know of. Also ob.to_json.class should be String :P
<canton7>
JSON('some json').class should be HAsh
<csmrfx>
hash literal
<csmrfx>
string presentation
<canton7>
or array
tvw has quit [Remote host closed the connection]
<canton7>
(literal)
ckrailo has joined #ruby
<TTilus>
...or date or str or whatnot rb equivalent the json serialization contained
<arkiver>
yep. actually my obj was a hash from the beginning. So a "string".to_json.class returned a String.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<TTilus>
ow im on track again
<csmrfx>
I'd think in ruby that'd be a Struct
eykosioux has quit [Ping timeout: 240 seconds]
legiao has quit [Quit: Leaving]
mahmoudimus has joined #ruby
alee has joined #ruby
iamjarvo has joined #ruby
Quintus_q has joined #ruby
iamjarvo1 has quit [Read error: Connection reset by peer]
altious has quit [Ping timeout: 265 seconds]
haxrbyte has quit [Ping timeout: 264 seconds]
<TTilus>
other than the access syntax, hash is closer imo
<TTilus>
or maybe OpenStruct
altious has joined #ruby
<the_jeebster>
are there any services using Ruby for video streaming?
<the_jeebster>
wondering if it's feasible/efficient
<banisterfiend>
the_jeebster: hulu is ruby iirc
<banisterfiend>
the_jeebster: also, spreecast
<csmrfx>
probably
<csmrfx>
of course, ruby might just be a component
haxrbyte has joined #ruby
altious2 has joined #ruby
<the_jeebster>
right, just wondering what technlogies to use for video streaming
<the_jeebster>
not quite sure how that functionality works and how I'd approach it from an engineering perspective
Virunga has joined #ruby
<ner0x>
the bang line on most methods is *very* convenient.
<havenn>
I'm trying to make a Hash#to_struct that converts nested Hashes to Structs as well. Have it working on nest level deep but can't think how to go recursive?: https://gist.github.com/4260488
<havenn>
s/on/one
DannyTW has joined #ruby
altious has quit [Ping timeout: 246 seconds]
<apeiros_>
havenn: and you create a new struct for every hash?
altious has joined #ruby
jslowe has joined #ruby
altious2 has quit [Ping timeout: 260 seconds]
<havenn>
apeiros_: Yeah, that is what I'm trying to do - if it's a Hash change it to a Struct.
eldariof has quit []
<apeiros_>
sounds wasteful… iirc classes are still not gc'ed, I might be wrong on that, though
<apeiros_>
it shouldn't be hard to do… Struct.new(*keys).new(*values)
arturaz has joined #ruby
<apeiros_>
and values.map { …recurse here… } for nested conversion
vivien has joined #ruby
clj_newb has joined #ruby
<TTilus>
havenn: wouldnt OpenStruct work just as well and not leak classes?
<apeiros_>
iirc openstruct leaks for some other reason (also rather old knowledge, might not be true anymore)
<TTilus>
ah
<havenn>
TTilus: I'm just playing around, not meaning it to be used or useful. >.>
<csmrfx>
I have somewhere code that makes a openstruck out of hashes
<csmrfx>
is this needed?
altious has quit [Ping timeout: 264 seconds]
<csmrfx>
*uct
geekbri has joined #ruby
<the_jeebster>
can someone explain the splat operator? so it's useful for multiple unnamed arguments in that it bundles them up in an array?
mercwithamouth has quit [Ping timeout: 260 seconds]
<apeiros_>
csmrfx: you mean… like… OpenStruct.new(somehash)?
<TTilus>
ok then :) howd it be to create a dot accessor module for hash and just recursively include it into eigenclasses in #to_struct :)
vlad_starkov has quit [Remote host closed the connection]
omg765 has quit [Quit: Computer has gone to sleep.]
<TTilus>
the_jeebster: it works both ways
<_br_>
havenn: Its not so nice as its doing namespace pollution, but this thing is one possible solution, there should be a nicer one easily possible http://pastie.org/5512555
mercwithamouth has joined #ruby
<TTilus>
the_jeebster: in args list it collects the argv tail into array, like def foo(a, b, *rest) and when calling it expands an array to paramlist
omg765 has joined #ruby
haxrbyte has quit [Ping timeout: 252 seconds]
<TTilus>
the_jeebster: play around with it in pry and youll see the light :)
<_br_>
havenn: here is a recursive one, more clean as it doesn't to pollution
<Ziioynx>
i tried it but got into sublime text 2 rather quickly
<the_jeebster>
I'm in the process of switching b/w textmate and sublime text 2
iamjarvo has quit [Quit: Leaving.]
darthdeus has joined #ruby
<TTilus>
last time i checked rubymine had some seriously cool static analysis and refactoring features, but im just so knee-deep emacs guy that an ide approach doesnt work for me
<lupine>
hmm. So i've got a Ruby C extension that wraps libvncclient, and has a char* pointer to a 3MB (or so) framebuffer. I've also got a QtRuby Qt::Image class that can, in theory, take a uchar* pointer to wrap an existing buffer
<lupine>
sharing the pointer between the two extensions, in the same process, should be doable - just messy. I have visions of creating an FFI::NativePointer from the vnc C extension, exposing it and then somehow passing it down to the QtRuby constructor
mneorr has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 252 seconds]
RudyValencia has quit [Read error: Connection reset by peer]
pewter_tao has joined #ruby
altious2 has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
answer_42 has quit [Quit: WeeChat 0.3.9.2]
altious2 has joined #ruby
theRoUS has quit [Ping timeout: 256 seconds]
jonahR has joined #ruby
reppard_ has quit [Ping timeout: 248 seconds]
reppard has quit [Ping timeout: 248 seconds]
<csmrfx>
yeah its quite possible
<asteve>
this is the worst error known to man: undefined method `[]' for nil:NilClass (NoMethodError)
<csmrfx>
but if I want to type around, I write ocaml
<csmrfx>
asteve: so, you got nil, not an array or hash (or string)
<asteve>
right, but I have no idea as to why
mrbrdo has joined #ruby
<csmrfx>
read the line of code
<asteve>
the line of code is this: instances = config['hosts'] if config['hosts'] && !config['hosts'].empty? which works when initializing the system; the error happens when tests begin to run
dmiller has quit [Remote host closed the connection]
Elhu has joined #ruby
<csmrfx>
imo the problem is glaringly blindingly obvious
robotmay has joined #ruby
<lupine>
config is probably nil
<pewter_tao>
when I hit a tgz file, I get "invalid byte sequence in US-ASCII" due to trying to open it in my recursive function.
<asteve>
lupine: it is not
<lupine>
you're not testing thqt it isn't
<canton7>
asteve, p it. I bet it is :)
<pewter_tao>
I'm recursing through a lot of files, and this is the only one which gives me problems
<csmrfx>
lupine: config probably dont got [] method
blaxter has quit [Quit: foo]
<lupine>
we know whatever is raising is NilClass
<lupine>
if what is raising is config, then config is nilk
<asteve>
hmm
sarmiena_ has joined #ruby
<csmrfx>
lupine is probably right
<asteve>
that damn environment is probably the problem
mneorr has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
mneorr has joined #ruby
<lupine>
solutions to my char* problem in return are welcome ^^
<csmrfx>
open the damn, probably
<csmrfx>
lupine: whats this, C?
buibex has joined #ruby
<csmrfx>
*##C
<pewter_tao>
can I make it only open the file if it's ascii?
<lupine>
I@m writing a ruby C extension to do vnc
bradhe has quit [Remote host closed the connection]
<lupine>
it's a ruby question, not a C one ^^
<csmrfx>
lupine: so you dont have a example to copycat from?
<asteve>
canton7: you were right, and I believed you but couldn't rationalize why until I realized the system was running with two environments, dev to initialize and then test to run the tests
<asteve>
thanks for the help
<lupine>
it's not a problem I've seen people trying to solve before
<lupine>
it's a matter of trying to avoid the conversion of the contents of the char* into a ruby string to merely become a char* for the other extension
<lupine>
csmrfx, not evenb FFI::NativePointer?
JarJar has joined #ruby
ekristen has joined #ruby
<foucist>
variables are pointers aren't they? :P
<csmrfx>
reference
<csmrfx>
pointer
<csmrfx>
cats, dogs
burlesona has joined #ruby
<lupine>
obviously, I could pass the pointer into ruby as an int, and then convert it back into a pointer when it's passed down again, but that strikes me as Even More Evil
burlesona has left #ruby [#ruby]
squidBits has quit [Quit: squidBits]
<csmrfx>
Something about your questions didn't seem quite right
<csmrfx>
anyway, ime there is no need to be a code-medium
<lupine>
?
rajkosto has joined #ruby
[OES] has joined #ruby
<rajkosto>
FUCK YOU PRETENTIOUS FAGGOTS
<csmrfx>
just find some code that does what you wanted
rajkosto has left #ruby ["Leaving"]
<csmrfx>
robotmay: WELL THANKS, RAGGOT
y_matsu_ has quit [Ping timeout: 252 seconds]
grzywacz has quit [Ping timeout: 250 seconds]
<Alaude>
Anyone knows is there a new syntax for lambda?
<[OES]>
Hi Folks, Does anyone use rbenv for setting their local ruby environment?
<robotmay>
csmrfx: What did I do? :O
<csmrfx>
Alaude: define new
buibex has quit [Remote host closed the connection]
ekristen_ has joined #ruby
<csmrfx>
robotmay: your mistake was to bite the bullet from tab-autocomplete as the target dived out of the chan
ekristen_ has quit [Client Quit]
pavilionXP__ has quit [Ping timeout: 265 seconds]
<robotmay>
csmrfx: Hehe. People normally think I'm a bot and try commands on me, so it makes a change at least
alex__c2022_ has joined #ruby
bradhe has joined #ruby
<csmrfx>
robotmay: was directed at rajkosto
nomenkun has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
ekristen has quit [Ping timeout: 248 seconds]
alex__c2022 has quit [Ping timeout: 240 seconds]
alex__c2022_ is now known as alex__c2022
<foucist>
pewter_tao: you can check to make sure it's a text file by using the file command `file <file>`.match(/text/)
<JohnTeddy>
https://gist.github.com/4261717 ... why doesn't my ruby code pass rspec when I do rake? It is telling me the wrong amount of arguments.. I'm not sure why though.
jgarvey has quit [Quit: Leaving]
ninp0 has quit [Ping timeout: 248 seconds]
<csmrfx>
I was trying to cram all that in a oneliner but couldn't make it work without an if
<canton7>
JohnTeddy, you're passing a block to reverser, not an argument
dogweather has quit [Quit: Page closed]
<canton7>
try reverser("hello").should == 'olleh'
<pewter_tao>
I get an EOF error with taht csmrfx
<canton7>
I bet you forget to take out an end
Quintus_q has quit [Remote host closed the connection]
<pewter_tao>
maybe because I changed dir * to dir **/*
bradhe has quit [Remote host closed the connection]
<canton7>
oops, getting my nicks mixed up
<csmrfx>
pewter_tao: yep, it doesn't include a test to see if the first readline actually isn't possible due to no line endings
<csmrfx>
pewter_tao: thats the next step
<csmrfx>
you might have a 2 meg photo and readline attempts a go at it and gets mad when no linefeed
Quintus_q has joined #ruby
<csmrfx>
"Mah EOF!!"
<csmrfx>
(I think)
<pewter_tao>
shouldn
<csmrfx>
guess one would need to test for file size or line feeds
<pewter_tao>
't there always be line endings if we check for ascii first
arquebus has joined #ruby
jim80net has quit [Quit: jim80net]
cousine has quit [Remote host closed the connection]
<JohnTeddy>
canton7: I'm not supposed to change the rspec file. I'm only supposed to change the code I think.
<canton7>
JohnBat26, then you need to learn what a block is and how to use one
<JohnTeddy>
I'm going to read this page about ruby blocks.
jim80net has joined #ruby
<csmrfx>
pewter_tao: perhaps best would be ensure minimum length for the file, then taking up to longest possible rubypath's worth of chars or newline
jonahR has quit [Quit: jonahR]
nomenkun has quit [Ping timeout: 264 seconds]
s1n4 has quit [Quit: Lost terminal]
h4mz1d has quit [Ping timeout: 240 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
h4mz1d has joined #ruby
cousine has joined #ruby
cousine has quit [Remote host closed the connection]
Sou|cutter has joined #ruby
<pewter_tao>
This didn't happen with my last script, though I'm not sure why
cascalheira has quit [Quit: Leaving...]
s0ber has quit [Read error: Connection reset by peer]
<csmrfx>
you didn't happen to have difficult files
<csmrfx>
there are probably couple of other funny cases too
bradhe has joined #ruby
luckyruby has joined #ruby
<pewter_tao>
well the other one would fail on certain non-ascii files (only tgz so far)
jonahR has joined #ruby
<csmrfx>
binary
<csmrfx>
hence the test excluding binary
s0ber has joined #ruby
<brendan`>
hey all, im trying to uninstall passenger on a ubuntu 12.04 server, but when i do a gem uninstall i get a not found. when i do a gem -v passenger i get a version reply, and when i do gem list -d its not listed either. any idea where it could be hiding & how i could remove it?
<brendan`>
doesn't appear to be under /root/.gem or /usr/local/lib/ruby/gems/1.9.1 for the installation dir
maletor has joined #ruby
<pewter_tao>
Dir['**/*'].select {|fname| !File.directory? fname}.select { |f| /^#!\/.*\/ruby/.match(open(f).readlines[0]) || File.extname(f) == '.rb'}.select{ |f| puts `ruby -c #{f}`} >>> csmrfx, this doesn't give EOF errors, like yours, but I'm not sure why
h4mz1d has quit [Ping timeout: 256 seconds]
SiegeX has quit [Ping timeout: 246 seconds]
Rym has quit [Quit: Rym]
Vern_Burton has joined #ruby
brianpWins has joined #ruby
SiegeX has joined #ruby
<havenn>
brendan`: What do you get for?: echo $GEM_HOME
pu22l3r has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 265 seconds]
TitaniumStudioUs has quit [Quit: This computer has gone to sleep]
robert_ has joined #ruby
havenn has quit [Remote host closed the connection]
krawchyk has quit [Remote host closed the connection]
carlyle has quit [Ping timeout: 245 seconds]
tjbiddle_ has joined #ruby
havenn has joined #ruby
TitaniumStudioUs has joined #ruby
epwhorl has joined #ruby
Kuifje has joined #ruby
tjbiddle has quit [Ping timeout: 240 seconds]
tjbiddle_ is now known as tjbiddle
_nitti_ has joined #ruby
bigmcq77 has joined #ruby
tombar has quit [Remote host closed the connection]
catphish has joined #ruby
SJrX is now known as SJr
jonathanwallace has joined #ruby
<catphish>
is there a better way to achieve this: loop {sleep SOME_LARGE_NUMBER}
<epwhorl>
scheduling?
<apeiros_>
where "this" is what?
<JohnTeddy>
This https://gist.github.com/4261717 returns "LocalJumpError: no block given (yield)" ... I don't really understand why.
<apeiros_>
sleep() maybe - but since you didn't really say what you want…
<catphish>
sorry, that wasn't very clear, i simply want a thread to do nothing indefinitely
<apeiros_>
sleep() indeed then.
<catphish>
ideal, thanks :)
_nitti has quit [Ping timeout: 248 seconds]
Goles has quit [Quit: Computer has gone to sleep.]
<catphish>
what were you expecting yield to do?
Axsuul has joined #ruby
<csmrfx>
you are missing a block argument
pewter_tao has quit [Remote host closed the connection]
Guest73164 has quit [Quit: Guest73164]
tjbiddle_ has joined #ruby
nat2610 has quit [Quit: Leaving.]
skaczor has quit [Remote host closed the connection]
tjbiddle has quit [Read error: Connection reset by peer]
tjbiddle__ has joined #ruby
cmceldowney has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
nat2610 has joined #ruby
gunny1 has joined #ruby
<cmceldowney>
1.8.7. vs. 1.9.3 ruby array printing question: I want to print an array in 1.8.7 the way that 1.9.3 does it... e.g. instead of just doing a no-space join of the array elements, I want to output it as a formatted string, just as you'd set the variable, like 1.9.3 does it. any advice on quickest way to handle this?
<lupine>
you could Array#inspect ?
walkslow has quit [Remote host closed the connection]
atal421 has quit [Quit: atal421]
<lupine>
I'm not familiar offhand with 1.9.3's output
reppard_ has joined #ruby
reppard has joined #ruby
<_nitti_>
i'm sure there's some method on Array in 1.8.8 that'll do that
<_nitti_>
1.8.7 rather
tjbiddle_ has quit [Ping timeout: 240 seconds]
_nitti_ is now known as _nitti
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
kirun has quit [Ping timeout: 250 seconds]
banisterfiend has joined #ruby
carlyle has joined #ruby
Weazy has quit [Read error: Operation timed out]
TomRone has quit [Ping timeout: 255 seconds]
carlyle has quit [Read error: Connection reset by peer]
Elfix_113 has joined #ruby
kirun has joined #ruby
kpshek has quit []
squidBits has joined #ruby
undecim has quit [Remote host closed the connection]
carlyle has joined #ruby
jxriddle has joined #ruby
[Neurotic] has joined #ruby
TitaniumStudioUs has quit [Quit: This computer has gone to sleep]
Elfix has quit [Ping timeout: 248 seconds]
pothibo has quit [Quit: pothibo]
<cmceldowney>
lupine: ["test","value"].to_s => "[\"test\", \"value\"]" in 1.9.3, vs. ["test","value"].to_s => "testvalue" in 1.8.7
TomRone has joined #ruby
arquebus has quit [Remote host closed the connection]
bairui_ has joined #ruby
<cmceldowney>
lupine: yes, inspect appears to do the trick! thanks muc!
<_nitti>
yeah looks to me like Array#inspect is what you want
<_nitti>
BLAST
<cmceldowney>
lupine: and words consistently between the two versions. perfect solution!
<_nitti>
I want you to know that I specifically installed 1.9.3 to figure this out for you.
slash_nick has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
bairui has quit [Ping timeout: 248 seconds]
[OES] has quit [Quit: [OES]]
geekbri_ has quit [Remote host closed the connection]
pewter_tao has joined #ruby
sarmiena_ has quit [Quit: sarmiena_]
workmad3 has joined #ruby
<heftig>
cmceldowney: do you want to eval that string to get the array back?
pewter_tao has quit [Remote host closed the connection]
<cmceldowney>
heftig: no, just looking to print it out in erubis template. Creating a client.rb for chef run and needed to print actual Ruby-readable variables, so inspect worked perfectly for my purposes.
cousine has joined #ruby
_nitti has quit [Remote host closed the connection]
_nitti has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
gunny1 has quit [Quit: gunny1]
epwhorl has quit [Read error: Connection timed out]
epwhorl has joined #ruby
tjbiddle has joined #ruby
tjasko__ has quit [Ping timeout: 255 seconds]
ttt has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
zeen has quit [Ping timeout: 264 seconds]
bigmac has quit [Read error: Operation timed out]
igabreu has joined #ruby
lurch__ has joined #ruby
mark_locklear has quit [Remote host closed the connection]
tjbiddle__ has quit [Ping timeout: 240 seconds]
tjbiddle_ has joined #ruby
gregor3005 has left #ruby [#ruby]
ttt has quit [Ping timeout: 276 seconds]
lurch_ has quit [Ping timeout: 250 seconds]
lurch__ is now known as lurch_
sailias has quit [Quit: Leaving.]
<lupine>
#inspect is not a serialisation format ^^
d2dchat has quit [Remote host closed the connection]
Elhu has joined #ruby
ltsstar has quit [Quit: ltsstar]
_JamieD_ has quit [Quit: _JamieD_]
Morkel has quit [Quit: Morkel]
pu22l3r has joined #ruby
darthdeus has quit [Quit: Leaving...]
tjbiddle__ has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
tjbiddle has quit [Ping timeout: 240 seconds]
<catphish>
if you use inspect for anything but debugging you're doing it wrong
tjbiddle__ is now known as tjbiddle
<catphish>
consider json for everyone's sanity
<lupine>
an array of strings wouldn't even look too different
grizlo42 has joined #ruby
<igabreu>
:smile:
<lupine>
but when you start throwing time values in, for instance, sanity remains
daniel_hinojosa has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 256 seconds]
Averna1 has joined #ruby
atal421 has joined #ruby
baphled has quit [Read error: Connection reset by peer]
igabreu has quit [Remote host closed the connection]
Averna1 has quit [Client Quit]
TitaniumStudioUs has joined #ruby
obryan has quit [Ping timeout: 240 seconds]
igabreu has joined #ruby
DannyTW has quit [Quit: Page closed]
cakehero has quit [Quit: Computer has gone to sleep.]
bigmcq77 has joined #ruby
neersighted has quit [Ping timeout: 244 seconds]
elico has quit [Quit: elico]
iamjarvo has quit [Quit: Leaving.]
haxrbyte_ has quit [Ping timeout: 240 seconds]
walkslow has joined #ruby
wikiziner has joined #ruby
samuel02 has quit [Remote host closed the connection]
danneu has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
zigomir has quit [Quit: zigomir]
atmosx has joined #ruby
monkegji_ has quit [Remote host closed the connection]
<the_jeebster>
sinatra. is. awesome.
darthdeus has joined #ruby
daniel_hinojosa has quit [Ping timeout: 240 seconds]
phipes has quit [Quit: phipes]
atal421 has quit [Quit: atal421]
mercwithamouth has joined #ruby
walkslow has quit [Remote host closed the connection]
<csmrfx>
the_jeebster: why?
bigmac has joined #ruby
daniel_hinojosa has joined #ruby
grizlo42 has left #ruby [#ruby]
workmad3 has joined #ruby
<the_jeebster>
csmrfx: just a barebones, no-frills web server
grzywacz has quit [Remote host closed the connection]
ffranz has quit [Ping timeout: 252 seconds]
<the_jeebster>
so quick and easy to spinup for demos
himsin has quit [Ping timeout: 244 seconds]
<catphish>
it's not actually a web server, it's a framework
_nitti has quit [Remote host closed the connection]
<catphish>
i believe it will run on any rack server
<catphish>
and provides a quick way to build a simple app
<lupine>
compared to what we used to use in place of sinatra, it's pretty damn featureful
<bean>
also really quick and easy REST
dawkirst_ has quit [Ping timeout: 264 seconds]
<lupine>
(basically, mongrel with added crack)
timeout has quit [Quit: "zzzzzzz..."]
asteve has quit [Quit: Computer has gone to sleep.]
dawkirst_ has joined #ruby
havenn has joined #ruby
elaptics`away is now known as elaptics
<csmrfx>
the_jeebster: I thought sinatra was a app server framework or similar
<csmrfx>
does sinatra work with ngingx
<csmrfx>
that might be worth a pop
<lupine>
it certainly can
<csmrfx>
reverse proxied app?
* lupine
reverse proxies, but there's no reason wny you can't hit up sinatra from passenger
<the_jeebster>
csmrfx: yeah it is, just uses webrick in the background
<the_jeebster>
but much lighter than rails
<lupine>
...
<csmrfx>
*cough* webrick
<the_jeebster>
hehe
Vern_Burton has left #ruby [#ruby]
<the_jeebster>
you can change that easily enough
<the_jeebster>
just defaults in dev environment to webrick
<lupine>
not.. exactly
<catphish>
you can run it under passenger, unicorn, whatever
<csmrfx>
I would probably have a ruby 'server' that manipulates filesystem which nginx serves
<csmrfx>
as the 'simple' system
<lupine>
ah, webdav?
<csmrfx>
heh
<havenn>
Sinatra is a Rack-based app, do put it behind a load balancer (nginx or apache usually) then a Rack web server (unicorn, puma, thin, rainbows!, or whatever) like any other Rack app.
<csmrfx>
not really webdav
<JDubs>
can anyone explain to me why this snippet is giving me an error: (100..999).map{ |range| (num*range).to_s == num*range.to_s.reverse}
<JDubs>
String can't be coerced into Fixnum (TypeError)
* lupine
has one sinatra app running as a servlet on jetty without a reverse proxyt in the way
<lupine>
that's kind of fun
<csmrfx>
JDubs: num*range
<csmrfx>
what are those?
<JDubs>
sorry forgot first line, (100..999).each do |num|
<the_jeebster>
you're probably multiplying different objects
<havenn>
I like unicorn with mri or puma with rbx. :)
haxrbyte has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<csmrfx>
lupine: does that mean jruby?
<lupine>
aye
<lupine>
you can run rack apps on most java http servers nowadays
GoGoGarrett has quit [Remote host closed the connection]
<the_jeebster>
JDubs: post your code on pastie plz
<lupine>
in theory, it'll run in thin+mri/yarv/rbx, but the tests don't all pass for various reasons
ismaelga has quit [Remote host closed the connection]
<JDubs>
bean: thanks!! I'm really having fun with Ruby!
ismaelga has joined #ruby
<bean>
Good, it's a fun language, don't automatically assume that it's the best for all problems though ;)
Fretta has joined #ruby
ttt has joined #ruby
<JDubs>
xD
<havenn>
bean: Best for *most* problems. :O
<bean>
haha
<JDubs>
havenn: heck yeah
GlenK has joined #ruby
blacktulip has quit [Remote host closed the connection]
<lupine>
well, soime
<lupine>
some*
chimkan has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
<csmrfx>
nice tool for solving problems
<csmrfx>
once solved, may need to rewrite elsewhere
<the_jeebster>
JDubs: cool. now add support for word strings :)
<JDubs>
the_jeebster: I'm on to my next eueler problem ;)
vd0 has quit [Ping timeout: 252 seconds]
rboyd has quit [Ping timeout: 252 seconds]
<GlenK>
hi. I tried as a normal user to do "gem install rails" but it told me I don't have permissions to write to /usr something or other. Do I need to install gems as root? or is there some way to do it to my regular home directory?
<bean>
Project Euler is easily my favorite way to get back into ruby
<GlenK>
bean: ruby koans is kinda cool
niklasb has quit [Quit: WeeChat 0.3.9.2]
<the_jeebster>
never heard of this project euler
<JDubs>
GlenK: just use sudo
<havenn>
<3 Ruby Koans
<bean>
GlenK: you can change your $GEM_HOME and gem_home (in ~/.gemrc)