apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
sailias has joined #ruby
wookiehangover has joined #ruby
sailias has quit [Client Quit]
vitor-br has quit [Ping timeout: 246 seconds]
wilmoore has quit [Remote host closed the connection]
wilmoore has joined #ruby
fflush has joined #ruby
fflush has quit [Changing host]
fflush has joined #ruby
piotr has quit [Ping timeout: 246 seconds]
`brendan has joined #ruby
tiripamwe has quit [Ping timeout: 252 seconds]
DrShoggoth has quit [Quit: Leaving]
Chryson has joined #ruby
wilmoore has quit [Ping timeout: 240 seconds]
randomautomator has joined #ruby
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
randomau_ has joined #ruby
wookiehangover has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
nari has quit [Ping timeout: 255 seconds]
wookiehangover has joined #ruby
crankycoder has quit [Remote host closed the connection]
randomau_ has quit [Remote host closed the connection]
ilyam has quit [Quit: ilyam]
Mission-Critical has joined #ruby
randomautomator has quit [Ping timeout: 246 seconds]
cantonic has left #ruby [#ruby]
IPGlider has quit []
two_OMind1 has left #ruby ["PING 1342138445"]
pdtpatrick has quit [Quit: pdtpatrick]
pdtpatrick_ is now known as pdtpatrick
chrismcg is now known as zz_chrismcg
Mission-Critical is now known as MissionCritical
maletor has quit [Quit: Computer has gone to sleep.]
Boondox has quit [Read error: Connection reset by peer]
Boondox has joined #ruby
Hertz has joined #ruby
soulcake has quit [Ping timeout: 248 seconds]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
bbttxu has quit [Quit: bbttxu]
cdavaz has joined #ruby
tiripamwe has joined #ruby
davidpk has quit [Ping timeout: 248 seconds]
Iszak has joined #ruby
Ontolog has quit [Read error: Operation timed out]
DrShoggoth has joined #ruby
two_OMind1 has joined #ruby
cdavaz has quit [Read error: No route to host]
cdavaz has joined #ruby
<two_OMind1> who am I?
<Iszak> So I have this gem i want to install, but apparently it's not for my platform. I want to force install it, I've tried -f but it still doesn't install. Help?
DrShoggoth has quit [Read error: Connection reset by peer]
davidpk has joined #ruby
two_OMind1 has left #ruby ["JOIN #ruby"]
cdavaz is now known as Ontolog
jimeh has quit [Ping timeout: 248 seconds]
jfelchner has quit [Ping timeout: 244 seconds]
soulcake has joined #ruby
fgsda has quit [Ping timeout: 252 seconds]
mrsolo has quit [Quit: Leaving]
Iszak has quit [Quit: Page closed]
<ctor> If I have previously defined @url, @method, and @data as strings, what is wrong with this statement? url = url + method=='GET'? '&'+data : ''
<mdszy> you have to put the @ signs
<ctor> Even though they were previously defined with the @ signs?
<mdszy> Yes.
<ctor> k
<mdszy> That's the name of the variable
<mdszy> that's like saying
<mdszy> my_variable
<mdszy> you define it as
<mdszy> and trying to use it as
<mdszy> this_is_my_variable
xaq has quit [Read error: Connection reset by peer]
krzkrzkrz has joined #ruby
<ctor> I see. When do you use a variable without the @?
<mdszy> When it's a local variable
<mdszy> @-variables are instance variables
xaq has joined #ruby
<mdszy> used inside of classes
<ctor> oooh
<mdszy> if this isn't inside of a class, you shouldn't have any @-sign
<mdszy> brb
<ctor> It is, but I'm writing each line out in irb to test something
<ctor> I left out the class part
fflush has quit [Quit: fflush]
ackz has quit [Quit: Leaving...]
krz has quit [Ping timeout: 244 seconds]
krzkrzkrz is now known as krz
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
<mdszy> back
<ctor> The example I used to figure this out was confusing. So class foo // @var = '' // def bar(var) //end //end refers to the wrong var?
<mdszy> ctor: They're different variables. var is just the argument passed to bar(). @var is nothing.
<mdszy> One sec, I'll have an example in just a minute
<mdszy> brb again
mrdodo has joined #ruby
<ctor> k
Husel has joined #ruby
<mdszy> back
chriskk has quit [Ping timeout: 246 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
<ctor> wb
linoj has joined #ruby
Araxia has quit [Quit: Araxia]
<mdszy> thanks
jobicoppola has joined #ruby
<mdszy> ctor: Variables that are arguments to methods are never initalized first
<mdszy> and they shouldn't be instance variables
RORgasm has joined #ruby
<mdszy> in ruby, you don't need to initalize variables like that
csamuelson has joined #ruby
jobicoppola has quit [Client Quit]
theskyisdrunk has quit [Quit: Leaving.]
<ctor> suppose this file will be passed around and the guy wants me to set a few variables at the start of the class that users can alter and will propagate throughout
<ctor> Will that work?
<ctor> That's why I have @var after class, then passed as an argument to defs
ViperMaul has quit [Read error: Connection reset by peer]
<mdszy> one second
Rious has quit [Ping timeout: 265 seconds]
Rizzle has joined #ruby
jchauncey has joined #ruby
samuelkadolph has quit [Ping timeout: 265 seconds]
jchauncey has quit [Client Quit]
csamuelson is now known as Rious
samuelkadolph has joined #ruby
alup has quit [Ping timeout: 244 seconds]
alup has joined #ruby
chriskk has joined #ruby
zrail|home has joined #ruby
syamajala has quit [Remote host closed the connection]
kenichi has quit [Remote host closed the connection]
Boondox has quit [Quit: Leaving]
maltray has joined #ruby
locriani has joined #ruby
<maltray> Hello guys, I was wondering, is there any kind of let for rspec in ruby (not rails)?
<maltray> I tried googling about it but its damn hard to find something that's not related to rails lol
<mdszy> maltray: A testing framework?
<maltray> mdszy no, let, you know.. when i write tests on rails with rspec im allowed to use let(:something) { this is what it has}
<maltray> but i dunno why i cant do that just in ruby
<mdszy> Oh, I have no clue then.
monkegjinni has quit [Remote host closed the connection]
MatthewGA has quit [Ping timeout: 246 seconds]
M3nti0n is now known as M3nti0n|off
<maltray> i need like fixtures, but meh, its hard to try to find something that's JUST for ruby and not for ruby on rails
<mdszy> maltray: another framework? :P
<maltray> also, google wouldnt take my + !rails like i used sometimes lol
<maltray> you mean changing rspec?
eywu has quit [Quit: Leaving.]
<maltray> mdszy; thats not what i want to do though, as im a noob in ruby im making this project to get better, too :)
Ontolog has quit [Read error: No route to host]
<maltray> and in my job we use rspec for testing so i thought it would be a good idea to use it here
<mdszy> Ah
<mdszy> I don't use Rspec
Dave has joined #ruby
sei has joined #ruby
Dave is now known as Guest81473
hakunin_ has joined #ruby
Markvilla has joined #ruby
BeLucid has joined #ruby
hayer has joined #ruby
KylieBrooks has quit [Read error: Connection reset by peer]
stefanp_ has quit [Read error: Connection reset by peer]
stefanp has joined #ruby
stefanp has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
hakunin has quit [Read error: Connection reset by peer]
BeLucid_ has quit [Read error: Connection reset by peer]
<hayer> Why is the tryruby.org so slow? I mean, really sloooow..
<mdszy> hayer: Solution: IRB
<hayer> IRB? Interactive Ruby Bashshell? >_>
indeterminate has quit [Ping timeout: 265 seconds]
<hayer> mdszy
<mdszy> Interactive Ruby
<mdszy> it's like Tryruby
<mdszy> but on your computer
<mdszy> unless you're on windows
oscardelben has joined #ruby
<mdszy> in which case I don't understand why you're trying to use Ruby
<hayer> the problem is that i want to follow the tutorial.. >_>
<mdszy> well then you're stuck with it, or find a real tutorial
<hayer> any links or tips?
iamjarvo has quit [Quit: Computer has gone to sleep.]
<ctor> mdszy: just got back from a phone call. In the example you linked you put the variable in the initialization for the user to alter.. What was the my_class_instance part? A demonstration of something else?
<mdszy> hayer: Look up Mr. Neighborly's Humble Little Ruby Book
<mdszy> hayer: I used that book, love it to death
<mdszy> ctor: That means that if you have like
<mdszy> my_class_instance = MyClass.new
emmanuelux has quit [Ping timeout: 246 seconds]
hrs_ has joined #ruby
<mdszy> you can do
<mdszy> my_class_instance.var = "whatever"
<mdszy> and you can change the value of @var in MyClass
<ctor> Ah
<mdszy> ctor: If you don't understand the very basics of Ruby, you should just look up a book about it.
<mdszy> there are a bunch of free ones online
<ctor> Will do.
linoj has quit [Quit: linoj]
tiripamwe has quit [Quit: Leaving]
* ctor will rtfm.
tiripamwe has joined #ruby
<mdszy> good idear
artOfWar_ has quit [Ping timeout: 250 seconds]
ryanf has quit [Quit: leaving]
g_rotbart has quit [Read error: Connection reset by peer]
schickung has joined #ruby
g_rotbart has joined #ruby
maltray has quit [Quit: Leaving]
sebicas has quit [Quit: sebicas]
manizzle_ has quit [Read error: Operation timed out]
hrs_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kvirani has joined #ruby
manizzle has quit [Ping timeout: 244 seconds]
mrdodo has quit [Remote host closed the connection]
cbuxton has quit [Ping timeout: 246 seconds]
crankycoder has joined #ruby
mrdodo has joined #ruby
Squee-D has joined #ruby
sebicas has joined #ruby
Targen has joined #ruby
savage- has quit [Ping timeout: 240 seconds]
crankycoder has quit [Ping timeout: 246 seconds]
mrdodo has quit [Ping timeout: 252 seconds]
apok_ has joined #ruby
ken_barber has quit [Remote host closed the connection]
ZachBeta has joined #ruby
zz_chrismcg is now known as chrismcg
true_techie has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0/20120710123126]]
apok has quit [Ping timeout: 240 seconds]
apok_ is now known as apok
apok has quit [Remote host closed the connection]
apok has joined #ruby
kvirani has quit [Remote host closed the connection]
uris has joined #ruby
chrismcg is now known as zz_chrismcg
ZachBeta has quit [Quit: Computer has gone to sleep.]
nari has joined #ruby
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Hanmac1 has joined #ruby
MatthewGA has joined #ruby
Hanmac has quit [Ping timeout: 250 seconds]
niklasb has quit [Read error: Operation timed out]
Markvilla has quit [Quit: Markvilla]
hibariya_ has joined #ruby
Osum has quit [Ping timeout: 255 seconds]
Markvilla has joined #ruby
wmoxam has joined #ruby
maletor has joined #ruby
Markvilla has quit [Client Quit]
shadoi has quit [Ping timeout: 248 seconds]
adamkittelson has joined #ruby
apok_ has joined #ruby
Z_Mass has quit [Quit: Leaving]
Araxia has joined #ruby
apok has quit [Read error: Operation timed out]
sei has quit [*.net *.split]
chson has quit [*.net *.split]
angelixd has quit [*.net *.split]
bowlowni_ has quit [*.net *.split]
jmccune has quit [*.net *.split]
Poapfel has quit [*.net *.split]
anothervenue has quit [*.net *.split]
udante has quit [*.net *.split]
Fretta has quit [*.net *.split]
idoru has quit [*.net *.split]
pk1001100011 has quit [*.net *.split]
wangr has quit [*.net *.split]
hilolih has quit [*.net *.split]
RichieEvans has quit [*.net *.split]
alindeman has quit [*.net *.split]
Y_Ichiro has quit [*.net *.split]
zaiste has quit [*.net *.split]
mahlon has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
piggybox has quit [*.net *.split]
UNIXgod has quit [*.net *.split]
sernin has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
jord has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
joast has quit [*.net *.split]
rakm has quit [*.net *.split]
ping-pong has quit [*.net *.split]
ahuman has quit [*.net *.split]
thorncp has quit [*.net *.split]
preller has quit [*.net *.split]
Tasser has quit [*.net *.split]
tightwork has quit [*.net *.split]
tris has quit [*.net *.split]
rudle has quit [*.net *.split]
offby1 has quit [*.net *.split]
bnagy has quit [*.net *.split]
faulkner has quit [*.net *.split]
FlyingFoX has quit [*.net *.split]
verto has quit [*.net *.split]
c0rn has quit [*.net *.split]
preller has joined #ruby
preller has quit [Changing host]
preller has joined #ruby
kevinbond has left #ruby [#ruby]
Poapfel has joined #ruby
bbloom has joined #ruby
apok_ has quit [Ping timeout: 244 seconds]
<bbloom> I'm trying to wrap my head around encoding.h; how do I go from wchar_t* to a string VALUE ?
SheikPunk has joined #ruby
SheikPunk has quit [Client Quit]
maletor has quit [Ping timeout: 246 seconds]
Osum has joined #ruby
ben_alman has quit [Excess Flood]
<Ethan> bbloom: uh
khakimov has joined #ruby
frogstarr78 has joined #ruby
frogstarr78 has quit [Client Quit]
stephenjudkins has quit [Quit: stephenjudkins]
afd__ has quit [Quit: No Ping reply in 180 seconds.]
afd__ has joined #ruby
ben_alman has joined #ruby
pdtpatrick_ has joined #ruby
cakehero has joined #ruby
mucker has quit [Quit: leaving]
maletor has joined #ruby
anothervenue has joined #ruby
hilolih has joined #ruby
chson has joined #ruby
sernin has joined #ruby
bowlowni_ has joined #ruby
alindeman has joined #ruby
sei has joined #ruby
jmccune has joined #ruby
zaiste has joined #ruby
Fretta has joined #ruby
jord has joined #ruby
RichieEvans has joined #ruby
wangr has joined #ruby
mahlon has joined #ruby
angelixd has joined #ruby
Y_Ichiro has joined #ruby
pk1001100011 has joined #ruby
piggybox has joined #ruby
RubyPanther has joined #ruby
Sou|cutter has joined #ruby
jmeeuwen has joined #ruby
joast has joined #ruby
rakm has joined #ruby
UNIXgod has joined #ruby
verto has joined #ruby
thorncp has joined #ruby
tightwork has joined #ruby
faulkner has joined #ruby
offby1 has joined #ruby
tris has joined #ruby
ping-pong has joined #ruby
rudle has joined #ruby
bnagy has joined #ruby
ahuman has joined #ruby
FlyingFoX has joined #ruby
Tasser has joined #ruby
c0rn has joined #ruby
cbuxton has joined #ruby
ctor has quit [Excess Flood]
maletor has quit [Max SendQ exceeded]
cbuxton has left #ruby [#ruby]
ctor has joined #ruby
alindeman is now known as Guest78592
maletor has joined #ruby
fgro has joined #ruby
EstanislaoStan has joined #ruby
CreativeEmbassy has joined #ruby
savage- has joined #ruby
fgsda has joined #ruby
williamcotton_ has joined #ruby
jarred has quit [Quit: jarred]
indian has quit [Read error: Operation timed out]
maletor has quit [Ping timeout: 250 seconds]
adamkittelson has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 246 seconds]
seoaqua has joined #ruby
Husel has left #ruby [#ruby]
iamjarvo has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
<EstanislaoStan> So I'm creating a text adventure. And I was thinking about making a simple Command class that requires a "name" argument. Then making all my other command classes inherit from that. So if I want a player to be able to type go and go in a certain direction, I need to make a class for that, whereas before I was just making a method that would do that. That seems like more work, and I'm wondering
<EstanislaoStan> why I would even need a class for all these things when I'm probably going to only create one object of most of the general stuff like go, or attatck and such. So should I make classes for each type of command?
<EstanislaoStan> *attack
<fowl> EstanislaoStan, you could use prototypes or something other than classes if you want
<fowl> you could just use methods even
<fowl> commands = { "go" => proc { |*args| ... } , ... }
jfelchner has joined #ruby
lion|wrk has joined #ruby
wmoxam has joined #ruby
pting has quit [Quit: Ex-Chat]
oscardelben has quit [Quit: oscardelben]
[Neurotic] has quit [Quit: Leaving]
lkba has quit [Ping timeout: 244 seconds]
[Neurotic] has joined #ruby
CreativeEmbassy has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
cdavaz has joined #ruby
cdavaz is now known as Ontolog
<EstanislaoStan> I guess I'm trying to just keep a consistent way of dealing with player commands. The problem is that the logic that deals with player commands is extremely varried. The only common ground is that the logic always deals with the text input of the player (of course). But since I want a help commmand that lists all the available commands I need a way to add the names of all the commands to an array,
<EstanislaoStan> preferably not inputing them all by hand. I feel like there's a more eloquent solution. I'm not familiar with prototypes. Could those do this?
nwest has joined #ruby
manizzle has joined #ruby
Taranis has joined #ruby
<fowl> EstanislaoStan, you need to keep track of your commands then, keep them in a hash or track them as you instatiate them
<fowl> instantiate
krz has quit [Quit: krz]
choffstein has quit [Remote host closed the connection]
maletor has joined #ruby
brianpWins has joined #ruby
noganex has quit [Ping timeout: 248 seconds]
zrail|home is now known as zrail
noganex has joined #ruby
<EstanislaoStan> Right, but to put them all in a hash I'd have to make them objects, right? Which would require seperate classes for each command. So would it just be easier to manually add the command name to an array?
lkba has joined #ruby
maletor has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
iamjarvo has quit [Ping timeout: 244 seconds]
vitor-br has joined #ruby
mwilson_ has quit [Excess Flood]
Spooner has quit []
mwilson_ has joined #ruby
fgro has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
radic has quit [Ping timeout: 244 seconds]
pu22l3r has joined #ruby
dhruvasagar has joined #ruby
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
yugui_zzz is now known as yugui
Osum has quit [Ping timeout: 248 seconds]
t0mmyvyo has joined #ruby
<seoaqua> how to run rspec in ruby runtime?
stefanp_ has joined #ruby
thebope has joined #ruby
<Progster> good question
<Progster> is there a good cheat sheet resource or simple doc resource for quickly surveying the API of something like RSpec or Capybara?
cableray has quit [Quit: cableray]
nwest has quit [Quit: Computer has gone to sleep.]
savage- has quit [Remote host closed the connection]
stefanp has quit [Ping timeout: 265 seconds]
radic has joined #ruby
Osum has joined #ruby
medik has quit [Read error: Connection reset by peer]
fgsda has quit [Ping timeout: 246 seconds]
igotnolegs has joined #ruby
medik has joined #ruby
maletor has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Ping timeout: 244 seconds]
maletor has joined #ruby
andrewhl has joined #ruby
sepp2k has quit [Remote host closed the connection]
patient has quit [Ping timeout: 252 seconds]
philips_ has quit [Excess Flood]
iamjarvo has joined #ruby
Osum has quit [Ping timeout: 248 seconds]
philips_ has joined #ruby
maletor has quit [Ping timeout: 252 seconds]
thebope has quit [Remote host closed the connection]
maletor has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
savage- has joined #ruby
ananthakumaran has joined #ruby
brianpWins has quit [Quit: brianpWins]
patient has joined #ruby
sebicas has left #ruby [#ruby]
maletor has quit [Ping timeout: 265 seconds]
brianpWins has joined #ruby
dnyy has joined #ruby
AlbireoX has quit [Quit: IRC crashed.]
* offby1 laughs cruelly
AlbireoX has joined #ruby
zeromodulus has quit [Read error: Connection reset by peer]
maletor has joined #ruby
zeromodulus has joined #ruby
maletor has quit [Ping timeout: 248 seconds]
medik has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
shadoi has joined #ruby
snearch has joined #ruby
EstanislaoStan has quit []
medik has joined #ruby
savage- has quit [Remote host closed the connection]
wilmoore has joined #ruby
Chryson has quit [Quit: Leaving]
mockra has joined #ruby
snearch has quit [Client Quit]
<ctor> anyone here used curb extensively before?
jerius has joined #ruby
andrewhl has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby
wmoxam has quit [Ping timeout: 244 seconds]
verto is now known as verto|off
kyktommy has joined #ruby
jarred has joined #ruby
Guest78592 is now known as alindeman
krz has joined #ruby
alindeman has quit [Changing host]
alindeman has joined #ruby
tiripamwe has quit [Ping timeout: 244 seconds]
choffstein has joined #ruby
chrisja has quit [Quit: leaving]
univers has joined #ruby
mdszy has quit [Quit: nini]
oscardelben has joined #ruby
abra has quit [Ping timeout: 276 seconds]
abra has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
andrewhl has quit [Remote host closed the connection]
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
choffstein has quit [Ping timeout: 252 seconds]
wmoxam has joined #ruby
wmoxam has quit [Client Quit]
medik has quit [Ping timeout: 246 seconds]
jarred has quit [Quit: jarred]
wmoxam has joined #ruby
medik has joined #ruby
mayankkohaley has joined #ruby
jarred has joined #ruby
savage- has joined #ruby
ryanf has joined #ruby
maletor has joined #ruby
wallerdev has quit [Quit: wallerdev]
jarred has quit [Read error: Connection reset by peer]
jarred_ has joined #ruby
wmoxam has quit [Quit: leaving]
jarred_ has quit [Read error: Connection reset by peer]
jarred has joined #ruby
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
subbyyy has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
jarred has quit [Ping timeout: 245 seconds]
codezombie has quit [Quit: Linkinus - http://linkinus.com]
andrewhl has joined #ruby
jerius has quit [Quit: leaving]
Ontolog has quit [Quit: Ontolog]
savage- has quit [Remote host closed the connection]
snearch has joined #ruby
cuppsy has quit [Read error: Operation timed out]
Ethan has quit [Ping timeout: 255 seconds]
snearch has quit [Read error: Connection reset by peer]
pu22l3r has quit [Remote host closed the connection]
davidpk has joined #ruby
snearch has joined #ruby
codezombie has joined #ruby
CodeVision has quit [Ping timeout: 246 seconds]
cuppsy has joined #ruby
codezombie has quit [Client Quit]
CodeVision has joined #ruby
<Ionic`> hmmm
<Ionic`> how do I break out of two loops?
jgrevich has quit [Read error: Connection reset by peer]
TorpedoSkyline has quit [Ping timeout: 244 seconds]
<Ionic`> mhpf, probably not that easy
<davidcelis> break * 2
<Ionic`> that's working?!
<davidcelis> try
Rizzle has quit [Read error: Connection reset by peer]
<banisterfiend> haha
anothervenue has quit [Read error: Connection reset by peer]
cdavaz has joined #ruby
cdavaz is now known as Ontolog
<Ionic`> nah, not really
<davidcelis> Ionic`: my bad, sorry
<Ionic`> it's ok, I wouldn't have expected this
twock has quit [Quit: Lost terminal]
<Ionic`> I'll just conditionally break in the outer loop too
anothervenue has joined #ruby
gnychis has joined #ruby
<fowl> use a variab
<Ionic`> nice
<Ionic`> another bug fixed
<gnychis> I am trying to use the JSON class in a simple ruby script, and I did "sudo gem install json" (which installed it), but it fails to load when I do "require 'json'" in my script. If I do "require 'json'" within irb, it works just fine
<Ionic`> gnychis: well make sure you're using the correct ruby version?
jerius has joined #ruby
<fowl> inb4 ruby 1.8 and no require'rubygems'
jgrevich has joined #ruby
<gnychis> sorry i didn't understand that, fowl
<Ionic`> gnychis: require "rubygems" for ruby 1.8 before json
<gnychis> got it, that worked, thanks!
dnyy has quit [Remote host closed the connection]
<Ionic`> y/w
<Ionic`> actually, thanks to fowl
<fowl> gnychis, im obliged to tell you that 1.8 is old and 1.9 is muchos bettero
dnyy has joined #ruby
dnyy has quit [Read error: Connection reset by peer]
dnyy has joined #ruby
<Ionic`> now that doesn't look too bad :)
uris has quit [Quit: leaving]
gnychis has quit [Quit: gnychis]
jerius has quit [Ping timeout: 240 seconds]
Icoin has quit [Quit: Icoin]
noyb has joined #ruby
univers has quit [Remote host closed the connection]
kyktommy has quit [Quit: kyktommy]
voodoofish430 has quit [Quit: Leaving.]
ananthakumaran has quit [Quit: Leaving.]
Vert has quit [Remote host closed the connection]
dhruvasa1ar has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
Dreamer3 has joined #ruby
jarred has joined #ruby
k_89 has joined #ruby
robert45 has joined #ruby
<robert45> hi guys, does anyone know how to solve this?: "/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- new_relic/recipes (LoadError)"
Progster has quit [Ping timeout: 248 seconds]
RichieEvans has quit [Read error: Connection reset by peer]
a_a_g has quit [Quit: Leaving.]
RichieEvans has joined #ruby
RichieEvans has quit [Client Quit]
yonggu has joined #ruby
td123 has joined #ruby
dnyy has quit [Remote host closed the connection]
mayankkohaley has quit [Ping timeout: 248 seconds]
robert45 has quit [Quit: • IRcap • 8.6 •]
RainbowD_ has joined #ruby
RainbowD_ is now known as RainbowDashh
yonggu has quit [Remote host closed the connection]
yonggu has joined #ruby
banisterfiend has quit [Remote host closed the connection]
AlbireoX` has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 248 seconds]
cantonic_ has joined #ruby
cantonic_ is now known as cantonic
_br_ has quit [Quit: Bye, thanks for all the fish.]
ryanf has joined #ruby
_br_ has joined #ruby
RainbowDashh has quit [Quit: SLEEP MODE. I NEED A MORE CREATIVE MESSAGE FOR MY DUMB LID CLOSING.]
perryh_away is now known as perryh
banisterfiend has joined #ruby
<jarred> Why doesn't MRI throw an error when I have instance variables on a module that I extend in a class?
dnyy has joined #ruby
<banisterfiend> jarred: why should it
<jarred> because the methods are class methods, since they're being extended (and not included) into a class, right?
<jarred> Or
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<jarred> Is it that, since modules are objects, they can have instance methods?
<jarred> er
<jarred> instance variables
<banisterfiend> jarred: why does that mean they cant have instance variables
<banisterfiend> jarred: no, the instance variables belong to the object that invokes the method provided by the module
<banisterfiend> not to the module itself, unless it's a class method on the module
<jarred> Because what instance does a class refer to?
<jarred> Does everything have an instance then?
<jarred> (Except maybe the class that everything else inherits from)
DrShoggoth has joined #ruby
<banisterfiend> jarred: i dont quite knoew what u mean...i think u should read a book on the ruby OOP model cos there appears to be a lot of confusion there ;)
<banisterfiend> jarred: it is tricky initially, but invest some time learning how it all fits together
wilmoore has quit [Remote host closed the connection]
<jarred> banisterfiend: Yeah, I probably should. I understand where classes/instances fit in, it's pretty standard OOP, but modules are where it gets unusual
ryanf has quit [Quit: broken pipes |||]
<banisterfiend> jarred: actually classes/instances in ruby have a few other quirks that make them different to normal OOP systems.
<banisterfiend> jarred: for example eigenclasses/classmethods probably aren't what u think they are
<banisterfiend> jarred: i mean 'class methods' probably arent what uthink they are, in ruby
westoque has joined #ruby
<jarred> Ah I see
wilmoore_ has joined #ruby
<jarred> Yeah, I think you're right -- that'd at least partly answer my question re: modules
<banisterfiend> jarred: if i was to tell u that 'class methods are really instance methods on the metaclass' would that mean anything? :P
yxhuvud has joined #ruby
snearch has quit [Quit: Verlassend]
ryanf has joined #ruby
oscardelben has quit [Quit: oscardelben]
<jarred> banisterfiend: Well, now the question is, what are metaclasses? From reading briefly on Wikipedia, it sounds like, in reality, since everything is an object in Ruby, metaclasses are the object that classes inherit from. So, class methods don't exist in Ruby because everything is an object, so metaclasses are a compromise so that everything is still an object, and we still have the niceties that classes provide. Is that correct (It doesn't
<jarred> question has a yes/no answer, but a mostly right/mostly wrong answer)
<banisterfiend> jarred: not that classes inherit from but from which they're instances of
<jarred> ohhh
<jarred> Yeah
<jarred> That makes more sense
MatthewGA has quit [Ping timeout: 248 seconds]
<banisterfiend> jarred: kind of, ultimately a class is an instance of the Class class
<banisterfiend> jarred: and a module is an instance of the Module class
<jarred> makes sense
<jarred> Well, now it does
<jarred> But
<jarred> If you'd said that initially, it'd be confusing
<banisterfiend> jarred: but all classes also have a unique class which they're instances of, which is a subclass of Class
Morkel has joined #ruby
<banisterfiend> jarred: so really it goes like this: MyClass --> (MyClass) ===> Class
<banisterfiend> where --> means 'instance of' and ===> means 'inherits from'
<banisterfiend> jarred: (MyClass) is used to denote the metaclass for MyClass
<banisterfiend> jarred: the resaon you have a (MyClass) is so that you can define methods unique to MyClass. If you didn't have (MyClass) (the metaclass) and just defined the so-called 'class methods' for MyClass directly on Class itself, then all classes would get them
ananthakumaran has joined #ruby
<banisterfiend> but i want it so if i define a class method on MyClass that it exists only for MyClass
Ionic` has quit [Ping timeout: 244 seconds]
_justin has joined #ruby
<jarred> And, that'd happen because the methods would actually be defined on Class?
luckman212 has joined #ruby
<jarred> (Methods that are on every class)
<banisterfiend> jarred: Yeah, so all classes would get them
Z_Mass has joined #ruby
<banisterfiend> since all classes are instances of Class
<banisterfiend> but only MyClass is an instance of (MyClass)
ananthakumaran1 has joined #ruby
ananthakumaran2 has joined #ruby
ananthakumaran1 has quit [Read error: Connection reset by peer]
<jarred> I see
westoque has quit [Quit: westoque]
ananthakumaran has quit [Ping timeout: 244 seconds]
<jarred> Thanks for explaining this
ananthakumaran has joined #ruby
ryanf has quit [Quit: broken pipes |||]
stepnem has quit [Ping timeout: 265 seconds]
andrewhl has quit [Remote host closed the connection]
<bbloom> Is this the right channel to get help with writing C extensions for MRI?
<banisterfiend> bbloom: Yea
ananthakumaran2 has quit [Ping timeout: 240 seconds]
<bbloom> great. I'm trying to figure out how to convert a wchar_t* to a VALUE
xaq has quit [Remote host closed the connection]
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 246 seconds]
<bbloom> encoding.h is somewhat overwhelming and has minimal documentation
savage- has joined #ruby
ananthakumaran has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Eldariof-ru has joined #ruby
zeromodulus has quit [Ping timeout: 246 seconds]
ananthakumaran1 has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Client Quit]
ananthakumaran has joined #ruby
mxweas_ has joined #ruby
banisterfiend has quit [Remote host closed the connection]
zeromodulus has joined #ruby
mengu has quit [Ping timeout: 246 seconds]
vectorshelve has joined #ruby
mayankkohaley has joined #ruby
williamcotton_ has quit [Quit: williamcotton_]
zommi has joined #ruby
Z_Mass has quit [Quit: Leaving]
knirhs is now known as Shrink
liuchong has joined #ruby
maletor has joined #ruby
liuchong has quit [Client Quit]
byte_muse has joined #ruby
byte_muse has left #ruby [#ruby]
ryanf has joined #ruby
quest88 has quit [Quit: quest88]
medik has quit [Ping timeout: 248 seconds]
nari has quit [Ping timeout: 245 seconds]
<ctor> Does anyone here have experience using the curb library?
rushed has left #ruby [#ruby]
DrShoggoth has quit [Quit: Leaving]
krz has quit [Quit: krz]
wilmoore_ has quit [Remote host closed the connection]
mxweas_ has quit [Quit: Computer has gone to sleep.]
g_rotbart has quit [Read error: Connection reset by peer]
djdb has joined #ruby
g_rotbart has joined #ruby
PaciFisT1 has joined #ruby
PaciFisT has quit [Read error: Connection reset by peer]
pdtpatrick_ has quit [Quit: pdtpatrick_]
tagrudev has joined #ruby
Eldariof-ru has quit []
nari has joined #ruby
a_a_g has joined #ruby
mahmoudimus has joined #ruby
fgsda has joined #ruby
lolmaus has joined #ruby
RichieEvans has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
RichieEvans has quit [Client Quit]
RichieEvans has joined #ruby
nopolitica has joined #ruby
Fretta has quit [Quit: Fretta]
ryanf has quit [Quit: broken pipes |||]
igotnolegs has quit [Quit: Computer has gone to sleep.]
pdelgallego has joined #ruby
cads has joined #ruby
jarred_ has joined #ruby
abra has quit [Remote host closed the connection]
nopolitica has quit [Quit: Leaving.]
jarred has quit [Ping timeout: 244 seconds]
jarred_ is now known as jarred
zeromodulus has quit [Ping timeout: 248 seconds]
abra has joined #ruby
zeromodulus has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
luckman212_ has joined #ruby
fgsda has left #ruby ["Leaving"]
nilg has joined #ruby
luckman212 has quit [Ping timeout: 248 seconds]
RichieEvans has quit [Quit: RichieEvans]
RichieEvans has joined #ruby
artOfWar has joined #ruby
TPFC-SYSTEM has joined #ruby
artOfWar_ has joined #ruby
mahmoudimus has joined #ruby
JohnBat26 has joined #ruby
stepnem has joined #ruby
artOfWar has quit [Ping timeout: 246 seconds]
perryh is now known as perry
wilmoore has joined #ruby
<Hanmac1> bbloom did you still has your wchar_t* problem?
Hanmac1 is now known as Hanmac
bigkevmcd has quit [Remote host closed the connection]
_pdelgallego has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego is now known as pdelgallego
nalbion_ has joined #ruby
bigkevmcd has joined #ruby
_pdelgallego has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego has quit [Client Quit]
itnomad has quit [Quit: Leaving]
berkes has joined #ruby
ryanf has joined #ruby
MissionCritical has quit [Ping timeout: 248 seconds]
medik has joined #ruby
dhruvasa1ar has quit [Ping timeout: 252 seconds]
Ontolog has quit [Quit: Ontolog]
Spooner has joined #ruby
Spooner has quit [Client Quit]
dhruvasagar has joined #ruby
Tricks has quit [Read error: Connection reset by peer]
Tricks has joined #ruby
Guest46122 has quit [Ping timeout: 255 seconds]
socomm has quit [Ping timeout: 248 seconds]
tiripamwe has joined #ruby
jarred has quit [Quit: jarred]
banisterfiend has joined #ruby
elhu has joined #ruby
lolmaus has quit []
tonini has joined #ruby
nalbion_ has quit [Quit: Page closed]
workmad3 has quit [Ping timeout: 252 seconds]
lewis1711 has joined #ruby
mockra has quit [Remote host closed the connection]
Rochefort has joined #ruby
<lewis1711> is there any good reason to not just obj#dup then add methods, "prototype" style, if I feel like it matches the problem better? more than one way to do it and all that
heftig has quit [Ping timeout: 272 seconds]
lolmaus has joined #ruby
heftig has joined #ruby
schickung has quit [Quit: schickung]
<RichieEvans> can someone the why I should use rails instead of just writing the code myself and uploading them to my server.
<banisterfiend> heftig: rejoin #pry
<banisterfiend> RichieEvans: lol, same answer applies to whether u should use any library :P
<banisterfiend> RichieEvans: why use ruby instead of writing your own langauge ? :)
baphled_ has joined #ruby
socomm has joined #ruby
<RichieEvans> I was thinking rails was going to be this crazy hard "thing"
<fowl> lewis1711, do what you feel, i write scripts without classes for the hell of it
etehtsea has joined #ruby
tiripamwe has quit [Ping timeout: 244 seconds]
<RichieEvans> banasterfiend would you say query is to programming javascript easier as rails is to web develop easier?
<RichieEvans> jquery*
tiripamwe has joined #ruby
<banisterfiend> RichieEvans: ask fowl, he knows more about web dev than i
<RichieEvans> I just came across this stack overflow page
<RichieEvans> It answers most of my questions
<RichieEvans> I was googling forever
<RichieEvans> lol
bluOxigen has joined #ruby
jgrevich has quit [Quit: jgrevich]
ananthakumaran has quit [Ping timeout: 240 seconds]
<banisterfiend> heftig: join pls
<heftig> banisterfiend: sorry, still banned :p
<banisterfiend> oh
<banisterfiend> haha
MissionCritical has joined #ruby
<banisterfiend> heftig: try now
savage- has quit [Remote host closed the connection]
fgro has joined #ruby
crates has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
crates has joined #ruby
td123 has quit [Ping timeout: 252 seconds]
flippingbits has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
fgro has quit [Ping timeout: 250 seconds]
noyb has quit [Ping timeout: 248 seconds]
hashar has joined #ruby
baphled_ has quit [Ping timeout: 250 seconds]
wobr has joined #ruby
artOfWar_ has quit [Ping timeout: 244 seconds]
liuchong has joined #ruby
<liuchong> :-S
Eldariof-ru has joined #ruby
liuchong has left #ruby [#ruby]
kidoz has quit [Quit: Ухожу я от вас]
Asher has quit [Read error: Connection reset by peer]
Asher has joined #ruby
apeiros_ has joined #ruby
piotr has joined #ruby
g_rotbart has quit [Remote host closed the connection]
jimeh has joined #ruby
Progster has joined #ruby
Cork has quit [Ping timeout: 245 seconds]
hilolih has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 246 seconds]
Cork has joined #ruby
jprovazn_away is now known as jprovazn
wilmoore has quit [Remote host closed the connection]
saschagehlich has joined #ruby
robotmay has joined #ruby
timonv has joined #ruby
arkiver has joined #ruby
zz_chrismcg is now known as chrismcg
ephemerian has joined #ruby
subbyyy has quit [Quit: Leaving.]
perry is now known as perryh_away
gani has joined #ruby
roolo has joined #ruby
lolmaus has quit []
Progster has quit [Ping timeout: 240 seconds]
eurek has joined #ruby
Squee-D has quit []
jimeh has quit [Quit: bye]
workmad3 has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
elhu has quit [Ping timeout: 252 seconds]
jimeh has joined #ruby
Markvilla has joined #ruby
arturaz has joined #ruby
elhu has joined #ruby
[Neurotic] has quit [Quit: Leaving]
shellox_ has joined #ruby
<shellox_> hi
schickung has joined #ruby
<shellox_> i asked already in #sinatra, but whats the alternative to send_data now? send_data is deprecated now, but what should I use instead?
mengu has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
alta has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
eurek has quit [Quit: Computer has gone to sleep.]
akem has quit [Ping timeout: 246 seconds]
<fowl> shellox_, you should probably just wait for an answer from #sinatra
vlad_starkov has joined #ruby
baphled__ has joined #ruby
<shellox_> fowl: figured it out
<shellox_> found a new helper in the sinatra source code :P
<shellox_> for attachments
k_89 has quit [Quit: Leaving]
k_89 has joined #ruby
yonggu has quit [Quit: yonggu]
eurek has joined #ruby
lkba has quit [Quit: Bye]
ZachBeta has joined #ruby
thone_ has joined #ruby
arkiver has quit [Ping timeout: 246 seconds]
thone has quit [Ping timeout: 246 seconds]
gtuckerkellogg has joined #ruby
Steve10111 has joined #ruby
Steve10111 has left #ruby [#ruby]
richo has joined #ruby
richo has quit [Changing host]
richo has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
grekkos has joined #ruby
grekkos is now known as Guest16141
dhruvasagar has quit [Ping timeout: 265 seconds]
dhruvasagar has joined #ruby
tiripamwe has quit [Ping timeout: 248 seconds]
tiripamwe has joined #ruby
Guest16141 has quit [Ping timeout: 240 seconds]
Berglund has joined #ruby
_justin has quit [Ping timeout: 244 seconds]
lolmaus has joined #ruby
tatsuya_o has joined #ruby
ryanf has joined #ruby
baphled__ has quit [Read error: Connection reset by peer]
baphled_ has joined #ruby
Tricks has quit [Remote host closed the connection]
mneorr has joined #ruby
ryanf has quit [Ping timeout: 248 seconds]
davidpk has quit [Quit: Computer has gone to sleep.]
piotr has quit [Ping timeout: 246 seconds]
mdstunthamster has joined #ruby
seoaqua has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby
seoaqua has joined #ruby
RichieEvans has quit [Quit: RichieEvans]
RichieEvans has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
tonini has quit [Remote host closed the connection]
snearch has joined #ruby
Emmanuel_Chanel_ has joined #ruby
Emmanuel_Chanel has quit [Read error: Operation timed out]
seoaqua has quit [Ping timeout: 248 seconds]
<lewis1711> "invalid multibyte char (US-ASCII)" gets thrown in jruby in 1.9 mode, but not in 1.8 mode. that's a step backwards..
<lewis1711> (yes, I realise # encoding: utf-8)
Markvilla has quit [Quit: Markvilla]
seoaqua has joined #ruby
FlyingFoX has quit [Ping timeout: 240 seconds]
FlyingFoX has joined #ruby
sailias has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
tk_ has joined #ruby
_justin has joined #ruby
<shevy> the whole encoding idea was a step backwards
blacktulip has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
<Hanmac> yeah ... why isnt utf-8 the default encoding :'(
<banisterfiend> Hanmac: some japanese reason, japs didnt like it being the default
berkes has quit [Quit: Ex-Chat]
RichieEvans has quit [Quit: RichieEvans]
RichieEvans has joined #ruby
<apeiros_> lewis1711: no. it's not a step backwards.
<apeiros_> but yes, it means people have to crawl out of their hole of ignorance.
<apeiros_> if you want the old behavior, set all defaults to binary and have happy but broken code
<lewis1711> whtat's wrong with utf-8 default then
ttyp123 has joined #ruby
thecreators has quit [Ping timeout: 248 seconds]
<fowl> too hip
<apeiros_> I'd be for it. but it only applies to a cultural region.
<drizz> lol @ encoding “being a step backwards”
<lewis1711> crawling out of the whole of ignorance was very dramatic btw, you should write poetry
Rochefort has quit [Remote host closed the connection]
lolmaus has quit []
<apeiros_> lewis1711: sadly it relatively accurately describes the state of coders vs. encodings.
sailias has quit [Quit: Leaving.]
<ttyp123> find . -type f | ruby -e "\$stdin.readlines.each {|file| result = File.open(file.chomp).readlines.join.gsub(/\\n/, 'MY_NEW_LINE').gsub(/....c3284d.*c3284d.../, '').gsub(/MY_NEW_LINE/, \"\\n\"); File.open(file.chomp, \"w\").puts result} when i run this command on a php file, it replaces the string with MY_NEW_LINE. i just want to replace it with a space .
<fowl> wouldn't be a problem if the rest of the world would use ASCII
<fowl> whats the point of inventing computers if you can't force your ideologies on others
<lewis1711> so utf-8 isn't international enough, but ASCII is? I don't get it
* apeiros_ hands lewis1711 some <sarcasm> tags
<fowl> lewis1711, ASCII is the perfect level of internationality
<richo> morse code
<richo> it's easier to convert to binary
<apeiros_> fowl: because it contains the full charset the majority of people on this planet use? :)
<richo> uses less bandwidth too
<lewis1711> why am I surprised that noone could clearly explain the issue and instead resorted to sarcasm
<Hanmac> ttyp123 your code does not look good ... File.open(file.chomp).readlines.join.gsub ... replace this with File.read(file.chomp).gsub
thecreators has joined #ruby
<lewis1711> *not surprised
<apeiros_> lewis1711: explain what issue? you said you already have the solution.
<fowl> apeiros_, people who advocate unicode are the same people who advocate foreign aid and equality, FIE ON THAT, I say
<apeiros_> FIE?
<lewis1711> why is utf-8 a bad default for strings
<drizz> it isnt
<apeiros_> lewis1711: already answered
<apeiros_> 11:41 apeiros_: I'd be for it. but it only applies to a cultural region.
<fowl> apeiros_, its a real word
<Hanmac> ttyp123 and when you use open, use the block form ... open(...) { .. }
<lewis1711> that was a pretty poor answer. so poor I don't feel compelled to ask more, or care
<apeiros_> fowl: you're being mighty ignorant there.
<fowl> apeiros_, that's what i do, i make an ass of myself on the internet then tell people where i'm from
<fowl> its my shtick
<ttyp123> Hanmac, is that the reason it is replacing my string with MY_NEW_LINE ?
<apeiros_> fowl: be happy that ascii contains all characters your language uses. note however that it covers all characters of less than 10% of used written language.
<fowl> yes yes im sure you miss your umlauts and snowman glyphs
<apeiros_> fowl: you miss spanish, french, german, chinese, japanese and a whole lot of others.
<apeiros_> so yes, you're indeed making an ass out of you if you're seriously on "ASCII for everyone!!!"
<drizz> who cares, ISO-8859 FTW
lolmaus has joined #ruby
<apeiros_> oh my
<Mon_Ouie> And even English texts may use non-ASCII characters: —, …
* apeiros_ checks calendar whether it's global ignorance day…
zawzey has joined #ruby
<banisterfiend> apeiros_: dont u think it's about time we deprecated german, french, spanish though
<apeiros_> banisterfiend: if, then I'd be for deprecating english as well. lojban!
<banisterfiend> no one understand that shit anyway, except for the germans, french spanish... everyone should speak 'murcan
<lewis1711> clearly you want utf-16
<fowl> apeiros_, those countries should be happy enough that they have the priviledge of building *and* using our technology
<drizz> amen to that!
<apeiros_> lewis1711: utf-8 and utf-16 have the same set of displayable characters.
<lewis1711> and they don't cover some alphabet?
* apeiros_ assumes fowl is trolling
<fowl> apeiros_, <3
<drizz> UTF-8 covers just about everything
TheNumb has quit [Remote host closed the connection]
<lewis1711> evidently it doesn't
<apeiros_> lewis1711: utf-8 and utf-16 only differ in how the characters are represented by bytes.
<ttyp123> Hanmac, ?
<lewis1711> please be vaguer
<lewis1711> this is too concrete
RichieEvan has joined #ruby
<apeiros_> lewis1711: unicode (the characters displayable by all utf-* encodings) has some issues with some asian languages. you'll have to google for it
<lewis1711> right. you could've said that in the first place
<apeiros_> as far as I understood it though it is a problem that should be solved by using fonts, not by adding characters to unicode
<apeiros_> lewis1711: if you'd asked in a way that I'd understood what you were asking for…
<lewis1711> fair enough
RichieEvan has quit [Client Quit]
RichieEvans has quit [Quit: RichieEvans]
<shevy> the asians need to adopt english
<lewis1711> utf is a braoder brush then ASCII anyway, surely a better default even if it's not quite there
<shevy> if it is such a better default why aren't we all using it already
<apeiros_> lunch time, cya
<drizz> we are
<lewis1711> I am in many things..
<shevy> sounds like perfect happiness achieved
<lewis1711> what;s the alternative anyway
RichieEvan has joined #ruby
<shevy> the alternative is to simplify
<fowl> hep tep rog
<ttyp123> what does the MY_NEW_LINE tag do in this command?
<shevy> what command
RichieEvan has quit [Client Quit]
ephemerian has quit [Read error: Operation timed out]
<ttyp123> find . -type f | ruby -e "\$stdin.readlines.each {|file| result = File.open(file.chomp).readlines.join.gsub(/\\n/, 'MY_NEW_LINE').gsub(/....c3284d.*c3284d.../, '').gsub(/MY_NEW_LINE/, \"\\n\"); File.open(file.chomp, \"w\").puts result} this one
<ttyp123> what does the MY_NEW_LINE tags do ?
<Hanmac> ttyp123 i dont know 100% but i looks like that is an holder, so that the newline is not replaced ...
<shevy> this seems to replace newlines with the word MY_NEW_LINE and then lateron replace it again
<Hanmac> but imo the line is a bit shitty
<shevy> yeah
gani has left #ruby ["leaving.."]
<fowl> some perl junky wrote that no doubt
<fowl> that file never gets closed btw
<fowl> i guess it does after execution
<fowl> nvm
<shevy> ttyp123: it is not a "tag", it is just the word that gets to replace the newlines
keymone has joined #ruby
<shevy> does not really seem to be very elegant
<shevy> isn't readlines splitting on every newline it finds anyway?
<ttyp123> so if i replace "MY_NEW_LINE" with " " what will happen?
<shevy> then something else could happen
<shevy> depends on the .gsub(/....c3284d.*c3284d.../, '') part
medik has quit [Ping timeout: 244 seconds]
Gate has quit [Read error: Operation timed out]
KarlHungus has quit [Read error: Operation timed out]
saschagehlich has joined #ruby
<shevy> hmm or perhaps not
<shevy> I dunno if that regex checks for ' '
fflush has joined #ruby
fflush has quit [Changing host]
fflush has joined #ruby
<ttyp123> shevy, basically this is the file http://paste.linuxassist.net/216054
<shevy> this link tells me to login
<ttyp123> linux linux
<ttyp123> is the username and pass
<shevy> noooooooo
ZachBeta has quit [Read error: Connection reset by peer]
<ttyp123> wait i will use another pastebin
<shevy> too lazy... sites like gist or pastie.org do not mandate the visitor to have to login at all
ZachBeta has joined #ruby
KarlHung1s has joined #ruby
Gate_ has joined #ruby
<shevy> hmm. if you .gsub on ' ' then the result would be quite different
<shevy> you always need to look what information is lost
x0F_ has joined #ruby
x0F has quit [Disconnected by services]
<shevy> but if it was not you who wrote that anyway, it may be easier to write something on your own
blacktulip has joined #ruby
<shevy> the other author could have been drunk for instance
mobilegamelabs has joined #ruby
saschagehlich_ has joined #ruby
<ttyp123> the objective is to remove <!--c3284d--> and <!--/c3284d-->
Criztian has joined #ruby
<shevy> html attack :D
<ttyp123> and everything in between
monkegjinni has joined #ruby
<ttyp123> shevy, Yes
<shevy> build a new string with the content you need?
<shevy> File.readlines('bla.html').each {|x| array << x if @may_we_append}, then toggle the @may_we_append depending on whether c32 was found or not. would be one way to solve this
<ttyp123> i wanna delete that code from all .html files
<shevy> this is ruby. (1) collect all .html files (2) pass them through a common method that does precisely that
saschagehlich has quit [Ping timeout: 246 seconds]
saschagehlich_ is now known as saschagehlich
<shevy> I tend to bundle these methods in some .rb files and then invoke the method from bash. one alias I have is something like "ruby -r /Scripts/foo.rb -e"
<shevy> then I usually do "rinvoke method_name_here"
<shevy> (where "rinvoke" is that alias to ruby -r etc...)
<ttyp123> i didnt write that code :( it was a code provided by someone to remove the HTML attack script.. it works for .html files but it does not work for .php files
<ttyp123> it leaves a string called "MY_NEW_LINE" in php files
<ttyp123> but it works fine for .html files
<shevy> ok then you know one thing
<shevy> the first .gsub works and inserts that
<shevy> but it fails to replace those strings afterwards
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> I dont see any difference in the code you showed though, so I dont know why .html work and .php not
fearoffish has joined #ruby
<ttyp123> hummmm ok it did not work on just the index.php script.. it worked on other php scripts
_bart has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
RichieEvan has joined #ruby
<shevy> :D
<shevy> heisenbugs!
RichieEvan has left #ruby [#ruby]
RichieEvan has joined #ruby
ephemerian has joined #ruby
hashar has quit [Quit: hashar]
Helius has joined #ruby
mbuf has joined #ruby
schickung has quit [Read error: Connection timed out]
schickung has joined #ruby
binaryplease has joined #ruby
niklasb has joined #ruby
<ttyp123> shevy, can i use the same script to remove http://pastie.org/4248972
<ttyp123> ?
rohit has joined #ruby
linoj has joined #ruby
<ttyp123> i tried that same script on the .htaccess file and it leaves this string in the file "MY_NEW_L_NEW_LINE"
fermion has joined #ruby
<ttyp123> shevy, ?
lledet has quit [Read error: Connection reset by peer]
lledet has joined #ruby
bosphorus has joined #ruby
Markvilla has joined #ruby
gtuckerkellogg has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
rohit has quit [Read error: Connection reset by peer]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
fixl has joined #ruby
linoj has quit [Quit: linoj]
bier|tp has quit [Ping timeout: 246 seconds]
Markvilla has quit [Quit: Markvilla]
bier has quit [Ping timeout: 244 seconds]
schickung has quit [Read error: Connection timed out]
schickung has joined #ruby
Rochefort has joined #ruby
<shevy> sorry was eating
tatsuya_o has quit [Remote host closed the connection]
LennyLinux has joined #ruby
<shevy> the problem is that you use code that you do not understand
<shevy> first thing that you ought to do is - put that ruby code into a proper file
<ttyp123> i agree
<shevy> then modify it until you understand it
<shevy> otherwise, you are always just chasing-the-rock here without catching it
<shevy> .gsub is really simple to understand
<shevy> it will replace something globally, on a string
<shevy> that string can be huge, like a file
tatsuya_o has joined #ruby
<shevy> and you can chain multiple .gsub one after the other
zawzey has quit [Quit: zawzey]
<shevy> so when you modified the string before, with some .gsub already, of course you can then get results such as "MY_NEW_L_NEW_LINE"
<ttyp123> hummmm
<shevy> as I wrote before, one way to solve this is to use .each instead and build a new string
<shevy> and when you notice that your line has #c3284d# as string, dont append
<shevy> ignore the following lines too
bier|tp has joined #ruby
bier has joined #ruby
<shevy> until you encounter #/c3284d#
<shevy> this is really simple ruby
<shevy> if line =~ /#c3284d#/
Icoin has joined #ruby
<shevy> if line =~ /\/#c3284d#/
<shevy> opening, respectively closing
<shevy> you should read a ruby tutorial at least once ;)
mayankkohaley has quit [Ping timeout: 252 seconds]
<Gadgetoid> Use the power of Google!
zawzey has joined #ruby
_bart has quit [Quit: _bart]
<ttyp123> shevy, I was tring to do find replace using sed but could not get the regex right.. so I asked someone to do it for me .. he preferred ruby :(
<shevy> I would too
<ttyp123> the only issue with sed was that it did not work unless u get the regex perfectly i tried to put this entire code into a string to do a match find replace but it did not work out
<shevy> ruby gives you something unified, whereas with UNIX you must understand a million different programs
<shevy> well regexes are not that easy, so that is understandable
arkiver has joined #ruby
resure has joined #ruby
<shevy> if you dont wanna learn ruby, try to use sed perhaps :)
<Gadgetoid> Ruby is a bit of an OTT way to handle something that core utils can do
<ttyp123> yes and on top of that google lists the site as having malware.. so screwed
<shevy> who defines what is a core util?
<shevy> debian? :>
resure has quit [Client Quit]
<Gadgetoid> shevy: the people who made and maintain the GNU core utils for the GNU side of GNU/Linux?
<shevy> awk is provided standalone in ftp://ftp.gnu.org/gnu/gawk/gawk-4.0.1.tar.gz, sed ftp://ftp.gnu.org/gnu/sed/sed-4.2.1.tar.gz, coreutils ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.17.tar.xz
<shevy> yeah, if awk and sed would be included in coreutils but it is not ;P
<shevy> spam attack upcoming...
<shevy> coreutils has:
<shevy> basename,cat,chgrp,chmod,chown,chroot,cksum,comm,cp,csplit,cut,date,dd,df,dir,dircolors,dirname,du,echo,env,expand,expr,factor,false,fmt,fold,groups,head,hostid,hostname,id,install,join,link,ln,logname,ls,md5sum,mkdir,mkfifo,mknod,mv,nice,nl,nohup,od,paste,pathchk,pinky,pr,printenv,printf,ptx,pwd,readlink,rm,rmdir,seq,sha1sum,shred,sleep,sort,split,stat,stty,sum,sync,tac,tail,tee,test,touch,tr,true,tsort,tty,un
<shevy> ame,unexpand,uniq,unlink,users,vdir,wc,who,whoami,yes
<shevy> hmmm thought sleep was built into bash...
<matled> shevy: go read single unix specification
<ttyp123> shevy :( not able to modify that script also it does not delete stuff between #c3284d# and #/c3284d#
<shevy> ttyp123 well.
vectorshelve has quit [Ping timeout: 245 seconds]
WhereIsMySpoon has quit [Changing host]
WhereIsMySpoon has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
schickung has quit [Read error: Connection timed out]
hoelzro is now known as hoelzro|away
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
Gavilan has left #ruby [#ruby]
indian has joined #ruby
indian has quit [Changing host]
indian has joined #ruby
schickung has joined #ruby
dhruvasagar has joined #ruby
<shevy> ttyp123: http://pastie.org/4249278 this should work. it is not perfect yet, just a proof of concept
khakimov has quit [Quit: Computer has gone to sleep.]
stefanp_ has quit [Ping timeout: 265 seconds]
<ttyp123> shevy, i save that as a file and execute it?
<ttyp123> how do i use it?
chrismcg is now known as zz_chrismcg
<shevy> yes you should save it as .rb file
<shevy> well try it with a test script
<shevy> let's say the test script is the data you pastied and a few extra lines
<shevy> so we have test.rb and test.txt ok
<shevy> "ruby test.rb test.txt"
<shevy> if you use a proper shebang entry you can do
<shevy> "./test.rb test.txt"
<shevy> you can give it a better name
<shevy> "replace_attack_lines.rb"
<shevy> it will remove the test.txt file though
<shevy> and will create a new one
<shevy> but I think what you really need to do is, either learn sed or ruby. it wont work well if you ever need to make modifications, and you dont know what you are doing
<ttyp123> i agree on that part of i dont know what i am doing
<ttyp123> :(
<shevy> we all have been at that point
<ttyp123> i think u r right.. for a long term solution i am gonna learn this a bit
<shevy> sometimes we still are at that point too
<shevy> with ruby, I can be lazy. I dont have to learn awk sed or any of the classical unix tools at all. I simply write what I need in ruby
<shevy> the only tradeoff I can see is speed, which does not bother me much
<ttyp123> hummmm is it a pain to learn? i tried python and perl but ... didnt go pretty far
<shevy> (and the initial cost of writing)
<shevy> depends
<shevy> if you understand the basic concepts of programming already, then it should not be too hard
<shevy> it takes quite some time to really get good with it though
ZachBeta has quit [Quit: Computer has gone to sleep.]
<shevy> work through http://pine.fm/LearnToProgram/?Chapter=00 at least once
<shevy> skip the homework part :D
owned_ has joined #ruby
crates has quit [Remote host closed the connection]
<ttyp123> hummmmm
crates has joined #ruby
MatthewGA has joined #ruby
emmanuelux has joined #ruby
<fowl> the way you chain method calls and such in ruby leads to an exhilarating way of forward thinking
<Hanmac> if someone chain directly to File.open he dont know what he has done
Emmanuel_Chanel_ is now known as Emmanuel_Chanel
<ttyp123> shevy, it just removed everything from the test file
<ttyp123> :(
MatthewGA has quit [Ping timeout: 252 seconds]
fridim_ has joined #ruby
tatsuya_o has quit [Read error: Connection reset by peer]
tatsuya__ has joined #ruby
mdstunthamster has quit [Quit: Linkinus - http://linkinus.com]
<fowl> Hanmac, yea he sai someone else wrote it
<fowl> keep it gangsta tho, File.open(file, mode, &:read) if you have to
hoelzro|away is now known as hoelzro
MatthewGA has joined #ruby
<Hanmac> yeah with &:read its working ... but when you use this you could use File.read directly too
carloslopes has joined #ruby
williamcotton_ has joined #ruby
bier|tp has quit [Read error: Operation timed out]
fridim_ has quit [Ping timeout: 246 seconds]
bier has quit [Read error: Operation timed out]
strife25 has joined #ruby
Osum has joined #ruby
schickung has quit [Read error: Connection timed out]
schickung has joined #ruby
schickung has quit [Client Quit]
blueOxigen has joined #ruby
duper has quit [Ping timeout: 246 seconds]
M3nti0n|off is now known as M3nti0n
bluOxigen has quit [Ping timeout: 250 seconds]
mneorr has quit [Quit: Leaving.]
awarner has joined #ruby
crankycoder has joined #ruby
gtuckerkellogg has joined #ruby
<gtuckerkellogg> RMagick keeps crashing my Mac
snakehsu has joined #ruby
Berglund has quit [Quit: Computer died.]
wallerdev has joined #ruby
bier|tp has joined #ruby
chrisja has joined #ruby
wallerdev has quit [Client Quit]
wallerdev has joined #ruby
awarner has quit [Remote host closed the connection]
jprovazn has quit [Quit: Leaving]
snakehsu has quit [Quit: leaving]
`brendan has joined #ruby
geekbri has joined #ruby
m4rtijn has joined #ruby
<m4rtijn> hi
wobr has quit [Ping timeout: 246 seconds]
wobr1 has joined #ruby
sky\ has joined #ruby
<sky\> hi, I'm trying to get ruby to work with gsl (installed on freebsd), yet after gem install gsl requiring the 'gsl' in my ruby script fails.
emmanuelux has quit [Ping timeout: 246 seconds]
krusty_ar has joined #ruby
t0mmyvyo has joined #ruby
berkes has joined #ruby
yugui is now known as yugui_zzz
<fowl> sky\, generally exceptions come with messages that explain them more than "failed"
<sky\> right, sorry
<fowl> are you on 1.8?
fbernier has joined #ruby
<sky\> yep
<fowl> gotta require'rubygems' before you can load any gems
<k_89> why is that ?
nari has quit [Ping timeout: 245 seconds]
arkiver has quit [Quit: Leaving]
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
<k_89> fowl, i have read that in code, and examples and everywhere else, but gem stuff seems to work without require 'rubygems' too
<fowl> k_89, are you on 1.9?
<k_89> yeah
<fowl> that would be why
<k_89> k, thnaks
mobilegamelabs has quit [Quit: (NEW! iPhone version is released) http://www.MGGGGG.com/ap Angry Polygon - my first Android/iOS/Mac game!]
<sky\> ah.
<k_89> thanks*
<sky\> on another note, is there a method of finding out which compiler "gem" uses ?
<JonnieCache> sky\: when its compiling C extensions you mean?
<sky\> yes
<sky\> the fail could be due to clang ..
<JonnieCache> thats decided by each gems own build script as far as i know
hydrozen has joined #ruby
<Muz> Check the mkmf.log file that gem creates?
sailias has joined #ruby
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
thisirs has joined #ruby
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
enroxorz has joined #ruby
enroxorz has joined #ruby
jgarvey has joined #ruby
<sky\> couple errors in the 'gsl' gem installation. never mind, are there other ways of linking to the GSL ?
hashar has joined #ruby
<fowl> sky\, ffi is an option
cakehero has joined #ruby
Guest62684 has joined #ruby
tiripamwe has quit [Read error: Connection timed out]
<ttyp123> fowl, this is probably OT but where can i hire someone to write such a script for me?
tiripamwe has joined #ruby
<ttyp123> i just cant seem to get the script working on .htaccess files and some .php files
Progster has joined #ruby
zawzey has quit [Quit: zawzey]
<gtuckerkellogg> RMagick keeps crashing my mac :(
<banisterfiend> gtuckerkellogg: stop using it
<banisterfiend> :)
<gtuckerkellogg> i have :)
k_89 has quit [Ping timeout: 244 seconds]
<gtuckerkellogg> but I'm trying to stictch together an animation for a presentation on Monday, and I *thought* a little script would do it
dhruvasagar has quit [Ping timeout: 265 seconds]
<gtuckerkellogg> it's not a Ruby problem; it's surely a combination of my igorance and ImageMagick complexity. I'm just grousing
vectorshelve has joined #ruby
mvangala_home has joined #ruby
mvangala_home is now known as mvangala
dhruvasagar has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
mvangal__ has joined #ruby
_bart has joined #ruby
<JonnieCache> rmagick sucks
mbuf has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<m4rtijn> i have a general question about project & file organization - I have the following setup: https://gist.github.com/3104659 -- now I would like a general "config" class which reads the yml and makes all the config vars available in my paypal_report.rb .. where should I put it?
<m4rtijn> also this config class should be available for other classes in my project
<JonnieCache> gtuckerkellogg: if you only need to do thumbnails then ImageScience is good
hashar is now known as hasharDeadmau5
<gtuckerkellogg> unfortunately, i need to make an animation
<m4rtijn> gtuckerkellogg: use html5 for basic animation..
mneorr has joined #ruby
<JonnieCache> or just use svg and then some tool that renders it out
<fowl> gtuckerkellogg, use gosu
mvangal__ has left #ruby [#ruby]
<JonnieCache> anything but imagemagick man that thing is a behemoth
lkba has joined #ruby
<gtuckerkellogg> that it is
<JonnieCache> its a shame because its a really cool bit of software
<fowl> ttyp123, im not sure, you could try a freelance site
Bofu2U has joined #ruby
<JonnieCache> but it seems like its just ballooned over the years and nobodys had any chance to do much in the way of architecting
mvangala has quit [Ping timeout: 246 seconds]
Ionic` has joined #ruby
<Progster> I realized I'm really not a fan of unless statements. The amount of time I spend in my head trying to parse them is infinitely longer than if !something
<JonnieCache> it really depends on what the something is
<JonnieCache> if it ends up looking like an english sentance then it can be good
kyktommy has joined #ruby
<Progster> unless user.admin? is less readable to me than if !user.admin?
<JonnieCache> agreed
<m4rtijn> anyone who can help me with my file organisation thingie?
<JonnieCache> however, `unless user.is_an_admin?` looks quite good to me
<JonnieCache> but not everyone names methods like that
<Progster> I dunno. I don't like unless statements as beginning blocks. I think I can tolerate them at the end of a statement when they make sense
<JonnieCache> m4rtijn: in lib/paypal_report/config.rb
phromo has joined #ruby
<JonnieCache> or just lib/config.rb depending on taste
d3vic3 has quit [Ping timeout: 252 seconds]
chson has quit [Remote host closed the connection]
<m4rtijn> JonnieCache: what if I build a lib/worldpay_report.rb next
<JonnieCache> well maybe you should have a module called reports
phromo has quit [Client Quit]
<JonnieCache> and a dir called lib/reports
<JonnieCache> with both the paypal one and the worldpay one under it
<sky\> does anyone else here use GSL with ruby ?
<m4rtijn> Johnie, i do
<JonnieCache> go on github and look how your favourite gems organise their code
jsime has joined #ruby
<JonnieCache> its not a super strict thing
d3vic3 has joined #ruby
<JonnieCache> the interpreter doesnt care where the files are, the directory structure is there for your benefit
<m4rtijn> JonnieCache: k, thanks
<m4rtijn> yes, we need a general project directory template for all future projects
<m4rtijn> 5 proggrammers here, so far programming php .. switching to ruby gradually
<m4rtijn> and i need to setup some guidelines
<JonnieCache> well if you're making a gem, `bundle gem` at the command line spits out a template for that
<m4rtijn> k
<JonnieCache> and there are various templates out there on github for different types of project
<JonnieCache> rails has its own generators
grekkos has joined #ruby
grekkos is now known as Guest94121
hynkle has joined #ruby
lilin has joined #ruby
LennyLinux has quit [Quit: Mango IRC for iOS, http://mediaware.sk/mango]
LennyLinux has joined #ruby
verto|off is now known as verto
lilin has quit [Client Quit]
vitoravelino`afk is now known as vitoravelino
linoj has joined #ruby
m4rtijn has quit [Quit: Page closed]
beandip has quit [Ping timeout: 248 seconds]
lolmaus has quit []
<Progster> rails's setup seems pretty ok
S1kx has quit [Read error: Connection timed out]
yugui_zzz is now known as yugui
<JonnieCache> the main thing is that the dir structure should follow the namespacing of the classes
<JonnieCache> otherwise you will go crazy trying to keep track of things
Markvilla has joined #ruby
kyktommy has quit [Quit: kyktommy]
g0bl1n has joined #ruby
yugui is now known as yugui_zzz
SpaceAviator has joined #ruby
sepp2k has joined #ruby
yugui_zzz is now known as yugui
bburton has joined #ruby
andrewhl has joined #ruby
rowanu has joined #ruby
mdszy has joined #ruby
liluo has joined #ruby
owned_ has quit [Ping timeout: 246 seconds]
indian has quit [Ping timeout: 248 seconds]
sailias has quit [Ping timeout: 246 seconds]
vectorshelve has quit [Quit: Page closed]
yugui is now known as yugui_zzz
bier|tp has quit [Read error: Operation timed out]
StretchedALot has quit [Quit: H. Rollins Shells (817) 504-9915]
StretchedALot has joined #ruby
StretchedALot has quit [Client Quit]
pk1001100011 has quit [Ping timeout: 240 seconds]
zawzey has joined #ruby
dv310p3r has joined #ruby
robbyoconnor has quit [Ping timeout: 246 seconds]
n1x has joined #ruby
pk1001100011 has joined #ruby
n1x has left #ruby [#ruby]
liluo_ has joined #ruby
tiripamwe has quit [Remote host closed the connection]
liluo has quit [Ping timeout: 246 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
StretchedALot has joined #ruby
uris has joined #ruby
choffstein has joined #ruby
lewis1711 has quit [Quit: Leaving.]
erichmenge has joined #ruby
gokul has joined #ruby
bbttxu has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
StretchedALot has quit [K-Lined]
ananthakumaran has joined #ruby
jimeh has quit [Ping timeout: 248 seconds]
yonggu has joined #ruby
dhruvasagar has joined #ruby
niklasb has quit [Ping timeout: 246 seconds]
liluo_ has quit [Remote host closed the connection]
yonggu_ has joined #ruby
yonggu has quit [Ping timeout: 246 seconds]
SeySayux has quit [Ping timeout: 265 seconds]
choffstein has quit [Remote host closed the connection]
dv310p3r has quit [Ping timeout: 246 seconds]
jimeh has joined #ruby
_justin has quit [Ping timeout: 246 seconds]
dv310p3r has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
whitenoise has joined #ruby
yonggu_ has quit [Ping timeout: 248 seconds]
whitenoise has quit [Changing host]
whitenoise has joined #ruby
awarner has joined #ruby
SeySayux has joined #ruby
Markvilla has quit [Quit: Markvilla]
yonggu has joined #ruby
carlyle has joined #ruby
Markvilla has joined #ruby
elhu has quit [Ping timeout: 240 seconds]
owned_ has joined #ruby
Guest62684 has quit [Ping timeout: 265 seconds]
indian has joined #ruby
choffstein has joined #ruby
elhu has joined #ruby
hunglin has joined #ruby
hunglin has left #ruby [#ruby]
Markvilla_ has joined #ruby
hunglin has joined #ruby
a_a_g has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
a_a_g has joined #ruby
Sgeo has joined #ruby
<lectrick> So yesterday I was confused about protected methods due to this test case: class Master; protected; def secret; puts "hi"; end; end; class Servant < Master; end; s = Servant.new; s.secret
Markvilla has quit [Ping timeout: 246 seconds]
Markvilla_ is now known as Markvilla
a_a_g has quit [Client Quit]
<lectrick> It turns out that "protected" just means subclasses can access those methods *from within themselves* but you as a user still don't have access to that method
Sgeo_ has quit [Ping timeout: 244 seconds]
gregorg has quit [Read error: Connection reset by peer]
Cork has quit [Read error: Operation timed out]
cjlicata has joined #ruby
_justin has joined #ruby
Cork has joined #ruby
<shevy> does not sound as if protected is very useful
chson has joined #ruby
carlyle has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
Sgeo has quit [Quit: Leaving]
ttilley_off is now known as ttilley
obryan has joined #ruby
johnlcox has joined #ruby
yonggu_ has joined #ruby
rohit has joined #ruby
yonggu has quit [Ping timeout: 240 seconds]
ackz has joined #ruby
Fretta has joined #ruby
<JonnieCache> depends how your like to do your OO i suppose
dinkytoy has joined #ruby
hunglin has left #ruby [#ruby]
pu22l3r has joined #ruby
mahmoudimus has joined #ruby
gokul has quit [Quit: Leaving]
macmartine has joined #ruby
williamcotton_ has quit [Read error: Connection reset by peer]
williamcotton_ has joined #ruby
mahmoudimus has quit [Client Quit]
xnm has joined #ruby
rohit has quit [Ping timeout: 246 seconds]
cloud|windoze has joined #ruby
mahmoudimus has joined #ruby
hunglin has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
shevy has quit [Ping timeout: 248 seconds]
bier has joined #ruby
uris has quit [Read error: Connection reset by peer]
DarkFoxDK has quit [Read error: Operation timed out]
quest88 has joined #ruby
oscardelben has joined #ruby
quest88 has quit [Client Quit]
dexterous has joined #ruby
wargasm1 has left #ruby [#ruby]
robbyoconnor has joined #ruby
dexterous has left #ruby [#ruby]
jshsu has quit [Ping timeout: 246 seconds]
hoelzro has quit [Ping timeout: 272 seconds]
pradeepto has quit [Ping timeout: 245 seconds]
SirFunk has quit [Ping timeout: 245 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
kevinbond has joined #ruby
Markvilla has quit [Quit: Markvilla]
joshman_ has joined #ruby
<Gadgetoid> Is packing 4 numbers ranging from 0-3 into a single unsigned int really as simple as: [0,1,2,3,2,1,3,2,3,2,1,3].each_slice(4){|slice| packed<<slice.join.to_i(4)}
kevinbond has left #ruby [#ruby]
xnm has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 244 seconds]
pradeepto has joined #ruby
dhruvasagar has joined #ruby
DarkFoxDK has joined #ruby
jshsu has joined #ruby
xaq has joined #ruby
tagrudev has quit [Remote host closed the connection]
pu22l3r has quit [Remote host closed the connection]
SirFunk has joined #ruby
rohit has joined #ruby
jimeh has quit [Ping timeout: 250 seconds]
pradeepto has quit [Changing host]
pradeepto has joined #ruby
macmartine has quit [Quit: macmartine]
hoelzro has joined #ruby
aaroncm has joined #ruby
oddraisin has quit [Ping timeout: 260 seconds]
<burgestrand> lectrick: http://codepad.org/nKIKAbMZ
strife25 has joined #ruby
<Hanmac> Gadgetoid i would prefer something like this: [0,1,2,3,2,1,3,2,3,2,1,3].each_slice(4).map{|slice| slice.join.to_i(4)}
shevy has joined #ruby
bier has quit [Remote host closed the connection]
<Gadgetoid> Hanmac: nice one liner!
ananthakumaran has joined #ruby
jimeh has joined #ruby
hadees has quit [Quit: hadees]
dhruvasa1ar has joined #ruby
bier has joined #ruby
mayankkohaley has joined #ruby
<burgestrand> Hanmac, Gadgetoid: what’s up with the param 4 to to_i, why is it needed?
hoelzro has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Ping timeout: 255 seconds]
<Gadgetoid> burgestrand: I'm packing 4 integers of range 0-3 into a single integer of range 0-255
<Gadgetoid> Then converting it to hex and spitting it out as a C-formatted array
<Hanmac> burgestrand to_i(2) is treat it as base 2 "010" => 2
<burgestrand> Ah, so not an int
<burgestrand> I interpreted it as you wanted to store it in a 32bit int :)
<Gadgetoid> Nah, packing 4 8-bit integers into 1 8-bit integer, to save some of the 32k space
<Gadgetoid> Arduino :D
shavus has joined #ruby
oddraisin has joined #ruby
<burgestrand> :)
theRoUS_ has joined #ruby
<Hanmac> Gadgetoid you could look at Array#pack and String#unpack ... maybe there is cooler stuff for you
rekenerd has joined #ruby
wargasm has joined #ruby
lorandi has joined #ruby
<Gadgetoid> Array#pack scared me somewhat :D not sure it's appropriate as I want an array out
hoelzro has joined #ruby
binaryplease has quit [Ping timeout: 265 seconds]
cdavaz has joined #ruby
Guest62684 has joined #ruby
tatsuya__ has quit [Remote host closed the connection]
binaryplease has joined #ruby
rekenerd has quit [Client Quit]
thisirs has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
billiam has joined #ruby
beneggett has joined #ruby
tatsuya__ has joined #ruby
tatsuya_o has quit [Read error: Connection reset by peer]
andrewhl has quit [Remote host closed the connection]
Guest62684 has quit [Ping timeout: 246 seconds]
nari has joined #ruby
TorpedoSkyline has joined #ruby
TorpedoSkyline has quit [Client Quit]
cads has quit [Ping timeout: 246 seconds]
zastaph has joined #ruby
akem has quit [Ping timeout: 246 seconds]
flip_digits has joined #ruby
oooPaul has joined #ruby
DrShoggoth has joined #ruby
groupcat has quit [Quit: brb]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
carloslopes has quit [Quit: Leaving.]
mayankkohaley has quit [Remote host closed the connection]
sebastorama has joined #ruby
berkes has quit [Quit: Ex-Chat]
cdavaz has quit [Quit: cdavaz]
mrmist has joined #ruby
rohit has quit [Quit: Leaving]
cakehero has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
xscc has joined #ruby
mrmist is now known as groupcat
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
yonggu has joined #ruby
xscc has quit [Client Quit]
berkes has joined #ruby
yonggu_ has quit [Ping timeout: 246 seconds]
gtuckerkellogg has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
SQLStud has joined #ruby
ken_barber has joined #ruby
beandip has joined #ruby
daniel_hinojosa has quit [Read error: Operation timed out]
chazu has joined #ruby
kvirani has joined #ruby
mucker has joined #ruby
djdb has quit [Remote host closed the connection]
mucker has quit [Client Quit]
mucker has joined #ruby
mvangala_ has quit [Remote host closed the connection]
internet_user has joined #ruby
pdtpatrick_ has joined #ruby
<chazu> hey folks, dunno if anybody here is a user of the Sequel gem, but...
SpaceAviator has quit [Ping timeout: 252 seconds]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
sky\ has left #ruby [#ruby]
<chazu> If i need to join two tables based on an id nested in an attribute, like so: recipients => { ids => 1,2,3, } } how would one do that?
<chazu> well, how would one do that with one hit to the db, i guess...
<chazu> >_<
yonggu_ has joined #ruby
<gogiel> chazu: ids is string?
SegFaultAX has joined #ruby
<chazu> ids is a key inside of a yaml-serialized hash
Helius has quit [Remote host closed the connection]
centipedefarmer has joined #ruby
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
<chazu> if that makes sense
yonggu has quit [Ping timeout: 265 seconds]
nopolitica has joined #ruby
<chazu> aw, heck i'll just hit the db n times for each record XD
bluOxigen has joined #ruby
Vert has joined #ruby
blueOxigen has quit [Ping timeout: 255 seconds]
apok has joined #ruby
k_89 has joined #ruby
ckrailo has joined #ruby
<gogiel> chazu: so, you want to write sql join, yes?
pu22l3r has joined #ruby
<gogiel> i don't get what you want to do
<shevy> I never used Sequel so I have no idea
headius has joined #ruby
<chazu> gogiel, shevy: yeah, sorry if i'm not explaining very well. i have messages and users. messages has attribute 'recipients', with a key 'ids', an array of user ids. i want to join messages to users on the value of that key of a serialized attribute.
<chazu> but i'd prefer to hit the db once for each message.
cads has joined #ruby
<gogiel> recipients is in db?
<gogiel> you use serialzie :recipients, Array ?
<gogiel> if yes it's possible to do it with one query in more advanced db like pg, but you'll need some advanced sql and subselect in it
davidcelis has quit [Ping timeout: 250 seconds]
<chazu> gogiel: yes it is serialized, but...sounds like i should just hit the db n+1 times, honestly T_T...or pull the data via activerecord
<chazu> gogiel: Thanks for the analysis ^_^...
<gogiel> chazu: if it's not time critical it's better to do more queries in this case
brianpWins has quit [Quit: brianpWins]
wvms has quit [Read error: Connection reset by peer]
hasharDeadmau5 is now known as hasharDeCrecy
<chazu> gogiel: yeah, its not time critical, i'm just being difficult on myself ^_^...and you guys
<chazu> thanks again
wvms has joined #ruby
<gogiel> chazu: i'm just curious, why don't you use has_many?
<JonnieCache> also activerecord has support for key-value columns now
<JonnieCache> so you dont even have to serialise anything
binaryplease has quit [Quit: WeeChat 0.3.8]
binaryplease has joined #ruby
mengu has quit [Quit: Konversation terminated!]
<gogiel> JonnieCache: can you provide more details?
<chazu> gogiel: I'm not sure myself, but when this was designed i suppose they wanted to address messages to individuals and groups, so theres recipients hash with multiple keys...
<JonnieCache> just looking for the link
elhu has quit [Ping timeout: 255 seconds]
binaryplease has quit [Client Quit]
wobr1 has quit [Ping timeout: 248 seconds]
<JonnieCache> it pretty cool
<JonnieCache> like it says though you cant query against the contents of the hash
<gogiel> JonnieCache: but is it db-efficient?
<JonnieCache> its just a serialized column like any other
<JonnieCache> it just has a neater api
Eldariof-ru has quit [Ping timeout: 265 seconds]
pdtpatrick_ has quit [Quit: pdtpatrick_]
<gogiel> yes, but you can't use serialized value as foreign key, can you?
a_a_g has joined #ruby
<JonnieCache> no you cant do anything with it really
<JonnieCache> until the AR object is instantiated
niklasb has joined #ruby
elhu has joined #ruby
d3vic3 has quit [Quit: leaving]
nachtwandler has joined #ruby
<JonnieCache> you have to consider it as opaque to the database, like all serialized columns
theRoUS_ has quit [Ping timeout: 248 seconds]
oscardelben has quit [Quit: oscardelben]
bier has quit [Read error: No route to host]
bier has joined #ruby
Spooner has joined #ruby
JustinCampbell has joined #ruby
nari has quit [Ping timeout: 244 seconds]
a_a_g has quit [Quit: Leaving.]
wvms has quit [Quit: wvms]
wvms has joined #ruby
dhruvasagar has joined #ruby
fearoffish has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
wvms has quit [Client Quit]
dhruvasa1ar has quit [Ping timeout: 252 seconds]
hasrb has joined #ruby
baroquebobcat has joined #ruby
wvms has joined #ruby
blazes816 has joined #ruby
wvms has quit [Ping timeout: 250 seconds]
yonggu has joined #ruby
yonggu_ has quit [Ping timeout: 252 seconds]
cbuxton has joined #ruby
berkes has quit [Quit: Ex-Chat]
bluOxigen has quit [Ping timeout: 265 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
itnomad has joined #ruby
keymone has left #ruby [#ruby]
yonggu has quit [Ping timeout: 246 seconds]
zrail has left #ruby [#ruby]
lledet has left #ruby [#ruby]
robotmay has quit [Remote host closed the connection]
Helius has joined #ruby
LennyLinux has quit [Remote host closed the connection]
<sernin> Scope question. Do 'do' blocks create a new scope within a method?
<hoelzro> sernin: yes
<banisterfiend> sernin: they're closures
<hoelzro> but
<sernin> That would explain quite a bit
Beoran_ has joined #ruby
theRoUS_ has joined #ruby
<banisterfiend> sernin: so they close over variabls defined outside it, but variables defined just inside it stay inside it
<hoelzro> if you refer to variables that exist within the enclosing scope, the enclosing scope's variables are used
apok has quit [Quit: apok]
<banisterfiend> sernin: you can also, if u want, specifically tell ruby to shadow outer variables rather than close over them insidet hte block
<banisterfiend> by using { |;x, y| .. }
<banisterfiend> semicolon
<hoelzro> but only in 1.9
mneorr has quit [Quit: Leaving.]
<banisterfiend> 1.8 can eat a dick at this point
<sernin> Agree with that.
brianpWins has joined #ruby
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<sernin> I had a rather hilarious misstep earlier, using IO.foreach(file, 'r') -- lo and behold, all my lines were split on the 'r' character. That was interesting.
flippingbits has quit [Quit: flippingbits]
thecreators has quit [Quit: thecreators]
Beoran has quit [Ping timeout: 246 seconds]
hoelzro is now known as hoelzro|away
g0bl1n has quit [Ping timeout: 240 seconds]
jlogsdon has joined #ruby
<sernin> Okay, so http://pastie.org/4250717 is the way to preserve 'h' in this case?
richo has quit [Ping timeout: 260 seconds]
* sernin assumes it has to be passed down through both do blocks
kvirani has quit [Remote host closed the connection]
mneorr has joined #ruby
fbernier has quit [Ping timeout: 252 seconds]
<sernin> Or if there's another, cleaner way, I'm all ears.
febo has joined #ruby
richo has joined #ruby
bier has quit [Remote host closed the connection]
<sernin> Hrm. That gives me undefined method for line.chomp!
<banisterfiend> sernin: what do u mean preserve it
<banisterfiend> sernin: why not just not use any other 'h' locals?
Helius has quit [Read error: Connection reset by peer]
<banisterfiend> that will leave the original untouched
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hadees has joined #ruby
Guest94121 has quit [Ping timeout: 265 seconds]
elhu has quit [Quit: Computer has gone to sleep.]
bier has joined #ruby
tomb has quit [Quit: Computer has gone to sleep.]
<sernin> let me provide some additional context
mneorr has quit [Quit: Leaving.]
burgestrand has quit [Ping timeout: 246 seconds]
chazu has quit [Remote host closed the connection]
multi_io has quit [Remote host closed the connection]
<shevy> do |;h,line|
<shevy> what is |;h
fridim_ has joined #ruby
elhu has joined #ruby
bradhe has joined #ruby
<ttyp123> shevy, i removed about 6000 entries from .html files.. now about 500 php files are remaining :)
maletor has joined #ruby
k_89 has quit [Ping timeout: 248 seconds]
<shevy> ttyp123: remember to try to understand how it is done. (1) read in the data (2) modify the data (i.e. by building a new array) (3) storing the result
<shevy> that class can be improved
<shevy> for instance, you can feed it some directories
<shevy> Dir.glob('/tmp/*.html')
<shevy> you can start irb and test how this is done
<shevy> Dir.entries is easier
benson has joined #ruby
<shevy> same if you use sed btw
<shevy> but I gave up on the UNIX tools myself. ruby won me over
<banisterfiend> sernin: still dotn understand sorry
<banisterfiend> gotta go now anyway, im sure someone will help you :)
<banisterfiend> night
<sernin> banisterfiend: its a hash that needs to be passed around a lot and processed.
savage- has joined #ruby
<shevy> I take it that sernin is no newbie :)
savage- has quit [Remote host closed the connection]
<sernin> i come from the faraway land of Perl.
<shevy> good old perl
<shevy> I remember my first book about regexes was a perl book
savage- has joined #ruby
<sernin> You should see the regex I composed for this custom apache log. It's a whopper.
<shevy> sadly, I never again read a book about regexes... so named captures and the like are still unbeknown to me
elhu has quit [Quit: Computer has gone to sleep.]
<blazes816> sernin: longest regex in a perl script wins!
<shevy> I dunno, I find regexes tax my brain too much. I need too much time to process them when they get complicated
pdtpatrick_ has joined #ruby
<shevy> props to the guys with bigger brains
hydrozen has quit [Quit: Computer has gone to sleep.]
<sernin> That's the /x flag. But this scope thing is driving me mad.
cdavaz has joined #ruby
<ij> What do you guys think about def x; do_things.tap do; do_something_else; end; end <-- construction to do else after things, but return things?
mneorr has joined #ruby
<sernin> is there a bad-ruby way of saying 'fuck this, make it a global'
<shevy> dunno. $foo ?
<ij> sernin: There are global variables.
<shevy> $foo = 5
<apeiros_> Constants and $globals are global in ruby
<apeiros_> ij: I see nothing wrong with it. why?
ianbrandt has joined #ruby
<apeiros_> ij: though, personally I use {} if I care about the return value
<ij> apeiros_: I've got a nazi mentor, just checkin.
dhruvasagar has quit [Ping timeout: 246 seconds]
yankhate1 has joined #ruby
yankhate1 has quit [Client Quit]
ewag has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
<shevy> ij: dunno, .tap still confuses me
<ij> What exactly confuses you?
TheRealPygo has quit [Quit: leaving]
<blazes816> shevy: it just returns what you tap
<shevy> why I would need it for instance
mdszy has quit [Quit: bye for now]
<ij> It's actually a let.
<Mon_Ouie> Nothing wrong with it per se, but sometimes it's used really weirdly. Like [].tap { |ary| (do stuff that could have been done using #map here…) }
<shevy> ^^^
<ij> map
tcopp has joined #ruby
<ij> Mon_Ouie: Gimme an example.
<ij> Well if someone uses it incorrectly it's their fault.
<Mon_Ouie> [].tap { |ary| numbers.each { |n| ary << n * 2 } }
thecreators has joined #ruby
yankhates has joined #ruby
<shevy> ij: people will use every feature that exists to do the craziest things though
<ij> The man that wrote that had lisp or other languages' let construction in mind.
Rochefort has quit [Remote host closed the connection]
<ij> Mon_Ouie: How would you write it with #map?
<blazes816> numbers.map{|n| n * 2}
<Mon_Ouie> numbers.map { |n| n * 2 }
<ij> Oh, lal. right
sebastorama has quit [Quit: :D]
uris has joined #ruby
<ij> Well I see why would one write that, but there's no reason to not do map.
<shevy> notice that one guy uses .map{ and the other guy uses .map { :D
<ij> .map { > .map{
<shevy> yeah I like it more visually too
<shevy> oh second difference...
<shevy> {|n| vs { |n|
<blazes816> me too, I just didn't space fast enough
<ij> ^
<ij> Thougght that. :]
minijupe has joined #ruby
<blazes816> I'd write it in code the way Mon_Ouie did
alta has joined #ruby
mahmoudimus has joined #ruby
<shevy> hehe
<ij> But { |foo| > {|foo
<shevy> hmm
<shevy> oh
<shevy> I wanted to disagree
<ij> Looks cleaner.
<blazes816> yeah, that too.
<shevy> but then I just looked at my own code
<shevy> and I do the same
<shevy> so I can't disagree
<ij> ...
<ij> he
<Hanmac> or numbers.each_with_object(2).map(&:*) :D
<ij> whoa
<shevy> Hanmac: yours there is ugly
<ij> I didn't know ruby can curry.
<ij> Hanmac: awesome
<shevy> I hate the &:lalala
<ij> Why?
<lectrick> quick, someone remind me what currying is
<shevy> the & visually disturbs me
<ij> Hanmac: That's just sweet.
<Hanmac> numbers.map(&2.method(:*))
<ij> lectrick: What Hanmac did.
tvw has joined #ruby
<shevy> omg
<ij> what
hynkle has quit [Quit: Computer has gone to sleep.]
<shevy> it reminds me of some address or pointer
<ij> no way
elhu has joined #ruby
<ij> Hanmac: Which ruby?
<shevy> Hanmac's Custom Ruby 3.0
williamcotton_ has quit [Read error: Connection reset by peer]
<Hanmac> ij the last line: numbers.map(&2.method(:*)) works with 1.8 and 1.9
williamcotton_ has joined #ruby
<ij> Badass.
<sernin> OK. Bizarre. If I go back to using foreach and split lines on an arbitrary character, my lines are messed up, but the scope issue is gone
<ij> This day is a success.
tomb has joined #ruby
<Mon_Ouie> I still don't understand why people hate writing blocks so much
<ij> Shorter.
<ij> I like writing blocks.
<shevy> I think for smal... yeah, for small block-tasks
<Mon_Ouie> The each_with_object one is way longer
maletor has quit [Ping timeout: 248 seconds]
<shevy> like {|x| x.chomp }
<ij> Mon_Ouie: Code reuse.
<shevy> vs (&:chomp)
<shevy> never used each_with_object myself so far
dhruvasa1ar has joined #ruby
<Mon_Ouie> How does it help in reusing code?
<Hanmac> ij you could remove some () :P numbers.map &2.method(:*)
philips_ has quit [Excess Flood]
<shevy> ugly!
<shevy> though without () a bit better
<shevy> but still
maletor has joined #ruby
anothervenue has quit [Ping timeout: 244 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
<ij> That's just a matter of taste.
<ij> And case.
<shevy> Perl!!!
<ij> :]
hasrb has quit [Remote host closed the connection]
<shevy> sernin: is perl ugly?
owned_ has quit [Read error: Operation timed out]
<shevy> hmmm he is probably in regex land...
<Hanmac> &:sym is faster then {|x| x.sym} and takes less memory because the second form feeds on a binding
<shevy> wait
<sernin> shevy: Yes, though not moreso than say, Javascript. Depends on the coder.
<shevy> I thought it was slower because it calls to_proc
<Hanmac> shevy: that is that the OTHERS want you to think :P
etehtsea has quit []
<shevy> sernin: yeah... I don't like Javascript either
randomautomator has joined #ruby
<ij> Mon_Ouie: if you do with a function(call), that what you can do with a block(new code), that's reuse.
<shevy> js has the browser advantage... without browsers, noone would use it
<blazes816> shevy: get ruby in the browser
philips_ has joined #ruby
<shevy> how!
<shevy> I'd like that
<ij> Chrome.
<ij> There was that project.
<apeiros_> blazes816: you can. use ironruby + silverlight
TheNumb has joined #ruby
k_89 has joined #ruby
<Hanmac> blazes816 ... you could write a entire browser in ruby :P
indian has quit [Ping timeout: 250 seconds]
<ij> Hanmac: Each with object doesn't work.
Criztian has quit [Remote host closed the connection]
<apeiros_> also it might be possible to get mruby work with nativeclient in chrome.
<shevy> cool
<blazes816> Hanmac, of course you could. The problem is getting market share.
<Hanmac> ij, ok but the other lines work
<sernin> OK. This is truly odd and I would appreciate any help before going to ruby-lang
<ij> Hanmac: Yup.
<blazes816> if you got ruby support in Chrome/FF it'd go a lot farther
<shevy> blazes816: well it could perhaps work if powerusers get extra advantages with such a browser
elhu has quit [Quit: Computer has gone to sleep.]
febo has quit [Remote host closed the connection]
<blazes816> shevy: then you would have to provide ruby, for "power users", and JS, for "normies"
cdavaz has quit [Ping timeout: 244 seconds]
<blazes816> or leave them out
<blazes816> which I'm fine with
<shevy> I'd instantly use ruby myself!
<blazes816> as a poweruser
<Hanmac> shevy you could make a benchmark what is faster, :&sym or {|x| x.sym}
elhu has joined #ruby
<shevy> yeah Hanmac hmm let's see
<ij> Hanmac: Are ther any other ways of doing it and can you curry even more?
<ij> Also, what provides #method?
<ij> Ruby or rails?
<Mon_Ouie> The Object class
Speed has joined #ruby
IceDragon has joined #ruby
<ij> How could you make %{a b} into %w{ax bx} using map trickery of some sort?
<ij> without String#reverse
elhu has quit [Quit: Computer has gone to sleep.]
ringotwo has joined #ruby
<Mon_Ouie> string.split.map { |s| s + "x" }?
<ij> sorry, %w
<ij> How could you make %w{a b} into %w{ax bx} using map trickery of some sort?
<Mon_Ouie> Then just map { |s| s + "x" }
<shevy> just think of .map as "apply on each element"
<shevy> so in this case, append 'x' on each element
<ij> I mean by currying. ;-D
<ij> I should be more verbose.
apok has joined #ruby
<shevy> I dont know if you can do that by currying
<shevy> probably not
<ij> :<
<shevy> :)
<ij> Well you can, but you must reverse the strings, which is not what I want.
<Mon_Ouie> Ruby doesn't really support curryfication. It does have Proc#curry, but it's basically never used
<ij> 2.method is currying.
<ij> Sort of.
<shevy> well
<shevy> you could write a new method :P
<ij> Nah.
<shevy> array.append_this_character(&:x)
<ij> haha
<ij> I want std func.
jeff_sebring has joined #ruby
chrisja has quit [Quit: leaving]
apeiros_ has quit [Remote host closed the connection]
bradhe has quit [Read error: Connection reset by peer]
<shevy> we all want but the core team is not liking to add too much for some reasno
<shevy> *reason
bradhe has joined #ruby
<Hanmac> ij. i think when you use strings each_with_object is a bit more better (special when you have longer strings ...)
mohits has quit [Ping timeout: 246 seconds]
<Hanmac> (i thought about the RAM usage)
rekenerd has joined #ruby
<shevy> pffft RAM
lorandi has quit [Quit: Leaving]
hasharDeCrecy has quit [Quit: I am a manual virus, please copy me to your quit message.]
<shevy> it's like buying a bigger car
<shevy> do it!
eywu has joined #ruby
<ij> Anyone who's using ruby simply doesn't care about ram.
<ij> It's Infinity to him.
iamjarvo has joined #ruby
<shevy> to me kinda of yeah
<shevy> but half of the other ruby people care a lot about speed :(
<sernin> I'm an asshat
<ij> Ruby is slow and pollutes ram like hell, but people like it.
<ij> Why? Because it's damn awesome.
<sernin> and ruby error messages are confusing. My script was choking on its first line of input (the format spec), and it needed some b/r/e love.
<Hanmac> my 3d ruby game had >200 FPS ... i does not care about speed :P
<ij> What?
<ij> Was there C behind it?
<ij> Lots of C?
<ij> *native ext
<Hanmac> it was a test of an ogre binding
baphled_ has quit [Ping timeout: 240 seconds]
<sernin> ij: the ruby script was 'exec 'glxgears''
<shevy> wait what
<shevy> you wrote ruby games?
<sernin> s/script/game
<Hanmac> shevy not yet it was only a function test
cdavaz has joined #ruby
khakimov has joined #ruby
<blazes816> shevy: you can use Mirah or jRuby to write games fairly effectively.
Testish has quit [Ping timeout: 245 seconds]
cdavaz is now known as Ontolog
<ij> Will MRI ever be fast?
<Sou|cutter> no.
<ij> :[
<Sou|cutter> next!
<ij> ;-D
* Sou|cutter grins
<shevy> lol
* ij is another satisfied customer.
Ontolog is now known as cdavaz
<shevy> hmm that's a good point... a ruby game with jruby
<shevy> I fail much earlier
<shevy> the base of my current game isn't even finished :\
hasrb has joined #ruby
<blazes816> nice. i'm working on a simple game engine for Mirah for android games
<Mon_Ouie> ij: Actually there's a way… %w[a b].map { |s| proc { |a, b| a + b }.curry.call(s) }.each_with_object("x").map(&:call)
<shevy> ack
<shevy> look what you did now ij
<shevy> you are killing ruby ij!!!
<ij> How?
<shevy> look at it!!!
<shevy> this is a monstrous lines
<shevy> even two .call
rudyl313 has joined #ruby
jgrevich has joined #ruby
<shevy> AND a proc
<Mon_Ouie> It took me some thinking to come up with it
<ij> I was still thinking.
<shevy> I am still thinking.
<ij> I'm bending paper clips, also.
<shevy> lol
mmercer is now known as daemoen
<ij> With my nokia.
<shevy> as long as it helps thinking
tatsuya__ has quit [Remote host closed the connection]
cloud|windoze has quit [Ping timeout: 255 seconds]
<ij> Well it keeps me entertained while the tests are running.
burgestrand has joined #ruby
centipedefarmer has quit [Quit: This computer has gone to sleep]
Icoin has quit [Ping timeout: 246 seconds]
mtyson has joined #ruby
duper has joined #ruby
mtyson has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
<Hanmac> ij MRI can be fast if boosted with C(++)
<shevy> :\
johnernaut has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<shevy> I can run as fast as usain bolt if you just lemme prepare with some growth hormones and steroids!
<ij> Hanmac: Boosted, how?
<ij> Native extensions?
<ij> That's not boosting ruby, that's just not running ruby.
Tyr0 has joined #ruby
Icoin has joined #ruby
rekenerd has quit [Read error: Connection reset by peer]
<Tyr0> has anyone here worked with opencv?
Ethan has joined #ruby
Icoin has quit [Read error: Connection reset by peer]
<ij> Searching for guidelines? :]
rekenerd has joined #ruby
kenichi has joined #ruby
<Tyr0> need help with cvcircle
fridim_ has quit [Ping timeout: 246 seconds]
rekenerd has quit [Read error: Connection reset by peer]
jarred has joined #ruby
t0mmyvyo has joined #ruby
rudyl313 has left #ruby [#ruby]
rekenerd has joined #ruby
<shevy> never heard of opencv before
<ij> Tyr0: Isn't there #opencv or something?
<Tyr0> its intel's open source object detection library
jeff_sebring has quit [Quit: Leaving]
dhruvasa1ar has quit [Ping timeout: 244 seconds]
<Tyr0> ij: yeah, I'm asking there too, but my trouble's still related to ruby :)
jarred_ has joined #ruby
adeponte has joined #ruby
<ij> I see. :]
Testy has joined #ruby
jarred has quit [Ping timeout: 245 seconds]
jarred_ is now known as jarred
<Testy> Does anyone know how to fail an entire test suite from the startup method using Test-Unit?
Juul has joined #ruby
andrewhl has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
idoru has joined #ruby
Gate_ is now known as Gate
rcrossan has joined #ruby
<rcrossan> checking for anyone with experience using watir/ruby with jenkins. My question is more with the Jenkins Config with Rake plugin 1.7 where you enter Ruby Installation information. I'm getting a message under the text box "It seems that ruby gems is not installed" no matter what I enter in there. If I leave it blank it says "Is not a directory"
Hertz has quit [Read error: Connection reset by peer]
Gate has quit [Changing host]
Gate has joined #ruby
btanaka has joined #ruby
blazes816 has quit [Quit: Leaving]
punkrawkR has joined #ruby
tewecske has joined #ruby
jonatha__ has quit [Remote host closed the connection]
k_89 has quit [Ping timeout: 246 seconds]
hynkle has joined #ruby
maletor has quit [Ping timeout: 246 seconds]
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
Icoin has joined #ruby
nopolitica has quit [Quit: Leaving.]
maletor has joined #ruby
obryan has quit [Ping timeout: 246 seconds]
grekkos has joined #ruby
bigkevmcd has quit [Quit: outta here]
grekkos is now known as Guest16366
bricker88 has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
khakimov has quit [Quit: Computer has gone to sleep.]
manizzle has quit [Read error: Connection reset by peer]
<bricker88> Hello all. I have a seemingly simple regular expression quesion. I'm only trying to match that last <li> http://rubular.com/r/PfjszHTPWe
bradhe has quit [Remote host closed the connection]
<Mon_Ouie> Just don't use regular expressions when working with XML, it will make it all way simpler
strife25 has quit [Quit: Computer has gone to sleep.]
maletor has quit [Ping timeout: 244 seconds]
nopolitica has joined #ruby
<bricker88> Mon_Ouie: I need to add some information to the tag. Can nokogiri do that?
lorandi has joined #ruby
<Mon_Ouie> Change attributes or the content of XML nodes? Sure
<Mon_Ouie> (and same for HTML)
mrdodo has joined #ruby
maletor has joined #ruby
apok has quit [Remote host closed the connection]
apok has joined #ruby
mrsolo has joined #ruby
<bricker88> Mon_Ouie: Cool, thanks, I will look further into it
mdszy has joined #ruby
minijupe has quit [Quit: minijupe]
emmanuelux has joined #ruby
chomp has joined #ruby
mrdodo has quit [Remote host closed the connection]
pting has joined #ruby
k_89 has joined #ruby
nopolitica has quit [Ping timeout: 246 seconds]
whitenoise has quit [Quit: This computer has gone to sleep]
jds has quit [Quit: Lost terminal]
mrdodo has joined #ruby
zommi has quit [Read error: Connection reset by peer]
minijupe has joined #ruby
rekenerd has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
rekenerd has joined #ruby
dinkytoy has quit []
<bricker88> Mon_Ouie: wow, I can't believe I didn't try this in the first place O_O thanks
stefanp_ has joined #ruby
arturas has joined #ruby
rekenerd has quit [Read error: Connection reset by peer]
rekenerd has joined #ruby
minijupe has quit [Client Quit]
bier has quit [Remote host closed the connection]
stefanp has quit [Ping timeout: 265 seconds]
rekenerd has quit [Read error: Connection reset by peer]
meskyanichi has quit [Read error: Operation timed out]
bier has joined #ruby
rekenerd has joined #ruby
bier has quit [Remote host closed the connection]
rekenerd has quit [Read error: Connection reset by peer]
mrsolo has quit [Quit: Leaving]
voodoofish430 has joined #ruby
mrsolo has joined #ruby
rekenerd has joined #ruby
rekenerd has quit [Read error: Connection reset by peer]
davidpk has joined #ruby
rekenerd has joined #ruby
kvirani has joined #ruby
bier has joined #ruby
rekenerd has quit [Read error: Connection reset by peer]
rekenerd has joined #ruby
theRoUS_ has quit [Changing host]
theRoUS_ has joined #ruby
theRoUS has quit [Disconnected by services]
theRoUS_ is now known as theRoUS
theRoUS_ has joined #ruby
rekenerd has quit [Read error: Connection reset by peer]
<Testy> There doesn't seem to be a way to stop running a Test Suite (test-unit) when the startup block fails. Does anyone know how?
_justin has quit [Ping timeout: 244 seconds]
arturas has quit [Ping timeout: 248 seconds]
rekenerd has joined #ruby
hoelzro|away is now known as hoelzro
verto is now known as verto|off
rekenerd has quit [Read error: Connection reset by peer]
jfelchner has quit [Ping timeout: 244 seconds]
roolo has quit [Quit: Linkinus - http://linkinus.com]
rekenerd has joined #ruby
bier has quit [Remote host closed the connection]
knightblader has joined #ruby
rekenerd has quit [Read error: Connection reset by peer]
mistofvongola has joined #ruby
jonathanwallace has joined #ruby
arturas has joined #ruby
tzvi|work has quit [Remote host closed the connection]
strife25 has joined #ruby
mpereira has quit [Ping timeout: 244 seconds]
mpereira has joined #ruby
shadoi has quit [Quit: Leaving.]
liluo has joined #ruby
bier has joined #ruby
kn330 has joined #ruby
shadoi has joined #ruby
ilyam has joined #ruby
niklasb has quit [Ping timeout: 244 seconds]
fermion has quit [Quit: P]
nopolitica has joined #ruby
S1kx has joined #ruby
S1kx has joined #ruby
_justin has joined #ruby
liluo has quit [Remote host closed the connection]
<shevy> oh man
<shevy> I'd wish I could omit "end" in if/else clauses
Eldariof-ru has joined #ruby
<Mon_Ouie> How about using ternary expressions if it's simple enough?
<shevy> hmm. it kind of works, it's a bit different for my ruby style though. some of my method names are quite long, I need to read to the right side of the screen in that case
<shevy> I like to keep things on the left side, visually, if possible
<shevy> if foo
<shevy> bla
<shevy> else
<shevy> ble
rekenerd has joined #ruby
<shevy> # hmmm still 4 lines :\
<shevy> 5 lines with end
sebastorama has joined #ruby
rekenerd has quit [Read error: Connection reset by peer]
blazes816 has joined #ruby
shadoi has quit [Quit: Leaving.]
maletor has quit [Ping timeout: 265 seconds]
maletor has joined #ruby
savage- has quit [Read error: Connection reset by peer]
kparaju has joined #ruby
<gogiel> foo ? bla: ble . clear and simple
<gogiel> you can put some newlines and make it 3 lines
kparaju has left #ruby ["Ex-Chat"]
jarred has quit [Ping timeout: 248 seconds]
jarred has joined #ruby
jparkton has quit [Ping timeout: 244 seconds]
jparkton has joined #ruby
<iamjarvo> what should i look up if i want to build a relationship with arrays
_justin has quit [Ping timeout: 246 seconds]
<iamjarvo> is there some type of pattern
ringotwo has quit [Remote host closed the connection]
Guedes has quit [Read error: Operation timed out]
TheHypnotist- has joined #ruby
<hoelzro> iamjarvo: what do you mean?
Criztian has joined #ruby
<iamjarvo> hoelzro basically i have this data set and i want to get a relationship between them, so say you have [[1meter, 100cm] [100cm, .001km]] i want to go from meter to km
<iamjarvo> please do not straight out tell me the answer
<iamjarvo> give like strategies or thing si should look up
bier has quit [Remote host closed the connection]
ringotwo has joined #ruby
Speed is now known as Speedq
Speedq is now known as Speed
stephenjudkins has joined #ruby
<hoelzro> iamjarvo: so you want to find a member where its first element is equal to a lookup key, and find another member where its first element is equal to the second of the first member, and return the second element of the result?
jsime has quit [Quit: Leaving]
<hoelzro> or do something along those lines?
<hoelzro> if the latter, I would use a Hash
nateberkopec has joined #ruby
bier has joined #ruby
<iamjarvo> hoelzro so there will be more than two in the parent array. how would you go back up the chain? use something that keeps querying from the bottom up?
TheHypnotist- has quit [Read error: Connection reset by peer]
TheHypnotist- has joined #ruby
_justin has joined #ruby
<TheHypnotist-> hmm, suggestions for compiling ruby 1.9.3 without ssl support? (cross compiling it for arm)
shavus has quit []
beakerman has quit [Remote host closed the connection]
manizzle has joined #ruby
<Hanmac> iamjarvo: 5 / [[1,100],[100,0.001]].map{|(a,b)| a*b}.inject(:/)
<hoelzro> iamjarvo: as far as writing a general convertor function, I don't have any good tips
Guest81473 has quit [Quit: Leaving...]
bier has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
ij is now known as cum
Araxia has joined #ruby
shadoi has joined #ruby
cableray has joined #ruby
beakerman has joined #ruby
sdwrage has joined #ruby
carlyle_ has joined #ruby
ringotwo has quit [Remote host closed the connection]
cek has joined #ruby
<cek> The ssl cert verification option in open-uri, was it fixed in latest ruby?
<offby1> Is it just me, or is the behavior of "not an integer".to_i (namely: returning 0) less than ideal?
<cek> or, rather, added as an option
* offby1 would expect nil in that case
cjlicata has quit [Ping timeout: 246 seconds]
<Hanmac> offby1 use Integer() for more type safe
minijupe has joined #ruby
cum is now known as came
<offby1> Hanmac: I know, I am
<iamjarvo> Hanmac thanks
<Hanmac> PS: "x" could be an integer "x".to_i(36) => 33
<offby1> but I'm wondering why to_i is designed to work the way it does.
Criztian has quit [Remote host closed the connection]
beakerman has quit [Remote host closed the connection]
headius has quit [Quit: headius]
vitoravelino is now known as vitoravelino`afk
tatsuya_o has joined #ruby
came is now known as ij
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
* mdszy crosses fingers, hopes this doesn't murder his machine
Deele has joined #ruby
<mdszy> I should probably do this in C or Haskell or something
<Hanmac> mdszy what are you trying todo?
* mdszy installs ghc :v
<mdszy> Hanmac: A fibonacci sequence of the numbers from one to four million
jfelchner has joined #ruby
<mdszy> I think that Haskell's lazy typing would be best for this
<canton7> millions? that's going to be pretty quick whatever language you do it in, I would have thought
<mdszy> and whenever I try to do this in C, I get a segfault from the size of the array.
<mdszy> canton7: Maybe it's just the way I'm doing it. It's not just the fibbonacci number, it's an array of the sequence
Helius has joined #ruby
<Mon_Ouie> Enumerator.new { |y| a, b = 0, 1; loop { y << a; a, b = b, a + b } }
<mdszy> I dunno, I just did it in Ruby and it hung
<mdszy> I'm just gonna try it in Haskell, give me an excuse to try to learn it better XDF
<mdszy> *XD
<burgestrand> mdszy: there’s an example of it in haskell somewhere that allows you to exploit multiple cores of your computer (and it uses memoization as well) — a naive implementation in haskell is easy but also very slow
lxsameer has quit [Quit: Leaving]
<cek> yes it was
cek has quit [Quit: жопа диридай диридиридай]
<mdszy> ah
<mdszy> I'm not very experienced in Haskell at all
<mdszy> Heck
<mdszy> I still don't know what a monad is
Juul has quit [Ping timeout: 248 seconds]
jsime has joined #ruby
<burgestrand> people have the same issues with monads that new rubyists have with symbols
<canton7> finding the fibonacci numbers under 4000000 takes a very small amount of time in ruby. Finding the first 4000000 leads to an out of memory error :P
<burgestrand> it’s not all that complicated, just new
mdszy has quit [Quit: bye for now]
lkba has quit [Ping timeout: 255 seconds]
whiterabbit has joined #ruby
<sepp2k> burgestrand: Given the fact that calculating all fibonacci numbers below 4 million already runs incredibly fast using one core, I'd imagine parallelizing it would introduce more overhead than it would safe time.
Juul has joined #ruby
whiterabbit has left #ruby [#ruby]
savage- has joined #ruby
<burgestrand> sepp2k: it does for smaller amounts of numbers, but once you reach a certain threshold (was around ~40k on my machine) it was more and more beneficial
<burgestrand> strangely enough
<burgestrand> (considering all numbers depend on the ones before them)
iamjarvo has joined #ruby
kevingra` has quit [Ping timeout: 244 seconds]
jslvk has joined #ruby
sdwrage has quit [Quit: geekli.st/programmer]
Speed has left #ruby ["Leaving channel."]
timonv has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 250 seconds]
jslvk has quit [Client Quit]
hoelzro is now known as hoelzro|away
<burgestrand> eh, 40, not 40k :P
ringotwo has joined #ruby
Hanmac has joined #ruby
jmdeldin has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
etehtsea has joined #ruby
Helius has quit [Remote host closed the connection]
btanaka has quit [Remote host closed the connection]
bier has joined #ruby
nopolitica has quit [Quit: Leaving.]
lkba has joined #ruby
Eldariof-ru has quit []
nopolitica has joined #ruby
pu22l3r has quit [Ping timeout: 240 seconds]
nilg has quit [Remote host closed the connection]
Tricks has joined #ruby
nilg has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
tatsuya_o has quit [Remote host closed the connection]
NemesisD has joined #ruby
johnlcox has quit [Ping timeout: 246 seconds]
KarlHung1s is now known as KarlHungus
nilg has quit [Remote host closed the connection]
nilg` has joined #ruby
kirun has joined #ruby
imami|afk is now known as banseljaj
nyuszika7h is now known as noone
noone is now known as nyuszika7h
nyuszika7h is now known as noome
noome is now known as noone
noone is now known as nyuszika7h
Juul has quit [Ping timeout: 248 seconds]
ConstantineXVI has joined #ruby
Iszak has joined #ruby
<Iszak> Anyone recommend a desktop MVC GUI framework that's cross platform?
k_89 has quit [Ping timeout: 240 seconds]
<Osum> swing
<Osum> QT
<Iszak> no nooo
<Iszak> I don't mean GUI tools, I mean like a way to organise it.
<Iszak> e.g. Monkeybars
k_89 has joined #ruby
nilg` has quit [Ping timeout: 246 seconds]
krz has joined #ruby
k_89 has quit [Read error: Connection reset by peer]
k_89 has joined #ruby
superjoe has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<superjoe> is there a way to get this to work so that I can have a read-only property, but I can set it within the class? http://pastie.org/4251674
sdwrage has joined #ruby
kedai has joined #ruby
tvw has quit [Remote host closed the connection]
gokul has joined #ruby
tk_ has quit [Quit: ばいばい]
centipedefarmer has joined #ruby
<shevy> not sure what you want superjoe
<shevy> define def foo=(i) somewhere?
<superjoe> shevy, I don't want the field to be able to be set from outside the class
<shevy> then make it private?
<superjoe> shevy, I want it to be readable publicly
<shevy> yeah, readable. but I mean the getter method field=
<shevy> oh I mean the setter
<shevy> :)
<shevy> hmmm
<Iszak> Anyone used RuGUI?
<shevy> private :field=
<shevy> that one does not work
<shevy> or wait
PIZDECCIO has joined #ruby
<shevy> ack.rb:9:in `from_foo': private method `field=' called for #<A:0x7fe3e1622060> (NoMethodError)
<shevy> nope does not work
richo_ has joined #ruby
richo has quit [Ping timeout: 260 seconds]
andrewhl has quit [Remote host closed the connection]
PIZDECCIO has quit [Killed (idoru (Spam is off topic on freenode.))]
<shevy> perhaps it can't be done
<burgestrand> superjoe: you’ll have to use send
saschagehlich has quit [Ping timeout: 244 seconds]
codezombie has joined #ruby
<burgestrand> superjoe: http://ideone.com/xDMbE
<shevy> hah, clever trick
<shevy> what the
<shevy> what is this:
<shevy> def self.new(*, &block)
<shevy> !!! that even works???
<burgestrand> Yeah. Actually the &block isn’t needed, you can remove it.
<superjoe> burgestrand, the point is to use a static factory method
<superjoe> putting the initializer code in the constructor defeats the point
<TheHypnotist-> `require': cannot load such file -- rubygems.rb <-- sadface :(
<burgestrand> superjoe: that’s not the constructor.
<shevy> TheHypnotist-: what is that and why. require 'rubygems' works?
blazes816 has quit [Ping timeout: 250 seconds]
<superjoe> burgestrand, let me rephrase. the point is to be able to say a = A.from_foo(3) and get an a object which has a read-only field foo equal to 3.
k_89 has quit [Quit: Leaving]
asobrasil has joined #ruby
<superjoe> your code does not produce that API
<shevy> well perhaps you can remove the setter method before you deliver that object
<superjoe> whoa
mrdodo has quit [Remote host closed the connection]
<shevy> something like remove_method(:field=) ... somehow. not sure
<burgestrand> superjoe: I don’t see the problem. I just showed you a way to achieve what you want, I didn’t write it for you.
reuf has joined #ruby
reuf has quit [Client Quit]
<shevy> burgestrand: that * in the initialize method... that means something like "disregard all input, we dont need it anyway"?
<burgestrand> And yeah, you could remove the method after instantiation as well. The difference is that only the factory would return objects with the setter removed. All other instantiation would still have it.
<burgestrand> shevy: yeah, it means "we accept any number of arguments, but ignore it"
<shevy> awesome
richo_ has quit [Ping timeout: 260 seconds]
<shevy> never saw that before
<burgestrand> shevy: and later, when calling "super" (with no paren) it’ll pass those arguments along
<burgestrand> shevy: in other words, useful for overriding new if you don’t care about the arguments
richo has joined #ruby
<burgestrand> superjoe: point is, it’s super simple to adjust the example I gave you to do what you want.
<superjoe> I see now, thanks.
fermion has joined #ruby
<superjoe> don't really see why we need the weird arg parsing and super though
fermion has quit [Client Quit]
<shevy> hehe
stephenjudkins has quit [Quit: stephenjudkins]
kevinfagan has joined #ruby
<shevy> weird arg parsing... :D
<burgestrand> superjoe: it’s because I’ve overriden the A.new method.
<shevy> wicked black voodoo magic
<superjoe> right I don't see why you'd do that either
<burgestrand> superjoe: *shrug* just my first thought when I wrote the example.
<TheHypnotist-> shevy: the error is from a fresh ruby installation. (ruby 1.9.3p194 (2012-04-20 revision 35410) [arm-linux-uclibcgnueabi]) <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError) from <internal:gem_prelude>:1:in `<compiled>'
<shevy> ack
QaDeS has joined #ruby
<shevy> that is a weird error
<burgestrand> TheHypnotist-: no worries, you don’t need to require rubygems in 1.9 :)
<superjoe> burgestrand, it scares me that your first thought is to write it in a more complicated fashion
<shevy> ohhhhh
<burgestrand> superjoe: I’m a complicated person
<shevy> superjoe: that is what ruby trains folks :P
<shevy> I can never remember offhand which of the *eval methods to call
hynkle has quit [Read error: Connection reset by peer]
mdszy has joined #ruby
<superjoe> I've noticed that. It makes reading code a bitch.
<shevy> Fixnum.class_eval { def number; self; end }
<Hanmac> TheHypnotist: did you realy type rubygems.rb ? ... with the .rb?
<burgestrand> superjoe: I didn’t read too much into what your code sample was meant to do (people write crap code samples anyway). I just tried to analyze the actual problem and did the least amount of effort to display a solution.
<shevy> I think he did :D
<TheHypnotist-> burgestrand: silly question probably but? should it return that error when trying to use the cli by typing just 'ruby' at the bash prompt?
<shevy> wait
<shevy> you type only "ruby", right?
<TheHypnotist-> yep shevy
<burgestrand> TheHypnotist-: now it’s beginning to sound like a broken ruby installation
<shevy> then it should not do anything
<shevy> the default is to wait
<TheHypnotist-> okies, thats probably my fault. tried to cross compile it for arm
<shevy> when I do "ruby", it waits for input
<shevy> hmm and python starts that python shell thing
<shevy> oh. perl behaves like ruby. it also waits
<burgestrand> TheHypnotist-: I don’t do my ruby compilation manually, I’m afraid I can’t help you much. I’ve seen a similar error before but can’t recall how it was resolved.
<TheHypnotist-> that's fair enough
<shevy> and lua behaves like python
<TheHypnotist-> thanks to you both for thinking about it
<iamjarvo> i am getting undefined local variable here. second pair of eyes to see what I'm missing? http://pastie.org/private/snuw2nzoatra6ux11qu5qg
<burgestrand> iamjarvo: inside start you have a new variable scope.
<shevy> yeah I think burgestrand is right, something is odd with the compiled ruby you got. I remember I once had a similar error... with internal thing-messages
<burgestrand> iamjarvo: rates does not exist inside start
<shevy> iamjarvo: what is the name
<iamjarvo> whats the name of the ruby?
<shevy> oh right
<shevy> change it to RATES everywhere and it works
<shevy> or @rates or $rates
<shevy> iamjarvo: no, the name of the local variable you had. but I see your code is so short, easy to notice
<Mon_Ouie> I'd go with a constant for that kind of stuff
<iamjarvo> hrm id always thought it would be able to access it seems like every thing would have the same scope there
<iamjarvo> I'm not defining a new rates in start
<TheHypnotist-> shevy, bugger :( I was hoping it wouldn't be tooo much of a pain to setup. I will have a look into it though, if I solve, will let you both know
<iamjarvo> so with def start rates is looking for a rtes that local to start
hynkle has joined #ruby
Criztian has joined #ruby
Spooner has quit [Ping timeout: 246 seconds]
kevinfagan has quit [Quit: Linkinus - http://linkinus.com]
obryan has joined #ruby
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
obryan has quit [Read error: Connection reset by peer]
obryan has joined #ruby
mrdodo has joined #ruby
richo_ has joined #ruby
<iamjarvo> so this is the better way ? http://pastie.org/private/glpxpjsmavyrf9tvjtcxa
<iamjarvo> i get a constant warning though
richo has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
<Mon_Ouie> What warning do you get?
<Mon_Ouie> Methods aren't closures in Ruby, therefore they do not have access to local variables from the environment where they were defined
khakimov has joined #ruby
aces1up has joined #ruby
<aces1up> hey all I would like to hook the require call.. where is this located? Basically I would like to make a splash screen and show what dependencies are being requires during boot of my app.
Vert has quit [Ping timeout: 252 seconds]
reuf has joined #ruby
bradhe has joined #ruby
<iamjarvo> Mon_Ouie reason I'm getting the error is when i am loading the the file again its redefining the constant
<iamjarvo> so figured it out :)
mrdodo has quit [Remote host closed the connection]
bowlowni_ has quit [Remote host closed the connection]
cakehero has quit [Quit: Leaving...]
bowlowni has joined #ruby
rcrossan has quit [Quit: ChatZilla 0.9.88.2 [Firefox 13.0.1/20120614114901]]
bowlowni has quit [Read error: Connection reset by peer]
bowlowni has joined #ruby
yoklov has joined #ruby
_justin has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 244 seconds]
nachtwandler has quit [Quit: leaving]
s0ber_ has joined #ruby
MatthewGA has quit [Quit: Leaving]
crankycoder has quit [Remote host closed the connection]
s0ber has quit [Ping timeout: 245 seconds]
s0ber_ is now known as s0ber
wmoxam has joined #ruby
cakehero has joined #ruby
saschagehlich has joined #ruby
_justin has joined #ruby
<bricker88> Nokogiri bug? https://gist.github.com/3107318
headius has joined #ruby
joshman_ has quit [Ping timeout: 244 seconds]
Morkel has quit [Quit: Morkel]
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<canton7> given the HTML in str1 is invalid, I can't massively blame it. It looks like it's making the best, valid, alternative it can
<bricker88> canton7: What is invalid about it?
mneorr has quit [Quit: Leaving.]
<canton7> you can't have a <p> inside a <p> ?
ghvandoorn has joined #ruby
<canton7> if you asked it to parse the str as XML, I doubt it would care. However, you asked for HTML, so methinks it'll start applying validation rules
maletor has quit [Ping timeout: 250 seconds]
<bricker88> canton7: hmmm
<bricker88> canton7: Thanks for the help, I didn't realize that was invalid html
richo_ has quit [Ping timeout: 260 seconds]
wangr has quit [Ping timeout: 240 seconds]
mengu has joined #ruby
richo has joined #ruby
maletor has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
JustinCampbell has joined #ruby
<Eiam> if i have something like x = [{'a'=>2}] is there a less syntatically moronic looking way to get 'a' other than x.first.first.first, or x.first.keys.first ?
jfelchner has quit [Ping timeout: 244 seconds]
<Eiam> i spiral out into worse things like x.first.collect(&:first).flatten
bluOxigen has joined #ruby
<sernin> How do I set an optional argument for a method? e.g. def foo(x,y) -- y may be nil
<sernin> or do I set a default value with ||= or something of that ilk
<sernin> equivalent to python's func(arg,*args,**kwargs) sort of thing, that collects other method arguments but doesn't complain if not present
<Eiam> *
<bricker88> canton7: My problem (which I was trying to solve with those extra p tags) is that nokogiri is placing \n's between nodes when I run .to_html on it
<Eiam> sernin: def foo(x,*y)
balki_ is now known as balki
<sernin> Eiam: thanks, obviously a google-able thing but I'm stuck browserless atm
<bricker88> canton7: Which causes layout issues on inline-block elements :-/
<ohcibi> i have an example class Bla with a method '===' and a method 'bla', i now can do things like b = Bla.new; b === b but not b bla b (only b.bla b or b.bla(b) would be valid) can someone explain me why === doesnt need the . after b?
workmad3 has joined #ruby
rowanu has quit [Remote host closed the connection]
<bricker88> dang, even to_s does it
<canton7> bricker88, that's a problem? Anyway, there seems to be some saveoptions stuff you can do
khakimov has quit [Quit: Computer has gone to sleep.]
mdpatrick has joined #ruby
<burgestrand> ohcibi: some operators can be used infix, there’s a list of them somewhere
mdpatrick has quit [Remote host closed the connection]
mdpatrick has joined #ruby
mrdodo has joined #ruby
mpereira has quit [Ping timeout: 252 seconds]
<bricker88> canton7: yes, it's a problem if there are newlines in some cases, particularly with inline-block, because browsers suck and stuff. I see the save options, thank you
jstotz has joined #ruby
banghouse is now known as banghouseAFK
<canton7> the last whitespace browser issue I know of was the IE newline bug, back in IE5 or so :S
jstotz has quit [Client Quit]
<burgestrand> ohcibi: can’t find it ^^
chomp has quit [Quit: Leaving]
<ohcibi> burgestrand: it was more a theoretical question... the infix keyword is satisfying for me to google... thx 8-))
<burgestrand> :)
TorpedoSkyline has joined #ruby
sailias has quit [Ping timeout: 252 seconds]
AlbireoX` has joined #ruby
hynkle has quit [Quit: Computer has gone to sleep.]
tagrudev has joined #ruby
tagrudev has quit [Client Quit]
zeromodulus has quit [Ping timeout: 246 seconds]
mrdodo has quit [Remote host closed the connection]
Gavilan has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
nopolitica has quit [Quit: Leaving.]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jgrevich has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
nateberkopec has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
zeromodulus has joined #ruby
nopolitica has joined #ruby
knightblader has quit [Quit: WeeChat 0.3.8]
* mdszy attempts to find the 10,001st prime number in Ruby
cads has quit [Ping timeout: 246 seconds]
btanaka has joined #ruby
Juul has joined #ruby
ackz has quit [Quit: Leaving...]
Gavilan has quit [Read error: Connection reset by peer]
btanaka has quit [Remote host closed the connection]
andrewpthorp has joined #ruby
cads has joined #ruby
tommyvyo has joined #ruby
nopolitica has quit [Quit: Leaving.]
nopolitica has joined #ruby
<Mon_Ouie> I assume require 'prime' is cheating? ;)
<mdszy> Mon_Ouie: I didn't even know there was such a thing XD
<mdszy> Mon_Ouie: I already have the code
<mdszy> Mon_Ouie: It's just taking a LONG time to run XD
<mdszy> I know for a fact that it works, I tested it.
<mdszy> wrote unit tests and everything Xd
<mdszy> *XD
<mdszy> it's not hard to make
<mdszy> got it!
<mdszy> 104743
* mdszy crosses fingers that it's right
<mdszy> yay :D
RORgasm has quit [Remote host closed the connection]
<Mon_Ouie> For the record, that runs in less than a second with require 'prime'
<mdszy> well then XD
<Mon_Ouie> And makes me feel like their should be an Enumerable method to get the nth element of an arbitrary collection
<mdszy> how do you use this prime library?
<Mon_Ouie> I did like this: enum = Prime.each; 10_000.times { enum.next }; puts enum.next
<mdszy> ah Xd
<mdszy> *XD
cads has quit [Ping timeout: 246 seconds]
<mdszy> I just wrote a method that is called like
RORgasm has joined #ruby
<mdszy> PrimeCalc.new.primes(10_001)
<mdszy> which returns an array
<mdszy> and so I just put .last onto that to get the 10_001st prime
zeromodulus has quit [Ping timeout: 244 seconds]
<Mon_Ouie> Creating an array is very inefficent
<mdszy> and this is the code
* mdszy shrugs
<mdszy> it worked!
<Mon_Ouie> You only need one element, no need to keep all the previous items in memory
sebastorama has quit [Quit: Computer has gone to sleep.]
<mdszy> true
<mdszy> but I needed the array for testing
<mdszy> and I just decided to keep it in there
<canton7> I one-lined it, though it's rather ugly and about the most inefficient method possible. Enumerator.new{ |y| i=0; loop{ i+=1; y << i unless (2..Math.sqrt(i)).any?{ |j| i % j == 0 } } }.take(10001).last
<mdszy> I tested to make sure that the array given by primes(6) was, in fact, the first six prime numbers
<Mon_Ouie> Why? You can test if prime(6) is the 6th element and same for a few other values
* mdszy shrugs
<mdszy> it worked
<mdszy> that's all that really matters XD
<mdszy> I'm just completing some Project Euler challenges
<mdszy> I'll only ever have to use this code once
yxhuvud has quit [Ping timeout: 246 seconds]
zeromodulus has joined #ruby
<ohcibi> i'm just calculating the 10020002. prime number because of you
<mdszy> XD
<ohcibi> it takes long, even with require 'prime'
<Hanmac> but be carefull ... some prime numbers are illegal
<ohcibi> Hanmac: they sold a book on amazon, it contained 1000 unknown primenumbers
RORgasm has quit [Ping timeout: 246 seconds]
vitoravelino`afk is now known as vitoravelino
internet_user has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
reuf has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 246 seconds]
DrShoggoth has quit [Read error: Connection reset by peer]
GeekOnCoffee_ has joined #ruby
GarethAdams has joined #ruby
GeekOnCo- has joined #ruby
kvirani has quit [Remote host closed the connection]
wvms has joined #ruby
cbuxton has quit [Quit: Leaving.]
jonathanwallace has quit [Remote host closed the connection]
cbuxton has joined #ruby
jonathanwallace has joined #ruby
btanaka has joined #ruby
geekbri has quit [Remote host closed the connection]
JustinCampbell has quit [Remote host closed the connection]
workmad3 has joined #ruby
DrShoggoth has joined #ruby
wargasm has quit [Ping timeout: 246 seconds]
jonathanwallace has quit [Ping timeout: 240 seconds]
wargasm has joined #ruby
gokul has quit [Ping timeout: 246 seconds]
stephenjudkins has joined #ruby
aaroncm has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hadees has quit [Quit: hadees]
wmoxam has quit [Quit: leaving]
mrdodo has joined #ruby
<shevy> legalize prime NOW!
Juul has quit [Remote host closed the connection]
Parabol has joined #ruby
classix has quit [Ping timeout: 246 seconds]
RichGuk has quit [Ping timeout: 252 seconds]
classix has joined #ruby
wargasm has quit [Ping timeout: 252 seconds]
PaciFisT1 has quit [Quit: Leaving.]
_justin has quit [Ping timeout: 255 seconds]
chson has quit [Remote host closed the connection]
stephenjudkins has quit [Ping timeout: 244 seconds]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
wargasm has joined #ruby
hasrb has quit [Remote host closed the connection]
jfelchner has joined #ruby
stephenjudkins has joined #ruby
nateberkopec has quit [Quit: Leaving...]
RichGuk has joined #ruby
mdpatrick has quit [Quit: mdpatrick]
wargasm has quit [Ping timeout: 252 seconds]
jarred has quit [Quit: jarred]
heeton has joined #ruby
banseljaj is now known as imami|afk
sebicas has joined #ruby
jarred_ has joined #ruby
asobrasil has left #ruby [#ruby]
minijupe has quit [Quit: minijupe]
cbuxton1 has joined #ruby
cbuxton has quit [Ping timeout: 255 seconds]
jonathanwallace has joined #ruby
balki_ has joined #ruby
alanp_ has joined #ruby
bbttxu has quit [Quit: bbttxu]
_justin has joined #ruby
minijupe has joined #ruby
wargasm has joined #ruby
billiam has quit [Read error: Connection reset by peer]
alanp has quit [Ping timeout: 265 seconds]
balki has quit [Ping timeout: 265 seconds]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
kenichi has quit [Remote host closed the connection]
JustinCampbell has joined #ruby
dv310p3r has quit [Ping timeout: 246 seconds]
Criztian has quit [Remote host closed the connection]
fbernier has joined #ruby
kirun_ has joined #ruby
IcyDragon has joined #ruby
mneorr has joined #ruby
DrShoggoth has quit [Quit: Leaving]
choffstein has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [Remote host closed the connection]
kirun has quit [Ping timeout: 272 seconds]
banghouseAFK is now known as banghouse
codezombie has quit [Quit: Leaving...]
codezombie has joined #ruby
heeton has quit [Quit: Leaving.]
minijupe has quit [Quit: minijupe]
headius has quit [Quit: headius]
zemanel has quit [Read error: Connection reset by peer]
zemanel has joined #ruby
heeton has joined #ruby
Stalkr_ has joined #ruby
<Stalkr_> Hey all
tiripamwe has joined #ruby
snearch has quit [Quit: Verlassend]
<Stalkr_> Anyone able to help me with a simple rubygems (loaderror)?
vpitriumph has joined #ruby
jparkton has left #ruby ["%"]
<vpitriumph> Total channel newbie here so I don't know etiquette, what's the proper way to ask a technical question?
<Mon_Ouie> The golden rule is, don't ask for permission to ask a question
IcyDragon is now known as IceDragon
<Mon_Ouie> Other than that, just explain your problem and show your code if needed
fayimora has joined #ruby
Osum has quit [Quit: Lost terminal]
<vpitriumph> Well in that case. I'm using ActiveRecord outside of rails. It works pretty well. I have one table that has a primary key on it, and when I attempt to 'save' an object to that table that field doesn't show up at all in the corresponding sql query. Nor can I set it in the Ruby object itself.
ringotwo has quit [Remote host closed the connection]
<vpitriumph> If that field is not a primary key in the database, everything works swimmingly
heeton has quit [Quit: Leaving.]
carlyle_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
<davidcelis> that's part of activerecord
<davidcelis> typical AR tables just have one primary key field, which is ID, and they don't allow you to mess with it
<davidcelis> other columns are made keys via indices
Croms has quit [Read error: Connection reset by peer]
Dennis_ has joined #ruby
<davidcelis> or are a MUL key type
<davidcelis> rather than PRI
<vpitriumph> This also happens when the column is set to be unique.
heeton has joined #ruby
<rking> Some day people are going to marvel that Python was ever popular.
<davidcelis> dang
<davidcelis> that is some javascript shit right there
<davidcelis> though everyone's right
<davidcelis> using `is` is pretty dum
Spooner has joined #ruby
<vpitriumph> Is there something other than AR that I should be using for ORM if I'm not going to be using it to build my actual tables and hence not building the indecies I need. Or is there a way I can fake the indecies to make AR happy and achieve PK functionality?
heeton has quit [Client Quit]
<pk1001100011> You will never achieve my functionality (boss)
<davidcelis> i dont think i'd recommend using AR outside of Rails
zeromodulus has quit [Ping timeout: 248 seconds]
<davidcelis> i like DataMapper
zemanel has quit [Quit: Remote hottie closed the connection]
<vpitriumph> Should DataMapper be able to handle the situation I'm describing? Long story short is I'm mucking around with an already existing DB.
<Stalkr_> Does anyone know why I have trouble loading rubygems? http://pastebin.com/Rudn5JB3
uris has quit [Quit: leaving]
blacktulip has quit [Remote host closed the connection]
<Stalkr_> If I nano authGrabber, I can see the first line is: #!/usr/bin/env ruby
heeton has joined #ruby
<Mon_Ouie> How did you install Ruby?
_justin has quit [Ping timeout: 244 seconds]
seanstickle has joined #ruby
<Stalkr_> Preinstalled on Ubuntu, then I installed 1.9.3 with rmv
<Stalkr_> rvm*
<Stalkr_> then. rvm use 1.9.3
<Mon_Ouie> You're probably still using the Ubuntu-provided Ruby — because the standard library isn't installed
theRoUS has quit [Read error: Operation timed out]
<Mon_Ouie> What does "which ruby" output?
zeromodulus has joined #ruby
arturas has quit [Ping timeout: 248 seconds]
mpereira has joined #ruby
<Stalkr_> /home/my_name/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
sebastorama has joined #ruby
<Mon_Ouie> Hm, that's odd
<Stalkr_> Is it correct or wrong?
<Mon_Ouie> It is correct — but that means I don't know what's wrong :p
<icy`> gems list shows rubygems-bundler for me. what is that? ;P
<Mon_Ouie> icy`: Something RVM installs automatically and causes bundle exec to be called implicitly when you run ruby binaries
ringotwo has joined #ruby
<Stalkr_> No command 'gems' found, did you mean: blah blah
<Mon_Ouie> (I really dislike that feature)
<Mon_Ouie> Stalkr_: It's gem, not gems ;)
<icy`> sorry
fbernier has quit [Ping timeout: 248 seconds]
<Stalkr_> There we go, rubygems-bundler (1.0.3)
vpitriumph has quit [Ping timeout: 245 seconds]
cbuxton1 has quit [Quit: Leaving.]
<Mon_Ouie> How do you run authGrabber? Just ruby authGrabber.rb?
<Stalkr_> sudo ruby authGrabber.rb > OUTPUT.txt
<GarethAdams> Mon_Ouie: judging by the shebang, I imagine ./authGrabber.rb
<GarethAdams> oh
<Mon_Ouie> There's the problem
<GarethAdams> sudo
heeton has quit [Quit: Leaving.]
<Mon_Ouie> Indeed, only your user has access to RVM
<GarethAdams> sudo's environment is not *your* environmen
<GarethAdams> *t
<Stalkr_> Oh ):
<Stalkr_> I'm sorry sudo
<Stalkr_> oh my, new problem
<Mon_Ouie> I think there was a rvmsudo command
hadees has joined #ruby
bigoldrock has joined #ruby
awarner has quit [Remote host closed the connection]
lorandi has quit [Quit: Leaving]
vlad_starkov has joined #ruby
zastaph has quit []
hadees has quit [Remote host closed the connection]
<Stalkr_> Do you know what's causing that? ):
<Mon_Ouie> It may just be that you do not have the privilege to start a server on the port authGrabber is using
ttyp123 has quit [Read error: Connection reset by peer]
<Stalkr_> Hmm, how can I get that?
<Mon_Ouie> Being root would be one way
stephenjudkins has quit [Quit: stephenjudkins]
<Stalkr_> Should I enable the root user?
<Stalkr_> root user/account
vlad_starkov has quit [Ping timeout: 265 seconds]
<Stalkr_> I think I am root now, it says root@VirtualBox:~# <command here>
<icy`> iirc on ubuntu root exists, it's just discouraged
<icy`> passwd and set a new password. then check your ruby version ;P
<Stalkr_> Now it says 1.8.7
<icy`> rvm list
<Mon_Ouie> RVM won't be set up for root at all
<Stalkr_> 'rvm' is not currently installed
<icy`> right true
<Stalkr_> Should I install it?
<Mon_Ouie> I don't know much about RVM; I'd suggest asking for advice on #rvm
* icy` afks
<Stalkr_> I'll try again, see if it works
<Stalkr_> Bye icy`, thanks for the help :-)
<Mon_Ouie> Try "rvmsudo …" as normal user
<Stalkr_> Only works on a small amount of times
xaq has quit [Remote host closed the connection]
<Stalkr_> I am no good at this Ubuntu/Ruby thingy :D
chson has joined #ruby
tha_dok has joined #ruby
headius has joined #ruby
choffstein has joined #ruby
Targen has joined #ruby
<bricker88> Can anybody explain this behavior? Nokogiri's inner_html and gsub don't work together, it seems. https://gist.github.com/3108044
SQLStud has quit [Quit: Leaving]
Markvilla has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
bluOxigen has quit [Ping timeout: 246 seconds]
bosphorus has quit [Remote host closed the connection]
brasten has quit [Quit: brasten]
cads has joined #ruby
zawzey has quit [Quit: zawzey]
bowlowni has quit [Remote host closed the connection]
bowlowni has joined #ruby
<rking> BAM. Code committed, tested, awesome, done for the weekend.
<shevy> noooo
<rking> Where's my drink with a little umbrella?
<shevy> continue to code!
<shevy> first code
<rking> shevy: Weren't you the one in charge of my drinks with umbrellas?
<shevy> more code
<rking> Maybe code is a code for alcohol. If so, then yes, I'm in.
* rking gives shevy a noogie than departs!
baphled__ has joined #ruby
bowlowni has quit [Ping timeout: 250 seconds]
saschagehlich has quit [Quit: saschagehlich]
RussPete has joined #ruby
RussPete has left #ruby [#ruby]
etehtsea has quit []
NemesisD has quit [Quit: leaving]
apeiros_ has quit [Remote host closed the connection]
baphled__ has quit [Ping timeout: 246 seconds]
hunglin has quit [Ping timeout: 244 seconds]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
baphled_ has joined #ruby
jgarvey has quit [Quit: Leaving]
Speed has joined #ruby
ilyam_ has joined #ruby
ilyam_ has quit [Client Quit]
awarner has joined #ruby
<bricker88> What kind of encoding does this look like, "â\u0080\u009Cillegalâ\u0080\u009D" … Those used to be quote marks (the slanted type)
ilyam has quit [Ping timeout: 240 seconds]
dagnachewa has joined #ruby
<seanstickle> bricker88: UTF-8
Progster has quit [Ping timeout: 250 seconds]
tommyvyo has joined #ruby
RORgasm has joined #ruby
oooPaul has quit [Quit: Ciao for now!]
jesly__ has joined #ruby
cads has quit [Ping timeout: 246 seconds]
baphled_ has quit [Ping timeout: 240 seconds]
sepp2k has quit [Remote host closed the connection]
punkrawkR has quit [Read error: Connection reset by peer]
linoj has quit [Quit: linoj]
kirun_ has quit [Quit: Client exiting]
<Stalkr_> Mon_Ouie: Any idea what 'start_server' error with eventmachine is?
<Mon_Ouie> Nope, never used it
c0rn_ has joined #ruby
<Stalkr_> Damn
<Mon_Ouie> (well, I did, but not enough to know that)
<Stalkr_> You said something about privilige to use socket/port?
<Mon_Ouie> Yeah, e.g. on many systems only root can open a server that uses port 80
<Stalkr_> I am trying to use port 53
RORgasm has quit [Ping timeout: 246 seconds]
<Stalkr_> 53 or 443, not actually sure tbh
dagnachewa has quit [Quit: Leaving]
<Stalkr_> Ahh, port 443
<Mon_Ouie> All the ports that are < to some constant value would be "reserved"
<Stalkr_> This guide also say I have to do sudo ruby script.rb
<Stalkr_> Any ideas here? If I sudo, I get the rubygems error
<canton7> ports less than 1024 can only be opened by root iirc, yeah
Deele has quit [Ping timeout: 252 seconds]
jonathanwallace has joined #ruby
<Mon_Ouie> Did you try asking on #rvm?
jsime has quit [Quit: Leaving]
Maniacal has joined #ruby
<Stalkr_> Not yet, I don't think it's related to rvm, not sure tho
<mdszy> Rvm troubleshooting: 1. `rvm reload` 2. Uninstall RVM, replace with rbenv
<Stalkr_> God damn, this is annoying. If I sudo, I get error because I can't load rubygems. If I don't sudo, I get error because port 443 is reserved :-/
<Mon_Ouie> Well, it *is* related to RVM
<Stalkr_> I will go ask them :D
<Stalkr_> Just #rvm?
burgestrand has quit [Quit: Leaving.]
<Mon_Ouie> Since it's about being able to use RVM-installed rubies as super user
Stalkr_ has quit [Changing host]
Stalkr_ has joined #ruby
centipedefarmer has quit [Quit: This computer has gone to sleep]
krusty_ar has quit [Remote host closed the connection]
<davidcelis> `rvm implode`
<davidcelis> `git clone git://github.com/sstephenson/rbenv.git .rbenv`
burgestrand has joined #ruby
<Stalkr_> yay, and now I can't connect to the internet
<Stalkr_> hurray
<Stalkr_> unless
<davidcelis> else
<Stalkr_> Can't connect to gist.github.com, only pastebin.com :-/ That's weird
<shevy> end
<davidcelis> SyntaxError: unexpected tIDENTIFIER, expecting $end
<Stalkr_> Mon_Ouie: Hey, they were actually able to help me ;-9
<Stalkr_> ;-)* rvmsudo ruby blahblahblah.rb
Natch has quit [Quit: brb]
cakehero has quit [Quit: Computer has gone to sleep.]
hakunin_ has quit [Ping timeout: 246 seconds]
Tyr0 has quit [Quit: Tyr0]
prometheus has joined #ruby
Parabol has quit [Quit: Parabol]
mneorr has quit [Quit: Leaving.]
ryanf has joined #ruby
`brendan has joined #ruby
shadoi has quit [Quit: Leaving.]
Natch has joined #ruby
Tricks has quit [Read error: Connection reset by peer]
davidcelis has quit [Ping timeout: 248 seconds]
Tricks has joined #ruby
mrdodo has quit [Remote host closed the connection]
awarner has quit [Remote host closed the connection]
andoriyu has joined #ruby
Markvilla has quit [Quit: Markvilla]
g_rotbart has joined #ruby
Guest16366 has quit [Read error: Connection reset by peer]
<Stalkr_> Anyone know why I get this error? https://gist.github.com/3108270
<Stalkr_> error in bottom btw
grekkos has joined #ruby
_cb has joined #ruby
bluenemo has quit [Remote host closed the connection]
grekkos is now known as Guest74178
<_cb> super newbie question. I just installed rails, type rails new rails00. Where does rails put all the folders it created?