SCHAAP137 has quit [Remote host closed the connection]
<nymous>
nah, oj didn't helped much, just 3 minutes less
gr1zzlybe4r has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
<gr1zzlybe4r>
Does Ruby have something equivalent to $PYTHONPATH in Python? Or, does one always need to use "load_path.unshift" to get that functionality?
ellistaa has quit [Quit: ellistaa]
cdg has quit [Remote host closed the connection]
weemsledeux has joined #ruby
<drbrain>
gr1zzlybe4r: $RUBYLIB
mrsolo_ has joined #ruby
<drbrain>
gr1zzlybe4r: also ruby -I /path/to/your/ruby/files
spider-mario has quit [Read error: Connection reset by peer]
dlitvak_ has joined #ruby
Coldblackice has quit []
dlitvak has quit [Ping timeout: 245 seconds]
<gr1zzlybe4r>
drbrain: So, that will allow me to `require "my_script"` for all scripts located in the path's specified by $RUBYLIB?
<drbrain>
yes
<gr1zzlybe4r>
drbrain: Thanks :)
<drbrain>
ruby -I is added in front of RUBYLIB is added in front of gems
pdoherty has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
B1n4r10 has joined #ruby
maneco has joined #ruby
Or1on_ has quit [Quit: gone]
jgpawletko has joined #ruby
pawnbox has joined #ruby
maneco has quit [Client Quit]
maneco has joined #ruby
ElFerna has joined #ruby
lyoshajapan has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
Guest34283 is now known as wanderer
lyoshajapan has quit [Remote host closed the connection]
lyoshajapan has joined #ruby
wanderer is now known as Guest57677
huQeQwdpu47q has joined #ruby
DLSteve has joined #ruby
huQeQwdpu47q has quit [Max SendQ exceeded]
kirillzh has joined #ruby
huQeQwdpu47q has joined #ruby
gruz0 has quit [Quit: This computer has gone to sleep]
jottr_ has joined #ruby
kies^ has joined #ruby
jottr has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 245 seconds]
ElFerna has quit [Ping timeout: 265 seconds]
devbug has quit [Ping timeout: 276 seconds]
kirillzh has quit [Client Quit]
mfb2 has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
jottr_ is now known as jottr
stannard has quit [Remote host closed the connection]
x77686d has quit [Quit: x77686d]
stevemackinnon has quit [Remote host closed the connection]
dlitvak_ has quit [Remote host closed the connection]
guacamole has quit [Read error: Connection reset by peer]
<baweaver>
meta on trolls is also bannable, feel free to discuss in #ruby-offtopic
n00bdev has joined #ruby
<Darmani>
Q.Q I guess... I wanted to have a little fun... lol
<baweaver>
No
marr has quit [Ping timeout: 260 seconds]
<baweaver>
and that's the end of that, we don't feed trolls
guacamole has joined #ruby
musicnode has quit [Ping timeout: 272 seconds]
<Darmani>
Okay boss man.
gr1zzlybe4r has quit [Quit: WeeChat 1.1.1]
casadei has joined #ruby
<graphettion>
Stay professional and on-topic. enough said.
pawnbox has quit [Ping timeout: 250 seconds]
<graphettion>
There are plenty of other rooms to troll in. :)
<baweaver>
Feel free to continue meta-discussion in #ruby-offtopic.
<Darmani>
right right right I get it
* Darmani
sighs
cpup has quit [Ping timeout: 260 seconds]
<baweaver>
anyways, I would mask that hidden input
<Scriptonaut>
could anyone suggest either ideas or a resource for basic commandline ruby program ideas for a beginner? I am trying to coach a friend to get started with ruby and to keep him interested I think I need to help him make useful programs that he can actually see in action
<baweaver>
OptParser would be simple
<baweaver>
I think Gosu might be more hand
<baweaver>
y
<baweaver>
used for games
<baweaver>
otherwise I would look into Wicked Cool Ruby Scripts
<Scriptonaut>
baweaver: were you responding to me?
<baweaver>
or there was one on building CLIs in Ruby
<baweaver>
yeah
guacamole has quit [Read error: Connection reset by peer]
<Radar>
kbni: No, there's no issue with having them like that.]
<Radar>
kbni: But I guess if you're asking about it you might be seeing an issue?
hannelita has quit [Remote host closed the connection]
<Radar>
I guess if it's an API you don't get to control if they're project_Id instead ProjectID
<Radar>
project_id*
<kbni>
I'm not seeing an issue - I'm new to ruby and it's nuanced ways, I'm just wondering why the original author has done it like that
<Radar>
You could snake case them
<kbni>
snake case?
<Radar>
kbni: probably just for compat with the API
<Radar>
kbni: this_is_snake_case
frem has quit [Quit: Connection closed for inactivity]
<kbni>
The problem is the API uses camelcase, and does not change
<kbni>
so whilst :resourceid.to_s.camelize.gsub(/ID$/, 'ID') changes it to ResourceID correctly, :projectworktypeid needs to change it to ProjectWorkTypeID
<kbni>
I'm wondering why the author simply didn't populate fields with [ :ProjectID, :ProjectWorkTypeID ] etc
robbyoconnor has quit [Read error: Connection reset by peer]
usershell has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
ss_much has joined #ruby
postmodern has quit [Quit: Leaving]
decaff has quit [Quit: WeeChat 0.4.2]
hannelita has joined #ruby
toretore has quit [Ping timeout: 245 seconds]
Guest49796 has joined #ruby
Guest49796 is now known as vegangreg
hannelita has quit [Ping timeout: 264 seconds]
hlegius has joined #ruby
pawnbox has quit [Remote host closed the connection]
<vegangreg>
How good does one need to be at programming to get an entry level developer job? I've been teaching myself ruby/rails/and jquery for about a year and am trying to figure out whether I might be decent enough to start looking for a gig.
blackmesa has joined #ruby
kies^ has joined #ruby
baweaver has joined #ruby
<al2o3-cr>
basic`: this should work: options.scan(/(?:\'[^'']*\'|[^,])+/)
<basic`>
al2o3-cr: oh fancy
k13nox has joined #ruby
<basic`>
al2o3-cr: that's much cleaner
jam_ has joined #ruby
krz has joined #ruby
<al2o3-cr>
:P
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<al2o3-cr>
yours is a bit OTT
braincrash has quit [Quit: bye bye]
bronson has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
zacts has quit [Quit: leaving]
zacts has joined #ruby
Guest36761 is now known as saneax_AFK
<basic`>
huh, oh i see what's happening
<basic`>
it almost works al2o3-cr -- it's not escaping / removing some of the inner quotes correctly
jam_ has quit [Ping timeout: 250 seconds]
<basic`>
["from=\"10.1.1.42", "10.1.1.41\"", "no-port-forwarding", -- the quotes inside of the from="ip,ip" need to go away
slackbotgz has joined #ruby
treaki_ has joined #ruby
wheresmyjetpack has quit [Read error: Connection reset by peer]
<basic`>
it's okay, i can use the slightly modified shellprint stuff
jackjackdripper has joined #ruby
<al2o3-cr>
Ah, is the whole string single quoted?
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
duckpuppy has quit [Ping timeout: 245 seconds]
treaki has quit [Ping timeout: 272 seconds]
casadei has quit [Remote host closed the connection]
k13nox has quit [Ping timeout: 260 seconds]
<al2o3-cr>
basic`: if it is, use: options.scan(/(?:\"[^""]*\"|[^,])+/).map { |h| h.tr('"', '') }
tjbiddle has joined #ruby
Pande has quit [Ping timeout: 240 seconds]
<Radar>
vegangreg: the demand is high enough now that you could probably start applying for jobs and get them
casadei has joined #ruby
<vegangreg>
that's definitely encouraging---I've read that the demand is quite high
hlegius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toretore has joined #ruby
scripore has quit [Client Quit]
<vegangreg>
I'm moving to Portland next month and am planning on starting to apply for work when I get there
zast has joined #ruby
braincrash has joined #ruby
DarkElement has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
freerobby has quit [Quit: Leaving.]
pdoherty has joined #ruby
Renich has joined #ruby
devbug_ has joined #ruby
<Radar>
Oh neat. They have a good Ruby group there iirc.
czsr has joined #ruby
<Abrin>
I am so glad that someone recommend the book 'Practical Object-Oriented Design in Ruby' it is flippin amazing!
s00pcan has quit [Ping timeout: 250 seconds]
<Abrin>
sorry....just got overexcited there for a second and had to share with the group. :)
<Radar>
Abrin: that's alright :) Excited sharing is best sharing.
pawnbox has joined #ruby
krz has quit [Ping timeout: 272 seconds]
<Abrin>
This group has great book recommendations.
iateadonut has joined #ruby
s00pcan has joined #ruby
psy_ has quit [Ping timeout: 264 seconds]
<vegangreg>
Radar: it looks like that's true---also planning on gettin involved with the meetup groups and whatnot
casadei has quit [Remote host closed the connection]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 260 seconds]
<vegangreg>
any job hunting advice/things to watch out for in the programming job world would be appreciated
pdoherty has quit [Ping timeout: 250 seconds]
<Radar>
never work for equity
jam_ has joined #ruby
<Radar>
man, so many things :P
<Abrin>
sorry to ask a stupid question, but what is equity?
<Radar>
Ask around at the Ruby meetups. They'll give you better advice than an IRC channel can
<Radar>
Abrin: A share of the eventual profit of the business.
<eam>
you should totally work for equity -- but only if you understand how it works
<Abrin>
Oh yes, I can see how one could live to regret that.
<baweaver>
eam likes equity right now
<eam>
equity sharing is why silicon valley is full of millionaires
wonk has joined #ruby
<eam>
(and by full I mean actually full)
<baweaver>
eam worked for Square when they went public, and still does.
<Radar>
Would be nice if some of that VC money made its way to AU :P)
<Abrin>
I heard SF is going through another bubble. I get why the first one existed but the second is a mystery to me.
Musashi007 has quit [Quit: Musashi007]
<eam>
baweaver: been a fan of working for an equity mix my whole life
<vegangreg>
it seems like there are lots of legal issues surrounding equity compensation that are quite difficult to understand
s00pcan has quit [Ping timeout: 245 seconds]
<baweaver>
fair
<Abrin>
I actually have no idea what Square is. I've been living in bliss when it comes to anything in the world of business.
<Radar>
square.com
<eam>
vegangreg: one of the larger angles is that you can push earnings into capital gains
<Abrin>
I remember when the first bubble came around all my friends kept talking about vesting. They were millionares overnight and hten lost those millions overnight.
<eam>
but there are a ton of complications with doing that
s00pcan has joined #ruby
<baweaver>
I'm pretty well pure salary at this point
<eam>
Abrin: the key about any investing, whether through your labor or buying stocks for cash, is to be conservative and plan for the worst
<baweaver>
though with SIE's formation, I might see about some stock sharing / etc coming up...
<eam>
the folks who "lost millions" never really had them
<Abrin>
eam: Yes, but everyone always thinks they are going to get out with their money before the worst happens. Hee hee.
<eam>
yeah
Musashi007 has joined #ruby
<eam>
lots of over-leveraged people in any industry
<Abrin>
eam: Oh yes, it was a paper shuffle. I mean Redhat sold for $100 a share at one point.
<vegangreg>
and there seem to be a lot of issues with actually being able to sell your shares when you terminate your employment
<vegangreg>
lots of restrictions in the contract
<eam>
I have a buddy who worked at apple from the late 90s to late 00s. He regularly sold his stock as it vested over the decade he was there
<eam>
it would've been worth a LOT more if he had held it, but he's happy he sold it because it fit the risk profile he had at the time
<Abrin>
eam: Lucky buddy!
<eam>
(and his previos gig was netscape, where he saw a lot of coworkers hold then fold)
<Abrin>
I know people who worked for Microsoft as 'non-employees' even though they were employees with that big lawsuit-thingy back in the day
<eam>
Abrin: I did that as well
<eam>
I was an orange-badge msft temp
<Abrin>
netscape...damn I miss that browser. Firefox makes me miserable these days.
<eam>
it was immediately after the perma-temp lawsuit, they treated us very well
<baweaver>
ah, eam, I have a new employer now
<eam>
oh yeah? where'd you hop to?
<baweaver>
SIE
<baweaver>
Sony Interactive Entertainment :P
<eam>
aha
<baweaver>
(restructure)
tlarevo has joined #ruby
<eam>
I was gonna say, weren't you already at sony?
<baweaver>
they have an emergency meeting to tell us about it
duncannz has quit [Remote host closed the connection]
<baweaver>
happened some time yesterday
<Abrin>
I'd ask why the heck there is a second bubble but I don't want to get too OT in the channel. If anyone is ever in #ruby-offtopic I'd love to hear about it there.
tlarevo has quit [Read error: Connection reset by peer]
<eam>
I'm in there, happy to chat
<baweaver>
same
<shevy>
Abrin is this nostalgia here :D
krz has joined #ruby
ta has joined #ruby
jottr has joined #ruby
ur5us has quit [Remote host closed the connection]
<Radar>
HTTParty has a much nicer API than Net::HTTP.
<DarkElement>
This doesn't look any "nicer" than net/http
colegatron has quit [Ping timeout: 245 seconds]
blackgoat has joined #ruby
<DarkElement>
But if it's faster, then yea i'm down
<DarkElement>
Radar, what does quotaguardstatic have to do with it?
pawnbox_ has quit [Ping timeout: 250 seconds]
<Radar>
DarkElement: Why do you fail to read.
<Radar>
DarkElement: It's an example of using a proxy with HTTParty in Ruby.
<Radar>
The first result on google for "httparty proxy"
<DarkElement>
Sorry
<Radar>
Rather than messing around with Net::HTTP's frankly awful API
wonk has quit [Quit: Leaving]
pawnbox has joined #ruby
<DarkElement>
Thank ya
hakunin_ is now known as hakunin
<droptone>
Question: I'm leveraging ActiveRecord in my Ruby project and I've got the class definitions set to mimick a corresponding Rails project, with dependent: :destroy elements set in the classes
<droptone>
If, within the Ruby project, I .destroy an object, will ActiveRecord by default destroy all dependent records?
joneshf-laptop has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
GinoManWorks_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GinoManWorks has quit [Ping timeout: 250 seconds]
govg has quit [Ping timeout: 245 seconds]
ReK2 has quit [Quit: Konversation terminated!]
dlitvak has joined #ruby
govg has joined #ruby
ramfjord has joined #ruby
ReK2 has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
GinoManWorks_ has quit [Read error: Connection reset by peer]
tyrbo has joined #ruby
<Radar>
?code droptone
<ruby[bot]>
droptone: We can't help you without your code, please post it to https://gist.github.com
karapetyan has joined #ruby
GinoManWorks has joined #ruby
oivoodoo has joined #ruby
dlitvak has quit [Ping timeout: 272 seconds]
jottr has joined #ruby
colegatron has joined #ruby
vegangreg has quit [Ping timeout: 256 seconds]
oivoodoo has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 276 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak has joined #ruby
<droptone>
Radar: It's a question. I have the same dependent: :destroy declerations in my classes that one would have in a Rails model. If I .destroy a model in my Ruby project, will it automatically destroy the dependent classes like it would in Rails?
<droptone>
Do I really need to post code for this?
<Radar>
droptone: Yes.
<droptone>
Ok, thank you.
<Radar>
droptone: I want to know that we're talking about the same things.
<manveru>
well, there might be another way if you always need it in steps of 20, but right now it would just make stuff longer
rkazak has quit [Quit: Sleep.....ing....]
devlitzi has joined #ruby
<shevy>
"<manveru> i know what you need baby" lol, one more IRC quote to add for my epic collection
sigurding has quit [Quit: sigurding]
chouhoulis has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aufi has joined #ruby
yuung has quit [Quit: Leaving]
<wolffles>
manveru thanks
jordanm has joined #ruby
ohcibi has joined #ruby
jcdesimp has joined #ruby
graphettion has quit [Remote host closed the connection]
devlitzi has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Ping timeout: 250 seconds]
arup_r has quit [Remote host closed the connection]
n00bdev has joined #ruby
TomyLobo has joined #ruby
jcdesimp has quit [Ping timeout: 264 seconds]
stevemackinnon has quit [Remote host closed the connection]
n00bdev has quit [Client Quit]
ledestin has joined #ruby
karapetyan has quit [Remote host closed the connection]
benlovell has joined #ruby
hannelita has joined #ruby
Pupp3tm4st3r has joined #ruby
Limix has quit [Quit: Limix]
haxrbyte has quit [Quit: Leaving...]
ljames has quit []
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
blackmesa has joined #ruby
oivoodoo has quit [Remote host closed the connection]
hannelita has quit [Ping timeout: 240 seconds]
zast has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Ping timeout: 240 seconds]
oivoodoo has joined #ruby
arup_r has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
aeontech has joined #ruby
duncannz has joined #ruby
user has joined #ruby
karapetyan has joined #ruby
grassass has quit [Ping timeout: 256 seconds]
rkazak has joined #ruby
ss_much_ has joined #ruby
tyrbo has joined #ruby
Pupp3tm4st3r has joined #ruby
huQeQwdpu47q_ has joined #ruby
graffix has quit [Ping timeout: 250 seconds]
guacamole has joined #ruby
ReK2GnULinuX has joined #ruby
ss_much has quit [Ping timeout: 240 seconds]
huQeQwdpu47q has quit [Ping timeout: 240 seconds]
guacamol_ has quit [Ping timeout: 240 seconds]
alexherbo2 has quit [Ping timeout: 240 seconds]
pengus has quit [Ping timeout: 240 seconds]
colegatron has quit [Ping timeout: 240 seconds]
ReK2 has quit [Remote host closed the connection]
pengus has joined #ruby
colegatron_origi has joined #ruby
ss_much_ is now known as ss_much
symm- has joined #ruby
andikr has joined #ruby
duncannz has quit [Quit: Leaving]
sigurding has joined #ruby
yoongkang has quit [Remote host closed the connection]
al2o3-cr has quit [Ping timeout: 265 seconds]
alexherbo2 has joined #ruby
amclain has quit [Quit: Leaving]
x77686d has quit [Quit: x77686d]
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Ping timeout: 265 seconds]
jackjackdripper has joined #ruby
marcdel has joined #ruby
benlovell has quit [Ping timeout: 276 seconds]
TomyLobo has quit [Ping timeout: 250 seconds]
kerunaru has joined #ruby
marcdel has quit [Ping timeout: 276 seconds]
Xiti has quit [Quit: Xiti]
karapetyan has quit [Remote host closed the connection]
mdw has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
anisha_ has joined #ruby
scepticulous has joined #ruby
whiteline has quit [Ping timeout: 265 seconds]
firstdayonthejob has joined #ruby
Jet4Fire has quit []
Xiti has joined #ruby
al2o3-cr has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
vegangreg has joined #ruby
jottr has joined #ruby
visudo has joined #ruby
Dimik has quit [Ping timeout: 245 seconds]
akem has quit [Read error: No route to host]
tvw has joined #ruby
User458764 has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
benlovell has joined #ruby
vegangreg has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
tildes has quit [Ping timeout: 276 seconds]
CloCkWeRX has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
last_staff has joined #ruby
troulouliou_div2 has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
Jet4Fire has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
PedramT has joined #ruby
duckpuppy has joined #ruby
PedramT_ has joined #ruby
mdw has quit [Ping timeout: 276 seconds]
Azulinho has joined #ruby
tituspull0 has joined #ruby
vegangreg has joined #ruby
govg has quit [Ping timeout: 264 seconds]
arup_r has quit []
anisha_ has quit [Quit: This computer has gone to sleep]
skade has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha_ has joined #ruby
duckpuppy has quit [Ping timeout: 276 seconds]
PedramT has quit [Ping timeout: 276 seconds]
duncannz has joined #ruby
ta has joined #ruby
<tituspull0>
test123
howdoi has joined #ruby
<ddv>
test failed
hannelita has joined #ruby
vegangreg has quit [Ping timeout: 256 seconds]
benlovell has quit [Ping timeout: 276 seconds]
aufi has quit [Remote host closed the connection]
Ebok has joined #ruby
pawnbox has quit [Remote host closed the connection]
blackmesa has joined #ruby
TomyWork has joined #ruby
bronson has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
Waheedi has quit [Quit: Waheedi]
Azulinho has quit [Ping timeout: 264 seconds]
symm- has quit [Ping timeout: 240 seconds]
tyrbo has quit [Ping timeout: 264 seconds]
aufi has joined #ruby
Azulinho has joined #ruby
tjbiddle has joined #ruby
tvw has quit [Ping timeout: 245 seconds]
SCHAAP137 has joined #ruby
drbrain has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 265 seconds]
tomphp has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
ur5us has quit [Remote host closed the connection]
AlexJakeGreen has joined #ruby
yardenbar has joined #ruby
lkba has joined #ruby
nizmow has quit [Ping timeout: 272 seconds]
ferr has joined #ruby
skade has quit [Ping timeout: 240 seconds]
speaking1ode has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
elifoster has quit [Ping timeout: 256 seconds]
speaking1ode has joined #ruby
PedramT has joined #ruby
yoongkang has joined #ruby
drbrain has joined #ruby
wolffles has quit [Quit: wolffles]
blackms has joined #ruby
visudo has quit [Quit: visudo]
<gregf_>
pwd
PedramT_ has quit [Ping timeout: 240 seconds]
kerunaru has quit [Quit: leaving]
aeontech has quit [Quit: aeontech]
<gregf_>
oops :| sorry
smileart has joined #ruby
ramfjord has joined #ruby
blur3d has joined #ruby
yoongkang has quit [Ping timeout: 265 seconds]
mark2 has joined #ruby
einarj has joined #ruby
<ddv>
gregf_: /Users/ddv/Development
workmad3 has joined #ruby
AlexJakeGreen has quit [Quit: Leaving]
firstdayonthejob has quit [Ping timeout: 240 seconds]
mdw has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kerunaru has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
user has quit [Remote host closed the connection]
kerunaru has quit [Client Quit]
kerunaru has joined #ruby
sepp2k has joined #ruby
jottr has joined #ruby
codecop has joined #ruby
ta has quit [Quit: Leaving...]
sftrabbit has joined #ruby
burbus has joined #ruby
juddey has quit [Ping timeout: 256 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
jbrhbr has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
berserk_ren has joined #ruby
workaccounthuehu has joined #ruby
mikecmpbll has joined #ruby
devbug has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
benoror has quit [Quit: Connection closed for inactivity]
ta has joined #ruby
FLeiXiuS` has quit [Quit: Leaving]
atomical has joined #ruby
atomical_ has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaxter has joined #ruby
mdw has joined #ruby
tyrbo has joined #ruby
Burgestrand has joined #ruby
dkam has joined #ruby
atomica__ has joined #ruby
atomica__ has quit [Client Quit]
atomical has quit [Ping timeout: 250 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
pcoke_ has joined #ruby
coyo has quit [Remote host closed the connection]
kmckelvi1 has quit [Quit: WeeChat 1.3]
coyo has joined #ruby
jcdesimp has joined #ruby
mdw has quit [Client Quit]
sandstrom has joined #ruby
sandstrom has quit [Client Quit]
Xeago has joined #ruby
atomical_ has quit [Ping timeout: 256 seconds]
duncannz has quit [Remote host closed the connection]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
vegangreg has joined #ruby
jcdesimp has quit [Ping timeout: 272 seconds]
drptbl has joined #ruby
duncannz has joined #ruby
hannelita has joined #ruby
catbusters has quit [Ping timeout: 250 seconds]
vegangreg has quit [Ping timeout: 256 seconds]
duncannz has quit [Client Quit]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
catbusters has joined #ruby
kp666 has joined #ruby
mdw has joined #ruby
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
duncannz has quit [Client Quit]
kp666 has quit [Max SendQ exceeded]
c0m0 has joined #ruby
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
hannelita has quit [Ping timeout: 245 seconds]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
k13nox has joined #ruby
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
Brklyn has joined #ruby
devlitzi has joined #ruby
kp666 has quit [Max SendQ exceeded]
blackmesa has joined #ruby
kp666 has joined #ruby
duncannz has joined #ruby
yoongkang has joined #ruby
davedev2_ has quit []
tomphp has joined #ruby
UtkarshRay has joined #ruby
DoubleMalt has joined #ruby
Brklyn has quit [Ping timeout: 276 seconds]
Jet4Fire has quit []
rdark has joined #ruby
kirillzh has joined #ruby
ramlem has joined #ruby
Abrin has quit [Ping timeout: 272 seconds]
sftrabbit has quit [Quit: sftrabbit]
devlitzi has quit [Ping timeout: 256 seconds]
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
lurch_ has joined #ruby
shredding has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
FooMunki has joined #ruby
tyrbo has quit [Ping timeout: 265 seconds]
Snowy has joined #ruby
rodfersou has joined #ruby
houhouli_ has quit [Remote host closed the connection]
smileart has quit [Ping timeout: 245 seconds]
zarubin has joined #ruby
Luna_Moonfang has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
govg has joined #ruby
Luna_Moonfang has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
benlovell has joined #ruby
tyrbo has joined #ruby
k13nox has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 260 seconds]
k13nox has joined #ruby
k13nox has quit [Remote host closed the connection]
huyderman has joined #ruby
k13nox has joined #ruby
astrobun_ has joined #ruby
Azulinho has quit [Ping timeout: 272 seconds]
hannelita has joined #ruby
chussenot has joined #ruby
jottr has joined #ruby
anisha_ has quit [Quit: Leaving]
CloCkWeRX has quit [Ping timeout: 250 seconds]
Wizek has joined #ruby
konsolebox has quit [Ping timeout: 250 seconds]
tyrbo has quit [Ping timeout: 256 seconds]
jottr has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
einarj has quit []
rkazak has quit [Quit: Sleep.....ing....]
kerunaru has quit [Ping timeout: 264 seconds]
kerunaru has joined #ruby
evidex has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
marr has joined #ruby
sftrabbit has joined #ruby
benlovell has quit [Ping timeout: 256 seconds]
pawnbox has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
chthon has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
hannelita has quit [Remote host closed the connection]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workaccounthuehu has quit [Quit: Page closed]
CloCkWeRX has joined #ruby
bronson has joined #ruby
pawnbox has joined #ruby
vegangreg has joined #ruby
sandstrom has joined #ruby
Bloomer has quit [Remote host closed the connection]
<sandstrom>
I have a global constant named `PIPELINE`, and I don't quite understand where its coming from. Is this a native ruby thing, or just some weirdness in my project or a gem?
zeroDivisible has joined #ruby
skade has joined #ruby
<yorickpeterse>
sandstrom: could be that another Gem/file defines it
<sandstrom>
yorickpeterse Yes, I guess (that or Ruby, but I couldn't find anything in the Ruby docs)
benlovell has joined #ruby
hannelita has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
<yorickpeterse>
I don't think Ruby itself defines PIPELINE anywhere
astrobun_ has quit [Remote host closed the connection]
<yorickpeterse>
constants don't have any source location information attached by default, so it's hard to figure out where it comes from
govg has quit [Ping timeout: 240 seconds]
dkam has quit [Quit: Be back later ...]
vegangreg has quit [Ping timeout: 256 seconds]
<sandstrom>
yorickpeterse I found a probable suspect via `seek = PIPELINE.to_s.underscore; $".detect{ |load_path| load_path.include?(seek) }`
mr_blue has joined #ruby
dlitvak has joined #ruby
dwfait has joined #ruby
<yorickpeterse>
well that doesn't define it, that just references it
tyrbo has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
anisha_ has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
h99h9h88 has joined #ruby
chipotle has joined #ruby
platzhirsch has joined #ruby
serard has quit [Quit: Leaving]
stamina has joined #ruby
moei has joined #ruby
konsolebox has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea>
sandstrom: Why not just redefine it to trick the interpreter into warning you about its previous definition?
h99h9h88 has quit [Remote host closed the connection]
PedramT_ has joined #ruby
joonty has joined #ruby
Cohedrin has joined #ruby
User458764 has joined #ruby
Cohedrin has quit [Max SendQ exceeded]
Cohedrin has joined #ruby
<gregf_>
hello, does capistrano execute the .bashrc/.bash_profile always? or do i need to source it explicitly?
the_drow has joined #ruby
dlitvak has quit [Ping timeout: 265 seconds]
PedramT has quit [Ping timeout: 265 seconds]
<sandstrom>
Ox0dea clever idea!
dkam has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
PedramT_ has quit [Read error: Connection reset by peer]
PedramT has joined #ruby
benlovell has quit [Ping timeout: 245 seconds]
mdw has quit [Read error: Connection reset by peer]
<ruby[bot]>
gregf_: # => D, [2016-01-27T10:35:19.802024 #7438] DEBUG -- : Foo ...check link for more (https://eval.in/508690)
<the_drow>
But it's not as good as logbook for python for example
<havenwood>
the_drow: What do you not have that you need?
<gregf_>
the_drow: what more do you need from a logging library?
srenatus has joined #ruby
gbgdev has quit [Ping timeout: 250 seconds]
sftrabbit has quit [Quit: sftrabbit]
<sandstrom>
Is there a way to make an instance pass an `is_a?` check besides subclassing? It's for a thin wrapper / decorator that will delegate most things to its underlying instance.
dlitvak has joined #ruby
<the_drow>
I need to direct errors to stderr, I need to be able to emit statistics, I need to be able to provide context and guide developers to use structured logging, colors, I need thread safety, buffered output
<Ox0dea>
sandstrom: Are you sure you want that to happen?
<the_drow>
statistics = metrics e.g. counters, timers etc.
whiteline has joined #ruby
<sandstrom>
Ox0dea I may be making a mistake in my thinking, but I'd like to explore it.
<havenwood>
the_drow: Are you suggesting Logger can't output to STDERR or isn't Thread safe, etc?
<Ox0dea>
sandstrom: Well, I imagine you don't want to redefine #is_a?, in which case you'll need to poke about in raw memory to adjust your thing's ancestor chain post-facto.
dlitvak has quit [Remote host closed the connection]
<the_drow>
Nope. I'm suggesting that a single logger instance can't output to two different streams
sftrabbit has joined #ruby
<sandstrom>
Ox0dea it may be a bad idea. I'll ponder it some more
kennyfrc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
loren has quit [Quit: Leaving]
avril14th has joined #ruby
jcdesimp_ has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
konsolebox has quit [Max SendQ exceeded]
jbrhbr has quit [Quit: Leaving.]
usershel_ has quit [Read error: Connection reset by peer]
usershell has joined #ruby
lurch_ has quit [Quit: lurch_]
chipotle has quit [Quit: cheerio]
pdoherty has joined #ruby
lurch_ has joined #ruby
Jardayn has joined #ruby
Xeago has joined #ruby
janoti has joined #ruby
<janoti>
iam learning ruby very very new to ruby i was reading some file the content is EM::WebSocket.run(:host => "0.0.0.0", :port => 8080, :debug => false) do |ws|
<janoti>
ws.onopen { |handshake|
<janoti>
puts "WebSocket opened #{{
<janoti>
:path => handshake.path,
<janoti>
:query => handshake.query,
<janoti>
:origin => handshake.origin,
<janoti>
}}"
<janoti>
ws.send "Hello Client!"
<janoti>
}
<janoti>
what is do|ws| doing and from where ws came from
<janoti>
i am not able to understand
<rsc___>
have you look at eventmachine's docs?
<janoti>
yes
griffindy has joined #ruby
<rsc___>
xyz do |abc| ... end is a way to pass blocks into a function
<janoti>
and then what is ws is it a local variable
<janoti>
i am from c++ background
dlitvak_ has joined #ruby
SnowyAFK is now known as Snowy
sandstrom has quit [Quit: My computer has gone to sleep.]
charliesome has joined #ruby
sandstrom has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
sftrabbit has joined #ruby
oivoodoo has joined #ruby
<Ox0dea>
janoti: It's local to the block.
failshell has quit [Remote host closed the connection]
<Ox0dea>
#run yields a new instance of EM::WebSocket to the block and `|ws|` captures it to be used however.
aupadhye has quit [Ping timeout: 264 seconds]
<Ox0dea>
They've used a block for this interface to give you setup and teardown "for free".
<rsc___>
janoti: think of `do |ws| ... end` as a function
<rsc___>
`ws` is the thing passed to this function as an argument
<rsc___>
think of it as `void on_open_handler(handshake) { ... }` and then you pass that to `ws.onopen(&on_open_handler)`... in c++ terms
<janoti>
now i got it
<janoti>
thanks
newdan has joined #ruby
<Ox0dea>
rsc___: It is a little more than that, though; #run can operate "around" the block, so it can do finalization as well.
aupadhye has joined #ruby
<rsc___>
Ox0dea: so can functors in C++. but the thing ruby has (that that c++ doesnt) is closures
<Ox0dea>
Surely C++ has closures by now?
workmad3 has quit [Ping timeout: 240 seconds]
PedramT has quit [Remote host closed the connection]
darkf_ is now known as darkf
workmad3 has joined #ruby
binaryplease has joined #ruby
AlexRussia has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
tvw has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
pcoke_ has quit [Quit: Bye]
pcoke_ has joined #ruby
<claw>
hello
<claw>
i need to .force_encoding("iso-8859-1") on every value in a string in a transforming way
blackmesa has joined #ruby
rodfersou|afk is now known as rodfersou
arup_r has quit [Remote host closed the connection]
<apeiros>
claw: if you want to translate from one encoding to another, String#encode is what you need.
the_drow has joined #ruby
<claw>
apeiros: actually the encoding is not the problem. i am wondering if there is ruby methods to mutate all the hash values
<apeiros>
.force_encoding does not translate. it only informs ruby which encoding the string currently uses (i.e. you're telling ruby that the value in .encoding was wrong and it should use the new one instead)
mary5030 has quit [Ping timeout: 260 seconds]
<apeiros>
claw: Hash#each or Hash#map + to_h
zarubin has quit [Ping timeout: 240 seconds]
failshell has joined #ruby
oivoodoo has quit [Remote host closed the connection]
k13nox has joined #ruby
<claw>
aaah my fault
zarubin has joined #ruby
oivoodoo has joined #ruby
<claw>
i did it right but missed .encode("UTF-8") after the force_encoding
<apeiros>
IMO having to use .force_encoding is an indicator that you have bad code earlier
<claw>
apeiros: i am connected to mysql 3.23
<apeiros>
wherever you are generating those strings, you should generate them with the proper charset already set.
vdamewood has joined #ruby
<apeiros>
your database adapter can certainly handle charsets
<claw>
mysql 3.23 has no support for utf
<apeiros>
that's not necessary. it's sufficient if your db adapter has.
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<apeiros>
we too have a db with iso-8859-1 charset as storage, and we have our client library translate it
<claw>
my adapter is the mysql gem
workmad3 has quit [Ping timeout: 256 seconds]
<apeiros>
then I'd check the docs. I'm not using mysql, so I might be wrong. but it'd surprise me if that's not part of it.
<ruby[bot]>
Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<yellowcupeats>
No question really...just had it in an interview yesterday and totally failed.
<Canar>
yellowcupeats: It was the first significant Java code I wrote... hm, would have been close to 20 years ago on old Sun hardware.
<avril14th>
yellowcupeats: yups
<Ox0dea>
yellowcupeats: What gave you trouble? :/
<aegis3121>
one of those things I'm familiar with but can never recall until someone starts talkign about it.
<Papierkorb>
yellowcupeats: and 'familiar' enough, but can't think of the rule sets right now
<yellowcupeats>
I tried breaking it down but just couldn't do it. I've been developing for 4 years now and now feel like I shouldn't even be a programmer.
workmad3 has joined #ruby
dave23 has joined #ruby
<Ox0dea>
1 or 2 neighbors births a cell (reproduction), 3 or more kills it (overpopulation).
kerunaru has quit [Ping timeout: 256 seconds]
<Canar>
1 maintains, 2 births
<Canar>
err, 2/3 actually
<avril14th>
yellowcupeats: don't worry it's not cause you failed that that you suck at programming
<Canar>
think of the * * * oscillator
<ddv>
yellowcupeats: you failed a silly interview question, it happens you move on
<yellowcupeats>
I don't know what is missing in my education that didn't allow me to solve it.
<Papierkorb>
yellowcupeats: what was the question?
<carella>
Ox0dea: sorry, it don't know what golfing is in this context
<Ox0dea>
carella: Short code.
<Ox0dea>
Excessively short.
<carella>
Ox0dea: thanks
<Ox0dea>
No worries.
<Ox0dea>
Coding fast is about thinking fast far more than it is about typing.
jcdesimp has quit [Ping timeout: 250 seconds]
freerobby has joined #ruby
<carella>
Ox0dea: yeah, but after I won and saw that massive chunk of code my opponent wrote in clojure I tried to shorten my solution even more - that's how I ended up with my line
sumark has quit [Remote host closed the connection]
<carella>
At this point I decided to do some golfing, guilty as charged :)
baweaver has joined #ruby
aupadhye_ has joined #ruby
aupadhye has quit [Quit: Leaving]
sumark has joined #ruby
Bloomer has joined #ruby
lurch_ has quit [Quit: lurch_]
dionysus69 has quit [Ping timeout: 240 seconds]
despai has joined #ruby
Sucks has joined #ruby
s2013 has joined #ruby
<Papierkorb>
carella: this is the same bytecount: [x,y].map{|a|a.to_s(2).count '0'}.inject :==
decoponio has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
<apeiros>
I'm not sure that qualifies as "simplify" :D
<Papierkorb>
yellowcupeats: or rather this: rows = Array.new(HEIGHT){ Array.new WIDTH }
tenderlove has joined #ruby
marr has joined #ruby
<zerowaitstate>
what is the current preferred way of connecting to MySQL from Ruby? The "semi-official" Ruby library written by tmtm seems to be deprecated
<yorickpeterse>
zerowaitstate: using the mysql2 gem
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
ramlem has quit [Remote host closed the connection]
rkazak has joined #ruby
<shevy>
ponga ah yes I remember... the IRC bot
<shevy>
writing an IRC bot was my first project in ruby :)
<shevy>
since then, I broke the old code.... and then tired of it...
tomchapin has joined #ruby
<_p0p0pr37>
lol :)
<manveru>
shevy: i remember when you built it :)
rkazak has quit [Ping timeout: 265 seconds]
huQeQwdpu47q has joined #ruby
TomPeed has joined #ruby
dlitvak has joined #ruby
<shevy>
hehe
benoror has joined #ruby
tvw has quit [Read error: Connection reset by peer]
d0lph1n98 has joined #ruby
synthroid has joined #ruby
heftig has quit [Quit: No Ping reply in 180 seconds.]
Limix has joined #ruby
haasn has quit [Ping timeout: 240 seconds]
lindistock has quit [Remote host closed the connection]
Limix has quit [Client Quit]
workmad3 has quit [Ping timeout: 240 seconds]
kalleth has quit [Quit: No Ping reply in 180 seconds.]
RushPL has quit [Ping timeout: 265 seconds]
jbrhbr has joined #ruby
Hobbyboy has quit [Ping timeout: 240 seconds]
darix has quit [Read error: Connection reset by peer]
darix has joined #ruby
heftig has joined #ruby
parus_ has joined #ruby
contradictioned has quit [Quit: No Ping reply in 180 seconds.]
parus has quit [Remote host closed the connection]
PaulePanter has quit [Remote host closed the connection]
kalleth has joined #ruby
gnarf_ has joined #ruby
gnarf has quit [Excess Flood]
RushPL has joined #ruby
AlexJakeGreen has quit [Remote host closed the connection]
contradictioned has joined #ruby
theslow1 has joined #ruby
chouhoulis has joined #ruby
huyderman has quit [Remote host closed the connection]
evidex has quit [Ping timeout: 240 seconds]
synthroid has quit [Ping timeout: 264 seconds]
arup_r has quit []
<ponga>
shevy: when was it?
Hobbyboy has joined #ruby
janoti has joined #ruby
aufi has quit [Quit: Konversation terminated!]
ELGUERRERO has joined #ruby
JDiPierro has joined #ruby
kirillzh has joined #ruby
ELGUERRERO has left #ruby [#ruby]
PaulePanter has joined #ruby
haasn has joined #ruby
kfpratt has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
<shevy>
ponga hmmm... 10 years ago or something like that I think...
<ponga>
and manveru remembers that??
<shevy>
yeah
<ponga>
how long have you guys been on IRC?
<ponga>
it scares me
<shevy>
yeah it scares me as well that he remembers
<bougyman>
23 years.
<manveru>
lol
<ponga>
wow
hobodave has joined #ruby
<Sou|cutter>
I've been on IRC over 20 years too. Scary
<ponga>
shevy: but you didn't have cinch gem or equivilant back then did you
<ponga>
did you code it from scratch
<manveru>
18 years i think...
<shevy>
ponga correct! yeah
<bougyman>
was it rbot?
ramfjord has joined #ruby
<bougyman>
or just Net::IRC?
<shevy>
not even rbot hehe
<ponga>
shevy: so you just did HTTP connection?
<shevy>
someone told me that line here: select( [$stdin], nil, nil, 1.1 )
<manveru>
that was before that existed
<ponga>
lol
<Ox0dea>
Net::IRC?
<shevy>
and I was using that for the bot :)
<ponga>
and sending raw commands?
<shevy>
ponga the IRC protocol is thankfully quite simple
<shevy>
it took me a while before I understood that a PING wants a PONG ...
<ponga>
shevy: that's how I named my nick actually
<ponga>
ping and pong
vdamewood has quit [Quit: Life beckons.]
<mg^>
I first got on IRC in 1996. So that's 20 years this year
<centrx>
what network?
<mg^>
Undernet
<mg^>
I'm still officially a channel admin for #chatzone which was the default for a lot of IRC clients back then. Though I don't really go there often these days.
Musashi007 has joined #ruby
dionysus69 has joined #ruby
dlitvak_ has joined #ruby
s2013 has joined #ruby
s2013 has quit [Client Quit]
<centrx>
I was on DALnet until they were attacked/imploded in 2002
<mg^>
I wrote an awful lot of mirc code, and later perl code, to deal with that mess when it had thousands of users and there was very little defense by ircd itself from the nefarious activities that go on
<ponga>
shevy: I still have one or two automation method to complete tho, its manually driven thru user input at the moment
benlovell has joined #ruby
<ponga>
mg^: and you landed on #ruby after perl?
Ox0dea has quit [Quit: WeeChat 1.5-dev]
f4cl3y has quit [Ping timeout: 256 seconds]
<shevy>
so many ruby users went through perl
<mg^>
yeah I decided a few years ago that I didn't want to wait for perl 6 to be polished when it looked like Ruby had basically everything perl 6 was promising, but already mature
<centrx>
perl was all there was until python & ruby
<mg^>
and ruby code read really well to me... a lot less write-only code out there
Bloomer has quit [Remote host closed the connection]
Cohedrin has quit [Client Quit]
Cohedrin has joined #ruby
B1n4r10 has quit [Ping timeout: 245 seconds]
[Butch] has joined #ruby
sanguisdex has joined #ruby
uri_ has joined #ruby
rakm has joined #ruby
the_drow has quit [Ping timeout: 252 seconds]
TomyWork has quit [Ping timeout: 248 seconds]
<lucasb>
Ox0dea: hey, I liked your GoL. why did you said "how *not* to implement it" ?
jottr has quit [Ping timeout: 240 seconds]
<lucasb>
would be easy to require 'curses' there and clear the screen for each step, wouldn't?
<Ox0dea>
lucasb: Self-deprecation is cruise control for modesty.
<Ox0dea>
It's a great implementation. ^_^
yardenbar has quit [Ping timeout: 256 seconds]
<Ox0dea>
lucasb: Sure, no need for curses even; just shell out to `clear` or the like.
uri_ has quit [Client Quit]
alexherbo2 has quit [Quit: WeeChat 1.4]
Musashi007 has quit [Quit: Musashi007]
Cohedrin has quit [Ping timeout: 276 seconds]
yoongkang has quit [Ping timeout: 260 seconds]
PedramT has joined #ruby
B1n4r10 has joined #ruby
synthroid has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
<mwlang>
what’s a clean way to turn [“A”, “B”, “C”] into this hash: { “V0” => “A”, “V1”, => “B”, “V2” => “C”} basically, the hash key is an indexed variable name assigned the array value at that position.
<Ox0dea>
mwlang: But... why?
jottr has joined #ruby
symm- has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
<mwlang>
because the hash is what needs to be passed to the rendering template file.
uri_ has joined #ruby
<lucasb>
[:a,:b,:c].zip(0..2).map(&:reverse).to_h # how *not* to do it :)
atomical has joined #ruby
<Ox0dea>
:P
gnarf_ is now known as gnarf
<Ox0dea>
>> %w[A B C].each_with_index.with_object({}) { |(e, i), h| h["V#{i}"] = e } # mwlang
camilasann has quit [Remote host closed the connection]
<ponga>
hey I have these two commands, !add and !del, but i want to use 'remove' instead of 'del' but had to keep it 3 characters.. do we have any conventional(programmar-wise) way of doing it
<mwlang>
dang. nice…
<ponga>
!rem sounds dumb
<Ox0dea>
ponga: !rm
* mwlang
goes to look up #with_object
<ponga>
ah
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ponga>
Ox0dea: k thanks
<Ox0dea>
No worries.
astrobun_ has quit [Remote host closed the connection]
<ponga>
its these things that are hard to find thru google search
<ponga>
had to rely this channel
Limix has joined #ruby
<Mon_Ouie>
'rem' even makes me think of 'remember' which is misleading
uri_ has quit [Client Quit]
lurch_ has quit [Quit: lurch_]
<lucasb>
or remark, it's a comment
amclain has joined #ruby
<Ox0dea>
Somebody's done BASIC programming.
<zambini>
I never learned that that's what it was in M$ batching
<zambini>
Learn something new every day
<Ox0dea>
I thought for a long time that it meant "remove" (from compilation or whatever).
camilasan has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
minimalism has joined #ruby
blackmesa has joined #ruby
howdoi has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
jcdesimp has joined #ruby
<zambini>
Me too. My thought was "Wow of course Microsoft would do something dumb like that"
<mg^>
dnl is the one that takes the cake for unintuitive comment markers
ramfjord has quit [Ping timeout: 264 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
jottr has quit [Quit: WeeChat 1.4]
baweaver has quit [Remote host closed the connection]
dexter-tzu has quit [Ping timeout: 264 seconds]
aeontech has joined #ruby
baweaver has joined #ruby
govg has joined #ruby
JDiPierro has quit [Remote host closed the connection]
TomSequitur has quit [Quit: Leaving]
lemur has joined #ruby
blackmesa has joined #ruby
chussenot has joined #ruby
pandaant has quit [Remote host closed the connection]
visudo has joined #ruby
SCHAAP137 has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ponga has quit [Quit: Leaving...]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
baweaver has quit [Ping timeout: 276 seconds]
uri_ has joined #ruby
sigurding has quit [Quit: sigurding]
cicloid has joined #ruby
mfb2 has quit [Remote host closed the connection]
lemur has quit [Ping timeout: 260 seconds]
<zambini>
"Do Not Laser"?
mfb2 has joined #ruby
sdothum has joined #ruby
<Canar>
do not learn
<mg^>
discard next line
<mg^>
I see few of you have had the "privilege" of working with m4
puria has quit [Ping timeout: 240 seconds]
<Canar>
goto autohell
<Canar>
break
x0f has joined #ruby
synthroid has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oivoodo__ has quit [Remote host closed the connection]
ricer2_g4H4 has joined #ruby
oivoodoo has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
usershell has quit [Remote host closed the connection]
TomyLobo has joined #ruby
chouhoulis has quit [Remote host closed the connection]
wilbert has joined #ruby
Snowy has quit []
chouhoulis has joined #ruby
dlitvak has joined #ruby
janoti has joined #ruby
uri_ has quit [Quit: --]
TomSequitur has joined #ruby
vondruch has quit [Ping timeout: 265 seconds]
emilford has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
dlitvak_ has quit [Ping timeout: 260 seconds]
Jackneill has joined #ruby
nofxx has quit [Ping timeout: 272 seconds]
freerobby has quit [Quit: Leaving.]
nofxx has joined #ruby
<Renich>
hello, personas!
<Renich>
I need help with this string: items:15:evicted_unfetched 0
uri_ has joined #ruby
sftrabbit has joined #ruby
<Renich>
I want it like this items[15][evicted_undfetched] = 0
<Renich>
in fact, we could use symbols
<Renich>
and there is a big list of those
<Renich>
and I am using ruby 2.0
_ht has joined #ruby
puria has joined #ruby
freerobby has joined #ruby
underplank has joined #ruby
maletor has joined #ruby
mdw has joined #ruby
usershell has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
renderfu_ has quit []
duckpuppy has quit [Ping timeout: 250 seconds]
Dimik has joined #ruby
musicnode has joined #ruby
Macaveli has joined #ruby
TomSequitur has quit [Ping timeout: 250 seconds]
Macaveli has quit [Client Quit]
chthon has quit [Ping timeout: 245 seconds]
synthroid has joined #ruby
jbrhbr has joined #ruby
renderfu_ has joined #ruby
<Ox0dea>
Hi, Renich. Could you clarify?
symm- has quit [Quit: Leaving...]
uri_ has quit [Quit: --]
<Ox0dea>
You want `items` to be an array of hashes?
usershell has quit [Ping timeout: 265 seconds]
Xeago has quit [Remote host closed the connection]
Macaveli has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
Macaveli has joined #ruby
Anderson69s has joined #ruby
<Renich>
Ox0dea: sure. I have a text file with lots of lines like this: items:15:evicted_unfetched 0. I'd like to parse that text file with ruby and put the info in a multi-level hash.
<Renich>
Ox0dea: so it looks something like: items[:15][:evicted_unfetched] = 0
fbandov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Renich: Is the first part always going to be numeric, then?
synthroid has quit [Ping timeout: 256 seconds]
IronD has joined #ruby
<Renich>
Ox0dea: a hash of hashes. Even, though, 15 is hte index, I have several values that point to 15
<Renich>
Ox0dea: can we make it a symbol?
Xeago has quit [Remote host closed the connection]
<Ox0dea>
Renich: You'd have to quote it, but sure.
d0lph1n98 has quit [Quit: leaving]
<Ox0dea>
What kind of values can be in that first column? Just small numbers?
<Renich>
Ox0dea: yes
aef has joined #ruby
tomphp has joined #ruby
<Ox0dea>
Well, I don't see why it shouldn't be an array of hashes, then, but a hash of hashes would work too.
<Renich>
ok
<Ox0dea>
No sense in using numeric Symbols, though. :P
<Renich>
ok
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Renich>
be it an Array of Hashes then
mikecmpbll has joined #ruby
nofxx has quit [Ping timeout: 245 seconds]
<Ox0dea>
Do you know about regular expressions?
Macaveli has quit [Ping timeout: 264 seconds]
<Renich>
Ox0dea: yes, I do. Not an expert, though
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<lucasb>
all lines start with "items:"?
scottschecter has joined #ruby
scottschecter has quit [Max SendQ exceeded]
<Ox0dea>
Renich: As long as your input file is reasonably clean, `input.scan(/(\d+):(\S+)\s+(\d+)/)` would get you a nested Array of all the results.
<Renich>
lucasb: yes
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Renich>
Ox0dea: ok, so scan it is
<Ox0dea>
Renich: You could also just read the file line-by-line and use #match instead of #scan.
oivoodoo_ has joined #ruby
<Ox0dea>
The latter is probably the superior choice if you've got a legitimately big list.
<Renich>
Ox0dea: will try both
dfockler has joined #ruby
<Renich>
Ox0dea: it could et big... 1000s of lines
<Renich>
so match it is
<Ox0dea>
Heh.
workmad3 has joined #ruby
elifoster has joined #ruby
joonty has quit [Ping timeout: 264 seconds]
TomSequitur has joined #ruby
sads has joined #ruby
<Ox0dea>
As for storing it, a neat trick is to use the `||=` operator to assign to something only if there's not already a value there.
zeroDivisible has quit [Ping timeout: 250 seconds]
<Renich>
Ox0dea: yeah, I've used ||=. Thanks
<Ox0dea>
Sure thing. Seems like you've got all the tools you'll need. :)
centrx has quit [Remote host closed the connection]
oivoodoo has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
sads has quit [Client Quit]
antgel has quit [Ping timeout: 250 seconds]
pietr0 has joined #ruby
x77686d has joined #ruby
Xeago has joined #ruby
gambl0re has joined #ruby
gambl0re has quit [Changing host]
gambl0re has joined #ruby
benlovell has quit [Ping timeout: 272 seconds]
gruz0 has joined #ruby
sgambino has joined #ruby
last_staff has joined #ruby
syk_ has joined #ruby
mrdomino has joined #ruby
firstdayonthejob has joined #ruby
Brklyn has joined #ruby
pdoherty has quit [Ping timeout: 265 seconds]
ElFerna has joined #ruby
<shevy>
hmm is there a simple way to just read the first line of a file, until the first "\n"? I have some files that may be big, using File.read() or File.readlines() seems a bit of a waste
<shevy>
I only have to fetch a header, which is on the first line always
synthroid has joined #ruby
<Ox0dea>
shevy: File#gets
<shevy>
aha thanks
symm- has quit [Quit: Leaving...]
jackjackdripper has joined #ruby
<c0m0>
File.read("/etc/passwd").split("\n")[0]
<Ox0dea>
Don't forget to close it.
<Ox0dea>
c0m0: shevy doesn't want to read the entire file into memory.
<Ox0dea>
File.open('foo') { |f| header = f.gets }
h99h9h88 has joined #ruby
<Ox0dea>
It's ugly, but it'll auto-close the file and only read the first line.
<Ox0dea>
You could maybe do something a little nicer with #tap.
duckpuppy has joined #ruby
<shevy>
huh... why does this work? does it not have to be terminated manually at the target character?
freerobby has quit [Quit: Leaving.]
<Ox0dea>
Hm?
<c0m0>
0x0dea: what is gets method?
hobodave has quit [Quit: Computer has gone to sleep.]
<lucasb>
it's the separator for 'gets' to search for
<Ox0dea>
Xeago: I'm sure shevy needs a reference to the header he just read, though.
troulouliou_div2 has quit [Remote host closed the connection]
<Ox0dea>
But yeah, that'd do for just printing it.
<Ox0dea>
lucasb: `loop.lazy` is an interesting construct.
<c0m0>
how can I read the last line?
<Ox0dea>
It's probably never The Right Thing, but it's fun to play with.
nettoweb has joined #ruby
<shevy>
yah, it's just fasta files... they contain an identifier, which is the first line, and the rest is just nucleotide or amino acid junk and can be huge
m8 has joined #ruby
<shevy>
so much perl code exists... also python code... barely any ruby soulmate out there, there :(
<Ox0dea>
shevy: Sure you don't wanna just pipe them into `xargs head -1`?
al2o3-cr has quit [Ping timeout: 240 seconds]
uri_ has quit [Quit: --]
dexter-tzu has quit [Ping timeout: 240 seconds]
dhollinger has joined #ruby
<shevy>
dunno, that looks scary non-ruby!
ElFerna has quit [Ping timeout: 240 seconds]
<shevy>
let me be in my ruby prison
yonatankoren has joined #ruby
<Ox0dea>
Well, all right.
s2013 has joined #ruby
s2013 has quit [Client Quit]
<Ox0dea>
c0m0: The optimal approach is usually to seek to the very end, read and store characters until you hit a newline, then reverse the buffer.
oivoodoo_ has quit [Remote host closed the connection]
<Ox0dea>
*read backwards, to clarify.
mdw has quit [Ping timeout: 260 seconds]
nettoweb has quit [Client Quit]
baweaver has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
<c0m0>
so I need to use the seek method
<c0m0>
?
<Ox0dea>
c0m0: To read only the last line of a file without wastefully reading all the others, yes.
pawnbox has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
wilbert has quit [Ping timeout: 265 seconds]
<c0m0>
that I would like to know is, there is any method to use like gets, but for the last line
<c0m0>
?
h99h9h88 has joined #ruby
sigurding has joined #ruby
musicnode has quit [Quit: musicnode]
<shevy>
hmm
<shevy>
peculiar question :)
gruz0 has quit [Quit: Leaving]
<shevy>
perhaps we could have add nobu a getslast
<shevy>
erm *nobu add a getslast
baweaver has quit [Ping timeout: 240 seconds]
beneills has joined #ruby
<Ox0dea>
c0m0: Is your file quite large?
<c0m0>
Ox0dea: not, I just asked for curiosity
musicnode has joined #ruby
<Ox0dea>
c0m0: Be curious about #seek instead. ^_^
idefine_ has quit [Remote host closed the connection]
<mg^>
yeah seek and destroy!
<mg^>
or something like that
<c0m0>
0x0dea: ok, tomorrow I will try to use seek :)
c0m0 has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
h99h9h88 has quit [Ping timeout: 265 seconds]
JDiPierro has quit [Remote host closed the connection]
Trynemjoel has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has quit [Quit: This computer has gone to sleep]
hannelita has quit [Ping timeout: 276 seconds]
idefine has joined #ruby
wilbert has joined #ruby
hannelita has joined #ruby
hannelita has quit [Read error: Connection reset by peer]
Ishido has quit [Ping timeout: 256 seconds]
cactuzzz has joined #ruby
hannelita has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
idefine has quit [Remote host closed the connection]
JDiPierro has joined #ruby
hanneli has joined #ruby
hannelita has quit [Read error: Connection reset by peer]
synthroid has quit [Ping timeout: 264 seconds]
treehug88 has joined #ruby
freerobby has joined #ruby
musicnode has quit [Quit: musicnode]
ledestin has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
pdoherty has joined #ruby
<shevy>
hehe
ht__ has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gnudon has joined #ruby
arup_r has quit []
tomphp has joined #ruby
kirillzh has joined #ruby
beneills has quit [Ping timeout: 264 seconds]
ElFerna has joined #ruby
kirillzh has quit [Max SendQ exceeded]
<dtordable>
howdy
nertzy2 has quit [Quit: This computer has gone to sleep]
dlitvak has quit [Ping timeout: 240 seconds]
skcin7 has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ishido has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
speaking1ode has joined #ruby
jackjackdripper has joined #ruby
idefine has joined #ruby
sgambino has joined #ruby
ElFerna has quit [Ping timeout: 250 seconds]
snockerton has joined #ruby
shadoi has joined #ruby
musicnode has joined #ruby
brahman has quit [Quit: Konversation terminated!]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ElFerna has joined #ruby
<snockerton>
is it possible to use popen3 and get stdout "streaming" back to the parent thread before the child thread exits?
hobodave has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
emilford has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ht__ has quit [Quit: Konversation terminated!]
dlitvak has joined #ruby
sepp2k has quit [Quit: Leaving.]
ht__ has joined #ruby
<adaedra>
It's the default behavior, just read on stdout and stderr
<adaedra>
(the ones passed to you)
speaking1ode has quit [Ping timeout: 256 seconds]
blaxter has quit [Quit: foo]
kennyfrc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
Ebok has joined #ruby
<Mon_Ouie>
Also Kernel#spawn allows to set up redirection directly so you don't need to do anything
speaking1ode has joined #ruby
joonty has joined #ruby
wilbert_ has joined #ruby
wilbert has quit [Ping timeout: 250 seconds]
x77686d has quit [Quit: x77686d]
duderonomy has quit [Ping timeout: 240 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<snockerton>
i've tried all kinds of trickery to read stdout, but it only outputs in the parent thread once the child thread exits!
<newdan>
In Python when I have an uncaught exception in the shell, I can do "import pdb; pdb.pm()" and it will let me debug from the exception point, post-mortem. Is there anything like that in Ruby?
hahuang65 has joined #ruby
<snockerton>
i use pry-byebug
jcdesimp has joined #ruby
TheDracle has joined #ruby
<snockerton>
then put binding.pry in my code / rescue block
xapak has left #ruby [#ruby]
<TheDracle>
So, I've installed gems locally on a build system using bundle install --deployment, and all of the gems have been placed underneath vendor/bundle/ruby/1.9.1/gems
<TheDracle>
However I can't seem to require the gems after doing this.
dlitvak has joined #ruby
<newdan>
snockerton: So if the exception's already happened, you're out of luck?
sgambino has quit [Client Quit]
<TheDracle>
I've tried setting GEM_PATH, and other wonky things... But it just seems like bundler ought to have set it up correctly.
uri_ has quit [Quit: --]
sgambino has joined #ruby
<TheDracle>
Any ideas on how I can get it so these gems are accessible to ruby?
<drbrain>
in case you want to output something then STDOUT still holds it
<Waheedi>
lucasb: the problem is that there is few thing you need to remove from that string to become a clear array, like replacing ,, with ,nil, and removing the \, but sometime "one" string could be anything including ,, and
gnudon has quit [Read error: Connection reset by peer]
<Waheedi>
\
<Waheedi>
things*
sigurding has quit [Quit: sigurding]
nofxx has quit [Ping timeout: 265 seconds]
<sts>
lucasb: 2.1.5p273
<drbrain>
sure, you could get STDOUT back from IO.for_fd
<Ox0dea>
sts: Weird filesystem?
<sts>
ext4
<drbrain>
but I think assigning to $stdout is always best
<Waheedi>
maybe i need to use regex but even that might go wrong
<Ox0dea>
Yeah, makes sense.
nofxx has joined #ruby
_djbkd has joined #ruby
<shevy>
Ox0dea oh I think I now remember that... that was probably for another project ... right now I have something else, similar but different. I also just realized that some other output still appears, from configure... probably system "./configure"
<Ox0dea>
Waheedi: Seems like you should just be using JavaScript.
<sts>
why does it actually call symbolic_modes_to_i? because its a absolute mode which I'm passing.
idefine has joined #ruby
<Ox0dea>
shevy: It's probably going to $stderr, so just redirect that to IO:NULL as well.
<Waheedi>
Ox0dea: oh yeah ;)
<shevy>
oh
<Waheedi>
how can i execute javacasript code inside a ruby method?
valetudo has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
uri_ has quit [Ping timeout: 250 seconds]
FernandoBasso has joined #ruby
uri_ has joined #ruby
usershell has quit [Ping timeout: 264 seconds]
nertzy2 has joined #ruby
elricsfate_ has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
Xeago has quit [Remote host closed the connection]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
ldnunes has quit [Quit: Leaving]
mfb2 has quit [Remote host closed the connection]
karapetyan has joined #ruby
Guest55429 is now known as saneax_AFK
mdw has joined #ruby
tildes has joined #ruby
elricsfate__ has quit [Ping timeout: 250 seconds]
dexter-tzu has joined #ruby
benlovell has quit [Quit: Lost terminal]
BTRE has joined #ruby
yoongkang has joined #ruby
casadei has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
TheDracle has joined #ruby
dexter-tzu has quit [Ping timeout: 240 seconds]
hannelita has quit [Remote host closed the connection]
synthroid has joined #ruby
DarkElement has joined #ruby
oivoodoo has joined #ruby
<DarkElement>
I am trying to get proxy connections working with HTTParty, as Radar recommended earlier. However, I must be doing something wrong since my code never manages to get the html. Any ideas? https://gist.github.com/DarkElement75/7d9b98429ebc130e8063
yqt has joined #ruby
synthroid has quit [Ping timeout: 240 seconds]
choke has quit [Quit: Gone]
mdw has quit [Quit: Sleeping Zzzzz]
colegatron_origi has quit [Ping timeout: 245 seconds]
<Ox0dea>
DarkElement: Google is ignoring you.
oivoodoo has quit [Ping timeout: 265 seconds]
<DarkElement>
Every link I looked at just gave the same thing that didn't work
h99h9h88 has joined #ruby
<DarkElement>
I tried all the things
<DarkElement>
What is URI(ENV())?
dlitvak has quit [Remote host closed the connection]
mfb2 has joined #ruby
mdw has joined #ruby
PedramT has quit [Remote host closed the connection]
FernandoBasso has quit [Ping timeout: 264 seconds]
<Ox0dea>
Nothing appropriate.
<DarkElement>
Are you going to help?
<Ox0dea>
No.
<DarkElement>
I don't know why I un /ignore'd you
kirillzh has joined #ruby
FernandoBasso has joined #ruby
<DarkElement>
Won't make that mistake again.
gregf has joined #ruby
hannelita has joined #ruby
kirillzh has quit [Max SendQ exceeded]
dcunit3d has joined #ruby
nisstyre has quit [Quit: WeeChat 1.3]
tomchapin has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ebok has joined #ruby
skcin7 has quit [Ping timeout: 250 seconds]
ror15 has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<ror15>
I'm not sure if this is a factory_girl thing or not. I'm trying to use attributes_for and getting a nomethoderror. What am I doing wrong?
<greenhat>
ror15: Also, hardcoding counts (where you expect Contact.count) to equal 1 will eventually bite you. You just just check that Contact.count has gone up by one.
hannelita has quit [Read error: Connection reset by peer]
kirillzh has joined #ruby
colegatron_origi has joined #ruby
<greenhat>
With minitest you would use assert_difference. I don't know the rspec equivalent.
ht__ has quit [Quit: Konversation terminated!]
hobodave has quit [Quit: Computer has gone to sleep.]
ht__ has joined #ruby
Asher has quit [Quit: Leaving.]
rodfersou has quit [Quit: leaving]
pdoherty has quit [Ping timeout: 250 seconds]
<ror15>
greenhat: That was it, thank you
pawnbox has joined #ruby
<ror15>
greenhat: Also just playing with rspec so I'll change that test, cheers
darkf has quit [Quit: Leaving]
Asher has joined #ruby
Asher is now known as Guest27461
synthroid has quit [Ping timeout: 265 seconds]
elricsfate__ has joined #ruby
skcin7 has joined #ruby
Guest27461 has quit [Client Quit]
Pande has joined #ruby
Cohedrin has joined #ruby
sgambino has joined #ruby
hobodave has joined #ruby
baweaver has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
PedramT has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
elricsfate_ has quit [Ping timeout: 256 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar>
DarkElement: What is res.status_code?
<Radar>
DarkElement: You're not checking if it's a successful request.
<DarkElement>
Radar, one sec
cicloid has joined #ruby
<DarkElement>
Radar, it never reaches the point where it prints res
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar>
is it even making the request?
<DarkElement>
It gets right to it
<DarkElement>
then never finishes, so it seems
<DarkElement>
Also, may be a stupid question but do you need to prepend http:// to the proxy address
<Radar>
I don't have any idea.
Ebok has joined #ruby
tvw has joined #ruby
<Radar>
Don't think I can debug this one from so far away
agent_white has joined #ruby
elricsfate__ has quit [Ping timeout: 250 seconds]
baweaver has quit [Ping timeout: 276 seconds]
<agent_white>
Afternoon folks
<DarkElement>
Radar, want the code?
<Radar>
DarkElement: I saw it.
<Radar>
I still don't any any idea.
<DarkElement>
gr8 m8
agent_white has quit [Read error: Connection reset by peer]
visudo_ has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
nertzy2 has quit [Quit: This computer has gone to sleep]
snguyen has joined #ruby
_djbkd has quit [Quit: My people need me...]
tvw has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
<Radar>
DarkElement: My guess is the request isn't even reaching the proxy.
choke has joined #ruby
<DarkElement>
So what should I do
tildes has quit [Ping timeout: 240 seconds]
visudo has quit [Ping timeout: 245 seconds]
visudo_ is now known as visudo
snguyen has quit [Max SendQ exceeded]
* Radar
wants to snark so badly.
janoti has quit [Ping timeout: 240 seconds]
stannard has quit [Remote host closed the connection]
synthroid has joined #ruby
<Radar>
DarkElement: What do you think you should do? Perhaps it'd be a good start to walk through the request process. Find out if the request actually hits the proxy, yeah?
<DarkElement>
ayy lmao
<DarkElement>
whoops
<Radar>
I am disappointed that it doesn't appear that you're doing _any_ thinking of your own on this one.
<DarkElement>
I have been trying that with curl
snguyen has joined #ruby
<DarkElement>
And it is also not connecting
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
<Radar>
Soooooooooooooo the next logical step is....?
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mdw has quit [Quit: Sleeping Zzzzz]
<Radar>
(p.s. I just very explicitly told you what it should be. This is a test to see if you're paying attention)
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<DarkElement>
I tried other proxies, and other websites, was that what you meant?
<DarkElement>
I can ping the proxy?
Ebok has joined #ruby
<Radar>
That means that it accepts ping requests. Is port 80 even open on that machine?
tvw has joined #ruby
sandstrom has joined #ruby
<snguyen>
i'm trying to load a git repo that contains my *.rb files from another package, but i'm struggling to load them in. i've created a gem for it and added the gem it with my gemfile. when i ran bundle install, i saw the repo get pulled into my rbenv environment. but these attempts didn't work: require 'myrailsapp/app/models/user.rb', require 'myrailsapp/app/models/user'. what am i doing wrong?
synthroid has quit [Read error: No route to host]
Ebok has quit [Client Quit]
TheDracle has quit [Quit: This computer has gone to sleep]
Ebok has joined #ruby
synthroid has joined #ruby
<DarkElement>
Radar, I just tried to ping it, it responded from a different ip saying it was Unreachable. I guess it is not open since I had to ping it without the :80
yoongkang has quit [Remote host closed the connection]
TheDracle has joined #ruby
sgambino has joined #ruby
<Radar>
DarkElement: So you're using a "proxy" which you don't have any control over?
sgambino has quit [Client Quit]
sgambino has joined #ruby
mary5030 has quit [Remote host closed the connection]
<Radar>
DarkElement: I cannot help you with this. It's impossible.
<Radar>
You're not understanding at all how proxies work and I don't have the time to explain it to you.
symbol_ has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
mary5030 has joined #ruby
antgel has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 260 seconds]
synthroid has quit [Ping timeout: 250 seconds]
lkba has joined #ruby
gbgdev has quit [Remote host closed the connection]
nertzy2 has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lkba has quit [Remote host closed the connection]
<DarkElement>
I chose a proxy from a large list. K.
tomphp has joined #ruby
<Radar>
And the list shows that this proxy is currently active?
mary5030 has quit [Ping timeout: 240 seconds]
codecop has quit [Remote host closed the connection]
Xeago has quit [Read error: Connection reset by peer]
<DarkElement>
Yep.
<Radar>
./shrug
jcdesimp has joined #ruby
Shaboum has joined #ruby
blackgoat has joined #ruby
einarj has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
FernandoBasso has quit [Quit: Leaving]
ht__ has quit [Quit: Konversation terminated!]
pawnbox has joined #ruby
oivoodoo has joined #ruby
jcdesimp has quit [Ping timeout: 240 seconds]
<Ox0dea>
No such file or directory
idefine has joined #ruby
ur5us_ has joined #ruby
Shaboum has quit [Client Quit]
uri_ has quit [Read error: Connection reset by peer]
vF3hNGxc47h8 has joined #ruby
ht__ has joined #ruby
DarkElement has quit [Quit: Leaving]
sftrabbit has joined #ruby
futilegames has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
moeabdol1 has joined #ruby
wilbert_ has joined #ruby
futilegames has quit [Client Quit]
gruz0 has joined #ruby
idefine has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
baweaver has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruce_lee has quit [Read error: Connection reset by peer]
bruce_lee has joined #ruby
DarkElement has joined #ruby
aswen has quit [Quit: WeeChat 1.4]
babblebre has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
tomphp has joined #ruby
stannard has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
agent_white has joined #ruby
ht__ has joined #ruby
einarj has quit [Read error: Connection reset by peer]
arup_r has quit []
einarj has joined #ruby
FooMunki has quit [Quit: FooMunki]
idefine has quit [Remote host closed the connection]
speaking1ode has quit [Ping timeout: 265 seconds]
synthroid has joined #ruby
FooMunki has joined #ruby
newdan has quit [Remote host closed the connection]
idefine has joined #ruby
baweaver has quit [Remote host closed the connection]
Pande has quit [Ping timeout: 265 seconds]
speaking1ode has joined #ruby
tomphp has quit [Client Quit]
<shevy>
lol
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
casadei has quit [Remote host closed the connection]
tomphp has joined #ruby
synthroid has quit [Ping timeout: 240 seconds]
tomphp has quit [Client Quit]
cpup has quit [Ping timeout: 250 seconds]
jackjackdripper1 has joined #ruby
tomphp has joined #ruby
PaulCapestany has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Ping timeout: 256 seconds]
cpup has joined #ruby
<Ox0dea>
$ pkgfile lol; echo $?
<Ox0dea>
1
<Ox0dea>
I'm genuinely surprised.
snguyen has quit [Read error: Connection reset by peer]
tomphp has quit [Client Quit]
PaulCapestany has joined #ruby
idefine has quit [Remote host closed the connection]
tomphp has joined #ruby
loophole_ has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
idefine has joined #ruby
freerobby1 has joined #ruby
loophole_ is now known as loophole
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cpup has quit [Ping timeout: 250 seconds]
tomphp has quit [Client Quit]
pawnbox has joined #ruby
tomphp has joined #ruby
cpup has joined #ruby
ruby-lang310 has joined #ruby
duckpuppy has quit [Ping timeout: 265 seconds]
gruz0 has quit [Quit: Leaving]
yfeldblum has quit [Remote host closed the connection]
nertzy2 has quit [Quit: This computer has gone to sleep]
tvw has quit [Remote host closed the connection]
BSaboia has joined #ruby
vishwa has joined #ruby
william3 has quit [Remote host closed the connection]
<vishwa>
How do you make an array of arrays? I'm trying to add arrays as an element of another array
<Waheedi>
any idea <class:SoftReference>': uninitialized constant Ref::SoftReference::Monitor (NameError)? from /opt/ruby-1.9.3-p125/lib/ruby/gems/1.9.1/gems/therubyracer-0.12.2/lib/v8/weak.rb:2:in `<module:V8>'
gbgdev has quit [Remote host closed the connection]
gbgdev has joined #ruby
<Waheedi>
how to install this gem libv8 (3.16.14.7 x86_64-linux)?
Burgestrand has joined #ruby
cicloid has joined #ruby
<Waheedi>
gem install libv8 -v 2.16.14.7?
<Ox0dea>
Almost.
<shevy>
ERROR: Could not find a valid gem 'libv8' (= 2.16.14.7) in any repository
idefine has quit [Remote host closed the connection]
<shevy>
oh
yfeldblum has joined #ruby
<shevy>
lol
idefine has joined #ruby
<shevy>
that always reminds me of the monty python life of brian
tomphp has joined #ruby
<TeresaP>
If I have a class Foo with a method "abc" and it calls another method also called "abc" in the Bar class, is there another way to force it to use the other class other than @core = Object.extend(Bar) and doing @core.abc?
pdoherty has joined #ruby
scripore has joined #ruby
kirillzh has joined #ruby
theslow1 has quit [Ping timeout: 250 seconds]
ElFerna has quit [Ping timeout: 240 seconds]
<Mon_Ouie>
If you don't care what object the abc method is called on, it probably shouldn't be an instance method in the first place. If you make it a class method you can just use Bar.abc.
<TeresaP>
I don't have control over Bar
VeryBewitching has quit [Quit: Konversation terminated!]
<Ox0dea>
Classes are just instantiable modules, you say?
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
<baweaver>
classy
<Ox0dea>
Modular.
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lucasb>
I don't know if this works, but I would guess you can include Bar in your Foo class, then to 'alias bar_abc abc', then define your own Foo's abc method
<Darmani>
Can someone explain this to me in English?
<toretore>
Darmani, os?
<Darmani>
Windows
<Ox0dea>
lol
<toretore>
count me out
<Darmani>
Lulz
jackjackdripper1 has joined #ruby
<Mon_Ouie>
It is about how Enumerable implements them, #map enum_yield(argc, argv) (which is like Ruby's yield(*args)), most other methods use rb_yield(arg) (which is like yield(arg))
arlek_ has joined #ruby
<volty>
why then map and select 's block receive different args ?