<ua>
i have this idea on how to enrich ruby ecosystem in non-web related areas
pragmatism has joined #ruby
bklane has quit [Read error: Connection reset by peer]
kcombs has joined #ruby
<ua>
so there would be translation of python and C with python internals to ruby and C with ruby internals
<ua>
lol
<ua>
so after writing something like this, ruby magically has access to every library that python has
<ua>
and then we eat the world
Jetchisel has joined #ruby
mojjojo has joined #ruby
mklappstuhl has joined #ruby
Atrophius has joined #ruby
jfelchner has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
mikepack_ has joined #ruby
mikepack_ has quit [Remote host closed the connection]
<DouweM>
ua: it's not like there's a shortage of Ruby libraries
mary5030 has quit [Ping timeout: 252 seconds]
yuri_niyazov has joined #ruby
nateberkopec has quit [Quit: Leaving...]
bklane has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
mklappstuhl has joined #ruby
bklane has quit [Remote host closed the connection]
<yuri_niyazov>
in ruby 2.0 with native Linux threads, how can I define which threads receive signals? In a C program I would use pthread_sigmask. Is that exposed in any way via Ruby?
jkhwan has quit [Read error: Connection reset by peer]
jkhwan has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
Aryasam has joined #ruby
aryaching has quit []
jamesaanderson has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
<ua>
DouweM, yea ok buts most of it is web related, and python has so many different well-developed libraries for various scientific fields
<ua>
yuri_niyazov, sorry i have no idea but just dont leave, someone will most prolly answer you at some point :P
<DouweM>
ua: "most of it is web related", I'm not so sure. But otherwise, yeah, Python has a lot of scientific libs that would be nice to have. But I very much doubt building a Ruby/Python bridge would yield something you'd want to use. Have you seen: http://rubypython.rubyforge.org/
blaskovicz has quit [Quit: Leaving.]
danman has joined #ruby
asteros has joined #ruby
<ua>
yea i did used it for kinda heavy data processing
mercwithamouth has quit [Ping timeout: 272 seconds]
<bahar_>
see the minutes_to_degrees lines... none of them work (i tried them individually, they all produce error: "undefined method: minutes_to_degrees"
brum has joined #ruby
almarshall has quit [Quit: almarshall]
ravster has quit [Quit: Leaving.]
<bahar_>
puts "hour as degrees equals", hour.to_i * 30 clearly works, but the result isn't saved, and that's what i'm trying to do with minutes_to_degrees
mdel has quit [Ping timeout: 250 seconds]
<bnagy>
that's because you haven't written the minutes_to_degrees method
almarshall has joined #ruby
<bnagy>
add def minutes_to_degrees minute_str; # YOUR CODE HERE; end
<bnagy>
but with newlines etc instead of semicolons
<DanBoy>
ya
sambao21 has quit [Quit: Computer has gone to sleep.]
<DanBoy>
where did you define minutes_to_degrees
<DanBoy>
if its another file you need to require file.rb
maletor has quit [Quit: Computer has gone to sleep.]
<bahar_>
hm, i thought i could do variable { block to set variable value }
mojjojo has quit [Quit: mojjojo]
<DanBoy>
you could
marr has quit [Ping timeout: 252 seconds]
mjs2600 has joined #ruby
<bahar_>
what did i do wrong?
zeade has quit [Quit: Leaving.]
<bahar_>
thanks for the sugg, bnagy! what is minute_str?
<DanBoy>
if you want to save hour.to_i * 30 you need to assign it to a variable or
<DanBoy>
hour = hour.to_I * 30
<DanBoy>
*to_i
<DanBoy>
something like that
ewnd9 has quit [Ping timeout: 260 seconds]
randomnick_ has quit [Quit: Leaving]
kreisys has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<bnagy>
bahar_: in this case it's the name of the argument you pass to your method
nari has quit [Ping timeout: 240 seconds]
tsykoduk is now known as zz_tsykoduk
Megtastique has joined #ruby
<bahar_>
bnagy: thanks i'll have to look up what it goes
ephemerian has quit [Quit: Leaving.]
ping_pong is now known as ping-pong
mojjojo has joined #ruby
<bahar_>
DanBoy: hour = hour.to_i * 30 works but minutes.to_i / 2 returns an error, "undefined method '/'"
wildroman2 has joined #ruby
almarshall has quit [Quit: almarshall]
<DanBoy>
minutes_to_degrees(minutes.to_i / 2)
thomasvs has quit [Read error: Operation timed out]
SirFunk has quit [Read error: Operation timed out]
gf3 has quit [Read error: Operation timed out]
hogeo has quit [Remote host closed the connection]
falood has joined #ruby
<DanBoy>
i think i can see what your trying to do but try and just define minutes_to_degrees
gf3 has joined #ruby
<DanBoy>
then pass your blocks to it
bklane has quit [Remote host closed the connection]
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
spike|spiegel has joined #ruby
yeboot has quit [Ping timeout: 265 seconds]
yeboot has joined #ruby
brianpWins has quit [Quit: brianpWins]
tvw has quit []
bklane_ has joined #ruby
hogeo has joined #ruby
SirFunk has joined #ruby
<bahar_>
trying that...
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlast has quit [Remote host closed the connection]
<bahar_>
ok it's telling me now that i have an undefined local variable or method 'minutes'
<bahar_>
but it's supposed to be the value I entered, so isn't it defined?
<bnagy>
bahar_: if you're going to use parens ( which imho you shouldn't ) they should immediately follow the method name
saarinen has joined #ruby
soba has joined #ruby
<bnagy>
time_in_degrees( hour, minutes ) OR time_in_degrees hour, minutes
mjs2600 has quit [Remote host closed the connection]
<bnagy>
also having the puts inside that method is not the best style
nateberkopec has joined #ruby
<bnagy>
it's what we call coupling - the method can only output. Which is fine now, but later you might want the same conversion but for a different reason
<bahar_>
yeah, i would rather do the puts outside the method, also
<bahar_>
but i have to figure out how
hogeo has joined #ruby
<bnagy>
my advice is to make two methods, one for hours and one for minutes
<bahar_>
you said you wouldn't use parens? how would you do it w/o parens?
blandflakes has quit [Quit: Page closed]
<bnagy>
time_in_degrees hour, minutes
nateberkopec has quit [Client Quit]
<bnagy>
then use something like min_degrees = mins_to_degrees( minutes )
<bahar_>
interesting... it works but RubyMine hates it
<bnagy>
then puts min_degrees
<bnagy>
then whatever RubyMine is is retarded
mjs2600 has joined #ruby
<bahar_>
heh
clevermatt has quit [Remote host closed the connection]
<DanBoy>
lol
sensen has joined #ruby
kobain has quit [Ping timeout: 252 seconds]
jkline has quit [Quit: jkline]
<Scient>
someone should slap you for the silly foo( bar ) convention :P
<bahar_>
lol... it's in the materials i'm learning from
<bahar_>
:-/
pragmatism has joined #ruby
pragmatism has quit [Excess Flood]
pragmatism has joined #ruby
<bahar_>
what does it mean when I get "stack level too deep (SystemStackError)"
aryaching has joined #ruby
<Scient>
endless loop
<Scient>
usually by recursion
<bnagy>
you probably called a method from within itself
hogeo has quit [Remote host closed the connection]
Seich_ has quit [Ping timeout: 272 seconds]
<bnagy>
it has 0 to do with 'endless' or loops
saarinen has quit [Quit: saarinen]
<Scient>
recursion is a loop
<bahar_>
i made an infinity mirror?
<bnagy>
there are plenty of legit recursions that will blow up the stack
<Scient>
stop being a douche while trying to look smart
ewnd9 has joined #ruby
mercwithamouth has quit [Ping timeout: 250 seconds]
varfoo has joined #ruby
jfelchner has quit [Quit: jfelchner]
Hanmac1 has joined #ruby
Seich_ has joined #ruby
codeFiend has quit [Quit: codeFiend]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hanmac has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
jkhwan has quit [Remote host closed the connection]
pragmatism has quit [Quit: Leaving...]
<bnagy>
bahar_: l9 in your gist - you called the method from inside itself
jkhwan has joined #ruby
<bahar_>
ok so that's a no no, can't refer to the method or use it in any way while i'm actually in the method?
ehc has quit [Quit: ehc]
<bnagy>
yes, you can, and there's a whole programming technique based on that
<bnagy>
but for now, best not
vlad_starkov has joined #ruby
jkhwan has quit [Read error: Connection reset by peer]
<bahar_>
got it
lfox has joined #ruby
jkhwan has joined #ruby
<DanBoy>
don't worry about it
<DanBoy>
just get that book if you can
_maes_ has joined #ruby
hogeo has joined #ruby
<bahar_>
definitely will
aryaching has quit []
<bahar_>
it's a little old though, April 2009, still relevant?
<DanBoy>
ya
<DanBoy>
its fine
<bahar_>
ok
vlad_starkov has quit [Read error: Connection reset by peer]
mando has joined #ruby
<DanBoy>
as long as the ruby it uses is 1.9 at least
<DanBoy>
honestly for you it doesn't matter
<DanBoy>
it could be 1.8
Seich_ has quit [Quit: Computer has gone to sleep.]
<bahar_>
"the fourth printing of the Learn to Program, 2nd edition has been updated for Ruby 2.0"
<bahar_>
cool
baroquebobcat has quit [Quit: baroquebobcat]
<sevenseacat>
nice
browndawg has joined #ruby
ewnd9 has quit [Read error: Connection reset by peer]
CorySimmons has joined #ruby
mklappstuhl has joined #ruby
otherj has joined #ruby
otherj has quit [Client Quit]
kevind has quit [Quit: kevind]
Jdubs has quit [Read error: Connection reset by peer]
hogeo has quit [Remote host closed the connection]
Jdubs has joined #ruby
Mars__ has quit [Remote host closed the connection]
Mars has joined #ruby
TigerWolf has joined #ruby
Mars is now known as Guest54224
kobain has joined #ruby
CorySimmons has quit [Ping timeout: 252 seconds]
Jdubs has quit [Read error: Connection reset by peer]
kevinykchan has joined #ruby
Jdubs_ has joined #ruby
mklappstuhl has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
IceDragon has quit [Ping timeout: 272 seconds]
Opettaja has quit [Quit: WeeChat 0.4.2]
IceDragon has joined #ruby
fedesilva has quit [Remote host closed the connection]
Opettaja has joined #ruby
Guest54224 has quit [Ping timeout: 260 seconds]
phipes has joined #ruby
colonolGron has quit [Quit: Lost terminal]
dhruvasagar has quit [Ping timeout: 272 seconds]
hogeo has joined #ruby
phipes has quit [Client Quit]
spergy has quit [Ping timeout: 245 seconds]
bentonrr has joined #ruby
phipes has joined #ruby
phipes has quit [Changing host]
phipes has joined #ruby
phipes has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
phipes has joined #ruby
hogeo has quit [Remote host closed the connection]
ambushsabre has quit [Ping timeout: 264 seconds]
spergy has joined #ruby
phipes has quit [Remote host closed the connection]
tanema has joined #ruby
phipes has joined #ruby
ambushsabre has joined #ruby
hogeo has joined #ruby
petey has joined #ruby
Megtastique has quit []
phipes has quit [Client Quit]
phipes has joined #ruby
phipes has quit [Client Quit]
phipes has joined #ruby
radic has quit [Read error: Operation timed out]
spergy has quit [Ping timeout: 260 seconds]
nisstyre has quit [Remote host closed the connection]
mjs2600 has quit [Remote host closed the connection]
Shidash has quit [Quit: Leaving.]
Shidash1 has joined #ruby
phipes has quit [Client Quit]
phipes has joined #ruby
Arzaga has joined #ruby
cannonball has quit [Quit: Leaving]
nixie has joined #ruby
phipes has quit [Client Quit]
Arzaga has quit [Client Quit]
phipes has joined #ruby
freerobby has quit [Quit: Leaving.]
mary5030 has joined #ruby
mmitchell has joined #ruby
spergy has joined #ruby
Shidash1 has quit [Quit: Leaving.]
Shidash has joined #ruby
amoli has quit [Ping timeout: 246 seconds]
mklappstuhl has joined #ruby
kobain has quit []
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
radic has joined #ruby
petey_ has joined #ruby
petey has quit [Read error: Connection reset by peer]
mklappstuhl has quit [Ping timeout: 250 seconds]
hadees has joined #ruby
hadees has quit [Client Quit]
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
jamesaanderson has joined #ruby
hadees has joined #ruby
mmitchell has quit []
digital-ghost has quit [Remote host closed the connection]
jamesaanderson has quit [Client Quit]
reset has quit [Ping timeout: 240 seconds]
asteros has joined #ruby
raphaelivan has quit [Quit: Leaving.]
IceDragon has quit [Quit: Space~~~]
hiyosi has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby
spergy has left #ruby [#ruby]
nixie has quit [Read error: Connection reset by peer]
nixie has joined #ruby
julweber has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
julweber_ has quit [Ping timeout: 240 seconds]
jamesaanderson has joined #ruby
freerobby has joined #ruby
macmartine has joined #ruby
Hanmac has joined #ruby
Eomar is now known as Davey
Monie has joined #ruby
Monie has quit [Max SendQ exceeded]
Monie has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
almarshall has joined #ruby
Hanmac1 has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
mklappstuhl has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hogeo has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
|jemc| has joined #ruby
danshultz has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
<|jemc|>
anybody know a way to trace all of the mri c-api calls made in evaluation of a particular snippet?
danshultz has joined #ruby
Opettaja has quit [Ping timeout: 246 seconds]
jkline has joined #ruby
pu22l3r has joined #ruby
<|jemc|>
using Tracer doesn't actually show c method names in any detail - it just lets you know that a particular line invoked a c method of some kind
ner0x has quit [Quit: Leaving]
mklappstuhl has quit [Ping timeout: 260 seconds]
asteros has quit [Quit: asteros]
CorySimmons has joined #ruby
<rjhunter>
|jemc|: On Linux, `ltrace` might help
<mr`spock>
What's the most used programming language?
phipes has quit [Remote host closed the connection]
macmartine has quit [Remote host closed the connection]
<rjhunter>
|jemc|: what are you trying to do? sounds interesting
freerobby has quit [Quit: Leaving.]
_maes_ has joined #ruby
<|jemc|>
trying to do some evil dastardly magic :P
zeade has joined #ruby
<|jemc|>
I'm trying to figure out the process of what happens for a simple assignment expression
mando has quit [Remote host closed the connection]
freerobby has joined #ruby
freerobby has quit [Client Quit]
<|jemc|>
and evaluate the feasiblity of some dastardly c extension that hooks into the assignment operator
zeade has quit [Client Quit]
phipes has joined #ruby
<|jemc|>
to provide some form of notifications to a registry when a variable is altered
<|jemc|>
I'm trying to go beyond what can be done with ruby-level accessor hooks
freerobby has joined #ruby
<|jemc|>
mostly for the fun of the exploration
johnnyfuchs has joined #ruby
<rjhunter>
|jemc|: wow, that does sound dastardly (but very interesting). you might find Rubinius an easier interpreter to start with -- the implementations are structurally pretty similar but easier to follow since it's (almost) all ruby
braincrash has quit [Quit: bye bye]
<|jemc|>
yeah, in parallel I've been researching how it might be done in rubinius
<|jemc|>
rbx seems to provide a way to hook in your own arbitrary ast transforms post-parser
<|jemc|>
which is really cool
<rjhunter>
*super* cool
<|jemc|>
heh. heh
<|jemc|>
I do love a good pun
bentonrr has quit [Remote host closed the connection]
psyl0n has quit [Remote host closed the connection]
<rjhunter>
i wasn't aiming for a pun but i'll take it :-)
braincrash has joined #ruby
<|jemc|>
ltrace isn't showing enough... I may have to pull out gdb and see what can be done there
estebistec has joined #ruby
hamakn has joined #ruby
<|jemc|>
or maybe ltrace isn't picking it up because it happens in a sub thread...
jkhwan has quit [Remote host closed the connection]
<rjhunter>
|jemc|: you can tell ltrace to follow forks and threads, I believe (probably -f)
<rjhunter>
|jemc|: you can with strace, anyway
jkhwan has joined #ruby
<|jemc|>
didn't provide any more lines of output :/
estebistec has quit [Remote host closed the connection]
jkhwan has quit [Read error: Connection reset by peer]
jkhwan_ has joined #ruby
jkline_ has joined #ruby
bentonrr has joined #ruby
jkline has quit [Ping timeout: 250 seconds]
jkline_ is now known as jkline
alvaro_o_ has quit [Quit: Ex-Chat]
mklappstuhl has joined #ruby
<rjhunter>
but it may also be the case that the bytecode doesn't result in any library function call
<|jemc|>
yeah, I think that they're not _library_ calls
bkparso has joined #ruby
<|jemc|>
just internal c calls
<rjhunter>
you're probably right about it being time to break out the debugger
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<|jemc|>
yeah, I've been able to stop on a few breakpoints so far
<|jemc|>
just need to figure out what breakpoints to set...
heidi has quit [Quit: Leaving.]
<rjhunter>
i've said before that debuggers are like fire extinguishers -- you hope to never need them, but if you ever do need one it's a lifesaver
<|jemc|>
yeah, I've always enjoyed my time spent with gdb more than I expect to :)
b00stfr3ak has quit [Ping timeout: 252 seconds]
jamesaanderson has joined #ruby
mklappstuhl has quit [Ping timeout: 260 seconds]
<rjhunter>
I'm browsing through the MRI source and the bytecode instruction "setlocal" (defined in ruby/insns.def) seems to be the local variable assignment
gianlucadv has joined #ruby
<|jemc|>
ah yes, forgot it would be vm bytecode and not necessarily supported by any c function call
<|jemc|>
hm
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rjhunter>
ast transforms are looking more and more appealing :-)
jkhwan_ has quit [Remote host closed the connection]
jkhwan has joined #ruby
<h0rrorvacui>
|jemc| all this to hook variable assignment?
<h0rrorvacui>
lol
<h0rrorvacui>
Sounds like a true hacker
ckinni has joined #ruby
<|jemc|>
its all for the thrill of the chase
dseitz has joined #ruby
kh019267 has joined #ruby
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
phipes has quit [Remote host closed the connection]
uxp_ has quit [Quit: Lost terminal]
uxp has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
pu22l3r has quit [Remote host closed the connection]
bklane_ has quit [Quit: Leaving...]
almarshall has quit [Quit: almarshall]
jkline has quit [Quit: jkline]
kizzx2 has joined #ruby
hiyosi has joined #ruby
Hanmac1 has joined #ruby
kizzx2 has quit [Client Quit]
euclides has joined #ruby
kizzx2 has joined #ruby
iliketur_ has joined #ruby
ElasticElephant has joined #ruby
robbyoconnor has joined #ruby
<ElasticElephant>
Hey guys
Hanmac has quit [Ping timeout: 250 seconds]
hiyosi has quit [Ping timeout: 260 seconds]
vikhyat has quit [Remote host closed the connection]
<|jemc|>
rjhunter: seems like ivars might be easier (and more practical) than locals
<|jemc|>
I'm able to break on rb_ivar_set with gdb
<|jemc|>
wasn't sure if the internal machine used that part of the api itself, or if it was just for external use
<rjhunter>
|jemc|: yeah, ivars don't seem like an unreasonable limitation
<rjhunter>
ElasticElephant: hello
<ElasticElephant>
hows everyone doin
Methylated has quit [Quit: Leaving.]
<ElasticElephant>
?
<|jemc|>
swell, just swell
Methylated has joined #ruby
sensen has quit [Ping timeout: 245 seconds]
sensen_ has joined #ruby
<ElasticElephant>
awesome, so anyone doing anything cool lol
<h0rrorvacui>
define cool
<|jemc|>
but now that I've found my function I want to co-opt, I'm not sure how to actually do so: not as easy as in ruby to override a c method
linguini has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<|jemc|>
:P
<h0rrorvacui>
ElasticElephant because |jemc| is doing something that some might view as cool
<|jemc|>
and some as an onholy abomination
<|jemc|>
*unholy
<ElasticElephant>
that sounds kinda cool to me
gianlucadv has quit [Ping timeout: 260 seconds]
<h0rrorvacui>
he is peering into variable assignment by hooking the assignment operator or something like that
uxp has quit [Remote host closed the connection]
Kricir has joined #ruby
vlad_starkov has joined #ruby
<ElasticElephant>
wells that's pretty cool
<h0rrorvacui>
ElasticElephant what you up to?
<ElasticElephant>
doing some rspec crap
freerobby has quit [Quit: Leaving.]
hogeo has joined #ruby
tjad has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
euclides has quit [Quit: Leaving...]
hogeo has quit [Read error: Connection reset by peer]
Mars has joined #ruby
<h0rrorvacui>
yeah I'm having one of those dull days where I've probably been on the computer to long and can't think
hogeo has joined #ruby
Mars is now known as Guest27258
<h0rrorvacui>
So I'm just screwing around with rspec myself
Kricir has quit [Ping timeout: 252 seconds]
<h0rrorvacui>
and the really fun githug gem
<CaptainJet>
I wish I could git some hug
uxp has joined #ruby
<CaptainJet>
Make a few pull requests on some hugs
<|jemc|>
request denied
<CaptainJet>
Can I just fork you instead then?
<|jemc|>
only if we can spoon afterward
<h0rrorvacui>
I'm on level 40 and I'm getting tired of it now
<CaptainJet>
I'm not sure I can make that commit |jemc|
CorySimmons has joined #ruby
hogeo has quit [Ping timeout: 240 seconds]
<DanBoy>
lame coder humor :P
<mr`spock>
zomg i'm telling everyone on twitter how offensive and insensitive you folks are
<mr`spock>
jkjk put your dongle a little closer to the port
<|jemc|>
um... I take _issue_ with it
* |jemc|
is out of innuendos
<h0rrorvacui>
this feels like a reddit circle jerk
<DanBoy>
lol
brunto has quit [Ping timeout: 264 seconds]
bentonrr has quit [Remote host closed the connection]
<CaptainJet>
Out already? You need to branch out more then
<|jemc|>
now _that_'s offensive, h0rrorvacui
* DanBoy
hears crickets
* DanBoy
hears crickets++
<h0rrorvacui>
sorry...
<h0rrorvacui>
don't blame me
<mr`spock>
h0rrorvacui, I'm sorry for committing that offense. i loathe them discussion boards - it's why i come to IRC
brunto has joined #ruby
<h0rrorvacui>
get it "blame"
<h0rrorvacui>
:P
<CaptainJet>
h0rrorvacui, with jokes like that, we might have to mark you up
<mr`spock>
after that he gets sent through the CSS inliner
CorySimmons has quit [Ping timeout: 246 seconds]
<|jemc|>
yuck, tastes like github-flavored markdown
sensen_ has quit [Ping timeout: 246 seconds]
<h0rrorvacui>
Why does ruby have as much questions as the python, go, and haskell channels?
<h0rrorvacui>
doesn't*
danshultz has joined #ruby
<CaptainJet>
Because Ruby isn't as confusing to begin with?
vikhyat has joined #ruby
soba has quit [Ping timeout: 245 seconds]
fuhgeddaboudit has joined #ruby
danshultz has quit [Ping timeout: 272 seconds]
hogeo has joined #ruby
nhmood has joined #ruby
<nhmood>
What does {13} refer to in the context of gsub(/^ {13}/, '')?
<bnagy>
it's a count
<|jemc|>
repetition
<h0rrorvacui>
how many times
<bnagy>
check rubular.com it has syntax etc etc
soba has joined #ruby
<|jemc|>
repetition of the space character
<nhmood>
Oh I see
<h0rrorvacui>
for example you can do {3,5} and repeat 3 to 5 times
phipes has joined #ruby
<nhmood>
Ohh I see, that makes sense
lmickh has quit [Quit: lmickh]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nhmood>
So if used with a heredoc style string
tanema has quit [Remote host closed the connection]
<nhmood>
<<-MESSAGE.gsub(/^ {13}/, '')
mklappstuhl has joined #ruby
<nhmood>
would imply remove the beginning 13 whitespace chars in the string?
tanema has joined #ruby
<h0rrorvacui>
it looks like its saying not 13 spaces
petey_ has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit [Quit: Leaving.]
<nhmood>
I thought ^ was beginning of string?
<h0rrorvacui>
it is
macmartine has quit [Remote host closed the connection]
<h0rrorvacui>
start of line
petey has joined #ruby
<h0rrorvacui>
if its in the [
<h0rrorvacui>
its not
<h0rrorvacui>
sorry
<h0rrorvacui>
I have a bad font on my hexchat
<nhmood>
np np
macmartine has joined #ruby
CaptainJet has quit []
nisstyre has joined #ruby
tanema has quit [Ping timeout: 246 seconds]
brianpWins has joined #ruby
thesheff17 has joined #ruby
mklappstuhl has quit [Ping timeout: 264 seconds]
petey has quit [Ping timeout: 240 seconds]
phansch has joined #ruby
mando has joined #ruby
Atrophius has joined #ruby
Bry8Star{T2 has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
mando has quit [Ping timeout: 245 seconds]
Liothen has quit [Remote host closed the connection]
BlakeRG has joined #ruby
<bnagy>
start of line != start of string
<BlakeRG>
why can't i check for a value like so: segments[0][1].nil? - i get NoMethodError: undefined method `[]' for nil:NilClass
<bnagy>
BlakeRG: dollar says segments[0] isn't set
browndawg has quit [Quit: Leaving.]
<BlakeRG>
bnagy: yes that makes sense, but do i really have to use two conditions in my if statement just to check fir the existence of the first index before i check the second?
<|jemc|>
yeah, because you can't index a 'nil'
<|jemc|>
or you can rescue the NoMethodError
dhruvasagar has joined #ruby
<h0rrorvacui>
BlakeRG often times when I find myself in situations like this I've discovered a code smell
fuhgeddaboudit has quit [Ping timeout: 245 seconds]
mmcdaris has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<h0rrorvacui>
which is probably why you are asking lol
lfox has quit [Quit: ZZZzzz…]
<h0rrorvacui>
BlakeRG can you share some code? Maybe context could help us discover some alternatives.
webserver_define has joined #ruby
<webserver_define>
easiest way to setup modern cgi with ruby on arch linux on a webserver
<BlakeRG>
h0rrorvacui: oh yeah, this code is total crap i admit, i am just accustom to using something like isset() in other languages that allows for that behavior
<h0rrorvacui>
ohh god a php'er
<h0rrorvacui>
:P
<BlakeRG>
yeeeep
<webserver_define>
guys i have a arch linux laptop
<BlakeRG>
i'm splitting a string into two matched groups and i am just verifying the two values exist: segments = url.scan(/^(1:)(.*)$/); unless segments[0][0].nil?........
<webserver_define>
i want a webserver + ruby + cgi = working
<webserver_define>
how?
tharindu has joined #ruby
petey has joined #ruby
<oddalot>
ruby on rails
<webserver_define>
ok which webserver be best for a computer newbie to setup ruby on rails ?
nisstyre has quit [Remote host closed the connection]
hiyosi has joined #ruby
* sevenseacat
tiptoes very quickly away from conversation
macmartine has quit [Remote host closed the connection]
<|jemc|>
webserver_define: you'll find more rails users in #rubyonrails
<h0rrorvacui>
webserver_define I don't know where to begin to even help you.
<h0rrorvacui>
webserver_define do you have ruby installed?
<webserver_define>
yep
<webserver_define>
I install ruby
johnnyfuchs has quit [Quit: Leaving.]
<webserver_define>
I want to choose a webserver now which would help me config it easily
<h0rrorvacui>
What os are you using?
<webserver_define>
Arch linux
<h0rrorvacui>
Is this going to be production or for development?
<webserver_define>
amd64
<webserver_define>
learning
<webserver_define>
also for my site ..
<h0rrorvacui>
Have you decided on how you are going to host it?
<webserver_define>
to host application ( small one like calculation based but complex sometimes )
mklappstuhl has joined #ruby
<webserver_define>
on my own webserver
<webserver_define>
but i can't get lighttpd to work with ruby on rails
<webserver_define>
hence i am here to choose a diff server if that works well
dseitz has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Spami has joined #ruby
<rjhunter>
webserver_define: you don't need a special web server if you're just getting started in development. your ruby code can run everything it needs (you can use a command like `rackup` or `rails server` to start)
codeFiend has joined #ruby
hiyosi has quit [Ping timeout: 252 seconds]
<rjhunter>
webserver_define: when you want to deploy the code somewhere to run in production, you'll want something more. but thanks to hosts like heroku, you don't even need to worry about that. `git push` and you're done
<oddalot>
git push heroku
<oddalot>
and then spend half a day getting it to work right lol
<rjhunter>
again, you'll find more Rails-specific advice in #rubyonrails
<h0rrorvacui>
he moved there
<webserver_define>
guys I tried lighttpd but it din't wrk cudnt get it work with ruby on rails
<webserver_define>
some1 using lighttpd with rails here ?
mklappstuhl has quit [Ping timeout: 250 seconds]
<|jemc|>
any people that are using rails in here are probably also in #rubyonrails
<|jemc|>
and people in here tend to get a little frustrated with rails questions that persist after the questioner has already been forwarded to the other channel
<h0rrorvacui>
Well he did start off asking for cgi :P
<webserver_define>
guys I am tring to host a site of my own .. but i also want to host a few applications which i ve in excel like calculation based on the server to help people do all that even from a mobile device i heard cgi is the way to do .. n then ruby has rails which is good to learn so i am here .. I tried lighttpd + rails but couldn't get it to work .. if you want i would try again setup by setup
<h0rrorvacui>
is he trolling?
<h0rrorvacui>
I can't tell.
macmartine has joined #ruby
vlad_starkov has joined #ruby
charliesome has joined #ruby
<rjhunter>
webserver_define: I'm not sure if you're listening to any of the responses. If you are, please respond to a couple of the suggestions.
<webserver_define>
rjhunter, i m setting up nginx now ruby and then phusion passenger
<webserver_define>
looking into it
<h0rrorvacui>
I got a feeling you need to just learn rails with out the trouble of that yet
vlad_starkov has quit [Read error: Connection reset by peer]
<h0rrorvacui>
I mean what is he going to do when he sets it up?
<rjhunter>
webserver_define: let me spell this out very clearly because I think you missed it before: you don't need to install a web server yet.
<webserver_define>
oh
ahawkins has joined #ruby
<ElasticElephant>
question, when talking about arrays the .sort method sorts a-z right?
<rjhunter>
webserver_define: did you notice those directions finish with a working site? ''' A test-page should shown greeting you "Welcome aboard". '''
<ElasticElephant>
thanks
CorySimmons has joined #ruby
iliketur_ has joined #ruby
asteros has joined #ruby
<webserver_define>
Ok guys
<rjhunter>
webserver_define: don't worry about terms like CGI. not really relevant. people from other languages sometimes use "CGI" to mean any server-side code
<webserver_define>
ok
<webserver_define>
rjhunter, may i pm you?
<h0rrorvacui>
webserver_define if you look up a ruby on rails tutorial you won't need us
<rjhunter>
webserver_define: thanks for asking, but I don't normally respond to personal messages. if it's on-topic, talk about it in here. if it's off-topic, i don't really want to talk about it.
<webserver_define>
i did but nginx is so complex .. n lighttpd was so cute to setup and i did all the config jus that rails didn't work
<webserver_define>
rjhunter, np
<webserver_define>
I was just asking as too many responses where hard to process for me
<rjhunter>
webserver_define: what h0rrorvacui says is true. any Rails tutorial (including the guide on the Rails site) will talk you through everything you need.
<webserver_define>
I followed Arch Wiki but lighttpd + rails didn't work .. i would try again now
<rjhunter>
webserver_define: you don't need lighthttpd. you don't need ngninix. you don't need apache. you don't need any of that.
falsetto has quit [Quit: Computer has gone to sleep.]
<h0rrorvacui>
webserver_define look its simple ruby on rails has a webserver called webrick that you don't have to install it comes with rails
s2013 has joined #ruby
CorySimmons has quit [Ping timeout: 272 seconds]
Jdubs_ has quit [Remote host closed the connection]
<rjhunter>
webserver_define: please tell us if you understand what we're saying
<webserver_define>
h0rrorvacui, rjhunter I know but then can I host my site on that dev server too ?
Jdubs has joined #ruby
<webserver_define>
rjhunter, I understand that most modern programming lan has its own server to test / dev stuff right ?
<rjhunter>
you will want a real server for production hosting, but you're trying to run before you can walk
rezzack has quit [Ping timeout: 245 seconds]
<webserver_define>
rjhunter, ok
<webserver_define>
ok guys I won't bug you more.. I would install everything and then come back to you .. after reading a bit too
<webserver_define>
ok?
<webserver_define>
THanks a zillion
<h0rrorvacui>
more than a bit of reading ahead
<rjhunter>
webserver_define: good luck! and remember it should be really easy. if you find yourself editing a config file, stop and go back
gr33n7007h has quit [Quit: Leaving]
<webserver_define>
but on arch we have to edit a lot of thing always :(
nixie has quit [Read error: Connection reset by peer]
<webserver_define>
They give you a sample config file and then i edit it as per my understanding
<rjhunter>
webserver_define: if you have ruby installed, you shouldn't need to edit anything more
mklappstuhl has joined #ruby
nixie has joined #ruby
<h0rrorvacui>
Sure but that has nothing to do with it.
<rjhunter>
webserver_define: a working ruby installation is all you need. seriously.
<ahawkins>
hey guys, any idea why i'd get Errno::ECONNREFUSED from an HTTP request from ruby when I can make the same request with curl fine?
<dseitz>
gist?
<webserver_define>
rjhunter now i ve install ruby too
<webserver_define>
h0rrorvacui, ruby done
<rjhunter>
ahawkins: could be a few things. could be the server only takes one connection. could be proxy settings (one going through a proxy, one not)
<webserver_define>
ERROR: While executing gem ... (OpenSSL::SSL::SSLError)
lukec has quit [Quit: lukec]
aganov has joined #ruby
sergicles has quit [Quit: sergicles]
mmcdaris has joined #ruby
sensen has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
<dseitz>
did you install openssl before ruby?
tjad has quit [Remote host closed the connection]
<webserver_define>
ya
<webserver_define>
I had it already
jonahR has joined #ruby
macmartine has quit [Read error: Connection reset by peer]
<webserver_define>
trying again gem install rails --no-ri --no-rdoc
macmartine has joined #ruby
<h0rrorvacui>
ruby depends on: gdbm, openssl, libffi, and libyaml; so unless he is doing something wrong with pacman he should of got openssl
<h0rrorvacui>
in arch I should say
noop has joined #ruby
<h0rrorvacui>
To be honest I'm impressed you got this far through arch and up to this point. I've friends who are employed as developers and they find arch to much work/to difficult.
<dseitz>
yeah; they list it as a dependancy under (make)
BizarreCake has joined #ruby
<webserver_define>
h0rrorvacui, arch is so easy for me .. just that I didn't do CGI or web programming yet but i could get cpp with fastcgi working .. but people said cgi is like 500 yrs old so don't work now .. use some something like ruby/perl/python w.e you can and try php too its easy .. but use a framework .. they make help your work easy
asteros has joined #ruby
<webserver_define>
I ve to add I like only two Free OS in the world .. FreeBSD n Arch in Gnu/Linux also now Parabola in Linux-libre
thesheff17 has quit [Ping timeout: 240 seconds]
amritanshu_RnD has joined #ruby
yfeldblum has quit [Remote host closed the connection]
tagrudev has joined #ruby
yfeldblum has joined #ruby
DanielRb has quit [Ping timeout: 250 seconds]
pranny has joined #ruby
triptec has quit [Quit: leaving]
DanielRb has joined #ruby
s2013 has quit [Ping timeout: 246 seconds]
mengu has joined #ruby
<webserver_define>
guys i am trying pacgem now.. it is resolving gems
<webserver_define>
railes-4.0.2
<webserver_define>
rails*
CorySimmons has joined #ruby
<h0rrorvacui>
webserver_define if it doesn't work you need to see if its something to do with the fact that you are using system ruby
amacgregor_ has joined #ruby
<h0rrorvacui>
and try out something like rvm, rbenv, chruby w/ ruby-install or ruby-build
<webserver_define>
it is done almost
mklappstuhl has joined #ruby
<webserver_define>
ruby-i18n-0.6.9-1
<webserver_define>
installed
ce_afk is now known as cescalante
amacgregor has quit [Ping timeout: 246 seconds]
CorySimmons has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
mklappstuhl has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
banghouse has quit [Quit: What if the hokey pokey really is what it's all about?]
<webserver_define>
it is installing a lot of stuff
<webserver_define>
jason, tzinfo
<webserver_define>
atomic
<h0rrorvacui>
yeah, thats expected
<webserver_define>
thread-safe
<webserver_define>
now
tonsk has quit [Quit: Page closed]
<dseitz>
let us know when it says N gems installed; $
<dseitz>
:)
<webserver_define>
ok
<webserver_define>
ruby-builder
macmartine has quit [Remote host closed the connection]
<h0rrorvacui>
careful throwing out all these gem names might summon someone by accident :P
<webserver_define>
kk
apeiros has quit [Ping timeout: 246 seconds]
<dseitz>
we know the gems names - not to seem rude, but just hang out until it gives you control of your terminal again
<webserver_define>
pacgem = gem's pacman version :p
<sevenseacat>
rails should be 31 gems iirc
<sevenseacat>
including dependencies
s2013 has joined #ruby
<webserver_define>
dseitz, u r not rude .. ( only channel tht is not rude yet!! ) else other say go read the manual it has it all .. but Arch/freebsd/now ruby channel is the most co-operative yet
<webserver_define>
sevenseacat, k
Lewix has quit [Remote host closed the connection]
<webserver_define>
it stopped on activemodel
<sevenseacat>
seeing how many gems actually get used in a standard rails app is scary
<h0rrorvacui>
Did it return control of the prompt?
<h0rrorvacui>
If not it is still going.
<webserver_define>
no it has installed ruby-arel .. now looking for next thing
Jdubs has joined #ruby
maroloccio has quit [Remote host closed the connection]
<webserver_define>
guys it is taking long time
<sevenseacat>
we know.
<sevenseacat>
you keep telling us.
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
* webserver_define
reading Ruby book :p
hogeo has quit [Remote host closed the connection]
Arzaga has quit [Quit: Computer has gone to sleep.]
<h0rrorvacui>
I'd imagine it could have a lot to do with the fact that you are using pacgem
<h0rrorvacui>
It is probably building arch packages out of each gem
<h0rrorvacui>
maybe some overhead there idk...
s2013 has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
akonny has joined #ruby
<h0rrorvacui>
I'm out seems like a good time to bail
<h0rrorvacui>
:P
h0rrorvacui has quit [Quit: Leaving]
ambushsabre has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hogeo has joined #ruby
Arzaga has joined #ruby
Elhu has joined #ruby
timonv has joined #ruby
amacgregor has joined #ruby
zipper has joined #ruby
mklappstuhl has joined #ruby
<webserver_define>
omg ruby has personal thor?
amacgregor__ has joined #ruby
hogeo has quit [Remote host closed the connection]
amacgregor_ has quit [Ping timeout: 245 seconds]
Kneferilis has quit [Quit: Leaving]
sergicles has joined #ruby
hogeo has joined #ruby
amacgregor has quit [Ping timeout: 246 seconds]
sergicles has quit [Client Quit]
mklappstuhl has quit [Ping timeout: 246 seconds]
larssmit has joined #ruby
tskogberg has quit [Read error: Operation timed out]
<dEPy>
Is there a way to defined those two callbacks named? like :succes -> ....
Animawish has quit [Quit: Animawish]
phil_b has joined #ruby
<shevy>
dEPy cant you assign a variable to them?
<shevy>
foo = proc {}
<shevy>
bar = proc {}
burgess has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
hogeo has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Quit: Leaving]
<dEPy>
shevy yes but it doesn't force someone using my class to define it this way :)
drumusician has quit [Read error: Operation timed out]
hogeo has joined #ruby
<shevy>
in 99% I would assume that it's you first to use that class
<shevy>
I know that if I were to have to use something like this, I would scratch my head because I dont really see why I would have to use this strange way
<dEPy>
is it really that strange?
<dEPy>
It's quite commong in javascript for example to define success and failure callbacks
TMM has joined #ruby
<dEPy>
I just want a consistent way of handling stuff in my rails controllers, and if I tell the people they must use UseCase to implement behvaiour and just handle success and failure in controller which means basicaly only redirects or renders, i think this clears things up and prevents people putting crap in controllers
Astralum has quit [Read error: Connection reset by peer]
<mikecmpbll>
getting all the values for key :thing two levels down
Astralum has joined #ruby
<mikecmpbll>
regardless of the key at :a or :b
<DouweM>
h.map { |k, v| v[:thing] }
mojjojo has joined #ruby
ldnunes has joined #ruby
xcv_ has quit [Remote host closed the connection]
<mikecmpbll>
yeah, kinda seems like a silly question now.
<mikecmpbll>
fml
xcv has joined #ruby
<dEPy>
dagobah: ye that's not perfect either :)
shime has quit [Ping timeout: 240 seconds]
<mikecmpbll>
i did oversimplify it a bit, there's not necessarily always a value, and it's more levels deep than that, but those are not insurmountable. cheers.
mojjojo has quit [Client Quit]
Macaveli has joined #ruby
lsmola has quit [Ping timeout: 250 seconds]
<Hanmac>
mikecmpbll: there is also an way with more fun: ;P
<DouweM>
Hanmac: that's supported? :| that's crazy. but cool
zipper has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
<Hanmac>
yeah, i need to look for more magic, but there was a way to do that
mojjojo has joined #ruby
clevermatt has joined #ruby
ismaelrb has joined #ruby
AlSquirrel has joined #ruby
niklasb has joined #ruby
movedx has joined #ruby
<Macaveli>
Hi all! Anyone have a Rails 3 installation guide that works with OS X 10.9 and latest xcode I have a lot of problems for example I can't do ruby -v inside my app folder
klaut has quit [Remote host closed the connection]
ace_striker has joined #ruby
<DouweM>
what actual use cases would that method have on a String? on an Array I could see it
<mikecmpbll>
intact, that only works if they array elects are just 0-9
<shevy>
hmm
<mikecmpbll>
in fact*
<shevy>
I think I have seen .squeeze before
<DouweM>
good point
jprovazn has joined #ruby
olivier_bK has quit [Quit: Quitte]
<shevy>
don't think I had needed it yet
yfeldblum has joined #ruby
olivier_bK has joined #ruby
klaut has joined #ruby
aryaching has joined #ruby
<visof>
Hanmac: well, i'm in situation which i have hash of tags like this {:name => "foo", :desc => "its foo"} , how can i generate this hash as tags for "Hello:World" ?
<Hanmac>
mikecmpbll: as long as the new methods makes sense i say aye! (rails methods for samples doesnt often make sense)
<mikecmpbll>
idd :)
ismaelrb has joined #ruby
echevemaster has quit [Quit: Leaving]
nari has quit [Ping timeout: 240 seconds]
<DouweM>
I idd a common acronym for indeed in English-speaking countries? :/
raphaelivan has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mboyd has joined #ruby
tedstriker has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
<CalimeroTeknik>
yeah whatever, it matches the size of the following chunk, and it seems it's hexadecimal
<apeiros>
CalimeroTeknik: that's chunked encoding
<CalimeroTeknik>
yes it is
<CalimeroTeknik>
is there some function somewhere or some clever trick to de-chunk?
<CalimeroTeknik>
in fact I need to read a line as hexa and delete it, skip the number of bytes specified, and again
<CalimeroTeknik>
until the number is zero
amoli has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
lkba has joined #ruby
amoli has joined #ruby
<apeiros>
CalimeroTeknik: understanding how chunked encoding works helps. no need for clever tricks then.
<CalimeroTeknik>
I'd be fine with using an http library, but I can't find one that will allow me to only download the first kilobyte of the page
<apeiros>
correct, the hex states the length of the chunk
jbpros has joined #ruby
<CalimeroTeknik>
could pattern matching be used for parsing and thus accurately deleting chunk size info?
fedesilva has quit [Remote host closed the connection]
<apeiros>
no
<CalimeroTeknik>
I'd need to skip an hexadecimal number of bytes in the expression
<CalimeroTeknik>
guess it's not possible
dgfdgf has quit [Ping timeout: 246 seconds]
Elhu has joined #ruby
<apeiros>
CalimeroTeknik: decoding chunked data is like 3 lines of ruby. write a method for it and be done.
<_br_>
Anyone have an idea how to merge rack's config.ru map with em-proxy?
sensen has quit [Ping timeout: 246 seconds]
ayaz_ has joined #ruby
mklappstuhl has joined #ruby
xk_id has joined #ruby
CorySimmons has joined #ruby
psyl0n has quit [Remote host closed the connection]
psyl0n has joined #ruby
psyl0n has joined #ruby
psyl0n has quit [Changing host]
decoponio has joined #ruby
MattStratton has joined #ruby
danshult_ has quit [Remote host closed the connection]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
danshultz has joined #ruby
ayaz_ has quit [Client Quit]
fedesilva has joined #ruby
RaCx has joined #ruby
ayaz has quit [Quit: leaving]
intuxicated has quit [Ping timeout: 252 seconds]
ayaz has joined #ruby
intuxicated has joined #ruby
ayaz has quit [Changing host]
ayaz has joined #ruby
CorySimmons has quit [Ping timeout: 246 seconds]
sevenseacat has joined #ruby
Jetchisel has quit [Remote host closed the connection]
<CalimeroTeknik>
aaah what will I do for https :x
danshultz has quit [Ping timeout: 252 seconds]
nhhagen has joined #ruby
fragmachine has quit [Remote host closed the connection]
ffranz has joined #ruby
<CalimeroTeknik>
implementing a web client on a raw socket was a bad idea from the start; but I did that for one only reason: so I could limit the download to the first kilobyte of the reply
<CalimeroTeknik>
can the http library do that?
shaunbaker has quit [Remote host closed the connection]
<apeiros>
if you can, use a range request
Fire-Dragon-DoL has joined #ruby
<apeiros>
and yes, net/http should be able to do that
<CalimeroTeknik>
I'm not guaranteed to get only that data
<CalimeroTeknik>
I need to cut the connection on my side to be sure
shaunbaker has joined #ruby
<apeiros>
that doesn't guarantee that you "don't get" the data either. all it ensures is that the unread data is thrown away.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shaunbaker has quit [Remote host closed the connection]
<CalimeroTeknik>
well, closing a TCP connection is pretty efficient to not receive more data on it, right? the other peer will also notice it
<apeiros>
and yes, unless you're communicating with a broken webserver, a range request will only return you the range you requested
<CalimeroTeknik>
I can't receive more than the TCP window
<CalimeroTeknik>
well… I don't want to assume it's not broken (that is a sane reasoning, right?)
thelorax123 has quit [Remote host closed the connection]
<CalimeroTeknik>
I dislike exceptions, so got rid of them! begin timeout(1) do sleep(5) end;rescue Timeout::Error => dead;end
hadees has quit [Ping timeout: 245 seconds]
<hoelzro>
ah, sure enough.
nhhagen has quit [Ping timeout: 245 seconds]
threesome has joined #ruby
shaunbaker has joined #ruby
Xeago has quit [Remote host closed the connection]
TheCyberCriminal has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
casheew has quit [Read error: Connection reset by peer]
krnflake has quit [Ping timeout: 252 seconds]
xerxas has quit [Ping timeout: 252 seconds]
gtsiftsis has quit [Ping timeout: 252 seconds]
phrozen77 has quit [Ping timeout: 252 seconds]
gtsiftsis has joined #ruby
xpirator has quit [Ping timeout: 252 seconds]
xerxas_ is now known as xerxas
shaunbak_ has joined #ruby
xpirator has joined #ruby
phrozen77 has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
vpretzel has joined #ruby
tylersmith has joined #ruby
dhruvasagar has joined #ruby
zkc has joined #ruby
shaunbaker has quit [Ping timeout: 250 seconds]
tedstriker has joined #ruby
Kricir has joined #ruby
mando has quit [Remote host closed the connection]
yfeldblum has joined #ruby
matheuscaceres has joined #ruby
nari has joined #ruby
Astral_ has joined #ruby
synergy has joined #ruby
lucazi has quit [Ping timeout: 240 seconds]
phantasm66 has joined #ruby
phantasm66 has joined #ruby
bluenemo has joined #ruby
polaco_zZz is now known as polaco
Astralum has quit [Ping timeout: 260 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 252 seconds]
wildroman2 has joined #ruby
ewnd9 has quit [Ping timeout: 260 seconds]
sevenseacat has quit [Quit: Leaving.]
phansch has joined #ruby
lucazi has joined #ruby
mengu has quit [Remote host closed the connection]
sailias has joined #ruby
klaut has joined #ruby
cescalante is now known as ce_afk
<slap_stick>
hm is there a neat quick way of taking a hash and duplicating each key but obviously with a new name so the numebr of keys equals the size of another hash i.e. say i have h1 and h2 i want h1 to duplicate the same key layout til it is equal in the number of keys of h2
klaut has quit [Remote host closed the connection]
<apeiros>
slap_stick: care to give a concrete example?
breakingthings has joined #ruby
aganov has quit [Quit: aganov]
moshee has quit [Ping timeout: 252 seconds]
<slap_stick>
yeh so one solutino, which i dont like is h1.each_pair { |k,v| i = 0 while i<h2.size { h1[k+i] = v } } somehting like that bnot sure if that works as didn't test it
lucazi has quit [Ping timeout: 245 seconds]
lucazi has joined #ruby
mengu has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
taion809 has quit [Ping timeout: 260 seconds]
petey has joined #ruby
RaCx has joined #ruby
<apeiros>
I'm more interested in a example of in-/output
klaut has joined #ruby
<apeiros>
the above - ignoring the broken code - seems to create h1.size*h2.size keys in h1
enebo has joined #ruby
<apeiros>
which conflicts already with how I understood your initial question
kh019267 has joined #ruby
<slap_stick>
it's ok i'll figure it out but thanks ;-)
ewnd9 has joined #ruby
TMM has quit [Quit: Ex-Chat]
jerius has joined #ruby
petey has quit [Remote host closed the connection]
<apeiros>
either go and figure it out yourself or ask. but don't half-ask and walk away.
h_kon has quit [Remote host closed the connection]
duggiefresh has joined #ruby
Xeago has joined #ruby
mjs2600 has joined #ruby
ExxKA has joined #ruby
<slap_stick>
sorry, it just requires a bigger explanatino to what i am trying to do for you to understand and give a decent answer and i've figured out a way now that works and so saved both me and you having a big long conversation about what it is i am really trying to do in detail
petey has quit [Ping timeout: 246 seconds]
<slap_stick>
wasn't me being annoying deliberately, just got to the bottom of it myself, penny dropped
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
liamkeily has joined #ruby
lukec has joined #ruby
_maes_ has joined #ruby
javon has joined #ruby
iamjarvo has quit [Remote host closed the connection]
mary5030 has quit [Read error: Connection reset by peer]
aganov has joined #ruby
seoNinjaWarrior has joined #ruby
agjacome has quit [Quit: leaving]
Kricir has quit [Remote host closed the connection]
kristofers has quit [Ping timeout: 252 seconds]
ehc has joined #ruby
xcv_ has quit [Remote host closed the connection]
xcv has joined #ruby
mary5030_ has quit [Remote host closed the connection]
Kricir has joined #ruby
mary5030 has joined #ruby
tanema has joined #ruby
shaunbaker has joined #ruby
elux has joined #ruby
ravster has joined #ruby
gianlucadv has quit [Ping timeout: 260 seconds]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
dhruvasagar has joined #ruby
blaskovicz has joined #ruby
lemonsparrow_ has joined #ruby
spyderman4g63 has joined #ruby
mojjojo has quit [Quit: mojjojo]
joonty has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshell has joined #ruby
mikecmpbll has joined #ruby
kcombs_ has joined #ruby
browndawg has quit [Quit: Leaving.]
nhhagen has joined #ruby
tannerburson has joined #ruby
sepp2k has joined #ruby
lemonsparrow is now known as Guest76116
hadees has joined #ruby
lemonsparrow_ is now known as lemonsparrow
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
nomenkun has joined #ruby
awkwords has quit [Quit: Leaving.]
mdel has joined #ruby
goshakkk has joined #ruby
klaut has quit [Remote host closed the connection]
domakesaythings has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
amedeiros has quit [Ping timeout: 240 seconds]
johnnyfuchs has joined #ruby
nhhagen has quit [Ping timeout: 252 seconds]
domakesaythings has left #ruby [#ruby]
amoli has quit [Ping timeout: 272 seconds]
iamchrisf has joined #ruby
lfox has joined #ruby
norm has joined #ruby
Kabaka has joined #ruby
noop has quit [Ping timeout: 246 seconds]
<norm>
i'm reading a binary file, and am getting back \u001F\x8B. why is that first character a \u001F and not \x1F ?
<norm>
(admittedly a file encoding question, not pure ruby)
appineer has joined #ruby
johnnyfuchs has left #ruby [#ruby]
stin4u has joined #ruby
<elux>
hrmm whats the deal with rbenv being so slow to add new updates..
taion809 has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
jedimind has joined #ruby
freerobby has joined #ruby
moshee has joined #ruby
mojjojo has joined #ruby
michael_lee has quit [Quit: Ex-Chat]
lukec has quit [Quit: lukec]
<norm>
oh nevermind, i use gets on a binary file, i should have used .read
RaCx has joined #ruby
burlyscudd has quit [Quit: Leaving.]
lemonsparrow has quit [Quit: Page closed]
shaunbaker has quit [Remote host closed the connection]
<_br_>
Interesting Question. If you would think completely objective (no ruby prejudice), in what language would you write a Chat bot system consisting of worker nodes (deployed in guests, connecting back to some C&C node), a C&C node which has separate modules handling NLP, heuristic AI, etc.
kristofers has joined #ruby
hogeo has joined #ruby
<CalimeroTeknik>
how do I set a timeout for read() on a socket?
<CalimeroTeknik>
it didn't work with socket.setsockopt Socket::SOL_SOCKET, Socket::SO_RCVTIMEO, [1, 0].pack("l_2")
<norm>
Hanmac: huh. i swear that was false a minute ago.
<norm>
thanks
wildroman2 has quit [Remote host closed the connection]
javon has joined #ruby
shaunbaker has joined #ruby
macmartine has joined #ruby
macmartine has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 240 seconds]
iamchrisf has quit [Quit: iamchrisf]
goshakkk has joined #ruby
mojjojo has quit [Quit: mojjojo]
shaunbaker has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
mojjojo has joined #ruby
stin4u has quit [Quit: Leaving]
tonni has quit [Ping timeout: 264 seconds]
iamchrisf has joined #ruby
Shidash has quit [Ping timeout: 252 seconds]
jamesaanderson has joined #ruby
ce_afk is now known as cescalante
mando has joined #ruby
jamesaanderson has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
shime has quit [Ping timeout: 240 seconds]
Megtastique has joined #ruby
phantummm has quit [Quit: phantummm]
momomomomo has joined #ruby
tonni has joined #ruby
tagrudev has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
mlpinit has joined #ruby
amritanshu_RnD has quit [Quit: Leaving]
mengu has quit []
divi_ has joined #ruby
aganov has quit [Remote host closed the connection]
F1skr has quit [Quit: WeeChat 0.4.2]
moshee has quit [Ping timeout: 264 seconds]
tesuji has quit [Ping timeout: 264 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
taion809 has quit [Ping timeout: 252 seconds]
bluenemo has quit [Remote host closed the connection]
wildroman2 has joined #ruby
angusigu1ss has joined #ruby
mudmaster has joined #ruby
nowthatsamatt has joined #ruby
cescalante is now known as ce_afk
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ce_afk is now known as cescalante
similian has joined #ruby
<similian>
hello fellow rubianians
jamesaanderson has joined #ruby
dweeb_ has joined #ruby
<waxjar>
impostor! rubyists is the term :P
Clooth has quit [Quit: Leaving...]
dangerousdave has joined #ruby
yfeldblum has joined #ruby
klaut has joined #ruby
mjs2600 has quit [Remote host closed the connection]
<similian>
muhaah
<similian>
well that sound quite dry tho
<Hanmac>
waxjar: i think he is a railsian in camouflage
jamesaanderson has quit [Client Quit]
<similian>
thats the one !!!
mudmaste_ has joined #ruby
* waxjar
runs
<similian>
:/
<similian>
no web app questions ?
<similian>
???
bean__ has joined #ruby
<similian>
its off topic anyway ...
mudmaster has quit [Ping timeout: 264 seconds]
jb41 has quit [Quit: leaving]
kevind has joined #ruby
<similian>
I would like to extend my web app with cms functionality. And wondered if there was a nice way to have some sort of nestet css where i could include my default form/ui parts.
<similian>
Example: You can set your header footer and custom css. Yet the login form of my app stays in my style.
<similian>
iframes are just not funny.
<similian>
( kick-ban? )
pzula has joined #ruby
zz_tsykoduk is now known as tsykoduk
GreatSUN has quit [Ping timeout: 250 seconds]
rippa has joined #ruby
sailias has quit [Quit: Leaving.]
shaunbaker has joined #ruby
kevind has quit [Client Quit]
lmickh has joined #ruby
BackEndCoder has joined #ruby
kevind has joined #ruby
liamkeily has quit [Ping timeout: 250 seconds]
moshee has joined #ruby
taion809 has joined #ruby
starfox21 has joined #ruby
aspires has joined #ruby
Zesty has joined #ruby
jibi has joined #ruby
g0bl1n has joined #ruby
<_br_>
similian: Your question is puzzling. You mean header, footer load one set of CSS and main content another set of CSS which both needs to be applied independently?
sailias has joined #ruby
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
browndawg has joined #ruby
pzula has quit [Quit: Lost terminal]
pzula has joined #ruby
sebkomianos has joined #ruby
pushpak has joined #ruby
iamjarvo has quit [Remote host closed the connection]
sebkomianos has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
phil_b has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
nwertman has quit [Ping timeout: 246 seconds]
shime has joined #ruby
paolooo has quit [Quit: Page closed]
Macaveli has quit [Quit: This computer has gone to sleep]
jbpros has quit [Quit: jbpros]
tonni has quit [Ping timeout: 240 seconds]
shaunbaker has quit [Remote host closed the connection]
jprovazn has quit [Quit: Odcházím]
sebkomianos has joined #ruby
fedesilv_ has joined #ruby
pzula has quit [Quit: Lost terminal]
pzula has joined #ruby
baroquebobcat has joined #ruby
olivier_bK has quit [Ping timeout: 252 seconds]
moshee has quit [Ping timeout: 260 seconds]
shaunbaker has joined #ruby
wallerdev has joined #ruby
taion809 has quit [Ping timeout: 240 seconds]
fedesilva has quit [Ping timeout: 245 seconds]
kristofers has quit [Remote host closed the connection]
hogeo has joined #ruby
ziyadb has joined #ruby
jl- has joined #ruby
blaskovicz1 has joined #ruby
jl- has left #ruby [#ruby]
<shevy>
dumdedum
<similian>
_br_ correct
zeeraw has joined #ruby
blaskovicz has quit [Ping timeout: 240 seconds]
apeiros has quit [Remote host closed the connection]
blaskovicz has joined #ruby
shaunbaker has quit [Remote host closed the connection]
vt102 has quit [Remote host closed the connection]
<rdark>
I'm reading the value of a method, defined by a variable using public_send, but any ideas how I would reverse this and update the value using a variable?
<_br_>
similian: applying different styling as you want it is impossible since the DOM is one entity. What you want is to make sure that ids/classes are not affecting each other.
momomomomo has quit [Quit: momomomomo]
wallerdev has quit [Quit: wallerdev]
udoprog has joined #ruby
arietis has joined #ruby
doggfrank has joined #ruby
moshee has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
jprovazn has joined #ruby
taion809 has joined #ruby
<similian>
okay so i would have to reorganize the css accordingly
seoNinjaWarrior has joined #ruby
mando has quit [Remote host closed the connection]
<_br_>
I had a similar issue like you
<_br_>
one part of an app coming from nodejs stack via proxy into an exist app.
mando has joined #ruby
_maes_ has quit [Read error: Connection reset by peer]
Kricir has quit [Remote host closed the connection]
<similian>
i created a less file where bootstrap is nested into a custom-class
thelorax123 has quit [Remote host closed the connection]
<similian>
yup similar problem
<_br_>
well, just apply nested CSS rules to split the effect of applied CSS.
<_br_>
but don't go all out inception with too many layers :)
<similian>
okay ... i see
Hanmac1 has joined #ruby
<similian>
do you find this developer friendly ... :/
thelorax123 has joined #ruby
phantummm has joined #ruby
<similian>
would it be easy to copy paste custome bits in an editor
yo61 has joined #ruby
bentonrr has joined #ruby
<similian>
well i will just try an see :D
Hanmac has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
xue has quit [Quit: Konversation terminated!]
camilasan has quit [Remote host closed the connection]
<_br_>
developer friendly?
MrZYX|off is now known as MrZYX
nwertman has joined #ruby
Newls has joined #ruby
<similian>
well i would supply my nested css
<similian>
an you could include my stuff into your page
visof has quit [Ping timeout: 240 seconds]
<_br_>
if you write your css correctly that is no issue
<similian>
i hope you wont have to hassle with my css
<similian>
I see !!! thats what i needed to know!!!
breakingthings has quit []
<similian>
thx _br_ !!!
<_br_>
np
<Newls>
Hello Ruby Peoples ! I have a question to ask, i use an app built with ruby (the excellent Gitlab) which i run on a server running archlinux. Everything was working fine since after an update my libicui18n.so.51 needed by charlock_holmes is not there anymore, replaced by it's .52.something version
geggam has joined #ruby
petey has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
doggfrank has quit [Quit: Leaving]
petey has joined #ruby
<Newls>
The question is : do I need to rebuild the gem ? and what is the best way to do that in my case
gtsiftsis has quit [Quit: Leaving]
clamstar has joined #ruby
<Newls>
Thank you a lot in advance !
atno__ is now known as atno
xk_id has quit [Quit:
tonni has joined #ruby
<shevy>
gem is not in control over .so files on your system
iamjarvo has quit [Remote host closed the connection]
<_br_>
Newls: Yes.
iamjarvo has joined #ruby
<Newls>
i know, but this gem (charlock_holmes) need either be recompiled or something or I need to recompile libicu.51
<Newls>
thanks _br_ :)
macmartine has joined #ruby
saltnvinegar has quit [Quit: saltnvinegar]
tonni has quit [Remote host closed the connection]
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
<Newls>
_br_: i'm not finding what i need on google, what is the command to just make it recompile agin ?
<_br_>
Well, I don't know charlock_holmes, but I suspect libicui18n.so.51 was just a symlink to libicui18n.so
tonni has joined #ruby
<_br_>
Newls: You need to recompile the lib from arch via pacman and you need to reinstall the gem
petey has quit [Ping timeout: 240 seconds]
<Newls>
yes, I made the link again to test, and I had some other errors beacause the binary lib wasnt good in that version
<Newls>
SYMBOL something
momomomomo has joined #ruby
<Newls>
that is possible to use an old version ?
Azure has joined #ruby
maxmouchet has joined #ruby
<_br_>
downgrading? sure, just downgrade your lib on arch and reinstall the gem
<Newls>
ok I can just use the pacman 's stable version (the last)
<_br_>
Newls: There is a #gitlab channel btw.
<Newls>
:)
<Newls>
thanks _br_ :)
seoNinjaWarrior has joined #ruby
dkamioka has joined #ruby
wildroman2 has quit [Remote host closed the connection]
tsykoduk is now known as zz_tsykoduk
zz_tsykoduk is now known as tsykoduk
arietis has joined #ruby
<_br_>
np
zkc has quit [Quit: Leaving]
tonni has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
macmartine has quit [Remote host closed the connection]
browndawg has quit [Quit: Leaving.]
maxmouchet has quit []
zipper has quit [Quit: Lost terminal]
Clooth has joined #ruby
Clooth has quit [Client Quit]
alup has quit [Quit: Leaving]
_DrForr has joined #ruby
klaut has quit [Remote host closed the connection]
spider-mario has joined #ruby
andikr has quit [Remote host closed the connection]
duggiefresh has quit [Read error: Connection reset by peer]
<CalimeroTeknik>
yeah, looking for a valid solution to get the first kilobyte of an http link with a one-second timeout
<CalimeroTeknik>
to no avail so far
nhhagen has joined #ruby
nixie has quit [Ping timeout: 245 seconds]
<shevy>
oh god, is that ruby code or an alien language
mjs2600 has quit [Remote host closed the connection]
mroth has quit [Ping timeout: 245 seconds]
<CalimeroTeknik>
I've seen worse!
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
<shevy>
this is all so extremely domain specific
<shevy>
def self.has limit, name, options = {}
mroth has joined #ruby
<sebkomianos>
haha, really? I'd love to hear suggestions
<shevy>
and they don't even use () anymore :(
shadoi has quit [Quit: Leaving.]
saltnvinegar has joined #ruby
m-o-s has quit [Ping timeout: 260 seconds]
tannerburson has quit [Quit: tannerburson]
ewnd9 has quit [Read error: Connection reset by peer]
<shevy>
so where is the scope related thingy?
mojjojo has joined #ruby
<Hanmac>
sebkomianos: when you want to monkeypatch ActiveRecord you need to do that AFTER you require "activerecord" ... its like repainting a wall before the house is build
<Hanmac>
shevy: no it means there is no errors method/variable
<shevy>
right
<shevy>
there is no errors thing known to ruby at that time
aspires has quit []
<shevy>
btw why is pry there on line 17
sambao21 has quit [Quit: Computer has gone to sleep.]
mikecmpbll has joined #ruby
<Hanmac>
sebkomianos: that is also "name.to_sym" a bit evil/dumb ... i mean what else should use use? and the orginal has_ methods should care about that problem
<sebkomianos>
shevy: I am using pry to try see what's going on
mojjojo has quit [Quit: mojjojo]
arietis has joined #ruby
olivier_bK has joined #ruby
<shevy>
aha
<shevy>
you do weird things
Lewix has joined #ruby
<sebkomianos>
shevy: haha, I can imagine it looks bad
dagobah has quit [Remote host closed the connection]
<Hanmac>
interactionjaxsn: the more funny joke is that "to_sym" is not needed in this piece of code (and in one place it doesnt make any sense)
rehat has joined #ruby
nomenkun_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
<waxjar>
nice Hanmac, bookmarked.
mojjojo has joined #ruby
<rehat>
I'm new with rails and ruby, if I need to write a csv object to file I need to fist create the file with File and then use File.open
klaut has quit [Remote host closed the connection]
<interactionjaxsn>
Hanmac: right. since he's passing it in as an argument. i just assumed that we wasn't sure of that param so was doing it as a safeguard
timonv has quit [Remote host closed the connection]
<Hanmac>
rehat: #rubyonrails
<Hanmac>
waxjar: its not finish yet, so it might change in the future
mojjojo has quit [Client Quit]
kevind has quit [Ping timeout: 272 seconds]
<olivier_bK>
shevy, thanks
<olivier_bK>
Hanmac, thanks
kevind_ is now known as kevind
<sebkomianos>
ok, updated - I get how "name.size" won't do what I want it to do now
nomenkun has quit [Ping timeout: 240 seconds]
<havenwood>
Hanmac: Nice, i like! Visualization ftw.
duggiefresh has quit [Remote host closed the connection]
bentonrr has quit [Ping timeout: 245 seconds]
jkhwan has quit [Ping timeout: 272 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
RaCx has joined #ruby
bentonrr_ has quit [Remote host closed the connection]
isec has joined #ruby
<isec>
hi all
jkhwan has joined #ruby
petey has quit [Ping timeout: 246 seconds]
<momomomomo>
hi isec
<interactionjaxsn>
hisec
thumpba has quit [Remote host closed the connection]
<isec>
using: gem install ruby-oci8 I get the error: Could not find a valid gem 'ruby-oci8'
bentonrr has joined #ruby
jchristi has joined #ruby
<interactionjaxsn>
isec: is this rails?
ineb has left #ruby [#ruby]
macmartine has quit [Remote host closed the connection]
timonv has joined #ruby
macmartine has joined #ruby
<isec>
it's a package to connect to oracle db
maninthemiddle has joined #ruby
Elhu has joined #ruby
<maninthemiddle>
hey there
<momomomomo>
isec: Just installed for me
liamkeily has quit [Ping timeout: 240 seconds]
<momomomomo>
which version of ruby are you using isec
clamstar has quit [Quit: Computer has gone to sleep.]
<isec>
ruby 2.0.0p247 (2013-06-27 revision 41674)
<momomomomo>
well, not sure, seems like a ruby gems thing because I found the package just fine
<isec>
wondering gem is using a db that has to be updated from the net?
<momomomomo>
gem install ruby-oci8
sambao21 has joined #ruby
phantummm has quit [Quit: phantummm]
jetblack has quit [Quit: leaving]
<maninthemiddle>
need your advice: is there a way to work with ruby-1.9.3 application, and at the same time run some utilities under ruby-2.0? I am using RVM, but see no options for myself to do exactly that
<momomomomo>
though the install failed :p
Mars___ has quit [Remote host closed the connection]
bentonrr has quit [Ping timeout: 252 seconds]
<Hanmac>
maninthemiddle: it may be possible but i would not recomend that
<jchristi>
is there an easy way in ruby to compare two similar but not identical XML files? I want to detect config changes, but ignore whitespace, single quotes vs double quotes, self-closing tags, etc. git diff -w only does the first of those.
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
canton7-mac has quit [Ping timeout: 240 seconds]
<Hanmac>
jchristi: you can try to parse them with nokogiri
isec has quit [Remote host closed the connection]
burlyscudd has joined #ruby
tvw has quit []
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
<Hanmac>
jchristi: big question: why should selfclosig tags be ignored?
bentonrr has joined #ruby
saltnvinegar has quit [Quit: saltnvinegar]
codeFiend has quit [Quit: codeFiend]
cleverma_ has quit [Remote host closed the connection]
<shevy>
poor guys still using XML
iamchrisf has joined #ruby
phantummm has joined #ruby
hololeap has joined #ruby
petey has joined #ruby
platzhirsch has joined #ruby
endash has quit [Read error: No route to host]
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
javon has joined #ruby
yfeldblum has quit [Remote host closed the connection]
jkhwan_ has joined #ruby
tannerburson has joined #ruby
<Hanmac>
shevy i think the main problem is that he has html like that "<p>section1<p>section2<p>section3" without "</p>" tags ;P
jkhwan has quit [Ping timeout: 272 seconds]
endash has joined #ruby
tannerburson has quit [Client Quit]
<shevy>
that is just sad
pragmatism has joined #ruby
dkamioka has quit [Remote host closed the connection]
johnny5stillaliv has quit [Ping timeout: 252 seconds]
nhhagen has quit [Remote host closed the connection]
clamstar has joined #ruby
tannerburson has joined #ruby
dkamioka has joined #ruby
relix has joined #ruby
<jchristi>
Hanmac: not ignore self-closing tags, but ignoring <tag></tag> vs <tag/> as a difference
<jchristi>
should have said "empty tags" vs "self closing tags"
hakunin has joined #ruby
troessner has quit [Quit: Leaving]
CripperZ is now known as zz_CripperZ
mmcdaris has joined #ruby
yfeldblum has joined #ruby
typicalbender has joined #ruby
jkhwan_ has quit [Remote host closed the connection]
mrfoto has joined #ruby
dkamioka has quit [Ping timeout: 250 seconds]
jkhwan has joined #ruby
Mars___ has joined #ruby
rubyracer has joined #ruby
dkamioka has joined #ruby
<Hanmac>
jchristi: Nokogiri::XML("<h><a></a> <b/></h>",nil,nil,Nokogiri::XML::ParseOptions::NOBLANKS).to_xml => "<h>\n <a/>\n <b/>\n</h>" as you can see the " " between a and b was removed and a and b was parsed as the same
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
mikepack has joined #ruby
aspires has joined #ruby
jkhwan_ has joined #ruby
m8 has joined #ruby
jkhwan has quit [Read error: Connection reset by peer]
typicalbender has quit [Ping timeout: 260 seconds]
Weazy has quit [Ping timeout: 260 seconds]
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zai00 has quit [Quit: Zai00]
Marco has quit [Remote host closed the connection]
typicalbender has joined #ruby
zz_CripperZ is now known as CripperZ
maninthemiddle_ has joined #ruby
athst has joined #ruby
fsck3r has joined #ruby
<shevy>
hmmm
<shevy>
I think #bioruby and bioruby is a little dead
blaskovicz has quit [Quit: Leaving.]
petey has quit [Remote host closed the connection]
petey has joined #ruby
petey has quit [Remote host closed the connection]
<fsck3r>
This is awesome
petey has joined #ruby
<fsck3r>
irccloud
failshel_ has joined #ruby
zz_tsykoduk is now known as tsykoduk
failshell has quit [Ping timeout: 245 seconds]
<shevy>
wat
<fsck3r>
Just happy to be able to connect from work
sbos99 has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
apeiros has joined #ruby
burlyscudd has quit [Quit: Leaving.]
jsaak has joined #ruby
nhhagen has joined #ruby
petey has quit [Ping timeout: 272 seconds]
hiall has quit [Ping timeout: 240 seconds]
pringlescan has joined #ruby
phansch has quit [Remote host closed the connection]
ukd1 has joined #ruby
dkamioka has quit [Remote host closed the connection]
<pringlescan>
has anyone had trouble on FreeBSD using gem? I tried to install /usr/ports/devel/ruby-gems with ruby 1.9. it installs without error but it can't find the gem command
Shidash has joined #ruby
ukd1 has quit [Remote host closed the connection]
VTLob has joined #ruby
Shidash has quit [Client Quit]
dkamioka has joined #ruby
yfeldblum has quit [Remote host closed the connection]
ukd1 has joined #ruby
gianlucadv has joined #ruby
yfeldblum has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
<ukd1>
does anyone know of an irb / equiv which can display inline images?
dkamioka_ has joined #ruby
nomenkun has joined #ruby
mikepack_ has joined #ruby
_amir has quit [Ping timeout: 245 seconds]
<fsck3r>
pringlescan: Did it create the necessary sym links for ruby?
<fsck3r>
are you able to run ruby1.9
bramdevries has joined #ruby
noop has joined #ruby
bentonrr has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 260 seconds]
dkamioka has quit [Ping timeout: 264 seconds]
saarinen has joined #ruby
h0rrorvacui has joined #ruby
sarlalian has quit [Read error: Connection reset by peer]
lukec has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
blaskovicz has joined #ruby
Mars____ has joined #ruby
jkhwan_ has quit [Remote host closed the connection]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
mmcdaris has quit [Quit: mmcdaris]
jkhwan has joined #ruby
bluOxigen has joined #ruby
arefaslani has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
Atrophius has quit [Ping timeout: 250 seconds]
wildroman2 has quit [Remote host closed the connection]
<mrfoto>
hi, im having trouble with chruby
s2013 has joined #ruby
momomomomo has quit [Quit: momomomomo]
<mrfoto>
it gives me `-bash: chruby: command not found` and I have the source in my .bashrc
Mars___ has quit [Ping timeout: 240 seconds]
<havenwood>
mrfoto: Either reload your terminal or source your .bashrc.
heidi has joined #ruby
timonv_ has quit [Remote host closed the connection]
<havenwood>
mrfoto: source ~/.bashrc
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
sarlalian has joined #ruby
<mrfoto>
havenwood: tried all that first, then I came here :P
thumpba has joined #ruby
dkamioka_ has quit [Remote host closed the connection]
<havenwood>
mrfoto: Wanna jump over to #chruby channel? Can probably get it sorted.
mary5030 has joined #ruby
<mrfoto>
oh, didnt know it existed, tnx!
brianpWins has quit [Quit: brianpWins]
jkhwan has quit [Read error: Connection reset by peer]
colonolGron has joined #ruby
jkhwan has joined #ruby
stringoO has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
duggiefresh has quit [Read error: Connection reset by peer]
dkamioka_ has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
amedeiros has joined #ruby
mklappstuhl has joined #ruby
amedeiros is now known as Guest88607
arefaslani has quit [Remote host closed the connection]
<havenwood>
mrfoto: But it does seem you're not getting the chruby source loaded, or the `chruby` function would be available. Double check you've not added the auto.sh source line twice or something, that you really are sourcing chruby.sh: source /usr/local/share/chruby/chruby.sh
danshultz has quit [Remote host closed the connection]
<s2013>
i have aquestion about something erally stupid but whats the difference between an enumerable and an array
<havenwood>
mrfoto: And that that chruby.sh file is indeed there (that chruby is installed).
danshultz has joined #ruby
jkhwan has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
ringaroses has joined #ruby
jkhwan has joined #ruby
duggiefresh has joined #ruby
<mrfoto>
havenwood: figured it out - my bashrc wasn't loading, just bash_profile, moved the source there, now it works
<mrfoto>
thanks!
<havenwood>
s2013: I think you're getting terminology a bit confused, but not a stupid question at all. Enumerable is actually in Array's ancestor chain: Array < Enumerable #=> true
jkhwan has quit [Remote host closed the connection]
momomomomo has joined #ruby
krainbol_ has joined #ruby
jkhwan has joined #ruby
mary5030_ has joined #ruby
danshultz has quit [Ping timeout: 240 seconds]
divi_ has joined #ruby
duggiefr_ has joined #ruby
<havenwood>
s2013: So I think what you mean is the difference between an Array and an Enumerator (both of which inherit from Enumerable).
krainbol_ has quit [Client Quit]
heidi has quit [Quit: Leaving.]
obs has quit [Quit: Saliendo]
failshel_ has quit [Remote host closed the connection]
<havenwood>
s2013: (Lots of folk get confused between Enumerator and Enumerable, just sound too similar I think.)
athst has quit [Quit: athst]
jkhwan_ has joined #ruby
<s2013>
sorry
<s2013>
yes i meant enumerator
failshell has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jkhwan has quit [Read error: Connection reset by peer]
heidi has joined #ruby
<s2013>
yeah they both inherit from enumerable
<Hanmac>
hmm its more true that both include Enumerable ... inherit is something different
<havenwood>
Hanmac: good point
blaskovicz has quit [Quit: Leaving.]
Czupa has quit [Read error: Operation timed out]
mary5030 has quit [Ping timeout: 264 seconds]
Czupa has joined #ruby
<Hanmac>
s2013: for sample File.foreach(path) returns a enumerator, its better than an Array for big files because it does not read the entire File at once
duggiefresh has quit [Ping timeout: 264 seconds]
mikee_ has quit [Ping timeout: 246 seconds]
s2013 has quit [Remote host closed the connection]
<momomomomo>
range = (1..50)
<momomomomo>
enumerator = range.lazy
nomenkun has joined #ruby
arefaslani has joined #ruby
SHyx0rmZ has joined #ruby
endash has quit [Read error: No route to host]
duggiefr_ has quit [Read error: Connection reset by peer]
amedeiro1 has joined #ruby
DropsOfSerenity has joined #ruby
<momomomomo>
To see the inclusion, range.method(:lazy).inspect
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
blaskovicz has joined #ruby
endash has joined #ruby
banister has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
wildroman2 has joined #ruby
bramdevries has quit []
duggiefresh has joined #ruby
camilasan has quit [Remote host closed the connection]
deception has joined #ruby
reset has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
Guest88607 has quit [Ping timeout: 252 seconds]
MattStratton has quit [Ping timeout: 264 seconds]
Jetchisel has joined #ruby
hiyosi has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
decoponio has quit [Quit: Leaving...]
amedeiro1 has quit [Ping timeout: 240 seconds]
johnny5stillaliv has joined #ruby
banister is now known as banisterfiend
johnny5stillaliv has quit [Remote host closed the connection]
mikee has joined #ruby
wrseward has quit [Ping timeout: 246 seconds]
agent_white has quit [Quit: brb]
Speed has joined #ruby
iliketur_ has joined #ruby
zeade has joined #ruby
johnnyfuchs has joined #ruby
johnnyfuchs has left #ruby [#ruby]
samphippen has joined #ruby
<platzhirsch>
Any idea why they use Liquid instead of ERuby in Jekyll?
agent_white has joined #ruby
johnny5stillaliv has joined #ruby
avalarion has joined #ruby
arefasla_ has joined #ruby
binaryplease has joined #ruby
kirun has joined #ruby
wildroman2 has quit [Remote host closed the connection]
mary5030_ has quit [Read error: Operation timed out]
<segfalt>
So I have a use case where I want to /murder a thread dead/ in a test to mimic the behavior of a killed process. Unfortunately Ruby is doing the right thing and running the cleanup code in my ensure block. Any workaround where I can take a particular thread and 100% stop it's execution completely?
athst has joined #ruby
moshee has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
aryaching has quit [Read error: Connection reset by peer]
awea has quit [Read error: Connection reset by peer]
DouweM has quit [Read error: Connection reset by peer]
casheew_ has quit [Read error: Connection reset by peer]
Astral_ has quit [Read error: Connection reset by peer]
<tobiasvl>
platzhirsch: yeah well, not all environments have the means to migrate to 2.0 in a jiffy just because you think they're lost if they don't ;)
athst has quit [Quit: athst]
<s2013>
my goodness
ringaroses1 has joined #ruby
<DouweM_>
(those were supposed to be sent earlier)
<platzhirsch>
If you don't update to the latest Ruby version, then you are doing it wrong
zaychenok has joined #ruby
<shevy>
but syck has been removed! :(
<platzhirsch>
if your production server is not updated to Ruby 2.1 on 25th December, then you are it wrong, too
Pixi__ has quit [Ping timeout: 246 seconds]
fella5s has quit [Ping timeout: 246 seconds]
* Hanmac
point and laugh about all 1.8.6 users
<jrobeson>
WRONG WRONG WRONG
brianpWins has joined #ruby
* jrobeson
is already on ruby 3.0
<tobiasvl>
platzhirsch: hehe. i'll make sure to pass it on and have the developers work on christmas day because someone on the internet told them they had to
<platzhirsch>
but then again, I never had a Ruby project with someone else but me. I have no idea what I am talking about :(
dkamioka has quit [Remote host closed the connection]
ringaroses has quit [Ping timeout: 260 seconds]
<tobiasvl>
platzhirsch: aha! that's why then :)
<platzhirsch>
;)
<RubyPanther>
if you don't update to a Ruby less than 3 years old, you're doing it wrong.
* Hanmac
test his stuff always against nightly ruby
dkamioka has joined #ruby
DouweM has joined #ruby
<shevy>
I will work together with Hanmac as soon as he finishes his wxwidget bindings!
xcv has joined #ruby
<platzhirsch>
tobiasvl: but I desperately want to
casheew has joined #ruby
breakingthings has joined #ruby
<havenwood>
s2013: just for the sake of it: .flatten.map { |x| x or :none }.each_slice(2).to_a
mzdravkov has joined #ruby
shedd has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros>
ew flatten
<havenwood>
hah
Eiam has joined #ruby
<apeiros>
epitome of "something went wrong before"
<Hanmac>
havenwood: what about flat_map ?
<RubyPanther>
5 years, tops, which would bring you to 1.8.7
<havenwood>
Hanmac: I was just being silly, but #flat_map wouldn't work since I need the input flat, not the output
<Hanmac>
yeah ... then it should be named map_flat ;P
<havenwood>
lol
angusigu1ss is now known as angusiguess
<s2013>
heh havenwood
nomenkun has joined #ruby
<tobiasvl>
platzhirsch RubyPanther: we (and all production servers) are on Red Hat Enterprise Linux 6, which just has ruby 1.8.7 :(
bluOxigen has quit [Ping timeout: 252 seconds]
dkamioka has quit [Ping timeout: 264 seconds]
Astral__ has quit [Ping timeout: 240 seconds]
<havenwood>
tobiasvl: can you use EPEL to get Fedora's modern, sane Ruby?
petey has quit [Remote host closed the connection]
<RubyPanther>
tobiasvl: I'm on Fedora 16, system ruby is 1.8.7. You're only supposed to use the system Ruby if you're making RPMs
awkwords has left #ruby [#ruby]
<havenwood>
RubyPanther: Fedora 19+ is ruby-2.0.0 :)
<platzhirsch>
tobiasvl: ah okay, and what hinders you from upgrading? never change a running system?
nomenkun_ has joined #ruby
shime has joined #ruby
<segfalt>
havenwood: Which hopefully means RHEL7 will be 2.0?
freerobby has quit [Quit: Leaving.]
<tobiasvl>
well, we'd like to, but resources
<RubyPanther>
havenwood: I hate upgrading, I don't want my software to change. Except the stuff I'm writing.
esing has joined #ruby
<RubyPanther>
I won't upgrade until my libraries stop working
<jrobeson>
fedora 16 is EOL isn't it?
<RubyPanther>
probably, the only updates I get are from 3rd party repos
<havenwood>
segfalt: I'd hope so!
<jrobeson>
now if only fedora would get a new redis ...
shedd has quit []
<RubyPanther>
tobiasvl: it isn't hard to package an RPM if you need one for a new Ruby
petey has joined #ruby
dmyers has joined #ruby
shedd has joined #ruby
maninthemiddle has quit [Quit: Page closed]
<platzhirsch>
tobiasvl: resources, so you mean no time to spent some time on that?
freerobby has joined #ruby
<RubyPanther>
30 minutes following a tutorial
nhhagen has quit [Remote host closed the connection]
<h0rrorvacui>
So for someone who doesn't have to manage a bunch of machines, why are you not using version managers or something?
nomenkun has quit [Ping timeout: 240 seconds]
blaskovicz1 has joined #ruby
<h0rrorvacui>
Is it bad practice to be compiling ruby on your production machines in an enterprise setting?
<h0rrorvacui>
I guess it could also not be your job to worry about that and therefore have no power over the decision.
<RubyPanther>
h0rrorvacui: when I've been in those settings, if there is a BOFH compilers aren't even allowed on those machines, and certainly not Ruby or Perl.
<mzdravkov>
I stumbled upon some wikipedia page about comparison of programming languages, and there ruby was described as aspect oriented. Do they have in mind that you can yield a block in a method and this way set a cut point that some "aspect" from outside can do something with passing a block?
<havenwood>
mzdravkov: i think it is just wikipedia gibberish nonsense, but dunno
blaskovicz2 has joined #ruby
blaskovicz has quit [Ping timeout: 264 seconds]
<mzdravkov>
havenwood: I thought the same, but decided that maybe just I don't understand something...
atmosx has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
psyl0n has quit [Remote host closed the connection]
<Hanmac>
that would happen, see the difference in the output: [BigDecimal("-0.0"),BigDecimal(-0.0,1)] #=> [#<BigDecimal:29e5348,'-0.0',9(18)>, #<BigDecimal:29e5190,'0.0',9(27)>]
petey has quit [Remote host closed the connection]
<louism2wash>
Hey guys, is there a way to call a method from inside a module using the fully namespaces syntax rather than including all that modules methods?
Shidash has quit [Read error: Connection timed out]
Mars___ has joined #ruby
dev1x is now known as wiscas
<slash_nick>
louism2wash: have you tried it?
wiscas is now known as rfx86
<louism2wash>
slash_nick: yes
<MrZYX>
show us your attempt
<shevy>
louism2wash what means "fully namespace syntax"
RaCx has joined #ruby
pzula has quit [Ping timeout: 245 seconds]
<shevy>
louism2wash you can define class methods and call these
<f0ster>
can I do something like this in my class, or should i do the initilization in a constructor, @@LivingChildren = Array.new
<tobiasvl>
don't use @@
hiall has joined #ruby
<slash_nick>
yikes
Shidash has joined #ruby
BizarreCake has quit [Ping timeout: 252 seconds]
einarj has quit [Remote host closed the connection]
<slash_nick>
don't capitalize your variable names
iliketur_ has joined #ruby
MetaCosm has quit [Read error: Operation timed out]
<slash_nick>
louism2wash: as shevy said, make it a class method... def self.photo_count(hash)
<shevy>
louism2wash append "extend self" and you can do that
relix has joined #ruby
iliketur_ has quit [Client Quit]
<MrZYX>
louism2wash: check module_function if both, including and calling it on the module should work
<Hanmac>
or use module_function
hiyosi has quit [Ping timeout: 260 seconds]
macmartine has quit [Ping timeout: 246 seconds]
pzula has joined #ruby
<shevy>
f0ster why do you use @@ exactly
<tobiasvl>
f0ster: first of all, @@vars are class variables, so no, you do not need to do it in initialization. that said, you shouldn't use classe variables, you should use @vars. those are instance variables and SHOULD get their value in initialization.
<f0ster>
because i need something like a static class var
<f0ster>
tobiasvl: I dont' think i need an instance variable
<Hanmac>
f0ster: you will learn about "class instance variables" in 3 ... 2 ... 1...
<CorySimmons>
Just echos the methods I've assigned to it
<MrZYX>
you don't assign methods
<DouweM>
CorySimmons: I have no idea what you're trying to do
<MrZYX>
you assign objects
<canton7>
CorySimmons, do you mean you want to create your own class, then list just the methods you defined in it?
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shredding has joined #ruby
<CorySimmons>
canton7: No, I'd like to step through pry and figure out the method chain I want step by step, then when I'm happy with the returned result, enter some command and get a list of the methods I've applied to that var over the history of my pry session
<CorySimmons>
I don't think it's possible
<CorySimmons>
As in, I don't think that kind of information is stored along with the var
<canton7>
oh! that was not clear at all
DropsOfSerenity has quit [Quit: Peace.]
<CorySimmons>
:[
psyl0n has joined #ruby
dpritchett has left #ruby ["goodbye"]
shedd has quit [Remote host closed the connection]
<CorySimmons>
Sorry, thought the paste illustrated it
<canton7>
no. it isn't. there a console log which shows everything you've done...
<ddd>
yeah was lurking and reading and that totally was not something i even remotely thought he meant
<CorySimmons>
:D
ae-r has quit [Remote host closed the connection]
<ddd>
i thought he wanted a list of the methods HE had added, none of the public ones
<CorySimmons>
Long day and my feet are cold
mzdravkov has left #ruby [#ruby]
<CorySimmons>
ddd that is what i want
<MrZYX>
check hist, help hist
Shidash has quit [Ping timeout: 264 seconds]
swills has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
<ddd>
no you want a list of each methoid you've stepped through
<canton7>
CorySimmons, methods you *called*, not methods you *added*
<ddd>
2 different things
xcv has joined #ruby
mansi has joined #ruby
xcv has quit [Read error: Connection reset by peer]
JohnBat26 has quit [Ping timeout: 272 seconds]
<CorySimmons>
MrZYX: How does hist differ from scrolling up buffer?
<MrZYX>
not much
awestroke has joined #ruby
<MrZYX>
you can filter it
xcv has joined #ruby
<MrZYX>
also save-file, help save-file
mary5030 has quit [Read error: No route to host]
mary5030 has joined #ruby
<CorySimmons>
I see
<CorySimmons>
That's as close as I'm gonna get I think
<canton7>
you could do some magic with wrapping Foo and implementing method_missing
<ddd>
iirc you can do something like YourClass.public_methods(false) to get the list of methods on a class you created
nomenkun has joined #ruby
petey has joined #ruby
<ddd>
the methods *you* defined
<ddd>
check that with the pry docs. banisterfiend has that in the tutorial iirc
mary5030 has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
g3orge has quit [Quit: WeeChat 0.4.2]
Mars___ has quit [Remote host closed the connection]
xcv has joined #ruby
Guest76116 has quit [Ping timeout: 250 seconds]
typicalbender has quit [Ping timeout: 252 seconds]
zoo-zed has quit [Quit: Leaving.]
asteros has joined #ruby
ravster has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
iliketur_ has quit [Quit: zzzzz…..]
hiyosi has joined #ruby
m_3 has quit [Remote host closed the connection]
ark_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshell has joined #ruby
jibi has quit [Ping timeout: 260 seconds]
mengu has joined #ruby
DouweM has quit [Ping timeout: 250 seconds]
mengu has quit [Changing host]
mengu has joined #ruby
<CorySimmons>
Man, it'd be pretty awesome
<CorySimmons>
I get the feeling that by reassigning foo, it loses previously applied methods though right?
iliketur_ has joined #ruby
psyl0n_ has joined #ruby
beneggett has joined #ruby
havenwood has quit [Remote host closed the connection]
<MrZYX>
get your concepts straight
havenwood has joined #ruby
<MrZYX>
a variable never ever would store "method calls to it"
mary5030 has joined #ruby
xcv has quit [Ping timeout: 272 seconds]
<MrZYX>
an object could but that'd need to be implemented inside it
<MrZYX>
it'd be a property of the object, not the variable
paulczar has joined #ruby
Mars__ has joined #ruby
maletor has joined #ruby
<CorySimmons>
Ok thanks guys
Clooth has quit [Ping timeout: 245 seconds]
rehat has quit [Remote host closed the connection]
<paulczar>
any rubocop people here? trying to work out how to skip certain cops … e.g. 'line is too long'
mlpinit has quit [Quit: Leaving...]
timonv has quit [Remote host closed the connection]
psyl0n has quit [Ping timeout: 264 seconds]
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
allsystemsarego has quit [Quit: Leaving]
jacobsmith has joined #ruby
mark_locklear has quit [Ping timeout: 272 seconds]
tylershipe has quit [Remote host closed the connection]
<MrZYX>
use public_send
Authenticator has quit [Quit: leaving]
<MrZYX>
so you notice that you start calling private methods
tylershipe has joined #ruby
blackmesa has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
<canton7>
good poitn
<ddd>
CorySimmons: I'm wrong on my public_methods(false). I'm trying to find it. he showed me the command once to *only* see the methods defined within the Class definition itself, just not finding it
R33C3 has quit [Remote host closed the connection]
jacobsmith has quit [Ping timeout: 245 seconds]
<CorySimmons>
This is pretty interesting stuff though. It'll make living in pry a joy
awestroke has quit [Remote host closed the connection]
<canton7>
the wrapper makes a record of every method that's called, then calls that method on the object it's wrapped, gets the result, wraps that up, and returns it
psyl0n_ has quit [Remote host closed the connection]
<CorySimmons>
Whereas the new version is making a new object to assign to
Xeago has quit [Remote host closed the connection]
<Hanmac>
CorySimmons: gsub returns an total new string
<CorySimmons>
right canton7?
phipes has joined #ruby
<canton7>
so the old version updated a WrappedObject's log whenever a method was called, and passes that updated log onto the returned WrappedObject
<canton7>
the new one doesn't update the WrappedObject's log, just adds something to the log it passes to the returned WrappedObject's log
blackmesa has joined #ruby
stringoO has quit [Quit: stringoO]
<canton7>
you could also modify it to do something like 'foo.upcase # ok, that was good. foo.record'
<CorySimmons>
canton7: Works perfect!!
jbpros has quit [Quit: jbpros]
<CorySimmons>
:D
<Hanmac>
CorySimmons: your method missing need to check if the method has ! or not ...
<CorySimmons>
This is soooo cool
<CorySimmons>
Makes exploring methods in the console such a joy
b00stfr3ak has quit [Ping timeout: 250 seconds]
sethetter has left #ruby [#ruby]
hiall has quit [Quit: hiall]
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
user5555 has joined #ruby
R33C3 has joined #ruby
hiall has joined #ruby
<CorySimmons>
canton7: Thank you so much!
mikepack has quit [Remote host closed the connection]
_amir has joined #ruby
<CorySimmons>
Should turn this into a repo :)
<user5555>
Hey, does anyone know a way to remove the '.rb' from a file and just make the file have the name only? Basically, you remove the .rb as the file type?
nhhagen has quit [Remote host closed the connection]
<redondos>
hello. what's a more idiomatic way of extracting "two" from this string? "one.two.three.four" - this is what i'm doing: c.sub(/(.\w+){2}$/, "").sub(/.*\./, "")
<redondos>
MrZYX: it's a domain name, and i want the third to last. so i think split on . and get -2?
<user5555>
MrZYX: I am not acutally trying to program something to do it. I am actually physically trying to change the file name myself. For whatever reason, windows doesn't seem to give me the option to change the file type when I go to properties.
<CorySimmons>
of "recording"
<canton7>
the log?
<canton7>
yeah, it's ordered
<CorySimmons>
yeah
<CorySimmons>
k
<canton7>
Array#<< appends
<MrZYX>
user5555: google windows and well known file extensions
gigetoo has quit [Ping timeout: 245 seconds]
<MrZYX>
redondos: yup, also check Array#last
<CorySimmons>
Ah I see
<CorySimmons>
canton7: You should seriously turn this into a github repo
<CorySimmons>
canton7: Can you add a -simple flag in there that just echos out .downcase.gsub('t', 'p') instead of [{:method=>:downcase!, :args=>[]}, {:method=>:gsub, :args=>["t", "p"]}] ?
cpruitt has joined #ruby
sepp2k has joined #ruby
jkhwan has joined #ruby
failshell has quit [Read error: Operation timed out]
<CorySimmons>
Have twitter man?
shime has joined #ruby
amoli has joined #ruby
jacobsmith has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
mikepack has joined #ruby
<user5555>
MrZYX: I think I found the answer via google, thanks for the help.
interactionjaxsn has quit [Remote host closed the connection]
failshel_ has quit [Ping timeout: 246 seconds]
ambushsabre has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
threesome has quit [Read error: Operation timed out]
petey has quit [Remote host closed the connection]
<canton7>
CorySimmons, right, bedtime for me. If you update it, comment on that gist :)
petey has joined #ruby
<CorySimmons>
Thanks so much man
<CorySimmons>
<3 you :D
RoryHughes has joined #ruby
elux has quit [Quit: Bye!]
shadoi has joined #ruby
kcombs_ has quit [Remote host closed the connection]
MattStratton has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
matheuscaceres has joined #ruby
jkhwan has quit [Remote host closed the connection]
mdel has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
jkhwan has joined #ruby
petey has quit [Ping timeout: 246 seconds]
jkhwan has quit [Read error: Connection reset by peer]
jkhwan has joined #ruby
petey has joined #ruby
CorySimmons has quit [Quit: Leaving.]
otherj has joined #ruby
DouweM has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.2]
tanema has quit [Remote host closed the connection]
<user5555>
So, I was told, that is I remove the .rb extension from a file, add a shebang at the top of the file like this "#!/usr/bin/env ruby", I should be able to go to that directory via command line and type bin/studio_game and the file will run. However it does not. Does the shebang method not work anymore?
bluOxigen has quit [Ping timeout: 272 seconds]
mengu has quit [Remote host closed the connection]
drumusician has quit [Ping timeout: 246 seconds]
ctsimpson has joined #ruby
macmarti_ has quit [Remote host closed the connection]
tanema_ has joined #ruby
DanBoy has joined #ruby
macmartine has joined #ruby
<jwest>
user5555: Try ./studio_game
Animawish has joined #ruby
xcv has joined #ruby
luckyruby has joined #ruby
brunto has joined #ruby
<user5555>
jwest: Doesn't work either.
<Eiam>
or chmod +x
<Eiam>
then try it..
fedesilva has quit [Remote host closed the connection]
CripperZ is now known as zz_CripperZ
<user5555>
Eiam: I tried that, I am on window, not Unix (mac or PC)
<matled>
haha, that's like trying a blind shell injection :)
<Eiam>
you'd either need to say "ruby studio_game" or chmod +X studio_game; ./studio_game
R33C3 has quit [Remote host closed the connection]
canton7-mobile has joined #ruby
<Eiam>
oh windows.. bummer.
capicue has quit [Quit: Leaving...]
zz_tsykoduk is now known as tsykoduk
macmartine has quit [Remote host closed the connection]
<user5555>
Eiam: It shouldn't be a bummer, because the extra work is necessary on the Unix machines, not the windows.
macmartine has joined #ruby
yfeldblum has joined #ruby
<user5555>
Eiam: You shouldn't need to do chmod stuff on windows.
<Eiam>
I don't mind if you enjoy doing development work on Windows, thats your pain to deal with & manage
burlyscudd has quit [Quit: Leaving.]
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Myk267>
Is it weird to iterate over an array like this: a[0..a.length] ?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Eiam>
Myk267: yes...
shadoi has quit [Quit: Leaving.]
<user5555>
Eiam: It says bin is not a recognized as an internal or external command when I type "bin/studio_game"
<Eiam>
Myk267: a[0..-1] ?
tanema_ has quit [Ping timeout: 246 seconds]
<Eiam>
user5555: honestly, I have not used Windows for anything other than launching a game from steam in over 10 years. I barely remember how "dir" works or what options it supports. I won't be able to help you out any further sorry.
sebkomianos has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
<Myk267>
Eiam: hey hey, that seems nicer. Thanks!
<MrZYX>
user5555: how should a shebang work in windows if there's isn't even a /usr/bin directory nor a env(.exe) in it?
<Eiam>
MrZYX: powershell magic?! who knows.
<user5555>
MrZYX: I have my seperated into three folders. bin, lib, and spec
<user5555>
the file is in the bin directory
<Myk267>
b
<MrZYX>
Myk267: Eiam: uhm, maybe I'm missing something, but a[0..-1] == a
phansch has joined #ruby
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<Eiam>
MrZYX: right, it totally does equal that...
Cork has quit [Ping timeout: 245 seconds]
<MrZYX>
so what's the point?
<Eiam>
MrZYX: he said iterate but he shows array accessors, not an enumerator
<Myk267>
MrZYX: a is just some array, in this case.
<MrZYX>
a.each
<Eiam>
*shrug* I just provided a more concise way to do a[0..a.length]
<MrZYX>
done
<user5555>
MrZYX: The point is that the file and directory are there, it is not finding it and it makes zero sense.
<Eiam>
MrZYX: but yes, you are correct that its not any sort of "enumeration" going on, I figured he knew what he wanted and was just using the wrong words =)
<MrZYX>
user5555: using a shebang on windows makes zero sense to me. But then I don't use windows
<Eiam>
user5555: a shebang is a unix construct.
<user5555>
It was so that I wouldn't have to type ruby befor running something, but maybe this is just stupd to be doing.
<MrZYX>
user5555: but I see those .bat files in all the cross platform projects, can't imagine why they'd put that there if windows knew shebangs
<Eiam>
it lets the loader know it should parse and use the directive supplied after the shebang.
mmcdaris has quit [Quit: mmcdaris]
<user5555>
What eiam said basically.
<user5555>
You put the shebang at the top of the file.
jibi has joined #ruby
R33C3 has joined #ruby
<Eiam>
wait, don't flip me to your side
Cork has joined #ruby
<Eiam>
I'm on MrZYX's side here ;)
<MrZYX>
:D
R33C3 has quit [Client Quit]
<Eiam>
using a shebang to indicate *anything* on Windows makes 0 sense.
mansi has quit [Remote host closed the connection]
<Eiam>
its not a windows construct.
<jwest>
user5555: That's for unix. Windows doesn't understand it at all.
<MrZYX>
Eiam: did you know you can register .exe files in the kernel so it runs them through wine?
funburn has joined #ruby
<Eiam>
MrZYX: I honestly don't want to know anything about windows. Using it from 3.1 to XP was years of my life I wish I could have spent using some variation of unix instead
preller has quit [Ping timeout: 240 seconds]
duggiefr_ has quit [Ping timeout: 264 seconds]
rubyracer has quit [Quit: Konversation terminated!]
thelorax123 has quit [Remote host closed the connection]
<user5555>
jwest: I think you are right. I'm just going to move on and continue. I will just leave it at the top of the file, but it will be useless to me I guess unless I'm on a linux or mac.
blaskovicz has quit [Quit: Leaving.]
ylluminate has joined #ruby
jacobsmith has joined #ruby
danshultz has joined #ruby
Lewix has quit [Remote host closed the connection]
timonv has joined #ruby
canton7-mobile has quit [Read error: Connection reset by peer]
mmcdaris has joined #ruby
canton8 has joined #ruby
thelorax123 has joined #ruby
ambushsabre has joined #ruby
mansi has joined #ruby
drag00n has quit [Ping timeout: 250 seconds]
duggiefresh has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
zombiebit has joined #ruby
mansi has joined #ruby
duggiefresh has joined #ruby
dkamioka has quit [Remote host closed the connection]
h0rrorvacui has quit [Quit: Leaving]
canton8 has quit [Client Quit]
lfox has quit [Quit: ZZZzzz…]
h0rrorvacui has joined #ruby
danshultz has quit [Ping timeout: 246 seconds]
timonv has quit [Ping timeout: 252 seconds]
sailias has quit [Ping timeout: 264 seconds]
duggiefresh has quit [Remote host closed the connection]
Animawish has quit [Quit: Animawish]
xcv has quit [Remote host closed the connection]
javon has quit [Ping timeout: 272 seconds]
xcv has joined #ruby
macmartine has quit []
newbiehacker has quit [Ping timeout: 264 seconds]
ctsimpson has quit [Remote host closed the connection]
nhhagen has joined #ruby
dawkirst has joined #ruby
duggiefresh has joined #ruby
<maletor>
What is \x01?
xcv has quit [Ping timeout: 272 seconds]
shadoi has joined #ruby
ce_afk is now known as cescalante
typicalbender1 has joined #ruby
typicalbender has quit [Read error: Connection reset by peer]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
preller has joined #ruby
cbetta_afk is now known as cbetta
Bira has joined #ruby
typicalbender1 has quit [Client Quit]
claymore has quit [Quit: Leaving]
liamkeily has joined #ruby
zombiebit has quit [Remote host closed the connection]
<Eiam>
its a c-style character scape
zombiebit has joined #ruby
agjacome has quit [Ping timeout: 264 seconds]
zombiebit has quit [Remote host closed the connection]
zombiebit has joined #ruby
blackmesa has joined #ruby
petey has quit [Remote host closed the connection]
otherj has quit []
Megtastique has quit []
larissa has quit [Quit: Leaving]
pragmatism is now known as pragmatism|away
mando has quit [Remote host closed the connection]
polaco is now known as polaco_zZz
mando has joined #ruby
timonv has joined #ruby
capicue has joined #ruby
RoryHughes has quit []
dayepa1 has quit [Ping timeout: 246 seconds]
pel_daniel has left #ruby [#ruby]
nobitanobi has quit [Read error: Connection reset by peer]
lmickh has quit [Quit: lmickh]
Nogbit has joined #ruby
user5555 has quit [Quit: Page closed]
shadoi has quit [Quit: Leaving.]
kirun has quit [Quit: Client exiting]
Lewix has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
Lewix has quit [Remote host closed the connection]
nobitanobi has joined #ruby
mando has quit [Ping timeout: 245 seconds]
blackmesa has quit [Quit: WeeChat 0.4.2]
timonv has quit [Ping timeout: 264 seconds]
timonv has joined #ruby
Xeago has joined #ruby
duggiefresh has quit [Remote host closed the connection]
pel_daniel1 has joined #ruby
zombiebit has quit [Remote host closed the connection]
zombiebit has joined #ruby
davy_ has quit [Remote host closed the connection]
burlyscudd has joined #ruby
petey has joined #ruby
davy_ has joined #ruby
wildroman2 has joined #ruby
mootpointer has joined #ruby
preller has quit [Ping timeout: 240 seconds]
burlyscudd has quit [Client Quit]
mansi has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
thumpba has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 272 seconds]
zombiebit has quit [Ping timeout: 240 seconds]
javon has joined #ruby
kh019267 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duggiefresh has quit [Remote host closed the connection]
aryaching has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
nobitanobi has quit [Ping timeout: 246 seconds]
mary5030 has quit [Remote host closed the connection]
kpshek has quit []
pragmatism|away is now known as pragmatism
mansi has quit [Ping timeout: 250 seconds]
Xeago has quit [Ping timeout: 240 seconds]
m8 has quit [Quit: Sto andando via]
superscott[8] has joined #ruby
dkamioka has joined #ruby
preller has joined #ruby
ctsimpson has joined #ruby
Zai00 has quit [Quit: Zai00]
<redondos>
MrZYX: going back to my question, sometimes I need to extract "colo" from server.colo.domain.com, sometimes from server.colo.country.domain.com
<redondos>
how do you recommend doing this staying idiomatic?
<MrZYX>
never from "colo.domain.com" or "foo.server.colo.domain.com"?
Shidash has quit [Ping timeout: 264 seconds]
coca_rails has quit [Remote host closed the connection]
javon has quit [Ping timeout: 250 seconds]
<redondos>
not the first one, but the latter can occur
klaut has quit [Remote host closed the connection]
appineer has quit [Quit: appineer]
<redondos>
i want to do that without a bunch of conditionals. something that looks nicer in ruby
xcv has joined #ruby
blaskovicz has joined #ruby
Viridisignis has joined #ruby
asteros has quit [Quit: asteros]
almarshall has joined #ruby
<MrZYX>
mmh, I guess I'd end up with something like string[/\.(\w)+\.(us|ca|\w+\.\w+$)/, 1] (didn't test, so maybe not that exact version)
amedeiros has joined #ruby
asteros has joined #ruby
<MrZYX>
(\w)+ -> (\w+) of course
divi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dkamioka has quit [Remote host closed the connection]
mjs2600 has quit [Remote host closed the connection]
banghouse2 has joined #ruby
banghouse2 has quit [Client Quit]
nobitanobi has joined #ruby
nobitanobi has quit [Client Quit]
jn_ has joined #ruby
jn_ has quit [Client Quit]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
funburn has quit [Read error: Connection reset by peer]
cpruitt has quit [Quit: cpruitt]
amedeiros has quit [Quit: leaving]
yfeldblum has quit [Remote host closed the connection]
funburn has joined #ruby
yfeldblu_ has joined #ruby
geggam has quit [Remote host closed the connection]
agent_white has quit [Ping timeout: 246 seconds]
amedeiros has joined #ruby
coca_rails has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
dwgill has quit [Quit: Leaving]
ctsimpson has quit [Remote host closed the connection]
tylersmith has joined #ruby
funburn has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
taion809 has joined #ruby
jpagano_ has joined #ruby
breakingthings has quit []
atmosx has joined #ruby
Shidash has joined #ruby
<jpagano_>
real simple question guys but for some reason I can't find it by googling… what is the @ symbol used for in ruby? like in the beginning if a variable declaration @variable ?
<jpagano_>
local variable?
<sebkomianos>
jpagano_: global
freerobby has quit [Quit: Leaving.]
nfk has quit [Quit: yawn]
<jpagano_>
oh ok
<jpagano_>
thanks
<MrZYX>
jpagano_: sebkomianos no it's not a global, it's an instance variable