banisterfiend` has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
alexim has quit [Quit: bye]
Bosox20051 has joined #ruby
Bosox20051 has joined #ruby
Bosox20051 has quit [Changing host]
* atmosx
is listening to Led Zeppelin - How Many More Times, from the album Greatest Hits Disc 1 [8:27 mins] [320 kbps MPEG audio file] [19.48 MB] [played 0 times]
kenichi has quit [Remote host closed the connection]
<davidcelis>
cool story bro
mikepack has quit [Remote host closed the connection]
kalleth has joined #ruby
Spooner has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
idoru has joined #ruby
Banistergalaxy has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
freeayu has joined #ruby
benson has quit [Quit: Leaving]
khakimov has quit [Quit: Computer has gone to sleep.]
maxmmurphy has quit [Quit: maxmmurphy]
freeayu has quit [Ping timeout: 240 seconds]
voodoofish4301 has joined #ruby
liluo has quit [Remote host closed the connection]
<shevy>
davidcelis hehehe
ringotwo has quit [Remote host closed the connection]
voodoofish430 has quit [Ping timeout: 256 seconds]
MasterIdler has joined #ruby
NimeshNeema has quit [Excess Flood]
pskosinski has joined #ruby
NimeshNeema has joined #ruby
<atmosx>
agreed
* atmosx
is listening to Led Zeppelin - Ramble On, from the album Greatest Hits Disc 1 [4:20 mins] [320 kbps MPEG audio file] [10.02 MB] [played 0 times]
<atmosx>
rable on, sing my song… (as Frodo and Sam are getting through the misty mountain hoop!)
freeayu has joined #ruby
voodoofish4301 is now known as voodoofish430
resure has joined #ruby
drago757 has joined #ruby
gen0cide_ has quit [Quit: ["rm -rf $ME"]]
resure has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 240 seconds]
mrsolo has quit [Quit: Leaving]
Banistergalaxy has joined #ruby
havenn has joined #ruby
opus has quit [Ping timeout: 252 seconds]
mike4_ has quit [Quit: bbl]
tommyvyo has quit [Quit: Computer has gone to sleep.]
piotrj has joined #ruby
awarner has joined #ruby
opus has joined #ruby
elaptics is now known as elaptics`away
fmcgeough has quit [Quit: fmcgeough]
Aenigma has quit [Ping timeout: 245 seconds]
savage- has quit [Remote host closed the connection]
<atmosx>
no it's everyting in one file, I'm adding RSS support and I'm creating a /lib directory which will contain all classes-files in a structured way
<atmosx>
s/no/now
tehgeekmeister has quit [Remote host closed the connection]
<atmosx>
what are you up to shevy ?
Hawklord has quit [Ping timeout: 276 seconds]
t47000 has quit [Remote host closed the connection]
tommyvyo_ has joined #ruby
<shevy>
atmosx hmm not much. mostly just maintaining an improving my main projects. finished working on my shell for a few days, now I will work a bit on ruby-pipes, then ruby compile scripts
t47777 has joined #ruby
<shevy>
*and
tommyvyo has quit [Ping timeout: 244 seconds]
v0n has joined #ruby
<atmosx>
on your shell? hmm zsh?
adamkittelson has quit [Remote host closed the connection]
_Vile has joined #ruby
<_Vile>
ping
iamjarvo has joined #ruby
<atmosx>
when I finnish morula, I'll go with moralytics, a tool for analyzing data gathered from morula. Now I'm adjusting support for SQLite3 and I'll add support for MongoDB.
<atmosx>
I'd like to try Redis also but I have no available machine with at least 2 GB of ram
<atmosx>
except from my laptop which is not targeted for this kind of shit heh
<_Vile>
even though she's a file system local only db lib
rump has quit [Quit: rump]
<_Vile>
she works
<_Vile>
never heard of or seen anything about mongodb
robbyoconnor has quit [Ping timeout: 276 seconds]
davidcelis has quit [Quit: K-Lined.]
pu22l3r has joined #ruby
robbyoconnor has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
graft has quit [Ping timeout: 268 seconds]
Aenigma has quit [Ping timeout: 245 seconds]
havenn has joined #ruby
freeayu__ has joined #ruby
MasterIdler_ has joined #ruby
banisterfiend has joined #ruby
MasterIdler_ has quit [Client Quit]
havenn has quit [Remote host closed the connection]
freeayu has quit [Ping timeout: 252 seconds]
MasterIdler has quit [Ping timeout: 252 seconds]
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
<atmosx>
_Vile: I'm not good with computers, programming, etc. I've read a lot of articles on NoSQL database and I think it fits the cause. If you need to 'monitor' a couple of users, even 50 SQLite3 is cool. If I need to monitor a hashtag or tweets comming from a country along with the country's blog's RSS planet/feed dump… well MongoDB it's way better
<atmosx>
The syntax from what I've read, it's easier compared to SQL
liluo has joined #ruby
TorpedoSkyline has joined #ruby
<atmosx>
it's a popular database in the ruby community that's why I chose it… the other reason is that as said before I don't have a server available with 2 GB of RAM to try Redis
<Paradox>
redis isnt a database
<atmosx>
MongoDB uses available RAM apparently and it's happy with whatever it gets
<Paradox>
i wish they would stop claiming it is
<Paradox>
redis is an in-memory key-value store
<Paradox>
basically an ultra-fancy hash
seanstickle has quit [Quit: seanstickle]
<Paradox>
with sharding as its "saving" mechanism
TheLZA has joined #ruby
<Paradox>
also, postgress is a good SQL database
<atmosx>
Paradox: ah, now makes more sense what I've read
<Paradox>
far better than MySQL
<atmosx>
I use SQLite3 not post/my
bbloom has joined #ruby
<ggreer>
sqlite3 solves a different problem than postgres or mysql
<atmosx>
well it's simple and portable
<ggreer>
they're both good tools, but for different jobs
<atmosx>
and doesn't need installations, etc.
<ggreer>
yeah
<atmosx>
is there any alternative NoSQL db to mongodb which I could consider?
<atmosx>
since I didn't wrote the driver yet
<ggreer>
cassandra?
<atmosx>
ah I'll take a look
<ggreer>
I use cassandra at work and it's pretty cool, once you know the caveats
<atmosx>
apache?
<atmosx>
hah Twitter users cassandra
n_blownapart has joined #ruby
<ggreer>
mostly it's just caveats that come with sstables. (basically, deleting stuff is tricky)
Araxia has quit [Quit: Araxia]
<ggreer>
really though, it's probably fine to start with sqlite, then move up to mysql or postgres, then one day you might actually get tons of usage
<ggreer>
and you can use cassandra at that point
Aenigma has joined #ruby
<n_blownapart>
hi my textbook leapt from a short snippet of a method_missing example and now it's this example. Although I understand much of what this is doing, I don't know how to comprehend a program like this in full. I thought I was buying a beginning programming book. thanks: http://pastie.org/4469894
vlad_starkov has quit [Remote host closed the connection]
awarner has quit [Remote host closed the connection]
rails has quit [Changing host]
rails has joined #ruby
beakerma_ has quit [Ping timeout: 276 seconds]
<n_blownapart>
^^ I don't have a background in programming, except for some ruby I was teaching myself last year.
iamjarvo has quit [Quit: Computer has gone to sleep.]
brasten has quit [Read error: Connection reset by peer]
<n_blownapart>
^^ where does an experienced programmer start reading this sort of prog? or is it just a matter of a glance?
<Paradox>
cassandra is basically distributed postgress
fearoffish has joined #ruby
<atmosx>
n_blownapart: that's a code snippet that creates a mathod
<banisterfiend>
n_blownapart: 1. get a github account 2. start using gist :P
<atmosx>
method
brasten has joined #ruby
<atmosx>
banisterfiend: he is using TextMate probably
emmanuelux has quit [Ping timeout: 272 seconds]
codeFiend has quit [Ping timeout: 246 seconds]
<atmosx>
n_blownapart: that's code for 'average' programmer imho. Not novice.
iori has joined #ruby
<atmosx>
n_blownapart: what's your problem anyway?
<atmosx>
ggreer: so you say, that even if I store large chunks of 'text' like, tweets and/or blog posts in my DB I should go with MySQL ?
<atmosx>
ggreer: instead of Mongo?
<n_blownapart>
atmosx: the problem is that all these books go from decent definitions and explanations, and then suddenly put it all together (and then some) in a prog. like this. its frustrating.
<n_blownapart>
I can very vaguely follow what is happening. atmosx
mikepack has quit [Remote host closed the connection]
<atmosx>
n_blownapart: I like my novice book
<n_blownapart>
atmosx: I sit and stare and get a headache. what book is that?
<atmosx>
"Beginning Ruby" by Peter Cooper
<atmosx>
it's decent
haxrbyte_ has joined #ruby
<atmosx>
I had no trouble getting through it… I never get after chapter 6 though, I began writing the staff I wanted and use it along with the pickaxe ase a manual when I can't find online the info I need or I need a 'general view' over, say 'Test Driven development' ...
<n_blownapart>
I'm using well Grounded Rubyist. I went through maybe half of the Cooper book last year.
<atmosx>
n_blownapart: and u didn't like it probably
Eplemosen has quit [Quit: NOPE]
savage- has joined #ruby
<atmosx>
n_blownapart: books aside, the more code you write, the more problems you'll be forced to solve, etc.
<n_blownapart>
atmosx: ^^ yeah but I'm not a programmer. sooner or later the books assume you know the larger context, or that you've taken a programming class in another language at some point.
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-dev)]
<atmosx>
there are many concepts I'm not able to grasp yet
<ggreer>
atmosx: I figure, plan for 10x growth, not 100x. I don't think people can accurately predict their bottlenecks at 100x greater scale
<atmosx>
well.. I don't have programmer background :-) … I just have a UNIX background
<n_blownapart>
atmosx: good advice. I am nowhere near the position in which I would "be forced" to write something.
<atmosx>
n_blownapart: imho it's better for you to start a project that you like, and learn by doing/having fun doing it
haxrbyte has quit [Ping timeout: 276 seconds]
<atmosx>
at some you'll start looking at other peoples code (at least that's what I do) and try to understand why are the using a different approach to solve the same problem
<atmosx>
etc.
<ggreer>
basically, use whatever data store you know best right now
<ggreer>
you can change it when you get closer to scaling issues
<n_blownapart>
atmosx: aside from the books and this chatroom, I don't have much to go on. but thanks. any comments on the pastie? is it even right? http://pastie.org/4469894
<atmosx>
n_blownapart: ruby mailing list is my first choice when I have a specific problem, this chatroom is mostly for fun :-)
<atmosx>
n_blownapart: stackoverflow my second choice, awesome code snippets there
mfridh has quit [Ping timeout: 268 seconds]
<atmosx>
n_blownapart: I understand what your code should do, but since it's late I wont even try to run it :-P
ckrailo has quit [Quit: Computer has gone to sleep.]
codeFiend has joined #ruby
baroquebobcat has joined #ruby
n_blownapart has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
n_blownapart has joined #ruby
tk___ has joined #ruby
davidcelis has joined #ruby
davidcelis has joined #ruby
davidcelis has quit [Changing host]
cakehero has joined #ruby
adeponte has quit [Remote host closed the connection]
zmisc has joined #ruby
havenn has joined #ruby
Guedes has quit [Quit: Saindo]
indian has joined #ruby
pencilcheck has joined #ruby
zmisc has quit [Quit: WeeChat 0.3.7]
havenn has quit [Ping timeout: 245 seconds]
n_blownapart has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
as has joined #ruby
ukd1 has joined #ruby
MrWGW has quit [Ping timeout: 252 seconds]
<ukd1>
hey guys, does anyone know what the equivelent of $$ in PHP is in Ruby? I'd like to call a function by the name stored in a variable. I.e. ['puts', 'print'].each {|fun_name| fun_name }
crazed has quit [Read error: No route to host]
freeayu__ has quit [Read error: Connection reset by peer]
<_Vile>
atmosx, ok. not a problem, I love sqlite3, I love the idea behind nosql for application servers. I'm more of a postgresql guy, though.
uris has joined #ruby
<davidcelis>
takes a method name and then arguments the method should take
adamkittelson has joined #ruby
<ukd1>
davidcelis, oh wow - thanks! Save's me looking it up! :-D
as has quit [Remote host closed the connection]
<davidcelis>
you should still look it up ;)
<davidcelis>
there's some "gotcha" behavior with `send`
<ukd1>
davidcelis, I will
syamajala has joined #ruby
<ukd1>
davidcelis, thanks so much
<davidcelis>
yep
beakerman has quit [Ping timeout: 245 seconds]
freeayu__ has joined #ruby
MrWGW has joined #ruby
randomautomator has quit [Remote host closed the connection]
banisterfiend has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
<shevy>
ukd1, also understand the name. with send() you send a message to your object. the object will try to find a corresponding method. if it cant find it, it may fail. but you can check for such behaviour by using things like .respond_to? :name_here
ryanf has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
subbyyy has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
flojistik has joined #ruby
beakerman has joined #ruby
jbpros_ has joined #ruby
iamjarvo has joined #ruby
saispo has quit [Ping timeout: 260 seconds]
vitor-br has joined #ruby
beakerma_ has quit [Remote host closed the connection]
apok has quit [Ping timeout: 245 seconds]
TheShadowFog has joined #ruby
Phlogistique has quit [Ping timeout: 260 seconds]
jbpros has quit [Ping timeout: 260 seconds]
Mon_Ouie has quit [Remote host closed the connection]
jbpros_ is now known as jbpros
baroquebobcat has quit [Quit: baroquebobcat]
maletor has joined #ruby
Aenigma has quit [Ping timeout: 268 seconds]
maxmmurphy has joined #ruby
igotnolegs has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
mfridh has joined #ruby
crazygir_ has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<crazygir_>
is this a semi-good place for questions on hosting rails apps?
JStoker has quit [Ping timeout: 245 seconds]
<chico_chicote>
crazygir_: try #rubyonrails
talsamon has quit [Ping timeout: 245 seconds]
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
caveat- has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
gener1c has quit [Ping timeout: 260 seconds]
codeFiend has left #ruby [#ruby]
talsamon has joined #ruby
caveat- has joined #ruby
<crazygir_>
thanks chico_chicote
td123 has quit [Ping timeout: 248 seconds]
gener1c has joined #ruby
gener1c has quit [Changing host]
pen_ has joined #ruby
gener1c has joined #ruby
crazygir_ has left #ruby [#ruby]
pencilcheck has quit [Ping timeout: 265 seconds]
shadoi has quit [Ping timeout: 245 seconds]
justsee is now known as justsee|away
maletor has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
jso_ has joined #ruby
jso_ has quit [Client Quit]
baroquebobcat has joined #ruby
pyreal has quit [Quit: pyreal]
havenn has quit [Ping timeout: 244 seconds]
bradhe has quit [Remote host closed the connection]
poga has joined #ruby
poga has quit [Remote host closed the connection]
nateberkopec has joined #ruby
poga has joined #ruby
justsee|away is now known as justsee
fbernier has joined #ruby
dhruvasagar has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
sepp2k has quit [Remote host closed the connection]
nateberkopec has quit [Client Quit]
codeFiend has joined #ruby
skipper has joined #ruby
_class_ has joined #ruby
graspee has quit [Quit: leaving]
JStoker has joined #ruby
slyv has quit [Quit: Cya!]
adeponte has joined #ruby
Araxia has joined #ruby
__class__ has quit [Ping timeout: 248 seconds]
codeFiend has quit [Client Quit]
Tombar has joined #ruby
opus has quit [Quit:]
_class_ is now known as __class__
ananthakumaran has joined #ruby
niklasb has quit [Ping timeout: 248 seconds]
maxmmurphy has quit [Quit: maxmmurphy]
skipper has quit [Remote host closed the connection]
savage- has joined #ruby
<i0n>
anyone know of a gem that will listen to a directory for new files?
<Tombar>
anybody haves high context switches using unicorn/rails?
kpshek has joined #ruby
nari_ has joined #ruby
indian has quit [Ping timeout: 276 seconds]
Chryson has quit [Quit: Leaving]
aezop has quit [Ping timeout: 240 seconds]
kpshek has quit [Ping timeout: 265 seconds]
aezop_ has joined #ruby
gener1c has quit [Disconnected by services]
havenn has joined #ruby
gener1c_ has joined #ruby
aezop_ has quit [Remote host closed the connection]
luckyruby has quit [Remote host closed the connection]
k_89 has joined #ruby
k_89 has quit [Client Quit]
g_rotbart has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
affix has quit [Ping timeout: 260 seconds]
Tombar_ has joined #ruby
affix has joined #ruby
gmci has joined #ruby
yasushi has joined #ruby
maxmmurphy has quit [Quit: maxmmurphy]
savage- has joined #ruby
affix has quit [*.net *.split]
bradhe_ has quit [*.net *.split]
Tombar_ has quit [*.net *.split]
TheShadowFog has quit [*.net *.split]
bier has quit [*.net *.split]
Seventoes has quit [*.net *.split]
BrokenCog has quit [*.net *.split]
hsbt_ has quit [*.net *.split]
Dreamer3 has quit [*.net *.split]
quest88 has quit [*.net *.split]
DarthGandalf has quit [*.net *.split]
cid404 has quit [*.net *.split]
rotor has quit [*.net *.split]
explody has quit [*.net *.split]
srnty has quit [*.net *.split]
X-Jester has quit [*.net *.split]
jkyle has quit [*.net *.split]
wargasm has quit [Read error: Connection reset by peer]
ryanf_ has joined #ruby
maxmmurphy has joined #ruby
louism2_ has joined #ruby
ryanf_ has quit [Client Quit]
wargasm has joined #ruby
<louism2_>
Hey everyone, can anyone help me? I'm trying to update a record in the db from the console and I would like to get around the model validations. Can you do that form the console?
pencilcheck has quit [Remote host closed the connection]
cj3kim has quit [Quit: This computer has gone to sleep]
daidoji has quit []
nobitanobi has joined #ruby
micadeyeye has quit [Ping timeout: 265 seconds]
ChampS666 has quit [Ping timeout: 244 seconds]
Fretta has quit [Quit: Fretta]
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
s0ber_ has joined #ruby
jesseatkinson has quit [Quit: jesseatkinson]
ixx has quit [Quit: leaving]
dhruvasagar has quit [Ping timeout: 248 seconds]
ixx has joined #ruby
pcboy_ has quit [Ping timeout: 252 seconds]
s0ber has quit [Ping timeout: 252 seconds]
cloud|droid has joined #ruby
s0ber_ is now known as s0ber
Gurpartap has joined #ruby
pcboy_ has joined #ruby
justsee is now known as justsee|away
nobitanobi has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: Computer has gone to sleep.]
pencilcheck has quit [Remote host closed the connection]
snearch has joined #ruby
burgestrand has joined #ruby
burgestrand has quit [Client Quit]
yxhuvud has joined #ruby
wereHamster has quit [Quit: Lost terminal]
AlbireoX has quit [Remote host closed the connection]
burgestrand has joined #ruby
vectorshelve has joined #ruby
Bosma has quit [Ping timeout: 245 seconds]
adeponte has quit [Read error: Connection reset by peer]
n_blownapart has joined #ruby
gqlewis has quit [Remote host closed the connection]
adeponte has joined #ruby
djdb has joined #ruby
<n_blownapart>
hi could someone explain how the symbols on line 10 get passed in arguments in this prog? thanks: http://pastie.org/4471448
sailias has quit [Quit: Leaving.]
<n_blownapart>
*as arguments ^^
mohits has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
<n_blownapart>
what's confusing on line 10 is that features is written in front of the symbols.
delinquentme has quit [Quit: Leaving]
<heftig>
n_blownapart: it calls self.features, duh :p
<heftig>
in the context of "class CarModel", self is that same class CarModel
<burgestrand>
n_blownapart: it becomes the same thing as CarModel.features(:engine, :wheel, :airbag, :alarm, :stereo)
thorncp has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<n_blownapart>
so heftig on line 10 the word features indicates the method name that is being defined?
<burgestrand>
We’re lucky the method ain’t private or this would be harder to explain.
<n_blownapart>
burgestrand: ^^
<heftig>
n_blownapart: no, the method that is being called
wereHamster has joined #ruby
<n_blownapart>
oh I see the method is being called without dot syntax? heftig burgestrand
<burgestrand>
n_blownapart: yep
<heftig>
you define it on line 3ff
<heftig>
then immediately call it with some arguments
RichieEvan has quit [Quit: RichieEvan]
RichieEvan has joined #ruby
<n_blownapart>
burgestrand: heftig thanks. one second...
RichieEvan has quit [Client Quit]
mockra has joined #ruby
apok has joined #ruby
<n_blownapart>
if you have parameters, in this case a wildcard *args , aren't there rules about consistency between how parameters are written and in incoming arguments? ie, in this case symbols :engine etc.
<n_blownapart>
burgestrand: heftig ^^
arkiver has joined #ruby
kyktommy has joined #ruby
<burgestrand>
n_blownapart: what do you mean consistency?
<heftig>
n_blownapart: i don't get you
<burgestrand>
:D
* burgestrand
brings forth some random ruby tutorial about splats
<heftig>
do you think there are rules being violated here?
<n_blownapart>
burgestrand: heftig I'm not sure I thought I read something about method "signature" and I assumed it was about writing a parameter to match the sort of argument that was sent in.
<burgestrand>
n_blownapart: the section directly after that more closely reflects what you’re talking about
<n_blownapart>
burgestrand: cool thank you
<heftig>
and that is one old documentation
<burgestrand>
(the only difference between that document and reality is that in 1.9 the splat is more important)
<burgestrand>
s/important/powerful/
<burgestrand>
Yeah, given ruby aims to keep most backwards-compatibility for 2.0 I believe we’re safe >.>
<burgestrand>
for at least a few years
yoklov has quit [Quit: computer sleeping]
elhu has joined #ruby
MarGarina has joined #ruby
mockra has quit [Ping timeout: 245 seconds]
aeontech has joined #ruby
codeFiend has quit [Read error: Connection reset by peer]
aeontech is now known as codeFiend
<n_blownapart>
I skimmed over that. just wondering though, are symbols, along with strings and nums, quite common as arguments?
<n_blownapart>
burgestrand: heftig ^^
<burgestrand>
n_blownapart: yep
<burgestrand>
n_blownapart: especially for things like this where you create your own mini-language to describe things, like when you call attr_accessor :name, or define_method(:name), etc
jimeh3 has quit [Ping timeout: 248 seconds]
<n_blownapart>
burgestrand: thanks. how would you write a symbol as a default/explicit argument?
<burgestrand>
n_blownapart: like any other default argument
gmci has quit [Quit: Computer has gone to sleep.]
charliesome has joined #ruby
<burgestrand>
n_blownapart: how would you write a string as a default argument?
<n_blownapart>
burgestrand: perhaps any abitrary word with a * preceding: (*symbol) ?
<burgestrand>
n_blownapart: make such a method, http://pastie.org/4471549, and try calling it with a bunch of different arguments and see what happens
Banistergalaxy has joined #ruby
<n_blownapart>
ok burgestrand thank you I'll check it out.
<burgestrand>
call it with a string, experiment("hello"), a number, experiment(5), an array maybe, experiment(["i", "am", "an", "array"]), no arguments, experiment(), many arguments, experiment("one", 2, "three")
pencilcheck has joined #ruby
ChampS666 has quit [Ping timeout: 252 seconds]
sqlbyme has joined #ruby
<burgestrand>
n_blownapart: ^
<burgestrand>
I’m all for experimentation. We can only tell you so much but it won’t sink in if you try it for yourself.
<burgestrand>
… unless.
<burgestrand>
Ehee.
sqlbyme has quit [Client Quit]
<burgestrand>
mornin' ^.-
sqlbyme has joined #ruby
havenn has quit [Remote host closed the connection]
<n_blownapart>
burgestrand: thanks one sec.
codeFiend has joined #ruby
KTMBoID has joined #ruby
KTMBoID has quit [Remote host closed the connection]
fantazo has quit [Remote host closed the connection]
senny has joined #ruby
timonv has joined #ruby
sqlbyme has quit [Client Quit]
thorncp has quit [Quit: hills]
maletor has joined #ruby
justsee|away is now known as justsee
elhu has quit [Quit: Computer has gone to sleep.]
<n_blownapart>
burgestrand: I don't think I understand. It accepted any kind of arg, but I don't see how the print symbol.inspect line works . sorry
<n_blownapart>
inspect just puts the output into an array, right? burgestrand
<burgestrand>
n_blownapart: no, it just inspects the object so a good representation of what the object looks like can be shown
yonggu has joined #ruby
<burgestrand>
n_blownapart: print symbol.inspect does nothing special, it just prints the result so you can observe what the "symbol" inside the method becomes
<burgestrand>
n_blownapart: are you doing this in IRB?
thorncp has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<n_blownapart>
I got double brackets like so: [[:tires, :wheels, :airbags]]=> nil ...yeah, in pry. the colon notation persisted in the output is that right?
<burgestrand>
n_blownapart: either way, you discovered the main point, when doing *thing when you define arguments, you tell ruby you accept any number of arguments for that argument
<n_blownapart>
burgestrand: ^^
maesbn has joined #ruby
darren has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
<burgestrand>
n_blownapart: ah, you might want to experiment with the method written like this instead then: http://pastie.org/4471602
<n_blownapart>
burgestrand: thanks lemme see.
<Banistergalaxy>
Sup burg
zeromodulus has quit [Read error: Connection reset by peer]
<burgestrand>
Banistergalaxy: gothenburg turning into a festival this week
zeromodulus has joined #ruby
<burgestrand>
shitload of people on the street, street performers, segways and stuff everywhere
robert___ has joined #ruby
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
freeayu has joined #ruby
arkiver has quit [Ping timeout: 240 seconds]
<Banistergalaxy>
Burg celebrating what?
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
<Banistergalaxy>
Burgestrand
<n_blownapart>
burgestrand: that outputs everything in brackets. what's the point?
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
nobitanobi1 has joined #ruby
nobitanobi1 has quit [Client Quit]
answer_42 has joined #ruby
My_Hearing has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
<n_blownapart>
Banistergalaxy: hey new Zealand
burgestrand has quit [Ping timeout: 244 seconds]
Inoperable has joined #ruby
<heftig>
n_blownapart: arguments, like all variables, are dynamically typed
Mon_Ouie has joined #ruby
nobitanobi has joined #ruby
bradhe_ has joined #ruby
Seventoes has joined #ruby
TheShadowFog has joined #ruby
hsbt_ has joined #ruby
affix has joined #ruby
Dreamer3 has joined #ruby
bier has joined #ruby
BrokenCog has joined #ruby
cid404 has joined #ruby
Tombar_ has joined #ruby
explody has joined #ruby
malcolmva has joined #ruby
X-Jester has joined #ruby
jkyle has joined #ruby
srnty has joined #ruby
rotor has joined #ruby
Mon_Ouie has quit [Remote host closed the connection]
affix has quit [Ping timeout: 260 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
robert___ has quit [Ping timeout: 260 seconds]
gmci has joined #ruby
<heftig>
while you can check an arguments type and raise an exception when you don't like what you have, it's not reflected in the method signature and is not idiomatic ruby
<heftig>
s/arguments/argument's
affix has joined #ruby
t59333 has quit [Remote host closed the connection]
t77903 has joined #ruby
clocKwize has joined #ruby
MarGarina has quit [Ping timeout: 248 seconds]
Morkel has joined #ruby
Gurpartap has left #ruby [#ruby]
<n_blownapart>
heftig: could you put that in laymen's terms? I guess from that answer I don't know what a method signature is.
Eldariof-ru has joined #ruby
lurch_ has joined #ruby
savage- has quit [Remote host closed the connection]
dr_bob has joined #ruby
DarthGandalf has quit [Ping timeout: 245 seconds]
kyb3r has quit []
<n_blownapart>
heftig: I thought, by writing method_name(:symbol) or somesuch, you could preclude all argument types except for symbols.
MarGarina has joined #ruby
<heftig>
n_blownapart: the number and type of arguments, which arguments are optional, and the return type of a method
<heftig>
since ruby is dynamically typed, the type of arguments and return type aren't defined
<heftig>
so that leaves number of arguments, and which are optional
<n_blownapart>
ok heftig that's good information thanks !
<heftig>
n_blownapart: no, you can't do that in ruby
<n_blownapart>
heftig: what abovementioned (:symbol) ?
<heftig>
n_blownapart: is ruby your first programming language?
answer_42 has quit [Remote host closed the connection]
<n_blownapart>
yes heftig can't you tell?
<heftig>
i just wanted to be sure
<n_blownapart>
thanks very much I enjoy it heftig
burgestrand has joined #ruby
<n_blownapart>
heftig: I worked on ruby last year but fell ill.
<n_blownapart>
heftig: so I forgot mostly everything.
timonv has quit [Remote host closed the connection]
<burgestrand>
n_blownapart: a surprisingly large bunch of newcomers from last year completely stopped ruby and came back recently :)
<burgestrand>
n_blownapart: I’ve seen about ~4-6 people with the same behaviour
<n_blownapart>
burgestrand: well, it wasn't behavior in my case, exactly.
<burgestrand>
:)
MarGarina has quit [Ping timeout: 244 seconds]
<burgestrand>
it is behaviour regardless of reason
drago757 has joined #ruby
Bosox20051 has quit [Quit: Leaving]
<n_blownapart>
burgestrand: Is getting hit by a bus behavior? :)
<Banistergalaxy>
N_blownapart you told me it was due to your friend discouraging you, nothing about a bus:
Eldariof-ru has quit []
stoffus has joined #ruby
ryanf has joined #ruby
<Banistergalaxy>
Sup ryanf
moshef has joined #ruby
dv_ has quit [Ping timeout: 252 seconds]
moshef has quit [Client Quit]
arkiver has joined #ruby
mockra has quit [Ping timeout: 272 seconds]
mockra_ has joined #ruby
DarthGandalf has joined #ruby
subbyyy has quit [Quit: Leaving.]
igotnolegs has quit [Quit: Computer has gone to sleep.]
affix is now known as Guest37424
macer_ is now known as macer1
macer1 has quit [Changing host]
macer1 has joined #ruby
apok has quit [Quit: apok]
drago757 has quit [Quit: drago757]
clocKwize has quit [Read error: Connection reset by peer]
ph^_ has joined #ruby
mockra_ has quit [Ping timeout: 246 seconds]
burgestrand has quit [Read error: Connection reset by peer]
adamkittelson has quit [Remote host closed the connection]
burgestrand has joined #ruby
dv_ has joined #ruby
clocKwize has joined #ruby
clocKwize_ has joined #ruby
thomas is now known as delicious
saispo has joined #ruby
elhu has joined #ruby
dhruvasagar has joined #ruby
Gate has quit [Quit: leaving]
clocKwize has quit [Ping timeout: 246 seconds]
clocKwize_ is now known as clocKwize
<lurch_>
hi, can rubyzip (or another library) read a zip stream from memory? I have: Zip::ZipInputStream::open(input_file) do |io| … but the open() doesn't seem to take an IO object
banisterfiend has quit [Ping timeout: 276 seconds]
nohonor has quit [Ping timeout: 240 seconds]
<cek>
Guys, I'm thinking about RPC for one rails app. Currently, it's done as following: rails app has hell load of models and exposes them via REST api. There's client, written in non-rails, that defines the same models/objects, but without all AR stuff. It inits the objects by making REST calls to rails server.
a_a_g has joined #ruby
thisirs has quit [Remote host closed the connection]
<cek>
So basically there's huge duplication there. What are my options?
<cek>
is there some lib that would allow me to "auto" init objects from REST replies?
banisterfiend has joined #ruby
lkba has quit [Quit: Bye]
altivec has quit [Read error: Operation timed out]
chiel has quit [Read error: Operation timed out]
yeggeps has joined #ruby
chiel has joined #ruby
altivec has joined #ruby
kalleth has quit [Remote host closed the connection]
yeggeps has quit [Client Quit]
yeggeps has joined #ruby
mockra has joined #ruby
elhu has quit [Ping timeout: 268 seconds]
cout has joined #ruby
elhu has joined #ruby
kalleth has joined #ruby
seoaqua has joined #ruby
hoelzro|away is now known as hoelzro
<seoaqua>
is op here?
iori has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 240 seconds]
yasushi has joined #ruby
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
clocKwize has quit [Quit: clocKwize]
Foxandxss has joined #ruby
Spooner has joined #ruby
d3vic3 has quit [Quit: leaving]
<cek>
yes
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
bluenemo_ has quit [Read error: Connection reset by peer]
<seoaqua>
cek,do you think it's a good idea to combine #ruby and #ruby-lang
<cek>
best idea is to redirect them to ##ruby
jjang has quit [Remote host closed the connection]
yasushi has quit [Ping timeout: 265 seconds]
fastred has quit [Quit: fastred]
nu7hatch has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<seoaqua>
i was told it's impossible
x0F_ is now known as x0F
<cek>
nothing is impossible
<Mon_Ouie>
You'd need people to agree first though
<seoaqua>
i mean 'redirect' automatically is impossible, talk to u later
<shevy>
puts "Now removing file "+"/tmp/test.txt".sfile+"." # dont like this one here, it would require changing class String
<shevy>
"foo".red is also bad, it would lead to hardcoded colours
t57847 has quit [Remote host closed the connection]
t16581 has joined #ruby
<shevy>
and html/css/xml is too verbose... puts "Now removing file <span class="file">/tmp/test.txt</span>."
a_a_g has joined #ruby
hemanth has joined #ruby
mockra has joined #ruby
Gurpartap has joined #ruby
a_a_g1 has quit [Ping timeout: 265 seconds]
Lachryma has joined #ruby
zemanel has joined #ruby
Inoperable has quit [Quit: Rectified]
<vectorshelve>
shevy: Hi
yeggeps has quit [Quit: yeggeps]
<Gurpartap>
shevy: Hi
timonv has joined #ruby
d3vic3 has joined #ruby
mockra has quit [Ping timeout: 240 seconds]
<shevy>
hey
<shevy>
you two are married?
ringotwo has quit [Remote host closed the connection]
ephemerian has quit [Ping timeout: 240 seconds]
yeggeps has joined #ruby
yeggeps has left #ruby [#ruby]
emmanuelux has joined #ruby
arkiver has joined #ruby
UNIXgod_ has joined #ruby
apeiros_ has joined #ruby
moshee has quit [Ping timeout: 252 seconds]
cousine has joined #ruby
moshee has joined #ruby
[Neurotic] has quit [Quit: Leaving]
specialGuest has joined #ruby
yuriy has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
pavelz_ has joined #ruby
rmc3_ has joined #ruby
CharlieS1 has joined #ruby
FriarTec1 has joined #ruby
elspeth_ has joined #ruby
deadSnowman has joined #ruby
iamtakin1iteasy has joined #ruby
wmoxam_ has joined #ruby
<vectorshelve>
when I run rspec or rake cucumber from the root of my app I get the error FATAL: database "app_test" does not exist, but when I do a rake rake db:create:all it returns app_test already exists. Any Idea what I am missing on? thanks
tdubz has joined #ruby
denstark_ has joined #ruby
csamuelson has joined #ruby
tdubz is now known as Guest23164
<vectorshelve>
sorry this question was meant for rails room... accindetly posted it here
gmci has quit [Quit: Computer has gone to sleep.]
k_89 has quit [Ping timeout: 246 seconds]
ggreer has quit [*.net *.split]
moted has quit [*.net *.split]
eighty4_ has quit [*.net *.split]
gry has quit [*.net *.split]
iamtakingiteasy has quit [*.net *.split]
deadSnow1an has quit [*.net *.split]
CharlieSu has quit [*.net *.split]
pavelz has quit [*.net *.split]
elspeth has quit [*.net *.split]
delicious has quit [*.net *.split]
Poapfel has quit [*.net *.split]
Rious has quit [*.net *.split]
UNIXgod has quit [*.net *.split]
wmoxam has quit [*.net *.split]
rmc3 has quit [*.net *.split]
gogiel has quit [*.net *.split]
FriarTech has quit [*.net *.split]
denstark has quit [*.net *.split]
csamuelson is now known as Rious
AngryParsley has joined #ruby
eighty4 has joined #ruby
lkba has joined #ruby
seoaqua has joined #ruby
timonv has quit [Remote host closed the connection]
cloud|droid has quit [Ping timeout: 246 seconds]
Poapfel has joined #ruby
seoaqua has quit [Client Quit]
moted has joined #ruby
hoelzro is now known as hoelzro|away
timonv has joined #ruby
arkiver has quit [Ping timeout: 246 seconds]
macer1 is now known as macer1|away
Konboi has joined #ruby
gry has joined #ruby
vectorshelve has quit [Ping timeout: 245 seconds]
<dr_bob>
Has anybody seen Major Rewrite? There's a cable for him.
vlad_starkov has quit [Read error: Connection reset by peer]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
geekbri has joined #ruby
ssspiff has joined #ruby
ssspiff has joined #ruby
sspiff has quit [Ping timeout: 240 seconds]
pen has quit [Remote host closed the connection]
rbanffy has joined #ruby
GordonFreeman has quit [Read error: Connection reset by peer]
bbttxu has joined #ruby
fantazo has joined #ruby
mohits has quit [Ping timeout: 276 seconds]
td123 has joined #ruby
er1c_ has joined #ruby
freeayu has quit [Ping timeout: 252 seconds]
\n is now known as {\^_^}
iamtakin1iteasy is now known as iamtakingiteasy
wmoxam_ is now known as wmoxam
yasushi has quit [Remote host closed the connection]
wmoxam has quit [Changing host]
wmoxam has joined #ruby
yasushi has joined #ruby
xbob has quit [Quit: Leaving]
Stalkr_ has joined #ruby
Criztian has quit [Remote host closed the connection]
<martisj>
oddmunds: you can run rbenv init
<martisj>
to run it manually
MarGarina has quit [Ping timeout: 252 seconds]
erichmenge has quit [Quit: Be back later]
asteve has joined #ruby
<oddmunds>
not without adding the rbenv bin to the path :)
td123 has quit [Read error: Connection reset by peer]
GordonFreeman has joined #ruby
<rking>
Hrm. By default gems install to something like ~/.gem/ruby/1.9.1/ (even when on, e.g., 1.9.3). How can I programmatically get the string "1.9.1" ?
<jrajav>
Why the heck is . not in $LOAD_PATH for require?
<jrajav>
-_-
<Mon_Ouie>
Because it shouldn't be
bluenemo has quit [Remote host closed the connection]
<jrajav>
That would have been an elegant way to let people access other peoples' persistent sessions
<Mon_Ouie>
. is the current working directory, if you rely on it, you're program will behave differently depending on where you run it from
<oddmunds>
require './mything'
<jrajav>
Mon_Ouie: That's why you make it the LAST directory searched
<Mon_Ouie>
your*
<jrajav>
oddmunds: That doesn't work either
yasushi has quit [Ping timeout: 245 seconds]
awarner has joined #ruby
<jrajav>
Oh wait it does never mind :P
<oddmunds>
works for me
<rking>
jrajav: It would be a huge security hole. Imagine if, as root, you cd /tmp then run some ruby command.
freeayu has joined #ruby
<Mon_Ouie>
Doesn't matter, still will behave differently depending on where you run it from
<shevy>
what's the use case of avoiding putting '.' into the path?
<jrajav>
Again, nothing :P
Criztian has joined #ruby
<rking>
(btw what I was looking for is "gem environment gempath")
<jrajav>
I'll probably just hide the functionality a little more
TheLZA has joined #ruby
<shevy>
cool
<shevy>
didnt know gem environment gempath
<jrajav>
Make it something like >Mon_Ouie> do_something_nifty…();
<rking>
shevy: Not being surprised all the time when things act differently based on which dir you're in, and not having a security hole just waiting to bite everyone.
<Mon_Ouie>
You can add . to the load path in something like IRB or Pry, that's what I do in my config file
fermion has joined #ruby
liluo has joined #ruby
t93633 has quit [Remote host closed the connection]
<shevy>
what is the security hole?
t17562 has joined #ruby
<jrajav>
That's what I said :P
<shevy>
in 1.8 it was deemed not so problematic apparently :)
macer_ has joined #ruby
kyktommy has quit [Quit: kyktommy]
macer1 has quit [Disconnected by services]
macer_ is now known as macer1
macer1 has quit [Changing host]
macer1 has joined #ruby
nilg has quit [Read error: Connection reset by peer]
stopbit has joined #ruby
tiripamwe has joined #ruby
macer_ has joined #ruby
stoffus has quit [Quit: The computer fell asleep]
insecurlex has joined #ruby
insecurlex has quit [Remote host closed the connection]
sailias has joined #ruby
nedbat has quit [Ping timeout: 250 seconds]
specialGuest has joined #ruby
yasushi has joined #ruby
Inoperable has quit [Quit: Rectified]
jonathanwallace has joined #ruby
Inoperable has joined #ruby
<shevy>
anyone of you using insanely long case/when menus?
pen has joined #ruby
GordonFreeman has quit [Read error: Connection reset by peer]
<i0n>
trying to get this to only give me back the changed[:added] valuie
<cout>
how do I find a class's immediate ancestor? is klass.ancestors[1] the best way?
bluenemo has quit [Remote host closed the connection]
<DefV>
i0n: block is called with 3 arguments
<cout>
oh nm, #superclass
* cout
is so rusty
<cout>
doing python professionally for 6 years rotted my brain
<i0n>
DefV: even if i say do | a, b, c| it still throws that message.
<DefV>
show me :-)
<apeiros_>
cout: note that klass.ancestors[1] not necessarily == klass.superclass
Husel has left #ruby [#ruby]
<apeiros_>
i0n: exceptions get raised, not thrown.
<cout>
apeiros_: yeah
<whowantstolivefo>
which ruby e-book is the best for the beginner user? not too much have programming language. have html+css+js ?
<i0n>
DefV: i sware last night at 3:30 when i was banging my head on this it was =) ... now it seems to be providing the functionality expected.
<workmad3>
whowantstolivefo: every ruby beginner ebook and ruby tutorial I've ever seen has been just ruby... it's the rails ones that have other web languages in :P
<workmad3>
whowantstolivefo: rails != ruby
<i0n>
whowantstolivefo: i'm reading ruby by example.. but i have a hard coby.
<i0n>
whowantstolivefo: copy*
Criztian has quit [Ping timeout: 252 seconds]
vlad_sta_ has quit [Remote host closed the connection]
<i0n>
whowantstolivefo: it has a section on html
<whowantstolivefo>
i0n : how can i have this ?
<i0n>
whowantstolivefo: with money
<i0n>
whowantstolivefo: it can be yours
<whowantstolivefo>
i0n gimme link please ? i'll buy
<i0n>
whowantstolivefo: I bought mine used for around 8$ with free shipping, so you might want to look around
<whowantstolivefo>
i dont like used books if i learn that language, 30-40$ is nothing i think. it deserve :)
nateberkopec has joined #ruby
<i0n>
whowantstolivefo: it says they have a kindle edition for 23$
bradhe_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
jasonLaster has joined #ruby
<whowantstolivefo>
i0n : im going to order. thank you for advice
tiripamwe has quit [Ping timeout: 240 seconds]
slimjimflim has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<slimjimflim>
hi, i haven't touched ruby for a few weeks. in my notes it says to start the ruby webserver i should run: ruby script/server -e production
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<slimjimflim>
but i get: ruby: No such file or directory -- script/server (LoadError)
<slimjimflim>
do i have to be in a certain dir for that to work?
eikko has quit [Ping timeout: 265 seconds]
zeromodulus has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
zeromodulus has joined #ruby
lkba has joined #ruby
elux has joined #ruby
nwest has joined #ruby
xaq has joined #ruby
<Muz>
slimjimflim: often the root of your project.
<apeiros_>
slimjimflim: you're talking about rails
<apeiros_>
not ruby
<apeiros_>
and script/server is rails 2.3, which is rather old by now
<apeiros_>
(also what Muz said)
<slimjimflim>
k thanks
jasonLaster has quit [Remote host closed the connection]
jasonLaster has joined #ruby
geggam has joined #ruby
lynxy has joined #ruby
denstark_ is now known as denstark
td123 has quit [Ping timeout: 256 seconds]
savage- has quit [Read error: Connection reset by peer]
cj3kim has quit [Quit: This computer has gone to sleep]
nXqd has quit [Ping timeout: 265 seconds]
mahmoudimus has joined #ruby
jasonLaster has quit [Ping timeout: 246 seconds]
yasushi has quit [Remote host closed the connection]
tiripamwe has joined #ruby
yasushi has joined #ruby
mikepack has joined #ruby
baroquebobcat has joined #ruby
mneorr1 has joined #ruby
maesbn has quit [Remote host closed the connection]
savage- has joined #ruby
mneorr has quit [Ping timeout: 246 seconds]
AngryParsley is now known as ggreer
ggreer has quit [Changing host]
ggreer has joined #ruby
yasushi has quit [Ping timeout: 248 seconds]
specialGuest has joined #ruby
specialGuest has joined #ruby
specialGuest has quit [Changing host]
Gate has quit [Remote host closed the connection]
ckrailo has joined #ruby
Jay_Levitt has joined #ruby
Jay_Levitt has quit [Remote host closed the connection]
<Synthead>
is there a way I can "add" to what the effect of a "blank" rescue does? By itself, it captures a variety of exceptions, but not some. If I wanted to catch everything and a specific one, how would I state it?
t41239 has quit [Remote host closed the connection]
t21117 has joined #ruby
maletor has joined #ruby
adeponte has joined #ruby
<davidcelis>
Synthead: You can have mutliple `rescue` clauses in the same begin-rescue-end block
<davidcelis>
abstrusenick: See that section, it tells you which string delimiters allow what
<Synthead>
abstrusenick: there's no harm to it
<Synthead>
abstrusenick: my $0.02 would say that it's cleaner (and sometimes ' more "convenient"')
<abstrusenick>
but seems the general style is to use single quotes whenever possible
<davidcelis>
abstrusenick: Correct, because if you don't need interpolation or backslashes, there is no reason to use double quotes or %Q
<jamesaa>
davidcelis, I installed rails
<Synthead>
jamesaa: the right version? is rails in your path?
<davidcelis>
abstrusenick: It's about being explicit with what you're doing with the string
<Synthead>
jamesaa: what OS?
<jamesaa>
Synthead, linux
<Synthead>
jamesaa: run whereis rails
qko has quit [Ping timeout: 245 seconds]
qwerxy has quit [Ping timeout: 244 seconds]
<jamesaa>
Synthead, I just get "rails:"
<Synthead>
jamesaa: rails isn't in your path then :) did you install rails with gem as a regular user?
savage-_ has joined #ruby
mrsolo has joined #ruby
<jamesaa>
Synthead, yes
sepp2k1 has joined #ruby
<Synthead>
jamesaa: it's probably in ~/.gem/bin
<Synthead>
jamesaa: run echo "$PATH" and you'll see where it's looking
<davidcelis>
Synthead: rescue nil should catch every kind of exception, what wouldn't it catch?
johnlcox has joined #ruby
<Mon_Ouie>
Anything that isn't a StandardError
<Synthead>
jamesaa: run export PATH="/your/home/directory/.gem/bin:$PATH"
<Mon_Ouie>
e.g. LoadError
<jamesaa>
Synthead, I got /.rvm/binl/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/Users/jamesa/lib/ruby/gems
<davidcelis>
Mon_Ouie: I thought rescue nil was a catchall?
senny has quit [Remote host closed the connection]
<Synthead>
jamesaa: ooh, ok. looks like rails isn't in any of those directories. do you have a ~/.gem/bin ? is rails in there?
<Mon_Ouie>
It isn't, rescue without a class and inline rescue both rescue StandardError implicitly
<Synthead>
davidcelis: I'd have to look through my code, but I did find a few cases
joephelius has joined #ruby
<jamesaa>
Synthead, no
<davidcelis>
Mon_Ouie: Thanks for informing me
sepp2k has quit [Ping timeout: 260 seconds]
TheLZA has joined #ruby
ephemerian has quit [Quit: Leaving.]
<jamesaa>
Synthead, I don't know why the installation didn't work I'll try again
<Synthead>
jamesaa: how about updatedb; locate rails
<davidcelis>
Not sure what you mean by rescue without a class vs. inline rescue though
Foxandxss has joined #ruby
<Synthead>
jamesaa: if it didn't work the first time, it probably won't magically work a second time
<Mon_Ouie>
begin; foo; rescue; …; end vs foo rescue …
<davidcelis>
nevermind
<davidcelis>
yeah
<Synthead>
jamesaa: that updatedb command might take a couple minutes
<davidcelis>
mind drew a blank for some reason
<davidcelis>
:P
savage- has quit [Ping timeout: 248 seconds]
kvirani has joined #ruby
<Synthead>
Mon_Ouie: so is that all a nil rescue looks for? StandardError?
<jamesaa>
Synthead, I get -bash: updatedb: command not found
<jamesaa>
-bash: locate: command not found
<Synthead>
jamesaa: what distro?
<davidcelis>
Synthead: Or things that inherit from it
<jamesaa>
Synthead, let me check I'm trying to use koding.com
<Synthead>
jamesaa: k
johnlcox has quit [Ping timeout: 240 seconds]
Clooth has joined #ruby
AlbireoX has quit []
<Mon_Ouie>
Btw, rescue SomeClass does *not* rescue exceptions of SomeClass — it rescues StandardError, in which case the expression evaluates to SomeClass
<jamesaa>
Synthead, I can't seem to find out
<Synthead>
jamesaa: you're not sure what operating system you installed on your computer? :/
Reign has joined #ruby
<jamesaa>
Synthead, I'm trying to use koding.com's terminal
<jamesaa>
Synthead, rails is working on my local computer
Hawklord has joined #ruby
brdude has joined #ruby
<Synthead>
jamesaa: well, if you installed something with gem, unless you have privileges to write to system-wide directories, it's somewhere in your home directory
<davidcelis>
Mon_Ouie: i.e. it raises exceptions of SomeClass if SomeClass inherits at some point from StandardError
<davidcelis>
?
<davidcelis>
rescues*
<Synthead>
jamesaa: find "$HOME" -name rails
devdazed_ has quit [Quit: Bye]
ringotwo has joined #ruby
savage- has joined #ruby
specialGuest has quit [Ping timeout: 272 seconds]
kenichi has quit [Remote host closed the connection]
<Synthead>
jamesaa: I'm thinking that 'gems?' has a unicode character or something
<Synthead>
can you cd to it?
<jamesaa>
Synthead, I just uninstalled it
<davidcelis>
jamesaa: honestly i'd just do the RVM install, you're gonna save yourself a lot of headache, and everything installs into your user folder so you'll have permissions set up correctly.
kuzushi has quit [Quit: Leaving]
<jamesaa>
davidcelis, ok
<Synthead>
davidcelis: gem should install to whatever it has permission to too
<davidcelis>
Synthead: RVM installs gem
<davidcelis>
also in $HOME
<davidcelis>
well, $HOME/.rvm/
<Synthead>
davidcelis: :)
<davidcelis>
using the system ruby is bullshit; too much sudo
OmarLittle has quit [Read error: Connection reset by peer]
devdazed has joined #ruby
mmercer has joined #ruby
chichou has joined #ruby
erichmenge has joined #ruby
bluOxigen has joined #ruby
apok has joined #ruby
<wmoxam>
davidcelis: just need sudo to install bundler :p
mahmoudimus has joined #ruby
Progster has joined #ruby
bradhe has joined #ruby
<davidcelis>
that's too much sudo
TPFC-SYSTEM has joined #ruby
<LiquidInsect>
install rvm or rbenv, no root required
kenichi has joined #ruby
lynxy has quit [Ping timeout: 252 seconds]
<davidcelis>
rvm > rbenv
<davidcelis>
loljk rvm sux
abstrusenick has quit [Quit: abstrusenick]
<wmoxam>
pik > rvm
<wmoxam>
Windoze4life!
bier has quit [Ping timeout: 260 seconds]
GoGoGarrett has quit [Remote host closed the connection]
adamkittelson has joined #ruby
adamkittelson has quit [Remote host closed the connection]
<davidcelis>
Synthead: well i dont know what i was expecting
<Synthead>
hahaha
<asteve>
i'm not sure why i clicked on that
savage- has joined #ruby
ringotwo has joined #ruby
savage-_ has quit [Read error: Connection reset by peer]
<chiel>
Synthead: it's not too bad to get used to, config can be a bit of a pain, I suppose.
lkba has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
DrShoggoth has joined #ruby
<Synthead>
chiel: I lost my fear of config files and man pages quite a few years ago ;)
<chiel>
Synthead: that's the thing, irssi's config files are a nightmare. the recommendation is to do most things through slash-commands.
<davidcelis>
chiel: weechat
t5616 has quit [Remote host closed the connection]
t14917 has joined #ruby
<Synthead>
chiel: oh :p
sneakyness_wk has joined #ruby
mrsolo has joined #ruby
RegEchse has quit [Quit: brb]
shadoi has joined #ruby
wargasm has quit [Ping timeout: 245 seconds]
tvw has quit [Remote host closed the connection]
RegEchse has joined #ruby
apok has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
apok has joined #ruby
bier has joined #ruby
<Synthead>
when running a ruby script via cron, `blkid` doesn't return anything. I've set ENV['PATH'], and `whereis blkid` shows that it finds it. What's going on here?
nedbat has joined #ruby
<eam>
Synthead: what does $? tell you?
elaptics is now known as elaptics`away
<eam>
when things don't work, check their error and return codes
elaptics`away is now known as elaptics
<eam>
or better yet, check them always
<Synthead>
eam: oh, it looks like the script can't find blkid when thought I put it in ENV['PATH']. that's strance
<Synthead>
shevy: yeah, weird, right? do you know if ENV['PATH'] gets passed to subshells?
carloslopes has joined #ruby
<shevy>
"Utilities used for system administration (and other root-only commands) are stored in /sbin, /usr/sbin, and /usr/local/sbin. /sbin contains binaries essential for booting, restoring, recovering, and/or repairing the system in addition to the binaries in /bin."
<shevy>
the FHS is such a horrible mess
<shevy>
Synthead I think it gets passed
sdwrage has joined #ruby
xie_xie has joined #ruby
<shevy>
or rather, every shell honours $PATH
<shevy>
so also ENV
<shevy>
dunno much about cron though
elhu has quit [Ping timeout: 248 seconds]
<bigzed>
Hey guys, I'm trying to replace ':' in this string '00:00:00:00' with '\;' . So I tried "00:00:00:00".gsub(":",'\:') and got "00\\:00\\:00\\:00", then I tried "00:00:00:00".gsub(":",'\\:') and got the same result, so how do i do that?
<davidcelis>
three backslashes
<bigzed>
davidcelis, still "00\\:00\\:00\\:00"
<davidcelis>
four backslashes
<shevy>
hehehe
<shevy>
davidcelis is just guessing ;)
<davidcelis>
i swear i've done this before
<davidcelis>
how many backslashes did it have to be again...?
<shevy>
'00\:00\:00\:00' # => "00\\:00\\:00\\:00"
<shevy>
dunno
<shevy>
ruby seems to change things on its own automagically
<shevy>
I always add \ until it works
<shevy>
:P
<Muz>
Where're you doing this, on IRB and viewing output in your Terminal?
<Muz>
If so, it's backslash escaping it to represent a literal backslash.
<davidcelis>
aha
<davidcelis>
yep
<davidcelis>
bigzed: try putsing it out
<davidcelis>
bigzed: two backslashes is the correct way
robbyoconnor has quit [Ping timeout: 244 seconds]
<bigzed>
davidcelis, yeah just figured that out, but thanks :)
<Synthead>
shevy: well that's interesting. http://pastebin.com/xcjQaL0A This doesn't pass ENV['PATH'] to `$PATH`
<eam>
Synthead: what is your underlying system?
<Synthead>
eam: linux
wargasm has quit [Ping timeout: 244 seconds]
<eam>
which linux?
baphled has joined #ruby
<Synthead>
eam: in this case, a centos vm
workmad3 has quit [Ping timeout: 252 seconds]
<Muz>
Synthead: first off, eurgh, backticks.
<Muz>
Second off, eurgh, backticks.
<davidcelis>
second off, eurgh, pastebin
<eam>
Synthead: odd. Can you run strace ruby -e'puts ENV["PATH"]; ENV["PATH"] = "/test"; puts `echo "$PATH"`' and pastebin that?
<Muz>
Thirdly eurgh, fucking backticks.
<Muz>
Fourthly, why are you using backticks? Does your cron user even spawn interactive sessions for running subprocesses?
<Synthead>
what would you recommend, then?
<davidcelis>
%x
<eam>
Synthead: %x{}, though it's not much better
bricker88 has joined #ruby
t14917 has quit [Remote host closed the connection]
bigzed has quit [Quit: Leaving]
<Synthead>
Muz: how else am I going to run lvm commands from within a ruby script? :p
<eam>
Synthead: also please run that as strace -f
t19013 has joined #ruby
<Synthead>
eam: from within cron?
<eam>
Synthead: I assume your test above was just on the commandline?
<Synthead>
eam: from within cron
<bricker88>
What's the shortest way to flatten a nested hash, removing the "parent" keys? Something more useful than flathash = hash[:one].merge hash[:two]
<eam>
Synthead: if you do it within cron, add -o/tmp/ruby.strace.output
<eam>
and then collect that file into pastebin
<Muz>
Synthead: thre's a gem to that alraedy, ruby-lvm
<Muz>
Whatever it is you're doing sounds like all sorts of Doing It Wrong though.
<Synthead>
Muz: backup script
<Muz>
Some might say you're only, and unnecessarily, making it harder for yourself by not just using shell.
Fretta_ has joined #ruby
<Synthead>
Muz: nice, ruby-lvm
<Synthead>
Muz: it interacts with a rails app
centipedefarmer has quit [Quit: This computer has gone to sleep]
<Muz>
It's at this point that I shudder.
xie_xie has quit [Ping timeout: 245 seconds]
Fretta_ has quit [Client Quit]
panpainter has joined #ruby
<Synthead>
Muz: ever try to create multidimensional arrays in bash?
tiripamwe has quit [Ping timeout: 248 seconds]
Fretta has quit [Ping timeout: 272 seconds]
chussenot_ has joined #ruby
chussenot_ has quit [Remote host closed the connection]
chussenot has quit [Read error: Connection reset by peer]
mrwalker has quit [Remote host closed the connection]
yoklov has joined #ruby
mengu has joined #ruby
<eam>
Synthead: did you capture that debug?
<davidcelis>
oops
<Muz>
Synthead: Yes, but more to the matter, why do you need to do that? Rather than trying to ask for solutions to what it is you're trying, ever step back and think your solution is convoluted and re-think what it is you're trying to solve? ¬_¬
<Synthead>
eam: I'm working on it. it doesn't run as you mentioned from cron
yoklov has quit [Remote host closed the connection]
<davidcelis>
bricker88: that was a mistake, updated
<eam>
Muz: surely he can pursue both avenues in tandem
<Synthead>
Muz: it's already finished :p I'm making it run in cron now
<Muz>
eam: if you've time to burn...
<eam>
I've always time to spend learning
<davidcelis>
meh it doesn't work
indian has quit [Ping timeout: 244 seconds]
<Muz>
Synthead: well you obviously failed to clearly capture what your specification and end goal was from the outset. ;)
<eam>
what an anti-intellectual attitude :p
<bricker88>
davidcelis: Hah… thanks for trying.
opus has joined #ruby
<Muz>
eam: doing things the hardway and through what feels like brute-force, how intellectual. That certainly beats thinking about the problem at hand and approaching it properly.
jonathanwallace has joined #ruby
nXqd has joined #ruby
<eam>
the question of why his environment isn't propagating to his subprocess is interesting and has nothing to do with your rant
stkowski has joined #ruby
<Muz>
eam: oh but it does, you're trying to run something that relies on interactive shell sessions in something that launches in a noninteractive session.
<asteve>
is there a way to execute everything inside of a script in a specific directory?
stkowski has quit [Client Quit]
stkowski has joined #ruby
<Muz>
Had you known how ``, eval, and system differ, you'd know why this is important.
<asteve>
the script will run in script/ but i'd like to make all File opens happen in data/
pdtpatrick has joined #ruby
<asteve>
short of putting Dir.chdir('data') is there something I can do to engulf the entire script in the "data" directory?
<eam>
Muz: `` doesn't invoke an interactive shell. I understand how this works; you do not
<eam>
it uses -c
<eam>
let's not argue about this
elaptics is now known as elaptics`away
<eam>
I would rather focus on his problem as presented
voodoofish430 has joined #ruby
Clooth is now known as Clooth[afk]
<Muz>
eam: eh? I never said `` did.
<eam>
you are seriously confused
SegFaultAX|work2 has joined #ruby
<Muz>
eam: Pot, kettle.
<eam>
you're welcome to your opinion
<Synthead>
Muz: your thinking of a couple minutes isn't better than my effort here. you don't even know what I'm backing up or what the process is :p
haxrbyte has joined #ruby
khakimov has joined #ruby
<Synthead>
Muz: if you would do it differently, you're just proving that we're different people with different opinions.
rburton- has joined #ruby
<Muz>
Synthead: there's a good background to why using backticks is generally frowned down upon. You didn't really explain your problem clearly, but rather the intended solution. It's as bad as someone coming in and trying to get a regex parser to work with XML. Wrong tool for the problem etc.
linoj has quit [Ping timeout: 245 seconds]
<eam>
his issue is valid regardless of your opinion on his style
<Synthead>
Muz: agreed. blkid isn't being found in the subshell's path. that's all I'm asking :p
codeFiend has quit [Ping timeout: 246 seconds]
<Synthead>
Muz: if there's a syntactically different way to approach this, then I'll consider implementing it. ruby-lvm looks great also. I should have found that earlier :)
h4mz1d has joined #ruby
<Synthead>
eam: I'm having a real ball trying to dump a strace from within cron :s
<eam>
what in particular is not working? What did you do, and what did you observe?
tiripamwe has joined #ruby
<Synthead>
eam: (executed from cron) ENV['PATH'] = '/sbin'; `blkid`. blkid isn't found, though it lives in /sbin
<eam>
I mean, in your attempt to strace your ruby script
<apeiros_>
Synthead: I'm not sure whether File.file? performs path expansion…
jjbohn has joined #ruby
<i0n>
i guess I could have the program spit the time out to a file every 30 mins or so? that way i would know the last time it "check-in" with that file?
<apeiros_>
you may want to use File.expand_path in order to use those paths with "~" in it
<Synthead>
apeiros_: ooh, yeah
dpk has quit [Quit: Asleep at the keyboard.]
jrist is now known as jrist-brb
adeponte has quit [Remote host closed the connection]
lkba has joined #ruby
raddazong has quit [Quit: leaving]
andrew__ has joined #ruby
aezop has joined #ruby
madhatter has joined #ruby
hamfz_ has quit [Read error: Connection reset by peer]
andrew__ is now known as andrewhl
vlad_starkov has quit [Remote host closed the connection]
hamfz_ has joined #ruby
chussenot has joined #ruby
jrist-brb is now known as jrist
drknus has joined #ruby
fermion_ has joined #ruby
specialGuest has quit [Changing host]
specialGuest has joined #ruby
luckyruby has quit [Remote host closed the connection]
luckyruby has joined #ruby
mahmoudimus has joined #ruby
stkowski has quit [Quit: stkowski]
Gurpartap has left #ruby [#ruby]
wsylvest has joined #ruby
h4mz1d has joined #ruby
hamfz_ has quit [Read error: Connection reset by peer]
Hawklord has joined #ruby
workmad3 has joined #ruby
MatthewGA_ has joined #ruby
mneorr1 has quit [Quit: Leaving.]
iMe has quit [Quit: Computer has gone to sleep.]
MatthewGA has quit [Read error: Connection reset by peer]
MatthewGA_ is now known as MatthewGA
clocKwize has joined #ruby
mneorr has joined #ruby
TheLZA has quit [Ping timeout: 246 seconds]
mneorr has quit [Client Quit]
jjbohn is now known as jjbohn|afk
t31682 has quit [Remote host closed the connection]
t36515 has joined #ruby
SCommette has joined #ruby
drknus has quit [Quit: Leaving]
tayy has joined #ruby
burgestrand has joined #ruby
ibash has quit [Quit: ibash]
burgestrand has quit [Client Quit]
ibash has joined #ruby
qko has joined #ruby
stoffus has joined #ruby
workmad3 has quit [Read error: Operation timed out]
xie_xie has joined #ruby
Bosma has joined #ruby
tds has joined #ruby
Russell^^ has joined #ruby
tds has quit [Quit: leaving]
adeponte has joined #ruby
QKO_ has quit [Ping timeout: 268 seconds]
mneorr has joined #ruby
_graham_ has joined #ruby
clocKwize has quit [Quit: clocKwize]
tiripamwe has quit [Ping timeout: 240 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
sdwrage has quit [Quit: geekli.st/programmer]
drknus has joined #ruby
drknus has quit [Remote host closed the connection]
fayimora has quit [Ping timeout: 240 seconds]
drknus has joined #ruby
heftig has joined #ruby
sdwrage has joined #ruby
Eldariof27-ru has joined #ruby
drknus has quit [Remote host closed the connection]
<i0n>
Anyone know how to get Time.now.utc into a yaml file?
<apeiros_>
i0n: what have you tried?
sdwrage has quit [Client Quit]
adeponte has quit [Remote host closed the connection]
virunga has joined #ruby
MatthewGA has quit [Quit: Leaving]
Eldariof59-ru has quit [Ping timeout: 272 seconds]
bluOxigen_ has quit [Ping timeout: 240 seconds]
cylence has joined #ruby
Hawklord has quit [Remote host closed the connection]
ryan0x2 has quit [Remote host closed the connection]
savage- has joined #ruby
darren has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
opus has joined #ruby
<apeiros_>
i0n: >10min just to show what you did? that reeks of "I was too lazy to actually try myself, and rather waste other people's time", and sorry, but that's rather lame.
jjbohn|afk is now known as jjbohn
opus has quit [Client Quit]
seitensei has quit [Ping timeout: 260 seconds]
goyox86 has quit [Remote host closed the connection]
Clooth is now known as Clooth[afk]
mohits has quit [Ping timeout: 256 seconds]
Clooth[afk] is now known as Clooth
fayimora has joined #ruby
burgestrand has quit [Quit: Leaving.]
Gab0 has joined #ruby
savage- has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 265 seconds]
elhu has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
daguar has joined #ruby
specialGuest has quit [Ping timeout: 246 seconds]
Eplemosen has joined #ruby
savage- has joined #ruby
savage- has quit [Remote host closed the connection]
dpk has joined #ruby
bluOxigen has joined #ruby
savage- has joined #ruby
xie_xie has quit [Ping timeout: 252 seconds]
johnlcox has joined #ruby
specialGuest has joined #ruby
t36515 has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
tyoc213 has joined #ruby
<tyoc213>
Why I can get a ActionView::Template::Error (undefined method `short!' for [5, 1, 41, 5, 7]:Array)
johnlcox has quit [Ping timeout: 256 seconds]
<tyoc213>
it is l = [5, 1, 41, 5, 7] and then l.short! {|a, b| a <=> b}
<apeiros_>
tyoc213: short! ?
<apeiros_>
did you mean sort! ?
Stalkr_ has joined #ruby
stoffus has quit []
maletor has joined #ruby
<tyoc213>
lol, now I feel dumb ¬¬'
<apeiros_>
also, `sort! { |a,b| a <=> b }` is a more expensive way of just `sort!`
<i0n>
apeiros_: sorry got called away from my desk. http://pastie.org/private/ja4bomxatgjk7ah9djt2a .. I am looking for a to.yaml.. not sure if this is what i should be doing.. sorry for the delay
<tyoc213>
thanks for point it out apeiros_
ngoldman has quit [Remote host closed the connection]
hynkle has quit [Ping timeout: 260 seconds]
<apeiros_>
i0n: you should require 'yaml' first
<apeiros_>
and yes, it'd be to_yaml
<i0n>
apeiros_: ah damn thanks
<apeiros_>
also, f.writ() won't work well…
<asteve>
your_mom.to_yaml
<apeiros_>
(write)
<apeiros_>
i0n: and last but not least - in 1.9 you can just do: File.write(path, data)
mahmoudimus has quit [Quit: Computer has gone to sleep.]
gen0cide_ has joined #ruby
mmokrysz has joined #ruby
<i0n>
apeiros_: and when i "load" the yaml file, it will know this is a time object?
<apeiros_>
i0n: that's the point of yaml. also: just try
<i0n>
apeiros_: will do
<i0n>
thanks
mahmoudimus has joined #ruby
adeponte has quit [Remote host closed the connection]
tayy has quit [Remote host closed the connection]
hynkle has joined #ruby
cool has joined #ruby
cool has joined #ruby
cool has quit [Changing host]
cool has joined #ruby
<tyoc213>
apeiros_ about being more expensive, that was just an example because I didn't get what I was doing wrong, but for something like list.sort {|a,b| a.art.as_text.downcase <=> b.art.as_text.downcase} that note will apply?
<tyoc213>
or sort!
tayy has joined #ruby
<apeiros_>
no. but for that, you'd better use sort_by!
axl_ has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
<tds>
i've forked a gem, but the file in lib/gem.rb is doing things like 'require gem/version', which i believe is pointing to the non-forked version of the gem i had before
axl_ has quit [Read error: Connection reset by peer]
hynkle has quit [Quit: Computer has gone to sleep.]
<davidcelis>
and you'd have to rebundle, of course
<davidcelis>
why wouldnt you want to use bundler
axl_ has joined #ruby
<davidcelis>
i guess that's an irrelevant question but
<davidcelis>
that require should work, i guess
mmercer has joined #ruby
<tds>
i made a one line change that i think might fix a bug, and im just experimenting in irb
<klj613>
ruby compass sass cannot load such file sass (LoadError) <- no clue..
elaptics`away is now known as elaptics
<tds>
davidcelis: but if i do that absolute path require, and i do puts Savon::VERSION, it won't output my new version number
krz has joined #ruby
linoj has joined #ruby
macer_ has quit [Ping timeout: 240 seconds]
<apeiros_>
$LOAD_PATH - how does it fucking work…
iMe has joined #ruby
<davidcelis>
apeiros_: miracle
macer1 has quit [Ping timeout: 252 seconds]
<apeiros_>
mystical
<tds>
sorry
specialGuest has joined #ruby
clocKwize has joined #ruby
<tds>
i don't see the need for you to be unnecessarily hostile
specialGuest has quit [Changing host]
specialGuest has joined #ruby
iMe has quit [Client Quit]
<apeiros_>
tds: sorry, I shouldn't make fun of you. I'm just a bit tired and annoyed by how many people fail so hard to understand the concept behind $LOAD_PATH
ezra has quit [Ping timeout: 276 seconds]
codeFiend has quit [Ping timeout: 246 seconds]
<tds>
i can understand that. i assumed that the original gem was being seen in preference to my forked gem
<apeiros_>
it is. because your gem isn't seen at all
<tds>
right
<apeiros_>
because it is not in the load path
Criztian has quit [Remote host closed the connection]
<tds>
so just append my path to the load path
<tds>
or prepend it i should say
<apeiros_>
ruby -Ipath/to/your/gem/lib yourscript
<tds>
thanks for the help :-)
<apeiros_>
and read up on $LOAD_PATH.
ilyam has joined #ruby
<tds>
i will
<tds>
thanks
jjbohn has quit [Ping timeout: 246 seconds]
elhu has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
<apeiros_>
anyway, I'll leave now, not to be any more unecessarily hostile to anybody ;-)
sailias has quit [Quit: Leaving.]
jonathanwallace has joined #ruby
burgestrand has quit [Quit: Leaving.]
<shevy>
hmm
h4mz1d has joined #ruby
<shevy>
apeiros_, what editor did you use again?
<shevy>
*do
<davidcelis>
$EDITOR
<shevy>
grrrr
jonathan_ has joined #ruby
<davidcelis>
export EDITOR=vim
rizzy has joined #ruby
<lupine_85>
gedit4lyf
<Synthead>
say I have .match(/datadir.*=([\t ]+)?(.+?)(\/)?$/) . This returns 4 indexes. Is there a way I can replace a certain index with a string? something like .sub for multiple matches?
jonathanwallace has quit [Ping timeout: 244 seconds]
s0ber has quit [Read error: Connection reset by peer]
<Synthead>
davidcelis: I'm selecting some things I don't want to replace
nXqd_ has quit [Ping timeout: 260 seconds]
<Synthead>
davidcelis: for example, can I replace matchdata[1] ('b') in this? /\A(a) (b) (c)\z/
s0ber has joined #ruby
bluenemo has joined #ruby
t98479 has quit [Remote host closed the connection]
t2690 has joined #ruby
<apeiros_>
Synthead: you should look into the things people give you as a reply
<Synthead>
davidcelis: ooh, \1, \2, etc. works in gsub
<davidcelis>
yes it does
<davidcelis>
glad you discovered it on your own ;)
alindeman has quit [Ping timeout: 244 seconds]
elux has quit [Quit: Bye!]
clocKwize has quit [Quit: clocKwize]
alindeman has joined #ruby
tdubz has joined #ruby
chussenot has quit [Quit: chussenot]
workmad3 has joined #ruby
choffstein has joined #ruby
justsee|away is now known as justsee
<choffstein>
Does anyone know how to create a git repo from Grit or git-ruby? I feel like this should be very straight forward, but Grit::Repo.init keeps passing an InvalidGitRepositoryError and Git.init keeps saying it can't access the work tree
mike4_ has joined #ruby
tfittsy has joined #ruby
clocKwize has joined #ruby
<choffstein>
though, Grit::Repo.init_bare works fine
iamjarvo has joined #ruby
s1n4 has joined #ruby
<Synthead>
Does '.' in ruby regex include newlines?
<workmad3>
Synthead: sometimes
<davidcelis>
not if you do /^.$/
tfitts has quit [Ping timeout: 252 seconds]
chussenot has joined #ruby
<workmad3>
Synthead: /./ <-- that doesn't, /./m <-- that does
<davidcelis>
looks like rubular got that wrong
<apeiros_>
note that //m also affects \s
dangerousdave has quit [Quit: Leaving...]
<davidcelis>
/./ matches \n and so does /./m
<apeiros_>
no
<davidcelis>
see previous message bro
<apeiros_>
/./ does certainly not match \n
<davidcelis>
"looks like rubular got that wrong"
<davidcelis>
matching for me on rubular
banisterfiend has quit [Remote host closed the connection]
<workmad3>
davidcelis: I think if you put '
<workmad3>
\n' in on rubular it takes it literally
<apeiros_>
I'd very much like to see your regex… link?
<davidcelis>
ah
<workmad3>
davidcelis: if you click 'show invisibles', you can see the newline at the end and it isn't matched
<workmad3>
davidcelis: but if you put the m in, it is ;)
<davidcelis>
Yep, my bad
tdubz is now known as thomas
<davidcelis>
didn't even think it would literally take \n as a backslash and n, brainfart
<workmad3>
:)
banisterfiend has joined #ruby
<apeiros_>
but yes, rubular.com got the description wrong: "m make dot match newlines " - as said, m does not only affect .
axl_ has quit [Read error: Connection reset by peer]
<Synthead>
apeiros_: what is \s ?
<workmad3>
apeiros_: my ruby and rubular both reckon \s matches a newline regardless of //m
<apeiros_>
Synthead: whitespace
axl_ has joined #ruby
clocKwize has quit [Quit: clocKwize]
<Synthead>
apeiros_: ooh, like \t and ' ' ?
<lupine_85>
is there any point adding //u to regexes in ruby 1.9 ?
<apeiros_>
odd… I was quite sure it didn't…
<apeiros_>
lupine_85: yes
<apeiros_>
# encoding: binary; //.encoding
<lupine_85>
I am so not looking forward to the Big Migration at work
<apeiros_>
I'm missing that for strings
<apeiros_>
mostly the other way round, though
xaq has quit [Remote host closed the connection]
invsblduck has joined #ruby
<apeiros_>
i.e., I want encoding: utf-8, to have everything default to utf-8, but some strings I want to have in binary
<apeiros_>
with regexen, that's easy. just use //n
Stalkr_ is now known as gitgitgit
xaq has joined #ruby
jeffreybaird has joined #ruby
<invsblduck>
hi there, will File#read leave a fd open if I don't pass it a block? ie., do i have to explicitly get a fd and then close it if i don't pass a block? Thanks!
xaq has quit [Remote host closed the connection]
<workmad3>
apeiros_: sounds a bit messy tbh...
<apeiros_>
workmad3: why?
<invsblduck>
I guess I should say IO#read ..
savage- has quit [Ping timeout: 240 seconds]
<apeiros_>
workmad3: many things machine to machine are binary based.
<apeiros_>
but almost everything else is utf-8 based
jonahR has quit [Quit: jonahR]
<workmad3>
apeiros_: I can almost understand it with regex, because then you're altering how it matches, but strings... well you're then saying that this string in a utf8 encoded file isn't really utf8... messy
<workmad3>
apeiros_: I was about to clarify that I've never seen a language that managed to elegantly deal with string encodings
bbttxu has quit [Quit: bbttxu]
<workmad3>
apeiros_: it's always sucky in some way :P
<apeiros_>
true
<apeiros_>
ruby even fails at transcoding tables :(
<lupine_85>
the obvious solution is One Encoding To Rule Them All, and mandatory conversions on incoming data
h4mz1d has quit [Ping timeout: 246 seconds]
<apeiros_>
(some characters are just mysteriously missing)
tyoc213 has quit [Remote host closed the connection]
<lupine_85>
(plus byte arrays, of course)
<apeiros_>
lupine_85: meh, bad solution :-p
<lupine_85>
I like it ^^
<lupine_85>
probably a bear for performance in some cases though
<apeiros_>
different encodings have different advantages. but I'd be happy if we could at least move on to have everything in one of the unicode encodings.
<lupine_85>
(and it's pretty much the defacto state for many applications these days anyway)
baphled has quit [Ping timeout: 244 seconds]
<shevy>
apeiros_ is there one or two features of sublime you like a lot?
<workmad3>
lupine_85: that's the approach python took
<shevy>
(and if yes, which one)
<apeiros_>
lupine_85: well, the one to rule them all would need to use at least 3bytes/char right now, probably 4 in the foreseeable future, so it'd be a bear on memory and bandwidth…
Z_Mass has joined #ruby
<apeiros_>
shevy: its block editing rocks
<apeiros_>
its rendering engine being horribly slow on the retina OTOH blows
<workmad3>
lupine_85: I believe the reason ruby didn't was because the 'standard' 1 encoding is utf8 and there's some bugbears with utf8 transcoding in japanese, if I read the discussions correctly :)
<workmad3>
(or, more accurately, there's some bugbears with unicode transcoding in japanese or something like that)
savage- has quit [Read error: Connection reset by peer]
<apeiros_>
asians have issues with unicode in general, not utf-8 in particular
<apeiros_>
after all, utf-8 is just one way to represent unicode
<lupine_85>
unicode is suboptimal for their languages, and not everything can be represented by it
savage- has joined #ruby
<apeiros_>
tbh, what I read, it seems asians confuse fonts and encodings
<invsblduck>
lupine_85: I wasn't sure how to find the file descriptors in native ruby; leveraging /proc is a great idea! thanks much
<lupine_85>
but I want life to be easy for me. I don't care about how easy it is for other people ^^
pygmael has joined #ruby
<lupine_85>
invsblduck, ObjectSpace.each_object {|o| ... if o.is_a?(IO) }
paladinn has joined #ruby
<lupine_85>
but /proc/self/fd is far saner
<apeiros_>
at least as far as I understood, they were concerned about unicode not encoding different "strokes" to be used to paint the same character -> a font issue IMO, not an encoding issue. but I only glanced at the issues.
TheLZA has quit [Ping timeout: 252 seconds]
<apeiros_>
each_object(IO)
<workmad3>
lupine_85: ISO8859-1 all the way! :)
<lupine_85>
(you can also do (1..65535).collect {|n| IO.for_fd(n) }
<lupine_85>
with appropriate rescues
<lupine_85>
apeiros_, ooh, that's handy
<workmad3>
apeiros_: ah, is that the issue... I can understand it a bit more now then :)
<apeiros_>
workmad3: that's how I understood it. I may very well be wrong.
t2690 has quit [Remote host closed the connection]
<invsblduck>
lupine_85: damn i gotta start hanging out here more often ;p
infinitiguy has quit [Ping timeout: 265 seconds]
t36122 has joined #ruby
<workmad3>
apeiros_: aiui, the ordering and emphasis of strokes in a character is quite important to the meaning
<workmad3>
apeiros_: because a 'character' isn't really just a letter...
asobrasil has left #ruby [#ruby]
gitgitgit is now known as Stalkr_
wpaulson has joined #ruby
<apeiros_>
workmad3: hm, sounds odd then
GoGoGarrett has quit [Remote host closed the connection]
<apeiros_>
because as far as I got it, unicode strives to encode meaning
<apeiros_>
so if it had an influence on meaning, it'd imply that it'd need a different code point
nateberkopec has quit [Quit: Leaving...]
<apeiros_>
that's why it encodes e.g. all the different - signs too - because they have a different meaning
alanp_ has joined #ruby
balki has joined #ruby
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
<apeiros_>
(-, –, —; to just give 3)
<apeiros_>
:—)
nateberkopec has joined #ruby
<workmad3>
apeiros_: could be a different issue... I have a very poor understanding of japanese :)
nateberkopec has quit [Client Quit]
<apeiros_>
and I have none :)
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
opus has quit [Quit:]
<apeiros_>
damn, I hate to continue on old code…
<apeiros_>
gotta figure out what I intended to do first :(
opus has joined #ruby
<workmad3>
heh
jcooley has joined #ruby
<apeiros_>
it's worse when the code is currently in a non-working state :(
fbernier has quit [Ping timeout: 246 seconds]
<workmad3>
quick wiki read says it's about 'han unification', which seems to be a bit of a glyph/codepoint crossover
elhu has quit [Quit: Computer has gone to sleep.]
<workmad3>
'For example, the traditional Chinese glyph for "grass" uses four strokes for the "grass" radical 艹, whereas the simplified Chinese, Japanese, and Korean glyphs use three. But there is only one Unicode point for the grass character'
alanp has quit [Ping timeout: 240 seconds]
balki_ has quit [Ping timeout: 240 seconds]
internet_user has quit [Remote host closed the connection]
kyb3r has joined #ruby
internet_user has joined #ruby
sailias has joined #ruby
<apeiros_>
workmad3: so if the meaning of all 3 is "grass", why is that an encoding issue? have a Chinese, Japanese and Korean font…
h4mz1d has joined #ruby
<workmad3>
apeiros_: that's one argument in favour of the unification
<lupine_85>
I'd suggest we're not short of code points, so if it's a barrier to adoption, let them bloody have it
<workmad3>
apeiros_: I guess the argument against is that if you're using traditional chinese, you're probably trying to give a specific meaning and if you remove font information from that, you lose meaning
<workmad3>
apeiros_: similar to if you were to use middle english spelling to give a particular style to some prose...
<apeiros_>
well, what lupine says
<apeiros_>
also, unicode has mechanics to "add" meaning
<apeiros_>
e.g. you can express ä as a conjunction of a+¨
<lupine_85>
of course, you could then end up with the french wanting a different code point for their "a"
<lupine_85>
which would be an arse
<apeiros_>
but I think we're shadow-fighting here, since probably none of us really understands the issues at hand :-/
LouisGB has joined #ruby
<workmad3>
yeah
<workmad3>
:)
<lupine_85>
the only real solution is forced homogenisation of languages, both written and spoken
<apeiros_>
lupine_85: I think if they have a "homogenised" codepoint and provide "legacy" codepoints, that'll just naturally happen
<apeiros_>
simple wins
internet_user has quit [Ping timeout: 245 seconds]
<apeiros_>
(often)
<workmad3>
it sounds like it's probably a lot more subtle than a bunch of self-professed japanese ignorants can argue about successfully :)
<lupine_85>
はい
<apeiros_>
^^
stopbit has quit [Quit: Leaving]
jgelens has joined #ruby
jgelens has left #ruby [#ruby]
<workmad3>
in all honesty, I'm a bit dubious about the idea that you can completely divorce characters from their representations anyway... it mostly works for simple alphabets where the glyphs have no meaning on their own, but that's a simplistic case
savage- has quit [Remote host closed the connection]
ibash has quit [Quit: ibash]
<shevy>
divorce
<shevy>
marriage
<shevy>
those characters are damn active
qwerxy has joined #ruby
<workmad3>
shevy: I plan on creating a fantasy alphabet where the glyphs are polyamorous...
codeFiend has joined #ruby
<shevy>
hahaha
jonathanwallace has joined #ruby
gogiel has joined #ruby
wpaulson has quit [Ping timeout: 260 seconds]
<apeiros_>
workmad3: I think 2**32 codepoints should easily be sufficient to even provide enough space for alphabets where that indeed does not work
<apeiros_>
and maybe in 100 years, we can go down to 2**16 codepoints for anything non-historical
maxmmurphy_ has joined #ruby
<lupine_85>
just use JPEG-encoded byte arrays to represent text
<lupine_85>
(or maybe PNG - oh no, new encoding issues)
sepp2k1 has quit [Ping timeout: 246 seconds]
joelio has quit [Ping timeout: 246 seconds]
_br_ has quit [Ping timeout: 246 seconds]
joelio has joined #ruby
Z_Mass has quit [Ping timeout: 244 seconds]
maxmmurphy has quit [Ping timeout: 245 seconds]
maxmmurphy_ is now known as maxmmurphy
syamajala has quit [Remote host closed the connection]
<workmad3>
apeiros_: hell, I'm not sure we're even out of the basic multilingual plane yet :)
drago757 has joined #ruby
<apeiros_>
we're not
<apeiros_>
there are ridiculously large gaps in the code tables
s1n4 has left #ruby ["leaving"]
iamjarvo has quit [Quit: Computer has gone to sleep.]
t36122 has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
t55261 has joined #ruby
Spooner has joined #ruby
_br_ has joined #ruby
themadcanudist has joined #ruby
wpaulson has joined #ruby
cirwin has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
davidboy has joined #ruby
opus has quit [Ping timeout: 240 seconds]
opus has joined #ruby
jimeh3 has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
jrist is now known as jrist-afk
nobitanobi has joined #ruby
savage- has joined #ruby
whomp_ has quit [Ping timeout: 272 seconds]
sepp2k has joined #ruby
brianpWins has quit [Ping timeout: 248 seconds]
specialGuest has quit [Ping timeout: 244 seconds]
caiges has joined #ruby
Abbas| has joined #ruby
bowlowni has quit [Remote host closed the connection]
opus has quit [Quit:]
cbuxton has quit [Ping timeout: 268 seconds]
jimeh3 has quit [Ping timeout: 240 seconds]
emmanuelux has joined #ruby
cbuxton has joined #ruby
<shevy>
hmm
nobitanobi has quit [Read error: Connection reset by peer]
<shevy>
def foo(i)
<shevy>
'"'+i+'"'
<shevy>
end
<shevy>
vs
<shevy>
the same but
<shevy>
return '"'+i+'"'
nobitanobi has joined #ruby
<shevy>
I used to like explicit return... but in small methods... the return annoys me suddenly
<shevy>
:(
<gogiel>
shevy: wtf is that
whomp_ has joined #ruby
<shevy>
gogiel just a demo of a small method
<lupine_85>
the best thing about explicit return is not accidentally leaking internal objects
<gogiel>
why not "\"#{i}\""?
joephelius has quit [Ping timeout: 246 seconds]
<shevy>
gogiel you can use this too
<canton7>
%Q{"#{i}"} if you want even more chars
<shevy>
hehe
<shevy>
the return, guys, the return!!!
williamherry has quit [Ping timeout: 248 seconds]
<shevy>
lupine_85, do you use explicit return statements in your code?
<lupine_85>
sometimes
<lupine_85>
it really depends on what I'm writing
<lupine_85>
and how careful I'm being
<shevy>
sometimes is a popular answer in ruby projects :)
fayimora has quit [Quit: Busy…..zzzzz]
brianpWins has joined #ruby
williamherry has joined #ruby
banisterfiend has quit [Remote host closed the connection]
jlogsdon has quit [Remote host closed the connection]
joephelius has joined #ruby
[Neurotic] has joined #ruby
andrewhl has quit [Remote host closed the connection]
jimeh3 has quit [Ping timeout: 248 seconds]
minijupe has quit [Quit: minijupe]
indian has joined #ruby
awarner has quit [Remote host closed the connection]
<myobie>
Anyone know how to configure ruby debugger's port it provides it's control interface on?
rburton- has quit [Quit: rburton-]
specialGuest has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
kvirani has quit [Remote host closed the connection]
bricker88 has quit [Quit: Leaving.]
maletor has joined #ruby
williamherry has quit [Ping timeout: 260 seconds]
qwerxy has quit [Quit: offski]
<Muz>
myobie: from --help, there's a "--cport PORT Port used for control commands"
jasonLaster has quit [Remote host closed the connection]
opus has joined #ruby
jasonLaster has joined #ruby
<myobie>
Muz: yes, that let's me connect to a port. -- I want to setup the Debugger in my app to use a different port from the default.
ivancho has joined #ruby
<ivancho>
hi
iamjarvo has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
<shevy>
Dir.size? '/tmp'
<ivancho>
someone bored there who want bring me some help?
<shevy>
ivancho you must detail the problem
fastred has quit [Quit: fastred]
<ivancho>
ok im trying to start with ror and databasedotcom gem
nobitanobi has quit [Read error: Connection reset by peer]
<ivancho>
but i dont really know how the mvc of ruby works
<ivancho>
any place to learn that instead code
<ivancho>
?
Synthead has quit [Quit: p33 ba115]
nobitanobi has joined #ruby
h4mz1d has joined #ruby
<myobie>
ivancho: if you are learning rails, you might find better answers in #rubyonrails - but also, just check rubyonrails.com for some tutorials and such
minijupe has joined #ruby
jasonLaster has quit [Ping timeout: 245 seconds]
javos has joined #ruby
<ivancho>
thanks :)
mneorr has quit [Quit: Leaving.]
klj613 has quit [Remote host closed the connection]
<shevy>
ivancho, for general ruby questions, people here can help. for very specific rails problems, the people on #rubyonrails know this framework. I for instance dont know rails very well at all, could not help even if I want to
minijupe has quit [Client Quit]
rburton- has joined #ruby
linoj has quit [Quit: linoj]
<chichou>
I have a question with ruby, map and collect have same behavior but different usage, right ?
<shevy>
is there a way to find out the PID of this file, from within running it?
banisterfiend has joined #ruby
alanp_ has quit [Remote host closed the connection]
balki has quit [Remote host closed the connection]
<shevy>
puts "This script runs at PID #{pid_value}" something like that
<Muz>
shevy: Process.pid
<shevy>
oh yes... Process module. thanks Muz!
dpk has quit [Quit: Asleep at the keyboard.]
Banistergalaxy has quit [Ping timeout: 272 seconds]
<chichou>
Is thread in ruby usefull ?
iamjarvo has quit [Quit: Computer has gone to sleep.]
<apeiros_>
yes
<apeiros_>
also: Errno::ESTUPIDQUESTION
<shevy>
do bananas grow on trees ?
<chichou>
haha
<apeiros_>
do people plenk ?
Guest37424 is now known as Affix
tommyvyo has joined #ruby
Affix has quit [Changing host]
Affix has joined #ruby
<shevy>
yeah !
<chichou>
I mean are they efficient :)
<shevy>
except for Muz. He properly finishes his sentences.
<shevy>
define efficient
<apeiros_>
chichou: define 'efficient'
emmanuelux has quit [Ping timeout: 244 seconds]
<chichou>
Do ruby use all processors for example ?
Aenigma has joined #ruby
<apeiros_>
chichou: ruby is a language, the execution of threads is a runtime problem, not a language problem
<apeiros_>
chichou: jruby: yes, uses all cpus, mri/kri: no, don't use all cpu's
LouisGB has quit [Ping timeout: 248 seconds]
araujo has quit [Ping timeout: 252 seconds]
qwerxy has joined #ruby
tommyvyo has quit [Client Quit]
araujo has joined #ruby
<chichou>
thanks apeiros_
<nobitanobi>
I need some help here… I'm doing a gem to fetch the Yelp API. I have several methods depending on which resource to fetch, and some of those methods "require" some arguments to fetch the resource. If those arguments are passed to the method I return the JSON, but if not, I would like to know what's a good way to let the user know that he is missing mandatory arguments. Right now I return NIL.
Jay_Levitt has quit [Remote host closed the connection]
tayy has joined #ruby
opus has joined #ruby
Jay_Levitt has joined #ruby
myobie has quit [Quit: myobie]
fantazo has joined #ruby
fermion has quit [Ping timeout: 248 seconds]
virunga has quit [Quit: Sto andando via]
kirun has quit [Quit: Client exiting]
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
fermion has joined #ruby
rburton-_ has joined #ruby
aezop has quit [K-Lined]
pu22l3r has quit [Ping timeout: 246 seconds]
rburton- has quit [Ping timeout: 252 seconds]
savage- has quit [Remote host closed the connection]
adeponte has joined #ruby
tfitts has quit [Read error: Connection reset by peer]
tfitts has joined #ruby
<nobitanobi>
Is this a good way to access a class instance variable from within an instance method? https://gist.github.com/3353885 - (Yelpi::Search.base_url)
_adeponte has joined #ruby
alanp has joined #ruby
balki has joined #ruby
SCommette has quit [Quit: SCommette]
rburton- has joined #ruby
specialGuest has quit [Quit: WeeChat 0.3.8]
infinitiguy has quit [Quit: Leaving.]
myobie has joined #ruby
adeponte has quit [Ping timeout: 240 seconds]
<cirwin>
nobitanobi: seems fine
myobie has quit [Client Quit]
<cirwin>
I'd probably do: def base_url; self.class.base_url; end
rburton-_ has quit [Ping timeout: 252 seconds]
tfitts has quit [Ping timeout: 268 seconds]
<nobitanobi>
cirwin: ok. Thanks.
nwest has quit [Quit: Computer has gone to sleep.]
fullofcaffeine has quit [Remote host closed the connection]
<nobitanobi>
but if you define def base_url, it's going to be an instance accessor right?
jimeh3 has quit [Ping timeout: 272 seconds]
savage- has joined #ruby
CQQL has joined #ruby
CQQL has quit [Client Quit]
<Spooner>
nobitanobi: Looks more like a constant there, unless there are times when it needs to change (I don't know yelpi).
sailias has joined #ruby
<nobitanobi>
Spooner: right. that's true.
<Spooner>
nobitanobi : you add def base_url, it isn't instead of your code. It is so you can access the class instance value from any instance, without having to qualify it (Yelpi::Search or self.claa).
<nobitanobi>
Oh…Ok, that makes sense
whicling has joined #ruby
<nobitanobi>
so you send the method to an object to access the class variable
Russell^^ has quit [Quit: Russell^^]
<nobitanobi>
*class instance variable.
<nobitanobi>
nice.
maletor has quit [Ping timeout: 260 seconds]
tommyvyo has joined #ruby
<Spooner>
Yes, so in #general, you'd just call base_url and the method would redirect that to the accessor on the class itself.
maletor has joined #ruby
tommyvyo has quit [Client Quit]
mike4_ has quit [Ping timeout: 276 seconds]
<Spooner>
But as I said, on first glance, it looks like it is really a constant.
<nobitanobi>
yes, it is. Thanks Spooner
alanp has quit [Remote host closed the connection]
balki has quit [Remote host closed the connection]
<Spooner>
Also, I'd suggest not adding accessors/readers/writers for stuff you don't need to use. Since you have to set the client in the constructor, I would imagine there is no reason to write it after that.
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
uris has quit [Quit: leaving]
asteve_ has joined #ruby
bluenemo has quit [Remote host closed the connection]
Konboi has joined #ruby
elaptics is now known as elaptics`away
tommyvyo has joined #ruby
niklasb has quit [Ping timeout: 252 seconds]
<nobitanobi>
Spooner: correct. I had it designed it in another way and I forgot it. Thanks.
tommyvyo has quit [Client Quit]
<nobitanobi>
gonna go now. thanks for your help guys.