sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mg^^ is now known as mg^afk
sputnik13 has joined #ruby
sputnik13 has quit [Client Quit]
<havenwood>
stabby stab stab
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
<Dovid>
lethjakman: It still says that it does not exist but it does here: /usr/pgsql-9.1/include/libpq-fe.h
saarinen has joined #ruby
vise890 has quit [Ping timeout: 240 seconds]
codeFiend has joined #ruby
<shevy>
do you guys start to write pseudo code in your todo list?
omosoj_ has joined #ruby
<shevy>
like ruby code that is not totally valid but kinda hints towards where it should go
oo_ has joined #ruby
BraddPitt has joined #ruby
b00stfr3ak has quit [Ping timeout: 258 seconds]
testcore has quit [Quit: [BX] Hanson uses BitchX. Mommy, can we dress like boys again?]
<Lutece>
shevy: its kind of each to his or hers own, I usually go for a top down design and make a structure out of all the function i will need then fill it in
reset has quit [Quit: Leaving...]
pietr0 has quit [Quit: pietr0]
mansi has quit [Ping timeout: 252 seconds]
reset has joined #ruby
<Lutece>
but pseudo code works fine
saarinen has quit [Client Quit]
subbyyy has quit [Ping timeout: 252 seconds]
pu22l3r has joined #ruby
silkfox has joined #ruby
<shevy>
well
oo_ has quit [Remote host closed the connection]
<shevy>
Lutece I mean specifically if you have a very large project
<shevy>
and you want to change or tweak existing functionality
omosoj has quit [Ping timeout: 276 seconds]
<shevy>
but may have to edit several .rb files before you can finish that
oo_ has joined #ruby
<shevy>
I have like a 1000 lines of todo file for one project here
<shevy>
and now I even start to write up pseudocode into it haha
<shevy>
in hope that I can easier translate this lateron when I have more time and motivation to add this or fix some bugs etc...
<Lutece>
Yeah for that psudocode would probably be the best option, although I would make it part of a "plan" document that is sperate from the code, rather than making a mess of the source
RaptorJesus has joined #ruby
Shidash has quit [Read error: Connection timed out]
reset has quit [Ping timeout: 245 seconds]
dpswireless has joined #ruby
<Lutece>
Also if you got 1000 lines of TODO then you may be going into too much detail depending on how much source you have to edit.
bijan07077 has joined #ruby
i_s has quit [Remote host closed the connection]
kotk has joined #ruby
<shevy>
yeah, the todo file is separate from the real source
oo_ has quit [Ping timeout: 276 seconds]
Solnse has quit [Quit: Leaving.]
<Lutece>
Hmmm
<Lutece>
well i would keep it seprate if i where you from the todo list
<gjvc>
were
<Lutece>
perhaps put a note in the ToDO as implement psudo function x
<gjvc>
not where
havenwood has quit [Ping timeout: 272 seconds]
<Lutece>
sorry, it's late
kotk_ has quit [Ping timeout: 252 seconds]
<gjvc>
ok
BraddPitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yubrew has joined #ruby
binaryhat has quit [Quit: Leaving]
zorak8 has quit [Ping timeout: 276 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
replay has joined #ruby
replay_ has quit [Ping timeout: 265 seconds]
yubrew has quit [Ping timeout: 240 seconds]
zz_karupa is now known as karupa
upsell5 has quit [Quit: upsell5]
musashi1 has joined #ruby
rostam has quit [Read error: Connection reset by peer]
freezey has quit [Remote host closed the connection]
Lightning has joined #ruby
Lightning has left #ruby ["Leaving"]
phoo1234567 has quit [Quit: Leaving]
pu22l3r has quit [Remote host closed the connection]
lolmaus has joined #ruby
jamto11 has joined #ruby
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BWStearns has quit [Ping timeout: 258 seconds]
kitak has joined #ruby
aspires has quit []
salt_ has joined #ruby
<salt_>
sorry, totally not ruby talk, but does anyone know where i can go to get php help?
<RubyPanther>
salt_: I don't know, but the hookers and blow are on 7th Ave
livcd has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
<shevy>
lol
<shevy>
salt_ join ##php
<salt_>
hookers and blow sounds way better
<shevy>
salt_ or drop php and use ruby
<salt_>
still think ill have to come back to this php issue though
<shevy>
you have my pities man
<salt_>
thanks
mikecmpbll has quit [Quit: i've nodded off.]
combusean has quit [Ping timeout: 258 seconds]
<shevy>
compiling webkitgtk takes so long :( started it like 3 hours ago, it is still going
<havenwood>
this book is made of rabbits and marmalade...!
yubrew has quit [Ping timeout: 240 seconds]
thomasxie has quit [Read error: Connection reset by peer]
<rundll32>
btw i know c and c++ concepts very clearly.
<rundll32>
i also 8086 assembly language.
davedev24 has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
subbyyy has quit [Ping timeout: 240 seconds]
eighthbit has joined #ruby
Melpaws has joined #ruby
dayepa has quit [Ping timeout: 265 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dayepa has joined #ruby
<GlenK>
rundll32: koans is kinda cool. I tend to favor why's guide as books go, just because it's so cool. there are probably better books if you're simply after learning.
codeFiend has quit [Quit: codeFiend]
<sevenseacat>
i dont remember how i learnt... i think i just jumped right in
<GlenK>
don't know if dietel and dietel is a thing for ruby, but if so then those are really good
<sevenseacat>
went okay, `rails new`, let's go >_>
timonv has joined #ruby
<GlenK>
probably wouldn't be a bad route to go with given the guy knows C already
afex has quit []
<sevenseacat>
i was an experienced PHP dev beforehand though (whether thats a good or bad thing, ill let you decide)
<omosoj_>
Anyone here into fiction? have any suggestions? something sci fi or computer related, maybe with a little social/political commentary?
Bira has quit [Remote host closed the connection]
<arrubin>
omosoj_: Anything by Heinlein.
badhatter has joined #ruby
Shidash has joined #ruby
<GlenK>
omosoj_: cant go wrong with neuromancer and snow crash
chipotle has quit [Quit: cya]
<GlenK>
I'm of course addicted to a song of fire and ice these days
<GlenK>
dune, ender's game, foundation. haha, I could do this all day. better stop while I'm ahead and not getting kicked
<omosoj_>
GlenK, I've read In the beginning... :)
<GlenK>
oh, one more. the little prince
mweshi has joined #ruby
<GlenK>
just marvelous
<GlenK>
it's a kids book though
pietr0 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<omosoj_>
GlenK, and snow crash seems interesting.
timonv has quit [Ping timeout: 255 seconds]
<omosoj_>
Yeah I wouldn't call it a masterpiece of literature heh
<omosoj_>
arrubin, do you suggest anything in particular? I read a few PKD shorts a while ago and liked them. Maybe I'll start with a collection of his shorts
<arrubin>
omosoj_: Stranger in a Strange Land or The Moon is a Harsh Mistress.
Spami has joined #ruby
<arrubin>
Or even Starship Troopers (quite different from the movie).
sambao21 has joined #ruby
<GlenK>
hienlien definitely has the political/social commentary
Spami has quit [Client Quit]
<GlenK>
argh. I read "notes from underground" not so long ago and it pretty much went over my head. like 10 miles over my head.
dayepa has quit [Ping timeout: 240 seconds]
boycey has quit [Quit: boycey]
<omosoj_>
GlenK, really? I loved Notes from Underground.
charliesome has joined #ruby
<GlenK>
usually, I read a book, and I have to slog through it for a bit, then a few chapters in I get a flow and it's all good. not so with that book.
<omosoj_>
I related to it (maybe too much, lol!)
<GlenK>
maybe it was a bad translation? I dunno.
rundll32 has quit [Ping timeout: 252 seconds]
beef-wellington has joined #ruby
<omosoj_>
I think I read an excerpt, actually.
dayepa has joined #ruby
s00pcan has quit [Ping timeout: 276 seconds]
livcd has joined #ruby
xcesariox has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Hanmac1 has joined #ruby
lw has quit [Quit: s]
s00pcan has joined #ruby
<omosoj_>
Think I'm gonna start with Snow Crash and a collection of Heinlein's shorts. Thanks guys
Melpaws has quit [Quit: Leaving.]
sambao21 has quit [Ping timeout: 258 seconds]
Hanmac has quit [Ping timeout: 258 seconds]
mercwithamouth has quit [Ping timeout: 276 seconds]
Martxel has quit [Ping timeout: 252 seconds]
Abyss__ has joined #ruby
xcesariox has quit [Ping timeout: 252 seconds]
livcd has quit [Ping timeout: 276 seconds]
raspberryfan has joined #ruby
hamakn has quit [Remote host closed the connection]
musashi1 has joined #ruby
beef-wellington has quit [Ping timeout: 240 seconds]
cescalante is now known as ce_afk
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
subbyyy has joined #ruby
momomomomo has quit [Quit: momomomomo]
jhulten_ has quit [Remote host closed the connection]
dyreshark has quit [Quit: I just dont know what went wrong!]
<jenrzzz>
hmmm. i just realized that my prototypical solution to the frobenius mcnuggets problem that i’ve been asking in interviews is wrong
hermanmunster has quit [Remote host closed the connection]
<sevenseacat>
lol oops
<jenrzzz>
i had a candidate realize that and was impressed. not sure if i should change it
<jenrzzz>
it’s “write a function to determine if it’s possible to order n chicken mcnuggets, given that they come in 6, 9, and 20-piece orders”
Rahul_Roy has joined #ruby
dseitz has joined #ruby
subbyyy has quit [Ping timeout: 240 seconds]
<jenrzzz>
and i try to guide people to a recursive greedy algorithm, like making change. but it’s not the same because 6, 9, and 20 are not all multiples of each other, unlike coins (1, 5, 10, 25, etc.)
<sevenseacat>
... i would have to really sit and think about how to do that
hermanmunster has joined #ruby
tyll has quit [Ping timeout: 258 seconds]
Bira has joined #ruby
<sevenseacat>
this is going to occupy my brain now
<Steve21>
I am trying to install a gem locally to overright a existing gem. I ran the Rake build and then a gem build and gem install, but still does not seem to be updating
<Steve21>
is there something i am likely missing?
<centrx>
You can only overwrite or upright a gem, never overright
sensen has joined #ruby
<Steve21>
ha ha. thanks
<Steve21>
I am trying to install a gem locally to overwrite a existing gem. I ran the Rake build and then a gem build and gem install, but still does not seem to be updating
radic has quit [Ping timeout: 276 seconds]
hakunin_ has quit []
<Steve21>
ideas?
<agent_white>
Steve21: If you are overwriting it, why just remove it?
bijan07077 has quit [Quit: bijan07077]
<agent_white>
jenrzzz: I'm curious about your question and looking at your code :) So if this is a 'knapsack' problem, is there price involved for each "mcnugget-set"?
radic has joined #ruby
<Steve21>
just tried. still not working. thinking the build is not working
<Steve21>
build says success, but clearly not so much
<jenrzzz>
agent_white: it’s not a knapsack problem, just linear combination
bijan07077 has joined #ruby
<agent_white>
Steve21: gist what you did, and your full error. Then I bet someone can help.
freerobby has quit [Quit: Leaving.]
<Steve21>
getting no errors. that sthe prob
<Steve21>
builds are all good. but likely missing a step
<sevenseacat>
i figured there was a formula for working it out, i just didnt know what it was
<arrubin>
agent_white: You would have to be familar with a very wide range of CS topics to deal with the style of interview that jenrzzz seems to perform.
pu22l3r has quit [Remote host closed the connection]
rOOb has joined #ruby
antonishen has quit [Ping timeout: 245 seconds]
Striki has quit [Ping timeout: 240 seconds]
<arrubin>
agent_white: Many companies these days are moving to work examples, meaning they have you perform a small bit of work that is actually similar to what you would do on the job.
hakunin has joined #ruby
mroth has quit [Ping timeout: 252 seconds]
<arrubin>
agent_white: And a large number of companies are bad at interviewing and the technical portion is trivial.
dioms_ has quit [Ping timeout: 240 seconds]
yacks has quit [Ping timeout: 265 seconds]
machty has quit [Ping timeout: 252 seconds]
thesheff17 has joined #ruby
<agent_white>
arrubin: Ah I figured... at least I've _heard_ that in junior dev positions they expect you to not know much at all, eh?
<arrubin>
agent_white: Depends on the company.
EasyCo has quit [Ping timeout: 240 seconds]
jamto11 has joined #ruby
<arrubin>
agent_white: Some companies feel like they are being rigorous if they test your memory of CS concepts.
Rahul_Roy has quit [Ping timeout: 245 seconds]
jeffreybaird has quit [Ping timeout: 245 seconds]
pipework has quit [Ping timeout: 265 seconds]
<arrubin>
agent_white: Most Rails shops, for instance, are going to be far more interested in your ability to write Rails code.
<agent_white>
arrubin: I would hope they wouldn't, I'm currently on an extended break from college, so I haven't had practice with more CS-related stuff in a couple years :P
machty has joined #ruby
antonishen has joined #ruby
<agent_white>
arrubin: Yeah that's what I'm looking for, actually! My aim is for a Rails shop, but otherwise in the web-dev arena.
aiguu has joined #ruby
mroth has joined #ruby
EasyCo has joined #ruby
<agent_white>
elsewhere in the web-dev arena**
Striki has joined #ruby
dioms_ has joined #ruby
Rahul_Roy has joined #ruby
pipework has joined #ruby
<arrubin>
Fortunately most companies have moved on from the lame puzzles.
jamto11 has quit [Ping timeout: 240 seconds]
jeffreybaird has joined #ruby
ffranz has quit [Quit: Leaving]
aspires has quit []
hakunin has quit []
<agent_white>
Good to hear :). I'm going to be riding on my enthusiasm to win interviews... definitely don't lack it ;P
BraddPitt has joined #ruby
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sputnik13 has joined #ruby
<jenrzzz>
arrubin, agent_white that’s just one question in my repertoire. i don’t expect the solution right away, it’s just a tool for determing what people do and do not know
<jenrzzz>
not knowing the answer doesn’t count against you
BraddPitt has quit [Client Quit]
<arrubin>
jenrzzz: What kind of work does the actual job entail?
maestrojed has quit [Quit: Computer has gone to sleep.]
Steve21 has quit [Quit: Steve21]
<arrubin>
jenrzzz: Also, are you aware of a text that covers dynamic programming other than CLRS?
<agent_white>
jenrzzz: So if you don't mind me picking your brain... what would you like to see in a candidate that did not know the solution?
Radar is now known as notradar
notradar is now known as Radar
mjsmith2 has quit [Remote host closed the connection]
AlSquirrel has quit [Read error: Connection reset by peer]
ixti has quit [Ping timeout: 252 seconds]
<jenrzzz>
arrubin: i used the dasgupta book in school
circ-user-lDwNg has quit [Remote host closed the connection]
circ-user-6PoLT has joined #ruby
MatthewsFace has joined #ruby
<jenrzzz>
arrubin: i’ve interviewed for a few different positions. they are kind of atypical cause my team is so small. we do internal rails apps and build tools for hardware validation and stuff like that
<jenrzzz>
generally we just look for ways to make things better for the hardware team we our integrated with
lw has joined #ruby
<jenrzzz>
and try to keep the electrical engineers from perpetuating shitty code
oo_ has quit [Remote host closed the connection]
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
<jenrzzz>
agent_white: i usually talk it through with them, give them hints. if they completely blank and don’t even know where to start, i’d probably ask how they would go about acquiring the knowledge they need to solve the problem
Es0teric has joined #ruby
<jenrzzz>
agent_white: depends on the candidate and position, though
dideler has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
circ-user-6PoLT has quit [Remote host closed the connection]
<agent_white>
jenrzzz: Ahhh I see.
jack_rabbit has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
lotec has joined #ruby
bijan07077 has quit [Read error: Connection reset by peer]
lotec has left #ruby [#ruby]
dideler has joined #ruby
jack_rabbit has joined #ruby
Dovid has joined #ruby
aniM has joined #ruby
yacks has joined #ruby
marcdel_ has quit [Ping timeout: 255 seconds]
bijan07077 has joined #ruby
<agent_white>
jenrzzz: So sometimes, not knowing is not a problem rather than going about learning what you don't know?
<agent_white>
jenrzzz: At least, my last boss seemed to it when he said "Hey agent_white, do you know Rails?" and I said "No, but I can learn it."
r_rios has quit [Ping timeout: 265 seconds]
ascarter has joined #ruby
zz_jrhorn424 is now known as jrhorn424
marcdel has joined #ruby
bijan07077 has quit [Ping timeout: 252 seconds]
<jenrzzz>
agent_white: i think technical inteview questions should be more topics for conversation than right/wrong
<arrubin>
A giant buzzer should go off when the candidate is wrong.
<jenrzzz>
i usually put a trapdoor in front of the whiteboard
<wallerdev>
i couldnt figure out one of the questions in an interview for my current job
<wallerdev>
but the guy stisll wanted to hire me because of how i approached the problem and talked about it with him
freerobby has quit [Read error: Connection reset by peer]
freerobby1 has joined #ruby
Megtastique has quit []
i_s has joined #ruby
<sevenseacat>
ive had the opposite problem in interviews 'yes you figured out the problem and got the right answer, but we didnt like how you approached it'
braincrash has joined #ruby
pu22l3r has joined #ruby
marcdel has quit [Ping timeout: 245 seconds]
dmitrykorotkov has joined #ruby
yubrew has joined #ruby
freerobby1 has quit [Ping timeout: 258 seconds]
rm_ has quit [Disconnected by services]
<wallerdev>
haha ive had that too
marcdel has joined #ruby
<wallerdev>
it was a problem where i already knew the answer though so i just solved it
<wallerdev>
and they were like okay thanks bye
pietr0 has quit [Quit: pietr0]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ktun has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
<MatthewsFace>
They obviously didn't want experience
<MatthewsFace>
haha
mansi has joined #ruby
krz has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
Valesk has joined #ruby
oo_ has quit [Remote host closed the connection]
eka has joined #ruby
oo_ has joined #ruby
timonv has joined #ruby
phinfonet has quit []
Hanmac has joined #ruby
Hanmac1 has quit [Ping timeout: 265 seconds]
alvaro_o has quit [Quit: Ex-Chat]
timonv has quit [Ping timeout: 240 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
Vivekananda has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
aniM has quit [Ping timeout: 240 seconds]
sputnik13 has joined #ruby
sputnik13 has quit [Client Quit]
Es0teric has joined #ruby
Shidash has quit [Ping timeout: 265 seconds]
Es0teric has quit [Max SendQ exceeded]
Es0teric has joined #ruby
sensen has quit [Ping timeout: 240 seconds]
jrhorn424 is now known as zz_jrhorn424
sensen has joined #ruby
zcreative has joined #ruby
gregf_ has quit [Ping timeout: 240 seconds]
Vivekananda has quit [Quit: Ex-Chat]
Vivekananda has joined #ruby
rOOb has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
SCommette has joined #ruby
rOOb has joined #ruby
s2013 has joined #ruby
andrewjanssen has joined #ruby
lolmaus has quit [Ping timeout: 240 seconds]
_sambao21 has joined #ruby
sambao21 has quit [Ping timeout: 255 seconds]
andrewjanssen has quit [Client Quit]
SCommette has quit [Client Quit]
livcd has joined #ruby
<agent_white>
sevenseacat: No shit? Would approaching it from a 'different angle' make that much of a difference?
<sevenseacat>
apparently so
<dseitz>
Not enough diagram, needs more diagram
<sevenseacat>
kinda like the high school maths classes 'show your working out'
sski has joined #ruby
i_s has quit [Remote host closed the connection]
pietr0 has joined #ruby
ce_afk is now known as cescalante
gregf_ has joined #ruby
livcd has quit [Ping timeout: 240 seconds]
ebwise has joined #ruby
echevemaster has quit [Quit: WeeChat 0.4.3]
tcstar has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
omosoj_ has quit [Ping timeout: 258 seconds]
musashi1 has joined #ruby
adamnbowen has joined #ruby
jeregrine has quit [Ping timeout: 240 seconds]
cjsarette has quit [Max SendQ exceeded]
MatthewsFace has quit [Quit: This computer has gone to sleep]
<ebwise>
is there a way to start an http server from the cli? an equivalent to 'python -m SimpleHTTPServer'
cjsarette has joined #ruby
cjsarette has quit [Max SendQ exceeded]
Dovid has quit [Ping timeout: 276 seconds]
s2013 has quit [Ping timeout: 240 seconds]
hugg has joined #ruby
<agent_white>
sevenseacat: That's wierd. I guess you dodged a bullet though, eh?
wallerdev has quit [Quit: wallerdev]
<sevenseacat>
agent_white: i do wish i'd gotten the job but hey, not meant to be eh
cjsarette has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
adamnbowen has quit [Client Quit]
<agent_white>
sevenseacat: I mean, if the interviewer brought that up, maybe you did avoid some possible potholes down the road? :)
mrnugget has joined #ruby
maestrojed has joined #ruby
apeiros has joined #ruby
racaille has joined #ruby
<sevenseacat>
true
armyriad has quit [Ping timeout: 240 seconds]
armyriad has joined #ruby
Steve21 has joined #ruby
yubrew has joined #ruby
oo_ has quit [Remote host closed the connection]
hugg1 has joined #ruby
mxd has quit [Ping timeout: 265 seconds]
hugg has quit [Disconnected by services]
hugg1 is now known as hugg
<pontiki>
did they offer what they didn't like about your approach?
freerobby has joined #ruby
gigetoo has quit [Read error: Connection reset by peer]
<musashi1>
Does anyone know if there is a chat room for media? specifically videos?
<Steve21>
go into lib>qless>job.rb
<Steve21>
comment out lines 198 to 217
Dysruption has joined #ruby
<Steve21>
rebuild the gem and install the gem
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Steve21>
then go back and uncomment the lines, rebuild, and reinstall the gem
<sevenseacat>
and how are you rebuilding and installing the gem
_sambao21 has quit [Quit: Computer has gone to sleep.]
<Steve21>
running: bundle exec rake core:build, and then Gem build and gem install on the local gemfile
tcstar has quit [Remote host closed the connection]
<sevenseacat>
it would be much easier and a lot less ambiguous if you just like copied and pasted your terminal to show what you were doing
<Steve21>
literally in term, I am running ‘bundle exec rake core:build’. After tha I run ‘gem build [gemspec path]’, followed by ‘gem install [.gem path]’
Rahul_Roy has quit [Quit: Connection closed for inactivity]
<sevenseacat>
right, thats different than what you said before
b00stfr3ak has joined #ruby
<Steve21>
i wrote: “running: bundle exec rake core:build, and then Gem build and gem install on the local gemfile”, hows that different?
<sevenseacat>
because your actual commands have no reference to a 'local Gemfile'
<Steve21>
Okay, fair enought. Sorry i thought that was clear when i added “on the local gemfile”
funburn has joined #ruby
<Steve21>
So is there something i am missing?
<Steve21>
I thinking i am following the right process. Or am i missing something obvious
<zastern>
Is it just that if I use a local variable inside a class method, when an instasnce var of the same name is defined, but the local var isn't, that ruby uses the instance var value?
pu22l3r has quit [Remote host closed the connection]
mdmcaf has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
KAO has joined #ruby
connor_goodwolf_ has quit [Ping timeout: 240 seconds]
davedev24 has quit [Remote host closed the connection]
Cache_Money has joined #ruby
oo_ has joined #ruby
adam_ is now known as adam
adam is now known as Guest52266
ClarusCogitatio has quit [Ping timeout: 240 seconds]
<Hanmac>
myfriend: quote: until a 2012 article in Slate magazine quoted a statement from a fellow programmer saying, "Jonathan is _why, he is fine, and he just wants to be left alone."
AlSquire has joined #ruby
<pontiki>
the one person i knew personally with a wiki page no longer has one :(
<omosoj_>
Say I have a website I want to grab a few paragraphs off. how do i do this? /[<beginstring>(..)<endstring>].match(website)
Valesk has joined #ruby
<pontiki>
omosoj_: see immediately prior mention of nokogiri (and maybe mechanize)
i_s_ has joined #ruby
sdwrage has joined #ruby
sgu has quit [Ping timeout: 240 seconds]
<omosoj_>
hm. search my irc log?
<pontiki>
it's like 12 lines up
sgu has joined #ruby
<omosoj_>
woops lol.
<pontiki>
if you do just want to use a Regexp, you can do that as well
<apeiros>
omosoj_: I'd start at the beginning of your log :-p
<pontiki>
pfft :P
livcd has quit [Ping timeout: 255 seconds]
Deele has quit [Ping timeout: 255 seconds]
<pontiki>
but folks generally prefer parsing html
<myfriend>
Hanmac, cool, I wish all the best for him.
<omosoj_>
i was searching for nokogirl. lazy eyes...
_justin has quit [Ping timeout: 258 seconds]
yubrew has joined #ruby
i_s_ has quit [Ping timeout: 252 seconds]
_justin has joined #ruby
LACP has quit [Ping timeout: 240 seconds]
<omosoj_>
pontiki, hm, ok.
geopet has quit []
mrnugget has quit [Read error: Connection reset by peer]
agent_white has quit [Read error: Connection reset by peer]
bal has joined #ruby
rkazak_ has joined #ruby
kate_r has joined #ruby
<omosoj_>
whoa mechanize is crazy. awesome
KAO has quit [Ping timeout: 252 seconds]
agent_white has joined #ruby
kate_r has quit [Client Quit]
mrnugget has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
brunops has quit [Quit: leaving]
mrnugget has quit [Read error: Connection reset by peer]
livcd has joined #ruby
ndrei has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
mrnugget has joined #ruby
mrnugget has quit [Client Quit]
raspberryfan has joined #ruby
raspberryfan has quit [Remote host closed the connection]
raspberryfan has joined #ruby
LACP has joined #ruby
apeiros has quit [Ping timeout: 252 seconds]
bMalum___ has joined #ruby
Deele has joined #ruby
<omosoj_>
pontiki, you use scrapers instead of nokogiri?
i_s has quit [Quit: i_s]
tectonic has quit []
freerobby has joined #ruby
<pontiki>
i wrote scrapers
<pontiki>
it mainly uses mechanize, which uses nokogiri
<pontiki>
but there's a little nokogiri in there, IIRC
subraminion has joined #ruby
s2013 has quit [Ping timeout: 252 seconds]
<pontiki>
so i use nokogiri a *lot*, but not necessarily directly
freerobby has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
Valesk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<omosoj_>
ok, what other functionalities are in scrapper?
<rkazak_>
postmorden: u in ?
<jimbauds>
good to know i'm not alo9ne
<bricker`LA>
For those using chef, what do you name your nodes/VMs? The previous dev here started the convention "web001", but I don't understand the numbers
mansi has joined #ruby
<hugg>
pontiki: (scrapers is really an awesome awesome example btw) thanks again.
tobago has joined #ruby
aiguu has joined #ruby
frogssgy has joined #ruby
mansi has quit [Ping timeout: 258 seconds]
oo_ has quit [Remote host closed the connection]
Cache_Money has quit [Quit: Cache_Money]
oo_ has joined #ruby
frosgy has quit [Ping timeout: 255 seconds]
maestrojed has quit [Read error: Connection reset by peer]
<pontiki>
nw, hugg
maestroj_ has joined #ruby
maestroj_ has quit [Client Quit]
funburn has quit [Quit: funburn]
kitak_ has quit [Remote host closed the connection]
<robert_>
so I'm having this really "interesting" issue where I'm trying to run a scheduler inside of a daemonized process, HOWEVER the scheduler only wants to run when app I'm working on isn't daemonized. :/
Mon_Ouie has quit [Ping timeout: 240 seconds]
relix has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
nari has joined #ruby
Squarepy has joined #ruby
yubrew has joined #ruby
claymore has joined #ruby
<rkazak_>
robert_: have you reduced your test case?
Jnco has left #ruby [#ruby]
<rkazak_>
robert_:can you share the code?
i_s has joined #ruby
<robert_>
not the code I'm working on, but I can throw together a sample.
ndrei has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
rshetty has joined #ruby
irrci has joined #ruby
<rkazak_>
robert_:maybe thats the place to start reduce everything to the bare minimum
andikr has joined #ruby
yubrew has quit [Ping timeout: 245 seconds]
pietr0 has quit [Quit: pietr0]
i_s has quit [Ping timeout: 240 seconds]
<robert_>
weird.. that works.
vekfautles has joined #ruby
<robert_>
Yeah.
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ktun has joined #ruby
sooik has joined #ruby
<rkazak_>
ok, so selectively styart to replace....
yfeldblu_ has joined #ruby
<rkazak_>
robert_:the removed code...
timonv has quit [Remote host closed the connection]
sinkensa_ has joined #ruby
ktun has quit [Ping timeout: 255 seconds]
yfeldblum has quit [Ping timeout: 276 seconds]
<robert_>
ah, there we go. it stops working when I move the job out to a required file.
hermanmunster has quit [Remote host closed the connection]
tectonic has quit [Client Quit]
hermanmunster has joined #ruby
combusean has quit [Ping timeout: 265 seconds]
omosoj_ has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 255 seconds]
anaeem1_ has joined #ruby
robbyoconnor has joined #ruby
hermanmunster has quit [Ping timeout: 265 seconds]
vjt_ has joined #ruby
JacobHayes has quit [Remote host closed the connection]
klaut has joined #ruby
Fraeon has quit [Ping timeout: 252 seconds]
tvw has quit [Client Quit]
tvw has joined #ruby
vjt has quit [Ping timeout: 245 seconds]
Igneous has joined #ruby
Fraeon has joined #ruby
timonv has joined #ruby
kies has joined #ruby
livcd has quit [Ping timeout: 255 seconds]
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
ce_afk is now known as cescalante
timonv has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
blackmes1 has joined #ruby
<tobago>
how to get the inheritants of a class? or how to get the sibling classes of one class?
sk87 has joined #ruby
apeiros has joined #ruby
oo_ has joined #ruby
<Igneous>
I if I'm doing something like @tmpdir = Dir.mktmpdir in my class initialize method, and wanted all of the subsequent class methods to execute their block within Dir.chdir(@tmpdir), what would be the most DRY way to do that?
<Igneous>
super?
Atrumx has quit [Quit: Exit]
saarinen has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cescalante is now known as ce_afk
JasmeetQA1 has joined #ruby
Martxel has joined #ruby
WishBoy has joined #ruby
setra has joined #ruby
<robert_>
rkazak_: also, ignore the language I selected. It's ruby, I'm just too spaced out for my own good, right now.
<Igneous>
tobago: As far as I know, there's no built-in method that's the antithesis of .ancestors or .superclass, but you iterate on classes in the objectspace and test if the parent is a subclass of self.
<blassin>
I would like to improve this code, to be able to drop the constant, and not rely on method_missing all the time (just the first time, then use define_method to not hit method_missing on the 2nd invocation)
<blassin>
help?
banister has joined #ruby
Dude007 has joined #ruby
<jhass>
why don't you define the methods in possible_returns already?
livcd has quit [Ping timeout: 265 seconds]
einarj has quit [Ping timeout: 276 seconds]
<blassin>
the idea is to have the gateway be self-contained, so the only thing you should write would be possible_returns [:a,:b,:c] and the a_response, b_response, etc methods
nvrch has quit [Quit: nvrch]
<blassin>
all else should be on a shared module
mansi has joined #ruby
<jhass>
that doesn't mean you can't define them there already
<blassin>
hmm yes that makes sense :D
<blassin>
but doing it there makes them class methods, right?
<jhass>
no
<jhass>
define_method defines instance methods
Es0teric has quit [Quit: Computer has gone to sleep.]
<jhass>
define_singleton_method would create "class methods" (instance methods on the Class object)
bMalum___ has quit [Quit: Computer has gone to sleep.]
bMalum___ has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
krandi has joined #ruby
myfriend has quit [Quit: Leaving]
andikr has quit [Ping timeout: 276 seconds]
mengu has quit [Remote host closed the connection]
bluenemo has quit [Read error: Connection reset by peer]
banister has joined #ruby
freerobby has joined #ruby
rshetty has quit [Client Quit]
Guest93900 has quit [Remote host closed the connection]
cescalante is now known as ce_afk
upsell5 has joined #ruby
hiall has quit [Ping timeout: 252 seconds]
oo_ has joined #ruby
hiall has joined #ruby
frobrob has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
qwyeth has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
dangerousdave has joined #ruby
lw has joined #ruby
yubrew has quit [Ping timeout: 255 seconds]
mercerist has quit [Quit: Computer has gone to sleep.]
aiguu has joined #ruby
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ixti has joined #ruby
rshetty has joined #ruby
mrmargolis has joined #ruby
mercerist has joined #ruby
livcd has joined #ruby
doodlehaus has joined #ruby
badhatter has joined #ruby
badhatter has joined #ruby
badhatter has quit [Changing host]
aiguu has quit [Ping timeout: 240 seconds]
garbagecollectio has quit [Quit: garbagecollectio]
kevinykchan has quit [Quit: Computer has gone to sleep.]
noop has quit [Ping timeout: 252 seconds]
oo_ has quit [Remote host closed the connection]
tjbiddle_ has joined #ruby
noop has joined #ruby
livcd has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
sailias has joined #ruby
rm___ has joined #ruby
rm___ is now known as Guest94908
troulouliou_dev has joined #ruby
tjbiddle has quit [Ping timeout: 252 seconds]
tjbiddle_ is now known as tjbiddle
freerobby has joined #ruby
Maple__ has quit [Quit: bbl]
bluOxigen has quit [Ping timeout: 240 seconds]
mjsmith2 has joined #ruby
einarj has joined #ruby
Megtastique has joined #ruby
Maple__ has joined #ruby
bMalum___ has joined #ruby
mansi has joined #ruby
connor_goodwolf_ has quit [Ping timeout: 240 seconds]
shredding has quit [Quit: shredding]
Guest94908 has quit [Remote host closed the connection]
xaxisx has joined #ruby
plato has joined #ruby
<plato>
good morning folks! i am setting a class instance variable before my initialize method; but the variable is nil inside an instance method - can I only access class instance variables through class methods? (e.g. def self.method)
<tobiasvl>
class instance variable … do you mean an @var in a class, or an @@var?
<jhass>
you could just make them constants for example
shredding has joined #ruby
mansi has quit [Remote host closed the connection]
<plato>
so, I want to have my single Robot instance walk a number of paths, keeping track of both the current state (instance bariables on lines 40-42) and global path history (@goodPaths, @badPaths)
<plato>
what's a good strategy to keep track of both of these?
sooik has quit [Ping timeout: 252 seconds]
<jhass>
as said, you could just make them constants
mansi has joined #ruby
<plato>
isn't it kind of smelly to modify constants?
JasmeetQA has joined #ruby
connor_goodwolf_ has joined #ruby
<jhass>
you don't modify the constant, you modify the contants value
Shidash has joined #ruby
omosoj has joined #ruby
xaxisx has joined #ruby
<jhass>
the other thing would be @@class variables which are equally smelly
<jhass>
or as said going though self.class.accessor all the time
wm3|away is now known as wm3|busy
<plato>
would defining attr_accessor :goodPaths at the top of the class let me call self.goodPaths ?
shvelo has joined #ruby
<jhass>
no, it would need to be class << self; attr_accessor :goodPaths; end; as I wrote before
AlexRussia has joined #ruby
subraminion___ has quit [Quit: Computer has gone to sleep.]
kevind has joined #ruby
<plato>
jhass: thanks! could you explain where to put that and what it's doing?
yfeldblum has joined #ruby
<jhass>
at the class level. It opens up the singleton class of the Class instance you're currently defining (self)
mansi has quit [Ping timeout: 255 seconds]
rshetty has quit [Remote host closed the connection]
<jhass>
then just defines the attr_accessors there
subraminion___ has joined #ruby
<plato>
great. do I need to put @goodPaths = [] inside that block?
<benzrf>
plato: why not @good_paths
<benzrf>
camelcase is the inferior choice of java coders
<benzrf>
D:
<benzrf>
and... also haskell uses camelcase for some ungodly rason
<benzrf>
:I
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
duggiefresh has joined #ruby
<plato>
i'm a node.js coder :)
kevind has quit [Client Quit]
paulfm has quit []
yubrew has joined #ruby
<tobiasvl>
hail satan
<lagweezle>
<3 tobiasvl very nice hehe
<jhass>
plato: no
<jhass>
while(true) -> loop do, we leave off empty parens for method calls,
<jhass>
a few style notes if you don't mind: we tend to leave of the return at the end of a method, it's implicit.
<benzrf>
plato: js is a dumb cruddy language and u should feel bad
yfeldblum has quit [Ping timeout: 240 seconds]
Sigma00 has quit [*.net *.split]
pgmcgee has quit [*.net *.split]
joast has quit [*.net *.split]
sumark has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
xxi has quit [*.net *.split]
graft_ has quit [*.net *.split]
Soulcutter has quit [*.net *.split]
saltsa has quit [*.net *.split]
Akuma has quit [*.net *.split]
mistergibson has quit [*.net *.split]
XenoWolf has quit [*.net *.split]
jaimef has quit [*.net *.split]
s_e has quit [*.net *.split]
jpierre03 has quit [*.net *.split]
GGMethos has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
sn0wb1rd has quit [*.net *.split]
mduk has quit [*.net *.split]
DanKnox has quit [*.net *.split]
mozzarella has quit [*.net *.split]
error404_ has quit [*.net *.split]
stylus has quit [*.net *.split]
FL1SK has quit [*.net *.split]
ocher has quit [*.net *.split]
sindork_ has quit [*.net *.split]
tskogber1 has quit [*.net *.split]
jericon has quit [*.net *.split]
TTilus has quit [*.net *.split]
chihhsin1wego has quit [*.net *.split]
JoeJulian has quit [*.net *.split]
philtr_ has quit [*.net *.split]
kloeri has quit [*.net *.split]
oddmunds has quit [*.net *.split]
preller has quit [*.net *.split]
machuga has quit [*.net *.split]
gogiel_ has quit [*.net *.split]
jcarouth has quit [*.net *.split]
chihhsin_wego has joined #ruby
preller has joined #ruby
preller has joined #ruby
preller has quit [Changing host]
ocher has joined #ruby
jericon has joined #ruby
tskogberg has joined #ruby
philtr has joined #ruby
Sigma00 has joined #ruby
saltsa has joined #ruby
XenoWolf has joined #ruby
ixx has joined #ruby
TTilus has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
gogiel has joined #ruby
cjk101010 has joined #ruby
DanKnox has joined #ruby
s_e has joined #ruby
sn0wb1rd has joined #ruby
JoeJulian has joined #ruby
bMalum___ has quit [Read error: Connection reset by peer]
sumark has joined #ruby
jeregrine has joined #ruby
FL1SK has joined #ruby
mduk has joined #ruby
mistergibson has joined #ruby
Akuma has joined #ruby
<tobiasvl>
poor plato
error404 has joined #ruby
Soulcutter has joined #ruby
kloeri has joined #ruby
GGMethos has joined #ruby
pgmcgee has joined #ruby
ixx is now known as Guest13053
YourBestFriend has joined #ruby
oddmunds has joined #ruby
sindork has joined #ruby
_justin has quit [Quit: _justin]
<plato>
i'm still getting the noMethodError regardless of whether I put the @goodPaths = [] declaration inside or outside of class << self
bMalum___ has joined #ruby
machuga has joined #ruby
jaimef has joined #ruby
jpierre03 has joined #ruby
freerobby has quit [Quit: Leaving.]
grzywacz has joined #ruby
<plato>
it is at least trying to call it on a Robot instance instead of on nil now
tjbiddle has quit [Quit: tjbiddle]
duggiefresh has quit [Remote host closed the connection]
paulfm has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
MrWharfsnort has joined #ruby
<plato>
@rows = Array.new(4) { Array.new(4, false) }; @rows[0][0] = true; <<<< so you can pass a block to the array.new and whatever the block yields is the thing to populate the array with?
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
sooik has joined #ruby
eka has joined #ruby
eka has quit [Client Quit]
<apeiros>
plato: correct
<txdv>
How do I retrieve the information of a query like this: Table.select('COUNT(*)/SUM(column)') ?
<plato>
apeiros: pretty sexy :)
<apeiros>
txdv: Errno::TooLittleContext
Ankhers has joined #ruby
<apeiros>
plato: yupp :)
<apeiros>
plato: important to remember that you should use block-form for mutable values
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<plato>
Ah I think I see my problem, I am calling self.goodPaths.push(@Path) from within an instance method, so self is referring to the instance not the class, so the class method .goodPaths defined by the attr_accessor is out of scope
MissionCritical has joined #ruby
Melpaws has quit [Quit: Leaving.]
maximski has quit []
<plato>
self.class.goodPaths works \m/
zB0hs has joined #ruby
<txdv>
im not dude, im txdv
<apeiros>
txdv: Table.select('COUNT(*)/SUM(column) mysum').all.map { |table| table.mysum } # I think that worked, might be it no longer does
yekta has joined #ruby
bMalum___ has quit [Quit: Computer has gone to sleep.]
<txdv>
Table.select('COUNT(*)/SUM(column) as count')[0]['count']
bMalum___ has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
replay_ has joined #ruby
nateberkopec has joined #ruby
vekfautles has quit [Ping timeout: 240 seconds]
ampharmex has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<ampharmex>
<ampharmex> here is a challenge I devised: given 7 9 8 7 6 5 4 3 2 5 6 7 3 4 2 4 5 8 7 = 476 Goal: find out what mathematical operators (minus, multiply, divide, add) satisfy that solution (476)
<ampharmex>
<ampharmex> Order of operation is variable.
<ampharmex>
<ampharmex> 4^18 * 18! is a non optimal approach.
<ampharmex>
<ampharmex> A dynamic programming approach may suffice.
<ampharmex>
<ampharmex> e.g dp[i][j][k] = Can I make the number k using the numbers a[i ... j].
Macaveli has quit [Ping timeout: 252 seconds]
cescalante is now known as ce_afk
replay has quit [Ping timeout: 258 seconds]
kevind has quit [Quit: kevind]
adamnbowen has joined #ruby
bMalum___ has quit [Client Quit]
wm3|busy is now known as workmad3
bMalum___ has joined #ruby
lmickh has joined #ruby
<canton7-mac>
ampharmex, *relatively* easy to do with reverse polish notation
<canton7-mac>
(as you don't need to muck about with brackets being matching pairs)
<ampharmex>
canton7, If I want to make X with the numbers A[i ... j], then I find a position v such that A[i ... v - 1] can make Y, A[v ... j] can make Y', and either Y + Y', Y * Y', Y - Y', or Y / Y' is equal to X.
<ampharmex>
If you want to find some sequence that does, then in A[i][j][X] you store the position at which you split (v) and the operator you chose.
<ampharmex>
_Every_ expression that you can form using the numbers in A[i ... j] is of the form (Y) op (Y'), where Y is an expression obtained from A[i ... v - 1], Y' is an expression obtained from A[v ... j], and op is either +, -, *, or /.
echevemaster has joined #ruby
Dude007 has quit [Read error: Connection reset by peer]
<ampharmex>
If I'm trying to find several, I'll store the several v, but that (since the number of answers is already exponential) will be exponential in space and time. :)
aniM has joined #ruby
<ampharmex>
The code is the usual dynamic programming solution, with a range of [-500, 1000]
skysploit has joined #ruby
freerobby has joined #ruby
Dude007 has joined #ruby
timonv has quit [Remote host closed the connection]
<canton7-mac>
ampharmex, I'm trying to work out why you're telling me this
<ampharmex>
canton7, It is the dynamic programming approach.
<canton7-mac>
and?
<ampharmex>
canton7, How were you going about it? Naive bruteforce?
freerobby has quit [Client Quit]
<canton7-mac>
I've never done it
<canton7-mac>
I don't care particularly
pen has quit [Ping timeout: 245 seconds]
<ampharmex>
<canton7-mac> ampharmex, *relatively* easy to do with reverse polish notation
<ampharmex>
<canton7-mac> (as you don't need to muck about with brackets being matching pairs)
oo_ has quit [Remote host closed the connection]
<canton7-mac>
figuring out an easy-to-program solution and actually being bothered to write it are two separate things
jamto11 has joined #ruby
aganov has quit [Remote host closed the connection]
bMalum___ has quit [Ping timeout: 276 seconds]
sgu has joined #ruby
sinkensabe has joined #ruby
<canton7-mac>
also where did your notation A[i][j][X] come from?
<canton7-mac>
"here's a challenge I devised..... here's my answer!" kinda ruins the challenge ;) also this is the classic countdown problem, no?
marr has quit [Ping timeout: 240 seconds]
brandonjmckay has joined #ruby
baweaver has joined #ruby
rizzatti has joined #ruby
ce_afk is now known as cescalante
anaeem1 has joined #ruby
<canton7-mac>
actually, the countdown problem looks a bit harder? since you need to find the closest result - it isn't necessarily exact
maximski has joined #ruby
timonv_ has joined #ruby
ben2 has quit [Ping timeout: 245 seconds]
dik_dak has joined #ruby
maestrojed has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
s2013 has joined #ruby
livcd has joined #ruby
MrWharfsnort has quit [Ping timeout: 255 seconds]
<ampharmex>
canton7-mac, It is a classic dynamic programming problem.
momomomomo has joined #ruby
<ampharmex>
(can also be solved with naive bruteforce - less interesting)
cjsarette has quit [Max SendQ exceeded]
<canton7-mac>
so it isn't a challenge you created at all? ;)
<ampharmex>
canton7-mac, I made it up.
<ampharmex>
But how you solve it.
joast has joined #ruby
rm___ has joined #ruby
<ampharmex>
<ampharmex> The code is the usual dynamic programming solution, with a range of [-500, 1000]
<canton7-mac>
so you made up a classic dynamic programming problem?
<ampharmex>
Yes.
rm___ is now known as Guest27723
<canton7-mac>
I'm mainly just bemused that you stated the problem, then immediately starting giving to detailed solution to no-one in particular
<ampharmex>
I am sure there would be variants/similar problems.
<canton7-mac>
*giving a
Guest27723 has quit [Remote host closed the connection]
<canton7-mac>
still, my bemusement still stands :P
<canton7-mac>
anyway, back to work!
<canton7-mac>
enjoy your dynamic programming
rkazak_ has joined #ruby
livcd has quit [Ping timeout: 245 seconds]
stef_204 has joined #ruby
duggiefresh has joined #ruby
sambao21 has joined #ruby
rkazak_ has left #ruby [#ruby]
tobago has quit [Remote host closed the connection]
cescalante is now known as ce_afk
ndrei has quit [Ping timeout: 258 seconds]
workmad3 is now known as wm3|busy
sooik has quit [Ping timeout: 265 seconds]
benzrf is now known as benzrf|offline
tagrudev has quit [Remote host closed the connection]
banister is now known as banisterfiend
heftig has quit [Quit: Quitting]
ringaring has joined #ruby
mary5030 has joined #ruby
brandonjmckay has quit [Quit: Leaving.]
Loaft has quit [Remote host closed the connection]
meatherly has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
<banisterfiend>
does update_attributes() save everything? even things that were changed before the call to update_attributes? i.e: bar.foo = 5; bar.update_attributes(hello: 5) will bar.foo = 5 be persisted ?
danijoo has joined #ruby
JasmeetQA has quit [Ping timeout: 255 seconds]
mengu has quit []
michaelchum has joined #ruby
sooik has joined #ruby
xaxisx has quit [Quit: xaxisx]
<banisterfiend>
nm
cjsarette has joined #ruby
treehug88 has joined #ruby
s2013 has quit [Remote host closed the connection]
brandonjmckay has joined #ruby
upsell5 has quit [Quit: upsell5]
ndrei has joined #ruby
lw has quit [Quit: s]
mrmargolis has quit []
subraminion___ has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
freerobby has joined #ruby
freerobby has quit [Client Quit]
mansi has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
mansi has joined #ruby
xaxisx has joined #ruby
pu22l3r has quit [Remote host closed the connection]
wm3|busy has quit [Ping timeout: 276 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
pu22l3r has joined #ruby
geggam has joined #ruby
_pingu has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
eka has joined #ruby
yfeldblum has joined #ruby
freezey has joined #ruby
sk87 has joined #ruby
mr_snowf1ake has quit [Quit: Leaving]
dstynchula has joined #ruby
dstynchula has quit [Remote host closed the connection]
<Takumo>
havenwood: I've got the version bump working (it just does PATCH level bumps)
<Takumo>
it puts the version in a package.yml file
<havenwood>
Takumo: aha, nice - that is simpler
<Takumo>
now I want to have rake commit the package.yml file, and create a tag on that commit
binaryhat has joined #ruby
felixjet has joined #ruby
<Takumo>
the docs are a little unclear
<Takumo>
I'm guessing I have to create an index, add the file to it, create a tree from that and a commit from it?
yami has joined #ruby
<yami>
Hi
<havenwood>
Takumo: Are you creating the repo in the first place with Rugged or just adding a file and committing to an exisiting repo with Rugged?
<havenwood>
yami: g'morning
duggiefresh has quit [Remote host closed the connection]
aniM has quit [Ping timeout: 240 seconds]
geggam has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Burgestrand]
<Takumo>
havenwood: the latter, the repo exists, I just want to create a new commit, where the current head is the parent
magicien has quit [Quit: leaving]
<Takumo>
nice and simple :)
shemerey has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yami_ has joined #ruby
<yami_>
havenwood: Not exactly the morning here but thanks
kate_r has joined #ruby
yami has quit [Ping timeout: 240 seconds]
troulouliou_dev has quit [Quit: Leaving]
<Hanmac1>
havenwood: current or last DoctorWho Episode?
Hanmac1 is now known as Hanmac
benzrf|offline is now known as benzrf
geggam has joined #ruby
<yami_>
Say, I was looking to create a new Ruby object into c++ code. I found this function online : rb_class_new_instance(). But it isn't defined in my ruby lib. Did it change?
_tpavel has joined #ruby
Dude007 has quit [Remote host closed the connection]
<havenwood>
Hanmac: half way through s4e15, this weekend i'll prefail
<havenwood>
prevail* (though prefail may be more accurate)
<_tpavel>
URGENT: I'm in a competition and I need help using a gemset in RVM
<_tpavel>
I'm trying to use rmagick
<havenwood>
_tpavel: ask in #rvm too
<Hanmac>
havenwood: s4e15 that was "End of Time" right?
<havenwood>
Hanmac: two before that
<havenwood>
Hanmac: The Next Doctor
<Hanmac>
ahh ok
<_tpavel>
and when I put require 'rubygems' and require 'rmagick' it says it can't find rmagick. It's installed in the current gemset
<Diranged1>
Whats the best method in ruby for caching objects out to disk? Historically we've used the FileCache gem, but that hasnt been touched in a long time and it has some issues..
<havenwood>
rbennacer: => "8 --> 00:29:55,084\r\nPistorius says he believes that\r\n\r\n762\r\n00:29:55,218 --> 00:29:57,153\r\nhe was shotting an intruder.\r\n\r\n\x00"
<rbennacer>
what deos it do exactly
<rbennacer>
?
<havenwood>
rbennacer: i'd imagine there's a nicer way... :O
mansi has joined #ruby
sinkensabe has joined #ruby
<havenwood>
rbennacer: i'm supposed to be on a call, sec and i'll take a better look!
thumpba has quit [Read error: Connection reset by peer]
<havenwood>
if nobody beats me toit
<rbennacer>
oh nice :)
<rbennacer>
i am standing by
<Hanmac>
rbennacer: are you sure you read the file with the right encoding?
<rbennacer>
mmm
<rbennacer>
what do you mean
<rbennacer>
i am reading it as a text file
mansi has quit [Read error: Connection reset by peer]
mercerist has joined #ruby
mansi has joined #ruby
thumpba has joined #ruby
<Hanmac>
rbennacer: you need to open the file with :encoding => "UTF-16BE"
<rbennacer>
mmmm
Soda has joined #ruby
<rbennacer>
something like this? File.read(path,:encoding=>"UTF-16BE")
<rbennacer>
?
JacobHayes has joined #ruby
Jrz has joined #ruby
<Hanmac>
ep
Rahul_Roy has quit [Quit: Connection closed for inactivity]
aiguu has quit [Ping timeout: 240 seconds]
phinfonet has joined #ruby
maximski has quit []
thumpba_ has joined #ruby
sunya7a has joined #ruby
marr has joined #ruby
mansi has quit [Remote host closed the connection]
maletor has joined #ruby
dsdeiz has joined #ruby
mansi has joined #ruby
anarang has quit [Quit: Leaving]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mansi_ has joined #ruby
livcd has joined #ruby
thumpba has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
zigomir has quit [Remote host closed the connection]
<havenwood>
rbennacer: get it sorted?
sunya7a has quit [Ping timeout: 245 seconds]
JensOfSweden has joined #ruby
<yami_>
Does somebody know how to do a 'MyClass.new' in C++ with the ruby bindings?
mansi has quit [Ping timeout: 240 seconds]
Dysruption has joined #ruby
soulisson has joined #ruby
cpruitt has quit [Quit: cpruitt]
<havenwood>
rbennacer: Hanmac's realization of the actual encoding is indeed nicer than byte munging. :)
<rbennacer>
hehe
<havenwood>
rbennacer: force_encoding('UTF-16BE') #=> "8 --> 00:29:55,084\r\nPistorius says he believes that\r\n\r\n762\r\n00:29:55,218 --> 00:29:57,153\r\nhe was shotting an intruder.\r\n\r\n\x00"
livcd has quit [Ping timeout: 240 seconds]
<rbennacer>
nice
<havenwood>
shotted >.>
<rbennacer>
i am gonna try it out
<soulisson>
Hi, i would like to use the Date::Delta class, i tried: require 'date/delta', however all i get is 'cannot load such file -- date/delta', any idea how to solve this problem ?
Karpuragauram has joined #ruby
<Hanmac>
yami_: rb_class_new_instance ?
Karpuragauram has quit [Read error: Connection reset by peer]
cpruitt has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
<Hanmac>
soulisson: Date::Delta only exist(ed) in ruby 1.9.2 not newer, not older it seems
<havenwood>
This class is deprecated or moved on the latest stable version.
<yami_>
havenwood: Oh yeah right thanks!
<soulisson>
Hanmac, thanks, is there something similar i can use for dates comparisons ?
yekta has quit [Quit: yekta]
sski has joined #ruby
<havenwood>
Hanmac: I stole another of your "thanks", muahahaha!
<Hanmac>
xD
<phoo1234567>
Hi All, I have a really crappy CSV file with no control over its creation that I'm trying to include multiline columns in.
<phoo1234567>
Are there any tricks I can use?
<phoo1234567>
My google-fu seems weak today.
<csmrfx>
so, did you use a gem?
lethjakman has quit [Ping timeout: 265 seconds]
<phoo1234567>
I've tried CSV and FasterCSV.
timonv_ has quit [Remote host closed the connection]
Vivekananda has quit [Remote host closed the connection]
<phoo1234567>
I keep getting malformed CSV errors.
<rbennacer>
havenwood, i still cant split it
<phoo1234567>
But I can't seem to find a regex to match all of the corner cases.
<csmrfx>
phoo1234567: from your mom?
nopolitica has quit [Remote host closed the connection]
<csmrfx>
or where?
<havenwood>
rbennacer: whatcha trying to match?
<rbennacer>
srt_cleaner.rb:10:in `split': incompatible encoding regexp match (US-ASCII regexp with UTF-16BE string) (Encoding::CompatibilityError)
<phoo1234567>
I was hoping there was a link describing multiline matching.
<havenwood>
rbennacer: split /\r\n\r\n\d+\r\n/ #=> ["8 --> 00:29:55,084\r\nPistorius says he believes that", "00:29:55,218 --> 00:29:57,153\r\nhe was shotting an intruder.\r\n\r\n\u0000"]
<csmrfx>
phoo1234567: are you certain that :row_sep can be something other than a string?
<phoo1234567>
I can't seem to find one.
<csmrfx>
did you check/search SO
Diranged has quit [Ping timeout: 245 seconds]
<csmrfx>
anyway
<havenwood>
rbennacer: don't force_encoding, use what Hanmac showed
<phoo1234567>
Umm. I _thought_ it could contain newlines.
<havenwood>
rbennacer: i just meant to show the encoding is indeed what Hanmac said
<phoo1234567>
SO?
deric_skibotn has joined #ruby
<csmrfx>
phoo1234567: again, you mentioned "regex", and now you say "newlines"
<phoo1234567>
Yes, "\n".
<havenwood>
rbennacer: though 1.9 style hashes! :P File.read(path, encoding: "UTF-16BE")
<phoo1234567>
Am I confused somehow?
<csmrfx>
phoo1234567: your problem description is impossible to solve. Generally, it is best to post a link to the actual error message, input and code
<rbennacer>
i tried i still can't split it
JensOfSweden has quit [Quit: Leaving...]
Diranged has joined #ruby
<phoo1234567>
csmrfx, Thanks. Just looking for a google link on common row_sep handling.
<phoo1234567>
Thanks, though.
<csmrfx>
.g stackoverflow parsing csv
<havenwood>
rbennacer: ohh encoding... using my byte splitting method it works >.> hem, why does encoding not work for you...
carraroj has joined #ruby
<rbennacer>
i will try byte splitting
<havenwood>
rbennacer: maybe it wants the #split arg to be same encoding
<plato>
thanks jhass for the style pass! i don't like dropping the parens on function declarations though, that seems like i'm losing the contextual information of what's what
<phoo1234567>
Oooh.. Mabe .flatten.
<rbennacer>
Hanmac, tryign ti
<jhass>
plato: sure, that's preference. Just wanted to show how far you can go
<phoo1234567>
Nah.
<csmrfx>
phoo1234567: I think, trying to "create" a new row_sep might be wrong
ndrei has quit [Ping timeout: 245 seconds]
<csmrfx>
in the ydiw way
RaptorJesus has joined #ruby
aiguu has joined #ruby
<phoo1234567>
Something's not right, for sure.
<phoo1234567>
I maybe need a break.
<csmrfx>
yes, and until you break it down to logical pieces you will never be able to solve this
sinkensabe has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 240 seconds]
sinkensabe has joined #ruby
<phoo1234567>
Thanks for listening, csmrfx.
<csmrfx>
you have malformed CSV? you're probably going to fix it by hand, or try loading it in office app and saving again
<phoo1234567>
I have no control over the creation of the source.
<csmrfx>
so, you are certain it is malformed?
<certainty>
no
nobitanobi has joined #ruby
<phoo1234567>
I'm just trying to come up with a magic regex to match the _real_ boundaries.
<phoo1234567>
Clearly not _sanctioned_ CSV.
mattmcclure has joined #ruby
<csmrfx>
why, dont you have 3 ready libraries to choose from?
<phoo1234567>
newlines and Windows contained in one of the fields.
<phoo1234567>
I just know of CSV and FasterCSV.
<phoo1234567>
What's the third?
<certainty>
EvenFasterCSV
sinkensabe has quit [Read error: Connection reset by peer]
enricostn has quit [Remote host closed the connection]
bMalum___ has quit [Ping timeout: 245 seconds]
dpswireless has quit [Remote host closed the connection]
doodlehaus has quit [Ping timeout: 258 seconds]
Bira has quit [Remote host closed the connection]
dblessing has joined #ruby
razrunelord has joined #ruby
ktun has joined #ruby
treehug88 has quit [Ping timeout: 240 seconds]
JacobHayes has joined #ruby
combusean has quit [Quit: Leaving]
eka_ has quit [Read error: Connection reset by peer]
treehug88 has joined #ruby
combusean has joined #ruby
saarinen has quit [Quit: saarinen]
eka has joined #ruby
noop has joined #ruby
saarinen has joined #ruby
nanoyak has joined #ruby
RohanRNS has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
garndt has quit [Quit: Connection closed for inactivity]
sunya7a has joined #ruby
mikesplain has joined #ruby
mikesplain_ has joined #ruby
alem0lars has joined #ruby
jlast has quit [Remote host closed the connection]
mdmcaf has joined #ruby
omosoj has quit [Ping timeout: 258 seconds]
jlast has joined #ruby
wchun has joined #ruby
goleldar has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
sdwrage has joined #ruby
hamakn has joined #ruby
dblessing has quit [Quit: dblessing]
<yami_>
Ciao :3
yami_ has quit [Quit: Page closed]
kilk_ has quit [Quit: kilk_]
pliniker has joined #ruby
Jrz has quit [Quit: Computer has gone to sleep.]
<RubyPanther>
Hanmac: I'll take the answer from the traffic engineers at the DMV and say the cat should just be programmed to do the "right" thing, which is to stay in its lane and try to stop, and NOT swerve out of its lane trying to avoid somebody
Diranged has quit [Ping timeout: 276 seconds]
<centrx>
Programmable cats roaming the streets...
<RubyPanther>
the reality is that a well-programmed robot car is going to anticipate the increased danger and slow down
<Hanmac>
... the cat? ;P
<RubyPanther>
sorry, "car"
jlast has quit [Ping timeout: 276 seconds]
yfeldblum has joined #ruby
dpswireless has joined #ruby
Dude007 has quit [Ping timeout: 252 seconds]
dpswireless has quit [Remote host closed the connection]
silky__ has quit [Quit: Leaving]
SegFaultAX has quit [Excess Flood]
yekta has joined #ruby
malcolmva has joined #ruby
malcolmva has quit [Read error: Connection reset by peer]
subbyyy_ has joined #ruby
i_s has joined #ruby
mikesplain_ is now known as mikesplain
SegFaultAX has joined #ruby
JhonD has quit [Quit: Leaving]
banisterone has quit [Read error: Connection reset by peer]
hiall has quit [Quit: hiall]
AndChat|102836 has joined #ruby
jrhorn424 is now known as zz_jrhorn424
mercerist has joined #ruby
terrellt has quit [Remote host closed the connection]
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
bbloom has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
garbagecollectio has joined #ruby
danijoo has joined #ruby
terrellt has joined #ruby
subbyyy has joined #ruby
apeiros has joined #ruby
subbyyy_ has quit [Ping timeout: 265 seconds]
Guest410 has quit [Remote host closed the connection]
echevemaster has quit [Quit: Leaving]
rm___ has joined #ruby
rm___ is now known as Guest25463
zigomir has quit [Remote host closed the connection]
xcesariox has joined #ruby
pu22l3r_ has joined #ruby
zigomir has joined #ruby
livcd has joined #ruby
dsdeiz has quit [Ping timeout: 255 seconds]
<Jnco>
when I type ruby -version I get my old ruby version listed, is that because of an environment variable in my system?
ktun has joined #ruby
pu22l3r has quit [Ping timeout: 252 seconds]
baweaver has quit [Remote host closed the connection]
Guest25463 has quit [Ping timeout: 265 seconds]
meatherly has quit [Remote host closed the connection]
atraylen has joined #ruby
zigomir has quit [Ping timeout: 245 seconds]
pu22l3r_ has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
kevinykchan has joined #ruby
tvw has joined #ruby
sk87 has joined #ruby
setra has joined #ruby
lxsameer has joined #ruby
beneggett has joined #ruby
subbyyy_ has joined #ruby
r_s_h has joined #ruby
rdark has quit [Quit: leaving]
AndChat|102836 has quit [Read error: Connection reset by peer]
banisterone has joined #ruby
kaspergrubbe has joined #ruby
echevemaster has joined #ruby
sk87 has quit [Client Quit]
duggiefresh has joined #ruby
subbyyy has quit [Ping timeout: 265 seconds]
andrewjanssen has joined #ruby
<lethjakman>
hmmm...I can't seem to puts inside of a meta method...why is that?
b00stfr3ak has joined #ruby
<jhass>
lethjakman: what's a meta method?
livcd has quit [Remote host closed the connection]
papercode has joined #ruby
<r_s_h>
Hey guys, does anyone know a reliable way to convert a string to a method name? E.g., I have a method called a_method(x). I built a string “a_method” that I want to convert to a method name.
jxf has joined #ruby
<atmosx>
shiit
<centrx>
r_s_h, Use send/public_send
<lxsameer>
hey guys, does any one knows about web application of ruby5 podcast ? is it open source ?
<lethjakman>
jhass: define_method :name, block
<jhass>
r_s_h: and by convert you mean you want to call it?
<centrx>
r_s_h, my_object.send(:my_method_name)
<jhass>
>> define_method :foo do puts "foo"; end; foo
<jhass>
yes, since :foo is not a method call and thus can't receive a block
sdwrage has joined #ruby
<lethjakman>
I kinda thought it'd just need a , after :foo, no?
<lethjakman>
since &block is a parameter.
dsdeiz has joined #ruby
<jhass>
no, &block captures the implicit block argument every method has, converts the block to a Proc object and assigns it to the explicit parameter
<jhass>
block is just the parameter name, &foobar works as well
ktun has joined #ruby
Macaveli has joined #ruby
<lethjakman>
ahhhhh
<lethjakman>
that makes perfect sense!
<lethjakman>
are there any other arguments like that?
Mon_Ouie has joined #ruby
<pothibo>
Is it possible to tell ruby gems to load a specific gem from a specific folder ?
JacobHayes has quit [Remote host closed the connection]
mercerist has quit [Read error: Connection reset by peer]
<jhass>
pothibo: bundler makes it easy, but if you just want to add a folder to the load path, modify GEM_PATH (check the output of gem env) or use the gem method to lock to a version
mercerist has joined #ruby
garbagecollectio has quit [Quit: garbagecollectio]
<pothibo>
ok
chrisseaton has joined #ruby
danshult_ has quit [Remote host closed the connection]
danshultz has joined #ruby
Ardenzi has quit [Remote host closed the connection]
<jhass>
ruby also takes the -I parameter to add a folder to the load path on invocation or you can modify the $LOAD_PATH inside ruby
SHyx0rmZ has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
danshultz has joined #ruby
razrunelord has joined #ruby
skaflem has joined #ruby
sampriti has joined #ruby
<havenwood>
Jnco: figure it out?
AlexRussia has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
vpretzel has quit [Quit: Adios!]
j00l has joined #ruby
cbill has joined #ruby
sampriti has quit [Client Quit]
<rbennacer>
i am still having some issues with reading the text of an srt file with ruby http://pastebin.com/cpmnyczU
<rbennacer>
it seems like it doesn't like the encoding
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rbennacer>
Hanmac, i ge tthis with your code srt_cleaner.rb:4:in `read': can't convert String into Integer (TypeError)
mengu__ has quit [Ping timeout: 265 seconds]
mikepack has joined #ruby
<Hanmac>
ar dam
<Hanmac>
its File.read(file, :mode => 'rb:UTF-16:UTF-8')
<rbennacer>
do you think it trying to read it as a binary file?
mansi_ has joined #ruby
zigomir has quit [Remote host closed the connection]
<r_s_h>
centrix/jhass: send worked like a charm. Initially I was calling it on a hash object (what I wanted to pass in to the method), but was getting NoMethodError (obviously). So I just called send(method_name, hash_parameter) and it worked like a charm. Thanks again!
<rbennacer>
Hanmac, that last line worked
r_s_h has left #ruby [#ruby]
r_s_h has joined #ruby
ValicekB has joined #ruby
maestrojed has joined #ruby
mansi has quit [Ping timeout: 276 seconds]
ktun has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
razrunelord has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
treehug88 has quit []
chipotle has quit [Quit: cya]
jlast has joined #ruby
havenwood has quit []
ItSANgo has quit [Read error: Connection reset by peer]
ItSANgo has joined #ruby
asteros has joined #ruby
benzrf|offline is now known as benzrf
meatherly has joined #ruby
ItSANgo has quit [Read error: Connection reset by peer]
ItSANgo_ has joined #ruby
shemerey has joined #ruby
marcdel has joined #ruby
jlast has quit [Ping timeout: 245 seconds]
sdwrage has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
Zenigor has joined #ruby
Deele has quit [Quit: User excited]
sepp2k has joined #ruby
dpswireless has joined #ruby
marcdel has quit [Ping timeout: 276 seconds]
dsdeiz has quit [Ping timeout: 276 seconds]
endash has quit [Quit: endash]
Burgestrand has joined #ruby
chrisseaton has joined #ruby
bline79 has joined #ruby
sambao21 has joined #ruby
phutchins has quit [Ping timeout: 252 seconds]
mary5030_ has joined #ruby
jfoy has joined #ruby
<bline79>
https://gist.github.com/bline79/a638bf0e8cedbe01f0d3 any idea why this is stopping at the first element in the array? I know it's something that it doesn't like about the exec statement.. If I change the exec to a puts it is fine
decoponio has quit [Quit: Leaving...]
mary5030_ has quit [Remote host closed the connection]
dpswireless has quit [Ping timeout: 276 seconds]
mary5030_ has joined #ruby
Melpaws has joined #ruby
<arrubin>
Why are you using exec for that?
mary5030 has quit [Ping timeout: 255 seconds]
ndrei has quit [Ping timeout: 252 seconds]
Symbiosisz has joined #ruby
<Symbiosisz>
Is there any way to map a specific path to multiple controllers usign rackup, and it'll keep going through controllers until its path matches one? e.g. map('/') { run staticcontroller }, map ('/') { run otherpagecontroller}. If no route in staticcontroller matches, it tries on otherpage controller?
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
dfinly has joined #ruby
<arrubin>
I would guess that you need another \n at the end of your exec string.
dfinly has quit [Max SendQ exceeded]
marcdel has joined #ruby
<arrubin>
But I have no idea why you would use exec to write to a file.
LiohAu has quit [Quit: LiohAu]
<jhass>
bline79: exec replaces the process
<jhass>
bline79: and as arrubin said just use Ruby primitives to write to files, File.write for example
michaelchum has quit [Quit: Connection closed for inactivity]
<bline79>
replacing it with system did it
<jhass>
bline79: that's still bad practice though, you start like 3 or 4 new processes for something that can be done with 3 syscalls from the current process
<kwerle>
I’ve forgotten how to do something easy in ruby. I want to create a trivial one-off instance of an object with a single attribute. some_object=thing_i_forgot(:attr => ‘some value’) so that I can do some_object.attr and get ‘some value’. What is the constructor I’m looking for?
Xaitec has quit [Remote host closed the connection]
predator217 has joined #ruby
<joelbrewer>
Todd: nice!
freezey has quit []
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Todd>
joelbrewer: Perl is Ruby's backwards little brother and I've yet to learn Java. For many years I said the only statically typed language I want to use is the one that compiles my Ruby interpreter.
pietr0 has quit [Quit: pietr0]
cjsarette has joined #ruby
<Todd>
joelbrewer: I've since changed my tune a bit as, well, Java is in high demand where I am these days.
MrWharfsnort has joined #ruby
banisterone has quit [Quit: Bye]
banisterone has joined #ruby
predator117 has quit [Ping timeout: 265 seconds]
omosoj has joined #ruby
VTLob has quit [Quit: VTLob]
nanoyak has quit [Quit: Computer has gone to sleep.]
alpha123 has quit [Ping timeout: 252 seconds]
eka has quit [Read error: Connection reset by peer]
eka has joined #ruby
pu22l3r has joined #ruby
george2 has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
eka has quit [Client Quit]
AlSquire has joined #ruby
AlSquire has quit [Client Quit]
asteros has quit [Quit: asteros]
nanoyak has joined #ruby
fwaokda has joined #ruby
<fwaokda>
i have a folder at that i run "ruby -v" and I get "ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]" then I go to another folder and run "ruby -v" and it acts like it's not installed. Anyone know why this is?
toastynerd has joined #ruby
ascarter has joined #ruby
linojon has quit [Quit: linojon]
codeFiend has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
fwaokda: what do you get for?: which ruby
jhass is now known as jhass|off
linojon has joined #ruby
<fwaokda>
havenwood, in one folder nothing, the next i get /home/fwaokda/.rvm/rubies/ruby-2.1.1/bin/ruby
codeFiend has quit [Client Quit]
<havenwood>
fwaokda: Aha, so RVM. Might ask in RVM but I'd imagine you do not have a default set and the switching is due to a .ruby-version or .rvmrc file, or something of that sort.
<havenwood>
fwaokda: in #rvm
<havenwood>
i mean
<fwaokda>
ok, what would i even ask though?
<havenwood>
fwaokda: but maybe first try?: rvm --default use ruby-2.1.1
jlast has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
mikepack has joined #ruby
<fwaokda>
havenwood, nope didn't work -- it did something but wont let me access ruby still in the other folder
combusean has quit [Ping timeout: 252 seconds]
<havenwood>
fwaokda: we should go to #rvm, someone there will likely spot the issue before me
<havenwood>
fwaokda: try reloading the shell after having set the default?
jamto11 has quit [Remote host closed the connection]
combusean has joined #ruby
<fwaokda>
havenwood, ok i asked in there thanks for all the help!
<havenwood>
fwaokda: i'm sure #rvm will sort you out :)