SCHAAP137 has quit [Remote host closed the connection]
jimbach has joined #ruby
BTRE has quit [Ping timeout: 255 seconds]
Neozonz has joined #ruby
Neozonz has joined #ruby
sepp2k1 has joined #ruby
<Maxdamantus>
adamsilver: I think ?= is positive lookahead.
<Maxdamantus>
adamsilver: so you're looking for something that matches /\s/ and /./, just before the :
goodenough has quit [Remote host closed the connection]
lolmaus has quit [Ping timeout: 240 seconds]
<Maxdamantus>
but the only thing that would match /./ just before the ":" is "x", which doesn't match /\s/
thagomizer has quit [Quit: Leaving.]
sepp2k has quit [Ping timeout: 260 seconds]
centrx has joined #ruby
mg^ has quit [Ping timeout: 244 seconds]
goodenough has joined #ruby
Neozonz has quit [Ping timeout: 255 seconds]
gccostabr has quit [Read error: Connection reset by peer]
insaneinside has joined #ruby
gccostabr has joined #ruby
goodenough has quit [Remote host closed the connection]
gccostabr has quit [Client Quit]
bogeyd6 has quit [Read error: Connection reset by peer]
sedai has joined #ruby
triple_b has joined #ruby
jottr_ has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zorak8 has quit [Ping timeout: 250 seconds]
AmBienCeD_ has quit [Read error: Connection reset by peer]
mg^ has joined #ruby
freezey has joined #ruby
BTRE has joined #ruby
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
msmith_ has joined #ruby
skolman has quit [Remote host closed the connection]
wjimenez_ has quit [Read error: Connection reset by peer]
skolman has joined #ruby
msmith_ has quit [Remote host closed the connection]
wjimenez5271 has joined #ruby
freezey has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
echevemaster has joined #ruby
skolman has quit [Ping timeout: 255 seconds]
Vivekananda has joined #ruby
kobain has quit [Ping timeout: 258 seconds]
ghr has joined #ruby
jimbach has quit [Remote host closed the connection]
jimbach has joined #ruby
weemsledeux has joined #ruby
weemsledeux has quit [Changing host]
weemsledeux has joined #ruby
sevenseacat has joined #ruby
ramfjord has joined #ruby
bmurt has joined #ruby
x77686d has quit [Quit: x77686d]
timonv_ has joined #ruby
JoshGlzB_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zesty has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
ghr has quit [Ping timeout: 240 seconds]
MrPepper has quit [Quit: Page closed]
aspires has quit []
jimbach has quit [Ping timeout: 240 seconds]
zorak8 has joined #ruby
lolmaus has joined #ruby
acl_ has joined #ruby
threesixes has quit [Ping timeout: 258 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
timonv_ has quit [Ping timeout: 255 seconds]
justinmburrous has joined #ruby
xymbol_ has joined #ruby
JeffBonds has quit [Quit: JeffBonds]
thumpba has quit [Remote host closed the connection]
thumpba has joined #ruby
renderful has joined #ruby
kobain has joined #ruby
bthesorceror has quit [Quit: leaving]
abuzze has joined #ruby
<Maxdamantus>
Are the multiple meanings of the expression `foo [0]` distinguished syntactically, or dynamically?
bthesorceror has joined #ruby
<Maxdamantus>
It seems to either mean to call the method `foo` with an array as an argument, or apply the subscript operator to the object referred to by the variable `foo`
<sevenseacat>
it doesnt mean the latter
<sevenseacat>
only the former
zorak8 has quit [Ping timeout: 240 seconds]
reinaldob has quit [Remote host closed the connection]
<Maxdamantus>
Hm. Maybe irb is misbehaving then.
<sevenseacat>
unlikely.
<Maxdamantus>
I can write `foo = ["foo", "bar", "baz"]` in irb, then write the expression above, and it produces "foo"
renderfu_ has joined #ruby
<sevenseacat>
!gist
<helpa>
http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
<adamsilver>
why ABC is not being matched with \)\s([A-Z]+)\s in this string: * ok: (no) ABC: hhh.
stantona has joined #ruby
<arrubin>
Because you are trying to match A-Z followed by whitespace.
<arrubin>
Not a colon.
Kricir has joined #ruby
mrsolo has joined #ruby
melik has quit [Quit: (null)]
freezey has quit [Ping timeout: 245 seconds]
hellangel7 has joined #ruby
<arrubin>
Maxdamantus: This is also possible: "asdf" .size
zorak8 has joined #ruby
<arrubin>
And [0] is really .[](0)
jasooon has joined #ruby
tlarevo has joined #ruby
<Maxdamantus>
and what does `a[0] = 1` map to?
tlarevo_ has joined #ruby
<Maxdamantus>
a.[](0, 1) ?
<arrubin>
I am not positive.
JoshGlzBrk has joined #ruby
<arrubin>
Possibly a.[]=, but I am not sure of the arguments.
abuzze has quit [Ping timeout: 260 seconds]
<Maxdamantus>
because it looks like `foo [0] = 1` can do the subscript on the result of calling foo
<Maxdamantus>
ie, `foo [0] = 1` is just `foo()[0] = 1`
crunk_bear has joined #ruby
<Maxdamantus>
but `foo [0]` not on the left of an assignment is `foo([0])`, if foo is a method.
<arrubin>
Yes, it is a.[]=(index, value).
jadedphone has quit [Ping timeout: 260 seconds]
emocakes has quit []
tlarevo has quit [Ping timeout: 240 seconds]
JoshGlzBrk has quit [Read error: Connection reset by peer]
jimbach has joined #ruby
<Maxdamantus>
so if what I said is right, `foo [0] = foo [0]` should be `foo()[0] = foo([0])`
krisquigley has joined #ruby
<arrubin>
Nah
<Maxdamantus>
assuming `foo` is a method.
<arrubin>
foo.[]=(0, foo.[](0))
Takle has quit [Remote host closed the connection]
<arrubin>
If foo is a method...
JoshGlzBrk has joined #ruby
rubie has joined #ruby
<arrubin>
Syntax error.
havenwood has quit []
devdazed has joined #ruby
<arrubin>
It is also not possible to define a method named foo[]=, so I do not see how to make that work.
rshetty has joined #ruby
<Maxdamantus>
Ah, okay, `foo [0] = ..` is just invalid if it's a method.
<Maxdamantus>
but it's interesting that it says it's a syntax error.
Avahey has joined #ruby
nanoyak has joined #ruby
krisquigley has quit [Ping timeout: 244 seconds]
<Maxdamantus>
ugh. that's not always a syntax error :\
jasooon has quit [Ping timeout: 260 seconds]
spastorino has joined #ruby
wethu has joined #ruby
troyready has quit [Quit: Leaving]
adamsilver has left #ruby [#ruby]
stunder has quit [Quit: Screw you guys I'm going home]
<Maxdamantus>
Mk, so it looks like the syntax is dependent on some sort of scope.
jimbach has quit [Remote host closed the connection]
<Maxdamantus>
which probably answers my first question.
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jimbach has joined #ruby
tier has joined #ruby
<Maxdamantus>
if I write `bar [0] = 4` in some method, it will cause a syntax error when the file is loaded, unless I assign to `bar` (making it a variable) beforehand.
zorak8 has quit [Ping timeout: 245 seconds]
jasooon has joined #ruby
<waxjar>
oh wow, i didn't know a space was allowed there
stantona has quit [Ping timeout: 258 seconds]
<arrubin>
The solution is to never write that.
<jhass>
can we just agree it's fugly and never put a space there again?
<jhass>
exactly
<Maxdamantus>
I wonder how often people are surprised by Ruby's syntax.
<Maxdamantus>
people who have been using it for a while.
* Maxdamantus
just started looking it at the other day.
<arrubin>
Maxdamantus: Less often than they are surprised by Perl's or JS's?
iamjarvo has joined #ruby
<arrubin>
As a long-time author of Perl code, Ruby's warts seem tame.
<Maxdamantus>
I think a lot of surprises in JS come down to things that the people who make them basically already know (eg, ASI)
<waxjar>
Maxdamantus: btw, in that example your calling the method []= with the arguments 0 and 4 on bar.
reinaldob has joined #ruby
<Maxdamantus>
but that you tend to avoid thinking about normally.
wjimenez5271 has quit [Remote host closed the connection]
<Maxdamantus>
can't speak for Perl.
jimbach has quit [Ping timeout: 240 seconds]
<Maxdamantus>
waxjar: indeed.
tier has quit [Ping timeout: 244 seconds]
n80 has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
sinequanon has quit [Remote host closed the connection]
lemur has joined #ruby
JeffBonds has quit [Quit: JeffBonds]
sinequanon has joined #ruby
yetanotherdave has quit [Ping timeout: 272 seconds]
reinaldob has quit [Ping timeout: 260 seconds]
sedai has quit [Quit: sedai]
sepp2k1 has quit [Read error: Connection reset by peer]
boombadaroomba has joined #ruby
hellangel7 has quit [Remote host closed the connection]
monkeypatch has joined #ruby
sinequanon has quit [Ping timeout: 260 seconds]
geggam has joined #ruby
lampd1 has joined #ruby
jriese has joined #ruby
rshetty has quit [Remote host closed the connection]
yetanotherdave has joined #ruby
pwh has joined #ruby
boombadaroomba has quit [Ping timeout: 245 seconds]
msmith_ has joined #ruby
brahmadpk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
geggam has quit [Ping timeout: 260 seconds]
ghr has joined #ruby
Scotteh has joined #ruby
yetanotherdave has quit [Ping timeout: 272 seconds]
crunk_bear has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tlarevo_ has quit [Ping timeout: 272 seconds]
ghr has quit [Ping timeout: 240 seconds]
chipotle has quit [Ping timeout: 255 seconds]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Apocalypse has quit [Ping timeout: 250 seconds]
snath has joined #ruby
gsd has joined #ruby
Scotteh has quit [Ping timeout: 272 seconds]
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xymbol__ has joined #ruby
tlarevo has joined #ruby
monkeypatch has joined #ruby
tokik has joined #ruby
monkeypa_ has joined #ruby
xymbol_ has quit [Ping timeout: 244 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
Lewix has joined #ruby
Apocalypse has joined #ruby
beneggett has joined #ruby
monkeypatch has quit [Ping timeout: 255 seconds]
djbkd has quit [Quit: My people need me...]
monkeypa_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beneggett has quit [Remote host closed the connection]
wethu has quit [Quit: This computer has gone to sleep]
<rubie>
hi all: anyone know why i would get this error rb:56:in `+': no implicit conversion of nil into String (TypeError) on this line?---- @name + "\n\nYou are in " + @description
<havenwood>
drewbug: the binaries it produces are about half the size of Go's, based on my limited anecdotal testing
ki0 has quit [Ping timeout: 240 seconds]
<havenwood>
drewbug: the cross compilation seems to be really coming along too, haven't played around with that too much but it's on my list of things to check out futher
<drewbug>
Very cool!
renderfu_ has joined #ruby
renderful has quit [Read error: Connection reset by peer]
brahmadpk has joined #ruby
Kricir has joined #ruby
pwh has joined #ruby
arup_r has quit [Quit: Leaving.]
anaeem1_ has joined #ruby
lampd1 has quit [Remote host closed the connection]
rubie has quit [Quit: Page closed]
nonks has quit [Ping timeout: 250 seconds]
top4o has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<animalanimal>
heyyy... question more on haml + js + ruby: if I set a data attribute via link_to helper, how can I get the value of the attribute?
reinaldob has quit [Ping timeout: 255 seconds]
oo_ has quit [Remote host closed the connection]
drewbug has quit [Quit: Leaving.]
drewbug has joined #ruby
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BadQuanta has joined #ruby
weemsledeux has joined #ruby
weemsledeux has quit [Changing host]
weemsledeux has joined #ruby
ki0 has joined #ruby
timonv_ has joined #ruby
starkhalo has quit [Ping timeout: 240 seconds]
timonv_ has quit [Ping timeout: 258 seconds]
goodenough has quit [Remote host closed the connection]
ki0 has quit [Ping timeout: 246 seconds]
benzrf is now known as benzrf|offline
MasterPiece has joined #ruby
jdj_dk has quit [Remote host closed the connection]
jdj_dk has joined #ruby
jdj_dk has quit [Remote host closed the connection]
subraminion has joined #ruby
x77686d has quit [Quit: x77686d]
freezey has quit [Remote host closed the connection]
goodenough has joined #ruby
jimmyy has quit [Read error: Connection reset by peer]
jimmyy has joined #ruby
jimmyy has quit [Max SendQ exceeded]
jimmyy has joined #ruby
t_p has joined #ruby
levisbakalinsky has joined #ruby
Morkel has joined #ruby
xenomorph is now known as {xenomorph}
chrisbolton has joined #ruby
<chrisbolton>
Is anyone around? I’m trying to build nested Factories. Rule has rule_actions, each have a rest_action and each have rest_action_headers. I’m using after(:build) to build the nested Factories, but it’s not returning a fully built factory. It only gets to the first nested level.
tlarevo_ has joined #ruby
bMalum has quit [Quit: bMalum]
GriffinHeart has joined #ruby
* insaneinside
has absolutely no idea what chrisbolton is talking about.
<chrisbolton>
Let me put together a gist.
drewbug has quit [Quit: Leaving.]
oo_ has joined #ruby
tlarevo has quit [Ping timeout: 272 seconds]
neoxquick has quit [Read error: Connection reset by peer]
anaeem___ has quit [Remote host closed the connection]
tagrudev has joined #ruby
jamto11 has quit [Remote host closed the connection]
<insaneinside>
chrisbolton: are you sure the quotes around class names in the options hash to each `factory` call are supposed to be there?
{xenomorph} is now known as xenomorph
justinmburrous has joined #ruby
jamto11 has joined #ruby
<chrisbolton>
insaneinside: They work in other places but give me a second to investigate
subraminion has quit [Ping timeout: 255 seconds]
<insaneinside>
kk
Macaveli has joined #ruby
<Spami>
So I'm watching this video: https://www.youtube.com/watch?v=wYFrGlSERto. But I'm a beginner and I don't understand some of the things. In the benchmark they do some really long loops but most web app do a sql query, maybe some light process and display it. It seems like a really fast and easy processing ran by on worker. I don't understand the benefits of jruby here
speakingcode has quit [Ping timeout: 255 seconds]
anaeem1 has joined #ruby
<chrisbolton>
insaneinside: No go.
Soda has joined #ruby
<insaneinside>
chrisbolton: no idea then, sorry. I *would* recommend using classes instead of strings there though, unless you have a specific reason to use strings...
jdj_dk has joined #ruby
nonks has joined #ruby
gauke has joined #ruby
<insaneinside>
Spami: a single run of some function is not enough to determine how performant it is; other processes running on the system, hardware latency, and sometimes even random quantum events can cause something to take longer. To cancel out those effects, thousands of trials are done and the results averaged to get a value with a low margin of error.
hgl_ has joined #ruby
hgl_ has quit [Max SendQ exceeded]
<chrisbolton>
Thanks insaneinside
<insaneinside>
np
echevemaster has quit [Quit: Leaving]
Rosa has quit []
toretore has quit [Ping timeout: 255 seconds]
anaeem1 has quit [Ping timeout: 255 seconds]
Soda has quit [Remote host closed the connection]
gizmore has joined #ruby
<gizmore>
i am trying to make my first gem... i am using bundler, and in foo.rb require "myfile.rb" ... it says rake not found Oo
<gizmore>
i am executing foo.rb with bundle exec ruby foo.rb
abuzze has joined #ruby
<gizmore>
however, when i do bundle console $> require "myfile" it works (the .rb was a type)
bthesorceror has quit [Ping timeout: 272 seconds]
pwh has quit []
jimmyy has quit [Ping timeout: 255 seconds]
jamto11 has quit [Remote host closed the connection]
anaeem1 has joined #ruby
arup_r has quit []
arup_r has joined #ruby
toretore has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
anaeem1__ has joined #ruby
<tmoore>
gizmore: can you create a gist with your code and the full error message?
drewbug has quit [Read error: Connection reset by peer]
drewbug has joined #ruby
<gizmore>
probably "bundle exec ruby test.rb " is not the way / enough?
<gizmore>
test.rb has only one line: require "myfile"
speakingcode has joined #ruby
<tmoore>
yeah but what does myfile contain?
anaeem1 has quit [Ping timeout: 240 seconds]
echooo1 has joined #ruby
<tmoore>
there isn't anything obviously wrong with what you're doing gizmore but we can't really help more if we can't see the details
agent_white has joined #ruby
<gizmore>
can someone make a gist out of a github project?
techsethi has quit [Quit: techsethi]
<tmoore>
oh if you already have a github project, just post the link
<gizmore>
i'll commit something testable, ca 90.seconds
WarNeverChanges has joined #ruby
WarNeverChanges has left #ruby [#ruby]
JohnBat26 has joined #ruby
echooo has quit [Ping timeout: 255 seconds]
goodenough has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
echooo has quit [Ping timeout: 260 seconds]
klaut has joined #ruby
<tmoore>
It's probably hardcoded to some other Ruby location... so it's installing gems for Ruby 2.0.0, but then Ruby 2.1.3 is on your path, which looks for gems in a different place (because installed gems aren't always compatible across different Ruby versions due to changes in the C API)
<tmoore>
So the solution is to re-run 'gem install bundler' with your current Ruby version... but then you might also need to sort out your PATH so that it doesn't include gems installed under the wrong Ruby version
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lampd1 has quit [Ping timeout: 260 seconds]
timonv_ has quit [Remote host closed the connection]
jdj_dk has quit [Read error: Connection reset by peer]
disgrntld has joined #ruby
jdj_dk has joined #ruby
timonv_ has joined #ruby
<disgrntld>
hello, I have a function 'foo' and a function 'bar' that _should_ do the same thing.. I have a test case (Test::Unit::TestCase, I'm on 1.9) that tests foo, is there a way I can avoid having to duplicate the entire testcase with s/foo/bar/?
tvl is now known as tobiasvl
timonv^ has joined #ruby
<shevy>
gizmore making a gem is simple, just write a .gemspec file :>
timonv^ has quit [Remote host closed the connection]
freezey has joined #ruby
<jle`>
disgrntld: how about testing foobar and taking foo or bar as an argument
jdj_dk has quit [Remote host closed the connection]
tenseiten has quit [Quit: No Ping reply in 180 seconds.]
c107 has quit [Remote host closed the connection]
<disgrntld>
that's pretty clever, jle`.. lol
<disgrntld>
ok, lemme try that
<jle`>
that might be a bad idea
timonv_ has quit [Ping timeout: 244 seconds]
<disgrntld>
*shrug* this is for a simple little exercise
jimmyy has joined #ruby
acl_ has quit [Quit: ChatZilla 0.9.91 [Firefox 32.0.3/20140923175406]]
jdj_dk_ has joined #ruby
wildroman2 has joined #ruby
jdj_dk_ has quit [Remote host closed the connection]
jdj_dk has joined #ruby
blackmes1 has joined #ruby
GriffinHeart has joined #ruby
jdj_dk has quit [Remote host closed the connection]
ad_boot has joined #ruby
noop has joined #ruby
gauke has joined #ruby
rbrs has joined #ruby
freezey has quit [Ping timeout: 272 seconds]
klaut_ has joined #ruby
sk87 has joined #ruby
cmxu has joined #ruby
tagrudev has quit [Remote host closed the connection]
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
klaut has quit [Ping timeout: 244 seconds]
tagrudev has joined #ruby
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
GriffinHeart has quit [Ping timeout: 244 seconds]
timonv_ has joined #ruby
sprihodko has joined #ruby
disgrntld has quit [Quit: Page closed]
francisfish has quit [Remote host closed the connection]
livathinos has joined #ruby
francisfish has joined #ruby
omosoj has joined #ruby
BraddPitt has joined #ruby
dumdedum has joined #ruby
ta has joined #ruby
nrsk has joined #ruby
alex88 has joined #ruby
francisfish has quit [Ping timeout: 246 seconds]
livathinos has quit [Remote host closed the connection]
seitensei has quit [Quit: No Ping reply in 180 seconds.]
livathinos has joined #ruby
<jeaye>
What's a looping construct for arrays that allows arbitrary incrementing?
Xeago has joined #ruby
ninegrid_ has joined #ruby
<jeaye>
I'm iterating over an array and, if I hit a certain value, I may want to go back, say, 5 elements.
<postmodern>
while i < length
<jeaye>
I could do this in multiple passes or keep the last n elements cached, but this is silly.
<jeaye>
postmodern: Ah, sure.
mike32 has joined #ruby
livathin_ has joined #ruby
<jeaye>
Was too stuck trying to get a "normal" for loop.
livathinos has quit [Read error: Connection reset by peer]
jacobat has joined #ruby
livathin_ has quit [Remote host closed the connection]
aganov has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
blackmes1 has quit [Ping timeout: 244 seconds]
matled- has joined #ruby
ninegrid_ has quit [Client Quit]
livathinos has joined #ruby
druznek has joined #ruby
matled has quit [Read error: Connection reset by peer]
matled- is now known as matled
gregf_ has joined #ruby
seitensei has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BadQuanta has quit [Ping timeout: 272 seconds]
kaspergrubbe has joined #ruby
<shevy>
this looks ugly
kamilc__ has quit [Quit: Leaving...]
alem0lars has quit [Quit: AFK..]
joast has quit [Ping timeout: 246 seconds]
brahmadpk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hmsimha has quit [Ping timeout: 272 seconds]
ta__ has joined #ruby
jdj_dk has joined #ruby
mike32 has quit [Ping timeout: 244 seconds]
brahmadpk has joined #ruby
ta___ has joined #ruby
mr_blue has joined #ruby
ta has quit [Ping timeout: 255 seconds]
atmosx has joined #ruby
goshdarnyou has quit [Quit: Connection closed for inactivity]
doev has joined #ruby
ta__ has quit [Ping timeout: 246 seconds]
zarubin has joined #ruby
rshetty has quit [Remote host closed the connection]
chthon has joined #ruby
sprihodko has quit [Quit: (null)]
hellangel7 has joined #ruby
brahmadpk has quit [Read error: Connection reset by peer]
brahmadpk has joined #ruby
jdj_dk has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 245 seconds]
KnownSyntax has joined #ruby
ki0 has quit [Remote host closed the connection]
justinmburrous has quit [Read error: No route to host]
justinmburrous has joined #ruby
bthesorceror has joined #ruby
jacobat has quit [Ping timeout: 255 seconds]
mikecmpbll has joined #ruby
freezey has joined #ruby
bMalum has quit [Quit: bMalum]
rbrs has quit [Quit: Leaving]
lolmaus has joined #ruby
jacobat has joined #ruby
bthesorceror has quit [Ping timeout: 260 seconds]
Takle has joined #ruby
freezey has quit [Ping timeout: 246 seconds]
francisfish has joined #ruby
francisfish has quit [Remote host closed the connection]
reinaldob has joined #ruby
francisfish has joined #ruby
ki0 has joined #ruby
AFKGeek has joined #ruby
matcouto has joined #ruby
jacobat has quit [Ping timeout: 250 seconds]
livathin_ has joined #ruby
omosoj has quit [Ping timeout: 260 seconds]
<tekacs>
anyone know how to rename a class?
livathin_ has quit [Remote host closed the connection]
<tekacs>
that is, to change X.name such that (for example) #display and pretty printers show the new name
livathin_ has joined #ruby
rshetty has joined #ruby
ghr has joined #ruby
reinaldob has quit [Ping timeout: 272 seconds]
drewbug has quit [Quit: Leaving.]
livathi__ has joined #ruby
livathinos has quit [Ping timeout: 272 seconds]
lxsameer has joined #ruby
seitensei has quit [Ping timeout: 246 seconds]
<apeiros_>
tekacs: .name is just a method. redefine it to return whatever you want.
<tekacs>
have done that, but the properties I'd expect don't seem to change
livathin_ has quit [Ping timeout: 255 seconds]
Chinaski has quit [Ping timeout: 240 seconds]
<tobiasvl>
can't you do something like Y = X; Object.send(:remove_const, :X)
<apeiros_>
tekacs: I can't read your mind. *what* properties do you expect to change?
<tekacs>
the ones I mentioned, apeiros: #display and pretty printers
cina has quit [Ping timeout: 260 seconds]
<apeiros_>
tekacs: redefine name and to_s
<apeiros_>
now I wonder from where pp gets the classname
<tekacs>
ah of course, name includes module path and so to_s wouldn't call out to it...
cina has joined #ruby
<tekacs>
that makes sense (and works), thanks :)
<tagrudev>
certainty, ping
<apeiros_>
pp still shows the original name for me, though.
speakingcode has quit [Ping timeout: 260 seconds]
<tekacs>
not for me
<tekacs>
so long as I get both name and to_s
Chinaski has joined #ruby
mmochan_ has joined #ruby
Chinaski has quit [Read error: Connection reset by peer]
emocakes has joined #ruby
<apeiros_>
ok, so I've got 4 methods which return the name: Module#name, #to_s, #inspect and #pretty_inspect
<shevy>
so the display above is ok - I thought it would be much longer because in your question you wrote "long string" - but 10 ^ -5 is not that long ;)
yfeldblum has quit [Remote host closed the connection]
LeShadow has joined #ruby
<LeShadow>
hmm can somebody tell me what is wrong with the following line?: file_contents.gsub(/PROJECT_NAME/, parameters[:project_name])
startupality has joined #ruby
<LeShadow>
it doesn’t seem to work and I really can’t find out why
mxrguspxrt has joined #ruby
Takle has joined #ruby
bMalum has joined #ruby
<shevy>
LeShadow build up intermediary values
<shevy>
also, this won't change the variable file_contents
<shevy>
.gsub! vs. .gsub
<LeShadow>
what’s the difference between .gsub and .gsub!?
<shevy>
.gsub! modifies in place
<shevy>
.gsub will just return something but leave the original content intact
<shevy>
-gsub! also is faster
Pupeno has joined #ruby
<shevy>
but you can not chain it like .gsub!.bla
<shevy>
but you can chain .gsub
<LeShadow>
I understand
<LeShadow>
thanks for the help shevy :)
<shevy>
you could also do: x = x.gsub()
<shevy>
but x.gsub! would be faster
<shevy>
as in = a new object is created
<shevy>
I always use apeiros_'s way to rationalize - the less methods to be called, as a rule of thumb, the faster something should be
gelbander has joined #ruby
drager_ is now known as drager
drager has quit [Changing host]
drager has joined #ruby
nonks has joined #ruby
jimmyhoughjr has joined #ruby
<LeShadow>
haha :p
<LeShadow>
well I’ll remember that and thanks for the help :p
<LeShadow>
my gem works now :3
Deejay_ has joined #ruby
mike32 has joined #ruby
freezey has joined #ruby
corkfuse has joined #ruby
mansonik has joined #ruby
<tmoore>
just be careful when using ! methods that nothing else is keeping a reference to that object and expecting it to stay the same... gsub! is a great way to introduce subtle bugs into your program
justinmburrous has joined #ruby
bMalum has quit [Quit: bMalum]
koderok has joined #ruby
mikecmpbll has quit [Ping timeout: 245 seconds]
freezey has quit [Ping timeout: 272 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
mikecmpbll has joined #ruby
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
justinmburrous has quit [Ping timeout: 255 seconds]
rbrs has quit [Quit: Leaving]
<jhass>
LeShadow: also yo udon't need the regex there .gsub('PROJECT_NAME' will do just as fine
<LeShadow>
jhass but doesn’t gsub work with patterns?
Czupa has joined #ruby
<jhass>
not only
Czupa has quit [Client Quit]
blackmes1 has quit [Ping timeout: 240 seconds]
bthesorceror has joined #ruby
osvimer has joined #ruby
Pupeno has quit [Remote host closed the connection]
<jhass>
"The pattern is typically a Regexp; if given as a String, any regular expression metacharacters it contains will be interpreted literally, e.g. '\\d' will match a backlash followed by ‘d’, instead of a digit."
Deejay_ has quit [Quit: Computer has gone to sleep.]
<jhass>
there's even a whole box for strings
<LeShadow>
yeah so if you use a string you have to watch out or gsub will still interpret it as a regexp?
<jhass>
did you even read what you linked?
yfeldblum has joined #ruby
<LeShadow>
yeah partly :p
<LeShadow>
sorry :p
<LeShadow>
didn’t scroll down
<LeShadow>
my bad
<jhass>
well, the quote is the first paragraph
bthesorceror has quit [Ping timeout: 272 seconds]
kamilc__ has joined #ruby
yfeldblu_ has joined #ruby
Takle has quit [Remote host closed the connection]
<suy>
Where can I find the *reference* for the C API? I'm trying to install a gem that fails at error: ‘rb_funcall_with_block’ was not declared in this scope I assume I either miss an include or the function was added at some newer version of ruby that I don't have.
MCDev has left #ruby [#ruby]
<jhass>
suy: I don't think there's anything beyond README.ext
fabrice31 has quit [Remote host closed the connection]
<shortCircuit__>
if i have module A module B end end. then in another to include the methods inside module B in another module C do i do module C include A::B end ??
mxrguspxrt has quit [Remote host closed the connection]
<jhass>
shortCircuit__: yes
<suy>
http://stackoverflow.com/a/22566163 "The japanese developers are very bad in english and therefore don't like to write documentation. The best documentation is only available in japanese."
troulouliou_dev has quit [Quit: Leaving]
lkba has joined #ruby
gtrak has joined #ruby
yfeldblu_ has quit [Ping timeout: 260 seconds]
HelperW has quit [Read error: Connection reset by peer]
<shevy>
yeah well
<shevy>
it's a total failure of the japanese education system
mistermocha has joined #ruby
HelperW has joined #ruby
<ddv>
try learning japanese instead
fabrice31 has quit [Ping timeout: 250 seconds]
Guest13006 has joined #ruby
sk87 has joined #ruby
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<suy>
as a mather of fact, I started learning japanese a while ago :) but reading is very complex, as you would imagine
Takle has joined #ruby
ad_boot has joined #ruby
ctp has joined #ruby
workmad3 has joined #ruby
HelperW has quit [Client Quit]
<shevy>
ddv yeah except that 130 million japanese speaking folks vs. 3 billion english speaking folks isn't on the same level
Cope has quit [Disconnected by services]
<ddv>
I think we should try to program in japanese also
Cope has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
<ddv>
That would be fun
<suy>
Add some emoji to make it easily greppable :)
sandelius has joined #ruby
<shevy>
now most programming languages use the english language
<shevy>
"for", "while"
<shevy>
are there programming languages in chinese or japanese symbols?
<shevy>
"In 1997, the Gartner Group reported that 80% of the world's business ran on COBOL with over 200 billion lines of code and 5 billion lines more being written annually."
<shevy>
omg
<shevy>
5 billion new lines of COBOL per year
gtrak has quit [Remote host closed the connection]
terlar has quit [Quit: WeeChat 1.0.1]
<workmad3>
that was 16 years ago though
<workmad3>
and was at the height of people sorting out date issues for the millenium
<shevy>
ohhh
<ddv>
Nice
fabrice31 has joined #ruby
<ddv>
You can earn a lot of money a s COBOL developer
rbrs has joined #ruby
<workmad3>
shevy: even my mum was getting some offers through for COBOL work at that point... and she hadn't worked as a COBOL coder for I think about 20 years at that point
yfeldblum has joined #ruby
<shevy>
damn
<shevy>
you have a geek family!
<ddv>
You are destined to be a COBOL developer workmad3
jottr_ has joined #ruby
<shevy>
the COBOL genes run deep in workmad3
mxrguspxrt has joined #ruby
anaeem1 has quit [Remote host closed the connection]
<shevy>
"x IS GREATER THAN y"
<workmad3>
shevy: only on the surface... I'm the only one where the geek runs deep
<shevy>
warm fuzzy feelings for workmad3 with this COBOL code :)
<workmad3>
and I've never looked at COBOL personally
anaeem1 has joined #ruby
<shevy>
that's ok, you don't know what you have been missing out
<shevy>
let me find you some other decent COBOL snippets
<shevy>
01 some-record.
<shevy>
wow man
<shevy>
it even has some BASIC
<shevy>
05 cust-key PIC X(10).
<workmad3>
my sister is a corporate manager at IBM, my brother doesn't deal with computers at all and does trance DJing in his spare time... my mum teaches hardware maintenance and tech support stuff and my dad got promoted into management and only barely recognises C code nowadays
AFKGeek has quit [Quit: Leaving]
drawingthesun has quit [Quit: Leaving]
<workmad3>
and the geekiest pursuits of my mum and sister are that they like sci-fi... my dad, the geekiest he gets is trainspotting
<ddv>
lol your brother needs to find a job
<workmad3>
so yeah... they may be a slightly geeky family, but I'm still a geeky outsider amongst them :(
<workmad3>
ddv: he has a job... in acquisitions for... someone
<ddv>
ok
ad_boot has quit [Remote host closed the connection]
<workmad3>
he could probably tell you the best place to bulk purchase just about anything nowadays (because despite him being the least geeky, he also has an almost eidetic memory... lucky git)
<shevy>
workmad3 from the way you describe it, I like your brother
cmxu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3>
shevy: heh :)
<shevy>
I now picture him like the dude from The Big Lebowski
<workmad3>
shevy: I get on with him a lot better now we're older than I used to
bal has quit [Quit: bal]
<workmad3>
but I don't exactly see my family too often
jgt has quit [Ping timeout: 245 seconds]
bal has joined #ruby
<shevy>
hey... I remember trance music... even techno music from the 1990s... got was it trash but I liked it... like U96 Das Boot!
<shevy>
or insomnia from faithless
<workmad3>
all I know is that he does (or at least did) trance
<workmad3>
that's where my interest in trance begins and ends
threesixes has joined #ruby
<workmad3>
I've been inculcated in rock and metal from my mid-teens :)
rkalfane has joined #ruby
sqd has joined #ruby
tagrudev has quit [Remote host closed the connection]
Muz_ is now known as Muz
<workmad3>
anyway, enough about my family... lets talk ruby :P
sqd has left #ruby [#ruby]
tagrudev has joined #ruby
jacobat has quit [Ping timeout: 260 seconds]
HelperW has joined #ruby
<ddv>
workmad3: You also have a sister?
timgauthier has joined #ruby
startupality has quit [Quit: startupality]
<workmad3>
ddv: yeah
<ddv>
Her name is Ruby?
<workmad3>
no
<ddv>
:P
<workmad3>
:P
spastorino has joined #ruby
VBlizzard has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
arup_r_ has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
jrhe_ has quit [Quit: Connection closed for inactivity]
arup_r has joined #ruby
arup_r_ has quit [Read error: Connection reset by peer]
tvw has joined #ruby
arup_r_ has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Blizzy has quit [Ping timeout: 272 seconds]
bal has quit [Quit: bal]
<shevy>
omg
<shevy>
that was bad ddv
bal has joined #ruby
<shevy>
she is ugly
<shevy>
so they called her perl
roolo has quit [Remote host closed the connection]
<gregf_>
heh
echooo has quit [Ping timeout: 260 seconds]
<ddv>
shevy: maybe you should give her a pearl necklace
<ddv>
so she is more beautifull
roolo has joined #ruby
<shevy>
nah
<shevy>
too expensive
<ddv>
shevy: google it
<shevy>
I don't want a necklace
arup_r has quit [Ping timeout: 260 seconds]
<ddv>
shevy: it's a porn term....
<olivier_bK>
what is the equivalent of cut in ruby ?
marlonandrade1 has joined #ruby
<ddv>
cut?
<TheBrayn>
what does cut do?
osvimer has quit [Remote host closed the connection]
arup_r has joined #ruby
jgt has joined #ruby
freezey has joined #ruby
<olivier_bK>
i want to select first params in all of my file
marlonandrade has quit [Ping timeout: 250 seconds]
kaspergrubbe has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
<shevy>
olivier_bK don't be silly man
<shevy>
ruby works on operations
<shevy>
File.readlines('your_file_here')
<shevy>
now you have an array
mkaesz has joined #ruby
<shevy>
so apply on each line of your array a splitting operation
roolo has quit [Ping timeout: 240 seconds]
<shevy>
if you wish to return the proper one, you can use .map to collect the first entries
<shevy>
.map {|line| line[0] }
<shevy>
so you see! one operation after the other
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
arup_r_ has quit [Ping timeout: 255 seconds]
Spami has joined #ruby
freezey has quit [Ping timeout: 260 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
jamto11 has joined #ruby
Deejay_ has joined #ruby
nrsk has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 260 seconds]
justinmburrous has joined #ruby
wildroman2 has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 260 seconds]
mskaesz has joined #ruby
<jhass>
.map(&:first) :P
Mia has quit [Read error: Connection reset by peer]
jamto11 has quit [Ping timeout: 260 seconds]
arup_r has quit [Remote host closed the connection]
threesixes has quit [Quit: SATAN!!!!!!!!]
<jhass>
but I guess skipping the intermediate array makes more sense: File.readlines("foo").map {|line| line.split.first }
tokik has quit [Ping timeout: 258 seconds]
Aciz has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<workmad3>
jhass: preference - File.readlines or IO.readlines?
<workmad3>
(just curious :) )
mkaesz has quit [Ping timeout: 240 seconds]
<jhass>
generally File
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<jhass>
I guess I would consider IO if it's a named pipe or some other silly thing
wildroman2 has joined #ruby
roolo has joined #ruby
justinmburrous has quit [Ping timeout: 272 seconds]
pu22l3r_ has quit [Remote host closed the connection]
Mohan has joined #ruby
agjacome has quit [Quit: leaving]
<Nilium>
I keep wondering if anyone at my office will accidentally find out I use Ruby, seeing as I've said bad things about it and I'm pretty sure that got me labeled as the anti-ruby guy.
pu22l3r has joined #ruby
msmith_ has joined #ruby
HelperW has quit [Remote host closed the connection]
datreh has quit [Remote host closed the connection]
<msx>
gregf_: o/ yes, "nos conocemos?" "have we met?
HelperW has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
<msx>
gregf_: 'conocer' here is like meet instead of 'know' (while the last can vaguely apply, oc)
momomomomo has joined #ruby
AlSquire has joined #ruby
mxrguspxrt has joined #ruby
havenwood has joined #ruby
p0sixpscl has joined #ruby
<banister>
Nilium what bad things have u said about ruby (just curious)
<Nilium>
Just me griping about MRI's stdlib and such
sailias has joined #ruby
<workmad3>
Nilium: it just puts your gripes on firmer footing ;)
freerobby has joined #ruby
devdazed has joined #ruby
<gregf_>
msx: ah - ok.
blackmes1 has joined #ruby
bmurt has joined #ruby
linojon has quit [Quit: linojon]
tier_ has quit [Remote host closed the connection]
freezey has joined #ruby
tier has joined #ruby
crunk_bear has joined #ruby
benzrf is now known as benzrf|offline
ta has quit [Read error: Connection reset by peer]
_5kg has quit [Read error: Connection reset by peer]
mxrguspxrt has quit [Ping timeout: 258 seconds]
schaerli has joined #ruby
Xeago has joined #ruby
<Nilium>
Basically just the standard stdlib-is-huge-and-unmaintainable issue and the other problem of MRI just being kind of bad at certain things
techsethi has quit [Quit: techsethi]
justinmburrous has joined #ruby
startupality has joined #ruby
linojon has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
<olivier_bK>
what is the best for diff two files and get the diff ?
tier has quit [Ping timeout: 255 seconds]
BadQuanta has joined #ruby
<workmad3>
Nilium: the C++ stdlib is also huge and difficult to maintain ;)
<Nilium>
E.g., writing a matrix class in Ruby and doing matrix concatenation is pretty slow just because x * y means looking up what both x and y and then forwarding it through to the correct function/opcode (not sure if there's a shortcut in the VM for float*float or if it just goes to a Float#*)
<workmad3>
Nilium: I'd be curious to see a code-size comparison... I agree that C++'s stdlib does a crapload less, but I think it takes a shitload more code to do so ;)
justinmburrous has quit [Ping timeout: 260 seconds]
<Nilium>
Depends on the stdlib implementation, really.
<Nilium>
libstdc++ is probably a disorganized mess. libc++ is sort of tidy for being template hell.
<railis>
Nilium: i searched
<railis>
all uses password | user
Macaveli has quit [Ping timeout: 240 seconds]
<railis>
or add some authentication flow to app
emergion has quit [Quit: Connection closed for inactivity]
<Nilium>
Then your question's probably been answered.
yeticry has joined #ruby
andrewhl has joined #ruby
tewlz has quit [Remote host closed the connection]
<havenwood>
olivier_bK: hmm, i'm sure if your usecase is simple you can some up with something simpler, but there's always teh diffy gem: https://github.com/samg/diffy#readme
jzigmund_ is now known as jzigmund
shortCircuit__ has quit [Remote host closed the connection]
<Nilium>
When you say token, do you mean authsub token or whatever that is?
andrewhl has quit [Client Quit]
bthesorceror has joined #ruby
<railis>
oauth2 token with contacts scope included
Kricir has joined #ruby
techsethi has joined #ruby
<Nilium>
You should probably just write it yourself, in that case.
<mostlybadfly>
msx: yea! Lol
jacobat has joined #ruby
<msx>
mostlybadfly: what's up? did you finally came?
<mostlybadfly>
msx: not yet. At the end of the month
<msx>
cool, enjoy :D
bthesorceror has quit [Ping timeout: 250 seconds]
Ulrike_Rayne has quit [Ping timeout: 246 seconds]
Neozonz has joined #ruby
Neozonz has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 260 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Neozonz has joined #ruby
Neozonz has quit [Changing host]
Neozonz has joined #ruby
ursooperduper has joined #ruby
Takle has joined #ruby
max96at|off is now known as max96at
Spami_ has joined #ruby
Spami has quit [Read error: Connection reset by peer]
sklik has joined #ruby
Neozonz has quit [Ping timeout: 255 seconds]
brahmadpk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
iamjarvo has joined #ruby
tier has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
freezey has quit [Remote host closed the connection]
xymbol has left #ruby ["Be back later ..."]
Axy has quit [Read error: Connection reset by peer]
freezey has joined #ruby
Axy has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 246 seconds]
ad_boot has joined #ruby
kaspergrubbe has joined #ruby
Takle has quit [Read error: Connection reset by peer]
<shevy>
anyone knows how to use open uri in ruby when you have to login to a formular?
<shevy>
I need to login, then obtain some links to .pdf files and download these
entrenador has quit [Read error: Connection reset by peer]
tagrudev has quit [Quit: Me = Awesome]
emocakes has quit []
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
schaerli has quit [Remote host closed the connection]
Techguy305 has joined #ruby
schaerli has joined #ruby
nonks has quit [Ping timeout: 260 seconds]
ad_boot has quit [Quit: ad_boot]
Ulrike_Rayne has joined #ruby
ad_boot has joined #ruby
larsam has quit [Quit: Exit]
larsam has joined #ruby
pu22l3r_ has joined #ruby
tlarevo_ has quit [Remote host closed the connection]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mekhami has joined #ruby
bweston92 has joined #ruby
<mekhami>
so if i have three different hashes, one is {results: results, widget: widget} another is {results: results, phone: phone} and the third is {results: results, app: app} how can i merge these to be {results: results, widget: widget, app: app, phone: phone}? all the results values are the exact same thing, lat: lat and long: long
schaerli has quit [Ping timeout: 260 seconds]
<bweston92>
#rails doesn't exist?
roolo has quit [Remote host closed the connection]
<havenwood>
bweston92: register your nick and go to #rubyonrails
<bweston92>
havenwood where do I do that? :)
mxrguspxrt has quit [Remote host closed the connection]
<mekhami>
havenwood, interesting, was just about doing some weird stuff with blocks in .merge, i'll look that up instead
<mekhami>
bweston92 /msg nickserv help
threesixes has joined #ruby
treehug88 has joined #ruby
roolo has quit [Ping timeout: 260 seconds]
eraare has joined #ruby
twohlix has quit [Ping timeout: 272 seconds]
pu22l3r_ has quit [Remote host closed the connection]
stunder has joined #ruby
noop has quit [Ping timeout: 272 seconds]
naftilos76 has joined #ruby
pu22l3r has joined #ruby
roolo has joined #ruby
Trynemjoel has quit [Ping timeout: 265 seconds]
dx7 has joined #ruby
<naftilos76>
hi i am trying to use one of many ways to execute shell command with ruby. However, i need in all cases to have the output in a string and at the same time status of the output (false or true). Can you suggest anything that can help?
rkalfane has joined #ruby
<naftilos76>
I have used system(), %x() and ``
Advocation has joined #ruby
<ericwood>
naftilos76: you'll want backticks and then use $? for the exit status
taptapdan has joined #ruby
cocotton has joined #ruby
<ericwood>
$? will be a Process::Status object which you can use to get the info you want
<ericwood>
:D
linojon has joined #ruby
<wasamasa>
naftilos76: you could alternatively use the popen3 library
<_JamieD_>
I have a question about keyword arguments in ruby 2.1. Can a default value for a keyword be defined outside of the method definition. For example could I use a variable, constant or another method to specify the default value e.g method(name: @@name, age: GLOBAL_AGE, city: get_city)
bMalum has quit [Quit: bMalum]
<centrx>
_JamieD_, Yes, but not inside the method signature
<centrx>
name ||= @@name
camt has joined #ruby
monkeypatch has joined #ruby
OrkzRule has quit [Read error: Connection reset by peer]
jobewan has quit [Ping timeout: 272 seconds]
eraare has quit [Quit: leaving]
<naftilos76>
ericwood: %x(cd ../) does not work . I am working with 1.8.7 . Is that the reason?
<naftilos76>
i get (irb):28: command not found: cd ../
<ericwood>
naftilos76: yeah you should consider upgrading to a more recent version
<_JamieD_>
centrx: I’m specifically asking if it’s possible to do it in the method signature, so I gues thats a no then?
NoNMaDDeN has joined #ruby
<naftilos76>
i can't do that right now but thanks for your time man
<ericwood>
naftilos76: do the backticks work?
lampd1 has quit [Ping timeout: 255 seconds]
<centrx>
_JamieD_, Try it but I'm pretty sure you can only use constants for the defaults
larissa has joined #ruby
fsapo has quit [Ping timeout: 258 seconds]
<havenwood>
_JamieD_: Give it a try in irb or Pry? I'f I understand what you're asking it'll work just fine.
<ericwood>
naftilos76: $? and backticks should definitely be around in 1.8
<naftilos76>
i get the exact same behaviour with ``
<ericwood>
crazy
<naftilos76>
i.e `ls -la` works fine and set $? to 0
<ericwood>
but cd into a dir you're positive exists doesn't do it?
<naftilos76>
but `cd /home` does not
<ericwood>
bizarre
<naftilos76>
home does for sure
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
Kricir has quit [Remote host closed the connection]
<ericwood>
Dir.exists?('/home')
<naftilos76>
i get (irb):36: command not found: cd /home
<ericwood>
with backticks?
project2501a has joined #ruby
Kricir has joined #ruby
<naftilos76>
NoMethodError: undefined method `exist?' for Dir:Class
<ericwood>
it's exists
<canton7>
watch for typos ;)
<naftilos76>
maybe i have to require something?
<naftilos76>
yea yea
<naftilos76>
i tried that
<ericwood>
what did it return?
<j2p2>
nav to the actual command
<j2p2>
one sec
<ericwood>
`which cd`
<naftilos76>
NoMethodError: undefined method `exists?' for Dir:Class
Axy is now known as Mia
<ericwood>
ah yeah 1.8 :|
<naftilos76>
i get an empty str and status 1
<naftilos76>
with `which cd`
<canton7>
ah, use File.exists? for 1.8
<_JamieD_>
havenwood: constants and variables work, method calls don’t by the looks of it
yfeldblum has joined #ruby
<j2p2>
can you just Dir.chdir?
Guest91405 has quit [Remote host closed the connection]
<canton7>
and cd is a shell builtin anyway, isn't it? it doesn't make sense out of the context of a shell
<havenwood>
_JamieD_: try a method that doesn't already have a local variable assigned by the same name
<ericwood>
canton7: yep
jacobat_ has quit [Ping timeout: 245 seconds]
olivier_bK has quit [Ping timeout: 255 seconds]
<ericwood>
I highly recommend using Dir.chdir or the 1.8 equivalent
<havenwood>
i recommend not using 1.8
<canton7>
Dir.chdir exists in 1.8
<canton7>
but yeah, don't use 1.8
<havenwood>
naftilos76: just curious: `command -V cd`
Kricir has quit [Ping timeout: 240 seconds]
Lewix has joined #ruby
<Hanmac>
canton7: just dont try it he will not listening to you
<naftilos76>
File.exist?("/home") works fine
<ericwood>
that's good news
<ericwood>
so....sanity verified
Takle has quit [Remote host closed the connection]
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_JamieD_>
havenwood: nope, looks like when a method is ues it’s nil
<ericwood>
naftilos76: for the stuff you're doing, split the part with cd into a separate line that uses Dir.chdir
<naftilos76>
File.exists?("/home") works too
<_JamieD_>
*used
<Hanmac>
naftilos76: you might need to do File.directory?('/home')
<ericwood>
naftilos76: `ls`; $? returns 1 as well?
<naftilos76>
no no ls returns 0
maasha has quit [Ping timeout: 246 seconds]
<ericwood>
yeah use Dir.chdir...it's a better practice anyways
<havenwood>
>> def meth; 'wheee!' end; def example arg: meth; meth end; example
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
naftilos76: {`cd` => $?.success?}
<_JamieD_>
havenwood: weird that my test didn’t work, your example works locally for mee too
jacobat has joined #ruby
<naftilos76>
i may use the Dir.chdir
<havenwood>
naftilos76: what do you get for that ^ from Ruby?
<naftilos76>
i see no other options
<ericwood>
you won't regret it
<ericwood>
I promise
Takle has joined #ruby
<naftilos76>
{`cd` => $?.success?}
<naftilos76>
(irb):7: command not found: cd
<naftilos76>
=> {""=>false}
iamjarvo has joined #ruby
beef-wellington has quit [Ping timeout: 244 seconds]
<naftilos76>
anyway, i have to upgrage. it is obvious
<naftilos76>
upgrade
<havenwood>
so you're not able to call builtins when shelling out
beef-wellington has joined #ruby
<ericwood>
naftilos76: you'll find everything more fun and faster and better
<naftilos76>
i have not tried everything
<ericwood>
Matz approved
<soahccc>
naftilos76: try /bin/cd maybe the path is fucked?
d4nku has joined #ruby
<soahccc>
hmm its in /usr/bin/cd for me though
skolman_ has quit [Ping timeout: 272 seconds]
ta has joined #ruby
<naftilos76>
well guys, i cannot upgrade now because the website has been being upgrade for quite a long time with ruby 1.8.7 and the coding is huge (for my standards)
<naftilos76>
it would take me a year or so
<ericwood>
naftilos76: don't rush it, but it's definitely worth doing over time
<ericwood>
upgrading is hell :D
Akuma has quit [Ping timeout: 260 seconds]
<naftilos76>
if you are curious to see what i am talking about check out www.energymax.com.cy
<soahccc>
I'm using bash for ages and now I learn all the nice shortcuts like ! history access and ^search^replace etc.
<havenwood>
naftilos76: just curious, but try?: {`bash -c "cd"` => $?.success?}
<naftilos76>
that returned {""=>true}
<soahccc>
Is it btw really a must to add this cookie nonsense? We only do stuff in the EU and none of our sites does that
Xiti has quit [Quit: Leaving]
TheMoonMaster has quit [Quit: Later!]
<ericwood>
you're required to by law
<naftilos76>
it is the law man, what can i do?
<ericwood>
soahccc: gonna report you
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Hanmac>
naftilos76: any reason why you call "cd" like that and dont use a ruby command for that?
fabrice31 has quit [Remote host closed the connection]
<naftilos76>
they can do you some serious damage
<havenwood>
naftilos76: not running shell in interactive mode?
TheMoonMaster has joined #ruby
Es0teric has joined #ruby
<soahccc>
naftilos76: I mean I know hundreds of sites (even big ones) which don't give a shit
fabrice31 has joined #ruby
<havenwood>
naftilos76: anyways, not a 1.8 issue. though do pester them to upgrade!
<naftilos76>
i am trying to build some kind of a shell terminal in the website above
schaerli has joined #ruby
<naftilos76>
and later use js to send some predefined shell commands to do certain stuff
project2501a has quit [Ping timeout: 260 seconds]
chrishough has joined #ruby
<naftilos76>
anyway, thanks guys
<naftilos76>
appreciate it
<Hanmac>
using js to call shell commands ... that smells after a security leak ...
<ericwood>
proceed with caution
noop has quit [Ping timeout: 255 seconds]
gsd has joined #ruby
<soahccc>
ericwood: apparently we are not breaking the law as session cookies, etc. are excempt :D can go to sleep then
ess_tee_u has joined #ruby
<_JamieD_>
is there an equivilent to def meth(options); other_meth(options) end; using keyword arguments? Basically passing all arguments directly to another method.
d4nku has quit [Remote host closed the connection]
Akuma has quit [Excess Flood]
Akuma has joined #ruby
<_JamieD_>
Hanmac: sorry, I should ahve been more specific, I want to do it while also using defaults and required arguments, e.g. def send_message(from: ’foo’, to:, body:)
billy_ran_away has joined #ruby
<_JamieD_>
and send all of these arguments to another method as a hash
ixti has quit [Client Quit]
<naftilos76>
thanks havenwood
apeiros has joined #ruby
snath has quit [Ping timeout: 272 seconds]
HelperW has quit [Ping timeout: 272 seconds]
ursooperduper has joined #ruby
Xiti has joined #ruby
jacobat has quit [Ping timeout: 258 seconds]
<havenwood>
naftilos76: no prob
klmlfl has joined #ruby
klmlfl has quit [Remote host closed the connection]
rshetty has joined #ruby
klmlfl has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
<Hanmac>
_JamieD_: def send_message(from: 'foo', to:, body:, **options); meth(from: from, to: to, body: body, **options);end
shredding has quit [Quit: shredding]
Kricir has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
<_JamieD_>
Hanmac: I was hoping there was some kind of sugar for this, but I guess not
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xeago has quit [Remote host closed the connection]
<Hanmac>
no ... "**options" isnt called keyREST for a reason ...
theRoUS is now known as theRoUS|abest
monkeypatch has joined #ruby
monkeypatch has quit [Max SendQ exceeded]
gauke has quit [Quit: gauke]
Stalkr_ has joined #ruby
Stalkr_ has joined #ruby
Kricir has quit [Ping timeout: 260 seconds]
Jackneill has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
brahmadpk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
renderful has joined #ruby
billy_ran_away has joined #ruby
tier has joined #ruby
mityaz has quit [Quit: Leaving]
Ulrike_Rayne has quit [Ping timeout: 246 seconds]
cocotton has quit [Remote host closed the connection]
jacobat has joined #ruby
aganov has quit [Quit: Leaving]
Notte has joined #ruby
livathinos has quit [Ping timeout: 240 seconds]
NoNMaDDeN has quit [Remote host closed the connection]
djbkd has joined #ruby
livathin_ has quit [Ping timeout: 250 seconds]
snath has joined #ruby
renderful has quit [Ping timeout: 272 seconds]
kristofferR has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 255 seconds]
ad_boot has quit [Quit: ad_boot]
havenwood has quit [Remote host closed the connection]
multi_io_ has joined #ruby
p0sixpscl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robbyoconnor has quit [Ping timeout: 240 seconds]
justinmburrous has joined #ruby
havenwood has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
multi_io has quit [Ping timeout: 244 seconds]
mrsolo has joined #ruby
redgetan has left #ruby ["Leaving"]
cocotton has joined #ruby
hellangel7 has quit [Remote host closed the connection]
tjbiddle has joined #ruby
momomomomo has quit [Quit: momomomomo]
robbyoconnor has joined #ruby
Kricir has joined #ruby
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby
stunder has quit [Ping timeout: 260 seconds]
justinmburrous has quit [Ping timeout: 258 seconds]
ki0 has quit [Ping timeout: 260 seconds]
bklane has joined #ruby
treehug8_ has joined #ruby
stantona has joined #ruby
djbkd has quit [Quit: My people need me...]
cocotton has quit [Remote host closed the connection]
treehug88 has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
aspires has quit [Ping timeout: 246 seconds]
roolo has quit [Remote host closed the connection]
cocotton has joined #ruby
anaeem___ has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
TheSojourner is now known as mjulian
lmickh has joined #ruby
cocotton has joined #ruby
francisfish has quit [Remote host closed the connection]
aspires has joined #ruby
banister has quit [Read error: Connection reset by peer]
Advocation has quit [Quit: Advocation]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
jacobat has quit [Read error: Connection reset by peer]
roolo has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
bMalum has joined #ruby
wildharvest has quit [Quit: Connection closed for inactivity]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
banister has quit [Max SendQ exceeded]
sk87 has joined #ruby
francisfish has joined #ruby
Advocation has joined #ruby
banister has joined #ruby
bklane is now known as bleklane
Ankhers has joined #ruby
Advocation has quit [Client Quit]
kenneth has joined #ruby
kantakt has joined #ruby
roolo has quit [Ping timeout: 250 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
manzo has joined #ruby
ad_boot has joined #ruby
francisfish has quit [Ping timeout: 246 seconds]
<naftilos76>
havenwood: how can a ruby script remember a numerical value set by a previous execution except data stored in a file? env var? ruby var?
Advocation has joined #ruby
jadedphone has joined #ruby
<ad_boot>
.
Snowstormer has quit [Ping timeout: 240 seconds]
<naftilos76>
?
fsapo has joined #ruby
<ad_boot>
naftilos76: ow sorry, that wasnt a response to you
<ad_boot>
:)
<naftilos76>
no pro
stunder has joined #ruby
stunder has quit [Read error: Connection reset by peer]
Snowstormer has joined #ruby
<havenwood>
naftilos76: There're multiple options depending on what you need. There's ENV#[] if you want to set environment variables. YAML is a popular choice for serializer for config files. Ruby stdlib has YAML::Store for easy transactional YAML storage to disk.
<naftilos76>
i was thinking about environment vars which is somewhat easy in ruby
bleklane is now known as bklane_
ta has quit [Ping timeout: 260 seconds]
rbrs has quit [Remote host closed the connection]
<naftilos76>
i will try env var
<naftilos76>
looks easier
<havenwood>
naftilos76: PStore is like YAML::Store but its not human readable when stored since it's using Marshall instead of YAML. But if that doesn't matter it's an option.
freezey has quit [Remote host closed the connection]
<havenwood>
naftilos76: you can always just serialize and write to file as well
ad_boot has quit [Quit: ad_boot]
Lewix has quit [Remote host closed the connection]
Techguy305 has quit [Ping timeout: 240 seconds]
anaeem1 has joined #ruby
terlar has quit [Ping timeout: 244 seconds]
arya_ has joined #ruby
Aryasam has quit [Client Quit]
TheNumb is now known as nachosTheNumb
nachosTheNumb is now known as TheNumb
<waxjar>
you could also store it in the DATA part of the script itself if you really wanted
<apeiros>
__Grabarz__: this channel is generally religion free and we'd like to keep it that way, thanks.
doev has quit [Ping timeout: 255 seconds]
freezey has joined #ruby
Techguy305|2 has quit [Ping timeout: 244 seconds]
troyready has joined #ruby
maletor has joined #ruby
W0rmDr1nk has quit [Ping timeout: 258 seconds]
CaptainHeavy has quit [Remote host closed the connection]
mikepack has joined #ruby
chris6131 has left #ruby [#ruby]
thagomizer has joined #ruby
anaeem1 has quit [Ping timeout: 272 seconds]
kaspergrubbe has joined #ruby
brahmadpk has joined #ruby
einarj has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
bricker`work has joined #ruby
sarlalian has quit [Quit: WeeChat 0.4.2]
jhc76 has joined #ruby
spyderman4g63 has joined #ruby
sarlalian has joined #ruby
anaeem1 has joined #ruby
Y3K has joined #ruby
cocotton has quit [Remote host closed the connection]
anaeem1 has quit [Remote host closed the connection]
blackmes1 has joined #ruby
<Y3K>
Hi there! I'm pretty rookie with Ruby yet. I want to match two string lengths and discard the rest. Example: a = 'abcdefg' b = 'abcd' then make a only a = 'abc'
mrsolo has quit [Quit: Leaving]
cocotton has joined #ruby
techsethi has quit [Quit: techsethi]
cocotton has quit [Remote host closed the connection]
<Y3K>
Any suggestion, I know that's pretty simple but indexing didn't work well for me.
ta has quit [Ping timeout: 246 seconds]
cocotton has joined #ruby
<jhass>
Y3K: a.size < b.size ? a : b
cndiv has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo_ has joined #ruby
<eam>
I think he wants common prefix
stunder has joined #ruby
maletor has quit [Ping timeout: 245 seconds]
<Hanmac>
eam hm that what i did thought but it doesnt look like it ...
x77686d has joined #ruby
<Y3K>
Uh? How can I explain myself... If string A has 6 chars length, and string B has 4, then make A have only 4 chars length, discarding the other 2
aspires has quit []
spyderman4g63 has quit [Ping timeout: 246 seconds]
<eam>
Hanmac: hm?
<Hanmac>
Y3K: yeah ok becuse in your sample a got shorted to 3 not 4 chars
<apeiros>
Y3K: that doesn't fit with your example
skolman_ has joined #ruby
<eam>
oh :)
mikecmpbll has quit [Ping timeout: 240 seconds]
<Y3K>
Oooooh!!!! I'm sorry
<Y3K>
Sorry, sorry, sorry :P
<Y3K>
Totes missed that.
nonks has joined #ruby
<apeiros>
Y3K: what jhass said
<Y3K>
It should also work the other way too, if A = 4 and B = 6 then make B = 4
<apeiros>
>> a = 'abcdefg' b = 'abcd'; x = a.size < b.size ? a : b; x
hamakn has quit [Remote host closed the connection]
nickjj has quit [Quit: WeeChat 1.0]
nonks has quit [Ping timeout: 255 seconds]
arya_ has quit [Ping timeout: 245 seconds]
boombadaroomba has joined #ruby
<Y3K>
Hanmac: that's... NEAT
boombadaroomba has quit [Remote host closed the connection]
* Y3K
stills amazed by Ruby magic powers
Stalkr_ has quit [Read error: Connection reset by peer]
Scotteh has joined #ruby
Stalkr_ has joined #ruby
mkaesz has quit [Remote host closed the connection]
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wjimenez5271 has joined #ruby
boombadaroomba has joined #ruby
<jhass>
I'd .map(&:size).min
nfk has quit [Quit: yawn]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
nfk has joined #ruby
cocotton has joined #ruby
chipotle has joined #ruby
<Y3K>
Hanmac: As I said I'm pretty rookie with Ruby. So I'll try to understand what you're doing there: First you create an array with both strings, then pick the lowest (min_by ?) by their &:size (< still have to learn tons about symbols yet), then reassign both strings to their original value slicing anything above the lower length.
krisquigley has quit [Remote host closed the connection]
krisquigley has joined #ruby
rkalfane has joined #ruby
t_mmyv has joined #ruby
cocotton has quit [Remote host closed the connection]
xymbol has joined #ruby
jobewan has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
tzero has joined #ruby
iamjarvo has joined #ruby
arya_ has joined #ruby
<Y3K>
Anyway, thank you so much for your help.
cocotton has quit [Remote host closed the connection]
<sterns>
Is this a good place to ask questions about nokogiri?
<epitron>
depends on the question homes
<epitron>
it's definitely a good place to ask questions about questions
<epitron>
(seriously though, ask away!)
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
allcentury has joined #ruby
cocotton has joined #ruby
mattmcclure has joined #ruby
davedev2_ has quit []
tier has quit [Ping timeout: 255 seconds]
ducklobster has quit [Ping timeout: 246 seconds]
IceDragon has quit [Ping timeout: 246 seconds]
Neozonz has joined #ruby
Neozonz has joined #ruby
paulfm has quit [Ping timeout: 240 seconds]
alex88 has quit [Quit: Leaving...]
justinmburrous has joined #ruby
shredding has joined #ruby
IceDragon has joined #ruby
Y3K has quit [Quit: Page closed]
Jackneill has quit [Read error: Connection reset by peer]
<__Grabarz__>
Moszna
arya_ has quit [Ping timeout: 240 seconds]
<__Grabarz__>
Kto jest z Polski?
<sterns>
Here's a line in my script: @thisjobxml = @jobsxml.at_xpath('//result[@jobkey="' + thisjob + '"]') ---- This functions very well, but I have performance concerns. I'm running this about 1000 times against an XML file with about 3000 nodes
ghostmoth has joined #ruby
cocotton_ has joined #ruby
cocotton_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<jhass>
/ can be slow, yeah
paulfm has joined #ruby
<epitron>
hmm
<sterns>
I assume that there is no index being utilized here, so is there a more efficient way to do this?
<jhass>
*//
<epitron>
maybe you should just walk the tree
<epitron>
jobsxml.children.each
<epitron>
:)
<epitron>
you can monkeypatch the nokogiri XML node class to add a recursive search feature
<jhass>
making // /root/node/foo/bar to at least a smaller subtree can be a great performance gain
jongilbraith has joined #ruby
Skeit has joined #ruby
Takle has quit [Remote host closed the connection]
shredding has quit [Client Quit]
jongilbraith has quit [Client Quit]
<epitron>
you can do 1 pass instead of 1000 passes
mikeg has joined #ruby
<sterns>
well, the parent of 'result' is root
<epitron>
or you could put all the results in a ruby hash with the key being the ID
<tzero>
does anyone know if awesome_print is abandoned? the issue tracker in GH would suggest so :(
renderful has quit [Remote host closed the connection]
<epitron>
tzero: nothing is abandoned, it's only neglected :)
<epitron>
or... obsoleted
<epitron>
the author is probably still alive
justinmburrous has quit [Ping timeout: 240 seconds]
mikeg has quit [Remote host closed the connection]
cocotton has quit [Ping timeout: 245 seconds]
<sterns>
epitron: does the ruby hash index its key?
<epitron>
hahah
<epitron>
yep
lampd1 has joined #ruby
<epitron>
the type of index? A HASH
<tzero>
it's such a nice gem for learning, but it doesn't have any responses for so long, despite commits on the author's account
<jhass>
kantakt: eh, a bit more than that I guess ;) so, yeah tryruby.org is good to get familiar with the base syntax. Then something like codeacademy seems popular
manzo has quit [Ping timeout: 260 seconds]
jbueza has joined #ruby
tylersmith has joined #ruby
arya_ has joined #ruby
<jhass>
kantakt: but I'd also suggest to as early as possible try to solve a problem you have with ruby, maybe redo one of the ones you already solved in php
<jhass>
kantakt: then post your solution here and ask for a review
Es0teric has joined #ruby
<jhass>
also ask all your questions here in the process
Xeago has quit [Ping timeout: 260 seconds]
musl has quit [Quit: WeeChat 0.4.3]
Skeit has quit [Ping timeout: 255 seconds]
mary5030 has quit [Remote host closed the connection]
Skeit_ has quit [Read error: Connection reset by peer]
timonv_ has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 240 seconds]
Skeit_ has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Eiam has joined #ruby
<apeiros>
epitron is korean?
icarus has joined #ruby
lkba has joined #ruby
spyderman4g63 has joined #ruby
jottr has joined #ruby
wjimenez_ has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sterns has quit [Read error: Connection reset by peer]
linojon has joined #ruby
<kantakt>
jhass: ok. I will do it!)
AlSquire has quit [Quit: This computer has gone to sleep]
robbyoconnor has joined #ruby
schaerli has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
nheinrich has joined #ruby
rshetty has joined #ruby
jottr_ has quit [Ping timeout: 255 seconds]
bayed has quit [Quit: Connection closed for inactivity]
wjimenez5271 has quit [Ping timeout: 260 seconds]
sterns has joined #ruby
gauke has joined #ruby
work_op has quit [Ping timeout: 258 seconds]
rdark has quit [Quit: leaving]
jY has joined #ruby
mercwithamouth has joined #ruby
<jY>
all.. i have a array that gets populated like hosts.push({'fqdn' => hostname, 'ip' => ip}) is there anyway to sort the array on fqdn.. or should i create it differently?
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Aaaal has quit [Quit: Aaaal]
Takle has joined #ruby
anaeem1 has joined #ruby
anaeem1 has quit [Read error: Connection reset by peer]
wallerdev has quit [Ping timeout: 240 seconds]
wallerdev_ is now known as wallerdev
doodlehaus has quit [Ping timeout: 246 seconds]
Takle has quit [Remote host closed the connection]
nanoyak has joined #ruby
gauke has quit [Ping timeout: 255 seconds]
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
unshadow has quit [Quit: leaving]
ta has joined #ruby
sklik has quit []
Hightower666 has joined #ruby
djbkd has joined #ruby
banister has joined #ruby
drewbug has quit [Quit: Leaving.]
drewbug has joined #ruby
c107 has joined #ruby
dg11 has joined #ruby
olivier_bK has joined #ruby
kaspertidemann has joined #ruby
Spami has quit [Ping timeout: 250 seconds]
mercwithamouth has quit [Ping timeout: 255 seconds]
djbkd has quit [Remote host closed the connection]
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
User4587_ has joined #ruby
kirun has joined #ruby
davispuh has joined #ruby
carraroj has joined #ruby
xorax_ has quit [Quit: leaving]
ArchBeOS has joined #ruby
xorax has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
<ArchBeOS>
hey guys, is it unconventional to name files _application.rb? I want to itterate through a bunch of files and requrie them, but I also need to make sure that this file is first...
User458764 has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
aspires has joined #ruby
Skeit__ has joined #ruby
djbkd has joined #ruby
aspires has quit [Client Quit]
alem0lars has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
Skeit___ has joined #ruby
tvw has quit []
Skeit_ has quit [Ping timeout: 255 seconds]
nonks has joined #ruby
<wallerdev>
yes thats unconvential
iamjarvo has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
Skeit____ has joined #ruby
Skeit___ has quit [Read error: Connection reset by peer]
<ArchBeOS>
How would I go about requiring these files? I have several classes inheriting from the base application class, but when I load the files they throw an error. admin.rb needs application.rb but when I use Dir to load them admin loads first
mary5030 has joined #ruby
einarj has joined #ruby
Skeit__ has quit [Ping timeout: 244 seconds]
coderdad_ has quit [Remote host closed the connection]
rubie has joined #ruby
aspires has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
coderdad has joined #ruby
Skeit_____ has joined #ruby
omosoj has joined #ruby
drewbug has quit [Quit: Leaving.]
wolves_cs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
aclearman037 has quit []
nonks has quit [Ping timeout: 255 seconds]
einarj has quit [Remote host closed the connection]
<dg11>
Not unconventional
<dg11>
More unconventional to name files with \* or \? in them
<dg11>
But I'm sure ruby requires the files in the order you specify them
adv_ has joined #ruby
Skeit____ has quit [Ping timeout: 260 seconds]
nanoyak has joined #ruby
<Sou|cutter>
how many files are we talking here? Just list them out in the order you want them
__main__ has quit [Ping timeout: 260 seconds]
<Sou|cutter>
if there's a really large number, make your own sort priority
Skeit______ has joined #ruby
coderdad has quit [Ping timeout: 272 seconds]
<ArchBeOS>
Sou|cutter: I dont have a large base, but I want to be able to throw in new controllers in Sinatra without having to worry about requiring them in some init file
timonv_ has joined #ruby
dx7 has quit [Remote host closed the connection]
omosoj has quit [Ping timeout: 255 seconds]
dx7 has joined #ruby
yfeldblum has joined #ruby
mrsolo has joined #ruby
Takle has joined #ruby
Skeit_____ has quit [Ping timeout: 272 seconds]
carraroj has quit [Ping timeout: 272 seconds]
Advocation has quit [Quit: Advocation]
<Sou|cutter>
ArchBeOS: Here's another idea - if admin.rb depends on application.rb, then have admin.rb require it
krisquigley has joined #ruby
<wallerdev>
ArchBeOS: you could do it like most gems do it
<Sou|cutter>
that way when admin.rb gets loaded first, it actually loads its own dependencies
<wallerdev>
you have a lib folder with your main file in it and a folder with the rest of the stuff
<wallerdev>
and your main file requires the rest of the stuff in the folder
jdj_dk has joined #ruby
brahmadpk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Skeit_______ has joined #ruby
ta has quit [Ping timeout: 272 seconds]
Skeit________ has joined #ruby
Skeit_______ has quit [Read error: Connection reset by peer]
Skeit______ has quit [Ping timeout: 255 seconds]
<wallerdev>
or just do it the rails way and autoload classes whenever you get an undefined constant error lol
timonv_ has quit [Ping timeout: 258 seconds]
Skeit_________ has joined #ruby
__Grabarz__ has left #ruby [#ruby]
ringarin has joined #ruby
coderdad has joined #ruby
krisquigley has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
justinmburrous has joined #ruby
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has joined #ruby
Skeit__________ has joined #ruby
gregf has quit [Quit: WeeChat 1.0.1]
drewbug has joined #ruby
Synthead has joined #ruby
Advocation has joined #ruby
ta has joined #ruby
Skeit________ has quit [Ping timeout: 240 seconds]
jcromartie has joined #ruby
mdarby has joined #ruby
manzo has joined #ruby
Skeit_________ has quit [Ping timeout: 260 seconds]
drewbug has left #ruby [#ruby]
justinmburrous has quit [Ping timeout: 245 seconds]
ggherdov has quit [Ping timeout: 260 seconds]
krisquigley has quit [Ping timeout: 240 seconds]
jimmyhoughjr has joined #ruby
BadQuanta has quit [Ping timeout: 272 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
paulfm has quit []
AlexRussia has joined #ruby
ec has quit [Ping timeout: 260 seconds]
Meeh has quit [Quit: No Ping reply in 180 seconds.]
brahmadpk has joined #ruby
himsin has quit [Quit: himsin]
Synthead has quit [Ping timeout: 255 seconds]
Haiiro_ has joined #ruby
Meeh has joined #ruby
ec has joined #ruby
naquad has quit [Ping timeout: 260 seconds]
Skeit___________ has joined #ruby
doodlehaus has joined #ruby
ghr has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
ki0 has joined #ruby
naquad has joined #ruby
Skeit__________ has quit [Ping timeout: 240 seconds]
jgt has joined #ruby
ggherdov has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
badhatter_ has quit [Read error: Connection reset by peer]
Guest67197 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ionelmc is now known as ionelmc-not-here
manzo has quit [Remote host closed the connection]
neoxquick has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
paulfm has joined #ruby
Lucky___ has joined #ruby
skolman_ has quit [Remote host closed the connection]
cocotton has quit [Quit: Leaving...]
skolman_ has joined #ruby
Lucky___ has quit [Client Quit]
ionelmc-not-here is now known as ionelmc
twohlix has joined #ruby
badhatter has joined #ruby
yetanotherdave has joined #ruby
manzo has joined #ruby
chrishough has joined #ruby
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby
Eiam has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
Advocation has quit [Quit: Advocation]
i_s has joined #ruby
allcentu1 has joined #ruby
elaptics is now known as elaptics`away
allcentury has quit [Read error: Connection reset by peer]
Synthead has joined #ruby
Lucky___ has joined #ruby
altamic has joined #ruby
Kruppe has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
olivier_bK has quit [Ping timeout: 260 seconds]
altamic has quit [Client Quit]
timonv_ has joined #ruby
altamic has joined #ruby
JoeGaudet has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
skolman_ has quit [Remote host closed the connection]
Neozonz has quit [Ping timeout: 246 seconds]
skolman_ has joined #ruby
tfitts has joined #ruby
alem0lars has quit [Quit: alem0lars]
<tfitts>
Is there an easy way to parse MM/DD/YYYY H:MM:SS AM to datetime? My google skills are failing me.
mdarby has quit [Remote host closed the connection]
mdarby has joined #ruby
mark06 has joined #ruby
<mark06>
nevermind, another quesiton:
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mark06>
let's say I create a debian package (it's actually an msys2 package) for a ruby library I wrote
<mark06>
I want to add its location to requires's path, how can I do that?
agjacome has joined #ruby
<eam>
why not fix the package to match the load path of the ruby it's packaged for?
jbueza has joined #ruby
Photism has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
jottr has joined #ruby
<eam>
$: is where ruby will look for files
<mark06>
e.g. it's installed to /usr/bin/easyoptions.rb, how can I have the package making ruby know where it is so that require "easyoptions" work?
pskosinski_ has joined #ruby
<mark06>
eam: it's not packaged "for ruby"
<mark06>
it's not a gem (yet)
<eam>
I beg to differ. ruby modules are packaged for a particular ruby runtime (regardless of packaging format)
<eam>
it shouldn't be in /usr/bin
claymore has quit [Ping timeout: 250 seconds]
lampd1_ has joined #ruby
<mark06>
where then?
monkeypatch has joined #ruby
<mark06>
do you know arch linux?
Neozonz has quit [Ping timeout: 260 seconds]
<eam>
mark06: $LOAD_PATH is where ruby will look for modules
fabrice31 has quit [Remote host closed the connection]
<mark06>
so permanently appending /usr/bin to the $LOAD_PATH environment variable is the recommended way?
ramfjord has quit [Ping timeout: 258 seconds]
jgt has quit [Ping timeout: 240 seconds]
<eam>
nope
<eam>
and that's not an environment variable
benzrf|offline is now known as benzrf
pskosinski has quit [Ping timeout: 260 seconds]
emmesswhy has joined #ruby
<eam>
RUBYLIB is an env var which will be prepended to $LOAD_PATH (the ruby global)
<mark06>
then where instead of /usr/bin? you didn't answer... it needs to be in path so easyoptions (a Bash script) can find it
<eam>
mark06: I did answer. In $LOAD_PATH
jottr has quit [Ping timeout: 244 seconds]
<mark06>
$LOAD_PATH is not a directory, therefore I don't understand how's that an alternative location than /usr/bin
<eam>
it is an array of directories
claymore has joined #ruby
<apeiros>
eh?
<eam>
ruby -e'puts $LOAD_PATH'
<apeiros>
/usr/bin implies it's an executable, not a library
yfeldblum has joined #ruby
<apeiros>
and $LOAD_PATH/require are about libraries
thagomizer has quit [Quit: Leaving.]
User4587_ has joined #ruby
<eam>
I get the feeling it's both
<mark06>
which is still not a directory, and you probably mean a ruby global array.... therefore it has nothing to do with package installation (debian/arch/msys2/whatever as I said)
ghr has joined #ruby
Advocation has joined #ruby
lampd1_ has quit [Ping timeout: 260 seconds]
<eam>
mark06: you don't understand how packaging works
wallerdev has quit [Quit: wallerdev]
<eam>
when a ruby interpreter is packaged for the distro, $LOAD_PATH is set at compile time for the ruby interpreter
badhatter has quit [Read error: Connection reset by peer]
<mark06>
apeiros: as I explained above, it is an executable since easyoptions (a Bash script) uses it...
yfeldblu_ has joined #ruby
<eam>
you must place related modules in one of those paths
<mark06>
apeiros: it can also be required from ruby scripts
<eam>
that is how ruby (and python, and perl, and most other common environments) work
yfeldblum has quit [Remote host closed the connection]
IcyDragon has joined #ruby
<eam>
mark06: you probably want to package it in two locations, or symlink
Synthead has joined #ruby
User458764 has quit [Ping timeout: 260 seconds]
<mark06>
eam: so your answer is: I need to find the $LOAD_PATH for the ruby package and install easyoptions.rb to there instead?
gauke has joined #ruby
IceDragon has quit [Ping timeout: 245 seconds]
<eam>
yes
<mark06>
eam: symlink is not possible
<eam>
because windows? sure, a copy will do as well
<mark06>
I need to figure out a way to handle this....
<mark06>
copy.... looks like the only way.... or maybe easyoptions (bash script) can look for easyoptions.rb directly where it's located
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghr has quit [Ping timeout: 255 seconds]
badhatter has joined #ruby
<eam>
mark06: the shim approach is what gem itself does
Soda has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
codecop has quit [Ping timeout: 260 seconds]
<eam>
mark06: generally, when you use the module packaging stuff for a platform (be it ruby, perl, etc) it will handle placing the file into the load path for you
<eam>
you can manually replicate this, of course
ghostmoth has quit [Quit: ghostmoth]
sevvie has joined #ruby
JohnBat26 has joined #ruby
klmlfl_ has joined #ruby
<mark06>
eam: msys2 guys said they don't set $LOAD_PATH when compiling ruby :-/ no idea what I should do now
Leftbrained has joined #ruby
<eam>
mark06: they are confused
benzrf is now known as benzrf|offline
<eam>
it is set
<eam>
you cannot invoke ruby without it
<eam>
again, it's a ruby constant -- it is not part of the environment
<eam>
I'd go with /usr/lib/ruby/vendor_ruby if the script is generic and not particularly tied to the interpreter version
<evlute>
hi, using ruby/sinatra in vim - asking myself how to add code completion for html in a ruby file, because i have both in my sinatra.rb project
<eam>
the version and architecture specific directories are intended for modules which only work on those specific platforms
<mark06>
what's the diff between site_ruby and vendor_ruby?
endash has quit [Quit: endash]
User4587_ has quit [Ping timeout: 272 seconds]
<eam>
vendor specific vs site specific
<eam>
it doesn't really matter
<mark06>
the script probably requires a minimum ruby version (can't recall, 1.9 or 2.0 maybe)... does that classify as "tied"?
jcromartie has joined #ruby
robbyoconnor has joined #ruby
<mark06>
maybe it's because of my english..... sell vs. place? I don't get it
<eam>
not really. in large part these distinctions are made obsolete by packaging systems
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
<eam>
you can put it in a versioned directory if you like
<eam>
ideally your module package will depend on the particular ruby package it's intended to be used with
mistermocha has quit [Remote host closed the connection]
<eam>
if you were managing a system in the dark ages of the mid 90's you might compile by hand on the machine and care where the output resides
schaerli has joined #ruby
codecop has joined #ruby
Hightower666 has quit [Ping timeout: 255 seconds]
timonv_ has quit [Remote host closed the connection]
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<mark06>
can I use /usr/lib/ruby/vendor_ruby as a universal location most ruby implementations will find modules?
<apeiros>
no
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<apeiros>
you can't and should not rely on hard coded paths
<apeiros>
that does not just apply to ruby
<mark06>
this is a bash script
drago777 has quit [Ping timeout: 258 seconds]
fumk has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
IcyDragon is now known as IceDragon
<apeiros>
*sob*
benzrf|offline is now known as benzrf
<mark06>
the manual installation script which installs to /usr/local... but because of this, no it's not good to install unmanaged files.... that's a job for the package
<apeiros>
do what you want. the answer to your question is still no.
omosoj has joined #ruby
phutchins has quit [Ping timeout: 258 seconds]
<mark06>
you weren't needed to say anything anymore
justin_pdx has joined #ruby
Pupeno_ has joined #ruby
mxrguspxrt has joined #ruby
<apeiros>
I think I remember why you're on my list of people to ignore.
aspires has quit []
emmesswhy has quit [Quit: This computer has gone to sleep]
iceden has quit [Remote host closed the connection]
Pupeno has quit [Read error: Connection reset by peer]
<mark06>
I'm sorry, I don't understand
badhatter_ has joined #ruby
emmesswhy has joined #ruby
User458764 has joined #ruby
nonks has joined #ruby
Xeago has joined #ruby
ghostmoth has joined #ruby
mikey26 has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
klmlfl_ has quit [Remote host closed the connection]
badhatter has quit [Ping timeout: 265 seconds]
klmlfl has joined #ruby
pskosinski_ is now known as pskosinski
mxrguspxrt has joined #ruby
User4587_ has quit [Ping timeout: 260 seconds]
Wolland has quit [Remote host closed the connection]
jacobat has quit [Read error: No route to host]
nanoyak has joined #ruby
Wolland has joined #ruby
Advocation has quit [Quit: Advocation]
djstorm has joined #ruby
gvenkat has quit [Quit: Leaving]
schaerli has quit [Remote host closed the connection]
hellangel7 has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
noop has quit [Ping timeout: 260 seconds]
Scotteh_ has joined #ruby
tier_ has joined #ruby
JoeGaudet has quit [Quit: Computer has gone to sleep.]
Takle has quit [Remote host closed the connection]
mxrguspxrt has quit [Remote host closed the connection]
<lfox>
Say I have a UTF-32 encoding string (like this one "\uD83D\uDD0E") and I'd like to turn it into standard printable ascii/utf8 by escaping the the backslashes. So I end up with this string "\\uD83D\\uDD0E". Is there a way to do this that doesn't involve `.inspect.tr('\\"', '')`?
<wasamasa>
not good I guess
<mark06>
teach me japanese instead :)
<wasamasa>
heaven forbid
<mark06>
why do they
<wasamasa>
they don't
<wasamasa>
:<
<mark06>
:P
<mark06>
do you know evangeliopn
User458764 has quit [Ping timeout: 255 seconds]
<mark06>
*evangelion
P1RATEZ has joined #ruby
qmfnp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
lfox: .inspect[1..-2] ? :)
Advocation has joined #ruby
<apeiros>
not sure what you aim for, though
<wasamasa>
mark06: I do know about neon genesis evangelion, yes
<Ulrike_Rayne>
That show was crazy
djbkd has quit [Remote host closed the connection]
Advocation has quit [Client Quit]
monkeypatch has joined #ruby
<wasamasa>
I've only liked the two older movies though
i_s has joined #ruby
* apeiros
liked the series, except the two or three last episodes
<wasamasa>
the tv show was silly at the first half and felt pretty forced in the second one
<wasamasa>
the new movies were more of advertisement for the wonders of CGI
<wasamasa>
the first old movie was a nice and sweet recap of most of the series, the second one a proper ending
monkeypatch has quit [Client Quit]
drago777 has joined #ruby
tier_ has quit [Remote host closed the connection]
<mark06>
wasamasa: you like looking down at other's english skills?
evlute has quit [Quit: WeeChat 1.0.1]
wjimenez_ has joined #ruby
<mark06>
it was pretty random
tier has joined #ruby
<wasamasa>
it's less about me making fun of them and more about you making little sense
<wasamasa>
I mean, what the hell does your last sentence even have to do with the one before?
<mark06>
wasamasa: it was pretty random
<mark06>
wasamasa: is this bad english?
<wasamasa>
more like, non-sequitur english
rikai has joined #ruby
maasha has joined #ruby
<mark06>
wasamasa: whatever
x77686d has quit [Quit: x77686d]
Takle has joined #ruby
Eiam has joined #ruby
spyderma_ has joined #ruby
monkeypatch has joined #ruby
wjimenez5271 has quit [Ping timeout: 246 seconds]
spyderman4g63 has quit [Ping timeout: 258 seconds]
<wasamasa>
shevy: the one in the new movies was actually watchable
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
* mark06
wonders if the code shown running at AAA Wunder's piloting room is ruby
<wasamasa>
shevy: instead of being somewhere between crap and somewhere in the uncanny valley
<shevy>
well I saw The Hobbit... blabla smeagol's penis or something lately
<wasamasa>
wat
<shevy>
the dragon was ok
drkyro has joined #ruby
<drkyro>
hello everyone
<shevy>
the orcs were awful, especially in several heavy CGI animated scenes. surfing on an orc wtf, that looked like shit
<maasha>
Efficient way to select from an array the elements specified in another array of indexes? [1, 2, 3, 4, 5, 6].magicmethod([2, 1, 4]) => [3, 2, 4]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
<shevy>
the height-trick is pretty cool though
<maasha>
?
<mark06>
shevy: I tried but never liked lord of the rings and related... I just liked a bit The Silmarillion (is that the right spelling?)
<shevy>
the dwarves really appear smaller
<mark06>
shevy: I find it boring, empty and meaningless....
<shevy>
mark06 yeah I can understand that... I hated the old hobbits in the movie... they hopped around in the bed like little gaylings
<apeiros>
maasha: values_at
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
User4587_ has quit [Ping timeout: 260 seconds]
<maasha>
apeiros: thats the one - I had forgotten
RaCx has joined #ruby
<drkyro>
in ruby how do i do 407.78 + 5%
ghr has joined #ruby
<shevy>
I remember when in terminator T2, the cgi was praised as being expensive and cool (but mostly just expensive haha). I feel since then not much has progressed, CGI in 90% of the times likes so surreal (in "real movies"; in completely computer animated movies like toy story, it can be ok) and it's a disgrace to the computer guys who generate those effects
<shevy>
drkyro what is that even man
<drkyro>
shevy i have a number that i need to add 5% to it
<mark06>
shevy: it's not whether there are gay-ish stuff that bothers me... just that I feel like it's a really empty story.... it doesn't communicate anything to me.... but it's still considered not just good, but awesome and one of the biggest blah blah... that's what surprises me
<shevy>
coming going coming going
boombadaroomba has quit [Remote host closed the connection]
<atmosx>
shevy: In CZ, you can come visit actually. Since we're not gonna be close anymore we might catch up, I'll pay dinner.
<atmosx>
anyway
<shevy>
mark06 yeah, I am also unsure why it is highly praised
Leftbrained has left #ruby [#ruby]
<atmosx>
Does anyone have experience with web-apps that have support for plugins?
<drkyro>
thank you shevy
<atmosx>
the ones that the use 'click' like wordpress and the plugin gets installed.
<shevy>
atmosx if I have time! right now I have had so little time that I could not even continue with some ruby related projects, the rewrite of my cookbooks project is still unfinished ... :(
<atmosx>
is there any way for me to approach this using sinatra?
aspires has joined #ruby
<atmosx>
shevy: ooh poor shevy !
<mark06>
shevy: yeah I miss the old CGI... way better.... nowadays it's just like a video game, not like a real thing.... and they win oscar awards....
<shevy>
mark06 yeah!
<mark06>
shevy: I'm a big fan of well done visual effects....
gauke has quit [Quit: gauke]
brandonshowers has joined #ruby
drago777 has quit [Read error: Connection reset by peer]
ixti has joined #ruby
<shevy>
mark06 actually now there are movie games with better CGIs than some of those movies hehehe
qmfnp has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
RaCx_ has joined #ruby
RaCx has quit [Read error: Connection reset by peer]
RaCx_ is now known as RaCx
klaut has joined #ruby
Advocation has joined #ruby
JoshGlzBrk has joined #ruby
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
now their english is awful, but they are creative and skillful people
<shevy>
that audio ... that is some german opera thingy right?
mistermocha has joined #ruby
<wasamasa>
mhh
<shevy>
"Ode an die Freude" or something like that
<maasha>
... creating many bizarre tv-shows
<wasamasa>
maasha: I wish they'd create more
<shevy>
yeah maasha ... I love japanese pranks... except for those were people think they are gonna die
alvaro_o has joined #ruby
<wasamasa>
maasha: most of the stuff people end up recommending me is rather generic
fumk has joined #ruby
<shevy>
*where
fumk has quit [Max SendQ exceeded]
<maasha>
silent library
<wasamasa>
maasha: which is sad because I'm a sucker for the creative and whacky ones
<maasha>
wasabi nose - gets me every time
<shevy>
wasabi
<shevy>
that is the green thing?
<wasamasa>
spicy stuff
schaerli has quit [Remote host closed the connection]
fumk has joined #ruby
<shevy>
hmm
fumk has quit [Max SendQ exceeded]
<shevy>
wasamasa that ship in the clip... I'd love to use ruby to generate such 3D models
skolman_ has quit [Remote host closed the connection]
<wasamasa>
shevy: good luck with that
skolman_ has joined #ruby
<shevy>
hehe
JBreit has joined #ruby
<wasamasa>
shevy: I have to admit I found the movie visually entertaining, but I don't really look forward to the final one in the remake series
<mark06>
shevy: the music in the making-of of eva 3.33 is beethoven's 4th movement from 9th symphony
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
sysTemz- has joined #ruby
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
Es0teric has joined #ruby
<shevy>
wasamasa I think those anime things are artful, I watched Animatrix... ghost in the shell or what was its name, and some other bizarre thing... but I am not a fan of these at all, they all look the same and the storyline is often just flat out boring
<shevy>
mark06 aha let me listen to that
<wasamasa>
shevy: which is why I pretty much enjoy the weird ones
<wasamasa>
shevy: you know, the kind where the protagonist gets run over by a vespa driving alien just to receive an e-guitar to his head
<wasamasa>
shevy: which then allows him to sprout robots coming from another dimension from his head
<shevy>
I guess I mixed it up with Wagner
<mark06>
wasamasa: you should teach me japanese so the confusion related to translation is gone and I can not understand evangelion less... teach me now
<shevy>
wasamasa you mean anime still?
<wasamasa>
shevy: yes
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
djbkd has joined #ruby
<shevy>
a friend of mine studied industrial design, he was anime nuts... I never understood why. I still don't understand either :)
<wasamasa>
mark06: I do not speak any japanese
kobain has quit [Read error: Connection timed out]
<shevy>
wasamasa I am sure you can count up to ten!
<wasamasa>
mark06: I'm just interested in some japanese works
qmfnp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* mark06
watched anno's school lesson yesterday
<shevy>
ichi ni san yon go shichi ... and ... I forgot the rest
<wasamasa>
shevy: right, but just because my karate trainer insisted on that
<mark06>
wasamasa: why is your nick wasamasa
<shevy>
haha yeah, we had to learn from 1 to 20 in korean language for taekwondo
<wasamasa>
mark06: my nick IRL is wasa and someone turned it into wasamasa
omosoj_ has joined #ruby
BadQuanta has joined #ruby
<wasamasa>
mark06: so I stuck with that, unique enough for github and such
<mark06>
shevy: did you watch eva
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
kobain has joined #ruby
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
<wasamasa>
shevy: however I cannot recall all of them ._.
<mark06>
wasamasa: I can speak about evangelion for hours... but just one thing... I strongly miss the old design of the evas.... much better in the past... in rebuild, mainly the evas are badly designed but the whole thing looks home made sometimes....
<shevy>
mark06 nope
schaerli has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
<mark06>
wasamasa: I think in some parts rebuild is prettier but in some parts old drawing was
<shevy>
the last anime I watched... was where some high tech city got attacked by some uber huge mech thingy... and the cops had some hovering exosuits or something...
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x77686d has joined #ruby
fumk has joined #ruby
_djbkd has joined #ruby
fumk has quit [Max SendQ exceeded]
djbkd has quit [Ping timeout: 250 seconds]
kirun has quit [Quit: Client exiting]
Soda has quit [Remote host closed the connection]
omosoj has quit [Ping timeout: 255 seconds]
aspires has quit []
<mark06>
shevy: I wait for an eva movie since 2003 or so :-/ I'm so afraid of the visual effects :-/
Advocation has quit [Quit: Advocation]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
RaCx has joined #ruby
schaerli has quit [Remote host closed the connection]
treehug88 has joined #ruby
nheinrich has quit [Ping timeout: 244 seconds]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
treehug8_ has quit [Ping timeout: 245 seconds]
Xiti` has joined #ruby
Xiti` has quit [Changing host]
Xiti` has joined #ruby
boombadaroomba has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
Lewix has joined #ruby
<mostlybadfly>
shevy: bokurano?
Xiti` has quit [Client Quit]
fumk has joined #ruby
mikey26 has quit [Quit: Ik ga weg]
RaCx has quit [Read error: Connection reset by peer]
qmfnp has joined #ruby
Xiti has quit [Ping timeout: 272 seconds]
JBreit has left #ruby ["Leaving"]
adamnbowen has joined #ruby
havenwood has joined #ruby
almostworking has joined #ruby
mekhami has quit [Quit: Leaving]
almostworking has left #ruby [#ruby]
Lewix has quit [Remote host closed the connection]
<sanguisdex>
it was recommended to me when I started developing in rails to use dotenv to preset variables for an app, it it seem to me that a yaml file would be better suited, when developing a gem that will be used by different users across a system. Anybody have an opinion eiather way that they want to sway me with?
havenwood has joined #ruby
<sterns>
banister: thank you, I'll try that
tier_ has quit [Remote host closed the connection]
charliesome has quit [Client Quit]
tier has quit [Ping timeout: 240 seconds]
tier has joined #ruby
renderful has joined #ruby
charliesome has joined #ruby
mistermocha has quit [Remote host closed the connection]
Wolland has quit [Ping timeout: 265 seconds]
charliesome has quit [Client Quit]
<waxjar>
sanguisdex: .env files can be written with export in front of the variables, so you can source them in a shell too
<atmosx>
hm
tier has quit [Remote host closed the connection]
ghostmoth has quit [Read error: Connection reset by peer]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<waxjar>
dotenv also includes a executable which sets the environment variables up, so you can do dotenv python i_wrote_this_in_python.py
renderful has quit [Ping timeout: 260 seconds]
max96at is now known as max96at|off
nanoyak has joined #ruby
slash_ni1k is now known as slash_nick
slash_nick has quit [Changing host]
slash_nick has joined #ruby
neoxquick has joined #ruby
_djbkd has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
skolman_ has quit [Remote host closed the connection]
stunder has quit [Quit: Screw you guys I'm going home]
skolman_ has joined #ruby
cicloid is now known as aCicloid
kies has quit [Quit: baaaaiiiiiiiiiii~]
ad_boot has quit [Quit: ad_boot]
ki0 has quit [Remote host closed the connection]
goodenough has joined #ruby
justinmburrous has joined #ruby
ylluminate has quit [Ping timeout: 245 seconds]
MCDev has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: i've nodded off.]
chrisseaton has joined #ruby
MCDev has joined #ruby
<chrisseaton>
Hi - I'm having trouble with String#gsub. I want to do a simple replacement, but it seems to be maybe interpreting my string as regex back references. "foobarbaz".gsub("bar", "boo\\'sbob") => "fooboobazsbobbaz" - where has my \' gone in that?
lampd1_ has joined #ruby
justinmburrous has quit [Ping timeout: 260 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
<chrisseaton>
volty: ok, but again this string comes from a file, so to add extra backslashes as you have I need to call some routine
lmickh has quit [Remote host closed the connection]
devdazed has joined #ruby
jdj_dk has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
dorei has joined #ruby
andrewlio has quit [Quit: Leaving.]
<dorei>
hello, is there some way to print/puts 10000 as 10_000 ?
klmlfl has quit [Remote host closed the connection]
tbrock has joined #ruby
afhammad has quit []
fartface has joined #ruby
<fartface>
Hey is there a way to chain arguments for "delete_if" on an array? Like, if I had an array of strings, can I pass an array of possibilities to delete out of the initial array?
brandonshowers has joined #ruby
<toretore>
fartface: ||
zorak8 has quit [Ping timeout: 250 seconds]
<toretore>
chrisseaton: yeah, Regexp.quote won't work
<eam>
>> 100000000.to_s.reverse.gsub(/\d\d\d(?=\d)/) {|m| m + ?_}.reverse