jhass changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
chopin has joined #ruby
chopin is now known as Guest37794
Guest37794 has quit [Remote host closed the connection]
arescorpio has joined #ruby
mattwashere has quit [Remote host closed the connection]
<karapetyan> jhass: oh, gcd makes it easy, thanks
<drbrain> here's an input that'll test your speed: [510510, 1299709]
hahuang61 has quit [Ping timeout: 250 seconds]
<jhass> well, consider if it's still in the spirit of the kata
<drbrain> that's the product of the first 7 primes divided by the 100,000th prime
<drbrain> your implementation takes 10 seconds on my machine
<karapetyan> ok, i understand, thank you
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
whathappens has quit [Quit: Leaving...]
<drbrain> I picked those numbers because they'll stress your implementation pretty well, and should give you good clues about how to optimize even if you don't use #gcd
mattwashere has joined #ruby
swills has quit [Remote host closed the connection]
nankyokusei has joined #ruby
<karapetyan> drbrain: i'l try optimize without using #gcd, thank you.
<drbrain> if you know how to use #gcd to pass the kata I think that would be OK too
<drbrain> I left a comment on your gist
shinnya has quit [Ping timeout: 276 seconds]
aryaching has joined #ruby
giz|work has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
SCHAAP137 has quit [Quit: Leaving]
<havenwood> diegoviola: Here's a fun version: https://gist.github.com/havenwood/569af2e526cda3bc0b66da8c5aaf4a00
dhruvasagar has joined #ruby
<havenwood> diegoviola: that's my post-work variant :P
<diegoviola> haha
<diegoviola> that's out of my mind
finisherr has quit [Quit: finisherr]
<diegoviola> nice
agent_white has quit [Quit: brbgoinghom]
<havenwood> diegoviola: but not quite right
dfockler has quit [Ping timeout: 272 seconds]
<havenwood> diegoviola: i think that'd get the 7s and 35s right, but not the 5s
<havenwood> diegoviola: could fix
dhruvasagar has quit [Ping timeout: 260 seconds]
ornerymoose has quit [Quit: ornerymoose]
<havenwood> just not right at all, but we should do some fun ones for rosetta code
jenrzzz has quit [Ping timeout: 260 seconds]
timanema has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Silthias has quit [Ping timeout: 244 seconds]
chipotle_ has joined #ruby
jenrzzz has joined #ruby
chipotle has quit [Ping timeout: 250 seconds]
aryaching has quit [Ping timeout: 252 seconds]
harfangk has joined #ruby
jhack has quit [Quit: jhack]
timanema has quit [Ping timeout: 260 seconds]
hxegon is now known as hxegon_afk
ornerymoose has joined #ruby
djbkd has quit [Remote host closed the connection]
RegulationD has joined #ruby
marr has quit [Ping timeout: 244 seconds]
replay has quit []
Silthias has joined #ruby
spiette has quit [Quit: :qa!]
jackjackdripper has quit [Quit: Leaving.]
<diegoviola> havenwood: I'm trying to write some tests for this with minitest but I'm getting very frustrated by coping the actual output in an assert_equal, is there a better way?
<diegoviola> copying
<diegoviola> and trying to compare it
harfangk has quit [Quit: harfangk]
Silthias1 has joined #ruby
Silthias has quit [Read error: Connection reset by peer]
RegulationD has quit [Ping timeout: 260 seconds]
amclain has joined #ruby
<ICantCook> I've got a ruby script (myscript.rb) which kicks off a linux daemon by running `/opt/my/daemon -d`
<ICantCook> problem is, myscript.rb keeps running forever
pawnbox has joined #ruby
<ICantCook> how would i go about kicking off / forking? this command and letting myscript.rb exit
<ICantCook> if I kill myscript.rb with kill -9, /opt/my/daemon dies too
<ICantCook> this is not desired
<jhass> ICantCook: system("systemd-run /opt/my/daemon")
<jhass> scnr
kies has joined #ruby
jher has joined #ruby
pawnbox has quit [Ping timeout: 272 seconds]
<shevy> ICantCook have you tried https://rubygems.org/gems/daemons yet? you can also look at the source to see how they went about enabling daemons
mattwashere has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
<jhass> but seriously, use a supervisor
smathy is now known as smathy_afk
gizmore has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
mattwashere has joined #ruby
mwlang has quit [Quit: mwlang]
<isberg> Does anyone know a tool that reveals exactly where a string/text on a webpage is located? Started building something like this of my own last week but want to check again, just to make sure.
<isberg> Example input: google.com, "Welcome to Google", output "google.com/file.html" "#logo > a"
matp has quit [Remote host closed the connection]
mattwashere has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 244 seconds]
rcvalle has quit [Quit: rcvalle]
DTZUZU has joined #ruby
AcidCrash0x00 has quit [Read error: Connection reset by peer]
AcidCrash has joined #ruby
gnufied has quit [Quit: Leaving]
amclain has quit [Quit: Leaving]
nando293921 has quit [Quit: Lost terminal]
freerobby has quit [Quit: Leaving.]
dstarh has joined #ruby
Spami has joined #ruby
ullu has joined #ruby
<diegoviola> 1 runs, 1 assertions, 0 failures, 0 errors, 0 skips
<diegoviola> why is it passing with just that 1 in there?
jenrzzz has quit [Ping timeout: 246 seconds]
matp has joined #ruby
saneax is now known as saneax_AFK
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Ropeney has joined #ruby
guardianJ has joined #ruby
ur5us has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
jher has quit [Ping timeout: 252 seconds]
jetpackjoe has joined #ruby
xall has quit [Ping timeout: 258 seconds]
fedruantine has quit [Max SendQ exceeded]
Hobogrammer has joined #ruby
Spami has joined #ruby
neo__ has quit [Remote host closed the connection]
urbanmonk has quit [Quit: urbanmonk]
jher has joined #ruby
pawnbox has joined #ruby
gizless has joined #ruby
gizless has quit [Client Quit]
karapetyan has quit []
gizmore has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
Spami has quit [Ping timeout: 276 seconds]
Asher has quit [Quit: Leaving.]
moeabdol has joined #ruby
guardianJ has quit [Remote host closed the connection]
tokynet has joined #ruby
hutch34_ has joined #ruby
skweek has joined #ruby
isberg has quit [Quit: I'm out]
Asher has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
riskish has quit [Quit: Textual IRC Client: www.textualapp.com]
hutch34_ has quit [Ping timeout: 240 seconds]
dcunit3d has quit [Ping timeout: 252 seconds]
xall has joined #ruby
mattwashere has joined #ruby
Spami has joined #ruby
dhruvasagar has joined #ruby
sneakers has joined #ruby
roamingdog has joined #ruby
ur5us has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
northfurr has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
ullu has quit [Ping timeout: 240 seconds]
araujo_ has quit [Read error: Connection timed out]
araujo_ has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
nankyokusei has joined #ruby
smathy_afk is now known as smathy
dcunit3d has joined #ruby
sumobob has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
nankyokusei has quit [Ping timeout: 240 seconds]
valetudo has joined #ruby
sapslaj_ has joined #ruby
sapslaj has quit [Ping timeout: 260 seconds]
ruby-lang880 has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roamingdog has quit [Remote host closed the connection]
minimalism has quit [Quit: minimalism]
northfurr has quit [Quit: northfurr]
ptierno has joined #ruby
roamingdog has joined #ruby
northfurr has joined #ruby
sp4rrow has joined #ruby
dstarh has joined #ruby
pawnbox has joined #ruby
ruby-lang880 has quit [Ping timeout: 250 seconds]
timanema has joined #ruby
Dimik has quit [Ping timeout: 244 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
northfurr has quit [Quit: northfurr]
mistermocha has joined #ruby
northfurr has joined #ruby
<kireevco> I'm using aws sdk. and trying to read metadata, any example how to read custom user metadata? `x-amz-meta-*`
c355e3b has quit [Quit: Connection closed for inactivity]
timanema has quit [Ping timeout: 252 seconds]
northfurr has quit [Client Quit]
ketherah has joined #ruby
nullfxn has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
<kireevco> oh... so that data is automatically prefixed, and I should be able to access it via :bar for x-amz-meta-bar
<kireevco> hm
jher has quit [Ping timeout: 276 seconds]
mattwashere has quit [Remote host closed the connection]
braincra- has joined #ruby
jenrzzz has joined #ruby
mattwashere has joined #ruby
timanema has joined #ruby
braincrash has quit [Ping timeout: 276 seconds]
northfurr has joined #ruby
roamingdog has quit [Remote host closed the connection]
mattwashere has quit [Ping timeout: 246 seconds]
giz|work has joined #ruby
pilne has quit [Quit: Quitting!]
roamingdog has joined #ruby
northfurr has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoviola has quit [Quit: WeeChat 1.5]
pwnd_nsfw` has joined #ruby
roamingdog has quit []
mattwashere has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
textchimp has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
Silthias1 has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
Silthias has joined #ruby
giz|work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
minimalism has joined #ruby
neo__ has joined #ruby
pawnbox has joined #ruby
globalall0c has joined #ruby
chipotle_ has quit [Quit: cheerio]
Es0teric has joined #ruby
northfurr has joined #ruby
zacstewart has quit [Read error: Connection reset by peer]
zacstewart has joined #ruby
braincra- has quit [Quit: bye bye]
SilverKey has joined #ruby
SilverKey has quit [Client Quit]
pawnbox has quit [Ping timeout: 276 seconds]
davedev24 has quit []
arescorpio has quit [Quit: Leaving.]
sumobob has quit [Ping timeout: 260 seconds]
chipotle has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
solocshaw has quit [Ping timeout: 250 seconds]
dstarh has joined #ruby
cdg has joined #ruby
dstarh has quit [Client Quit]
braincrash has joined #ruby
jackjackdripper has joined #ruby
sumobob has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
testuser has joined #ruby
<testuser> test
k3rn31 has joined #ruby
quakephil has quit [Ping timeout: 240 seconds]
joneshf-laptop has quit [Ping timeout: 260 seconds]
joneshf-laptop has joined #ruby
c0mrad3 has joined #ruby
gix has quit [Ping timeout: 244 seconds]
cb` has quit [Quit: 404 noob not found]
moeabdol has joined #ruby
gix has joined #ruby
timanema has quit [Ping timeout: 244 seconds]
jgt has quit [Ping timeout: 244 seconds]
chipotle has quit [Quit: cheerio]
RegulationD has joined #ruby
moeabdol has quit [Ping timeout: 246 seconds]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lessless has joined #ruby
pawnbox has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
agentmeerkat has quit [Ping timeout: 240 seconds]
testuser has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
agentmeerkat has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
nando293921 has joined #ruby
hk238 has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
smathy is now known as smathy_afk
mattwashere has quit [Remote host closed the connection]
mattwashere has joined #ruby
mattwashere has quit [Read error: No route to host]
mattwashere has joined #ruby
globalall0c has quit [Quit: Leaving]
nando293921 has quit [Ping timeout: 272 seconds]
mattwashere has quit [Ping timeout: 244 seconds]
dcunit3d has quit [Ping timeout: 244 seconds]
northfurr has quit [Ping timeout: 240 seconds]
pickandmix has joined #ruby
<pickandmix> can anyone please help? This is the problem I'm getting right now http://pastebin.com/7uD6wks4
<ruby[bot]> pickandmix: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/28b736cbec26c8464323ffd76678e01b
<ruby[bot]> pickandmix: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
ensyde__ has joined #ruby
northfurr has joined #ruby
dstarh has joined #ruby
Vile` has quit [Ping timeout: 258 seconds]
ullu has joined #ruby
voodoofish430 has joined #ruby
tmtwd has joined #ruby
voodoofish4301 has quit [Ping timeout: 250 seconds]
tmtwd has quit [Max SendQ exceeded]
tmtwd has joined #ruby
craigp has joined #ruby
ullu has quit [Ping timeout: 272 seconds]
saneax_AFK is now known as saneax
craigp has quit [Ping timeout: 246 seconds]
nankyokusei has joined #ruby
l4v2 has joined #ruby
pontiki has joined #ruby
neo__ has quit [Remote host closed the connection]
neo__ has joined #ruby
nankyokusei has quit [Ping timeout: 272 seconds]
<l4v2> Can someone take a look at this and tell me why this LIKE querry isn’t working. Thank you. https://gist.github.com/anonymous/61c23405aaeb0b5561cc642f4f333d13
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
neo__ has quit [Ping timeout: 250 seconds]
elifoster has joined #ruby
Wolland has joined #ruby
sumobob has quit [Ping timeout: 260 seconds]
<adam12> l4v2: you likely want "%good%"
xall has quit [Ping timeout: 272 seconds]
sumobob has joined #ruby
sneakers has quit [Ping timeout: 244 seconds]
<pontiki> looks like homework to me
<l4v2> adam12 ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: cars: SELECT "cars".* FROM "cars" WHERE (cars LIKE '%good%')
<l4v2> No, it’s just me doing this guys git challenges
<adam12> l4v2: 'cars' in your query should be 'condition'
<l4v2> Sweet, thanks adam12. I was close. everything I saw used the # sign in there
<adam12> l4v2: #{} is interopolation. So #{good} would of been the value of the local variable 'good'
<adam12> so it would of worked, had you put `good = "good"` somewhere before it.
<l4v2> oh ok, thanks
<l4v2> How is this better than SQL?
jenrzzz has quit [Ping timeout: 264 seconds]
pickandmix has quit [Ping timeout: 250 seconds]
<adam12> Well for one, if `good` was ";DROP FROM cars" it wouldn't work because it's escaped properly for you.
<l4v2> THis seems hard lol
<l4v2> Not seeing it yet
<pontiki> it isn't better ; it *is* sql
patrick_star has joined #ruby
patrick_star_3 has quit [Ping timeout: 264 seconds]
astrobunny has joined #ruby
<l4v2> Why not just query the SQL or PostgreSQL way?
<pontiki> why not?
<pontiki> when you put a query in a string like that, it *is* SQL
dcunit3d has joined #ruby
SilverKey has joined #ruby
RegulationD has joined #ruby
xall has joined #ruby
mattwashere has joined #ruby
<l4v2> Are any of you rails developers?
maloik has joined #ruby
<l4v2> I’m trying to get my first Rails job, and even with a degree, I only got one interview.
RegulationD has quit [Ping timeout: 250 seconds]
<l4v2> I’ve been learning on my own time
<pontiki> i've been doing rails dev since ~ 2007
<pontiki> heavily the last 5 years
<l4v2> Remotely or on site?
<pontiki> both
<pontiki> full-time and contract
<l4v2> What city are you in?
<pontiki> why?
<l4v2> There’s no Rails work in my area.
<l4v2> I’m probably gonna have to move to NYC
<pontiki> most major cities in the US there is
<pontiki> it's never going to be as prevalent as PHP or Java
<l4v2> Yeah, I’m outside of Syracuse NY, and there’s nothing, but I will move to do it.
mattwashere has quit [Ping timeout: 244 seconds]
edub4rt has quit [Remote host closed the connection]
ponga has joined #ruby
<pontiki> isn't Rochester a big tech area?
voodoofish430 has quit [Ping timeout: 264 seconds]
<pontiki> NYC certainly has a lot
voodoofish430 has joined #ruby
conta has joined #ruby
<l4v2> A lot of places in NY are big tech areas, but only NYC seems to have Rails stuff going on.
<pontiki> i'm in the twin cities, and there's a bunch here; there's a lot in SF, Denver, KC, PDX, Seattle
<adam12> Buffalo is really picking up
cdg has quit [Remote host closed the connection]
<l4v2> I was just in Buffalo and NYC for some other work
<l4v2> I’d rather go to the big city, where I just paid out my but in tolls, bridge tolls, parking, etc…
<pontiki> seems to be a lot in TX; i keep getting offers from all over there. This past week I've heard from Ohio, PA, NC too
<l4v2> How did you get your first Rails job?
smathy_afk is now known as smathy
astrobunny has quit [Remote host closed the connection]
<pontiki> i was contacted by a recruiter
cyphase has quit [Ping timeout: 260 seconds]
<l4v2> I can’t even get into the tech field…
<pontiki> i've been in the tech field since 1980
<smathy> Better to have some open source contributions/projects to your name than a degree.
astrobunny has joined #ruby
<pontiki> indeed, yes
<smathy> ...and better to meet and network with people at meetups than apply for advertised jobs.
<pontiki> much yes
<pontiki> good jobs, the jobs you want, are not gotten by sending in a resume with a million other people
<pontiki> they're had by meeting and talking to people, getting to know them and them you
northfurr has quit [Quit: northfurr]
<l4v2> Sounds like I’m gonna go back to bagging groceries then, because I know no one in this field
djbkd has joined #ruby
<smathy> Certainly when you're first starting, later, once you have an impressive record and career you can compete with others in an interview/applicant situation.
<pontiki> you will never meet them if you don't go out and meet them
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
cyphase has joined #ruby
<l4v2> What a ridiculous field to start out in. I go to school, get a degree, then no one will touch me, because I don’t have a big history, yet in the 80’s and 90’s everyone was learning together.
<smathy> It was the same in the 80s and 90s.
<pontiki> what degree?
<l4v2> Comp Sci
<pontiki> most ppl in web i've met don't have a degree at all
<l4v2> I thought I was gonna be all sought after, and I ehar back from no one with a pretty impressive resume
<pontiki> a lot of the top players i know don't, even
<smathy> A degree has never meant anything in this industry. Not unless you wanted some boring corporate job.
<smathy> I have no degree, I dropped out of comsci because it was boring.
<pontiki> i have a CS degree, but i think i got hired initially because i already had actual dev experience. tonight i said something like "getting my degree didn't prevent from learning to be a developer"
sumobob has quit [Ping timeout: 276 seconds]
kareeoleez has joined #ruby
<l4v2> Well, I look at this year like it is my fifth year in college, becuase now I am acrually focusing on one thing to be really good at it.
<smathy> The greatest thing about the tech industry is that it's so easy to prove yourself (with or without a degree).
<smathy> It's hard for graduates in any industry to get their first job, but at least in tech you can get involved in other things.
<smathy> ...but l4v2, you gotta move from Syracuse - that's just a non-starter.
<smathy> Heh, pontiki, I love that statement - so true :)
<l4v2> I keep applying to Rails jobs in NYC and remotely
<smathy> Yeah, very unlikely to score there with no track record. Remote jobs are the hardest to get because you're competing with everyone else in the whole country.
<l4v2> I know, that’s why I’m applying to NYC
<pontiki> are they hiring entry level rails devs anywhere there?
<smathy> Oh sorry, I thought you meant for remote jobs in NYC.
<smathy> I'd recommend moving to SF, NY, LA, Chicago, San Diego, or Austin - in that order.
<pontiki> I'll toss in Minneapolis/St. Paul there; Rails is hot here. The weather sucks mightily tho
<l4v2> Yeah, I have a place to sublet from in NJ just across the bridge from NYC, but if someone down there would actully respond to my resume I will move.
SilverKey has quit [Quit: Halted.]
<l4v2> I had one phone interview, and the guy said “Oh learning curve>” and let me go.
<smathy> l4v2, btw, this is a decent resource to see where all the jobs are: https://whoishiring.io/ - and interesting it suggests I should have mentioned Denver too :)
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cyphase has quit [Ping timeout: 258 seconds]
ketherah has quit [Quit: Connection closed for inactivity]
<l4v2> Cool, thank you
<smathy> What that doesn't show though is the insane community that exists in SF. It's like a 24x7 tech convention is constantly in progress there.
<smathy> If I was just starting my career, there's nowhere else in the world I would be.
<smathy> (and I don't even like SF :)
yfeldblum has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
<pontiki> thank you; SF is my love, my true home, my tribal lands
rbennacer has joined #ruby
<smathy> Heh :) Man, if I could stand living there, I'd be there without question.
cyphase has joined #ruby
<l4v2> Why don’t you guys like it there?
<pontiki> i *do* like it there
<smathy> I was gonna say :)
<pontiki> i am where i am today because i'm also caring for my parents
<pontiki> but i'll be back there as soon as i can manage it
<l4v2> Hey look, and there’s my area - military job, military job, etc…
craigp has joined #ruby
<smathy> pontiki, ah, fair enough.
<smathy> I don't like SF because it's humid when it's hot, it's windy when it's cold, lots of homeless, hippies, and socialists. I like visiting the place, but I can't live there.
<pontiki> i am a hippy, i am a socialist, and i've been homeless :)
<smathy> Heh :) It is your tribal land ;)
<pontiki> when it's humid, it's not really humid
zacstewart has quit [Ping timeout: 244 seconds]
<pontiki> it's actually more humid when it's cold, which is why the wind hurts
<pontiki> why you wore your expedition parka at candlestick park :D
tmtwd has quit [Ping timeout: 276 seconds]
<pontiki> i love the whole bay area, all of it, even the "bad" parts
<smathy> Maybe I've been unlucky, I definitely had some very humid hot days there, but windy and the other things are enough to kill it as an option for me :)
pLaToOn has joined #ruby
<smathy> I wish I did too, it's such a great place for tech.
<pontiki> nothing like i get here in the midwest, 90deg and 90%H
<l4v2> My plain leaves tomorrow.
bnagy has quit [Ping timeout: 246 seconds]
<pontiki> the bay area has "natural A/C" with the marine layer moving in nightly and cooling everything off
bnagy has joined #ruby
<pontiki> (which is what makes the humid cold, mostly)
<pontiki> it's by no means perfect, and by no means suited for everyone
<pontiki> it is a hugely different mental landscape than most of the rest of the world
<smathy> l4v2, good for you.
<pontiki> for me, within that, lies a level of honesty and authenticity i've never felt anywhere else (and i miss it)
<smathy> Yeah, people are definitely disarmingly up front there.
<l4v2> I was just kidding, I was gonna go to NYC first, just cause I don’t watn to be too far away from my family.
<pontiki> another aspect of SF is that it is a mecca for misfits
<smathy> l4v2, you can definitely make NYC work, that's the second best place in the US for tech. It's definitely a distant second though, and worth thinking about, but close to family is important too for most people.
<l4v2> That’s where I belong then
<l4v2> Thanks for the advice. I’m gonna get back to ActiveRecord querying now.
<smathy> :)
* smathy heads off too - although to sleep :)
<pontiki> nini
<smathy> Smelly hippy!
<l4v2> Is queryng usually done on Heroku?
<l4v2> console?
<l4v2> in production?
<pontiki> sorry, i dn't use heroku
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pontiki> and i never touch production unless there's a huge bug
diablerouge has joined #ruby
<l4v2> So you do it in development and then push it up
douglascorrea has quit [Remote host closed the connection]
<pontiki> and then cuss at the devs who made it impossible to debug locally
<pontiki> yes, dev/text -> qa -> staging -> production
<pontiki> those arrows go in one direction only
<pontiki> unless we do a major fuckup
<l4v2> So go into the Rails Console to mess with the model
<l4v2> just like I did inside of SQL
astrobunny has quit [Remote host closed the connection]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
sp4rrow has joined #ruby
sp4rrow has quit [Client Quit]
harfangk has joined #ruby
<pontiki> yeah, keep your console stuff within development
<pontiki> the playing around and experiemnting, i mean
Hyuk has joined #ruby
KINGSABRI__ has joined #ruby
textchimp has left #ruby [#ruby]
joeyjones has left #ruby ["Leaving"]
pLaToOn has quit [Ping timeout: 260 seconds]
<l4v2> Cool thanks. Last question, what is the most important stuff to now for Rails?
KINGSABRI has quit [Ping timeout: 244 seconds]
astrobunny has joined #ruby
<l4v2> I read the “Well Grounded Rubyist” as well as making a Twitter themed site with Rails
tmtwd has joined #ruby
elifoster has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
iMadper has joined #ruby
rbennacer has quit [Remote host closed the connection]
l4v2 has left #ruby [#ruby]
rkazak has quit [Quit: Sleep.....ing....]
<pontiki> when not to do something
<pontiki> just like in jazz -- you have to know what notes not to play
zacstewart has joined #ruby
diablerouge has left #ruby [#ruby]
<pontiki> the most important thing to know *right now* about rails is it is complex, deep, and often looks like magic
vqrs_ has quit [Ping timeout: 244 seconds]
<pontiki> so you need to start learning in small bits and pieces; do not ever be afraid to spool up a new rails app on the fly just to figure out one small thing
vqrs has joined #ruby
Coldblackice has joined #ruby
pawnbox has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
mtkd has quit [Ping timeout: 276 seconds]
jaguarmagenta has quit [Remote host closed the connection]
mistermocha has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
yfeldblum has quit [Remote host closed the connection]
mistermocha has quit [Read error: Connection reset by peer]
zacstewart has quit [Ping timeout: 276 seconds]
pLaToOn has joined #ruby
Wolland has quit [Read error: Connection reset by peer]
dcunit3d has quit [Ping timeout: 252 seconds]
Wolland has joined #ruby
pawnbox has quit [Ping timeout: 258 seconds]
lkb has joined #ruby
mistermo_ has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
TomyLobo has joined #ruby
pLaToOn has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
misterm__ has joined #ruby
mistermo_ has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
misterm__ has quit [Ping timeout: 250 seconds]
duncannz has joined #ruby
northfurr has joined #ruby
iMadper is now known as Madper|mtg
Hyuk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sauvin has joined #ruby
ta_ has joined #ruby
chopin has joined #ruby
chopin is now known as Guest67234
dcunit3d has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
northfurr has quit [Quit: northfurr]
moei has quit [Quit: Leaving...]
Es0teric has quit [Quit: Computer has gone to sleep.]
mistermocha has joined #ruby
<timonv> Does anyone use sidekiq with high req/s on a http server? The server is able to easily 1500req/s, but in sidekiq it just clutters up
mistermocha has quit [Read error: Connection reset by peer]
zacstewart has joined #ruby
<timonv> simple net http, and benchmarks on the server with ruby show a high req/s as well
Hobogrammer has quit [Ping timeout: 244 seconds]
ornerymoose has joined #ruby
harfangk has quit [Quit: harfangk]
nankyokusei has joined #ruby
northfurr has joined #ruby
Niham has joined #ruby
aufi has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
k3rn31 has quit [Quit: Computer has gone to sleep.]
zacstewart has quit [Ping timeout: 246 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
moei has joined #ruby
the_drow has joined #ruby
harfangk has joined #ruby
johns_ has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
johns_ has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 244 seconds]
ornerymoose has quit [Quit: ornerymoose]
andikr has joined #ruby
Guest67234 has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
mistermocha has joined #ruby
last_staff has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
timanema has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
agit0 has joined #ruby
timanema has quit [Ping timeout: 240 seconds]
MrBusiness has joined #ruby
workmad3 has joined #ruby
mistermo_ has joined #ruby
hutch34_ has joined #ruby
conta1 has joined #ruby
mistermocha has joined #ruby
firstdayonthejob has joined #ruby
Dimik has joined #ruby
hk238 has joined #ruby
misterm__ has joined #ruby
xall has quit [Ping timeout: 252 seconds]
RegulationD has joined #ruby
sp4rrow has joined #ruby
mistermo_ has quit [Ping timeout: 250 seconds]
hutch34_ has quit [Ping timeout: 244 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has quit [Ping timeout: 264 seconds]
banister has joined #ruby
misterm__ has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
firstdayonthejob has quit [Ping timeout: 260 seconds]
ta_ has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 258 seconds]
jaguarmagenta has joined #ruby
LoneHermit has quit [Remote host closed the connection]
TomyLobo has quit [Ping timeout: 264 seconds]
harfangk has quit [Quit: harfangk]
AlexRussia has quit [Ping timeout: 246 seconds]
mistermo_ has joined #ruby
ta_ has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
aganov has joined #ruby
northfurr has quit [Quit: northfurr]
douglascorrea has joined #ruby
jenrzzz has joined #ruby
mistermo_ has quit [Ping timeout: 252 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
ta_ has quit [Ping timeout: 264 seconds]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
Madplatypus has joined #ruby
elifoster has joined #ruby
douglascorrea has quit [Ping timeout: 240 seconds]
Wolland has quit []
ur5us has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
haxrbyte has joined #ruby
xall has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
dcunit3d has quit [Ping timeout: 260 seconds]
vuoto has joined #ruby
jas02 has joined #ruby
BTRE has quit [Remote host closed the connection]
madgen has joined #ruby
rrs has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
jaruga___ has joined #ruby
rrs has quit [Client Quit]
jaruga___ has quit [Remote host closed the connection]
jaruga___ has joined #ruby
Dimik has quit [Ping timeout: 272 seconds]
dionysus69 has joined #ruby
jaruga___ has quit [Client Quit]
zacstewart has joined #ruby
cyphase has quit [Ping timeout: 264 seconds]
jaruga___ has joined #ruby
Hyuk has joined #ruby
cyphase has joined #ruby
ptierno_ has joined #ruby
BTRE has joined #ruby
zacstewart has quit [Ping timeout: 260 seconds]
djbkd has quit [Quit: My people need me...]
craigp has joined #ruby
ptierno has quit [Ping timeout: 258 seconds]
astrobunny has quit [Remote host closed the connection]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hounddog has joined #ruby
anisha has joined #ruby
codecop has joined #ruby
dcunit3d has joined #ruby
astrobunny has joined #ruby
jenrzzz has joined #ruby
n1x-nz has joined #ruby
ruby[bot] has joined #ruby
ta_ has joined #ruby
vondruch has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
TomyWork has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
yfeldblu_ has quit [Ping timeout: 250 seconds]
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
madgen has quit [Ping timeout: 264 seconds]
cyphase has quit [Quit: cyphase.com]
jenrzzz has quit [Ping timeout: 260 seconds]
cyphase has joined #ruby
djbkd has joined #ruby
edwinvdgraaf has joined #ruby
jeyraof has quit [Quit: Leaving]
Hyuk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
ptierno_ has quit [Ping timeout: 244 seconds]
binaryplease1 has joined #ruby
ptierno has joined #ruby
ptierno has quit [Changing host]
ptierno has joined #ruby
binaryplease has quit [Ping timeout: 244 seconds]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
RegulationD has quit [Ping timeout: 258 seconds]
Pumukel has joined #ruby
LoneHerm_ has joined #ruby
quakephil has joined #ruby
multi_io has quit [Ping timeout: 276 seconds]
multi_io has joined #ruby
mistermocha has joined #ruby
binaryplease1 is now known as binaryplease
LoneHerm_ has quit [Ping timeout: 260 seconds]
Es0teric has joined #ruby
yfeldblum has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
bigkevmcd has joined #ruby
tmtwd has joined #ruby
eGGshke has joined #ruby
haxrbyte_ has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
blaxter has joined #ruby
vuoto has quit [Read error: Connection reset by peer]
vuoto has joined #ruby
rkazak has joined #ruby
haxrbyte_ has quit [Client Quit]
eGGshke has quit [Ping timeout: 246 seconds]
eGGshke has joined #ruby
arajakul has quit [Ping timeout: 252 seconds]
djbkd has quit [Remote host closed the connection]
sepp2k has joined #ruby
haxrbyte has joined #ruby
elifoster has quit [Ping timeout: 244 seconds]
pawnbox_ has joined #ruby
mdw has joined #ruby
dcunit3d has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
pawnbox has quit [Ping timeout: 258 seconds]
Silthias1 has joined #ruby
Spami has joined #ruby
Hyuk has joined #ruby
Hyuk has quit [Max SendQ exceeded]
harfangk has joined #ruby
Silthias has quit [Ping timeout: 258 seconds]
zacstewart has joined #ruby
nofxx has quit [Ping timeout: 260 seconds]
mistermocha has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
nankyokusei has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
Ropeney has joined #ruby
Ropeney has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
zacstewart has quit [Ping timeout: 250 seconds]
dhruvasagar has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
Niham has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
piotrj has joined #ruby
olspookishmagus has quit [Quit: Lost terminal]
mistermocha has quit [Ping timeout: 240 seconds]
tristanp_ has joined #ruby
conta1 has quit [Ping timeout: 244 seconds]
harfangk has quit [Quit: harfangk]
tristanp has quit [Ping timeout: 250 seconds]
harfangk has joined #ruby
nhhc has joined #ruby
olspookishmagus has joined #ruby
dhruvasa1 has joined #ruby
dhruvasagar has quit [Disconnected by services]
dhruvasa1 is now known as dhruvasagar
dhruvasagar is now known as Guest53067
araujo_ has quit [Quit: Leaving]
mdw has quit [Quit: Sleeping Zzzzz]
dh64 has quit [Quit: Konversation terminated!]
tmtwd has quit [Ping timeout: 272 seconds]
harfangk has quit [Quit: harfangk]
mistermocha has joined #ruby
tomphp has joined #ruby
marr has joined #ruby
mrgrieves has joined #ruby
astrobunny has quit [Remote host closed the connection]
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 276 seconds]
jackjackdripper has quit [Quit: Leaving.]
piotrj has quit [Quit: leaving]
piotrj has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
RegulationD has joined #ruby
torandu has quit [Ping timeout: 246 seconds]
Couch has joined #ruby
jgt has joined #ruby
mistermo_ has joined #ruby
Silthias1 has quit [Ping timeout: 244 seconds]
mistermo_ has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
mistermocha has quit [Read error: Connection reset by peer]
norc has joined #ruby
workmad3 has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
RegulationD has quit [Ping timeout: 252 seconds]
vuoto has quit [Remote host closed the connection]
mistermocha has joined #ruby
LoneHerm_ has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
Spami has quit [Quit: This computer has gone to sleep]
workmad3 has quit [Ping timeout: 276 seconds]
vuoto has joined #ruby
harfangk has joined #ruby
araujo has joined #ruby
pandaant has joined #ruby
MrBusiness2 has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
Silthias has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.4]
MrBusiness has quit [Ping timeout: 258 seconds]
ta_ has quit [Ping timeout: 260 seconds]
<adaedra> Hello
LoneHerm_ has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
Madper|mtg has quit [Remote host closed the connection]
yfeldblum has joined #ruby
xall has quit [Ping timeout: 260 seconds]
tildes has joined #ruby
vuoto has quit [Remote host closed the connection]
mistermocha has joined #ruby
agit0 has joined #ruby
ur5us has joined #ruby
solars has joined #ruby
dsea11 has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
dsea has quit [Ping timeout: 252 seconds]
neo_ has joined #ruby
norc has left #ruby [#ruby]
madgen has joined #ruby
blackgoat has quit [Ping timeout: 246 seconds]
ciampix has joined #ruby
neo_ has quit [Ping timeout: 240 seconds]
agit0 has quit [Quit: zzzZZZ….]
ur5us has quit [Remote host closed the connection]
msvbhat has joined #ruby
<jhass> timonv: your question is not entirely clear to me, you're making requests and sidekiq has too much overhead? Do you create a job for each request?
ta_ has joined #ruby
mtkd has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
mtkd has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
Niham has joined #ruby
cajone has quit [Ping timeout: 244 seconds]
MrBusiness2 has quit [Ping timeout: 258 seconds]
Niham has quit [Max SendQ exceeded]
flughafen has joined #ruby
<flughafen> ohaiyo gozaimasu
cajone has joined #ruby
RegulationD has joined #ruby
Niham has joined #ruby
Niham has quit [Max SendQ exceeded]
Beverage has joined #ruby
Niham has joined #ruby
hk238 has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
isberg has joined #ruby
koooge has quit [Quit: Leaving...]
jgt has quit [Ping timeout: 244 seconds]
Wsewolod has quit [Ping timeout: 250 seconds]
codecop has quit [Remote host closed the connection]
mistermocha has joined #ruby
madgen has quit [Quit: Lost terminal]
pawnbox has joined #ruby
tokynet has quit [Quit: Connection closed for inactivity]
skade has joined #ruby
madgen has joined #ruby
lxsameer has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
agit0 has joined #ruby
harfangk has quit [Quit: harfangk]
Guest8082 has joined #ruby
dcunit3d has joined #ruby
<timonv> jhass: Under high load each job makes 10s of requests, where we might have a 100 jobs active, the jobs themselves do it in serial ofcourse
<timonv> jhass: When we test it with ab or via ruby threading manually, it goes fine and it shouldn't be an issue
<timonv> jhass: Tried also Net::HTTP.start and typheous, and all of them get 1000+req/s easilly (with <100ms respond times accross)
<jhass> typhoeus inside sidekiq?
<timonv> So I'm suspecting it's something to do with sidekiq
<timonv> Haha hell no
<timonv> That never worked, although I suppose sidekiq 4 might have different results
<timonv> Sidekiq is using Net::HTTP.start right now
harfangk has joined #ruby
<timonv> jhass: Working on bulking up the requests per job anyway, but since we get < 100req/s in sidekiq, the math implies it will still be a problem
<jhass> typhoeus inside sidekiq does work for us
<jhass> idk there's not much to do here without hands on
<jhass> I suspect a mutex somewhere
joonty has joined #ruby
<jhass> typhoeus hydra inside sidekiq with large bulks (1-10k) should get you there
SilverKey has joined #ruby
<jhass> if you're up to experimental stuff sidekiq.cr might be another venue
eGGshke has quit [Ping timeout: 252 seconds]
seth has quit [Ping timeout: 240 seconds]
eGGshke has joined #ruby
dminuoso has joined #ruby
d0lph1n98 has joined #ruby
jgt has joined #ruby
howdoi has joined #ruby
zacstewart has joined #ruby
nankyokusei has joined #ruby
tildes has quit [Ping timeout: 244 seconds]
tildes has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
zacstewart has quit [Ping timeout: 260 seconds]
sdothum has joined #ruby
biberu has joined #ruby
seth has joined #ruby
Silthias has left #ruby [#ruby]
millerti has joined #ruby
biberu has quit [Client Quit]
bkxd_ has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
pwnd_nsfw has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ruby
emiltin has joined #ruby
mistermocha has joined #ruby
DoubleMalt has quit [Ping timeout: 264 seconds]
mdw has joined #ruby
platzhirsch has joined #ruby
timanema has joined #ruby
nofxx has quit [Ping timeout: 258 seconds]
symm- has joined #ruby
MrBusiness2 has joined #ruby
isberg has quit [Quit: I'm out]
mistermocha has quit [Ping timeout: 244 seconds]
ta__ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Guest53067 has quit [Read error: Connection reset by peer]
timanema has quit [Ping timeout: 276 seconds]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
hutch34_ has joined #ruby
MrBusiness2 has quit [Ping timeout: 272 seconds]
Guest53067 has joined #ruby
jgt has quit [Ping timeout: 272 seconds]
duncannz has quit [Remote host closed the connection]
Guest53067 has quit [Client Quit]
DoubleMalt has joined #ruby
dhruvasagar has joined #ruby
hutch34_ has quit [Ping timeout: 240 seconds]
jgt has joined #ruby
RegulationD has joined #ruby
jaguarmagenta has joined #ruby
Pumukel has quit [Remote host closed the connection]
biberu has joined #ruby
freerobby has joined #ruby
SilverKey has quit [Quit: Halted.]
mistermocha has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
jaguarmagenta has quit [Ping timeout: 244 seconds]
jgt has quit [Read error: Connection reset by peer]
vuoto has joined #ruby
jgt has joined #ruby
chip_ has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
d0lph1n98 has quit [Ping timeout: 276 seconds]
diegoaguilar has joined #ruby
mistermocha has joined #ruby
johnmilton has joined #ruby
n1x-nz has quit [Ping timeout: 250 seconds]
LoneHermit has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
blackgoat has joined #ruby
kareeoleez has quit [Remote host closed the connection]
LoneHermit has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby
mistermo_ has quit [Ping timeout: 276 seconds]
Silthias has joined #ruby
madgen has quit [Ping timeout: 252 seconds]
vuoto has quit [Quit: Lost terminal]
dcunit3d has quit [Ping timeout: 252 seconds]
kareeoleez has joined #ruby
isberg has joined #ruby
kareeoleez has quit [Ping timeout: 244 seconds]
isxek has joined #ruby
<timonv> jhass: Thanks
rodfersou has joined #ruby
roamingdog has joined #ruby
kareeoleez has joined #ruby
armin has quit [Read error: Connection reset by peer]
Madplatypus has quit [Quit: Connection closed for inactivity]
armin has joined #ruby
yfeldblum has quit [Remote host closed the connection]
giz|work has joined #ruby
Niham has quit [Ping timeout: 244 seconds]
kareeoleez has quit [Ping timeout: 276 seconds]
yfeldblum has joined #ruby
harfangk has quit [Quit: harfangk]
GodFather has joined #ruby
Vile` has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has joined #ruby
allcentury has joined #ruby
GodFather has quit [Remote host closed the connection]
GodFather has joined #ruby
<yorickpeterse> >> Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond)
<ruby[bot]> yorickpeterse: # => 1466767978614458397 (https://eval.in/594926)
<yorickpeterse> >> Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)
<ruby[bot]> yorickpeterse: # => 10823698665 (https://eval.in/594927)
<yorickpeterse> hm
<yorickpeterse> I wonder how OS X handles those
Axy has quit [Read error: Connection reset by peer]
<apeiros> it zeroes
<apeiros> microsecond is its maximum precision
<apeiros> Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond) # => 1466768063924563000
dcunit3d has joined #ruby
ensyde__ has quit [Ping timeout: 244 seconds]
kareeoleez has joined #ruby
postmodern has quit [Quit: Leaving]
the_drow has quit [Quit: This computer has gone to sleep]
Niham has joined #ruby
RegulationD has joined #ruby
kareeoleez has quit [Ping timeout: 258 seconds]
Niham has quit [Max SendQ exceeded]
Niham has joined #ruby
timanema has joined #ruby
d0lph1n98 has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
kareeoleez has joined #ruby
ullu has joined #ruby
cyphase has quit [Ping timeout: 264 seconds]
quakephil has quit [Ping timeout: 250 seconds]
kareeoleez has quit [Ping timeout: 246 seconds]
cyphase has joined #ruby
toretore has joined #ruby
msvbhat has quit [Ping timeout: 260 seconds]
blackgoat has quit [Quit: WeeChat 1.5]
kareeoleez has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
7YUABEWIE has joined #ruby
kareeoleez has quit [Ping timeout: 240 seconds]
last_staff has quit [Quit: last_staff]
gnufied has quit [Quit: Leaving]
7YUABEWIE has quit [Ping timeout: 240 seconds]
msvbhat has joined #ruby
gnufied has joined #ruby
synthroid has joined #ruby
c355e3b has joined #ruby
ensyde__ has joined #ruby
dminuoso has quit [Ping timeout: 258 seconds]
loseyourmind has joined #ruby
timanema has quit [Ping timeout: 240 seconds]
conta1 has joined #ruby
neo_ has joined #ruby
d0lph1n98 has quit [Ping timeout: 246 seconds]
quakephil has joined #ruby
aries_liuxueyang has quit [Ping timeout: 250 seconds]
tk__ has joined #ruby
vale_tudo has joined #ruby
neo_ has quit [Ping timeout: 250 seconds]
d0nn1e has quit [Ping timeout: 252 seconds]
douglascorrea has joined #ruby
Snowy has quit [Remote host closed the connection]
armyriad has quit [Ping timeout: 250 seconds]
kareeoleez has joined #ruby
valetudo has quit [Ping timeout: 244 seconds]
nankyokusei has joined #ruby
dminuoso has joined #ruby
zacstewart has joined #ruby
armyriad has joined #ruby
vale-tudo has joined #ruby
senayar_ has joined #ruby
nickjj_ has joined #ruby
d0nn1e has joined #ruby
madgen has joined #ruby
quakephil has quit [Ping timeout: 240 seconds]
isberg has quit [Quit: I'm out]
senayar has quit [Ping timeout: 244 seconds]
nickjj has quit [Ping timeout: 244 seconds]
joonty has quit [Quit: This computer has gone to sleep]
benlieb has joined #ruby
chip_ has quit [Ping timeout: 260 seconds]
blaxter has quit [Quit: foo]
douglascorrea has quit [Ping timeout: 246 seconds]
kareeoleez has quit [Ping timeout: 260 seconds]
vale_tudo has quit [Ping timeout: 244 seconds]
nankyokusei has quit [Ping timeout: 260 seconds]
quakephil has joined #ruby
zacstewart has quit [Ping timeout: 244 seconds]
haxrbyte has quit [Quit: Leaving...]
armyriad has quit [Ping timeout: 240 seconds]
isberg has joined #ruby
dminuoso has quit [Quit: leaving]
mdw has quit [Quit: Sleeping Zzzzz]
armyriad has joined #ruby
DTZUBDUB has quit [Ping timeout: 244 seconds]
ensyde__ has quit [Ping timeout: 250 seconds]
aries_liuxueyang has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
slowmatt has joined #ruby
aupadhye has joined #ruby
giz|work has quit [Ping timeout: 250 seconds]
ullu has quit [Ping timeout: 276 seconds]
emiltin has quit [Quit: Computer has gone to sleep.]
deuterium has joined #ruby
mdw has joined #ruby
Coldblackice has quit [Ping timeout: 276 seconds]
joonty has joined #ruby
ta__ has quit [Remote host closed the connection]
araujo_ has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
ensyde__ has joined #ruby
araujo_ has quit [Max SendQ exceeded]
araujo_ has joined #ruby
ornerymoose has joined #ruby
araujo has quit [Ping timeout: 272 seconds]
RegulationD has joined #ruby
jaguarmagenta has joined #ruby
tadassce has joined #ruby
araujo_ has quit [Max SendQ exceeded]
workmad3 has joined #ruby
rbennacer has joined #ruby
araujo_ has joined #ruby
dn` has quit [Read error: Connection reset by peer]
dn` has joined #ruby
Vile` has quit [Ping timeout: 244 seconds]
Jardayn has joined #ruby
ornerymoose has quit [Ping timeout: 250 seconds]
jgt has quit [Ping timeout: 244 seconds]
jaguarmagenta has quit [Ping timeout: 250 seconds]
ornerymoose has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
nettoweb has joined #ruby
Macaveli has joined #ruby
giz|work has joined #ruby
allcentury has quit [Ping timeout: 244 seconds]
davedev24 has joined #ruby
<yorickpeterse> hm
Niham has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has quit [Read error: Connection reset by peer]
madgen has quit [Ping timeout: 276 seconds]
msvbhat has quit [Ping timeout: 246 seconds]
<yorickpeterse> Ah well, as long as Linux supports it it should be fine
CloCkWeRX has joined #ruby
nickjj_ is now known as nickjj
bmurt has joined #ruby
madgen has joined #ruby
msvbhat has joined #ruby
sergio_101 has joined #ruby
bkxd_ has quit [Ping timeout: 250 seconds]
kareeoleez has joined #ruby
LoneHermit has joined #ruby
ensyde__ has quit [Ping timeout: 252 seconds]
kareeoleez has quit [Remote host closed the connection]
kareeoleez has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
timanema has joined #ruby
solocshaw has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
diegoaguilar has quit [Remote host closed the connection]
LoneHermit has quit [Ping timeout: 244 seconds]
solocshaw has joined #ruby
tildes has quit [Ping timeout: 276 seconds]
ciampix has quit [Ping timeout: 240 seconds]
jgt has joined #ruby
infra-red has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
infra-red has quit [Remote host closed the connection]
solocshaw has joined #ruby
jgt1 has joined #ruby
FernandoBasso has quit [Ping timeout: 260 seconds]
infra-red has joined #ruby
allcentury has joined #ruby
loseyourmind has quit [Ping timeout: 260 seconds]
jgt has quit [Ping timeout: 240 seconds]
isberg has quit [Quit: I'm out]
romistrub has joined #ruby
rbennacer has quit [Remote host closed the connection]
<romistrub> hi guys
<romistrub> got an interesting issue
<romistrub> returns ArgumentError, missing keywords a, b
Snowy has joined #ruby
<apeiros> it does not *return* an ArgumentError, it *raises* one
eGGshke has quit [Quit: Leaving...]
loseyourmind has joined #ruby
<apeiros> try: def f(*args); p args; end
<romistrub> apeiros: yeah, that one :P
<apeiros> see how the arguments you pass are received by the method
<apeiros> you might see why.
agit0 has quit [Quit: zzzZZZ….]
zacstewart has joined #ruby
ponga has quit []
malconis has joined #ruby
pawnbox has quit [Remote host closed the connection]
malconis has quit [Remote host closed the connection]
pawnbox has joined #ruby
malconis has joined #ruby
Snowy has quit [Ping timeout: 260 seconds]
Vile` has joined #ruby
<romistrub> now I'm getting a really weird issue
<romistrub> undefined method `call' for nil:NilClass (NoMethodError)
<apeiros> ?code romistrub
<ruby[bot]> romistrub: We can't help you without your code, please post it to https://gist.github.com
aegis3121 has joined #ruby
infra-red has quit []
Niham has joined #ruby
DTZUBDUB has joined #ruby
rbennacer has joined #ruby
<apeiros> romistrub: uh, yeah, and why exactly do you `f.call`?
tadassce has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 276 seconds]
rbennacer has quit [Remote host closed the connection]
<romistrub> apeiros: because I need to use it in my real program, and I'm just testing it out here
<apeiros> bad answer
<apeiros> try again
<romistrub> oh
Couch has quit [Ping timeout: 276 seconds]
<romistrub> I'm debugging my program and trying to isolate how f.call works and why I'm getting an ArgumentError
solocshaw has quit [Ping timeout: 260 seconds]
<apeiros> *sob*
rbennacer has joined #ruby
<apeiros> your old invocation: `f(*{a:1,b:2})`, your new one: `f.call(*{a:1,b:2})` - try again: why. did. you. change that?
chip_ has joined #ruby
fmcgeough has joined #ruby
<romistrub> I have a hash of functions that I'm making visible for RPC, and I use #call on those functions
<apeiros> and in your code example you also have a hash of functions?
jrafanie has joined #ruby
<romistrub> apeiros: nope, just testing out .call
<apeiros> …
<romistrub> to see why it behaves differently from a normal function call
<apeiros> how on earth do you figure that this makes any sense at all?
<romistrub> or how
<romistrub> isn't it just called sanity-checking?
<apeiros> you do seem to need some sanity-checking…
<romistrub> lol
DTZUBDUB has quit [Ping timeout: 252 seconds]
ChiefAlexander has joined #ruby
<apeiros> quick, tell me what `foo.bar()` in ruby does
<romistrub> calls bar() on foo
douglascorrea has joined #ruby
<apeiros> good, so tell me what `f.bar()` does
cdg has joined #ruby
<romistrub> calls bar on f
<apeiros> and `f.call()`?
<romistrub> calls call on f
<apeiros> and in your code example, what is `f`?
<romistrub> a function
<apeiros> method
edwinvdgraaf has quit []
<romistrub> ok
chip_ has quit [Remote host closed the connection]
<apeiros> ok, but you don't call methods on methods, you call methods on object
lxsameer has quit [Quit: WeeChat 1.5]
<apeiros> so… on what is .call called on?
<romistrub> wait what? I thought methods *were* objects
<apeiros> no
diegoviola has joined #ruby
<romistrub> a method object
<romistrub> oh, well there's my confusion
<jhass> you can get a representation of a method as a Method object
<jhass> but methods itself aren't objects
<romistrub> could I just do rpc_hash["my_function"]() ?
<apeiros> ^
<apeiros> romistrub: you should answer my question before asking new ones.
<romistrub> ok
<jhass> romistrub: you can't "call" an object
<jhass> you can only call methods
<jhass> you call methods on an object
<jhass> end of story
<apeiros> so: in `f.call()`, f is a method, yes, but on what is .call called?
<romistrub> it can't be called
<apeiros> wrong
<romistrub> well that's what I'm running into... f isn't an object, it's a method, so .call can't be called on it
<apeiros> >> "hello".upcase.capitalize.gsub(/e/, 'a')
<ruby[bot]> apeiros: # => "Hallo" (https://eval.in/594993)
<apeiros> we can very well chain methods
<apeiros> romistrub: in the above example, what's .capitalize called on?
<apeiros> hint: not on the method upcase.
<romistrub> the result of "hello".upcase
<apeiros> bravo
<romistrub> "HELLO"
<apeiros> and that's an object
<romistrub> right
<apeiros> so: in `f.call()`, f is a method, yes, but on what is .call called?
<romistrub> wait a minute...
<romistrub> on the return value of f
<romistrub> booooo urns
<romistrub> lol
<apeiros> congrats. mystery half solved.
<apeiros> and what's the return value of `f`?
<romistrub> nil
<romistrub> hence the error
<apeiros> and nil.call does not exist, yes, hence the error.
<apeiros> you can call it. but it raises.
lessless has quit [Read error: Connection reset by peer]
<romistrub> so how do I get f as an object? :P
<apeiros> method(:f)
<romistrub> got it
davedev24 has quit []
<romistrub> thanks :P
aries_liuxueyang has quit [Ping timeout: 276 seconds]
<apeiros> yw
<apeiros> seems your sanity check checked out :-p
<apeiros> (hope I got that expression right…)
lalalaaa has joined #ruby
jher has joined #ruby
<romistrub> sigh, now I get another weird error... ArgumentError, wrong number of arguments, 0 for 1 (one sec, about to paste the gist
<romistrub> same gist as before, just updated
<apeiros> don't use puts. that's useless for debugging.
<romistrub> haha, ok, use p?
<apeiros> and why on earth do you write method[:f]
<apeiros> that's NOT the same as method(:f)
<romistrub> omg
<romistrub> typo, I swear
<apeiros> you can't just randomly replace sigils in proglangs
araujo_ has quit [Quit: Leaving]
<apeiros> well…
<apeiros> you've got your current error right there.
<romistrub> yeaaaaaaah
<romistrub> I'm embarrassing myself this morning
<apeiros> your exception also tells you that btw.
hutch34_ has joined #ruby
<apeiros> line 2 of your exception should read "…:in `method'"
<apeiros> the :in `method' tells you which method was affected. in your case, the 'method' method.
SilverKey has joined #ruby
d0lph1n98 has joined #ruby
isberg has joined #ruby
RegulationD has joined #ruby
imperator has joined #ruby
<apeiros> sorry if I'm a bit brusque, might be the heat
shinnya has joined #ruby
ornerymoose has left #ruby [#ruby]
hutch34_ has quit [Ping timeout: 258 seconds]
<jhass> don't you have some mountain to crawl into down there? :P
RegulationD has quit [Ping timeout: 244 seconds]
<apeiros> the wifi is crap inside mountains
<Jenzo> God save the queen!
<Jenzo> My British pound dropped 20 cents
<apeiros> ?ot Jenzo
<ruby[bot]> Jenzo: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
bmurt has quit [Quit: Textual IRC Client: www.textualapp.com]
<flughafen> ?ot apeiros
<ruby[bot]> apeiros: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<apeiros> !qkick flughafen don't abuse the bot
flughafen was kicked from #ruby by ruby[bot] [don't abuse the bot]
<Jenzo> sorry wrong room
<Jenzo> I thought I was in another window
<apeiros> np Jenzo
jhack has joined #ruby
aries_liuxueyang has joined #ruby
nankyokusei has joined #ruby
<jhass> apeiros: who needs wifi anyway, you don't have fiber directly into your laptop?
mattwashere has joined #ruby
<apeiros> sadly no
ledestin has joined #ruby
JeremyM_ has joined #ruby
skade has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
agit0 has joined #ruby
loseyourmind has quit [Ping timeout: 272 seconds]
mtkd has quit [Ping timeout: 250 seconds]
roamingdog has quit [Remote host closed the connection]
strigon33 has joined #ruby
ciampix has joined #ruby
chipotle has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
mrgrieves has quit [Ping timeout: 244 seconds]
ledestin has quit [Ping timeout: 252 seconds]
SilverKey has quit [Quit: Halted.]
brendan- has joined #ruby
chipotle has quit [Max SendQ exceeded]
strigonLeader has quit [Ping timeout: 240 seconds]
neo_ has joined #ruby
chipotle has joined #ruby
SilverKey has joined #ruby
<romistrub> I'm surprised this channel is so quiet, given the number of ruby devs
d0lph1n98 has quit [Ping timeout: 272 seconds]
vuoto has joined #ruby
imperator has left #ruby ["Leaving"]
<jhass> ruby's just too easy
<jhass> no questions
<romistrub> jhass: lol plausible
pwnd_nsfw` has joined #ruby
AndroUser2 has joined #ruby
Kruppe has quit [Quit: ZNC - http://znc.in]
FernandoBasso has joined #ruby
craigp has quit [Ping timeout: 258 seconds]
msvbhat has quit [Ping timeout: 272 seconds]
Kruppe has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
arnonhongklay has joined #ruby
AndroUser2 has left #ruby ["AndroIRC"]
AndroUser2 has joined #ruby
LoneHerm_ has joined #ruby
macsteps has joined #ruby
msvbhat has joined #ruby
karapetyan has joined #ruby
<karapetyan> hi, why i got error ? if from == number ? return from : return to
Spami has joined #ruby
<karapetyan> from == number ? return from : return to
<karapetyan> syntax error, unexpected tIDENTIFIER, expecting ':' (SyntaxError)
weaksauce has quit [Ping timeout: 246 seconds]
Snowy has joined #ruby
<apeiros> because of precedence
pontiki has joined #ruby
<apeiros> and are you really using "if" + ternary + return in a single statement?
<apeiros> return from == number ? from : to # that's more how ternary is supposed to be used
<jhass> and no need for return if it's the last expression in your method
mrgrieves has joined #ruby
Snowy is now known as Beendllanke
<karapetyan> oh, thank you.
jenrzzz has quit [Ping timeout: 260 seconds]
hutch34_ has joined #ruby
SilverKey has quit [Quit: Halted.]
zacstewart has joined #ruby
jhack has quit [Quit: jhack]
AlexJakeGreen has joined #ruby
Amnez777- has quit [Ping timeout: 246 seconds]
Alina-malina has quit [Ping timeout: 240 seconds]
Oberon has joined #ruby
msvbhat has quit [Ping timeout: 246 seconds]
zacstewart has quit [Ping timeout: 258 seconds]
DTZUBDUB has joined #ruby
isxek has quit [Quit: Leaving]
<Oberon> Is anyone on that'd be willing to help me refactor a simple script? I'm trying to teach myself Ruby outside of the free courses online and just what I can figure out on the docs
MrBusiness2 has joined #ruby
djbkd has joined #ruby
Niham has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has joined #ruby
spidapeeg has joined #ruby
<spidapeeg> Are people live?
<spidapeeg> #!/usr/bin/ruby # 35 students in our class NUM_STUDENTS = 35 # Max grade of 100% MAX_GRADE = 100 num_compare = 0 arr = Array.new(NUM_STUDENTS) # Randomly populate arr for i in 0..(NUM_STUDENTS - 1) # Maximum possible grade is 100%, keep in mind that rand(5) returns possible values 0-4, so we must add 1 to MAX_GRADE arr[i] = rand(MAX_GRADE + 1) end # Output cur
<aegis3121> let's go with a gist for that, please?
<spidapeeg> It is a sort for an array
<pontiki> seems like the stupid is out in force this morning
<adam12> Oberon: If you share your code in a gist with a question, people might chime in.
douglascorrea has quit []
<aegis3121> spidapeeg: Can you share your code in a gist? https://gist.github.com/
chip_ has joined #ruby
caudill has joined #ruby
<spidapeeg> Thanks pontiki, give me a few months. I'll be swimming laps
moeabdol has quit [Ping timeout: 252 seconds]
<pontiki> and the D-K
<Oberon> Are people live?
ullu has joined #ruby
<Oberon> Adam12-- sorry, gotcha
DTZUBDUB has quit [Ping timeout: 244 seconds]
<Oberon> Simple script that count words, chars, and lines. Reteaching myself ruby. It works, but I know its ugly af. 8 iterations currently.. trying to refactor it down.
MrBusiness2 has quit [Ping timeout: 258 seconds]
davedev24 has joined #ruby
anisha has quit [Quit: Leaving]
LoneHerm_ has quit [Remote host closed the connection]
<pontiki> Oberon: write tests before you refactor anything
snath has quit [Ping timeout: 252 seconds]
chipotle has quit [Quit: cheerio]
caudill has quit [Remote host closed the connection]
SilverKey has joined #ruby
ullu has quit [Ping timeout: 260 seconds]
<adam12> Oberon: I'd start with opening and reading the file only once.
<adam12> Oberon: I don't believe lines 15-17 do what you think they do (which I believe is nothing)
eljimmy has joined #ruby
<spidapeeg> Why do we do NUM_STUDENTS - 2 in line 23?
<Oberon> 15 checks for extra chars that could confuse the script for words, need to add the check for hyphens
<Oberon> 17 is how the array of words is formed so it can be counted
lkb_ has joined #ruby
<Oberon> er, how the array is given a value with words
<adam12> Oberon: The block of 13 through 19 could likely be an assignment with file.each.line.reduce. `words_count = file.each_line.reduce(0) {|line, acc| acc + line.length}` or something similar.
<adam12> Oberon: What I am saying is I am not sure you can manipulate values like you are doing. Did you test that it works?
<Oberon> Gotcha
<adam12> ie. you can't reassign in the block and expect it to work.
<Oberon> I mean it outputs the correct number in the terminal when I run it
ekinmur_ has joined #ruby
benlieb has quit [Quit: benlieb]
nando293921 has joined #ruby
polishdub has joined #ruby
lkb has quit [Ping timeout: 276 seconds]
benlieb has joined #ruby
Hounddog has quit [Remote host closed the connection]
spidapeeg has quit [Ping timeout: 250 seconds]
saneax is now known as saneax_AFK
<adam12> Oberon: I don't want to rewrite it for you but I put how I would structure it at the top of my version: https://gist.github.com/adam12/44fc82daf6fee939531b871ee28ba081
<adam12> Oberon: Everybody in this channel would likely write it _somewhat_ differently.
<Oberon> yeah, for sure
<Oberon> I wouldn't want a rewrite anyway, you've already given me a lot to think about. Thanks =)
ptierno has quit [Quit: leaving]
agent_white has joined #ruby
zacstewart has joined #ruby
speakingcode has joined #ruby
TomyLobo has joined #ruby
<adam12> Oberon: It could be further optimizes by not reading into `lines`, and using the `#each_line` method like you already use.
<Oberon> adam12: right on, thanks again =)
<adam12> And incrementing line_count the same way the other counters get incremented.
go|dfish has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
jhack has joined #ruby
Oberon has quit [Quit: Page closed]
giz|work has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
timanema has quit [Ping timeout: 240 seconds]
giz|work has joined #ruby
snath has joined #ruby
arajakul has joined #ruby
conta1 has quit [Ping timeout: 276 seconds]
Es0teric has joined #ruby
go|dfish has joined #ruby
Hobogrammer has joined #ruby
macsteps has quit [Remote host closed the connection]
<agent_white> Mornin'
macsteps has joined #ruby
jaguarmagenta has quit [Ping timeout: 260 seconds]
<arajakul> whats the best way to remove everything from a file except for the following regex expression ie: /S-\d-(\d+-){1,14}\d+/
mattwashere has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 264 seconds]
<shevy> arajakul you could capture the result via () and then simply set the new file content to the match
timanema has joined #ruby
macsteps has quit [Ping timeout: 252 seconds]
<arajakul> how would i capture the result with ()?
<jhass> there's no need to capture
<jhass> just File.write(file, File.read(file)[regex])
agit0 has quit [Quit: zzzZZZ….]
LoneHerm_ has joined #ruby
<jhass> or .scan(regex).join if you have more than one occurrence you'd like to keep
<arajakul> ohh, lemmie give that a try- thanks!
chip_ has quit [Read error: Connection reset by peer]
msvbhat has joined #ruby
MrBusiness2 has joined #ruby
harfangk has joined #ruby
LoneHerm_ has quit [Ping timeout: 252 seconds]
infra-red has joined #ruby
antgel has joined #ruby
mattwashere has joined #ruby
tildes has joined #ruby
lkb_ has quit [Quit: Wychodzi]
lkb has joined #ruby
roamingdog has joined #ruby
rbennacer has quit [Read error: Connection reset by peer]
<gregf_> oops sorry :/
rbennacer has joined #ruby
icarus has joined #ruby
speakingcode has quit [Ping timeout: 260 seconds]
andikr has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 264 seconds]
nankyokusei has joined #ruby
strigonLeader has joined #ruby
isberg has quit [Quit: I'm out]
<arajakul> how would one add a new line to the scan? i've attempted to .join("\n") but that did not work
speakingcode has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
<arajakul> err nm, it did work
roamingdog has quit [Ping timeout: 258 seconds]
torandu has joined #ruby
strigon33 has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
Madplatypus has joined #ruby
diegoaguilar has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
skade has joined #ruby
SilverKey has quit [Quit: Halted.]
dionysus69 has quit [Ping timeout: 250 seconds]
skade has quit [Client Quit]
diegoaguilar has quit [Read error: Connection reset by peer]
<lalalaaa> jhass: You need any graphical work for your social network?
<lalalaaa> I'm up just pm or something
smathy has joined #ruby
<jhass> it's not "my social network" ;)
diegoaguilar has joined #ruby
<jhass> https://github.com/diaspora/diaspora/issues perhaps you find something
JeremyM_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> we also got https://github.com/ruby-community/ruby-community if you're looking for a project to contribute to
diegoaguilar has quit [Max SendQ exceeded]
diegoaguilar has joined #ruby
neo_ has quit [Remote host closed the connection]
lucas__ has quit [Changing host]
lucas__ has joined #ruby
Guest8082 has quit [Read error: Connection reset by peer]
mrgrieves has quit [Ping timeout: 240 seconds]
neo_ has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
<shevy> huh rubygems-2.6.6/bundler/
lucas__ is now known as lucas
SilverKey has joined #ruby
aufi has quit [Remote host closed the connection]
infra-red has quit []
pandaant has quit [Remote host closed the connection]
agit0 has joined #ruby
Asher has quit [Read error: Connection reset by peer]
neo_ has quit [Ping timeout: 260 seconds]
mrgrieves has joined #ruby
msvbhat has quit [Ping timeout: 240 seconds]
moeabdol has joined #ruby
pawnbox has quit [Remote host closed the connection]
terrabl has joined #ruby
mdw has joined #ruby
JeremyM_ has joined #ruby
ta_ has joined #ruby
<terrabl> Hello, I need to be able to take a JSON response from HTTParty, and then turn that into a hash so that I can run key value pairs on it. But everything I am attempting to do isn't working. It was working when I hard coded the hash but when I did JSON.parse(response.body), which I though puts the JSON to a hash it isnt allowing me to access elements using hash[:key]
<jhass> terrabl: show your code and the full error message that you get via gist.github.com
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
moeabdol has quit [Ping timeout: 264 seconds]
jas02 has quit [Quit: jas02]
neo_ has joined #ruby
senayar_ has quit [Ping timeout: 276 seconds]
redbaritone has joined #ruby
<jtperreault> terrabl: I believe JSON.parse() uses string keys (not symbols) by default. So, based on your example, you should be able to access the data using hash["key"] rather than hash[:key]
MrBusiness3 has joined #ruby
jetpack_joe has joined #ruby
<terrabl> Yeah I know that but if I do that then I cant cycle through using .each do |key, value|
agit0 has quit [Read error: Connection reset by peer]
<jhass> terrabl: sure you can
dopie_ has quit [Quit: Lost terminal]
djbkd has quit [Remote host closed the connection]
MrBusiness2 has quit [Ping timeout: 272 seconds]
<terrabl> really? because when I do hash["details"].each do |k, v| it gives me an error
<terrabl> ah frick i was missing the hash[0]["details"
<jhass> terrabl: as already mentioned, if you want help "an error" is completely and utterly useless
<terrabl> Yeah I know I think I figured it out, I was making the gist
braincrash has quit [Ping timeout: 240 seconds]
tomchapin has joined #ruby
neo_ has quit [Remote host closed the connection]
ruby-lang407 has joined #ruby
rbr has quit [Ping timeout: 276 seconds]
neo_ has joined #ruby
neo_ has quit [Remote host closed the connection]
64MAAIAT7 has joined #ruby
neo_ has joined #ruby
<jhass> is there a question?
i9B has joined #ruby
<terrabl> Nope. I figured it out, thanks though
jetpack_joe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<aegis3121> eep
<terrabl> uh... stop
<i9B> v
<aegis3121> someone should...block this...maybe...
<adam12> 11:35 i9B: v <!- hah
<jhass> !spam i9B
i9B was kicked from #ruby by ruby[bot] [spamming is a bannable offense, see http://ruby-community.com/pages/user_rules]
<terrabl> gj bot
<terrabl> maybe if it was a python bot it would have banned him faster hahah
<jhass> terrabl: don't talk about trolls
arajakul has quit [Ping timeout: 260 seconds]
<ruby-lang407> Question is Line 23
<adam12> jhass: Seems like it's the same time every day.
<adaedra> terrabl, aegis3121: next time use !ops to call them
<aegis3121> Got it, thanks
<ruby-lang407> What is the logic of 0..(NUM_STUDENTS - 2)
<ruby-lang407> Instead of - 1
MrBusiness2 has joined #ruby
terrabl has quit [Quit: Page closed]
jgt1 has quit [Ping timeout: 260 seconds]
MrBusiness3 has quit [Ping timeout: 272 seconds]
aep-shoutlet has joined #ruby
<ruby-lang407> Anyone?
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
<jhass> ruby-lang407: - 1 is clear right? i would go beyond the boundary else
<jhass> - 2 is to skip the last element
DoubleMalt has quit [Remote host closed the connection]
<jhass> the inner loop considers it already
<jhass> so if we reach the second to last element, the inner loop compares it and the last element
MrBusiness3 has joined #ruby
pickandmix has joined #ruby
jetpack_joe has joined #ruby
<gregf_> o_O
RegulationD has joined #ruby
<jhass> folks. don't. comment. on. the. spam.
MrBusiness2 has quit [Ping timeout: 258 seconds]
<pickandmix> Hi guys, https://gist.github.com/anonymous/b28f1a9fd5cbf5526862c633e1b6b7be I get this error while trying to run rails, Can anyone see what's wrong and advice?
<jhass> pickandmix: you have no postgresql running
Beendllanke has quit [Remote host closed the connection]
Beendllanke has joined #ruby
<pickandmix> jhass: But I have installed postgresql?
<jhass> doesn't mean it's running
<pickandmix> um jhass so how do I run it? :/
ruby-lang407 has quit [Ping timeout: 250 seconds]
<jhass> that's a question for your operating system's support channel
rodfersou is now known as rodfersou|lunch
<pickandmix> right, thanks alot!
platzhirsch has quit [Quit: WeeChat 1.4]
aganov has quit [Remote host closed the connection]
NSABear has joined #ruby
<NSABear> Question
<jhass> Answer
<NSABear> Ruby -> exe / .app
<NSABear> Possible?
<jhass> Traveling Ruby, somewhat
<NSABear> ok
<NSABear> Ruby -> recording / playing audio
<NSABear> Possible?
snath has quit [Ping timeout: 250 seconds]
<jhass> sure
<NSABear> Ruby -> voip client
<NSABear> Possible?
RegulationD has quit [Ping timeout: 240 seconds]
<jhass> should be
<NSABear> any good gems I should Know of?
<NSABear> I'm considering learning Ruby.
<jhass> no idea
ChiefAlexander has quit [Quit: Leaving...]
nando293921 has quit [Quit: Lost terminal]
Beendllanke has quit [Ping timeout: 250 seconds]
troulouliou_div2 has joined #ruby
deuterium has quit [Ping timeout: 276 seconds]
nando293921 has joined #ruby
<shevy> prawn is a good gem!
[Butch] has joined #ruby
hutch34_ has quit [Ping timeout: 260 seconds]
<NSABear> I really do want to learn ruby
<NSABear> It's interesting.
apawl has joined #ruby
<shevy> start today!
<NSABear> Ruby -> Gui gems
hutch34_ has joined #ruby
<NSABear> Any good ones?
<adaedra> Lots, but it all depends what you want.
<jhass> gir_ffi-gtk looks decent
<NSABear> ok
<mello> shoes, VR with glade is great
<apawl> Silly question. Does Tempfile have to store files in /tmp? It's filling up my tmpfs, and I'd like to still have the ephemeral/automatic cleanup functionality of Tempfile, but temporarily stored somewhere on disk.
snath has joined #ruby
braincrash has joined #ruby
<NSABear> A friend is learning to program and I am willing to learn a new langauage
<jhass> apawl: I think it respects TEMPDIR or something liek that
emiltin has joined #ruby
<adaedra> apawl: if you look at Tempfile initializer, you'll see a dir parameter
MrBusiness3 has quit [Ping timeout: 258 seconds]
arajakul has joined #ruby
neo_ has quit [Remote host closed the connection]
diegoaguilar has quit [Remote host closed the connection]
neo_ has joined #ruby
craigp has joined #ruby
<apawl> ..well that's someplace I should have looked first. Thanks.
triangles has joined #ruby
icarus has quit [Ping timeout: 240 seconds]
braincrash has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
timanema has quit [Ping timeout: 264 seconds]
ta__ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
neo_ has quit [Ping timeout: 250 seconds]
ta_ has quit [Ping timeout: 244 seconds]
mtkd has quit [Ping timeout: 260 seconds]
conta has left #ruby [#ruby]
mtkd has joined #ruby
rkazak has joined #ruby
mrgrieves has quit [Ping timeout: 244 seconds]
aegis3121 has quit [Ping timeout: 276 seconds]
NET||abuse has quit [Ping timeout: 246 seconds]
amclain has joined #ruby
dminuoso has joined #ruby
braincrash has joined #ruby
hutch34_ has quit [Quit: WeeChat 1.5]
NET||abuse has joined #ruby
bkxd has quit [Ping timeout: 272 seconds]
macsteps has joined #ruby
rkazak has quit [Ping timeout: 240 seconds]
Mia has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
freerobby has quit [Quit: Leaving.]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
macsteps has quit [Remote host closed the connection]
<jokke> hey
macsteps has joined #ruby
<jokke> does capistrano provide a method that runs a command no the host and returns true or false depending on the return value?
elifoster has joined #ruby
<jokke> i tried test() but i get an argument error (1 instead of 2 arguments provided)
apawl has quit [Quit: Page closed]
jher has quit [Ping timeout: 252 seconds]
giz|work has quit [Ping timeout: 240 seconds]
<jokke> or should i ask in #rubyonrails?
troulouliou_div2 has quit [Quit: Leaving]
emiltin has quit [Quit: Computer has gone to sleep.]
Didac has quit [Max SendQ exceeded]
<dminuoso> jokke: Capistrano is not rails specific, but chances are there are more people there experienced with it.
whathappens has joined #ruby
<jokke> yeah that's what i though
<jokke> t
<dminuoso> jokke: execute() should return true/false though, shouldn't it?
MrBusiness3 has joined #ruby
<jokke> oh
<jokke> i'll try
whiteline has quit [Ping timeout: 240 seconds]
<dminuoso> jokke: just pass raise_on_non_zero_exit: true to it
User458764 has joined #ruby
macsteps has quit [Ping timeout: 240 seconds]
<dminuoso> Otherwise it will.. well.. raise.
<jokke> aise?
<jokke> raise?
<jokke> you mean false
<dminuoso> Oh.
<jokke> :)
<dminuoso> I suppose the default behaviour is false then.
<jokke> yeah
giz|work has joined #ruby
mattwashere has quit [Remote host closed the connection]
<jokke> hmm
<jokke> undefined method execute
<dminuoso> jokke: I was assumig you already had sshkit
madgen has quit [Ping timeout: 240 seconds]
MrBusiness3 has quit [Ping timeout: 258 seconds]
<dminuoso> jokke: Oh wait.
tape88 has quit [Ping timeout: 276 seconds]
<dminuoso> jokke: Can you gist your code?
`tim` has joined #ruby
DTZUBDUB has joined #ruby
tk__ has quit [Quit: ばいばい]
Xiti has quit [Quit: Xiti]
solars has quit [Ping timeout: 244 seconds]
dc1 has joined #ruby
dionysus69 has joined #ruby
dcunit3d has quit [Ping timeout: 272 seconds]
mistermocha has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mattwashere has joined #ruby
terminalrecluse has joined #ruby
whiteline has joined #ruby
SilverKey has quit [Quit: Halted.]
mistermocha has quit [Remote host closed the connection]
moeabdol has joined #ruby
mistermocha has joined #ruby
JeremyM_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SilverKey has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
mdw has quit [Quit: Sleeping Zzzzz]
AndroUser2 has quit [Ping timeout: 252 seconds]
sepp2k has quit [Quit: Leaving.]
mistermocha has joined #ruby
tvw has quit [Remote host closed the connection]
Xiti has joined #ruby
lalalaaa has quit [Quit: leaving]
dvinciguerra has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
<jokke> sure
Silthias has quit [Quit: Leaving.]
Dimik has joined #ruby
<jokke> dminuoso:
<jokke> 6
<jokke> whops
<dminuoso> jokke: You must place execute() inside on blocks.
<jokke> hm?
<jokke> on blocks?
<jokke> ah
<dminuoso> on roles(:database) do; execute("rm -rf /;"); end
<jokke> yeah
<jokke> sure
nando293921 has quit [Quit: Lost terminal]
<jokke> my bad
<dminuoso> Try that code. It is good.
<jokke> :D
misterm__ has joined #ruby
jaruga___ has quit [Quit: jaruga___]
mistermocha has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
phrozen77 has joined #ruby
jher has joined #ruby
jaguarmagenta has joined #ruby
agentmeerkat has quit [Ping timeout: 244 seconds]
mistermo_ has joined #ruby
RegulationD has joined #ruby
misterm__ has quit [Ping timeout: 250 seconds]
nando293921 has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
misterm__ has joined #ruby
tape88 has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
eljimmy has quit [Read error: Connection reset by peer]
misterm__ has quit [Read error: Connection reset by peer]
jaguarmagenta has quit [Ping timeout: 264 seconds]
pwnd_nsfw` has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
pwnd_nsfw has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
mistermo_ has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
whathappens has quit [Remote host closed the connection]
mistermo_ has quit [Read error: Connection reset by peer]
cdg has quit [Remote host closed the connection]
synthroid has quit []
mistermocha has quit [Ping timeout: 276 seconds]
tomphp has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
AlexJakeGreen has quit [Quit: Leaving]
mistermo_ has joined #ruby
symm- has quit [Ping timeout: 244 seconds]
timanema has joined #ruby
sepp2k has joined #ruby
neo_ has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
misterm__ has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
Alina-malina has joined #ruby
Amnez777 has joined #ruby
AlexRussia has quit [Ping timeout: 244 seconds]
kareeoleez has quit [Remote host closed the connection]
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
RegulationD has joined #ruby
timanema has quit [Ping timeout: 260 seconds]
mistermocha has joined #ruby
nankyokusei has joined #ruby
SilverKey has quit [Quit: Halted.]
misterm__ has quit [Ping timeout: 250 seconds]
Xeago_ has joined #ruby
mistermo_ has joined #ruby
sp4rrow has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
jgt1 has joined #ruby
jhack has quit [Quit: jhack]
dc1 has quit [Ping timeout: 264 seconds]
Spami has joined #ruby
mistermo_ has joined #ruby
symm- has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
mistermocha has quit [Ping timeout: 272 seconds]
djbkd has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
CJKinni has quit [Read error: Connection reset by peer]
mistermo_ has joined #ruby
BinaryJobSearch has joined #ruby
fannymay has quit [Quit: Bye dearies]
jgt1 has quit [Ping timeout: 272 seconds]
CJKinni has joined #ruby
dc1 has joined #ruby
spider-mario has joined #ruby
misterm__ has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
xall has joined #ruby
whathappens has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
macsteps has joined #ruby
`0ctayn has quit []
rodfersou|lunch is now known as rodfersou
whathapp_ has joined #ruby
BinaryJobSearch has quit [Client Quit]
pure_eval has joined #ruby
User458764 has joined #ruby
wrkrcoop has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
SilverKey has joined #ruby
<wrkrcoop> anyone familiar with present?
misterm__ has quit [Ping timeout: 250 seconds]
pure_eval has quit [Client Quit]
whathappens has quit [Ping timeout: 240 seconds]
rcvalle has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pureeval has joined #ruby
pureeval has left #ruby [#ruby]
<wrkrcoop> {}.present? says undefined method but in this code im reading they call .present? on a hash
agentmeerkat has joined #ruby
macsteps has quit [Ping timeout: 272 seconds]
mistermocha has joined #ruby
firstdayonthejob has joined #ruby
SilverKey has quit [Client Quit]
dionysus69 has quit [Ping timeout: 264 seconds]
<wrkrcoop> but according to documentation present? is used on objects …
timanema has joined #ruby
SilverKey has joined #ruby
mistermo_ has joined #ruby
pilne has joined #ruby
wilsonc91 has joined #ruby
<toretore> what is the code you're reading, what is the code you're executing, and what makes you assume that present? will work in both?
<wrkrcoop> toretore: [].present?
<wrkrcoop> but when i run it in irb it says NoMethodError: undefined method `present?' for []:Array
<toretore> there is no method "present?" in ruby's stdlib
<wrkrcoop> wth
mistermo_ has quit [Read error: Connection reset by peer]
misterm__ has joined #ruby
<wrkrcoop> what do i need to include
mistermocha has quit [Ping timeout: 250 seconds]
<toretore> what is the problem you're trying to solve?
CJKinni` has joined #ruby
SilverKey has quit [Client Quit]
moeabdol has quit [Ping timeout: 244 seconds]
timanema has quit [Ping timeout: 260 seconds]
SilverKey has joined #ruby
miqlas-H has joined #ruby
rippa has joined #ruby
arajakul1 has joined #ruby
<wrkrcoop> toretore: im trying to read some code and understand what it is doing, but since i used [].present? and that said no method i couldn’t figure out what the code was doing
mistermocha has joined #ruby
<wrkrcoop> just looking for clarification
misterm__ has quit [Read error: Connection reset by peer]
geekbri has joined #ruby
64MAAIAT7 has quit [Remote host closed the connection]
CJKinni has quit [Ping timeout: 244 seconds]
<shevy> hmm https://github.com/hsbt - what is the first name and what is the last name? the CAPS is the family name? I'd like to know so that I don't use the wrong name in an email/issue request on github
SilverKey has quit [Client Quit]
arajakul has quit [Ping timeout: 276 seconds]
<toretore> usually caps is family name
<wrkrcoop> they must be including some library
<toretore> did you look at the link i pasted?
<jhass> shevy: you could also just omit it, Hello, Hi, Hey, Greetings, ...
harfangk has quit [Quit: harfangk]
<shevy> jhass hmm yeah
<wrkrcoop> u sent me a link to a google search
<shevy> "Hey japanese dude!"
<toretore> wrkrcoop: what were the results of this search?
mistermo_ has joined #ruby
lucas has quit [Ping timeout: 260 seconds]
Xeago_ has quit [Remote host closed the connection]
neo__ has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
lucas has joined #ruby
MrBusiness3 has joined #ruby
gigetoo has quit [Ping timeout: 260 seconds]
timanema has joined #ruby
Ebok has joined #ruby
nictrasavios has joined #ruby
moeabdol has joined #ruby
gigetoo has joined #ruby
pawnbox has joined #ruby
PaulCape_ has quit [Quit: .]
mistermo_ has quit [Read error: Connection reset by peer]
mattwashere has quit [Remote host closed the connection]
<nictrasavios> Hello! I'm sort of new-ish to ruby, and I'm looking for someone to help me turn a cludge into elegance.
<shevy> oh a poetry question, out with it
<wrkrcoop> ?asl
<ruby[bot]> wrkrcoop: I don't know anything about asl
<nictrasavios> I posted it to SO, but I figured it might be easier to get help here: http://stackoverflow.com/questions/38018988/ruby-i-want-to-make-this-path-cludge-more-elegant-how-can-i-dynamically-refer
<wrkrcoop> ?ask
<ruby[bot]> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<wrkrcoop> !
<wrkrcoop> man i feel bad ass for using ?ask
<nictrasavios> Don't worry, I should have known to just ask ;).
djbkd has quit [Remote host closed the connection]
<nictrasavios> I'm just timid in new communities.
mistermocha has joined #ruby
PaulCapestany has joined #ruby
neo_ has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
doubledouble has joined #ruby
A124 has quit [Ping timeout: 244 seconds]
mistermocha has quit [Read error: Connection reset by peer]
<nictrasavios> TL;DR: Mr. Bones makes a few methods that makes it easy to load all .rb files from a subdirectory with the same name as the class name. I have four of these classes, and I C/P-ed his code into each one. This feels... wrong. So, I'd like to externalize the methods and have each class call it to require their subfiles
<shevy> well
<shevy> the require code is not needed in quite that way IMO
mistermocha has joined #ruby
<shevy> LIBPATH = ::File.expand_path('..', __FILE__) + ::File::SEPARATOR
tomchapin has joined #ruby
<shevy> the, in my opinion, best, is to structure and install like a gem
aryaching has joined #ruby
MrBusiness3 has quit [Ping timeout: 272 seconds]
<shevy> for getting the absolute paths to your gem, there are several ways - one that I use is to define a project-specific constant e. g. BASE_DIR = RbConfig::CONFIG['sitelibdir']+'/name_of_the_gem_here/'
mistermo_ has joined #ruby
A124 has joined #ruby
<shevy> when you have two files like lib/web.rb and lib/main.rb
djbkd has quit [Ping timeout: 240 seconds]
<shevy> you could do, if main.rb depends on web.rb, this: require 'name_of_your_gem_here/web.rb'
<shevy> what is the callers self btw? is that caller()?
dionysus69 has joined #ruby
djbkd has joined #ruby
tomchapin has quit [Client Quit]
postmodern has joined #ruby
diegoaguilar has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
joneshf-laptop has quit [Ping timeout: 260 seconds]
mistermo_ has quit [Read error: Connection reset by peer]
<nictrasavios> I couldn't say, Mr. Bones (The gem) generated the project skeleton, I've just been hacking it to work.
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
<toretore> nictrasavios: how far have you come on your project apart from creating the skeleton?
mistermocha has joined #ruby
xall has quit [Ping timeout: 272 seconds]
<nictrasavios> There are four parts to the project, 3 seperate API's (A webserver to run the other parts and proccessing incomming HTTP POST requests, Slack's RealTimeMessaging API, Slack slash-command API, and Slack's incomming Webhooks API). So far, I have input from the 3rd party API's feeding into incomming webhooks, and RTM responding to simple things like "Hello", as well as the slash command for "help"
Xeago_ has joined #ruby
misterm__ has joined #ruby
<nictrasavios> So, I have the basics for each modules down, and the project runs.
mistermo_ has quit [Ping timeout: 244 seconds]
<toretore> i'd advice getting rid of this mr bones crap, if it's doable
misterm__ has quit [Read error: Connection reset by peer]
<toretore> follow best practices for naming and placing your files, then require where necessary; making sure they're in the load path is the responsibility of the caller
<nictrasavios> Alright, so then then how can I do this: Webserver loads init.rb, init calls lib/web.rb, lib/main.rb, lib/commands.rb & lib/config.rb, and then those files load everything in lib/web/*.rb, lib/main/*.rb, etc.
BobTheBlob has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
<BobTheBlob> Bob Here
mattwashere has joined #ruby
<nictrasavios> By the way, if I'm not following best practices here, let me know. I think I am, from what I can clean from other forums.
<BobTheBlob> BobTheBlob
<toretore> nictrasavios: what does "load" and "call" mean here?
<nictrasavios> Load meanning require, and call meaning require. Sorry - brand new and used to C/C++
justinmrkva has joined #ruby
<toretore> nictrasavios: any file that depends on another should require that file at the top
<nictrasavios> Is there a way to make it more dynamic, so that I don't have to require every single file in the subdirectories?
<toretore> and require should be `require('yourlib/path')`
<toretore> you should make each require explicit
mattwashere has quit [Remote host closed the connection]
<shevy> nictrasavios yeah you can do so too, t hat is why I tend to define a toplevel constant sometimes. You can use Dir[] to obtain all .rb files and then just require all of them via that; but otherwise, the really best practice is to require exactly (and only) the parts you need to use in the particular .rb file at hand
<nictrasavios> Fun, haha. *alright*, I guess I was trying to cheat the system
djbkd has quit [Remote host closed the connection]
<shevy> it's just four files!
<nictrasavios> The four files each load between 5 and 25 more
<toretore> word of advice: if you're new to ruby, be skeptical of any gem or "tip" to make your development easier
<toretore> they generally only do the opposite
<nictrasavios> That's why I wanted each of those four to have dynamic loading of a subdirectory with their name on it ;P
<shevy> one of the main reasons for when I do dynamic requires is when I tend to add new classes at a later time, when you then add like +30 new classes in a project, it's easier to just do a dynamic require since you can't forget anything that way
dhruvasagar has joined #ruby
<nictrasavios> That's exactly what I'm doing >.<
<toretore> it's not difficult to add a require to a file...
timanema has quit [Ping timeout: 260 seconds]
doubledouble has quit [Ping timeout: 250 seconds]
aep-shoutlet has quit [Quit: Connection closed for inactivity]
d10n-work has joined #ruby
moeabdol has quit [Quit: WeeChat 1.4]
emiltin has joined #ruby
<justinmrkva> Just had to mention this strange tip. I was going through a codebase and saw this: `warn "WA"+"RN: message..."` At first it appears to be a Daily WTF style antipattern, but it does one useful thing: it prevents WARN from showing up in a case-sensitive search unless the warning was actually called. That's assuming that's what the programmer actually intended, of course.
Xeago_ has quit [Remote host closed the connection]
<nictrasavios> Okay, at least make my life a little easier ;), is there a way to specify the base path of require on a per file basis? So, in web.rb, instead of require 'web/file1' require 'web/file2', etc, and in commands require 'commands/fileA' require 'commands/fileB', just have require 'file1' require 'file2' in web, and require 'fileA' require 'fileB' in commands
<toretore> yes, but you shouldn't
mistermocha has joined #ruby
solars has joined #ruby
<toretore> def my_require(f); require "web/#{f}"; end
<nictrasavios> Shoot, alright - at least tell me why so I don't end up being an idiot?
gheegh has quit [Quit: Textual IRC Client: www.textualapp.com]
<toretore> first of all, overriding require behavior globally for a file? not a good idea
Xiti has quit [Quit: Xiti]
<toretore> secondly; all your requires should be explicit about what they're doing. it should be easy to see exactly what is being required and from where
mattwashere has joined #ruby
<shevy> justinmrkva lol
<nictrasavios> Programming 101 right, explicit rather than implicit. Shoot, foiled again.
neo__ has quit [Remote host closed the connection]
<toretore> i've never seen anything done that actually improves require
<nictrasavios> I have a lot to learn about ruby.
neo_ has joined #ruby
<karapetyan> how can i optimize this
<karapetyan> return from if (number % from == 0 && number / from == target)
<karapetyan> return to if (number % to == 0 && number / to == target)
djbkd has joined #ruby
<toretore> nictrasavios: you can make a file web.rb which contains all the requires for the web directory
<toretore> then require 'web'
<toretore> this may or may not make sense or be a good idea for your case
mistermocha has quit [Ping timeout: 250 seconds]
lele has quit [Ping timeout: 244 seconds]
<nictrasavios> , /bin/init requires /lib/web.rb, I was hoping web.rb could require /lib/web/*.rb ;P
<nictrasavios> But, if that's bad practice than so be it ;P
<toretore> you can, but i don't see the point
<shevy> nictrasavios that setup leads to circular require warnings
djbkd has quit [Remote host closed the connection]
<shevy> which is another reason why minimal-single require calls to the minimum code required is useful
<nictrasavios> So, should I do all my requires in init?
<shevy> for /bin/init, in general, you need nothing more than: require 'name_of_your_gem'
<nictrasavios> Ah, thank you.
<shevy> if you ever need more than that, then something was setup incorrectly prior to that
SCHAAP137 has joined #ruby
<nictrasavios> That is exactly what I'm doing, it's just that there is sort of ... "four gems in one"
<toretore> here's the guiding principle for requires: i should be able to require *any* file inside your lib and it should: 1) work 2) not drag in a bunch of unrelated stuff
<shevy> nictrasavios well you can have a look at some other gems if you want to, how they solve it
<shevy> let me grab some examples from other people
neo_ has quit [Ping timeout: 240 seconds]
<nictrasavios> Thank you! I've been looking at slack-ruby-bot and slack-ruby-server
<toretore> 1 doesn't work if you put all your requires at the top level and 2 doesn't if you centralize your requires
symm- has quit [Ping timeout: 244 seconds]
<shevy> gem unpack rack-1.6.4.gem
<shevy> ok in lib/ you have rack.rb and rack/ directory
mistermocha has joined #ruby
lele has joined #ruby
<shevy> which is the common way for gems to be setup... name_of_gem.rb and name_of_gem/
<toretore> actually i ran into this very problem not many days ago with rack
<nictrasavios> That's exactly what I have, I have have it quadrupled for encapsilation
<toretore> i couldn't just require 'rack/builder'
<shevy> now the rack.rb does it a bit differently than many other gems; it uses a lot of autoload statements
<toretore> i had to require the whole thing
<shevy> autoload :Builder, "rack/builder"
<shevy> curiously enough no require statement but it is probably not needed. let's have a look at another gem
<shevy> wget https://rubygems.org/downloads/pry-0.10.3.gem # extract it like before
timanema has joined #ruby
geekbri has quit []
xaxisx has joined #ruby
<shevy> ok pry does not use autoload, at the least not on the base pry.rb file; it has several require statements such as
<shevy> require 'pry/input_lock'; require 'pry/exceptions' etc...
mistermo_ has joined #ruby
<nictrasavios> Yup, exactly the way you guys said to.
<shevy> this one I think is more common to see, it corresponds to e. g. pry/ subdirectory, and inside that directory, input_lock.rb and so on
<nictrasavios> So, even though I have 4 /lib/name.rb and four /lib/name/*.rb, I should still always do it explicitly, right?
<shevy> I'd start with the same way, it is more boring... if you really need dynamic requires, once you know the full path, you can always do Dir[] and get an array with your .rb files back, which you can require Dir[PATH].each etc...
<nictrasavios> My only holdoff on dyanmic requires is something that I don't even know if its possible.
<BobTheBlob> bob
SilverKey has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
aegis3121 has joined #ruby
<nictrasavios> This program has parts that need near 100% uptime, I kinda of wanted to ability to throw *.rb files into one of the /lib/name/ directories have it load them durring runtime
<BobTheBlob> Has anyone written a differential equation solver?
<shevy> nictrasavios btw so far I never heard the name of your gem :D
harfangk has joined #ruby
<nictrasavios> But, I think that dream is 1) stupid, and 2) not worth it.
<nictrasavios> It's actually not a gem, its a SlackBot that I'm writing to manage marketing and PR within my company
<toretore> nictrasavios: you are right about both 1 and 2 ;)
mistermocha has joined #ruby
neo_ has joined #ruby
<toretore> nictrasavios: your deployment strategy should use external tools for these purposes
aryaching has quit [Ping timeout: 276 seconds]
mistermo_ has quit [Ping timeout: 250 seconds]
davedev24 has quit []
<nictrasavios> We've been using external tools, but due to some ... thing's that I'm probably under NDA abut ... we can't continue to use 3rd party tools like zapier
djbkd has joined #ruby
mistermo_ has joined #ruby
smathy is now known as smathy_afk
<toretore> you just need something like systemd or supervisord
aryaching has joined #ruby
<toretore> and probably a load balancer between the apps and the world
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agentmeerkat has quit [Ping timeout: 276 seconds]
<toretore> but it's also likely that you don't actually need any of this and that doing a git pull and restart is fine
dionysus69 has quit [Ping timeout: 244 seconds]
misterm__ has joined #ruby
<nictrasavios> All it is is posting anything sent to our twitter/facebook feeds to a slack channel, posting any new "appointments" with "service people" to a channel, and having PR give a "yes or no" on purposed posts. We were using Zapier to do it, but as we got bigger... well, why pay 250$/month/location for zapier when you can force the development team to make something that can run on a 7$/month heroku server right?
smathy has joined #ruby
neo_ has quit [Ping timeout: 250 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
daivyk has joined #ruby
<nictrasavios> There are also a few problems that can't be solved using external tools, but I can't talk about them ;P.
macsteps has joined #ruby
<nictrasavios> Unfortunately, the development team consists f myself, a C++ developer, and another dude who I will only describe as a "spoon with a brain".
mistermo_ has quit [Ping timeout: 250 seconds]
<shevy> a spoon is very useful!
sp4rrow has joined #ruby
<nictrasavios> He does help keep me sane!
<toretore> at least he has a brain
roamingdog has joined #ruby
aryaching has quit [Ping timeout: 272 seconds]
rbr has joined #ruby
<nictrasavios> Good point, previously the development team consisted of myself and a plush dragon. I wish I was kidding about that, but the dragon has an instagram.
pLaToOn has joined #ruby
djbkd has quit [Remote host closed the connection]
<nictrasavios> ^ The old head of PR owns him. She was a Psyc student.
<pLaToOn> moin
misterm__ has quit [Ping timeout: 250 seconds]
macsteps has quit [Ping timeout: 258 seconds]
<nictrasavios> I love my job.... XD. Thanks for the help!
[Butch] has quit [Quit: I'm out . . .]
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
mistermocha has joined #ruby
roamingdog has quit [Ping timeout: 246 seconds]
aryaching has joined #ruby
jhack has joined #ruby
<shevy> a plush dragon
<smathy> "a spoon with a brain" - heh :)
<shevy> now if I ever saw a hipster company
neo_ has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
mistermocha has joined #ruby
e4xit has left #ruby [#ruby]
aeruder has left #ruby ["WeeChat 1.0.1"]
SilverKey has quit [Quit: Halted.]
djbkd has joined #ruby
jhack has quit [Client Quit]
neo_ has quit [Ping timeout: 264 seconds]
jhack has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
sauvin has quit [Read error: Connection reset by peer]
arlek has joined #ruby
ur5us has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
haxrbyte has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
snebel has joined #ruby
<snebel> I'm actually having a lot of problems trying to install rvm using chef and in the same run install multiple ruby versions then bundle install some repositories..
SilverKey has joined #ruby
mistermo_ has joined #ruby
<nictrasavios> Does anyone know what's going on with the VCR gem? It seems to be outdated and failing
<snebel> not looking for very specific answer here but more what;s your preffered way on achieving that
<toretore> snebel: what's your goal?
<snebel> install multiple ruby scripts that needs different versions and gemsets
<snebel> using chef
<toretore> where?
<snebel> in a centos 7.1 server
cdg has joined #ruby
<snebel> i'm trying with rvm
<snebel> but chef tens to install all the stuff on system ruby
<snebel> looks like rvm is very tide to the session
<snebel> and because chef runs all in the same don't load properly all the profile stuff it needs
<toretore> have you though about running containers instead?
<snebel> specially bash functions
<snebel> I'd really like to but my ionfrastructure is still running vm's
mistermocha has quit [Ping timeout: 250 seconds]
<snebel> and using chef
arlek has quit [Ping timeout: 246 seconds]
<snebel> centos just provides ruby 2.0.0
BobTheBlob has quit [Ping timeout: 250 seconds]
<snebel> i need at least 2.1.0 for a chef gem dependency
<adam12> snebel: After installing RVM, can you manually source the profile changes? or perhaps re-exec current shell?
<snebel> other scripts runs on 2.2.0
<adam12> snebel: I'm not familiar with Chef so just throwing out ideas.
<snebel> yes, it's a good path thanks
<snebel> yes i'm trying but strlugging all the time with it
<snebel> then trying to install bundler
mistermo_ has quit [Ping timeout: 250 seconds]
<snebel> i'm really missing to being able to static compile those ruby scripts...
joneshf-laptop has joined #ruby
<snebel> but i need to deal with dependencies and interpreter versions..
<adam12> What about Travelling Ruby?
<jidar> chef should provide you a way of (either nativly or via some cookbooks) to execute those gem installs under a rvm
<snebel> Travelling Ruby?
<snebel> didn't find anything for chef to do so
<snebel> there is a rvm cookbook but failing all the time
<jidar> you're likely not looking in the right place then
<snebel> just system wide install works
<snebel> but mess with chef stuff that requires 1.9.3
<snebel> it's a nightmare
<snebel> let's look this travelling stuff
<adam12> This doesn't solve your problem, but this is why I ended up choosing Ansible
<snebel> mm looks promissing let's read more..
<adam12> .. which has it's own problems, but very small dependency stack on nodes.
zacstewart has quit [Read error: Connection reset by peer]
<snebel> yeah, i'm also thinking a lot that for those scripts would have been nice to use golang
zacstewart has joined #ruby
<snebel> but the thing is i'm tide right now to those technologies
<snebel> i love ruby but some times dealing with dependencies...
<snebel> containers would be a super solution
roamingdog has joined #ruby
dionysus69 has joined #ruby
<snebel> but i have to make it work with vm's
<snebel> and chef...
<toretore> what do vms have to do with it?
mistermocha has joined #ruby
<snebel> well that i still don't have a propoer containers infra
<snebel> available
<snebel> we're doing some POC
<snebel> about
xall has joined #ruby
<snebel> but still not fully integrated in my organization
<toretore> you don't need a container "infrastructure" to run a few containers
<snebel> yeah but looks like overkill start doing some docker to solve this problem..
<toretore> i bet it would be much easier to just create some images than dealing with all the chef rvm stuff
<snebel> not sure, may be if i start being more desperate
<snebel> yea make senses...
<snebel> just wondering how long would this take to me.. start feeling pressure for delivery
chip_ has joined #ruby
<snebel> dont currently have experience with docker/containers
<snebel> so i'd need to spend some time learniing
<snebel> you need
<snebel> but yes i'm feeling binary images would be the solution..
<snebel> just looking the fastest make it working solution..
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
<toretore> if you were familiar with docker i'd say go for it for sure, but as you say it's something you have to learn
craigp_ has joined #ruby
<snebel> yeah thats the thing...
<snebel> i have some docker expert at the company
<snebel> may be ill ask him..
arooni has quit [Ping timeout: 244 seconds]
<snebel> in parallel i'll also look to this travelling
<snebel> anybody used it for production stuff?
<snebel> any feedback?
<adam12> I've explored it, but ended up writing what I needed in Crystal because it was small enough.
<adam12> Tho because it's from the Passenger peeps I'm sure it's solid.
craigp has quit [Ping timeout: 272 seconds]
<snebel> mmm so le't see if i can do something relatively fast
mistermocha has quit [Ping timeout: 250 seconds]
<snebel> in parallel containers trial...
<snebel> thanls guys i got some fresh/new attack vectors for my problem
<snebel> :-)
arooni has joined #ruby
mistermocha has joined #ruby
jaguarmagenta has joined #ruby
rbr has quit [Ping timeout: 240 seconds]
snebel has quit [Quit: Leaving]
memorasus has quit [Remote host closed the connection]
<ule> Do you guys know why this returns "uby on" instead of "Ruby on" ? ----> puts "Ruby on Rails".delete("Rails")
<ule> ^^
johnmilton has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Ping timeout: 240 seconds]
whiteline has quit [Ping timeout: 240 seconds]
<jhass> ule: yes I know why
spk has quit [Quit: ZNC - http://znc.in]
spk has joined #ruby
mattwashere has quit [Remote host closed the connection]
<ule> irb(main):003:0> puts "Please tell me why".delete("Rails")
<ule> Pee te me why
howdoi has quit [Quit: Connection closed for inactivity]
pLaToOn has quit [Ping timeout: 244 seconds]
roamingdog has quit [Remote host closed the connection]
<ule> ohh
mistermocha has joined #ruby
whiteline has joined #ruby
<ule> this question is on ruby certification study guide
roamingdog has joined #ruby
craigp_ has quit [Read error: Connection reset by peer]
craigp_ has joined #ruby
benlieb has quit [Quit: benlieb]
Xeago_ has joined #ruby
Ebok has quit [Quit: Internet is down or Computer is restarting. I'll be back.]
memorasus has joined #ruby
e4xit has joined #ruby
kirun has joined #ruby
ta__ has quit [Ping timeout: 264 seconds]
mistermo_ has joined #ruby
e4xit has quit [Client Quit]
mistermocha has quit [Ping timeout: 272 seconds]
ta_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
pLaToOn has joined #ruby
choke has joined #ruby
SilverKey has quit [Read error: Connection reset by peer]
dvinciguerra_ has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
SilverKey has joined #ruby
Xeago_ has joined #ruby
ramfjord has joined #ruby
<ule> looks a mix of regex
<ule> weird
<ule> I can't figure out 100% yet
mistermo_ has quit [Ping timeout: 250 seconds]
<apeiros> jhass: devdocs > rdoc.info/ruby-doc in your opinion?
neo_ has joined #ruby
<jhass> for the stuff it has, yes
lkb has quit [Quit: Wychodzi]
solars has quit [Ping timeout: 244 seconds]
dvinciguerra has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
<jhass> it can't fully replace rdoc.info because I rely on its /gems/foo or /github/user/foo stuff
<jhass> but if you work fullstack a unified search over ruby including stdlib, rails, js, css & html is quite handy
snath has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
mdw has joined #ruby
<smathy> ule, it removes all occurrences of any letter in the set you provide it. It's like the character class of a regex.
<jhass> well similar, the rules are not exactly the same I think
mistermo_ has joined #ruby
<smathy> "Like" means "similar" :)
roamingdog has quit [Remote host closed the connection]
<jhass> yes, just wanted to make it a bit more clear :)
<smathy> ...but actually...
<smathy> >> "ruby on rails".delete "a-r"
<ruby[bot]> smathy: # => "uy s" (https://eval.in/595131)
misterm__ has joined #ruby
<apeiros> >> "ruby on rails".delete "^a-r"
<ruby[bot]> apeiros: # => "rbonrail" (https://eval.in/595133)
<apeiros> is it eval-in or ruboto which is slow?
mistermocha has quit [Ping timeout: 250 seconds]
<smathy> :shrug:
<jhass> probably both :P
<apeiros> :-S
<jhass> can't tell because of the log issue I mentioned
Spami has quit [Quit: This computer has gone to sleep]
<jhass> opened I mean
mistermocha has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
mistermo_ has quit [Ping timeout: 250 seconds]
isberg has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
misterm__ has quit [Ping timeout: 250 seconds]
ta__ has joined #ruby
sp4rrow has joined #ruby
mistermo_ has joined #ruby
ta_ has quit [Ping timeout: 272 seconds]
jetpack_joe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Ping timeout: 250 seconds]
jher has quit [Quit: leaving]
Spami has joined #ruby
solars has joined #ruby
NSABear has quit [Ping timeout: 244 seconds]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
dionysus70 is now known as dionysus69
Spami has quit [Client Quit]
mistermocha has joined #ruby
roamingdog has joined #ruby
mistermo_ has quit [Ping timeout: 250 seconds]
snath has joined #ruby
sneakers has joined #ruby
MrBusiness3 has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
harfangk has quit [Quit: harfangk]
wrkrcoop has quit [Quit: wrkrcoop]
nofxx has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
mistermocha has joined #ruby
elementaru has joined #ruby
choke has quit [Remote host closed the connection]
mistermo_ has joined #ruby
MrBusiness3 has quit [Ping timeout: 272 seconds]
sumobob has joined #ruby
Xeago_ has quit [Remote host closed the connection]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
misterm__ has joined #ruby
djbkd has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 250 seconds]
mistermo_ has quit [Ping timeout: 250 seconds]
Spami has joined #ruby
* hanmac gains a new hobby in selling apricot seeds at vegans ;P
choke has joined #ruby
<jhass> ?ot hanmac
<ruby[bot]> hanmac: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
redbaritone has quit [Quit: redbaritone]
misterm__ has quit [Ping timeout: 250 seconds]
karapetyan has quit [Remote host closed the connection]
Spami has quit [Client Quit]
tildes has quit [Ping timeout: 260 seconds]
jhack has quit [Quit: jhack]
nankyokusei has joined #ruby
jhack has joined #ruby
mistermocha has joined #ruby
<nictrasavios> Where can I find ruby class/module/variable/method/file naming conventions?
<nictrasavios> !conventions
<nictrasavios> Nope.
skweek has joined #ruby
SilverKey has quit [Quit: Halted.]
lxsameer has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
<shevy> nictrasavios you could look at the style guide from rubocop
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> I think
aegis3121 has quit [Ping timeout: 252 seconds]
<shevy> but it is really simple... module Foo; SOME_CONSTANT = 42 ...
<shevy> foo_bar.rb -> class FooBar
<shevy> foobar.rb -> class Foobar
<jhass> ?styleguides
<ruby[bot]> here are three popular styleguides, you should read and follow at least one: https://github.com/styleguide/ruby https://github.com/bbatsov/ruby-style-guide https://github.com/thoughtbot/guides/tree/master/style/ruby
skade has joined #ruby
allcentury has quit [Ping timeout: 264 seconds]
isberg has quit [Read error: Connection reset by peer]
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
aegis3121 has joined #ruby
<nictrasavios> I shall read all 3 :3.
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
colegatron has quit [Ping timeout: 258 seconds]
mistermo_ has joined #ruby
malconis has joined #ruby
<shevy> use all 3!!!
<shevy> in particular when they contradict one another :)
<shevy> oh
<shevy> there may be a fourth
<shevy> https://github.com/chneukirchen/styleguide/blob/master/RUBY-STYLE but I think that is mostly integrated into the bbatsov one
<nictrasavios> Currently wrapping my head around if requires are inherited in ruby ;P
choke has quit [Quit: Textual IRC Client: www.textualapp.com]
misterm__ has joined #ruby
<nictrasavios> So, after I figure that out, I'll see what I can do to fix up this... very ugly code.
madgen has joined #ruby
<FernandoBasso> How do I use this method? http://ruby-doc.org/core-2.3.1/String.html#method-c-new
<shevy> I always think of requires like a "just put the code there from that file, into this file here"
<FernandoBasso> my_str = String.new('ção', 'UTF-8') returns nil and assigns that value to my_str.
mistermocha has quit [Ping timeout: 250 seconds]
<nictrasavios> That's how they work in C++, but because there is no compiler directives in ruby, I'm worried XD.
<shevy> huh
jhack has quit [Quit: jhack]
<shevy> FernandoBasso that is not documented behaviour right?
jhack has joined #ruby
nankyokusei has joined #ruby
<shevy> "Returns a new string object containing a copy of str."
<shevy> oh wait
<shevy> new(str="", encoding: enc)
mistermo_ has quit [Ping timeout: 250 seconds]
CJKinni` has quit [Ping timeout: 240 seconds]
<shevy> my_str = String.new('ção', encoding: 'UTF-8')
<shevy> I think that should work
<baweaver> >> 'ção'
<ruby[bot]> baweaver: # => "ção" (https://eval.in/595180)
<FernandoBasso> Ah!
tokynet has joined #ruby
<FernandoBasso> See, I don't know how to read docs...
<baweaver> do you even need encoding for that?
<shevy> well you need sharp eyes in ruby, I also did not notice that there was no encoding: there at first from your example code
misterm__ has quit [Ping timeout: 250 seconds]
tomchapin has joined #ruby
<jhass> FernandoBasso: what problem do you hope to solve with using String.new? chances are big you don't need it. at all.
<FernandoBasso> I don't C#.
<FernandoBasso> jhass: I am just trying to read and docs and type in examples.
<jhass> ok, cool
davedev24 has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
<shevy> FernandoBasso lol I'll store that quote!
l4v2 has joined #ruby
<l4v2> Howdy howdie
<FernandoBasso> Shevy it was a response to the joke "why do ruby programmers wear glasses?"
<FernandoBasso> But the joke was on my mind only, not in #ruby.
<shevy> it's sorta true!
<FernandoBasso> >> str = String.new('ção', encoding: 'UTF-8')
<shevy> like take the hash syntax ... { :foo => :bar } ... versus { foo: bar } versus... foo: bar (if it is the last argument, one can omit the {})
<shevy> either sharp eyes or bigger fonts!
chopin has joined #ruby
mistermocha has joined #ruby
<ruby[bot]> FernandoBasso: # => "ção" (https://eval.in/595181)
chopin is now known as Guest40784
<FernandoBasso> I prefer the last generally.
<shevy> people love to omit syntax
elementaru has quit [Remote host closed the connection]
mistermo_ has joined #ruby
<shevy> like the () in def method definitions
<FernandoBasso> Yeah, and I don't buy the argument "this language doesn't require ; at the and of the statments". That is the least of my problems when using a programming languages.
<FernandoBasso> s/and/end/
<ytti> that is weird thing to say
<ytti> you can't omit syntax
<ytti> i think by definition
<ytti> if it works, it's syntactically corrct
misterm__ has joined #ruby
Guest71073 is now known as Affix
Affix has quit [Changing host]
Affix has joined #ruby
<shevy> I so often forgot the ; in php
roamingdog has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 272 seconds]
mister___ has joined #ruby
<FernandoBasso> ruby 2.2.3: str = String.new('ção', encoding: 'UTF-8')
pontiki has joined #ruby
<FernandoBasso> ArgumentError: wrong number of arguments (2 for 0..1)
mistermo_ has quit [Ping timeout: 250 seconds]
dc1 has quit [Ping timeout: 258 seconds]
icarus has joined #ruby
roamingdog has joined #ruby
icarus has quit [Read error: Connection reset by peer]
zeroDi has joined #ruby
<shevy> works here fine on ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
jhack has quit [Quit: jhack]
<jhass> FernandoBasso: don't worry about String.new. You'll never need it
<FernandoBasso> jhass: I know :)
arnonhongklay has quit [Remote host closed the connection]
<jhass> move to the next one ;)
misterm__ has quit [Ping timeout: 250 seconds]
<FernandoBasso> It changed the api from 2.2 to 2.3
jhack has joined #ruby
<jhass> happens
<shevy> we are going towards ruby 3.POWER_ZERO
mister___ has quit [Ping timeout: 250 seconds]
postmodern has quit [Ping timeout: 250 seconds]
<yorickpeterse> Yeah somehow Ruby 3 is going to be 3x faster...somehow
dc1 has joined #ruby
sp4rrow has joined #ruby
<shevy> hehe
timanema_ has joined #ruby
timanema has quit [Ping timeout: 258 seconds]
<shevy> we should skip 3 and jump to ruby 4 for FOUR times the speed
<baweaver> Hopefully they don't go the Angular 2 route and scrap everything
SilverKey has joined #ruby
<yorickpeterse> I can't wait for ng-ruby
roamingdog has quit [Remote host closed the connection]
<yorickpeterse> I guess Ruby being slow kinda matches Angular at least
<yorickpeterse> :troll:
wrkrcoop has joined #ruby
AndroidLoverInSF has joined #ruby
<yorickpeterse> At least Ruby isn't as over-engineered
<yorickpeterse> no dependency injection and all that bs
<toretore> it's a little under-engineered
<yorickpeterse> I think you meant "non-engineered" :P
<yorickpeterse> and yet here we are
<yorickpeterse> I guess it's the lesser evil, certainly compared to Python, JS, etc
<baweaver> JS over engineered?
<baweaver> the language itself, or the community?
MrBusiness3 has joined #ruby
macsteps has joined #ruby
<baweaver> the latter I would agree with, the former: it was made in a week
<shevy> all good things are done in a week
roamingdog has joined #ruby
<shevy> like the creation of the universe!!!
<jhass> that then explains why humans take 9 months
<toretore> js certainly suffered from being under-engineered
<yorickpeterse> baweaver: No, the language is a weekend hack on crutches
<yorickpeterse> stuff like NPM is like Mc Donalds for JS/Node.js
<baweaver> NPM is nothing
<yorickpeterse> you get way too fat too easily
<yorickpeterse> npm install something
<shevy> god you have made me so hungry now
<yorickpeterse> 1203891209382 dependencies installed
<baweaver> you're forgetting bower, grunt, gulp, yeoman, transpilers, compilers, es6, ......
macsteps has quit [Remote host closed the connection]
<yorickpeterse> https://www.youtube.com/watch?v=lKXe3HUG2l4 mandatory watching material, featuring Joe Armstrong ranting about Grunt
<shevy> better than grunting about Runt!
<baweaver> because micro modules are a thing
macsteps has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
symm- has joined #ruby
<yorickpeterse> > left-pad
arnonhongklay has joined #ruby
* apeiros snickers
<baweaver> I gave a challenge to my Node sympathetic friends to explain left pad to a common person and why it's needed.
<yorickpeterse> we have 3....
<yorickpeterse> I'm surprised there's not a C ext version and an FFI version
<yorickpeterse> and a JRuby version that uses like half of Maven
<yorickpeterse> enterprise-left-pad
postmodern has joined #ruby
<baweaver> PadFactoryMapperBeanAbstractSingletonCommander?
_mak has left #ruby [".."]
mistermocha has joined #ruby
speakingcode has quit [Ping timeout: 244 seconds]
rbr has joined #ruby
chip_ has quit [Ping timeout: 240 seconds]
macsteps has quit [Ping timeout: 272 seconds]
<yorickpeterse> need an observer pattern in there
arnonhongklay has quit [Ping timeout: 240 seconds]
<yorickpeterse> and dependency injection
<shevy> now now
<shevy> I see what you did there
<shevy> you are brotherly merging javascript and java here
<baweaver> that was on the JRuby enterprise comment
<apeiros> aren't those the same?
<hanmac> yorickpeterse: hm didnt we have a observer pattern in ruby-stdlib ?
<baweaver> I haven't observed it
<yorickpeterse> badum tsh
<shevy> those dam observers
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
timanema_ has quit [Quit: leaving]
yfeldblum has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
whathapp_ has quit [Remote host closed the connection]
JesseH has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
arajakul1 has quit [Ping timeout: 260 seconds]
SilverKey has quit [Quit: Halted.]
yfeldblum has quit [Remote host closed the connection]
CSWookie has joined #ruby
djbkd has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
frem_ has joined #ruby
graft has quit [Ping timeout: 244 seconds]
SilverKey has joined #ruby
agentmeerkat has joined #ruby
graft has joined #ruby
last_staff has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
nando293921 has quit [Ping timeout: 258 seconds]
sp4rrow has joined #ruby
roamingdog has quit [Remote host closed the connection]
AndroidLoverInSF has quit [Quit: This computer has gone to sleep]
Xiti has joined #ruby
AndroidLoverInSF has joined #ruby
SilverKey has quit [Quit: Halted.]
mistermocha has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agentmeerkat has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
mistermocha has quit [Ping timeout: 250 seconds]
MrBusiness3 has quit [Ping timeout: 258 seconds]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
roamingdog has joined #ruby
jaguarmagenta has joined #ruby
mistermocha has joined #ruby
last_staff has quit [Quit: last_staff]
ta_ has joined #ruby
pLaToOn has quit [Read error: Connection reset by peer]
MrBusiness3 has joined #ruby
rbennace_ has joined #ruby
ta__ has quit [Ping timeout: 260 seconds]
rbennacer has quit [Ping timeout: 244 seconds]
roamingdog has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 252 seconds]
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 258 seconds]
roamingdog has joined #ruby
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
<yorickpeterse> heh
zxd has joined #ruby
MrBusiness3 has quit [Ping timeout: 272 seconds]
mistermo_ has quit [Ping timeout: 250 seconds]
centrx has joined #ruby
Guest40784 has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
dminuoso has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
shinnya has quit [Ping timeout: 252 seconds]
vuoto has quit [Remote host closed the connection]
macsteps has joined #ruby
neo_ has quit [Ping timeout: 250 seconds]
mistermo_ has joined #ruby
MrBusiness3 has joined #ruby
misterm__ has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
roamingdog has quit [Remote host closed the connection]
mistermocha has joined #ruby
blackgoat has joined #ruby
mistermo_ has quit [Ping timeout: 250 seconds]
rbr has quit [Ping timeout: 244 seconds]
aryaching has quit [Remote host closed the connection]
aryaching has joined #ruby
mistermo_ has joined #ruby
sergio_101 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhack> any good resources on ML in ruby?
misterm__ has quit [Ping timeout: 250 seconds]
chopin has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
chopin is now known as Guest51560
moeabdol has joined #ruby
SilverKey has joined #ruby
<pilne> >.< the first hit for constraint programming in ruby "Gecoder" is hosted on rubyforge... which is down >.<
MrBusiness3 has quit [Ping timeout: 258 seconds]
<pilne> ah-ha! there is minikanren!
* pilne does a happydance
mistermo_ has quit [Ping timeout: 250 seconds]
xaxisx has quit [Quit: xaxisx]
allcentury has joined #ruby
mistermocha has joined #ruby
Guest51560 has quit [Remote host closed the connection]
lxsameer has quit [Quit: WeeChat 1.5]
<l4v2> Hey, I am doing this querying tutorial to learn from and this is giving me an error message. Anyone know? https://gist.github.com/anonymous/8291072fbd819f2eaf134187701a8ef1
l4v2 has quit [Quit: l4v2]
<aegis3121> what is the error?
jetpack_joe has joined #ruby
sp4rrow has joined #ruby
l4v2 has joined #ruby
ta_ has quit [Ping timeout: 264 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
ta_ has joined #ruby
snath has quit [Ping timeout: 250 seconds]
choke has joined #ruby
ldnunes has quit [Quit: Leaving]
<apeiros> l4v2: 23:14 aegis3121: what is the error?
<apeiros> (not leaving after asking a question helps too btw. :-p)
<l4v2> NameError: undefined local variable or method `color' for #<ActiveRecordTest:0x007feb732d9018>
<l4v2> My computer shut off….?
<aegis3121> `color` isn't defined anywhere
<l4v2> I believe it is in a method before the class in this file.
<l4v2> I’ll make a new paste bin with it
<smathy> It's obviously out of scope.
<smathy> (sorry, let me s/obviously// - I'm trying to get out of that habit)
snath has joined #ruby
<centrx> smathy obviously knows what he's talking about
<shevy> that is indeed quite obvious
n_blownapart has joined #ruby
<smathy> Obvious to people with years of experience, understanding of objects, classes, context, scope, etc. :)
replay has joined #ruby
<smathy> l4v2, that doesn't define a color method, and actually the only `color` in there is a hash key in the `options` hash.
<toretore> l4v2: gist entire files, not just parts you think are relevant
mistermocha has joined #ruby
<l4v2> ok
<toretore> the more code you share, the easier it is to give advice
northfurr has joined #ruby
<toretore> less frustration, less time spent, faster resolution
`tim` has joined #ruby
macsteps has quit [Remote host closed the connection]
<toretore> and if you're following some sort of tutorial, link to it
chopin has joined #ruby
mistermo_ has joined #ruby
chopin is now known as Guest42096
zxd has quit []
Es0teric has joined #ruby
misterm__ has joined #ruby
pawnbox has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 250 seconds]
aupadhye has quit [Quit: Leaving]
millerti has joined #ruby
whathappens has joined #ruby
<l4v2> Vim is being really annoying at the moment, but they are all just seperate tests form one another
pawnbox has joined #ruby
mistermo_ has quit [Ping timeout: 250 seconds]
<toretore> gist should really let you upload files in the ui
<toretore> i'm surprised it doesn't
yfeldblum has joined #ruby
<toretore> ah, you can drag & drop files
mdw has joined #ruby
misterm__ has quit [Ping timeout: 250 seconds]
Guest42096 has quit [Remote host closed the connection]
duncannz has joined #ruby
srgupta_ has joined #ruby
<l4v2> idk, it’s not letting me
GodFather has quit [Quit: Ex-Chat]
GodFather has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
n_blownapart has left #ruby [#ruby]
<l4v2> Ok, here it is, the first line is indented and it shouldn’t be https://gist.github.com/anonymous/c99c0f1a012b55b34cb62989b012f9e0
GodFather has quit [Ping timeout: 240 seconds]
srgupta_ has quit []
chipotle has joined #ruby
TomyLobo has quit [Ping timeout: 260 seconds]
<l4v2> Well there is other formating errors as well, but that’s the content in the file
mistermocha has joined #ruby
ta__ has joined #ruby
<toretore> l4v2: ok, so `color` isn't defined at the point you're using it
<toretore> and `Car.find(color)` probably won't make sense either
chipotle has quit [Client Quit]
<smathy> The only place `color` is defined is in the `test_having` method.
ta_ has quit [Ping timeout: 276 seconds]
<l4v2> Yeah, they are giving me everything I need already in all of the other tests
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermo_ has joined #ruby
nankyokusei has joined #ruby
<l4v2> they get defined with the create method?
<smathy> ...not that it would matter because `find` only accepts IDs, *and* you're not creating your Cars with any colors, so a finder using colors is never going to find any anyway.
mistermocha has quit [Ping timeout: 250 seconds]
mistermo_ has quit [Read error: Connection reset by peer]
<smathy> l4v2, whether the color of a car is set during create or not, the identifier `color` is not being initialized. This is not about data in your DB, it's about the ruby identifier denoted by the name `color`
`tim` has joined #ruby
mistermocha has joined #ruby
<smathy> l4v2, can I suggest that you work through a programming tutorial first, specifically Learn to Program: https://pine.fm/LearnToProgram/
chipotle has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
dminuoso has joined #ruby
dc1 has quit [Ping timeout: 272 seconds]
rodfersou has quit [Quit: leaving]
<l4v2> I already read a Rails book, and most of the well grounded rubyist. I have just yet to do querying.
nankyokusei has quit [Ping timeout: 258 seconds]
<l4v2> The Active Record is so weird to me
mistermocha has quit [Read error: Connection reset by peer]
<smathy> l4v2, I'm making this recommendation based on your understanding of this error, of the `color` identifier, and how you're responding to the help people are trying to give you. It's a fundamental concept in programming that you don't seem to have covered yet.
<smathy> l4v2, the issue you're having with `color` has nothing at all to do with ActiveRecord.
mistermocha has joined #ruby
goodroot has quit [Quit: WeeChat 1.5]
tfitts has quit [Quit: Connection closed for inactivity]
mistermocha has quit [Read error: Connection reset by peer]
<l4v2> Do you know how to solve this, it’s jsut for fun
<baweaver> color is undefined
mistermocha has joined #ruby
<baweaver> find is not an instance method
<baweaver> it's a class method, so it has no concept of what color is
last_staff has joined #ruby
vale-tudo has quit [Ping timeout: 244 seconds]
<baweaver> that, and find takes the primary key of the table which is probably not color.
<baweaver> Car.find_by(color: 'white')
<baweaver> but seriously, read some tutorials all the way through
FilipeChagas has joined #ruby
jetpack_joe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermo_ has joined #ruby
dminuoso has quit [Ping timeout: 272 seconds]
<smathy> l4v2, yes I know how to solve it, but if you don't understand the sentence: "`color` is undefined" then I can't communicate how to solve it to you.
<l4v2> Holy cow dude you ar not that smart becuasae I already know that, so what do you actually suggest genius?
<l4v2> Dealing with people like this always in this field, like I don’t understand that. It’s the closest I can get to the answer
mistermo_ has quit [Read error: Connection reset by peer]
<l4v2> do I use the find method?
dvinciguerra_ has quit [Ping timeout: 276 seconds]
<l4v2> Do I even need it?
<aegis3121> That's...actually been answered a couple of times.
mistermo_ has joined #ruby
<aegis3121> <baweaver> Car.find_by(color: 'white')
<aegis3121> <smathy> ...not that it would matter because `find` only accepts IDs, *and* you're not creating your Cars with any colors, so a finder using colors is never going to find any anyway.
mistermocha has quit [Ping timeout: 249 seconds]
<baweaver> these have all been answered
<baweaver> repeatedly
<baweaver> (mainly due to me not reading the entire backlog admittedly)
dionysus69 has quit [Ping timeout: 276 seconds]
<l4v2> I just started Active Record stuff yesterday, I know you guys have more time than that, that’s why I came here.
<baweaver> that, and likely you want to be in the #RubyOnRails channel
<baweaver> l4v2: you have the answers already
diegoaguilar has joined #ruby
<baweaver> read back on the chat log and try them out.
<l4v2> Yeah, I have to define color, I tried that, so maybe it is a syntax error, like I said, this is just for learning for the sake of learning.
roamingdog has joined #ruby
AndroidLoverInSF has quit [Quit: Leaving]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<l4v2> So how do I define it, becuase when I tried to do it with cheetah as the color it dind’t work. So is it just solor?
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
<jhass> "didn't work" is not anywhere near an adequate problem description
ekinmur has joined #ruby
mistermo_ has quit [Ping timeout: 276 seconds]
malconis has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
<jhass> yeah I found that
<l4v2> This is why I hate programing, I get no joy out of solving things, just want the answer so I can use it going forward.
<baweaver> color isn't defined, they're using find instead of find_by, and the create method is using random params
mistermocha has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> l4v2: You have gotten the answer multiple times in multiple different ways
<l4v2> write the syntax
<baweaver> I did
mdw has joined #ruby
aegis3121 has quit [Quit: Textual IRC Client: www.textualapp.com]
<toretore> l4v2: if you don't actually like programming, maybe find a job that doesn't require it
<baweaver> If you cannot read, we cannot help
<baweaver> toretore: pushing it.
<toretore> pushing what?
<baweaver> little bit out of line, assumes too much.
ekinmur_ has quit [Ping timeout: 264 seconds]
mistermo_ has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
<baweaver> it was stated that they're learning to learn earlier.
<toretore> <l4v2> This is why I hate programing, I get no joy out of solving things, just want the answer so I can use it going forward.
<l4v2> bweaver, I did not see your reply, because I was on the other screen, thank you though
<toretore> this is pretty clear to me
roamingdog has quit [Ping timeout: 240 seconds]
<toretore> i made the assumption that it was for a job, which i don't know
<l4v2> It’s jsut so predictable that no one ever jsut answers a question in this field, it’s like a game of clue.
<l4v2> no, I already said, fun tutorial
<toretore> but i could substitute job for university and i'd still mean it
<jhass> l4v2: your question has been answered multiple times
<shevy> new people start by learning activerecords??
ekinmur has quit [Ping timeout: 276 seconds]
Sypheren has joined #ruby
mistermocha has joined #ruby
<jhass> l4v2: if you don't understand the answers given, ask about clarification of specific parts of the given answer instead of repeating your initial question.
<l4v2> New to Active Records, adn I focused more on the Rails part of it too
<Sypheren> Hello, what IDE's do you guys tend to use?
<jhass> Sypheren: $EDITOR and $SHELL
<Sypheren> I use Intellij for Java but it doesn't seem to be cutting it for ruby
<Sypheren> :<
<baweaver> Sypheren: Most popular are: Vim, Sublime, Emacs, Rubymine (also Jetbeans), and Atom
<Sypheren> I see, thank you!
<baweaver> Only Rubymine is an IDE though.
<l4v2> I could just say this, what is the exact line of code that solves this test, so that I can use it going forward, the whole line.
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> and then we could say we gave you it already
<l4v2> But then I have to do the whole song and dance about here’s a clue anyway. Only in this field
misterm__ has joined #ruby
mistermo_ has quit [Ping timeout: 250 seconds]
<baweaver> the point is to get you to learn for yourself
<Sypheren> baweaver, why is there such a small number of IDE's for ruby?
<baweaver> Sypheren Most people don't need one.
<Sypheren> Is it just not needed, like it is in Java?
<Sypheren> Ah!
<l4v2> I can learn more basic stuff in less time once I get basic concepts down
<Sypheren> My coding background is pretty much 99% java 1% python, so I'm used to relying on heavy IDE's
<baweaver> Sypheren: In Java you need an IDE just to cope with the complexity and AbstractFactoryProxySingletonFactoryBeans
<Sypheren> hehe, yup
Es0teric has quit [Quit: Computer has gone to sleep.]
<Sypheren> Java was a pretty good way for me to learn coding though
<l4v2> There’s a rule for everything in this world
mistermo_ has joined #ruby
<baweaver> If you like Ruby but want to still run on the JVM look into JRuby and Scala
<Sypheren> I actually didn't start using an IDE for it until I was forced to use libraries to work faster
<Sypheren> I credit that to why I learned it well
mistermocha has quit [Ping timeout: 260 seconds]
<shevy> \o/
<jhass> l4v2: we're here to help you with your problem if clearly stated as by the channel rules. We're not here to listen to your views about the world or the computer science or programming fields. Please stop that.
<Sypheren> Oh, whoops
<baweaver> Sypheren: I avoid using an IDE for much the same reason. It forces me to read and learn the language instead of having things autocomplete for me.
<l4v2> I learn better when I see the answer after spedning time on it myself, then I can just say what does that mean. If I had the answer I wouldn’t be here asking.
<Sypheren> Sorry, jhack
<Sypheren> Er... jhass
<baweaver> Sypheren: He wasn't referring to you
<Sypheren> However, I was also doing the same thing
<Sypheren> :<
<l4v2> I usually give people the answer and then let them ask questions.
mistermocha has joined #ruby
<Sypheren> baweaver, but it's great once you learn it and your goal becomes to work fast!
<jhass> l4v2: well we don't, see the channel rule I linked
<l4v2> I don’t do the whole bread crumb trail
<baweaver> Sypheren: that's fair
misterm__ has quit [Ping timeout: 260 seconds]
<l4v2> And I still don’t see how you guys would solve it exactly? I got the test to pass, but it’s probably not the best way to do it, which is why I asked
<Sypheren> Once you get the syntax and conventions down, you usually start to focus on the bigger picture and worry about how your code will be read by other people
<jhass> l4v2: #new2ruby might have a mindest closer to yours, perhaps it's a better avenue for you
<baweaver> Sypheren: I just built up a lot of shortcuts, macros, and snippets in vim. Used to be a SysAdmin so Vim was where I lived for the longest time.
<Sypheren> I've heard testing was also pretty big in Ruby and Rails
<jhass> l4v2: we can't judge whether you solved it correctly without seeing what you did
<l4v2> I’m just asking someone in the community, maybe not even you to write it how you would do it, so I can compare it to what I did.
misterm__ has joined #ruby
<jhass> that's the wrong way around
emiltin has quit [Quit: Computer has gone to sleep.]
<Sypheren> I've wanted to set up macros, but I've never sat down and tried to do it well
<jhass> show what you accomplished and we can suggest how you can improve it
<pontiki> too much work
<baweaver> Sypheren: It is. Look into Rails 4 in Action. Radar and sevenseacat wrote it.
mistermo_ has quit [Ping timeout: 244 seconds]
<Sypheren> I hang out on #rubyonrails all the time, it's very well written!
<l4v2> I already did, passed with an error, so I wanted to get rid of the error, the test doesn’t fail
<baweaver> A good portion of us are on both channels
<Sypheren> I tend to fear larger channels becasue I type a lot and don't stay on topic
mistermo_ has joined #ruby
<baweaver> #ruby-offtopic is safe
<Sypheren> This exists
<jhass> and we'll tell you to go there if it becomes a problem ;)
<baweaver> though there's a lot of hangman being played.
mistermocha has quit [Ping timeout: 276 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
SilverKey has quit [Quit: Halted.]
mistermocha has joined #ruby
l4v2 has left #ruby [#ruby]
misterm__ has quit [Ping timeout: 250 seconds]
last_staff has quit [Quit: last_staff]
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
slackbotgz has joined #ruby
GodFather has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
mistermo_ has quit [Ping timeout: 250 seconds]
<shevy> aha!
sp4rrow has joined #ruby
polishdub has quit [Quit: Leaving]
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
tomphp has joined #ruby
centrx has quit [Remote host closed the connection]
mistermo_ has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
moeabdol has quit [Ping timeout: 250 seconds]
`tim` has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
mistermocha has quit [K-Lined]
mistermocha has joined #ruby
FilipeChagas has quit [Quit: WeeChat 1.5]
neo_ has joined #ruby
snath has quit [Ping timeout: 250 seconds]
Asher has joined #ruby
zenlot6 has joined #ruby
moeabdol has joined #ruby
Sypheren has quit [Quit: Going offline, see ya! (www.adiirc.com)]
mistermocha has quit [Ping timeout: 250 seconds]
zenlot has quit [Ping timeout: 272 seconds]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
neo_ has quit [Ping timeout: 244 seconds]
Sypheren has joined #ruby
centrx has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
cisco has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
neo_ has joined #ruby
xKillerFo has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
the_drow has joined #ruby
solocshaw has joined #ruby
KillerFox has quit [Ping timeout: 244 seconds]
agent_white has quit [Quit: gohnome]
jhack has quit [Ping timeout: 276 seconds]
jaguarmagenta has joined #ruby
moeabdol has joined #ruby
l4v2 has joined #ruby
Sypheren has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<l4v2> bweaver insults me for asking a question and then blocks me when I tell him he is being arrogant.
<l4v2> Whatever you have to do
<l4v2> pathetic
jaguarmagenta has quit [Ping timeout: 246 seconds]
<l4v2> Ok, wehre’s the rule that says don’t insult people when they ask a question
<jhass> !mute l4v2
<jhass> not here, read the rules
mistermocha has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
Sypheren has joined #ruby
Sypheren has quit [Client Quit]
symm- has joined #ruby
allcentury has quit [Ping timeout: 272 seconds]
dminuoso has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
Gasher has joined #ruby
snath has joined #ruby
coyo has quit [Ping timeout: 240 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
KillerFox has joined #ruby
smathy is now known as smathy_afk
dminuoso has quit [Ping timeout: 260 seconds]
slackbotgz has quit [Remote host closed the connection]
the_drow has quit [Quit: This computer has gone to sleep]
stevenxl has quit [Quit: leaving]
allcentury has joined #ruby
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
firstdayonthejob has quit [Ping timeout: 276 seconds]
xKillerFo has quit [Ping timeout: 244 seconds]
solocshaw has quit [Ping timeout: 246 seconds]
ruby-lang642 has joined #ruby
l4v2 has left #ruby [#ruby]
Gasher has quit [Quit: Leaving]
roamingdog has joined #ruby
isberg has joined #ruby
isberg has quit [Max SendQ exceeded]
bkxd has joined #ruby
solocshaw has joined #ruby
Gasher has joined #ruby
roamingdog has quit [Ping timeout: 244 seconds]
coyo has joined #ruby
<ruby-lang642> what's the best way to ask for help on code when it involves multiple files?
<toretore> ?gist ruby-lang642
<ruby[bot]> ruby-lang642: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<ruby-lang642> oh thanks
bkxd has quit [Ping timeout: 252 seconds]
<ruby-lang642> So I'm stuck on trying to use inheritance and class variables. This is the code I'm working with: https://gist.github.com/drwl/650512e5bbdf0dba61e31e85a1c180fb
solocshaw has quit [Quit: solocshaw]
solocshaw has joined #ruby
<baweaver> If you mean @@var, they tend to behave badly on inheritance iirc
<ruby-lang642> If you run app.rb it returns 5 instead of 2, and I read it's because the class variable @@items is being used by the sub-classes. I read and found that you can use class instance variables, but I'm not quite sure how to implement it. Changing @@items to @items in item.rb (and subsequent files) causes an error
<jhass> ruby-lang642: you probably discovered why the usage of class variables is discouraged in ruby except for a very few very specific cases
smathy has joined #ruby
<shevy> odd way to use class variables
<ruby-lang642> jhass: yes I read that on several sites places on google and am trying to make the switch to class instance variables
<jhass> ruby-lang642: could you show the changed version of the code and the error it gives?
solocshaw has quit [Read error: Connection reset by peer]
<ruby-lang642> sure, one moment
daivyk has quit [Ping timeout: 250 seconds]
solocshaw has joined #ruby
<shevy> ruby-lang642 I'd use methods instead that should return the desired result, e. g. "Items.items?" as a method on class Items
djbkd has quit [Remote host closed the connection]
rbr has joined #ruby
mistermocha has joined #ruby
<ruby-lang642> I updated the gist. https://gist.github.com/drwl/650512e5bbdf0dba61e31e85a1c180fb I basically changed the @@items in Item class to try and make it a class instance variable
<toretore> ruby-lang642: are you sure you actually want to "inherit" @@items ? if we disregard the issues with class vars for a moment and assume that it works the way you intend, all these classes will share the same "store"
<ruby-lang642> shevy: I'm not sure what you mean, could you elaborate?
<toretore> ruby-lang642: that is; Product.all and Customer.all will return the same
whathappens has quit [Quit: Leaving...]
<ruby-lang642> toretore: I understand that's the bug now. I don't want to inherit the @@items but I do want the sub classes to inherit the reused behavior, if that makes sense.
sepp2k has quit [Read error: Connection reset by peer]
mistermo_ has joined #ruby
<jhass> ruby-lang642: so @items being an instance variable now means that each (sub)class has its own distinct version of it
cisco has quit [Quit: Leaving.]
<jhass> in other words line 4 of item.rb is not magically inherited by its subclasses
<ruby-lang642> yes, that is also my understanding of class instance variables and inheritance
<ruby-lang642> oh
<jhass> ruby-lang642: it's probably best to have a generic add_to_items method in class Item that lazily initializes @items on first access
<toretore> ruby-lang642: i suggest this: create an accessor Item.items that instantiates an instance variable: def Item.items; @items ||= []; end
<jhass> and get rid of the @@products and @@customers stuff
<jhass> toretore: they said they don't want a global store
solocshaw has quit [Ping timeout: 260 seconds]
braincra- has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
<ruby-lang642> it might be because ruby has changed in 10 years but doesn't the @items get inherited & instantiated by subclass? That's what I read here http://www.railstips.org/blog/archives/2006/11/18/class-and-instance-variables-in-ruby/
<toretore> this will be inherited, but the "instance" variable will not, and thus be created for each class
<toretore> thus, Product.items and Customer.items are separate
neo_ has quit [Remote host closed the connection]
<shevy> ruby-lang642 to rely on methods for when you want to query data
<baweaver> Honestly I'd just use SQL
speakingcode has joined #ruby
neo_ has joined #ruby
<shevy> ruby-lang642 you actually already do that now so that is good https://gist.github.com/drwl/650512e5bbdf0dba61e31e85a1c180fb#file-item-rb-L6
mistermo_ has quit [Ping timeout: 250 seconds]
<ruby-lang642> my thought was to have a class variable that keeps track of Products, if there are suggestions please let me know and I'll make them
braincrash has quit [Ping timeout: 272 seconds]
neo_ has quit [Remote host closed the connection]
<ruby-lang642> I'm still reading through the suggestions and trying to understand what is being said
neo_ has joined #ruby
<shevy> yeah get rid of all @@ as a first step
<shevy> use @foo and accessor methods to these
solocshaw has joined #ruby
mistermocha has joined #ruby
<ruby-lang642> shevy: can you explain what you mean by accessor methods for the @foo
<ruby-lang642> like I know what accessor methods are
postmodern has quit [Ping timeout: 250 seconds]
<jhass> ruby-lang642: okay it might help a bit to clear up on what classes are in Ruby. They're instances of the class Class, so full blown objects themselves. And like all ruby objects they can have objects and instance variables that belong to just that one instance
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<jhass> ruby-lang642: when you do def self.foo you're defining a method, not different from def foo, it just lives somewhere else, in a class that's just for this single object, which is an instance of Class in this case but that's not really relevant
solocshaw has quit [Ping timeout: 250 seconds]
<jhass> so "class level instance variables" are really not all that different from the instance variables you probably already understand well, they just live in another (implicit) class
mistermocha has quit [Ping timeout: 250 seconds]
diegoviola has quit [Quit: WeeChat 1.5]
<ruby-lang642> oh okay that makes sense
<ruby-lang642> that's actually pretty interesting
pawnbox has quit [Ping timeout: 252 seconds]
<jhass> ok since that went well we might as well go a little bit deeper still
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruby-lang642> i'm guessing the scopes between class variables and class level instance variables are different?
<jhass> >> class Foo; end; Foo.singleton_class.ancestors
<ruby[bot]> jhass: # => [#<Class:Foo>, #<Class:Object>, #<Class:BasicObject>, Class, Module, Object, Kernel, BasicObject] (https://eval.in/595324)
<jhass> ruby-lang642: yes, very
<jhass> so in the above example the first thing to note is the singleton_class method, that gives as implicit class Ruby creates for each and every object as needed
mdw has quit [Quit: Sleeping Zzzzz]
<jhass> it's the very same object than the first item of its .ancestors
<shevy> ruby-lang642 accessors are getter and setter methods; like: Items.product = 'black cat'; Items.product # "black cat"
<jhass> and it's also the place where your "class level instance variables" and "class methods" live
nadir has quit [Quit: Connection closed for inactivity]
<jhass> they're instance variables and instance methods respectively of said singleton class
biberu has quit []
<jhass> the next thing we can observe there is that the singleton class there first inherits the singleton classes of the parent classes of its object's class (in this case Class)
ur5us has joined #ruby
<jhass> and then also the regular ancestor chain of its object's class
<jhass> this is why child classes inherit "class methods"
karapetyan has quit []
<jhass> but it's also why "class level instance variables" are not shared
romistrub has quit [Ping timeout: 250 seconds]
rbennace_ has quit [Remote host closed the connection]
<jhass> just to prove that claim:
<shevy> ruby-lang642 in theory you could also use things such as: class Items; def product?; @@product; end; end but unless you really need a @@ class variable, prefer the @ variants
postmodern has joined #ruby
<jhass> >> class Foo; end; class Bar < Foo; end; Bar.singleton_class.ancestors
wilsonc91 has quit [Ping timeout: 276 seconds]
<ruby[bot]> jhass: # => [#<Class:Bar>, #<Class:Foo>, #<Class:Object>, #<Class:BasicObject>, Class, Module, Object, Kernel, B ...check link for more (https://eval.in/595325)
<jhass> and to make clear that Class really is _not_ a special case here:
<jhass> >> "".singleton_class.ancestors
<ruby[bot]> jhass: # => [#<Class:#<String:0x40865bec>>, String, Comparable, Object, Kernel, BasicObject] (https://eval.in/595326)
nadir has joined #ruby
tape88 has quit [Quit: Textual IRC Client: www.textualapp.com]
mistermocha has joined #ruby
solars has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
RegulationD has quit [Remote host closed the connection]
nankyokusei has joined #ruby
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
<ruby-lang642> okay so I'm rereading what you wrote. In irb/pry, I've executed Foo.ancestors, Foo.singleton_class.ancestors
northfurr has quit [Quit: northfurr]
<ruby-lang642> before I dive deeper into what you wrote, can you explain the differences of the output?
<ruby-lang642> => [Foo, Object, PP::ObjectMixin, Kernel, BasicObject] is different than => [#<Class:Foo>, #<Class:Object>, #<Class:BasicObject>, Class, Module, Object, PP::ObjectMixin, Kernel, BasicObject]
<jhass> yes, you call it on different Class instances
<jhass> Foo is an instance of the class Class, Foo = Class.new do end is semantically equivalent to class Foo end
rbr has quit [Ping timeout: 260 seconds]
solocshaw has joined #ruby
<jhass> so it's a regular object. All Ruby objects have a so called singleton class which you can fetch with .singleton_class
<jhass> the singleton class is itself just an instance of Class
mistermo_ has quit [Ping timeout: 250 seconds]
solocshaw has quit [Read error: Connection reset by peer]
xlegoman has joined #ruby
frem_ has quit [Quit: Connection closed for inactivity]
nankyokusei has quit [Ping timeout: 264 seconds]
dminuoso has joined #ruby
mistermocha has joined #ruby
<jhass> so it has its own ancestor chain
cdg has quit [Remote host closed the connection]
<gse> hey, i'm trying to do something seemingly simple but ... not happening. I have an array of elements ['foo', 'bar'] and the end result should be "foo", "bar" ... I tried ['foo', 'bar'].map { |x| "\"#{x}\"" }.join(',') and that wasn't what I wanted.
<jhass> gse: I'm unclear on what your expected result is exactly, "foo", "bar" is not a valid Ruby expression
<gse> actually never mind.. i just realised what i'm doing wrong
l4v2 has joined #ruby
sneakers has quit [Ping timeout: 276 seconds]
<l4v2> hello
aryaching has quit [Ping timeout: 252 seconds]
spider-mario has quit [Remote host closed the connection]
<jhass> ruby-lang642: btw if you understand this you deciphered the secret to most of Ruby's "magic" behaviors and it'll probably actually put you ahead in understanding to a lot of already fully productive rubyists ;)
<ruby-lang642> I appreciate the help, I'm drawing a diagram to better understand this and then I'll respond to your messages.
<Radar> l4v2: welcome back
djbkd has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
<jhass> ruby-lang642: sure, take your time, it took me quite some to click too